It is currently Sat Dec 16, 2017 1:48 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: phibiaNES emulator.
PostPosted: Tue Apr 29, 2014 1:50 pm 
Offline

Joined: Tue Apr 29, 2014 1:31 pm
Posts: 47
I am currently working on a NES emulator. This is my first emulator in general. Working already some time on it.
It is in the state that it becomes a bit usefull.

Currently emulating:

* 6502 CPU
* 2A03 APU (Sampling up to 192kHz, but 96kHz downto 44.1kHz recommended, 192kHz strains apu emulation too much)
* NES PPU ( still not happy about it, performance wise )
* VRC6 extended audio (Castlevania 3 JP version, Esper Dream 2 - Aratanaru Tatakai and Mouryou Senki Madara)
* Mapper support list: 0, 1, 2, 3, 4, 5(partially), 7, 8, 21, 23, 24, 25, 26, 31, 34, 44, 52, 69, 71, 73, 85, 87
* Image enhancement filters: 2xSAI, Super 2xSAI, 2xBRZ, 3xBRZ, 4xBRZ, TV Scanline 50/75/75SR, Blargg NTSC, Doubler and Tripler.
* GPU acceleration thru Direct2D
* Loading and saving of gamestates ( still needs bug fixing, sometimes you have to load a state 5 a 6 times due PPU issues, needs looking into )
* Rewind emulation in steps of 5 seconds. Able to go back up to 100 seconds.
* Write APU logs
* Write APU Wave
* Loads really fast. ( got that goin' )
* Play considerable amount of NSFs
* AVI recording / on the fly encoding.
* Game Controllers (Gamepads, WIImote, etc)
* 1:1 / 8:7 aspect ratio.
* Very little PAL nes support. It does something but don't expect it to work perfectly.
* Phosphor lag emulation.
* 60 -> 30 fps pulldown for AVI recording also 30 fps (frameblend) option is available!

New release of phibiaNES beta #9 (unstable release)

added/changed:

* VRC7 audio
* ROM browser ( functional, but unstable )
* Open File now combines NSFs and ROMs (therefore removing the Open NSF option)
* Recent ROMs also show recent NSFs.
* Lots of emulation improvements.
* Fixed mapper #31 (CHR_ROM emulation)


Current issues:

* Very little PAL support.
* No Lightgun support. (can't figure that one out)
* Pausing emulation doesn't pause audio (sorry for that, repeating samplebuffer issue, should be easily fixed, but very low priority) <-- still not fixed @ 10-02-2015 (02-10-2015 american)

Included in the file:

* The emulator itself
* The "dropped" project.. The emulator for developers ( no waaaaay done yet... should not use it )
* My "NSF" player firmware routine for my emulator. (Folder resources)
* My "NSF" player source code for my emulator (Folder "Resources - Source")

Any ideas about it will be greatly appreciated. This is project for me too learn the innards of computing in general. I have to say.. It sounds easy to emulate/simulate a NES but it actually far from it. But very educational :D

To see a very old version in action:
https://www.youtube.com/watch?v=4Oi5FHf0V8M

Me playing / recording Crisis Force on my emulator:
https://www.youtube.com/watch?v=eZ83eJ-fvY8

>>> Latest beta download BETA 9b22 (unstable) <<<
Attachment:
pNES-beta9b2.7z [925.57 KiB]
Downloaded 45 times


>>> beta download BETA 9 (unstable) <<<
Attachment:
phibiaNES-beta9_unstable.7z [912.79 KiB]
Downloaded 103 times


>>> Latest stable beta download BETA 8b1 below <<<
Attachment:
pNES-beta8b1.7z [931.73 KiB]
Downloaded 149 times


Last edited by nIghtorius on Thu Jan 05, 2017 3:54 pm, edited 8 times in total.

Top
 Profile  
 
PostPosted: Tue Apr 29, 2014 8:36 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Be careful with your emulator name, it's already been used; doesn't matter if it's an abandoned project or not, when I saw the name I was like "there's already an emulator by that name, I remember it" -- http://www.3e8.org/pnes.html | http://freecode.com/projects/pnes

Stick with just calling it phibiaNES in full. :-)

P.S. -- Congratulations for being one of the (few) people who implemented Vsync (i.e. no tearing) correctly while in windowed mode on XP. It deserves mention because it's remarkable how many people screw this up. Edit: Oh, I take that back, it does have tearing but in a very bizarre way and very gradual, but it's still tolerable. You might be limited by SDL in this regard, so no hard feelings.


Top
 Profile  
 
PostPosted: Tue Apr 29, 2014 9:00 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19352
Location: NE Indiana, USA (NTSC)
That and use as an abbreviation for PocketNES, not to mention what a ROM or cartridge collection allegedly compensates for. During the GBA era, I made this title screen for PocketNES:
Image
Not my photo.


Top
 Profile  
 
PostPosted: Tue Apr 29, 2014 9:06 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Don't worry Tepples, pNES and A/NES will soon combine forces. ;-) Just had to say something like this because of the text on the pnes home page: I just wanted to finally expose pNES to the public (yeah sure, that wasn't intentionally phrased at all, nosiree...)


Top
 Profile  
 
PostPosted: Wed Apr 30, 2014 12:58 am 
Offline

Joined: Thu Feb 28, 2013 11:14 am
Posts: 43
Well, my vpnes emulator sounds even more hilarious. I don't have any intentions to change the emulator's name though.


Top
 Profile  
 
PostPosted: Wed Apr 30, 2014 5:04 am 
Offline

Joined: Tue Apr 29, 2014 1:31 pm
Posts: 47
About the tearing and stuff.. I do use SDL for audio, but not for display. for Display I use GDI ( worst case scenario ) or direct2d (Not D3D, OGL)
maybe I would implement these later on. but for now.. I stick with D2D graphics as GPU acceleration option.

This means that accelerated options (and therefore proper vSYNC) is only supported with Windows 7 or higher. sorry bout that :)

With windows XP it probably will fallback to GDI with framerate syncronisation at precise 60fps. if your display does 59.9995 hz or something like that. You might see weird tearing (not your normal one though)

You can see the currently used render mode below the application screen:
Attachment:
pnesdown.png
pnesdown.png [ 2.19 KiB | Viewed 4584 times ]


For it to do its full glory it needs to be "Direct2D GPU mode"

Make sure that disable gpu acceleration is not enabled:
Attachment:
pnesopt.png
pnesopt.png [ 12.66 KiB | Viewed 4583 times ]


Top
 Profile  
 
PostPosted: Wed Apr 30, 2014 12:14 pm 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1058
Location: Minneapolis, MN
What other kind of pnes options are there?

:beer:

Maybe a piercing? Circumcision? A ring? Bifurcation? Erectile assistance implant? :lol:


Top
 Profile  
 
PostPosted: Wed Apr 30, 2014 3:17 pm 
Offline

Joined: Tue Apr 29, 2014 1:31 pm
Posts: 47
..... ok that's it.

OK guys. you had your fun :D
I will rename every p in front of NES to phibia.... Seems better that way... :?

Don't be too serious, ok?


Top
 Profile  
 
 Post subject: Re: phibiaNES emulator.
PostPosted: Wed Apr 30, 2014 3:30 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19352
Location: NE Indiana, USA (NTSC)
Thanks. Now there is no ambiguity. This should work.

So is there anything you need help with?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2014 8:20 pm 
Offline

Joined: Thu Apr 14, 2011 9:27 pm
Posts: 85
Congratulations on getting this far and, I'm sure, learning a lot along the way! Also congratulations at getting vsync working in a window, I still can't really manage that myself.
If you want some constructive criticism, I ran through my usual list of test games and here's what I saw.

First of all, here's a list of games I tried that didn't work at all.

Black screen:

Bad Dudes
Bee 52
Bill and Ted's Excellent Adventure
Bucky O'Hare
Burai Fighter (makes some sick sounding noises, probably executing data)
Big Nose Freaks Out (which doesn't work in my emulator currently either so that's no big deal)
GI Joe
Gremlins 2
Kickle Cubicle
Robocop 3
Zombie Nation

Other issues:
Driar freezes at title screen
Kick Master has graphical glitches then freezes in Level 1
Break Time gets stuck on the title screen in an infinite loop
You've made a mistake with MMC3 CHR banks which you will see when you get Kickle Cubicle working
Unforgivably, the default A and B button settings are backwards :)

Sound issues:
DPCM bass samples in Sunsoft games are out of tune
Very obvious aliasing artifacts (especially audible in Solstice), need to use a resampler
Triangle channel makes popping noises when enabled and disabled
APU hardware envelope seems to be missing on the noise channel and the noise channel is just too loud in general

That's probably enough to keep you busy poking around for a while.


Top
 Profile  
 
 Post subject: Re: phibiaNES emulator.
PostPosted: Tue May 06, 2014 2:39 pm 
Offline

Joined: Tue Apr 29, 2014 1:31 pm
Posts: 47
Thanks,

I have really looked into the audio of the NES.. Playing a lot of NES captured videos for sound. I have the DPCM samples in tune now (Rounding errors). But now I have small popping noises through my audio output. Therefore I will completely revise the APU code. Right now I use approximation logic. So that I don't have to fully compute the APU on a clock-to-clock base. But it seems this won't do as the aliasing/popping and out-of-tune.. Especially in low sample rates (lower sample rate means more approximation logic) @ 96000Hz it becomes alot better.

Still revising as it is.

Still trying to get Kickle Cubicle to run. Still don't know why this game hangs. Been debugging it for hours.. :( ( tracing execution step-to-step, It just goes from subroutine to subroutine to subroutine, pffff )

To return a favor:
It seems your emulator has timing issues with Ducktales I (sprite #0 shows too much, and the glitch above the statusbar when walking around isn't visible. It shows on a real NES though) and especially with Shalom.. Artifacts due to timing errors in the track.

And about the B, A default button mappings. That is just the way I prefer it.. I am used having the 'B' button next to my d-pad. As it is mirrored on my keyboard. I default configured it to still be next to the "d-pad" :)


Top
 Profile  
 
 Post subject: Re: phibiaNES emulator.
PostPosted: Thu May 15, 2014 7:58 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
Bill & Ted (and a lot of other MMC1 games) won't run unless you limit 6502 -> MMC1 writes to 1 per opcode.

Edit: Go here for windowed vsync with Direct3D.

viewtopic.php?f=3&t=9262&start=47

_________________
http://www.jamesturner.de/


Top
 Profile  
 
 Post subject: Re: phibiaNES emulator.
PostPosted: Thu May 15, 2014 10:59 am 
Offline

Joined: Tue Apr 29, 2014 1:31 pm
Posts: 47
I keep with my direct2d code. With GDI fallback for vista and lower. Since I target only newer windows versions. Maybe when the emulator becomes really compatible and all the kinks are being worked out. i might implement Direct3D / OpenGL renderers.

Got Kickle to run. Yay that is something. Had IRQ emulation issues. Fixed that though. Most of the problem games are.... Still problematic, but Kickle runs. And I did not see any glitches or some kind. It ran without hiccups. Therefore I don't see what mistake I made with the mmc3 characterbanking.


Top
 Profile  
 
 Post subject: Re: phibiaNES emulator.
PostPosted: Fri May 16, 2014 1:12 pm 
Offline

Joined: Thu Apr 14, 2011 9:27 pm
Posts: 85
You might have fixed it already, but the issue is that the mmc3 ignores the last bit of the CHR bank select registers when they're used for 2k banking. I've only seen this cause problems in Kickle Cubicle and the Capcom OST compilation ROM.


Top
 Profile  
 
 Post subject: Re: phibiaNES emulator.
PostPosted: Fri May 16, 2014 2:19 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19352
Location: NE Indiana, USA (NTSC)
Have you seen it cause problems in the MMC3 version of Holy Diver Batman mapper test?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group