Blargg PPU test roms. Where do they write results?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
domlebo70
Posts: 8
Joined: Thu Jun 17, 2010 12:19 am

Blargg PPU test roms. Where do they write results?

Post by domlebo70 » Sun Nov 26, 2017 9:05 pm

I am running Blargg's test roms. They work well. I am trying to incorporate them into my test suite. I need to programmatically assert if it passed or fail.

Which memory location is the result stored at?

Here are the test roms I am running: https://github.com/christopherpow/nes-t ... 005.09.15b

Here is my emulator if anyone cares: https://github.com/dbousamra/hnes

Donqustix
Posts: 9
Joined: Fri Jul 21, 2017 2:29 am

Re: Blargg PPU test roms. Where do they write results?

Post by Donqustix » Sun Nov 26, 2017 11:48 pm

https://wiki.nesdev.com/w/index.php/Emulator_tests
Output at $6000
---------------
All text output is written starting at $6004, with a zero-byte
terminator at the end. As more text is written, the terminator is moved
forward, so an emulator can print the current text at any time.

The test status is written to $6000. $80 means the test is running, $81
means the test needs the reset button pressed, but delayed by at least
100 msec from now. $00-$7F means the test has completed and given that
result code.

To allow an emulator to know when one of these tests is running and the
data at $6000+ is valid, as opposed to some other NES program, $DE $B0
$G1 is written to $6001-$6003.

domlebo70
Posts: 8
Joined: Thu Jun 17, 2010 12:19 am

Re: Blargg PPU test roms. Where do they write results?

Post by domlebo70 » Mon Nov 27, 2017 12:35 am

Ah great, thank you

User avatar
tokumaru
Posts: 11496
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Blargg PPU test roms. Where do they write results?

Post by tokumaru » Mon Nov 27, 2017 1:12 am

Donqustix wrote:
...$DE $B0
$G1 is written to $6001-$6003.
$G1?

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Blargg PPU test roms. Where do they write results?

Post by FrankenGraphics » Mon Nov 27, 2017 1:30 am

tokumaru wrote:
Donqustix wrote:
...$DE $B0
$G1 is written to $6001-$6003.
$G1?
Heptadecimal - It’s one louder, innit?
https://www.youtube.com/watch?v=XuzpsO4ErOQ&app=desktop


(i assume it’s f since they’re neighboring keys)
http://www.frankengraphics.com - personal NES blog

domlebo70
Posts: 8
Joined: Thu Jun 17, 2010 12:19 am

Re: Blargg PPU test roms. Where do they write results?

Post by domlebo70 » Mon Nov 27, 2017 1:52 am

Hmm. Do the PPU tests use the 6000 return value location as well? Or is it just the instruction timing ones?

I can see the instr timing ones do write there return value to 6000, but the PPU ones don't seem to.

Bavi_H
Posts: 120
Joined: Sun Mar 03, 2013 1:52 am
Location: Texas, USA
Contact:

Re: Blargg PPU test roms. Where do they write results?

Post by Bavi_H » Mon Nov 27, 2017 9:19 pm

Output at $6000
---------------
All text output is written starting at $6004 [...]
The test status is written to $6000. [...]
$DE $B0 $G1 is written to $6001-$6003.
I was confused at first because the quote doesn't appear on the wiki page. It looks like the quote comes from the readme.txt file inside some of the zip files available on that wiki page. So maybe this output method is only available in those tests that mention it in their readme.txt file.

tokumaru wrote:$G1?
In instr_timing.nes, it uses DE B0 61. I guess it's supposed to look like DEBUG1, but with similar-looking hex digit replacements.

Post Reply