Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mockingboard emulation should support 'inactive' function like real h/w #320

Closed
tomcw opened this issue Apr 27, 2016 · 1 comment
Closed

Comments

@tomcw
Copy link
Contributor

tomcw commented Apr 27, 2016

Bug reported by Grouik on the French Touch page, in the comments.

Btw, we can also win a few cycles by cheating a little as AppleWin does not require sending an "inactive function" to AY8910 after each operation (unlike a real Mockingboad).

For the Mockingboard’s "bug", I noticed that at the time of my first tests with one MB. I do not remember what version of AppleWin I used (I apologize in advance if it has already been corrected or if I was just a bug with my PC or others. I did not do more tests since).

So, to set a value for one of the registers, systematically we must use this sequence of instructions (one way or another):

LDA #01 ; register #
STA $C401,Y ; ORA1 (data)
LDA #$07 ; Set fct « Set PSG Reg # »
STA $C400,Y ; ORB1 (fct)
LDA #$04 ; Set fct « Inactive »
STA $C400,Y ; ORB1 (fct)

LDA #$xx ; value to set
STA $C401,Y ; ORA1 (data)
LDA #$06 ; Set fct « Write DATA »
STA $C400,Y ; ORB1 (fct)
LDA #$04 ; Set fct « Inactive »
STA $C400,Y ; ORB1 (fct)

(sorry, you already know that…)

This is the working method for real APPLE II (and AppleWin).

But with AppleWin, we can just use:

LDA #01 ; register #
STA $C401,Y ; ORA1 (data)
LDA #$07 ; Set fct « Set PSG Reg # »
STA $C400,Y ; ORB1 (fct)

LDA #$xx ; value to set
STA $C401,Y ; ORA1 (data)
LDA #$06 ; Set fct « Write DATA »
STA $C400,Y ; ORB1 (fct)

without sending the "inactive function" after each other fct.
Working with AppleWin but no sound at all with a real MB.

This is not really a problem because all programs using a Mockingboard use the right method!

tomcw added a commit that referenced this issue Oct 27, 2017
(#320)
- Extended save-state (MB/Phasor v3) to support 'Unit state'
@tomcw
Copy link
Contributor Author

tomcw commented Oct 27, 2017

Fixed in 74ac2a4.
Tests: AppleWin/AppleWin-Test@23a2cbb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant