Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > How to play music from $e000-$ffff
2007-09-08 14:12
Richard

Registered: Dec 2001
Posts: 619
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?
2007-09-08 14:27
Danzig

Registered: Jun 2002
Posts: 429
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)
2007-09-08 14:30
Richard

Registered: Dec 2001
Posts: 619
Thanks Danzig :) All works fine now.
2007-09-08 15:05
Dane
Account closed

Registered: May 2002
Posts: 421
Put it between $d000-$e000!
2007-09-08 15:09
Conrad

Registered: Nov 2006
Posts: 833
Quote: Put it between $d000-$e000!

\o/ ;)
2007-09-08 15:37
Danzig

Registered: Jun 2002
Posts: 429
@Dane: yeah, #$34 to play and put $01 to #$35 when you want to access a sid-register :D *lmfao* *rotfl*
2007-09-08 16:15
Dane
Account closed

Registered: May 2002
Posts: 421
Quote: @Dane: yeah, #$34 to play and put $01 to #$35 when you want to access a sid-register :D *lmfao* *rotfl*

*taking notes*
2007-09-08 18:04
WVL

Registered: Mar 2002
Posts: 886
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
2007-09-08 18:28
Danzig

Registered: Jun 2002
Posts: 429
@wvl: my suggestion was richard wants to do more than just play a music... or maybe not? next crypt-intro? *lol*
2007-09-09 05:11
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.

2007-09-09 08:26
Danzig

Registered: Jun 2002
Posts: 429
@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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
zscs
Scrap/Genesis Project
JEZ
Monte Carlos/Cascade
ALIEN
kbs/Pht/Lxt
Erol
Compyx/Focus
Guests online: 111
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.041 sec.