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: 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?
2007-09-08 14:27
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)
2007-09-08 14:30
Richard

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

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

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

\o/ ;)
2007-09-08 15:37
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*
2007-09-08 16:15
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*
2007-09-08 18:04
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
2007-09-08 18:28
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*
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: 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
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
MaD ][/Starship
acrouzet/G★P
LordCrass
Raf/Vulture Design
Knut Clausen/SHAPE/F..
Sokrates
Urban Space Cowboy
E$G/HF ⭐ 7
tlr
Guests online: 107
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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