--- np2/bios/bios.c 2004/03/19 00:30:00 1.60 +++ np2/bios/bios.c 2004/05/23 15:01:44 1.65 @@ -8,6 +8,7 @@ #include "biosmem.h" #include "sxsibios.h" #include "lio.h" +#include "vram.h" #include "fddfile.h" #include "fdd_mtr.h" #include "fdfmt.h" @@ -66,7 +67,7 @@ const IODATA *pterm; static void bios_memclear(void) { - ZeroMemory(mem + 0x400, 0xa0000 - 0x400); + ZeroMemory(mem, 0xa0000); ZeroMemory(mem + 0x100000, 0x10000); if (CPU_EXTMEM) { ZeroMemory(CPU_EXTMEM, CPU_EXTMEMSIZE); @@ -76,6 +77,9 @@ static void bios_memclear(void) { ZeroMemory(mem + VRAM0_E, 0x08000); ZeroMemory(mem + VRAM1_B, 0x18000); ZeroMemory(mem + VRAM1_E, 0x08000); +#if defined(SUPPORT_PC9821) + ZeroMemory(vramex, sizeof(vramex)); +#endif } static void bios_reinitbyswitch(void) { @@ -258,7 +262,7 @@ void bios_initialize(void) { CopyMemory(mem + 0xf538e, itfrom + pos, 0x27); } - CopyMemory(mem + 0x0fde00, keytable[0], 0x300); + CopyMemory(mem + 0x0fd800 + 0x0e00, keytable[0], 0x300); CopyMemory(mem + ITF_ADRS, itfrom, sizeof(itfrom)); mem[ITF_ADRS + 0x7ff0] = 0xea; @@ -346,6 +350,13 @@ UINT MEMCALL biosfunc(UINT32 adrs) { return(1); case BIOS_BASE + BIOSOFST_INIT: // ¥Ö¡¼¥È +#if 1 // for RanceII + bios_memclear(); +#endif + bios_vectorset(); +#if 1 + bios0x09_init(); +#endif bios_reinitbyswitch(); bios_vectorset(); bios_screeninit(); @@ -357,7 +368,7 @@ UINT MEMCALL biosfunc(UINT32 adrs) { return(1); case BIOS_BASE + BIOSOFST_09: - CPU_REMCLOCK -= 300; + CPU_REMCLOCK -= 500; bios0x09(); return(1); @@ -389,7 +400,7 @@ UINT MEMCALL biosfunc(UINT32 adrs) { case BIOS_BASE + BIOSOFST_CMT: CPU_REMCLOCK -= 200; bios0x1a_cmt(); - return(1); + return(0); // return(1); case BIOS_BASE + BIOSOFST_PRT: CPU_REMCLOCK -= 200;