From 5808f00555c48e1cc1cc110af6a5cd73ddf13010 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Fri, 2 May 2025 23:15:47 +0200 Subject: cleanup and rewrite of ppu_registers.c --- mknes.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mknes.c') diff --git a/mknes.c b/mknes.c index beceef6..2aff691 100644 --- a/mknes.c +++ b/mknes.c @@ -93,7 +93,7 @@ static uint32_t frames; // debug information // #include "smb_tas.h" // REMOVE ME // NES core -#include "mapper.h" +#include "mappers/mapper.h" #include "mknes.h" // #include "apu.c" #include "ppu.c" @@ -101,7 +101,7 @@ static uint32_t frames; // debug information #include "memory.c" #include "cpu.c" #include "ines2.c" -#include "mapper.c" +#include "mappers/mapper.c" #include "callbacks.c" struct nes_state nstate; @@ -236,7 +236,6 @@ int main(int argc, char **argv) { return 0; #endif - struct timer_handle *timer = timer_new(FRAME_INTERVAL_NS); if(!timer) { fprintf(stderr, "Failed to create timer\n"); @@ -263,7 +262,6 @@ int main(int argc, char **argv) { framebuffer_callback(window, WINDOW_WIDTH, WINDOW_HEIGHT); - for(int jid = GLFW_JOYSTICK_1; jid <= GLFW_JOYSTICK_LAST; jid++) { if(glfwJoystickPresent(jid)) { const char *name = glfwGetJoystickName(jid); @@ -308,7 +306,7 @@ int main(int argc, char **argv) { render_frame(); glfwSwapBuffers(window); } -printf("total frames: %6.6d total cycles: %ld\n", frames, nstate->cycles); +printf("total frames: %6.6d total cycles: %ld\n", frames, nstate->cpu.cycles); glfwDestroyWindow(window); } else { fprintf(stderr, "Failed to create window\n"); -- cgit v1.2.3