| |
jimbob Account closed
Registered: Aug 2010 Posts: 10 |
goattracker
Hi there - just a quick question about goattracker - I've made a SID track which I'm using for some game music on the C64 - I'd like to be able to synchronise some title screen events with which pattern is playing in the playlist. Is there a memory location I can get the current position in the play sequence or pattern number from?
Cheers for any advice you can give. |
|
| |
Hein
Registered: Apr 2004 Posts: 954 |
From the readme file:
Quote:5.1 Playroutine options
STORE AUTHOR-INFO - Writes the "AUTHOR" string from songname editor to the
location range (startaddress+$20 - startaddress+$3F). Also enables timing mark
support. A timing mark is a mastervolume command (DXY) with parameter $10-$FF.
This parameter will be copied into startaddress+$3F when the command is
encountered in playback. |
| |
Conrad
Registered: Nov 2006 Posts: 849 |
You'll have to analyse the buffered memory which is stored after the music routine code. The actual address may be different though due to GT's compiler optimising the player to what is required for your music to play right. e.g. if you've not used any vibrato effects, the compiler will cancel out the vibrato code at final compilation, affecting the start address of buffered memory. Usually, if located at $1000, the buffered memory is stored between $1300-$1500.
Also bear in mind that buffered memory for each voice is aligned by 7 bytes. For example...
$1400 Voice 1 - Track index position
$1401 Voice 1 - Pattern LO address
$1402 Voice 1 - Pattern HI address
$1403 Voice 1 - Transpose value
$1404 Voice 1 - Repeat value
$1405 Voice 1 - Current Note value
$1406 Voice 1 - Current Instrument value
$1407 Voice 2 - Track index position
$1408 Voice 2 - Pattern LO address
$1409 Voice 2 - Pattern HI address
$140a Voice 2 - Transpose value
$140b Voice 2 - Repeat value
$140c Voice 2 - Current Note value
$140d Voice 2 - Current Instrument value
$140e Voice 3 - Track index position
$140f Voice 3 - Pattern LO address
$1410 Voice 3 - Pattern HI address
$1411 Voice 3 - Transpose value
$1412 Voice 3 - Repeat value
$1413 Voice 3 - Current Note value
$1414 Voice 3 - Current Instrument value
...
This isn't GT's actual buffer format, but you get the idea.
There is definitely a track index position for each voice, but I can't tell where exactly it'll be stored on your tune, you'll have to check it yourself. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
in the old days, i used to simply write part of the workram of the music routine to screen, and then pick random variables which change "the right way". shouldnt be too hard =) |
| |
AüMTRöN
Registered: Sep 2003 Posts: 44 |
What Hein said. |
| |
jimbob Account closed
Registered: Aug 2010 Posts: 10 |
Brilliant thanks guys - I totally missed that in the docs but looks like timer-mark will do exactly what I need! Cheers :) |