Author Topic: [InDev] jsTIfied, a Javascript TI-83+ Emulator  (Read 4991 times)

0 Members and 1 Guest are viewing this topic.

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
[InDev] jsTIfied, a Javascript TI-83+ Emulator
« on: January 24, 2012, 07:29:22 pm »
Note: crossposted from the Cemetech topic, which will hold updates and such.
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!


Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #1 on: January 24, 2012, 08:54:33 pm »
I can't wait to see this, Kerm! And for the legal hurdles, you could use a free and open-source ROM?

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #2 on: January 24, 2012, 10:15:07 pm »
I can't wait to see this, Kerm! And for the legal hurdles, you could use a free and open-source ROM?
Sure, but the way this is designed, if you read the legal paragraph, even if a user uses a ROM from their real TI calculator, the ROM doesn't leave their computer, so everything is above-board.



Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #3 on: January 25, 2012, 02:51:34 am »
true, but an open source solution still might be worth looking into at some point down the line, as many of the people who would look for a solution like this one are likely to be people who don't know how to dump a ROM, or don't have a linking cable.

i love the idea of integrating it into the site's archives! something that coule fetch and execute files from ticalc would be very useful as well.

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #4 on: January 25, 2012, 03:34:31 am »
I can't wait to see this, Kerm! And for the legal hurdles, you could use a free and open-source ROM?
Sure, but the way this is designed, if you read the legal paragraph, even if a user uses a ROM from their real TI calculator, the ROM doesn't leave their computer, so everything is above-board.
Well, I mean, if you don't want to make the user choose a ROM.

But still, the user could choose a ROM, then the files get uploded to the newly created calc automatically, it still sounds good.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #5 on: January 25, 2012, 11:31:30 am »
I can't wait to see this, Kerm! And for the legal hurdles, you could use a free and open-source ROM?
The problem is that fully usable FOSS OSes are pretty much non-existent. WFRNGOS might work, but it might not be very useful to emulate it :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #6 on: January 25, 2012, 03:31:16 pm »
That is great and looks pretty promising. I'm happy you figured out a way to not have the ROM file land on the server on which the emulator runs. How goes cross-browser compatibility and bandwidth usage? I remember Netham45 made an emulator which was online for a while, but the problem is that the ROM was hosted by him (even though it was from his own calc it was not very legal) and every screen frame (around 5 per second), the produced GIF image was downloaded from the server to your computer. Basically after using it for several minutes, you wasted several megabytes of bandwidth. Due to both these problems, he didn't leave it online for very long (around 2 weeks).
« Last Edit: January 25, 2012, 03:32:14 pm by DJ_O »

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #7 on: January 25, 2012, 05:03:32 pm »
Cross-browser compatibility seems fine to me so far.  It uses about 150KB of download to send the emulator to the client, then nothing else.  Again, it's almost entirely client-side.



Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #8 on: January 25, 2012, 07:26:46 pm »
This sounds really cool! I can't wait to see it in action.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #9 on: January 27, 2012, 03:07:55 am »
This sounds very promising Kerm. Like others, I'm anticipating playing around with this. :)

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #10 on: February 06, 2012, 02:24:01 pm »
As either a general update or a potential newsy thing, public beta of jsTIfied:

http://www.cemetech.net/news.php?id=501

« Last Edit: February 06, 2012, 02:35:54 pm by KermMartian »



Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #11 on: February 06, 2012, 02:36:05 pm »
Awesome Kerm! That emulator is working pretty fine, it doesn't support 84+ ROMs though.
« Last Edit: February 06, 2012, 02:36:29 pm by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #12 on: February 06, 2012, 05:05:24 pm »
Pretty great. I'll have to give it a try on my next visit to Cemetech. Btw the layout reminds me greatly of PindurTI :P

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #13 on: February 06, 2012, 05:11:39 pm »
wait, will this have the ability to take screenshots?

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: [InDev] jsTIfied, a Javascript TI-83+ Emulator
« Reply #14 on: February 06, 2012, 05:32:09 pm »
DJ_O: Yes, the skinless mode is an homage to PTI, which I mentioned in the first news article I wrote about jsTIfied
Parser: Just right-click the screen and choose "save image" in most browsers.