Difference between revisions of "MAME TI emulation usage"

From Ninerpedia
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 114: Line 114:
== Using serial connections ==
== Using serial connections ==


MAME 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 [[MESS Serial connection|serial emulation page]].
MAME 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 [https://www.ninermame.org/details/serialconn serial emulation description].


One application that provides the necessary connection is [https://www.mizapf.de/ti99/timt TIImageTool], in particular its ''serial bridge'' feature.
One application that provides the necessary connection is [https://www.mizapf.de/ti99/timt TIImageTool], in particular its ''serial bridge'' feature.
Line 136: Line 136:
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.
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 [[MESS Serial connection|serial bridge]].
For the parallel output you '''do not need''' the [https://www.ninermame.org/details/serialconn serial bridge].


[[Category:MAME]]
[[Category:MAME]]

Latest revision as of 20:02, 24 February 2023

The following description addresses the usage of MAME starting from version 0.186.

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. It plugs into the "ioport" of the console, so unless you explicitly plug it in, you do not see any of its slots.

Check

mame64 ti99_4a -listslots

and

mame64 ti99_4a -ioport peb -listslots

Slot names must be specified on the command like with a leading "-". As you can see, the slots of the PEB are named "ioport:peb:slot2" to "ioport:peb:slot8".

Any device plugged into the PEB must be specified using the slot name. An example could look like this:

mame64 ti99_4a -cart editass -ioport peb -ioport:peb:slot2 32kmem -ioport:peb:slot3 speech -ioport:peb:slot6 tirs232 -ioport: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 are all equivalent, concerning the cards that may be plugged into them, but if you want to keep with the real box, you should plug the disk controller into slot 8, 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
-ioport:peb:slot2 ... -ioport:peb:slot8 32kmem TI-99 32KiB memory expansion card
myarcmem Myarc Memory expansion card MEXP-1
samsmem SuperAMS memory expansion card
horizon Horizon 4000 Ramdisk
pcode TI-99 P-Code Card
hsgpl SNUG High-speed GPL card
speech TI-99 Speech synthesizer (on adapter card)
tirs232 TI-99 RS232/PIO interface
ide Nouspikel IDE interface card
usbsm Nouspikel USB/Smartmedia card
tirs232 TI-99 RS232/PIO interface
bwg SNUG BwG Floppy Controller
tifdc TI-99 Standard DSSD Floppy Controller
hfdc Myarc Hard and Floppy Disk Controller

Joystick port

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":

mame64 ti99_4a -joyport twinjoy 
mame64 ti99_4a -joyport mecmouse
mame64 ti99_4 -joyport handset

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

Cartridge port

The cartridge port (also known as GROM port) allows for plugging in three different devices:

  • The single cartridge slot. This is not a real device; it just configures the cartridge slot to host a single cartridge. It is the default setting. The only cartridge option is "-cart".
  • The multi-cartridge expander. It allows for up to four cartridges to be plugged in by using "-cart1" to "-cart4". When several cartridges are plugged in, the TI console offers a software selection using "REVIEW MODULE LIBRARY".
  • The GRAM Kracker. It is a device from Miller's Graphics that is plugged into the cartridge port and offers another slot for a guest cartridge. You can then copy the cartridge contents into the GRAM Kracker with offers NVRAM to store them, and also to allow you to modify these contents.

The cartridge slots work with both RPK and ZIP cartridges.

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

mame64 ti99_4a -gromport single -cart invaders
mame64 ti99_4a -gromport multi -cart1 exbasic -cart2 editor_assembler.rpk
mame64 ti99_4a -gromport gkracker -cart hunt_the_wumpus.rpk

In order to use the GRAM Kracker, you must have the ROM contents of the GRAM Kracker 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:

Using serial connections

MAME 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 description.

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 MAME is running, the connection is set up like this:

mame64 ti99_4a -ioport peb -ioport: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.

mame64 ti99_4a -ioport peb -ioport: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.