Javascript Vic-20 emulator updated (completely rewritten)...
Moderator: Moderators
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
Javascript Vic-20 emulator updated (completely rewritten)...
Following features added.
* Rewritten to support Firefox!
* Joystick and 2nd VIA implemented.
* New games.
* Auto frame skip.
* Memory expansion options.
It's been tough though, Firefox Javascript is damn slow, so I had to write a Just In Time compiler to convert the 6502 to Javascript and optimise it rather than just interpret it.
Chrome and Safari are still the best at speed.
http://www.mdawson.net/vic20beta/vic20.php
* Rewritten to support Firefox!
* Joystick and 2nd VIA implemented.
* New games.
* Auto frame skip.
* Memory expansion options.
It's been tough though, Firefox Javascript is damn slow, so I had to write a Just In Time compiler to convert the 6502 to Javascript and optimise it rather than just interpret it.
Chrome and Safari are still the best at speed.
http://www.mdawson.net/vic20beta/vic20.php
- Kweepa
- Vic 20 Scientist
- Posts: 1315
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
Damned impressive!
I get 132% speed with Chrome and 42% with Firefox 3.5.
I can type BASIC without it dropping keystrokes! Very nice.
Is it possible to "fix" the aspect ratio?
This should definitely replace the animated GIF on the Denial front page!
Steve
[EDIT] Just had a browse of cpu.js. Incredible stuff.
I get 132% speed with Chrome and 42% with Firefox 3.5.
I can type BASIC without it dropping keystrokes! Very nice.
Is it possible to "fix" the aspect ratio?
This should definitely replace the animated GIF on the Denial front page!
Steve
[EDIT] Just had a browse of cpu.js. Incredible stuff.
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
-
- Omega Star Commander
- Posts: 1371
- Joined: Thu Jan 31, 2008 2:12 pm
- Website: https://robert.hurst-ri.us
- Location: Providence, RI
- Occupation: Tech & Innovation
Very cool! I am getting up to 302% emulation speed (typical 273%) using Firefox 3.5.3 on my workstation.
Do you allow this project to be used in other web-sites?
Do you allow this project to be used in other web-sites?
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
https://robert.hurst-ri.us/rob/retrocomputing
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
have updated cpu.js to handle dynamic code better.
Previously if code changed I recompiled the whole lot, now if you are just changing an immediate on a instruction I recompile the code to use the dynamic memory location as its immediate instead of a constant.
This means that Alien Blitz runs a heck of a lot faster (it's self modifying code central).
Also basic interperator runs faster as it has dynamic code for parsing code.
re: emulator on other websites. I don't really want to do that yet. Maybe later. I have bigger plans for it, so don't really want the competition!
re: aspect ratio, I'm percolating on it. It would require a little fancy coding to do the scaling which may be slower as the browser won't handle that for me.
Previously if code changed I recompiled the whole lot, now if you are just changing an immediate on a instruction I recompile the code to use the dynamic memory location as its immediate instead of a constant.
This means that Alien Blitz runs a heck of a lot faster (it's self modifying code central).
Also basic interperator runs faster as it has dynamic code for parsing code.
re: emulator on other websites. I don't really want to do that yet. Maybe later. I have bigger plans for it, so don't really want the competition!
re: aspect ratio, I'm percolating on it. It would require a little fancy coding to do the scaling which may be slower as the browser won't handle that for me.
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
Your workstation kicks ass btwrhurst wrote:Very cool! I am getting up to 302% emulation speed (typical 273%) using Firefox 3.5.3 on my workstation.
Do you allow this project to be used in other web-sites?
-
- Omega Star Commander
- Posts: 1371
- Joined: Thu Jan 31, 2008 2:12 pm
- Website: https://robert.hurst-ri.us
- Location: Providence, RI
- Occupation: Tech & Innovation
That's cool, thanks for letting us check it out though. It looks and runs great, so it certainly is a tease!re: emulator on other websites. I don't really want to do that yet. Maybe later. I have bigger plans for it, so don't really want the competition!
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
https://robert.hurst-ri.us/rob/retrocomputing
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
More changes:
* Added real speed counter, as the emulation speed counter doesn't take into account system/browser events causing things to be slow.
* Added some optimisation around screen redraw, probably good for another 30% speed.
* Fixed a bug, that I don't understand around frame rate For some reason the emulator was running at double speed. So I doubled the wait periods to make it run normally, but it has me stumped atm.
Don't forget shift+refresh again, for .js scripts to update as your browser may cache them.
* Added real speed counter, as the emulation speed counter doesn't take into account system/browser events causing things to be slow.
* Added some optimisation around screen redraw, probably good for another 30% speed.
* Fixed a bug, that I don't understand around frame rate For some reason the emulator was running at double speed. So I doubled the wait periods to make it run normally, but it has me stumped atm.
Don't forget shift+refresh again, for .js scripts to update as your browser may cache them.