Sprite priority bank 0 is set twice at startup

Open Beginner friendly
#150 0 comments 0 reactions 1 assignee View on GitHub

@seven-shades is already working on this.

Since Nov 17, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp

Research direction

Start in the VDP2::Initialize implementation and find the two sprite priority bank calls, where the second one incorrectly names SpriteBank::Bank0. Change it to SpriteBank::Bank1, then add a test that starts the library up and reads the SGL register copy extern uint16_t VDP2_PRISA;, expecting 3 in the low byte and 4 in the high byte. Done means bank 0 maps to Layer3 and bank 1 to Layer4, with the new test passing in the project's build/test setup.

Written by the indexing model from the issue text.

Description

bug required hardware test
  • What this is: VDP2::Initialize gives sprite priority banks their default layers. The docs say bank 0 gets Layer3 and bank 1 gets Layer4.
  • Problem: Both calls name SpriteBank::Bank0, so bank 0 ends on Layer4 and bank 1 is never set. Layer4 is also the default color condition, so RGB sprites get blended with the layers below whenever sprite color calculation is on. The docs promise they never do.
  • Fix: Change the second call to VDP2::SpriteBank::Bank1. Add a test that reads SGL's register copy VDP2_PRISA (extern uint16_t VDP2_PRISA;) after start-up and expects 3 in the low byte and 4 in the high byte.
  • If we skip it: Games that turn on sprite color calculation get half-transparent RGB sprites and can't tell why.
Dominant language
C++
Stars
90
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ReyeMe/SaturnRingLib

All issues in ReyeMe/SaturnRingLib

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.