diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-08-11 18:03:48 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-08-11 18:03:48 -0400 |
commit | d49e39c672e78d536d658785adffb9149715832b (patch) | |
tree | 74ce383bbf76e88b4e4ac8d2822b51325500b686 /sux.h | |
parent | d17eb092f620d217f08ae7fb27122bb30799eaf4 (diff) |
Refactored the keyboard I/O emulation, again.
I decided to use keypad now, and create a function to
return the actual key sequences.
The keyboard I/O is also now being handled by the io
emulation function, and not by the main function.
This should get rid of any possible deadlocks.
Diffstat (limited to 'sux.h')
-rw-r--r-- | sux.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -28,6 +28,7 @@ static const uint64_t mem_size = 0x04000000; /* Size of address space. */ extern uint8_t step; extern uint8_t esc; +extern uint8_t end; #define setflag(flag, bit) ((flag)) ? (cpu->ps.u8[thread] |= bit) : (cpu->ps.u8[thread] &= ~bit) #define getflag(bit) (cpu->ps.u8[thread] & bit) @@ -41,12 +42,12 @@ extern pthread_cond_t main_cond; extern void disasm(struct sux *cpu, uint64_t *operands, uint8_t lines, uint8_t opcode, uint8_t prefix, uint8_t thread); #endif -#define KEYBUF_SIZE 0x40 -char key[KEYBUF_SIZE]; +/*#define KEYBUF_SIZE 0x40 +char key[KEYBUF_SIZE];*/ -extern int get_keycode(char *str); extern int get_key(WINDOW *scr); extern void io(uint64_t address, uint8_t rw); +extern void init_scr(); static inline uint64_t get_addr(struct sux *cpu, uint64_t *tmpaddr, uint8_t opcode, uint8_t prefix, uint8_t thread) { union reg address; |