extbgtest test ROM for Mode 7 extbg

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

extbgtest test ROM for Mode 7 extbg

Post by rainwarrior »

I made this test to verify a few things about mode 7 and extbg a little while ago. I discussed it on the SNESdev discord, but I figured I should leave some documentation of it here in case it's helpful to anyone else.

Links:

Code: Select all

Shows colours and layering of Mode 7 with EXTBG.

The row marked 0 uses pixel values from 0-127
The row marked 1 uses pixel values from 128-255
The BG palettes for 128+ are darkened to show that BG1 is using them even with EXTBG enabled
The 4 movable sprites are on their numbered layer.

Select = toggle direct color
Start = toggle BG1 or BG2
A/X/Y/B = select sprite 0/1/2/3 to move
d-pad = move sprite


Expected results:
- Indexed BG2
  * Sprites 0,1 in between, 2,3 on top.
  * Layer strips 0 and 1 have identical colours (indicates high bit of palette is forced to 0 on BG2).
- Direct BG2
  * Direct colour disallowed, indexed colours on DC data. (Grey with green, yellow, and cyan streaks.)
- Indexed BG1
  * Sprite 0 behind, 1,2,3 on top.
  * "Layer 1" strip is slightly dim (indicates using full 8bpp palette, not just 7bpp).
- Direct BG1
  * Like indexed BG1 but slightly darker due to reduced range of direct color.
extbgtest_bg1.png
extbgtest_bg1.png (4.75 KiB) Viewed 1265 times
extbgtest_direct_bg2.png
extbgtest_direct_bg2.png (4.4 KiB) Viewed 1265 times
Last edited by rainwarrior on Tue Aug 16, 2022 2:38 pm, edited 2 times in total.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: extbgtest test ROM for Mode 7 extbg

Post by Pokun »

Nice test app, I would think the blue and yellow one have swapped buttons though?
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: extbgtest test ROM for Mode 7 extbg

Post by rainwarrior »

OK. I added sprite numbers to the readme to clarify their button assignments.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: extbgtest test ROM for Mode 7 extbg

Post by Pokun »

i meant that the sprite colors seems to have been chosen to match the colors of the 4 face buttons (except on NA SNES), but only A and Y matches, B and X are swapped.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: extbgtest test ROM for Mode 7 extbg

Post by rainwarrior »

Oh, that's interesting. I hadn't thought about that... (I'm used to the north american purple buttons.)

The chosen colours were entirely a coincidence.

Edit: Updated the ROM. Didn't feel like redoing the screenshots or sprites, so I went with the anti-clockwise button order A/X/Y/B that happened to match what was already there.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: extbgtest test ROM for Mode 7 extbg

Post by Pokun »

Oh I see, I was almost sure the colors were chosen on purpose. :) Well I guess red, green, blue and yellow are the 4 most recognizable colors for humanity.
It does feel more intuitive after the update to me, being used to associate the 4 SNES logo colors with the buttons.
Post Reply