From 1c7c386391dc4e7f9881921d0586ccae2174095a Mon Sep 17 00:00:00 2001 From: ArthurFerreira2 Date: Tue, 2 Apr 2019 09:05:08 +0200 Subject: [PATCH] Update reinette-II.c --- reinette-II.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/reinette-II.c b/reinette-II.c index 0fbe6fb..4327096 100644 --- a/reinette-II.c +++ b/reinette-II.c @@ -59,20 +59,14 @@ bool videoNeedsRefresh = true; // MEMORY AND I/O static uint8_t readMem(uint16_t address){ - static uint8_t queries=0; // slow down emulation when looping for a keypress - - if (address < RAMSIZE) return(ram[address]); + if (address < RAMSIZE) return(ram[address]); else if (address >= ROMSTART) return(rom[address - ROMSTART]); - - else if (address == 0xC000) { // KBD - if (!queries++) usleep(100); // sleep 100ms every 256 requests - return(key); - } + else if (address == 0xC000) return(key); // KBD else if (address == 0xC010){ // KBDSTRB key &= 0x7F; // unset bit 7 return(key); } - else return(0); // catch all + return(0); // catch all } static void writeMem(uint16_t address, uint8_t value){