Amend previous MSCDEX change to use presence of cdrom device to determine the installed condition, which means unmounting will not revert to the uninstalled condition. Pass unhandled functions back to the multiplex handler, which if nothing else will generate log messages about them being unhandled.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3902
This commit is contained in:
parent
0b568ebbd0
commit
bd6e01565d
1 changed files with 8 additions and 9 deletions
|
@ -1158,14 +1158,13 @@ static Bitu MSCDEX_Interrupt_Handler(void) {
|
|||
static bool MSCDEX_Handler(void) {
|
||||
if(reg_ah == 0x11) {
|
||||
if(reg_al == 0x00) {
|
||||
if (mscdex->GetNumDrives()>0) {
|
||||
PhysPt check = PhysMake(SegValue(ss),reg_sp);
|
||||
if(mem_readw(check+6) == 0xDADA) {
|
||||
//MSCDEX sets word on stack to ADAD if it DADA on entry.
|
||||
mem_writew(check+6,0xADAD);
|
||||
}
|
||||
reg_al = 0xff;
|
||||
if (mscdex->rootDriverHeaderSeg==0) return false;
|
||||
PhysPt check = PhysMake(SegValue(ss),reg_sp);
|
||||
if(mem_readw(check+6) == 0xDADA) {
|
||||
//MSCDEX sets word on stack to ADAD if it DADA on entry.
|
||||
mem_writew(check+6,0xADAD);
|
||||
}
|
||||
reg_al = 0xff;
|
||||
return true;
|
||||
} else {
|
||||
LOG(LOG_MISC,LOG_ERROR)("NETWORK REDIRECTOR USED!!!");
|
||||
|
@ -1176,7 +1175,7 @@ static bool MSCDEX_Handler(void) {
|
|||
}
|
||||
|
||||
if (reg_ah!=0x15) return false; // not handled here, continue chain
|
||||
if (mscdex->GetNumDrives()==0) return true; // do nothing if MSCDEX not active
|
||||
if (mscdex->rootDriverHeaderSeg==0) return false; // not handled if MSCDEX not installed
|
||||
|
||||
PhysPt data = PhysMake(SegValue(es),reg_bx);
|
||||
MSCDEX_LOG("MSCDEX: INT 2F %04X BX= %04X CX=%04X",reg_ax,reg_bx,reg_cx);
|
||||
|
@ -1184,7 +1183,7 @@ static bool MSCDEX_Handler(void) {
|
|||
|
||||
case 0x1500: /* Install check */
|
||||
reg_bx = mscdex->GetNumDrives();
|
||||
reg_cx = mscdex->GetFirstDrive();
|
||||
if (reg_bx>0) reg_cx = mscdex->GetFirstDrive();
|
||||
reg_al = 0xff;
|
||||
return true;
|
||||
case 0x1501: /* Get cdrom driver info */
|
||||
|
|
Loading…
Add table
Reference in a new issue