mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
audio, improve YM2413 handling
This commit is contained in:
parent
47548249a0
commit
81d54be15d
1 changed files with 29 additions and 29 deletions
|
@ -108,6 +108,7 @@ static unsigned char z80_sms_in(unsigned short a)
|
|||
|
||||
elprintf(EL_IO, "z80 port %04x read", a);
|
||||
if((a&0xff)>= 0xf0){
|
||||
if (PicoIn.opt & POPT_EN_YM2413){
|
||||
switch((a&0xff))
|
||||
{
|
||||
case 0xf0:
|
||||
|
@ -118,13 +119,12 @@ static unsigned char z80_sms_in(unsigned short a)
|
|||
break;
|
||||
case 0xf2:
|
||||
// bit 0 = 1 active FM Pac
|
||||
if (PicoIn.opt & POPT_EN_YM2413){
|
||||
d = ymflag;
|
||||
//printf("read FM Check = %02x\n", d);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
a &= 0xc1;
|
||||
switch (a)
|
||||
|
@ -171,6 +171,7 @@ static void z80_sms_out(unsigned short a, unsigned char d)
|
|||
elprintf(EL_IO, "z80 port %04x write %02x", a, d);
|
||||
|
||||
if((a&0xff)>= 0xf0){
|
||||
if (PicoIn.opt & POPT_EN_YM2413){
|
||||
switch((a&0xff))
|
||||
{
|
||||
case 0xf0:
|
||||
|
@ -185,13 +186,12 @@ static void z80_sms_out(unsigned short a, unsigned char d)
|
|||
break;
|
||||
case 0xf2:
|
||||
// bit 0 = 1 active FM Pac
|
||||
if (PicoIn.opt & POPT_EN_YM2413){
|
||||
ymflag = d;
|
||||
//printf("write FM Check = %02x\n", d);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
a &= 0xc1;
|
||||
switch (a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue