X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fsound%2Fym2612.c;h=efe5054e9e8d3acc46c33485097838cb9092f5ab;hb=9a04536c0898f9cfe0a3a1cff739fdfd32a3d2cc;hp=a619c45f84df7c6eb7e1b2a02900e8d0d613a452;hpb=eaa9417a9b52389534f0dcbae6263781ea809ab2;p=picodrive.git diff --git a/Pico/sound/ym2612.c b/Pico/sound/ym2612.c index a619c45..efe5054 100644 --- a/Pico/sound/ym2612.c +++ b/Pico/sound/ym2612.c @@ -1668,6 +1668,8 @@ void YM2612Init_(int clock, int rate) ym2612.OPN.ST.clock = clock; ym2612.OPN.ST.rate = rate; + OPNSetPres( 6*24 ); + /* Extend handler */ YM2612ResetChip_(); } @@ -1680,7 +1682,6 @@ void YM2612ResetChip_(void) memset(ym2612.REGS, 0, sizeof(ym2612.REGS)); - OPNSetPres( 6*24 ); set_timers( 0x30 ); /* mode 0 , timer reset */ ym2612.REGS[0x27] = 0x30; @@ -1779,11 +1780,11 @@ int YM2612Write_(unsigned int a, unsigned int v) } ret=0; break; +#endif case 0x27: /* mode, timer control */ set_timers( v ); ret=0; break; -#endif case 0x28: /* key on / off */ { UINT8 c; @@ -1797,7 +1798,6 @@ int YM2612Write_(unsigned int a, unsigned int v) if(v&0x80) FM_KEYON(c,SLOT4); else FM_KEYOFF(c,SLOT4); break; } -#if 0 case 0x2a: /* DAC data (YM2612) */ ym2612.dacout = ((int)v - 0x80) << 6; /* level unknown (notaz: 8 seems to be too much) */ ret=0; @@ -1807,7 +1807,6 @@ int YM2612Write_(unsigned int a, unsigned int v) ym2612.dacen = v & 0x80; ret=0; break; -#endif default: break; } @@ -1835,12 +1834,7 @@ int YM2612Write_(unsigned int a, unsigned int v) ret = OPNWriteReg(addr, v); break; } -/* - if(ret) { - extern int Scanline; - dprintf("ymw [%i]", Scanline); - } -*/ + return ret; } @@ -1904,13 +1898,14 @@ typedef struct UINT16 unused2; UINT32 keyon_field; // 20 UINT32 kcode_fc_sl3_3; + UINT32 reserved[2]; } ym_save_addon; typedef struct { UINT16 block_fnum[6]; UINT16 block_fnum_sl3[3]; - UINT16 unused; + UINT16 reserved[7]; } ym_save_addon2; @@ -2054,10 +2049,8 @@ int YM2612PicoStateLoad2(int *tat, int *tbt) return 0; } -#ifndef EXTERNAL_YM2612 void *YM2612GetRegs(void) { return ym2612.REGS; } -#endif