TI-99/Sim

a Texas Instruments Home Computer Emulator

NOTE: This page designed to use CSS styles - you may want to upgrade your browser.

Table Of Contents:

Introduction

Installation

Overview

General Features

Graphics Support

Sound Support

Speech Synthesis

Joystick Support

Disk Support

Included Programs

convert-ctg

decode

disk

dumpcpu

dumpgrom

mkspch

ti99sim-console

ti99sim-sdl

Introduction

This is the latest incarnation of an emulator for the TI-99/4A that I've been working on for a few years.  At first it was a simple text-based simulation of the TI.  Then I added graphical support for the OS/2 Presentation Manager.  Later, I ported it to Windows and added sound support.  Now I'm porting it to Linux and hope to add a few more features along the way.

DISCLAIMER: I'm not one for writing a lot of documentation, so you're encouraged to look at the code to see how some things work if they're not described here.  If you're interested in writing documentation, let me know.

NOTE: In order to run the emulator, you need to create a cartridge that contains the console ROM & GROMs from the TI-99/4A.  Texas Instruments will not allow these to be distributed, so you'll need to find a way to get them yourself.  If you have a working copy of v9t9, instructions are included to help you create the required cartridge.  If you don't, I would suggest you download it as it contains documentation on how to get the files you need to do this.

Installation

In order to run the emulator, you will need to download and install the latest version of the SDL library available at http://www.libsdl.org/download-1.2.html.  If you're planning to build ti99sim from the source files, be sure to download the development version.I

After installing SDL, type 'make' in the directory where you placed the emulator.  If the SDL include files are not located at /usr/include/SDL you will need to edit src/sdl/Makefile to point to the correct path.  After compiling the emulator, become root and type 'make install'.  If you downloaded the binary-only package, you can skip the initial 'make'.

        make
        su
        make install
      

Typing 'make install' will install the binaries under /usr/local/games/ti99sim and create directories under /usr/local/share/games/ti99sim.  These directories are used to hold all the ROMs and cartridge files.  When loading files, ti99sim will look in the current directory, the directories under ~/.ti99sim, and finally, the directories under /usr/local/share/games/ti99sim.

Once make is complete you will need to create the console ROM cartridge TI-994A.ctg (see convert-ctg below for instructions) in order to run the emulator.  This ROM cartridge contains the operating system and the BASIC interpreter for the computer.  Without it, the emulator will not do anything useful.  Once you have created the console ROM cartridge, copy it to either ~/.ti99sim/roms or /usr/local/share/games/ti99sim/roms.  You should also place a copy of spchrom.bin into this directory to enable speech synthesis.  If you don't have this file, you can use mkspch to create one that will keep the emulator happy.  You may also want to create a symbolic link to ti99sim to make running it easier.  On a Red Hat system, you can easily do this by creating a personal bin directory and placing the link there i.e.:

        mkdir ~/bin
        ln -s /usr/local/games/ti99sim/ti99sim-sdl ~/bin/ti99sim
        ln -s /usr/local/games/ti99sim/convert-ctg ~/bin/convert-ctg
      

Now you're all set to run the emulator, just type:

        ti99sim
      

If everything is installed correctly, you should see a window on your screen with the TI-99/4A startup screen followed by a beep.  Enjoy!

Overview

The following sections describe the basic features of the emulator.  Entries in italics are items on my to-do list for a future release.

General Features:

Graphics Support:

Sound Support:

Speech Synthesis:

Joystick Support:

Disk Support:

Included Programs

convert-ctg

The ti99sim emulator uses special .ctg files to store the ROM and/or GROM images contained within the computer console and plug-in cartridges.  The 'convert-ctg' program allows you to create these cartridges.  It will convert your existing v9t9 ROMs or create cartridges using output from a hex dump of a ROM image.  A set of sample files, TI-994A.dat, Mini-Memory.dat, and Gram Kracker.dat, located in the roms directory, are supplied as examples of the format of the hex dump file.  NOTE: These files do not contain complete hex dumps of their corresponding ROMs but can be used as templates if you have the required information.

To convert existing v9t9 cartridges, type 'convert-ctg foo.bin' where foo is the base name of a set of ROM files.  The base name is usually the portion of the filenames that are common between all files associated with a particular cartridge.  'convert-ctg' understands the naming conventions used by present and past versions of v9t9, and will attempt to determine which version of files that you have installed.  For example, the following command will convert the files PARSECC.BIN and PARSECG.BIN to PARSEC.ctg:

          convert-ctg /your-path-here/v9t9/v6.0/modules/PARSEC.BIN
        

Files to be converted can be in any directory.  The new cartridge will be created in the current working directory.  To create the console ROM cartridge you need to specify either 994a.bin or ti.hex (depending on your version of v9t9 or TI Emulator) as the filename.  For example:

          convert-ctg /your-path-here/v9t9/v6.0/roms/994a.bin
        

This will create the special TI-994A.ctg file that contains the console ROM, the system GROMs, scratch-pad RAM, and 32K memory expansion RAM.  Without this file, ti99sim will not run!

When creating cartridges, 'convert-ctg' will attempt to add a cartridge title by searching for valid GROM headers in the files being converted.  If it doesn't find any valid names, or if you want to change the one it uses, you can specify a title on the command line after the base filename.  ti99sim uses the cartridge title when saving/loading memory images to ensure that the correct cartridges are present when loading.  If you intend to use this feature, please make sure that all of your cartridges have unique names.

'convert-ctg' will also allow you to dump the contents of a cartridge to a specially formatted hex dump file.  This feature is useful if you want to see the contents of a cartridge's ROM/GROM code, or to patch the code and rebuild the cartridge with your changes.

decode

If you have old audio tapes hanging around, 'decode' will decode them into binary files that can be used (in some future version) by ti99sim.  This code is currently in the experimental stage, and currently only decodes .wav files directly to binary files on disk.  It attempts to intelligently find sections of stored data while ignoring all other sounds it finds.

disk

NOTE: Disk emulation is not yet in the Linux version.  Actually, it is included, but there is no way to specify the disk images for DSKn.

The emulator allows you to use disks created by a TI-99/4A computer within the emulator.  You need to create a disk image using the dump feature of AnaDisk and include the 8 byte header for each sector.

The 'disk' utility allows you to look at the contents of a disk image and optionally create native files from those in the disk image.  This allows you to create files that can be used by 'convert-ctg' to create cartridge files that you can use with the emulator.

dumpcpu

This program will allow you to un-assemble any CPU ROM section in a cartridge file.  Through the use of an external configuration file, you can assign labels and EQUs to make the disassembly more readable.

NOTE: This program is a work in progress and doesn't always create good listings.

dumpgrom

Ever wondered what the code behind that game looks like? This program is similar to 'dumpcpu' but disassembles that GPL code in the GROM cartridge.  It uses the standard GROM headers to find starting addresses and strings.

NOTE: This program is a work in progress and doesn't always create good listings.

mkspch

If you can't find a copy of spchrom.bin, you can use this utility to create one that can be used by the ti99sim.  The spchrom.dat file located in the roms directory contains the information required to create a stripped down speech ROM.  If you have your own LPC-10 coded speech samples (I have no idea how you would create them, so please don't ask), you can use this utility to create a speech ROM using your own voice samples!

ti99sim-console

A simple text-based version of the emulator.  It includes a simple interface that allows you to step through code at the assembly or GPL instruction level.  While the CPU is paused, you can edit any of the register values.  Since it's text-mode only, it doesn't support graphics at all.  If you just want to see what the computer is doing, this is the program to do it with.

ti99sim-sdl

The X11 based emulator.  It will accept the following command-line syntax:

          ti99sim [-4] [-f] [-q] [-j1=n] [-j2=n] [--listjoysticks] [cartrigde.ctg] [memory.img]
              -4    : Open in a double-width, double-height window
              -f    : Run in fullscreen mode
              -q    : Turn off sound/speech synthesis
              -j1=n : Used joystick 'n' as joystick 1 (default is 0)
              -j2=n : Used joystick 'n' as joystick 2 (default is 1)
              --listjoysticks : Print a list of all joysticks seen by the emulator.
        

If you try to load a memory image, you must make sure that any cartridge(s) that were running when the image was made are currently running or the image will not load.  So, if you want to load both a cartridge and an image, make sure you specify the cartridge before the image on the command line.

There is no GUI, and there aren't very many features implemented yet.  The following keys are defined:


If you have created the Gram Kracker cartridge properly and placed the cartridge in the roms directory (the one where you placed the TI-994A.ctg file), the following extra keys are active:


Consult your Gram Kracker manual for a description of each of these switches.  To create a Gram Kracker cartridge, the loader ROM must be added to the 'Gram Kracker.dat' file supplied in the roms directory.  Getting the loader ROM is left as an exercise for the reader (hints: Save it to disk, transfer it to the PC using AnaDisk, extract it using the 'disk' utility, and a) make a hexdump after stripping off the header or b) create a normal cartridge file using the 'convert-ctg' utility then create a .dat file using the -d option.  OR Find a program on the TI that can do a hex dump to the serial port and capture it on the PC to a disk file).


Homepage: http://www.mrousseau.org/programs/ti99sim/
Contact: ti99sim@mrousseau.org