-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is file saving possible or is it a desired feature? #112
Comments
Hi! Thanks for the message. The current default is to mount the discs read-only: this is because in general Javascript can't write them back (there's no built-in access to the file system). jsbeeb supports in-browser discs, in a very limited fashion. With this one can have read-write discs that are local to the exact browser you're running. Obviously this isn't as good as a general save system as if you use a different browser on another computer you won't have your saves. jsbeeb also allows you to use Google Drive to save your discs on "the cloud". This might work better in general. Regrettably the UI for both these choices is very minimal. In order to set up a google drive disc you'll need to do some URL hackery, which is not great. That said: I just tried to use the Google Drive approach and it's not currently working...I'll fix that and update. Do you think storing the discs on Google Drive would work for you? If not I'll give you instructions on setting up a local disc. Are you running a local jsbeeb or using the public site? |
Hi Matt, I'm running jsbeeb on an Apache server on my intranet. The site is not public at the moment. Thanks for your help! |
Okay, I now have Google Drive working fine. That would be the better option, I think. |
Cool! I'm working on fixing why Google Drive isn't working quite how I expected it to... |
(you don't need to install anything to use Google Drive: it's all done on the server in this case, FWIW) |
Cheers, Matt. Is it heavily coded for Google Drive or could I hack it to use my self-hosted ownCloud? The reason I ask is that I'm trying to make all the facilities on the site self-contained, so that everything would work with local community wifi, if access to the internet was unavailable or compromised. |
It's not at all heavily coded :) If you take a look at google-drive.js you can see how short the code is to get/put images. The main work will be putting in the support in main.js to create your loader/saver in the right places. |
For what it's worth, the error I'm tracking appears to be a Chrome bug; so you should be able to play on with Google Drive (or your own setup). For completeness, here's a Drive howto:
Depending on how you want to proceed, you can either *COPY all of Philo Quest onto your disc, and then reload it as disc 0, or if Philo Quest lets you, just save your save games on drive 1. |
Many thanks again, Matt! I'll give that a whirl. |
Hi Matt, when I click on Disks -> From google drive and sign into google drive, I'm getting a "400 origin mismatch" response from the google server, even if I access my site from its public domain address. If it's not too much hassle, do you have the instructions to create a local drive, please? |
Hmm - what URL are you accessing it from? Can you share it just so I can The local image is created by putting: On Tue, May 31, 2016 at 1:17 PM Eric Twose [email protected] wrote:
|
(this is sorta covered in the README.md on On Tue, May 31, 2016 at 2:31 PM Matt Godbolt [email protected] wrote:
|
Thanks, Matt. I'll check out the local disk for now. I was wondering if the google API is only set up to allow access from certain domains (such as your own)? jsbeeb is at: Request Details:
|
disc2=local:mydrive creates a local disk OK; *DRIVE 1 at the BASIC prompt or in InterWord's menu lets me swap the drive; LOAD and SAVE then work in InterWord. So that's looking good. |
Cool re: local drives. Google Drive is absolutely limited by domain: google only allow you to create access keys relevant for a domain (hadn't realised at that point you were running your own jsbeeb setup! yay :)) Sounds like local disc and/or your own bespoke storage solution is the way to go: I'd be delighted to help where I can if you get stuck! |
Thanks again, Matt. I'll let the dust settle and come back to this. |
FWIW "scansafe" - a site my company uses to filter for bad content, is giving an error for your aeon link:
Probably nothing; but thought I'd mention it :) |
I think that it's the free dynamic dns domain "mooo.com" that has the reputation, Matt. I've hardly had the site open, except to show folk stuff, as it is intended to be a local community wifi portal "aeon.local" with a load of self-contained apps like maps; wikipedia; webmail; forum; social media; etc; etc. |
Ahhh righto! No worries there then: just wanted to make sure if it was your site you knew and could take appropriate action :) |
@Esowteric Did you get a satisfactory solution using this approach? |
Sorry to hijack the issue. You said in the 31 May update that a disc can be written to, but I get
when I try to write to it. How do you make the disc read write? |
hi @pau1ie - as it stands the discs that load from the internet via URLs (as bbcmicro and jsbeeb's main site does when loading from the STH archive) are loaded as read-only. My rationale is only discs that actually preserve their contents should be considered writable; else people might create saves and then reload the web page only to lose their data. Can you give an example of a game that won't run without writing to the disc? Perhaps I can come up with either a flag to say "allow writes for this disc regardless" or at least add a warning to writing to an ephemeral disc instead (like a popup that says "hey; we wrote to the disc. It won't be saved on a reload..." |
I realise it is silly to write to the disc as changes will be lost, however, as @ahope1 mentioned in #140 there are a number of games that crash if they are on a read only disc, e.g.
If I could allow writing to the disc it would allow the configuration to be written and the game to be played. I would be happy to pass a flag on only those games that need it. |
Sounds like a plan; maybe I'll do a pop up on the first disc write offering to make a local disc of the current image? Some UI work is needed for that, but the whole save thing/multiple discs etc is a great pain in the proverbials at the moment. |
@mattgodbolt From the point of view of users of bbcmicro.co.uk, I think they'd want the game to "just work", so a popup asking about local discs, etc., might be a tad too "frictional", if u know what I mean. Could there be a URL param that gives us the option to silently enable write access to the main booted disc (while letting the default behaviour be as you described above)? |
Absolutely; yes. We can see how it goes. I hope to have a little time over
the Xmas period to take a look at this. Thanks everyone!
…On Sat, Dec 17, 2016 at 11:11 AM, Ant ***@***.***> wrote:
@mattgodbolt <https://github.com/mattgodbolt> From the point of view of
users of bbcmicro.co.uk, I think they'd want the game to "just work", so
a popup asking about local discs, etc., might be a tad too "frictiional",
if u know what I mean. Could there be a URL param that gives us the option
to silently enable write access to the main booted disc (while letting the
default be the behaviour you described above)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#112 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmsdcBMUV-SgHyFS5qBBdxDNbBmrNedks5rJBeogaJpZM4IqtjU>
.
|
Any progress on this? It turns out there are quite a few games that need write-enabled discs in order to run. |
Hi @ahope1 - sorry no progress. This is pretty embarrassing but things got busy and now 9 months have passed...thanks for reminding me. I'll have a think and see if something quick and easy can be done! |
FWIW, I've got this compiler I want to demo... but it's a massive eight-stage pipeline with huge temporary files, so fairly obviously, it needs to run on a read/write disk! I don't particularly care about saving changes, so just storing the disk image temporarily in RAM is entirely good enough for me. |
Change 5b9135f makes discs read/write by default (losing changes silently on window close) |
@mattgodbolt Thanks, Matt! That's great. Any chance you could make disc-drive noises optional? That would be ideal for bbcmicro.co.uk, which currently uses an earlier version of JSBeeb which doesn't implement the noises and thus loads games "instantly"! Currently, the game Zen (which happens to need write-access) is painfully slow to load if you use the latest version of JSBeeb: |
Ok, I think we're close to being to close this issue:
I've crashed into a few quirks with the Google Drive support so I'll fix them, tag this issue, and close. |
Actually, re-opening issue #113 to fix some Google Drive issues and closing this issue. |
Hi, sorry if this is a naive question. My first computer was a BBC B, but I'm new to jsbeeb.
I checked out the Philosopher's Quest with Save Game disk and the InterWord ROM, and when I try to save the game or a document, I get a read-only access message.
The browser I've been using is the latest Firefox.
Is file saving possible or is it a desired feature?
Thanks a lot,
Eric T.
The text was updated successfully, but these errors were encountered: