summaryrefslogtreecommitdiff
path: root/mknes.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-05-02 23:15:47 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-05-02 23:15:47 +0200
commit5808f00555c48e1cc1cc110af6a5cd73ddf13010 (patch)
treedff942b61441bafe297e7a99f0e799f32ae978b1 /mknes.c
parent9463faa436e1b981ef72000568445a83682f2658 (diff)
cleanup and rewrite of ppu_registers.c
Diffstat (limited to 'mknes.c')
-rw-r--r--mknes.c8
1 files changed, 3 insertions, 5 deletions
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");