jsbeeb - a Javascript emulator

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
Matt Godbolt
Posts: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Tue Jul 21, 2015 9:51 pm

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: 2098
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Postby tricky » Wed Sep 21, 2016 8:04 pm

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Wed Sep 21, 2016 8:07 pm

Interesting...is there anything in the Javascript console? (hit ctrl-HOME to stop jsbeeb, then ctrl-shift J)

User avatar
tricky
Posts: 2098
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Postby tricky » Wed Sep 21, 2016 10:26 pm

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Wed Sep 21, 2016 11:24 pm

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: 725
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Postby dp11 » Thu Sep 22, 2016 5:24 am

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Thu Sep 22, 2016 11:29 am

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: 725
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Postby dp11 » Thu Sep 22, 2016 2:04 pm

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Thu Sep 22, 2016 2:08 pm

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: 725
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Postby dp11 » Thu Sep 22, 2016 2:11 pm

Yes local storage.

I'll give that ago.

User avatar
Matt Godbolt
Posts: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Thu Sep 22, 2016 2:12 pm

(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: 725
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: jsbeeb - a Javascript emulator

Postby dp11 » Sat Sep 24, 2016 7:46 pm

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Sep 25, 2016 12:20 am

Thanks for the report! I've added to the list on GitHub and hope that Rich TW has some clues!

User avatar
tricky
Posts: 2098
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Postby tricky » Sun Sep 25, 2016 10:13 am

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Sep 25, 2016 12:24 pm

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: 2098
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: jsbeeb - a Javascript emulator

Postby tricky » Sun Sep 25, 2016 2:03 pm

Analogue channel 0 = mouse x, 1 = y, scaled 0 to &ffff

User avatar
Matt Godbolt
Posts: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Sep 25, 2016 4:04 pm

Wow that sounds be pretty straightforward then! Thanks.

Howe on earth did the hardware work?

User avatar
Matt Godbolt
Posts: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Sep 25, 2016 4:05 pm

Ah! You mean use the mouse to emulate the joystick! Yes; can do...

User avatar
vanekp
Posts: 465
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: jsbeeb - a Javascript emulator

Postby vanekp » Sat Nov 25, 2017 2:13 pm

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: 1401
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: jsbeeb - a Javascript emulator

Postby lurkio » Sat Nov 25, 2017 2:30 pm

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: 465
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: jsbeeb - a Javascript emulator

Postby vanekp » Sat Nov 25, 2017 2:38 pm

done, thanks.
Peter.

Hmmmm...
just tried it with the STH copy https://bbc.godbolt.org/?tape=sth%3APace%2FFortress_B.zip# and it works fine how odd.

User avatar
Matt Godbolt
Posts: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sat Nov 25, 2017 9:17 pm

Thanks all! Noted, and...subject to finding some time...I'll see what I can do!

User avatar
sydney
Posts: 2036
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: jsbeeb - a Javascript emulator

Postby sydney » Fri Feb 02, 2018 6:59 pm

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: 465
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: jsbeeb - a Javascript emulator

Postby vanekp » Fri Feb 02, 2018 7:17 pm

Or you can report it here https://github.com/mattgodbolt/jsbeeb/issues
Peter.

User avatar
Matt Godbolt
Posts: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Fri Feb 02, 2018 8:45 pm

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Wed Feb 07, 2018 3:44 pm

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: 168
Joined: Mon May 09, 2016 2:40 pm
Contact:

Re: jsbeeb - a Javascript emulator

Postby simonm » Wed Feb 07, 2018 3:49 pm

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Wed Feb 07, 2018 4:39 pm

It's absolutely on my TODO list...especially to get Kieran et al's masterpiece going :)

User avatar
lurkio
Posts: 1401
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: jsbeeb - a Javascript emulator

Postby lurkio » Sat Feb 10, 2018 1:40 am

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: 174
Joined: Mon Jul 31, 2006 10:02 am
Location: Chicago
Contact:

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sat Feb 10, 2018 2:49 pm

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 :)


Who is online

Users browsing this forum: ThomasHarte and 1 guest