unknown emulator bug

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
unknown emulator bug
by on (#13121)
First of all, i repeat my signature. my English is poor, so don't be crazy on me if you have a hard reading. And I'll be very happy if you understand what I want to say.

my nes emulator was finished several days ago. it is scanline base now for simpleness.
seems some game works well on it, such as
NROM: Balloon, Mario1...
MMC1: Dragon quest 4(japanese and english version), Zelda1,2...
UNROM: Castlevania1,Rygar, Dragon quest 2(japanese)
MMC3: Metal max(by data east), Shadow of ninja, Mario2

I test it with NESTRESS.NES downloaded from the main page. it is ok for all cpu and addressing mode test, as well as all ppu test except the SPRITE#0 hit. I think it is impossible for scanline base emulator to pass that test because VIRTUAL NES which is scanline base is fail, too.
I aslo test it with S0.NES, and seems it is ok because the result is same as what VNES and FCULTRA except for the mid-scanline effect. Aslo by considering this that I believe my ppu implement is correct as a scanline base emulator and the cause of the failure above is no mid-scanline-hit detect.


following is the problem on some games:

PAC LAND by NAMCOT in 1984-1985, title screen is normal, but after pressing START to start the game, it halt with a black screen.
CUBA SOLIDER by SNK in 1987, when power on or reset, the BG turn white and hold it there. It should display the blue 'SNK' sign then.

when implement CNRON(mapper 3). I test it with DRAGON QUEST 1(japanese) and Adventrue Island 1. both failed.
For dq1, the background trun black(not gray set in reset) but hold it there(should display the title).
For adventure island, the screen keep gray all the time.
UNROM is one of the simplest mapper, and I have check the code(less than 20 lines) again and again but found nothing(aslo read this part of VNES and NESTER source). So I believe that the bug in not in mapper implement, perhaps it is the same one as that holds Cuba Solider.

these are all early games(before 90), so I think that they doesn't use the quirks that not scanline base emulator could handle(and VNES could emulator them all). But with all the games and test result above, I can't figure out which part is the cause of this problem. (Adventure Island must be not relate to APU because even a semi-emulator without sound implement could display the title and start the game).

Please give me some advice for all about this. Thanks !
And Aslo Thank you for read all my broken words patiently.
Re: unknown emulator bug
by on (#13128)
darklink wrote:
my nes emulator was finished several days ago


What completely? Wow...

darklink wrote:
I test it with NESTRESS.NES...


Don't trust it. It's old, out of date and nothing gets a 100% rating from it.

WedNESday used to be scanline based and that was the cause of most of it's problems. When I went to pixel based everything was fine.

by on (#13147)
look on the wiki for blarggs test roms.

matt
Re: unknown emulator bug
by on (#13205)
WedNESday wrote:
What completely? Wow...

WedNESday used to be scanline based and that was the cause of most of it's problems. When I went to pixel based everything was fine.

it is very simple now.
151 official cpu opcode. with little optimization that data of instruction, zero page & indirect jump addressing mode and stack is directly from memory.
ppu without color emphasis(I don't know how it work exactly). and due to scanline base, any mid-scanline effect could not be emulated.
5 channel of apu, frame count and irq and length count is scanline-accurate(is this ok?). I test DMC channel only in ZELDA when Link shoots a sword wave. seems ok.
2 joypads.

I pay attention to speed as much as accuracy and hope getting balance. so I make it scanline base now with cpu ppu implemented in asm to reduce condition judge as many as possible, use mmx function, and so on. Nintendulator which is pixel base runs less than 50 fps at best on my old computer (*^_^*)

Quote:
Don't trust it. It's old, out of date and nothing gets a 100% rating from it.

I get it...Thanks !
But seems there is no newer tester on the main page. where could I get new ones ?

by on (#13206)
mattmatteh wrote:
look on the wiki for blarggs test roms.


Thanks.
I will go to find it although seldom used wiki before.

by on (#13207)
I have found the reason why Cuba Solider and Pac Land died. they both wait 2002.7 to be set with NMI enabled... I have read this in some material before. But treated it as a very special case and thought that little game would do this...

But Dragon Quest 1 and Adventure Island still not work.