144p Test Suite (was: STN torture test)

Discussion of programming and development for the original Game Boy and Game Boy Color.
tepples
Posts: 21752
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: STN torture test

Post by tepples » Wed May 30, 2018 5:17 pm

0.05 (2018-05-30)
  • Fix Linearity corruption after closing help (0.04 regression)
  • Add GBC enhancement for menu/help, Grid, Gray ramp, Solid screen, Motion blur, Shadow sprite, Scroll test, Vertical scroll test, and Lame boy demo (requested by calima)
I now have 1726 bytes left to make PLUGE, Gradient color bars, SMPTE color bars, Color bars on gray, Color bleed, and their respective help pages. I might not be able to fit everything unless someone can help me find where I'm wasting space.
Attachments
gb240p-0.05.zip
(140.46 KiB) Downloaded 356 times

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

Re: STN torture test

Post by tepples » Thu May 31, 2018 8:56 am

Does anyone here have a GameCube, a Game Boy Player, an EverDrive GB (or other Game Boy compatible flash cart), and a way to measure IRE levels? If so, I'd like you to try this, select "Solid color screen" (that is, White & RGB Screen) or "Motion blur" (which extends 100 IRE), and figure out what signal levels the GameCube is producing for shade 0 through 31. This should help me figure out the appropriate Game Boy Color RGB levels that correspond to 0, 7.5, and 100 IRE for the color balance tests.

And after adding draft help text for the (yet-to-be-developed) GBC-exclusive tests, I think I have about 600 bytes free. So yeah, I'll need help with the compression before I can turn my mockups into code.

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

Re: STN torture test

Post by lidnariq » Thu May 31, 2018 11:58 am

Yes to #s 1,2, and 4. I've been meaning to build something for #3 for a while but haven't gotten around to it.

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

Re: STN torture test

Post by tepples » Sat Jun 02, 2018 12:09 pm

I guess you could order a 32K cart with 144p Test Suite 0.05 and measure levels that way.

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

Re: STN torture test

Post by lidnariq » Sat Jun 02, 2018 1:01 pm

Or get around to building the simple design I floated 6 months ago...

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

Re: STN torture test

Post by tepples » Sun Jun 03, 2018 2:34 pm

It took heroic compression, but I was able to add the color balance tests with 127 bytes to spare.

0.06 (2018-06-03)
  • Add GBC-exclusive tests (PLUGE, Gradient color bars, SMPTE bars, Color bars on gray, Color bleed)
  • Assembly source files use .z80 extension for more convenient syntax highlighting
  • Backlight zone background is black, not green
  • Motion blur, Overscan, and Lame boy demo share 0-9 tiles
  • Better compression for tile maps using many tiles only once
  • Lame boy demo no longer shows RNG test
  • Eliminate some unnecessary ROM byte alignment
Attachments
gb240p-0.06.zip
(150.23 KiB) Downloaded 342 times

Great Hierophant
Posts: 745
Joined: Tue Nov 23, 2004 9:35 pm

Re: STN torture test

Post by Great Hierophant » Wed Jun 06, 2018 1:33 pm

I tried 0.06 in my GBC and I get a black screen after the manual lag test. It does not report the average latency, but I can get off the screen by pressing a button. Otherwise the new features are good. The test works as intended on my AGB-001 and AGS-101

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

Re: STN torture test

Post by tepples » Wed Jun 06, 2018 4:11 pm

After a bit of experimentation, I got it to trigger on a DMG too. It has nothing to do with the Game Boy model and everything to do with the lag value on the final press. When the reticles are overlapping while audio is on, the background is black for one frame (see megaton.s lines 261-274). If an A press during this frame causes the test to advance to the result screen, the screen remains black because the result screen does not modify the palette.

This is fixed in this commit, and the fix will be included in the next release. Thank you for reporting this.

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

Re: STN torture test

Post by tepples » Sat Jun 30, 2018 2:33 pm

I decided to skip versions 0.07 through 0.16 in order to align numbering with the NES suite. Version 0.17 fixes, among other things, the black screen in Manual lag when the tenth A press is at 0 frames. See the release announcement for details.

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

Re: 144p Test Suite (was: STN torture test)

Post by tepples » Mon Aug 26, 2019 12:10 pm

I've found that code golfing alone rarely frees enough space to add a new feature. Eventually I need to sit down and look at asset data to find patterns I can compress better. In my case, exploiting the reflection symmetry of Linearity and the fact that unique tiles tend to cluster together in a tilemap freed enough space to let me add Super Game Boy palettes, but not quite enough for a custom border.

(Emulator screenshots below. See also photos of a TV in this Tweet)
Attachments
144pTestSuite_SGB_screenshots.png
144pTestSuite_SGB_screenshots.png (9.48 KiB) Viewed 2750 times

User avatar
ISSOtm
Posts: 46
Joined: Fri Jan 04, 2019 5:31 pm
Location: France, right of a pile of consoles
Contact:

Re: 144p Test Suite (was: STN torture test)

Post by ISSOtm » Wed Aug 28, 2019 12:49 am

That attribute clash on the Green Hill test looks so "SGB"... I guess the reason why it's so noticeable, though, is because you're only encoding horizontal strips?
The French Lord of Laziness (and a huge Legend of Zelda fan)
https://github.com/ISSOtm
ASMu is laifu <3

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

Re: 144p Test Suite (was: STN torture test)

Post by tepples » Wed Aug 28, 2019 5:07 am

Correct. There's not much more I can do when the display can scroll under the attributes.

SGB attribute clash is both better and worse than attribute clash on another well-known video game platform with an 8080-family CPU: the ZX Spectrum. It's better because I have three foreground colors per 8x8 pixel area, but it's worse because I can't quickly update the whole screen's attributes in response to camera movement.

User avatar
ISSOtm
Posts: 46
Joined: Fri Jan 04, 2019 5:31 pm
Location: France, right of a pile of consoles
Contact:

Re: 144p Test Suite (was: STN torture test)

Post by ISSOtm » Thu Aug 29, 2019 12:57 am

Oh, yeah, I forgot it could scroll. If so, then I guess this is the least awkward-looking way.
The French Lord of Laziness (and a huge Legend of Zelda fan)
https://github.com/ISSOtm
ASMu is laifu <3

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

Re: 144p Test Suite (was: STN torture test)

Post by tepples » Mon Sep 09, 2019 8:56 pm

When I originally started the Game Boy port, I thought I wouldn't be able to fit both full SGB enhancements and full GBC enhancements. But I've since gained a level in data compression. After some heroic Huffman coding of several activities' CHR data, I ended up squeezing in a border.
bgb00002_8.png
bgb00002_8.png (6.34 KiB) Viewed 2122 times
The Huffman coding could in theory benefit the NES version as well, but I'm not doing it there because right now, the cache of Huffman decoded data occupies about 7K out of the Game Boy's 8K WRAM. Without a cache, changing from one activity to another or closing the help screen is painfully slow, as in half a second on a blank screen.

Post Reply