*********************************************************************** * MASSAGE V0.61- Sega Master System/Game Gear Emulator by James McKay * *********************************************************************** New stuff ========= * Quicker calibration method (V0.61). * Enter 8 Action Replay codes instead of 4 (V0.61). * Top new line interrupt method! * Optional large screen for Game Gear games, in true blocky style. * Speed gauge! * Very faulty GG modem linkup option! * More games work. * Joystick button swapping. * PC Joystick can now operate player 2 controller. (If you have only 1 joystick and want to play 2 player Master System games). * Emulation options, allows you to twiddle with a few points of emulation, for better compatibility (not really needed due to new line int method). * Pro Action Replay cheat code entry. (But not the code generator). * Snap files so you can save points in games that don't have battery backup ram. (Note that snap files are unlikely to remain the same with future versions of the emulator). * Screen dump to a PCX file. * PC Speaker support. Instructions ============ Started 23/07/96. Today is 26/10/96, work out how old it is yourself! This program emulates the following: Z80-A. Memory map. ROM mapper. Battery Backup. Sound Chip. FM Chip (Totally Wrong Though). Full Controller 1. Full Controller 2. Game Gear Start Button. Game Gear Palette. Game Gear Linkup Cable Support (Very Dodgy). Screen: Horizontal h/w scroll. Vertical h/w scroll. Clipping (left). Palette. Tile horizontal and vertical flipping. Screen map. Sprites, 8x8, 8x16 and 16x16. Locked top 2 rows of screen. Locked rightmost 8 columns of screen. Line interrupts (nearly perfect). Note that some carts don't work yet, it is surprising that so many work, considering that I emulate (partially) only IN ports and only OUT ports. You will need at least a BIG MACHINE for decent speed. This roughness is now out of date, and we have some timings now available: P90 - Frame 1/1 can achieve 100%. P60 - Frame 1/2 can achieve 100%. 486DX2-66 - Frame 1/4 can achieve 100%. So a P90 or above is your ideal machine. P75 might be OK... This is all based on the figures of the unproven (but reasonable) speed detect though. Although, if you choose large screen for the GG, you will need a bit more power. Once you have read the text file, you can check out the Massage FAQ which should accompany this file if you still have any questions. How to use: ----------- massage - Starts the emulator with the file select screen. massage /? - A not very good help, some of the options listed don't work. massage or massage Loads and runs the named cartridge, however the cartridge must be in a specific format: 1. It can either be raw, or have a 512 byte header. I have tested both kinds and they work. 2. It must have the suffix .sms for an SMS game, or a .gg suffix for a Game Gear game. massage /delay - A rather poor slowdown method, num can be 0-65535, where 65535 is a ridiculously long delay and 0 is no delay, use this if it is running too fast. Use low numbers to start with. massage /mono - This is a relic from another piece of software I wrote, but it does have the advantage that it basically switches off the screen making it a bit like V0.0a. Allowing for speedy playing of the music. massage /frame - This sets the screen to update 1/num times, (where 0 is 256) this is highly recommended for speed trouble! I use /frame 4 on a 486SX-25! (Although it is nowhere near full speed, to be exact, about 40%). The emulator now tries to detect which screen update is most suitable for you, and will assign a value between 1 and 5 to this when you switch on, or swap between small and large GG screens. massage /jap - This convinces some Master System games that they are running on a Sega Mark 3 console, which means some games use Japanese. massage /nojoy - Switches off the joystick if you have a nasty old analogue wobbler that doesn't work properly. massage /ggpad - Select Gravis Gamepad switched around buttons option. massage /p2joy - Use Joystick as player 2 controls, allows people who only have one joystick to use keys as P1, and joystick as P2. massage /bswap - This switches button 1 and 2 on your PC joysticks. massage /li - Chooses line interrupt method, =0 to 1. 0 is the new improved default method. The old method 0 and method 2 have been removed, method 1 is only needed in rare cases. COMMS OPTIONS: -------------- massage /dial - The phone number of who you are going to try to link up to! massage /receive - Use this if you are on the receiving end of a modem call. massage /nullt - The transmitting end of a serial cable. massage /nullr - The receiving end of a serial cable. massage /com - <1-4> The COM port that your modem/serial cable is on. massage /baud - The baud rate of the connection (default 14400), can take values up to 115200 for serial cable. Now, if you have a non standard port/irq etc, then you will want to use these options instead of /com. massage /port - The base address of the port. massage /irq - The IRQ of the port. LINKUP: ------- NOTE: At the time of release, the linkup feature is still seriously buggy. Due to bytes disappearing during transmission, games can report a link error or the emulator may tie up. You can tell if the emulator has tied up by looking at the little dot flashing at the top left of the screen, if it stops, then synchronisation data has been lost, and both machines are waiting for a signal that will never arrive. Press F5-Esc until the dot flashes again (only required on one of the machines). If you are lucky no game data will have been lost and you can continue playing. Also the sheer amount of synchronisation data sent between the two machines (to make sure the games are running at the same speed) is a significant overhead and modem play tends to be agonisingly slow! If you want to try it try using two PCs with a null modem cable, although a 28800 modem may be worth a go on experimental grounds. There is also a chat mode! When linked up, press F12, and you have a screen that is split halfway down, the top half is your window, the bottom half is the others window, you can type, use return, and backspace to chat to the person you are connected to! Useful for determining which game you are going to try next, or to remove 'emulator tie up'. You can quit the window by pressing Escape, and the emulator will continue on. Note that pressing F12 will eat up any data that has been sent by the game, so can cause link errors and so on, so the safest time to press it is when the game is at a menu, or in an emulator 'tie up' (which will have already processed all the data it can find). The extremely dodgy modem or null modem link up option! This has all the best features of dodgy software, no autodetect, etc! Both machines send a large pile of synchronisation data to each other, in order to allow both machines to run at exactly the same speed. So the game will run at the speed of the slowest machine, with some taken off for the time it takes to send the bytes (baud rate), and a bit more taken off for having the IRQs controlling the CPU every so often. Usual modem/serial ports: COM 1 Address 0x378 IRQ 4 COM 2 Address 0x278 IRQ 3 To use this option you must start from the command line, so: For modem: On the dialling machine: massage /dial 12345678 /com 2 game.gg On the receiving machine: massage /receive /com 2 game.gg For null modem: On one machine: massage /nullt /com 1 game.gg On other machine: massage /nullr /com 1 game.gg If using a modem, then you must make sure that the /receive machine is done first. If using a null modem (serial) cable, then do the /nullt machine first. It is unadvisable to try and play a linkup game with both machines reporting well above 100%, because that will put a bigger overhead on the connection, thereby causing slowdown. Also note that the modem strings are currently 'hard-wired' into the code: ATZ\r Modem Init ATM\r Turn off the damn modem speaker! ATS0=1\r Auto Answer ATDT\r Dial number CONNECT The string returned by the modem to show connection. OK The string returned by the modem to show instruction completed. If your modem doesn't like these, then you are stuck. But don't worry, you aren't missing much at the moment. If you have a non-standard COM port, then see further up in this document about how to set the port address (/port) and IRQ (/irq) manually. For a list of games that are 2 player 'capable', see the FAQ. IMPORTANT! The emulator does not hang up the phone! Remember to do this, (by pulling the phone plug out of the socket, then put it back in) just in case you get a huge bill or miss any phone calls! KEYS: ----- Escape - Reset Space - Pause on Master System, or Start on the Game Gear. Ctrl and Alt represent buttons 1 and 2 on controller 1, but I do not know which is which! Cursor Keys - Up, down, left and right. Menu controls: Up, down - Move pointer. Left, Right - Change value by 1. Page Up, Page Down - Change value by 10. (Where applicable). Enter, Return - Select option. Escape - Leave menu. F1 - Options. ================= * Alter Screen Skip [1/(0-255)] - The number of times the screen is updated, 1/1 is perfect screen update. The higher the number the faster the emulation should be (0 means 256 so is the fastest). * Alter Slow Down [0-65535] - The higher the number the slower it goes, should now be set automatically when you run emulator. * GG Screen Size [Small] - Set this to Large for a bigger GG screen. * Keep close to 100% [Yes] - Set this to NO, if you are fed up with the settings changing every time you change from small to big screen GG. F2 - Screen dump to PCX. ============================ Enter the filename you wish to save it as, and it will be saved. If there is already a file with that name then you will be asked if you want to overwrite it or not. The extension .PCX is added automatically. If you want to (for example) save the same GG screen in big and small, then access this from the F1 menu. Note that it saves the full 320x200 leaving the black borders in. F3 - Pro Action Replay codes. ================================= This menu has 8 codes set at "0000-0000" with all switched off. The real PAR has only 4 slots, so remember this if you are making codes. To enter a code press return when you have picked a slot (with up and down), enter the code (you don't have to enter the minus sign in the code) and the code will be switched on. To switch a code on or off, move to that slot and press left or right. If you enter an invalid code, then the old code will remain in place. When you load a new cartridge all codes are cleared. The PAR was more popular in the UK than it was in the US (in fact was it released at all in the US?), probably because it could make it's own codes, this one can't though so you will have to find codes in old magazines or maybe someone will set up a big text file on some web sites? F4 - Joystick options. ========================== * 4 Button Pad [No] - Set to yes if you want the full effects of your four button pad. * SMS 2P 1 Joystick [No] - Set this to YES if you only have one joystick and want to play a two player SMS game. * Swap Buttons [No] - Set this to YES if you want button 1 and 2 to be swapped on your joystick. F5 - Load new cart. ======================= Select the file you want to load and press return. F6 - Save snap file. ======================== Type the name that you want to call the saved file and press return. If there is already a file with that name then you will be asked if you want to overwrite it or not. The correct extension .MSD or .GGD is added automatically. F7 - Load snap file. ======================== Select the file you want to load and press return. Make sure that you have loaded the appropriate cartridge (with F5) first! F8 - Emulator options. ========================== * INT 255 [Immed.Int] - Now almost defunct due to new Line Int Mode 0. * Top Line [304] - Switchable between 255 and 304. * Vblank [Always] - Switchable between Always and optional. * V0.6 Default - Sets the top 3 to "Immed Int","304","Always". * V0.5 Default - Sets the top 3 to "No Int.","255","Always". The idea being that you should be able to play any game which worked on V0.5 (in conjunction with line int method). * Language [English] - Can be set to Japanese for some old SMS carts, only affects game when you load or reload it. * Line Int Method [0-1] - The algorithm that determines when the line interrupts happen. F10 - Quit to DOS. ===================== Quits immediately, so be careful. F11 - Sound options. ======================= * Sound is [Adlib,PC Speaker or Off] * Create LOG File - Don't touch! * White Noise Is [On] - So you prefer no white noise instead of a feeble attempt? Then switch this to Off (only affects Adlib). F12 - Chat mode (if currently linked up). ============================================ You can type normally, also return and backspace work. Press Escape to return to the emulation. WANTED: ------- Any programming information about the Sega Master System or Game Gear, and any ROMs I would consider a bonus! For development purposes of course. Also, if there are any other file formats that other types of cartridge copier use, tell me, and I'll try and include compatibility in a future update. Currently sought after: Number of screen lines that report themselves with bit 7 reset when IN 191. Relationship between port 1 and port 4 (GG). Port 6. (SMS/GG). FM Chip. Serial comms without losing bytes. What are the first two digits in a PAR code for! And what exactly happens when you switch off a code? VOLUNTARY PAYMENT SYSTEM: ------------------------- Paying any money will not get you a registered version, or future updates delivered straight to your mbox. Indeed, you already have the full version of the software (to date). Consider the shareware system, except this way there is no limited trial period, and you don't have to worry about sending money off and not getting anything back, because you have the software already! If you send me 5 UK pounds or equivalent, I'll be amazed. As payment is voluntary you only need to do this if you want to. It will be helpful to me though, after all a lot of you want me to do some work on an emulator for a certain 16 bit console (but I have been beaten to it, anybody got any PC-Engine (C) NEC info?), and I am a recent graduate with no job yet. James McKay, 8B West Buchanan Place, Paisley, Renfrewshire, PA1 2JU, United Kingdom. DISCLAIMER: ----------- Sega is a trademark of Sega. Mark 3, Master System, Game Gear, Megadrive and Genesis are trademarks of Sega. Pro Action Replay is a trademark of Datel Electronics Ltd. Serial communications library is: LL_COMM (Lord Logic's Comm Code) (C) 1994 James P. Ketrenos. Using the PMODEW V1.24 DOS extender by Charles Scheffold and Thomas Pytel (to save on the size of the ZIP). Emulator compiled in Watcom C 10.0. Thanks to TF and AB for info regarding line interrupts (not sure if I should put your names here!) I promise that debugging parts will soon be made available. This software is not an official product of Sega, and neither are the cartridge copiers, although I have nothing to do with the cart copiers. Distribution of 'backed up' cartridges is an illegal activity.