Difference between revisions of "MESS multicart system"
(No difference)
|
Revision as of 15:28, 7 November 2009
Back to TI MESS emulation home page.
With MESS 0.131 there is a new cartridge handling system, the multicart system. It basically has three important features:
- Cartridges which contain various ROM dumps can now be realized by one single file.
- As one has one file per cartridge, the multiple cartridge handling may be used.
- Cartridges may consist of ROMs and RAMs. RAM can be handled as persistent (NVRAM) or volatile.
Note: As with all other features, please check the section No problems first if you suspect an issue. Sometimes there is no problem at all, or you can easily avoid it.
New cartridge structure
Before MESS 0.131, cartridges consisted of separate ROM dumps, namely for ROM and GROM. This requires the user to mount both dumps in one cartridge slot each. From 0.131 on, cartridges are realized as ZIP files, containing several entries. For instance, the Extended Basic cartridge looks like this:
extendedbasic.rpk: exbasicc.bin exbasicd.bin exbasicg.bin layout.xml
The "bin" files are ROM dumps: exbasicc is the ROM dump of the CPU address area >6000 to >7FFF. exbasicd is the second bank which resides on the same addresses. Extended Basic switches both banks by writing a random value to address >6000 (switch to bank 0) or >6002 (switch to bank 1). exbasicg is the GROM dump. Unlike the GRAM Kracker format (which is also used in the Geneve), all GROMs are stored in one file, including the padding in the last 2K of each GROM (i.e. the file is expected to have a size of a multiple of 8K).
The layout file defines the role of the respective ROM dumps, and selects one of five predefined handlers in the MESS emulator. If more cartridge types are found, additional handlers can be added in the MESS code.
This is the layout file for the Extended Basic cartridge:
<?xml version="1.0" encoding="utf-8"?> <romset version="1.0"> <resources> <rom id="gromimage" file="exbasicg.bin"/> <rom id="romimage1" file="exbasicc.bin"/> <rom id="romimage2" file="exbasicd.bin"/> </resources> <configuration> <pcb type="paged"> <socket id="rom_socket" uses="romimage1"/> <socket id="rom2_socket" uses="romimage2"/> <socket id="grom_socket" uses="gromimage"/> </pcb> </configuration> </romset>
The file contents is an XML document following these conventions:
- The root element is <romset>
- Each dump is found in a <rom> element in the <resources> section.
- In the <configuration> section, the <pcb> element defines the cartridge type.
- Each socket refers to exactly one resource defined above.
For the TI emulation, we have some predefined constants here:
PCB Type | Meaning | Sockets | Used by |
---|---|---|---|
standard | Cartridges with 0 or 1 ROM and 0 or 1 GROM dump. | rom_socket, grom_socket | Most cartridges |
paged | Cartridges with 2 ROMs and 0 or 1 GROM dump. Extended Basic is known to use this format. | rom_socket, rom2_socket, grom_socket | Extended Basic and many Atarisoft games |
minimem | Cartridges with 1 ROM (4K) and 1 persistent RAM (4K) and 0 or 1 GROM dump. | rom_socket, grom_socket, ram_socket | Mini Memory |
super | Cartridges with 1 RAM (32K) and 0 or 1 GROM dump. | grom_socket, ram_socket | SuperSpace II |
mbx | Cartridges with 1 ROM, 1 RAM (1K, persistent) and 0 or 1 GROM dump. | rom_socket, grom_socket, ram_socket | MBX cartridges |
paged379i | Cartridges with one ROM of 8K to 64K | rom_socket | New cartridges with LS379 selector |
pagedcru | Cartridges with one ROM of 8K to 64K | rom_socket | Cartridges with CRU banking (like DataBioTics) |
More examples
Editor/Assembler:
<?xml version="1.0" encoding="utf-8"?> <romset> <resources> <rom id="gromimage" file="ed-assmg.bin"/> </resources> <configuration> <pcb type="standard"> <socket id="grom_socket" uses="gromimage"/> </pcb> </configuration> </romset>
MiniMemory:
<?xml version="1.0" encoding="utf-8"?> <romset> <resources> <rom id="gromimage" file="minimemg.bin"/> <rom id="romimage" file="minimemc.bin"/> <ram id="bufferedRam" type="persistent" file="minimem.nv" length="4096" /> </resources> <configuration> <pcb type="minimem"> <socket id="rom_socket" uses="romimage"/> <socket id="grom_socket" uses="gromimage"/> <socket id="ram_socket" uses="bufferedRam"/> </pcb> </configuration> </romset>
SuperSpace II (do not mount the supcartc.bin which can be found on some servers; it is just the image of the empty ram):
<?xml version="1.0" encoding="utf-8"?> <romset version="1.0"> <resources> <rom id="gromdump" file="supcartg.bin"/> <ram id="ssram" file="superspace.nv" type="persistent" store="external" length="32768" /> </resources> <configuration> <pcb type="super"> <socket id="grom_socket" uses="gromdump"/> <socket id="ram_socket" uses="ssram"/> </pcb> </configuration> </romset>
Sewermania (although there may be better examples; I don't know whether it makes use of the RAM at all):
<?xml version="1.0" encoding="utf-8"?> <romset version="1.0"> <resources> <rom id="gromimage" file="sewermaniag.bin"/> <ram id="mbxram" store="external" type="persistent" file="sewermania.nv" length="1024" /> </resources> <configuration> <pcb type="mbx"> <socket id="grom_socket" uses="gromimage"/> <socket id="ram_socket" uses="mbxram"/> </pcb> </configuration> </romset>
Do it yourself
If the cartridge which you want to use is not available as an rpk, just do the following:
- Determine the type of the cartridge. This is something you have to figure out. If you find a *d.bin file, it is "paged"; the "minimem" type is only used by MiniMemory, and the "super" type belongs to SuperSpace II. That is, you need to check whether the cartridge is an MBX cartridge or not, and accordingly use the type "standard", "paged", or "mbx".
- Create a layout file as shown above. Use the rom dump file names in the references. Name the file "layout.xml".
- Create a ZIP archive file named mycartridge.rpk (or any other name). Put the rom dumps and the xml file in the archive.