Fixing some warnings (that may have caused bugs in s3_virge and voodoo) and other fixes. Removed Mingw64 makefile.
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
* Implementation of the CD-ROM drive with SCSI(-like)
|
* Implementation of the CD-ROM drive with SCSI(-like)
|
||||||
* commands, for both ATAPI and SCSI usage.
|
* commands, for both ATAPI and SCSI usage.
|
||||||
*
|
*
|
||||||
* Version: @(#)cdrom.c 1.0.20 2017/10/26
|
* Version: @(#)cdrom.c 1.0.21 2017/11/02
|
||||||
*
|
*
|
||||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ bool CDROM_Interface_Image::LoadIsoFile(char* filename)
|
|||||||
tracks.clear();
|
tracks.clear();
|
||||||
|
|
||||||
// data track
|
// data track
|
||||||
Track track = {0, 0, 0, 0, 0, 0, false, NULL};
|
Track track = {0, 0, 0, 0, 0, 0, 0, false, NULL};
|
||||||
bool error;
|
bool error;
|
||||||
track.file = new BinaryFile(filename, error);
|
track.file = new BinaryFile(filename, error);
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -305,7 +305,7 @@ static string dirname(char * file) {
|
|||||||
|
|
||||||
bool CDROM_Interface_Image::LoadCueSheet(char *cuefile)
|
bool CDROM_Interface_Image::LoadCueSheet(char *cuefile)
|
||||||
{
|
{
|
||||||
Track track = {0, 0, 0, 0, 0, 0, false, NULL};
|
Track track = {0, 0, 0, 0, 0, 0, 0, false, NULL};
|
||||||
tracks.clear();
|
tracks.clear();
|
||||||
uint64_t shift = 0;
|
uint64_t shift = 0;
|
||||||
uint64_t currPregap = 0;
|
uint64_t currPregap = 0;
|
||||||
@@ -470,7 +470,10 @@ bool CDROM_Interface_Image::AddTrack(Track &curr, uint64_t &shift, uint64_t pres
|
|||||||
if (curr.number <= 1) return false;
|
if (curr.number <= 1) return false;
|
||||||
if (prev.number + 1 != curr.number) return false;
|
if (prev.number + 1 != curr.number) return false;
|
||||||
if (curr.start < prev.start + prev.length) return false;
|
if (curr.start < prev.start + prev.length) return false;
|
||||||
|
#if 0
|
||||||
|
/* curr.length is unsigned, so... --FvK */
|
||||||
if (curr.length < 0) return false;
|
if (curr.length < 0) return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
tracks.push_back(curr);
|
tracks.push_back(curr);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
* Based on an early driver for MINIX 1.5.
|
* Based on an early driver for MINIX 1.5.
|
||||||
* Based on the 86Box PS/2 mouse driver as a framework.
|
* Based on the 86Box PS/2 mouse driver as a framework.
|
||||||
*
|
*
|
||||||
* Version: @(#)mouse_bus.c 1.0.21 2017/11/01
|
* Version: @(#)mouse_bus.c 1.0.22 2017/11/01
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
@@ -72,7 +72,7 @@ typedef struct mouse_bus {
|
|||||||
uint8_t r_intr; /* INTSTAT register (RO) */
|
uint8_t r_intr; /* INTSTAT register (RO) */
|
||||||
uint8_t r_conf; /* CONFIG register */
|
uint8_t r_conf; /* CONFIG register */
|
||||||
|
|
||||||
int8_t x, y; /* current mouse status */
|
int16_t x, y; /* current mouse status */
|
||||||
uint8_t but;
|
uint8_t but;
|
||||||
|
|
||||||
uint8_t (*read)(struct mouse_bus *, uint16_t);
|
uint8_t (*read)(struct mouse_bus *, uint16_t);
|
||||||
@@ -329,7 +329,7 @@ bm_poll(int x, int y, int z, int b, void *priv)
|
|||||||
/* If we are not interested, return. */
|
/* If we are not interested, return. */
|
||||||
if (!(ms->flags & MOUSE_ENABLED) || (ms->flags & MOUSE_FROZEN)) return(0);
|
if (!(ms->flags & MOUSE_ENABLED) || (ms->flags & MOUSE_FROZEN)) return(0);
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
pclog("BUSMOUSE: poll(%d,%d,%d, %02x)\n", x, y, z, b);
|
pclog("BUSMOUSE: poll(%d,%d,%d, %02x)\n", x, y, z, b);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -341,23 +341,23 @@ bm_poll(int x, int y, int z, int b, void *priv)
|
|||||||
|
|
||||||
/* Add the delta to our state. */
|
/* Add the delta to our state. */
|
||||||
x += ms->x;
|
x += ms->x;
|
||||||
if (x > 127)
|
if (x > 1023)
|
||||||
x = 127;
|
x = 1023;
|
||||||
if (x < -128)
|
if (x < -1024)
|
||||||
x = -128;
|
x = -1024;
|
||||||
ms->x = (int8_t)x;
|
ms->x = (int16_t)x;
|
||||||
|
|
||||||
y += ms->y;
|
y += ms->y;
|
||||||
if (y > 127)
|
if (y > 1023)
|
||||||
y = 127;
|
y = 1023;
|
||||||
if (y < -128)
|
if (y < -1024)
|
||||||
y = -128;
|
y = -1024;
|
||||||
ms->y = (int8_t)y;
|
ms->y = (int16_t)y;
|
||||||
|
|
||||||
ms->but = b;
|
ms->but = b;
|
||||||
|
|
||||||
/* All set, generate an interrupt. */
|
/* All set, generate an interrupt. */
|
||||||
// if (! (ms->r_ctrl & CTRL_IDIS))
|
if (! (ms->r_ctrl & CTRL_IDIS))
|
||||||
picint(1 << ms->irq);
|
picint(1 << ms->irq);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
@@ -406,7 +406,6 @@ bm_init(mouse_t *info)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ms->flags |= MOUSE_ENABLED;
|
ms->flags |= MOUSE_ENABLED;
|
||||||
ms->flags |= MOUSE_SCALED;
|
|
||||||
|
|
||||||
/* Request an I/O range. */
|
/* Request an I/O range. */
|
||||||
io_sethandler(ms->port, ms->portlen,
|
io_sethandler(ms->port, ms->portlen,
|
||||||
|
|||||||
14
src/pc.c
14
src/pc.c
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Main emulator module where most things are controlled.
|
* Main emulator module where most things are controlled.
|
||||||
*
|
*
|
||||||
* Version: @(#)pc.c 1.0.39 2017/11/01
|
* Version: @(#)pc.c 1.0.40 2017/11/02
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -176,15 +176,15 @@ pclog(const char *format, ...)
|
|||||||
void
|
void
|
||||||
fatal(const char *format, ...)
|
fatal(const char *format, ...)
|
||||||
{
|
{
|
||||||
char msg[1024];
|
char temp[1024];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char *sp;
|
char *sp;
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
vsprintf(msg, format, ap);
|
vsprintf(temp, format, ap);
|
||||||
fprintf(stdout, msg);
|
fprintf(stdout, "%s", temp);
|
||||||
va_end(ap);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
nvr_save();
|
nvr_save();
|
||||||
|
|
||||||
@@ -194,9 +194,9 @@ fatal(const char *format, ...)
|
|||||||
dumpregs(1);
|
dumpregs(1);
|
||||||
|
|
||||||
/* Make sure the message does not have a trailing newline. */
|
/* Make sure the message does not have a trailing newline. */
|
||||||
if ((sp = strchr(msg, '\n')) != NULL) *sp = '\0';
|
if ((sp = strchr(temp, '\n')) != NULL) *sp = '\0';
|
||||||
|
|
||||||
ui_msgbox(MBX_ERROR|MBX_FATAL|MBX_ANSI, msg);
|
ui_msgbox(MBX_ERROR|MBX_FATAL|MBX_ANSI, temp);
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* S3 ViRGE emulation.
|
* S3 ViRGE emulation.
|
||||||
*
|
*
|
||||||
* Version: @(#)vid_s3_virge.c 1.0.2 2017/10/16
|
* Version: @(#)vid_s3_virge.c 1.0.3 2017/11/02
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -2920,7 +2920,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3
|
|||||||
|
|
||||||
int bpp = (s3d_tri->cmd_set >> 2) & 7;
|
int bpp = (s3d_tri->cmd_set >> 2) & 7;
|
||||||
|
|
||||||
uint32_t dest_offset, z_offset;
|
uint32_t dest_offset = 0, z_offset = 0;
|
||||||
|
|
||||||
uint32_t src_col;
|
uint32_t src_col;
|
||||||
int src_r = 0, src_g = 0, src_b = 0;
|
int src_r = 0, src_g = 0, src_b = 0;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Emulation of the 3DFX Voodoo Graphics controller.
|
* Emulation of the 3DFX Voodoo Graphics controller.
|
||||||
*
|
*
|
||||||
* Version: @(#)vid_voodoo.c 1.0.6 2017/11/01
|
* Version: @(#)vid_voodoo.c 1.0.7 2017/11/02
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
* leilei
|
* leilei
|
||||||
@@ -5576,7 +5576,11 @@ static void voodoo_fb_writew(uint32_t addr, uint16_t val, void *p)
|
|||||||
*(uint16_t *)(&voodoo->fb_mem[write_addr_aux & voodoo->fb_mask]) = new_depth;
|
*(uint16_t *)(&voodoo->fb_mem[write_addr_aux & voodoo->fb_mask]) = new_depth;
|
||||||
|
|
||||||
skip_pixel:
|
skip_pixel:
|
||||||
|
#if 1
|
||||||
|
x = 0;
|
||||||
|
#else
|
||||||
x = x;
|
x = x;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -5903,7 +5907,7 @@ static void wake_fifo_threads(voodoo_set_t *set, voodoo_t *voodoo)
|
|||||||
static uint32_t voodoo_readl(uint32_t addr, void *p)
|
static uint32_t voodoo_readl(uint32_t addr, void *p)
|
||||||
{
|
{
|
||||||
voodoo_t *voodoo = (voodoo_t *)p;
|
voodoo_t *voodoo = (voodoo_t *)p;
|
||||||
uint32_t temp;
|
uint32_t temp = 0;
|
||||||
int fifo_size;
|
int fifo_size;
|
||||||
voodoo->rd_count++;
|
voodoo->rd_count++;
|
||||||
addr &= 0xffffff;
|
addr &= 0xffffff;
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
#
|
|
||||||
# 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
||||||
# running old operating systems and software designed for IBM
|
|
||||||
# PC systems and compatibles from 1981 through fairly recent
|
|
||||||
# system designs based on the PCI bus.
|
|
||||||
#
|
|
||||||
# This file is part of the 86Box distribution.
|
|
||||||
#
|
|
||||||
# Modified Makefile for Win64 MinGW 64-bit environment.
|
|
||||||
#
|
|
||||||
# Version: @(#)Makefile.mingw64 1.0.2 2017/05/06
|
|
||||||
#
|
|
||||||
# Authors: Kotori, <oubattler@gmail.com>
|
|
||||||
# Fred N. van Kempen, <decwiz@yahoo.com>
|
|
||||||
# Sarah Walker,
|
|
||||||
# Richard G.,
|
|
||||||
#
|
|
||||||
|
|
||||||
# Include the default Makefile.
|
|
||||||
include Makefile.mingw
|
|
||||||
|
|
||||||
# Name of the executable.
|
|
||||||
PROG = 86Box64
|
|
||||||
|
|
||||||
# Various compile-time options.
|
|
||||||
STUFF =
|
|
||||||
EXTRAS =
|
|
||||||
DEBUG = n
|
|
||||||
OPTIM = n
|
|
||||||
X64 = y
|
|
||||||
DEV_BRANCH = n
|
|
||||||
|
|
||||||
# End of Makefile.mingw64.
|
|
||||||
Reference in New Issue
Block a user