Mercurial > repos > blastem
diff jaguar.c @ 1087:6433d4d05934
Added placeholder code for video output hardware/object processor
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Oct 2016 18:27:38 -0700 |
parents | bc86eaf6699d |
children | c0a026e974f4 |
line wrap: on
line diff
--- a/jaguar.c Thu Oct 06 22:25:12 2016 -0700 +++ b/jaguar.c Fri Oct 07 18:27:38 2016 -0700 @@ -102,25 +102,25 @@ } else if (address < 0x100800) { //CLUT address = address >> 1 & 255; - system->clut[address] = value; + system->video->clut[address] = value; } else { //Line buffer A address = address >> 1 & 0x3FF; if (address < LINEBUFFER_WORDS) { - system->line_buffer_a[address] = value; + system->video->line_buffer_a[address] = value; } } } else if (address < 0x101800) { //Line buffer B address = address >> 1 & 0x3FF; if (address < LINEBUFFER_WORDS) { - system->line_buffer_b[address] = value; + system->video->line_buffer_b[address] = value; } } else if (address < 0x102100) { //Write Line Buffer address = address >> 1 & 0x3FF; if (address < LINEBUFFER_WORDS) { - system->write_line_buffer[address] = value; + system->video->write_line_buffer[address] = value; } } else { //GPU/Blitter registers @@ -180,25 +180,25 @@ } else if (address < 0x100800) { //CLUT address = address >> 1 & 255; - return system->clut[address]; + return system->video->clut[address]; } else { //Line buffer A address = address >> 1 & 0x3FF; if (address < LINEBUFFER_WORDS) { - return system->line_buffer_a[address]; + return system->video->line_buffer_a[address]; } } } else if (address < 0x101800) { //Line buffer B address = address >> 1 & 0x3FF; if (address < LINEBUFFER_WORDS) { - return system->line_buffer_b[address]; + return system->video->line_buffer_b[address]; } } else if (address < 0x102100) { //Write Line Buffer address = address >> 1 & 0x3FF; if (address < LINEBUFFER_WORDS) { - return system->write_line_buffer[address]; + return system->video->write_line_buffer[address]; } } else { //GPU/Blitter registers @@ -270,8 +270,11 @@ m68k_context * sync_components(m68k_context * context, uint32_t address) { + jaguar_context *system = context->system; + jag_video_run(system->video, context->current_cycle); if (context->current_cycle > 0x10000000) { context->current_cycle -= 0x10000000; + system->video->cycles -= 0x10000000; } return context; } @@ -309,6 +312,7 @@ init_m68k_opts(opts, jag_m68k_map, 8, 2); system->m68k = init_68k_context(opts, handle_m68k_reset); system->m68k->system = system; + system->video = jag_video_init(); return system; }