Search code examples
emulationcalculatorti-basic

How was someone able to implement a game-boy emulator on a ti-calculator?


This question might not be answerable by anyone but the creator, but I found a Gameboy emulator here:https://www.omnimaga.org/ti-boy-se-game-boy...ti.../official-ti-boy-cse-alpha-thread/ for ti-83/84 calculators and was wondering how it worked. It seems like a miracle to me because the sheer memory consumption of a Gameboy game should be enough to make the calculator explode. I think it's possible because it can run things stored in archive memory (I know this is possible because Door-CSE). However, it seems like I can run the emulator for hours without running out of RAM! Any insights would be appreciated.


Solution

  • The GameBoy has 8kB S-RAM and 8kB internal Video Ram; in total 16kB. The TI-83 calculator has 32kB RAM; twice as much as the GameBoy.

    The TI-83+ has 27 kB RAM (160kB Flash ROM), the TI-83+SE has 128kB RAM (1.5MB Flash ROM), the TI-84 has 128/48kB RAM (1MB Flash ROM), the TI-84+SE has 128/48kB RAM (2MB Flash ROM), the TI-84+CSE has 128kB RAM (4MB Flash ROM) and the TI-84+CE has 256kB RAM (4MB Flash ROM).

    As you can see all of these calculators could run GameBoy games fine when looking at RAM usage. Now for the actual code that has to be stored on the calculator: the GameBoy cartridge memory size is between 256kB and 8MB. The TI-83 and TI-83+ can't hold this much memory and won't work (I can't seem to use the link you send (403 error), but a quick search led me to another page which says that these aren't supported). The TI-83+SE and TI-84 can handle games with a size of 256kB, 512kB or 1MB, the TI-84+SE can handle games with a size of 256kB, 512kB, 1MB and 2MB and the TI-84+CSE and TI-84+CE can handle games with a size of 256kB, 512kB, 1MB, 2MB or 4MB.

    The GameBoy game Pokémon Red has a cartridge size of 512kB (Japan) and 1MB (America), and therefore the calculator has enough space to handle this game.

    The GameBoy Color (not supported) has 32kB RAM, 16kB V-RAM and 128kB Cartridge RAM. The cartridge size is still a maximum of 8MB, so that stays the same. Only the TI-84+CE could be able to handle this.

    The GameBoy Advance (SP) (not supported) has 32kB + 96kB V-RAM and 256kB D-RAM, so no TI-83 or TI-84 calculator would be able to handle that, however the TI-Nspire could be able to handle this (newest model has 100MB User Memory and 64MB Memory register).

    All in all; the program is impressive, however memory consumption wouldn't be that big of a deal as these calculators seem to have enough memory to handle all of this. Of course the OS of the calculator uses RAM and ROM as well, so I wouldn't try playing a 4MB game on it, but smaller games shouldn't be a problem.

    Sources:

    GameBoy: https://en.wikipedia.org/wiki/Game_Boy
    GameBoy Color: https://en.wikipedia.org/wiki/Game_Boy_Color
    GameBoy Advance: https://en.wikipedia.org/wiki/Game_Boy_Advance
    GameBoy Advance SP: https://en.wikipedia.org/wiki/Game_Boy_Advance_SP
    Pokémon Red Cartridge size: https://news.ycombinator.com/item?id=3473111
    TI-83: https://en.wikipedia.org/wiki/TI-83_series
    TI-84: https://en.wikipedia.org/wiki/TI-84_Plus_series
    TI-Nspire: https://en.wikipedia.org/wiki/TI-Nspire_series
    TI-Boy SE Beta 0.2.04: http://www.ticalc.org/archives/files/fileinfo/419/41990.html