Closed lgblgblgb closed 3 years ago
First ugly try.
basic BASIC :) POKEs seems to OK to make some sound using either of the four SIDs at least. Unfortunately I am not aware to have some good example to utilizing 4 SIDs to really test it out. LUMA intended to use SIDs at $D400 and $D420 but still I cannot hear difference (as before this commit there was only two SIDs emulated at $D400 and $D440, so this change should bring back the "half" of the music)
Note: it seems increasing the number of SIDs to four triggered some race-conditions between the audio callback thread of SDL and the main thread of emulation. I try to "decorate" things with spinlocks to avoid it, hitting another strange bug meanwhile, may be workarounded ...
Still unsure about LUMA does not have proper "two SID" sound. I have the suspect, that the SID emulation (I borrowed from project WebSID) has some problems. Since I modified it heavily to allow more SIDs to be emulated, but probably, some data structures are still shared, so there is an anomaly that SID instances can have effect on the others. This must be checked and fixed.
mega65-core has four SIDs implemented. Xemu/MEGA65 still has the "C65 legacy" using the dual-SID solution. So the task is to fix the situation, and having four SIDs emulated. Note, that it's unrelated that we have the MEGA65 MIXER implemented or not (ie: #272).
$D400
,$D420
on the left and$D440
,$D460
on the right