mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
PC-98: Express IO.SYS variables relative to segment 0x60
Consistent with both MEMDOS.TXT and all other places DOSBox-X accesses them.
This commit is contained in:
@@ -778,7 +778,7 @@ bool device_CON::Write(const uint8_t * data,uint16_t * size) {
|
||||
|
||||
if (IS_PC98_ARCH) {
|
||||
ansi.enabled = true; // ANSI is enabled at all times
|
||||
ansi.attr = mem_readb(0x71D); // 60:11D
|
||||
ansi.attr = real_readb(0x60,0x11D);
|
||||
}
|
||||
|
||||
while (*size>count) {
|
||||
@@ -917,7 +917,7 @@ bool device_CON::Write(const uint8_t * data,uint16_t * size) {
|
||||
case 5: // show/hide cursor
|
||||
void PC98_show_cursor(bool show);
|
||||
PC98_show_cursor(data[count] == 'l');
|
||||
mem_writeb(0x71B,data[count] == 'l' ? 0x01 : 0x00); /* 60:11B cursor display state */
|
||||
real_writeb(0x60,0x11B,data[count] == 'l' ? 0x01 : 0x00); /* cursor display state */
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_IOCTL,LOG_NORMAL)("ANSI: unhandled esc [ > %d %c",ansi.data[0],data[count]);
|
||||
@@ -1022,7 +1022,7 @@ bool device_CON::Write(const uint8_t * data,uint16_t * size) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (IS_PC98_ARCH) mem_writeb(0x71D,ansi.attr); // 60:11D
|
||||
if (IS_PC98_ARCH) real_writeb(0x60,0x11D,ansi.attr);
|
||||
ClearAnsi();
|
||||
break;
|
||||
case 'f':
|
||||
|
@@ -5148,8 +5148,8 @@ static Bitu INTDC_PC98_Handler(void) {
|
||||
* DL is the attribute byte (in the format written directly to video RAM, not the ANSI code)
|
||||
*
|
||||
* NTS: Reverse engineering INT DCh shows it sets both 71Dh and 73Ch as below */
|
||||
mem_writeb(0x71D,reg_dl); /* 60:11D */
|
||||
mem_writeb(0x73C,reg_dx); /* 60:13C */
|
||||
real_writeb(0x60,0x11D,reg_dl);
|
||||
real_writeb(0x60,0x13C,reg_dx);
|
||||
goto done;
|
||||
}
|
||||
else if (reg_ah == 0x03) { /* CL=0x10 AH=0x03 DL=X-coord DH=Y-coord set cursor position */
|
||||
|
@@ -1221,19 +1221,19 @@ void INT10_Startup(Section *sec) {
|
||||
|
||||
/* number of text rows on the screen.
|
||||
* Touhou Project will not clear/format the text layer properly without this variable. */
|
||||
mem_writeb(0x710,0); /* cursor position Y coordinate */
|
||||
mem_writeb(0x711,1); /* function definition display status flag */
|
||||
mem_writeb(0x712,25 - 1 - 1); /* scroll range lower limit (usually 23 when function key row is visible) */
|
||||
mem_writeb(0x713,1); /* normal 25 lines */
|
||||
mem_writeb(0x714,0xE1); /* content erase attribute */
|
||||
real_writeb(0x60,0x110,0); /* cursor position Y coordinate */
|
||||
real_writeb(0x60,0x111,1); /* function definition display status flag */
|
||||
real_writeb(0x60,0x112,25 - 1 - 1); /* scroll range lower limit (usually 23 when function key row is visible) */
|
||||
real_writeb(0x60,0x113,1); /* normal 25 lines */
|
||||
real_writeb(0x60,0x114,0xE1); /* content erase attribute */
|
||||
|
||||
mem_writeb(0x719,0x20); /* content erase character */
|
||||
real_writeb(0x60,0x119,0x20); /* content erase character */
|
||||
|
||||
mem_writeb(0x71B,0x01); /* cursor displayed */
|
||||
mem_writeb(0x71C,0x00); /* cursor position X coordinate */
|
||||
mem_writeb(0x71D,0xE1); /* content display attribute */
|
||||
mem_writeb(0x71E,0x00); /* scroll range upper limit (usually 0) */
|
||||
mem_writeb(0x71F,0x01); /* scrolling speed is normal */
|
||||
real_writeb(0x60,0x11B,0x01); /* cursor displayed */
|
||||
real_writeb(0x60,0x11C,0x00); /* cursor position X coordinate */
|
||||
real_writeb(0x60,0x11D,0xE1); /* content display attribute */
|
||||
real_writeb(0x60,0x11E,0x00); /* scroll range upper limit (usually 0) */
|
||||
real_writeb(0x60,0x11F,0x01); /* scrolling speed is normal */
|
||||
|
||||
/* init text RAM */
|
||||
for (unsigned int i=0;i < 0x1FE0;i += 2) {
|
||||
|
Reference in New Issue
Block a user