Difference between revisions of "Mednafen"

From Emulation General Wiki
Jump to navigation Jump to search
m (Added SNES Faust)
m (Memory cards)
 
(54 intermediate revisions by 30 users not shown)
Line 2: Line 2:
 
|logo = Newlogo-1-.png
 
|logo = Newlogo-1-.png
 
|logowidth = 280
 
|logowidth = 280
|version = {{MednafenVer}}
+
|version = {{Version|Mednafen}}
 
|active = Yes
 
|active = Yes
|platform = Windows, Linux, BSD and more
+
|platform = [[Emulators on Windows|Windows]]</br>[[Emulators on Linux|Linux]]</br>[[Emulators on BSD|BSD]]</br>[[Emulators on PS3|PS3]]<br/>[[Emulators on Wii|Wii]]<br/>[[Emulators on GCW Zero|GCW Zero]]
|target = [[Atari Lynx emulators|Atari Lynx]], [[Apple II emulators|Apple II]], [[WonderSwan emulators|Bandai WonderSwan/Color]], [[Game Boy Advance emulators|Nintendo Game Boy Advance]], [[Nintendo Entertainment System emulators|Nintendo Entertainment System]], [[Super Nintendo emulators|Super Nintendo Entertainment System]], [[Virtual Boy emulators|Virtual Boy]], [[PC Engine (TurboGrafx-16) emulators|NEC PC Engine (TurboGrafx-16)]], [[PC-FX emulators|PC-FX]], [[Neo Geo Pocket emulators|SNK Neo Geo Pocket/Color]], [[PlayStation emulators|Sony PlayStation]], [[Master System emulators|Sega Master System]], [[Master System emulators|Game Gear]], [[Sega Genesis emulators|Genesis (Mega Drive)]], [[Sega Saturn emulators|Saturn]]
+
|target = [[Apple II line|Apple II]]</br>[[Atari Lynx emulators|Atari Lynx]]</br>[[WonderSwan emulators|Bandai WonderSwan/Color]]</br>[[Game Boy Advance emulators|Nintendo Game Boy Advance]]</br>[[Virtual Boy emulators|Virtual Boy]]</br>[[Nintendo Entertainment System emulators|Nintendo Entertainment System]]</br>[[Super Nintendo emulators|Super Nintendo Entertainment System]]</br>[[PC Engine (TurboGrafx-16) emulators|NEC PC Engine/TurboGrafx-16]]</br>[[PC-FX emulators|PC-FX]]</br>[[Neo Geo Pocket emulators|SNK Neo Geo Pocket/Color]]</br>[[PlayStation emulators|Sony PlayStation]]</br>[[Master System emulators|Sega Master System]]</br>[[Sega Genesis emulators|Sega Genesis (Mega Drive)]]</br>[[Sega Saturn emulators|Sega Saturn]]</br>[[Master System emulators|Sega Game Gear]]
|developer = Ryphecha, Mednafen Team
+
|developer = Ryphecha</br>Mednafen Team
|website = [https://mednafen.github.io/ mednafen.github.io]
+
|website = [https://mednafen.github.io mednafen.github.io]
 
|source = [http://sourceforge.net/projects/mednafen/files/latest/download?source=files SourceForge]
 
|source = [http://sourceforge.net/projects/mednafen/files/latest/download?source=files SourceForge]
 +
|license = GNU GPLv2
 +
|bios = [[Emulator_Files#Multi-system|Required]]
 
}}
 
}}
'''Mednafen''' (an acronym for '''My Emulator Doesn't Need A Frickin' Excellent Name''', formerly '''Nintencer''') is an open-source, [[Multi-system emulators|multi-system emulator]], driven from the command-line. Many of its cores are ports of other emulators, but many of them are also original. Its [[PlayStation emulators|Sony PlayStation]], [[Sega Saturn emulators|Sega Saturn]], [[Virtual Boy emulators|Nintendo Virtual Boy]], and [[PC Engine (TurboGrafx-16) emulators|NEC PC Engine (TurboGrafx-16)]] original cores are notable for their high quality, compatibility and accuracy.
+
 
 +
'''Mednafen''' (an acronym for '''My Emulator Doesn't Need A Frickin' Excellent Name''', formerly '''Nintencer''') is an open-source, [[Multi-system emulators|multi-system emulator]], driven from the command-line.
 +
 
 +
Many of its cores are ports of other emulators; however, many of its cores are also original and are notable for their high quality, compatibility and accuracy.
  
 
==Downloads==
 
==Downloads==
* [{{MednafenURL|releases/}} Mednafen] Official releases.
+
{| cellpadding="4"
 +
|-
 +
|align=center|{{Icon|Win-big}}
 +
|'''[{{MednafenURL|releases/}} Official release]'''<br/><small>Includes [[source code]]</small>
 +
|-
 +
|colspan="2"|<hr/>
 +
|-
 +
|align=center|{{Icon|Lin|BSD}}
 +
|[https://pkgs.org/download/mednafen <code>mednafen</code> Package Listing]<br/><small>at pkgs.org</small>
 +
|-
 +
|colspan="2"|<hr/>
 +
|-
 +
|align=center|{{Icon|Wii}}
 +
|[https://github.com/raz0red/wii-mednafen/releases Source] [https://gbatemp.net/download/wiimednafen.37238 v0.3-SNAPSHOT]<br/><small> Wii port</small>
 +
|-
 +
|align=center|{{Icon|PS3}}
 +
|[https://github.com/aaerox/mednafen-ps3 Source] [https://ps3.brewology.com/downloads/download.php?id=12232&mcid=4 r3]<br/><small>PS3 port (Outdated)</small>
 +
|-
 +
|align=center|{{Icon|GCWZero}}
 +
|[https://github.com/gameblabla/mednafen-gcw Source]<br/><small>GCW Zero port (Outdated)</small>
 +
|}
 +
 
 +
 
 +
==Overview==
 +
The best cores in Mednafen are those that are original - which are the [[PlayStation emulators|Sony PlayStation]], [[PC Engine (TurboGrafx-16) emulators|NEC PC Engine (TurboGrafx-16)]], [[PC-FX emulators|PC-FX]], [[Sega Saturn emulators|Sega Saturn]] and [[Virtual Boy emulators|Nintendo Virtual Boy]] cores.
 +
 
 +
The NEC PC Engine core is one of the best emulators for that system, with a Fast and Accurate version. The PlayStation core is native resolution only and features a high degree of accuracy and compatibility<ref>[http://forum.fobby.net/index.php?t=msg&th=1114 Mednafen PSX bugs reports]</ref>. The Nintendo Virtual Boy core is one of the best for the system.
 +
 
 +
Some cores improve upon emulators that have been long abandoned and rarely updated. These include the SNK Neo Geo Pocket/Color, Bandai WonderSwan/Color, and Atari Lynx cores.
 +
 
 +
Other cores are less useful, as there are better options in stand-alone emulators (Nintendo Entertainment System, Sega Genesis, Master System, and Super Nintendo Entertainment System). These cores might even be based on out-dated versions. For instance, the Super Nintendo Entertainment System core is based on an old, outdated version of bsnes. This is before the performance/accuracy/balanced cores — 0.50x territory — with a couple of changes by Ryphecha.
 +
 
 +
It is unknown at this time whether Mednafen's Nintendo Game Boy Advance core is better than [[VisualBoy Advance#VBA-M|VBA-M]].
 +
 
 +
Mednafen's Sony PlayStation, NEC PC Engine (Fast, not Accurate, version), SNK Neo Geo Pocket/Color, Nintendo Virtual Boy, Sega Saturn and Bandai WonderSwan/Color emulators are all available as [[libretro]] cores under the name "Beetle", so it might make more sense to use [[RetroArch]] instead.
 +
 
 +
Version 1.31.0 added experimental support for [https://system16.com/hardware.php?id=711 ST-V games] that don't require decryption chips or special hardware. Refer to the [https://mednafen.github.io/documentation/ss.html#Section_stv ST-V section of the official documentation] for more details and a list of explicitly supported games.
  
 
==Supported systems==
 
==Supported systems==
Line 25: Line 66:
 
|-
 
|-
 
|[[Apple II emulators|Apple II]]
 
|[[Apple II emulators|Apple II]]
|Original
+
|Original.
 
|-
 
|-
 
|[[WonderSwan emulators|Bandai WonderSwan/Color]]
 
|[[WonderSwan emulators|Bandai WonderSwan/Color]]
Line 31: Line 72:
 
|-
 
|-
 
|[[PC Engine (TurboGrafx-16) emulators|NEC PC Engine/TurboGrafx-16 (CD)]]
 
|[[PC Engine (TurboGrafx-16) emulators|NEC PC Engine/TurboGrafx-16 (CD)]]
|Original. CD-ROM interface based on [http://www.geocities.co.jp/SiliconValley-Bay/9975/PC2E/english.html PC2E].
+
|Original. CD-ROM interface based on [https://web.archive.org/web/20190327015916/http://www.geocities.co.jp/SiliconValley-Bay/9975/PC2E/english.html PC2E].
 
|-
 
|-
 
|[[PC-FX emulators|NEC PC-FX]]
 
|[[PC-FX emulators|NEC PC-FX]]
Line 37: Line 78:
 
|-
 
|-
 
|[[Nintendo Entertainment System emulators|NES (Famicom)]]
 
|[[Nintendo Entertainment System emulators|NES (Famicom)]]
|[http://freecode.com/projects/fceultra FCE Ultra]
+
|[http://fceultra.sourceforge.net/ FCE Ultra]
 
|-
 
|-
 
|[[Game Boy Advance emulators|Nintendo Game Boy Advance]]
 
|[[Game Boy Advance emulators|Nintendo Game Boy Advance]]
Line 49: Line 90:
 
|-
 
|-
 
|[[Master System emulators|Sega Master System]] and [[Master System emulators|Game Gear]]
 
|[[Master System emulators|Sega Master System]] and [[Master System emulators|Game Gear]]
|[http://www.techno-junk.org/smsplus.php SMS Plus]
+
|[https://web.archive.org/web/20170406033236/http://www.techno-junk.org/smsplus.php SMS Plus]
 
|-
 
|-
 
|[[Sega Saturn emulators|Sega Saturn]]
 
|[[Sega Saturn emulators|Sega Saturn]]
|Original
+
|Original. Experimental ST-V arcade board support.
 
|-
 
|-
 
|[[Neo Geo Pocket emulators|SNK Neo-Geo Pocket/Color]]
 
|[[Neo Geo Pocket emulators|SNK Neo-Geo Pocket/Color]]
Line 58: Line 99:
 
|-
 
|-
 
|[[PlayStation emulators|Sony PlayStation]]
 
|[[PlayStation emulators|Sony PlayStation]]
|Original
+
|Original.
 
|-
 
|-
 
|[[Super Nintendo emulators|SNES (Super Famicom)]]
 
|[[Super Nintendo emulators|SNES (Super Famicom)]]
 
|[[higan|bsnes v059]] & Original ([https://mednafen.github.io/documentation/snes_faust.html SNES Faust])
 
|[[higan|bsnes v059]] & Original ([https://mednafen.github.io/documentation/snes_faust.html SNES Faust])
 
|}
 
|}
 
==Overview==
 
Mednafen only has a command line interface, so its interface might be hard to use to new users.
 
 
The best cores in Mednafen are those that are original - which are the Sony PlayStation, NEC PC Engine, PC-FX, Sega Saturn and Nintendo Virtual Boy cores. The NEC PC Engine core is one of the best emulators for that system, with a Fast and Accurate version. The PlayStation core is native resolution only and features a high degree of accuracy and compatibility.<ref>[http://forum.fobby.net/index.php?t=msg&th=1114 Mednafen PSX bugs reports]</ref> The Nintendo Virtual Boy core is one of the best for the system.
 
 
Other cores improve upon emulators that have been long abandoned and rarely updated. These include the SNK Neo Geo Pocket/Color, Bandai WonderSwan/Color, and Atari Lynx cores.
 
 
Other cores are less useful, as there are better options in stand-alone emulators (Nintendo Entertainment System, Sega Genesis, Master System, and Super Nintendo Entertainment System). These cores might even be based on out-dated versions. For instance, the Super Nintendo Entertainment System core is based on an old outdated version of bsnes. This is before the performance/accuracy/balanced cores — 0.50x territory — with a couple of changes by Ryphecha.
 
 
It is unknown at this time whether Mednafen's Nintendo Game Boy Advance core is better than [[VisualBoy Advance#VBA-M|VBA-M]].
 
 
[[RetroArch]] uses the Sony PlayStation, NEC PC Engine, SNK Neo Geo Pocket/Color, Nintendo Virtual Boy, Sega Saturn and Bandai WonderSwan/Color cores of Mednafen, so it might make sense to use that instead.
 
  
 
==Using Mednafen==
 
==Using Mednafen==
Mednafen is pretty easy to get up and running. You can use a frontend like medgui. However, a good text editor like [http://www.notepad-plus-plus.org/ Notepad++] is all you need if you need to change settings.
+
Officially Mednafen has only a command-line interface, that is nevertheless easy to configure and run for users familiar with it. Everyone else can use a [[Frontends#Mednafen|third-party frontend]] for GUI. As with any type of interface a good text editor like [http://www.notepad-plus-plus.org Notepad++] can be used to change settings.
  
 
===BIOS===
 
===BIOS===
Most cores do not require any BIOS except for the Sony PlayStation, NEC PC Engine CD, PC-FX, and Sega Saturn cores. [[Emulator_Files#Multi-System|BIOS files]] need to be placed into a folder called "firmware" in your Mednafen directory. Mednafen is very picky about which BIOS to use. The ones that you might need are:
+
Most cores do not require any BIOS except for the Sony PlayStation, NEC PC Engine CD, PC-FX, and Sega Saturn cores. BIOS files need to be placed into a folder called "firmware" in your Mednafen directory. Mednafen is very picky about which BIOS to use, but all of these come with the [[Emulator_Files#Multi-System|Mednafen BIOS pack]] and are correctly named.<ref group=notes>Mednafen can be forced to accept incorrect bios roms by editing its config file if you absolutely cannot find the correct ones, but this may cause compatibility problems.</ref> The ones that you might need are:
  
 
'''Sony PlayStation'''
 
'''Sony PlayStation'''
Line 95: Line 123:
  
 
'''Sega Saturn'''
 
'''Sega Saturn'''
* sega_101.bin
+
* sega_101.bin - Required for Japan-region games.
* mpr-17933.bin
+
* mpr-17933.bin - Required for North America/US-region and Europe-region games.
 
+
For ST-V games, use the original uncompressed files inside stvbios.zip from MAME romset.
All of these come with the [[Emulator_Files#Multi-System|RetroArch BIOS pack]] and are correctly named.
 
  
 
===CUE===
 
===CUE===
Line 124: Line 151:
 
===Configuring controls===
 
===Configuring controls===
 
Once in-game, to configure your controller at any time, press Alt+Shift+1 and it will guide you through the setup. Press Alt+Shift+2 and so on for each additional controller for multiplayer.
 
Once in-game, to configure your controller at any time, press Alt+Shift+1 and it will guide you through the setup. Press Alt+Shift+2 and so on for each additional controller for multiplayer.
 +
To emulate a different kind of controller, Ctrl+Shift+1 (or 2 for port 2 etc) to cycle through known controller types.
 +
If you're having trouble with a controller with analog buttons (the Namco neGcon, for example), hit F3 to make Mednafen detect them.
  
 
===Graphical enhancements===
 
===Graphical enhancements===
Line 135: Line 164:
  
 
====Width size corrections====
 
====Width size corrections====
 +
Some cores have a wrong width resolution, doubt if this is a bug and even less a problem, but if you want some pixel perfect (to see better horizontal scrolling for example) you must disable Correct aspect ratio in these cores:
  
Some cores have a wrong width resolution, doubt if this is a bug and even less a problem, but if you want some pixel perfect (to see better horizontal scrolling for example) here is a little list of the cores with xscale values which would give pixel perfect.
+
* md.correct_aspect 0
all values are replaced from 1X scale, if you want 2X or 3X scale, multiply it with a calculator.
+
* nes.correct_aspect 0
 +
* pce_fast.correct_aspect 0
 +
* snes.correct_aspect 0
 +
* snes_faust.correct_aspect 0
 +
* ss.correct_aspect 0
  
PCE / PCE_FAST / PC-FX: 0.8888888888888888888
+
Here is also a little list of the cores without an correct_aspect setting but its width is still wrong, so changing its xscale values will give pixel perfect.
Saturn: 1.092715231788079
+
These cores (except PC-FX) also have a boolean setting called h_overscan which if it's enabled (1) some overscan (which is most known as black bars) on both sides will appear, but width size is still inaccurate.
PlayStation: 1.09375
+
All values are replaced from 1X scale, if you want 2X or 3X scale, multiply it with a calculator.
SNES_FAUST: 0.8767123287671233
 
  
Example: PSX [https://i.postimg.cc/6QFrs4dR/mednafenpsxbefore.png 2.0X scale] -> [https://i.postimg.cc/TwmrT29s/mednafenpsxafter.png 2.1875X scale]
+
* PCE / PC-FX: 0.888888888888888
 +
* PC Engine (h_overscan 1): 0.875
 +
* PlayStation (h_overscan 0): 1.092715231788079
 +
* PlayStation (h_overscan 1): 1.09375
 +
 
 +
<gallery>
 +
File:mednafenpsxbefore.png|2.0X scale
 +
File:mednafenpsxafter.png|2.1875X scale
 +
</gallery>
  
 
===Cheats===
 
===Cheats===
Line 153: Line 194:
 
To add an existing GS/AR/PAR/CB cheat code, use "Gameshark Codes". Else, if you have a memory address and a given value for it, choose "Search Code" then "Add Code", then put in the address (as $XXXXXXXX), the byte range depending on the values your variable can take (1 is 0-255, 2 is 0-65535, etc), and the numeric value proper (in decimal, or hexadecimal if followed by a lower-case h). Various cheat types exist too (S(substitute on read), C(substitute on read with compare) or R(replace value before vblank) -- R being the default recommended option).
 
To add an existing GS/AR/PAR/CB cheat code, use "Gameshark Codes". Else, if you have a memory address and a given value for it, choose "Search Code" then "Add Code", then put in the address (as $XXXXXXXX), the byte range depending on the values your variable can take (1 is 0-255, 2 is 0-65535, etc), and the numeric value proper (in decimal, or hexadecimal if followed by a lower-case h). Various cheat types exist too (S(substitute on read), C(substitute on read with compare) or R(replace value before vblank) -- R being the default recommended option).
  
Searching for new cheat codes is also possible. The general idea being comparing variables, going back to gameplay so that this variable changes then back to the cheat engine searching for any variables that changed in that particular way. For example:
+
Searching for new cheat codes is also possible. The general idea being comparing variables, going back to gameplay so that this variable changes, then back to the cheat engine searching for any variables that changed in that particular way. For example:
 
* '''Infinite Health / Ammo / Time / Money:''' you start with 5 hearts, reset search (in the cheat engine, not reset the game you silly!), you get hurt to 4 hearts, search variables that decreased, get healed back to 5 hearts, search variables that increased, and so on. For the money, you can start with 0 when you have 0 gold and try earning/spending money. You could try using save states as well when you don't have as much freedom changing the value.  
 
* '''Infinite Health / Ammo / Time / Money:''' you start with 5 hearts, reset search (in the cheat engine, not reset the game you silly!), you get hurt to 4 hearts, search variables that decreased, get healed back to 5 hearts, search variables that increased, and so on. For the money, you can start with 0 when you have 0 gold and try earning/spending money. You could try using save states as well when you don't have as much freedom changing the value.  
 
* '''Infinite Lives:''' It's game over when the internal variable for "Lives" is 0. So in some cases, when it shows "REST/LEFT=1" in-game and you lose a life then it becomes 0 but you're still allowed to play on your last life, that means the internal counter for lives has actually changed from 2 to 1 and not from 1 to 0, but in other games (where if you die on "LIVESx1" it's game over) it's not the case. In the case of lives, you actually know the exact value: reset search initially, then (if you have 2 lives on a game that allows you to play on "LEFT=0") search for variables with values equal to 3. Lose a life, search for variables equal 2, and so on.
 
* '''Infinite Lives:''' It's game over when the internal variable for "Lives" is 0. So in some cases, when it shows "REST/LEFT=1" in-game and you lose a life then it becomes 0 but you're still allowed to play on your last life, that means the internal counter for lives has actually changed from 2 to 1 and not from 1 to 0, but in other games (where if you die on "LIVESx1" it's game over) it's not the case. In the case of lives, you actually know the exact value: reset search initially, then (if you have 2 lives on a game that allows you to play on "LEFT=0") search for variables with values equal to 3. Lose a life, search for variables equal 2, and so on.
Line 162: Line 203:
 
The goal of these searches is to narrow down the list of results to a single or handful of addresses (variables) pertinent directly to whatever we're searching for. The search always starts with "Reset Search", going back in-game (Alt+C) to play and change stuff, then back to the cheat engine to compare the "Original" value with the "Current" value. Then you check the results page which must get smaller and smaller (if it's 0 results, you screwed up and need to reset search to try again). The comparing options offered by Mednafen are as follow, with O being the Original value, and C being the Current value (when you reset a search, they're the same):
 
The goal of these searches is to narrow down the list of results to a single or handful of addresses (variables) pertinent directly to whatever we're searching for. The search always starts with "Reset Search", going back in-game (Alt+C) to play and change stuff, then back to the cheat engine to compare the "Original" value with the "Current" value. Then you check the results page which must get smaller and smaller (if it's 0 results, you screwed up and need to reset search to try again). The comparing options offered by Mednafen are as follow, with O being the Original value, and C being the Current value (when you reset a search, they're the same):
  
# '''O==V1 && C==V2''' if you know the explicit numerical values for the variable you write it here. The first time, just write the same value in both. Subsequent times, leave O blank and press Enter so that you don't write the old value again, and write the current value under C.
+
# '''O==V1 && C==V2''' if you know the explicit numerical values for the variable, you write it here. The first time, just write the same value in both. Subsequent times, leave O blank and press Enter so that you don't write the old value again, and write the current value under C.
 
# '''O==V1 && |O-C|==V2''' same, but instead of writing the current value you write by how much it changed (0 if old value equals new value)
 
# '''O==V1 && |O-C|==V2''' same, but instead of writing the current value you write by how much it changed (0 if old value equals new value)
 
# '''|O-C|==V2''' you write by how much it changed (0 if old value equals new value)
 
# '''|O-C|==V2''' you write by how much it changed (0 if old value equals new value)
Line 170: Line 211:
  
 
===Further reading===
 
===Further reading===
* {{MednafenURL|documentation/}}
+
* {{MednafenURL|documentation}}
  
 
==Memory cards==
 
==Memory cards==
Line 200: Line 241:
 
[[File:memory_card_manager.png|400px]]
 
[[File:memory_card_manager.png|400px]]
  
It allows to transfer each of the game saves from a shared memory card to a .mcr memory file used by Mednafen. As it was described above you just need to start game and check for '''sav''' folder inside Mednafen system directory. Open with Memory Card Manager 1.4 the memory file created for your game by Mednafen and open the shared memory card file from which you wish to transfer a save entry. When there would be a dialogue 'Do you want to replace 'SAVE_ENTRY_NAME' click 'Yes' and then save the file to the '''sav''' folder (the older one should be replaced).
+
It allows to transfer each of the game saves from a shared memory card to a .mcr memory file used by Mednafen. As it was described above, you just need to start game and check for '''sav''' folder inside Mednafen system directory. Open with Memory Card Manager 1.4 the memory file created for your game by Mednafen and open the shared memory card file from which you wish to transfer a save entry. When there would be a dialogue 'Do you want to replace 'SAVE_ENTRY_NAME' click 'Yes' and then save the file to the '''sav''' folder (the older one should be replaced).
  
 
==Frontends==
 
==Frontends==
* [http://sourceforge.net/projects/medgui/ Medgui] (Windows)
+
See our dedicated frontends page.
* [http://forum.fobby.net/index.php?t=msg&th=924&start=0& MedGui Reborn] (Windows)
+
 
* [https://medlaunch.info MedLaunch] (Windows)
+
{{Main|Frontends#Mednafen}}
* [https://github.com/AmatCoder/mednaffe Mednaffe] (Multi-platform)
 
  
 
==Netplay==
 
==Netplay==
Line 218: Line 258:
 
* Super Nintendo Entertainment System
 
* Super Nintendo Entertainment System
 
* Sony PlayStation
 
* Sony PlayStation
 +
* Sega Saturn (experimental)
  
 
{| class="mw-collapsible mw-collapsed wikitable" style="width: 100%;"
 
{| class="mw-collapsible mw-collapsed wikitable" style="width: 100%;"
Line 229: Line 270:
 
|-
 
|-
 
| '''CONS''' ||
 
| '''CONS''' ||
* Command-line only (you can use a frontend, though)
+
* Command-line only (thankfully, dedicated front-end GUI for this multi-emulator exists)
 
* Weird, convoluted settings (or lack thereof)
 
* Weird, convoluted settings (or lack thereof)
* Super Nintendo Entertainment System emulation will be slow to you if you're on a low-end computer (uses bsnes core)
+
* Super Nintendo Entertainment System emulation can be slow to you if you're on a low-end computer (uses bsnes core)
 
* Sony PlayStation core is accurate but slow
 
* Sony PlayStation core is accurate but slow
 
* Only supports 2 players on Genesis
 
* Only supports 2 players on Genesis
 +
* No CHD file support
 
|}
 
|}
  
Line 285: Line 327:
 
==External links==
 
==External links==
 
* [http://fantasyanime.com/emuhelp/emuhelp_mednafen.htm Mednafen tutorial]
 
* [http://fantasyanime.com/emuhelp/emuhelp_mednafen.htm Mednafen tutorial]
 +
* [https://formulae.brew.sh/formula/mednafen MacOS instructions]
  
 +
==Notes==
 +
<references group="notes"/>
 
==References==
 
==References==
 
<references/>
 
<references/>
Line 291: Line 336:
 
[[Category:Emulators]]
 
[[Category:Emulators]]
 
[[Category:Multi-emulators]]
 
[[Category:Multi-emulators]]
[[Category:Atari consoles]]
+
[[Category:Console emulators]]
 +
[[Category:Home console emulators]]
 +
[[Category:Handheld console emulators]]
 +
[[Category:Computer emulators]]
 +
[[Category:Apple II emulators]]
 +
[[Category:Atari Lynx emulators]]
 
[[Category:Nintendo Entertainment System emulators]]
 
[[Category:Nintendo Entertainment System emulators]]
 
[[Category:Super Nintendo emulators]]
 
[[Category:Super Nintendo emulators]]
 
[[Category:PC Engine (TurboGrafx-16) emulators]]
 
[[Category:PC Engine (TurboGrafx-16) emulators]]
 
[[Category:PC-FX emulators]]
 
[[Category:PC-FX emulators]]
 +
[[Category:Neo Geo Pocket/Neo Geo Pocket Color emulators]]
 
[[Category:Game Boy/Game Boy Color emulators]]
 
[[Category:Game Boy/Game Boy Color emulators]]
 
[[Category:Game Boy Advance emulators]]
 
[[Category:Game Boy Advance emulators]]
Line 303: Line 354:
 
[[Category:Sega Saturn emulators]]
 
[[Category:Sega Saturn emulators]]
 
[[Category:Virtual Boy emulators]]
 
[[Category:Virtual Boy emulators]]
 +
[[Category:WonderSwan emulators]]
 
[[Category:Netplay]]
 
[[Category:Netplay]]
 
[[Category:Windows emulation software]]
 
[[Category:Windows emulation software]]
 
[[Category:Linux emulation software]]
 
[[Category:Linux emulation software]]
[[Category:macOS emulation software]]
+
[[Category:BSD emulation software]]

Latest revision as of 11:22, 31 January 2024

Mednafen
Newlogo-1-.png
Developer(s) Ryphecha
Mednafen Team
Latest version 1.32.0-UNSTABLE [+]
Active Yes
Platform(s) Windows
Linux
BSD
PS3
Wii
GCW Zero
Emulates Apple II
Atari Lynx
Bandai WonderSwan/Color
Nintendo Game Boy Advance
Virtual Boy
Nintendo Entertainment System
Super Nintendo Entertainment System
NEC PC Engine/TurboGrafx-16
PC-FX
SNK Neo Geo Pocket/Color
Sony PlayStation
Sega Master System
Sega Genesis (Mega Drive)
Sega Saturn
Sega Game Gear
Website mednafen.github.io
License GNU GPLv2
Source code SourceForge
BIOS/Keys Required

Mednafen (an acronym for My Emulator Doesn't Need A Frickin' Excellent Name, formerly Nintencer) is an open-source, multi-system emulator, driven from the command-line.

Many of its cores are ports of other emulators; however, many of its cores are also original and are notable for their high quality, compatibility and accuracy.

Downloads[edit]

Windows Official release
Includes source code

Linux FreeBSD mednafen Package Listing
at pkgs.org

Wii Source v0.3-SNAPSHOT
Wii port
PlayStation 3 Source r3
PS3 port (Outdated)
GCWZero Source
GCW Zero port (Outdated)


Overview[edit]

The best cores in Mednafen are those that are original - which are the Sony PlayStation, NEC PC Engine (TurboGrafx-16), PC-FX, Sega Saturn and Nintendo Virtual Boy cores.

The NEC PC Engine core is one of the best emulators for that system, with a Fast and Accurate version. The PlayStation core is native resolution only and features a high degree of accuracy and compatibility[1]. The Nintendo Virtual Boy core is one of the best for the system.

Some cores improve upon emulators that have been long abandoned and rarely updated. These include the SNK Neo Geo Pocket/Color, Bandai WonderSwan/Color, and Atari Lynx cores.

Other cores are less useful, as there are better options in stand-alone emulators (Nintendo Entertainment System, Sega Genesis, Master System, and Super Nintendo Entertainment System). These cores might even be based on out-dated versions. For instance, the Super Nintendo Entertainment System core is based on an old, outdated version of bsnes. This is before the performance/accuracy/balanced cores — 0.50x territory — with a couple of changes by Ryphecha.

It is unknown at this time whether Mednafen's Nintendo Game Boy Advance core is better than VBA-M.

Mednafen's Sony PlayStation, NEC PC Engine (Fast, not Accurate, version), SNK Neo Geo Pocket/Color, Nintendo Virtual Boy, Sega Saturn and Bandai WonderSwan/Color emulators are all available as libretro cores under the name "Beetle", so it might make more sense to use RetroArch instead.

Version 1.31.0 added experimental support for ST-V games that don't require decryption chips or special hardware. Refer to the ST-V section of the official documentation for more details and a list of explicitly supported games.

Supported systems[edit]

System Based on code from:
Atari Lynx Handy
Apple II Original.
Bandai WonderSwan/Color Cygne
NEC PC Engine/TurboGrafx-16 (CD) Original. CD-ROM interface based on PC2E.
NEC PC-FX Original. NEC V810 CPU core based on Reality Boy.
NES (Famicom) FCE Ultra
Nintendo Game Boy Advance VisualBoy Advance
Nintendo Virtual Boy Original. NEC V810 CPU core based on Reality Boy.
Sega Genesis (Mega Drive) Genesis Plus
Sega Master System and Game Gear SMS Plus
Sega Saturn Original. Experimental ST-V arcade board support.
SNK Neo-Geo Pocket/Color NeoPop
Sony PlayStation Original.
SNES (Super Famicom) bsnes v059 & Original (SNES Faust)

Using Mednafen[edit]

Officially Mednafen has only a command-line interface, that is nevertheless easy to configure and run for users familiar with it. Everyone else can use a third-party frontend for GUI. As with any type of interface a good text editor like Notepad++ can be used to change settings.

BIOS[edit]

Most cores do not require any BIOS except for the Sony PlayStation, NEC PC Engine CD, PC-FX, and Sega Saturn cores. BIOS files need to be placed into a folder called "firmware" in your Mednafen directory. Mednafen is very picky about which BIOS to use, but all of these come with the Mednafen BIOS pack and are correctly named.[notes 1] The ones that you might need are:

Sony PlayStation

  • SCPH5500.bin - (NTSC-J) Required for Japan-region games.
  • SCPH5501.bin - (NTSC-U) Required for North America/US-region games.
  • SCPH5502.bin - (PAL) Required for Europe-region games.

NEC PC Engine CD

  • syscard3.pce

NEC PC-FX

  • pcfx.bios

Sega Saturn

  • sega_101.bin - Required for Japan-region games.
  • mpr-17933.bin - Required for North America/US-region and Europe-region games.

For ST-V games, use the original uncompressed files inside stvbios.zip from MAME romset.

CUE[edit]

For most systems, Mednafen only needs the ROM file; but to load PlayStation games, Mednafen requires CUE sheets to know where the music data is. Ensure that the CUE sheet is properly set up in order for the game to run. See the Cue sheet (.cue) page for more info.

Loading a game[edit]

To load a game in Mednafen, simply drag and drop your ROM or CUE file onto mednafen.exe, or if you prefer, you can use the command line. Mednafen requires no special commands, such as the desired system. For example, in Windows, the command would look like C:/Emulators/Mednafen/mednafen.exe C:/Roms/Nintendo/battletoads.nes

m3u playlist files[edit]

An example of a .m3u for Valkyrie Profile

To automatically load the next disc of a game, you will need a .m3u file. To make one, simply create a text file and name it after your game. Within the text file, write the names of the .cue sheets for your game discs as such:

Game (Disc 1).cue

Game (Disc 2).cue

Game (Disc 3).cue

Save the .txt file and then change the file extension to .m3u. Run the .m3u, rather than the .cue of the first disc and the first disc will load. When you get to the end of that disc, the next disc will be automatically loaded. For this method to work, shared memory cards (see below) must be used for the games in the playlist.

Dual analog controllers with PlayStation[edit]

To enable analog sticks and rumble on DualShock controllers, open the mednafen-09x.cfg file, search for "psx.input.port1" and change gamepad to DualShock. Do this for port2 if you wish to play multiplayer games with the features of DualShock controllers.

Configuring controls[edit]

Once in-game, to configure your controller at any time, press Alt+Shift+1 and it will guide you through the setup. Press Alt+Shift+2 and so on for each additional controller for multiplayer. To emulate a different kind of controller, Ctrl+Shift+1 (or 2 for port 2 etc) to cycle through known controller types. If you're having trouble with a controller with analog buttons (the Namco neGcon, for example), hit F3 to make Mednafen detect them.

Graphical enhancements[edit]

Sprite limit[edit]

This is a feature on older systems, due to hardware limitations, that makes it only display so many sprites could be on screen at the same time. Most systems got around this limitation by alternating which sprites were on the screen each refresh, causing the sprite to flicker. Mednafen's default settings are true to the original system limits, but this can be disabled in the .cfg file. Here is the list of options from the .cfg file to change from 0 to 1 if you don't wish to have the limit.

Width size corrections[edit]

Some cores have a wrong width resolution, doubt if this is a bug and even less a problem, but if you want some pixel perfect (to see better horizontal scrolling for example) you must disable Correct aspect ratio in these cores:

  • md.correct_aspect 0
  • nes.correct_aspect 0
  • pce_fast.correct_aspect 0
  • snes.correct_aspect 0
  • snes_faust.correct_aspect 0
  • ss.correct_aspect 0

Here is also a little list of the cores without an correct_aspect setting but its width is still wrong, so changing its xscale values will give pixel perfect. These cores (except PC-FX) also have a boolean setting called h_overscan which if it's enabled (1) some overscan (which is most known as black bars) on both sides will appear, but width size is still inaccurate. All values are replaced from 1X scale, if you want 2X or 3X scale, multiply it with a calculator.

  • PCE / PC-FX: 0.888888888888888
  • PC Engine (h_overscan 1): 0.875
  • PlayStation (h_overscan 0): 1.092715231788079
  • PlayStation (h_overscan 1): 1.09375

Cheats[edit]

Mednafen supports the usual cheats such as GameShark, Code Breaker, and Action Replay. The cheats menu can be accessed (or quit back to normal gameplay) with ALT+C.

The cheat engine interface is command-based but still easy to use. Each time a menu appears, you have a bunch of options with a number (or key) before each choice. You're supposed to write the number (# just means to choose the number for the line you want) or letter standing for your choice. Occasionally, when asked to input some values or names, a value appears between brackets after the question - if that's what you want to write down, you can simply leave the entry field empty and press Enter.

To add an existing GS/AR/PAR/CB cheat code, use "Gameshark Codes". Else, if you have a memory address and a given value for it, choose "Search Code" then "Add Code", then put in the address (as $XXXXXXXX), the byte range depending on the values your variable can take (1 is 0-255, 2 is 0-65535, etc), and the numeric value proper (in decimal, or hexadecimal if followed by a lower-case h). Various cheat types exist too (S(substitute on read), C(substitute on read with compare) or R(replace value before vblank) -- R being the default recommended option).

Searching for new cheat codes is also possible. The general idea being comparing variables, going back to gameplay so that this variable changes, then back to the cheat engine searching for any variables that changed in that particular way. For example:

  • Infinite Health / Ammo / Time / Money: you start with 5 hearts, reset search (in the cheat engine, not reset the game you silly!), you get hurt to 4 hearts, search variables that decreased, get healed back to 5 hearts, search variables that increased, and so on. For the money, you can start with 0 when you have 0 gold and try earning/spending money. You could try using save states as well when you don't have as much freedom changing the value.
  • Infinite Lives: It's game over when the internal variable for "Lives" is 0. So in some cases, when it shows "REST/LEFT=1" in-game and you lose a life then it becomes 0 but you're still allowed to play on your last life, that means the internal counter for lives has actually changed from 2 to 1 and not from 1 to 0, but in other games (where if you die on "LIVESx1" it's game over) it's not the case. In the case of lives, you actually know the exact value: reset search initially, then (if you have 2 lives on a game that allows you to play on "LEFT=0") search for variables with values equal to 3. Lose a life, search for variables equal 2, and so on.
  • Character Modifier / Level Modifier / Having an Item: reset search, play without changing whatever you're searching for (let's say the stage), do lots of searches for new value equals old value. In-game, change it, then do a new value doesn't equal old value. And so on.
  • Walk Through Walls / Invincibility / In-game Cheats & Features: you need to find the value that tells the character if he can move or not (he can't really move when walking against a wall) / if he's blinking or being invincible right now after getting hurt. Same methods as before, but there are hints that could be useful here -- both states could be 0/1, or something else... for example, one could assume 0 is not enabled and 1 is enabled.
  • Debug Modes: stuff that stays 0 no matter what, extra off-screen inaccessible options in menus, extra dialogue... you name it. Have fun experimenting.

The goal of these searches is to narrow down the list of results to a single or handful of addresses (variables) pertinent directly to whatever we're searching for. The search always starts with "Reset Search", going back in-game (Alt+C) to play and change stuff, then back to the cheat engine to compare the "Original" value with the "Current" value. Then you check the results page which must get smaller and smaller (if it's 0 results, you screwed up and need to reset search to try again). The comparing options offered by Mednafen are as follow, with O being the Original value, and C being the Current value (when you reset a search, they're the same):

  1. O==V1 && C==V2 if you know the explicit numerical values for the variable, you write it here. The first time, just write the same value in both. Subsequent times, leave O blank and press Enter so that you don't write the old value again, and write the current value under C.
  2. O==V1 && |O-C|==V2 same, but instead of writing the current value you write by how much it changed (0 if old value equals new value)
  3. |O-C|==V2 you write by how much it changed (0 if old value equals new value)
  4. O!=C if old value doesn't equal new value
  5. Value decreased if new value smaller than old value
  6. Value increased if new value bigger than old value

Further reading[edit]

Memory cards[edit]

Shared memcards[edit]

Use this so that there is a shared memory cards for all games:

Create psx.cfg, and add the line: filesys.fname_sav %s.%X

Here's the full documentation: https://mednafen.github.io/documentation/fname_format.txt

Emulation bugs, crashes, and save states can corrupt your memory card data.

Transfer[edit]

To transfer memory cards, follow this guide. Also, in games with multiple discs with saves that carry over, you have to follow the same procedure.

Mednafen creates memory card files for each individual game, in contrast to PCSX-Reloaded/ePSXe where all game saves are stored into 2 memory card files. To transfer memory card files from PCSX-Reloaded/ePSXe to RetroArch:

  • Start the game in RetroArch.
  • Go to the system folder. Copy the names of the .mcr files created for the game.
  • Delete them.
  • Rename the files you want to transfer with the names of the RetroArch memcard files.
  • Place the new ones in the system folder.

Using Memory Card Manager 1.4[edit]

Another option is to use Memory Card Manager 1.4 to extract a separate game saves from a shared memory card file.

The utility has support for next memory card formats: *.mem, *.mcd, *.mcr, *.gme, *.ddf, *.psx, *.ps, *.psm, *.vmp, *.VM1

Memory card manager.png

It allows to transfer each of the game saves from a shared memory card to a .mcr memory file used by Mednafen. As it was described above, you just need to start game and check for sav folder inside Mednafen system directory. Open with Memory Card Manager 1.4 the memory file created for your game by Mednafen and open the shared memory card file from which you wish to transfer a save entry. When there would be a dialogue 'Do you want to replace 'SAVE_ENTRY_NAME' click 'Yes' and then save the file to the sav folder (the older one should be replaced).

Frontends[edit]

See our dedicated frontends page.

Main article: Frontends#Mednafen

Netplay[edit]

Cores that work with netplay:

  • NEC PC Engine (TurboGrafx-16)/PCE-CD (TG-CD)/SuperGrafx (option for both accuracy and fast cores)
  • NEC PC-FX
  • Nintendo Entertainment System
  • Sega Genesis
  • Sega Master System
  • Super Nintendo Entertainment System
  • Sony PlayStation
  • Sega Saturn (experimental)
Review
PROS
  • You can make and load save states
  • Netcode allows for people to join a game that's already in session
  • In-game chat
  • Playing it full-screen works (sometimes)
CONS
  • Command-line only (thankfully, dedicated front-end GUI for this multi-emulator exists)
  • Weird, convoluted settings (or lack thereof)
  • Super Nintendo Entertainment System emulation can be slow to you if you're on a low-end computer (uses bsnes core)
  • Sony PlayStation core is accurate but slow
  • Only supports 2 players on Genesis
  • No CHD file support
How to

It's recommended that you download a frontend.

  1. Run MedGui.exe
  2. You'll get a small window. On your left, you'll see two arrow buttons with a console/handheld icon in between. Choose your desired platform.
  3. Click the button with the blue lightning icon and look for the folder that contains your game(s). The emulator looks for compressed archives by default, but you can still load uncompressed files by clicking on the drop-down menu.
  4. Pick your game.
  5. Click the button with a checkered red ball and joystick to start the game.
  6. You'll then (very likely) get a message an update prompt. Click Yes, and wait.
  7. Start the game. If it asks you to update again, ignore it and restart the emulator.
  8. While the game is loaded, press ALT + SHIFT + 1 to map your controller. You'll get several options per button (for example, UP 1, UP 2, UP 3, etc.). Just map the first one to your controller, and the rest to a key you'll never press. You will have to repeat this step for every emulator core.
  9. Close the emulator.
  10. Click the arrow button on the right side of the window. It should expand it.
  11. Click Advanced Mode.
  12. Click the tab called Media/Network/Utility.

For Hosting:

  1. In the Netplay-Server section, you have the following options:
    • "Max Clients", as in, the number of people that can connect to your server (not necessarily players; theoretically you can use this as a makeshift stream)
    • "Conn. Timeout" which is the number of seconds you'll allow for your clients to attempt establishing a connection
    • "Port" where you'll choose one an open TCP/UDP one
    • "Password" which you can establish or leave blank
  2. When you're done fiddling with your settings, click Create standard.conf
  3. Click Create Server. A cmd window will appear.
  4. Click My IP to obtain your external IP address and share it along with your port to your friend(s).
  5. Launch the game.
  6. Press T, and type /server localhost.
  7. Wait for other people to connect.

If you're Connecting:

  1. In the Netplay-Client section, you have the following options:
    • "Host", which is the server's IP you'll connect to
    • "Port, which is the one used by the server (which you should also have open on your end).
    • "Password", blank if there is none.
    • "Nickname" where you type whatever you want.
    • "Local player" is the number of players that will also be playing on one computer.
    • "Small font" which makes the chat font smaller.
  2. When you're done fiddling with your settings, launch the game.
  3. Press T, and type /server IP_goes_here.

You can chat in-game by pressing T. Also, remember that you can drop in and out of the game at any time, so you don't need to reset the game if someone accidentally disconnects. There are way too many settings, commands, and features to list, so take a look at the emulator's documentation.

External links[edit]

Notes[edit]

  1. Mednafen can be forced to accept incorrect bios roms by editing its config file if you absolutely cannot find the correct ones, but this may cause compatibility problems.

References[edit]