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)
|
||||
* 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>
|
||||
*
|
||||
|
||||
@@ -230,7 +230,7 @@ bool CDROM_Interface_Image::LoadIsoFile(char* filename)
|
||||
tracks.clear();
|
||||
|
||||
// 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;
|
||||
track.file = new BinaryFile(filename, error);
|
||||
if (error) {
|
||||
@@ -305,7 +305,7 @@ static string dirname(char * file) {
|
||||
|
||||
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();
|
||||
uint64_t shift = 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 (prev.number + 1 != curr.number) 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;
|
||||
#endif
|
||||
|
||||
tracks.push_back(curr);
|
||||
return true;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* Based on an early driver for MINIX 1.5.
|
||||
* 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>
|
||||
*
|
||||
@@ -72,7 +72,7 @@ typedef struct mouse_bus {
|
||||
uint8_t r_intr; /* INTSTAT register (RO) */
|
||||
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 (*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 (!(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);
|
||||
#endif
|
||||
|
||||
@@ -341,23 +341,23 @@ bm_poll(int x, int y, int z, int b, void *priv)
|
||||
|
||||
/* Add the delta to our state. */
|
||||
x += ms->x;
|
||||
if (x > 127)
|
||||
x = 127;
|
||||
if (x < -128)
|
||||
x = -128;
|
||||
ms->x = (int8_t)x;
|
||||
if (x > 1023)
|
||||
x = 1023;
|
||||
if (x < -1024)
|
||||
x = -1024;
|
||||
ms->x = (int16_t)x;
|
||||
|
||||
y += ms->y;
|
||||
if (y > 127)
|
||||
y = 127;
|
||||
if (y < -128)
|
||||
y = -128;
|
||||
ms->y = (int8_t)y;
|
||||
if (y > 1023)
|
||||
y = 1023;
|
||||
if (y < -1024)
|
||||
y = -1024;
|
||||
ms->y = (int16_t)y;
|
||||
|
||||
ms->but = b;
|
||||
|
||||
/* All set, generate an interrupt. */
|
||||
// if (! (ms->r_ctrl & CTRL_IDIS))
|
||||
if (! (ms->r_ctrl & CTRL_IDIS))
|
||||
picint(1 << ms->irq);
|
||||
|
||||
return(0);
|
||||
@@ -406,7 +406,6 @@ bm_init(mouse_t *info)
|
||||
break;
|
||||
}
|
||||
ms->flags |= MOUSE_ENABLED;
|
||||
ms->flags |= MOUSE_SCALED;
|
||||
|
||||
/* Request an I/O range. */
|
||||
io_sethandler(ms->port, ms->portlen,
|
||||
|
||||
46
src/pc.c
46
src/pc.c
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 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/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -162,12 +162,12 @@ void
|
||||
pclog(const char *format, ...)
|
||||
{
|
||||
#ifndef RELEASE_BUILD
|
||||
va_list ap;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
vprintf(format, ap);
|
||||
va_end(ap);
|
||||
fflush(stdout);
|
||||
va_start(ap, format);
|
||||
vprintf(format, ap);
|
||||
va_end(ap);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -176,31 +176,31 @@ pclog(const char *format, ...)
|
||||
void
|
||||
fatal(const char *format, ...)
|
||||
{
|
||||
char msg[1024];
|
||||
va_list ap;
|
||||
char *sp;
|
||||
char temp[1024];
|
||||
va_list ap;
|
||||
char *sp;
|
||||
|
||||
va_start(ap, format);
|
||||
vsprintf(msg, format, ap);
|
||||
fprintf(stdout, msg);
|
||||
va_end(ap);
|
||||
fflush(stdout);
|
||||
va_start(ap, format);
|
||||
vsprintf(temp, format, ap);
|
||||
fprintf(stdout, "%s", temp);
|
||||
fflush(stdout);
|
||||
va_end(ap);
|
||||
|
||||
nvr_save();
|
||||
nvr_save();
|
||||
|
||||
config_save();
|
||||
config_save();
|
||||
|
||||
dumppic();
|
||||
dumpregs(1);
|
||||
dumppic();
|
||||
dumpregs(1);
|
||||
|
||||
/* Make sure the message does not have a trailing newline. */
|
||||
if ((sp = strchr(msg, '\n')) != NULL) *sp = '\0';
|
||||
/* Make sure the message does not have a trailing newline. */
|
||||
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);
|
||||
|
||||
exit(-1);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 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/>
|
||||
* 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;
|
||||
|
||||
uint32_t dest_offset, z_offset;
|
||||
uint32_t dest_offset = 0, z_offset = 0;
|
||||
|
||||
uint32_t src_col;
|
||||
int src_r = 0, src_g = 0, src_b = 0;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 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/>
|
||||
* 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;
|
||||
|
||||
skip_pixel:
|
||||
#if 1
|
||||
x = 0;
|
||||
#else
|
||||
x = x;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
voodoo_t *voodoo = (voodoo_t *)p;
|
||||
uint32_t temp;
|
||||
uint32_t temp = 0;
|
||||
int fifo_size;
|
||||
voodoo->rd_count++;
|
||||
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