Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Dmg-acid2 GB

From GameBrew
Revision as of 11:43, 12 September 2023 by HydeWing (talk | contribs) (Created page with "{{Infobox GB Homebrews |title=dmg-acid2 |image=dmgacid2gb.png |description=The Acid2 test, now for the original Game Boy. |author=Matt Currie |lastupdated=2020/04/18 |type=Test Roms |version=1.0 |format=DMG |license=MIT |download=https://dlhb.gamebrew.org/gbhomebrews/dmgacid2gb.7z |website=https://github.com/mattcurrie/dmg-acid2 |source=https://github.com/mattcurrie/dmg-acid2 |donation= }} {{#seo: |title=GameBrew |title_mode=append |image=dmgacid2gb.png |image_alt=dmg-ac...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
dmg-acid2
Dmgacid2gb.png
General
AuthorMatt Currie
TypeTest Roms
Version1.0
LicenseMIT License
SystemDMG
Last Updated2020/04/18
Links
Download
Website
Source

dmg-acid2 is a test for developers of Game Boy (DMG) emulators to verify their emulation of the Game Boy's Pixel Processing Unit (PPU).

For testing the Game Boy Color you can try cgb-acid2.

User guide

Emulator requirements

A simple line based renderer is sufficient to generate the correct output. This is not a PPU timing torture test requiring T-cycle accuracy, and does not perform register writes during the PPU's mode 3.

The test uses LY=LYC coincidence interrupts to perform register writes on specific rows of the screen during mode 2 (OAM scan).

Image components

Hello World!

The "Hello World" text is constructed from 10 objects, and the exclamation mark is part of the background. There is also an additional solid white object where the exclamation mark is. Due to the 10 object per line limit, the solid white object should not be drawn, allowing the background to show through.

Hair

The mohawk hair is not visible in the reference image. The hair tiles are part of the background. For rows 8-15, bit 0 of LCDC is reset, so the background should not be displayed, and instead color 0 from BGP should be drawn on the screen.

Eyes

The eyes consist of four background/window tiles, and objects overlapping color 0 background pixels.

The left eye is drawn using the background, and the right eye is drawn using the window (and also the right edge of the head beside the right eye). At the bottom of the eye, the WX register is set to an off-screen value, so the window is hidden until the WX register is set again for drawing the right side of the chin.

The background/window tiles for the left half of both eyes have color 0 for the pupil region of the eye. There are two dark grey colored objects that overlap the left half of both eyes that have the OBJ-to-BG Priority (bit 7) set in the OAM flags, so the object will only show through color 0 of the background/ window tile and replaces the white color.

The top half of each eye uses tile data from the $8000-8fff region of VRAM. The bottom half of each eye uses tile data from the $8800-97ff region of VRAM. The bottom half of the eye uses tiles with index $a1 and $a2 to test that signed tile indexes are displayed correctly.

Moles

The moles are not visible in the reference image, but can be seen in the failure case images.

The mole beside the left eye is visible if the background tile data is read from $8000-8fff instead of $8800-97ff.

The mole left of the nose is not visible because a blank object with a lower X-coordinate has priority, even though it is defined later in OAM than the mole object.

The mole right of the nose is not visible because a blank object at the same X coordinate has priority because it occurs earlier in OAM than the mole object.

Nose

The nose consists of four objects using the same tile data that is flipped vertically and/or horizontally. The top left corner of the nose contains the unflipped tile.

Mouth

The mouth consists of eight 8x16 objects. The left and right edges of the mouth contain unflipped tile data, and other objects use vertically flipped tile data.

For the left side of the mouth, the objects specify tile index 12, and the right side of the mouth specify tile index 13. Because bit 0 of the tile index is ignored for 8x16 objects, the whole mouth effectively uses tile index 12.

Chin

The right side of the chin is drawn using the window. After the right eye was drawn, the window was hidden by setting WX to an off-screen value. For the right side of the chin, the WX value is restored to an on-screen value. After the chin has been drawn, the window is disabled using bit 5 of the LCDC register so the window does not cover the footer text.

For the right side of the chin, the window has been updated to use the tile map from the VRAM beginning at $9800. Because 16 rows of window have already been drawn for the eye, the right side of the chin is rendered starting from address $9840.

Footer Text

For the footer text, the background is set to use the $9c00-9fff region for the map data, and tile data is set to come from the $8800-97ff region.

Failure examples

See the example table for some incorrect behaviour and the corresponding attribute/flag.

Credits

Håkon Wium Lie and Ian Hickson for creation of the original Acid2 web standards compliance test.

External links

Advertising: