X68000 mdx files to vgm
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
That would actually result in a bit worse sound quality and much larger file sizes, as the samples are converted from ADPCM to PCM, then mixed and converted back to ADPCM for streaming. By using another sound chip, you only have to store the samples once in the file and the samples should sound a bit better as they're not being recompressed...
Exactly , for that reason I posted:
But before that we need to figure out how does PCM8 selects the sample to trigger, here:
https://github.com/LeonardoDemartino/md ... ore.h#L511
I'm afraid that mdx2vgm will need to use a multichannel PCM soundchip while playing PCM8 mdxs, as you said, ctr.Delek wrote:That will complicate a little bit the stream data in the .vgms.
But before that we need to figure out how does PCM8 selects the sample to trigger, here:
https://github.com/LeonardoDemartino/md ... ore.h#L511
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
if you just need something quick, i made a quick and dirty asm template (for a 68K assembler) that you can use to create MDX files.vampirefrog wrote:I'm currently writing a MML compiler, so maybe ctr can help you instead.
Two things:
- Stereo panning of ADPCM is not working. (Samples are played back only "centered" in the .vgm)
- Different speeds of ADPCM playback is not working. (15.6/10.4/7.8/5.2/3.9KHz can be selected using the F# command in note.x MML, but the resulting .vgm uses only 15.6KHz)
- Attachments
-
- TOM_TEST.7z
- (2.66 KiB) Downloaded 227 times
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
Thanks, I'm trying to replicate what MXC.X does, and later on NOTE.X, which is pointlessly advanced. Right now I'm trying to use gnu bison to generate the parser.ctr wrote:if you just need something quick, i made a quick and dirty asm template (for a 68K assembler) that you can use to create MDX files.
I'm trying to figure out where is the panning, the speed and the sample selection in PCM8 mode for the samples in the disassembly hell of: https://github.com/mitsuman/mdx2wav/blo ... rvg_core.h
Do you guys have any idea about this?
Do you guys have any idea about this?
Most of that magic happens in the x68sound.dll, see here. The disassembly is really rough, PCM8_SUB() (which takes no arguments, everything is global) calls PCM8.Out() from the DLL. There are no defined constants, so it's a bit hard to follow...
The magic is not happening on that dll because I'm not even using it. I run the driver only and somehow and in someplaces the driver is telling "sample 1 on channel 1 and sample 4 on channel 2", "pcm stereo to xx", "pcm speed to xx" but I can't find it in the disassembly C code. This will take longer than expected...
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
- vampirefrog Offline
- Webmaster
- Posts: 1506
- Joined: 2014-01-28, 5:51:54
- blitzlunar Offline
- Posts: 127
- Joined: 2012-12-21, 15:30:24
- Location: UK
This has already proven very useful to me!
I converted Spindizzy II from the MDX files I have, and retagged them for my own purposes - all that is missing is a track order/numbers and perhaps gzip compression. I thought I'd share them here too, in case this interests anybody else ~ it's a great soundtrack by Toshiya Yamanaka! If anyone wants to take it further for a VGMrips submission that would be splendid, however do bear in mind that A) the source MDX files may be third-party approximations of the soundtrack, rather than fully legitimate and sourced from the software; I am not sure eitherway, B) I haven't listened to the VGM conversion exhaustively and cannot assure its parity with the MDXs at this time (upon initial inspection it sounds fairly accurate though.)
Download here.
I converted Spindizzy II from the MDX files I have, and retagged them for my own purposes - all that is missing is a track order/numbers and perhaps gzip compression. I thought I'd share them here too, in case this interests anybody else ~ it's a great soundtrack by Toshiya Yamanaka! If anyone wants to take it further for a VGMrips submission that would be splendid, however do bear in mind that A) the source MDX files may be third-party approximations of the soundtrack, rather than fully legitimate and sourced from the software; I am not sure eitherway, B) I haven't listened to the VGM conversion exhaustively and cannot assure its parity with the MDXs at this time (upon initial inspection it sounds fairly accurate though.)
Download here.
Terrific project!
I second what ctr says:
if managing .pdx samples (being single ADPCM channel or 8 PCM channels of PCM8 bpard), mdx2vgm could translate to OPL4 wavetable/PCM samples then I could play vgm with MSX with (YM2151)SFG-0x + (YMF-278B)Moonsound/DalSoRi/OPL4ShockWave/FM-BLASTER, and it could be such an achieving moment having real hardware on my side.
Ciao!
(actually I did some experiments with AIN's mdx player for MSX2/MSX2+/MSXturboR and it (sort of) works for FM part but I don't understand which hardware is supposed to play ADPCM or PCM even though some pdx managing is there. I have also mdx player Z80 assembly sources but not mdxdrv TSR driver sources.)
I second what ctr says:
if managing .pdx samples (being single ADPCM channel or 8 PCM channels of PCM8 bpard), mdx2vgm could translate to OPL4 wavetable/PCM samples then I could play vgm with MSX with (YM2151)SFG-0x + (YMF-278B)Moonsound/DalSoRi/OPL4ShockWave/FM-BLASTER, and it could be such an achieving moment having real hardware on my side.
Ciao!
(actually I did some experiments with AIN's mdx player for MSX2/MSX2+/MSXturboR and it (sort of) works for FM part but I don't understand which hardware is supposed to play ADPCM or PCM even though some pdx managing is there. I have also mdx player Z80 assembly sources but not mdxdrv TSR driver sources.)
Someone was working on logging this OST a little while ago. Their pack would be preferred for submission as an "official pack", as it seems they had logged all the songs from the game's sound test.blitzlunar wrote:... I converted Spindizzy II from the MDX files I have, and retagged them for my own purposes - all that is missing is a track order/numbers and perhaps gzip compression. ...