From: Toni Wilen Date: Wed, 28 Feb 2007 18:04:30 +0000 (+0200) Subject: imported winuaesrc1400b10.zip X-Git-Tag: 2100~241 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1fd6b9613d464fb8632ceef5e88b6f2ce6f3b4bd;p=francis%2Fwinuae.git imported winuaesrc1400b10.zip --- diff --git a/cia.c b/cia.c index 53361c11..a49fac15 100755 --- a/cia.c +++ b/cia.c @@ -33,8 +33,10 @@ #include "arcadia.h" #include "audio.h" -//#define CIA_DEBUG_R -//#define CIA_DEBUG_W +//#define CIAA_DEBUG_R +//#define CIAA_DEBUG_W +//#define CIAB_DEBUG_R +//#define CIAB_DEBUG_W //#define DONGLE_DEBUG #define TOD_HACK @@ -452,7 +454,7 @@ static uae_u8 ReadCIAA (unsigned int addr) compute_passed_time (); -#ifdef CIA_DEBUG_R +#ifdef CIAA_DEBUG_R write_log("R_CIAA: bfe%x01 %08.8X\n", addr, M68K_GETPC); #endif @@ -543,7 +545,9 @@ static uae_u8 ReadCIAA (unsigned int addr) return (uae_u8)(ciaatod >> 8); case 10: if (!ciaatlatch) { /* only if not already latched. A1200 confirmed. (TW) */ - ciaatlatch = 1; + /* no latching if ALARM is set */ + if (!(ciaacrb & 0x80)) + ciaatlatch = 1; ciaatol = ciaatod; } return (uae_u8)(ciaatol >> 16); @@ -566,7 +570,8 @@ static uae_u8 ReadCIAB (unsigned int addr) { unsigned int tmp; -#ifdef CIA_DEBUG_R +#ifdef CIAB_DEBUG_R + if (addr >= 8 && addr <= 10) write_log("R_CIAB: bfd%x00 %08.8X\n", addr, M68K_GETPC); #endif @@ -641,7 +646,9 @@ static uae_u8 ReadCIAB (unsigned int addr) return (uae_u8)(ciabtod >> 8); case 10: if (!ciabtlatch) { - ciabtlatch = 1; + /* no latching if ALARM is set */ + if (!(ciabcrb & 0x80)) + ciabtlatch = 1; ciabtol = ciabtod; } return (uae_u8)(ciabtol >> 16); @@ -660,7 +667,7 @@ static uae_u8 ReadCIAB (unsigned int addr) static void WriteCIAA (uae_u16 addr,uae_u8 val) { -#ifdef CIA_DEBUG_W +#ifdef CIAA_DEBUG_W write_log("W_CIAA: bfe%x01 %02.2X %08.8X\n", addr, val, M68K_GETPC); #endif #ifdef ACTION_REPLAY @@ -814,8 +821,9 @@ static void WriteCIAA (uae_u16 addr,uae_u8 val) static void WriteCIAB (uae_u16 addr,uae_u8 val) { -#ifdef CIA_DEBUG_W - write_log("W_CIAB: bfd%x00 %02.2X %08.8X\n", addr, val, M68K_GETPC); +#ifdef CIAB_DEBUG_W + if (addr >= 8 && addr <= 10) + write_log("W_CIAB: bfd%x00 %02.2X %08.8X\n", addr, val, M68K_GETPC); #endif #ifdef ACTION_REPLAY ar_ciab[addr & 0xf] = val; diff --git a/disk.c b/disk.c index 937771a5..5390a410 100755 --- a/disk.c +++ b/disk.c @@ -1013,12 +1013,6 @@ static int drive_empty (drive * drv) static void drive_step (drive * drv) { -#if 0 - if (drv->dskready) { - drv->dskready = 0; - drv->dskready_time = DSKREADY_TIME; - } -#endif #ifdef CATWEASEL if (drv->catweasel) { int dir = direction ? -1 : 1; @@ -2065,14 +2059,12 @@ void DISK_check_change (void) gui_unlock (); if (drv->dskready_down_time > 0) drv->dskready_down_time--; -#if 1 /* emulate drive motor turn on time */ - if (drv->dskready_time) { + if (drv->dskready_time && !drive_empty(drv)) { drv->dskready_time--; if (drv->dskready_time == 0) drv->dskready = 1; } -#endif /* delay until new disk image is inserted */ if (drv->dskchange_time) { drv->dskchange_time--; @@ -2108,15 +2100,15 @@ void DISK_select (uae_u8 data) static uae_u8 prevdata; static int step; - if (disk_debug_logging > 1) - write_log ("%08.8X %02.2X %s", M68K_GETPC, data, tobin(data)); - lastselected = selected; selected = (data >> 3) & 15; side = 1 - ((data >> 2) & 1); direction = (data >> 1) & 1; step_pulse = data & 1; + if (disk_debug_logging > 1) + write_log ("%08.8X %02.2X %s drvmask=%x", M68K_GETPC, data, tobin(data), selected ^ 15); + if ((prevdata & 0x80) != (data & 0x80)) { for (dr = 0; dr < 4; dr++) { if (floppy[dr].indexhackmode > 1 && !(selected & (1 << dr))) { @@ -2822,7 +2814,7 @@ void DSKLEN (uae_u16 v, int hpos) noselected = 1; } else { if (disk_debug_logging > 0) { - write_log ("disk %s DMA started, drv=%x track %d mfmpos %d\n", + write_log ("disk %s DMA started, drvmask=%x track %d mfmpos %d\n", dskdmaen == 3 ? "write" : "read", selected ^ 15, floppy[dr].cyl * 2 + side, floppy[dr].mfmpos); disk_dma_debugmsg(); diff --git a/od-win32/win32.h b/od-win32/win32.h index 5a9bd5ed..3072ccf8 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,9 +15,9 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEBETA 9 +#define WINUAEBETA 10 #define WINUAEPUBLICBETA 1 -#define WINUAEDATE MAKEBD(2007, 2, 27) +#define WINUAEDATE MAKEBD(2007, 2, 28) #define IHF_WINDOWHIDDEN 6 #define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU) diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index c7c79b93..929ede8b 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,14 @@ + +Beta 10: + +- in some cases dskready signal was set active even if floppy drive + was empty and motor was running +- yet another undocumented CIA TOD related feature implemented + TOD does not latch (by reading TODHI) if CRB ALARM-bit is set. + Fixes Batman the Movie (which worked in older versions only + by accident..) + Beta 9: (RC 2) - non-ASPI CDTV CD audio didn't always stop when exiting/reseting