Difference between revisions of "MAME TI emulation usage"

From Ninerpedia
Jump to navigation Jump to search
m (already subcat)
Line 151: Line 151:
For the parallel output you '''do not need''' the [[MESS Serial connection|serial bridge]].
For the parallel output you '''do not need''' the [[MESS Serial connection|serial bridge]].


[[Category:Emulation]]
[[Category:MESS]]
[[Category:MESS]]

Revision as of 21:20, 13 June 2017

The following description addresses the usage of MESS starting from version 0.145u1.

Slot devices

The TI emulation makes use of "slot devices". These are devices that offer a slot into which another component can be plugged.

Peripheral Box

The Peripheral Expansion Box is modelled as a collection of expansion card slots. Thus, any device plugged into the PEB must be specified using a particular command line switch, or using the corresponding setting in a graphical frontend. An example could look like this:

mess ti99_4a -cart extended_basic.rpk -peb:slot2 32kmem -peb:slot3 speech -peb:slot6 tirs232 -peb:slot8 hfdc -flop1 mydisk.dsk

This may look pretty long, but you can hide this in a script (batch) file. Also, the frontends like QMC2 allow for a set of options to be defined for each start.

The slots have slightly different options for pluggable cards, which is oriented along the most common configurations. Usually you plug the disk controller into the rightmost slot because there is a gap in the chassis to connect the drives in the compartment to the controller.

The Flex Cable Interface traditionally goes into slot 1, even though each slot is connected in parallel with all lines. Accordingly, we leave that option away as well.


Slot parameter Value Device
-peb:slot2 ... -peb:slot5 32kmem TI-99 32KiB memory expansion card
myarcmem Myarc Memory expansion card MEXP-1
samsmem SuperAMS memory expansion card
pcode TI-99 P-Code Card
hsgpl SNUG High-speed GPL card
tirs232 TI-99 RS232/PIO interface
speech TI-99 Speech synthesizer (on adapter card)
horizon Horizon 4000 Ramdisk
-peb:slot6 ide Nouspikel IDE interface card
usbsm Nouspikel USB/Smartmedia card
tirs232 TI-99 RS232/PIO interface
speech TI-99 Speech synthesizer (on adapter card)
-peb:slot7 ide Nouspikel IDE interface card
usbsm Nouspikel USB/Smartmedia card
bwg SNUG BwG Floppy Controller
hfdc Myarc Hard and Floppy Disk Controller
-peb:slot8 tifdc TI-99 Standard DSSD Floppy Controller
bwg SNUG BwG Floppy Controller
hfdc Myarc Hard and Floppy Disk Controller

Joystick port

Since version 0.146 the joystick port is also realized as a slot device. This has the benefit that special logic can be put into the devices instead of being somewhat incorporated in the console. In particular, the handling of the Mechatronics Mouse, the joysticks, and the TI-99/4 handsets required some case processing.

Now the device can be specified as plugged into the "joyport":

mess ti99_4a -joyport twinjoy 
mess ti99_4a -joyport mecmouse
mess ti99_4 -joyport handset

The "twinjoy" is the default setting, so you need not specify it explicitly.

Cartridge port

Also since version 0.146, the cartridge port has been redesigned as a slot device. The cartridge port (also known as GROM port) offered a four-slot multi-extender before this version; this allowed the user to plug in more than one cartridge at a time, and to select between them by switch or by menu selection (the famous "REVIEW MODULE LIBRARY" feature ("RML")). However, it also induced some trouble.

  • When the menu selection was active, the operating system iterated through the GROM base addresses in search of parallelly mounted cartridges. If there was no difference between the contents read from this and the next base, the operating system assumed that there was no multi-extender. However, what should happen when only one cartridge was mounted? As the other slots were empty they returned 0 on all addresses, which differs from the cartridge contents in the first slot. So the selection list showed the cartridge in slot 1, and the RML entry as another option, but it had no sense, as there was only one cartridge. As a fix, the MESS emulation of the multi-extender mirrored slot 1 into slot 2 if slot 1 was the only used slot. This is what I call emulation magic, as it does not reflect anything real. It is likely that the multi-extender did show the RML entry, but that device was never available on the market, so no one can tell.
  • The GRAM Kracker, also available in the MESS emulation, has a special, own cartridge slot. However, with the multi-extender hard-coded into the console I had to do some tricks to re-route the plugged-in cartridges when the GK was selected. This also led to the phenomenon that you had to activate the GK in the menu although it was already plugged in. After all, the GK was never designed to cooperate with the multi-extender.
  • Although interesting, the multi-extender is rarely used in everyday tasks. That is, compared to the efforts it delivers comparably few benefits. Instead of removing it completely, the approach to create a slot device seemed much more reasonable to me.

So when using the TI-99/4, /4a, and /8 you can specify how the cartridge port looks like:

mess ti99_4a -gromport single -cart ti_invaders.rpk
mess ti99_4a -gromport multi -cart1 extended_basic.rpk -cart2 editor_assembler.rpk
mess ti99_4a -gromport gkracker -cart hunt_the_wumpus.rpk

The "single" option is the default if not specified. As you see, the name by which the cartridge is mounted differs between the options. Use -cart for single and gkracker, and -cart1, -cart2, -cart3, and -cart4 for the multi-extender.

If you have been using the GRAM Kracker in the previous versions you will notice that there is no special gramkracker cartridge anymore. Instead, the ROM contents of the GRAM Kracker must be stored in a file called gkracker.bin, and this must be found in a ZIP file ti99_gkracker.zip located in the rompath.

You can create this zip file quite easily:

  • Unpack the gramkracker.rpk file with a zip tool.
  • Rename the file gk.bin that you found in the RPK file to gkracker.bin.
  • Create a new ZIP file called ti99_gkracker.zip that contains this gkracker.bin file.
  • Copy the ZIP file to the folder pointed to by the rompath.

Using serial connections

MESS does not offer a direct access to the PC serial interface (the UART). Instead, we can use a socket pipe which connects MESS with another application that provides the access. Details are explained on the serial emulation page.

One application that provides the necessary connection is TIImageTool, in particular its serial bridge feature.

Supposed that you have started TIImageTool and started the serial bridge on socket 10000 on the same computer where MESS is running, the connection is set up like this:

mess ti99_4a -peb:slot6 tirs232 -serl1 socket.localhost:10000

Using the parameter serl2 you can connect to the emulated RS2332/2. Also, you can set the CRU address to 1500 which turns the ports into RS232/3 and 4. The CRU address can be set in the DIP switch settings.

Printing in MESS

You can output plain text content to a "virtual" printer. In our case it is a text file that is written to, and you can then use your PC printing facilities to print that file on a real printer.

mess ti99_4a -peb:slot6 tirs232 -parl outfile.txt

Within TI BASIC, you can simply do a

LIST "PIO"

which sends the program lines in memory to the file named "outfile.txt" on your PC file system. Of course, any other TI application may also write to PIO in the same way. You can also try to output graphic content, but this will end up in a lot of uninterpreted binary values, specific for the printer you chose in the application. You will need to write a tool to convert these binary values to an appropriate image.

For the parallel output you do not need the serial bridge.