]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1400b10.zip
authorToni Wilen <twilen@winuae.net>
Wed, 28 Feb 2007 18:04:30 +0000 (20:04 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:32:00 +0000 (21:32 +0200)
cia.c
disk.c
od-win32/win32.h
od-win32/winuaechangelog.txt

diff --git a/cia.c b/cia.c
index 53361c1178eba2f1bb690012c5cfa85965195f0e..a49fac15a1d88e937cc9cef978c267971d67aae6 100755 (executable)
--- a/cia.c
+++ b/cia.c
 #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 937771a53a79976a36d2f457c28a9231e1f053a0..5390a410895dda6adff529c75571fc0e5d716fcb 100755 (executable)
--- 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();
index 5a9bd5ed642f4dac8aa4b043463582f85a8bcac7..3072ccf837a0f72fc518b4bc2322f4b03b487ee5 100755 (executable)
@@ -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)
index c7c79b9355025910301ad3d0d7345333506a80fb..929ede8be5c2bb3b418ab38b67cb0022bc3e00ea 100755 (executable)
@@ -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