This commit is contained in:
Toni Wilen 2013-09-21 14:27:55 +03:00
parent 56452e0154
commit d60ef0c40d
27 changed files with 271 additions and 110 deletions

View File

@ -1220,6 +1220,8 @@ static int scsi_read_cd_data (int unitnum, uae_u8 *scsi_data, uae_u32 offset, ua
{
struct blkdevstate *st = &state[unitnum];
if (len == 0) {
if (offset >= di->sectorspertrack * di->cylinders * di->trackspercylinder)
return -1;
*scsi_len = 0;
return 0;
} else {
@ -1379,8 +1381,12 @@ int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
int pc = cmdbuf[2] >> 6;
int pcode = cmdbuf[2] & 0x3f;
int dbd = cmdbuf[1] & 8;
if (cmdbuf[0] == 0x5a)
if (atapi) {
if (!sense10)
goto err;
dbd = 1;
}
if (log_scsiemu)
write_log (_T("MODE SENSE PC=%d CODE=%d DBD=%d\n"), pc, pcode, dbd);
p = r;
@ -1478,9 +1484,10 @@ int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
r[3] = bdsize & 0xff;
r[0] = totalsize & 0xff;
}
scsi_len = lr = totalsize + 1;
scsi_len = totalsize + 1;
if (scsi_len > maxlen)
scsi_len = maxlen;
lr = scsi_len;
}
break;
case 0x01: /* REZERO UNIT */
@ -1515,6 +1522,18 @@ int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
scsi_len = lr = 8;
}
break;
case 0x0b: /* SEEK (6) */
{
if (nodisk (&di))
goto nodisk;
stopplay (unitnum);
offset = ((cmdbuf[1] & 31) << 16) | (cmdbuf[2] << 8) | cmdbuf[3];
struct cd_toc *t = gettoc (&di.toc, offset);
v = scsi_read_cd_data (unitnum, scsi_data, offset, 0, &di, &scsi_len);
if (v == -1)
goto outofbounds;
}
break;
case 0x08: /* READ (6) */
{
if (nodisk (&di))
@ -1540,6 +1559,18 @@ int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
break;
case 0x0a: /* WRITE (6) */
goto readprot;
case 0x2b: /* SEEK (10) */
{
if (nodisk (&di))
goto nodisk;
stopplay (unitnum);
offset = rl (cmdbuf + 2);
struct cd_toc *t = gettoc (&di.toc, offset);
v = scsi_read_cd_data (unitnum, scsi_data, offset, 0, &di, &scsi_len);
if (v == -1)
goto outofbounds;
}
break;
case 0x28: /* READ (10) */
{
if (nodisk (&di))

View File

@ -379,7 +379,7 @@ static addrbank fmv_bank = {
void cd32_fmv_init (uaecptr start)
{
int ids[] = { 23, -1 };
int ids[] = { 23, 74, -1 };
struct romlist *rl = getromlistbyids (ids);
struct romdata *rd;
struct zfile *z;

25
cia.cpp
View File

@ -68,7 +68,6 @@
static unsigned int ciaaicr, ciaaimask, ciabicr, ciabimask;
static unsigned int ciaacra, ciaacrb, ciabcra, ciabcrb;
static unsigned int ciaastarta, ciaastartb, ciabstarta, ciabstartb;
static unsigned int ciaaicr_reg, ciabicr_reg;
/* Values of the CIA timers. */
static unsigned long ciaata, ciaatb, ciabta, ciabtb;
@ -129,7 +128,6 @@ static void RethinkICRA (void)
#endif
if (!(ciaaicr & 0x80)) {
ciaaicr |= 0x80;
ciaaicr_reg |= 0x80;
if (currprefs.cpu_cycle_exact)
event2_newevent_xx (-1, DIV10 + 2 * CYCLE_UNIT + CYCLE_UNIT / 2, 0x0008, ICRA);
else
@ -146,7 +144,6 @@ static void RethinkICRB (void)
#endif
if (!(ciabicr & 0x80)) {
ciabicr |= 0x80;
ciabicr_reg |= 0x80;
if (currprefs.cpu_cycle_exact)
event2_newevent_xx (-1, DIV10 + 2 * CYCLE_UNIT + CYCLE_UNIT / 2, 0x2000, ICRB);
else
@ -356,8 +353,6 @@ static int CIA_update_check (void)
if (bsp) {
ciabicr |= 8; icr |= 2;
}
ciaaicr_reg |= ciaaicr;
ciabicr_reg |= ciabicr;
return icr;
}
static void CIA_update (void)
@ -446,13 +441,11 @@ void CIA_handler (void)
void cia_diskindex (void)
{
ciabicr_reg |= 0x10;
ciabicr |= 0x10;
RethinkICRB ();
}
void cia_parallelack (void)
{
ciaaicr_reg |= 0x10;
ciaaicr |= 0x10;
RethinkICRA ();
}
@ -491,7 +484,6 @@ STATIC_INLINE bool ciab_checkalarm (bool inc, bool irq)
write_log (_T("CIAB tod %08x %08x\n"), ciabtod, ciabalarm);
#endif
if (irq) {
ciabicr_reg |= 4;
ciabicr |= 4;
RethinkICRB ();
}
@ -507,7 +499,6 @@ STATIC_INLINE void ciaa_checkalarm (bool inc)
#if CIAA_DEBUG_IRQ
write_log (_T("CIAA tod %08x %08x\n"), ciaatod, ciaaalarm);
#endif
ciaaicr_reg |= 4;
ciaaicr |= 4;
RethinkICRA ();
}
@ -605,7 +596,6 @@ static void sendrw (void)
ciaasdr = kbcode;
kblostsynccnt = 8 * maxvpos * 8; // 8 frames * 8 bits.
ciaaicr |= 8;
ciaaicr_reg |= 8;
RethinkICRA ();
write_log (_T("KB: sent reset warning code (phase=%d)\n"), resetwarning_phase);
}
@ -676,7 +666,6 @@ static void keyreq (void)
ciaasdr = kbcode;
kblostsynccnt = 8 * maxvpos * 8; // 8 frames * 8 bits.
ciaaicr |= 8;
ciaaicr_reg |= 8;
RethinkICRA ();
}
@ -739,7 +728,7 @@ void CIAB_tod_handler (int hoffset)
void CIA_hsync_posthandler (bool dotod)
{
// Previous line was supposed to increase TOD but
// no one cared. Do it now at the start of next line.
// no one cared. Do it now.
if (ciab_tod_event_state == 1)
CIAB_tod_inc (0);
ciab_tod_event_state = 0;
@ -1005,10 +994,8 @@ static uae_u8 ReadCIAA (unsigned int addr)
#endif
return ciaasdr;
case 13:
tmp = ciaaicr_reg & ~0x40;
tmp = ciaaicr & ~0x40;
ciaaicr = 0;
ciaaicr_reg = 0;
//RethinkICRA ();
return tmp;
case 14:
return ciaacra;
@ -1118,10 +1105,8 @@ static uae_u8 ReadCIAB (unsigned int addr)
case 12:
return ciabsdr;
case 13:
tmp = ciabicr_reg & ~0x40;
tmp = ciabicr & ~0x40;
ciabicr = 0;
ciabicr_reg = 0;
//RethinkICRB ();
return tmp;
case 14:
//write_log (_T("CIABCRA READ %d %x\n"), ciabcra, M68K_GETPC);
@ -1273,6 +1258,7 @@ static void WriteCIAA (uae_u16 addr, uae_u8 val)
break;
case 13:
setclr (&ciaaimask,val);
RethinkICRA ();
break;
case 14:
CIA_update ();
@ -1436,6 +1422,7 @@ static void WriteCIAB (uae_u16 addr, uae_u8 val)
break;
case 13:
setclr (&ciabimask, val);
RethinkICRB ();
break;
case 14:
CIA_update ();
@ -1492,7 +1479,7 @@ void CIA_reset (void)
ciaatlatch = ciabtlatch = 0;
ciaapra = 0; ciaadra = 0;
ciaatod = ciabtod = 0; ciaatodon = ciabtodon = 0;
ciaaicr = ciaaicr_reg = ciabicr = ciabicr_reg = ciaaimask = ciabimask = 0;
ciaaicr = ciabicr = ciaaimask = ciabimask = 0;
ciaacra = ciaacrb = ciabcra = ciabcrb = 0x4; /* outmode = toggle; */
ciaala = ciaalb = ciabla = ciablb = ciaata = ciaatb = ciabta = ciabtb = 0xFFFF;
ciaaalarm = ciabalarm = 0;

View File

@ -385,7 +385,7 @@ static uae_u32 thisline_changed;
#endif
static struct decision thisline_decision;
static int fetch_cycle, fetch_modulo_cycle;
static int fetch_cycle, fetch_modulo_cycle, fetch_align;
enum plfstate
{
@ -727,7 +727,7 @@ static void finish_playfield_line (void)
are contained in an indivisible block during which ddf is active. E.g.
if DDF starts at 0x30, and fetchunit is 8, then possible DDF stops are
0x30 + n * 8. */
static int fetchunit, fetchunit_mask;
static int fetchunit, fetchunit_mask, fetchunit_align_mask;
/* The delay before fetching the same bitplane again. Can be larger than
the number of bitplanes; in that case there are additional empty cycles
with no data fetch (this happens for high fetchmodes and low
@ -853,7 +853,7 @@ static uae_u32 fetched_aga1[MAX_PLANES];
#endif
/* Expansions from bplcon0/bplcon1. */
static int toscr_res, toscr_nr_planes, toscr_nr_planes2, fetchwidth;
static int toscr_res, toscr_nr_planes, toscr_nr_planes2, toscr_nr_planes_agnus, fetchwidth;
static int toscr_delay1, toscr_delay2;
/* The number of bits left from the last fetched words.
@ -865,7 +865,7 @@ we can do more work at once. */
static int toscr_nbits;
/* undocumented bitplane delay hardware feature */
static int delayoffset;
static int delayoffset, delayoffset2;
STATIC_INLINE void compute_delay_offset (void)
{
@ -958,9 +958,34 @@ static void update_denise (int hpos)
}
}
/* Expand bplcon0/bplcon1 into the toscr_xxx variables. */
static void compute_toscr_delay_1 (int bplcon1)
{
int delay1 = (bplcon1 & 0x0f) | ((bplcon1 & 0x0c00) >> 6);
int delay2 = ((bplcon1 >> 4) & 0x0f) | (((bplcon1 >> 4) & 0x0c00) >> 6);
int shdelay1 = (bplcon1 >> 12) & 3;
int shdelay2 = (bplcon1 >> 8) & 3;
int delaymask;
int fetchwidth = 16 << fetchmode;
delay1 += delayoffset + delayoffset2;
delay2 += delayoffset + delayoffset2;
delaymask = (fetchwidth - 1) >> toscr_res;
toscr_delay1 = (delay1 & delaymask) << toscr_res;
toscr_delay1 |= shdelay1 >> (RES_MAX - toscr_res);
toscr_delay2 = (delay2 & delaymask) << toscr_res;
toscr_delay2 |= shdelay2 >> (RES_MAX - toscr_res);
}
static void compute_toscr_delay (int hpos, int bplcon1)
{
update_denise (hpos);
compute_toscr_delay_1 (bplcon1);
}
static int bpldmasetuphpos;
static int bpldmasetupphase;
static void update_toscr_planes (void);
/* set currently active Agnus bitplane DMA sequence */
static void setup_fmodes (int hpos)
{
@ -983,6 +1008,7 @@ static void setup_fmodes (int hpos)
bplcon0_planes_limit = GET_PLANES_LIMIT (bplcon0);
fetchunit = fetchunits[fetchmode * 4 + bplcon0_res];
fetchunit_mask = fetchunit - 1;
fetchunit_align_mask = fetchunit >> 1;
fetchstart_shift = fetchstarts[fetchmode * 4 + bplcon0_res];
fetchstart = 1 << fetchstart_shift;
fetchstart_mask = fetchstart - 1;
@ -997,6 +1023,11 @@ static void setup_fmodes (int hpos)
record_dma_event (DMA_EVENT_BPLFETCHUPDATE, hpos, vpos);
bpldmasetuphpos = -1;
bpldmasetupphase = 0;
toscr_nr_planes_agnus = bplcon0_planes;
if (isocs7planes ()) {
if (toscr_nr_planes_agnus < 6)
toscr_nr_planes_agnus = 6;
}
ddf_change = vpos;
}
@ -1047,31 +1078,6 @@ static void bpldmainitdelay (int hpos)
}
}
/* Expand bplcon0/bplcon1 into the toscr_xxx variables. */
static void compute_toscr_delay_1 (int bplcon1)
{
int delay1 = (bplcon1 & 0x0f) | ((bplcon1 & 0x0c00) >> 6);
int delay2 = ((bplcon1 >> 4) & 0x0f) | (((bplcon1 >> 4) & 0x0c00) >> 6);
int shdelay1 = (bplcon1 >> 12) & 3;
int shdelay2 = (bplcon1 >> 8) & 3;
int delaymask;
int fetchwidth = 16 << fetchmode;
delay1 += delayoffset;
delay2 += delayoffset;
delaymask = (fetchwidth - 1) >> toscr_res;
toscr_delay1 = (delay1 & delaymask) << toscr_res;
toscr_delay1 |= shdelay1 >> (RES_MAX - toscr_res);
toscr_delay2 = (delay2 & delaymask) << toscr_res;
toscr_delay2 |= shdelay2 >> (RES_MAX - toscr_res);
}
static void compute_toscr_delay (int hpos, int bplcon1)
{
update_denise (hpos);
compute_toscr_delay_1 (bplcon1);
}
STATIC_INLINE void clear_fetchbuffer (uae_u32 *ptr, int nwords)
{
int i;
@ -1089,11 +1095,23 @@ STATIC_INLINE void clear_fetchbuffer (uae_u32 *ptr, int nwords)
static void update_toscr_planes (void)
{
if (toscr_nr_planes2 > thisline_decision.nr_planes) {
// This must be called just before new bitplane block starts,
// not when depth value changes. Depth can change early and can leave
// 16+ pixel horizontal line of old data visible.
if (toscr_nr_planes_agnus > thisline_decision.nr_planes) {
int j;
for (j = thisline_decision.nr_planes; j < toscr_nr_planes2; j++)
for (j = thisline_decision.nr_planes; j < toscr_nr_planes_agnus; j++) {
clear_fetchbuffer ((uae_u32 *)(line_data[next_lineno] + 2 * MAX_WORDS_PER_LINE * j), out_offs);
thisline_decision.nr_planes = toscr_nr_planes2;
if (thisline_decision.plfleft >= 0) {
todisplay[j][0] = 0;
#ifdef AGA
todisplay[j][1] = 0;
todisplay[j][2] = 0;
todisplay[j][3] = 0;
#endif
}
}
thisline_decision.nr_planes = toscr_nr_planes_agnus;
}
}
@ -1414,6 +1432,7 @@ STATIC_INLINE void beginning_of_plane_block (int hpos, int fm)
#endif
update_denise (hpos);
update_toscr_planes ();
maybe_first_bpl1dat (hpos);
bplcon1t2 = bplcon1t;
@ -1761,17 +1780,29 @@ STATIC_INLINE int one_fetch_cycle_0 (int pos, int ddfstop_to_test, int dma, int
}
break;
case 4:
switch (cycle_start) {
case 0: fetch (3, fm, pos); break;
case 1: fetch (1, fm, pos); break;
case 2: fetch (2, fm, pos); break;
case 3: fetch (0, fm, pos); break;
if ((fetch_cycle & fetchunit_align_mask) == fetch_align) {
switch (cycle_start) {
case 0: fetch (3, fm, pos); break;
case 1: fetch (1, fm, pos); break;
case 2: fetch (2, fm, pos); break;
case 3:
fetch (0, fm, pos);
fetch_align += fetchunit_align_mask;
fetch_align &= fetchunit_align_mask;
break;
}
}
break;
case 2:
switch (cycle_start) {
case 0: fetch (1, fm, pos); break;
case 1: fetch (0, fm, pos); break;
if ((fetch_cycle & fetchunit_align_mask) == fetch_align) {
switch (cycle_start) {
case 0: fetch (1, fm, pos); break;
case 1:
fetch (0, fm, pos);
fetch_align += fetchunit_align_mask;
fetch_align &= fetchunit_align_mask;
break;
}
}
break;
}
@ -1876,8 +1907,6 @@ STATIC_INLINE void update_fetch (int until, int fm)
if (ddfstop >= last_fetch_hpos && plfstop < ddfstop_to_test)
ddfstop_to_test = plfstop;
update_toscr_planes ();
pos = last_fetch_hpos;
cycle_diagram_shift = last_fetch_hpos - fetch_cycle;
@ -1901,7 +1930,6 @@ STATIC_INLINE void update_fetch (int until, int fm)
if (one_fetch_cycle (pos, ddfstop_to_test, dma, fm))
return;
}
#ifdef SPEEDUP
/* Unrolled version of the for loop below. */
if (plf_state < plf_passed_stop && ddf_change != vpos && ddf_change + 1 != vpos
@ -1923,7 +1951,6 @@ STATIC_INLINE void update_fetch (int until, int fm)
int count;
count = stop - pos;
if (count >= fetchstart) {
count &= ~fetchstart_mask;
@ -1947,10 +1974,8 @@ STATIC_INLINE void update_fetch (int until, int fm)
add_modulos ();
pos += count;
fetch_cycle += count;
fetch_align ^= count & fetchunit_align_mask;
}
} else {
#endif
#ifdef SPEEDUP
}
#endif
for (; pos < until; pos++) {
@ -2027,6 +2052,7 @@ static void start_bpl_dma (int hpos, int hstart)
plfstrt_sprite = plfstrt;
fetch_cycle = 0;
fetch_align = 0;
compute_toscr_delay (last_fetch_hpos, bplcon1);
/* If someone already wrote BPL1DAT, clear the area between that point and
the real fetch start. */
@ -4133,6 +4159,8 @@ static void BPLCON0 (int hpos, uae_u16 v)
if (bplcon0 == v)
return;
ddf_change = vpos;
if (!issyncstopped ()) {
vpos_previous = vpos;
hpos_previous = hpos;
@ -5109,7 +5137,6 @@ static void update_copper (int until_hpos)
if (copper_cant_read (old_hpos, 0))
continue;
hp = ch_comp & (cop_state.saved_i2 & 0xFE);
if (vp == cop_state.vcmp && hp < cop_state.hcmp)
break;
@ -6531,8 +6558,9 @@ static void hsync_handler_post (bool onvsync)
#else
static int cia_hsync;
if (cia_hsync < maxhpos) {
int newcount;
CIAA_tod_inc (cia_hsync);
int newcount = (vblank_hz * MAXVPOS_PAL * MAXHPOS_PAL) / (currprefs.cs_ciaatod == 2 ? 60 : 50);
newcount = (vblank_hz * (2 * maxvpos + (interlace_seen ? 1 : 0)) * (2 * maxhpos + (islinetoggle () ? 1 : 0))) / ((currprefs.cs_ciaatod == 2 ? 60 : 50) * 4);
cia_hsync += newcount;
} else {
cia_hsync -= maxhpos;
@ -8469,6 +8497,9 @@ void wait_cpu_cycle_write_ce020 (uaecptr addr, int mode, uae_u32 v)
void do_cycles_ce (unsigned long cycles)
{
unsigned long c;
c = cycles + extra_cycle;
while (cycles >= CYCLE_UNIT) {
int hpos = current_hpos () + 1;
sync_copper (hpos);
@ -8479,6 +8510,7 @@ void do_cycles_ce (unsigned long cycles)
do_cycles (1 * CYCLE_UNIT);
cycles -= CYCLE_UNIT;
}
extra_cycle = c;
}
void do_cycles_ce020 (unsigned long cycles)

View File

@ -738,8 +738,11 @@ static void pfield_init_linetoscr (void)
native_ddf_left = coord_hw_to_window_x (ddf_left);
native_ddf_right = coord_hw_to_window_x (ddf_right);
#if 0
// this breaks Blerkenwiegel/Scoopex
if (native_ddf_left < 0)
native_ddf_left = 0;
#endif
if (native_ddf_right < native_ddf_left)
native_ddf_right = native_ddf_left;
@ -780,11 +783,11 @@ static void pfield_init_linetoscr (void)
if (playfield_end < linetoscr_diw_end && hblank_right_stop > playfield_end) {
playfield_end = linetoscr_diw_end;
}
int end = coord_hw_to_window_x (dp_for_drawing->plfleft * 2);
if (end < visible_left_border)
end = visible_left_border;
if (end < playfield_start && end > linetoscr_diw_start) {
playfield_start = end;
int left = coord_hw_to_window_x (dp_for_drawing->plfleft * 2);
if (left < visible_left_border)
left = visible_left_border;
if (left < playfield_start && left >= linetoscr_diw_start) {
playfield_start = left;
}
}

View File

@ -552,7 +552,7 @@ static void reset_pci (void)
static void picassoiv_checkswitch (void)
{
if (ISP4()) {
monswitch = (picassoiv_flifi & 1) == 0 && (vga.vga.cr[0x51] & 8) == 0;
monswitch = (picassoiv_flifi & 1) == 0 || (vga.vga.cr[0x51] & 8) == 0;
}
}

View File

@ -1436,7 +1436,7 @@ static void inputdevice_mh_abs (int x, int y, uae_u32 buttonbits)
x -= mouseoffset_x + 1;
y -= mouseoffset_y + 2;
//write_log (_T("%dx%d %08x\n"), x, y, buttonbits);
write_log (_T("%04dx%04d %08x\n"), x, y, buttonbits);
p[MH_ABSX] = x >> 8;
p[MH_ABSX + 1] = x;

View File

@ -8,8 +8,6 @@
* Modified 2005 Peter Keunecke
*/
#include <math.h>
#include "sysconfig.h"
#include "sysdeps.h"

View File

@ -701,10 +701,12 @@ static void REGPARAM2 kickmem_lput (uaecptr addr, uae_u32 b)
addr &= kickmem_bank.mask;
m = (uae_u32 *)(kickmem_bank.baseaddr + addr);
do_put_mem_long (m, b);
#if 0
if (addr == 524288-4) {
rom_write_enabled = false;
write_log (_T("ROM write disabled\n"));
}
#endif
} else if (a1000_kickstart_mode) {
if (addr >= 0xfc0000) {
addr &= kickmem_bank.mask;

View File

@ -2623,7 +2623,7 @@ static void Exception_mmu (int nr, uaecptr oldpc)
Exception_build_stack_frame(oldpc, currpc, regs.mmu_fslw, nr, 0x4);
} else if (nr == 3) { // address error
Exception_build_stack_frame(last_fault_for_exception_3, currpc, 0, nr, 0x2);
write_log (_T("Exception %d (%x) at %x -> %x! %s at %d\n"), nr, last_fault_for_exception_3, currpc, get_long (regs.vbr + 4 * nr), __FILE__, __LINE__);
write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_fault_for_exception_3, currpc, get_long (regs.vbr + 4 * nr));
} else if (nr == 5 || nr == 6 || nr == 7 || nr == 9) {
Exception_build_stack_frame(oldpc, currpc, regs.mmu_ssw, nr, 0x2);
} else if (regs.m && nr >= 24 && nr < 32) { /* M + Interrupt */
@ -5672,12 +5672,24 @@ uae_u8 *restore_cpu (uae_u8 *src)
return src;
}
static void fill_prefetch_quick (void)
{
if (currprefs.cpu_model >= 68020) {
fill_prefetch ();
return;
}
// old statefile compatibility, this needs to done,
// even in 68000 cycle-exact mode
regs.ir = get_word (m68k_getpc ());
regs.irc = get_word (m68k_getpc () + 2);
}
void restore_cpu_finish (void)
{
init_m68k ();
m68k_setpc (regs.pc);
doint ();
fill_prefetch ();
fill_prefetch_quick ();
set_cycles (start_cycles);
events_schedule ();
if (regs.stopped)

View File

@ -49,7 +49,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>

View File

@ -50,7 +50,7 @@
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>false</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>

View File

@ -43,7 +43,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>

View File

@ -23,6 +23,7 @@
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>

View File

@ -23,6 +23,7 @@
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>

View File

@ -156,7 +156,7 @@ static int screenshot_prepare (int imagemode, struct vidbuffer *vb)
bi->bmiHeader.biXPelsPerMeter = 0;
bi->bmiHeader.biYPelsPerMeter = 0;
bi->bmiHeader.biClrUsed = bits <= 8 ? (1 << bits) : 0;
bi->bmiHeader.biClrImportant = bi->bmiHeader.biClrUsed;
bi->bmiHeader.biClrImportant = 0;
if (bits <= 8) {
for (int i = 0; i < bi->bmiHeader.biClrUsed; i++) {
bi->bmiColors[i].rgbRed = pal[i * 3 + 0];
@ -372,12 +372,12 @@ static int savebmp (FILE *fp)
bfh.bfOffBits = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + bi->bmiHeader.biClrUsed * sizeof RGBQUAD;
if (fwrite (&bfh, 1, sizeof (BITMAPFILEHEADER), fp) < sizeof (BITMAPFILEHEADER))
return 0; // failed to write bitmap file header
if (fwrite (bi, 1, sizeof (BITMAPINFOHEADER), fp) < sizeof (BITMAPINFOHEADER))
return 0; // failed to write bitmap infomation header
if (bi->bmiHeader.biClrUsed) {
if (fwrite (bi->bmiColors, 1, bi->bmiHeader.biClrUsed * sizeof RGBQUAD, fp) < bi->bmiHeader.biClrUsed * sizeof RGBQUAD)
return 0; // failed to write bitmap file header
}
if (fwrite (bi, 1, sizeof (BITMAPINFOHEADER), fp) < sizeof (BITMAPINFOHEADER))
return 0; // failed to write bitmap infomation header
if (fwrite (lpvBits, 1, bi->bmiHeader.biSizeImage, fp) < bi->bmiHeader.biSizeImage)
return 0; // failed to write the bitmap
return 1;

View File

@ -11,6 +11,8 @@ mkdir bak\include
copy c:\projects\winuae\src\include\* c:\projects\winuae_bak\bak\include\
mkdir bak\jit
copy c:\projects\winuae\src\jit\* c:\projects\winuae_bak\bak\jit\
copy /s c:\projects\winuae\src\qemuvga\* c:\projects\winuae_bak\bak\qemuvga\
copy /s c:\projects\winuae\src\slirp\* c:\projects\winuae_bak\bak\slirp\
copy /s c:\projects\winuae\src\od-win32\* c:\projects\winuae_bak\bak\od-win32\
copy d:\amiga\amiga\filesys.asm c:\projects\winuae_bak\bak

View File

@ -506,11 +506,14 @@ bool setpaused (int priority)
void setminimized (void)
{
minimized = 1;
if (!minimized)
minimized = 1;
set_inhibit_frame (IHF_WINDOWHIDDEN);
}
void unsetminimized (void)
{
if (minimized < 0)
WIN32GFX_DisplayChangeRequested (2);
minimized = 0;
clear_inhibit_frame (IHF_WINDOWHIDDEN);
}

View File

@ -19,11 +19,11 @@
#define LANG_DLL 1
#if WINUAEPUBLICBETA
#define WINUAEBETA _T("7")
#define WINUAEBETA _T("8")
#else
#define WINUAEBETA _T("")
#endif
#define WINUAEDATE MAKEBD(2013, 9, 1)
#define WINUAEDATE MAKEBD(2013, 9, 21)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")

View File

@ -1814,14 +1814,18 @@ int check_prefs_changed_gfx (void)
}
if (display_change_requested) {
c = 2;
keepfsmode = 0;
if (display_change_requested <= -1) {
dontcapture = true;
if (display_change_requested == -2)
setpause = true;
if (pause_emulation)
setpause = true;
if (display_change_requested == 2) {
c = 512;
} else {
c = 2;
keepfsmode = 0;
if (display_change_requested <= -1) {
dontcapture = true;
if (display_change_requested == -2)
setpause = true;
if (pause_emulation)
setpause = true;
}
}
display_change_requested = 0;
}
@ -3709,6 +3713,18 @@ static int create_windows_2 (void)
RECT r;
int w, h, x, y;
int nw, nh, nx, ny;
if (minimized) {
minimized = -1;
return 1;
}
#if 0
if (minimized && hMainWnd) {
unsetminimized ();
ShowWindow (hMainWnd, SW_SHOW);
ShowWindow (hMainWnd, SW_RESTORE);
}
#endif
GetWindowRect (hAmigaWnd, &r);
x = r.left;
y = r.top;

View File

@ -8857,7 +8857,7 @@ static INT_PTR CALLBACK CPUDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
if (workprefs.cpu_clock_multiplier >= 1 << 8) {
idx = 0;
while (idx < 3) {
if (workprefs.cpu_clock_multiplier < (1 << 8) << idx)
if (workprefs.cpu_clock_multiplier <= (1 << 8) << idx)
break;
idx++;
}
@ -8898,9 +8898,9 @@ static INT_PTR CALLBACK CPUDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
case WM_HSCROLL:
recursive++;
values_from_cpudlg( hDlg );
enable_for_cpudlg( hDlg );
values_to_cpudlg( hDlg );
values_from_cpudlg (hDlg);
enable_for_cpudlg ( hDlg);
values_to_cpudlg (hDlg);
recursive--;
break;
}

View File

@ -51,13 +51,13 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110_xp</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110_xp</PlatformToolset>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>

View File

@ -1,6 +1,74 @@
- restore only single input target to default.
Beta 8:
NOTE: Still no 68020/030 CE mode changes. Do not use.
- Added CD32 MPEG ROM 40.22 (part number 391777-01) to ROM scanner.
- GUI 1x/2x/4x/custom CPU speed setting showed incorrect selection (b7)
- Added "I am Windows 8.1 compatible" manifest entry.
- Workaround for Blerkenwiegel/Scoopex breakage (261b1). May cause side-effects.
- 68000 mode "CPU trace" state file restore errors should be gone (270b4)
- 260b15 sprite update off-by-one fix. (Missing vertical sprite line in Prurient/Rebels and others)
- Enabling hires bitplanes (by writing to BPLCON0 or enabling DMA) during first 4 hires
fetch units didn't wait for next complete fetch unit block (should have skipped next 4
"unaligned" hires fetch units) causing shifted graphics. Partially fixes RAF Megademo
single line of shifted scroller in vector part.
- Short horizontal line of incorrect graphics was visible in some very rare situations,
internal buffer was not correctly cleared. (SillyScroller / Phenomena)
- ATAPI MODE SENSE (10) returned too much data if request size was small enough.
- Return INVALID COMMAND error if ATAPI and command was MODE SENSE (6). ATAPI only supports
10 byte variant of MODE SENSE.
- Added SEEK(6) and SEEK(10) commands to SCSI CD emulation.
- Some decompression formats (at least lha) were not compatible with file type detection.
(for example lha containing executable didn't mount as a floppy image)
- BTST Dn,#data was accidentally marked as invalid addressing mode in b7.
- Power supply TOD counting accuracy was not that good in earlier update.
- 8-bit bmp screenshots were broken (Only created when capturing 8-bit RTG mode)
- Ignore window size changes if emulation window is minimized. Readjust size (if needed) when unminimized.
- Picasso IV flifi/VGA output enable logic tweak (Linux Cirrus Logic console)
Beta 7: READ NOTE BELOW BEFORE USING!
- SCSI UNIT ATTENTION/MEDIA MAY HAVE CHANGED clears when TEST UNIT READY is executed, not
when UA status is read by using REQUEST SENSE. Fixes ATAPI CD disk change issues with
some AOS ATAPI drivers.
- Accessing real CD (or CD emulator) in non-SPTI mode returned read errors depending on what
kind of imaginary geometry IOCTL_CDROM_GET_DRIVE_GEOMETRY returned.
- Memory bank change (reset) removed new memwatch debugger watchpoints.
- Built-in lzx decompressor didn't always decompress last byte of file correctly...
- b4 drive spinup update change: also don't enumerate drives if new config entry is found but
drive path fails to open and returns "not found" error (for example USB card reader not connected)
- When switching from RTG to native fullscreen or vice versa, re-open fullscreen mode if number
of backbuffers, selected monitor, refreshrate or vsync mode is different.
- New adf or hdf path was not converted to relative in relative path mode.
- Added VID 0x79d, PID 0x0201 ("USB ADAPTOR") analog joystick to USB adapter to rawinput blacklist.
- "Error log" button becomes visible in bottom part of GUI if any kind of config error was detected
or config required fixing, for example directory or harddrive failed to open, attempting to enable
Z3 fast with 24-bit address space CPU etc. (Currently many messages can be confusing and not all
important messages are enabled)
- Tape drive LOAD/UNLOAD SCSI command fix, error message during Amix 2.1 retension tape command.
- Picasso IV in Z2 mode + Z2 Fast RAM enabled used incorrect internal memory mapping
(missing graphics etc..)
- Only call D3D SetMaximumFrameLatency() when buffer flipping mode is immediate. Vsync waited flipping
caused major slowdown if emulation created frames faster than current display refresh rate.
- Increased "CPU slot" Max RAM size from 64M to 128M.
- Removed 68040+ "cycle-exact" support. It was useless and does not fit in new 68020/030 ce handling
without creating new CPU emulation core.
- Added 68020 and 68030 instruction cache dump command to debugger ("rc"). * = data valid.
- JIT + more compatible problem fixed.
!IMPORTANT NOTE!
Following is work in progress. Do not use 68020/030 cycle-exact modes. Timing is broken. Other modes work fine.
- Added 68030 manual head/tail/clocks timing values to table68k, gencpu automatically calculates
final values for 68020 (=68030 + 1 wait state added) and 68030 cores using table68k values and
EA timing formulas. Only includes 680x0 common instruction so far, 68020+ only instructions and
addressing modes and rarely used instructions do not have cycle-exact timing yet.
Beta 6:
- Enabled Cirrus Logic RTG VRAM size configuration. CL VRAM memory bank setups used by VRAM size

View File

@ -89,7 +89,7 @@ struct romdata *getromdatabypath (const TCHAR *path)
return NULL;
}
#define NEXT_ROM_ID 74
#define NEXT_ROM_ID 75
static struct romheader romheaders[] = {
{ _T("Freezer Cartridges"), 1 },
@ -192,6 +192,8 @@ static struct romdata roms[] = {
{ _T("CD32 MPEG Cartridge ROM"), 3, 1, 40, 30, _T("CD32FMV\0"), 262144, 23, 1, 0, ROMTYPE_CD32CART, 0, 0, NULL,
0xc35c37bf, 0x03ca81c7,0xa7b259cf,0x64bc9582,0x863eca0f,0x6529f435 },
{ _T("CD32 MPEG Cartridge ROM"), 3, 1, 40, 22, _T("CD32FMV\0"), 262144, 74, 1, 0, ROMTYPE_CD32CART, 0, 0, _T("391777-01"),
0xe57d05fe, 0x56077abd,0x82b652f0,0x54f76002,0xdde2bcd5,0x33198cc2 },
{ _T("CDTV extended ROM v1.00"), 1, 0, 1, 0, _T("CDTV\0"), 262144, 20, 0, 0, ROMTYPE_EXTCDTV, 0, 0, NULL,
0x42baa124, 0x7BA40FFA,0x17E500ED,0x9FED041F,0x3424BD81,0xD9C907BE },

View File

@ -18,7 +18,7 @@
static int outcmd[] = { 0x0a, 0x2a, 0x2f, 0xaa, 0x15, 0x55, -1 };
static int incmd[] = { 0x01, 0x03, 0x05, 0x08, 0x12, 0x1a, 0x5a, 0x25, 0x28, 0x37, 0x42, 0x43, 0xa8, 0x51, 0x52, 0xbd, -1 };
static int nonecmd[] = { 0x00, 0x11, 0x16, 0x17, 0x19, 0x1b, 0x1e, 0x35, -1 };
static int nonecmd[] = { 0x00, 0x0b, 0x11, 0x16, 0x17, 0x19, 0x1b, 0x1e, 0x2b, 0x35, -1 };
static int scsicmdsizes[] = { 6, 10, 10, 12, 16, 12, 10, 10 };
static int scsi_data_dir(struct scsi_data *sd)
@ -102,6 +102,7 @@ static void showsense(struct scsi_data *sd)
static void copysense(struct scsi_data *sd)
{
int len = sd->cmd[4];
//write_log (_T("REQUEST SENSE length %d (%d)\n"), len, sd->sense_len);
memset(sd->buffer, 0, len);
memcpy(sd->buffer, sd->sense, sd->sense_len > len ? len : sd->sense_len);
if (sd->sense_len == 0)

View File

@ -132,7 +132,7 @@
0000 rrr1 11dd dDDD:050:-----:-----:12: MVPRM.L Dr,d[Areg-Ad16]
0000 rrr1 00ss sSSS:000:--Z--:-----:11: BTST Dr,s[Dreg]
- 4 0 4
0000 rrr1 00ss sSSS:000:--Z--:-----:11: BTST Dr,s[!Areg,Dreg,Immd]
0000 rrr1 00ss sSSS:000:--Z--:-----:11: BTST Dr,s[!Areg,Dreg]
- 0 0 4 fea
0000 rrr1 01ss sSSS:000:--Z--:-----:13: BCHG Dr,s[Dreg]
- 6 0 6

View File

@ -2168,7 +2168,9 @@ struct zfile *archive_getzfile (struct znode *zn, unsigned int id, int flags)
zf = archive_access_tar (zn);
break;
}
if (zf)
if (zf) {
zf->archiveid = id;
zfile_fseek (zf, 0, SEEK_SET);
}
return zf;
}