Skip to content

Commit

Permalink
Fix regression in r4444: Hercules machine type cursor translation.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4457 ed541006-0bf7-43e9-8c4d-6fc63c346d47
  • Loading branch information
ripsaw8080 committed Jun 6, 2021
1 parent 57facde commit cbfa2b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/ints/int10_char.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,20 @@ void INT10_SetActivePage(Bit8u page) {

void INT10_SetCursorShape(Bit8u first,Bit8u last) {
real_writew(BIOSMEM_SEG,BIOSMEM_CURSOR_TYPE,last|(first<<8));
if (!IS_EGAVGA_ARCH) goto dowrite;
if (machine==MCH_CGA || IS_TANDY_ARCH) goto dowrite;
/* Skip CGA cursor emulation if EGA/VGA system is active */
if (!(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x8)) {
if (machine==MCH_HERC || !(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x8)) {
/* Check for CGA type 01, invisible */
if ((first & 0x60) == 0x20) {
first=0x1e;
last=0x00;
goto dowrite;
}
/* Check if we need to convert CGA Bios cursor values */
if (!(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x1)) { // set by int10 fun12 sub34
if (machine==MCH_HERC || !(real_readb(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & 0x1)) { // set by int10 fun12 sub34
// if (CurMode->mode>0x3) goto dowrite; //Only mode 0-3 are text modes on cga
if ((first & 0xe0) || (last & 0xe0)) goto dowrite;
Bit8u cheight=real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT)-1;
Bit8u cheight=((machine==MCH_HERC)?14:real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT))-1;
/* Creative routine i based of the original ibmvga bios */

if (last<first) {
Expand Down
5 changes: 1 addition & 4 deletions src/ints/int10_modes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,7 @@ static void FinishSetMode(bool clearmem) {

// Set cursor shape
if (CurMode->type==M_TEXT) {
if (machine==MCH_HERC)
INT10_SetCursorShape(0x0c,0x0d);
else
INT10_SetCursorShape(0x06,0x07);
INT10_SetCursorShape(0x06,0x07);
}
// Set cursor pos for page 0..7
for (Bit8u ct=0;ct<8;ct++) INT10_SetCursorPos(0,0,ct);
Expand Down

0 comments on commit cbfa2b4

Please sign in to comment.