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 > SID output analisys
2006-10-18 16:25
ready.

Registered: Feb 2003
Posts: 441
SID output analisys

I put this into coding since in my opinion the topic is more coder concerning, rather than composer.

Let's say I have a tune playing, normal interrupt implemented and I want to know what's going on inside the SID to use this info to sync demo effects with the music.

There's the 3rd voice output, ok, but this is not enough. I tried to do the following:

jsr music_call
lda $d400
sta var1
lda $d401
sta var2
....
....

So I stored the SID registers in a serie of variables at every music_call (50Hz). But I don't get much, the values seem not to change much for a while, then they suddenly change and then stay the same for some more.

I also read that except for the last 4, SID registers are write-only. Is there the problem?

So how do certain coders manage to do players like Cubic Player or Amazing Player? Well, Cubic Player is maybe even too much, since I don't need spectrum analisys, I just want something of what the SID is doing in each voice.

thanx
Ready.
 
... 2 posts hidden. Click here to view all posts....
 
2006-10-18 18:10
chatGPZ

Registered: Dec 2001
Posts: 11386
first method will actually not work with a bunch of players (those who store registers more than once in a frame, and possibly in different order each frame). the other method will always work =)
2006-10-18 18:36
Oswald

Registered: Apr 2002
Posts: 5094
oh my how many debates did we have already about this? atleast I'm glad noone could find an error in my suggestions ;)
2006-10-18 18:51
ready.

Registered: Feb 2003
Posts: 441
Thanx people!!! I looked in old CSDb forums, but I could not find anything about it.

But, using VICE, I can read something from write-only SID registers...so what is that value? It also changes from time to time, so it's surely not $d000 RAM. Any idea?

Ready.
2006-10-18 18:55
Inge

Registered: Nov 2003
Posts: 144
As Groepaz stated, method two will always work. By changing some STA $D400/01/04 to JSR you can catch the SID-values before they are set.

Here is an example of how I visualize the tunes: http://home.c2i.net/ingehp/matunes1.zip
2006-10-18 19:02
Frantic

Registered: Mar 2003
Posts: 1648
@ready:
The value you are reading is the value that was last written to sid (no matter what register), if I remember correctly.
2006-10-18 19:36
ready.

Registered: Feb 2003
Posts: 441
Frantic: it makes sense, since all write-only adresses have the same value, exactly the last written one. Interesting.
2006-10-18 23:45
Stryyker

Registered: Dec 2001
Posts: 468
Get a tool where it will play the music normally but will show you the player memory live. It also helps if it has super slow playback functions. Watch for patterns at about the right time. I wouldn't bother with watching SID or RAM under SID but watch/read the player code memory. You may need to process the player data like the player as sometimes there can be 1 or 2 frame desync but you'll eventually get there. That way you can synch on particular patterns, instruments, tune repeat etc.
2006-10-19 08:28
JackAsser

Registered: Jun 2002
Posts: 2014
@strykker: I do the same. poke $d011,#$45 is a classic for tunes at $1000-
2006-10-19 08:33
Twoflower

Registered: Jan 2002
Posts: 434
Hmm, to find timings and such, use Music Wizard (I believe it was made by Faces, wasn't it?) and visually find the patternchanges in the music itself. Isn't it far easier to get into the player itself than analyzing the data it produces? But I figure that depends on what you need it for.
2006-10-19 08:34
Twoflower

Registered: Jan 2002
Posts: 434
Yep, it was made by Faces. Here it is -> ftp://c64.rulez.org/pub/c64/Hall_of_Fame/demofiles/f/faces/util..
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
morphfrog
psych
Thierry
Guests online: 143
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 Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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