diff options
author | Patryk Obara <dreamer.tan@gmail.com> | 2021-05-04 23:45:40 +0300 |
---|---|---|
committer | Patryk Obara <dreamer.tan@gmail.com> | 2021-05-04 23:45:40 +0300 |
commit | b6fed12af1bc87d0e9584b55552c71ec31239758 (patch) | |
tree | 9c6d62aaaee53b413a88dd9ed3377c56a3d341e3 | |
parent | b3acc39b046f999a0562eaf6fcea3bfc1a07a10e (diff) | |
parent | 88278c996d58cfca038aa84f43ee98204f15e243 (diff) |
Merge branch 'svn/trunk' into po/merge-4452 (2)po/merge-4452
-rw-r--r-- | docs/upstream/VERSION | 1 | ||||
-rw-r--r-- | src/dos/drive_fat.cpp | 6 | ||||
-rw-r--r-- | src/dosbox.cpp | 4 | ||||
-rw-r--r-- | src/ints/bios.cpp | 14 | ||||
-rw-r--r-- | src/ints/bios_disk.cpp | 27 | ||||
-rw-r--r-- | src/libs/zmbv/drvproc.cpp | 4 |
6 files changed, 29 insertions, 27 deletions
diff --git a/docs/upstream/VERSION b/docs/upstream/VERSION deleted file mode 100644 index a6e956f06..000000000 --- a/docs/upstream/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.74-2 diff --git a/src/dos/drive_fat.cpp b/src/dos/drive_fat.cpp index 17c1653ce..08e798b25 100644 --- a/src/dos/drive_fat.cpp +++ b/src/dos/drive_fat.cpp @@ -1014,8 +1014,10 @@ bool fatDrive::FileCreate(DOS_File **file, char *name, Bit16u attributes) { bool fatDrive::FileExists(const char *name) { direntry fileEntry; Bit32u dummy1, dummy2; - if(!getFileDirEntry(name, &fileEntry, &dummy1, &dummy2)) return false; - return true; + Bit16u save_errorcode = dos.errorcode; + bool found = getFileDirEntry(name, &fileEntry, &dummy1, &dummy2); + dos.errorcode = save_errorcode; + return found; } bool fatDrive::FileOpen(DOS_File **file, char *name, Bit32u flags) { diff --git a/src/dosbox.cpp b/src/dosbox.cpp index 40c16d0c1..dc98d9f3e 100644 --- a/src/dosbox.cpp +++ b/src/dosbox.cpp @@ -551,12 +551,12 @@ void DOSBOX_Init(void) { Pmulti_remain = secprop->Add_multiremain("cycles",Property::Changeable::Always," "); Pmulti_remain->Set_help( - "Amount of instructions DOSBox tries to emulate each millisecond.\n" + "Number of instructions DOSBox tries to emulate each millisecond.\n" "Setting this value too high results in sound dropouts and lags.\n" "Cycles can be set in 3 ways:\n" " 'auto' tries to guess what a game needs.\n" " It usually works, but can fail for certain games.\n" - " 'fixed #number' will set a fixed amount of cycles. This is what you usually\n" + " 'fixed #number' will set a fixed number of cycles. This is what you usually\n" " need if 'auto' fails (Example: fixed 4000).\n" " 'max' will allocate as much cycles as your computer is able to\n" " handle."); diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index 6fc42dbda..b65347d4b 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -1018,6 +1018,12 @@ static Bitu Reboot_Handler(void) { return CBRET_NONE; } +void BIOS_SetEquipment(Bit16u equipment) { + mem_writew(BIOS_CONFIGURATION,equipment); + if (IS_EGAVGA_ARCH) equipment &= ~0x30; //EGA/VGA startup display mode differs in CMOS + CMOS_SetRegister(0x14,(Bit8u)(equipment&0xff)); //Should be updated on changes +} + void BIOS_ZeroExtendedSize(bool in) { if(in) other_memsystems++; else other_memsystems--; @@ -1301,9 +1307,7 @@ public: if (machine==MCH_PCJR) config |= 0x100; // Gameport config |= 0x1000; - mem_writew(BIOS_CONFIGURATION,config); - if (IS_EGAVGA_ARCH) config &= ~0x30; //EGA/VGA startup display mode differs in CMOS - CMOS_SetRegister(0x14,(Bit8u)(config&0xff)); //Should be updated on changes + BIOS_SetEquipment(config); /* Setup extended memory size */ IO_Write(0x70,0x30); size_extended=IO_Read(0x71); @@ -1356,9 +1360,7 @@ void BIOS_SetComPorts(Bit16u baseaddr[]) { equipmentword = mem_readw(BIOS_CONFIGURATION); equipmentword &= (~0x0E00); equipmentword |= (portcount << 9); - mem_writew(BIOS_CONFIGURATION,equipmentword); - if (IS_EGAVGA_ARCH) equipmentword &= ~0x30; //EGA/VGA startup display mode differs in CMOS - CMOS_SetRegister(0x14,(Bit8u)(equipmentword&0xff)); //Should be updated on changes + BIOS_SetEquipment(equipmentword); } diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 966ec213d..935af903e 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -31,16 +31,17 @@ #include "string_utils.h" diskGeo DiskGeometryList[] = { - { 160, 8, 1, 40, 0}, - { 180, 9, 1, 40, 0}, - { 200, 10, 1, 40, 0}, - { 320, 8, 2, 40, 1}, - { 360, 9, 2, 40, 1}, - { 400, 10, 2, 40, 1}, - { 720, 9, 2, 80, 3}, - {1200, 15, 2, 80, 2}, - {1440, 18, 2, 80, 4}, - {2880, 36, 2, 80, 6}, + { 160, 8, 1, 40, 0}, // SS/DD 5.25" + { 180, 9, 1, 40, 0}, // SS/DD 5.25" + { 200, 10, 1, 40, 0}, // SS/DD 5.25" (booters) + { 320, 8, 2, 40, 1}, // DS/DD 5.25" + { 360, 9, 2, 40, 1}, // DS/DD 5.25" + { 400, 10, 2, 40, 1}, // DS/DD 5.25" (booters) + { 720, 9, 2, 80, 3}, // DS/DD 3.5" + {1200, 15, 2, 80, 2}, // DS/HD 5.25" + {1440, 18, 2, 80, 4}, // DS/HD 3.5" + {1680, 21, 2, 80, 4}, // DS/HD 3.5" (DMF) + {2880, 36, 2, 80, 6}, // DS/ED 3.5" {0, 0, 0, 0, 0} }; @@ -54,7 +55,7 @@ DOS_DTA *imgDTA; bool killRead; static bool swapping_requested; -void CMOS_SetRegister(Bitu regNr, Bit8u val); //For setting equipment word +void BIOS_SetEquipment(Bit16u equipment); /* 2 floppys and 2 harddrives, max */ std::array<std::shared_ptr<imageDisk>, MAX_DISK_IMAGES> imageDiskList; @@ -97,9 +98,7 @@ void incrementFDD(void) { equipment&=~0x00C0; equipment|=(numofdisks<<6); } else equipment|=1; - mem_writew(BIOS_CONFIGURATION,equipment); - if (IS_EGAVGA_ARCH) equipment &= ~0x30; //EGA/VGA startup display mode differs in CMOS - CMOS_SetRegister(0x14, (Bit8u)(equipment&0xff)); + BIOS_SetEquipment(equipment); } template<typename T, size_t N> diff --git a/src/libs/zmbv/drvproc.cpp b/src/libs/zmbv/drvproc.cpp index 22147f802..f1bda64cd 100644 --- a/src/libs/zmbv/drvproc.cpp +++ b/src/libs/zmbv/drvproc.cpp @@ -68,7 +68,7 @@ * Defined separately for each message. * ***************************************************************************/ -extern "C" LRESULT __declspec(dllexport) PASCAL DriverProc(DWORD dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2) { +extern "C" LRESULT __declspec(dllexport) PASCAL DriverProc(DWORD_PTR dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2) { CodecInst* pi = (CodecInst*)dwDriverID; switch (uiMessage) { @@ -80,7 +80,7 @@ extern "C" LRESULT __declspec(dllexport) PASCAL DriverProc(DWORD dwDriverID, HDR case DRV_OPEN: // GAAH! This used to return a pointer to 0xFFFF0000 when lParam==0! - return (LRESULT)(DWORD)(UINT) Open((ICOPEN*) lParam2); + return (LRESULT) Open((ICOPEN*) lParam2); case DRV_CLOSE: if (pi) Close(pi); |