|
Ok.
Well, I've runned my emu for the first time. Render algorithm seems to work fine, but there's a problem: it shows a 32x30 grid of the same tile, tile #0 to be exact. And it does nothing else. I've added some code to change Name Table values while pressing a key, and it works, it changes the displayed tile. I supose this problem has something to do with ports 2006 & 2007. I hadn't implemented them, so in order to run the emu I've coded the handler like this:
// 0x2006 - VRAM Address Register #2 (W2) case 0x2006: { CPU_Cont.Mem_Map[ 0x2006 ] = byte; if( PPU_Cont.VRAM_Byte_Selector ) { PPU_Cont.Temp_Address &= 0xFF; PPU_Cont.Temp_Address |= (byte<<8); PPU_Cont.VRAM_Byte_Selector=0; } else { PPU_Cont.Temp_Address &= 0xFF00; PPU_Cont.Temp_Address |= byte; PPU_Cont.VRAM_Byte_Selector=1; } break; } // 0x2007 - VRAM I/O Register (RW) case 0x2007: { PPU_Cont.Mem_Map[ PPU_Cont.Temp_Address ] = byte; if( CPU_Cont.Mem_Map[ 0x2000 ] & 0x4 ) PPU_Cont.Temp_Address += 32; else PPU_Cont.Temp_Address += 1; break; }
I know that's not the best implementation, it's just for testing my emu functionality. Any idea on what the problem can be about?
|