Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
This ROM was produced during early development of a Game Boy port of Artemio Urbina's 240p Test Suite. Techniques demonstrated:
* Fading out the IPL logo
* Drawing text in a variable width font (VWF), also called
proportional font
* Copying tile data to VRAM during horizontal blanking
* Bank switching background tiles at line 72 using a STAT IRQ
* Drawing half of a character as background and the other
as flipped sprites
* Ease-in, ease-out, and overscroll bounce for window
* Making an excuse to skip leg day
* No exceptions in BGB
The effect looks great on a Super Game Boy, Game Boy Color, or PC based emulator. On GBC or GBA, press Left+B to hide miscoloration of flipped sprites. But it's a smearfest on a Game Boy Pocket, with these analog artifacts:
* Vertical smearing proportional to each pixel column's average
gray level. This appears to be inherent in passive matrix
super-twisted nematic (STN) displays.
* Darkening of gray areas when large white area present. I'm not
sure whether this is the fault of the Game Boy Pocket, which
supplies less power than other models, or of the EverDrive GB X5,
which draws more power than a single-game cart.
Ideal video, similar to SGB/GBC output
Download: Smear test executable and source code (31.4 kB)
Last edited by PinoBatch (2020-01-30 16:31:13)
Offline
If you haven't heard of 240p Test Suite, it's a tool for testing and calibrating monitors and scalers. But not everybody can run 240p Test Suite.
A. Someone owns a Super NES console, Super Game Boy accessory, and EverDrive GB, but no Super EverDrive or SNES PowerPak.
B. Someone owns a Nintendo GameCube console, Game Boy Player accessory, and EverDrive GB, but no GameCube homebrew device.
C. Someone wants to see exactly how much a Game Boy (DMG) or Game Boy Pocket suffers from motion blur and STN smear artifacts, or gloat over the GBC's utter lack thereof.
Hence the 144p Test Suite. It's just a start, but I've already got most of the easy ones (Grid, Linearity, Gray ramp, Solid screen, Sharpness, Grid scroll, Full screen stripes, About, and Credits) going, enough to give a sense of where the project is headed. And I plan to introduce a couple GB-exclusive tests for good measure.
Download: 144p Test Suite 0.01 ROM and source
Offline
PinoBatch wrote:
But not everybody can run 240p Test Suite.
A. Someone owns a Super NES console, Super Game Boy accessory, and EverDrive GB, but no Super EverDrive or SNES PowerPak.
This is not strictly true. The SGB contains facilities for downloading code into SNES RAM and running it. This should be enough to run a special version of the suite using only the hardware listed in A.
Offline
I'd be interested to see the "special version of the suite" that you make using the transfer and jump mechanism that Space Invaders uses. In particular, I'd like to see how something like that could be squeezed into 32K to fit on an MBC-less cartridge, or whether it'd need something bigger and MBC-ful like an EverDrive. Until then, I'm focusing on finishing the minimum viable product.
I came up with a GB/SNES counterpart to PB8, a CHR data codec used in some of my NES games. (PB8 is LZSS with a fixed distance and length of 1, or equivalently RLE with unary-coded run lengths.) To make RLE effective on Game Boy, TurboGrafx-16, or Super NES, you need to change the fixed distance to 2. I was inspired by the RLE tile codecs used in Master System games, which store the data bitplane-major before compression (like NES tiles) rather than row-major (like Master System and Game Boy tiles) and then reinterleave the data when copying it to VRAM.
I also dug up the text coder that I had for made for another NES project. Byte pair encoding (BPE), also called digram coding or (in the ROM hacking community) dual tile encoding (DTE), is a way of compressing text by mapping otherwise unused high-numbered code units to pairs of characters. For example, code units $20-$87 might be your ASCII code plus a few accented glyphs, and $88-$FF would represent pairs of characters. Recursive BPE, or digram tree encoding (DTE), also allows one or both of the pairs to refer to another (lower-numbered) pair.
0.02 (2018-04-14)
* Solid screen: Mention dead pixel test (requested by calima)
* Compress most tile graphics with PB16, saving about 1.25K
* Compress help text with DTE, saving about 3.5K
* Add tests: Shadow sprite, Hill zone scroll, Vertical scroll, and Stopwatch
Download: 144p Test Suite 0.02 ROM and source
It's only missing six tests.
darryl.revok's portrait of Gus, 128 tiles
Smaller version of mikejmoffitt's Green Hill Zone-alike, 109 tiles
Offline
Stick a fork in it 'cause I think it's done, unless someone wants to contribute a patch for SGB or GBC support. There's about 6K left without having to step up to an MBC.
0.03 (2018-04-17)
* Add Overscan, working around a mono hardware bug with WX=166
* Add Audio sync, Manual lag, Sound test, and Motion blur
* Help: When displaying the same page as last time, don't move the window out and back in
Download 144p Test Suite 0.03 ROM and source
Offline
It has come to my attention that someone does want to make a GBC port. To prepare for this, I have made some behind-the-scenes technical changes to 144p Test Suite.
0.04 (2018-04-29)
* No more tarbombing: Create zipfile with all files in an internal folder (requested by calima)
* Skip logo fadeout and SGB detection on Game Boy Color/Advance
* Overscan: Start border thickness at 2 instead of temporary values left in from testing
* Overscan: Draw bottom border with WX instead of LCDC (requested by ISSOtm)
* Stopwatch: Hide face with window instead of LCDC (requested by ISSOtm)
* Hide incomplete first frame with BGP and OBP0 instead of LCDC (requested by ISSOtm)
* Vertical scroll: Fix a buffer overflow causing the test to start paused
* Use de facto standard hardware.inc, with 'r' in front of all port names (requested by ISSOtm)
* Grid test pattern no longer uses Sharpness help screen
Download 144p Test Suite 0.04 ROM and source
Offline
Now on GitHub: pinobatch/240p-test-mini
Offline
I have begun work on adding Game Boy Color enhancements to the following activities:
* Activities using help engine (menu, About, Credits, Sound test)
* Vertical scroll
* Lame boy demo
I have determined that the following could benefit from enhancement (issue #2):
* Gray ramp
* Motion blur
* Solid screen
* Shadow sprite
* Hill zone scroll
I have further determined that the following tests, which were left out due to lack of color, should be included for feature parity with ports on other consoles (issue 1):
* PLUGE
* Gradient color bars
* SMPTE color bars
* Color bars on gray
* Color bleed
But I doubt that I will be able to fit everything in 32K. I started with 26K used and 6K free. After adding the GBC enhancements that I have added so far, I am up to 27.4K used and 4.6K free. Some of this is because some parts need GBC-specific graphics to distinguish, for example, white-as-backdrop from white-as-skin-color from white-as-shirt when two of them occur in the same tile. Once I near the 32K limit of easily obtained flash carts that are less expensive than SD adapters, could anyone here assist in code review to find things I could pack smaller?
Offline
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)
Download 144p Test Suite 0.05 (ROM and source)
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.
Offline
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)
* LR35902 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
Download 144p Test Suite 0.06 (ROM and source)
Offline
Great Hierophant discovered a bug in Manual lag test. If you press A the tenth time for a result of 0, the palette will be all black, making average time unreadable. This will be corrected in the next release.
Offline
240p Test Suite (NES, GB, GBA) v0.17
A minor update, largely to track updates to the Genesis version. Also includes continued size optimizations in the Game Boy version.
Highlights:
* Sharpness: A to show brick wall pattern (Genesis 1.16 parity)
* Stopwatch: Add third ruler setting to show in even frames (Genesis 1.16 parity)
* Audio sync: Move ceiling up (Genesis 1.16 parity)
* Begin to unify help conversion tooling
* Unify version numbers
* Help (GB): Compress document titles with DTE
* Gray ramp (GB): Use Color tests map loader for GBC version
* Solid screen (GB, GBA): Explain what a bad high voltage regulator does to SGB and GB Player border (requested by ISSOtm)
* Stopwatch (GB, GBA): Draw even frame numbers in blue and odd in red (Genesis 1.16 parity)
* Manual lag (GB): Fix all-black result screen if final press was 0 lag (reported by Great Hierophant, echoing Quietust's NES report)
* GB: ISSOtm golfed SGB detection by 3 bytes; numerous other size optimizations and tile sheet unifications
Download: GitHub release | ROM and source (zip)
Offline
240p Test Suite (NES, GB, GBA) v0.18
Add one new test from the Genesis version. This time it was the NES version's turn for size optimization.
Highlights on all platforms:
* PLUGE: Add PLUGE Contrast sub-test with shark graphic (Genesis 1.16 parity)
* Want your name in the credits? Become a patron
Highlights on specific platforms:
* GB: Mention worse smearing on Game Boy Pocket and other help tweaks
* Overscan (NES): Select to invert grays; border contrasts with BG
* Sharpness (NES): Pixel-align emblem at center
* Manual lag (NES): Remove misleading DDR-style grading
Behind the scenes:
* VWF (GB): Glyph address calculation uses 16-bit shift instruction
* VWF labels (GB): Reduce stack use, including moving tile width from stack to register C (requested by ISSOtm)
* PB16 (GB): Fix padding for odd-length packets
* gbcnamtool (GB): Fix vertical flip and conversion without incruniq
* GB: More refactoring and other size optimizations (with ISSOtm's help)
* Help (NES): Compress text with DTE; update Gus look to match GBA
* Linearity, Sharpness, Stopwatch, Crosstalk (NES): Compress map with new iu53 codec
* NES: Move several tests' code to UNROM bank 2 to make room in fixed bank
* Linearity (NES): Construct grid CHR from gridless CHR
* Stopwatch (NES): Reduce tiles of sprite circles (the "hand")
* NES: Move rectfill-based screen layouts to UNROM bank 1
* NES: Organize "library" code shared by my other projects into a separate part of the fixed bank
* NES: Move most local variables to zero page for smaller code size: now below 40 KiB
* NES: Rename some source files to match their GB/GBA counterparts
Download: GitHub release or ROM+source zipfile (513 kB)
Offline
240p Test Suite (NES, GB, and GBA) v0.19 is out
It took another heroic compression effort, but I freed enough space to add Super Game Boy support to all tests that would benefit from it.
Highlights on all platforms:
* Stopwatch: Bolder digits
* Help: Standardize phrasing: "stuck pixels", "hide or show", "start or stop"
* Help: List patrons as of release time
Highlights on specific platforms:
* GB: Super Game Boy colorization and border
* Backlight zone (NES, GB): Increase starting size to 2 pixels
* Color bleed (GBA): Fix frame # covering everything
* PLUGE Contrast and Vertical scroll (GBA): Center pattern horizontally
* README (GB, GBA): Explain rationale behind "144p" and "160p" titles
Behind the scenes:
* Help (NES, GB): Integrate Johnathan Roatch's faster DTE compressor written in C
* Linearity (GB): Compress with reflection
* GB: Improve incruniq tilemap compression
* GB: Compress font and large graphics with nibble-wise Huffman coding
* GB: Move variables to HRAM; other code size optimizations
* GBA: Use a more common makefile
* GBA: Specify each PNG's conversion settings in a grit file
Download: GitHub release | ROM and source zipfile (553 kB)
Offline
144p Test Suite v0.20
I wanted to get a few changes in before the deadline for inclusion on an NES multicart.
Highlights (GB):
* Add SGB-only Chroma crosstalk test
* Help: Blink Gus's eyes
* Help: Wait to draw status line until Huffman decoding finishes
Behind the scenes:
* GB: Move common routines to RSTs
Download ROM and source zipfile (581 kB) or from the GitHub release
Offline
144p Test Suite v0.21
Highlights (GB):
* Add Convergence pattern
* Overscan: Change WX in hblank to hide a 1-line-tall glitch (reported by LIJI32)
* Stopwatch: Make hours digit work
* Lame boy: Glove contrast; vest and sleeve trail; squash bottom when on ground; involve the abdominal and back muscles
* Help: Make some descriptions more concise (with Artemio's help)
* SGB border: Simplify title to reuse more tiles and more closely match the recent Genesis version
Behind the scenes (GB):
* Disable -static when building DTE encoder on macOS (#24)
* Vertical scroll (GB): Compress tilemap with PB16
* Help: Move non-ASCII symbols to $18-$1F to free DTE codes; coalesce repeated lines of text; compress each line of text twice and keep the smaller; assume no document has more than 9 pages
* GB: Share code for "Select: Invert grays" and for scroll tests' speed control
* SGB packet sending: Use ring counter
* GB: Switch to smaller ADC/DAA binary to decimal converter
* GB: Numerous micro-optimizations
* GB unused.py: Recognize more optimization opportunities
* GB: Allow use of out-of-PATH copy of RGBDS
Download ROM and source (599 kB) or from the GitHub release
Offline
v0.22
This release adds MDFourier to the Game Boy port.
Highlights (GB):
* Color bars: A to toggle NTSC 7.5% setup
* Color bleed: Rearrange to 10 rectangles
* Add MDFourier audio test
* Add a back story for Gus
* Document deliberately replaced assets
Behind the scenes (GB):
* Change random formula to reflect new cc65
* Continuing micro-optimizations
* Free space occupied by RSTs and interrupts that won't be used
* Migrate to RGBDS 0.4.0 (no dedent, no duplicate section names, rename GLOBAL to EXPORT)
Download ROM and source zipfile (691 KiB) or from the GitHub release
Last edited by PinoBatch (2020-11-04 21:52:34)
Offline
v0.23
It's been a long time coming.
Highlights:
* Credits: Display version from Git commit tag and ID
* Credits: Pino has moved to the Fediverse
* Add SGB sound test
* Add health warning to Motion blur and Chroma crosstalk
* Motion blur: increase duration cap to 60 frames (requested by zeta0134)
* Shadow sprite: replace GB Gus and GBC Gus with Donna
* Shadow sprite: move Green Hill Zone and Donna tiles to $8800
* Rename Manual lag test to Timing and reflex test to reflect how it is used
* Backlight zones: add speed control for measuring afterglow time
* Sound test: add surround option
* MDFourier: play sync pattern when menu opens
* Delay SGB detection by 8 frames for increased compatibility
Download ROM and source zipfile (711 KiB) or from the GitHub release
Offline