TFM Music Maker

Talk about development tools here

Moderator: BigEvilCorporation

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Apr 09, 2007 9:44 pm

I asked for our local (russian) SMD guru HardWareMan to check SSG-EG on real YM2612, and he confirm: 90H+ registers affects to sound in similar way like SSG-EG on YM2203. Purpose of bits of 90H+ registers still to be examined (is it compatible with YM2203 or works in a different way).

Yesterday I made port of TFC (compiled TFD dumps) player for SMD, and it work, but still has some problems. When I'll solve it, I'll release source code of player here.

Stef
Very interested
Posts: 3075
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Apr 09, 2007 9:57 pm

Shiru wrote:I asked for our local (russian) SMD guru HardWareMan to check SSG-EG on real YM2612, and he confirm: 90H+ registers affects to sound in similar way like SSG-EG on YM2203. Purpose of bits of 90H+ registers still to be examined (is it compatible with YM2203 or works in a different way).
Unfortunatly i can't give you informations about that :-/
Steve Snake claimed the SGG-EG support is buggy on YM2612, anyway i'm emulating as it should be (as the YM2203) and it work correctly on the game using it :p
Yesterday I made port of TFC (compiled TFD dumps) player for SMD, and it work, but still has some problems. When I'll solve it, I'll release source code of player here.
By the way, does the TFM editor support panning for YM2612 chip type ? if not, do you think it can be added ? thanks :)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Mon Apr 09, 2007 11:44 pm

Stef wrote:Unfortunatly i can't give you informations about that :-/
I meant - we will examine it:)
Stef wrote:By the way, does the TFM editor support panning for YM2612 chip type ? if not, do you think it can be added ? thanks :)
At now I don't plan to support panning. Reasons:

- YM2203 does not support panning, and TFM not support panning for FM part too (because analog outputs from each YM2203 is mono).

- Tracker renders sound in mono. While tracker works, it emulates 3xYM2203 (2 for TFM, 1 for instrument editor). So If I change code to stereo render, it will add additional overhead for CPU without new features for main program's purpose (it's TFM editor, after all). Because many retrocomputer hobbyists here is has old PC's, I don't want to raise system requirements without serious reasons (they already point me that program draws screen keyboard with flicker in Win9X;).

- As you know, stereo output on SMD available mainly in emulators, not all real consoles has stereo output. So lacks of panning is not big limitation.

Anyway, you can get somewhat limited stereo support with small modification of replayer - change panning for some channels in initialize, and make music with that panning preset in mind. It's like as old good MOD days.


I think, it will be better, if I make subversion of editor especially for YM2612 when it will be completely finished. At now, I don't want to complicate project support with having two versions.

TascoDLX
Very interested
Posts: 259
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Mon Apr 09, 2007 11:54 pm

Stef wrote:Steve Snake claimed the SGG-EG support is buggy on YM2612, anyway i'm emulating as it should be (as the YM2203) and it work correctly on the game using it :p
I went back and checked Asterix SFX 04. The "SSG-EG" values it uses are 0xF0 for all operators. It sounds the same in Fusion and Gens, and doesn't really sound wrong, although I have no idea what it's supposed to sound like.

Could be a misunderstanding on the programmer's part.

TmEE co.(TM)
Very interested
Posts: 2409
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Tue Apr 10, 2007 5:30 am

Asterix BGM2 : http://www.hot.ee/tmeeco/ASTERIX2.OGG
It does sound different from Fusion
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Tue Apr 10, 2007 7:26 am

I solved problems with player. It still in 'beta' state (maybe I'll change it a little), but it works fine.

On rapidshare.com or on mediafire.com (1.8MB)

There is a snapshot of my working directory, including cross-assemblers (AsAsm for M68K and SjAsm for Z80) and TFMCOM utility (newer versions of utility will be available here, but note that it's a slow russian site). You can make example SMD ROM with one click on compile.bat file.

Z80 source code is not very readable, because it was adapted both from ALASM assembler (ZX-native, very differs from popular cross-assemblers) and from TFM device, which mapped into I/O space instead of memory. I also unrolled channels macro, because it difficult to adapt it for any of cross-asm's which I know.

Player loads into Z80 RAM. I tried to make sync on 50hz (because tracker always assume 50hz update frequency) by YM2612 timer, like in Zyrinx games, but I not sure it works properly.

How to export music from tracker: load module, File>Export>Register dump. You'll get *.TFD file. It's a big registers dump. This dump compiles by TFMCOM (see in .bat file) in much smaller *.TFC file, which can be replayed by Z80 player. Note that tracker not corrects note frequences in that case (as it does for *.vgm export), so music can sounds somewhat pitched. I'll add *.tfd export with correction in next version of tracker. Also, don't forget that exporter in current version of tracker works not stable.

Music data (*.TFC file) must be placed within boundaries of one ROM bank. I.e., crossing of bank boundaries is not supported by player (it plays data as six independent LZ-like packed streams, so it's hard to add bank switching). Within one bank any offset can be used.

Those who has SMD flash-cart can check about SSG-EG in different music modules - export module from tracker, make ROM, and run on real hardware and in any SMD emulator to compare sound.

Feel free to share this information and to host player code on your site(s) if you want (because I don't have own site).

TascoDLX
Very interested
Posts: 259
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Tue Apr 10, 2007 10:42 am

TmEE co.(TM) wrote:Asterix BGM2 : http://www.hot.ee/tmeeco/ASTERIX2.OGG
It does sound different from Fusion
Sure does... thanks for checking. For the record, the instrument in question uses 0x0F as its SSG-EG values.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Apr 11, 2007 2:32 am

Z80 SMD driver is updated. Fixed (and rewritten) initialization of YM2612, removed duplicated code of channels processing by using macro.

rapidshare or mediafire (only z80 source code).

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Apr 11, 2007 3:04 pm

I forgot to say. Because player uses packed stream of registers data, it's completely independent from editor. It mean next things:

- Editor can be modified and improved, and it does not require player update/improve
- Player can be used to play data from any editor (they must have VGM/GYM export function) or even for play music ripped from games
- One player can be used to play music from different editors

Some utility to convert GYM to player format is already exists, but it not very usable (GYM>some old format>TFC). If somebody is interested in such usage of player, I can make better converter from GYM/VGM to TFD.

WayneK
Newbie
Posts: 7
Joined: Tue Apr 17, 2007 8:58 pm

Post by WayneK » Wed Apr 18, 2007 10:26 am

Just to say, thanks for this great tracker/replayer Shiru... I've only played around with it a little bit so far, but it's clearly a long way ahead of the other editors on Megadrive. Finally, some intros/demos/productions with good music should be coming soon - just what the scene needed!

zinger
Very interested
Posts: 60
Joined: Thu Apr 19, 2007 12:39 am
Location: sweden
Contact:

Post by zinger » Thu Apr 19, 2007 12:43 am

Man, this is really a dream come true for me. I've always wanted to be able to write MD music, and finally a great tracker is available! Fantastic instrument and pattern editor, can't wait for the future releases.

Will PSG and PCM support ever be added? Where's the donate button? Fantastic work! :)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu Apr 19, 2007 6:39 pm

zinger wrote:Will PSG and PCM support ever be added?
Not in close future, but maybe later.

By current moment, editor develops mainly for TFM device. SMD compatibility in FM part is a something like free bonus. When editor will reach for stable version (with all planned features in FM part, better usability, and bugs free), I'll maybe make two subversions - especially for TFM and SMD, with support of its specific features (and modules/instruments interchange, of course).

From editor side, there is not a problem to add DAC support. But it's a big problem from Z80-driver side, to combine sample player with music stream depacker/player (very slow bankswitching, low sample rate, jitter). I don't want to make a 'virtual' tool, which will produce music (in VGM or WAV formats, for example) which impossible to use on real system. So I'll add DAC support only when I figure how to combine DAC/FM parts together.

For PSG, it's a bigger problem to add its support from editor side. which require many work. But also it will be a bigger advantage because it can be used as editor for SN76489 systems, like SMS/GG/Coleco. From player side there is no problem to support PSG.
zinger wrote:Where's the donate button?
PayPal does not work with my country, so there is no donate button, and no acceptable way to make donate. You can donate (for me and all scene) in form of making of good music instead.

zinger
Very interested
Posts: 60
Joined: Thu Apr 19, 2007 12:39 am
Location: sweden
Contact:

Post by zinger » Thu Apr 19, 2007 8:47 pm

Sounds great Shiru, no fun if it doesn't work on a real system ofcourse!

I've been playing with the tracker today, and I have to say, it really works great! You should add a shortcut for semi-note and octave transpose though.This is a little test I made today, is it possible to play VGM files on a real system yet? Would love to try it! :)

http://midnightsleazy.se/PSYCHO-SHOCK.mp3

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu Apr 19, 2007 9:19 pm

zinger wrote:You should add a shortcut for semi-note and octave transpose though
Which keys I must assign for this operations (Ctrl+..)?

Transpose operations also available in pattern menu (press right mouse button on selected block). In future versions I also plan to add full shortcut redefine support.
zinger wrote:This is a little test I made today
Sounds good.
zinger wrote:is it possible to play VGM files on a real system yet?
Yes, although its not very comfortable by present time. You must take archive from my post Apr 10 10:26am, replace z80drv.asm by file from my post Apr 11 5:32am, export your music from editor as *.tfd file (File>Export>Registers dump, save as music.tfd), replace file from archive with your file, and run compile.bat. You'll get a TFMSMD.bin file, which is SMD ROM. Test this file in emulator, and if it play OK (note that it will be slightly pitched because current version of editor does not have freq. correction for *.tfd file), you can use it with any SMD flash cartridge on real console (note that player not tested on real hardware yet, but it must work).

TmEE co.(TM)
Very interested
Posts: 2409
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Apr 20, 2007 5:30 am

For DAC, you could use mine, or Stef's driver, these are VERY optimized !!! Sampling rate on my latest version could be up to 65KHz (lot more than you'll ever use) and Stef made a 100KHz thing (I've not seen the source yet, only core part). Check "How can you do music on MegaDrive" topic on Mega Drive / Genesis forum.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply