whscullin / apple2js

An Apple II emulator originally written in Javascript, now being converted to TypeScript
http://www.scullinsteel.com/apple2/
MIT License
435 stars 55 forks source link

Saving self-written program to file/localStorage? #175

Open anth-volk opened 1 year ago

anth-volk commented 1 year ago

First, I want to start off by thanking you for all of your hard work and effort on this project. As someone born post-Apple II, it has been a joy discovering the system in an easy-to-approach manner.

I realize this question may be a product of my own ignorance, as opposed to an issue, so my apologies if this is the wrong forum to ask. I wrote a basic BASIC program using the interpreter and was wondering if there was a way to export the program to a JSON file readable by your emulator, whether it be as some sort of output file or stored to browser localStorage. I tried what I thought might be a couple ways, but didn't find a way to do so.

Thank you very much.

anth-volk commented 1 year ago

Actually, just by trial and error (and based on a previous issue that was logged), it seems that F6 saves state to local storage and F9 loads it - is that correct?

whscullin commented 1 year ago

You should be able to save the disk to local storage, using the Save dialog - in fact you can, but loading the disk has gotten broken somehow 😞. I will look into that.

You can also download the disk from the same Save dialog, then open the downloaded disk again (or any disk image) using the Choose File button in the Open dialog.

anth-volk commented 1 year ago

Ah, I see. After posting this, I did notice that the issue was greater in Chrome than Firefox for some reason - with Chrome, I couldn't open the save dialogue at all, but with Firefox, I could, but couldn't load the disk.