Now that I've got a stable emu, some questions have come to mind. Here they are:
1.- I've decided to work on my emu's PPU accuracy, following Brad Taylor's excellent PPU reference doc. My PPU implementation is scanline based (I'll work on a pixel based engine once I get a stable scanline based one). Till now, I was running my emu like this: RunCPU(cycles)->RenderScanline()->ActualizeScroll() (where cycles means 114-114-113, you know..). Now, I've added some HBlank handle, I mean, I do: RunCPU(85)->RenderScanline()->ActualizeScroll()->RunCPU(cycles-85) (where 85 comes from 256/3). This has made 'Excitebike' to work fine, now the lower horizontal line on Nintendo logo scrolls properly but, at the same time, has made some other games not to work properly: the lower status coin scanline on SMB1(U) scrolls while it shouldn't, the same happens on Castlevania(U), FAU demo (by Memblers) doesn't show anything, etc... My questions here are: why these additions have not made my emu more accurate? Am I missing anything? (well, I know a scanline engine is not the most accurate one, but should work with those programs).
2.- Before using 114-114-113, I used just 114. With this, all interlace demos worked fine. Now, using the new method, those demos show one of their lower frame scanlines scrolled. Why does this happen? Do those demos need pixel accuracy to work properly?
3.- Another accuracy issue. Independently of which cycling system I use, I get lots of wrongly scrolled scanlines on F-1_Race(U) when the car's taking a bend (excuse my english if that sounds weird..), but looks fine otherwise. Does anybody know what can be causing that?
4.- Well, I have some little questions regards the 6502, just to be sure I'm not confusing things. Is flag B set on reset? Is flag I set on NMI after the status byte has been pushed? If PHP sets flag B before pushing the status byte, does PLP clear B flag after poping the status byte?
I sure I'm missing some other questions that I can't remember now.. I know, I have not worked too much on these topics but, just in case any of you have had any of these problems, I'd like to hear what you think about them.
As always, lots of thanks for your comments.