Jump to content
IGNORED

RMT Help


Webzz

Recommended Posts

I need some help with the RMT player. I want to use it in my ML program, but not sure how to go about it. I am not using graphics so have DMA turned off. I figure it would be best to use it in the VBI but am confused as to what program I need to put there and point to. I also want to call different songs or clips, depending on the event. Thanks.

Link to comment
Share on other sites

It's easy.

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
;
ldy #<vbi
ldx #>vbi
lda #$07
jsr $e45c			;Start VBI routine
...
;

And VBI routine:

vbi
jsr RASTERMUSICTRACKER+3;1 play
;
jmp $e462			;end vbi

That's all. :)

If you want use RMT also for SFX effects, please, see the /asm_src/sfx/sfx.a65 example.

There is all you need to do.

Edited by raster/c.p.u.
Link to comment
Share on other sites

It's great to have such a player integrated in your own code. When I have more time I will check if it is possible to use it in ACTION! language, as it allows you to implement anything you like, even in assembler inline code. I know RMT player uses zero page addresses so it could be a problem if ACTION! uses them either.

Link to comment
Share on other sites

It's great to have such a player integrated in your own code. When I have more time I will check if it is possible to use it in ACTION! language, as it allows you to implement anything you like, even in assembler inline code. I know RMT player uses zero page addresses so it could be a problem if ACTION! uses them either.

Yes, RMT uses more zero page addresses, but it isn't a big problem - at the beginning of player routine you can store registers in this area to some temporary memory area and at the end of player routine restore it.

(if no better way will be found ;) )

Link to comment
Share on other sites

Thanks for this info. I will definitely talk about it with you sometime ;)

 

But I will have to consider the cycle usage, too. Even if a program uses character sets for graphics and software sprite engine (with P/M underlying), cycles taken for RMT player will probably slow down the gameplay. First good place would be title screen, for main gameplay I will have to think a lot about resource usage.

 

Battleship approaching... Careful!!! Destroyed... :ponder:

Link to comment
Share on other sites

Let me understand this technical stuff. Why RMT player in a VBI spends time for main process?

I thinked VBI cycles time is always considered as free aditional time, using or not.

Maybe, when a VBI routine exceeds the 20000 cycles of deferred VBI, then spends main time?

If this is true, in this way... DLIs could spend main time too?

 

So many questions... :D

Link to comment
Share on other sites

Let me understand this technical stuff. Why RMT player in a VBI spends time for main process?

I thinked VBI cycles time is always considered as free aditional time, using or not.

Maybe, when a VBI routine exceeds the 20000 cycles of deferred VBI, then spends main time?

If this is true, in this way... DLIs could spend main time too?

 

So many questions... :D

Neither DLI nor VBI routines use any kind of "free" time, in fact they steal CPU time so the more things you do in VBI or DLI, the less computational power you have left. Correct me if I'm wrong.

Link to comment
Share on other sites

I thinked CPU halts between the beam get the current next line position, and in VBI the CPU halts until the beam get the first screen position.

But... I think i was wrong... Then, DLIs and specially VBI are using as clock process, but every code in a interrupt routine spend CPU process.

 

How about sprites, Ive heard activate sprites spends main time too??

Edited by Allas
Link to comment
Share on other sites

DRAM refreshes, screen refreshes, sprites, you name it all take time away from the CPU on most old systems.

However, the sprite hardware saves a lot more clock cycles than what it would take to duplicate in software.

 

If you have a 130XE, you can run code out of the bank switched RAM to avoid the slowdown since it's on a separate buss. Sadly, I don't think Atari put page 0 and 1 (stack) on a different buss than the graphics hardware so you still suffer some slowdown.

Link to comment
Share on other sites

If you have a 130XE, you can run code out of the bank switched RAM to avoid the slowdown since it's on a separate buss. Sadly, I don't think Atari put page 0 and 1 (stack) on a different buss than the graphics hardware so you still suffer some slowdown.

 

:ponder: huh ??

 

As far as I know there is only one bus in any type of atari 8bit, so all memory has same bus. Normal memory, stack, zero page, extended (130XE) memory.

 

The only difference in an 130XE is that you can allow Antic and CPU to access the extra RAM independently, but not really simultaneously.

Link to comment
Share on other sites

If you have a 130XE, you can run code out of the bank switched RAM to avoid the slowdown since it's on a separate buss. Sadly, I don't think Atari put page 0 and 1 (stack) on a different buss than the graphics hardware so you still suffer some slowdown.

 

:ponder: huh ??

 

As far as I know there is only one bus in any type of atari 8bit, so all memory has same bus. Normal memory, stack, zero page, extended (130XE) memory.

 

The only difference in an 130XE is that you can allow Antic and CPU to access the extra RAM independently, but not really simultaneously.

Ya know, that was obviously wrong after I did some looking but I was sure I read it in a review of the machine and that's where I got the idea. I probably just misunderstood.

Link to comment
Share on other sites

Hi Allas,

 

I see you are working on a game project. Could you tell me what it is all about? Any progress? We hope you will finish it to show us your masterpiece ;)

 

Thanks, surely when it is the right moment, I'll share my work, but don't expect so much from me. :ponder:

Edited by Allas
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...