test rom 'scanline -1'

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

test rom 'scanline -1'

Post by Ti_ » Wed Sep 24, 2014 4:44 am

I don't know, maybe it's already exist, but I want to made my own test rom.
If someone can test it on hardware please post you results here.
The details readme of usage included in archive.
Attachments
test_scanline_-1_new.rar
(227.92 KiB) Downloaded 152 times
Last edited by Ti_ on Thu Oct 02, 2014 1:58 am, edited 2 times in total.
My profile on RHDN.

User avatar
Dwedit
Posts: 4393
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: test rom 'scanline -1'

Post by Dwedit » Thu Sep 25, 2014 11:33 am

If you're having problems with emulators allowing PPU VRAM updates during render time (including the prerender line), maybe you need to hack the game further so it disables rendering at the start of vblank, and re enables it at the end. It would have to be a really outdated emulator to let you write during render time.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

tepples
Posts: 22224
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: test rom 'scanline -1'

Post by tepples » Thu Sep 25, 2014 12:33 pm

Turning rendering off and on gives you 89 more cycles to update VRAM: dot 304 deadine to turn rendering on, divided by 3 dots per cycle, minus 6 cycles off and 6 cycles on. I had to make exactly this change to get NES15 running in a multicart, as the process I was using to call the NMI handlers for both games in a bank took 10 extra cycles, which caused the updates to just barely run over vblank time.

Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: test rom 'scanline -1'

Post by Ti_ » Thu Sep 25, 2014 1:40 pm

Emulators have problems, not me. :D (I've already fix my problems).
I've just want to know is test works fine on hardware , and for authors of 'accurate' emulators too see difference, and maybe they will try to make them more accurate.
My profile on RHDN.

User avatar
Quietust
Posts: 1664
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: test rom 'scanline -1'

Post by Quietust » Tue Sep 30, 2014 11:58 am

Just tried this on my CopyNES CNRAM cart, and I get different results every time I reset. These are the different results I've managed to get so far:

112 12 / 124 24 / 134 34 / 156 56 / 1FF FF / 3D5 D5 / 7D1 D1 / FAIL
124 12 / 154 54 / 3D1 D1 / 3D2 D2 / 3D3 D3 / 540 40 / 7D0 D0 / 4
124 12 / 178 78 / 1FF FF / 3D2 D2 / 3D3 D3 / 3D6 D6 / 5CD CD / FAIL
124 24 / 129 29 / 12E 2E / 15A 5A / 164 64 / 3D5 D5 / 7D0 D0 / C
151 51 / 164 64 / 3D1 D1 / 3D2 D2 / 3D3 D3 / 3D6 D6 / 566 66 / 56B 6B / 5
178 78 / 1FF FF / 3D1 D1 / 3D2 D2 / 3D3 D3 / 3D7 D7 / 5CD CD / FAIL

It should be noted that my test method does not work "properly" for any test ROM which expects to begin at exact poweron, because the CopyNES BIOS always takes control at startup and has to check whether it's in Play or Copy mode (which can also affect the contents of RAM).
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.

Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: test rom 'scanline -1'

Post by Ti_ » Tue Sep 30, 2014 1:46 pm

Quietust wrote:Just tried this on my CopyNES CNRAM cart, and I get different results every time I reset. These are the different results I've managed to get so far:

112 12 / 124 24 / 134 34 / 156 56 / 1FF FF / 3D5 D5 / 7D1 D1 / FAIL
124 12 / 154 54 / 3D1 D1 / 3D2 D2 / 3D3 D3 / 540 40 / 7D0 D0 / 4
124 12 / 178 78 / 1FF FF / 3D2 D2 / 3D3 D3 / 3D6 D6 / 5CD CD / FAIL
124 24 / 129 29 / 12E 2E / 15A 5A / 164 64 / 3D5 D5 / 7D0 D0 / C
151 51 / 164 64 / 3D1 D1 / 3D2 D2 / 3D3 D3 / 3D6 D6 / 566 66 / 56B 6B / 5
178 78 / 1FF FF / 3D1 D1 / 3D2 D2 / 3D3 D3 / 3D7 D7 / 5CD CD / FAIL

It should be noted that my test method does not work "properly" for any test ROM which expects to begin at exact poweron, because the CopyNES BIOS always takes control at startup and has to check whether it's in Play or Copy mode (which can also affect the contents of RAM).
Thanks. Your results looks more accurate.
124 12 / 178 78 / 1FF FF / 3D2 D2 / 3D3 D3 / 3D6 D6 / 5CD CD / FAIL
looks like for everdrive this will be as:
100 FF/ 124 12/ 178 78 / 1FF FF / 300 D6 / 3D2 D2 / 3D2 D2 / 3D2 D3 / 3D6 D6 / 5CD CD / (what exist in rom)
here's two additional writes that ED produce.
112 12 / 124 24 / 134 34 / 156 56 / 1FF FF / 3D5 D5 / 7D1 D1 / FAIL
112 12 / 124 12 / 12E 2E / 134 34 / 156 56 / 1FF FF / 356 D5 / 3D5 D5 / 700 D1 / 7D1 D1 /
and there's also very close. but for some reasons ed makes some extra strange writes.
My profile on RHDN.

lidnariq
Posts: 10080
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: test rom 'scanline -1'

Post by lidnariq » Tue Sep 30, 2014 2:23 pm

If you can make a version that will fit into a mapper 218 (CHRless) board with 8 KiB of PRG, I have a flash cart that I've been using for my own tests.

Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: test rom 'scanline -1'

Post by Ti_ » Thu Oct 02, 2014 2:01 am

I've uploaded updated rom, some fixes to match Quietust results, previous rom renamed.
My profile on RHDN.

User avatar
Zepper
Formerly Fx3
Posts: 3222
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: test rom 'scanline -1'

Post by Zepper » Fri Oct 10, 2014 11:28 am

Hmm... so, you mean writes to $2007 (scanline -1, rendering OFF), but what about reads? No writes are allowed at PPU $0000-$3FFF, or only at $2000-$3EFF???

Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: test rom 'scanline -1'

Post by Ti_ » Fri Oct 10, 2014 12:19 pm

Zepper wrote:Hmm... so, you mean writes to $2007 (scanline -1, rendering OFF), but what about reads? No writes are allowed at PPU $0000-$3FFF, or only at $2000-$3EFF???
Test does some reads too... About $0000-$1FFF I don't know it doesn't check because mapper is NROM.
But because ppu address changed + on each access it attemps to write different places into $0000-$7FFF?. But looks like it doesn't hit in palette vram.
Zepper wrote:rendering OFF)
rendering ON.
Last edited by Ti_ on Fri Oct 10, 2014 12:20 pm, edited 1 time in total.
My profile on RHDN.

User avatar
Zepper
Formerly Fx3
Posts: 3222
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: test rom 'scanline -1'

Post by Zepper » Fri Oct 10, 2014 4:08 pm

I don't think that rendering ON would change the $2007 behaviour on reads. How so? Plus, on $2007 writes, the PPU updates Y and X scroll bits at same time if rendering is enabled, but is the value written ignored so far???

User avatar
Dwedit
Posts: 4393
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: test rom 'scanline -1'

Post by Dwedit » Fri Oct 10, 2014 6:41 pm

Zelda 2 skips some scanlines while drawing the title screen because of some 2007 reads by the way...
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: test rom 'scanline -1'

Post by Ti_ » Sat Oct 11, 2014 2:15 am

Zepper wrote:I don't think that rendering ON would change the $2007 behaviour on reads. How so? Plus, on $2007 writes, the PPU updates Y and X scroll bits at same time if rendering is enabled, but is the value written ignored so far???
the fact is emulators allow writes (or shows incorrect result), while hardware not.

As I see it writes to vram , but value same as lower byte of target adress.

And for someone who starts with develop homebrew or romhacks for nes, and doesn't know about that rendering should be off (or should be finished before scanline -1) , and believe what emulators show.
This may result non-compatible with hardware games.
My profile on RHDN.

User avatar
Zepper
Formerly Fx3
Posts: 3222
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: test rom 'scanline -1'

Post by Zepper » Sat Oct 11, 2014 4:35 am

Is the PPU address (loopy_v) incremented when rendering is disabled?

Ti_
Posts: 36
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: test rom 'scanline -1'

Post by Ti_ » Sat Oct 11, 2014 5:32 am

Zepper wrote:Is the PPU address (loopy_v) incremented when rendering is disabled?
When rendering disabled you can write at any time. :D Address only auto-incremented on each write on +1 or +32.
My profile on RHDN.

Post Reply