From 6d5658eb682b8c26fbdfdc7e1a6f293d26562b64 Mon Sep 17 00:00:00 2001 From: Godzil Date: Tue, 11 Feb 2020 00:00:23 +0000 Subject: [PATCH] Make gcc happy (and fix a potential issue) --- source/io.cpp | 4 +++- source/nec/nec.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/io.cpp b/source/io.cpp index 71e3bfa..400b816 100644 --- a/source/io.cpp +++ b/source/io.cpp @@ -329,6 +329,7 @@ uint8_t cpu_readport(uint8_t port) int w1,w2; uint8_t retVal = 0; +/* if (port > 0x100) { port &= 0xFF; @@ -337,7 +338,7 @@ uint8_t cpu_readport(uint8_t port) return 0x00; } } - +*/ switch (port) { @@ -1046,6 +1047,7 @@ void cpu_writeport(uint32_t port,uint8_t value) } fflush(stdout); } + break; case 0xca: if(value==0x15) diff --git a/source/nec/nec.cpp b/source/nec/nec.cpp index d7fa45a..ff79ac1 100644 --- a/source/nec/nec.cpp +++ b/source/nec/nec.cpp @@ -3889,7 +3889,7 @@ void nec_set_reg(int regnum, uint32_t val) } } -char *instructionsName[256] = +const char *instructionsName[256] = { "ADD ", "ADD ", "ADD ", "ADD ", "ADD ", "ADD ", "PUSH", "POP ", "OR ", "OR ", "OR ", "OR ", "OR ", "OR ", "PUSH", "----", "ADC ", "ADC ", "ADC ", "ADC ", "ADC ", "ADC ", "PUSH", "POP ", "SBB ", "SBB ", "SBB ", "SBB ", "SBB ", "SBB ", "PUSH", "POP ",