summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-21 20:49:33 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-21 20:49:33 +0200
commit8a32bcfac621dfcaa6af832228e56713a4af6156 (patch)
tree60714ce5a6a4eb707126ecc96ecfc17f1145b95b
parent19f119e49c91580f49bb02f86bb905a05ba90d6b (diff)
add -mtune=generic
-rwxr-xr-xbuild.sh2
-rw-r--r--mknes.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index fbe27e9..611ca19 100755
--- a/build.sh
+++ b/build.sh
@@ -4,7 +4,7 @@
PROJECT_NAME="mknes" # Change this for each new project
# Base configuration common to all builds
-CFLAGS="-std=gnu11 "
+CFLAGS="-std=gnu11 -mtune=generic "
CFLAGS+="-mbmi2 "
CFLAGS+="-mfunction-return=keep "
CFLAGS+="-mindirect-branch=keep "
diff --git a/mknes.c b/mknes.c
index 6bb0475..6ef4e02 100644
--- a/mknes.c
+++ b/mknes.c
@@ -179,9 +179,9 @@ int main(int argc, char **argv) {
// ines2_load(nstate, "data/0000/Excitebike (Japan, USA).nes");
// ines2_load(nstate, "data/0000/Ice Climber (USA, Europe, Korea).nes");
// ines2_load(nstate, "data/0000/Kung Fu (Japan, USA).nes");
- // ines2_load(nstate, "data/0000/Super Mario Bros. (World) (HVC-SM).nes");
+ ines2_load(nstate, "data/0000/Super Mario Bros. (World) (HVC-SM).nes");
// ines2_load(nstate, "data/Super Mario Bros. (W) (V1.0) [!].nes");
- ines2_load(nstate, "data/Super Mario Bros. (JU) [!].nes");
+ // ines2_load(nstate, "data/Super Mario Bros. (JU) [!].nes");
// ines2_load(nstate, "data/0000/Urban Champion (World).nes");
// ines2_load(nstate, "data/0000/Wrecking Crew (World).nes");
// ines2_load(nstate, "data/0000/scanline.nes");
@@ -201,7 +201,7 @@ int main(int argc, char **argv) {
// ines2_load(nstate, "data/0000/Xevious - The Avenger (USA).zip");
// ines2_load(nstate, "data/tv.nes");
- // ines2_load(nstate, "data/Rad Racer II (USA).zip");
+ // ines2_load(nstate, "data/Life Force (USA).zip"); // 2002
// ines2_load(nstate, "data/0003/Flipull - An Exciting Cube Game (Japan) (En).zip");
// ines2_load(nstate, "data/0003/Friday the 13th (USA).zip");
@@ -239,8 +239,8 @@ int main(int argc, char **argv) {
window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "NES Emulator", 0, 0);
if(window) {
glfwSetWindowUserPointer(window, (void*)nstate);
- glfwSetWindowAspectRatio(window, 320, 240);
- glfwSetWindowSizeLimits(window, 320*3, 240*3, GLFW_DONT_CARE, GLFW_DONT_CARE);
+ glfwSetWindowAspectRatio(window, 320, 240); // Need to set a 4:3 resolution for it to look correct!
+ glfwSetWindowSizeLimits(window, WINDOW_WIDTH, WINDOW_HEIGHT, GLFW_DONT_CARE, GLFW_DONT_CARE);
glfwMakeContextCurrent(window);
opengl_setup();
@@ -263,7 +263,7 @@ int main(int argc, char **argv) {
timer_start(timer);
-#if 0
+#if 1
for(uint32_t i = 0; i < 0x5000; ++ i) {
while(!nstate->ppu.frame_ready) {
// PROFILE_NAMED("nes emulator");