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
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
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.
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).
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
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.
On Saturday, 12 June 2021 at 03:53:38 UTC+1, Kent Dickey wrote:
I am very interested in testing this code on my emulator KEGS, but I raninterrupt or NMI.
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
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.
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 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 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?
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
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.
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: kelvin@pro-kegs
cat Ample.zip > a.zip # this clears all xattributes
Kent Dickey wrote:
cat Ample.zip > a.zip # this clears all xattributes
In future, try using `xattr -c file` to clear all extended attributes.
In article <dog_cow-1623897467@macgui.com>,
D Finnigan <dog_cow@macgui.com> wrote:
Kent Dickey wrote:
In future, try using `xattr -c file` to clear all extended attributes.
cat Ample.zip > a.zip # this clears all xattributes >>
Using cat with output redirection is better
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.
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 beAh, 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.
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.
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
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
TomCh wrote:
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.
TomThis 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,
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.
And great to hear you have KEGS now passing all the mb-audit 0.7-beta
tests in your latest KEGS release!
Tom
In article <b0acc932-1582-4db9...@googlegroups.com>,
TomCh wrote:
And great to hear you have KEGS now passing all the mb-audit 0.7-beta
tests in your latest KEGS release!
TomI 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
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.
Let me know how it performs.
On Sunday, July 18, 2021 at 3:25:14 AM UTC+8, TomCh wrote:
Hi Tom,
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.Thanks for adding support, still said fail to detect 6522, need Ian Kim talk a bit hardware info, see photo.
Let me know how it performs.
http://optimizr.dyndns.org/share/mb-auditv08.png
Rgds,
Johnson.
On Sunday, 18 July 2021 at 15:52:10 UTC+1, johnsonlam.hk wrote:
On Sunday, July 18, 2021 at 3:25:14 AM UTC+8, TomCh wrote:
Hi Tom,
And Johnson: this version hopefully will work better with your 'SD Music Deluxe' card.Thanks for adding support, still said fail to detect 6522, need Ian Kim talk a bit hardware info, see photo.
Let me know how it performs.
http://optimizr.dyndns.org/share/mb-auditv08.png
Rgds,Thanks Johnson - it is now finding the 6522, but this time test number $14 is failing.
Johnson.
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.
FYI, the code for the failing test starts here: https://github.com/tomcw/mb-audit/blob/bb1a49e702fb01ace5de7937037a2e067899524d/chip-6522.a#L2471
Tom
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
In article <ab479dc7-1fa0-4481...@googlegroups.com>,
TomCh wrote:
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.
Tomv0.8 worked fine for me. Nice work!
Kent
On Monday, 19 July 2021 at 04:46:52 UTC+1, Kent Dickey wrote:
In article <ab479dc7-1fa0-4481...@googlegroups.com>,
TomCh wrote:
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.
Tomv0.8 worked fine for me. Nice work!
KentThanks for confirming, Kent.
Johnson, please try this v0.9 build: https://github.com/tomcw/mb-audit/releases/tag/v0.9
Tom
On Tuesday, July 20, 2021 at 4:41:58 AM UTC+8, TomCh wrote:
On Monday, 19 July 2021 at 04:46:52 UTC+1, Kent Dickey wrote:
In article <ab479dc7-1fa0-4481...@googlegroups.com>,
TomCh wrote:
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.
Tomv0.8 worked fine for me. Nice work!
KentThanks for confirming, Kent.
Johnson, please try this v0.9 build: https://github.com/tomcw/mb-audit/releases/tag/v0.9
TomHi 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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 218:37:54 |
Calls: | 6,621 |
Calls today: | 3 |
Files: | 12,171 |
Messages: | 5,317,787 |