Mercurial > repos > blastem
comparison stateview.c @ 75:108e587165c0
Implement DMA (untested)
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 21 Dec 2012 20:56:32 -0800 |
parents | 3fc57e1a2c56 |
children | 8e2fa485c0f2 |
comparison
equal
deleted
inserted
replaced
74:6396dc91f61e | 75:108e587165c0 |
---|---|
1 #include <stdlib.h> | 1 #include <stdlib.h> |
2 #include <stdio.h> | 2 #include <stdio.h> |
3 #include "vdp.h" | 3 #include "vdp.h" |
4 #include "render.h" | 4 #include "render.h" |
5 #include "blastem.h" | |
6 | |
7 //not used, but referenced by the renderer since it handles input | |
8 io_port gamepad_1; | |
9 io_port gamepad_2; | |
10 | |
11 uint16_t read_dma_value(uint32_t address) | |
12 { | |
13 return 0; | |
14 } | |
5 | 15 |
6 int main(int argc, char ** argv) | 16 int main(int argc, char ** argv) |
7 { | 17 { |
8 if (argc < 2) { | 18 if (argc < 2) { |
9 fprintf(stderr, "Usage: stateview FILENAME\n"); | 19 fprintf(stderr, "Usage: stateview FILENAME\n"); |
26 } | 36 } |
27 vdp_context context; | 37 vdp_context context; |
28 init_vdp_context(&context); | 38 init_vdp_context(&context); |
29 vdp_load_savestate(&context, state_file); | 39 vdp_load_savestate(&context, state_file); |
30 vdp_run_to_vblank(&context); | 40 vdp_run_to_vblank(&context); |
41 printf("Display %s\n", (context.regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled"); | |
31 render_init(width, height); | 42 render_init(width, height); |
32 render_context(&context); | 43 render_context(&context); |
33 render_wait_quit(&context); | 44 render_wait_quit(&context); |
34 return 0; | 45 return 0; |
35 } | 46 } |