From 5362a91b05721940441365c5cf84218e4bdb7549 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 27 Jun 2018 23:21:22 -0400 Subject: add on_oam_wb() --- test.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'test.c') diff --git a/test.c b/test.c index c798bba..31d1675 100644 --- a/test.c +++ b/test.c @@ -9,7 +9,7 @@ #include "lodepng.h" #include "gb.h" -#define SKIP_FRAMES 120 +#define SKIP_FRAMES 1200 #define NUM_FRAMES 60 // #define SKIP_STEPS 1000000 #define NUM_STEPS 300000 @@ -148,14 +148,26 @@ on_rst( * } */ +/* + * static void + * on_mmu_wb( + * const gb_t * const ctx, + * const uint16_t addr, + * const uint8_t val + * ) { + * UNUSED(ctx); + * printf("mmu_wb: addr = 0x%04X, val = 0x%02X\n", addr, val); + * } + */ + static void -on_mmu_wb( +on_oam_wb( const gb_t * const ctx, const uint16_t addr, const uint8_t val ) { UNUSED(ctx); - printf("mmu_wb: addr = 0x%04X, val = 0x%02X\n", addr, val); + printf("oam_wb: addr = 0x%04X, val = 0x%02X\n", addr, val); } static const gb_config_t @@ -170,7 +182,8 @@ EXECUTE_CONFIG = { .on_set_cpu_state = on_set_cpu_state, .on_rst = on_rst, // .on_mmu_rb = on_mmu_rb, - .on_mmu_wb = on_mmu_wb, + // .on_mmu_wb = on_mmu_wb, + .on_oam_wb = on_oam_wb, }; static void -- cgit v1.2.3