--- np2/bios/bios.c 2004/03/19 00:30:00 1.60 +++ np2/bios/bios.c 2004/07/22 11:31:32 1.69 @@ -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" @@ -19,8 +20,6 @@ #define BIOS_SIMULATE - BOOL biosrom = FALSE; - static const char neccheck[] = "Copyright (C) 1983 by NEC Corporation"; typedef struct { @@ -66,7 +65,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 +75,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) { @@ -145,6 +147,7 @@ static void bios_reinitbyswitch(void) { fddbios_equip(0, TRUE); mem[MEMB_BIOS_FLAG0] &= ~0x02; } + mem[MEMB_F2HD_MODE] = 0xff; mem[MEMB_F2DD_MODE] = 0xff; #if defined(SUPPORT_CRT31KHZ) @@ -188,9 +191,25 @@ static void bios_screeninit(void) { bios0x18_0a(al); } +static void setbiosseed(UINT8 *ptr, UINT size, UINT seedpos) { + + UINT8 x; + UINT8 y; + UINT i; + + x = 0; + y = 0; + for (i=0; i= 0xf9a00) && (adrs < 0x0f9a44)) { - if (!(adrs & 3)) { - CPU_REMCLOCK -= 500; - bios_lio((REG8)((adrs - 0xf9a00) >> 2)); - } - else { - if (nevent_iswork(NEVENT_GDCSLAVE)) { - CPU_IP--; - CPU_REMCLOCK = -1; - return(1); - } + if ((adrs >= 0xf9950) && (adrs <= 0x0f9990) && (!(adrs & 3))) { + CPU_REMCLOCK -= 500; + bios_lio((REG8)((adrs - 0xf9950) >> 2)); + } + else if (adrs == 0xf9994) { + if (nevent_iswork(NEVENT_GDCSLAVE)) { + CPU_IP--; + CPU_REMCLOCK = -1; + return(1); } - return(0); } return(0); }