Difference between revisions of "MAME TI emulation usage"

From Ninerpedia
Jump to navigation Jump to search
m
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The following description addresses the usage of MESS starting from version 0.145u1.  
The following description addresses the usage of MAME starting from version 0.186.  


== Slot devices ==
== Slot devices ==
Line 7: Line 7:
=== Peripheral Box ===
=== 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:
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.


  mess ti99_4a -cart extended_basic.rpk -peb:slot2 32kmem -peb:slot3 speech -peb:slot6 tirs232 -peb:slot8 hfdc -flop1 mydisk.dsk
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.
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 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 [[Peripheral_Expansion_Box#Peripheral_Box_Slot_Concept|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.
The [[Peripheral_Expansion_Box#Peripheral_Box_Slot_Concept|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.
Line 23: Line 35:
! Device
! Device
|-
|-
| rowspan="8" | -peb:slot2 ... -peb:slot5
| rowspan="14" | -ioport:peb:slot2 ... -ioport:peb:slot8
| 32kmem
| 32kmem
| TI-99 32KiB memory expansion card
| TI-99 32KiB memory expansion card
Line 32: Line 44:
| samsmem
| samsmem
| SuperAMS memory expansion card
| SuperAMS memory expansion card
|-
| horizon
| Horizon 4000 Ramdisk
|-
|-
| pcode
| pcode
Line 38: Line 53:
| hsgpl
| hsgpl
| SNUG High-speed GPL card
| SNUG High-speed GPL card
|-
| tirs232
| TI-99 RS232/PIO interface
|-
|-
| speech
| speech
| TI-99 Speech synthesizer (on adapter card)
| TI-99 Speech synthesizer (on adapter card)
|-
|-
| horizon
| tirs232
| Horizon 4000 Ramdisk
| TI-99 RS232/PIO interface
|-
|-
| rowspan="4" | -peb:slot6
| ide
| ide
| Nouspikel IDE interface card
| Nouspikel IDE interface card
Line 57: Line 68:
| tirs232
| tirs232
| TI-99 RS232/PIO interface
| TI-99 RS232/PIO interface
|-
| speech
| TI-99 Speech synthesizer (on adapter card)
|-
| rowspan="4" | -peb:slot7
| ide
| Nouspikel IDE interface card
|-
| usbsm
| Nouspikel USB/Smartmedia card
|-
|-
| bwg
| bwg
| SNUG BwG Floppy Controller
| SNUG BwG Floppy Controller
|-
|-
| hfdc
| Myarc Hard and Floppy Disk Controller
|-
| rowspan="3" | -peb:slot8
| tifdc
| tifdc
| TI-99 Standard DSSD Floppy Controller
| TI-99 Standard DSSD Floppy Controller
|-
| bwg
| SNUG BwG Floppy Controller
|-
|-
| hfdc
| hfdc
Line 88: Line 82:
=== Joystick port ===
=== 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.  
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":
Now the device can be specified as plugged into the "joyport":


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


The "twinjoy" is the default setting, so you need not specify it explicitly.
The "twinjoy" is the default setting, so you need not specify it explicitly.
Line 100: Line 94:
=== Cartridge port ===
=== 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.
The cartridge port (also known as ''GROM port'') allows for plugging in three different devices:


* 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 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 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.
The cartridge slots work with both RPK and ZIP cartridges.


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


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 [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.
 
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 [[MAME DIP switch settings|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 -gromport single -cart ti_invaders.rpk
  mame64 ti99_4a -ioport peb -ioport:peb:slot6 tirs232 -parl outfile.txt
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.
Within TI BASIC, you can simply do a


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.
LIST "PIO"


You can create this zip file quite easily:
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.


* Unpack the gramkracker.rpk file with a zip tool.
For the parallel output you '''do not need''' the [https://www.ninermame.org/details/serialconn serial bridge].
* 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.


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

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.