From f495a88081081147f4688dce17df61476858b82e Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 30 Jan 2023 15:46:43 +0100 Subject: [PATCH] add prototype for mapper 01 --- .gitignore | 1 + src/mappers/Mapper001.cpp | 2 +- vendor/imgui | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7c329a2..3f787ef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ out/ build/ *.json +*.ini *.nes !roms/nestest.nes diff --git a/src/mappers/Mapper001.cpp b/src/mappers/Mapper001.cpp index 0e22acf..6973ca3 100644 --- a/src/mappers/Mapper001.cpp +++ b/src/mappers/Mapper001.cpp @@ -36,7 +36,7 @@ Byte Mapper001::ReadCPU(Word addr) break; } - return PRG_ROM[addr & (0x4000 * selectedBank - 1)]; + return PRG_ROM[(addr & (0x4000 * selectedBank - 1)) & 0x7FFF]; } return 0x00; diff --git a/vendor/imgui b/vendor/imgui index 8639a2f..88dfd85 160000 --- a/vendor/imgui +++ b/vendor/imgui @@ -1 +1 @@ -Subproject commit 8639a2f9f8d6d53f4c7a221579de5871051153d9 +Subproject commit 88dfd85e9296fc03ac858f66cc6507ba443294ef