diff options
Diffstat (limited to 'sources/chip8.c')
-rw-r--r-- | sources/chip8.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/chip8.c b/sources/chip8.c index 1c5f907..836b9ef 100644 --- a/sources/chip8.c +++ b/sources/chip8.c @@ -7,7 +7,7 @@ #define C8_RESET_VECTOR 0x200 -#define C8_CYCLES_PER_FRAME 1000 +#define C8_CYCLES_PER_FRAME 20 static const u8 fnt[] = { @@ -36,6 +36,7 @@ typedef struct u8 sp; u16 i; + u16 prevkeys; u16 keys; u64 cycles; @@ -137,8 +138,8 @@ void c8_dump_state(chip8* c8, bool stack) printf("V%x: %02X (%3d)\n", i+3, c8->V[i+3], c8->V[i+3]); } - printf(" I:%04X SP: %02X DT: %02X ST: %02X CYCLES: %llu\n", - c8->i, c8->sp, c8->dt, c8->st, c8->cycles); + printf(" I:%04X SP: %02X DT: %02X ST: %02X CYCLES: %llu, KEYS: %X\n", + c8->i, c8->sp, c8->dt, c8->st, c8->cycles, c8->keys); if(stack) { |