diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-02-02 15:02:20 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-02-02 15:02:20 -0400 |
commit | 9e5faf854dad240e8eb089ce799c6912054aabf6 (patch) | |
tree | 157a1751b8e63fff94a339337b5bf9acefdeff3c /sux.h | |
parent | 5aa885bb00a76a6be066a164187c8c2a065d6fab (diff) |
sux.h, io.c: Added support for setting key timeout.
Diffstat (limited to 'sux.h')
-rw-r--r-- | sux.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |