comparison src/main.c @ 19:04fc17376999

Sort of working tile rendering and tile test ROM
author Michael Pavone <pavone@retrodev.com>
date Mon, 28 Mar 2016 23:43:31 -0700
parents ae58e7c3c328
children 4c9dbfa30a66
comparison
equal deleted inserted replaced
18:cc885122e9e3 19:04fc17376999
61 61
62 void horizontal_port_write(cpu *context, uint8_t port, uint16_t value) 62 void horizontal_port_write(cpu *context, uint8_t port, uint16_t value)
63 { 63 {
64 console *system = context->system; 64 console *system = context->system;
65 vdp_run(&system->video, context->cycles); 65 vdp_run(&system->video, context->cycles);
66 system->video.hscroll = value; 66 vdp_write_hscroll(&system->video, value);
67 } 67 }
68 68
69 uint16_t horizontal_port_read(cpu *context, uint8_t port) 69 uint16_t horizontal_port_read(cpu *context, uint8_t port)
70 { 70 {
71 console *system = context->system; 71 console *system = context->system;
109 context->video.cycles -= CYCLES_PER_FRAME; 109 context->video.cycles -= CYCLES_PER_FRAME;
110 system_poll_events(); 110 system_poll_events();
111 } 111 }
112 } 112 }
113 113
114
115
116 int main(int argc, char **argv) 114 int main(int argc, char **argv)
117 { 115 {
118 if (argc < 2) { 116 if (argc < 2) {
119 fputs("usage: s16 FILE\n", stderr); 117 fputs("usage: s16 FILE\n", stderr);
120 return 1; 118 return 1;