notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clear binds feature
[picodrive.git]
/
platform
/
gp2x
/
940ctl.c
diff --git
a/platform/gp2x/940ctl.c
b/platform/gp2x/940ctl.c
index
083036e
..
921922c
100644
(file)
--- a/
platform/gp2x/940ctl.c
+++ b/
platform/gp2x/940ctl.c
@@
-13,7
+13,6
@@
#include "code940/940shared.h"
\r
#include "soc_mmsp2.h"
\r
#include "soc.h"
\r
#include "code940/940shared.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 "../common/menu.h"
\r
#include "../common/mp3.h"
\r
#include "../common/arm_utils.h"
\r
#include "../common/menu.h"
\r
@@
-22,7
+21,6
@@
#include "../../pico/sound/ym2612.h"
\r
#include "../../pico/sound/mix.h"
\r
\r
#include "../../pico/sound/ym2612.h"
\r
#include "../../pico/sound/mix.h"
\r
\r
-extern int reset_timing;
\r
static unsigned char *shared_mem = 0;
\r
static _940_data_t *shared_data = 0;
\r
_940_ctl_t *shared_ctl = 0;
\r
static unsigned char *shared_mem = 0;
\r
static _940_data_t *shared_data = 0;
\r
_940_ctl_t *shared_ctl = 0;
\r
@@
-243,7
+241,7
@@
static void internal_reset(void)
\r
\r
/* this must be called after mmu hack, the allocated regions must not get cached */
\r
\r
\r
/* this must be called after mmu hack, the allocated regions must not get cached */
\r
-void sharedmem_init(void)
\r
+void sharedmem
940
_init(void)
\r
{
\r
if (shared_mem != NULL) return;
\r
\r
{
\r
if (shared_mem != NULL) return;
\r
\r
@@
-266,7
+264,7
@@
void sharedmem_init(void)
}
\r
\r
\r
}
\r
\r
\r
-void sharedmem
_deinit
(void)
\r
+void sharedmem
940_finish
(void)
\r
{
\r
munmap(shared_mem, 0x210000);
\r
munmap(mp3_mem, MP3_SIZE_MAX);
\r
{
\r
munmap(shared_mem, 0x210000);
\r
munmap(mp3_mem, MP3_SIZE_MAX);
\r
@@
-297,15
+295,10
@@
void YM2612Init_940(int baseclock, int rate)
{
\r
unsigned char ucData[1024];
\r
int nRead, i, nLen = 0;
\r
{
\r
unsigned char ucData[1024];
\r
int nRead, i, nLen = 0;
\r
- char binpath[
1024
];
\r
+ char binpath[
512
];
\r
FILE *fp;
\r
\r
FILE *fp;
\r
\r
- strncpy(binpath, g_argv[0], 1023);
\r
- binpath[1023] = 0;
\r
- for (i = strlen(binpath); i > 0; i--)
\r
- if (binpath[i] == '/') { binpath[i] = 0; break; }
\r
- strcat(binpath, "/" CODE940_FILE);
\r
-
\r
+ emu_make_path(binpath, CODE940_FILE, sizeof(binpath));
\r
fp = fopen(binpath, "rb");
\r
if(!fp)
\r
{
\r
fp = fopen(binpath, "rb");
\r
if(!fp)
\r
{
\r