Discussion:
mb-audit: a Mockingboard test suite for emulators
(too old to reply)
TomCh
2021-05-09 19:05:49 UTC
Permalink
Hi,

Here's an initial release of a Mockingboard (and Phasor) test suite I've been working on recently:
https://github.com/tomcw/mb-audit

It's mainly an audit for emulation correctness, but doubles up as a set of tests for real hardware to help identify faults.

See the above link for details (and a .dsk image), but a quick overview is it tests all the sub-systems on the cards (6522/VIA, AY-3-8913 and any speech SC-01 / SSI263 chips).

It's still in beta, as I've not got a full selection of cards to test it with. So if you try it and notice any failing tests with real (working) hardware, then raise a GitHub issue or report it here.

Thanks,
Tom
Andrea Odetti
2021-06-03 09:08:03 UTC
Permalink
Post by TomCh
Hi,
https://github.com/tomcw/mb-audit
Interesting, and surprising when I run it on the linux version I got a failure.
Turns out that the issues was me running bigger batches of CPU code (16 ms vs 1 ms).

So the question I have now is:

if we know that 1ms is ok and 16ms is too long

https://github.com/AppleWin/AppleWin/blob/master/source/Windows/AppleWin.cpp#L132

when the MB is updated here https://github.com/AppleWin/AppleWin/blob/master/source/Windows/AppleWin.cpp#L217

Is there a maximum?
Is it possible that 1ms is too long as well?
Should the update really be done for each cpu instruction (like the video)?
TomCh
2021-06-06 18:01:24 UTC
Permalink
Hi Andrea,
Post by Andrea Odetti
Interesting, and surprising when I run it on the linux version I got a failure.
Turns out that the issues was me running bigger batches of CPU code (16 ms vs 1 ms).
I've spun this out to an AppleWin GitHub issue, here:
https://github.com/AppleWin/AppleWin/issues/963

Tom
johnsonlam.hk
2021-06-06 12:23:53 UTC
Permalink
Post by TomCh
Hi,
https://github.com/tomcw/mb-audit
It's mainly an audit for emulation correctness, but doubles up as a set of tests for real hardware to help identify faults.
See the above link for details (and a .dsk image), but a quick overview is it tests all the sub-systems on the cards (6522/VIA, AY-3-8913 and any speech SC-01 / SSI263 chips).
It's still in beta, as I've not got a full selection of cards to test it with. So if you try it and notice any failing tests with real (working) hardware, then raise a GitHub issue or report it here.
Thanks,
Tom
Thanks for your work, since I have the SD Music ][+ from Ian Kim that only compatible with Mockingboard, this is a good test to see how good it is, this card can play SkyFox but the tempo or sound not perfect in Music Construction Set.

Rgds,
Johnson.
TomCh
2021-06-06 17:51:21 UTC
Permalink
Hi Johnson,
Post by johnsonlam.hk
Thanks for your work, since I have the SD Music ][+ from Ian Kim that only compatible with Mockingboard, this is a good test to see how good it is, this card can play SkyFox but the tempo or sound not perfect in Music Construction Set.
So what are the results for the "SD Music ][+" card?
Also which version of mb-audit did you try? (NB. latest version is now 0.6-beta)

Thanks.
johnsonlam.hk
2021-06-14 18:02:19 UTC
Permalink
On Monday, June 7, 2021 at 1:51:22 AM UTC+8, TomCh wrote:

Hi Tom,
Post by TomCh
Post by johnsonlam.hk
Thanks for your work, since I have the SD Music ][+ from Ian Kim that only compatible with Mockingboard, this is a good test to see how good it is, this card can play SkyFox but the tempo or sound not perfect in Music Construction Set.
So what are the results for the "SD Music ][+" card?
Also which version of mb-audit did you try? (NB. latest version is now 0.6-beta)
https://photos.app.goo.gl/xDuBmYBu59ndKa3t6
johnsonlam.hk
2021-06-14 18:15:50 UTC
Permalink
On Monday, June 7, 2021 at 1:51:22 AM UTC+8, TomCh wrote:

Hi Tom,
Post by TomCh
Post by johnsonlam.hk
Thanks for your work, since I have the SD Music ][+ from Ian Kim that only compatible with Mockingboard, this is a good test to see how good it is, this card can play SkyFox but the tempo or sound not perfect in Music Construction Set.
So what are the results for the "SD Music ][+" card?
Also which version of mb-audit did you try? (NB. latest version is now 0.6-beta)
Can't attach picture here, so a link to my Google photo attached:

https://photos.app.goo.gl/Juf431CEGoVNfZBy7

Since it's OPL3 emulate AY8913, it fail is reasonable, maybe you can add this to the record later, the card is using W65C22S (PLCC).

Johnson.
johnsonlam.hk
2021-06-14 18:27:47 UTC
Permalink
On Tuesday, June 15, 2021 at 2:15:51 AM UTC+8, johnsonlam.hk wrote:

Hi Everyone,
Post by TomCh
Post by johnsonlam.hk
Thanks for your work, since I have the SD Music ][+ from Ian Kim that only compatible with Mockingboard, this is a good test to see how good it is, this card can play SkyFox but the tempo or sound not perfect in Music Construction Set.
So what are the results for the "SD Music ][+" card?
Damn, I mess up, my card is SD Music Deluxe not ][+, I mixed up with SD Disk ][+.

Johnson.
Kent Dickey
2021-06-12 02:53:32 UTC
Permalink
Post by TomCh
Hi,
Here's an initial release of a Mockingboard (and Phasor) test suite I've
https://github.com/tomcw/mb-audit
It's mainly an audit for emulation correctness, but doubles up as a set
of tests for real hardware to help identify faults.
See the above link for details (and a .dsk image), but a quick overview
is it tests all the sub-systems on the cards (6522/VIA, AY-3-8913 and
any speech SC-01 / SSI263 chips).
It's still in beta, as I've not got a full selection of cards to test it
with. So if you try it and notice any failing tests with real (working)
hardware, then raise a GitHub issue or report it here.
Thanks,
Tom
I am very interested in testing this code on my emulator KEGS, but I ran
into a problem.

I tried running the current version (mb-audit-0.6.beta),
and KEGS fails on "Test: 10:02:00" while it was testing the 6522.

I looked at the code, and this is running Check6522IRQ, with the code
setting up Timer1 with the value $0101, and then expecting an interrupt or NMI.
But the code does an SEI (line 437 of chip-6522.a) just before creating this
interrupt. In KEGS, since interrupts are masked, no interrupts are taken
and this test fails. So I think this code can only pass if the card
generates an NMI, but I don't think that's right.

Kent
TomCh
2021-06-12 10:01:31 UTC
Permalink
Post by Kent Dickey
I am very interested in testing this code on my emulator KEGS, but I ran
into a problem.
I tried running the current version (mb-audit-0.6.beta),
and KEGS fails on "Test: 10:02:00" while it was testing the 6522.
I looked at the code, and this is running Check6522IRQ, with the code
setting up Timer1 with the value $0101, and then expecting an interrupt or NMI.
But the code does an SEI (line 437 of chip-6522.a) just before creating this
interrupt. In KEGS, since interrupts are masked, no interrupts are taken
and this test fails. So I think this code can only pass if the card
generates an NMI, but I don't think that's right.
Hi Kent,

Ignore the NMI stuff - that's just to support the old Mockingboard (Speech/Sound I)... which isn't a concern for emulators at the moment.

The error code ("Test: 10:02:00") indicates that Check6522IRQ's subTest #0 is failing, and this is where it is checking the 6522's IFR (Interrupt Flag Register). So the Timer1 flag (bit6) will be set in IFR by the time it reaches line 475 (in fact it gets set during that call to WAIT). So I'd say KEGS just isn't setting IFR correctly.

The code uses SEI (set interrupt disable) to prevent the Timer1 interrupt immediately triggering and vectoring to the interrupt handler, ie. so that the code can read IFR and check that Timer1 is set. You can see that right after this (at line 478) I do a CLI/SEI sequence to allow the interrupt handler to run (which will clear Timer1 in IFR).

Tom
Kent Dickey
2021-06-13 04:18:41 UTC
Permalink
Post by Kent Dickey
Post by Kent Dickey
I am very interested in testing this code on my emulator KEGS, but I ran
into a problem.
I tried running the current version (mb-audit-0.6.beta),
and KEGS fails on "Test: 10:02:00" while it was testing the 6522.
I looked at the code, and this is running Check6522IRQ, with the code
setting up Timer1 with the value $0101, and then expecting an
interrupt or NMI.
Post by Kent Dickey
But the code does an SEI (line 437 of chip-6522.a) just before creating this
interrupt. In KEGS, since interrupts are masked, no interrupts are taken
and this test fails. So I think this code can only pass if the card
generates an NMI, but I don't think that's right.
Hi Kent,
Ignore the NMI stuff - that's just to support the old Mockingboard
(Speech/Sound I)... which isn't a concern for emulators at the moment.
The error code ("Test: 10:02:00") indicates that Check6522IRQ's subTest
#0 is failing, and this is where it is checking the 6522's IFR
(Interrupt Flag Register). So the Timer1 flag (bit6) will be set in IFR
by the time it reaches line 475 (in fact it gets set during that call to
WAIT). So I'd say KEGS just isn't setting IFR correctly.
The code uses SEI (set interrupt disable) to prevent the Timer1
interrupt immediately triggering and vectoring to the interrupt handler,
ie. so that the code can read IFR and check that Timer1 is set. You can
see that right after this (at line 478) I do a CLI/SEI sequence to allow
the interrupt handler to run (which will clear Timer1 in IFR).
Tom
You are of course correct, I was misunderstanding what the test was doing.
I'm now up to test 11:0F:00 failing, this one is slightly tricky for me to
get right (I found it simpler to have the IFR update one cycle after the
interrupt is signaled, and now I have to do this "right").

Your code is excellent documentation for the 6522--it was unclear to me what
Timer1 values cycled through in one-shot mode (now it's clear it's the same
as free-running, it releads from the latched value after counting from N to 0
to -1, and then reloading to N). But Test 11:0A:xx tests this very
nicely.

I have a suggestion for 11:0E:00: you call the monitor routine WAIT to wait
a number of cycles--and you care about the exact number of cycles elapsed
(well, really you care about cycles mod 2, so if it's off by a multiple of
2 it's fine). WAIT on a IIgs is not cycle accurate, and it might not be
on other monitor ROMs either since the WAIT description says it waits a
minimum number of microseconds. So the IIgs ROM has extra code to ensure
the CPU is running at slow speed, and this adds extra time. You would be
better off creating your own WAIT in your code so that it's consistent
regardless of the monitor code in ROM.

Kent
TomCh
2021-06-13 16:11:07 UTC
Permalink
Post by Kent Dickey
You are of course correct, I was misunderstanding what the test was doing.
I'm now up to test 11:0F:00 failing, this one is slightly tricky for me to
get right (I found it simpler to have the IFR update one cycle after the
interrupt is signaled, and now I have to do this "right").
Your code is excellent documentation for the 6522--it was unclear to me what
Timer1 values cycled through in one-shot mode (now it's clear it's the same
as free-running, it releads from the latched value after counting from N to 0
to -1, and then reloading to N). But Test 11:0A:xx tests this very
nicely.
Thanks - good to hear that it's providing some good value for you.
Post by Kent Dickey
I have a suggestion for 11:0E:00: you call the monitor routine WAIT to wait
a number of cycles--and you care about the exact number of cycles elapsed
(well, really you care about cycles mod 2, so if it's off by a multiple of
2 it's fine). WAIT on a IIgs is not cycle accurate, and it might not be
on other monitor ROMs either since the WAIT description says it waits a
minimum number of microseconds. So the IIgs ROM has extra code to ensure
the CPU is running at slow speed, and this adds extra time. You would be
better off creating your own WAIT in your code so that it's consistent
regardless of the monitor code in ROM.
Ah, I don't know much about the IIgs, so that's an important suggestion about removing the dependency on WAIT for any timing sensitive tests. I will include it in a future update.

btw, how do I test this .dsk with a IIgs emulator? (My IIgs knowledge is poor)
On Windows, I'm using MAME, eg. with this command line:
mame apple2gs -w -sl4 mockingboard -flop1 mb-audit.dsk

But when I boot mb-audit.dsk then I just get the "No Mockingboard detected!" message.
So presumably the slot ROM isn't switched in. Should the mb-audit code be explicitly switching it in for the IIgs?

Thanks,
Tom
peter....@gmail.com
2021-06-13 20:03:39 UTC
Permalink
When booting the system in MAME, hold down the right Alt key in order to enter the Control Panel.
Then select the Cards option, and for slot 4 let it cycle through to "Your Card".
Save and restart.
Kent Dickey
2021-06-14 22:25:35 UTC
Permalink
In article <18d2000d-d9cd-46dd-b4cd-***@googlegroups.com>,
TomCh <***@gmail.com> wrote:
[snip]
Post by TomCh
Post by Kent Dickey
You would be
better off creating your own WAIT in your code so that it's consistent
regardless of the monitor code in ROM.
Ah, I don't know much about the IIgs, so that's an important suggestion
about removing the dependency on WAIT for any timing sensitive tests. I
will include it in a future update.
btw, how do I test this .dsk with a IIgs emulator? (My IIgs knowledge is poor)
mame apple2gs -w -sl4 mockingboard -flop1 mb-audit.dsk
But when I boot mb-audit.dsk then I just get the "No Mockingboard detected!" message.
So presumably the slot ROM isn't switched in. Should the mb-audit code
be explicitly switching it in for the IIgs?
Thanks,
Tom
I don't know much about Mame either. I've tried running Mame on my Mac, and
I haven't gotten far. I can almost make it work as an Apple //e, but the
IIgs doesn't work well for me.

What you need to do is boot the IIgs, go to the IIgs control panel with
Ctrl-Cmd-Esc, select Control Panel, then Slots, then set slot 4 to "your
card". Then press return to save, and get out. Then (this is a IIgs
control panel "feature", that changing the slots configuration doesn't
take effect right away) do a Ctrl-Reset, and now the Mockingboard is
accessible.

In Mame, I don't know how to do reset, I don't know how to change disks, I
don't know how to get to the IIgs control panel (Ctrl-Cmd-Esc), I basically
cannot do much. What little documentation there is seems to be for the
Windows version, and that doesn't apply to the Mac version of Mame.

In Mame on the Mac, the only special keys I know of are Delete pulls up a funny
little menu and toggles between "Full emulation, UI disabled" and
"Partial emulaton, UI enabled". With UI enabled, F4 pauses the emulation
(It pops up a color bar, I have no idea what this is, but it pauses emulation
until I press F4 again). Also with UI enabled, if I press Ctrl-Cmd-Esc,
Mame immediately exits. I would appreciate it if someone who knows Mame
could assist with how to do some basic things in Mame on the Mac.

Just running Mame on the Mac requires a short script:

---
#!/bin/bash

dir=`dirname $0`
DYLD_FALLBACK_FRAMEWORK_PATH=${dir}/Frameworks ${dir}/mame64 "$@"
---

I've written KEGS, a different Apple IIgs emulator, at kegs.sourceforge.net,
the latest version is v1.05.

But: it doesn't support Windows yet. It supports Mac OS X 10.13 and later,
and pretty much any Linux. It's free and open source. KEGS used to support
Windows XP 15 years ago, but I no longer have a Windows machine.

Kent
peter....@gmail.com
2021-06-15 14:55:43 UTC
Permalink
In MAME, after pressing Delete to get "partial UI" mode, press Tab to get the full list of options.
You can change disks, and see how the keys are assigned, etc.
Kent Dickey
2021-06-15 18:00:02 UTC
Permalink
Post by ***@gmail.com
In MAME, after pressing Delete to get "partial UI" mode, press Tab to
get the full list of options.
You can change disks, and see how the keys are assigned, etc.
OK, this helps, but it says F12 is reset, and I cannot make that work--
Ctrl-F12 does not do a reset.

It also says the LALT and RALT keys are CMD and Option, and if I print out
PEEK($c061) and $c062, they are correct. But ctrl-Cmd-ESC still does not
bring up the Control panel.

Kent
Kelvin Sherlock
2021-06-16 05:36:54 UTC
Permalink
You can save yourself a lot of pain by using Ample.
https://github.com/ksherlock/ample
https://github.com/ksherlock/ample/releases

Your comments on the trials and tribulations of installing MAME
is part of the reason Ample exists.

In older versions of Mame, command-control-esc didn't work and in even
older versions, command and option are backwards. LEFT control F12 does
a reset but you may need to include a function key as well if you have a
fancy keyboard. In UI mode, esc quits. UI Mode is rarely needed with
Ample, fortunately.

-------
ProLine: ***@pro-kegs
Kent Dickey
2021-06-16 03:58:19 UTC
Permalink
Post by Kelvin Sherlock
You can save yourself a lot of pain by using Ample.
https://github.com/ksherlock/ample
https://github.com/ksherlock/ample/releases
Your comments on the trials and tribulations of installing MAME
is part of the reason Ample exists.
In older versions of Mame, command-control-esc didn't work and in even
older versions, command and option are backwards. LEFT control F12 does
a reset but you may need to include a function key as well if you have a
fancy keyboard. In UI mode, esc quits. UI Mode is rarely needed with
Ample, fortunately.
-------
Ample is a much improved interface to Mame! Well done! Now that I know
about Delete and then Tab, it seems to make Apple //e emulation basically
usable.

To make it work, I downloaded the Ample.zip release, and then cleared
quarantine with the following from a Terminal window:

cat Ample.zip > a.zip # this clears all xattributes
unzip a.zip
open Ample.app

And then I don't have to turn off any security precautions. By default,
Ample.app wouldn't run due to the app not being signed.

When Ample first starts up, it offers to automatically download ROMs from
archive.org. This is very helpful, but it fails to download many ROMs.
Mame is user hostile, so it's not really clear if any of these ROMs are
needed for Apple II (I made a README of my own for the ROMs Mame needs to
be an Apple //e, and it's quite complex). I just ignored the problems and
moved on.

But IIgs emulation is still problematic for me. I always pick ROM 01 since
that's what I know best. I have Caps Lock and Control swapped in the Mac
System Preferences->Keyboard->Modifier keys (since I like the Apple II
keyboards which have Control below tab, and I'm using a keyboard which has
Capslock there). And so I don't get a control key in Ample either. I suspect
this is a SDL problem, but I don't really know.

When I turn the swap off in Mac System Preferences, I get control and capslock
(I can do capslock and see that I get capital letters, and I can do Ctrl-X to
get the \ and cancel the input line). But I still cannot do Ctrl-Cmd-Esc to
get to the Control Panel (I tried all combinations of both control keys, all
of my Alt/Command keys). And Ctrl-F12 does not reset. But: I just quit out
and started Ample again--and now Ctrl-F12 and Ctrl-Cmd-Esc are working fine.
Hmmm. I still cannot have Ctrl and Capslock swapped in System Preferences,
though.

The default setting of Full Screen caught me unawares, I just hit "launch" to
see what Ample was like. I eventually quit out with some combination of every
modifier key and Cmd-Q. If the normal ways of leaving full screen are not
available (which is moving the mouse around the top of the screen, and
selecting the minimize button, or pressing ESC (which of course won't work)),
I suggest a short warning of how to exit full screen before entering it for
the first time. I've now seen the docs that say Option-Return toggles full
screen. This works, but when I leave full screen this way, the mouse cursor
remains hidden, which makes it tough to do things like resize the window.

I was also unable to get a Mockingboard in slot 4 to work in IIgs mode.
Mockingboard works fine on Apple //e, etc. To work on a IIgs, you need the
card in slot 4, and to change the IIgs Control Panel->Slots->4 to Your Card,
and then do a reset (since the IIgs firmware doesn't change the actual slot
settings until after a reset). This doesn't seem to work in Ample/Mame.

Kent
D Finnigan
2021-06-17 02:37:48 UTC
Permalink
Post by Kent Dickey
cat Ample.zip > a.zip # this clears all xattributes
In future, try using `xattr -c file` to clear all extended attributes.
Kent Dickey
2021-06-17 05:04:38 UTC
Permalink
Post by D Finnigan
Post by Kent Dickey
cat Ample.zip > a.zip # this clears all xattributes
In future, try using `xattr -c file` to clear all extended attributes.
Using cat with output redirection is better since it also eliminates any
resource forks, Finder Info, etc. It also is much more difficult for Apple to
"break" in the future, say by adding additional hidden file attributes that
xattr doesn't know about, or if Apple modified xattr to no longer clear
quarantine. I don't want to say it's impossible for Apple to preserve
quarantine through "cat file > newfile" in the future, but it's
substantially more complex.

Kent
D Finnigan
2021-06-17 13:30:28 UTC
Permalink
Post by Kent Dickey
Post by D Finnigan
Post by Kent Dickey
cat Ample.zip > a.zip # this clears all xattributes
In future, try using `xattr -c file` to clear all extended attributes.
Using cat with output redirection is better
Whatever floats your boat.
Kelvin Sherlock
2021-06-20 22:43:30 UTC
Permalink
I did some poking and it turns out that when you remap caps-lock to
control, MacOS generates a RIGHT control keycode. (this is unique
to control; option and command generate LEFT keycodes). For the IIgs
(and many other emulators), MAME only has the left control wired up.
For now, you could delete -> tab -> input and remap the control key
to work with RCONTROL.

The next Ample update might have both control keys wired up by default.

-------
ProLine: ***@pro-kegs
TomCh
2021-06-26 12:02:18 UTC
Permalink
Post by TomCh
Post by Kent Dickey
You are of course correct, I was misunderstanding what the test was doing.
I'm now up to test 11:0F:00 failing, this one is slightly tricky for me to
get right (I found it simpler to have the IFR update one cycle after the
interrupt is signaled, and now I have to do this "right").
Your code is excellent documentation for the 6522--it was unclear to me what
Timer1 values cycled through in one-shot mode (now it's clear it's the same
as free-running, it releads from the latched value after counting from N to 0
to -1, and then reloading to N). But Test 11:0A:xx tests this very
nicely.
Thanks - good to hear that it's providing some good value for you.
Post by Kent Dickey
I have a suggestion for 11:0E:00: you call the monitor routine WAIT to wait
a number of cycles--and you care about the exact number of cycles elapsed
(well, really you care about cycles mod 2, so if it's off by a multiple of
2 it's fine). WAIT on a IIgs is not cycle accurate, and it might not be
on other monitor ROMs either since the WAIT description says it waits a
minimum number of microseconds. So the IIgs ROM has extra code to ensure
the CPU is running at slow speed, and this adds extra time. You would be
better off creating your own WAIT in your code so that it's consistent
regardless of the monitor code in ROM.
Ah, I don't know much about the IIgs, so that's an important suggestion about removing the dependency on WAIT for any timing sensitive tests. I will include it in a future update.
btw, how do I test this .dsk with a IIgs emulator? (My IIgs knowledge is poor)
mame apple2gs -w -sl4 mockingboard -flop1 mb-audit.dsk
But when I boot mb-audit.dsk then I just get the "No Mockingboard detected!" message.
So presumably the slot ROM isn't switched in. Should the mb-audit code be explicitly switching it in for the IIgs?
Thanks,
Tom
OK, thanks Pete & Kent - I've now got mb-audit.dsk at least detecting a Mockingboard under MAME:
ie, from Control Panel, set:
- System Speed=Normal
- Slot-4=Your card

And Kent, I built a new v0.7-beta here: https://github.com/tomcw/mb-audit/releases/tag/v0.7-beta
This fixes a IIgs interrupt/user-land race condition (in 6522 test 1) and also uses a local copy of WAIT, as you suggested.

Tom
Kent Dickey
2021-06-26 14:44:54 UTC
Permalink
Post by TomCh
OK, thanks Pete & Kent - I've now got mb-audit.dsk at least detecting a
- System Speed=Normal
- Slot-4=Your card
https://github.com/tomcw/mb-audit/releases/tag/v0.7-beta
This fixes a IIgs interrupt/user-land race condition (in 6522 test 1)
and also uses a local copy of WAIT, as you suggested.
Tom
This is great! I can get this to pass on KEGS when running as a IIgs using
the settings you listed (Speed=Normal, Slot 4=Your Card), even with Reset.
Nice work.

However, I have two more requests, both low priority: Can you change T6522_1
so that it doesn't hang if the interrupt doesn't arrive? Just put in a
timeout of some sort?

And second, can you change the T6522_1 Timer1 value from $0303 to $0404?
I like to run KEGS in a special forced 1MHz mode when running Apple II
programs, where it ignores the SPEEDREG and always runs at 1MHz and never
2.8MHz. And when I do that with mb-audit v0.7-beta, then T6522_1
hangs since I'm slowing down the ROM interrupt handler (which manipulates the
speed register and so would normally run at 2.8MHz) and so the interrupt
occurs before the T6522_1 code wants it to, and mb-audit hangs.

Kent
johnsonlam.hk
2021-06-27 05:20:37 UTC
Permalink
Hi,

Probably Tom did not have time to deal with non-standard Mockingboard compatible card, but whatever I tested with "mb-audit 0.7beta":

https://photos.app.goo.gl/Yye9m5Q4CkXoUhPT6

Rgds,
Johnson.
TomCh
2021-06-27 08:44:31 UTC
Permalink
Post by johnsonlam.hk
Hi,
https://photos.app.goo.gl/Yye9m5Q4CkXoUhPT6
Rgds,
Johnson.
Hi Johnson,

Thanks for sharing screenshots about this compatibility issue.
I've created a new issue (here: https://github.com/tomcw/mb-audit/issues/5) to track this.
I will attempt to add support in an updated release.

Tom
TomCh
2021-06-27 08:54:32 UTC
Permalink
Post by TomCh
OK, thanks Pete & Kent - I've now got mb-audit.dsk at least detecting a
- System Speed=Normal
- Slot-4=Your card
https://github.com/tomcw/mb-audit/releases/tag/v0.7-beta
This fixes a IIgs interrupt/user-land race condition (in 6522 test 1)
and also uses a local copy of WAIT, as you suggested.
Tom
This is great! I can get this to pass on KEGS when running as a IIgs using
the settings you listed (Speed=Normal, Slot 4=Your Card), even with Reset.
Nice work.
However, I have two more requests, both low priority: Can you change T6522_1
so that it doesn't hang if the interrupt doesn't arrive? Just put in a
timeout of some sort?
And second, can you change the T6522_1 Timer1 value from $0303 to $0404?
I like to run KEGS in a special forced 1MHz mode when running Apple II
programs, where it ignores the SPEEDREG and always runs at 1MHz and never
2.8MHz. And when I do that with mb-audit v0.7-beta, then T6522_1
hangs since I'm slowing down the ROM interrupt handler (which manipulates the
speed register and so would normally run at 2.8MHz) and so the interrupt
occurs before the T6522_1 code wants it to, and mb-audit hangs.
Kent
Hi Kent,

Both of those requests are fine, so I've created a new issue to track them. I'll post back here when I make a new release.

And great to hear you have KEGS now passing all the mb-audit 0.7-beta tests in your latest KEGS release!

Tom
Kent Dickey
2021-06-27 13:13:23 UTC
Permalink
Post by TomCh
And great to hear you have KEGS now passing all the mb-audit 0.7-beta
tests in your latest KEGS release!
Tom
I just wanted to say again what great work mb-audit is. By doing detailed
tests on actual hardware, and then getting emulators to match, is the best
way to ensure emulators are doing the right thing. It's tedious work, and
I wanted to say how much I appreciate it. And then, most importantly,
release it so others can use it.

The 6522 documentation is good, but it's not great, so mb-audit answers so
many questions I had.

Kent
TomCh
2021-07-17 19:25:13 UTC
Permalink
Post by TomCh
And great to hear you have KEGS now passing all the mb-audit 0.7-beta
tests in your latest KEGS release!
Tom
I just wanted to say again what great work mb-audit is. By doing detailed
tests on actual hardware, and then getting emulators to match, is the best
way to ensure emulators are doing the right thing. It's tedious work, and
I wanted to say how much I appreciate it. And then, most importantly,
release it so others can use it.
The 6522 documentation is good, but it's not great, so mb-audit answers so
many questions I had.
Kent
Hi Kent,

Thanks for your appreciative comments!
Here is v0.8 which includes updates for your two requests for 6522 test-1 (ie. to add a timeout and use a longer Timer1 period of $404):
https://github.com/tomcw/mb-audit/releases/tag/v0.8

And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.
Let me know how it performs.

Tom
johnsonlam.hk
2021-07-18 14:52:09 UTC
Permalink
On Sunday, July 18, 2021 at 3:25:14 AM UTC+8, TomCh wrote:
Hi Tom,
Post by TomCh
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.
Let me know how it performs.
Thanks for adding support, still said fail to detect 6522, need Ian Kim talk a bit hardware info, see photo.

Loading Image...

Rgds,
Johnson.
TomCh
2021-07-18 21:07:30 UTC
Permalink
Post by johnsonlam.hk
Hi Tom,
Post by TomCh
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.
Let me know how it performs.
Thanks for adding support, still said fail to detect 6522, need Ian Kim talk a bit hardware info, see photo.
http://optimizr.dyndns.org/share/mb-auditv08.png
Rgds,
Johnson.
Thanks Johnson - it is now finding the 6522, but this time test number $14 is failing.
From my code it looks like there's a timeout in waiting for all 4 interrupts to trigger (ie. 2 interrupts from 6522-A and 2 from 6522-B). But on my real hardware (Mockingboard C and Phasor cards) both pass this test OK.
Above (14th June) you said "the card is using W65C22S (PLCC)", so potentially this real 6522 differs slightly to my real cards' 6522s? Except I built my MB-C card with two W65C22S (DIP-40) and added the extra hardware modification to make the IRQs work.
So maybe talk to Ian Kim and see what he says.
https://github.com/tomcw/mb-audit/blob/bb1a49e702fb01ace5de7937037a2e067899524d/chip-6522.a#L2471
Tom
Ah, ignore me! Your card only has one 6522 (not two) - this test assumes the card has 2x 6522's.
So I need to update the test to also support the single-6522 case.

Tom
Kent Dickey
2021-07-19 03:46:46 UTC
Permalink
Post by TomCh
Hi Kent,
Thanks for your appreciative comments!
Here is v0.8 which includes updates for your two requests for 6522
https://github.com/tomcw/mb-audit/releases/tag/v0.8
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.
Let me know how it performs.
Tom
v0.8 worked fine for me. Nice work!

Kent
TomCh
2021-07-19 20:41:57 UTC
Permalink
Post by TomCh
Hi Kent,
Thanks for your appreciative comments!
Here is v0.8 which includes updates for your two requests for 6522
https://github.com/tomcw/mb-audit/releases/tag/v0.8
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.
Let me know how it performs.
Tom
v0.8 worked fine for me. Nice work!
Kent
Thanks for confirming, Kent.

Johnson, please try this v0.9 build:
https://github.com/tomcw/mb-audit/releases/tag/v0.9

Tom
johnsonlam.hk
2021-07-21 09:13:41 UTC
Permalink
Post by TomCh
Post by TomCh
Hi Kent,
Thanks for your appreciative comments!
Here is v0.8 which includes updates for your two requests for 6522
https://github.com/tomcw/mb-audit/releases/tag/v0.8
And Johnson: this version hopefully will work better with your 'SD Music
Deluxe' card.
Let me know how it performs.
Tom
v0.8 worked fine for me. Nice work!
Kent
Thanks for confirming, Kent.
https://github.com/tomcw/mb-audit/releases/tag/v0.9
Tom
Hi Tom,

Seems the program can make a tone and got the info. correctly, thanks a lot.

Loading Image...

Rgds,
Johnson.
TomCh
2021-07-22 21:52:06 UTC
Permalink
Post by johnsonlam.hk
Post by TomCh
Post by TomCh
Hi Kent,
Thanks for your appreciative comments!
Here is v0.8 which includes updates for your two requests for 6522
https://github.com/tomcw/mb-audit/releases/tag/v0.8
And Johnson: this version hopefully will work better with your 'SD Music
Deluxe' card.
Let me know how it performs.
Tom
v0.8 worked fine for me. Nice work!
Kent
Thanks for confirming, Kent.
https://github.com/tomcw/mb-audit/releases/tag/v0.9
Tom
Hi Tom,
Seems the program can make a tone and got the info. correctly, thanks a lot.
http://optimizr.dyndns.org/share/mb-auditv09.png
Rgds,
Johnson.
Thanks Johnson - good to get these tests working with your card.

Tom

Loading...