<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - .prg export from Goattracker]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/2777/"/>
	<updated>2010-11-08T18:33:48Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/2777/prg-export-from-goattracker/</id>
		<entry>
			<title type="html"><![CDATA[Re: .prg export from Goattracker]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/45610/#p45610"/>
			<content type="html"><![CDATA[<p>Thanks a lot mate!<br />After I tried your file and it was working beautifully, I realized that there was something in the export from Goattracker that wasn&#039;t right.<br />What solved the problem was to say no to &quot;Use zeropage ghost regs&quot;. Then it worked like a charm. <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Next, reading up on raster interrupts and the memory map.</p>]]></content>
			<author>
				<name><![CDATA[tRasH cAn maN]]></name>
				<uri>https://chipmusic.org/tRasH+cAn+maN</uri>
			</author>
			<updated>2010-11-08T18:33:48Z</updated>
			<id>https://chipmusic.org/forums/post/45610/#p45610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: .prg export from Goattracker]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/45590/#p45590"/>
			<content type="html"><![CDATA[<p>while I&#039;m here, this is some timer friendly code to do the same thing:</p><div class="codebox"><pre><code>sei

; init song
lda #$00
jsr $7000

; point hardware interrupt registers at our play routine
lda #&lt;raster
sta $0314
lda #&gt;raster
sta $0315
; set raster position (in this case, below bottom border on PAL machines)
lda #252                        
sta $d012                      
lda $d011
and #$7f                        
sta $d011                      
; init interrupts
lda #$7f                       
sta $dc0d
lda #$01                        
sta $d01a
lda $dc0d                     
; return to system now interrupts are running.
cli
rts

; play routine, just calls a frame of the music and changes border colour so we have some visuals.
raster
dec $d020
jsr $7003
inc $d020
; ack interrupts
dec $d019
jmp $ea31
 </code></pre></div>]]></content>
			<author>
				<name><![CDATA[4mat]]></name>
				<uri>https://chipmusic.org/4mat</uri>
			</author>
			<updated>2010-11-08T14:28:54Z</updated>
			<id>https://chipmusic.org/forums/post/45590/#p45590</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: .prg export from Goattracker]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/45540/#p45540"/>
			<content type="html"><![CDATA[<p>Yep that should be ok, just tried it.&nbsp; <a href="http://dl.dropbox.com/u/4816829/sys24576.prg" target="_blank">Here&#039;s my compile</a> (Player at $6000, song at $7000)</p>]]></content>
			<author>
				<name><![CDATA[4mat]]></name>
				<uri>https://chipmusic.org/4mat</uri>
			</author>
			<updated>2010-11-08T00:23:44Z</updated>
			<id>https://chipmusic.org/forums/post/45540/#p45540</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: .prg export from Goattracker]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/45539/#p45539"/>
			<content type="html"><![CDATA[<p>Thanks for your help. It all makes sense.<br />I&#039;m not yet familiar with the 6010&#039;s raster lines and interrupts. I&#039;ve tried your piece of code in Vice but unfortunately I&#039;m not getting any sound. <br />I&#039;ve tried loading up a game in Vice so I know the audio works.<br />If I put the above code @ address $6000, I should enter SYS24576 to start it, right?<br />Do I need to do anything else?</p>]]></content>
			<author>
				<name><![CDATA[tRasH cAn maN]]></name>
				<uri>https://chipmusic.org/tRasH+cAn+maN</uri>
			</author>
			<updated>2010-11-08T00:14:14Z</updated>
			<id>https://chipmusic.org/forums/post/45539/#p45539</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: .prg export from Goattracker]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/45537/#p45537"/>
			<content type="html"><![CDATA[<p>GoatTracker doesn&#039;t have a timer-enabled driver attached to it when you export.&nbsp; (afaik, unless they added one in 2.x series)</p><p>$7000 will init the song<br />$7003 will play a frame of the song only.</p><p>So you&#039;d need a little bit of code to play it like:</p><p>SEI<br />; init<br />LDA #$00<br />JSR $7000<br />; loop, wait for raster ($d012) to hit line 128<br />RASTER LDA $D012<br />CMP #$80<br />BNE RASTER<br />; play frame of song<br />JSR $7003<br />; jump back to raster loop<br />JMP RASTER</p>]]></content>
			<author>
				<name><![CDATA[4mat]]></name>
				<uri>https://chipmusic.org/4mat</uri>
			</author>
			<updated>2010-11-07T23:22:37Z</updated>
			<id>https://chipmusic.org/forums/post/45537/#p45537</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[.prg export from Goattracker]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/45510/#p45510"/>
			<content type="html"><![CDATA[<p>Could someone be so kind to give me a walk-through on how to play a song packed as a .prg from Goattracker?<br />I&#039;ve tried exporting using all default settings (Start address $7000, etc)<br />Then tried loading the .prg in VICE (File -&gt; Autostart disk/tape image)<br />and then in monitor I&#039;ve added:<br /></p><div class="codebox"><pre><code>.a $6F00 LDA $00
.a $6F02 JSR $7000</code></pre></div><p>Then moved the PC to $6F00 with SYS28416<br />This didn&#039;t do anything so I tried adding <br /></p><div class="codebox"><pre><code>.a $6F05 JSR $7003</code></pre></div><p>But still nothing. What am I missing here?</p>]]></content>
			<author>
				<name><![CDATA[tRasH cAn maN]]></name>
				<uri>https://chipmusic.org/tRasH+cAn+maN</uri>
			</author>
			<updated>2010-11-07T14:24:52Z</updated>
			<id>https://chipmusic.org/forums/post/45510/#p45510</id>
		</entry>
</feed>
