1
0
Fork 0

Support some installer disk detection methods: block device count, and specific MBR/boot sector contents. Fixes (original) SimCity, Amberstar, and later MicroProse installers.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4120
This commit is contained in:
ripsaw8080 2018-06-21 17:46:52 +00:00
parent 823242560c
commit 66b813ef9c
4 changed files with 32 additions and 7 deletions

View file

@ -366,8 +366,19 @@ static Bitu INT13_DiskHandler(void) {
return CBRET_NONE;
}
if (!any_images) {
// Inherit the Earth cdrom (uses it as disk test)
if (drivenum >= DOS_DRIVES || !Drives[drivenum] || Drives[drivenum]->isRemovable()) {
reg_ah = 0x01;
CALLBACK_SCF(true);
return CBRET_NONE;
}
// Inherit the Earth cdrom and Amberstar use it as a disk test
if (((reg_dl&0x80)==0x80) && (reg_dh==0) && ((reg_cl&0x3f)==1)) {
if (reg_ch==0) {
PhysPt ptr = PhysMake(SegValue(es),reg_bx);
// write some MBR data into buffer for Amberstar installer
mem_writeb(ptr+0x1be,0x80); // first partition is active
mem_writeb(ptr+0x1c2,0x06); // first partition is FAT16B
}
reg_ah = 0;
CALLBACK_SCF(false);
return CBRET_NONE;