refactoring for Wiz port; random cleanups
[libpicofe.git] / gp2x / 940ctl.c
index 7d7a400..083036e 100644 (file)
@@ -11,7 +11,8 @@
 #include <errno.h>\r
 \r
 #include "code940/940shared.h"\r
-#include "gp2x.h"\r
+#include "soc_mmsp2.h"\r
+#include "soc.h"\r
 #include "emu.h"\r
 #include "../common/mp3.h"\r
 #include "../common/arm_utils.h"\r
 #include "../../pico/sound/ym2612.h"\r
 #include "../../pico/sound/mix.h"\r
 \r
-/* we will need some gp2x internals here */\r
-extern volatile unsigned short *gp2x_memregs; /* from minimal library rlyeh */\r
-extern volatile unsigned long  *gp2x_memregl;\r
-\r
 extern int reset_timing;\r
 static unsigned char *shared_mem = 0;\r
 static _940_data_t *shared_data = 0;\r
@@ -286,8 +283,8 @@ void YM2612Init_940(int baseclock, int rate)
        printf("YM2612Init_940()\n");\r
        printf("Mem usage: shared_data: %i, shared_ctl: %i\n", sizeof(*shared_data), sizeof(*shared_ctl));\r
 \r
-       Reset940(1, 2);\r
-       Pause940(1);\r
+       reset940(1, 2);\r
+       pause940(1);\r
 \r
        gp2x_memregs[0x3B40>>1] = 0;      // disable DUALCPU interrupts for 920\r
        gp2x_memregs[0x3B42>>1] = 1;      // enable  DUALCPU interrupts for 940\r
@@ -347,8 +344,8 @@ void YM2612Init_940(int baseclock, int rate)
        gp2x_memregl[0x4510>>2] = 0xffffffff; // clear pending IRQs in INTPND\r
 \r
        /* start the 940 */\r
-       Reset940(0, 2);\r
-       Pause940(0);\r
+       reset940(0, 2);\r
+       pause940(0);\r
 \r
        // YM2612ResetChip_940(); // will be done on JOB940_YM2612INIT\r
 \r