- a bunch of warnings in MSVC fixed
- name of source file in wxworkspace.zip fixed
This commit is contained in:
parent
2ea23a5f6e
commit
e98c100f74
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: floppy.cc,v 1.77 2005-03-11 21:12:52 vruppert Exp $
|
||||
// $Id: floppy.cc,v 1.78 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -132,7 +132,7 @@ bx_floppy_ctrl_c::init(void)
|
||||
{
|
||||
Bit8u i;
|
||||
|
||||
BX_DEBUG(("Init $Id: floppy.cc,v 1.77 2005-03-11 21:12:52 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: floppy.cc,v 1.78 2005-06-04 17:44:58 vruppert Exp $"));
|
||||
DEV_dma_register_8bit_channel(2, dma_read, dma_write, "Floppy Drive");
|
||||
DEV_register_irq(6, "Floppy Drive");
|
||||
for (unsigned addr=0x03F2; addr<=0x03F7; addr++) {
|
||||
@ -1006,7 +1006,7 @@ bx_floppy_ctrl_c::floppy_xfer(Bit8u drive, Bit32u offset, Bit8u *buffer,
|
||||
{
|
||||
// don't need to seek the file if we are using Win95 type direct access
|
||||
if (!BX_FD_THIS s.media[drive].raw_floppy_win95) {
|
||||
ret = lseek(BX_FD_THIS s.media[drive].fd, offset, SEEK_SET);
|
||||
ret = (int)lseek(BX_FD_THIS s.media[drive].fd, offset, SEEK_SET);
|
||||
if (ret < 0) {
|
||||
BX_PANIC(("could not perform lseek() to %d on floppy image file", offset));
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ioapic.cc,v 1.18 2005-04-27 18:09:27 sshwarts Exp $
|
||||
// $Id: ioapic.cc,v 1.19 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
#include <stdio.h>
|
||||
@ -12,16 +12,16 @@ class bx_ioapic_c bx_ioapic;
|
||||
|
||||
void bx_io_redirect_entry_t::parse_value ()
|
||||
{
|
||||
dest = (value >> 56) & APIC_ID_MASK;
|
||||
masked = (value >> 16) & 1;
|
||||
trig_mode = (value >> 15) & 1;
|
||||
remote_irr = (value >> 14) & 1;
|
||||
polarity = (value >> 13) & 1;
|
||||
dest = (Bit8u)((value >> 56) & APIC_ID_MASK);
|
||||
masked = (Bit8u)((value >> 16) & 1);
|
||||
trig_mode = (Bit8u)((value >> 15) & 1);
|
||||
remote_irr = (Bit8u)((value >> 14) & 1);
|
||||
polarity = (Bit8u)((value >> 13) & 1);
|
||||
//delivery_status = (value >> 12) & 1;
|
||||
delivery_status = 0; // we'll change this later...
|
||||
dest_mode = (value >> 11) & 1;
|
||||
delivery_mode = (value >> 8) & 7;
|
||||
vector = value & 0xff;
|
||||
dest_mode = (Bit8u)((value >> 11) & 1);
|
||||
delivery_mode = (Bit8u)((value >> 8) & 7);
|
||||
vector = (Bit8u)(value & 0xff);
|
||||
}
|
||||
|
||||
void bx_io_redirect_entry_t::sprintf_self (char *buf)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ioapic.h,v 1.8 2005-03-17 20:50:57 sshwarts Exp $
|
||||
// $Id: ioapic.h,v 1.9 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
extern class bx_ioapic_c bx_ioapic;
|
||||
@ -10,8 +10,8 @@ extern class bx_ioapic_c bx_ioapic;
|
||||
class bx_io_redirect_entry_t {
|
||||
Bit64u value;
|
||||
public:
|
||||
Bit32u get_even_word () { return value & 0xffffffff; }
|
||||
Bit32u get_odd_word () { return (value>>32) & 0xffffffff; }
|
||||
Bit32u get_even_word () { return (Bit32u)(value & 0xffffffff); }
|
||||
Bit32u get_odd_word () { return (Bit32u)((value>>32) & 0xffffffff); }
|
||||
void set_even_word (Bit32u even) {
|
||||
// keep high 32 bits of value, replace low 32
|
||||
value = ((value >> 32) << 32) | (even & 0xffffffff);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pcivga.cc,v 1.6 2004-08-06 15:49:55 vruppert Exp $
|
||||
// $Id: pcivga.cc,v 1.7 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002,2003 Mike Nordell
|
||||
@ -74,13 +74,15 @@ bx_pcivga_c::init(void)
|
||||
// called once when bochs initializes
|
||||
|
||||
Bit8u devfunc = 0x00;
|
||||
unsigned i;
|
||||
|
||||
DEV_register_pci_handlers(this,
|
||||
pci_read_handler,
|
||||
pci_write_handler,
|
||||
&devfunc, BX_PLUGIN_PCIVGA,
|
||||
"Experimental PCI VGA");
|
||||
|
||||
for (unsigned i=0; i<256; i++) {
|
||||
for (i=0; i<256; i++) {
|
||||
BX_PCIVGA_THIS s.pci_conf[i] = 0x0;
|
||||
}
|
||||
|
||||
@ -98,7 +100,7 @@ bx_pcivga_c::init(void)
|
||||
{ 0x0b, 0x03 }, // class_base display
|
||||
{ 0x0e, 0x00 } // header_type_generic
|
||||
};
|
||||
for (unsigned i = 0; i < sizeof(init_vals) / sizeof(*init_vals); ++i) {
|
||||
for (i = 0; i < sizeof(init_vals) / sizeof(*init_vals); ++i) {
|
||||
BX_PCIVGA_THIS s.pci_conf[init_vals[i].addr] = init_vals[i].val;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// $Id: pit_wrap.cc,v 1.58 2004-12-13 19:10:38 vruppert Exp $
|
||||
// $Id: pit_wrap.cc,v 1.59 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -313,7 +313,7 @@ bx_pit_c::write( Bit32u address, Bit32u dvalue,
|
||||
case 0x61:
|
||||
BX_PIT_THIS s.speaker_data_on = (value >> 1) & 0x01;
|
||||
if ( BX_PIT_THIS s.speaker_data_on ) {
|
||||
DEV_speaker_beep_on(1193180.0 / this->get_timer(2));
|
||||
DEV_speaker_beep_on((float)(1193180.0 / this->get_timer(2)));
|
||||
} else {
|
||||
DEV_speaker_beep_off();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: slowdown_timer.cc,v 1.19 2004-06-19 15:20:14 sshwarts Exp $
|
||||
// $Id: slowdown_timer.cc,v 1.20 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -123,7 +123,7 @@ bx_slowdown_timer_c::handle_timer() {
|
||||
#endif
|
||||
} else {
|
||||
bx_pc_system.deactivate_timer(s.timer_handle);
|
||||
bx_pc_system.activate_timer(s.timer_handle,s.Q,0);
|
||||
bx_pc_system.activate_timer(s.timer_handle,(Bit32u)s.Q,0);
|
||||
#if BX_SLOWDOWN_PRINTF_FEEDBACK
|
||||
printf("running at NORMAL speed\n");
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: svga_cirrus.cc,v 1.20 2005-04-21 18:31:58 vruppert Exp $
|
||||
// $Id: svga_cirrus.cc,v 1.21 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2004 Makoto Suzuki (suzu)
|
||||
@ -1113,12 +1113,12 @@ bx_svga_cirrus_c::draw_hardware_cursor(unsigned xc, unsigned yc, bx_svga_tileinf
|
||||
if (plane1 & 1) {
|
||||
if (info->is_little_endian) {
|
||||
for (i=info->bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2--) = fgcol >> i;
|
||||
*(tile_ptr2--) = (Bit8u)(fgcol >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=0; i<info->bpp; i+=8) {
|
||||
*(tile_ptr2--) = fgcol >> i;
|
||||
*(tile_ptr2--) = (Bit8u)(fgcol >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1132,12 +1132,12 @@ bx_svga_cirrus_c::draw_hardware_cursor(unsigned xc, unsigned yc, bx_svga_tileinf
|
||||
if (plane1 & 1) {
|
||||
if (info->is_little_endian) {
|
||||
for (i=info->bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2--) = bgcol >> i;
|
||||
*(tile_ptr2--) = (Bit8u)(bgcol >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=0; i<info->bpp; i+=8) {
|
||||
*(tile_ptr2--) = bgcol >> i;
|
||||
*(tile_ptr2--) = (Bit8u)(bgcol >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: vga.cc,v 1.119 2005-04-30 21:22:26 vruppert Exp $
|
||||
// $Id: vga.cc,v 1.120 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -1460,12 +1460,12 @@ bx_vga_c::update(void)
|
||||
}
|
||||
if (info.is_little_endian) {
|
||||
for (i=0; i<info.bpp; i+=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=info.bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1502,12 +1502,12 @@ bx_vga_c::update(void)
|
||||
BX_VGA_THIS s.pel.data[colour].blue, dac_size, info.blue_shift, info.blue_mask);
|
||||
if (info.is_little_endian) {
|
||||
for (i=0; i<info.bpp; i+=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=info.bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1538,12 +1538,12 @@ bx_vga_c::update(void)
|
||||
colour & 0x7c00, 15, info.red_shift, info.red_mask);
|
||||
if (info.is_little_endian) {
|
||||
for (i=0; i<info.bpp; i+=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=info.bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1574,12 +1574,12 @@ bx_vga_c::update(void)
|
||||
colour & 0xf800, 16, info.red_shift, info.red_mask);
|
||||
if (info.is_little_endian) {
|
||||
for (i=0; i<info.bpp; i+=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=info.bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1611,12 +1611,12 @@ bx_vga_c::update(void)
|
||||
blue, 8, info.blue_shift, info.blue_mask);
|
||||
if (info.is_little_endian) {
|
||||
for (i=0; i<info.bpp; i+=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=info.bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1649,12 +1649,12 @@ bx_vga_c::update(void)
|
||||
blue, 8, info.blue_shift, info.blue_mask);
|
||||
if (info.is_little_endian) {
|
||||
for (i=0; i<info.bpp; i+=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=info.bpp-8; i>-8; i-=8) {
|
||||
*(tile_ptr2++) = colour >> i;
|
||||
*(tile_ptr2++) = (Bit8u)(colour >> i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// $Id: virt_timer.cc,v 1.21 2004-06-19 15:20:15 sshwarts Exp $
|
||||
// $Id: virt_timer.cc,v 1.22 2005-06-04 17:44:58 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -409,7 +409,8 @@ bx_virt_timer_c::init(void) {
|
||||
|
||||
register_timer(this, nullTimer, (Bit32u)NullTimerInterval, 1, 1, "Null Timer");
|
||||
|
||||
system_timer_id = bx_pc_system.register_timer(this, pc_system_timer_handler,virtual_next_event_time , 0, 1, "Virtual Timer");
|
||||
system_timer_id = bx_pc_system.register_timer(this, pc_system_timer_handler,
|
||||
(Bit32u)virtual_next_event_time, 0, 1, "Virtual Timer");
|
||||
|
||||
//Real time variables:
|
||||
#if BX_HAVE_REALTIME_USEC
|
||||
|
@ -319,7 +319,7 @@ off_t vmware3_image_t::perform_seek()
|
||||
return INVALID_OFFSET;
|
||||
}
|
||||
|
||||
unsigned relative_offset = (requested_offset - current->min_offset);
|
||||
unsigned relative_offset = (unsigned)(requested_offset - current->min_offset);
|
||||
unsigned i = relative_offset >> FL_SHIFT;
|
||||
unsigned j = (relative_offset & ~FL_MASK) / tlb_size;
|
||||
|
||||
@ -354,7 +354,7 @@ ssize_t vmware3_image_t::read(void * buf, size_t count)
|
||||
BX_DEBUG(("vmware3 COW read failed on %d bytes", count));
|
||||
return -1;
|
||||
}
|
||||
unsigned bytes_remaining = tlb_size - offset;
|
||||
unsigned bytes_remaining = (unsigned)(tlb_size - offset);
|
||||
unsigned amount = (bytes_remaining > count) ? count : bytes_remaining;
|
||||
memcpy(buf, current->tlb + offset, amount);
|
||||
requested_offset += amount;
|
||||
@ -374,7 +374,7 @@ bool vmware3_image_t::sync()
|
||||
if(current->synced)
|
||||
return true;
|
||||
|
||||
unsigned relative_offset = (current->offset - current->min_offset);
|
||||
unsigned relative_offset = (unsigned)(current->offset - current->min_offset);
|
||||
unsigned i = relative_offset >> FL_SHIFT;
|
||||
unsigned j = (relative_offset & ~FL_MASK) / tlb_size;
|
||||
|
||||
@ -447,7 +447,7 @@ ssize_t vmware3_image_t::write(const void * buf, size_t count)
|
||||
off_t offset = perform_seek();
|
||||
if(offset == INVALID_OFFSET)
|
||||
return -1;
|
||||
unsigned bytes_remaining = tlb_size - offset;
|
||||
unsigned bytes_remaining = (unsigned)(tlb_size - offset);
|
||||
unsigned amount = 0;
|
||||
current->synced = false;
|
||||
if(bytes_remaining > count)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* misc/bximage.c
|
||||
* $Id: bximage.c,v 1.25 2005-01-28 10:25:06 sshwarts Exp $
|
||||
* $Id: bximage.c,v 1.26 2005-06-04 17:44:59 vruppert Exp $
|
||||
*
|
||||
* Create empty hard disk or floppy disk images for bochs.
|
||||
*
|
||||
@ -45,7 +45,7 @@ typedef int (*WRITE_IMAGE_WIN32)(HANDLE, Bit64u);
|
||||
#endif
|
||||
|
||||
char *EOF_ERR = "ERROR: End of input";
|
||||
char *rcsid = "$Id: bximage.c,v 1.25 2005-01-28 10:25:06 sshwarts Exp $";
|
||||
char *rcsid = "$Id: bximage.c,v 1.26 2005-06-04 17:44:59 vruppert Exp $";
|
||||
char *divider = "========================================================================";
|
||||
|
||||
/* menu data for choosing floppy/hard disk */
|
||||
@ -319,8 +319,8 @@ int make_flat_image_win32(HANDLE hFile, Bit64u sec)
|
||||
WriteFile(hFile, buffer, 512, &dwCount, NULL); // set the first sector to 0, Win98 doesn't zero out the file
|
||||
// if there is a write at/over the end
|
||||
DeviceIoControl(hFile, FSCTL_SET_COMPRESSION, &mode, sizeof(mode), NULL, 0, &dwCount, NULL);
|
||||
pos.u.LowPart = (sec - 1) << 9;
|
||||
pos.u.HighPart = (sec - 1) >> 23;
|
||||
pos.u.LowPart = (unsigned long)((sec - 1) << 9);
|
||||
pos.u.HighPart = (unsigned long)((sec - 1) >> 23);
|
||||
pos.u.LowPart = SetFilePointer(hFile, pos.u.LowPart, &pos.u.HighPart, FILE_BEGIN);
|
||||
memset(buffer, 0, 512);
|
||||
if ((pos.u.LowPart == 0xffffffff && GetLastError() != NO_ERROR) || !WriteFile(hFile, buffer, 512, &dwCount, NULL) || dwCount != 512)
|
||||
@ -344,7 +344,7 @@ int make_flat_image(FILE *fp, Bit64u sec)
|
||||
/* temp <-- min(sec, 4194303)
|
||||
* 4194303 is (int)(0x7FFFFFFF/512)
|
||||
*/
|
||||
long temp = ((sec < 4194303) ? sec : 4194303);
|
||||
long temp = (long)((sec < 4194303) ? sec : 4194303);
|
||||
fseek(fp, 512*temp, SEEK_CUR);
|
||||
sec -= temp;
|
||||
}
|
||||
@ -373,7 +373,7 @@ int make_sparse_image(FILE *fp, Bit64u sec)
|
||||
header.pagesize = htod32((1 << 10) * 32); // Use 32 KB Pages - could be configurable
|
||||
numpages = (sec / (dtoh32(header.pagesize) / 512)) + 1;
|
||||
|
||||
header.numpages = htod32(numpages);
|
||||
header.numpages = htod32((Bit32u)numpages);
|
||||
|
||||
if (numpages != dtoh32(header.numpages))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user