Jump to content
IGNORED

RMT music in Turbo Basic XL


Sikor

Recommended Posts

O.K. For non-assembler peoples are precompiled version of RMT player for use with Turbo Basic and other languages.

RMTMONO.PLY - player fotr mono music

RMT4ST.PLY - player for mono music played in stereo (L1 L2 R3 R4)

RMT4ST2.PLY - player stereo for mono music (L1 R2 R3 L4)

RMT8ST.PLY - player for 8 channel stereo music

TESTPL.XEX - simple demo of using it in compiled Turbo Basic XL.

Players play RMT music 1x/frame only. USR proc was written by Marok, player RMT was written by Raster. In Turbo Basic XL music can't be at $4000 - in this examples all music are in $7000 location.

Using in your program: (after loading player and music, of course):

X=USR($8F85,$9500,music_adress,[song_position]). Good luck in using it!

playeryrmttbpublic.zip

  • Like 1
Link to comment
Share on other sites

There is small program called "Linker". It simply links the CTB file with patched RUNTIME2.EXE one (warning: program tries to read RUNTIME2.EXE from D1: drive!). Then it saves the file as COM/XEX (you have to end Linker's job to save file properly). And that's all.

TB.zip

Link to comment
Share on other sites

There is small program called "Linker". It simply links the CTB file with patched RUNTIME2.EXE one (warning: program tries to read RUNTIME2.EXE from D1: drive!). Then it saves the file as COM/XEX (you have to end Linker's job to save file properly). And that's all.

thanks, but the linker can not attach files such as fonts, graphics, music and so on. :ponder:

Link to comment
Share on other sites

Right. I do that:

1. I wrote program in TB, compile it and linked with linker and runtime2.

2. All graphics, music, fonts etc. i prepared with Super Packer (set adresses etc)

3. Link all with Super Packer (small programs) or Mossad (bigger ones).

Thats all. Good luck ;)

  • Like 1
Link to comment
Share on other sites

  • 10 years later...

I am sorry for a necro-post. I see there is no source code for the player routine.

 

I would have a question. The player routine requires 19 bytes in the zero page. What address for these bytes is the best for Turbo BASIC XL?

I was thinking 146 would be a good one, but this simply destroy turbo basic XL. It seems TBXL is using those addresses for something?

 

 

Link to comment
Share on other sites

6 hours ago, baktra said:

I am sorry for a necro-post. I see there is no source code for the player routine.

 

I would have a question. The player routine requires 19 bytes in the zero page. What address for these bytes is the best for Turbo BASIC XL?

I was thinking 146 would be a good one, but this simply destroy turbo basic XL. It seems TBXL is using those addresses for something?

 

 

And that's how to make a fool of oneself. 146 is obviously a no go.

Well, 19 contiguous bytes of memory is a mission impossible. Therefore I have to try something else.

Link to comment
Share on other sites

8 hours ago, baktra said:

And that's how to make a fool of oneself. 146 is obviously a no go.

Well, 19 contiguous bytes of memory is a mission impossible. Therefore I have to try something else.

The RMT player source is available from the original package http://raster.infos.cz/atari/rmt/rmt.htm , there are newer versions in the forums though.

 

You could also look into dmsc's SAPR player. It only supports 50/60hz mono tunes but that's most of them.

 

How to integrate that with basic, I have no idea.

 

 

It uses some ZP but you can move it out except for a 2 byte pointer. It will be slightly slower but it's much faster than RMT anyway. Storage wise it requires less than 2.5KB for code+buffers (mostly buffers), and whatever tune you use which may actually be smaller than the original RMT.

 

Yeah, it's pretty great!

 

Link to comment
Share on other sites

Thanks. It was source code of the TBXL-specific player that I had on my mind.

 

I have written a custom VBI routine that back-ups and restores used portion of the zero page. It is not exactly clean solution, but if the VBI is not interrupted by itself, it works. As a next step, I would have to modify the rmt player routine to use fewer zero page locations (probably by copying pointers to ZP just when needed). More cycles, but I will have to live with that.

 

Link to comment
Share on other sites

  • 2 years later...
On 6/30/2009 at 12:03 AM, Sikor said:

O.K. For non-assembler peoples are precompiled version of RMT player for use with Turbo Basic and other languages.

RMTMONO.PLY - player fotr mono music

RMT4ST.PLY - player for mono music played in stereo (L1 L2 R3 R4)

RMT4ST2.PLY - player stereo for mono music (L1 R2 R3 L4)

RMT8ST.PLY - player for 8 channel stereo music

TESTPL.XEX - simple demo of using it in compiled Turbo Basic XL.

Players play RMT music 1x/frame only. USR proc was written by Marok, player RMT was written by Raster. In Turbo Basic XL music can't be at $4000 - in this examples all music are in $7000 location.

Using in your program: (after loading player and music, of course):

X=USR($8F85,$9500,music_adress,[song_position]). Good luck in using it!

playeryrmttbpublic.zip 26.59 kB · 146 downloads

Would it be possible to modify the player to make it recognize NTSC machines and play the tune slower?

Link to comment
Share on other sites

29 minutes ago, Sikor said:

Hmm, this is Marok procedure, i don't know, that I has sources yet... Try send PM to marok, meybe he has it yet  -i think no problem to replace PAL procedure by NTSC procedure, player was simply Raster implementation.

Hi @Sikor,

 

@Philsan wants an routine, that has correct automatic detection, if a machine runs in 50Hz or 60 Hz and wants to be able that a song, hat is written for 50 Hz automatically plays correct on 60 Hz machines. If you find the sources, I can try to change the code and make a routine available to play from BASIC then - have not done that before, so source code might be helpful :)

  • Thanks 1
Link to comment
Share on other sites

Ok, send me PM next week - I must find my floppy drive and some old disks. I try find it... Theoretically i can got it on old SD card  - I search for it yet.

==========================

Ok, my memory is not bad, as i think - sources you can find on atarionline.pl: http://atarionline.pl/forum/comments.php?DiscussionID=189&page=1

 

Edited by Sikor
find it :)
  • Thanks 1
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...