1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-27 20:51:17 +00:00

Change dbuf switches to work off correct addresses

This commit is contained in:
Peter Evans 2018-01-23 15:51:06 -06:00
parent 8f516db42b
commit 766aea9c96
2 changed files with 12 additions and 14 deletions

View File

@ -129,7 +129,7 @@ apple2_create(int width, int height)
apple2_set_color(mach, COLOR_FULL);
// We default to lo-res mode.
apple2_set_display(mach, DISPLAY_DEFAULT);
apple2_set_display(mach, DISPLAY_TEXT);
// Let's install our bitmap font.
mach->sysfont = vm_bitfont_create(mach->screen,
@ -257,7 +257,7 @@ apple2_reset(apple2 *mach)
mach->cpu->S = 0xff;
// Switch video mode back to 40 column text
apple2_set_display(mach, DISPLAY_DEFAULT);
apple2_set_display(mach, DISPLAY_TEXT);
// Switch us back to defaults
apple2_set_bank_switch(mach, BANK_DEFAULT);

View File

@ -95,8 +95,6 @@ SEGMENT_WRITER(apple2_dbuf_write)
if (mach->display_mode & DISPLAY_TEXT) {
apple2_draw_40col(mach);
} else {
apple2_draw_40col(mach);
}
}
@ -187,22 +185,22 @@ SEGMENT_READER(apple2_dbuf_switch_read)
// addresses.
case 0xC050:
apple2_set_display(mach,
mach->display_mode | DISPLAY_TEXT);
mach->display_mode & ~DISPLAY_TEXT);
break;
case 0xC051:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_TEXT);
mach->display_mode | DISPLAY_TEXT);
break;
case 0xC052:
apple2_set_display(mach,
mach->display_mode | DISPLAY_MIXED);
mach->display_mode & ~DISPLAY_MIXED);
break;
case 0xC053:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_MIXED);
mach->display_mode | DISPLAY_MIXED);
break;
case 0xC05E:
@ -235,22 +233,22 @@ SEGMENT_WRITER(apple2_dbuf_switch_write)
switch (addr) {
case 0xC00E:
apple2_set_display(mach,
mach->display_mode | DISPLAY_ALTCHAR);
mach->display_mode & ~DISPLAY_ALTCHAR);
break;
case 0xC00F:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_ALTCHAR);
mach->display_mode | DISPLAY_ALTCHAR);
break;
case 0xC00C:
apple2_set_display(mach,
mach->display_mode | DISPLAY_80COL);
mach->display_mode & ~DISPLAY_80COL);
break;
case 0xC00D:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_80COL);
mach->display_mode | DISPLAY_80COL);
break;
case 0xC050:
@ -265,12 +263,12 @@ SEGMENT_WRITER(apple2_dbuf_switch_write)
case 0xC052:
apple2_set_display(mach,
mach->display_mode | DISPLAY_MIXED);
mach->display_mode & ~DISPLAY_MIXED);
break;
case 0xC053:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_MIXED);
mach->display_mode | DISPLAY_MIXED);
break;
case 0xC07E: