Posted By
Csabo on 2016-04-01 02:27:28
| A Monumental Step Forward In Emulation
Wow, what a time to be alive, who would have thought this day would come. If someone suggested to you a few years ago, "Let's write a Commodore Plus/4 Emulator in JavaScript!", you would have laughed, and rightly so. That's a joke! JavaScript is way, way too slow for that.
Well, that's certainly no longer the case. Thanks to some JS magic, Gaia maestro brings us the first real JavaScript emulator! So, for example you can play Ghost Town "for real". Just look for the same blue "PLAY ONLINE" button on the detail pages, as this feature replaces the older Java emulator, which was no longer working in most modern browsers. Amazingly, even hardcore games like Zador run (although admittedly with some display issues). Still, this is a truly fantastic achievement, and hopefully will be a very well received feature. The ease of access to games online - no need for emulator downloads - is a monumental step forward in emulation.
The code is based on the popular YAPE, so the same hotkeys will work. E.g. ALT+W to toggle speed, F11 to reset, etc.
Note: there might still be some errors, but we're hoping those will be ironed out soon.
April 2nd update: Those errors mentioned above have indeed been ironed out. Happy emulating!
|
|
Posted By
Luca on 2016-04-01 02:27:28
| Re: A Monumental Step Forward In Emulation
Keep softresetting till death!
|
|
Posted By
Gaia on 2016-04-01 02:44:41
| Re: A Monumental Step Forward In Emulation
Alt + R is recommended over F11 (use Shift + F11 for hard reset). Also, you can access the built-in menu by pressing ESC and access all Options from there. Anyway, here is a complete list of hotkeys:
SHIFT + F11 : hard reset (clear memory, reloads ROMs, rewinds tape) F5 : press PLAY on tape F6 : press STOP on tape F7 : save screenshot to BMP file F8 : enter the user interface, press F8 again or ESC to quit. You can move around in the menus with the arrow keys, press ENTER for selection. F9 : quick debugger F10 : save current settings to user's home directory LALT + 1-3 : set window size LALT + L : switch among emulators (C+4 cycle based; C+4 line based; C64 cycle based) LALT + I : switch emulated joystick port LALT + P : toggle CRT emulation LALT + R : machine reset LALT + S : display frame rate on/off LALT + W : toggle between unlimited speed and 50 Hz frame rate (original speed) LALT + ENTER : toggle full screen mode LALT + F8 : save memory pointed by $2B/$2C and $2D/$2E LALT + F5 : save state LALT + F6 : load state
By the way, nice animation, Csabo :)
|
|
Posted By
SVS on 2016-04-01 07:56:39
| Re: A Monumental Step Forward In Emulation
Funny! Even I was not able to fix the inclined screen
|
|
Posted By
Mad on 2016-04-01 12:32:53
| Re: A Monumental Step Forward In Emulation
This is totally awesome! Who thought that the plus4 will be playable in a browser this days .
|
|
Posted By
gerliczer on 2016-04-01 13:26:45
| Re: A Monumental Step Forward In Emulation
Yay! Actually JavaScript is too slow to do it, but computers nowadays are powerful and quick enough to run such an emulation with acceptable frame rate. However, the sound is still raspy in FF (45.0.1).
|
|
Posted By
Csabo on 2016-04-01 14:51:00
| Re: A Monumental Step Forward In Emulation
For me the sound is perfect, no stuttering or any similar artifacts. When you run it without the 50Hz timer (ALT+W), what % and FTP do you get? (Top/right corner)
|
|
Posted By
gerliczer on 2016-04-01 16:57:46
| Re: A Monumental Step Forward In Emulation
Over 200% and over 60FPS. PC is i7-4500U notebook with some Realtek integrated sound card and HD Graphics 4400. Browser is FF 45.0.1.
|
|
Posted By
Lavina on 2016-04-02 06:21:12
| Re: A Monumental Step Forward In Emulation
Tilt error Wrong computer error Zero bytes free error Emulator too small error (size does matter) Out of focus error Cat is too grumpy error
Tried several browsers.
Then I thought it's the 1st of April.
But then I managed to get it work. Sound is something special, though, it's some white noise for me.
What am I doing wrong. ?
Cheers, Lavina
|
|
Posted By
Litwr on 2016-04-02 11:09:29
| Re: A Monumental Step Forward In Emulation
The quality looks excellent... I was almost shocked by the keyboard picture - is it a step to Android port? IMHO C64 and C+4 emulators should be divided because the absence of common software.
|
|
Posted By
Csabo on 2016-04-02 17:43:43
| Re: A Monumental Step Forward In Emulation
gerliczer: I get 270-290% and ~70fps. Same browser, though Chrome is best at JS. So... *shrug* Something on your end, I'd guess. Maybe you can debug it with Gaia. Did you have sound issued with MikeDx's version, which used to be in the HVTC?
Lavina: again, no idea, sound's fine for me. I know this does help much
|
|
Posted By
Chicken on 2016-04-02 18:12:03
| Re: A Monumental Step Forward In Emulation
Litwr: What about the ACE disk version? Same disk for both systems There are probably a very few other releases that are for both systems but right now I couldn't think of any. And I get your point, don't take this too serious
|
|
Posted By
Gaia on 2016-04-02 18:46:20
| Re: A Monumental Step Forward In Emulation
@Litwr: Thanks! The C64 is built in for no reason other than fun It can run most games there without problems, too. By the way, I do not know of a C64 JS emulator that would integrate well with online software collections.
Sound: well, I have an end of '90s feeling regarding this. I seriously think it is Emscripten related as the desktop yapeSDL build - as I explained - has no jerky audio at all. Emscripten is returning control to the main loop on each vblank (in my case that is 60 Hz - controlled by WebGL) and perhaps that causes some timing issues. You could try disabling WebGL in Firefox and see whether that fixes. Or report your monitor refresh rate here to see whether there is in fact a correlation.
|
|
Posted By
Litwr on 2016-04-03 14:59:32
| Re: A Monumental Step Forward In Emulation
Chicken, I am not serious I am trying to imagine both C+4 and C64 turned on near me at one table. Gaia, did you inform C64 users about this program? They may provide the better testing. BTW Is it possible to finish Ghost Town? My opinion from 80s: it is impossible even to start. EDIT: without the ready solution, of course. :)
|
|
Posted By
gerliczer on 2016-04-04 13:45:55
| Re: A Monumental Step Forward In Emulation
@Csabo Yes, the older emulation by MikeDX also had issue with the sound. However, it behaved quite differently. Instead of being raspy, it had intermittent stops for a fraction of a second, but not counting these it was playing nicely. I guess, the short stops that were present in MikeDX's version got much much more frequent in Gaia's build.
|
|
Posted By
Gaia on 2016-04-04 14:58:10
| Re: A Monumental Step Forward In Emulation
Mike's was using SDL1, mine is using SDL2 which is still not officially in production I believe. But the real culprit is I think is how the control is returned to the main loop in Emscipten: in SDL's audio implementation you typically have a callback function which runs in a different thread than the main one and the buffer fill is called independently from the main loop's thread. Somehow this method still works under Emscripten / JS despite it being strictly single threaded if there is misalignment between the main thread driven by the VBL of the video and the sound buffer underrun we might be out of luck. I do not know how the SDL2 port of Emscripten gets around this problem - if at all - but a more fool proof method could be implementing SDL2's new 'SDL_QueueAudio' method which runs in the same thread as the main one instead of a separate callback thread. So that's probably next on the todo list
|
|
Posted By
angelsoft on 2016-04-04 16:08:44
| Re: A Monumental Step Forward In Emulation
Great! It's not long ago that Oracle announced they would support the browser java plugin no longer. So I wondered how plus4world would keep up the 'play online' feature. And - just in time - there is the Javascript Emulator! Well done, Gaia!
|
|