Schmutzpuppe Posted February 27, 2004 Share Posted February 27, 2004 Schmutzpuppe.. Did you init rmt (jsr $3400?) I'm not sure exactly what you mean, the rmtplayr.a65 code has the player routine at $3400? You have to use $3400 to init and $3403 to play the song. Quote Link to comment Share on other sites More sharing options...
Tezz Posted February 28, 2004 Author Share Posted February 28, 2004 OK, So this is how I see the code working as it stands.... in the merged G2F/RMT sources, the rmt "init and play" code has the "rmtplayr.asx" icl (included) the first call to the music routine is .. ;- init PMG jsr music which jsr's to.. music ldx # ldy #>MODUL lda #0 jsr RASTERMUSICTRACKER ;Init in the rmtplayr.asx the following... PLAYER equ $3400 ... RASTERMUSICTRACKER jmp rmt_init jmp rmt_play jmp rmt_p3 jmp rmt_silence jmp SetPokey then in the area .. ;*- this area is for yours routine, register X,Y must survive jsr RASTERMUSICTRACKER+3 ;1 play so this is the $3403 - the call to start playing you are refering to? would the jsr RASTERMUSICTRACKER+3 jump straight to the third line which is jmp rmt_p3? is that where my problem is? should it be jsr RASTERMUSICTRACKER+2 Quote Link to comment Share on other sites More sharing options...
Schmutzpuppe Posted February 28, 2004 Share Posted February 28, 2004 OK, So this is how I see the code working as it stands.... in the merged G2F/RMT sources, the rmt "init and play" code has the "rmtplayr.asx" icl (included) the first call to the music routine is .. ;- init PMG jsr music which jsr's to.. music ldx # ldy #>MODUL lda #0 jsr RASTERMUSICTRACKER ;Init in the rmtplayr.asx the following... PLAYER equ $3400 ... RASTERMUSICTRACKER jmp rmt_init jmp rmt_play jmp rmt_p3 jmp rmt_silence jmp SetPokey then in the area .. ;*- this area is for yours routine, register X,Y must survive jsr RASTERMUSICTRACKER+3 ;1 play so this is the $3403 - the call to start playing you are refering to? would the jsr RASTERMUSICTRACKER+3 jump straight to the third line which is jmp rmt_p3? is that where my problem is? should it be jsr RASTERMUSICTRACKER+2 Your init seems ok. For playing music you must have a jsr $3403 in VBI (what you have if I understand you correctly) so also no problem here. I have no idea must have to take a look at the exe to help you, sorry. Quote Link to comment Share on other sites More sharing options...
Tezz Posted February 28, 2004 Author Share Posted February 28, 2004 ok. thanks for your help with that, I guess I will need to post the exe for that tomorrow because I am at a loss to where the problem is... i'll keep on fidling with the code in the mean time.. Quote Link to comment Share on other sites More sharing options...
pps Posted February 28, 2004 Share Posted February 28, 2004 Hehe I managed where the error is... Tezz: You just have to put a org $xxxx just in front of music ldx # Perhaps Heaven´s song was short enough not been overwritten by the routine. Without this org it is locatet at $42xx, that´s within the song data... demo.zip Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 28, 2004 Share Posted February 28, 2004 yup. of course i checked the filesize with XHEAD included in the xasm package... Quote Link to comment Share on other sites More sharing options...
pps Posted February 28, 2004 Share Posted February 28, 2004 This tool is very useful. Without it I sure got crazy searching where the error was... Now that I know how to put together a RMT song with G2f file, I can start with my little project Hope to present it in near future Quote Link to comment Share on other sites More sharing options...
Tezz Posted February 28, 2004 Author Share Posted February 28, 2004 Great! Thanks for that, I was totally stuck. Thanks guys. Quote Link to comment Share on other sites More sharing options...
MaPa Posted February 29, 2004 Share Posted February 29, 2004 PLAYER equ $3400 ... RASTERMUSICTRACKER jmp rmt_init jmp rmt_play jmp rmt_p3 jmp rmt_silence jmp SetPokey then in the area .. ;*- this area is for yours routine, register X,Y must survive jsr RASTERMUSICTRACKER+3 ;1 play so this is the $3403 - the call to start playing you are refering to? would the jsr RASTERMUSICTRACKER+3 jump straight to the third line which is jmp rmt_p3? is that where my problem is? should it be jsr RASTERMUSICTRACKER+2 I'm not a coder but that +3 surely doesn't mean the 3rd line, but +3 bytes to skip one jmp intruction (jmp $addr is 3 bytes long) so finally it jumps to jmp rmt_play instruction. Just for info Quote Link to comment Share on other sites More sharing options...
Tezz Posted February 29, 2004 Author Share Posted February 29, 2004 MaPa.. I'm not a coder but that +3 surely doesn't mean the 3rd line, but +3 bytes to skip one jmp intruction (jmp $addr is 3 bytes long) so finally it jumps to jmp rmt_play instruction. Just for info Yes that makes sense, that is right. please ignor that comment I posted earlier! I'm no great coder either or rather I have not touched 6502 for over 12 years. I am quickly refreshing my knowledge with reading. pps.. You just have to put a org $xxxx just in front of music ldx # Perhaps Heaven´s song was short enough not been overwritten by the routine. Without this org it is locatet at $42xx, that´s within the song data... Thanks for your help and info, I have now saved my stripped RMT track to $6000 ($6000- $6995 which totals $995 or 2453 bytes in length) I have then specified in the code Modul $6000, and then set inside the label "music" before ldx # All I get is silence? Quote Link to comment Share on other sites More sharing options...
pps Posted February 29, 2004 Share Posted February 29, 2004 Hi Tezz, I post you a short snap of the sourcecode. So you can exactly locate where to put the org STEREOMODE equ 2 ;0 => compile RMTplayer for mono 4 tracks ; ;1 => compile RMTplayer for stereo 8 tracks ; ;2 => compile RMTplayer for 4 tracks stereo L1 R2 R3 L4 ; ;3 => compile RMTplayer for 4 tracks stereo L1 L2 R3 R4 ; ; icl "rmtplayr.a65" ;include RMT player routine ; ; opt h- ;RMT module is standard Atari binary file already ins "bootup.rmt" ;include music RMT module opt h+ ; org $6000 music ldx #<MODUL ;low byte of RMT module to X reg ldy #>MODUL ;hi byte of RMT module to Y reg lda #0 ;starting song line 0-255 to A reg jsr RASTERMUSICTRACKER ;Init Ok, your song ends at $4995, so you can put the org at $4996 or at least at $4a00. A little word to the org function: with org $1000 you say, that the following code will be assembled into memory beginning at position $1000. The rmt-file has its own org written in the "fileheader" - normally $4000, so it´s included at this position. I can´t see, why the following routine here is not linked at the end of the rmt data, but with the included org we can help us. Hope that´ll help... Quote Link to comment Share on other sites More sharing options...
Tezz Posted February 29, 2004 Author Share Posted February 29, 2004 Thank you pps, it now works my problem was with the layout of my sourcecode. The org command needs to be spaced out from the left or XASM returned an error. I assumed I had made a coding error. Thanks for your help once again, now at least I have learned because of my mistake! Quote Link to comment Share on other sites More sharing options...
raster/c.p.u. Posted March 1, 2004 Share Posted March 1, 2004 The rmt-file has its own org written in the "fileheader" - normally $4000, so it´s included at this position. I can´t see, why the following routine here is not linked at the end of the rmt data, but with the included org we can help us. Hi. Maybe I don't understand you... But RMT is standard Atari binary file with headers addresses (from-to memory location) and it contains only song data, that's why it can't contain any "asm source" linked at the end of the rmt data. So, initialization (ldx#..,ldy#..,jsr RASTERMUSICTRACKER) and calling of the player routine (jsr RASTERMUSICTRACKER+3) you have to put to your source code certainly. Quote Link to comment Share on other sites More sharing options...
pps Posted March 1, 2004 Share Posted March 1, 2004 Hi Raster, yes of course the rmt-songfile contains only the fileheader and the songdata... nothing else should be in it We had the problem, that we included our songs, like heaven did, but we had soundproblems then (see at my first postet file). I recognized that the assembler (XASM) includes the rmt-song and the asm-sorce, we put after the include-commando, was assembled within the songdata That causes the glitches... Heaven´s song was short enough, so this error was not there. An org, and we are happy now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.