diff options
author | dweller <dweller@cabin.digital> | 2025-04-02 23:12:40 +0300 |
---|---|---|
committer | dweller <dweller@cabin.digital> | 2025-04-02 23:12:40 +0300 |
commit | 9c2842629f2e5f17c6949b5ff37c972f7dd62d4a (patch) | |
tree | 651676de253beb3830906155d458d34aad8db55e /sources/chip8.c | |
parent | 84dcdee9ac0a23f590bf5882b4628c7b3bd1b2cb (diff) |
just playing around
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) { |