------------------------------------------------------------------------- ExecROM vr. 0.92b for the MSX system (c) 1996,1997 A&L Software ------------------------------------------------------------------------- 00. Index ----- 01. What is ExecROM 02. What you need to run ROM files 03. What is a MegaRAM cartridge 04. How to use ExecROM 05. Patching ROM files with ExecROM 06. ExecROM troubleshooting 07. Credits, use and copy 01. What is ExecROM --------------- ExecROM is a program that allow you to execute ROM files on your MSX1, MSX2, MSX2+ or MSX Turbo R. It can execute 16, 32, 48, 64 (?), 128, 256, 512 and 768Kb (?!) ROM files. A ROM file is just a raw image of MSX cartridges and can be found at various sites on Internet. A ROM image file can be just a 16k or 32k cartridge or even a 512k MegaROM cartridge. The ROM files were originally for use on MSX emulators, but with ExecROM you can run them now on your REAL MSX (that is much better than a emulator :)! 02. What you need to run ROM files ---------------------------- To run ROM files you will need: * the ExecROM program; * an MSX-DOS operational system; * an MSX computer; * a MegaRAM cartridge; If you want to run MegaROM cartridges or use Game Master you will REALLY need a MegaRAM. But if you only want to run 16k or 32k cartridges, without using Game Master, only an MSX, the MSX-DOS and ExecROM are necessary. ExecROM is an MSX-DOS COM file, and need it to run. You can't execute ExecROM under BASIC. Originally written to be run on an MSX computer, ExecROM can be executed with relative sucess on emulators (of course, you can't run MegaROM games or use Game Master because they don't emulate a MegaRAM...) and was sucessfully tested with the CJS MSX Emulator vr. 0.99b and 1.0b and with the fMSX vr. 1.4 and 1.6 for MS-DOS. 03. What is a MegaRAM cartridge --------------------------- A MegaRAM is a memory cartridge with the same layout of the MegaROM cartridges. The difference between the MegaRAM and the MegaROM is obvious: while the MegaROM cartridge can be only read, the MegaRAM can be read and written. You can find MegaRAMs with size of 256, 512 and 768Kb. You can also find the MegaRAM Disk, that is a MegaRAM with a Disk ROM inside, using the MegaRAM like a RAM DISK. You can use the MegaRAM Disk like a disk and like a normal MegaRAM (also called MegaRAM Game). The MegaRAM is a brazilian creation, and is almost unknown on Europe, Japan and other countries. On the contrary of Memory Mapper, the MegaRAM is not recognized as the real MSX memory expansion. 04. How to use ExecROM ------------------ It's too easy to use ExecROM. To just run a ROM file on your MSX, type, at the DOS prompt, ExecROM file where 'file' is the ROM file name you want to run. The extension '.ROM' can be omited. Just wait a few seconds and the cartridge will be executed. All the actions (detect, analyze, load, etc), including MegaRAM detection, are automatic. ExecROM have some options, that can be selected before the file name. They are listed below: option /P: change a byte on the cartridge. It's useful for patching games and getting infinite lives, immortality, etc. The syntax is: /Ppp,xxxx,yy where: pp - is the page to be patched. It's only necessary for MegaROM games, that are divided in pages (0 to 0Fh for 128k cartridges, 0 to 1Fh for 256k cartridges and 0 to 3Fh for 512k cartridges). xxxx - is the address to be patched. The address is the relative dislocation to the cartridge beginning. On MegaROM images the address is the relative dislocation to the page beggining. The cartridge and the page beginning are assumed as address 0. yy - is the byte to put on the address. option /F: fill a cartridge area. It's useful for patching games too. The syntax is: /Fpp,qq,xxxx,yy,zz where: pp - is the initial page to be filled. It's only necessary for MegaROM games. qq - is the final page to be filled. It's only necessary for MegaROM games. xxxx - is the initial address to be filled. The address is the relative dislocation to the cartridge beginning (on MegaROMs is relative to the page eginning). The cartridge and page beginning are assumed as address 0. yyyy - is the final address to be filled. The address is the relative dislocation to the cartridge beginning (on MegaROMs is relative to the page eginning). The cartridge and page beginning are assumed as address 0. zz - is the byte to fill with the area. Important note: on the /F option,the MegaROM image is treated, despite of the pages division, as linear.Thus, if you request /F1,2,7,10,8 the page 1 will be filled from address 7 to end with byte 8 and the page 2 will be filled from address 0 to 10 with byte 8. If you put 5 in place of 2, the pages 2,3 and 4 will be completely filled with byte 8. Hipotetic representation of option/F1,2,7,10,8 ... page 1 page 2 ... |--------------------|------------------------ |??888888888888888888|8888???????????????????? ||-|-----------------||--|-------------------- 0 7 0 10 (addresses) Hipotetic representation of option/F1,5,7,10,8 ... page 1 ... pages 2,3 and 4 ... page 5 ... |-----------|-----|------|------|------------- |??888888888|88888|888888|888888|8888????????? ||-|--------|-----|------|------||--|--------- 0 7 (addresses) 0 10 option /R: put cartridge ID signature on ROM. If you are loading BASIC expansion cartridges, resident programs (Eddy2, HotAsm, MegaAssembler, Logo, etc), or even some games, you must use the /R option. It's because ExecROM disable the cartridge signature of file when loading it. The non existence of cartridge ID signature allows you to warm reboot your MSX and not backing to the game. option /B: don't execute the file directly, but reset MSX to do it. Some games and resident programs need this feature. option /H: show a little help of program. option /G: loads Konami's Game Master I with the ROM file.The Game Master ROM file MUST be called GMASTER.ROM. ATTENTION: the Konami's Game Master only works with Konami's games (that can be any size, including 16 and 32k). OBSERVATIONS: the pages, addresses and bytes MUST be given in hexadecimal format. They don't need to be a exactly two or four byte value (for example: 0Dh can be 0D or D; 12Fh can be 12F or 012F). only give page indication on MegaROM games. Cartridges with 16k or 32k don't request page indication, because they are treated as linear. Example: to run the MegaROM game GAME01.ROM, changing the byte on address 3Eh to 64h and filling the area from 1850h to 18A0h of page 5h with byte 40h you just need to type ExecROM /p3e,64 /f5,5,1850,18a0,40 game01 to run the 32Kb GAME02.ROM, changing the byte on address 21h to 0Fh and filling the area from 2320h to 30A0h with byte 10h you just need to type ExecROM /p21,f /f2320,30a0,10 game02 05. Patching ROM cartridges with ExecROM ------------------------------------ It was showed that ExecROM can patch ROM games for getting infinite lives, immunity, etc.But most of the existent patchs are for the binary format of games, that are different of the ROM format. To use this patchs on ExecROM you have to do a little address conversion. The following example if for a 32k game, and contains the basic procedures for the conversion. Supose you have a 32k game in binary format, and its BASIC loader is listed below. Supose that lines 30 and 40 patches the game for giving you immunity. And supose you have this game in ROM format. 10 cls:print"Loading game..." 20 bload"game-1.bin" 25 ' * Immunity patch begining 30 poke &ha320,&h30 40 defusr=peek(&hfcbf)+256*peek(&hfcc0):a=usr(0) 42 ' The line 40 just execute the block 1 45 ' * Immunity patch end 50 bload"game-2.bin",r If the game is a 16k or 32k cartridge, first you must find the cartridge ID bytes ("AB") on memory. Its what the line below do. bload"game-1.bin":for i=&h8000 to &hc000:if peek(i)=&h41 and peek(i+1)=&h42 then print"Begin:&h";hex$(i):end else next Supose that the routine give you the address &h9000. Just subtract this address from the patch address to get the ExecROM address for patch. In this example: &hA320-&h9000=&h1320. Just type at BASIC: print hex$(&hA320-&h9000) Now, type at DOS: ExecROM /p1320,30 game.rom But if the patch were after the second block loading, like below? 10 cls:print"Loading game..." 20 bload"game-1.bin",r 30 bload"game-2.bin" 35 ' * Immunity patch begining 40 poke &ha320,&h30 45 ' * Immunity patch end 50 defusr=peek(&hfcbf)+256*peek(&hfcc0):a=usr(0) 52 ' The line 50 just execute the block 2 In this case, the most common procedure is to subtract &h8000 from the patch address. In this example we would obtain &h2320. If it doesn't work, try subtract the block beggining address (it can be viewed with any binary file header reader) from the path address. For Memory Mapper games converted to MegaRAM there aren't a specific formula, because the blocks addresses change from game to game, and from block to block. Only a experienced MSX user can do it. For MegaRAM games the geral rule is subtract the patch address from block beginning (use a binary file header reader). If the blocks are 8k size,the page is the number of the block minus one (assuming the first block as block 1).If the blocks are 16k size, each block contains 2 pages. The page is the block number times two minus two (assuming the first block as block 1). If the patch address is greater than 2000h, increase page number and subtract 2000h from address. 06. ExecROM troubleshooting ----------------------- * WARNING: a) Don't execute ExecROM with a MegaRAM Disk in slot 1; if you have your MegaRAM Disk on slot 1, boot from disk. b) Don't execute ExecROM from MegaRAM RAMDisk, or an error will hang up your computer. c) Generally, boot your MSX with the CONTROL key pressed before running ExecROM if you have more than one diskdrive * GENERAL TROUBLESHOOTING: If you are having problems with ExecROM using a MegaRAM Disk and/or have more than one diskdrive conected to your MSX, try booting with the DELETE key pressed (to desactivate the MegaRAM Disk and turning it to a MegaRAM Game) and/or the CONTROL key pressed (to desactivate the logical drives). * SPECIFIC TROUBLESHOOTING: a) After the loading, ExecROM locks the computer on the message "Executing ROM cartridge" Some cartridges requires some "special" conditions to run, that can be provided by ExecROM. Some games need the ID cartridge identification or need to reset the MSX to run. These cases are resolved with options /R (that put the ID cartridge identification on ROM file) and /B (that reset your MSX to execute the ROM file). Try to use one of these or both options with the ROM file. If the game still doesn't run, see the "GENERAL TROUBLESHOOTING". Here are a little list of cartridges that require special options to run: Cartridge Options Elevator Action /R Kung Fu Master /R /B Star Force /R /B b) When the ROM file is executed strange images appear on the screen and the computer hangs up See the topic above. c) Resident cartriges are not enabled when loaded with ExecROM For resident cartridges you must use the /R option in ExecROM, or they will not be enabled. See "How to use ExecROM" for details. d) Patchs on the ROM file are not done i) . The patch page, address and byte are correct? ii) . Had you given the patch in hexadecimal format? iii). Do you not received the message "Error in path request"? e) After an error on ExecROM, the computer hangs up You probably are using a MegaRAM Disk and executed ExecROM at the MegaRAM Disk drive. Execute ExecROM from a diskdrive or reboot your MSX with the DELETE key pressed. If the problem persists, boot DOS from diskette, not from MegaRAM Disk. f) The MSX hangs up after computer identification See the topic above. g) ExecROM is reexecuted or strange messages appear when "Stopping the drive" or " Executing ROM cartridge" messages are displayed See "GENERAL TROUBLESHOOTING". h) The Game Master doesn't work with a game The Game Master only works with Konami's games. i) ExecROM doesn't load Game Master I i) . The Game Master file is called GMASTER.ROM? ii) . Are you sure that the file is the Game Master I? iii). Do you have a MegaRAM to use Game Master? 07. Credits, use and copy --------------------- The program ExecROM is freeware, i.e., it's free, you don't need to pay for it. But you only can use, copy or distribute it if you don't remove the author name and enclose the three files: ExecROM.COM, ExecROM.ENG and ExecROM.POR. This version 0.92b is full working with all types of ROMs. I got no problem on all my tests, but if you discover any bug, or have any idea or comment, let me know. If a ROM file doesn't run with you (please, see the troubleshooting first!), tell me and, if possible, send me a copy of your ROM to fast solving the problem. I would like to thanks all the active guys on MSX Broadcast List at Unesp, SP, Brazil for tests, ideas, bugs and comments. And I like specialy to thanks Marco Antonio Simon Dal Poz for his help about the MegaRAM and the size bug with 512k and 768k MegaRAM Disks. ExecROM is copyright (c) 1996,1997 A&L Software. Contact at: adrcunha@dcc.unicamp.br adrcunha@fee.unicamp.br http://www.dcc.unicamp.br/~adrcunha And remember: MSX forever!