Skip to content

XM6 VGM mod

Current version: 2.05 (updated on 2021-09-15)

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

XM6 VGM mod

Post by ValleyBell »

[release 2013-11-30 note:] Here my small contribution to vgmrips' second birthday:

Program: XM6 2.05 (homepage)
Program Type: VGM Creator/Emulator
Platform: Windows (32-bit)
Logs chips: YM2151, OKIM6258
Comment: Modded by Valley Bell to log VGMs and MIDIs.

Win32 Binary / Source

Many thanks to 2ch-H for translating the BMP screenshot texts.


Notes:
- Can write VGM logs and make BMP screenshots in native resolution.
- .NET Framework 4.0 is required to run the emulator. (I haven't yet been able to compile it with VS 6.0 yet.)
- Unlike WAV logging, clicking the "Output VGM" entry toggles between starting and stopping the VGM log.

Source code notes:
- If you want to compile the source code, you need to apply the .diff file to the contents of xm6_205s.zip.
- On Western systems, you also need to manually convert the file mfc\mfc_res.rc from Shift-JIS to Unicode (UTF-16).

Old versions
XM6 v2.05 VGM+MIDI mod 2020-05-09 Win32 Binary
XM6 v2.05 VGM+MIDI mod 2017-01-21 Win32 Binary / Source
XM6 v2.05 VGM mod 2014-01-29 Win32 Binary / Source
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I did a small update to the XM6 VGM mod.

It can now write BMP screenshots and it does that at the native resolution, i.e. unstretched.
That also means that I won't accept and fix any stretched X68000 screenshots anymore, btw.


Known issues: The Japanese texts related to the BMP menu entry need to be fixed. Currently the descriptions are a copy-pasted from the WAV/VGM ones.
Since I don't trust online translators a lot, I'd be happy if someone could PM me the correct texts.

I need: done

Code: Select all

IDM_SAVEBMP			"Save the screen to BMP file"
IDS_BMPOPEN			"BMP Picture Files (*.bmp) ..."
IDS_BMPWRITTEN		"BMP written"
EDIT: Updated, now with fixed Japanese BMP texts. Please redownload.

Post by vampirefrog »

It says "Initializing the virtual machine is failed." Am I missing something? Also, could you drop a link to the original source, and some brief instructions on how to compile (what version of visual studio you used)?

I'm on Windows 8 64bit in case that matters.

Thanks!
Last edited by vampirefrog on 2014-02-25, 4:44:42, edited 1 time in total.

Post by Sonic of 8! »

vampirefrog wrote:"Initializing the virtual machine is failed."
The most common error with this message is that you dosen't have the Sharp X68000 BIOS files (or you have, but their names/extension are wrong) installed.

Use your favorite search engine (e.g.: Google) to search and download these two files called cgrom.dat and iplrom.dat, and put them into the same directory that XM6.exe is resident. If you have the x68000.zip file (X68k BIOS for MESS) on your HDD, it should work, too.
オモいカルチャーをオモチャーと言う - 細野晴臣

Post by vampirefrog »

Apparently, I had a different version of xm6, that perhaps did not require iplrom.dat?

It seems to be a more recent version than the one in this thread:

I got it from here: http://mijet.eludevisibility.org/XM6%20 ... o-68k.html
Image

And here is the one posted by ValeyBell
Image

It seems some menu options are missing, and I'm not sure what the order is, but I think the one from mijet is more recent? Can someone clear that up please?
  • User avatar
  • tails_ Offline
  • Posts: 170
  • Joined: 2012-03-18, 16:59:23
  • Location: Tomsk, Russia
  • Contact:

Post by tails_ »

XM6 Pro-68k is a fork of XM6 version 2.06 with additions like memory states, CPU logging etc.
XM6 VGM mod is based on XM6 version 2.05.
I just took a look at PI's page and there indeed was a link to newer version at right side of the page, dummy me for not noticing it :(

P.S. 8px window borders, seriously? D:

Post by vampirefrog »

So, as it turns out, there are several versions of XM6 available:

1. The original XM6, version 2.06, without source code available.
2. XM6 version 2.05 with source.
3. XM6 Pro-68k, without source.
4. XM6 TypeG, without source.

Both XM6 Pro-68k and XM6 TypeG have improvements over 2.05.
  • User avatar
  • tails_ Offline
  • Posts: 170
  • Joined: 2012-03-18, 16:59:23
  • Location: Tomsk, Russia
  • Contact:

Post by tails_ »

Don't forget XM6i
http://xm6i.org/

Post by vampirefrog »

In the meanwhile, I've managed to convince mijet to add VGM logging to XM6 Pro-68k, and he's made a release in the meantime too (2014-03-16) http://mijet.eludevisibility.org/XM6%20 ... o-68k.html
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

This had been on my TODO list for a while - I modified XM6 to log MIDI files.
(I wanted to log stuff from Akumajou Dracula without having to rely on 3rd party tools - because producing any sort of load screws up the timing.)
As usual, you can download the Win32 Binary or the Source diff.

MIDIs are logged with 960 ticks per quarter currently. (so that WinJammer doesn't complain about the TpQ value)
  • WilmaD Offline
  • Posts: 2
  • Joined: 2017-06-23, 14:51:59

Post by WilmaD »

Thanks for sharing!
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

GTheGuardian made me aware of a really bad issue with the XM6 emulator and its PCM emulation:
When the emulator lags (due to system load or due to other random reasons), it can cause short interruptions of the PCM emulation that make it even into the logged VGMs.
In short: emulator lag -> jittery PCM in VGM logs

This affects the PCM samples only, the general music timing not affected. And using opt_oki on the existing rips should've fixed the issue for all packs in the archive.
However this is a serious issue with sound drivers that do software mixing / constant streaming.
So I made a quick hack to work around the issue: http://vgmrips.net/programs/creators/XM ... PCM-fix.7z

Note: While logging VGMs and causing load on your system, the PCM sounds can go off-sync with the FM.
The logged VGMs will be fine. (I said it's a quick hack.)
I may try to come up with a proper solution later.

Thanks a lot to GTheGuardian for extensive testing!
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Well, here it is finally: A small update to the XM6 VGM mod.

It now logs the DMA commands to VGM that are used for controlling the ADPCM streams.
With that information, I should be able to write a reliable version of opt_oki that is... useable at all.

You can get the new version from the OP.
Happy ripping!
Post Reply