;********************************
;Raster Music Tracker
;********************************

param STEREOMODE:0..3 = 0

;We are probably not going to use the addresses directly,
;but we need to declare the variable with structure to
;alloc the space for RMT variables.

rmt_vars:struct
	p_tis:adr
	p_instrstable:adr
	p_trackslbstable:adr
	p_trackshbstable:adr
	p_song:adr
	ns:card
	nr:card
	nt:card
	reg1:byte
	reg2:byte
	reg3:byte
	tmp:byte		
	cmd2:byte ;may be optional (IFT FEAT_COMMAND2)
	rmt_offset:card

rmt_init:proc module@(_x,_y):adr track@_a @_a @_x @_y @rmt_vars
rmt_play:proc @_a @_x @_y
rmt_silence:proc @_a @_x @_y

music'init:macro(module:adr track:byte = 0) =
	rmt_init module track
;	_x = lo module
;	_y = hi module
;	_a = 0
;	instr ref rmt_vars
;	instr call rmt_init

music'play:macro =
	rmt_play

music'off:macro =
	rmt_silence
		                          