From 9e5faf854dad240e8eb089ce799c6912054aabf6 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 2 Feb 2022 15:02:20 -0400 Subject: sux.h, io.c: Added support for setting key timeout. --- sux.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sux.h') diff --git a/sux.h b/sux.h index 18087a0..d80afc1 100644 --- a/sux.h +++ b/sux.h @@ -64,8 +64,8 @@ extern void disasm(struct sux *cpu, WINDOW *w, uint8_t lines, uint8_t opcode, ui /*#define KEYBUF_SIZE 0x40 char key[KEYBUF_SIZE];*/ -extern int get_key(WINDOW *scr); -extern void io(uint64_t address, uint8_t rw); +extern int get_key(WINDOW *scr, int delay, uint64_t cycles); +extern void io(uint64_t address, uint8_t rw, uint64_t cycles); extern void init_scr(); @@ -384,7 +384,7 @@ static /*inline*/ uint64_t read_value(struct sux *cpu, uint64_t reg, uint64_t ad pthread_mutex_lock(&mutex); #endif if (check_io) { - io(address, 1); + io(address, 1, cpu->clk); } #if keypoll pthread_mutex_unlock(&mutex); @@ -422,7 +422,7 @@ static /*inline*/ void write_value(struct sux *cpu, uint64_t value, uint64_t add pthread_mutex_lock(&mutex); #endif if (check_io) { - io(address, 0); + io(address, 0, cpu->clk); } #if keypoll pthread_mutex_unlock(&mutex); -- cgit v1.2.3-13-gbd6f