(7 replies, posted in Sega)

Oh i didn't know VGM could use 4-bit DPCM compressed sample, that explains why it couldn't convert correctly. Is it officially supported by VGM ?
To reply your question, the XGM Rom builder support VGM starting from v1.5, in fact it supports older version but PCM won't be extracted...

I updated the first post by the way smile I put a new VGM compilation rom and i also updated the XGM rom builder (fixed bugs and updated to last XGM player version).


(7 replies, posted in Sega)

I finally completed my rom builder tool so you can do your own ROM with your own VGM list smile
I also made a new VGM compilation introducing a new version of the XGM player.
I updated the first post to give which give all the information wink


(13 replies, posted in Sega)

As far i know the YMF292 is midi compatible so the Midi interface should be easy to do.
The chip has 32 channels, each of these channels can be used as a single PCM channel or as a single FM operator where you can connect a maximum of 4 of them together. The crazy thing is that the basic waveform shape is totally free (and not constrained to a pre built sinusoidal shape as in classic OPN/OPM chips)... so you can modulate a female voice waveform using an explosion waveform for instance :-p

In fact you can find a topic on NesDev which explain that is not something easy to do, maybe even not possible because of the SNES sound architecture and the SPC format itself.

I guess the one you were speaking about (only playing one SPC file) is this one :


(13 replies, posted in Sega)

Awesome !! The Sage Saturn sound chip is such a beast, the guy basically cracked the Sega Saturn (which is one of the most complex retro system to crack) just to play with its sound chip big_smile


(7 replies, posted in Sega)

I finally completed my XGM player that i started a long time ago (few time after i developed the XGM driver)...
I was really busy with SGDK and private stuff that i had to postpone my XGM player development but finally i find sometime to complete it smile
It's still not perfect, has some bugs (refresh, playback issues with fast tempo...) but still i am happy with it's current state so i think i can release it smile
XGM player is intended to play XGM music through the XGM driver. I developed a tool which allow to convert Megadrive VGM files into XGM format so you can basically see it as a Megadrive VGM player as well... The difference is that it allows to play 4 PCM at same time where Megadrive VGM is normally limited to 1 PCM channel only. But ok, that is useful only for SFX for game as there is no music tracker taking advantage of it tongue

What better than a Technosoft compilation to introduce the XGM player big_smile
Musics from the following games are included in the rom :
- Dragon's Fury
- Elemental Master
- Thunder Force 2/3/4

Because of rom size limitation i could not include all tracks for those games so i made a (personal) selection of 80 tracks.
You can find the download link at the bottom of the message.

Released a new VGM compilation for XGM player smile This time it's a tribute to Jesper Kyd and its awesome tracks (mainly from Batman and Robin).
Because of the length of the different tracks i could not put more than 26 so i had to discard a lot of them unfortunately, the selection was difficult :-/
This new compilation also introduce a new version of the XGM Player (version 2), here are the differences:
- bug fixes (still some remains with fast tempo, sometime music pause without any reason)
- added a way to disable the starfield background (START + A)
- added a way to hidden the playlist (except current playing track) for nice blind jukebox parties tongue (START + B)

You can find the download link at the bottom of the message.

I also completed my XGM Rom Builder tool so you can build your own compilation (finally).
Note that i developed the tool in java so you need Java to be installed on your system.
The tool is a bit rough but it does the job hopefully, you can find the download link at the bottom of the message.

Edit 2:
Added a new VGM compilation using the last version of my XGM player (V3).
This time this is a Streets Of Rage VGM compilation smile I picked music from all episode but a lot of them come from episode 2 which has imo the best tracks !

Technosoft VGM compilation rom : http://bit.ly/2nw9JRN
Jesper Kyd VGM compilation rom : http://bit.ly/2o74J7o
Streets of Rage VGM compilation rom : http://bit.ly/2ou2k2T
XGM Rom builder tool (updated to v1.2) : http://bit.ly/2nevliZ

Small animation showing the XGM player in action: https://pbs.twimg.com/tweet_video/CnHGA82WIAAuo9B.mp4


(13 replies, posted in Sega)

I will soon post a new version of my dev kit including an updated version of the driver.
It should support variable tempo so you won't require anymore to use 2 different tracks for NTSC and PAL systems, it also improves the DMA contention to preserve the PCM quality.
XGM has nothing to do with MML actually, MML is about editing / composing music so more related to music editor as Deflemask or VGMMaker (if we are speaking about the Megadrive) where XGM is just a driver playing the music coming from chips command logs. The advantage is that it can take .VGM as input (almost every tools can do .VGM export) and convert it to XGM, the disadvantage is that format is heavier in size than a real music format (as MML). XGM size is pretty acceptable though (smaller than optimized VGM).


(13 replies, posted in Sega)

Just to post some news, all the firsts issues with the XGM driver were resolved quickly and i just uploaded a new version of SGDK which fix a minor issue (PCM playback could be delayed in some case in some case). I think now the XGM driver is already pretty stable and can be used safely in ambitious project (as Antarex) smile


(13 replies, posted in Sega)

I would say "almost". The 4 PCM driver is feeding the DAC register in continue so when you do YM writes from the 68000 you need to :
- interrupt Z80 to take its bus
- write the YM chips (register index and value)
- restore register index to 0x2A for YM port 0 (so Z80 will write the DAC register again)
- release Z80

Also you should have a look in the SGDK sound.c source file to see how i load and control the 4 PCM driver (SND_xxx_4PCM(..) functions).
And unfortunately these 4 channels PCM drivers does not support pitch adjustment, all samples are played at a fixed 16 Khz (and 14 Khz in case the XGM driver) so there are useful only for drum and beat. There is a 4 PCM driver which does support envelop (16 levels per channel) but as the XGM driver does not support it you don't require it. In SGDK all multiple PCM drivers are done by software mixing so it only uses the FM5 in DAC mode smile

Thanks for the tip with TL, i think that is what i did initially when it was working but i wanted to have faster pause command and so only use the RR but it looks like that is not enough on real hardware :-/


(13 replies, posted in Sega)

Yeah of course i support VGM 1.6 wink xgmtool is able to take a VGM 1.5 and optimize it in VGM 1.6, actually that is a part of the VGM to XGM conversion wink I fixed the bug and i believe there is no more issue with DefleMask VGM file now  :


(13 replies, posted in Sega)

Yeah, it would be awesome to have support for XGM in the Prodigy tracker smile I think there is no way of using the driver itself to play through Prodigy, and there is no point in doing it i believe as the 68k is handling FM & PSG chip itself so it has more control.
A solution could be using the Z80 for 4 PCM playback while the 68k is handling FM & PSG, i think that is a viable solution.
I know there is some bug in the xgmtool and that was expected tongue  Many possible bugs in the VGM to XGM conversion process wink
About the hardware itself, there is still the pause command which does not work on real hardware... i have to investigate it as i got it to work at some point. What i'm doing now is to put RR to max for each operator then keying off every channel. It should work (and work on emulator) but it does not on real hardware where some notes continue to play :-/


(13 replies, posted in Sega)

Thanks smile and sorry i forgot to introduce myself !
I guess there is a section for that wink


(13 replies, posted in Sega)

I also posted this new in the SpriteMinds forum (devoted to 16 bits sega programming) and Sega-16 forum but i think it can be interesting to post it as well so here it is !

I released a new version of SGDK, a sort of SDK for the Sega Megadrive that you can find here :

The big addition of this version is the new sound driver : the XGM driver.

Here is what this driver supports :
- 5 FM + 4 PSG + 4 PCM @14 Khz playback
- 16 priority levels for SFX play through PCM.
- support music pause / resume command.
- automatic DAC enabled handling when PCM are played.
- no size limit for XGM music data and PCM data.
- PCM must have their size and address aligned to 256 bytes.
- 100% running on Z80
- protection against DMA contention to preserve good PCM playback quality (not 100% guaranteed depending the driver load).

The XGM format is similar to VGM in the way it uses chip writes logging but is optimized for the Sega Megadrive where VGM support various systems. Because of that the XGM file size is usually about 30% smaller than VGM file (of course i am speaking about optimized VGM).
The advantage of using that type of format is that SGDK enable VGM playback directly through the XGM driver !
I developed a new tool (xgmtool) which convert a VGM file into a XGM file, it was a pain in the ass to convert my java tool in C but it's working now smile Actually xgmtool can do a lot more than that, it is a powerful tool to optimize the Megadrive VGM file (require 1.5 vgm file at least) ! I was really disappointed with the current available VGM utilities... not able to find a working VGM optimizer, or maybe i used them incorrectly but i tried hardly at least... so i had to develop my own tool :-/
There are restrictions in the VGM optimization and the XGM convertion: the XGM format uses frame based timing so if a VGM file use sub frame timing then the conversion may fails...

Currently there is unfortunately no tracker taking advantages of the XGM 4 PCM channels and that is a reason why i decided to post the new here smile Of course basically the Sega Genesis has hardware support for 5FM + 4PSG + 1PCM (or 6FM + 4 PSG) so it's normal to find this configuration in dedicated Sega Megadrive tracker software. With this new driver, the number of PCM channel can be increased to 4 and i believe it could be nice to have a tracker supporting this feature (in which case only XGM export is available).

For those who are interested, here are the XGM format specifications:
https://raw.githubusercontent.com/Steph … in/xgm.txt

Note that the Z80 XGM driver does not directly play the XGM file, it requires a compiled XGM file (thanks to xgmtool) which is very similar to the XGM format with some slight changes to make file parsing a bit easier for the Z80 smile

You can find an example in the usual sound sample:
source and binary