Java Grinder, TMS9900 and a Retro Console

The Challenge of Working with Older Equipment

By Michael Kohn

Retro Console Java Many years ago, a friend of mine gave me a circa 1981 TI-99/4A computer. It worked fine with the exception of a few keyboard keys, but after initially testing it I put it away for a long time. Recently I thought it might be cool to make my Java Grinder program work with it. I'm always looking to do some kind of project that no one else would think of. Who would ever want to run a Java program on obsolete hardware? I started writing a module for the TMS9900 and then a small API for the TI-99/4A hardware that would allow printing to the screen, sprites, sound, and low-resolution graphics.

After looking at the TMS9900's instruction set it seemed familiar enough so I figured my software would be easy to implement on this platform. I quickly realized I was wrong.

I had three goals for this electronics project:

  • Goal 1: Add TMS9900 to the assembler program I had been working on.
  • Goal 2: Add TMS9900 and TI-99/4A support to Java Grinder, another one of my projects.
  • Goal 3: Learn how the TI-99/4A works, create an API for it in Java Grinder, create a demo, and get the demo to run on a real machine.
This ended up being a pretty awkward system. The CPU, a TMS9900, only has direct access to 256 bytes of RAM and could only access video and sound registers by reading and writing a couple memory addresses. There is a chunk of extra RAM attached to the video processor, but I decided to just use the 256 byte area for variables. I figured it's not like anyone is going to use this for anything serious anyway.

The biggest challenge was that this computer was so old the documentation wasn't always so great. However, I did find a couple of decent TI-99 sample programs online with source code that helped a bit.

Writing my own assembler presented its own problems. I would write a few lines of Java code, use Java Grinder to convert it to TMS9900 assembly, and run it on the Mess emulator to test it but not get the proper results. Luckily the Mess emulator has an amazing debugger. It would show me a disassembly of the TMS9900 code, and I could inspect the state of all the RAM, registers, video chip, and sound chip and let me step through code.

Not only did it let me verify the assembler was working since it has its own disassembler, but it also helped me verify that I understood how the instructions worked. I could step through some instructions and make sure after every instruction the CPU flags and program counter and such were at the values I expected them to be.

When the demo was complete, I wanted to get it running on the TI-99/4A my friend gave me. Luckily my friend gave me three game cartridges when he gave me the system: Hangman, Parsec, and Popeye. I started out by taking the Hangman cartridge apart, but unfortunately it had just one small chip in it (I think it's a TI-99 GROM). So next I took Parsec apart, but that had what I thought was too many chips (actually, the EEPROM on there was a smaller chip than what would be useful for me).

Lastly I opened up Popeye to see if that cartridge could be used, but unlike the other cartridges, this one wasn't screwed shut but sealed with glue. I got it open with a hammer (like opening up a coconut) but not before I cracked the EPROM inside and part of the PC board.

The EPROM had 28 pins (I assumed 8k) so I logged on to and found 2 EEPROM's and 1 EPROM that I thought could work. The parts I purchased were: AT28C64B and 28-Pin Socket

I assumed I would have to connect this EEPROM to a breadboard and rig some wires from the cartridge to the board, but the EEPROM had the same pinouts as the original EPROM. I fixed the broken cartridge PC board by soldering a patch wire and programmed the EEPROM with a Wellon VP-280 universal programmer.

When I first plugged the hacked up cartridge in all I got was a blank screen and a horrible screeching sound from the TV. The Popeye chip had 2 extra chips on it (GROMs again?) so I wondered if they were causing something. I desoldered them and plugged the cartridge back in... and it worked!

The EEPROM The EEPROM programmed with the demo is in a socket on the cartridge PC board. At the top of the picture is the original EPROM cracked with the sticker that covers the UV window partially removed. At the top right of the cartridge, there is a piece of PC board that broke off when I cracked it open with a hammer. The copper trace with the chip select signal was severed so I patched it by soldering the orange wire from the cartridge pad to the EEPROM socket pin.

The next challenge was how to get the demo to work on a real TI-99/4A. The Popeye cartridge seemed to have an 8k EPROM on it. I had pinouts for the cartridge slot and pinouts on some EEPROM chips I found, so I used a multimeter to verify the pinout from the EEPROM would fit the Popeye cartridge. When testing the pinouts of the EEPROM, I also noticed I broke a trace on the cartridge so I soldered a wire from the trace on the cartridge pin to the pin on the EEPROM socket.

As the video below shows, I succeeded in getting my demo working first on the TI-99/4A and then the same program running in the Mess emulator.

See full video:

All the source code for these demos are available from the Java Grinder git repository.

Check out related pages on Java Grinder, dsPIC Mandelbrots, naken_asm
Michael Kohn is a software developer with 20 years of professional and open source experience, and an amateur electronics hobbyist.