rename 940ctl_ym2612 to 940ctl

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@32 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-02-08 22:08:06 +00:00
parent abe0ea43b5
commit f80d67e12b
2 changed files with 26 additions and 21 deletions

View file

@ -309,27 +309,11 @@ static void internal_reset(void)
}
extern char **g_argv;
/* none of the functions in this file should be called before this one */
void YM2612Init_940(int baseclock, int rate)
/* this must be called after mmu hack, the allocated regions must not get cached */
void sharedmem_init(void)
{
printf("YM2612Init_940()\n");
printf("Mem usage: shared_data: %i, shared_ctl: %i\n", sizeof(*shared_data), sizeof(*shared_ctl));
if (shared_mem != NULL) return;
Reset940(1, 2);
Pause940(1);
gp2x_memregs[0x3B40>>1] = 0; // disable DUALCPU interrupts for 920
gp2x_memregs[0x3B42>>1] = 1; // enable DUALCPU interrupts for 940
gp2x_memregl[0x4504>>2] = 0; // make sure no FIQs will be generated
gp2x_memregl[0x4508>>2] = ~(1<<26); // unmask DUALCPU ints in the undocumented 940's interrupt controller
if (shared_mem == NULL)
{
shared_mem = (unsigned char *) mmap(0, 0x210000, PROT_READ|PROT_WRITE, MAP_SHARED, memdev, 0x2000000);
if(shared_mem == MAP_FAILED)
{
@ -348,6 +332,25 @@ void YM2612Init_940(int baseclock, int rate)
crashed_940 = 1;
}
extern char **g_argv;
/* none of the functions in this file should be called before this one */
void YM2612Init_940(int baseclock, int rate)
{
printf("YM2612Init_940()\n");
printf("Mem usage: shared_data: %i, shared_ctl: %i\n", sizeof(*shared_data), sizeof(*shared_ctl));
Reset940(1, 2);
Pause940(1);
gp2x_memregs[0x3B40>>1] = 0; // disable DUALCPU interrupts for 920
gp2x_memregs[0x3B42>>1] = 1; // enable DUALCPU interrupts for 940
gp2x_memregl[0x4504>>2] = 0; // make sure no FIQs will be generated
gp2x_memregl[0x4508>>2] = ~(1<<26); // unmask DUALCPU ints in the undocumented 940's interrupt controller
if (crashed_940)
{
unsigned char ucData[1024];

View file

@ -1,3 +1,5 @@
void sharedmem_init(void);
void YM2612Init_940(int baseclock, int rate);
void YM2612ResetChip_940(void);
int YM2612UpdateOne_940(int *buffer, int length, int stereo, int is_buf_empty);