Jump to content
IGNORED

RMT song-nr and intrack positon where?


Recommended Posts

I am just finalising my contribution to the NYD12 and want to sync the music to the video. when I am going through the RMT player source code where can I track down the song position and the intrack position? went through but can not find a simple variable. p_song is a pointer... could work as workaround but is there any other?

Link to comment
Share on other sites

This post could help you:

 

http://www.atariage....ost__p__2147312

 

I do not want to respond to the old thread linked here, however, what analmux has forgotten to mention is, that you can specify the Zeropage locations RMT-player should use. So the mentioned "$d1" is relative to the ZP-Start he supplied while assembling.

Link to comment
Share on other sites

This post could help you:

 

http://www.atariage....ost__p__2147312

 

I do not want to respond to the old thread linked here, however, what analmux has forgotten to mention is, that you can specify the Zeropage locations RMT-player should use. So the mentioned "$d1" is relative to the ZP-Start he supplied while assembling.

 

Very true, but the page zero vars are:

 

p_instrstable org *+2

p_trackslbstable org *+2

p_trackshbstable org *+2

p_song org *+2

ns org *+2

nr org *+2

nt org *+2

reg1 org *+1

reg2 org *+1

reg3 org *+1

tmp org *+1

 

and most of them are pointers, so it shouldn't be that difficult to log them and see.

Also, I suppose that there is a default address for those vars.. that could help (for future reference, because probably Heaven doesn't need the info anymore :)).

Link to comment
Share on other sites

yup. Intro 2012 is synced... ;) Pointers are not good when you shuffle around the RMT file in memory... ;) so I did the easy way what Rybags suggested... (and you can see that in the source code) I use a simple 16 bit counter to track the VBLs and to sync it to the music... might not be as accurate as it could be but worked in the given development time frame... ;)

 

btw. the actual RMT replay ASM source code...does it support NTSC? I can remember the discussion about it some time ago... but due to Raster's passing away I am not sure if it was a suggestion or if it was implemented in the end.

Link to comment
Share on other sites

I'm not sure if any native support was included.

There's generally 2 methods of having the same playback rate (remembering you can author a song using either timing)

 

- Keep a counter and don't call the play routine every 6th VBlank on NTSC - so you still end up with 50 calls/second.

- Have a combination of VBlank and a "roving" DLI that changes location to match match up with the timing required.

 

Of course it's not always desirable to burn lots of time in a DLI. In such cases you could just maintain shadows of the 9 AUD registers instead of allowing the RMT to store them to Pokey. Then just call RMT in VBlank and have the stores done later.

Link to comment
Share on other sites

  • 2 months later...

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