a2-4am / 4cade

100s of games at your fingertips, as long as your fingertips are on an Apple ][
https://archive.org/details/TotalReplay
MIT License
153 stars 21 forks source link

SSI263 speech chip - should clear IFR int flag before attempting detection #661

Closed tomcw closed 5 hours ago

tomcw commented 8 hours ago

You already do this for the SC-01 speech chip detection, but sometimes the 6522 can power-on with IFR bits set, so you should be clearing these IFR bits first before attempting speech chip detection.

ie. after this line... https://github.com/a2-4am/4cade/blob/ac2428bd9e5a4527a2edee4e20b9fe6f7ce7f621/src/hw.mockingboard.a#L155

...you can just write $82 to $c48d (ie. re-use the value $82 that's already in Acc) - and it doesn't matter that Acc bit7=1, eg:

@mb_smc5b
         sta   $c48d                 ; interrupt flag register 6522#2

+ patch this SMC code.

peterferrie commented 5 hours ago

fixed in cd885c10f82e0f16b336607757cf40ad1c5fc402