Skip to content

MAME/MESS VGM mod

Current version: 0.256 (released on 2023-06-28)

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

Post by ValleyBell »

Surprise - we now have a VGM mod of MAME 0.236 - only 5 days after the official release!
This almost feel like the old times when I often released the VGM mods shortly after the official release.

In any case, this should be the best MAME VGM mod of the last few years.
I worked hard and finally fixed many issues that plagued the previous versions:
  • NES DPCM is logged again
  • experimental SCSP and WonderSwan logging works again and finally captures all the RAM writes required for proper playback
    WonderSwan logging now works the first time ever - and it turned out I actually had a few bugs in the logger.
  • A few chips that dumped ROMs with incorrect sizes should now use the correct ROM size.
  • In 0.222 the ROM dumps (and VGM logs) may be incomplete when it tried to dump a full "address space" due to accessing invalid memory offsets.
    This is caused by the address space consisting of muliple parts (ROM, RAM, I/O handlers) and are pointing to arbitrary locations in host memory.
    MAME 0.236 VGM can now detect that and will just dump an empty data block, but with the "ROM size" field being set correctly.
There are a few things that do not work though:
  • C140 dumps don't work in VGMPlay. MAME changed the way banking works there (they simplified it) and VGMPlay doesn't like the new banking method.
  • C219 RAM is not dumped. (Doing this properly may require per-game RAM write filtering to prevent the VGM log size from exploding. I'm not sure if I want to do that.)
  • ES5505/6 support was axed.
You can get the new version from the OP as usual.
Happy ripping!

Post by Mao (RN22) »

so does it mean, i can rip super chase music into vgm?
To-Do list:
?

Current Status: I could only upload 5 VGM packs per VB's stream.
Tempo: 105.95%
Pitch: +1.00

Better Call Mao!

Image

Please, check my WIP list for more updates.
  • ctr Offline
  • Posts: 492
  • Joined: 2013-07-17, 23:32:39

Post by ctr »

RN22 wrote:so does it mean, i can rip super chase music into vgm?
No.
  • LF222 Offline
  • Posts: 1
  • Joined: 2021-12-07, 4:47:40

Post by LF222 »

Link seems to be dead
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

It works fine in Firefox. Please check your browser.
  • User avatar
  • xKingDukeNukemx Offline
  • Posts: 23
  • Joined: 2021-12-04, 4:27:23
  • Location: Underground

Batman OKI6295 Incompatibility

Post by xKingDukeNukemx »

So Batman Atari Games cannot Log OKI6295 correctly. as VB|Work told me, it could be a result of Custom Bankswitching. Maybe anyone else might know more, But yeah it's definitely logging the Wrong PCM Sounds.
Nukem All
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I'm trying to collect the bugs VGM logging related bugs in MAME 0.236.

Aside from "broken PCM due to custom banking", are there any other bugs?

So far I know:
  • Sega Pico PCM logging not working
  • Crypt Killer: sample ROM issue due to ROM+RAM setup
  • Tough Turf is crashing
BoxCubed/GTheGuardian: Do you have any custom modifications that should be part of the VGM mod in the future?
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Okay, here it is: MAME 0.244 VGM mod.

I took some extra time to fix the Sega Pico PCM issues.

Things to note:
  • when dumping VGMs from non-linear or RAM spaces, the VGM will now fill the data with 00s instead of dumping an empty data block
    This makes e.g. C219 logs easier, as you can just copy-paste a RAM dump into the VGM without having to manually resize it.
  • The VGM mod includes the K054539 DPCM fixes.
  • Sega Pico PCM is fixed and now works properly the first time since MAME 0.164.
    VGM dumps will sound very scratchy in VGMPlay 0.50/0.51 though due to a bug in the uPD7759 core. (It is already fixed in the libvgm source code on GitHub.)
  • C140 ROM dumping does still not work.
    MAME stores the ROMs internally in such a way that every second byte is 00 and I'd need to explicitly remove every 2nd byte during the dumping process to make the VGM work. And I didn't feel like going the extra mile for now.
    A possible workaround is to dump one VGM using MAME 0.200 and copy the ROM + the C140 bank type (VGM header value) over from that dump.
You can get the new version from the OP as usual.
Happy ripping!

Post by Mao (RN22) »

have problems with this c140 trimmed vgm. it crashes when i tried vgm_sro'ed it.
Attachments
marvland_0_trimmed.vgm
pls fix c140 dump.
(604 KiB) Downloaded 73 times
To-Do list:
?

Current Status: I could only upload 5 VGM packs per VB's stream.
Tempo: 105.95%
Pitch: +1.00

Better Call Mao!

Image

Please, check my WIP list for more updates.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I can't be bothered to delay the VGM mod release any further just to fix a few more bugs. (I had the initial port ready a week after the official 0.248 release, but I wanted to do some thorough tests.)
So here it is: MAME 0.248 VGM mod.

What we have here is basically the same as MAME 0.244 VGM mod, but with all the updates from MAME 0.248. (And a few minor fixes to C140 logging.)

Known bugs:
  • Sega Pico PCM suffers from a few bugs where certain games don't play sounds at all. (That was an issue in MAME 0.244 already and I'd need at least another day of research in order to fix it.)
  • NES DPCM logging is broken. For NES ROMs, the dumped DPCM ROM data may be wrong. Famicom Disk System currently crashes when trying to dump DPCM data.
    I tell you - the NES APU sound core really has a way to accessing ROM that is very dumping-unfriendly.
You can get the new version from the OP as usual.
Happy ripping!

Post by brickblock369 »

I have been exporting VGM files from the game Penguin Brothers (aka Hong Tian Lei / A-Blast in Taiwan) using this fork of MAME, but completely incorrect samples are playing in the VGM, compared to the original arcade game.

The audio uses X1-010, by the way.
Attachments
ablast_0.vgm
(2.05 MiB) Downloaded 53 times
penbros_0.vgm
Penguin Brothers and A-Blast are the same thing, just regional differences
(2.61 MiB) Downloaded 48 times
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I'm afraid that this game uses banked sample ROMs. Banking will unfortunately break the VGM logs, as the VGMs capture the sample ROMs only at boot time.
You can fix the VGMs after logging them by overwriting the logged sample data with dumps taken during song playback. This is manual work though.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Surprise - it's MAME 0.256 VGM mod.
The official MAME 0.256 release was only about 24 ago, so I guess this is a new record? (TBH I was prepared this time.)

Known bugs:
  • same as with MAME 0.248 (bugs with Sega Pico PCM and NES DPCM)
  • It currently always puts "Arcade Machine" into the VGM system tag. This is due to MAME removing the flag for marking systems as "arcade". I may try to improve the detection whether or not this is an "arcade system" in the next release of the VGM mod.
You can get the new version from the OP as usual.
Happy ripping!
Post Reply