128- and 64-color palettes can share color memory with other palettes (saturnringlib/srl_cram.hpp:173-264)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
The bug sits in saturnringlib/srl_cram.hpp, lines 173-264, in GetBankUsedState, SetBankUsedState and GetFreeBank. Check the 128-color and 64-color shift expressions against the 16-color block indexing, then make GetFreeBank call GetBankUsedState instead of repeating the masks. Done when allocating a 16-color palette followed by a 128-color palette marks blocks 2-9, and the next 16-color allocation skips them.
Written by the indexing model from the issue text.
Description
- What this is: CRAM (color RAM, where palettes live) is tracked with a bit mask, one bit per 16-color block.
- Problem: The bit shift is wrong. A 128-color bank uses (bank&1)<<1 where it needs <<3, and a 64-color bank uses (bank&2)<<2 where it needs (bank&3)<<2. Example: allocate one 16-color palette (bank 0), then a 128-color palette. The 128-color palette lands at colors 128–255 but only marks blocks 2–9 as used. The next 16-color palette can then get block 10, which sits inside the 128-color palette.
- Fix: Correct the two shifts in GetBankUsedState and SetBankUsedState. Make GetFreeBank call GetBankUsedState instead of repeating the masks, since the copied masks are where the bug lives.
- Dominant language
- C++
- Stars
- 90
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ReyeMe/SaturnRingLib
-
bug required hardware test
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ReyeMe/SaturnRingLib#148 ·
-
bug required hardware test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ReyeMe/SaturnRingLib#146 ·
-
bug required hardware test
Difficulty 1/5 Under an hour Newbie friendliness 82/100
ReyeMe/SaturnRingLib#145 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ReyeMe/SaturnRingLib#144 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ReyeMe/SaturnRingLib#149 ·
All issues in ReyeMe/SaturnRingLib
Similar issues
-
comp-formats
Difficulty 2/5 Half a day Newbie friendliness 64/100
ClickHouse/ClickHouse#131694 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ETSInitiative/PETSIRD#243 ·
Maintainers usually reply within 1 day
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug engine::whispercpp runtime::rocm wg::platform-core
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lemonade-sdk/lemonade#4168 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ROCm/rocm-libraries#15866 ·
Maintainers usually reply within 2 days