--- np2/bios/bios.c 2003/12/26 03:41:05 1.18 +++ np2/bios/bios.c 2004/01/05 11:46:56 1.21 @@ -14,6 +14,7 @@ #include "keytable.res" #include "itfrom.res" #include "startup.res" +#include "sxsibios.res" #define BIOS_SIMULATE @@ -134,6 +135,7 @@ void bios_init(void) { fh = file_open_rb(path); if (fh != FILEH_INVALID) { if (file_read(fh, mem + 0x0e8000, 0x18000) == 0x18000) { + TRACEOUT(("load bios.rom")); biosrom = TRUE; } file_close(fh); @@ -175,10 +177,6 @@ void bios_init(void) { mem[0xffff0] = 0xea; STOREINTELDWORD(mem + 0xffff1, 0xfd800000); - CopyMemory(mem + ITF_ADRS, itfrom, sizeof(itfrom)); - mem[ITF_ADRS + 0x7ff0] = 0xea; - STOREINTELDWORD(mem + ITF_ADRS + 0x7ff1, 0xf8000000); - if ((!biosrom) && (!(pc.model & PCMODEL_EPSON))) { CopyMemory(mem + 0xe8dd8, neccheck, 0x25); pos = LOADINTELWORD(itfrom + 2); @@ -196,6 +194,16 @@ void bios_init(void) { CopyMemory(mem + 0x0fde00, keytable[0], 0x300); bios0x09_init(); + + CopyMemory(mem + ITF_ADRS, itfrom, sizeof(itfrom)); + mem[ITF_ADRS + 0x7ff0] = 0xea; + STOREINTELDWORD(mem + ITF_ADRS + 0x7ff1, 0xf8000000); + if (pc.model & PCMODEL_EPSON) { + mem[ITF_ADRS + 0x7ff1] = 0x04; + } + else if ((pc.model & PCMODELMASK) == PCMODEL_VM) { + mem[ITF_ADRS + 0x7ff1] = 0x08; + } #else fh = file_open_c("itf.rom"); if (fh != FILEH_INVALID) { @@ -204,6 +212,10 @@ void bios_init(void) { } extmem_init(np2cfg.EXTMEM); #endif +// CopyMemory(mem + 0xd0000, sxsibios, sizeof(sxsibios)); + + CopyMemory(mem + 0x1c0000, mem + 0x1f8000, 0x08000); + CopyMemory(mem + 0x1e8000, mem + 0x0e8000, 0x10000); } static void bios_boot(void) {