jsbeeb - a Javascript emulator

discuss bbc micro and electron emulators (including mame) here!
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Could be; though I'd expect more to be broken if that were the case. I'm fairly certain jsbeeb's CPU emulation is correct after all the tortures I've put it through, at least!

More likely the information being passed to the ACIA from the tape emulation layer isn't quite right on one or other side. There's a lot of funky stuff going on there. There's also a lot of extra cool stuff (frequency stuff, stop bit encoding) that happens in the UEF format that doesn't matter in the "Tapefile" format (that I implemented first).

I'll definitely have a poke (though any bystanders' thoughts are very much welcomed!)
User avatar
tricky
Posts: 7719
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Post by tricky »

Sorry Matt, having GitHub login issues.
I just tried jsbeeb on Chrome Canary and it is very slow, probably something I haven't ticked or just that it is beta, but I thought I would mention it.
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Interesting...is there anything in the Javascript console? (hit ctrl-HOME to stop jsbeeb, then ctrl-shift J)
User avatar
tricky
Posts: 7719
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Post by tricky »

Looks OK (to me ;) ).
It probably just defaults some js optimisation off, but I thought it was worth mentioning.
Attachments
Canary.png
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Thanks! Looks like all the things I'd expect to initialise have done so OK: and there's no errors. I'll take a look!
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Post by dp11 »

I'm doing a bit of development and I keep on updating my ssd . It there a away to force jsbeeb to always reread the ssd instead of using the cached version?
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Hmm that's odd; how are you loading the ssd? Caching is app done in the browser not in jsbeeb itself; but there will be away to do this:)
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Post by dp11 »

Just using the Disc menu. It appears I need to change to another ssd then back again to make it reload the ssd that is changed externally.
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Are you loading a local file? If so, I can only read the file when you actually pick it from the menu. Javascript security settings is to only allow temporary file system access when the user uses the file picker.

When I do local development, I put the disc image somewhere I can read from (usually in the 'discs/' subdirectory of jsbeeb itself), then hack the url to be "disc=myssd.ssd", then just a reload gets the changes.
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Post by dp11 »

Yes local storage.

I'll give that ago.
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

(Also re: Chrome Canary: "Get on the bleeding edge of the web | Chrome Canary is currently not available on the linux platform." -- argh!)
dp11
Posts: 1762
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Post by dp11 »

A very small bug. I think. In mode 7 if you set R9 of the 6845 to 31 and display an "A". You get the full "A" but then the top of "B" where are it should I think be the top of "A" . The SAA5050 should should count hsync pulses to work out which row of a character to display and not sneak a look at the 6845 :)
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Thanks for the report! I've added to the list on GitHub and hope that Rich TW has some clues!
User avatar
tricky
Posts: 7719
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Post by tricky »

Is there any joystick / analogue support in jsbeeb?
If not, would it be possible to use the mouse position for channels 0 and 1 and the mouse buttons for fire 0 and 1?
I would like to be able to play Circus.
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

No joystick or mouse support: I'm not quite sure how I'd do it to be honest. I think the mouse movements are relative for those peripherals and of course the real mouse pointer is absolute. I'm sure something can be done; I've added it to the feature request list.
User avatar
tricky
Posts: 7719
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Post by tricky »

Analogue channel 0 = mouse x, 1 = y, scaled 0 to &ffff
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Wow that sounds be pretty straightforward then! Thanks.

Howe on earth did the hardware work?
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Ah! You mean use the mouse to emulate the joystick! Yes; can do...
User avatar
vanekp
Posts: 1414
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: jsbeeb - a Javascript emulator

Post by vanekp »

JsBeeb crashes out in a spectacular way while loading the tape version of Fortress :)
JsBeebFortressTape.png
But has come a long way works very well with most titles even ones like Joust :)
Peter.
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: jsbeeb - a Javascript emulator

Post by lurkio »

vanekp wrote:JsBeeb crashes out in a spectacular way while loading the tape version of Fortress
Do you want to report the bug?:
:?:
User avatar
vanekp
Posts: 1414
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: jsbeeb - a Javascript emulator

Post by vanekp »

done, thanks.
Peter.

Hmmmm...
just tried it with the STH copy https://bbc.godbolt.org/?tape=sth%3APac ... ess_B.zip# and it works fine how odd.
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Thanks all! Noted, and...subject to finding some time...I'll see what I can do!
User avatar
sydney
Posts: 2925
Joined: Wed May 18, 2005 10:09 am
Location: Newcastle upon Tyne
Contact:

Re: jsbeeb - a Javascript emulator

Post by sydney »

Is this the right place for a bug report?
I nominated Plan B in season 9 of the high score challenge and it doesn't display any of the enemies when run in jsbeeb.
They appear fine in beebem though there are no enemy bullets - not sure if there should be.
User avatar
vanekp
Posts: 1414
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: jsbeeb - a Javascript emulator

Post by vanekp »

Or you can report it here https://github.com/mattgodbolt/jsbeeb/issues
Peter.
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Thanks - yes the issue page is the canonical place to put the report! I'm actually spending a bit of time working on jsbeeb again, will try and look at these issues too.

Thanks everyone for your support!
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

Some recent updates to jsbeeb:
  • Discs are read/write by default now. If a game failed because it wanted to write to disc, it should now work. Though any modified data is lost - currently without any warning (sorry!)
  • Touchscreen support has been added! Currently on by default, but will eventually need to be enabled by an option. This has meant I've fleshed out the RS423 support, which opens the doors to more peripherals.
  • Some bugs in the 1770 emulation and DSD support have been fixed, which was causing some odd problems related to games crashing (due to corrupt data being loaded).
User avatar
simonm
Posts: 363
Joined: Mon May 09, 2016 3:40 pm
Contact:

Re: jsbeeb - a Javascript emulator

Post by simonm »

Hey Matt - I was wondering how feasible it might be to incorporate support for emulation of RobC's VideoNULA in jsbeeb?
Would be terrific to run some of the demos that use it in a browser.

Cheers
Simon
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

It's absolutely on my TODO list...especially to get Kieran et al's masterpiece going :)
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: jsbeeb - a Javascript emulator

Post by lurkio »

Matt Godbolt wrote:It's absolutely on my TODO list...
Thanks, Matt! The write-access update to JSBeeb is great.

Any chance you could make the 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" and silently. The disc-drive motor noises really slow down the loading of games, especially when multiple files need to be loaded in sequence. For example:
More discussion here:
:arrow:
User avatar
Matt Godbolt
Posts: 255
Joined: Mon Jul 31, 2006 11:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Post by Matt Godbolt »

lurkio wrote: Any chance you could make the 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" and silently.
Absolutely! I need to add more configuration for the emulator state anyway. I think disc drive noises should be a user setting (saved and persisted per user, rather than as part of the URL) - do you think?

I think I'll also speed up the disc access anyway as it's been driving me nuts too :)
Post Reply

Return to “8-bit acorn emulators”