]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
ICD Trifecta boot ROM support.
authorToni Wilen <twilen@winuae.net>
Tue, 16 Jul 2019 18:18:55 +0000 (21:18 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 16 Jul 2019 18:18:55 +0000 (21:18 +0300)
expansion.cpp
idecontrollers.cpp
ncr9x_scsi.cpp
rommgr.cpp

index e09b0c8a5a049026bee734b6e559f20c4fb90899..101c07676d716d98f092bdd7918f7913890f56ca 100644 (file)
@@ -5279,9 +5279,10 @@ const struct expansionromtype expansionroms[] = {
                _T("trifecta"), _T("Trifecta"), _T("ICD"),
                NULL, trifecta_init, NULL, trifecta_add_idescsi_unit, ROMTYPE_TRIFECTA | ROMTYPE_NONE, 0, 0, BOARD_AUTOCONFIG_Z2, false,
                trifecta_sub, 0,
-               false, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE,
+               true, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_IDE,
                2071, 32, 0, false, NULL,
                true, 0, NULL,
+               { 0xd1, 0x23, 0x40, 0x00, 0x08, 0x17, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00 }
        },
        {
                _T("buddha"), _T("Buddha"), _T("Individual Computers"),
index 43e65ed1072b9e4893a635914d1de22fd87ee99f..3d7ec3e3b17c77cfbd6fdfd1fbcce3f2fc9561e1 100644 (file)
@@ -713,7 +713,7 @@ static uae_u32 ide_read_byte(struct ide_board *board, uaecptr addr)
                        if (board->irq) {
                                v &= ~1;
                        }
-                       v |= board->state2[0] &0x80;
+                       v |= board->state2[0] & 0x80;
                } else if (addr == 0xf047) {
                        v = board->state;
                } else {
@@ -747,17 +747,16 @@ static uae_u32 ide_read_byte(struct ide_board *board, uaecptr addr)
                                v = 0xff;
                }
                if (addr == 0x401) {
-                       if (board->subtype)
+                       if (board->subtype) {
                                v = (board->aci->rc->device_id ^ 7) & 7; // inverted SCSI ID
-                       else
+                       } else {
                                v = 0xff;
-               } else if (addr & 0x8000) {
+                       }
+               } else if (addr >= 0x1000) {
                        if (board->rom)
                                v = board->rom[addr & board->rom_mask];
                }
-               if (addr >= 0x400 && addr <= 0x7ff) {
-                       write_log(_T("trifecta get %08x\n"), addr);
-               }
+               //write_log(_T("trifecta get %08x %08x\n"), addr, M68K_GETPC);
 
 
        } else if (board->type == APOLLO_IDE) {
@@ -1086,7 +1085,7 @@ static uae_u32 ide_read_word(struct ide_board *board, uaecptr addr)
 
                } else if (board->type == TRIFECTA_IDE) {
 
-                       if (addr & 0x8000) {
+                       if (addr >= 0x1000) {
                                if (board->rom) {
                                        v = board->rom[addr & board->rom_mask] << 8;
                                        v |= board->rom[(addr + 1) & board->rom_mask];
@@ -2152,8 +2151,6 @@ void masoboshi_add_idescsi_unit (int ch, struct uaedev_config_info *ci, struct r
        }
 }
 
-static const uae_u8 trifecta_autoconfig[16] = { 0xc1, 0x23, 0x00, 0x00, 0x08, 0x17, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 };
-
 bool trifecta_init(struct autoconfig_info *aci)
 {
        int rom_size = 65536;
@@ -2161,7 +2158,7 @@ bool trifecta_init(struct autoconfig_info *aci)
        memset(rom, 0xff, rom_size);
 
        if (!aci->doinit) {
-               aci->autoconfigp = trifecta_autoconfig;
+               aci->autoconfigp = aci->ert->autoconfig;
                return true;
        }
 
@@ -2180,10 +2177,11 @@ bool trifecta_init(struct autoconfig_info *aci)
        ide->keepautoconfig = false;
        ide->intena = true;
 
-       load_rom_rc(aci->rc, ROMTYPE_TRIFECTA, 32768, 0, rom, 65536, LOADROM_EVENONLY_ODDONE | LOADROM_FILL);
+       if (!aci->rc->autoboot_disabled)
+               load_rom_rc(aci->rc, ROMTYPE_TRIFECTA, 32768, 0, rom, 65536, LOADROM_EVENONLY_ODDONE | LOADROM_FILL);
 
        for (int i = 0; i < 16; i++) {
-               uae_u8 b = trifecta_autoconfig[i];
+               uae_u8 b = aci->ert->autoconfig[i];
                ew(ide, i * 4, b);
        }
 
index 6b085a6800194d4260c2303a6dc8b0cfdb37bc95..0b4235952e598936405fec362038a9a14e5d755b 100644 (file)
@@ -516,13 +516,11 @@ static int masoboshi_dma_write(void *opaque, uint8_t *buf, int len)
        }
 }
 
-/* Trifecta is true DMA only to/from its onboard Fast RAM expansion */
-
 static int trifecta_dma_read(void *opaque, uint8_t *buf, int len)
 {
        struct ncr9x_state *ncr = (struct ncr9x_state*)opaque;
        if (ncr->dma_on) {
-               write_log(_T("Trifecta DMA from %08x, %d bytes\n"), ncr->dma_ptr, len);
+               //write_log(_T("Trifecta DMA from %08x, %d bytes\n"), ncr->dma_ptr, len);
                m68k_cancel_idle();
                while (len > 0) {
                        uae_u16 v = get_word(ncr->dma_ptr & ~1);
@@ -542,7 +540,7 @@ static int trifecta_dma_write(void *opaque, uint8_t *buf, int len)
 {
        struct ncr9x_state *ncr = (struct ncr9x_state*)opaque;
        if (ncr->dma_on) {
-               write_log(_T("Trifecta DMA to %08x, %d bytes\n"), ncr->dma_ptr, len);
+               //write_log(_T("Trifecta DMA to %08x, %d bytes\n"), ncr->dma_ptr, len);
                m68k_cancel_idle();
                while (len > 0) {
                        uae_u16 v;
index 5c80d3b750a4d3f311b3e9be47d63dfd0aeb6f14..9fe3f29a2c8a4365f2dc6f98564fac03c39c40b2 100644 (file)
@@ -95,7 +95,7 @@ struct romdata *getromdatabypath (const TCHAR *path)
        return NULL;
 }
 
-#define NEXT_ROM_ID 253
+#define NEXT_ROM_ID 254
 
 #define ALTROM(id,grp,num,size,flags,crc32,a,b,c,d,e) \
 { _T("X"), 0, 0, 0, 0, 0, size, id, 0, 0, flags, (grp << 16) | num, 0, NULL, crc32, a, b, c, d, e },
@@ -620,10 +620,12 @@ static struct romdata roms[] = {
        0xebe42aa6, 0xdff761c2,0x429d0d26,0x2151d831,0x12746f83,0x3b8d36f0, NULL, NULL },
        { _T("Archos Overdrive HD"), 0, 0, 0, 0, _T("ARCHOSHD\0"), 32768, 250, 0, 0, ROMTYPE_ARCHOSHD, 0, 0, NULL,
        0x30c0e3f9, 0x90014e97,0x700333a7,0x931b382f,0xe672b6e4,0x4b7b8acc, NULL, NULL },
-       { _T("Trumpcard 500AT v1.1"), 0, 0, 0, 0, _T("ARCHOSHD\0"), 32768, 251, 0, 0, ROMTYPE_IVST500AT, 0, 0, NULL,
+       { _T("Trumpcard 500AT v1.1"), 0, 0, 0, 0, _T("TRUMPCARDAT\0"), 32768, 251, 0, 0, ROMTYPE_IVST500AT, 0, 0, NULL,
        0xb6467cb8, 0xbc1cd85f,0x16011691,0x32a2a8d6, 0x2ee38666,0x520d5cf1, NULL, NULL },
-       { _T("Trumpcard 500AT v1.2"), 0, 0, 0, 0, _T("ARCHOSHD\0"), 32768, 252, 0, 0, ROMTYPE_IVST500AT, 0, 0, NULL,
+       { _T("Trumpcard 500AT v1.2"), 0, 0, 0, 0, _T("TRUMPCARDAT\0"), 32768, 252, 0, 0, ROMTYPE_IVST500AT, 0, 0, NULL,
        0x3eb87eb3, 0xff41889e,0x641114e5,0x5ec1f784,0xd79216ce,0xe9a74a40, NULL, NULL },
+       { _T("Trifecta v4.31"), 0, 0, 0, 0, _T("TRIFECTA\0"), 32768, 253, 0, 0, ROMTYPE_TRIFECTA, 0, 0, NULL,
+       0x591c3cd4, 0x681b8a67,0x3775dd0c,0x8f13b641,0x8852a51e,0xf3a29da3, NULL, NULL },
 
        { _T("CyberStorm MK I 68040"), 0, 0, 0, 0, _T("CSMKI\0"), 32768, 95, 0, 0, ROMTYPE_CB_CSMK1, 0, 0, NULL,
          0, 0, 0, 0, 0, 0, NULL, _T("cyberstormmk1_040.rom") },