Mercurial > repos > blastem
comparison stateview.c @ 20:f664eeb55cb4
Mostly broken VDP core and savestate viewer
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 08 Dec 2012 02:00:54 -0800 |
parents | |
children | 2e15fa26fe58 |
comparison
equal
deleted
inserted
replaced
19:4717146a7606 | 20:f664eeb55cb4 |
---|---|
1 #include <stdlib.h> | |
2 #include <stdio.h> | |
3 #include "vdp.h" | |
4 #include "render.h" | |
5 | |
6 int main(int argc, char ** argv) | |
7 { | |
8 if (argc < 2) { | |
9 fprintf(stderr, "Usage: stateview FILENAME\n"); | |
10 exit(1); | |
11 } | |
12 FILE * state_file = fopen(argv[1], "rb"); | |
13 if (!state_file) { | |
14 fprintf(stderr, "Failed to open %s\n", argv[1]); | |
15 exit(1); | |
16 } | |
17 vdp_context context; | |
18 init_vdp_context(&context); | |
19 vdp_load_savestate(&context, state_file); | |
20 vdp_run_to_vblank(&context); | |
21 render_init(); | |
22 render_context(&context); | |
23 render_wait_quit(); | |
24 return 0; | |
25 } |