diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2021-01-02 20:23:52 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2021-01-02 20:23:52 +0100 |
commit | 9490b470f3c0ac2357b60a56a893ab86556af634 (patch) | |
tree | 15d8358467ffdacc1bb76e9d9e926e6ee294070e /emu/emul.c | |
parent | aff63a211e9b1e397adb9dce726d8153beb96dcd (diff) | |
download | 6502-9490b470f3c0ac2357b60a56a893ab86556af634.tar.gz 6502-9490b470f3c0ac2357b60a56a893ab86556af634.tar.bz2 |
added VIA
added some more opcodes (SEI, CLI)
Diffstat (limited to 'emu/emul.c')
-rw-r--r-- | emu/emul.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -76,13 +76,14 @@ void emul_start( emul_t *emul ) static void print_help( void ) { - fprintf( stderr, "CPU is paused, press\n" + fprintf( stderr, "Keyboard commands, press\n" "(s) for single step\n" "(f) fini (continue to next rts)\n" "(c) for continue running\n" "(b) break to single stepping\n" "(+) speed up\n" "(-) speed down\n" + "(p) push the button\n" "(q) or (ESC) for shutting down\n" ); } @@ -105,6 +106,9 @@ void emul_run( emul_t *emul, int nof_steps ) switch( event.type ) { case SDL_KEYDOWN: switch( event.key.keysym.sym ) { + case SDLK_h: + print_help( ); + break; case SDLK_ESCAPE: case SDLK_q: done = true; @@ -138,6 +142,9 @@ void emul_run( emul_t *emul, int nof_steps ) } fprintf( stderr, "CPU speed is %1.6f MHz now\n", ( (double)emul->speed / 1000000 ) ); break; + case SDLK_p: + // TODO:push the push button connected to CA1 + break; } break; @@ -153,10 +160,6 @@ void emul_run( emul_t *emul, int nof_steps ) SDL_RenderCopy( emul->renderer, emul->background_texture, NULL, NULL ); emul->bus->base.vtable->draw( emul->bus, emul->renderer ); - //~ for( int i = 0; i < emul->bus->nof_devices; i++ ) { - //~ device_t *device = emul->bus->devices[i].device; - //~ device->vtable->draw( device, emul->renderer ); - //~ } SDL_RenderPresent( emul->renderer ); |