Please try my NES emulator HDNes

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Please try my NES emulator HDNes

Post by thefox »

Trevor_NT wrote:I'm not really interested in HD graphics, but to be able to play NES games with their original graphics and no flicker would be quite revolutionary.
Not that revolutionary. Nestopia, for example, has had this feature for ages: Machine => Options => No Sprite Limit. Nestopia's implementation is slightly questionable, though, because the setting also affects the sprite overflow flag which could cause some games to break.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Please try my NES emulator HDNes

Post by tepples »

I think FCEUX has a "disable 8 sprites limit" switch, which eliminates flicker due to overdraw limit. It might be one of the things that old vs. new PPU changes. It won't eliminate intentional flicker where a sprite isn't drawn at all in one or more frames, like injured Mario in SMB1 or the smoke and explosions in Thwaite; for that, you need a motion blur filter as seen in GBA emulators.
Trevor_NT
Posts: 5
Joined: Mon May 26, 2014 2:21 am

Re: Please try my NES emulator HDNes

Post by Trevor_NT »

thefox wrote:
Trevor_NT wrote:I'm not really interested in HD graphics, but to be able to play NES games with their original graphics and no flicker would be quite revolutionary.
Not that revolutionary. Nestopia, for example, has had this feature for ages: Machine => Options => No Sprite Limit. Nestopia's implementation is slightly questionable, though, because the setting also affects the sprite overflow flag which could cause some games to break.
I know some emulators have this option, but... maybe I'm being silly, but does it actually work?

I'm talking, off the top of my head, about games like Konami World 2, Super Dodge Ball (https://www.youtube.com/watch?v=ARmZjy2HF_4) and Guerilla War/Guevara, which are flickerfests I never could solve. Also, there is this effect with the tiles in the background, in which they blink distractingly when scrolling into the screen (You can see it here, right side of the screen: http://youtu.be/8BOv7GuhdB0 . Also, notice the UI permanently glitching on the lower left corner.)

Anyway, if HDNes could have a mode like I described and it brought any gains in the sense of more stability to the graphics, that would be awesome.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Please try my NES emulator HDNes

Post by tepples »

The effect at the right side of SMB3 is a consequence of the fact that the NES has enough video memory for two screens. Because SMB3 levels are two screens tall, it stacks the two screens on top of each other. This means a 16-pixel-wide color area straddles the scrolling seam between the left and right sides of the screen. And often this color area will end up discolored because making it correct for one side will make it incorrect for the other side.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Please try my NES emulator HDNes

Post by MottZilla »

Super Dodgeball looks like it flickers because there are too many sprites to display in a frame, and then it also might flickers due to the sprite scanline limit. Eliminating the scanline limit would reduce flicker only slightly. You'd need a specific emulator hack/feature on a per game basis that would allow the game to draw and display all characters every frame. It could be done.

I'm not sure if Guerrilla War is the same deal but it's likely.

The SMB3 glitches, the palette issues could be hidden by not drawing that edge of the screen. Some emulators allow this by an option menu. The glitch in the bottom status bar is related to IRQ and PPU timing. This can be fixed in emulation by changing the way the PPU behaves.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

The flickering glitch can't be corrected by graphics pack function. This is because the function replaces graphics, so it only works on objects which are visible in the original. On the other hand, the palette glitch can be corrected by defining a default replacement for the tile regardless of the actual palette being used.
Trevor_NT
Posts: 5
Joined: Mon May 26, 2014 2:21 am

Re: Please try my NES emulator HDNes

Post by Trevor_NT »

MottZilla wrote:Super Dodgeball looks like it flickers because there are too many sprites to display in a frame, and then it also might flickers due to the sprite scanline limit. Eliminating the scanline limit would reduce flicker only slightly. You'd need a specific emulator hack/feature on a per game basis that would allow the game to draw and display all characters every frame. It could be done.

I'm not sure if Guerrilla War is the same deal but it's likely.

The SMB3 glitches, the palette issues could be hidden by not drawing that edge of the screen. Some emulators allow this by an option menu. The glitch in the bottom status bar is related to IRQ and PPU timing. This can be fixed in emulation by changing the way the PPU behaves.
That's why I gave that suggestion. I understand that HDNes, by overlaying the original rendering system with new graphics, also bypasses all these glitches.

If there was a mode in which the original graphics were automatically rendered in this new system, as if they were a graphics pack, like the one created for Super Mario Bros... see what I mean?
Trevor_NT
Posts: 5
Joined: Mon May 26, 2014 2:21 am

Re: Please try my NES emulator HDNes

Post by Trevor_NT »

mkwong98 wrote:The flickering glitch can't be corrected by graphics pack function. This is because the function replaces graphics, so it only works on objects which are visible in the original. On the other hand, the palette glitch can be corrected by defining a default replacement for the tile regardless of the actual palette being used.
Wait... you mean that Super Dodge Ball with an HD graphics pack would glitch in the same way?

Edit: Let's be clear. If I create from scratch an HD graphics pack for a game like Super Dodge Ball, would these new graphics also glitch?

If not, wouldn't it be possible to create a function in the emu that extracts the original graphics, the tiles and such, organizes and allocate them on the fly in RAM, and displays them as if they were a graphics pack, to bypass these glitches?

Again, sorry for talking theoretically, I'm travelling and can't test HDNes here.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Please try my NES emulator HDNes

Post by MottZilla »

It would have the same flickering because the game exceeds the amount of sprites that can exist on the screen at one time. You can place 64 sprites anywhere on the screen you want each frame. When a game has too many objects to drawn than will fit into this list, some don't get drawn. So it will cycle through these objects to draw them in a way where they all get a turn to be seen.

This means the game needs to have its programming changed so that when it goes to draw objects (building the Sprite RAM table) that it builds an even bigger table to send to the emulator's modified PPU which can draw all the objects. That's the basic idea.

The flickering isn't a "glitch". The flicker is the result of the hardware limitation of the NES PPU. It could be improved in emulation with per-game attention.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

Yes, it is beyond the scope of the graphics pack function to eliminate flickering as MottZilla posted.

How does motion blur filter on GBA emulator work? Do you think it would help if I paint the previous frame with 50% transparency on top of the current frame?
Trevor_NT
Posts: 5
Joined: Mon May 26, 2014 2:21 am

Re: Please try my NES emulator HDNes

Post by Trevor_NT »

Oh, I get it now. I thought a rendering system that made the HD packs possible would be some sort of overlay that necessarily had the side effect of eliminating the glitches, but I was obviously wrong.

Just saw this video, and at 00:00:16, when Link gets close to the enemy and attacks, the sprite flickers.

http://youtu.be/DknjUcQ7jaw

But, anyway... seeing this game with those improved graphics is quite a revelation. HDNes is a very cool project, congrats.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

Trevor_NT wrote:Oh, I get it now. I thought a rendering system that made the HD packs possible would be some sort of overlay that necessarily had the side effect of eliminating the glitches, but I was obviously wrong.

Just saw this video, and at 00:00:16, when Link gets close to the enemy and attacks, the sprite flickers.

http://youtu.be/DknjUcQ7jaw

But, anyway... seeing this game with those improved graphics is quite a revelation. HDNes is a very cool project, congrats.
Thanks. I'm really impressed by the video too. And I'm very surprised that he actually works out how to replace sound tracks. It requires in depth knowledge of the games.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Please try my NES emulator HDNes

Post by tepples »

mkwong98 wrote:And I'm very surprised that he actually works out how to replace sound tracks. It requires in depth knowledge of the games.
Replacing music is the same skill set as ripping NSFs. In fact, if you have an NSF, you already know how where to look in the code to remove the game's own music player and replace it with writes to the "play track" register.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

tepples wrote:Replacing music is the same skill set as ripping NSFs. In fact, if you have an NSF, you already know how where to look in the code to remove the game's own music player and replace it with writes to the "play track" register.
Then I need to learn how to read NSF files. :)
Tygerbug
Posts: 61
Joined: Sun Jan 19, 2014 5:15 pm

Re: Please try my NES emulator HDNes

Post by Tygerbug »

I enjoyed your HD sprite pack for Kung Fu. Wouldn't mind seeing a video of that!

I sketched out some HD sprites for Super Mario Bros 3 ages ago, but haven't finished work on them yet. Been overwhelmed with things.
Post Reply