# Mednafen

# General Documentation

Last updated April 5, 2010
Valid as of Mednafen 0.8.D

Table of Contents:

Introduction
Core Features

- NES
  CPU
  PPU
  Palettes
  Sound
  Input
  Zapper
  File Formats/Expansion Hardware
  iNES Format
  UNIF
  Famicom Disk System
  Game Genie
  VS Unisystem

- Atari Lynx
- GameBoy Advance
- PC Engine/SuperGrafx
- PC-FX
- Automatic IPS Patching
- CD-ROM Emulation

- Using Mednafen

- Key Assignments

- NES

VS Unisystem
Famicom Disk System
Barcode Readers
Game Pad
Power Pad
Family Keyboard
HyperShot Controller
Mahjong Controller
Quiz King Controller

- Atari Lynx
- GameBoy/GameBoy Color/GameBoy Advance
- Neo Geo Pocket/Neo Geo Pocket Color
- PC Engine(Turbo Grafx 16)/SuperGrafx
- PC-FX
- WonderSwan

Command line

- Cheat Guide
- Debugger
- Network Play
- Game-specific Emulation Hacks
- Credits
- Legal Stuff

## Introduction

Mednafen is a multi-game-system emulator, for various platforms, including emulation of the following systems:

- Atari Lynx
- Famicom
- GameBoy (Color)
- GameBoy Advance
- Neo Geo Pocket (Color)
- NES, both NTSC and PAL
- PC Engine/TurboGrafx 16 (CD) and SuperGrafx
- PC-FX
- WonderSwan (Color)

This document has been arranged to keep user interface details and emulation details as separate as possible, though this has not been accomplished entirely.

In several places references are made to the "base directory". If you are running a port on a UN*X-like system(Linux/*BSD/Mac OSX/SunOS/etc.), the base directory is "~/.mednafen", or in other words, "your home directory plus .mednafen". For all other ports(including DOS and MS Windows), the base directory is the directory that the executable is in, unless the HOME environment variable is set, then it is used as on UN*X.

Mednafen includes parts of or links with the following software packages and programs, so give the developers lots of thanks sometime(NOTE they do not provide user support for Mednafen, so don't ask them questions about Mednafen)!

- Blip_Buffer - Used in Atari Lynx, GB/GBC/GBA, and PC Engine sound emulation code.
- Cygne - WonderSwan (Color) emulation.
- FCE Ultra - NES/Famicom emulation.
- Fuse - Z80 emulation code.
- Handy - Atari Lynx emulation.
- hq2x/hq3x/hq4x - Pretty real-time(kind of ;)) image magnification filter.
- libcdio - CD access routines used in PCE CD emulation.
- libsndfile - Used for WAVE file playback with PCE CD emulation and WAVE file recording.
- miniLZO - Real-time (de)compression of save-states used in game rewinding.
- nes_ntsc - NES NTSC effects/artifacts blitter.
- NeoPop - Neo Geo Pocket emulation code.
- Scale2x - Pretty non-blurring real-time image magnification filter.
- SDL - System interfaces for video blitting, sound output, input, etc.
- SDL_net - Used in network play code.
- Tremor Used for Ogg Vorbis playback with PCE CD emulation.
- Trio - *printf replacement functions for portability.
- VisualBoy Advance - GameBoy, GameBoy Color, and GameBoy Advance emulation.
- zlib - General (de)compressor used with network play and PNG snapshot saving.

## Core Features

- Double-buffered video, enabled by default.
- Multi-threaded video blitting, allowing for a kind of software triple-buffering, and improving performance on SMP systems.
- Joystick support.
- Extremely versatile input configuration system; assign multiple physical buttons to a virtual button or action.
- Full-screen modes.
- Save states.
- Real-time game rewinding, up to 10 seconds.
- Screen snapshots, saved in PNG format.
- Loading games from gzip and (pk)zip compressed archives.
- Network play(utilizing an external dedicated server program).

- ### NES

  - ### CPU

    - All 256, official and unofficial, 2A03 opcodes emulated.

  - ### PPU

    - 8x8 and 8x16 sprites.
    - Sprite hit emulation(including checking the bg color).
    - 8 sprite limit(and flag emulation).
    - Screen/Sprite disabling, with correct color replacement.
    - Color deemphasis(probably not 100% correct, more research is needed).
    - Strip colorburst bit emulated.
    - CPU-instruction granularity for special mid-scanline effects(mostly CHR switching, such as used in "Pirates!", "Marble Madness", and "Mother").

    - #### Palettes

      Mednafen has many palette features, including loading a custom palette to replace the default NES palette. The palette from an NTSC NES can also be generated on-the-fly.

      First, a note on on the format of external palettes; Palette files are expected to contain 64 8-bit RGB triplets(each in that order; red comes first in the triplet in the file, then green, then blue). Each 8-bit value represents brightness for that particular color. 0 is minimum, 255 is maximum.

      Palettes can be set on a per-game basis. To do this, put a palette file in the "gameinfo" directory with the same base filename as the game you wish to associate with and add the extension "pal". Examples:

                          File name:              Palette file name:
                           BigBad.nes              BigBad.pal
                           BigBad.zip              BigBad.pal
                           BigBad.Better.nes       BigBad.Better.pal

      With so many ways to choose a palette, figuring out which one will be active may be difficult. Here's a list of what palettes will be used, in order from highest priority to least priority(if a condition doesn't exist for a higher priority palette, the emulator will continue down its list of palettes).

      NSF Palette(for NSFs only)
      Palette loaded from the "gameinfo" directory.
      NTSC Color Emulation(only for NTSC NES games).
      VS Unisystem palette(if the game is a VS Unisystem game and a palette is available).
      Custom global palette.
      Default NES palette.

  - ### Sound

    All 5 internal sound channels are supported(2x rectangle, triangle, noise, and DMC/PCM). Sound channels are emulated with CPU instruction granularity.

    Sound data is generated at the NES' CPU clock rate(about 1.8MHz for the NTSC NES), and then resampled to the output sample rate.

    Besides the 5 internal NES sound channels, Mednafen emulates the extra sound capabilities of the Konami VRCVI, Konami VRCVII, Namco 106, Nintendo MMC5, and the Sunsoft FME-07 chips. The extra sound channel in the Famicom Disk System is also emulated, but the support for its FM capabilities is limited.

  - ### Input

    Mednafen emulates the standard NES gamepad, the Four-Score multiplayer adapter, the Zapper, the Power Pad, and the Arkanoid controller. The Famicom version of the Arkanoid controller, the "Space Shadow" gun, the Famicom 4-player adapter, the Family Keyboard, the HyperShot controller, the Mahjong controller, the Oeka Kids tablet, the Quiz King buzzers, the Family Trainer, and the Barcode World barcode reader are also emulated.

    #### Zapper

    Most Zapper NES games expect the Zapper to be plugged into port 2. and most VS Unisystem games expect the Zapper to be plugged into port 1.

    The left mouse button is the emulated trigger button for the Zapper. The right mouse button is also emulated as the trigger, but as long as you have the right mouse button held down, no color detection will take place, which is effectively like pulling the trigger while the Zapper is pointed away from the television screen. Note that you must hold the right button down for a short time to have the desired effect.

  - ### File Formats/Expansion Hardware

    Mednafen supports the iNES, FDS(raw and with a header), UNIF, and NSF file formats. FDS ROM images in the iNES format are not supported; it would be silly to do so and storing them in that format is nonsensical.

    Mednafen supports loading ROM/disk images from some types of compressed files. Mednafen can load data from both PKZIP-format files and gzip-format files. Only the "deflate" algorithm is supported, but this is the most widely used algorithm for these formats.

    All files in a PKZIP format archive will be scanned for the followings extensions: .nes, .fds, .nsf, .unf, .nez, .unif The first archived file to have one of these extensions will be loaded. If no archived file has one of these extensions, the first archived file will be loaded.

    #### iNES Format

    The battery-backed RAM, vertical/horizontal mirroring, four-screen name table layout, and 8-bit mapper number capabilities of the iNES format are supported. The 512-byte trainer capability is also supported, but it is deprecated. Common header corruption conditions are cleaned(let's go on a DiskDude hunt), though not all conditions can be automatically detected and fixed. In addition, a few common header inaccuracies for games are also corrected(detected by CRC32 value). Note that these fixes are not written back to the storage medium.

    Support for the recent VS System bit and "number of 8kB RAM banks" is not implemented. Too many iNES headers are corrupt where this new data is stored, causing problems for those games.

    The following table lists iNES-format "mappers" supported well in Mednafen.

    Number: | Description: | Game Examples:
    --- | --- | ---
    0 | No bankswitching | Donkey Kong, Mario Bros
    1 | Nintendo MMC1 | MegaMan 2, Final Fantasy
    2 | UNROM | MegaMan, Archon, 1944
    3 | CNROM | Spy Hunter, Gradius
    4 | Nintendo MMC3 | Super Mario Bros. 3, Recca, Final Fantasy 3
    5 | Nintendo MMC5 | Castlevania 3, Just Breed, Bandit Kings of Ancient China
    6 | FFE F4 Series(hacked, bootleg) |
    7 | AOROM | Battle Toads, Time Lord
    8 | FFE F3 Series(hacked, bootleg) |
    9 | Nintendo MMC2 | Punchout!
    10 | Nintendo MMC4 | Fire Emblem, Fire Emblem Gaiden
    11 | Color Dreams | Crystal Mines, Bible Adventures
    12 | ?? | Dragon Ball Z 5 ("bootleg" original)
    13 | CPROM | Videomation
    15 | Multi-cart(bootleg) | 100-in-1: Contra Function 16
    16 | Bandai ?? | Dragon Ball Z, SD Gundam Gaiden **EEPROM is not emulated
    17 | FFE F8 Series(hacked, bootleg) |
    18 | Jaleco SS806 | Pizza Pop, Plasma Ball
    19 | Namco 106 | Splatter House, Mappy Kids
    21 | Konami VRC4 2A | WaiWai World 2, Ganbare Goemon Gaiden 2
    22 | Konami VRC4 1B | Twinbee 3
    23 | Konami VRC2B | WaiWai World, Crisis Force
    24 | Konami VRC6 | Akumajou Densetsu
    25 | Konami VRC4 | Gradius 2, Bio Miracle:Boku tte Upa
    26 | Konami VRC6 A0-A1 Swap | Esper Dream 2, Madara
    32 | IREM G-101 | Image Fight 2, Perman
    33 | Taito TC0190/TC0350 | Don Doko Don
    34 | NINA-001 and BNROM | Impossible Mission 2, Deadly Towers, Bug Honey
    41 | Caltron 6-in-1 | Caltron 6-in-1
    42 | (bootleg) | Mario Baby
    44 | Multi-cart(bootleg) | Super HiK 7 in 1
    45 | Multi-cart(bootleg) | Super 1000000 in 1
    46 | Game Station | Rumble Station
    47 | NES-QJ | Nintendo World Cup/Super Spike V-Ball
    48 | Taito TC190V | Flintstones
    49 | Multi-cart(bootleg) | Super HiK 4 in 1
    51 | Multi-cart(bootleg) | 11 in 1 Ball Games
    52 | Multi-cart(bootleg) | Mario Party 7 in 1
    64 | Tengen RAMBO 1 | Klax, Rolling Thunder, Skull and Crossbones
    65 | IREM H-3001 | Daiku no Gensan 2
    66 | GNROM | SMB/Duck Hunt
    67 | Sunsoft ?? | Fantasy Zone 2
    68 | Sunsoft ?? | After Burner 2, Nantetta Baseball
    69 | Sunsoft FME-7 | Batman: Return of the Joker, Hebereke
    70 | ?? | Kamen Rider Club
    71 | Camerica | Fire Hawk, Linus Spacehead
    72 | Jaleco ?? | Pinball Quest
    73 | Konami VRC3 | Salamander
    74 | Taiwanese MMC3 CHR ROM w/ VRAM | Super Robot Wars 2
    75 | Jaleco SS8805/Konami VRC1 | Tetsuwan Atom, King Kong 2
    76 | Namco 109 | Megami Tensei
    77 | IREM ?? | Napoleon Senki
    78 | Irem 74HC161/32 | Holy Diver
    79 | NINA-06/NINA-03 | F15 City War, Krazy Kreatures, Tiles of Fate
    80 | Taito X-005 | Minelvation Saga
    82 | Taito ?? | Kyuukyoku Harikiri Stadium - Heisei Gannen Ban
    85 | Konami VRC7 | Lagrange Point
    86 | Jaleco JF-13 | More Pro Baseball
    87 | ?? | Argus
    88 | Namco 118 | Dragon Spirit
    89 | Sunsoft ?? | Mito Koumon
    90 | ?? | Super Mario World, Mortal Kombat 3, Tekken 2
    92 | Jaleco ?? | MOERO Pro Soccer
    93 | ?? | Fantasy Zone
    94 | ?? | Senjou no Ookami
    95 | Namco 118 | Dragon Buster
    96 | Bandai ?? | Oeka Kids
    97 | ?? | Kaiketsu Yanchamaru
    99 | VS System 8KB VROM Switch | VS SMB, VS Excite Bike
    105 | NES-EVENT | Nintendo World Championships
    107 | ?? | Magic Dragon
    112 | Asder | Sango Fighter, Hwang Di
    113 | MB-91 | Deathbots
    114 | ?? | The Lion King
    115 | ?? | Yuu Yuu Hakusho Final, Thunderbolt 2, Shisen Mahjian 2
    117 | ?? | San Guo Zhi 4
    118 | MMC3-TLSROM/TKSROM Board | Ys 3, Goal! 2, NES Play Action Football
    119 | MMC3-TQROM Board | High Speed, Pin*Bot
    133 | Sachen SA72008 | Jovial Race
    134 | Sachen 74LS374N | Olympic IQ
    135 | Sachen 8259A | Super Pang
    140 | Jaleco ?? | Bio Senshi Dan
    144 | AGCI 50282 | Death Race
    150 | Camerica BF9097 | FireHawk
    151 | Konami VS System Expansion | VS The Goonies, VS Gradius
    152 | ?? | Arkanoid 2, Saint Seiya Ougon Densetsu
    153 | Bandai ?? | Famicom Jump 2
    154 | Namco ?? | Devil Man
    155 | MMC1 w/o normal WRAM disable | The Money Game, Tatakae!! Rahmen Man
    156 | ?? | Buzz and Waldog
    157 | Bandai Datach ?? | Datach DBZ, Datach SD Gundam Wars, **EEPROM is not emulated
    158 | RAMBO 1 Derivative | Alien Syndrome
    160 | (same as mapper 90) | (same as mapper 90)
    180 | ?? | Crazy Climber
    182 | ?? | Super Donkey Kong
    184 | ?? | Wing of Madoola, The
    185 | CNROM w/ CHR ROM unmapping | Banana, Mighty Bomb Jack, Spy vs Spy(Japanese)
    189 | ?? | Thunder Warrior, Street Fighter 2 (Yoko)
    193 | Mega Soft | Fighting Hero
    206 | DEIROM | Karnov
    207 | Taito ?? | Fudou Myouou Den
    208 | ?? | Street Fighter IV (by Gouder)
    209 | (mapper 90 w/ name-table control mode enabled) | Shin Samurai Spirits 2, Power Rangers III
    210 | Namco ?? | Famista '92, Famista '93, Wagyan Land 2
    215 | Bootleg multi-cart ?? | Super\ 308\ 3-in-1\
    217 | Bootleg multi-cart ?? | Golden Card 6-in-1
    222 | Bootleg ?? | Dragon Ninja
    228 | Action 52 | Action 52, Cheetahmen 2
    232 | BIC-48 | Quattro Arcade, Quattro Sports
    234 | Multi-cart ?? | Maxi-15
    240 | ?? | Gen Ke Le Zhuan, Shen Huo Le Zhuan
    241 | ?? | Journey to the West
    242 | ?? | Wai Xing Zhan Shi
    244 | ?? | Decathalon
    246 | ?? | Fong Shen Ban
    248 | ?? | Bao Qing Tian
    249 | Waixing ?? | ??
    250 | ?? | Time Diver Avenger

    #### UNIF

    Mednafen supports the following UNIF boards. The prefixes HVC-, NES-, BTL-, and BMC- are omitted, since they are currently ignored in Mednafen's UNIF loader.

    Group:
    Name: | Game Examples:
    --- | ---
    Bootleg:
    BioMiracleA | Mario Baby
    MARIO1-MALEE2 | Super Mario Bros. Malee 2
    NovelDiamond9999999in1 | Novel Diamond 999999 in 1
    Super24in1SC03 | Super 24 in 1
    Supervision16in1 | Supervision 16-in-1
    Unlicensed:
    UNL-603-5052 | Contra Fighter
    NINA-06 | F-15 City War
    Sachen-8259A | Super Cartridge Version 1
    Sachen-8259B | Silver Eagle
    Sachen-74LS374N | Auto Upturn
    SA-016-1M | Master Chu and the Drunkard Hu
    SA-72007 | Sidewinder
    SA-72008 | Jovial Race
    SA-0036 | Mahjong 16
    SA-0037 | Mahjong Trap
    TC-U01-1.5M | Challenge of the Dragon
    8237 | Pocahontas Part 2
    MMC1:
    SAROM | Dragon Warrior
    SBROM | Dance Aerobics
    SCROM | Orb 3D
    SEROM | Boulderdash
    SGROM | Defender of the Crown
    SKROM | Dungeon Magic
    SLROM | Castlevania 2
    SL1ROM | Sky Shark
    SNROM | Shingen the Ruler
    SOROM | Nobunaga's Ambition
    MMC2:
    PEEOROM | Mike Tyson's Punch Out
    PNROM | Punch Out
    MMC3:
    TFROM | Legacy of the Wizard
    TGROM | Megaman 4
    TKROM | Kirby's Adventure
    TKSROM | Ys 3
    TLROM | Super Spike V'Ball
    TLSROM | Goal! 2
    TR1ROM | Gauntlet
    TQROM | Pinbot
    TSROM | Super Mario Bros. 3
    TVROM | Rad Racer 2
    MMC5:
    EKROM | Gemfire
    ELROM | Castlevania 3
    ETROM | Nobunaga's Ambition 2
    EWROM | Romance of the Three Kingdoms 2
    MMC6:
    HKROM | Star Tropics
    FME7:
    BTR | Batman: Return of the Joker
    Nintendo Discrete Logic:
    CNROM | Gotcha
    CPROM | Videomation
    GNROM | Super Mario Bros./Duck Hunt
    MHROM |
    NROM-128 | Mario Bros.
    NROM-256 | Super Mario Bros.
    RROM-128 |
    UNROM | Megaman

    #### Famicom Disk System

    You will need the FDS BIOS ROM image in the base Mednafen directory. It must be named "disksys.rom". Mednafen will not load FDS games without this file.

    Two types of FDS disk images are supported: disk images with the FWNES-style header, and disk images with no header. The number of sides on headerless disk images is calculated by the total file size, so don't put extraneous data at the end of the file.

    If a loaded disk image is written to during emulation, Mednafen will store the modified disk image in the save games directory, which is by default "sav" under the base directory.

    #### Game Genie

    The Game Genie ROM image is loaded from the path specified by the setting "nes.ggrom", or, if that string is not set, the file "gg.rom" in the base directory when Game Genie emulation is enabled.

    The ROM image may either be the 24592 byte iNES-format image, or the 4352 byte raw ROM image.

    #### VS Unisystem

    Mednafen currently only supports VS Unisystem ROM images in the iNES format. DIP switches and coin insertion are both emulated. The following games are supported, and have palettes provided(though not necessarily 100% accurate or complete):

    Battle City
    Castlevania
    Clu Clu Land
    Dr. Mario
    Duck Hunt
    Excitebike
    Excitebike (Japanese)
    Freedom Force
    Goonies, The
    Gradius
    Gumshoe
    Hogan's Alley
    Ice Climber
    Ladies Golf
    Mach Rider
    Mach Rider (Japanese)
    Mighty Bomb Jack (Japanese)
    Ninja Jajamaru Kun (Japanese)
    Pinball
    Pinball (Japanese)
    Platoon
    RBI Baseball
    Slalom
    Soccer
    Star Luster
    Stroke and Match Golf
    Stroke and Match Golf - Ladies
    Stroke and Match Golf (Japanese)
    Super Mario Bros.
    Super Sky Kid
    Super Xevious
    Tetris
    TKO Boxing
    Top Gun

- ### Atari Lynx

  Atari Lynx emulation requires the 512 Lynx boot ROM image, named as "lynxboot.img", and placed in the Mednafen base directory.

- ### GameBoy Advance

  - Uses built-in BIOS emulation by default, or a real BIOS through the "gba.bios" setting.
  - Custom colormap support through the "gba.colormap" setting.
  - Support for specifying the backup memory type on a per-game basis:

    >     Create a file with the same name as the ROM image, with the extension replaced with "type", in the "sav" directory under the Mednafen base directory.
    >          Example: SexyPlumbers.gba -> SexyPlumbers.type

    >     One or more of the following strings(on separate lines) may appear in the file:
    >             sram
    >             flash
    >             eeprom
    >             sensor

    >     Additionally, the flash size can be specified by specifying the size(real size, or divided by 1024) after the type, like "flash 128" or "flash 131072".

- ### PC Engine/SuperGrafx

  - All sprite sizes supported.
  - 16-sprites per line limit emulated.
  - Accurate HuC6280 flags emulation.
  - Dot-clock emulation for more accurate aspect ratios.
  - Very accurate and tonally-correct(thanks to Blip_Synth) PSG emulation.
  - Support for Street Fighter 2's HuCard hardware.
  - Support for Populous's backup RAM.
  - 6-button pad emulation.
  - Mouse emulation.

- ### PC-FX

- Internal backup memory and external backup memory are emulated.
- Motion decoder RLE and JPEG-like modes are emulated.
- KING Background 0 scaling+rotation mode is supported.
- Mouse emulation.

### Automatic IPS Patching

Place the IPS file in the same directory as the file to load, and name it filename.ips.

            Examples:       Boat.nes - Boat.nes.ips
                            Boat.zip - Boat.zip.ips
                            Boat.nes.gz - Boat.nes.gz.ips
                            Boat     - Boat.ips

Some operating systems and environments will hide file extensions. Keep this in mind if you are having trouble.

Patching is supported for all supported formats, but it will probably only be useful for fixed-position file formats.

### CD-ROM Emulation

With PC Engine CD and PC-FX emulation, Mednafen can load CD-ROM games from a physical CD-ROM, or a ripped/dumped copy of the disc, such as CUE+BIN. Using a ripped copy of the disc is recommended, due to speed issues and to the fact that physical CDs will be missing pregaps from the point of view of the emulated system.

For ripped disc images, Mednafen supports "CUE" sheets and cdrdao "TOC" files. Mednafen supports raw, simple storage formats supported by libsndfile(MS WAV, AIFF/AIFC, AU/SND, etc.), Ogg Vorbis, and MusePack audio files referenced by CUE sheets. MP3 is not supported, and will not be supported.

The cdrdao "TOC" support in Mednafen includes support for "RW_RAW" subchannel data, needed for CD+G. Note that Mednafen assumes that the Q subchannel is also included in the RW_RAW data area in the ripped image(even though the name "RW_RAW" would suggest it isn't present, cdrdao seems to included it). If the Q subchannel data is missing from the RW_RAW data area in the ripped image, Mednafen's CD emulation will not work properly.

Since 0.8.4, Mednafen will perform simple data correction on ripped CDROM images that contain EDC and L-EC data(2352-byte-per-sector "raw" rips"). It calculates the real EDC, and if it doesn't match the EDC recorded for that sector, it will evaluate the L-EC data to repair the data. If the data is unrepairable, an error message will be displayed.
This may cause problems with naive patches that don't update the error-correction data(at least the 32-bit EDC, if that's correct, the L-EC data will be ignored)! If you wish to use such an invalid patch, set the setting "cdrom.lec_eval" to 0.

## Using Mednafen

### Key Assignments

Key(s): | Action: | Configuration String:
--- | --- | ---
F1 | Toggle in-game quick help screen. | toggle_help
F5 | Save state. | save_state
F7 | Load state. | load_state
0-9 | Select save state slot. | "0" through "9"
- | Decrement selected save state slot. | state_slot_dec
= | Increment selected save state slot. | state_slot_inc
Shift + F5 | Record movie. | save_movie
Shift + F7 | Play movie. | load_movie
Shift + 0-9 | Select movie slot. | "m0" through "m9"
ALT + C | Toggle cheat console. | togglecheatview
ALT + T | Toggle cheats active. | togglecheatactive
T | Enable network play console input. | togglenetview
ALT + D | Toggle debugger. | toggle_debugger
ALT + A | Enter frame advance mode, if not already in it, and advance the frame. | advance_frame
ALT + R | Exit frame advance mode. | run_normal
SHIFT + F1 | Toggle frames-per-second display(from top to bottom, the display format is: virtual, rendered, blitted). | toggle_fps_view
ALT + S | Toggle 600-frame(~10 seconds on NES) save-state rewinding functionality, disabled by default. | state_rewind_toggle
Backspace | Rewind emulation, if save-state rewinding functionality is enabled, up to 600 frames. | state_rewind
F9 | Save screen snapshot. | take_snapshot
Alt + Enter | Toggle fullscreen mode. | toggle_fs
Ctrl + 1 through Ctrl + 9 | Toggle layer. | "tl1" through "tl9"
~ | Fast-forward. | fast_forward
CTRL + SHIFT + i | Select input device on input port i(1-5). Note:Many games do not expect input devices to change while the game is running, and thus may require a hard reset. | device_selecti
F2 | Activate in-game input configuration process for a command key. | input_configc
Scroll Lock | Toggle input grabbing(use this to use the PC Engine mouse properly in windowed mode). | toggle_grab_input
Shift + Scroll Lock | Toggle input grabbing AND command disabling(used for giving almost unhindered button access to an emulated device; most useful when emulating the Famicom's Family Keyboard). | toggle_cdisable
F10 | Reset. | reset
F11 | Hard reset(toggle power switch). | power
Escape/F12 | Exit(the emulator, or netplay chat mode). | exit

#### NES

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for input port 1. | input_config1
ALT + SHIFT + 2 | Activate in-game input configuration process for input port 2. | input_config2
ALT + SHIFT + 3 | Activate in-game input configuration process for input port 3. | input_config3
ALT + SHIFT + 4 | Activate in-game input configuration process for input port 4. | input_config4
ALT + SHIFT + 5 | Activate in-game input configuration process for the Famicom expansion port. | input_config5

#### VS Unisystem

Key: | Action: | Configuration String:
--- | --- | ---
F8 | Insert coin. | insert_coin
F6 | Show/Hide dip switches. | toggle_dipview
1-8 | Toggle dip switches(when dip switches are shown). | "1" through "8"

#### Famicom Disk System

Key: | Action: | Configuration String:
--- | --- | ---
F6 | Select disk and disk side. | select_disk
F8 | Eject or Insert disk. | insert_eject_disk

#### Barcode Readers

Key: | Action: | Configuration String:
--- | --- | ---
0-9 | Barcode digits(after activating barcode input). | "0" through "9"
F8 | Activate barcode input/scan barcode. | activate_barcode

#### Game Pad

Key: | Button on Emulated Gamepad:
--- | ---
Keypad 2 | B
Keypad 3 | A
Enter/Return | Start
Tab | Select
Z | Down
W | Up
A | Left
S | Right

#### Power Pad

Side B
O | P | [ | ]
K | L | ; | '
M | , | . | /

Side A
| P | [ |
K | L | ; | '
| , | . |

#### Family Keyboard

All emulated keys are mapped to the closest open key on the PC keyboard, with a few exceptions. The emulated "@" key is mapped to the "`"(grave) key, and the emulated "kana" key is mapped to the "Insert" key(in the 3x2 key block above the cursor keys).

To use the Family Keyboard emulation properly, press SHIFT + Scroll Lock, which will cause input to be grabbed from the window manager(if present) and disable Mednafen's other internal command processing.

#### HyperShot Controller

| Run | Jump
Controller I | Q | W
Controller II | E | R

#### Mahjong Controller

Emulated Mahjong Controller: | A | B | C | D | E | F | G | H | I | J | K | L | M | N
PC Keyboard: | Q | W | E | R | T | A | S | D | F | G | H | J | K | L

Emulated Mahjong Controller: | SEL | ST | ? | ? | ? | ? | ?
PC Keyboard: | Z | X | C | V | B | N | M

#### Quiz King Controller

Emulated Buzzer: | 1 | 2 | 3 | 4 | 5 | 6
PC Keyboard: | Q | W | E | R | T | Y

#### Atari Lynx

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for Lynx pad. | input_config1
F8 | Rotate the screen(and optionally input controlled, by setting lynx.rotateinput) | rotatescreen

Key: | Action/Button:
--- | ---
Keypad 2 | B
Keypad 3 | A
Keypad 4 & Enter/Return | Pause
Keypad 7 | Option 1
Keypad 1 | Option 2
W | Up
Z | Down
A | Left
S | Right

#### GameBoy/GameBoy Color/GameBoy Advance

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for GameBoy pad. | input_config1

Key: | Action/Button:
--- | ---
Keypad 2 | B
Keypad 3 | A
Enter/Return | Start
Tab | Select
Keypad 5 | Shoulder Left(GBA only)
Keypad 6 | Shoulder Right(GBA only)
W | Up
Z | Down
A | Left
S | Right

#### Neo Geo Pocket/Neo Geo Pocket Color

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for Neo Geo Pocket pad. | input_config1

Key: | Action/Button:
--- | ---
Keypad 2 | A
Keypad 3 | B
Enter/Return | Option
W | Up
Z | Down
A | Left
S | Right

#### PC Engine(TurboGrafx 16)/SuperGrafx

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for gamepad 1. | input_config1
ALT + SHIFT + 2 | Activate in-game input configuration process for gamepad 2. | input_config2
ALT + SHIFT + 3 | Activate in-game input configuration process for gamepad 3. | input_config3
ALT + SHIFT + 4 | Activate in-game input configuration process for gamepad 4. | input_config4
ALT + SHIFT + 5 | Activate in-game input configuration process for gamepad 5. | input_config5

Key: | Action/Button:
--- | ---
Keypad 2 | II
Keypad 3 | I
Enter/Return | Run
Tab | Select
W | Up
Z | Down
A | Left
S | Right

#### PC-FX

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for device on virtual inport port 1. | input_config1
ALT + SHIFT + 2 | Activate in-game input configuration process for device on virtual inport port 2. | input_config2

Key: | Action/Button:
--- | ---
Keypad 4 | IV
Keypad 5 | V
Keypad 6 | VI
Keypad 1 | III
Keypad 2 | II
Keypad 3 | I
Enter/Return | Run
Tab | Select
W | Up
Z | Down
A | Left
S | Right

#### WonderSwan

The "X Cursor" buttons are usually used for directional control with horizontal-layout games, while the "Y Cursor" buttons are usually used for directional control with vertical-layout games. Additionally, the opposite buttons are often treated as action buttons...because of this, you must *NOT* configure the X cursor buttons and Y cursor buttons to the same real buttons or keys. Games will not behave well at all if you do.

Key(s): | Action: | Configuration String:
--- | --- | ---
ALT + SHIFT + 1 | Activate in-game input configuration process for WonderSwan pad. | input_config1
F8 | Rotate the screen(and optionally input controlled, by setting wswan.rotateinput) | rotatescreen

Key: | Action/Button:
--- | ---
Keypad 2 | B
Keypad 3 | A
Enter/Return | Start
W | Up, X Cursors
Z | Down, X Cursors
A | Left, X Cursors
S | Right, X Cursors
UP | Up, Y Cursors
DOWN | Down, Y Cursors
LEFT | Left, Y Cursors
RIGHT | Right, Y Cursors

### Command-line

Mednafen supports arguments passed on the command line. Arguments are taken in the form of "-parameter value". Some arguments are valueless. Arguments that have both a parameter and a value will be saved in the configuration file.

Caution: Any arguments that change emulation behavior as seen from the emulated game are shown with bold text in the table. One should be conscious of these settings if one has changed them from the default values when using network play or movies, as they can cause desychronizations if not set the same among hosts(or between the recording emulator and the playing emulator).

Arguments listed in this table that contain <system> should have that string replaced with "nes", "pce", "pcfx", "gb", "gba", "lynx", "ngp", "wswan", or "player"(used with music file playing).
Example: <system>.xscale becomes nes.xscale.

Argument: | Value Type: | Default value: | Description:
--- | --- | --- | ---
-loadcd x | string | n/a | Load and boot a CD for system "x"(only "pce" is valid). This argument modifies the usage of the filename component of the command-line. For example, "mednafen -loadcd pce /somewhere/over/the/rainbow/game.cue" will load the CUE sheet as the emulated CDROM. "mednafen -loadcd pce" will load from the default physical CDROM device.
-autosave x | boolean | 0 | Automatically save the game state when a game is closed and reload the state when the game is loaded again.
-srwcompressor x | string | minilzo | Compressor to use with state rewinding: "minilzo", "quicklz", or "blz".
-srwframes x | integer | 600 | Number of frames to keep states for when state rewinding is enabled.
-dfmd5 x | boolean | 1 | Include the MD5 hash of the loaded game in the filenames of the data file(save states, SRAM backups) Mednafen creates.
-snapname x | boolean | 0 | If value is true, use an alternate naming scheme(file base and numeric) for screen snapshots.
-path_snap x | string |  | Path override for screen snapshots. Set to an empty string or 0 to disable.
-path_sav x | string |  | Path override for save games and nonvolatile memory. Set to an empty string or 0 to disable. WARNING: If you use Famicom Disk System emulation, and you set this setting to the same directory FDS disk images are in, and set the setting "dfmd5" to 0, you run the risk of corrupting your disk images.
-path_state x | string |  | Path override for save states. Set to an empty string or 0 to disable.
-path_movie x | string |  | Path override for movies. Set to an empty string or 0 to disable.
-path_cheat x | string |  | Path override for cheats. Set to an empty string or 0 to disable.
-path_palette x | string |  | Path override for custom palettes. Set to an empty string or 0 to disable.
-filesys.snap_samedir x | boolean | 0 | Write screen snapshots to the same directory the ROM/disk/disc image is in. Takes precedence over the "path_snap" setting.
-filesys.sav_samedir x | boolean | 0 | Write/Read save games and nonvolatile memory to/from the same directory the ROM/disk/disc image is in. Takes precedence over the "path_sav" setting. WARNING: If you use Famicom Disk System emulation, and you set this to 1, and set the setting "dfmd5" to 0, you run the risk of corrupting your disk images.
-filesys.state_samedir x | boolean | 0 | Write/Read save states to/from the same directory the ROM/disk/disc image is in. Takes precedence over the "path_state" setting.
-filesys.movie_samedir x | boolean | 0 | Write/Read movies to/from the same directory the ROM/disk/disc image is in. Takes precedence over the "path_movie" setting.
-filesys.disablesavegz x | boolean | 0 | Disable gzip compression when saving save states and backup memory(excluding GameBoy).
-ffspeed x | integer | 2 | Specifies the speed multiplier to be used in fast-forward mode.
-fftoggle x | boolean | 0 | Treat the fast-forward button as a toggle.
-ffnosound | boolean | 0 | Silence sound output when fast-forwarding.
-nothrottle x | boolean | 0 | If value is true, disable the speed throttling that is used when sound emulation is disabled.
-sound x | boolean | 1 | If value is true, enable sound emulation and output.
-soundrate x | integer | 48000 | Specifies the sound playback rate, in frames per second("Hz"). Rates higher than 48000, and lower than 8192, are not supported.
-soundvol x | integer | 100 | Sound volume, in percent, from 0 to 100.
-soundbufsize x | integer | 32(52 for Win32) | Specifies the desired size of the sound buffer, in milliseconds.
-sound.period_time x | integer | 0 | If non-zero, specifies the desired period size in microseconds. Currently only affects OSS and ALSA output. A value of 0 defers to the default in the driver code in SexyAL.
-sounddriver x | string | default | Select sound driver. The following choices are possible, sorted by preference when "default" driver is used, but dependent on being compiled in: alsa ALSA A recommended driver, and the default for Linux(if available). oss Open Sound System A recommended driver, and the default for non-Linux UN*X/POSIX/BSD systems, or anywhere ALSA is unavailable. If the ALSA driver gives you problems, you can try using this one instead. dsound DirectSound(of DirectX) A recommended driver, and the default for Microsoft Windows. sdl Simple Directmedia Layer This driver is not recommended, but it serves as a backup driver if the others aren't available. Its performance is generally sub-par, requiring higher latency or faster CPUs/SMP for glitch-free playback, except where the OS provides a sound callback API itself, such as with Mac OS X and BeOS. jack Somewhat experimental driver, unusably buggy until Mednafen 0.8.C. The "soundbufsize" setting controls the size of the local sound buffer, not the server's sound buffer, and the latency reported during startup is for the local sound buffer only. Please note that video card drivers(in the kernel or X), and hardware-accelerated OpenGL, may interfere with jackd's ability to effectively run with realtime response.
-sounddevice x | string | default | Select sound output device. ALSA NOTE: When using the alsa driver, the "default" translates to "hw", not "default", before being sent to the ALSA API. This is necessary because ALSA's "default" audio device has very poor buffering control capabilities. If you really want to use ALSA's "default" device, use "sexyal-literal-default".
-<system(pce, gba, gb, ngp only)>.forcemono x | boolean | 0 | Force monophonic(instead of stereo) sound output.
-autofirefreq x | integer | 3 | Set auto fire frequency to ~60Hz / (x + 1). Replace "60" with "50" for PAL games. A value of "0" disables the configured autofire buttons.
-analogthreshold x | integer | 75 | Threshold for detecting a "button" press on analog axis, in percent.
-ckdelay x | integer | 0 | The length of time, in milliseconds, that a button/key corresponding to a "dangerous" command like power, reset, exit, load state, etc. must be pressed before the command is executed.
Game Boy Advance:
-gba.bios | string |  | Path to optional GBA BIOS ROM image(it will automatically be used when this setting is set).
-gba.colormap | string |  | Load custom color map from specified file.
Lynx:
-lynx.rotateinput x | boolean | 1 | "Rotate" emulated D-pad along with the screen when rotated.
Neo Geo Pocket:
-ngp.language | integer | 1 | If =1, tell games to display in English, if =0, in Japanese.
NES:
-nes.fnscan x | boolean | 1 | If value is true, scan the NES ROM image filename for (U), (J), and (E), and set the emulated video system(NTSC/PAL) accordingly, with NTSC preferred. Warning:This option may break NES network play when enabled IF the players are using ROM images with different filenames.
-nes.input.porti x | string | gamepad | Select input device for input port i(1-4). Valid strings are "none" and "gamepad"; "zapper", "powerpada", and "powerpadb" can be used on ports 1 and 2, as well.
-nes.input.fcexp x | string | none | Select Famicom expansion port device. Valid strings are "none", "shadow", "arkanoid", "4player", and "fkb".
-nes.nofs x | boolean | 0 | If value is true, disable four-score emulation.
-nes.gg x | boolean | 0 | Enable NES Game Genie emulation.
-nes.ggrom x | string |  | Path to Game Genie ROM image.
-nes.n106bs x | boolean | 0 | Enable less-accurate, but better sounding, Namco 106(mapper 19) sound emulation.
-nes.no8lim x | boolean | 0 | No 8-sprites-per-scanline limit option.
-nes.cpalette x | string | 0 | Load a custom global NES palette from file "x". To stop using a custom palette: mednafen -cpalette "" game.nes
-nes.ntscblitter x | boolean | 0 | Enable NTSC color generation and blitter(only used when NTSC games are played). NOTE:If your refresh rate isn't very close to 60.1Hz(+-0.1), you will need to set the nes.ntsc.mergefields setting to "1" to avoid excessive flickering.
-nes.ntsc.preset x | string | none | Select video quality/type preset. Valid strings are: none, composite, svideo, rgb, and monochrome.
-nes.ntsc.mergefields x | boolean | 0 | Merge fields to partially work around !=60.1Hz refresh rates.
-nes.ntsc.saturation x | real | 0 | NTSC composite blitter saturation, -1 <= x <= 1.
-nes.ntsc.hue x | real | 0 | NTSC composite blitter hue, -1 <= x <= 1.
-nes.ntsc.sharpness x | real | 0 | NTSC composite blitter sharpness, -1 <= x <= 1.
-nes.ntsc.brightness x | real | 0 | NTSC composite blitter brightness, -1 <= x <= 1.
-nes.ntsc.contrast x | real | 0 | NTSC composite blitter contrast, -1 <= x <= 1.
-nes.ntsc.matrix x | boolean | 0 | Enable NTSC custom decoder matrix.
-nes.ntsc.matrix.0 x | real | 1.539 | NTSC custom decoder matrix element 0(red, value * V).
-nes.ntsc.matrix.1 x | real | -0.622 | NTSC custom decoder matrix element 1(red, value * U).
-nes.ntsc.matrix.2 x | real | -0.571 | NTSC custom decoder matrix element 2(green, value * V).
-nes.ntsc.matrix.3 x | real | -0.185 | NTSC custom decoder matrix element 3(green, value * U).
-nes.ntsc.matrix.4 x | real | 0.000 | NTSC custom decoder matrix element 4(blue, value * V).
-nes.ntsc.matrix.5 x | real | 2.000 | NTSC custom decoder matrix element 5(blue, value * U.
-nes.pal x | boolean | 0 | If value is true, emulate a PAL NES. Otherwise emulate an NTSC NES.
-nes.clipsides x | boolean | 0 | If value is true, clip leftmost and rightmost 8 columns of pixels of the video output.
-nes.slstart x | integer | 8 | First scanline to be rendered in NTSC emulation mode(when PAL emulation is disabled).
-nes.slend x | integer | 231 | Last scanline to be rendered in NTSC emulation mode.
-nes.slstartp x | integer | 0 | First scanline to be rendered in PAL emulation mode.
-nes.slendp x | integer | 239 | Last scanline to be rendered in PAL emulation mode.
PC Engine/TurboGrafx 16:
-pce.adpcmlp x | boolean | 0 | When enabled, Mednafen will apply a lowpass filter to ADPCM sound output with a rolloff frequency dependent on the current ADPCM playback frequency. This makes ADPCM voices sound less "harsh", however, the downside is that it will cause many ADPCM sound effects to sound a bit muffled.
-pce.cdpsgvolume x | integer | 100 | PSG volume when playing a CD game, 0-200(%)
-pce.cddavolume x | integer | 100 | CD-DA volume, 0-200(%).
-pce.adpcmvolume x | integer | 100 | ADPCM volume, 0-200(%).
-pce.forcesgx x | boolean | 0 | Force SuperGrafx emulation. Enabling this option is not necessary to run unrecognized PCE ROM images in SuperGrafx mode, and enabling it is discouraged; ROM images with a file extension of ".sgx" will automatically enable SuperGrafx emulation.
-pce.arcadecard x | boolean | 1 | Enable Arcade Card emulation. Leaving this option enabled is recommended, unless you want to see special warning screens on ACD games, or you prefer the non-enhanced modes of ACD-enhanced SCD games. Additionally, you may want to disable it you you wish to use state rewinding with a SCD ACD-enhanced game on a slow CPU, as the extra 2MiB of RAM the Arcade Card offers is difficult to compress in real-time.
-pce.ocmultiplier x | integer | 1 | CPU overclock multiplier. WARNING: This changes low-level emulation behavior in a way that is not possible on a real machine, so don't be surprised if a few games won't work or have glitches with a setting other than 1!
-pce.cdspeed x | integer | 1 | CD-ROM data transfer speed multiplier. WARNING: pce.ocmultiplier should be set to a value greater than or equal to pce.cdspeed, as the PCE's BIOS routines are not designed for higher transfer rates than in a real PC Engine. Also, don't expect games with HuVideo to work properly if you set this to a value other than 1!
-pce.nospritelimit x | boolean | 0 | No 16-sprites-per-scanline limit option. WARNING: This option may cause undesirable graphics glitching on some games(such as "Bloody Wolf").
-pce.colormap | string |  | Load custom color map from specified file. The colormap consists of either 512 or 1024 RGB triplets, 8-bits per color component, in the order R,G,B,R,G,B,R,G,B,... . It is recommended that the colormap provide all 1024 entries(the first 512 entries are for normal mode, the second 512 entries are for grayscale/strip-colorburst mode). If it doesn't, Mednafen will calculate the grayscale colors using a formula similar to that used with the real VCE, but with more precision. The colormap may be disabled by setting the "pce.colormap" setting to an empty string, or 0.
-pce.cdbios x | string |  | Path to the CD BIOS
-pce.mouse_sensitivity x | real | 0.50 | Set emulated mouse sensitivity.
-pce.disable_softreset x | boolean | 0 | If set, when RUN+SEL are pressed simultaneously, disable both buttons temporarily.
PC-FX:
-pcfx.bios x | string |  | Path to the ROM BIOS
-pcfx.cdspeed x | integer | 2 | Emulated CDROM speed. Setting this to "1" will probably cause most games with FMV to break, but setting it higher than 2, the default, will decrease loading times in most games by some degree. The maximum allowed value is "10".
-pcfx.high_dotclock_width x | integer | 1024 | Emulated width for 7.16MHz dot-clock mode: 256, 341, or 1024. Lower values are faster, but will cause some degree of pixel distortion.
-pcfx.input.port1 x | string | gamepad | Select input device for input port 1(none, gamepad, mouse).
-pcfx.input.port2 x | string | gamepad | Select input device for input port 2(none, gamepad, mouse).
-pcfx.mouse_sensitivity x | real | 1.50 | Set emulated mouse sensitivity.
-pcfx.nospritelimit x | boolean | 0 | No 16-sprites-per-scanline(per VDC) limit option.
-pcfx.disable_softreset x | boolean | 0 | If set, when RUN+SEL are pressed simultaneously, disable both buttons temporarily.
-pcfx.use_mmap x | boolean | 0 | Enables experimental a virtual 32-bit address space generation via anonymous mmap(). This generally will not work on 32-bit CPUs; 64-bit CPUs(with 64-bit virtual address spaces) will work. This virtual address space is used to speed up emulated V810 instruction reads. There is some memory-mapped I/O in the V810 memory space, and if a game tries to run code from this I/O space, it obviously won't work. However, no commercial PC-FX games are known to do this. This requires working mmap() and munmap() function calls, and the MAP_ANON/MAP_ANONYMOUS flag, or a readable and writeable /dev/zero. It works well on Linux, and should work on *BSD.
WonderSwan:
-wswan.rotateinput x | boolean | 0 | "Rotate" emulated D-pads along with the screen when rotated.
-wswan.name x | string | Mednafen | Name
-wswan.byear x | integer | 1989 | Birth Year
-wswan.bmonth x | integer | 6 | Birth Month
-wswan.bday x | integer | 23 | Birth Day
-wswan.sex x | string | F | Sex
-wswan.blood x | string | O | Blood Type
Argument: | Value Type: | Default value: | Description:
-connect |  |  | Trigger to connect to remote host after the game is loaded.
-nethost x | string |  | Set server's hostname to connect to during netplay.
-netport x | integer | 4046 | Set port number to connect to on remote host.
-netpassword x | string |  | The optional password used to connect to a netplay server.
-netlocalplayers x | integer | 1 | Set the number of local players on your system during netplay.
-netnick x | string |  | Set nickname used during chat when using netplay.
-osd.state_display_time | integer | 2000 | The length of time, in milliseconds, to display the save state or the movie selector after selecting a state or movie.
-vdriver x | string | opengl | Select which video output "driver" to use. opengl = OpenGL + SDL sdl = SDL framebuffer
-<system>.vblur x | boolean | 0 | Motion blur each frame with the last frame. This blur happens before all other filters and scaling. Additionally, enabling this will disable internal frameskipping.
-<system>.vblur.accum x | boolean | 0 | Accumulate color data rather than discarding it.
-<system>.vblur.accum.amount x | real | 50 | Blur amount in accumulation mode, specified in percentage of accumulation buffer to mix with the current frame.
Bilinear interpolation, and alpha blending of some OSD layers are not available with the "SDL framebuffer" driver.
-<system>.videoip x | boolean | 0 PCE: 1 | Use bilinear interpolation.
-<system>.scanlines x | integer | 0 | If non-zero, enable scanlines; scanline_brightness = 100% - (100% / x)
-<system>.special x | string | none | Use a special video scaling filter applied before OpenGL rasterization. The destination rectangle is NOT altered by this setting, so if you have xscale and yscale set to "2", and try to use a 3x scaling filter like hq3x, the image is not going to look that great. The nearest-neighbor scalers are intended for use with bilinear interpolation enabled, at high resolutions(such as 1280x1024; nn2x(or nny2x) + bilinear interpolation + fullscreen stretching at this resolution looks quite nice). none or 0 (disable special scaler) hq2x hq3x hq4x scale2x scale3x scale4x nn2x (Nearest-neighbor 2x) nn3x (Nearest-neighbor 3x) nn4x (Nearest-neighbor 4x) nny2x (Nearest-neighbor 2x, y axis only) nny3x (Nearest-neighbor 3x, y axis only) nny4x (Nearest-neighbor 4x, y axis only)
-<system>.pixshader x | string | none | Enable specified OpenGL pixel shader. Obviously, this will only work in OpenGL mode(-vdriver 0), and only on cards and OpenGL implementations that support pixel shaders, otherwise you will get a black screen, or Mednafen may display an error message when starting up. Bilinear interpolation is disabled with pixel shaders, and any interpolation, if present, will be noted in the description of each pixel shader. none (disable pixel shader) ipxnoty Linear interpolation on X axis only. ipynotx Linear interpolation on Y axis only. ipsharper Sharper bilinear interpolation. ipxnotysharper Sharper version of "ipxnoty". ipynotxsharper Sharper version of "ipynotx". scale2x Scale2X effect. It can be used with the "scale2x", "scale3x", and "scale4x" special scalers, giving "scale4x", "scale6x", and "scale8x", respectively.
-<system>.stretch x | boolean | 0 | Stretch to fill screen when in fullscreen mode.
-glvsync x | boolean | 1 | Attempt to synchronize OpenGL page flips to vertical retrace period. Note: Additionally, if this setting is 1, and the environment variable "__GL_SYNC_TO_VBLANK" is not set at all(either 0 or any value), then it will be set to "1". This has the effect of forcing vblank synchronization when running under Linux with NVidia's drivers.
-<system>.xscale (-<system>.xscalefs) / -<system>.yscale (-<system>.yscalefs) | real | NES: 2(2)/2(2) GB: 4(4)/4(4) GBA: 3(3)/3(3) Lynx: 4(4)/4(4) NGP: 4(3)/4(3) PCE: 3(3)/3(3) PC-FX: 3(3)/3(3) WSwan: 3(2)/3(2) | Specify the scaling factor for each axis.
-<system>.xres x / -<system>.yres y | integer | NES: 640/480 GB: 800/600 GBA: 800/600 Lynx: 800/600 NGP: 640/480 PCE: 1024/768 PC-FX: 1024/768 WSwan: 640/480 | Set the desired horizontal/vertical resolution when in fullscreen mode.
-fs | boolean | 0 | Full screen mode.

## Game-specific Emulation Hacks

Title: | Description: | Source code files affected:
--- | --- | ---
NES:
KickMaster | KickMaster relies on the low-level behavior of the MMC3(PPU A12 low->high transition) to work properly in certain parts. If an IRQ begins at the "normal" time on the last visible scanline(239), the game will crash after beating the second boss and retrieving the item. The hack is simple, to clock the IRQ counter twice on scanline 238. | src/nes/boards/mmc3.cpp
Shougi Meikan '92 Shougin Meikan '93 | The hack for these games is identical to the hack for KickMaster. | src/nes/boards/mmc3.cpp
Star Wars (PAL/European Version) | This game probably has the same(or similar) problem on Mednafen as KickMaster. The hack is to clock the IRQ counter twice on the "dummy" scanline(scanline before the first visible scanline). | src/nes/boards/mmc3.c
Neo Geo Pocket:
Metal Slug - 2nd Mission | Patch to work around lack of one of the side effects of a real BIOS(to be fixed in a future version of Mednafen). | src/ngp/rom.cpp
Puyo Pop |  | src/ngp/rom.cpp
WonderSwan:
Detective Conan | Patch to work around lack of pipeline/prefetch emulation. | src/wswan/main.cpp

## Credits

Name: | Contribution(s):
--- | ---
\Firebug\ | High-level mapper information.
Andrea Mazzoleni | Scale2x/Scale3x scalers included in Mednafen.
Bero | Original FCE source code.
Brad Taylor | NES sound information.
Charles MacDonald | PC Engine technical information.
EFX | Testing.
Fredrik Olson | NES four-player adapter information.
Gilles Vollant | PKZIP file loading functions.
goroh | Various documents.
Info-ZIP | ZLIB
Jeremy Chadwick | General NES information.
kevtris | Low-level NES information and sound information.
Ki | Various technical information.
Mark Knibbs | Various NES information.
Marat Fayzullin | General NES information.
Matthew Conte | Sound information.
Maxim Stepin | hq2x and hq3x scalers included in Mednafen.
Mitsutaka | YM2413 emulator.
nori | FDS sound information.
rahga | Famicom four-player adapter information.
TheRedEye | ROM images, testing.
Xodnizel | FCE Ultra.
...and everyone whose name my mind has misplaced.

## Legal Stuff

libmpcdec:

>       Copyright (c) 2005, The Musepack Development Team
>       All rights reserved.

>       Redistribution and use in source and binary forms, with or without
>       modification, are permitted provided that the following conditions are
>       met:

>       * Redistributions of source code must retain the above copyright
>       notice, this list of conditions and the following disclaimer.

>       * Redistributions in binary form must reproduce the above
>       copyright notice, this list of conditions and the following
>       disclaimer in the documentation and/or other materials provided
>       with the distribution.

>       * Neither the name of the The Musepack Development Team nor the
>       names of its contributors may be used to endorse or promote
>       products derived from this software without specific prior
>       written permission.

>       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>       "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
>       LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
>       A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
>       OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>       SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>       LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>       THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>       OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Tremor:

>     Copyright (c) 2002, Xiph.org Foundation

>     Redistribution and use in source and binary forms, with or without
>     modification, are permitted provided that the following conditions
>     are met:

>     - Redistributions of source code must retain the above copyright
>     notice, this list of conditions and the following disclaimer.

>     - Redistributions in binary form must reproduce the above copyright
>     notice, this list of conditions and the following disclaimer in the
>     documentation and/or other materials provided with the distribution.

>     - Neither the name of the Xiph.org Foundation nor the names of its
>     contributors may be used to endorse or promote products derived from
>     this software without specific prior written permission.

>     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>     ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
>     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
>     A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION
>     OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Gb_Snd_Emu:

>     /* Library Copyright (C) 2003-2004 Shay Green. Gb_Snd_Emu is free
>     software; you can redistribute it and/or modify it under the terms of the
>     GNU General Public License as published by the Free Software Foundation;
>     either version 2 of the License, or (at your option) any later version.
>     Gb_Snd_Emu is distributed in the hope that it will be useful, but WITHOUT
>     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>     FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
>     more details. You should have received a copy of the GNU General Public
>     License along with Gb_Snd_Emu; if not, write to the Free Software
>     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

Blip_Buffer:

>     Copyright (C) 2003-2006 Shay Green. This module is free software; you
>     can redistribute it and/or modify it under the terms of the GNU Lesser
>     General Public License as published by the Free Software Foundation; either
>     version 2.1 of the License, or (at your option) any later version. This
>     module is distributed in the hope that it will be useful, but WITHOUT ANY
>     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
>     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
>     more details. You should have received a copy of the GNU Lesser General
>     Public License along with this module; if not, write to the Free Software
>     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Sms_Snd_Emu(base for T6W28_Apu NGP code):

>     Copyright (C) 2003-2006 Shay Green. This module is free software; you
>     can redistribute it and/or modify it under the terms of the GNU Lesser
>     General Public License as published by the Free Software Foundation; either
>     version 2.1 of the License, or (at your option) any later version. This
>     module is distributed in the hope that it will be useful, but WITHOUT ANY
>     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
>     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
>     more details. You should have received a copy of the GNU Lesser General
>     Public License along with this module; if not, write to the Free Software
>     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Handy:

>     Copyright (c) 2004 K. Wilkins

>     This software is provided 'as-is', without any express or implied warranty.
>     In no event will the authors be held liable for any damages arising from
>     the use of this software.

>     Permission is granted to anyone to use this software for any purpose,
>     including commercial applications, and to alter it and redistribute it
>     freely, subject to the following restrictions:

>     1. The origin of this software must not be misrepresented; you must not
>        claim that you wrote the original software. If you use this software
>        in a product, an acknowledgment in the product documentation would be
>        appreciated but is not required.

>     2. Altered source versions must be plainly marked as such, and must not
>        be misrepresented as being the original software.

>     3. This notice may not be removed or altered from any source distribution.

Portions of PC Engine CD emulation:

>             Copyright (C) 2004 Ki

>         This program is free software; you can redistribute it and/or modify
>         it under the terms of the GNU General Public License as published by
>         the Free Software Foundation; either version 2 of the License, or
>         (at your option) any later version.

>         This program is distributed in the hope that it will be useful,
>         but WITHOUT ANY WARRANTY; without even the implied warranty of
>         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>         GNU General Public License for more details.

OKI MSM6258 ADPCM Decoder:

>     /*
>      * Copyright (c) 2001 Tetsuya Isaki. All rights reserved.
>      *
>      * Redistribution and use in source and binary forms, with or without
>      * modification, are permitted provided that the following conditions
>      * are met:
>      * 1. Redistributions of source code must retain the above copyright
>      *    notice, this list of conditions and the following disclaimer.
>      * 2. Redistributions in binary form must reproduce the above copyright
>      *    notice, this list of conditions and the following disclaimer in the
>      *    documentation and/or other materials provided with the distribution.
>      * 3. The name of the author may not be used to endorse or promote products
>      *    derived from this software without specific prior written permission
>      *
>      * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
>      * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>      * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
>      * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
>      * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
>      * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
>      * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
>      * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
>      * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
>      * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>      * SUCH DAMAGE.
>      */

Scale2x:

>      * Copyright (C) 2001, 2002, 2003, 2004 Andrea Mazzoleni
>      *
>      * This program is free software; you can redistribute it and/or modify
>      * it under the terms of the GNU General Public License as published by
>      * the Free Software Foundation; either version 2 of the License, or
>      * (at your option) any later version.
>      *
>      * This program is distributed in the hope that it will be useful,
>      * but WITHOUT ANY WARRANTY; without even the implied warranty of
>      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>      * GNU General Public License for more details.
>      *
>      * You should have received a copy of the GNU General Public License
>      * along with this program; if not, write to the Free Software
>      * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

hq2x, hq3x, hq4x:

>     //Copyright (C) 2003 MaxSt ( maxst@hiend3d.com )

>     //This program is free software; you can redistribute it and/or
>     //modify it under the terms of the GNU Lesser General Public
>     //License as published by the Free Software Foundation; either
>     //version 2.1 of the License, or (at your option) any later version.
>     //
>     //This program is distributed in the hope that it will be useful,
>     //but WITHOUT ANY WARRANTY; without even the implied warranty of
>     //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>     //Lesser General Public License for more details.
>     //
>     //You should have received a copy of the GNU Lesser General Public
>     //License along with this program; if not, write to the Free Software
>     //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

nes_ntsc:

>     /* Copyright (C) 2006 Shay Green. This module is free software; you
>     can redistribute it and/or modify it under the terms of the GNU Lesser
>     General Public License as published by the Free Software Foundation; either
>     version 2.1 of the License, or (at your option) any later version. This
>     module is distributed in the hope that it will be useful, but WITHOUT ANY
>     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
>     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
>     more details. You should have received a copy of the GNU Lesser General
>     Public License along with this module; if not, write to the Free Software
>     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

VisualBoyAdvance GameBoy and GBA code:

>     // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
>     // Copyright (C) 1999-2003 Forgotten
>     // Copyright (C) 2004-2006 Forgotten and the VBA development team

>     // This program is free software; you can redistribute it and/or modify
>     // it under the terms of the GNU General Public License as published by
>     // the Free Software Foundation; either version 2, or(at your option)
>     // any later version.
>     //
>     // This program is distributed in the hope that it will be useful,
>     // but WITHOUT ANY WARRANTY; without even the implied warranty of
>     // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>     // GNU General Public License for more details.
>     //
>     // You should have received a copy of the GNU General Public License
>     // along with this program; if not, write to the Free Software Foundation,
>     // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

trio:

>      * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
>      * Copyright (C) 2001 Bjorn Reese
>      * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
>      *
>      * Permission to use, copy, modify, and distribute this software for any
>      * purpose with or without fee is hereby granted, provided that the above
>      * copyright notice and this permission notice appear in all copies.
>      *
>      * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
>      * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
>      * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
>      * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.

ConvertUTF:

>      * Copyright 2001-2004 Unicode, Inc.
>      *
>      * Disclaimer
>      *
>      * This source code is provided as is by Unicode, Inc. No claims are
>      * made as to fitness for any particular purpose. No warranties of any
>      * kind are expressed or implied. The recipient agrees to determine
>      * applicability of information provided. If this file has been
>      * purchased on magnetic or optical media from Unicode, Inc., the
>      * sole remedy for any claim will be exchange of defective media
>      * within 90 days of receipt.
>      *
>      * Limitations on Rights to Redistribute This Code
>      *
>      * Unicode, Inc. hereby grants the right to freely use the information
>      * supplied in this file in the creation of products supporting the
>      * Unicode Standard, and to make copies of this file in any form
>      * for internal or external distribution as long as this notice
>      * remains attached.

MD5 Hashing:

>     /*
>      * RFC 1321 compliant MD5 implementation,
>      * by Christophe Devine ;
>      * this program is licensed under the GPL.
>      */

V810 Emulator:

>      * Copyright (C) 2006 David Tucker
>      *
>      * This program is free software; you can redistribute it and/or modify
>      * it under the terms of the GNU General Public License as published by
>      * the Free Software Foundation; either version 2 of the License, or
>      * (at your option) any later version.
>      *
>      * This program is distributed in the hope that it will be useful,
>      * but WITHOUT ANY WARRANTY; without even the implied warranty of
>      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>      * GNU General Public License for more details.
>      *
>      * You should have received a copy of the GNU General Public License
>      * along with this program; if not, write to the Free Software
>      * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Unzipping Code:

>     /* unzip.c -- IO for uncompress .zip files using zlib
>        Version 1.01e, February 12th, 2005

>        Copyright (C) 1998-2005 Gilles Vollant

>        Read unzip.h for more info
>     */

>     /* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
>     compatibility with older software. The following is from the original crypt.c. Code
>     woven in by Terry Thorsen 1/2003.
>     */
>     /*
>       Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.

>       See the accompanying file LICENSE, version 2000-Apr-09 or later
>       (the contents of which are also included in zip.h) for terms of use.
>       If, for some reason, all these files are missing, the Info-ZIP license
>       also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
>     */

MiniLZO:

>        Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
>        Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
>        All Rights Reserved.

>        The LZO library is free software; you can redistribute it and/or
>        modify it under the terms of the GNU General Public License as
>        published by the Free Software Foundation; either version 2 of
>        the License, or (at your option) any later version.

>        The LZO library is distributed in the hope that it will be useful,
>        but WITHOUT ANY WARRANTY; without even the implied warranty of
>        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>        GNU General Public License for more details.

>        You should have received a copy of the GNU General Public License
>        along with the LZO library; see the file COPYING.
>        If not, write to the Free Software Foundation, Inc.,
>        59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

>        Markus F.X.J. Oberhumer
>        <markus@oberhumer.com>
>        http://www.oberhumer.com/opensource/lzo/

Fuse Z80 emulation code:

>        Copyright (c) 1999-2004 Philip Kendall, Witold Filipczyk

>        $Id: z80_ops.c,v 1.56 2004/06/09 10:55:09 pak21 Exp $

>        This program is free software; you can redistribute it and/or modify
>        it under the terms of the GNU General Public License as published by
>        the Free Software Foundation; either version 2 of the License, or
>        (at your option) any later version.

>        This program is distributed in the hope that it will be useful,
>        but WITHOUT ANY WARRANTY; without even the implied warranty of
>        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>        GNU General Public License for more details.

>        You should have received a copy of the GNU General Public License
>        along with this program; if not, write to the Free Software
>        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

>        Author contact information:

>        E-mail: pak21-fuse@srcf.ucam.org
>        Postal address: 15 Crescent Road, Wokingham, Berks, RG40 2DB, England

NeoPop Neo Geo Pocket (Color) Code:

>     //---------------------------------------------------------------------------
>     // NEOPOP : Emulator as in Dreamland
>     //
>     // Copyright (c) 2001-2002 by neopop_uk
>     //---------------------------------------------------------------------------
>     //      This program is free software; you can redistribute it and/or modify
>     //      it under the terms of the GNU General Public License as published by
>     //      the Free Software Foundation; either version 2 of the License, or
>     //      (at your option) any later version. See also the license.txt file for
>     //      additional informations.

FPU Emulation:

>     /* Software floating-point emulation.
>        Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006 Free Software Foundation, Inc.
>        This file is part of the GNU C Library.
>        Contributed by Richard Henderson (rth@cygnus.com),
>                       Jakub Jelinek (jj@ultra.linux.cz),
>                       David S. Miller (davem@redhat.com) and
>                       Peter Maydell (pmaydell@chiark.greenend.org.uk).

>        The GNU C Library is free software; you can redistribute it and/or
>        modify it under the terms of the GNU Lesser General Public
>        License as published by the Free Software Foundation; either
>        version 2.1 of the License, or (at your option) any later version.

>        The GNU C Library is distributed in the hope that it will be useful,
>        but WITHOUT ANY WARRANTY; without even the implied warranty of
>        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>        Lesser General Public License for more details.

>        You should have received a copy of the GNU Lesser General Public
>        License along with the GNU C Library; if not, write to the Free
>        Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
>        02111-1307 USA.  */

PC-FX MJPEG Decoding:

>     /*
>      * jrevdct.c
>      *
>      * Copyright (C) 1991, 1992, Thomas G. Lane.
>      * This file is part of the Independent JPEG Group's software.
>      * For conditions of distribution and use, see the accompanying README file.
>      *
>      */
>     (The file is included in the Mednafen source distribution as mednafen/Documentation/README.jpeg4a)

VRC7 Sound Emulation:

>     /*
>     YM2413 emulator written by Mitsutaka Okazaki 2001

>     Permission is granted to anyone to use this software for any purpose,
>     including commercial applications. To alter this software and redistribute it freely,
>     if the origin of this software is not misrepresented.
>     */

NEC V30MZ Emulator:

>     /* This NEC V30MZ emulator may be used for purposes both commercial and noncommercial if you give the author, Bryan McPhail,
>        a small credit somewhere(such as in the documentation for an executable package).
>     */

NEC V30MZ disassembler(modified BOCHS x86 disassembler):

> Caution: Bochs' code is under the LGPL, but it is unclear if "or (at your option) any later version." applies to the x86 disassembler code.

>     This library is free software; you can redistribute it and/or
>     modify it under the terms of the GNU Lesser General Public
>     License as published by the Free Software Foundation; either
>     version 2 of the License, or (at your option) any later version.

>     This library is distributed in the hope that it will be useful,
>     but WITHOUT ANY WARRANTY; without even the implied warranty of
>     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>     Lesser General Public License for more details.

>     You should have received a copy of the GNU Lesser General Public
>     License along with this library; if not, write to the Free Software
>     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Cygne:
Cygne is distributed under the terms of the GNU GPL Version 2, 1991.
Copyright 2002 Dox, dox@space.pl. QuickLZ:

>                          QuickLZ 1.20 data compression library
>                      Copyright (C) 2006-2007 Lasse Mikkel Reinhold

>     QuickLZ can be used for free under the GPL-1 or GPL-2 license (where anything
>     released into public must be open source) or under a commercial license if such
>     has been acquired (see http://www.quicklz.com/order.html). The commercial license
>     does not cover derived or ported versions created by third parties under GPL.

Q-Subchannel CRC16 Code:

>     /*  cdrdao - write audio CD-Rs in disc-at-once mode
>      *
>      *  Copyright (C) 1998  Andreas Mueller
>      *
>      *  This program is free software; you can redistribute it and/or modify
>      *  it under the terms of the GNU General Public License as published by
>      *  the Free Software Foundation; either version 2 of the License, or
>      *  (at your option) any later version.
>      *
>      *  This program is distributed in the hope that it will be useful,
>      *  but WITHOUT ANY WARRANTY; without even the implied warranty of
>      *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>      *  GNU General Public License for more details.
>      *
>      *  You should have received a copy of the GNU General Public License
>      *  along with this program; if not, write to the Free Software
>      *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>      */

SMS Plus:

>         Copyright (C) 1998-2004  Charles MacDonald

>         This program is free software; you can redistribute it and/or modify
>         it under the terms of the GNU General Public License as published by
>         the Free Software Foundation; either version 2 of the License, or
>         (at your option) any later version.

>         This program is distributed in the hope that it will be useful,
>         but WITHOUT ANY WARRANTY; without even the implied warranty of
>         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>         GNU General Public License for more details.

>         You should have received a copy of the GNU General Public License
>         along with this program; if not, write to the Free Software
>         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

EMU2413(used in SMS emulation):

>       Copyright (C) Mitsutaka Okazaki 2004

>       This software is provided 'as-is', without any express or implied warranty.
>       In no event will the authors be held liable for any damages arising from
>       the use of this software.

>       Permission is granted to anyone to use this software for any purpose,
>       including commercial applications, and to alter it and redistribute it
>       freely, subject to the following restrictions:

>       1. The origin of this software must not be misrepresented; you must not
>          claim that you wrote the original software. If you use this software
>          in a product, an acknowledgment in the product documentation would be
>          appreciated but is not required.
>       2. Altered source versions must be plainly marked as such, and must not
>          be misrepresented as being the original software.
>       3. This notice may not be removed or altered from any source distribution.

blz:

>     /* Copyright (C) 2007 Shay Green. This module is free software; you can
>     redistribute it and/or modify it under the terms of the GNU General Public
>     License, version 2 or later, as published by the Free Software Foundation.
>     This program is distributed in the hope that it will be useful, but WITHOUT
>     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
>     FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
>     details. You should have received a copy of the GNU General Public License
>     along with this program; if not, write to the Free Software Foundation, Inc.,
>     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */

CD-ROM data correction code:

>     /*  dvdisaster: Additional error correction for optical media.
>      *  Copyright (C) 2004-2007 Carsten Gnoerlich.
>      *  Project home page: http://www.dvdisaster.com
>      *  Email: carsten@dvdisaster.com  -or-  cgnoerlich@fsfe.org
>      *
>      *  The Reed-Solomon error correction draws a lot of inspiration - and even code -
>      *  from Phil Karn's excellent Reed-Solomon library: http://www.ka9q.net/code/fec/
>      *
>      *  This program is free software; you can redistribute it and/or modify
>      *  it under the terms of the GNU General Public License as published by
>      *  the Free Software Foundation; either version 2 of the License, or
>      *  (at your option) any later version.
>      *
>      *  This program is distributed in the hope that it will be useful,
>      *  but WITHOUT ANY WARRANTY; without even the implied warranty of
>      *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>      *  GNU General Public License for more details.
>      *
>      *  You should have received a copy of the GNU General Public License
>      *  along with this program; if not, write to the Free Software
>      *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA,
>      *  or direct your browser at http://www.gnu.org.
>      */