소스 검색

Fix palette indexing bug

v2
부모
커밋
14258fca4e
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -1
      src/f6502.c
  2. +2
    -1
      src/nes.c

+ 1
- 1
src/f6502.c 파일 보기

@@ -228,7 +228,7 @@ static inline int f6502_write(nes_Memory* mem,
pal[16] = pal[20] = pal[24] =
pal[28] = 0xFFU;
} else {
pal[addr] = val;
pal[addr] = val & 0x3FU;
}

// Memory-mapped mirroring


+ 2
- 1
src/nes.c 파일 보기

@@ -87,8 +87,9 @@ static int nes_hsync(nes* sys, void* plat) {
// Emulate the happy part of the backdrop override quirk
int pal_idx = ((mem->addr & 0x3F00U) == 0x3F00U) ?
(mem->addr & 0x1FU) : 0;
LOGD("Background: %d", pal_idx);
// Don't use the rendering palette (masked transparency)
status = nese_frame_start(plat, mem->pal_bank[0x300 + pal_idx]);
status = nese_frame_start(plat, mem->pal_bank[0x300 + pal_idx] & 0x3FU);

} break;



불러오는 중...
취소
저장