--- np2/bios/bios.c 2004/03/22 05:38:47 1.61 +++ np2/bios/bios.c 2005/02/27 15:07:36 1.73 @@ -20,8 +20,6 @@ #define BIOS_SIMULATE - BOOL biosrom = FALSE; - static const char neccheck[] = "Copyright (C) 1983 by NEC Corporation"; typedef struct { @@ -58,7 +56,7 @@ const IODATA *pterm; gdc_biosreset(); p = iodata; - pterm = iodata + (sizeof(iodata) / sizeof(IODATA)); + pterm = iodata + NELEMENTS(iodata); while(p < pterm) { iocore_out8(p->port, p->data); p++; @@ -84,9 +82,9 @@ static void bios_memclear(void) { static void bios_reinitbyswitch(void) { - BYTE prxcrt; - BYTE prxdupd; - BYTE biosflag; + UINT8 prxcrt; + UINT8 prxdupd; + UINT8 biosflag; UINT8 boot; if (!(np2cfg.dipsw[2] & 0x80)) { @@ -134,7 +132,7 @@ static void bios_reinitbyswitch(void) { biosflag |= 0x40; } mem[MEMB_BIOS_FLAG1] = biosflag; - mem[MEMB_EXPMMSZ] = (BYTE)(pccore.extmem << 3); + mem[MEMB_EXPMMSZ] = (UINT8)(pccore.extmem << 3); mem[MEMB_CRT_RASTER] = 0x0f; // FDD initialize @@ -149,12 +147,14 @@ 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) - mem[MEMB_CRT_BIOS] = 0x80; + mem[MEMB_CRT_BIOS] |= 0x80; #endif #if defined(SUPPORT_PC9821) + mem[MEMB_CRT_BIOS] |= 0x04; // 05/02/03 mem[0x45c] = 0x40; #endif @@ -192,17 +192,33 @@ 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); }