1
0
Fork 0

New segments and revoved the bootdisk support in here.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@179
This commit is contained in:
Sjoerd van der Berg 2002-08-19 12:58:23 +00:00
parent ed19eb384d
commit 0668b95197

View file

@ -28,32 +28,6 @@ static BIOS_Disk * Floppys[2];
static BIOS_Disk * Harddisks[BIOS_MAX_DISK];
static Bit8u last_status;
static Bitu INT13_FullHandler(void) {
/* Check for disk numbers */
BIOS_Disk * disk=Floppys[0];
switch (reg_ah) {
case 0x00:
last_status=reg_ah=0;
break;
case 0x01: /* Get Status of last operation */
reg_ah=last_status;
break;
case 0x02: /* Read Sectors into Memory */
last_status=reg_ah=disk->Read_Sector(&reg_al,reg_dh,reg_ch,(reg_cl & 0x3f)-1,real_off(Segs[es].value,reg_bx));
CALLBACK_SCF(false);
break;
case 0x03: /* Write Sectors from Memory */
last_status=reg_ah=disk->Write_Sector(&reg_al,reg_dh,reg_ch,(reg_cl & 0x3f)-1,real_off(Segs[es].value,reg_bx));
CALLBACK_SCF(false);
break;
default:
LOG_DEBUG("INT13:Illegal call %2X",reg_ah);
reg_ah=0xff;
CALLBACK_SCF(true);
}
return CBRET_NONE;
};
static Bitu INT13_SmallHandler(void) {
switch (reg_ah) {
@ -79,13 +53,7 @@ static Bitu INT13_SmallHandler(void) {
void BIOS_SetupDisks(void) {
/* TODO Start the time correctly */
call_int13=CALLBACK_Allocate();
#ifdef C_IMAGE
Floppys[0]=new imageDisk("c:\\test.img");
for (Bit32u i=0;i<BIOS_MAX_DISK;i++) Harddisks[i]=0;
CALLBACK_Setup(call_int13,&INT13_FullHandler,CB_IRET);
#else
CALLBACK_Setup(call_int13,&INT13_SmallHandler,CB_IRET);
#endif
RealSetVec(0x13,CALLBACK_RealPointer(call_int13));
/* Init the Disk Tables */
last_status=0;