From 7e22a0f0c00656ed3720c56cb95a7392b94d8738 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 5 Jun 2015 13:22:37 +0000 Subject: [PATCH] make variable types used in swapping consistent and use Bit8u for drives. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3917 --- include/bios_disk.h | 2 +- src/ints/bios_disk.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/bios_disk.h b/include/bios_disk.h index 8d91acfe..51cf6ff1 100644 --- a/include/bios_disk.h +++ b/include/bios_disk.h @@ -75,7 +75,7 @@ void incrementFDD(void); extern imageDisk *imageDiskList[2 + MAX_HDD_IMAGES]; extern imageDisk *diskSwap[20]; -extern Bits swapPosition; +extern Bit32s swapPosition; extern Bit16u imgDTASeg; /* Real memory location of temporary DTA pointer for fat image disk access */ extern RealPt imgDTAPtr; /* Real memory location of temporary DTA pointer for fat image disk access */ extern DOS_DTA *imgDTA; diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 880e7da5..6f70b0a1 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -58,7 +58,7 @@ void CMOS_SetRegister(Bitu regNr, Bit8u val); //For setting equipment word /* 2 floppys and 2 harddrives, max */ imageDisk *imageDiskList[MAX_DISK_IMAGES]; imageDisk *diskSwap[MAX_SWAPPABLE_DISKS]; -Bits swapPosition; +Bit32s swapPosition; void updateDPT(void) { Bit32u tmpheads, tmpcyl, tmpsect, tmpsize; @@ -101,9 +101,9 @@ void incrementFDD(void) { void swapInDisks(void) { bool allNull = true; - Bits diskcount = 0; - Bits swapPos = swapPosition; - int i; + Bit32s diskcount = 0; + Bit32s swapPos = swapPosition; + Bit32s i; /* Check to make sure that there is at least one setup image */ for(i=0;i=(2 + MAX_HDD_IMAGES)) { LOG(LOG_BIOS,LOG_ERROR)("Disk %d non-existant", driveNum); last_status = 0x01; @@ -308,7 +308,7 @@ static bool driveInactive(Bitu driveNum) { static Bitu INT13_DiskHandler(void) { Bit16u segat, bufptr; Bit8u sectbuf[512]; - Bitu drivenum; + Bit8u drivenum; Bitu i,t; last_drive = reg_dl; drivenum = GetDosDriveNumber(reg_dl);