// ============================================================================= // Workspace Setup Guide - X68000 Music Creation // Authors: Kevin Alexander // Last updated: 2023-11-16 // ============================================================================= This guide describes how to set up an environment for creating music for the Sharp X68000 computer (on Windows). It also provides general information regarding X68k music production. For further information, please read the guides in the "References" section. This doc is more for info on setting up a workspace environment. However, a quick overview of the various filetypes should prove useful if you're unfamiliar with this stuff (common files, like WAV and EXE, are omitted): Overview of X68000 Filetypes -------------------------------------------------------------------------------- Filetype | Description -------------------------------------------------------------------------------- *.MML | Music Macro Language file. You'll write these. *.X | X68k executable. *.MDX | X68k audio file format. *.PDX | ADPCM data container for audio sample playback. *.PCM | ADPCM audio file. These get packaged into PDX files. *.PDL | Mapping of PCM files used when creating PDX files. -------------------------------------------------------------------------------- Some of these programs have a variety of command-line arguments you can pass to them. One in particular in PCMCONV, which allows you to change the volume level, pitch, and so forth. Please see my extended documentation / English translation guides for more-detailed information regarding these programs. Please contact me if any download links are dead and I'll create a mirror. // ----------------------------------------------------------------------------- // Software Download Links // ----------------------------------------------------------------------------- - run68.exe - https://osdn.jp/projects/sfnet_run68/ - run68bin-009a-20090920.zip - mxv.exe - https://gorry.haun.org/mx/index_e.html - mxv200b.lzh - MXC.X - http://nfggames.com/x68000/Mirrors/x68pub/x68tools/SOUND/MXDRV/ MDX_TOOL.LZH - MDX_TOOL.LZH - PCMCONV.X - https://www.vector.co.jp/soft/x68/art/se031966.html - pcv10020.lzh - mkpdx.exe - http://x.haun.org/software/mkpdx/index_win32.html - mkpdx100b_.zip - mxwav.exe - https://gorry.haun.org/mx/index_e.html - mxwav201a.lzh - mxdrv.dll - https://gorry.haun.org/mx/index_e.html - mxdrv200b.lzh - X68Sound.dll - https://gorry.haun.org/mx/index_e.html - X68Sound_020609_g20020611.lzh // ----------------------------------------------------------------------------- // Setup // ----------------------------------------------------------------------------- The way I prefer to go about this is to add all of the utilities we're going to use to a directory, then add it to the system path. Quick note: this setup requires all files to be in the same directory, especially alongside run68. See the notes section at the bottom of this guide for more information. I recommend creating an easy-access directory, like C:\bin\x68k\. Here's how the contents of the directory should look: - C:/bin/x68k/ - ./run68.exe - ./run68.ini - ./MXC.X - ./PCMCONV.X - ./mkpdx.exe - ./mxwav.exe - ./mxdrv.dll - ./X68Sound.dll You only need those 8 files at minimum. Here's a quick overview of each: Minimum Setup for MDX Production -------------------------------------------------------------------------------- File | Description -------------------------------------------------------------------------------- run68.exe | Command-line X68k emulator. MXC.X | MML->MDX compiler. PCMCONV.X | WAV->PCM converter. mkpdx.exe | Packages PCM files into PDX. mxwav.exe | Renders MDX song as WAV. run68.ini | Dependency. mxdrv.dll | Dependency. X68Sound.dll | Dependency. -------------------------------------------------------------------------------- Next, let's set up our workspace. You can put this anywhere on your computer you want. I recommend the following structure: - ./x68k/ - ./mxv/ - (mxv files (audio player for MDX format)) - ./mxdrv.dll - ./X68Sound.dll - ./songs/ - ./samples/ - (WAV/PCM/PDL/PDX files will go here) - (MML/MDX files will go here) When you run commands, I recommend being in the directory for the files you want to manipulate. So if you're doing sample stuff, be in ./samples/. If you're compiling or rendering your track, be in ./songs/. PDL files in general can get you if you don't pay attention to relative paths. See the section regarding PDX files for more information. // ----------------------------------------------------------------------------- // Compiling MML to MDX // ----------------------------------------------------------------------------- Command: > run68.exe MXC.X {input}.mml // ----------------------------------------------------------------------------- // Converting Samples to ADPCM Files // ----------------------------------------------------------------------------- In order to use samples in your songs, like for drums and such, you'll need to convert your WAV files to PCM files. These will then be packed into PDX files when you're done with everything (see next section). Command: > run68.exe PCMCONV.X {input}.wav {output}.pcm // ----------------------------------------------------------------------------- // Packaging ADPCM Files into PDX // ----------------------------------------------------------------------------- To get your song data to read the ADPCM files, you'll need to package them in a PDX file. In the place you have your samples, create a PDL file to map your PDX files. See the NFG/GameSX guide for more details on this. Please note, though, that when you specify the PCM files in the PDL, the paths are relative to the command line's current directory. Command: > mkpdx.exe {pdl-name}.pdl // ----------------------------------------------------------------------------- // Playing Compiled MDX Files // ----------------------------------------------------------------------------- The most straightforward way to play your file is via MXV. It has a nice file system browser and everything. 01. Open mxv.exe. 02. Choose the 44KHz option (unless your computer sucks). 03. Navigate to where your MDX file is saved. If you compiled it with a PDX file, make sure it's in the same directory. 04. Choose your song in the browser and it'll play. // ----------------------------------------------------------------------------- // Rendering MDX Files to WAV // ----------------------------------------------------------------------------- Use mxwav to render your MDX songs as WAV. You can then convert to MP3 or other formats. Command: > mxwav.exe {input}.mdx // ----------------------------------------------------------------------------- // Notes and Gotchas // ----------------------------------------------------------------------------- - You cannot add run68 to your path and run X68k programs that way, unless you stick them all in the same directory. This guide relies on that principle. If you add run68 to your path and try to execute a file elsewhere, it'll throw runtime errors. Follow my setup and you'll be good. - You're encouraged to change your system locale for non-Unicode programs to Japanese. Otherwise, any compilation errors you get are going to be garbage and useless. - Learn hiragana and katakana. No, seriously. They're not too hard to learn (there's only 46 characters each, so 92 total), and they're going to make debugging WAY easier. - MDX_TOOL.LZH, the archive that MXC.X comes in, was not easy for me to extract. 7-Zip could not do it, and I had issues finding something that worked. I had to use TUGZip to get the files out. // ----------------------------------------------------------------------------- // References // ----------------------------------------------------------------------------- - https://gamesx.com/wiki/doku.php?id=x68000:mxdrv_mml_mdx_tutorial - http://battleofthebits.org/lyceum/View/MDX+(MXDRV+MML+for+Sharp+X68000)/ // ============================================================================= https://www.studioaquacube.com