-zoom/-nozoomcommand line options with
-soft/-nosoftand made softening, scanline simulation, and synchronization options work on all relevant platforms (Unix, Maemo, MSDOS).
[F8]toggle scanline simulation, while
-novsyncoption from MG-MSDOS, as
-nosyncdoes the same thing.
Currently, MG is able to run about 98% of SMS/GG/SF7000/SC3000/SG1000 carts and disk images that I have. With the help from friends I hope to make it as close to original machines as possible and emulate some exotic peripherals such as light gun, sports pad, and GameGenie. At this moment, MG supports following features:
MasterGear is a very portable application and has been compiled for a wide variety of platforms: Unix, Windows, MacOS, PocketPC, Symbian, MSDOS, and so on. The complete up-to-date list of MaterGear ports is available at the MaterGear distribution site. Following are the major ports:
The MG-Windows is available from me, Marat Fayzullin, as shareware. Registering it ensures that you will always get the latest full versions of both MG-Windows and MG-MSDOS with support and free updates via email as long as I update these programs. You can get MG-Windows, as well as my other Windows applications, from
The MG-MSDOS is included with the Windows version. When buying MG-Windows, you effectively buy MG-MSDOS as well. MG-MSDOS is compiled with OpenWatcom C/C++ and runs in full screen mode under the DOS4GW 32bit DOS extender.
MG-Unix binaries for various flavors of Unix are freely available from the MasterGear distribution site. I am always trying to compile it for as many different Unices as I have handy at the moment.
MG-Linux is compiled from the same source as all other Unix versions. You can get it for free from the MasterGear distribution site.
The MG-MacOS has been developed by John Stiles as shareware. Unfortunately, it is no longer being actively maintained. I am looking for somebody to maintain this port.
The MG-Symbian works on smartphones running the 3rd Edition of the Nokia S60 software or UIQ3 software from Sony Ericsson. It is available as shareware with free email updates. You can try and buy MG-Symbian and my other Symbian products at
The MG-PocketPC is being developed by Aaron Oneal, as part of his MorphGear project. You can get the PocketPC versions of MasterGear and my other emulators from
The MG-Maemo works on Nokia internet tablets running Maemo OS2008. It is specifically optimized for Maemo platform and available for free from the MasterGear distribution site.
If you've bought MasterGear from me, please do not give your copy to anybody. And I do mean anybody. There was a couple of cases when registered users gave my programs away to their friends, relatives, or just some shady characters on the Net, and then I found my work pirated, spread on IRC, put onto WWW pages, and even posted to USENET newsgroups. If I find your personalized copy of MG being spread around, your registration gets automatically cancelled which means no support and no more updates.
I understand that the previous paragraph may sound threatening to some people, but this kind of piracy really hurts my profits and feelings. I've put a lot of effort into MG, and can only continue working on it if people do not try to cheat on me.It may also be a good idea to buy a real cartridge for each SEGA ROM image you use with the emulator. SEGA software is copyrighted, but as long as you own the real cartridge, you are protected by the law allowing customers to backup bought software.
mg - MG executable file (Unix, mg -help for options) mg32 - MG executable file (Unix, 32bpp X11 display) mg16 - MG executable file (Unix, 16bpp X11 display) mg.exe - MG executable file (Windows) mg-dos.exe - MG executable file (MSDOS, mg-dos -help for options) MG.html - This documentation
Absolutely no ROM images of SEGA games are included. These games are still copyrighted by the companies who produced them and therefore I cannot distribute any of them. I'm also unable to tell you where to find these games, so do not email me asking for it. You will have to look for games on your own.
When using SC3000 keyboard, press
[CONTROL]+[KEY] to access
a special function of the
[KEY], if it also performs a
[ALT] - Hold to switch to the second controller [SPACE] - FIRE-A button (also: [SHIFT],A,S,D,F,G,H,J,K,L) [CONTROL] - FIRE-B button (also: Z,X,C,V,B,N,M) [ENTER] - START button (only in GameGear mode) [TAB] - PAUSE button (only in MasterSystem mode) [ESC] - Quit emulation (also: [F12]) [PGUP] - Fast-forward emulation (also: [F9]) [F2] - Turn soundtrack log on/off [F3] - Toggle FIRE-A autofire on/off [F4] - Toggle FIRE-B autofire on/off [F5] - Invoke configuration menu [F6] - Load emulation state (*.STA) [F7] - Save emulation state (*.STA) [F8] - Toggle scanlines on/off [SHIFT]+[F8] - Toggle screen softening on/off [F9] - Fast-forward emulation (also: [PGUP]) [F11] - Reset hardware [F12] - Quit emulation (also: [ESC]) [ALT]+[PGUP] - Increase audio volume [ALT]+[PGDOWN] - Decrease audio volume When compiled with #define DEBUG: [F1] - Go into built-in debugger When compiled with #define MSDOS: [F10] - Make a screen snapshot (SNAPxxxx.GIF) When compiled with #define WINDOWS: [ALT]+[ENTER] - Switch between full scren and window modes
These options only work in MG-Unix and other MG ports with the command line interface.
Usage: mg [-option1 [-option2...]] [filename] [filename] = Name of the file to load as a cartridge [CART.ROM] [-option] = -verbose <level> - Select debugging messages  0 - Silent 1 - Startup messages 2 - Illegal accesses 4 - Illegal Z80 ops 8 - Bank switching 16 - Sound 32 - VDP registers 64 - VRAM accesses 128 - Disk accesses -hperiod <period> - Number of CPU cycles per HBlank  -vperiod <period> - Number of CPU cycles per VBlank  -skip <percent> - Percentage of frames to skip  -help - Print this help page -sg1000/-sc3000/ - Run as SG1000/SC3000/SF7000/SMS/GG [auto] -sf7000/-sms/-gg (overrides .SG/.SC/.SF/.SMS/.GG file extensions) -engl/-jap - Run in English/Japanese mode [auto] (overrides country code in GG cartridges) -autoa/-noautoa - Autofire for button A [-noautoa] -autob/-noautob - Autofire for button B [-noautob] -delay/-nodelay - Delay VRAM reads [-nodelay] -eeprom/-sram - Emulate 93C46 EEPROM or normal SRAM [-sram] -fm/-nofm - Emulate YM2413 FM sound chip [-fm] -cdms/-nocdms - Emulate CodeMasters ROM mapper [-nocdms] -drums/-nodrums - Use MIDI drums for PSG noise [-nodrums] -logsnd <filename> - Write soundtrack to a MIDI file [LOG.MID] -printer <filename> - Redirect printer output to file [stdout] -sync <frequency> - Sync screen updates to <frequency>  -nosync - Do not sync screen updates -soft/-nosoft - Scale display, with softening [-nosoft] -tv/-notv - Simulate scanlines [-notv] -sound [<quality>] - Sound emulation quality  -nosound - Same as '-sound 0' When compiled with #define DEBUG: -trap <address> - Trap execution when PC reaches address [FFFFh] When a keyword 'now' is used in place of the <address>, execution will trap immediately. When compiled with #define UNIX: -shm/-noshm - Use MIT SHM extensions for X [-shm] -saver/-nosaver - Save CPU when inactive [-saver] -scale <factor> - Scale window by <factor>  When compiled with #define MSDOS: -back <filename> - Use <filename> as background picture [MG.GIF] -vsync - Sync screen updates [-vsync] -static/-nostatic - Use static color allocation [-nostatic]
I do not know. I can't give you any due to both legal and moral reasons. Please, do not mail me asking for games. I will delete your mail right away, and you won't get an answer.
You can use a special device called cartridge copier. Pascal Felber has made such a copier. Its schematics and software are available at
You can also buy this copier from Pascal, either in parts or as a pre-built kit.
Over years, SEGA has produced several different 8bit videogame consoles. They all had similar hardware built around a generic Z80 CPU, TMS9918 video chip, and SN76489 sound chip.
The oldest members of the family, SG1000, SC3000, and SF7000, had an original TMS9918 VDP and apparently weren't sold in US and most of the Europe. SG1000 was a "proper" gaming console, while SC3000 was a home computer with a keyboard and BASIC in ROM. SF7000 added a floppy disk drive to the SC3000.
The MasterSystem, widely sold in the US, has an additional extended screen mode not available in the standard TMS9918 VDP. Most MasterSystem games rely on this screen mode. The compatibility with TMS9918 screen modes has been retained though, so MasterSystem can play SG1000/SC3000 games.
The GameGear only has the MasterSystem native screen mode truncated to fit smaller screen, but not TMS9918 screen modes. It also has an extended color palette of 2x16-out-of-512 colors, as compared to MasterSystem's 2x16-out-of-64 colors.
Japanese and some European versions of MasterSystem, such as Mark3, have a sound chip made by Yamaha (YM2413, aka OPLL). The chip provides either nine channels of FM sound, or six FM channels and five drums.
SEGA machines have no BIOS ROM as in MSX or ColecoVision. Instead, they have a small bootup ROM which initializes the hardware and then switches itself off, passing control of the hardware to the cartridge.
To force MG into emulating desired system, use
-sms/-gg/-sc3000/-sg1000/-sf7000 options or select system
type in the MG-Windows Setup Panel. If you use .SMS, .GG, .SG, .SC, and
.SF file name extensions to distinguish between MasterSystem, GameGear,
SG1000, SC3000, and SF7000 ROMs or disk images, MG will check these
extensions and switch into an appropriate mode.
In the MasterSystem mode, MG defaults to the US/Europe localization
-engl). In the GameGear mode, MG checks the country code. If
the cartridge is either for Japan or US/Europe only, the localization
switch is forced into an appropriate state. It may be overridden by giving
a localization option (
Japanese versions of MasterSystem, such as Mark3, contain a YM2413 FM
synthesizer chip from Yamaha. To make MG emulate this chip, use the
-fm option or select "Emulate FM sound chip" in the
MG-Windows Setup Panel. Some games will not use FM chip unless you switch
to Japanese localization (
To fully appreciate FM chip emulation, you should use MG-Windows with MIDI sound, as YM2413 heavily relies on MIDI instruments and drums. Soundtrack log file (that is MIDI) is also going to show YM2413 music in all its glory.
Some GameGear games, namely World Series Baseball and Majors Pro Baseball,
do not have usual battery-backed memory on cartridge. Instead, they use
a little chip known as 93C46. This chip contains 128 bytes of non-volatile
memory that stays intact even without battery support. It is frequently
used in TVs, VCRs, etc. to retain the device state (the last channel you
watched and such). Since version 1.4, MG will fully emulate 93C46 chip if
you use the
-eeprom option or select the "Emulate serial
EEPROM" checkbox in the MG-Windows Setup Panel.
I am trying to compile Unix binaries for as many flavors of Unix as possible, but as I do not have access to many machines, do not expect immediate support for every Unix flavor out there. Don't mail me asking for the source either: MG source code is no longer publicly distrbutable, as much as I regret to say this :(.
This is explained in the beginning of this document.
This may happen when you are trying to run a MasterSystem or SG1000 game
in the GameGear mode or vice versa. By default, MG will try to recognize
game type by
.SMS/.GG/.SG/.SC/.SF extensions. If your files
have different extensions, you can use
-sms/-gg/-sg1000/-sc3000/-sf7000 options in MG-Unix or select
an appropriate hardware model in the Setup Panel of MG-Windows.
There may be several reasons why a game has problems running on MG or does not run at all:
dd if=<input-file> of=<output-file> skip=1 bs=512
-skipvalue, or the "Draw XX% Frames" menu itmes in MG-Windows and see if it helps.
-delay/-nodelayoptions, or check/clear the "Delay VRAM reads" menu item in MG-Windows.
If your copy of MG has been compiled with
#define ZLIB, it
will recognize and automatically unpack GZIPped files. MG-Windows and most
versions of MG-Unix are compiled with this option. To find out whether
your MG-Unix supports this feature, run it with the
option and see if it says anything about GZIP support.
Some MG-Unix binaries are compiled with
#define ZLIB option
to make them automatically recognize and unpack GZIPped files. This option
requires ZLib library which can be obtained from
This may happen if the versions of your shared libraries are older than the ones for which MG has been compiled. A decent way to deal with this is to upgrade your Unix. A quick and dirty way is to make a symbolic link from the existing library to a name required by MG.
You are probably trying to run MG-Unix on a remote Xterminal while it
attempts to use shared memory for interfacing with X. Use
-noshm option to tell it not to use shared memory.
MG-Unix version currently needs 8bpp, 16bpp, or 32bpp X. Neither 1bpp nor 4bpp Xterminals will work. 24bpp Xterminals may work, but don't count on it.
Some other X application took over all available colors so that the emulation could not allocate any for itself. Check if you run XV, Netscape, or something similar.
The wave synthesized sound in MG-Windows may become distorted on slow or highly loaded machines (no graphics acceleration, for example). There are several ways you can improve sound:
In SC3000 mode, MG will emulate SC3000 keyboard and also provide 32kB of
RAM. This allows to run BASIC Level 3, Music Editor, and other SC3000
programs. Following are non-obvious keyboard equivalents for SC3000 keys:
Take notice that all special MG functions accessed with the keys used
by SC3000 keyboard (such as
) are still
accessible if you press these keys with
To use an SF7000 disk image, you will first need to have an 8kB
SF7000.ROM file with the SF7000 BIOS in the current
directory. As long as you have this file, simply supply the file name
of a disk image (with
.SF extension) in the command line
or select it from an Open dialog in MG-Windows. MG will load the disk
image and try to boot from it.
The machine state can be saved by pressing
[F7] button and
[F6]. The resulting data file will have the same
name as your cartridge file, but its extension is going to be .STA. This
state file will be loaded automatically next time you start MG. The same
state file is not guaranteed to work for versions of MG running on different
#ifdef SOUNDfinally retired from the code. The sound code is always compiled in anyway.
-zoom/-nozoomoption to MG-MSDOS that will zoom SMS/GG display to fill the whole screen, using image softening algorithm.
-sync/-nosyncoption to MG-MSDOS to sync screen updates to the timer (use
-tvoptions used, otherwise it runs in 320x200x15bpp screen mode.
-printercommand line option.