mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge branch 'master' of https://github.com/OBattler/86Box
This commit is contained in:
@@ -70,6 +70,7 @@ uint32_t *eal_r, *eal_w;
|
||||
uint16_t *mod1add[2][8];
|
||||
uint32_t *mod1seg[8];
|
||||
|
||||
#if 0
|
||||
static __inline void fetch_ea_32_long(uint32_t rmdat)
|
||||
{
|
||||
eal_r = eal_w = NULL;
|
||||
@@ -184,6 +185,7 @@ static __inline void fetch_ea_16_long(uint32_t rmdat)
|
||||
eal_w = (uint32_t *)(writelookup2[addr >> 12] + addr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#define fetch_ea_16(rmdat) cpu_state.pc++; cpu_mod=(rmdat >> 6) & 3; cpu_reg=(rmdat >> 3) & 7; cpu_rm = rmdat & 7; if (cpu_mod != 3) { fetch_ea_16_long(rmdat); if (cpu_state.abrt) return 0; }
|
||||
#define fetch_ea_32(rmdat) cpu_state.pc++; cpu_mod=(rmdat >> 6) & 3; cpu_reg=(rmdat >> 3) & 7; cpu_rm = rmdat & 7; if (cpu_mod != 3) { fetch_ea_32_long(rmdat); } if (cpu_state.abrt) return 0
|
||||
|
||||
@@ -390,12 +390,14 @@ static __inline uint16_t geteaw()
|
||||
return readmemw(easeg,cpu_state.eaaddr);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static __inline uint16_t geteaw2()
|
||||
{
|
||||
if (cpu_mod == 3)
|
||||
return cpu_state.regs[cpu_rm].w;
|
||||
return readmemw(easeg,(cpu_state.eaaddr+2)&0xFFFF);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline void seteab(uint8_t val)
|
||||
{
|
||||
|
||||
@@ -2029,7 +2029,6 @@ static inline void FP_LOAD_S()
|
||||
addbyte(0xdd); /*FSTP ST[reg][EBP]*/
|
||||
addbyte(0x5d);
|
||||
addbyte((uint8_t)cpu_state_offset(ST[(cpu_state.TOP - 1) & 7]));
|
||||
block_current = block_current;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ static int opSETALC(uint32_t fetchdat)
|
||||
|
||||
static int opF6_a16(uint32_t fetchdat)
|
||||
{
|
||||
int tempws, tempws2;
|
||||
int tempws, tempws2 = 0;
|
||||
uint16_t tempw, src16;
|
||||
uint8_t src, dst;
|
||||
int8_t temps;
|
||||
@@ -161,7 +161,7 @@ static int opF6_a16(uint32_t fetchdat)
|
||||
}
|
||||
static int opF6_a32(uint32_t fetchdat)
|
||||
{
|
||||
int tempws, tempws2;
|
||||
int tempws, tempws2 = 0;
|
||||
uint16_t tempw, src16;
|
||||
uint8_t src, dst;
|
||||
int8_t temps;
|
||||
@@ -262,7 +262,7 @@ static int opF6_a32(uint32_t fetchdat)
|
||||
static int opF7_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t templ, templ2;
|
||||
int tempws, tempws2;
|
||||
int tempws, tempws2 = 0;
|
||||
int16_t temps16;
|
||||
uint16_t src, dst;
|
||||
|
||||
@@ -354,7 +354,7 @@ static int opF7_w_a16(uint32_t fetchdat)
|
||||
static int opF7_w_a32(uint32_t fetchdat)
|
||||
{
|
||||
uint32_t templ, templ2;
|
||||
int tempws, tempws2;
|
||||
int tempws, tempws2 = 0;
|
||||
int16_t temps16;
|
||||
uint16_t src, dst;
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ static int opC0_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint8_t temp, temp2;
|
||||
uint8_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
c = readmemb(cs, cpu_state.pc) & 31; cpu_state.pc++;
|
||||
@@ -291,7 +291,7 @@ static int opC0_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint8_t temp, temp2;
|
||||
uint8_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
c = readmemb(cs, cpu_state.pc) & 31; cpu_state.pc++;
|
||||
@@ -304,7 +304,7 @@ static int opC1_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint16_t temp, temp2;
|
||||
uint16_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
c = readmemb(cs, cpu_state.pc) & 31; cpu_state.pc++;
|
||||
@@ -317,7 +317,7 @@ static int opC1_w_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint16_t temp, temp2;
|
||||
uint16_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
c = readmemb(cs, cpu_state.pc) & 31; cpu_state.pc++;
|
||||
@@ -330,7 +330,7 @@ static int opC1_l_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint32_t temp, temp2;
|
||||
uint32_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
c = readmemb(cs, cpu_state.pc) & 31; cpu_state.pc++;
|
||||
@@ -343,7 +343,7 @@ static int opC1_l_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint32_t temp, temp2;
|
||||
uint32_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
c = readmemb(cs, cpu_state.pc) & 31; cpu_state.pc++;
|
||||
@@ -357,7 +357,7 @@ static int opD0_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c = 1;
|
||||
int tempc;
|
||||
uint8_t temp, temp2;
|
||||
uint8_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
temp = geteab(); if (cpu_state.abrt) return 1;
|
||||
@@ -368,7 +368,7 @@ static int opD0_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c = 1;
|
||||
int tempc;
|
||||
uint8_t temp, temp2;
|
||||
uint8_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
temp = geteab(); if (cpu_state.abrt) return 1;
|
||||
@@ -379,7 +379,7 @@ static int opD1_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c = 1;
|
||||
int tempc;
|
||||
uint16_t temp, temp2;
|
||||
uint16_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
temp = geteaw(); if (cpu_state.abrt) return 1;
|
||||
@@ -390,7 +390,7 @@ static int opD1_w_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c = 1;
|
||||
int tempc;
|
||||
uint16_t temp, temp2;
|
||||
uint16_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
temp = geteaw(); if (cpu_state.abrt) return 1;
|
||||
@@ -401,7 +401,7 @@ static int opD1_l_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c = 1;
|
||||
int tempc;
|
||||
uint32_t temp, temp2;
|
||||
uint32_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
temp = geteal(); if (cpu_state.abrt) return 1;
|
||||
@@ -412,7 +412,7 @@ static int opD1_l_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c = 1;
|
||||
int tempc;
|
||||
uint32_t temp, temp2;
|
||||
uint32_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
temp = geteal(); if (cpu_state.abrt) return 1;
|
||||
@@ -424,7 +424,7 @@ static int opD2_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint8_t temp, temp2;
|
||||
uint8_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
c = CL & 31;
|
||||
@@ -436,7 +436,7 @@ static int opD2_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint8_t temp, temp2;
|
||||
uint8_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
c = CL & 31;
|
||||
@@ -448,7 +448,7 @@ static int opD3_w_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint16_t temp, temp2;
|
||||
uint16_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
c = CL & 31;
|
||||
@@ -460,7 +460,7 @@ static int opD3_w_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint16_t temp, temp2;
|
||||
uint16_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
c = CL & 31;
|
||||
@@ -472,7 +472,7 @@ static int opD3_l_a16(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint32_t temp, temp2;
|
||||
uint32_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_16(fetchdat);
|
||||
c = CL & 31;
|
||||
@@ -484,7 +484,7 @@ static int opD3_l_a32(uint32_t fetchdat)
|
||||
{
|
||||
int c;
|
||||
int tempc;
|
||||
uint32_t temp, temp2;
|
||||
uint32_t temp, temp2 = 0;
|
||||
|
||||
fetch_ea_32(fetchdat);
|
||||
c = CL & 31;
|
||||
|
||||
@@ -201,12 +201,7 @@ end_error:
|
||||
|
||||
#define ICMP_MAXDATALEN (IP_MSS-28)
|
||||
void
|
||||
icmp_error(msrc, type, code, minsize, message)
|
||||
struct SLIRPmbuf *msrc;
|
||||
u_char type;
|
||||
u_char code;
|
||||
int minsize;
|
||||
char *message;
|
||||
icmp_error(struct SLIRPmbuf *msrc, u_char type, u_char code, int minsize, char *message)
|
||||
{
|
||||
unsigned hlen, shlen, s_ip_len;
|
||||
register struct ip *ip;
|
||||
|
||||
@@ -67,7 +67,7 @@ struct m_hdr {
|
||||
struct SLIRPsocket *mh_so;
|
||||
|
||||
SLIRPcaddr_t mh_data; /* Location of data */
|
||||
size_t mh_len; /* Amount of data in this mbuf */
|
||||
int32_t mh_len; /* Amount of data in this mbuf */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -253,10 +253,9 @@ int slirp_select_fill(int *pnfds,
|
||||
/*
|
||||
* See if we need a tcp_fasttimo
|
||||
*/
|
||||
if(so->so_tcpcb!=0x0){
|
||||
if(&so->so_tcpcb->t_flags!=0x0){ //This is to prevent a common lockup.
|
||||
if(so->so_tcpcb!=0x0){ //This is to prevent a common lockup.
|
||||
if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK)
|
||||
time_fasttimo = curtime; } } /* Flag when we want a fasttimo */
|
||||
time_fasttimo = curtime; } /* Flag when we want a fasttimo */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -199,7 +199,7 @@ void midi_write(uint8_t val)
|
||||
{
|
||||
midi_sysex_data[midi_pos++] = 0xf7;
|
||||
|
||||
if ((midi_sysex_start) && (midi_pos >= 4) && (midi_pos <= 9) && (midi_sysex_data[1] == 0x411) && (midi_sysex_data[3] == 0x16))
|
||||
if ((midi_sysex_start) && (midi_pos >= 4) && (midi_pos <= 9) && (midi_sysex_data[1] == 0x41) && (midi_sysex_data[3] == 0x16))
|
||||
{
|
||||
/* pclog("MIDI: Skipping invalid MT-32 SysEx MIDI message\n"); */
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ void adgold_write(uint16_t addr, uint8_t val, void *p)
|
||||
uint8_t adgold_read(uint16_t addr, void *p)
|
||||
{
|
||||
adgold_t *adgold = (adgold_t *)p;
|
||||
uint8_t temp;
|
||||
uint8_t temp = 0;
|
||||
|
||||
switch (addr & 7)
|
||||
{
|
||||
|
||||
@@ -319,6 +319,7 @@ static inline int16_t EMU8K_READ(emu8k_t *emu8k, uint32_t addr)
|
||||
return emu8k->ram_pointers[addrmem.hb_address][addrmem.lw_address];
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline int16_t EMU8K_READ_INTERP_LINEAR(emu8k_t *emu8k, uint32_t int_addr, uint16_t fract)
|
||||
{
|
||||
/* The interpolation in AWE32 used a so-called patented 3-point interpolation
|
||||
@@ -331,6 +332,7 @@ static inline int16_t EMU8K_READ_INTERP_LINEAR(emu8k_t *emu8k, uint32_t int_addr
|
||||
dat1 += ((dat2-(int32_t)dat1)* fract) >> 16;
|
||||
return dat1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int16_t EMU8K_READ_INTERP_CUBIC(emu8k_t *emu8k, uint32_t int_addr, uint16_t fract)
|
||||
{
|
||||
|
||||
@@ -665,7 +665,7 @@ static void mpu401_write(uint16_t addr, uint8_t val, void *p)
|
||||
static uint8_t mpu401_read(uint16_t addr, void *p)
|
||||
{
|
||||
mpu_t *mpu = (mpu_t *)p;
|
||||
uint8_t ret;
|
||||
uint8_t ret = 0;
|
||||
|
||||
switch (addr & 1)
|
||||
{
|
||||
|
||||
@@ -307,7 +307,7 @@ void ati28800_recalctimings(svga_t *svga)
|
||||
{
|
||||
ati28800_t *ati28800 = (ati28800_t *)svga->p;
|
||||
uint8_t clock_sel = (svga->miscout >> 2) & 3;
|
||||
double freq;
|
||||
double freq = 0;
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
pclog("ati28800_recalctimings\n");
|
||||
|
||||
@@ -3044,7 +3044,7 @@ void mach64_overlay_draw(svga_t *svga, int displine)
|
||||
{
|
||||
int h = h_acc >> 12;
|
||||
int gr_cmp = 0, vid_cmp = 0;
|
||||
int use_video;
|
||||
int use_video = 0;
|
||||
|
||||
switch (video_key_fn)
|
||||
{
|
||||
|
||||
@@ -1418,7 +1418,7 @@ uint8_t s3_accel_read(uint32_t addr, void *p)
|
||||
void s3_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, s3_t *s3)
|
||||
{
|
||||
svga_t *svga = &s3->svga;
|
||||
uint32_t src_dat, dest_dat;
|
||||
uint32_t src_dat = 0, dest_dat;
|
||||
int frgd_mix, bkgd_mix;
|
||||
int clip_t = s3->accel.multifunc[1] & 0xfff;
|
||||
int clip_l = s3->accel.multifunc[2] & 0xfff;
|
||||
|
||||
@@ -2848,7 +2848,7 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood
|
||||
// if (voodoo->fbzMode & FBZ_RGB_WMASK)
|
||||
{
|
||||
int update = 1;
|
||||
uint8_t cother_r, cother_g, cother_b, aother;
|
||||
uint8_t cother_r = 0, cother_g = 0, cother_b = 0, aother;
|
||||
uint8_t clocal_r, clocal_g, clocal_b, alocal;
|
||||
int src_r = 0, src_g = 0, src_b = 0, src_a = 0;
|
||||
int msel_r, msel_g, msel_b, msel_a;
|
||||
|
||||
@@ -593,7 +593,7 @@ void wy700_cgaline(wy700_t *wy700)
|
||||
{
|
||||
int x, c;
|
||||
uint32_t dat;
|
||||
uint8_t ink;
|
||||
uint8_t ink = 0;
|
||||
uint16_t addr;
|
||||
|
||||
uint16_t ma = (wy700->cga_crtc[13] | (wy700->cga_crtc[12] << 8)) & 0x3fff;
|
||||
@@ -653,7 +653,7 @@ void wy700_medresline(wy700_t *wy700)
|
||||
{
|
||||
int x, c;
|
||||
uint32_t dat;
|
||||
uint8_t ink;
|
||||
uint8_t ink = 0;
|
||||
uint32_t addr;
|
||||
|
||||
addr = (wy700->displine >> 1) * 80 + 4 * wy700->wy700_base;
|
||||
@@ -711,7 +711,7 @@ void wy700_hiresline(wy700_t *wy700)
|
||||
{
|
||||
int x, c;
|
||||
uint32_t dat;
|
||||
uint8_t ink;
|
||||
uint8_t ink = 0;
|
||||
uint32_t addr;
|
||||
|
||||
addr = (wy700->displine >> 1) * 160 + 4 * wy700->wy700_base;
|
||||
|
||||
@@ -314,8 +314,8 @@ int imd_track_is_xdf(int drive, int side, int track)
|
||||
int i, effective_sectors, xdf_sectors;
|
||||
int high_sectors, low_sectors;
|
||||
int max_high_id, expected_high_count, expected_low_count;
|
||||
char *r_map;
|
||||
char *n_map;
|
||||
uint8_t *r_map;
|
||||
uint8_t *n_map;
|
||||
char *data_base;
|
||||
char *cur_data;
|
||||
|
||||
@@ -334,7 +334,7 @@ int imd_track_is_xdf(int drive, int side, int track)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
r_map = imd[drive].buffer + imd[drive].tracks[track][side].r_map_offs;
|
||||
r_map = (uint8_t *) (imd[drive].buffer + imd[drive].tracks[track][side].r_map_offs);
|
||||
data_base = imd[drive].buffer + imd[drive].tracks[track][side].data_offs;
|
||||
|
||||
if (!track)
|
||||
@@ -382,7 +382,7 @@ int imd_track_is_xdf(int drive, int side, int track)
|
||||
return 0;
|
||||
}
|
||||
|
||||
n_map = imd[drive].buffer + imd[drive].tracks[track][side].n_map_offs;
|
||||
n_map = (uint8_t *) (imd[drive].buffer + imd[drive].tracks[track][side].n_map_offs);
|
||||
|
||||
cur_data = data_base;
|
||||
for (i = 0; i < imd[drive].tracks[track][side].params[3]; i++)
|
||||
@@ -392,7 +392,7 @@ int imd_track_is_xdf(int drive, int side, int track)
|
||||
{
|
||||
effective_sectors--;
|
||||
}
|
||||
if ((r_map[i] == (n_map[i] | 0x80)))
|
||||
if (r_map[i] == (n_map[i] | 0x80))
|
||||
{
|
||||
xdf_sectors++;
|
||||
imd[drive].xdf_ordered_pos[(int) r_map[i]][side] = i;
|
||||
|
||||
@@ -248,7 +248,7 @@ void loadnvr(void)
|
||||
{
|
||||
nvrram[RTC_SECONDS] = nvrram[RTC_MINUTES] = nvrram[RTC_HOURS] = 0;
|
||||
nvrram[RTC_DOM] = nvrram[RTC_MONTH] = 1;
|
||||
nvrram[RTC_YEAR] = BCD(80);
|
||||
nvrram[RTC_YEAR] = (char) BCD(80);
|
||||
nvrram[RTC_CENTURY] = BCD(19);
|
||||
nvrram[RTC_REGB] = RTC_2412;
|
||||
}
|
||||
|
||||
@@ -730,8 +730,8 @@ BuslogicMailboxIn(Buslogic_t *bl)
|
||||
CmdBlock->common.TargetStatus = TargetStatus;
|
||||
|
||||
/* Rewrite the CCB up to the CDB. */
|
||||
pclog("CCB rewritten to the CDB (pointer %08X, length %i)\n", CCBPointer, offsetof(CCBC, Cdb));
|
||||
DMAPageWrite(CCBPointer, (char *)CmdBlock, offsetof(CCBC, Cdb));
|
||||
pclog("CCB rewritten to the CDB (pointer %08X, length 18)\n", CCBPointer);
|
||||
DMAPageWrite(CCBPointer, (char *)CmdBlock, 18);
|
||||
} else {
|
||||
pclog("Mailbox not found!\n");
|
||||
}
|
||||
@@ -2294,7 +2294,7 @@ BuslogicSenseBufferFree(Req_t *req, int Copy)
|
||||
*/
|
||||
if (req->Is24bit) {
|
||||
SenseBufferAddress = req->CCBPointer;
|
||||
SenseBufferAddress += req->CmdBlock.common.CdbLength + offsetof(CCB, Cdb);
|
||||
SenseBufferAddress += req->CmdBlock.common.CdbLength + 18;
|
||||
} else {
|
||||
SenseBufferAddress = req->CmdBlock.new.SensePointer;
|
||||
}
|
||||
@@ -2461,7 +2461,7 @@ BuslogicProcessMailbox(Buslogic_t *bl)
|
||||
uint8_t CmdStatus = MBO_FREE;
|
||||
uint32_t CodeOffset = 0;
|
||||
|
||||
CodeOffset = bl->Mbx24bit ? offsetof(Mailbox_t, CmdStatus) : offsetof(Mailbox32_t, u.out.ActionCode);
|
||||
CodeOffset = bl->Mbx24bit ? 0 : 7;
|
||||
|
||||
if (! bl->StrictRoundRobinMode) {
|
||||
uint8_t MailboxCur = bl->MailboxOutPosCur;
|
||||
|
||||
@@ -231,7 +231,7 @@ void scsi_reloadhd(int id)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if(hdc[id].prev_fn == NULL)
|
||||
if(wcslen(hdc[id].prev_fn) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user