Tile debugger
This commit is contained in:
parent
d1ddcb1b0f
commit
77b37fc3b6
|
@ -1,5 +1,5 @@
|
|||
set(HEADERS ppu.h palette.h colors.h)
|
||||
set(SOURCE ppu.c palette.c)
|
||||
set(HEADERS ppu.h palette.h colors.h tile_debugger.h)
|
||||
set(SOURCE ppu.c palette.c tile_debugger.c)
|
||||
|
||||
add_library(nes_ppu ${SOURCE} ${HEADERS})
|
||||
|
||||
|
|
|
@ -134,9 +134,10 @@ void ppu_draw_tile() {
|
|||
}
|
||||
|
||||
byte ppu_get_pattern(byte tile_index, byte high) {
|
||||
byte tile_row_index = (ppu_state.scanline + ppu_state.y_scroll) % 8;
|
||||
address pattern_addr = ppu_state.bg_pattern_table_addr | tile_index << 4 | high << 3 | tile_row_index;
|
||||
return ppu_read(pattern_addr);
|
||||
return tile_index;
|
||||
// byte tile_row_index = (ppu_state.scanline + ppu_state.y_scroll) % 8;
|
||||
// address pattern_addr = ppu_state.bg_pattern_table_addr | tile_index << 4 | high << 3 | tile_row_index;
|
||||
// return ppu_read(pattern_addr);
|
||||
}
|
||||
|
||||
void ppu_fetch_tile(bool render) {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
//
|
||||
// Created by william on 8/13/24.
|
||||
//
|
||||
|
||||
#include "tile_debugger.h"
|
||||
|
||||
byte tile_encode_number(byte num) {
|
||||
// 8 segment display
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
//
|
||||
// Created by william on 8/13/24.
|
||||
//
|
||||
|
||||
#ifndef NES_EMULATOR_TILE_DEBUGGER_H
|
||||
#define NES_EMULATOR_TILE_DEBUGGER_H
|
||||
|
||||
#include "../include/types.h"
|
||||
|
||||
#endif //NES_EMULATOR_TILE_DEBUGGER_H
|
Loading…
Reference in New Issue