From: Toni Wilen Date: Tue, 22 Dec 2009 17:43:14 +0000 (+0200) Subject: imported winuaesrc2010b3.zip X-Git-Tag: 2100~41 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=a0c6d0485735a40732c93a6f90d9777eaac4453f;p=francis%2Fwinuae.git imported winuaesrc2010b3.zip --- diff --git a/cdtv.c b/cdtv.c index 7be31f71..0f3eebc0 100644 --- a/cdtv.c +++ b/cdtv.c @@ -12,7 +12,7 @@ //#define ROMHACK //#define ROMHACK2 //#define CDTV_DEBUG -#define CDTV_DEBUG_CMD +//#define CDTV_DEBUG_CMD //#define CDTV_DEBUG_6525 #include "sysconfig.h" @@ -452,13 +452,14 @@ static void cdrom_command_thread (uae_u8 b) { case 0x01: /* seek */ if (cdrom_command_cnt_in == 7) { + sleep_millis (500); cdrom_command_accepted (0, s, &cdrom_command_cnt_in); cd_finished = 1; } break; case 0x02: /* read */ if (cdrom_command_cnt_in == 7) { - read_sectors((s[1] << 16) | (s[2] << 8) | (s[3] << 0), (s[4] << 8) | (s[5] << 0)); + read_sectors ((s[1] << 16) | (s[2] << 8) | (s[3] << 0), (s[4] << 8) | (s[5] << 0)); cdrom_command_accepted (0, s, &cdrom_command_cnt_in); } break; diff --git a/custom.c b/custom.c index 59b95b7d..d73ac420 100644 --- a/custom.c +++ b/custom.c @@ -183,7 +183,7 @@ uae_u16 beamcon0, new_beamcon0; uae_u16 vtotal = MAXVPOS_PAL, htotal = MAXHPOS_PAL; static uae_u16 hsstop, hbstrt, hbstop, vsstop, vbstrt, vbstop, hsstrt, vsstrt, hcenter; static int ciavsyncmode; -static int hstrt_nodetect; +static int diw_hstrt; #define HSYNCTIME (maxhpos * CYCLE_UNIT); @@ -249,7 +249,7 @@ static int bplcon1_hpos; enum diw_states { - DIW_waiting_start, DIW_waiting_stop + DIW_waiting_start, DIW_waiting_stop, DIW_waiting_frozen }; static int plffirstline, plflastline; @@ -579,16 +579,18 @@ static void decide_diw (int hpos) { /* Last hpos = hpos + 0.5, eg. normal PAL end hpos is 227.5 * 2 = 455 */ int pix_hpos = coord_diw_to_window_x (hpos == maxhpos ? hpos * 2 + 1 : hpos * 2); - if (hdiwstate == DIW_waiting_start && thisline_decision.diwfirstword == -1 - && pix_hpos >= diwfirstword && !hstrt_nodetect && last_diw_pix_hpos < diwfirstword) + if (pix_hpos >= diwfirstword && last_diw_pix_hpos < diwfirstword && hdiwstate == DIW_waiting_start) { - thisline_decision.diwfirstword = diwfirstword < 0 ? 0 : diwfirstword; - hdiwstate = DIW_waiting_stop; + if (thisline_decision.diwfirstword == -1) + thisline_decision.diwfirstword = diwfirstword < 0 ? 0 : diwfirstword; + // hstrt < 2 and ECS Denise: horizontal diw start detector not active + if (diw_hstrt >= 2 || !(currprefs.chipset_mask & CSMASK_ECS_DENISE)) + hdiwstate = DIW_waiting_stop; } - if (hdiwstate == DIW_waiting_stop && thisline_decision.diwlastword == -1 - && pix_hpos >= diwlastword && last_diw_pix_hpos < diwlastword) + if (pix_hpos >= diwlastword && last_diw_pix_hpos < diwlastword && hdiwstate == DIW_waiting_stop) { - thisline_decision.diwlastword = diwlastword < 0 ? 0 : diwlastword; + if (thisline_decision.diwlastword == -1) + thisline_decision.diwlastword = diwlastword < 0 ? 0 : diwlastword; hdiwstate = DIW_waiting_start; } last_diw_pix_hpos = pix_hpos; @@ -1844,7 +1846,10 @@ STATIC_INLINE void decide_line (int hpos) { /* Take care of the vertical DIW. */ if (vpos == plffirstline) { - diwstate = DIW_waiting_stop; + if (diwstate == DIW_waiting_stop && last_decide_line_hpos < 2 && hpos > last_decide_line_hpos && diw_hstrt <= 2 && !(currprefs.chipset_mask & CSMASK_ECS_DENISE)) + diwstate = DIW_waiting_frozen; // OCS Denise bug + else if (hpos >= 2 && diwstate != DIW_waiting_frozen) + diwstate = DIW_waiting_stop; ddf_change = vpos; } if (vpos == plflastline) { @@ -2492,7 +2497,7 @@ static void finish_decisions (void) /* Large DIWSTOP values can cause the stop position never to be * reached, so the state machine always stays in the same state and * there's a more-or-less full-screen DIW. */ - if (hdiwstate == DIW_waiting_stop || thisline_decision.diwlastword > max_diwlastword) + if (hdiwstate == DIW_waiting_stop /* || thisline_decision.diwlastword > max_diwlastword */) thisline_decision.diwlastword = max_diwlastword; if (thisline_decision.diwfirstword != line_decisions[next_lineno].diwfirstword) @@ -2816,8 +2821,7 @@ static void calcdiw (void) vstop |= 0x100; } - // hstrt <= 1: diw start detector not active - hstrt_nodetect = hstrt <= 1; + diw_hstrt = hstrt; diwfirstword = coord_diw_to_window_x (hstrt); diwlastword = coord_diw_to_window_x (hstop); @@ -2889,10 +2893,10 @@ STATIC_INLINE uae_u16 DENISEID (void) return currprefs.cs_deniserev; #ifdef AGA if (currprefs.chipset_mask & CSMASK_AGA) - return 0xF8; + return 0x00F8; #endif if (currprefs.chipset_mask & CSMASK_ECS_DENISE) - return 0xFC; + return 0xFFFC; return 0xffff; } STATIC_INLINE uae_u16 DMACONR (int hpos) @@ -3566,8 +3570,10 @@ static void DIWSTOP (int hpos, uae_u16 v) static void DIWHIGH (int hpos, uae_u16 v) { - if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS)) + if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE)) return; + if (!(currprefs.chipset_mask & CSMASK_AGA)) + v &= ~(0x0008 | 0x0010 | 0x1000 | 0x0800); v &= ~(0x8000 | 0x4000 | 0x0080 | 0x0040); if (diwhigh_written && diwhigh == v) return; @@ -4577,7 +4583,7 @@ STATIC_INLINE void do_sprites_1 (int num, int cycle, int hpos) sprstartstop (s); } } - if (s->dmastate && !posctl) { + if (s->dmastate && !posctl && dma) { uae_u16 data; data = sprite_fetch (s, dma, hpos, cycle, 1); @@ -4753,7 +4759,6 @@ static void init_hardware_frame (void) prev_lineno = -1; nextline_how = nln_normal; diwstate = DIW_waiting_start; - hdiwstate = DIW_waiting_start; ddfstate = DIW_waiting_start; first_planes_vpos = 0; last_planes_vpos = 0; @@ -5576,6 +5581,7 @@ void customreset (int hardreset) diwhigh = 0; diwhigh_written = 0; + hdiwstate = DIW_waiting_start; // this does not reset at vblank FMODE (0, 0); CLXCON (0); @@ -5620,7 +5626,6 @@ void customreset (int hardreset) bltstate = BLT_done; cop_state.state = COP_stop; diwstate = DIW_waiting_start; - hdiwstate = DIW_waiting_start; set_cycles (0); hack_vpos = 0; @@ -6399,7 +6404,8 @@ uae_u8 *restore_custom (uae_u8 *src) hcenter = RW; /* 1E2 HCENTER */ diwhigh = RW; /* 1E4 DIWHIGH */ diwhigh_written = (diwhigh & 0x8000) ? 1 : 0; - diwhigh &= 0x7fff; + hdiwstate = (diwhigh & 0x4000) ? DIW_waiting_stop : DIW_waiting_start; + diwhigh &= 0x3fff; RW; /* 1E6 ? */ RW; /* 1E8 ? */ RW; /* 1EA ? */ @@ -6571,7 +6577,7 @@ uae_u8 *save_custom (int *len, uae_u8 *dstptr, int full) SW (hsstrt); /* 1DE HSSTRT */ SW (vsstrt); /* 1E0 VSSTRT */ SW (hcenter); /* 1E2 HCENTER */ - SW (diwhigh | (diwhigh_written ? 0x8000 : 0)); /* 1E4 DIWHIGH */ + SW (diwhigh | (diwhigh_written ? 0x8000 : 0) | (hdiwstate == DIW_waiting_stop ? 0x4000 : 0)); /* 1E4 DIWHIGH */ SW (0); /* 1E6 */ SW (0); /* 1E8 */ SW (0); /* 1EA */ @@ -6634,6 +6640,7 @@ uae_u8 *save_custom_agacolors (int *len, uae_u8 *dstptr) uae_u8 *restore_custom_sprite (int num, uae_u8 *src) { + memset (&spr[num], 0, sizeof (struct sprite)); spr[num].pt = RL; /* 120-13E SPRxPT */ sprpos[num] = RW; /* 1x0 SPRxPOS */ sprctl[num] = RW; /* 1x2 SPRxPOS */ diff --git a/od-win32/unicode.c b/od-win32/unicode.c index 4917f515..a682fc32 100644 --- a/od-win32/unicode.c +++ b/od-win32/unicode.c @@ -232,7 +232,7 @@ void unicode_init (void) { int i; - write_log (L"Filesystem charset conversion table:\n"); + write_log (L"Filesystem charset (ACP=%u):\n", GetACP ()); for (i = 0; i < 256; i++) { TCHAR dst1[2], dst2[2]; char src[2]; diff --git a/od-win32/win32.c b/od-win32/win32.c index fc8028db..9b20d495 100644 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -1930,7 +1930,6 @@ static int WIN32_InitLibraries (void) pre_gui_message (L"MMTimer second initialization failed, exiting.."); return 0; } - write_log (L"ACP=%u\n", GetACP ()); pSetCurrentProcessExplicitAppUserModelID = (SETCURRENTPROCESSEXPLICITAPPUSERMODEIDD)GetProcAddress ( GetModuleHandle (L"shell32.dll"), "SetCurrentProcessExplicitAppUserModelID"); if (pSetCurrentProcessExplicitAppUserModelID) diff --git a/od-win32/win32.h b/od-win32/win32.h index d7f98983..8d94c891 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -18,9 +18,9 @@ #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 -#define WINUAEBETA L"Beta 2" -#define WINUAEDATE MAKEBD(2009, 12, 20) -#define WINUAEEXTRA L"" +#define WINUAEBETA L"Beta 3" +#define WINUAEDATE MAKEBD(2009, 12, 22) +#define WINUAEEXTRA L"RC1" #define WINUAEREV L"" #define IHF_WINDOWHIDDEN 6 diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 17a5cb5c..a6e1edec 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,7 +1,20 @@ +Beta 3: (RC1) + +- emulate OCS Denise "bug", vertical DIW already active, matches again + with horizontal start DIW=0 or 1 -> vertical DIW stops until next + frame. (Kefrens Megademo 8, Snake Bite part) +- emulate ECS Denise (and AGA) "bug fix", horizontal start DIW=0 or 1 + gets ignored. (=b2 fix -> ECS Denise/AGA only) +- ECS Denise DENISEID register returned 0x00FC, correct is 0xFFFC +- sometimes sprite was visible even if bitplane DMA should have + disabled it (older bug) + +Beta 2: + - if rom load fails, try to find matching rom file using rom scanner data by comparing file names without paths -- improved file/directory name Amiga<>unicode conversion +- improved file/directory name Amiga<>Windows conversion - hide directory filesystem file/directory names if they have characters that do not exist in Amiga charset (again, was accidentally changed in 1.6.0), they would have been inaccessible anyway diff --git a/uaeunp.c b/uaeunp.c index 704296a7..051ab0ba 100644 --- a/uaeunp.c +++ b/uaeunp.c @@ -713,7 +713,7 @@ int wmain (int argc, wchar_t *argv[], wchar_t *envp[]) _tprintf (L"Supported filesystems:\n"); _tprintf (L" OFS, FFS, SFS, SFS2 and FAT12\n"); _tprintf (L"Supported archive formats:\n"); - _tprintf (L" 7ZIP, LHA, LZX, RAR (unrar.dll), ZIP, ArchiveAccess.DLL\n"); + _tprintf (L" 7ZIP, LHA, LZX, RAR (unrar.dll), TAR, ZIP, ArchiveAccess.DLL\n"); _tprintf (L"Miscellaneous formats:\n"); _tprintf (L" RDB partition table, GZIP\n"); @@ -726,7 +726,7 @@ int wmain (int argc, wchar_t *argv[], wchar_t *envp[]) 0.8: -- tar support +- tar archive support - some fixes and improvements 0.7: diff --git a/zfile_archive.c b/zfile_archive.c index b11f92d3..cfec72df 100644 --- a/zfile_archive.c +++ b/zfile_archive.c @@ -992,16 +992,19 @@ struct zvolume *archive_directory_plain (struct zfile *z) zai.name = zfile_getfilename (z); zai.flags = -1; zfile_fseek(z, 0, SEEK_END); - zai.size = zfile_ftell(z); + zai.size = zfile_ftell (z); + zai.t = zfile_fseek(z, 0, SEEK_SET); zfile_fread(id, sizeof id, 1, z); zfile_fseek(z, 0, SEEK_SET); zn = zvolume_addfile_abs (zv, &zai); if (!memcmp (id, exeheader, sizeof id)) { - uae_u8 *data = xmalloc (1 + _tcslen (zai.name) + 1 + 2); - sprintf (data, "\"%s\"\n", zai.name); + uae_u8 *an = ua (zai.name); + uae_u8 *data = xmalloc (1 + strlen (an) + 1 + 1 + 1); + sprintf (data, "\"%s\"\n", an); zn = addfile (zv, z, L"s/startup-sequence", data, strlen (data)); xfree (data); + xfree (an); } index = 0; for (;;) {