Merge pull request #354 from cam900/n163_demultiplex

Add support of N163 demultiplexed output
This commit is contained in:
tildearrow 2022-04-11 02:38:17 -05:00 committed by GitHub
commit d2a8b028e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 2 deletions

View file

@ -607,6 +607,7 @@ void DivPlatformN163::reset() {
memset(regPool,0,128);
n163.set_disable(false);
n163.set_multiplex(multiplex);
chanMax=initChanMax;
loadWave=-1;
loadPos=0;
@ -636,8 +637,10 @@ void DivPlatformN163::setFlags(unsigned int flags) {
break;
}
initChanMax=chanMax=(flags>>4)&7;
multiplex=((flags>>7)&1)?false:true; // not accurate in real hardware
chipClock=rate;
rate/=15;
n163.set_multiplex(multiplex);
rWrite(0x7f,initChanMax<<4);
}