Some fixes for MSVC.
- Fixed compilation failure of MSVC plugin 'speaker'. - Fixed some MSVC warnings.
This commit is contained in:
parent
e88f14558d
commit
50dfe4b8de
@ -231,7 +231,7 @@ void bx_cmos_c::init(void)
|
||||
(stat_buf.st_size != 256)) {
|
||||
BX_PANIC(("CMOS: image file size must be 64, 128 or 256"));
|
||||
} else {
|
||||
BX_CMOS_THIS s.max_reg = stat_buf.st_size - 1;
|
||||
BX_CMOS_THIS s.max_reg = (Bit8u)(stat_buf.st_size - 1);
|
||||
if (BX_CMOS_THIS s.max_reg == 255) {
|
||||
DEV_register_ioread_handler(this, read_handler, 0x0072, "Ext CMOS RAM", 1);
|
||||
DEV_register_ioread_handler(this, read_handler, 0x0073, "Ext CMOS RAM", 1);
|
||||
|
@ -448,7 +448,7 @@ Bit32u bx_pci_bridge_c::agp_aperture_read(bx_phy_address addr, unsigned len,
|
||||
bx_bool agp)
|
||||
{
|
||||
if (BX_PCI_THIS pci_conf[0x51] & 0x02) {
|
||||
Bit32u offset = (addr - pci_bar[0].addr);
|
||||
Bit32u offset = (Bit32u)(addr - pci_bar[0].addr);
|
||||
Bit32u gart_index = (Bit32u)(offset >> 12);
|
||||
Bit32u page_offset = (Bit32u)(offset & 0xfff);
|
||||
Bit32u gart_addr = BX_PCI_THIS gart_base + (gart_index << 2);
|
||||
@ -474,7 +474,7 @@ void bx_pci_bridge_c::agp_aperture_write(bx_phy_address addr, Bit32u value,
|
||||
unsigned len, bx_bool agp)
|
||||
{
|
||||
if (BX_PCI_THIS pci_conf[0x51] & 0x02) {
|
||||
Bit32u offset = (addr - pci_bar[0].addr);
|
||||
Bit32u offset = (Bit32u)(addr - pci_bar[0].addr);
|
||||
Bit32u gart_index = (Bit32u)(offset >> 12);
|
||||
Bit32u page_offset = (Bit32u)(offset & 0xfff);
|
||||
Bit32u gart_addr = BX_PCI_THIS gart_base + (gart_index << 2);
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2017 The Bochs Project
|
||||
// Copyright (C) 2001-2018 The Bochs Project
|
||||
//
|
||||
// I/O memory handlers API Copyright (C) 2003 by Frank Cornelis
|
||||
//
|
||||
@ -156,7 +156,7 @@ public:
|
||||
|
||||
BX_MEM_SMF Bit64u get_memory_len(void);
|
||||
BX_MEM_SMF void allocate_block(Bit32u index);
|
||||
BX_MEM_SMF Bit8u* alloc_vector_aligned(Bit32u bytes, Bit32u alignment);
|
||||
BX_MEM_SMF Bit8u* alloc_vector_aligned(Bit64u bytes, Bit64u alignment);
|
||||
|
||||
#if BX_SUPPORT_MONITOR_MWAIT
|
||||
BX_MEM_SMF bx_bool is_monitor(bx_phy_address begin_addr, unsigned len);
|
||||
|
@ -54,7 +54,7 @@ BX_MEM_C::BX_MEM_C()
|
||||
#endif
|
||||
}
|
||||
|
||||
Bit8u* BX_MEM_C::alloc_vector_aligned(Bit32u bytes, Bit32u alignment)
|
||||
Bit8u* BX_MEM_C::alloc_vector_aligned(Bit64u bytes, Bit64u alignment)
|
||||
{
|
||||
Bit64u test_mask = alignment - 1;
|
||||
BX_MEM_THIS actual_vector = new Bit8u [(Bit32u)(bytes + test_mask)];
|
||||
@ -429,7 +429,7 @@ void BX_MEM_C::load_ROM(const char *path, bx_phy_address romaddress, Bit8u type)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
romaddress = -size;
|
||||
romaddress = ~(size - 1);
|
||||
}
|
||||
offset = romaddress & BIOS_MASK;
|
||||
if ((romaddress & 0xf0000) < 0xf0000) {
|
||||
@ -531,7 +531,7 @@ void BX_MEM_C::load_RAM(const char *path, bx_phy_address ramaddress)
|
||||
|
||||
size = (unsigned long)stat_buf.st_size;
|
||||
|
||||
offset = ramaddress;
|
||||
offset = (unsigned long)ramaddress;
|
||||
while (size > 0) {
|
||||
ret = read(fd, (bx_ptr_t) BX_MEM_THIS get_vector(offset), size);
|
||||
if (ret <= 0) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2017 The Bochs Project
|
||||
// Copyright (C) 2001-2018 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
@ -345,7 +345,7 @@ BX_CPP_INLINE void bx_ppc_store_le64(Bit64u *p, Bit64u v)
|
||||
|
||||
#if BX_HAVE_REALTIME_USEC
|
||||
// 64-bit time in useconds.
|
||||
extern Bit64u bx_get_realtime64_usec (void);
|
||||
BOCHSAPI_MSVCONLY extern Bit64u bx_get_realtime64_usec (void);
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user