diff --git a/src/ibm.h b/src/ibm.h index 53d2338..71d4265 100644 --- a/src/ibm.h +++ b/src/ibm.h @@ -453,6 +453,7 @@ enum ROM_COMPAQ_PII, ROM_ELX_PC425X, ROM_PB570, + ROM_ZAPPA, ROM_MAX }; diff --git a/src/intel.c b/src/intel.c index a7194f3..21e91b1 100644 --- a/src/intel.c +++ b/src/intel.c @@ -106,3 +106,19 @@ void intel_endeavor_init() { io_sethandler(0x0079, 0x0001, endeavor_brdconfig, NULL, NULL, NULL, NULL, NULL, NULL); } + +static uint8_t zappa_brdconfig(uint16_t port, void *p) +{ +// pclog("zappa_brdconfig read port=%04x\n", port); + switch (port) + { + case 0x79: + return 0xff; + } + return 0; +} + +void intel_zappa_init() +{ + io_sethandler(0x0079, 0x0001, zappa_brdconfig, NULL, NULL, NULL, NULL, NULL, NULL); +} diff --git a/src/intel.h b/src/intel.h index eccd668..4e14ddc 100644 --- a/src/intel.h +++ b/src/intel.h @@ -1,2 +1,3 @@ void intel_batman_init(); void intel_endeavor_init(); +void intel_zappa_init(); diff --git a/src/intel_flash.c b/src/intel_flash.c index 2aa6a45..bf169a4 100644 --- a/src/intel_flash.c +++ b/src/intel_flash.c @@ -170,6 +170,9 @@ void *intel_flash_init(uint8_t type) case ROM_PB570: strcpy(flash_path, "pb570/"); break; + case ROM_ZAPPA: + strcpy(flash_path, "zappa/"); + break; case ROM_430VX: strcpy(flash_path, "430vx/"); break; diff --git a/src/mem.c b/src/mem.c index 0c39836..d7cb896 100644 --- a/src/mem.c +++ b/src/mem.c @@ -861,6 +861,20 @@ int loadbios() fclose(f); biosmask = 0x1ffff; return 1; + + case ROM_ZAPPA: + f = romfopen("zappa/1006bs0_.bio", "rb"); + if (!f) break; + fseek(f, 0x80, SEEK_SET); + fread(rom + 0x10000, 0x10000, 1, f); + fclose(f); + f = romfopen("zappa/1006bs0_.bi1", "rb"); + if (!f) break; + fseek(f, 0x80, SEEK_SET); + fread(rom, 0xd000, 1, f); + fclose(f); + biosmask = 0x1ffff; + return 1; } printf("Failed to load ROM!\n"); if (f) fclose(f); diff --git a/src/model.c b/src/model.c index 4cdc03f..030b554 100644 --- a/src/model.c +++ b/src/model.c @@ -98,6 +98,7 @@ void at_t3100e_init(); void xt_t1000_init(); void xt_t1200_init(); void at_sl82c460_init(); +void at_zappa_init(); int model; int AMSTRAD, AT, PCI, TANDY; @@ -171,6 +172,7 @@ MODEL models[] = {"[Socket 4] Intel Premiere/PCI", ROM_REVENGE, "revenge", { {"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_batman_init, NULL}, {"[Socket 5] Intel Advanced/EV", ROM_ENDEAVOR, "endeavor", { {"Intel", cpus_PentiumS5}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_endeavor_init, NULL}, + {"[Socket 5] Intel Advanced/ZP", ROM_ZAPPA, "zappa", { {"Intel", cpus_PentiumS5}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_zappa_init, NULL}, {"[Socket 5] Packard Bell PB570", ROM_PB570, "pb570", { {"Intel", cpus_PentiumS5}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 1, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 128, 1, at_endeavor_init, NULL}, {"[Socket 7] Award 430VX PCI", ROM_430VX, "430vx", { {"Intel", cpus_Pentium}, {"IDT", cpus_WinChip}, {"Cyrix", cpus_6x86}}, 0, MODEL_AT|MODEL_PCI|MODEL_PS2|MODEL_HAS_IDE, 1, 256, 1, at_i430vx_init, NULL}, @@ -550,6 +552,20 @@ void at_endeavor_init() intel_endeavor_init(); device_add(&intel_flash_bxt_ami_device); } +void at_zappa_init() +{ + at_init(); + pci_init(PCI_CONFIG_TYPE_1); + pci_slot(0xd); + pci_slot(0xe); + pci_slot(0xf); + pci_slot(0x10); + i430fx_init(); + piix_init(7, 0xd, 0xe, 0xf, 0x10); + pc87306_init(0x2e); + intel_zappa_init(); + device_add(&intel_flash_bxt_ami_device); +} void at_i430vx_init() { diff --git a/src/nvr.c b/src/nvr.c index e462f11..02096e7 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -299,7 +299,8 @@ void loadnvr() return; case ROM_ELX_PC425X: f = nvrfopen("elx_pc425.nvr", "rb"); nvrmask = 127; break; case ROM_PB570: f = nvrfopen("pb570.nvr", "rb"); nvrmask = 127; break; - + case ROM_ZAPPA: f = nvrfopen("zappa.nvr", "rb"); nvrmask = 127; break; + default: return; } if (!f) @@ -383,6 +384,7 @@ void savenvr() return; case ROM_ELX_PC425X: f = nvrfopen("elx_pc425.nvr", "wb"); break; case ROM_PB570: f = nvrfopen("pb570.nvr", "wb"); break; + case ROM_ZAPPA: f = nvrfopen("zappa.nvr", "wb"); break; default: return; }