#define CUSTOM_DEBUG 0
#define SPRITE_DEBUG 0
#define SPRITE_DEBUG_MINY 0x0
-#define SPRITE_DEBUG_MAXY 0x100
+#define SPRITE_DEBUG_MAXY 0x300
#define SPR0_HPOS 0x15
#define MAX_SPRITES 8
#define SPRITE_COLLISIONS
return curr_diagram[(hpos - cycle_diagram_shift) & fetchstart_mask];
}
-static void update_denise (int hpos)
+STATIC_INLINE void update_denise (int hpos)
{
toscr_res = GET_RES_DENISE (bplcon0d);
if (bplcon0dd != bplcon0d) {
#endif
update_denise (hpos);
- update_toscr_planes (fm);
+ if (toscr_nr_planes_agnus > thisline_decision.nr_planes)
+ update_toscr_planes (fm);
maybe_first_bpl1dat (hpos);
bplcon1t2 = bplcon1t;
if (vres2 > VRES_QUAD)
vres2 = VRES_QUAD;
- int start = hbstrt;
- int stop = hbstop;
+ int start = hsyncstartpos; //hbstrt;
+ int stop = hsyncendpos; //hbstop;
- gfxvidinfo.drawbuffer.inwidth = (((start > stop ? (maxhpos - (maxhpos - start + stop)) : (maxhpos - (stop - start) + 2)) * 2) << res2);
- gfxvidinfo.drawbuffer.inxoffset = ((stop + 1) & ~1) * 2;
+ gfxvidinfo.drawbuffer.inwidth = ((maxhpos - (maxhpos - start + stop) + 1) * 2) << res2;
+ gfxvidinfo.drawbuffer.inxoffset = stop * 2;
gfxvidinfo.drawbuffer.extrawidth = 0;
gfxvidinfo.drawbuffer.inwidth2 = gfxvidinfo.drawbuffer.inwidth;
maxhpos_short = maxhpos;
if (beamcon0 & 0x80) {
if (hbstrt > maxhpos)
- hsyncstartpos = hbstrt;
+ hsyncstartpos = hbstrt + 1;
else
- hsyncstartpos = maxhpos + hbstrt;
+ hsyncstartpos = maxhpos + hbstrt + 1;
if (hbstop > maxhpos)
- hsyncendpos = maxhpos - hbstop;
+ hsyncendpos = maxhpos - hbstop - 1;
else
- hsyncendpos = hbstop;
+ hsyncendpos = hbstop - 1;
+ if (hsyncendpos < 2)
+ hsyncendpos = 2;
} else {
hsyncstartpos = maxhpos_short + 13;
hsyncendpos = 24;
int newbn = (dmacon & DMA_BLITPRI);
#endif
+#if SPRITE_DEBUG > 0
+ {
+ int olds = (oldcon & DMA_SPRITE) && (oldcon & DMA_MASTER);
+ int news = (dmacon & DMA_SPRITE) && (dmacon & DMA_MASTER);
+ if (olds != news)
+ write_log (_T("SPRITE DMA: %d -> %d\n"), olds, news);
+ }
+#endif
+
if ((dmacon & DMA_BLITPRI) > (oldcon & DMA_BLITPRI) && bltstate != BLT_done)
set_special (SPCFLAG_BLTNASTY);
STATIC_INLINE void spr_arm (int num, int state)
{
+#if SPRITE_DEBUG > 0
+ if (spr[num].armed != state)
+ write_log (_T("SPR%d ARM=%d\n"), num, state);
+#endif
switch (state) {
case 0:
nr_armed -= spr[num].armed;
STATIC_INLINE void sprstartstop (struct sprite *s)
{
+ if (vpos < sprite_vblank_endline)
+ return;
if (vpos == s->vstart)
s->dmastate = 1;
if (vpos == s->vstop)
static int copper_cant_read (int hpos, int alloc)
{
int cant = copper_cant_read2 (hpos, alloc);
- if (cant && debug_dma)
+ if (cant && debug_dma && alloc)
record_dma_event (DMA_EVENT_COPPERWANTED, hpos, vpos);
return cant;
}
}
#ifdef DEBUGGER
if (debug_copper && !cop_state.ignore_next)
- record_copper (debugip - 4, old_hpos, vpos);
+ record_copper (debugip - 4, cop_state.saved_i1, cop_state.saved_i2, old_hpos, vpos);
#endif
cop_state.ignore_next = 0;
}
copper_enabled_thisline = 0;
unset_special (SPCFLAG_COPPER);
goto out;
- } else {
- if (debug_dma)
- record_dma_event (DMA_EVENT_COPPERWAKE, old_hpos, vp);
}
}
+ if (debug_dma)
+ record_dma_event (DMA_EVENT_COPPERWAKE, old_hpos, vp);
- #ifdef DEBUGGER
+#ifdef DEBUGGER
if (debug_copper)
- record_copper (cop_state.ip - 4, old_hpos, vpos);
- #endif
+ record_copper (cop_state.ip - 4, cop_state.saved_i1, cop_state.saved_i2, old_hpos, vpos);
+#endif
cop_state.state = COP_read1;
}
#ifdef DEBUGGER
if (debug_copper)
- record_copper (cop_state.ip - 4, old_hpos, vpos);
+ record_copper (cop_state.ip - 4, cop_state.saved_i1, cop_state.saved_i2, old_hpos, vpos);
#endif
break;
cop_state.hpos = hpos;
cop_state.vpos = vp;
cop_state.state = COP_read1;
+
+#ifdef DEBUGGER
if (debug_dma)
record_dma_event (DMA_EVENT_COPPERWAKE, hpos, vp);
+ if (debug_copper)
+ record_copper_blitwait (cop_state.ip - 4, hpos, vp);
+#endif
if (dmaen (DMA_COPPER) && vp == vpos) {
copper_enabled_thisline = 1;
lightpen_active = -1;
lightpen_triggered = 0;
lightpen_cx = lightpen_cy = -1;
+ nr_armed = 0;
+
if (!savestate_state) {
extra_cycle = 0;
hsync_counter = 0;
/* Clear the armed flags of all sprites. */
memset (spr, 0, sizeof spr);
- nr_armed = 0;
dmacon = 0;
intreq_internal = 0;
blit_interrupt = 1;
lof_store = lof_current = 0;
lof_lace = false;
+ init_sprites ();
}
gayle_reset (hardreset);
audio_update_adkmasks ();
}
- init_sprites ();
-
init_hardware_frame ();
drawing_init ();
CLXCON (clxcon);
CLXCON2 (clxcon2);
calcdiw ();
+ for (i = 0; i < 8; i++) {
+ SPRxCTLPOS (i);
+ nr_armed += spr[i].armed != 0;
+ }
+ if (! currprefs.produce_sound) {
+ eventtab[ev_audio].active = 0;
+ events_schedule ();
+ }
write_log (_T("CPU=%d Chipset=%s %s\n"),
currprefs.cpu_model,
(currprefs.chipset_mask & CSMASK_AGA) ? _T("AGA") :
(currprefs.chipset_mask & CSMASK_ECS_AGNUS) ? _T("ECS") :
_T("OCS"), currprefs.ntscmode ? _T("NTSC") : _T("PAL"));
write_log (_T("State restored\n"));
- for (i = 0; i < 8; i++)
- nr_armed += spr[i].armed != 0;
- if (! currprefs.produce_sound) {
- eventtab[ev_audio].active = 0;
- events_schedule ();
- }
}
sprres = expand_sprres (bplcon0, bplcon3);
sprite_width = GET_SPRITEWIDTH (fmode);
sprdatb[num][2] = RW;
sprdata[num][3] = RW;
sprdatb[num][3] = RW;
- spr[num].armed = RB;
+ spr[num].armed = RB & 1;
return src;
}
void do_cycles_ce (unsigned long cycles)
{
- unsigned long c;
-
- c = cycles + extra_cycle;
while (cycles >= CYCLE_UNIT) {
int hpos = current_hpos () + 1;
decide_line (hpos);
do_cycles (1 * CYCLE_UNIT);
cycles -= CYCLE_UNIT;
}
- extra_cycle = c;
}
void do_cycles_ce020 (unsigned long cycles)
console_out (_T(", ignore horizontal"));
}
- console_out_f (_T("\n \t; VP %02x, VE %02x; HP %02x, HE %02x; BFD %d\n"),
+ console_out_f (_T("\n \t; VP %02x, VE %02x; HP %02x, HE %02x; BFD %d\n"),
vp, ve, hp, he, bfd);
}
/* Record copper activity for the debugger. */
struct cop_rec
{
+ uae_u16 w1, w2;
int hpos, vpos;
+ int bhpos, bvpos;
uaecptr addr;
};
static struct cop_rec *cop_record[2];
decode_dma_record (0, 0, 0, true);
}
-void record_copper (uaecptr addr, int hpos, int vpos)
+void record_copper_blitwait (uaecptr addr, int hpos, int vpos)
+{
+ int t = nr_cop_records[curr_cop_set] - 1;
+ cop_record[curr_cop_set][t].bhpos = hpos;
+ cop_record[curr_cop_set][t].bvpos = vpos;
+}
+
+void record_copper (uaecptr addr, uae_u16 word1, uae_u16 word2, int hpos, int vpos)
{
int t = nr_cop_records[curr_cop_set];
if (!cop_record[0]) {
}
if (t < NR_COPPER_RECORDS) {
cop_record[curr_cop_set][t].addr = addr;
+ cop_record[curr_cop_set][t].w1 = word1;
+ cop_record[curr_cop_set][t].w2 = word2;
cop_record[curr_cop_set][t].hpos = hpos;
cop_record[curr_cop_set][t].vpos = vpos;
+ cop_record[curr_cop_set][t].bvpos = -1;
nr_cop_records[curr_cop_set] = t + 1;
}
if (debug_copper & 2) { /* trace */
}
/* simple decode copper by Mark Cox */
-static void decode_copper_insn (FILE* file, unsigned long insn, unsigned long addr)
+static void decode_copper_insn (FILE* file, uae_u16 mword1, uae_u16 mword2, unsigned long addr)
{
struct cop_rec *cr = NULL;
- uae_u32 insn_type = insn & 0x00010001;
+ uae_u32 insn_type, insn;
TCHAR here = ' ';
TCHAR record[] = _T(" ");
if ((cr = find_copper_records (addr))) {
_stprintf (record, _T(" [%03x %03x]"), cr->vpos, cr->hpos);
+ insn = (cr->w1 << 16) | cr->w2;
+ } else {
+ insn = (mword1 << 16) | mword2;
}
+ insn_type = insn & 0x00010001;
+
if (get_copper_address (-1) >= addr && get_copper_address(-1) <= addr + 3)
here = '*';
- console_out_f (_T("%c%08lx: %04lx %04lx%s\t; "), here, addr, insn >> 16, insn & 0xFFFF, record);
+ console_out_f (_T("%c%08lx: %04lx %04lx%s\t;%c "), here, addr, insn >> 16, insn & 0xFFFF, record, insn != ((mword1 << 16) | mword2) ? '!' : ' ');
switch (insn_type) {
case 0x00010000: /* WAIT insn */
disassemble_wait (file, insn);
if (insn == 0xfffffffe)
- console_out (_T(" \t; End of Copperlist\n"));
+ console_out (_T(" \t; End of Copperlist\n"));
break;
abort ();
}
+ if (cr && cr->bvpos >= 0) {
+ console_out_f (_T(" BLT [%03x %03x]\n"), cr->bvpos, cr->bhpos);
+ }
}
static uaecptr decode_copperlist (FILE* file, uaecptr address, int nolines)
{
uae_u32 insn;
while (nolines-- > 0) {
- insn = (chipmem_wget_indirect (address) << 16) | chipmem_wget_indirect (address + 2);
- decode_copper_insn (file, insn, address);
+ decode_copper_insn (file, chipmem_wget_indirect (address), chipmem_wget_indirect (address + 2), address);
address += 4;
}
return address;
case nln_upper_black:
if (currprefs.gfx_scanlines >= 4) {
*state = LINE_DECIDED;
- state[1] = LINE_BLACK;
+ state[-1] = LINE_BLACK;
} else {
changed += state[0] != LINE_DONE;
*state = changed ? LINE_DECIDED : LINE_DONE;
currprefs.z3chipmem_size = changed_prefs.z3chipmem_size;
z3chipmem_bank.start = currprefs.z3fastmem_start;
- z3fastmem_bank.start = currprefs.z3fastmem_start;
+ if (currprefs.mbresmem_high_size == 128 * 1024 * 1024)
+ z3chipmem_bank.start += 16 * 1024 * 1024;
+ z3fastmem_bank.start = z3chipmem_bank.start;
if (currprefs.z3chipmem_size)
z3fastmem_bank.start += currprefs.z3chipmem_size + 16 * 1024 * 1024;
z3fastmem2_bank.start = z3fastmem_bank.start + currprefs.z3fastmem_size;
extern void deactivate_debugger (void);
extern int notinrom (void);
extern const TCHAR *debuginfo (int);
-extern void record_copper (uaecptr addr, int hpos, int vpos);
+extern void record_copper (uaecptr addr, uae_u16 word1, uae_u16 word2, int hpos, int vpos);
+extern void record_copper_blitwait (uaecptr addr, int hpos, int vpos);
extern void record_copper_reset (void);
extern int mmu_init (int, uaecptr,uaecptr);
extern void mmu_do_hit (void);
error_log (_T("Immediate blitter and waiting blits can't be enabled simultaneously.\n"));
p->waiting_blits = 0;
}
+ if (p->cpu_cycle_exact)
+ p->cpu_compatible = true;
}
void fixup_prefs (struct uae_prefs *p)
bool rendered = false;
bool uaegfx = currprefs.rtgmem_type < GFXBOARD_HARDWARE;
- if (vsync < 0) {
- vsync_busywait_end (NULL);
- vsync_busywait_do (NULL, false, false);
+ if (picasso_on) {
+ if (vsync < 0) {
+ vsync_busywait_end (NULL);
+ vsync_busywait_do (NULL, false, false);
+ }
}
getvsyncrate (currprefs.chipset_refreshrate, &mult);
}
framecnt++;
+
+ if (!uaegfx && !picasso_on) {
+ rtg_render ();
+ return;
+ }
+
+ if (!picasso_on)
+ return;
+
if (uaegfx)
mouseupdate ();
#define LANG_DLL 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("14")
+#define WINUAEBETA _T("15")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2013, 11, 20)
+#define WINUAEDATE MAKEBD(2013, 11, 23)
#define WINUAEEXTRA _T("")
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
static int allow_quit;
static int restart_requested;
-static int full_property_sheet = 1;
+int full_property_sheet = 1;
static struct uae_prefs *pguiprefs;
struct uae_prefs workprefs;
static int currentpage = -1;
if (uci) {
if (uci->ci.rootdir[0])
filesys_media_change (uci->ci.rootdir, 1, uci);
- else
+ else if (uci->configoffset >= 0)
filesys_eject (uci->configoffset);
}
}
return FALSE;
}
+extern int full_property_sheet;
+
struct newresource *scaleresource (struct newresource *res, HWND parent, int resize)
{
DLGTEMPLATEEX *d, *s;
d->style |= DS_MODALFRAME;
d->style &= ~WS_THICKFRAME;
}
- if (isfullscreen () <= 0)
+ if (full_property_sheet)
d->style |= WS_MINIMIZEBOX;
d2 = (DLGTEMPLATEEX_END*)ns->resource;
- restore only single input target to default.
+Beta 14:
+
+- GUI didn't work in fullscreen modes.
+- Input panel lost all keyboard events (not even Test button accepted any key presses) in some situations,
+ already non-working config files can't be fixed. Older bug.
+- New frames interlace mode (without blacklines) now only redraws changed lines.
+- 68040 without FPU: unimplemented FPU exception used wrong exception vector.
+- 68020+ DIVL div-by-zero exception in cycle-exact mode didn't skip prefetch phase.
+- Do not set lightpen triggered state when BPLCON0 lightpen bit is set unless lightpen is also configured
+ in gameports or input panel.
+- Fixed crash if disabled keyboard had (old) gameport mappings.
+- Autoscale size change comparison used wrong value (width, not height) causing slow down, forced config
+ change check every frame.
+- Added configurable directory filesystem file/directory name length limit, currently config file only,
+ filesys_max_name_length=x, files and dirs with longer names are not seen in Amiga-side (directory operations only)
+- Really fixed sound sync timing issue, partly introduced in b1 and b13.
+
Beta 13:
- Standard partition hardfile OFS filesystem check was broken (2.6.1)