Introduction to Mednafen

Mednafen is a portable, utilizing OpenGL and SDL, argument(command-line)-driven multi-system emulator. Mednafen has the ability to remap hotkey functions and virtual system inputs to a keyboard, a joystick, or both simultaneously. Save states are supported, as is real-time game rewinding. Screen snapshots may be taken, in the PNG file format, at the press of a button. Mednafen can record audiovisual movies in the QuickTime file format, with several different lossless codecs supported.

The following systems are supported(refer to the emulation module documentation for more details):

Mednafen is distributed under the terms of the GNU GPLv2.

Due to the threaded model of emulation used in Mednafen, and limitations of SDL, a joystick is preferred over a keyboard to play games, as the joystick will have slightly less latency, although the latency differences may not be perceptible to most people.


Mednafen 0.9.46August 10, 2017 - 22:50 PDT

A small update, primarily to fix a few bugs.

-- 0.9.46: --

August 10, 2017:
	Compile with explicit -fstrict-aliasing, for distributions/OSes that have configured gcc to
	not enable strict aliasing at -O2(and possibly other levels).

	Fixed a bug that could, under certain conditions, cause emulator OSD elements to not be updated in the time
	after entering frame advance mode and before a frame advance.

August 7, 2017:
	Use a sorted std::vector instead of std::multimap to store current settings, to reduce memory usage.

August 6, 2017:
	SS: Added ss.input.port*.3dpad.mode.defpos settings to control the default position of the digital/analog mode switch.

August 5, 2017:
	Allow addresses above FFFF to be entered as the logical watch address in the debugger.

August 4, 2017:
	SS: Added kludge to fix layer offset problem in "Daytona USA CCE".

	NES: The functionality controlled by setting "nes.fnscan" now recognizes "(F)" and "(France)" as PAL.

	NES: Added support for iNES mapper 40.

July 11, 2017:
	Utilize _byteswap_*() functions in endian.h when compiling with Microsoft's C++ compiler.

June 22, 2017:
	Fixed a couple of minor issues(log header formatting, and skipped logging of first instruction in step mode) with the debugger's
	undocumented trace log feature.

	NES: Corrected the period of PAL noise channel frequency setting 0x1.

June 21, 2017:
	NES: Fixed a few square wave sound channel emulation bugs(wrong phase for duty setting 3, and failing to clock the period counter
	when the channel is silenced).

SHA-256: 674faf42bdb0ad5649aea65da266b0be3428995caaa7be183fc6d3ed7732467a
SHA-256: e869db3dac14d020471055d81bc8d21d6cf63cf3d9806ea14879cf9eff8eab4d
SHA-256: 282ef3d6b383978976bedb991b9df57b846713028fcca48c2e1be966a66be41e

Mednafen 10, 2017 - 00:49 PDT

This very minor release fixes a regression introduced in 0.9.45, that caused garbled sound output when using the (non-default) exclusive-mode WASAPI sound driver with certain higher-end sound cards.


SHA-256: f95f68acc14f9b30b201e15b8205d85ac9dc7e581ea6b61e225e990491f01e69
SHA-256: 4d8a575cbb575115e7d12421a155dd46c7f15dffa359a61ab29e4b8809fda53f
SHA-256: bce8a7d15abdaf65365ade78a981e75ea30d626baa6c54c154fecc16bb8e9481

Mednafen 0.9.45June 2, 2017 - 07:08 PDT

-- 0.9.45: --

May 29, 2017:
	Tweaked netplay sound buffer underrun kludge code.

	The netplay server host and port being connected to are now printed to the netplay console at the beginning of a
	connection attempt.

	Netplay connection attempts to servers are now non-blocking.

May 25, 2017:
	SS: Synchronize end of SMPC clock change commands to beginning of vsync instead of beginning of vblank, per tests on a SS.

May 23, 2017:
	SS: Reworked how the VDP2 rendering thread waits, to make Saturn emulation usable with the default OpenBSD kernel.

	SS: Added emulation of the light gun("Stunner"/"Virtua Gun").

April 28, 2017:
	#include'd many commonly-used C and C++ standard library headers in types.h(and removed redundant #include statements 
	from various header and source files), to reduce the probability of portability problems
	(due to neglecting to explicitly include a header file) when different standard C/C++ libraries
	behave differently in regards to what header files include what other header files.

	Added a sound output driver for OpenBSD's /dev/audio.

	Reworked the sound output format conversion code to be more versatile, 

April 25, 2017:
	NES: Wrote new "Barcode Battler II" emulation code to replace the old "Barcode World" code, based on quick testing with
	actual hardware(albeit the English version).

April 24, 2017:
	SSFPlay: Added save state support.

SHA-256: 49715544a5eb7a678f7f01994f38aa14e2192f00d201684184665665073a600e
SHA-256: 89a6f67711c2e0bb4c5e59fb684e7e54dbb3b3c4acee94ecab52740a204e942d
SHA-256: 27c6bc064e96a54fe082b834fa29019ac8e82b9f1bc9be047e2ec633bd1b424f

Mednafen 21, 2017 - 21:33 PDT

Notable changes since 0.9.43:
  • Added command-line option "-which_medium", to specify which CD to start with when using multi-CD M3U sets.
  • SNES: Fixed "Tractor Beam" spell graphical glitches in "Star Ocean".
  • SNES: Fixed emulator hang when saving state in "Panic Bomber W".
  • SNES_FAUST: Added PAL support.
  • SNES_FAUST: Made minor optimizations to the BG rendering code.
  • SNES_FAUST: Added setting "snes_faust.correct_aspect", default value of "1".
  • SS: Fixed broken input in "Primal Rage"(a 0.9.43 regression).
  • SS: Added support for a 16MiB RAM cart mapped into the A-bus CS1 area(for "Heart of Darkness" and homebrew).
  • VB: Added support for custom palettes.
  • VB: Reworked how LED on-state duration is translated into RGB values and added setting "vb.ledonscale"; the default value of "vb.ledonscale" is set such that the overall brightness will be lower than in previous versions of Mednafen, to reduce white crush, but the user can set it to a value of "1.9921875" to approximate the old brightness level.
  • WonderSwan: Removed setting "wswan.rotateinput", and added a new device("gamepadraa") that can be selected on virtual input port 1 to automatically rotate inputs when the display is rotated.


SHA-256: 2427ab0718475c84c8f908894e74dcac2145992d23958d182a40eee122c95544
SHA-256: 31950987af0d34b000766f57347e84a1b5f3f2d016792ed7deb74e4a9a565d0f
SHA-256: 447bb75e9c0c0c85e8614699ade138d84a64db0dc087e0fa010bd062ea03d4c7

Mednafen 0.9.43February 26, 2017 - 09:07 PST

Notable changes since 0.9.42:
  • PSX: Reduced DualShock rumble latency by 1 frame.
  • SS: Added multitap emulation, enableable via settings "ss.input.sport1.multitap" and "ss.input.sport2.multitap".
  • SS: Added steering wheel emulation(for "Virtua Racing", and other racing games that lack 3D Pad analog support).
  • SS: Added Mission Stick and Dual Mission Stick emulation.
  • SS: Added 101-key US keyboard emulation.
  • SS: Fixed hang in "F1 Challenge".
  • SS: Fixed missing voice acting and related hangs in "Magic Knight Rayearth".
  • Reworked how input grabbing is handled. The new way uses only one key combo(CTRL+SHIFT+Menu), and will adapt its behavior based on any keyboards being selected on any virtual input ports or not(refer to the documentation for full details). A new setting is added, "command.toggle_grab", and two settings were removed, "command.toggle_grab_input" and "command.toggle_cidisable".
  • Emulated keyboard(FKB, Tsushin, Saturn) key state is now only updated when input grabbing is toggled on.


SHA-256: b8305914cdf297fe6483219fa10c3fa14116fff8eed02f61326a0e32dd350f4d
SHA-256: 656c298fd28bfbd9f003537347971c41cb3ae759a23c95c3ecb22fa13a7748aa
SHA-256: e8931cceb9d42943beca70e83f876c5d7f469fe510f63506e27f418b1673f6ad

Mednafen 0.9.42February 7, 2017 - 22:04 PST

Notable changes since 0.9.41:
  • NES: Added support for iNES mapper 190.
  • SNES_FAUST: Added multitap support(enable via setting "snes_faust.input.sport2.multitap").
  • SS: Fixed severely-flickering graphics in "Virtua Cop" and "Virtua Cop 2".
  • SS: Fixed speed problems in "Pocket Fighter".
  • SS: Fixed FMV tearing in "Johnny Bazookatone".
  • SS: Fixed hang in "GunBlaze-S".
  • SS: Fixed hangs in "Virtua Fighter" and "Virtua Fighter Remix"(still some graphical weirdness, though).
  • SS: Fixed hang in "Zero Divide".
  • SS: Fixed missing sound problem in "Arcade's Greatest Hits".
  • SS: Fixed missing sound and related issues in "Ultimate Mortal Kombat 3".


SHA-256: 93e000286bd24ed5d39e6f67a22b950f3081aa71eeee1107a552246bbd3b5c25
SHA-256: 6e31184c72b6f8d461f423ae6b235e9ab38143fe12d4dbfb5c2c50b5992660a5
SHA-256: 7f2724faaca60f5bd2a39e19515d2bf9cdfc87024e3d455da7ec2a430a23cd3b

Mednafen 0.9.41January 21, 2017 - 11:16 PST

The 64-bit Windows build is now compiled with gcc 4.9.4, but modified to produce slightly smaller and slightly faster Mednafen executables. The patch is available as "mednafen/patches/gcc-4.9.4-mingw-w64-noforcepic-smalljmptab.patch" in the source tarball.

The source tarball is now compressed with xz instead of bzip2.

Particularly notable changes since
  • Renamed settings "*.pixshader" to "*.shader".
  • Added simple color TV CRT-approximating OpenGL shader, "goat".
  • PSX: Added "" setting to control the combination of buttons used when the functionality controlled by the "psx.input.analog_mode_ct" setting is enabled.
  • SMS: Added settings "sms.slstart", "sms.slend", "sms.slstartp", and "sms.slendp".
  • SNES: Added setting "snes.h_blend", default value of "0", that when set to "1" will enable a horizontal blend/blur filter.
  • SS: Added setting "ss.correct_aspect", default value of "1", to allow the user to disable aspect ratio correction(not recommended, but whatever~).
  • SS: Added setting "ss.h_overscan", default value of "1", to allow the user to show less of the screen on the left and right sides by setting it to "0".
  • SS: Added setting "ss.h_blend", default value of "0", that when set to "1" will enable a horizontal blend/blur filter(with a more noticeable effect on the Saturn video modes with a higher horizontal resolution).
  • SS: Fixed the low volume problem in "Daytona USA".
  • SS: Fixed missing/corrupted graphics of battle scenes in "Grandia".
  • WonderSwan: Minor sound and graphics emulation accuracy improvements, from patches and suggestions provided by trap15.


SHA-256: 74736b9b52a7ba6270b67ae8e6c876a887e0e26a00a7d96bdd49af17992aac47
SHA-256: 2eed5383624d781c34bc18cbe42ab51bf5a633161d71fdc68cf14bf0e9a768d5
SHA-256: ae6483a20f0c0aa900a2e14908d3c004fea056ffcef179c582e4f3f3c077f664

Mednafen 19, 2016 - 21:01 PDT

This release adds PAL/European support to the Sega Saturn emulation.


SHA-256: b42470b2ddf68ce0747f5b8ba4e1d1c3047fa8c45b8e168da43f3e2461ec34cc
SHA-256: 9acceb0d6239105605dc598d56563adb7d5dfce56671ab5ddfa0aef33cdc19c2
SHA-256: 6ca033328ee26c4696cf3a7820ab02a6ca7c6bfbe194b9697c0051cae1566894

Mednafen 23, 2016 - 06:40 PDT

A relatively minor release. Among other changes, fixes problems with the following Sega Saturn games: "Astal", "Hi-Octane", "Panzer Dragoon", and "Panzer Dragoon 2".


SHA-256: 3d97bf160fc9679b1a1c8082305d0d3906d867a6ba2be93232aa9d3024ba84a5
SHA-256: 615eb850f33f2f072f572ef7be9e496b4576b589675c6b592e2f24c300bfa0ed
SHA-256: d43d34fac12de582e4b51df0342eee720a48db92126bb135f294fd67bdb616e0

Mednafen 0.9.39-UNSTABLEAugust 5, 2016 - 19:22 PDT

This release adds experimental Sega Saturn emulation. It currently is x86_64-only, very CPU-intensive, lacking save state support, and not supporting PAL-region games. However, SSF("Saturn Sound Format") rip playback is not limited to x86_64 platforms.

Significant end-user changes compared to
  • Added experimental Sega Saturn emulation.
  • Low-accuracy "snes_faust" SNES emulation module is now compiled in and available by default(but not used by default, except for SPC playback).
  • The version is now displayed in the upper right corner of the F1 help screen.
  • Scrolling in the netplay and cheat consoles is now done in visible line units, instead of internal line units as before, and when a console is not scrolled all the way down, a green indicator arrow will now be drawn in the lower right corner.
  • Revamped the layout of the debugger's memory editor.
  • MD: Replaced old 68K emulator with new 68K emulator developed for Saturn emulation. Fixes major issues in "Double Clutch", "James Pond 3", and "Sub-Terrania". However, timing is currently a bit off with the new 68K emulation code, so there may be some regressions.
  • MD: Implemented kludge to fix a startup lockup in "Turrican".
  • NES: Implemented kludge to fix a minor Zelda 2 title screen glitch, a status bar glitch in Burai Fighter, and scrolling in the second stage of The Young Indiana Jones Chronicles.
  • NES: Enabled SSE2 support in the audio resampler(though not used on all CPUs with SSE2 support, mostly just newer ones).
  • NES, PCE, PC-FX: Added ARM NEON support to the audio resamplers(when compiled with -mfpu=neon or similar).
  • PCE, PC-FX: Added AVX support to the audio resampler.
  • PS1: Enabled emulation of a rarely-used CDC feature; fixes lockup bug in "Fantastic Pinball Kyutenkai".
  • PS1: Reordered CPU class data layout for a small performance boost on ARM CPUs.
  • SNES: Updated libco, for ARM support.

Settings added:
  • filesys.fname_savbackup
  • filesys.path_savbackup
  • netplay.console.scale
  • netplay.console.font
  • netplay.console.lines
  • ss.*

Settings removed:
  • netplay.smallfont

SHA-256: 353eafc1243b00256ec7050ad47c622c4b5243354f02ed23836f28e95ccbd107
SHA-256: f889e1e8f6276eaf237d1386328f3e2629d2ce84b52d496fbd139fbf3be0d5fd
SHA-256: 3aed1d5317df3dd28e25d0b9c95fd62477c1874365fa0df9b6726e71b35bf189

Page design and original content copyright © 2005-2017 Mednafen Team. The Mednafen Beetle is copyright © 2005 Camille Young. Nintendo, Nintendo Entertainment System, GameBoy, GameBoy Color, and GameBoy Advance are registered trademarks of Nintendo. Mednafen is not an official Nintendo product, and Mednafen is in no way affiliated with the Nintendo corporation.