| |
Richard
Registered: Dec 2001 Posts: 621 |
How to play music from $e000-$ffff
Usually to play music after $a000, i use
lda #$35
sta $01
lda #$00 ;Tune no.
jsr $a000
lda #$37
sta $01
and to play
lda #$35
sta $01
jsr $a003
lda #$37
sta $01
When I try playing music which is located at $e000-$ffff (jsr $e000 and jsr $e003) I cannot play it. The program halts. Do you know of a way to bypass this problem? |
|
| |
Danzig
Registered: Jun 2002 Posts: 440 |
usually #$36 is enuff for $a000-$bfff music.
and #$35 is enuff for $e000-$ffff music.
so, are you playing the song in an interrupt or
are you playing it outside???
then you should prevent interrupts while $01=#$35
(sei cli ;) )
see: #$35 gives access to the RAM and the interrupt
goes over the vectors (in rom) at $fffe/$ffff.
so if you set $01 to #$35 and an interrupt is triggered
it jumps over $fffe/$ffff in RAM and if you haven't
initialised these vectors with values it could be anything.
(in ROM there is $0314/$0315 for irq) |
| |
Richard
Registered: Dec 2001 Posts: 621 |
Thanks Danzig :) All works fine now. |
| |
Dane
Registered: May 2002 Posts: 423 |
Put it between $d000-$e000! |
| |
Conrad
Registered: Nov 2006 Posts: 849 |
Quote: Put it between $d000-$e000!
\o/ ;) |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
@Dane: yeah, #$34 to play and put $01 to #$35 when you want to access a sid-register :D *lmfao* *rotfl* |
| |
Dane
Registered: May 2002 Posts: 423 |
Quote: @Dane: yeah, #$34 to play and put $01 to #$35 when you want to access a sid-register :D *lmfao* *rotfl*
*taking notes* |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Probably you just need to add a SEI to the routine :)
The most simple test-player i use looks something like
SEI
LDA #$35
STA $01
LDA #$00
JSR INIT
loop:
JSR PLAY
BIT $D011
BMI *-3
BIT $D011
BPL *-3
JMP loop |
| |
Danzig
Registered: Jun 2002 Posts: 440 |
@wvl: my suggestion was richard wants to do more than just play a music... or maybe not? next crypt-intro? *lol* |
| |
Style
Registered: Jun 2004 Posts: 498 |
Why would you even have the kernel and basic ROMs switched in unless you specifically needed them?
$0314/$0315 are for homosexuals.
|
| |
Danzig
Registered: Jun 2002 Posts: 440 |
@Style: so u use them? recently some stated you eat a lot of dick ;) |
... 2 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |