Jump to content
IGNORED

cmc2rmt


matosimi

Recommended Posts

I created cmc2rmt (Chaos Music Composer to Raster Music Tracker) converter as a bi-product during my work on Lasermania 2020.

 

It is a windows command line tool that can be downloaded here: https://sourceforge.net/projects/cmc2rmt/files/latest/download

 

The tool is written using .NET Core, and it is OpenSource, so you can grab the sources and build/modify your own executable for other platforms as well.

If you are willing to code new functionality and participate on the project just let me know, I can grant you write access to the code repository.

 

Usage is pretty simple:

 

  1. Download the tool - it requires additional runtime libraries of .NET Core, however when .NET5 gets released the runtime should be embedded in Win10.
  2. Run the tool with input cmc file as parameter, for example: cmc2rmt.exe Lasermania.cmc > Lasermania.rmt.txt
  3. If you do not redirect output to *.rmt.txt file, then it will be flushed into console window.
  4. Open RMT, select File->Load... then change file filter to "TXT song files (*.txt) and open generated *.rmt.txt file
  5. Instruments are not converted, so you have to assign them manually in RMT

 

Enjoy.

 

cmc2rmt_icon.thumb.png.35992b9421169057e6421a690712eb7a.png

  • Like 12
  • Thanks 2
Link to comment
Share on other sites

12 hours ago, Wilheim said:

Awesome! Is it possible to convert the CMC files from the game The Curse? The replay routine takes too many cycles so it's impossible to play it on NTSC.

it is of course possible, but you would need to find someone who can finalize it in RMT.

 

BTW, I tried some quick hack... to run the game on PAL, then switched to NTSC during gameplay and put RTS,NOP,NOP to $3006 to disable cmc play routine execution.... however the game crashed the moment I left current room. So this game cannot be patched easily, it may need some serious rewrites ... it looks it is strongly dependent on the timing.

Link to comment
Share on other sites

4 hours ago, matosimi said:

it is of course possible, but you would need to find someone who can finalize it in RMT.

 

BTW, I tried some quick hack... to run the game on PAL, then switched to NTSC during gameplay and put RTS,NOP,NOP to $3006 to disable cmc play routine execution.... however the game crashed the moment I left current room. So this game cannot be patched easily, it may need some serious rewrites ... it looks it is strongly dependent on the timing.

Indeed, it disables the OS during the frame displaying, then it gets back before the frame is done. I noticed also that if I disable the cmc playing routine, the game works ok on NTSC.

Link to comment
Share on other sites

3 hours ago, miker said:

Hmm... I wonder is it too-many-cycles-issue or maybe cmc-player isn't designed to play proprerly in NTSC.

 

Just my shot in the dark.

I did some testing, on PAL and NTSC emulation at least, and realized that cmc takes a lot of cycles from time to time. That was the case when I “fixed” games such as “Johnny’s Trouble” for NTSC.

 

Anyway, because of that, I agree with you that CMC was not designed for NTSC machines.

Link to comment
Share on other sites

  • 2 weeks later...

Hi. Nice tool!

Currently one big drawback of RMT is lack of "automation". Whenever your musician provides a new version of RMT you have to open the GUI, export to stripped version, copy stuff to features etc. We are greatly missing command line option to perform these operations to include it into build process.

Link to comment
Share on other sites

2 hours ago, ilmenit said:

Hi. Nice tool!

Currently one big drawback of RMT is lack of "automation". Whenever your musician provides a new version of RMT you have to open the GUI, export to stripped version, copy stuff to features etc. We are greatly missing command line option to perform these operations to include it into build process.

Do not forget that if you have 2 RMT modules, you need to "merge" rmt_feat flags in order to play both modules correctly using single RMT player... so it is not very easy to do this anyway.

If you need to dynamically move RMT module here and there, you can use one of examples from MADS archive ... rmt_relocator.mac , which is the macro that allows you to relocate RMT module anywhere you want w/o need to export again - but honestly I have not used it so far.

Link to comment
Share on other sites

7 hours ago, ilmenit said:

Whenever your musician provides a new version of RMT you have to open the GUI, export to stripped version, copy stuff to features etc.

Not that I'm keen to do this, but it sounds like a very easy task to perform with

AutoIt:

https://www.autoitscript.com/site/

 

I've used that several times when no command line was available and especially if the GUI is "stable" (which for RMT is very true), the invested setup-time for a script is saved soon.

Link to comment
Share on other sites

On 6/3/2020 at 8:47 AM, ilmenit said:

Currently one big drawback of RMT is lack of "automation".

Not anymore. Ok, I was too curious, so I've tried to build a small AutoIt script.

Result "cmdrmt.exe" is attached:

* put that into the RMT folder where "RMT.exe" is located

* takes two mandatory arguments: INPUTFILE OUTPUTFILE (where INPUT file is the "normal" RMT file and OUTPUT is the stripped version)

* all paths (also feature file (see below)) have to be absolute!

* optional arguments:

  /SFX -> sets SFX toggle before export

  /ADR ADDRESS -> set target (hex-)address (default is 4000)

  /f FILENAME -> create feature file

* argument info is displayed with "/?", "/h" or "/help"

 

Of course the script could be enhanced to support other options or operations. So I've attached the source.

Please note that the operation sequence currently breaks, if e.g. RMT complains about empty song line waste before exporting.

So don't waste song lines or adapt the script to handle those situations too.

Yes, the "remote control" is nearly 4 times bigger than RMT, but it's just the site the script compiler produced. (And who really cares...)

 

Performed basic testing (Windows XP, 32 bit German), if you find issues, you may can try to bribe me... ;-)

cmdrmt.exe cmdrmt.au3

  • Like 1
Link to comment
Share on other sites

6 hours ago, Roydea6 said:

Anti virus program complains about a trojan and blocks the program.

https://www.autoitscript.com/forum/topic/34658-are-my-autoit-exes-really-infected/

 

Edit:

If you don't like to use the compiled exe, you could also install "AutoIt" and execute the script with:

AutoIt3.exe cmdrmt.au3 ARGUMENTS...

 

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