Some warnings.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3227
This commit is contained in:
parent
e3c5fe0708
commit
2314183f15
16 changed files with 93 additions and 104 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: ems.cpp,v 1.58 2008-09-07 10:55:15 c2woody Exp $ */
|
||||
/* $Id: ems.cpp,v 1.59 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -527,9 +527,9 @@ static Bit8u MemoryRegion(void) {
|
|||
}
|
||||
LoadMoveRegion(SegPhys(ds)+reg_si,region);
|
||||
/* Parse the region for information */
|
||||
PhysPt src_mem,dest_mem;
|
||||
MemHandle src_handle,dest_handle;
|
||||
Bitu src_off,dest_off;Bitu src_remain,dest_remain;
|
||||
PhysPt src_mem = 0,dest_mem = 0;
|
||||
MemHandle src_handle = 0,dest_handle = 0;
|
||||
Bitu src_off = 0,dest_off = 0 ;Bitu src_remain = 0,dest_remain = 0;
|
||||
if (!region.src_type) {
|
||||
src_mem=region.src_page_seg*16+region.src_offset;
|
||||
} else {
|
||||
|
@ -1009,7 +1009,7 @@ static Bitu V86_Monitor() {
|
|||
Bitu rm_val=mem_readb((v86_cs<<4)+v86_ip+2);
|
||||
Bitu which=(rm_val >> 3) & 7;
|
||||
if ((rm_val<0xc0) || (rm_val>=0xe8))
|
||||
E_Exit("Invalid opcode 0x0f 0x20 %x caused a protection fault!",rm_val);
|
||||
E_Exit("Invalid opcode 0x0f 0x20 %x caused a protection fault!",static_cast<unsigned int>(rm_val));
|
||||
Bit32u crx=CPU_GET_CRX(which);
|
||||
switch (rm_val&7) {
|
||||
case 0: reg_eax=crx; break;
|
||||
|
@ -1028,7 +1028,7 @@ static Bitu V86_Monitor() {
|
|||
Bitu rm_val=mem_readb((v86_cs<<4)+v86_ip+2);
|
||||
Bitu which=(rm_val >> 3) & 7;
|
||||
if ((rm_val<0xc0) || (rm_val>=0xe8))
|
||||
E_Exit("Invalid opcode 0x0f 0x22 %x caused a protection fault!",rm_val);
|
||||
E_Exit("Invalid opcode 0x0f 0x22 %x caused a protection fault!",static_cast<unsigned int>(rm_val));
|
||||
Bit32u crx=0;
|
||||
switch (rm_val&7) {
|
||||
case 0: crx=reg_eax; break;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10.cpp,v 1.52 2008-05-10 17:33:28 c2woody Exp $ */
|
||||
/* $Id: int10.cpp,v 1.53 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "mem.h"
|
||||
|
@ -684,7 +684,7 @@ static void INT10_InitVGA(void) {
|
|||
/* More than 64k */
|
||||
IO_Write(0x3c4,0x04);
|
||||
IO_Write(0x3c5,0x02);
|
||||
};
|
||||
}
|
||||
|
||||
static void SetupTandyBios(void) {
|
||||
static Bit8u TandyConfig[130]= {
|
||||
|
@ -720,4 +720,4 @@ void INT10_Init(Section* sec) {
|
|||
INT10_SetupVESA();
|
||||
INT10_SetupRomMemoryChecksum();//SetupVesa modifies the rom as well.
|
||||
INT10_SetVideoMode(machine==MCH_HERC ? 0x7 : 0x3);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: int10_vptable.cpp,v 1.2 2008-08-06 18:32:35 c2woody Exp $ */
|
||||
/* $Id: int10_vptable.cpp,v 1.3 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "mem.h"
|
||||
|
@ -461,6 +461,7 @@ Bitu INT10_SetupVideoParameterTable(PhysPt basepos) {
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
void INT10_GenerateVideoParameterTable(void) {
|
||||
if (!IS_VGA_ARCH) E_Exit("Be sure that all graphics registers are readable!");
|
||||
Bitu i;
|
||||
|
@ -701,3 +702,4 @@ void INT10_GenerateVideoParameterTable(void) {
|
|||
INT10_SetVideoMode(3);
|
||||
E_Exit("done!");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: xms.cpp,v 1.52 2008-03-29 16:47:09 c2woody Exp $ */
|
||||
/* $Id: xms.cpp,v 1.53 2008-10-05 14:44:52 qbix79 Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -103,18 +103,16 @@ struct XMS_MemMove{
|
|||
#endif
|
||||
|
||||
|
||||
Bitu XMS_EnableA20(bool enable)
|
||||
{
|
||||
Bitu XMS_EnableA20(bool enable) {
|
||||
Bit8u val = IO_Read (0x92);
|
||||
if (enable) IO_Write(0x92,val | 2);
|
||||
else IO_Write(0x92,val & ~2);
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_GetEnabledA20(void)
|
||||
{
|
||||
Bitu XMS_GetEnabledA20(void) {
|
||||
return (IO_Read(0x92)&2)>0;
|
||||
};
|
||||
}
|
||||
|
||||
static RealPt xms_callback;
|
||||
static bool umb_available;
|
||||
|
@ -131,7 +129,7 @@ Bitu XMS_QueryFreeMemory(Bit16u& largestFree, Bit16u& totalFree) {
|
|||
largestFree=(Bit16u)(MEM_FreeLargest()*4);
|
||||
if (!totalFree) return XMS_OUT_OF_SPACE;
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_AllocateMemory(Bitu size, Bit16u& handle) { // size = kb
|
||||
/* Find free handle */
|
||||
|
@ -154,7 +152,7 @@ Bitu XMS_AllocateMemory(Bitu size, Bit16u& handle) { // size = kb
|
|||
xms_handles[index].size=size;
|
||||
handle=index;
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_FreeMemory(Bitu handle) {
|
||||
if (InvalidHandle(handle)) return XMS_INVALID_HANDLE;
|
||||
|
@ -163,7 +161,7 @@ Bitu XMS_FreeMemory(Bitu handle) {
|
|||
xms_handles[handle].size=0;
|
||||
xms_handles[handle].free=true;
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_MoveMemory(PhysPt bpt) {
|
||||
/* Read the block with mem_read's */
|
||||
|
@ -215,7 +213,7 @@ Bitu XMS_LockMemory(Bitu handle, Bit32u& address) {
|
|||
if (xms_handles[handle].locked<255) xms_handles[handle].locked++;
|
||||
address = xms_handles[handle].mem*4096;
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_UnlockMemory(Bitu handle) {
|
||||
if (InvalidHandle(handle)) return XMS_INVALID_HANDLE;
|
||||
|
@ -224,7 +222,7 @@ Bitu XMS_UnlockMemory(Bitu handle) {
|
|||
return 0;
|
||||
}
|
||||
return XMS_BLOCK_NOT_LOCKED;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_GetHandleInformation(Bitu handle, Bit8u& lockCount, Bit8u& numFree, Bit16u& size) {
|
||||
if (InvalidHandle(handle)) return XMS_INVALID_HANDLE;
|
||||
|
@ -236,7 +234,7 @@ Bitu XMS_GetHandleInformation(Bitu handle, Bit8u& lockCount, Bit8u& numFree, Bit
|
|||
}
|
||||
size=(Bit16u)(xms_handles[handle].size);
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
|
||||
Bitu XMS_ResizeMemory(Bitu handle, Bitu newSize) {
|
||||
if (InvalidHandle(handle)) return XMS_INVALID_HANDLE;
|
||||
|
@ -261,7 +259,8 @@ static bool multiplex_xms(void) {
|
|||
}
|
||||
return false;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
INLINE void SET_RESULT(Bitu res,bool touch_bl_on_succes=true) {
|
||||
if(touch_bl_on_succes || res) reg_bl = (Bit8u)res;
|
||||
reg_ax = (res==0);
|
||||
|
@ -412,6 +411,7 @@ Bitu XMS_Handler(void) {
|
|||
// LOG(LOG_MISC,LOG_ERROR)("XMS: CALL Result: %02X",reg_bl);
|
||||
return CBRET_NONE;
|
||||
}
|
||||
|
||||
class XMS: public Module_base {
|
||||
private:
|
||||
CALLBACK_HandlerObject callbackhandler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue