Skip to content
Snippets Groups Projects
Commit a489c48d authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

SAA5050 is 25 rows, not 24.

This means the crappy 40-column status line can be used!
parent eac03971
No related branches found
No related tags found
No related merge requests found
Pipeline #7975 passed
......@@ -266,7 +266,7 @@ bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vmem_cell *fil
for(y=sy-1;y<ey;y++) {
vc = vmem_cell_ptr(vstat.vmem, sx - 1, y);
for(x=sx-1;x<ex;x++) {
if (vstat.mode == PRESTEL_40X24 && ((vc->bg & 0x02000000) || (fi->bg & 0x02000000))) {
if (vstat.mode == PRESTEL_40X25 && ((vc->bg & 0x02000000) || (fi->bg & 0x02000000))) {
if ((vc->bg & 0x01000000) != (fi->bg & 0x01000000)) {
// *ANY* change to double-height potentially changes
// *EVERY* character on the screen
......@@ -274,7 +274,7 @@ bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vmem_cell *fil
}
}
*vc = *(fi++);
if (vstat.mode == PRESTEL_40X24 && (vc->bg & 0x02000000)) {
if (vstat.mode == PRESTEL_40X25 && (vc->bg & 0x02000000)) {
if (vc->legacy_attr & 0x08) {
if (cio_api.options & CONIO_OPT_PRESTEL_REVEAL)
vc->bg |= 0x08000000;
......@@ -314,7 +314,7 @@ set_vmem_cell(size_t x, size_t y, uint16_t cell, uint32_t fg, uint32_t bg)
vc->legacy_attr = cell >> 8;
vc->ch = cell & 0xff;
vc->fg = fg;
if (vstat.mode == PRESTEL_40X24 && ((vc->bg & 0x02000000) || (bg & 0x02000000))) {
if (vstat.mode == PRESTEL_40X25 && ((vc->bg & 0x02000000) || (bg & 0x02000000))) {
if (vc->legacy_attr & 0x08) {
if (cio_api.options & CONIO_OPT_PRESTEL_REVEAL)
vc->bg |= 0x08000000;
......@@ -327,7 +327,7 @@ set_vmem_cell(size_t x, size_t y, uint16_t cell, uint32_t fg, uint32_t bg)
request_redraw_locked();
}
}
if (vstat.mode == PRESTEL_40X24 && (vc->bg & 0x02000000)) {
if (vstat.mode == PRESTEL_40X25 && (vc->bg & 0x02000000)) {
if (vc->legacy_attr & 0x08) {
if (cio_api.options & CONIO_OPT_PRESTEL_REVEAL)
vc->bg |= 0x08000000;
......@@ -403,7 +403,7 @@ static void cb_drawrect(struct rectlist *data)
*/
assert_rwlock_rdlock(&vstatlock);
if (cursor_visible_locked()) {
if (vstat.mode == PRESTEL_40X24)
if (vstat.mode == PRESTEL_40X25)
cv = 0x80FFFFFF;
else
cv = color_value(ciolib_fg);
......@@ -626,7 +626,7 @@ calc_charstate(struct blockstate *bs, struct vmem_cell *vc, struct charstate *cs
cs->bg = vc->bg;
cs->extra_rows = 0;
if (vstat.mode == PRESTEL_40X24 && (vc->bg & 0x02000000)) {
if (vstat.mode == PRESTEL_40X25 && (vc->bg & 0x02000000)) {
unsigned char lattr;
bool top = false;
bool bottom = false;
......@@ -860,7 +860,7 @@ bitmap_draw_vmem_locked(int sx, int sy, int ex, int ey, struct vmem_cell *fill)
// Fill in charstate for this pass
bool cheat = true;
if (vstat.mode == PRESTEL_40X24) {
if (vstat.mode == PRESTEL_40X25) {
cheat = false;
}
else {
......@@ -991,7 +991,7 @@ static void blinker_thread(void *data)
assert_rwlock_wrlock(&vstatlock);
switch (vstat.mode) {
case PRESTEL_40X24:
case PRESTEL_40X25:
if (next_cursor < now) {
curs_changed = cursor_visible_locked();
if (vstat.curs_blink) {
......@@ -1147,7 +1147,7 @@ same_cell(struct vmem_cell *bitmap_cell, struct vmem_cell *c2)
if (bitmap_cell->ch != c2->ch)
return false;
// Handles reveal/unreveal updates, modifies vmem
if (vstat.mode == PRESTEL_40X24 && (c2->bg & 0x02000000)) {
if (vstat.mode == PRESTEL_40X25 && (c2->bg & 0x02000000)) {
if (c2->legacy_attr & 0x08) {
if (cio_api.options & CONIO_OPT_PRESTEL_REVEAL)
c2->bg |= 0x08000000;
......@@ -1448,7 +1448,7 @@ int bitmap_setfont(int font, int force, int font_num)
if(conio_fontdata[font].eight_by_sixteen!=NULL) {
newmode=C80;
if (conio_fontdata[font].cp == CIOLIB_PRESTEL)
newmode=PRESTEL_40X24;
newmode=PRESTEL_40X25;
}
else if(conio_fontdata[font].eight_by_fourteen!=NULL)
newmode=C80X28;
......
......@@ -203,7 +203,7 @@ enum text_modes
VESA_132X50 = 206,
VESA_132X60 = 196,
PRESTEL_40X24 = 254,
PRESTEL_40X25 = 254,
/* Custom Mode */
CIOLIB_MODE_CUSTOM = 255, // Last mode... if it's over 255, text_info can't hold it.
......
......@@ -125,7 +125,7 @@ struct video_params vparams[] = {
/* DigitalMon */
{LCD80X25, COLOUR_PALETTE, 80, 25, 14, 15, 16, 8, 7, 0, 8, 5, 640, 400},
/* Prestel */
{PRESTEL_40X24, PRESTEL_PALETTE, 40, 24, 14, 15, 20, 12, 7, 0, 4, 3, 480, 480},
{PRESTEL_40X25, PRESTEL_PALETTE, 40, 25, 14, 15, 20, 12, 7, 0, 4, 3, 480, 500},
/* Custom mode */
{CIOLIB_MODE_CUSTOM, COLOUR_PALETTE, 80, 25, 14, 15, 16, 8, 7, 0, 0, 0, -1, -1},
};
......
......@@ -2360,7 +2360,7 @@ screen_to_ciolib(int screen)
case SCREEN_MODE_VGA_80X25:
return VGA80X25;
case SCREEN_MODE_PRESTEL:
return PRESTEL_40X24;
return PRESTEL_40X25;
}
gettextinfo(&ti);
return ti.currmode;
......@@ -2418,7 +2418,7 @@ ciolib_to_screen(int ciolib)
return SCREEN_MODE_EGA_80X25;
case VGA80X25:
return SCREEN_MODE_VGA_80X25;
case PRESTEL_40X24:
case PRESTEL_40X25:
return SCREEN_MODE_PRESTEL;
}
return SCREEN_MODE_CURRENT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment