Difference between revisions of "MAME TI emulation usage"

From Ninerpedia
Jump to navigation Jump to search
m (Mizapf moved page MESS TI emulation usage to MAME TI emulation usage: Renamed from earlier MESS to MAME)
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.  
 
'''Note: The following information is outdated and does not apply for later MAME releases.'''


== Slot devices ==
== Slot devices ==
Line 9: 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.
 
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".  


  mess ti99_4a -cart extended_basic.rpk -peb:slot2 32kmem -peb:slot3 speech -peb:slot6 tirs232 -peb:slot8 hfdc -flop1 mydisk.dsk
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 25: Line 35:
! Device
! Device
|-
|-
| rowspan="8" | -peb:slot2 ... -peb:slot5
| rowspan="11" | -ioport:peb:slot2 ... -ioport:peb:slot8
| 32kmem
| 32kmem
| TI-99 32KiB memory expansion card
| TI-99 32KiB memory expansion card
Line 50: Line 60:
| Horizon 4000 Ramdisk
| Horizon 4000 Ramdisk
|-
|-
| rowspan="4" | -peb:slot6
| ide
| ide
| Nouspikel IDE interface card
| Nouspikel IDE interface card
Line 63: Line 72:
| TI-99 Speech synthesizer (on adapter card)
| TI-99 Speech synthesizer (on adapter card)
|-
|-
| rowspan="4" | -peb:slot7
| ide
| ide
| Nouspikel IDE interface card
| Nouspikel IDE interface card
Line 76: Line 84:
| Myarc Hard and Floppy Disk Controller
| Myarc Hard and Floppy Disk Controller
|-
|-
| rowspan="3" | -peb:slot8
| tifdc
| tifdc
| TI-99 Standard DSSD Floppy Controller
| TI-99 Standard DSSD Floppy Controller
Line 90: Line 97:
=== 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 102: Line 109:
=== 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:


  mess ti99_4a -gromport single -cart ti_invaders.rpk
  mame64 ti99_4a -gromport single -cart invaders
  mess ti99_4a -gromport multi -cart1 extended_basic.rpk -cart2 editor_assembler.rpk
  mame64 ti99_4a -gromport multi -cart1 exbasic -cart2 editor_assembler.rpk
  mess ti99_4a -gromport gkracker -cart hunt_the_wumpus.rpk
  mame64 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.
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.
 
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:  
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 ==
== 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 [[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 [[MESS Serial connection|serial emulation page]].


One application that provides the necessary connection is [[TIImageTool]], in particular its ''serial bridge'' feature.
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:
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:


  mess ti99_4a -peb:slot6 tirs232 -serl1 socket.localhost:10000
  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 [[MESS DIP switch settings|DIP switch settings]].
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 ==
== Printing in MESS ==
Line 143: Line 143:
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.
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
  mame64 ti99_4a -ioport peb -ioport:peb:slot6 tirs232 -parl outfile.txt


Within TI BASIC, you can simply do a  
Within TI BASIC, you can simply do a  
Line 153: Line 153:
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:MESS]]
[[Category:MAME]]

Revision as of 11:13, 7 January 2019

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
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
ide Nouspikel IDE interface card
usbsm Nouspikel USB/Smartmedia card
tirs232 TI-99 RS232/PIO interface
speech TI-99 Speech synthesizer (on adapter card)
ide Nouspikel IDE interface card
usbsm Nouspikel USB/Smartmedia card
bwg SNUG BwG Floppy Controller
hfdc Myarc Hard and Floppy Disk Controller
tifdc TI-99 Standard DSSD Floppy Controller
bwg SNUG BwG 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 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 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.