Is this normal? [8 sprites related]

Discuss emulation of the Nintendo Entertainment System and Famicom.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil

Is this normal? [8 sprites related]

Post by Zepper »

A guy has posted a few screenshots of RockNES in action. He noticed that some sprite tiles aren't being displayed. My answer is about the 8 sprites limitation. Well, could someone look the pics and tell me if this is normal? In short words, the missing sprites are related with the 8 sprites limitation.

http://rocknes.phpbbnow.com/viewtopic.php?t=285
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

It is result of the 8 sprites per scanline limitation. It is normal.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

In Mega Man 2 at that point it flickers like crazy. Slowdown too if I recall correctly.
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

You can tell him that flickering and slowdowns can be (and have been) circumvented in emulators, but there are downsides.

Many emulators offer the option to not drop sprites when more than 8 of them are in a row, but the problem is that some games actually rely on sprites being dropped, and in these games, some masking effects will be lost (for example, Felix will be in front of bags when entering them, instead of being properly masked).

As for slowdowns, it's also easy for an emulator to overclock the CPU, but that will break games that rely on timed code. This could affect status bars and other raster effects. Here's an example of a possible glitch (since the CPU is running faster, the code that "waits" for the status bar to finish in order to split the screen finishes too early).
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

I think tepples suggested copying the Dendy's idea of adding more dead scanlines before VBlank as a way of helping with slowdown without resorting to overclocking. But to prevent pitch and audio problems you'd want to disable APU updates during this free cpu catch up time.
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Oh yeah, I forgot about that method. That should cause way less glitches than the other way.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

I recall there were some major problem with Super Spy Hunter (I think) when 8 sprites limit is disabled in an emulator. Something that affected to the gameplay - not allowed to shot when too many objects are on screen or something like that.

I once made an 'overclocked' build of NNNesterJ by someone's request. As I recall, I simply changed t-states table to make all the opcodes 1 cycle long, instead of actually overclocking the CPU with all the pitch etc related things. That removed slowdowns in Contra Force, but of course introduces bugs in some games.
tepples
Posts: 22993
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Post by tepples »

If you OC using a Dendy-style duplication of the post-render line, you'll want to disable OCing for the first couple seconds after power-on so that NTSC/PAL detection routines like those in Thwaite and some Codemasters games use a correct game speed and don't conclude "this is a Dendy; let's speed up the movement and music tempo". You may want to let the user specify after which line the cycles are to be inserted for a particular game, in case games time things based on a status bar scroll split at the bottom. You'll also want to disable OCing if the game has written to $4011 several times in the past frame, so that Caroll Spinney's voice in Big Bird's Hide and Speak doesn't screw up.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

You could always have as options different OverClocking Methods for the user to enable with descriptions for what games to use and not use them with. Ofcourse in the end the user can just quickly do trial and error.
3gengames
Formerly 65024U
Posts: 2284
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames »

You could just have it run the frame normal, but then give the CPU more time at the END of the frame since I thought most games spun on the NMI as a NMI_Wait subroutine of some sort, I know I do all the time.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

That what is suggested, it's what the Dendy does I think. As tepples said, if the game doesn't turn off the display early somehow then this will work fine. You can eliminate all slowdown this way since you can have an unlimited amount of CPU time in emulation.
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz »

i can say for sure the megaman 2 screenshot is totally normal. it happens on my real NES when i play and it happens in my emu.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil

Post by Zepper »

The Playstation version, Complete Works, has no flickering or slowdowns. It's quite amazing. :) Thanks for the feedback.
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Zepper wrote:The Playstation version, Complete Works, has no flickering or slowdowns. It's quite amazing. :) Thanks for the feedback.
Maybe those were reprogrammed instead of being emulated.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

Someone said the Program ROM data exists on the disc. It may indeed be emulation and it seems likely given that the source was possibly lost and also some of the "enhancements" are things you could still do while still using emulation. The only way to really know is to replace the data on the disc and try to run it with some other game.