Skip to content
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

Save state, load no more? #209

Open
dungeonkim opened this issue Feb 27, 2024 · 1 comment
Open

Save state, load no more? #209

dungeonkim opened this issue Feb 27, 2024 · 1 comment

Comments

@dungeonkim
Copy link

I used to be able to press F6 and F9 to save and load state, but this doesn't work in the current build.
Is there a reason for this?
How can I make it possible to save and load state?
Thanks.

@rgov
Copy link

rgov commented Jun 10, 2024

The code for this still exists:

apple2js/js/ui/apple2.ts

Lines 950 to 961 in 838fda6

keyboard.setFunction('F6', () => {
window.localStorage.setItem(
'state',
base64_json_stringify(_apple2.getState())
);
});
keyboard.setFunction('F9', () => {
const localState = window.localStorage.getItem('state');
if (localState) {
_apple2.setState(base64_json_parse(localState) as Apple2State);
}
});

Years ago the pull request #59 was merged with the comment "Get save and restore state limping along to nearly as well as before I refactored and broke everything." But I assume you are not saying that it last worked 3+ years ago?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants