]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
MAST Fireball fix.
authorToni Wilen <twilen@winuae.net>
Mon, 21 Dec 2020 19:26:02 +0000 (21:26 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 21 Dec 2020 19:26:02 +0000 (21:26 +0200)
expansion.cpp
scsi.cpp

index 3b878352de6bf5eed7d72e8826ad2a5893572596..3ed9ce27b3140d13d77cde121d24a1cdbb6b0a4e 100644 (file)
@@ -5384,7 +5384,8 @@ const struct expansionromtype expansionroms[] = {
                _T("synthesis"), _T("Synthesis"), _T("Hardital"),
                NULL, synthesis_init, NULL, synthesis_add_scsi_unit, ROMTYPE_SYNTHESIS, 0, 0, BOARD_AUTOCONFIG_Z2, false,
                NULL, 0,
-               true, EXPANSIONTYPE_SCSI
+               true, EXPANSIONTYPE_SCSI,
+               256, 0, 0
        },
        {
                _T("vector"), _T("Vector Falcon 8000"), _T("HK-Computer"),
index d464bd3e7c73a46896c63aa5af30caa5d5574cd4..51b64fed465738564df2a9c2043784d7e81d8e5b 100644 (file)
--- a/scsi.cpp
+++ b/scsi.cpp
@@ -2131,6 +2131,7 @@ void ncr5380_bput(struct soft_scsi *scsi, int reg, uae_u8 v)
                                                scsi->dma_active = true;
                                                scsi->dma_started = true;
                                                dma_check(scsi);
+                                               scsi->dmac_address = 0xffffffff;
 #if NCR5380_DEBUG
                                                write_log(_T("DMA8490 initiator recv PC=%08x\n"), M68K_GETPC);
 #endif
@@ -4036,14 +4037,17 @@ static void ncr80_bput2(struct soft_scsi *ncr, uaecptr addr, uae_u32 val, int si
                                ncr->dmac_address = 0x00777777;
                                ncr->dmac_length = 1;
                                ncr->dmac_active = 1;
+                       } else if (ncr->dmac_length == 1) {
+                               ncr->dmac_length++;
+                               return;
                        }
-                       if (!(val & 0xc0) && val && ncr->dmac_length > 0 && ncr->dmac_length <= 8) {
-                               // nybbles, value 0 to 7
+                       if (!(val & 0xc0) && ncr->dmac_length > 1 && ncr->dmac_length <= 9 && !(addr & 2)) {
+                               // nybbles, value 0 to 6
                                for (int i = 0; i < 6; i++) {
                                        int shift = i * 4;
                                        int bm = 1 << i;
                                        if (!(val & bm)) {
-                                               uae_u8 n = (ncr->dmac_length - 1) & 0x0f;
+                                               uae_u8 n = (ncr->dmac_length - 2) & 0x0f;
                                                uae_u8 v = (ncr->dmac_address >> shift) & 0x0f;
                                                if (v > n)
                                                        v = n;
@@ -4053,7 +4057,7 @@ static void ncr80_bput2(struct soft_scsi *ncr, uaecptr addr, uae_u32 val, int si
                                }
                                ncr->dmac_length++;
                        }
-                       if (ncr->dmac_length > 8 && !(val & 0xc0) && val) {
+                       if (ncr->dmac_length > 9 && !(val & 0xc0) && !(addr & 2)) {
                                // nybbles, value 8 to 15..
                                for (int i = 0; i < 6; i++) {
                                        int bm = 1 << i;