Jump to content
IGNORED

G2F and RMT


Tezz

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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!

 

;)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...