Posted By
BSZ on 2024-12-22 16:55:24
| Re: oh no. My sample player works in yape but not on hardware
First: how do you start your program exactly with yape?
Second: from the test, write the border color register ($FF19) instead of the TED volume register ($FF11) to see if the loop works.
Also add here: I'm looking at your code and I still don't understand Initializing the sound can be good if you want to use a lot of volume levels. But then you would have to use a complex "level" -> "volume register value" table, but your code doesn't have one. By default, TED can produce 9 levels, but initialisation is unnecessary to use this. In this case, bits B7/5/4 of the value written to the volume register must be set to 1 (ORA #$B0), and bits B3/2/1/0 can be set to the level value (which is real in the range 0..8).
And an optimisation: the flag test could be the following:
LDA #$08 ; Timer #1 flag - BIT $FF09 ; Check flag BEQ - ; If not set, wait STX $FF11 ; set volume register STA $FF09 ; Clear flag
Edit: bugfix (correcting typo)
|