Diff for /np2/bios/bios.c between versions 1.60 and 1.66

version 1.60, 2004/03/19 00:30:00 version 1.66, 2004/06/04 16:11:02
Line 8 Line 8
 #include        "biosmem.h"  #include        "biosmem.h"
 #include        "sxsibios.h"  #include        "sxsibios.h"
 #include        "lio.h"  #include        "lio.h"
   #include        "vram.h"
 #include        "fddfile.h"  #include        "fddfile.h"
 #include        "fdd_mtr.h"  #include        "fdd_mtr.h"
 #include        "fdfmt.h"  #include        "fdfmt.h"
Line 19 Line 20
   
 #define BIOS_SIMULATE  #define BIOS_SIMULATE
   
         BOOL    biosrom = FALSE;  
   
 static const char neccheck[] = "Copyright (C) 1983 by NEC Corporation";  static const char neccheck[] = "Copyright (C) 1983 by NEC Corporation";
   
 typedef struct {  typedef struct {
Line 66  const IODATA *pterm; Line 65  const IODATA *pterm;
   
 static void bios_memclear(void) {  static void bios_memclear(void) {
   
         ZeroMemory(mem + 0x400, 0xa0000 - 0x400);          ZeroMemory(mem, 0xa0000);
         ZeroMemory(mem + 0x100000, 0x10000);          ZeroMemory(mem + 0x100000, 0x10000);
         if (CPU_EXTMEM) {          if (CPU_EXTMEM) {
                 ZeroMemory(CPU_EXTMEM, CPU_EXTMEMSIZE);                  ZeroMemory(CPU_EXTMEM, CPU_EXTMEMSIZE);
Line 76  static void bios_memclear(void) { Line 75  static void bios_memclear(void) {
         ZeroMemory(mem + VRAM0_E, 0x08000);          ZeroMemory(mem + VRAM0_E, 0x08000);
         ZeroMemory(mem + VRAM1_B, 0x18000);          ZeroMemory(mem + VRAM1_B, 0x18000);
         ZeroMemory(mem + VRAM1_E, 0x08000);          ZeroMemory(mem + VRAM1_E, 0x08000);
   #if defined(SUPPORT_PC9821)
           ZeroMemory(vramex, sizeof(vramex));
   #endif
 }  }
   
 static void bios_reinitbyswitch(void) {  static void bios_reinitbyswitch(void) {
Line 191  static void bios_screeninit(void) { Line 193  static void bios_screeninit(void) {
   
 void bios_initialize(void) {  void bios_initialize(void) {
   
           BOOL    biosrom;
         char    path[MAX_PATH];          char    path[MAX_PATH];
         FILEH   fh;          FILEH   fh;
         UINT    i;          UINT    i;
Line 206  void bios_initialize(void) { Line 209  void bios_initialize(void) {
         }          }
         if (biosrom) {          if (biosrom) {
                 TRACEOUT(("load bios.rom"));                  TRACEOUT(("load bios.rom"));
                   pccore.rom |= PCROM_BIOS;
                 // PnP BIOSを潰す                  // PnP BIOSを潰す
                 for (i=0; i<0x10000; i+=0x10) {                  for (i=0; i<0x10000; i+=0x10) {
                         tmp = LOADINTELDWORD(mem + 0xf0000 + i);                          tmp = LOADINTELDWORD(mem + 0xf0000 + i);
Line 258  void bios_initialize(void) { Line 262  void bios_initialize(void) {
                 CopyMemory(mem + 0xf538e, itfrom + pos, 0x27);                  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));          CopyMemory(mem + ITF_ADRS, itfrom, sizeof(itfrom));
         mem[ITF_ADRS + 0x7ff0] = 0xea;          mem[ITF_ADRS + 0x7ff0] = 0xea;
Line 346  UINT MEMCALL biosfunc(UINT32 adrs) { Line 350  UINT MEMCALL biosfunc(UINT32 adrs) {
                         return(1);                          return(1);
   
                 case BIOS_BASE + BIOSOFST_INIT:         // ブート                  case BIOS_BASE + BIOSOFST_INIT:         // ブート
   #if 1           // for RanceII
                           bios_memclear();
   #endif
                           bios_vectorset();
   #if 1
                           bios0x09_init();
   #endif
                         bios_reinitbyswitch();                          bios_reinitbyswitch();
                         bios_vectorset();                          bios_vectorset();
                         bios_screeninit();                          bios_screeninit();
Line 357  UINT MEMCALL biosfunc(UINT32 adrs) { Line 368  UINT MEMCALL biosfunc(UINT32 adrs) {
                         return(1);                          return(1);
   
                 case BIOS_BASE + BIOSOFST_09:                  case BIOS_BASE + BIOSOFST_09:
                         CPU_REMCLOCK -= 300;                          CPU_REMCLOCK -= 500;
                         bios0x09();                          bios0x09();
                         return(1);                          return(1);
   
Line 389  UINT MEMCALL biosfunc(UINT32 adrs) { Line 400  UINT MEMCALL biosfunc(UINT32 adrs) {
                 case BIOS_BASE + BIOSOFST_CMT:                  case BIOS_BASE + BIOSOFST_CMT:
                         CPU_REMCLOCK -= 200;                          CPU_REMCLOCK -= 200;
                         bios0x1a_cmt();                          bios0x1a_cmt();
                         return(1);                          return(0);                                                                                      // return(1);
   
                 case BIOS_BASE + BIOSOFST_PRT:                  case BIOS_BASE + BIOSOFST_PRT:
                         CPU_REMCLOCK -= 200;                          CPU_REMCLOCK -= 200;

Removed from v.1.60  
changed lines
  Added in v.1.66


RetroPC.NET-CVS <cvs@retropc.net>