Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 139 users online: 4 members, 99 guests and 36 bots. Members: charlessprinkle, mattedimarco, tr1p1ea. Bots: VoilaBot (4), Spinn3r (1), MSN/Bing (3), Magpie Crawler (3), VoilaBot (7), Googlebot (18).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Author |
Message |
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 24 Jan 2012 03:31:54 pm Post subject: [InDev] jsTIfied, a Javascript TI-83+ Emulator |
|
|
For many years, perhaps since I first designed the fledgling version of SourceCoder 2.5, I have wanted to make a Javascript graphing calculator emulator. SourceCoder has a keypad that lets you enter tokens and symbols into its editor, but imagine if you could have a real calculator emulator right on the page to test your programs! Imagine if you could do BASIC development and testing online without having to touch an offline emulator or real calculator! This was my dream, but a combination of limited technology, limited experience, and legal hurdles restricted me from following through.
No longer.
First, the legal hurdles. It is illegal to distribute ROM images, so I couldn't make an emulator with a ROM image hosted on Cemetech. I couldn't even let people upload their own ROM images, or in any way let ROM images touch the Cemetech server. HTML 5 offers a solution to this conundrum in the form of what is called DOM Storage. Cemetech gives the javascript for my z80 core to clients, and they load their (legal, I hope) ROM image from their own personal calculator into their browser, but still entirely client-side. No ROMs are distributed in any form.
Second, the technical hurdles. The canvas element of HTML4/5 is powerful and fast enough to be manipulated and display a smooth image of a calculator screen in real-time. Modern computers and modern Javascript implementations are fast enough to run the massive code required for an emulated 6MHz CPU at faster than realtime. In addition, tools such as Google's Closure Compiler exist to optimize and compress Javascript for speed and size.
In a total of about four days separated by two months, I have put together jsTIfied, pronounced "justified", a Javasdript TI-83+ emulator. It is not ready for any public testing or release, and thus is sitting happily offline and not anywhere on Cemetech, but I'm proud to announce that it is fully-functional. As you can see from the screenshots below, I can do math, run applications, and I assure you, almost everything else an emulator such as PindurTI can do. Indeed, I owe a debt of thanks to Gergely Patai (or Patai Gergely), the author of the original PindurTI, for swathes of C code that I studied for jsTIfied, and for the key layout that I used for jsTIfied. In homage to PindurTI, I made the appearance resemble that much-loved emulator. I also owe thanks to JSSpeccy, a Javascript ZX Spectrum emulator that heavily contributed to my understanding of emulating a z80 processor, and some segments of code from which found their way into jsTIfied, especially in helping me to wrap my head around emulating interrupts.
I have great plans for jsTIfied, including letting you somehow test programs from the archives, run SourceCoder projects, and much more straight from your browser. Before that can happen, there are plenty of tweaks and changes for smoothness to be made and features to be added, so for now, enjoy the screenshots below!
 _________________
 |
|
| Back to top |
|
|
tifreak8x

Guru

Joined: 16 Mar 2005 Posts: 9104 Location: Sol System
|
Posted: 24 Jan 2012 03:39:19 pm Post subject: |
|
|
That's some high level of awesome right there, Kerm Good job, can't wait to see this working in conjunction with sourcecoder! _________________ Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%
Look here for Assembly Resources. |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 24 Jan 2012 03:45:07 pm Post subject: |
|
|
| tifreak8x wrote: | That's some high level of awesome right there, Kerm Good job, can't wait to see this working in conjunction with sourcecoder! | Many thanks, tifreak8x! I'm looking very forward to sharing this with everyone.  _________________
 |
|
| Back to top |
|
|
elfprince13

OVER NINE THOUSAND!

Joined: 23 May 2005 Posts: 10248 Location: A galaxy far far away......
|
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 24 Jan 2012 05:28:58 pm Post subject: |
|
|
| elfprince13 wrote: | | This is very cool! Do you have plans to support 84+ emulation as well? | Thanks, Elfprince! I am able to eke out about 8 or 10MHz, so there is a bottleneck there. I also don't think I'll be able to fit a full 84+/SE OS in the DOM Storage, although I'm not positive about that. _________________
 |
|
| Back to top |
|
|
souvik1997

Guru-in-Training

Joined: 19 Apr 2010 Posts: 2870
|
Posted: 24 Jan 2012 05:31:51 pm Post subject: |
|
|
Awesome job, Kerm. Do you have plans to let it directly connect to gCn without any offline computer programs? _________________ CALCnet Tournament-38%
deviantArt
 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 24 Jan 2012 05:32:44 pm Post subject: |
|
|
| souvik1997 wrote: | Awesome job, Kerm. Do you have plans to let it directly connect to gCn without any offline computer programs? | Oh a, I didn't even think of that, but I absolutely want to implement that now that you mention it. Thanks for a superb suggestion! _________________
 |
|
| Back to top |
|
|
juju2143

Member

Joined: 16 Aug 2010 Posts: 129 Location: Québec (Canada)
|
Posted: 24 Jan 2012 09:06:40 pm Post subject: |
|
|
You could use a free and open-source ROM to solve the legal issues. Otherwise, that's pretty awesome, Kerm  _________________
     |
|
| Back to top |
|
|
ParkerR
Member

Joined: 15 Nov 2010 Posts: 135
|
Posted: 24 Jan 2012 09:08:52 pm Post subject: |
|
|
| juju2143 wrote: | You could use a free and open-source ROM to solve the legal issues. Otherwise, that's pretty awesome, Kerm  |
Only thing free and open is the Bootfree bootloader. Still iffy ground. |
|
| Back to top |
|
|
elfprince13

OVER NINE THOUSAND!

Joined: 23 May 2005 Posts: 10248 Location: A galaxy far far away......
|
Posted: 24 Jan 2012 09:25:49 pm Post subject: |
|
|
| KermMartian wrote: | | elfprince13 wrote: | | This is very cool! Do you have plans to support 84+ emulation as well? | Thanks, Elfprince! I am able to eke out about 8 or 10MHz, so there is a bottleneck there. I also don't think I'll be able to fit a full 84+/SE OS in the DOM Storage, although I'm not positive about that. |
Don't most browsers allow you to configure DOM Storage allowances on a per-site basis? Safari has a "X MB Database Storage Allowed Before Asking" in the preferences, where X defaults to 5. _________________ StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative
 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 25 Jan 2012 04:12:03 am Post subject: |
|
|
| ParkerR wrote: | | juju2143 wrote: | You could use a free and open-source ROM to solve the legal issues. Otherwise, that's pretty awesome, Kerm  |
Only thing free and open is the Bootfree bootloader. Still iffy ground. | Yeah, that's my view as well. I'm happy letting users worry about the ROMs they have on their own computers and not having them touch the Cemetech server at all.
I actually got the DOM storage of the ROM fully-working; next up is serializing and de-serializing the ROM, RAM, and CPU state into and out of DOM storage so your calculator's state persists. _________________
 |
|
| Back to top |
|
|
benryves

Cemetech Expert

Joined: 12 Aug 2008 Posts: 1361 Location: London, United Kingdom
|
Posted: 25 Jan 2012 05:01:05 am Post subject: |
|
|
Interesting work, Kerm, I look forwards to seeing how it pans out. I hope you're testing in multiple browsers too to avoid relying on any browser-specific quirks, flaws or "features".
I wonder what the legality of creating a completely home-brew OS that exposed (most of) the same bcalls as the official TI-OS would be? Most assembly games use a very small portion of the OS, so it wouldn't seem a particularly daunting task to get a large number of games running (you could boot the emulator straight to DoorsCS) and if a program did invoke an unimplemented bcall you could catch that, display a meaningful error message and offer to send a report to the emulator author. |
|
| Back to top |
|
|
adamac17

Power User

Joined: 23 Apr 2010 Posts: 441 Location: Chesnee, SC
|
Posted: 25 Jan 2012 09:21:05 am Post subject: |
|
|
This looks pretty cool. Can't wait until it's testable. I would very much like to do so. _________________
 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 25 Jan 2012 12:00:32 pm Post subject: |
|
|
| adamac17 wrote: | | This looks pretty cool. Can't wait until it's testable. I would very much like to do so. | I hope it will be especially helpful to people like you who like to code up programs in SourceCoder and don't have access to a cable to load your programs onto your calculator for testing.
| Quote: | Interesting work, Kerm, I look forwards to seeing how it pans out. I hope you're testing in multiple browsers too to avoid relying on any browser-specific quirks, flaws or "features".  | I have not started doing so, but I absolutely hope to. I'm trying to go for a minimally-kludgy approach to all the JS coding in this (and the HTML, for that matter). I'm going to be opening up a semi-private beta much sooner than expect, so I'm hoping my favorite Cemetechians will assist me in cross-browser testing. Thanks for your help in finding those two bugs this morning!
| Quote: | | I wonder what the legality of creating a completely home-brew OS that exposed (most of) the same bcalls as the official TI-OS would be? Most assembly games use a very small portion of the OS, so it wouldn't seem a particularly daunting task to get a large number of games running (you could boot the emulator straight to DoorsCS) and if a program did invoke an unimplemented bcall you could catch that, display a meaningful error message and offer to send a report to the emulator author. | It's certainly something that I've considered before, mostly as a real calculator OS. In the end, I decided that the number of support systems and routines would make it infeasible to the point where I would essentially be duplicating the OS, save perhaps some of the math functions. _________________
 |
|
| Back to top |
|
|
Aes_Sedia5

Minor Calculator Deity

Joined: 01 Sep 2011 Posts: 1002 Location: Where Nightmares end and Dreams begin
|
Posted: 25 Jan 2012 02:59:09 pm Post subject: |
|
|
| Quote: |
I have not started doing so, but I absolutely hope to. I'm trying to go for a minimally-kludgy approach to all the JS coding in this (and the HTML, for that matter). I'm going to be opening up a semi-private beta much sooner than expect, so I'm hoping my favorite Cemetechians will assist me in cross-browser testing. Thanks for your help in finding those two bugs this morning!
|
I would gladly help cross browser test that for you!
Also another, cool quirk you could add, not sure how feasible it is.. Link the calculator to the archives at cemetech.net and ticalc.org, and make those programs testable. I have hated downloading games that I did not like, especially since Ti Connect and TILP dont like me. It would be nice if you could test the game to see if you like it, then download it for personal use. Not sure how possible that is however. _________________

 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 25 Jan 2012 03:00:56 pm Post subject: |
|
|
| Aes_Sedia5 wrote: | | Also another, cool quirk you could add, not sure how feasible it is.. Link the calculator to the archives at cemetech.net and ticalc.org, and make those programs testable. I have hated downloading games that I did not like, especially since Ti Connect and TILP dont like me. It would be nice if you could test the game to see if you like it, then download it for personal use. Not sure how possible that is however. | | First post wrote: | | I have great plans for jsTIfied, including letting you somehow test programs from the archives, run SourceCoder projects, and much more straight from your browser. | That's way farther down the line for this particular project, though. _________________
 |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5140 Location: SFBA, California
|
Posted: 25 Jan 2012 03:01:58 pm Post subject: |
|
|
That's a planned feature, Aes_, that was stated in the original post. Not sure if ticalc.org is in the works, but the Cemetech Archives certainly are.
~ninjad _________________
-Alex |
|
| Back to top |
|
|
Deep Thought

Expert

Joined: 11 Mar 2010 Posts: 740 Location: The Universe
|
Posted: 25 Jan 2012 03:50:40 pm Post subject: |
|
|
| souvik1997 wrote: | Awesome job, Kerm. Do you have plans to let it directly connect to gCn without any offline computer programs? | That would make it an amazing emulator online or offline. Maybe sound too? Though that would be much harder I'd imagine. _________________
  |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55886 Location: Earth, Sol, Milky Way
|
Posted: 25 Jan 2012 03:52:12 pm Post subject: |
|
|
| Deep Thought wrote: | | souvik1997 wrote: | Awesome job, Kerm. Do you have plans to let it directly connect to gCn without any offline computer programs? | That would make it the best emulator online or offline. Maybe sound too? Though that would be much harder I'd imagine. | Sounds would be very very hard. Linking/gCn is hard enough; I have to decide whether I'm going to be cheap and do direct memory injection, or actually do a state machine and play with the link lines. _________________
 |
|
| Back to top |
|
|
Deep Thought

Expert

Joined: 11 Mar 2010 Posts: 740 Location: The Universe
|
Posted: 25 Jan 2012 08:06:19 pm Post subject: |
|
|
Actually, what about putting Cemetech- and ticalc.org-archive-browsing features in Sandpaper (those were planned, right?) so you can use it with gCn in jsTIfied? That way you won't have to make a separate system for browsing those files. _________________
  |
|
| Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.048242 seconds.
|