NES: actually set chip type to 2A07 if PAL

fixes #72
see also #27
This commit is contained in:
tildearrow 2022-01-26 15:55:37 -05:00
parent f86838df99
commit bf19feab89
1 changed files with 3 additions and 0 deletions

View File

@ -375,9 +375,11 @@ void DivPlatformNES::setPAL(bool pal) {
if (pal) { if (pal) {
rate=1662607; rate=1662607;
freqBase=FREQ_BASE_PAL; freqBase=FREQ_BASE_PAL;
nes->apu.type=1;
} else { } else {
rate=1789773; rate=1789773;
freqBase=FREQ_BASE; freqBase=FREQ_BASE;
nes->apu.type=0;
} }
} }
@ -395,6 +397,7 @@ int DivPlatformNES::init(DivEngine* p, int channels, int sugRate, bool pal) {
isMuted[i]=false; isMuted[i]=false;
} }
nes=new struct NESAPU; nes=new struct NESAPU;
setPAL(pal);
init_nla_table(500,500); init_nla_table(500,500);
reset(); reset();