From 344530b5a280a7346ad03b130a8da7c21c3fdac2 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 14 Dec 2014 18:35:50 +0200 Subject: [PATCH] 3000b28 --- blitter.cpp | 3 +- cpuboard.cpp | 12 ---- custom.cpp | 104 ++++++++++++++++++++--------------- debug.cpp | 16 ++++-- od-win32/resources/winuae.rc | 7 +-- od-win32/win32.h | 4 +- od-win32/win32gui.cpp | 4 +- od-win32/winuaechangelog.txt | 15 +++++ scsitape.cpp | 8 +++ 9 files changed, 101 insertions(+), 72 deletions(-) diff --git a/blitter.cpp b/blitter.cpp index 3204df4e..19e8a7e9 100644 --- a/blitter.cpp +++ b/blitter.cpp @@ -773,11 +773,10 @@ static void decide_blitter_line (int hsync, int hpos) } // final 2 idle cycles? does not need free bus - // in line mode idle cycles also use line mode cycle sequence (every other cycle) if (blit_final) { blit_cyclecounter++; blit_totalcyclecounter++; - if (blit_cyclecounter >= 4) { + if (blit_cyclecounter >= 2) { blitter_done (last_blitter_hpos); return; } diff --git a/cpuboard.cpp b/cpuboard.cpp index 2a67f776..8b4c59f7 100644 --- a/cpuboard.cpp +++ b/cpuboard.cpp @@ -1292,18 +1292,6 @@ void cpuboard_map(void) map_banks(&blizzardf0_bank, 0xf00000 >> 16, 131072 >> 16, 0); map_banks(&blizzardea_bank, 0xf40000 >> 16, 65536 >> 16, 0); } - if (is_a2630()) { - if (!currprefs.address_space_24) { - // end of 0x01000000 memory is detected by checking if address alias to chip ram! - for (int i = 0x01000000; i < 0x10000000; i++) { - addrbank *ab = &get_mem_bank(i); - if (ab == &dummy_bank) { - map_banks(&chipmem_bank, i >> 16, currprefs.chipmem_size >> 16, 0); - break; - } - } - } - } } void cpuboard_reset(void) diff --git a/custom.cpp b/custom.cpp index 485f7e3f..474ad185 100644 --- a/custom.cpp +++ b/custom.cpp @@ -298,7 +298,7 @@ enum diw_states static int plffirstline, plflastline; int plffirstline_total, plflastline_total; static int autoscale_bordercolors; -static int plfstrt_start, plfstrt, plfstop; +static int plfstrt, plfstop; static int sprite_minx, sprite_maxx; static int first_bpl_vpos; static int last_ddf_pix_hpos; @@ -1682,6 +1682,14 @@ static void update_denise_shifter_planes (int hpos) toscr_1 (diff, fetchmode); thisline_decision.plfright += hpos - thisline_decision.plfright; } + // FIXME: Samplers / Back In 90 vs Disposable Hero title screen in fast modes + if (currprefs.cpu_model < 68020) { + toscr_nr_planes_shifter = np; + if (isocs7planes()) { + if (toscr_nr_planes_shifter < 6) + toscr_nr_planes_shifter = 6; + } + } } static void update_denise (int hpos) @@ -4529,10 +4537,10 @@ static void DMACON (int hpos, uae_u16 v) #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 %08x\n"), olds, news, m68k_getpc ()); + 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 %08x\n"), olds, news, m68k_getpc ()); } #endif @@ -6089,25 +6097,27 @@ static void update_copper (int until_hpos) if (ch_comp & 1) ch_comp = 0; - 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; - - /* Now we know that the comparisons were successful. We might still - have to wait for the blitter though. */ + /* First handle possible blitter wait + * Must be before following free cycle check + */ if ((cop_state.saved_i2 & 0x8000) == 0) { - decide_blitter (old_hpos); + decide_blitter(old_hpos); if (bltstate != BLT_done) { /* We need to wait for the blitter. */ cop_state.state = COP_bltwait; copper_enabled_thisline = 0; - unset_special (SPCFLAG_COPPER); + unset_special(SPCFLAG_COPPER); goto out; } } + + 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; + #ifdef DEBUGGER if (debug_dma) record_dma_event (DMA_EVENT_COPPERWAKE, old_hpos, vp); @@ -6190,19 +6200,40 @@ static void compute_spcflag_copper (int hpos) set_special (SPCFLAG_COPPER); } -/* -Copper writes to BLTSIZE: 3 blitter idle cycles, blitter normal cycle starts -(CPU write to BLTSIZE only have 2 idle cycles at start) - -BFD=0 wait: 1 cycle (or 2 if hpos is not aligned) delay before wait ends -*/ void blitter_done_notify (int hpos) { - int vp = vpos; - if (cop_state.state != COP_bltwait) return; + int vp_wait = vpos & (((cop_state.saved_i2 >> 8) & 0x7F) | 0x80); + int vp = vpos; + + hpos++; + hpos &= ~1; + if (hpos >= maxhpos) { + hpos -= maxhpos; + vp++; + } + cop_state.hpos = hpos; + cop_state.vpos = vp; + cop_state.state = COP_wait; + cop_state.saved_i2 |= 0x8000; + +#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_wait >= cop_state.vcmp) { + copper_enabled_thisline = 1; + set_special(SPCFLAG_COPPER); + } else { + unset_special (SPCFLAG_COPPER); + } + +#if 0 hpos += 3; hpos &= ~1; if (hpos >= maxhpos) { @@ -6224,6 +6255,7 @@ void blitter_done_notify (int hpos) copper_enabled_thisline = 1; set_special (SPCFLAG_COPPER); } +#endif } void do_copper (void) @@ -6305,6 +6337,10 @@ static void do_sprites_1(int num, int cycle, int hpos) // fetch both sprite pairs even if DMA was switched off between sprites int isdma = dmaen (DMA_SPRITE) || ((num & 1) && spr[num & ~1].dmacycle); + // A1000 Agnus off by one. + if (cant_this_last_line() && !currprefs.cs_dipagnus) + return; + if (isdma && vpos == sprite_vblank_endline) spr_arm (num, 0); @@ -6433,26 +6469,6 @@ static void do_sprites (int hpos) int maxspr, minspr; int i; - if (vpos == 0) { - // It is also possible armed status is cleared - // I am not sure so lets start with clearing - // data only - if (dmaen (DMA_SPRITE)) { - for (i = 0; i < MAX_SPRITES; i++) { - sprdata[i][0] = 0; - sprdatb[i][0] = 0; -#ifdef AGA - sprdata[i][1] = 0; - sprdatb[i][1] = 0; - sprdata[i][2] = 0; - sprdatb[i][2] = 0; - sprdata[i][3] = 0; - sprdatb[i][3] = 0; -#endif - } - } - return; - } if (vpos < sprite_vblank_endline) return; diff --git a/debug.cpp b/debug.cpp index 43bc6989..4aaf2a3e 100644 --- a/debug.cpp +++ b/debug.cpp @@ -1290,9 +1290,18 @@ void log_dma_record (void) decode_dma_record (0, 0, 0, true); } +static void init_record_copper(void) +{ + if (!cop_record[0]) { + cop_record[0] = xmalloc(struct cop_rec, NR_COPPER_RECORDS); + cop_record[1] = xmalloc(struct cop_rec, NR_COPPER_RECORDS); + } +} + void record_copper_blitwait (uaecptr addr, int hpos, int vpos) { - int t = nr_cop_records[curr_cop_set] - 1; + int t = nr_cop_records[curr_cop_set]; + init_record_copper(); cop_record[curr_cop_set][t].bhpos = hpos; cop_record[curr_cop_set][t].bvpos = vpos; } @@ -1300,10 +1309,7 @@ void record_copper_blitwait (uaecptr addr, int hpos, int 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]) { - cop_record[0] = xmalloc (struct cop_rec, NR_COPPER_RECORDS); - cop_record[1] = xmalloc (struct cop_rec, NR_COPPER_RECORDS); - } + init_record_copper(); if (t < NR_COPPER_RECORDS) { cop_record[curr_cop_set][t].addr = addr; cop_record[curr_cop_set][t].w1 = word1; diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 7af63b3c..4ee68a6d 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -526,14 +526,11 @@ BEGIN CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,65,10,210,35 CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,1,58,343,28 PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,132,100,80,15 - CONTROL "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,196,112,24 - CONTROL "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | NOT WS_VISIBLE | WS_DISABLED,211,131,112,24 CONTROL "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,116,168,112,24 CONTROL "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,231,168,112,24 - CONTROL "",IDC_AIABHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | NOT WS_VISIBLE | WS_DISABLED,22,131,112,24 CONTROL "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,117,225,112,24 - CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,231,196,112,24 - CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,117,196,112,24 + CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,174,196,112,24 + CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,60,196,112,24 CONTROL "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,168,112,24 CONTROL "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,225,112,24 CONTROL "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,231,225,112,24 diff --git a/od-win32/win32.h b/od-win32/win32.h index f2c1faf4..b7fb65ca 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("27") +#define WINUAEBETA _T("28") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2014, 12, 8) +#define WINUAEDATE MAKEBD(2014, 12, 14) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 1e491a7d..e25e9d27 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -5074,9 +5074,9 @@ typedef struct url_info static urlinfo urls[] = { {IDC_CLOANTOHOME, FALSE, _T("Cloanto's Amiga Forever"), _T("http://www.amigaforever.com/")}, - {IDC_AMIGAHOME, FALSE, _T("Amiga Inc."), _T("http://www.amiga.com")}, + {IDC_AMIGAHOME, FALSE, _T("Amiga Inc."), _T("http://www.amiga.com/")}, // {IDC_PICASSOHOME, FALSE, _T("Picasso96 Home Page"), _T("http://www.picasso96.cogito.de/")}, - {IDC_UAEHOME, FALSE, _T("UAE Home Page"), _T("http://www.amigaemulator.org/")}, +// {IDC_UAEHOME, FALSE, _T("UAE Home Page"), _T("http://www.amigaemulator.org/")}, {IDC_WINUAEHOME, FALSE, _T("WinUAE Home Page"), _T("http://www.winuae.net/")}, // {IDC_AIABHOME, FALSE, _T("AIAB"), _T("http://www.amigainabox.co.uk/")}, {IDC_THEROOTS, FALSE, _T("Back To The Roots"), _T("http://www.back2roots.org/")}, diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 1b66e779..aad7f02a 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -18,6 +18,21 @@ Things that may happen in 2015: - restore only single input target to default. +Beta 28: (RC3) + +- qemu-uae.dll updated to final 2.2.0 QEMU release. (No PPC changes) +- Removed A26x0 chip ram mirror hack (b25), not needed anymore. +- Copper WAIT with BFD=0 (wait for blitter enabled) sequence was incorrect, copper first waits for blitter, then + it goes to normal WAIT state. Previously WAIT state check was done first, then blitter wait. It is not same + because copper requires idle cycle when WAIT ends and it should be after blitter has finished, not before. + (Last minute change 1) +- Second last minute change: last line sprite DMA logic behavior difference between A1000 Agnus and Fat revisions. + Sprite glitches are different in Skitro by Awesome/D-Tect/Vanish when run on A1000 vs OCS A500. Also fixes missing + yellow glitches in same demo. +- b23 "Fixed missing graphics in Disposable Hero title screen in non-cycle exact modes." broke (again) demo Back + in 90 / Samplers. Added quick workaround: only do "Disposable Hero" fix if CPU is 68020+ (=works in most whdload + configurations without glitches). + Beta 27: (RC2) - Added compatibility warning message if PPC CPU (and m68k is stopped) configures UAE filesystem diff --git a/scsitape.cpp b/scsitape.cpp index 43f522fe..81a68eaf 100644 --- a/scsitape.cpp +++ b/scsitape.cpp @@ -659,6 +659,14 @@ notape: *data_len = scsi_len; *reply_len = lr; *sense_len = ls; + if (lr > 0) { + if (log_tapeemu) { + write_log (_T("TAPEEMU REPLY: ")); + for (int i = 0; i < lr && i < 40; i++) + write_log (_T("%02X."), r[i]); + write_log (_T("\n")); + } + } if (ls > 0) { if (tape->beom == 1) s[2] |= 0x40; -- 2.47.3