jsbeeb - a Javascript emulator

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
billcarr2005
Posts: 1094
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: jsbeeb - a Javascript emulator

Postby billcarr2005 » Mon Jul 13, 2015 6:23 pm

I'm not sure the FDI, if it exists (can't remember whether it was on Acorn Preservation), would work since there is a misreported sector size, which B-Em doesn't handle since it's in 1770 mode.

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Mon Jul 13, 2015 8:47 pm

Ahhh ok When acornpreservation was up and runnig I did copy all the stuff off there at the time and don't see it amongst the stuff from there that I have, looking at the copy of disc web page I see all the reptons except The 1st Repton :(

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Mon Jul 13, 2015 9:16 pm

Somewhat tangentially related; I did a presentation at work on how to emulate a Beeb. I've put the slides up here and I'm trying to get permission to share the video, should anyone care :)

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

Re: jsbeeb - a Javascript emulator

Postby lurkio » Mon Jul 13, 2015 9:30 pm

Matt Godbolt wrote:I'm trying to get permission to share the video, should anyone care :)

This would be good. :D

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

Re: jsbeeb - a Javascript emulator

Postby tricky » Tue Jul 14, 2015 7:46 am

Missed the down buttons first time through and then had to add my own demo the second ;)

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Wed Jul 15, 2015 9:03 pm

Another odd one, if I save a file in BeebEm tape, so a UEF image file,
JSBeeb does not read the file it just sits there looking dumb ?
attached a test.uef i created in BeebEm (.uef renamed to .zip, rename back to .uef)
Attachments
test.zip
uef file renamed to zip rename back to uef after dl.
(338 Bytes) Downloaded 30 times

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Thu Jul 16, 2015 1:33 pm

Video now available! Hooray: Emulating a BBC Micro in Javascript

@vanekp; I'll take a look at your file sometime soon. UEF support was always sketchy.

User avatar
BigEd
Posts: 1484
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: jsbeeb - a Javascript emulator

Postby BigEd » Thu Jul 16, 2015 2:32 pm

That's great! Can I suggest you add links to your blog posts about the difficulties you faced, in the Youtube description?
(I suppose that would be http://xania.org/Emulation)

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Thu Jul 16, 2015 3:17 pm

Done! thanks Ed :)

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Fri Jul 17, 2015 12:55 pm

vanekp wrote:Another odd one, if I save a file in BeebEm tape, so a UEF image file,
JSBeeb does not read the file it just sits there looking dumb ?


Yup indeed! The tape was compressed, and jsbeeb doesn't support that at the moment; I'll fix it soon!

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Fri Jul 17, 2015 6:57 pm

Silly question you did just rename it to test.uef as I did not compress it just renamed it to zip because you cant upload .uef files but if its called .zip you can?
Peter.

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Fri Jul 17, 2015 7:01 pm

Yes I did. The UEF itself is allowed to be gzipped though (and this one is!). My code does support auto-ungzipping, but something is going wrong with it. Given all the problems I've had with the ungzip Javascript library I chose, I may blame that for now. Hope to fix on the train on the way home :)

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Fri Jul 17, 2015 11:19 pm

I just fixed the UEF gunzipping stuff: the beta site (http://bbc.godbolt.org/beta) has the fix (you may need to shift-F5 reload). All being well I'll release it to the main site over the weekend :)

Thanks!

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Sat Jul 18, 2015 2:36 pm

Hmmm something odd, I select the tape but it stays on the screen to select a file and only have the close button as a option. as on the normally jsbeeb it then closes the file select window when you select a uef file. It shows a file name but not sure its reading it as just sits there, or I am doing something wrong, not sure what you meant by pressing shift F5.
In the Developers tool i see :- "event noted:" "local" "clickTape" undefined main.js:4:23360
TypeError: t is undefined

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sat Jul 18, 2015 3:56 pm

Whoops! Fixed now too! Thanks for the bug report.

As for a "shift F5" reload what I meant is sometimes the browser* caches things a little too aggressively and you need to force it to load the latest version. On most browsers holding shift while clicking the reload button does this. F5 is often reload too, so shift-F5 works too....unless jsbeeb is actually running in which case it steals F5... so best bet is to hold shift and click the reload button if you have problems.

Anyway, the beta site is updated with the fixed version; please give it a go! all being well I'll push it to the main site later this weekend!

-matt

* This is not really the browser's fault; but mine. I need to fix that sometime...

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Sun Jul 19, 2015 2:15 pm

Shift F5 on Firefox brings up the devlopment menu. so guess its diffrent from I thin k you use Chrome. Anyway I 1st ran CCleaner to clear everything out but sill am not able to load some tape images it just sits on the screen to select them (see attached photo). This is from a local source file I am trying ot load images.
Reg. Peter.
Attachments
JsBeebCassetLoad.png

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Jul 19, 2015 2:23 pm

thanks, and sorry for all the trouble. I don't know what CCleaner is, but please do try holding shift while clicking the "refresh" button.

Failing that can you tell me what's in the javascript console there's probably another error I need to fix!

I just tried again myself in both Chrome and Firefox and loading the local test.uef file worked for me. Shift-F5 is reload in my firefox, so I'm a bit confused, what OS and version are you using? Maybe try ctrl-shift-R (which is another key to do it according to the Firefox website.

Feel free to email me directly if you have issues btw (matt@godbolt.org) -- saves spamming everyone on this thread :) I'm going to try and fix the underlying caching issue now!

User avatar
1024MAK
Posts: 6786
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: jsbeeb - a Javascript emulator

Postby 1024MAK » Sun Jul 19, 2015 3:14 pm

On the version of Firefox that i'm using (a Linux OS version), it's CONTROL F5. See here.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Jul 19, 2015 3:37 pm

Whoops! You're absolutely right! F5 is normal reload, Ctrl-F5 is force reload! Thanks :)

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Sun Jul 19, 2015 7:59 pm

Right! I _hope_ i've made the beta site no longer require shift-reload trickery! So if you still have problems on the beta site it's still all my code's fault and not my webserver :)

Please try it out and let me know!

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Sun Jul 19, 2015 8:12 pm

CCleaner is Crap Cleaner wich clear out all your cache and temp files.
Anyway tried Ctrl F5 and then loaded the image but will not load and if i bring up the Developers tools console I see:-
"event noted:" "local" "clickTape" undefined main.js:4:23360
"Ungzipping local file" main.js:4:15469
Error: Corrupt data main.js:4:14891
wIch is loading a uef image created in BeebEm itself (wich I will attach).
Regards,
Peter.
Attachments
CastleQuest-hq.zip
(18.37 KiB) Downloaded 26 times

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Mon Jul 20, 2015 4:18 pm

Thanks again Peter. I'll look into this next. I also have just got a bumper lot of UEFs to play with myself so hopefully I can iron out the kinks before you find them!

Again cheers for the report and for your patience!

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Tue Jul 21, 2015 2:47 am

Alright! Site updated /again/! Now hopefully with working-for-all-zip-files. It's genuinely amazing how many bugs I've found in the decompression code! I tested a few other gzip files (and even wrote some unit tests for it, oo get me); but do let me know if you come across any other oddities!

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Tue Jul 21, 2015 2:53 am

Of course, the UEF of castle quest doesn't actually load (boo): I got a

Code: Select all

Data?
at block 16. Will try it in another emulator; it's bound to be another issue in jsbeeb!

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Tue Jul 21, 2015 2:57 am

b-em 2.2 does the same, so maybe it's not just me :)

Is there an emulator it loads in OK?

User avatar
MartinB
Posts: 4555
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity

Re: jsbeeb - a Javascript emulator

Postby MartinB » Tue Jul 21, 2015 6:46 am

The one posted just above? It loads and runs fine in Beebem (v4.14).... 8)

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

Re: jsbeeb - a Javascript emulator

Postby Matt Godbolt » Tue Jul 21, 2015 1:05 pm

Thanks :) Yes the Castle Quest image you linked. I'll have a dig but this is going to be a toughy!

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

Re: jsbeeb - a Javascript emulator

Postby vanekp » Tue Jul 21, 2015 9:27 pm

Maybe its the way BeebEm makes the tape images as some will not work on B-em either or they work to some extent then give tape read errors.

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

Re: jsbeeb - a Javascript emulator

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

Maybe so but I'd like to work out why, and then fix whichever end has the problem. :D

User avatar
MartinB
Posts: 4555
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity

Re: jsbeeb - a Javascript emulator

Postby MartinB » Tue Jul 21, 2015 9:43 pm

If it's always Data? errors, might that imply that there's a leaky tape CRC algorithm at one end or the other? Maybe something like an unattended Carry somewhere? Pure speculation of course.... :wink:


Return to “emulators”

Who is online

Users browsing this forum: paulb and 3 guests