From: Toni Wilen Date: Mon, 21 Dec 2020 19:26:02 +0000 (+0200) Subject: MAST Fireball fix. X-Git-Tag: 4900~231 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9d87476a2679276a7b10cdc10efb1652b5cc7676;p=francis%2Fwinuae.git MAST Fireball fix. --- diff --git a/expansion.cpp b/expansion.cpp index 3b878352..3ed9ce27 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -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"), diff --git a/scsi.cpp b/scsi.cpp index d464bd3e..51b64fed 100644 --- 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;