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 > BASIC Demo - using sid ??!
2007-02-27 17:06
zenda

Registered: Nov 2006
Posts: 22
BASIC Demo - using sid ??!

Hi.

I would like to use this tune in a Basic-demo, but don't know if it is/how it is possible ?? http://www.c64.org/HVSC/MUSICIANS/H/Haard_Lars/Captured.sid

and how do I "capture" it into the basiccode ??

/zenda

17 years ago I could make an asm-demo - now I can do a
10 ? "yes sir I can boogie"
20 goto 10
;-)
 
... 3 posts hidden. Click here to view all posts....
 
2007-03-01 20:03
zenda

Registered: Nov 2006
Posts: 22
Hi

thanx for the replies...

Rambones - I'll send you a d64...

/Zenda
2007-03-01 20:50
Graham
Account closed

Registered: Dec 2002
Posts: 990
@rambones: Avoid $8000-$9FFF for player, because many cartridges with BASIC extensions will crash if you combine BASIC + music then.
2007-03-01 21:22
null
Account closed

Registered: Jun 2006
Posts: 645
/me knows that all to well... but you can also just kill the cartridge after loading... works good enough

anyways, I'm curious about when it's done... =)
------------------------------------
Knoeki/DigitalSoundsSystem/SwappersWithAttitude
2007-03-02 08:43
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Hehe, graham, the music IS at 7800-8300..

Now i need to ask a question, he wants a STOP function built in. So how do i properly STOP the IRQ ?

first i did:

sei
lda $0315
sta $c000
lda $0314
sta $c001
lda #>irq
sta $0315
;setup irq and play music
...


then..:

stop:
sei
lda $c000
sta $0315
lda $c001
sta $0314
lda #0
sta $d418
cli
rts


but this dont work, as the basic then halts..

How to to it clean and proper ?
2007-03-02 08:59
Mace

Registered: May 2002
Posts: 1799
Usually, the IRQ is just $EA31, so why not just reset those values in $0314/$0315?

Also, you only set $0315 in the example above.
2007-03-02 09:01
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Got it working now.
I had installed a raster irq, and that wouldnt stop properly, now i just used plain CIA (which the music is anyway).

all ok :)
2007-03-02 09:03
JackAsser

Registered: Jun 2002
Posts:
Just redirect $0314/15 to their default values (i.e. $ea31), also stop the raster IRQs from being generated ($d01a=0). Your stop routine garbages the A-register, I dunno if that's the cause to your problems.

try:

stop:
sei
pha
lda #<$ea31
sta $0314
lda #>$ea31
sta $0315
lda #$00
sta $d418
sta $d01a
pla
cli
rts
2007-03-02 09:10
tlr

Registered: Sep 2003
Posts: 1790
Quote:
Hehe, graham, the music IS at 7800-8300..

It is now, but you could always relocate it somewhere else if that's a problem.
Always an interesting exercise! ;)

BTW, If you look in the original game, e.g Captured, it already contains an interrupt player.
It doesn't $ea31 and it doesn't allow you to reset the IRQ, but the rest is there.

Patch:
[Reset]
POKE30760,76
POKE30761,49
POKE30762,234

Start:
SYS30732

Stop:
SYS65418:POKE54296,0

Note: 65418 ($ff8a) is actually unsafe (no SEI) but will only fail if an interrupt occurs when just the MSB of the interrupt vector has been overwritten.
2007-03-02 09:54
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
No worries, got it playing, and stopping with BASIC ok.
2007-03-02 11:14
null
Account closed

Registered: Jun 2006
Posts: 645
Quote:
It is now, but you could always relocate it somewhere else if that's a problem.
Always an interesting exercise! ;)


o.O intresting, yes.... quick, no... ;)
------------------------------------
Knoeki/DigitalSoundsSystem/SwappersWithAttitude
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
psych
Peacemaker/CENSOR/Hi..
Da Snake
rexbeng
BYB/Hokuto Force
WVL/Xenon
camper
Chesser/Blazon
Rub_0201
Guests online: 131
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (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 Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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