# HG changeset patch # User Mike Pavone # Date 1366995073 25200 # Node ID 7ccc4ae86e079da01467575f3bf1358ab116952f # Parent 19fb3523a9e5afe383ef6e4b76954d40497e00fb Added key to save Z80 RAM to a file diff -r 19fb3523a9e5 -r 7ccc4ae86e07 render_sdl.c --- a/render_sdl.c Thu Apr 25 22:49:36 2013 -0700 +++ b/render_sdl.c Fri Apr 26 09:51:13 2013 -0700 @@ -232,6 +232,7 @@ #define MIN_DELAY 5 uint32_t frame_counter = 0; uint32_t start = 0; +extern uint8_t z80_ram[]; int wait_render_frame(vdp_context * context) { FILE * outfile; @@ -351,6 +352,12 @@ case SDLK_f: gamepad_1.input[GAMEPAD_EXTRA] &= ~BUTTON_MODE; break; + case SDLK_z:{ + FILE * f = fopen("zram.bin", "wb"); + fwrite(z80_ram, 1, 8 * 1024, f); + fclose(f); + break; + } } break; case SDL_QUIT: