tomcw / mb-audit

8 stars 1 forks source link

MEGA Audio card fails with "No Mockingboard detected!" #9

Closed tomcw closed 1 year ago

tomcw commented 3 years ago

MEGA Audio configured just for slot 4: NB. Register $E (IER) reads back with b7=0 (Also: Timer1-Latch is $0000, but the Timer1 count isn't constrained & Timer2 seems to always read as $00FF!) IMG_20210905_142225

After patching Detect6522() to ignore the check for IER.b7==1 and use Timer1 (not Timer2): Test: 10:02:00 Expected:E0 Actual:60 The test is failing, as again, register $E reads back with b7=0 IMG_20210905_195506

tomcw commented 1 year ago

I sent a pre-release v1.4A .dsk to @roughana, and he reported these failures with his MEGA Audio card:

MegaAudio-failure-11-0A-03

  1. "Warning: unknown card (no AYs)"
    • Means that the AY registers can't be read correctly.
  2. "Mockingboard failed test 6522: / Test 11:0A:03 / Expected:04 Actual:FE"
    • MegaAudio: so TIMER1 underflows to $FFFE before reloading TIMER1's latch.
      • NB. I already knew the IRQ was 1 cycle late, so this extra cycle on underflow makes sense.
    • Whereas a real 6522 only underflows to $FFFF before reloading TIMER1's latch.
tomcw commented 1 year ago

mb-audit v1.4B used with MEGA Audio (from @roughana):

MegaAudio-failure-11-0B-00

"Mockingboard failed test 6522: / Test 11:0B:00 / Expected:FF Actual:6C"

The test "T6522_B" sets TIMER1's counter (and latch) to $0000 and does a WAIT for $9301 cycles. So the only valid values for TIMER1's counter are $0000, $FFFF (and $FFFE for MegaAudio).

It looks like (for MegaAudio) setting TIMER1 counter to $0000, actually uses a counter value of $10000 (or $FFFF), and the final counter value is $6Cnn. (NB. $FFFF - $9301 = $6CFE)

tomcw commented 1 year ago

mb-audit v1.4C used with MEGA Audio (from @roughana):

MegaAudio-failure-13-F0-00

  1. "Test warning:21 14 00 55 00"
    • This shows that the AY READ doesn't work and just returns 00.
  2. "Mockingboard failed test 6522: / Test 13:F0:00 / Expected:C0 Actual:E0"
    • This shows that TIMER2 is partially working, as the T2 Interrupt Flag is correctly set ($20).
tomcw commented 1 year ago

mb-audit v1.4D now fully working with MEGA Audio (from @roughana):

Image from iOS

tomcw commented 1 year ago

MEGA Audio supported in mb-audit v1.42. Closing.