the_game_database|| news | latest | gallery | upcoming | search: 
Mednafen
  PCEmulationUC  
  opened by paleface at 16:17:58 03/05/23  
  last modified by paleface at 16:05:47 10/05/24  
  paleface [sys=PC; cat=Emulation; reg=NA]
           
Multi-system emulator. Command-line-based, so not necessarily the easiest to get set up, but sure did run PC Engine CD game Double Dragon II (see entry 505) dandy when I tried it--even if it couldn't replicate what may very well be a bizarre controller port hardware glitch with my repaired Duo. ; )
 
This was also the best emulator I found for NGPC when I was trying such things years ago.
 
https://mednafen.github.io/
 
  paleface 15:14:14 03/16/23
           
Most of the Google results lists for "best Genesis emulator" name Kega Fusion as the best, and don't even mention Mednafen, but Mednafen seems to run the installed Mega Drive / Genesis ROM from the Steam version of Water Margin at least as well as Kega Fusion, and with significantly less CPU usage.
 
Kega does have a GUI, maybe that's what people like (no hotkey configuration though, sheesh). And for instance I couldn't seem to get Water Margin running using the default Mednafen OpenGL renderer, so I had to switch to its software rendering:
 
mednafen.exe -video.driver softfb -md.stretch aspect -md.videoip 0 roms\water_margin.zip
 
  paleface 15:15:16 03/16/23
           
Oh yeah and you do controller mapping while running a game, you press Shift+Alt+[controller number, say 1], and then press the inputs at the prompts.
 
  paleface 15:17:12 03/16/23
           
The Steam "Water Margin" actually includes Mednafen inside it, that's apparently how it's running the ROM it installs (which is a file with no extension, named "game," in the "res" folder).
 
  paleface 20:00:15 02/10/24
           
Mednafen's strict PC Engine BIOS file requirements probably preclude piracy-free emulation of that console, since even if you got a reader to rip your PCE system HuCard, it sounds like there could be a good chance it wouldn't match the CRC or whatever that Mednafen is looking for. Not that I have a HuCard reader with which to test this theory!
 
  paleface 01:10:01 02/18/24
           
Using this for Neo Geo Pocket (see entry 557) and Pocket Color (see entry 900) emulation. There doesn't seem to be a way to force it to act as a b&w system, though--to get the "Yosaku" b&w game to play in King of Fighters: Battle de Paradise (see entry 144), for instance.
 
Sample NGP command line:
 
C:\downloaded\mednafen\mednafen.exe -video.driver opengl -video.glvsync 0 -video.blit_timesync 0 -ngp.stretch aspect -ngp.videoip 0 roms\CARD_FIGHT_2_(patched).zip
 
I'm using the online patcher https://www.marcrobledo.com/RomPatcher.js/ , and translation patches from romhacking.net
 
  paleface 13:37:56 02/18/24
           
Mednafen says https://mednafen.github.io/documentation/ngp.html its NGP emulation is based on NeoPop--which stopped updating in 2003. Unlike NeoPop, Mednafen doesn't appear to have a way to force running in NGP (b&w) mode; also, NeoPop has a GUI, while Mednafen is command-line only.
 
  paleface 13:56:47 02/18/24
           
Still has same bugs noted in NeoPop's bug list, at least the first one I checked (flickering line below action window in SS2!)
 
Mednafen has a working fullscreen mode though, unlike NeoPop.
 
  paleface 14:11:25 02/18/24
           
Not noted in NeoPop's bug list, but unlike ares (see entry 1758) for instance, Mednafen/NeoPop only run Dokodemo Mahjong Color (see entry 397) in black and white.
 
  paleface 19:45:10 02/18/24
           
You can put volume in the command line--from 1 or 0 or something to 150, although it advises not going above 100:
 
C:\downloaded\mednafen\mednafen.exe -video.driver opengl -video.glvsync 0 -video.blit_timesync 0 -ngp.stretch aspect -ngp.videoip 0 -sound.volume 100 roms\SONIC_POCKET.zip
 
  paleface 14:54:31 02/19/24
           
NGP manuals: https://archive.org/download/neo-geo-pocket-manuals
 
  paleface 18:36:26 02/19/24
           
Mednafen supports overriding settings with a different .cfg file (main settings are in mednafen.cfg in root). Since I'll be launching games by command line from game-specific shortcuts, I copied my default cfg, mapped (ALT+SHIFT+1) settings to my arcade stick, renamed the resulting mednafen.cfg to stick.cfg, and will run a fighting game from a shortcut with a command line like this:
 
C:\downloaded\mednafen\mednafen.exe -video.driver opengl -video.glvsync 0 -video.blit_timesync 0 -ngp.stretch aspect -ngp.videoip 0 -sound.volume 70 -ovconfig stick.cfg roms\SNKvsCAPCOM1.zip
 
Mednafen can also do system and game-specific cfgs, according to the documentation.
 
  paleface 18:54:52 02/19/24
           
F2 remaps command keys; for PS4 controllers I used that to put Pause (Pause) on the Share button, Fast-forward (') on the touchpad, and (in the default mednafen.cfg, which is for the DS4 though DS4Windows, which could also do this remapping if necessary) save state (F5) on L1 and load state (F7) on R1.
 
  paleface 20:19:07 02/19/24
           
A system override config, such as md.cfg or ngp.cfg, overrides -ovconfig. Hrmph.
 
Since I only currently need one md-specific config for my one MD game, I can just have that in md.cfg, and don't have to specify it in the shortcut. But since I want two different NGP configs, one for pad and one for stick, I can't have a ngp.cfg, since it will override them; so I'll have to have ngp_pad.cfg and ngp_stick.cfg, and specify one or the other in each NGP game's shortcut command line (unless I wanted to do game-specific configs, but that's just a lot more config files : P).
 
  paleface 03:53:04 02/24/24
           
OH ovconfig has to go at start of command params, otherwise it will override the later ones. ;l
 
C:\downloaded\mednafen\mednafen.exe -ovconfig ngp_stick.cfg -video.driver opengl -video.glvsync 0 -video.blit_timesync 0 -ngp.stretch aspect -ngp.videoip 0 -sound.volume 40 -video.fs 1 roms\GD_F_CONTACT.zip
 
  paleface 04:19:11 02/24/24
           
And I'm using system cfgs or specifying system sub-cfgs in the command line so almost all those commands can go in there; so in the command line would just need
 
C:\downloaded\mednafen\mednafen.exe -ovconfig ngp_stick.cfg -sound.volume 40 -video.fs 1 roms\GD_F_CONTACT.zip
 
(Have to force full screen on that one 'cause it won't let me ESC out for some reason with that ROM?)
 
  paleface 14:55:07 02/24/24
           
Mednafen doesn't need a BIOS for HuCard games, just CD games.
 
At least for PCE CD games, Mednafen has a file size limit of just over 67 MB, so you probably have to point to the extracted .cue file, rather than the .zip. This seems to mean that you have to have the whole game uncompressed in order to run it; pointing to a .cue in a zip doesn't seem to be supported, nor does having the .cue point to zipped .bin files.
 
Super CD-ROM System 3.0 seems to be the preferred BIOS. Not sure yet if it has to pass a strict CRC check.
 
  paleface 15:53:31 02/24/24
           
ares can load PCE CD games from compressed .chd, so I'll just use that emulator instead.
 
  paleface 02:14:51 02/25/24
           
For capturing Mednafen in OBS via Display Capture (I wanted to show the ROMs folder I was working from when testing a bunch of games), at least this OpenGL DSL (I think?) NGPC output, I had to use Display Capture's "DXGI Desktop Duplication" Capture Method; "Automatic" and "Windows 10" only showed a black screen.
 
The captured Mednafen screen is black for a second or so at the start; that happens with Game Capture as well.
 
  paleface 23:16:13 03/02/24
           
Dang, while ares is good about NOT having borders around SNES games, it DOES have borders around PC Engine games--unlike Mednafen's PCE emulation. So I guess it's back to uncompressed bins and cues for me. : P There probably aren't more than a handful--if that--of Super CD games I'll be sticking to though so no biggie I guess.
 
(The 3 PCE rips I have currently--DDII, Gate of Thunder 3-in-1, Riot Zone--are 939 MB as .chd files, and 1.47 GB as bin/cue. I'm not sure ImgBurn ripped them as these single bin files they're in now, or if that happened from converting them back and forth with CHDMAN; handy that they're only one .bin file each, at any rate.)
 
  paleface 23:23:49 03/02/24
           
Maybe it's just as well; according to the documentation, Mednafen has an option to reduce PCE sprite flicker, which could be real handy.
 
  paleface 12:05:41 03/04/24
           
After mapping controls--maybe specifically the fast-forward control (default ') via F2?--I keep ending up with
 
~~~~
;Exit
command.exit keyboard 0x0 69
~~~~
 
instead of "0x0 41" (ESC key) in the .cfg, which means ESC no longer exits the emulator; I have to go in and edit it back by hand. Hrm.
 
  paleface 12:18:28 03/04/24
           
OH that's because the default Exit is actually F12. : PP
 
  paleface 12:23:41 03/04/24
           
For NGP, set "ngp.stretch aspect" in the cfg. Use "-video.fs 1" in the command-line to make sure it launches full-screen, like
 
C:\downloaded\mednafen\mednafen.exe -ovconfig ngp_pad.cfg -video.fs 1 -sound.volume 40 roms\ngp\PACMAN______.zip
 
  paleface 12:25:24 03/04/24
           
Actually, because I keep redoing the cfg, and could miss editing in the stretch, best to get that in from the command line, so
 
C:\downloaded\mednafen\mednafen.exe -ovconfig ngp_pad.cfg -ngp.stretch aspect -video.fs 1 -sound.volume 40 roms\ngp\PACMAN______.zip
 
  paleface 12:30:11 03/04/24
           
Uh and I'd better get a few other things that aren't necessarily defaults in there too, so:
 
C:\downloaded\mednafen\mednafen.exe -ovconfig ngp_pad.cfg -video.driver opengl -video.glvsync 0 -video.blit_timesync 0 -ngp.stretch aspect -sound.volume 40 -video.fs 1 roms\ngp\PACMAN______.zip
 
  paleface 12:32:35 03/04/24
           
For neatness should keep volume (since that can vary, along with ROM) last, so
 
C:\downloaded\mednafen\mednafen.exe -ovconfig ngp_pad.cfg -video.driver opengl -video.glvsync 0 -video.blit_timesync 0 -ngp.stretch aspect -video.fs 1 -sound.volume 40 roms\ngp\PACMAN______.zip
 
  paleface 22:16:22 03/04/24
           
Comparing Mednafen and ares in Shadow Dancer (Gen), the colors are brighter but maybe a tad too bright? with ares; ares also crops the picture slightly for some reason.
 
  paleface 13:33:12 03/13/24
           
Control defaults I tend to remap with F2:
' - fast-forward
F5 - quicksave
F7 - quickload
Pause - Pause emulator
 
Other:
M - switch mode (PCE controller--number of buttons)
 
For CD-ROM game emulation, put PCE CD-ROM2 Super System Card Ver.3.0 as "syscard3.pce" in "firmware" folder.
 
  paleface 00:34:18 04/10/24
           
For PCE, had to comment out (";") sound.volume setting in pce.cfg before I could set it from command line.
 
  paleface 00:55:26 05/11/24
           
Cheats
 
For instance the second "Standard" Infinite Lives cheat for The Revenge of Shinobi https://gamehacking.org/game/15756 is
 
FFE141:0003
 
In Mednafen, run the game in which you want to use the cheat, Alt+C to toggle the Cheats menu, 2 (Search Cheat), 1 (Add Cheat), enter a handy name for it, for this example enter "0xFFE141" as the address, "003" as the value, and make sure to toggle it on if it isn't automatically (cheats=1 in cfg).
 
  paleface 11:32:46 05/11/24
           
Some Genesis/MD games contain multiple regions in a single ROM, for instance the Steam ROM for the first Genesis/MD Shinobi game is TheSuperShinobi_JUE.SGD, which runs the J region version by default in Mednafen, but can also run the US version, "The Revenge of Shinobi," with "-md.region overseas_ntsc."
 
But some games don't support all regions, for instance the third Genesis/MD Steam Shinobi is "SHINOBI3_U.68K" and only runs as the North American version, "Shinobi III: Return of the Ninja Master" in Mednafen--no "The Super Shinobi II" Japanese version.
 
  paleface 04:18:15 05/13/24
           
Ah you set 2 or 6 button controller default for PCE in .cfg w/
 
;Default position for switch "Mode".
pce.input.port1.gamepad.mode_select.defpos 6
 
(Values = 2 or 6)
 
  paleface 12:03:48 05/25/24
           
Have changed a couple commands (F2):
 
- Fast-forward on L2 (had on touchpad; need it there for PS1/2 emulators where L2/R2 are standard buttons, but I just find it easier to use on triggers)
 
;Fast-forward
command.fast_forward joystick 0x000000000000000000010004f3ff0000 abs_4+
 
- Fullscreen on f (had on alt+enter, but that causes you to advance from boot screen on PCE for instance...oh well I probably should've put Run on Shift instead of Enter but I like Run on Enter so eh hm maybe I should straighten that out in my other emulators and just standardize fullscreen toggle to f)
 
;Toggle fullscreen mode
command.toggle_fs keyboard 0x0 9
 
  paleface 21:24:14 08/11/24
           
PC Engine settings for OBS:
Profile: 1340x1080
Scene: -288
 
  paleface 16:05:47 10/05/24
           
Runs PCE games at 59.??? (scrolls too fast to see).
    
references:
· ares (PC)
· CD-ROM2 Super System Card Ver.3.0 (PCCD)
· NeoGeo Pocket (NGP)
· NeoGeo Pocket Color (NGPC)
· NeoPop (PC)
· Sanni Cart Reader V5 (PCB)
· SEGA Mega Drive and Genesis Classics (PC)
· Water Margin: A Tale of Clouds and Wind (MD)

 
© 2024 paleface.net. Game impressions are © the individual contributors. All rights reserved.