several important bug fixes to advanced arp macro

This commit is contained in:
tildearrow 2022-08-22 19:09:08 -05:00
parent c009cb3536
commit 226f43fea3
7 changed files with 46 additions and 24 deletions

View file

@ -90,7 +90,9 @@ void DivPlatformTIA::tick(bool sysTick) {
// TODO: the way arps work on TIA is really weird
if (chan[i].std.arp.had) {
if (!chan[i].inPorta) {
if (chan[i].std.arp.val&0x40000000) {
if (chan[i].std.arp.val<0 && (!(chan[i].std.arp.val&0x40000000))) {
chan[i].baseFreq=0x80000000|(chan[i].std.arp.val|0x40000000);
} else if (chan[i].std.arp.val&0x40000000) {
chan[i].baseFreq=0x80000000|(chan[i].std.arp.val&(~0x40000000));
} else {
chan[i].baseFreq=(chan[i].note+chan[i].std.arp.val)<<8;