Asmusr #1 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 Share this post Link to post Share on other sites
Omega-TI #2 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 Share this post Link to post Share on other sites
Gary from OPA #3 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 Share this post Link to post Share on other sites
Asmusr #4 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 Share this post Link to post Share on other sites
sometimes99er #5 Posted April 25, 2014 Looks as if it runs fine on our iPads and Android tablets, sometimes with slower frame rates ... 1 Quote Share this post Link to post Share on other sites
am1933 #6 Posted April 25, 2014 Totally AWESOME! Rasmus also number 1 exporter of potassium in Denmark, all other potassium inferior to Rasmus. Quote Share this post Link to post Share on other sites
TheMole #7 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 Share this post Link to post Share on other sites
Asmusr #8 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 Share this post Link to post Share on other sites
sometimes99er #9 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 Share this post Link to post Share on other sites
Asmusr #10 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 Share this post Link to post Share on other sites
ti99iuc #11 Posted April 25, 2014 ohhhh nice, it's the future ! Quote Share this post Link to post Share on other sites
+OLD CS1 #12 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 Share this post Link to post Share on other sites
Vorticon #13 Posted April 26, 2014 Cool! My frame rate is around 21 on my first gen Nexus 7 tablet. Quote Share this post Link to post Share on other sites
Omega-TI #14 Posted April 26, 2014 I'd love to see Parsec added to the selection box! Quote Share this post Link to post Share on other sites
Omega-TI #15 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 Share this post Link to post Share on other sites
Asmusr #16 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 Share this post Link to post Share on other sites
Willsy #17 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 Share this post Link to post Share on other sites
RobertLM78 #18 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 Share this post Link to post Share on other sites
mizapf #19 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 Share this post Link to post Share on other sites
Asmusr #20 Posted April 26, 2014 Have you tried running the app locally? Quote Share this post Link to post Share on other sites
RobertLM78 #21 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 Share this post Link to post Share on other sites
RobertLM78 #22 Posted April 26, 2014 I just went ahead and tried the local version again - same thing. Quote Share this post Link to post Share on other sites
Asmusr #23 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 Share this post Link to post Share on other sites
TheMole #24 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 Share this post Link to post Share on other sites
Willsy #25 Posted April 29, 2014 This really has mega potential. This is awesome! Quote Share this post Link to post Share on other sites