]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
CSA Magnum 40 autoboot disable jumper.
authorToni Wilen <twilen@winuae.net>
Sun, 11 Mar 2018 10:37:13 +0000 (12:37 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 11 Mar 2018 10:37:13 +0000 (12:37 +0200)
cpuboard.cpp
expansion.cpp
ncr_scsi.cpp

index c2b78cd6ec6e052c4988095b1531c3824742a755..a54fe433052a6c27fef852d38bd1e9804099360f 100644 (file)
@@ -1128,7 +1128,7 @@ static uae_u32 REGPARAM2 blizzardio_bget(uaecptr addr)
        uae_u8 v = 0;
        //write_log(_T("CS IO XBGET %08x=%02X PC=%08x\n"), addr, v & 0xff, M68K_GETPC);
        if (is_magnum40(&currprefs)) {
-               if (regs.s && (addr & 0xff0f) == 0x0c0c) {
+               if ((addr & 0xff0f) == 0x0c0c) {
                        int reg = (addr >> 4) & 7;
                        v = io_reg[reg];
                        if (reg >= 0 && reg <= 3)
@@ -1236,7 +1236,7 @@ static void REGPARAM2 blizzardio_bput(uaecptr addr, uae_u32 v)
        write_log(_T("CS IO XBPUT %08x %02x PC=%08x\n"), addr, v & 0xff, M68K_GETPC);
 #endif
        if (is_magnum40(&currprefs)) {
-               if (regs.s && (addr & 0xff0f) == 0x0c0c) {
+               if ((addr & 0xff0f) == 0x0c0c) {
                        int reg = (addr >> 4) & 7;
                        if (reg == 3 && ((v ^ io_reg[reg]) & 1)) {
                                maprom_state = v & 1;
index 26d76de863a36945c875979e1f2ddff378381480..70820e0c69985a10ae6a144d609bc3efaf9eeb2a 100644 (file)
@@ -5855,6 +5855,15 @@ static const struct cpuboardsubtype ivs_sub[] = {
        }
 };
 
+static const struct expansionboardsettings magnum40_settings[] = {
+       {
+               _T("Autoboot disable"),
+               _T("autoboot")
+       },
+       {
+               NULL
+       }
+};
 static const struct expansionboardsettings zeus040_settings[] = {
        {
                _T("Autoboot disable (A3)"),
@@ -5892,7 +5901,7 @@ static const struct cpuboardsubtype csa_sub[] = {
                128 * 1024 * 1024,
                0,
                ncr710_magnum40_autoconfig_init, NULL, BOARD_AUTOCONFIG_Z2, 1,
-               NULL, NULL
+               magnum40_settings, NULL
        },
        {
                NULL
index 3dccd651f121918966db672507bf7f28b2f4d8ae..bcb08319e78f120546757efbf0a9e2012c7447c1 100644 (file)
@@ -378,29 +378,33 @@ int pci710_dma_rw(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len, DM
        return 0;
 }
 
+static void check_timer(struct ncr_state *ncr)
+{
+       if (ncr->state[1] & 1) {
+               int v = (ncr->state[5] << 16) | (ncr->state[6] << 8) | (ncr->state[7]);
+               if (v > 0) {
+                       v -= 2304;
+                       ncr->state[5] = (v >> 16) & 0xff;
+                       ncr->state[6] = (v >> 8) & 0xff;
+                       ncr->state[7] = (v >> 0) & 0xff;
+               }
+               if (v <= 0) {
+                       ncr->state[0] |= 1;
+                       ncr->state[5] = ncr->state[2];
+                       ncr->state[6] = ncr->state[3];
+                       ncr->state[7] = ncr->state[4];
+               }
+       }
+       if (ncr->state[0] & 1) {
+               set_irq2(ncr->id, 1);
+       }
+}
+
 void ncr_vsync(void)
 {
        for (int i = 0; ncr_units[i]; i++) {
                if (ncr_units[i] == ncr_magnum40) {
-                       struct ncr_state *ncr = ncr_units[i];
-                       if (ncr->state[1] & 1) {
-                               int v = (ncr->state[5] << 16) | (ncr->state[6] << 8) | (ncr->state[7]);
-                               if (v > 0) {
-                                       v -= 2304;
-                                       ncr->state[5] = (v >> 16) & 0xff;
-                                       ncr->state[6] = (v >> 8) & 0xff;
-                                       ncr->state[7] = (v >> 0) & 0xff;
-                               }
-                               if (v <= 0) {
-                                       ncr->state[0] |= 1;
-                                       ncr->state[5] = ncr->state[2];
-                                       ncr->state[6] = ncr->state[3];
-                                       ncr->state[7] = ncr->state[4];
-                               }
-                       }
-                       if (ncr->state[0] & 1) {
-                               set_irq2(ncr->id, 1);
-                       }
+                       check_timer(ncr_magnum40);
                }
        }
 
@@ -537,7 +541,9 @@ static uae_u32 ncr_bget2 (struct ncr_state *ncr, uaecptr addr)
                switch(reg)
                {
                        case 0x0c: // jumpers (68230 port C)
-                       return 0x00;
+                       if (currprefs.cpuboard_settings & 1)
+                               v |= 0x80;
+                       return v;
                        case 0x1a: // timer ZDS
                        return ncr->state[0] & 1;
                }