Beta Mednafen-Pce


pder

Member
Joined
Nov 6, 2007
Messages
148
Hi all,

Today I made a quick port of the PC Engine emulator which is part of mednafen - a multi system emulator.
It appears to run most games that I've tried full speed at 500Mhz, but might need a bit more overclock in some cases.

No fancy frontend at the moment, just a script that launches a zenity popup to select your rom and remembers the last directory for the next time you launch.

Any feedback is welcome, particularly on how to achieve the best video quality. I'm using the SDL library from notaz to do hardware scaling, but I'm not sure I'm using it correctly.

Config file is located in pandora/appdata/mednafen-pce/.mednafen/mednafen.cfg.

Controls-
B - I
X - II
Y - Rapid I
A - Rapid II

Esc - exit emulator
Alt-Shift-1 - remap controls
F5 - save state
F7 - load state

More info can be found at mednafen home page

Download
Source

Enjoy!
 
Is this better than Hugo? Please tell me that this is better than Hugo. (By the way, this supports the Turbo CD!)

Can you do Virtual Boy next?
 
This one works pretty well, thanks :D

Is the mednafen in there the full mednafen or just a PCE-Part?

I'm asking as a proper GUI would be picklelauncher - it has a nice file selection, supports zipped roms and can run different scripts based on the filetype :)

I'd love to help with wrapping picklelauncher around it.
If you want, create scripts for the remaining (playable) emulation and I'll wrap things up into picklelauncher :)

What do you think?
 
EvilDragon said:
This one works pretty well, thanks :D

Is the mednafen in there the full mednafen or just a PCE-Part?

I'm asking as a proper GUI would be picklelauncher - it has a nice file selection, supports zipped roms and can run different scripts based on the filetype :)

I'd love to help with wrapping picklelauncher around it.
If you want, create scripts for the remaining (playable) emulation and I'll wrap things up into picklelauncher :)

What do you think?

The pnd I released only has the PCE stuff built. The configure script for mednafen allows you to enable or disable different emulators, and I disabled them all except for pce. I'd like to try playing around some of the other emulators at some point but I figured most were probably covered better by existing stand alone emulators.

Adding picklelauncher sounds like a good idea. I wasn't sure where the official location of it was, besides just grabbing a binary from another pnd.
 
Last edited by a moderator:
pder said:
Hi all,

Today I made a quick port of the PC Engine emulator which is part of mednafen - a multi system emulator.
It appears to run most games that I've tried full speed at 500Mhz, but might need a bit more overclock in some cases.

No fancy frontend at the moment, just a script that launches a zenity popup to select your rom and remembers the last directory for the next time you launch.

Any feedback is welcome, particularly on how to achieve the best video quality. I'm using the SDL library from notaz to do hardware scaling, but I'm not sure I'm using it correctly.

Config file is located in pandora/appdata/mednafen-pce/.mednafen/mednafen.cfg.

Controls-
B - I
X - II
Y - Rapid I
A - Rapid II

Esc - exit emulator
Alt-Shift-1 - remap controls
F5 - save state
F7 - load state

More info can be found at mednafen home page

Download
Source

Enjoy!
Thanks alot.Im really looking forward to better pcengine emulation.Does it support cd.hugo seems to only play like 1 in 3 roms that i try
 
Last edited by a moderator:
I said that it does, Khan. I actually looked at the page he linked to.

Pder: Most of Mednafen's other platforms run on the Pandora, but Virtual Boy, PCFX, and Wonderswan don't.
 
Very nice piece of software, especially with the addition of pickelauncher to give it an extra layer of polish!
 
I tried this last night. It runs really nicely! I did have some problems with US-released games. Did anyone else notice this? Perhaps my ROMs are scrambled.
 
EvilDragon said:
Okay, made a version that uses the latest picklelauncher.
Now you can have ZIPs with multiple roms, use your keyboard to filter rom names, etc.

Here is the PND :)

@pder:
Here is everything I did zipped up in case you want to use that for future releases or other mednafen ports :D

Thanks for the port, runs really nice :)

Thanks ED! Looking forward to trying it out when I get home.
 
Last edited by a moderator:
David Bowman said:
I tried this last night. It runs really nicely! I did have some problems with US-released games. Did anyone else notice this? Perhaps my ROMs are scrambled.

I wondered as well why some of my roms were not working. Check out this post from Exophase.

I've attached his source file and an executable (untested) that should run on the pandora.

copy usa_fix onto your SD card and run from a terminal

./usa_fix brokenrom.pce fixedrom.pce
 
Last edited by a moderator:
pder said:
David Bowman said:
I tried this last night. It runs really nicely! I did have some problems with US-released games. Did anyone else notice this? Perhaps my ROMs are scrambled.

I wondered as well why some of my roms were not working. Check out this post from Exophase.

I've attached his source file and an executable (untested) that should run on the pandora.

copy usa_fix onto your SD card and run from a terminal

./usa_fix brokenrom.pce fixedrom.pce

That did the trick! Thank you very much! I'm playing Air Zonk now!
 
Last edited by a moderator:
Ah, that explains why my roms were hanging as well :D

Is there a way to implement this fix into mednafen itself?
 
EvilDragon said:
Ah, that explains why my roms were hanging as well :D

Is there a way to implement this fix into mednafen itself?

I will look into doing this. I noticed you changed the launch script to use SDL_OMAP_LAYER_SIZE=512x478 and wondered where you got these values.

The reason I was using 640x464 was because the normal window size mednafen creates with pce.xscale=1 and pce.yscale=1 is 320x232

Maybe this is something that can be passed from pickle launcher. Do you know where I can find the source code for it?
 
Last edited by a moderator:
pder said:
EvilDragon said:
Ah, that explains why my roms were hanging as well :D

Is there a way to implement this fix into mednafen itself?

I will look into doing this. I noticed you changed the launch script to use SDL_OMAP_LAYER_SIZE=512x478 and wondered where you got these values.

Yes, I tried to fix the scaling, but didn't succeed so far.
I've got blurry filtering disabled, so you could see that something wasn't right with the scaling here.

I checked Wikipedia and found out, that the majority of the PCE-Games uses a resolution of 256×239, which upscales to 512x478 when you simply double them.

The reason I was using 640x464 was because the normal window size mednafen creates with pce.xscale=1 and pce.yscale=1 is 320x232

Ahh... hmm... I wonder why it does 320x232?
And I wonder why it had blocky pixels with 640x464 then... hmm...

Maybe this is something that can be passed from pickle launcher. Do you know where I can find the source code for it?

You can definately define command line arguments in picklelauncher and pass them to the script it runs.
The user can then select multiple options in the launcher and picklelauncher sends the appropriate command line arguments.

As far as I am aware, there is no sourcecode (yet?) available.
 
Last edited:
I tried this now. It runs but not so great unfortunatly. None of the CD games seem to work, the scrolling is very choppy in many of the shooters and varies depending on the amount of sprites on screen(I guess we need to overclock this? I guess I got too used to *underclocking* when running Temper I suppose, welcome back to the real world) And the scaling looks deadful. Instead of a nice even 2X we have here some odd fractional scale with a blurry filter stuck over it. The scaling is wrong in both horizontal and vertical directions. It really isn't handled right. Setting a screen size then making it fit that will never work, some games had different resolutions. You need to somehow take the output of the emu and then just double that.

Maybe someone could convince Exophase to give them the Wiz version of the source code to port to the Pandora (I think he gave it to ZX so maybe he would also give to one of you to port)? That would be a much better option at this point I think as it is a much better and efficient emulator. Turbo still runs better in Temper under Ginge even with the inconsistant frame rate.
 
DaveC said:
I tried this now. It runs but not so great unfortunatly. None of the CD games seem to work, the scrolling is very choppy in many of the shooters and varies depending on the amount of sprites on screen(I guess we need to overclock this? I guess I got too used to *underclocking* when running Temper I suppose, welcome back to the real world) And the scaling looks deadful. Instead of a nice even 2X we have here some odd fractional scale with a blurry filter stuck over it. The scaling is wrong in both horizontal and vertical directions. It really isn't handled right. Setting a screen size then making it fit that will never work, some games had different resolutions. You need to somehow take the output of the emu and then just double that.

Maybe someone could convince Exophase to give them the Wiz version of the source code to port to the Pandora (I think he gave it to ZX so maybe he would also give to one of you to port)? That would be a much better option at this point I think as it is a much better and efficient emulator. Turbo still runs better in Temper under Ginge even with the inconsistant frame rate.

Are you using the version from the archive or the version with picklelauncher? They have different scaling settings. When overclocked to 600 Mhz I have not not noticed any choppiness in any hucard games. fps is consistent at 60. CD games are another story and too slow at the moment. Which shooters were you having problems with?

I think I have the scaling issues solved by moving to a newer version of mednafen. With the current version, with no scaling it always wants to output a 320x232 4:3 aspect ratio, which when doubled looks ugly.

The current version allows you to disable the aspect ratio correction and output the original resolution. This looks perfect and clean and similar to what you would see with temper in ginge without the choppiness, but its not 4:3. However using the SDL scaler to scale this to 4:3 looks pretty good in my opinion.
 
Last edited by a moderator:
pder said:
DaveC said:
I tried this now. It runs but not so great unfortunatly. None of the CD games seem to work, the scrolling is very choppy in many of the shooters and varies depending on the amount of sprites on screen(I guess we need to overclock this? I guess I got too used to *underclocking* when running Temper I suppose, welcome back to the real world) And the scaling looks deadful. Instead of a nice even 2X we have here some odd fractional scale with a blurry filter stuck over it. The scaling is wrong in both horizontal and vertical directions. It really isn't handled right. Setting a screen size then making it fit that will never work, some games had different resolutions. You need to somehow take the output of the emu and then just double that.

Maybe someone could convince Exophase to give them the Wiz version of the source code to port to the Pandora (I think he gave it to ZX so maybe he would also give to one of you to port)? That would be a much better option at this point I think as it is a much better and efficient emulator. Turbo still runs better in Temper under Ginge even with the inconsistant frame rate.

Are you using the version from the archive or the version with picklelauncher? They have different scaling settings. When overclocked to 600 Mhz I have not not noticed any choppiness in any hucard games. fps is consistent at 60. CD games are another story and too slow at the moment.

I think I have the scaling issues solved by moving to a newer version of mednafen. With the current version, with no scaling it always wants to output a 320x232 4:3 aspect ratio, which when doubled looks ugly.

The current version allows you to disable the aspect ratio correction and output the original resolution. This looks perfect and clean and similar to what you would see with temper in ginge without the choppiness, but its not 4:3. However using the SDL scaler to scale this to 4:3 looks pretty good in my opinion.
I tried the pickle launcher version.

I didn't over clock so that is why the choppy framerate I guess.

If I output the original resolution won't I get a tiny little 1" screen? What is needed is a straight 2X as then all of the pixels are an even size. When you stretch to 4:3 you get uneven pixels both X and y (which is stupid as in the y direction a straight integer 2X would almost give a full screen height as it is so close, the extra blockyness for 1mm of screen height is silly). The better way would to be to double evenly 2X vertical then stretch only in the x direction for 4:3. That filter just makes everything blurry.

Right now CD in Temper is perfect speed with UNDERCLOCKING, it only has frame rate fluctuation issues due to Ginge. My opinion is that you would be better off porting Wiz Temper to the Pandora if Exophase would agree to give you the source. Then the only major work would be to get it running natively on the Pandora without Ginge. When you did you wouldn't have to worry about speed at all. That would give you a much better result.
 
Last edited by a moderator:
Here is another release- r2b

I moved to mednafen 0.9.16-wip and it fixed several issues.
Scaling issues should be fixed. The newer version allows you to turn off the aspect ratio correction which was making things ugly when scaled.
Speed is better, now CD games (at least the ones I tried) work well when overclocked (I was using about 750Mhz)
If you modify the config file, you will want to modify the pce_fast entries instead of pce.
To play CD games, you will need to copy a cd bios file to appdata/.mednafen/bios/syscard3.pce

Let me know if you find any games that don't work. I haven't found any issues so far in my limited testing.

Update: Oops, I did not have the appdata directory set correctly. Please grab r2b below.

mednafen-pce_r2b.pnd
Source - mednafen-pce-r2b-src.tar.bz2
 
Back
Top