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 > Kick Assembler & SID Player
2010-03-25 17:01
breeze
Account closed

Registered: Mar 2009
Posts: 20
Kick Assembler & SID Player

In previous work I used the built-in sid-player Kick Assembler and the SID wa play correctly. At least in the rumor was is not noticeable.

Working on new intro, I was encountered a problem with play the SID module. The module has play incorrect sounds with some distortions.

I tried to create an executable PRG-file using PSID64 and found that the sound is clear and correct.

So I formed the opinion that the embedded player in the Kick Assembler is slightly incorrect.

Maybe I am wrong and I do something wrong. But you can show me an example of another SID-player, and that I could test and solve own problem. Maybe somehow i can use the player from PSID64?

p.s. Many thanks in advance. Because of this trouble, we must postpone the our new release.
2010-03-25 17:31
Burglar

Registered: Dec 2004
Posts: 1101
I think you're using zeropage addresses the music player uses as well. change your zps and check again
2010-03-25 17:38
breeze
Account closed

Registered: Mar 2009
Posts: 20
Quote: I think you're using zeropage addresses the music player uses as well. change your zps and check again

I am a little not quite understand what I need to do. Here is an example of code that is used in Kick Assembler:

.var music = LoadSid("Nightshift.sid")
:BasicUpstart2(start)
start:
lda #$00
sta $d020
sta $d021
ldx #0
ldy #0
lda #music.startSong-1
jsr music.init	
sei
lda #<irq1
sta $0314
lda #>irq1
sta $0315
asl $d019
lda #$7b
sta $dc0d
lda #$81
sta $d01a
lda #$1b
sta $d011
lda #$80
sta $d012
cli
this:	jmp this

irq1:  	
asl $d019
inc $d020
jsr music.play 
dec $d020
pla
tay
pla
tax
pla
rti

.pc=music.location "Music"
.fill music.size, music.getData(i)
2010-03-25 17:42
Skate

Registered: Jul 2003
Posts: 494
nothing seems to be wrong with that piece of code. where is the music located? $1000?
2010-03-25 17:50
Slammer

Registered: Feb 2004
Posts: 416
A couple of suggestions:

* Which sid module are you using? If you are trying to play a multispeed sid, then it wont work.
* When you run the music in an emulator, the sound might not be simulating the sid chip correctly (try a different one, or a c64).
* Have you tried swithing between the old and the new sid-chip in the emulator?
2010-03-25 17:57
breeze
Account closed

Registered: Mar 2009
Posts: 20
Sorry, I did not notice how over time the allotted for the interrupt is over. While I was writing an example, I decided to call at interupt only the music and the problem disappeared.

There is a lack of programming experience under C64. Sorry >_<
2010-03-25 21:16
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
your irq ends with pla tay pla tax etc...
but it dont start with pha txa pha...
so it is fuxxoring the regs
2010-03-25 21:30
Mace

Registered: May 2002
Posts: 1799
What Jan said.
2010-03-25 22:28
breeze
Account closed

Registered: Mar 2009
Posts: 20
Quote: your irq ends with pla tay pla tax etc...
but it dont start with pha txa pha...
so it is fuxxoring the regs


hmm... and it's true, somehow I missed this point in mind... thanks!
2010-03-25 22:38
Stone

Registered: Oct 2006
Posts: 172
What are you guys on? When using the irq vectors at $0314, all the registers are pushed on the stack for you by the kernal irq handler, so the irq end bit is perfectly fine. If this wasn't the case, the popping of registers would do more than thrash the registers, it would underflow the stack as well, causing a random jump (CRASH).
2010-03-26 10:16
breeze
Account closed

Registered: Mar 2009
Posts: 20
Quote: What are you guys on? When using the irq vectors at $0314, all the registers are pushed on the stack for you by the kernal irq handler, so the irq end bit is perfectly fine. If this wasn't the case, the popping of registers would do more than thrash the registers, it would underflow the stack as well, causing a random jump (CRASH).

Here is how ... thanks! Now I'll know!
 
... 1 post 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
Alakran_64
Andy/AEG
Guests online: 103
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 Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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