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

Emulator stops when focus switches away from tab #63

Open
Cthutu opened this issue Dec 29, 2022 · 1 comment
Open

Emulator stops when focus switches away from tab #63

Cthutu opened this issue Dec 29, 2022 · 1 comment

Comments

@Cthutu
Copy link

Cthutu commented Dec 29, 2022

There are some very long-running programs being written and I'd like to start them then get on with other stuff that I am doing. However, I've noticed that when the browser's tab loses focus (switching to another or away from the browser itself), the emulator pauses.

Now, I am not sure if this is just the browser doing this. But if it is the emulator, would it be possible to remove that constraint?

Thanks.

@ojwb
Copy link
Collaborator

ojwb commented Dec 29, 2022

There's no code here which runs in the browser - if you're using the editor at https://bbcmic.ro/ that's https://github.com/mattgodbolt/owlet-editor

However, I think it's standard browser behaviour - I think they initially throttle then pause tabs which aren't in the foreground (otherwise sites with badly written javascript or actively nasty cryptomining-type code would consume resources).

If you have a long running BBC BASIC program beebjit is a better approach than jsbeeb (the emulator in owlet) - for example beebjit can usually run 3 hours of emulated time in well under a minute (the speed-up varies as it depends on what's being emulated).

The code here uses beebjit by default, and has a command line "try" mode which runs for 3 hours before taking a screenshot or recording 3 seconds of video which might be what you want or at least a useful starting point - see the rocket and clapper board emojis in the docs.

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