Fix PAGE2 display test

This commit is contained in:
Aaron Culliney 2014-11-25 21:57:57 -08:00
parent 050d1de389
commit e51a57b376

View File

@ -114,7 +114,6 @@ uint8_t video__dhires2[256] = {
0x7,0x7,0x7,0x7,0x7,0x7,0x7,0x7,0xf,0xf,0xb,0xb,0xf,0xf,0xf,0xf, 0x7,0x7,0x7,0x7,0x7,0x7,0x7,0x7,0xf,0xf,0xb,0xb,0xf,0xf,0xf,0xf,
}; };
static void video_initialize_dhires_values(void) { static void video_initialize_dhires_values(void) {
for (unsigned int i = 0; i < 0x80; i++) { for (unsigned int i = 0; i < 0x80; i++) {
video__dhires1[i+0x80] = video__dhires1[i]; video__dhires1[i+0x80] = video__dhires1[i];
@ -613,7 +612,6 @@ const uint8_t * const video_current_framebuffer() {
return !video__current_page ? video__fb1 : video__fb2; return !video__current_page ? video__fb1 : video__fb2;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
static inline void _plot_character(const unsigned int font_off, uint8_t *fb_ptr) { static inline void _plot_character(const unsigned int font_off, uint8_t *fb_ptr) {
@ -1072,32 +1070,36 @@ void video_redraw(void) {
if (y < 20) { if (y < 20) {
DRAW_TEXT(0, SS_TEXTWRT); DRAW_TEXT(0, SS_TEXTWRT);
ea += 0x400; ea += 0x400;
b = apple_ii_64k[0][ea];
DRAW_TEXT(1, SS_RAMWRT); DRAW_TEXT(1, SS_RAMWRT);
} else { } else {
DRAW_MIXED(0, SS_TEXTWRT); DRAW_MIXED(0, SS_TEXTWRT);
ea += 0x400; ea += 0x400;
b = apple_ii_64k[0][ea];
DRAW_MIXED(1, SS_RAMWRT); DRAW_MIXED(1, SS_RAMWRT);
} }
// hires/dhires pages // hires/dhires pages
for (unsigned int i = 0; i < 8; i++) { for (unsigned int i = 0; i < 8; i++) {
ea = 0x2000 + video__line_offset[y] + (0x400*i) + x; uint16_t ea0 = 0x2000 + video__line_offset[y] + (0x400*i) + x;
uint8_t b = apple_ii_64k[0][ea]; uint16_t ea1 = ea0+0x2000;
uint8_t b0 = apple_ii_64k[0][ea0];
uint8_t b1 = apple_ii_64k[0][ea1];
if (y < 20) { if (y < 20) {
if (x & 1) { if (x & 1) {
_draw_hires_graphics(ea, b, /*even*/false, 0, SS_TEXT); _draw_hires_graphics(ea0, b0, /*even*/false, 0, SS_TEXT);
_draw_hires_graphics(ea+0x2000, b, /*even*/false, 1, SS_TEXT); _draw_hires_graphics(ea1, b1, /*even*/false, 1, SS_TEXT);
} else { } else {
_draw_hires_graphics(ea, b, /*even*/true, 0, SS_TEXT); _draw_hires_graphics(ea0, b0, /*even*/true, 0, SS_TEXT);
_draw_hires_graphics(ea+0x2000, b, /*even*/true, 1, SS_TEXT); _draw_hires_graphics(ea1, b1, /*even*/true, 1, SS_TEXT);
} }
} else { } else {
if (x & 1) { if (x & 1) {
_draw_hires_graphics(ea, b, /*even*/false, 0, (SS_TEXT|SS_MIXED)); _draw_hires_graphics(ea0, b0, /*even*/false, 0, (SS_TEXT|SS_MIXED));
_draw_hires_graphics(ea+0x2000, b, /*even*/false, 1, (SS_TEXT|SS_MIXED)); _draw_hires_graphics(ea1, b1, /*even*/false, 1, (SS_TEXT|SS_MIXED));
} else { } else {
_draw_hires_graphics(ea, b, /*even*/true, 0, (SS_TEXT|SS_MIXED)); _draw_hires_graphics(ea0, b0, /*even*/true, 0, (SS_TEXT|SS_MIXED));
_draw_hires_graphics(ea+0x2000, b, /*even*/true, 1, (SS_TEXT|SS_MIXED)); _draw_hires_graphics(ea1, b1, /*even*/true, 1, (SS_TEXT|SS_MIXED));
} }
} }
} }