Diff for /np2/pccore.c between versions 1.36 and 1.43

version 1.36, 2003/12/25 05:07:49 version 1.43, 2004/01/09 07:27:15
Line 31 Line 31
 #include        "sxsi.h"  #include        "sxsi.h"
 #include        "calendar.h"  #include        "calendar.h"
 #include        "timing.h"  #include        "timing.h"
 //#include      "hostdrv.h"  
 #include        "debugsub.h"  #include        "debugsub.h"
   #if defined(SUPPORT_HOSTDRV)
   #include        "hostdrv.h"
   #endif
   
   
         const char      np2version[] = NP2VER_CORE;          const char      np2version[] = NP2VER_CORE;
Line 51 Line 53
                                 3, {0x0c, 0x0c, 0x08, 0x06, 0x03, 0x0c}, 64, 64, 64, 64, 64,                                  3, {0x0c, 0x0c, 0x08, 0x06, 0x03, 0x0c}, 64, 64, 64, 64, 64,
                                 1, 0x82,                                  1, 0x82,
                                 0, {0x17, 0x04, 0x1f}, {0x0c, 0x0c, 0x02, 0x10, 0x3f, 0x3f},                                  0, {0x17, 0x04, 0x1f}, {0x0c, 0x0c, 0x02, 0x10, 0x3f, 0x3f},
                                 1, 80, 0,                                  1, 80, 0, 0,
                                 {"", ""}, "", ""};                                  {"", ""}, "", "", ""};
   
         PCCORE  pc = {  PCBASECLOCK25,          PCCORE  pc = {  PCBASECLOCK25,
                                         4,                                          4,
Line 185  static void sound_init(void) { Line 187  static void sound_init(void) {
                 rate = 0;                  rate = 0;
         }          }
         sound_create(rate, np2cfg.delayms);          sound_create(rate, np2cfg.delayms);
   #if defined(SUPPORT_WAVEMIX)
           wavemix_initialize(rate);
   #endif
         beep_initialize(rate);          beep_initialize(rate);
         beep_setvol(np2cfg.BEEP_VOL);          beep_setvol(np2cfg.BEEP_VOL);
         tms3631_initialize(rate);          tms3631_initialize(rate);
Line 199  static void sound_init(void) { Line 204  static void sound_init(void) {
         adpcm_setvol(np2cfg.vol_adpcm);          adpcm_setvol(np2cfg.vol_adpcm);
         pcm86gen_initialize(rate);          pcm86gen_initialize(rate);
         pcm86gen_setvol(np2cfg.vol_pcm);          pcm86gen_setvol(np2cfg.vol_pcm);
           cs4231_initialize(rate);
 }  }
   
 static void sound_term(void) {  static void sound_term(void) {
   
         soundmng_stop();          soundmng_stop();
   #if defined(SUPPORT_WAVEMIX)
           wavemix_deinitialize();
   #endif
         rhythm_deinitialize();          rhythm_deinitialize();
         sound_destroy();          sound_destroy();
 }  }
Line 232  void pccore_init(void) { Line 241  void pccore_init(void) {
         pc9861k_construct();          pc9861k_construct();
   
         iocore_create();          iocore_create();
   
   #if defined(SUPPORT_HOSTDRV)
           hostdrv_initialize();
   #endif
 }  }
   
 void pccore_term(void) {  void pccore_term(void) {
   
   #if defined(SUPPORT_HOSTDRV)
           hostdrv_deinitialize();
   #endif
   
         sound_term();          sound_term();
   
         fdd_eject(0);          fdd_eject(0);
Line 276  void pccore_reset(void) { Line 293  void pccore_reset(void) {
   
         int             i;          int             i;
   
 //      reset_hostdrv();  
   
         ZeroMemory(mem, 0x10fff0);                                                                      // ver0.28          ZeroMemory(mem, 0x10fff0);                                                                      // ver0.28
         ZeroMemory(mem + VRAM1_B, 0x18000);          ZeroMemory(mem + VRAM1_B, 0x18000);
         ZeroMemory(mem + VRAM1_E, 0x08000);          ZeroMemory(mem + VRAM1_E, 0x08000);
Line 310  void pccore_reset(void) { Line 325  void pccore_reset(void) {
         nevent_init();          nevent_init();
   
         sound_reset();          sound_reset();
   #if defined(SUPPORT_WAVEMIX)
           wavemix_bind();
   #endif
   
           if (pc.model & PCMODEL_EPSON) {                         // RAM ctrl
                   CPU_RAM_D000 = 0xffff;
           }
   
         iocore_reset();                                                         // サウンドでpicを呼ぶので…          iocore_reset();                                                         // サウンドでpicを呼ぶので…
         cbuscore_reset();          cbuscore_reset();
         fmboard_reset(np2cfg.SOUND_SW);          fmboard_reset(np2cfg.SOUND_SW);
   
           i286_memorymap((pc.model & PCMODEL_EPSON)?1:0);
         iocore_build();          iocore_build();
         iocore_bind();          iocore_bind();
         cbuscore_bind();          cbuscore_bind();
Line 347  void pccore_reset(void) { Line 370  void pccore_reset(void) {
         sysmng_cpureset();          sysmng_cpureset();
   
         soundmng_play();          soundmng_play();
   
   #if defined(SUPPORT_HOSTDRV)
           hostdrv_reset();
   #endif
 }  }
   
 static void drawscreen(void) {  static void drawscreen(void) {
Line 549  void pccore_exec(BOOL draw) { Line 576  void pccore_exec(BOOL draw) {
                 pic_irq();                  pic_irq();
                 if (CPU_RESETREQ) {                  if (CPU_RESETREQ) {
                         CPU_RESETREQ = 0;                          CPU_RESETREQ = 0;
   #if 1
                           CPU_SHUT();
   #else
                         CPU_CS = 0xf000;                          CPU_CS = 0xf000;
                         CS_BASE = 0xf0000;                          CS_BASE = 0xf0000;
                         CPU_IP = 0xfff0;                          CPU_IP = 0xfff0;
Line 556  void pccore_exec(BOOL draw) { Line 586  void pccore_exec(BOOL draw) {
                         CPU_DX = 0x0300;                          CPU_DX = 0x0300;
 #endif  #endif
                         CPU_CLEARPREFETCH();                          CPU_CLEARPREFETCH();
   #endif
                 }                  }
   
 #if 1 // ndef TRACE  #if 1 // ndef TRACE

Removed from v.1.36  
changed lines
  Added in v.1.43


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