Jump to content
IGNORED

RMT stereo modes


Recommended Posts

Hi all,

I usually modify rmt player routine to create my own stereomode, but I'm a bit confused about existing alternate stereo modes built in rmt player... for instance:

 

	ELI STEREOMODE==2		;* L1 R2 R3 L4
	ldy #$ff
v_audctl equ *-1
	lda trackn_audf+0
	ldx trackn_audc+0
	sta $d200
	stx $d201
	sta $d210 				;????
	lda trackn_audf+1
	ldx trackn_audc+1
	sta $d210+2
	stx $d211+2
	lda trackn_audf+2
	ldx trackn_audc+2
	sta $d210+4
	stx $d211+4
	sta $d200+4				;????
	lda trackn_audf+3
	ldx trackn_audc+3
	sta $d200+6
	stx $d201+6
	sta $d210+6				;????
	sty $d218
	sty $d208

I have marked confusing lines with ";????".

What is the purpose of those lines?

If there is some purpose, why there is no such line under lda trackn_audf+1 block?

-is it a bug?

Link to comment
Share on other sites

50 minutes ago, MaPa said:

I suppose it's for playing "filtered" voices 1+3 etc. Then you need both AUDF1 and AUDF3 set in the same pokey and not one in "left" Pokey and the other in "right" Pokey.

I just tried small test and you are right.

However I tried several variations of code and presence of first ;???? line did not make a difference...  Maybe there is some hidden function there as well, but maybe it's just a bug.

 

Unfortunately there is no option to enable these modes directly in RMT editor...  I believe that is also the reason why they are rarely used.

I had also discussion with guys behind ASMA that tunes of some of my games are not correctly replayed in ASMA because their respective SAP files are compiled as MONO (Skyscraper and Castle Defender). I had to build correct SAP files on my own to fix this.

 

Link to comment
Share on other sites

In the pasted part of code there is no zeroing AUDF without AUDC. This part plays mono (4 channel) music on stereo POKEY that voices 1, 4 plays on left POKEY and voices 2, 3 on right POKEY. So when in RMT you use "filtered" voice 1+3, you NEED set AUDF1 and AUDF3 on the SAME pokey to have filter effect. Normally AUDF1 would be set only on left POKEY and AUDF3 only on right.

Link to comment
Share on other sites

11 minutes ago, MaPa said:

In the pasted part of code there is no zeroing AUDF without AUDC. This part plays mono (4 channel) music on stereo POKEY that voices 1, 4 plays on left POKEY and voices 2, 3 on right POKEY. So when in RMT you use "filtered" voice 1+3, you NEED set AUDF1 and AUDF3 on the SAME pokey to have filter effect. Normally AUDF1 would be set only on left POKEY and AUDF3 only on right.

That's the explanation.

In that case, you could do a real 4 channel POKEY tune that works fine on a stock machine, and the player gives some Stereo to it on 2 POKEYs, if there is a second one detected.  

Link to comment
Share on other sites

1 hour ago, MaPa said:

Sure.. in fact I think we used exactly this STEREO mode in Millionaire (yes, just checked it). It has standard 4 channel music, but on stereo POKEY Ataris, it should play somehow stereo.

In Castle Defender I'm using custom mode LBBR (B = both), which sounds stereo but not that divided. This of course (based on our new knowledge) is possible for "simple" (single channel) instruments only.

Link to comment
Share on other sites

I have just done some tests with pseudo stereo hack.. where you have 4 channel song, where you play all channels on left and all channels on right with some delay.

stereohack_music.xex 

you can control the delay by pressing "1" (+) and "2" (-) keys - it starts with no delay and goes up to 16 cycles.

 

What do you think?

I suppose delay 1,2 or 3 could be used, more than 6 is quite disturbing.

  • Like 2
Link to comment
Share on other sites

Quote

In Castle Defender I'm using custom mode LBBR (B = both), which sounds stereo but not that divided. This of course (based on our new knowledge) is possible for "simple" (single channel) instruments only.

IMHO it should play combined voices too if I understand it correclty.

Edited by MaPa
Link to comment
Share on other sites

	ELI STEREOMODE==4		;* L1 L2 L3 L4 + reverb in R1 R2 R3 R4
	ldy #$ff
v_audctl equ *-1
	sty yyy

	lda ptr
	add shift 	;play up to 16 cycles old sounds
	and #$0f
	sta tmpptr
	
:3	asl @
	add tmpptr 	;multiply by 9 (buffer size of 1 set)
	
	tax
.rept 9,#
	mva storage+:1,x $d210+:1
.endr

	lda ptr
:3	asl @
	add ptr		;multiply by 9 (buffer size of 1 set)
	tay

.rept 4,#
	lda trackn_audf+:1
	ldx trackn_audc+:1
	sta $d200+:1*2
	sta storage+:1*2,y
	stx $d201+:1*2
	txa
	sta storage+1+:1*2,y
.endr	
	
	ldx yyy
	stx $d208
	txa
	sta storage+8,y
	
	inc ptr
	lda ptr
	and #$0f
	sta ptr
	rts
storage	
.rept 16		;sound buffer size
:9	dta 0	;one set of sound params
.endr
ptr	dta 0	;actual buffer index
yyy	dta 0	
shift	dta 15	;amout of delay (0-15)
tmpptr	dta 0	;delayed buffer index
	EIF

Here is the code if you are curious. Maybe it could be coded more effectively, but I'm ok with it.

Link to comment
Share on other sites

@matosimi

 

Templates for building Title Screens with music:

Currently the following examples in the .zip compile a xex that is for the NTSC speed (60Hz). The music plays slower (50Hz) with a PAL machine.

However, when exporting a xex from the RMT, that issues has been solved, because in both NTSC and PAL systems, the music plays at the same speed (60Hz).

 

Raster Music Tracker: exporting a .rmt to a xex

1113738234_RMTexportxex.png.29fe96e93fadbbb9943c69c2391465a5.png

 

 

Is it possible to edit the following codes in order to compile a PAL version playing at 60Hz (the same speed it's heard with a NTSC machine)?

 

Examples add music to image.zip

 

 

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