Explorar el Código

Fix palette transparency bug

v2
Nathaniel Walizer hace 9 meses
padre
commit
e613f3054c
Se han modificado 2 ficheros con 19 adiciones y 1 borrados
  1. +1
    -1
      src/f6502.c
  2. +18
    -0
      src/linux/port.c

+ 1
- 1
src/f6502.c Ver fichero

@@ -198,7 +198,7 @@ static inline bool f6502_write(nes_Memory* mem,
// Copy to render reference
addr &= 0x1FU;
uint8_t* pal = mem->ppu.palette;
if (0 == (addr & 0xF)) {
if (0 == (addr & 0x3)) {
// TODO: Just initialize this
pal[0] = pal[4] = pal[8] = pal[12] =
pal[16] = pal[20] = pal[24] =


+ 18
- 0
src/linux/port.c Ver fichero

@@ -123,6 +123,24 @@ int nese_frame_ready(void* plat_data) {

t_last = t_now;
*/
/*
uint8_t* ptr = &plat->sys->core.memory.ppu.vram[0x3C0];
for (int y = 0; y < 16; y += 2) {
printf("%04lX", 0x2000 + ptr - plat->sys->core.memory.ppu.vram);
for (int x = 0; x < 8; ++x) {
printf(" %d %d", (*ptr >> 0) & 3, (*ptr >> 2) & 3);
++ptr;
}
ptr -= 8;
fputs("\n ", stdout);
for (int x = 0; x < 8; ++x) {
printf(" %d %d", (*ptr >> 4) & 3, (*ptr >> 6) & 3);
++ptr;
}
putc('\n', stdout);
}
putc('\n', stdout);
*/

SDL_BlitSurface(plat->screen, NULL, plat->target, NULL);



Cargando…
Cancelar
Guardar