Asmusr Posted April 25, 2014 Share Posted April 25, 2014 I needed a project for learning advanced JavaScript for my work, so here is my proof of concept for a TI-99/4A emulator written in pure JavaScript: http://js99er.net You can run it from the web link or download and expand the zip to your local machine and open the index.html file. All that's required is an up-to-date browser (Google, Firefox, IE 10+). Currently only the CPU, VDP, PSG, RAM and a bit of the keyboard is emulated. There 's no system ROM, GROM, DSRs, disks, i.e. none of the console's 'operating system' (the opening screen is just a VDP dump). So the programs are limited to machine code that doesn't require any console routines. Luckily I had a few of those available If you want to attempt to load other programs than the bundled examples, take at the software folder and software.js to see how it works, but beware that it will probably not work. The programs are currently provided as JavaScript arrays. I have attached a small Java program (bin2js.jar) to turn binary files into JavaScript arrays. I have put this together in few weeks. This would not be possible without taking advantage other peoples' work. I'm in eternal debt to Tursi, from whom I have borrowed much of the CPU emulation (plus a little from MESS), the sound emulation is using components from TSS Chiptune Sound Library and JavaGear, and the VDP emulation was based on MSX.js but has been substantively rewritten. If anyone is interested in contributing to js99'er I'm thinking about turning it into a GitHub open source project. [EDIT] Joystick 1 is mapped to arrow keys + Tab like in Classic99. Enjoy! ----------------------------------------------------------------------------------------------------------------------------------------- Note: This is now a fully working emulator capable of running most programs. Low levels disk access is only partially supported, and speech support is a hack. Apart from that it works, and it's the only emulator that supports most of the functionality of the F18A. rpk2json.zip js99er-2.5.zip 10 Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted April 25, 2014 Share Posted April 25, 2014 I needed a project for learning advanced JavaScript for my work, so here is my proof of concept for a TI-99/4A emulator written in pure JavaScript: https://googledrive.com/host/0B68J8LwEkfDyTUdTQWlVN0VPaEU/index.html You can run it from the web link or download and expand the zip to your local machine and open the index.html file. Totally AWESOME! 3 Quote Link to comment Share on other sites More sharing options...
Gary from OPA Posted April 25, 2014 Share Posted April 25, 2014 Looks good. There is another Java emulator Edward rewrote his V9T9 into Java a while ago: http://eswartz.github.io/emul/ Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 25, 2014 Author Share Posted April 25, 2014 Java and JavaScript are not the same. BTW, could someone try it on a tablet or a phone? I only have a 4 year old Nokia :-). Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted April 25, 2014 Share Posted April 25, 2014 Looks as if it runs fine on our iPads and Android tablets, sometimes with slower frame rates ... 1 Quote Link to comment Share on other sites More sharing options...
am1933 Posted April 25, 2014 Share Posted April 25, 2014 Totally AWESOME! Rasmus also number 1 exporter of potassium in Denmark, all other potassium inferior to Rasmus. Quote Link to comment Share on other sites More sharing options...
TheMole Posted April 25, 2014 Share Posted April 25, 2014 Runs without errors on my Nexus 5, although fairly slow (15 to 30 fps). Can't test keyboard functionality though, so maybe an onscreen joystick would be good? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 25, 2014 Author Share Posted April 25, 2014 In a few years it will probably be fine on phones, on my 3 years old laptop it runs at 60 FPS. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted April 25, 2014 Share Posted April 25, 2014 (edited) Rasmus also number 1 exporter of potassium in Denmark, all other potassium inferior to Rasmus. Yeah, I'm glad I didn't start a HTML5 Canvas shit thread when I looked into it a month ago. I was leaning more toward an XB emulator, with restrictions much like Harry's compiler (no file access etc.), but of course with floating point, and perhaps speech. You'd call the webpage, paste, write or edit the XB program and see it run wild (I would expect extremely fast ?). Edited May 1, 2014 by sometimes99er Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 25, 2014 Author Share Posted April 25, 2014 Yeah, I'm glad I didn't start a HTML5 Canvas shit thread when I looked into it a month ago. I'm hoping you would like to contribute to the project. Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted April 25, 2014 Share Posted April 25, 2014 ohhhh nice, it's the future ! Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 26, 2014 Share Posted April 26, 2014 BTW, could someone try it on a tablet or a phone? I only have a 4 year old Nokia :-). Gonna give it a try on my HP TouchPad later. Looks as if it runs fine on our iPads and Android tablets, sometimes with slower frame rates ... Cool... if it does not work in a native TouchPad browser, then it might work in the ACL Android environment on the same. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 26, 2014 Share Posted April 26, 2014 Cool! My frame rate is around 21 on my first gen Nexus 7 tablet. Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted April 26, 2014 Share Posted April 26, 2014 I'd love to see Parsec added to the selection box! Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted April 26, 2014 Share Posted April 26, 2014 In a few years it will probably be fine on phones, on my 3 years old laptop it runs at 60 FPS. Same here. It actually plays quite nicely. I think a website with a bunch of PLAYABLE TI GAMES and a link to this forum might help bring locate some old users and some new blood in. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 26, 2014 Author Share Posted April 26, 2014 I'd love to see Parsec added to the selection box! Yes that would be interesting. I guess I would need to add the system ROMs and implement GROMs. Is Parsec dependent on anything else? Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 26, 2014 Share Posted April 26, 2014 Rasmus also number 1 exporter of potassium in Denmark, all other potassium inferior to Rasmus. Rasmus also have pretty sister! 1 Quote Link to comment Share on other sites More sharing options...
RobertLM78 Posted April 26, 2014 Share Posted April 26, 2014 I'm using Firefox 28 on Linux Mint. I also use No Script, but of course, I allowed the scripts for the site, but I can't seem to get it to run. Am I doing something wrong? Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 26, 2014 Share Posted April 26, 2014 (edited) Mee too, I only see a black canvas, start button can be pressed without effect, stop button cannot be pressed, and the load dropdown is empty. My web developer console inside Firefox 28.0 (openSUSE 13.1) says: * Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. (requestNotifier.js:64) * The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. (index.html) * ReferenceError: webkitAudioContext is not defined (AudioLooper.js:27) At the same time, the console where I started Firefox says: JavaScript error: https://googledrive.com/host/0B68J8LwEkfDyTUdTQWlVN0VPaEU/tss/AudioLooper.js , line 27: webkitAudioContext is not defined JavaScript error: http://atariage.com/forums/public/js/3rd_party/ckeditor /ckeditor.js?nck=fb99e14e49767998a66e3b7a9956074d , line 145: u.data.html is undefined JavaScript error: http://atariage.com/forums/public/js/3rd_party/ckeditor/ckeditor.js?nck=fb99e14e49767998a66e3b7a9956074d , line 145: u.data.html is undefined GRRRR ... HOW CAN I TELL THIS !"§$/$% EDITOR TO STOP CREATING HYPERLINKS! Edited April 26, 2014 by mizapf 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 26, 2014 Author Share Posted April 26, 2014 Have you tried running the app locally? Quote Link to comment Share on other sites More sharing options...
RobertLM78 Posted April 26, 2014 Share Posted April 26, 2014 (edited) Have you tried running the app locally? That was the second thing I did when I couldn't get the website to work. Mee too, I only see a black canvas, start button can be pressed without effect, stop button cannot be pressed, and the load dropdown is empty. My web developer console inside Firefox 28.0 (openSUSE 13.1) says: * Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. (requestNotifier.js:64) * The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. (index.html) * ReferenceError: webkitAudioContext is not defined (AudioLooper.js:27) At the same time, the console where I started Firefox says: JavaScript error: https://googledrive.com/host/0B68J8LwEkfDyTUdTQWlVN0VPaEU/tss/AudioLooper.js , line 27: webkitAudioContext is not defined JavaScript error: http://atariage.com/forums/public/js/3rd_party/ckeditor /ckeditor.js?nck=fb99e14e49767998a66e3b7a9956074d , line 145: u.data.html is undefined JavaScript error: http://atariage.com/forums/public/js/3rd_party/ckeditor/ckeditor.js?nck=fb99e14e49767998a66e3b7a9956074d , line 145: u.data.html is undefined GRRRR ... HOW CAN I TELL THIS !"§$/$% EDITOR TO STOP CREATING HYPERLINKS! Just click the hyperlink off when you go to edit the post (see the third weblink). Well that doesn't work - I would just misspell the link, like using google-com instead of google.com. Edited April 26, 2014 by RobertLM78 Quote Link to comment Share on other sites More sharing options...
RobertLM78 Posted April 26, 2014 Share Posted April 26, 2014 I just went ahead and tried the local version again - same thing. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 26, 2014 Author Share Posted April 26, 2014 Hmm, I don't know. It works fine in Firefox on Windows, but there is a warning in the console about the sound library being deprecated. Quote Link to comment Share on other sites More sharing options...
TheMole Posted April 27, 2014 Share Posted April 27, 2014 In a few years it will probably be fine on phones, on my 3 years old laptop it runs at 60 FPS. Yeah, same for my 2013 lowest-end Mac Mini (using Chrome). Nice job man, really slick. Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 29, 2014 Share Posted April 29, 2014 This really has mega potential. This is awesome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.