Skip to content

Tool to reverse a VGM file (SN76489 only)

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

Moderator: Staff

  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Tool to reverse a VGM file (SN76489 only)

Post by Tom »

So, someone on smspower wanted to know if it was possible to reverse a VGM file, e.g. to make it play backwards. After a first, clumsy attempt, in which I merely reversed the order of all the commands, resulting in something extremely broken, I later decided to waste time on something which probably isn't going to be ever used by anyone, but eh. Since it's related to VGM, I guess I can post it here as well.

Note that the version I am attaching here is "0.1.1" (opposed to the "0.1" on smspower), I did two minor improvements but it's basically the same. I'll align the versions later, hopefully with a "0.2" or something.

I'll release the source code soon, but it's completely uncommented for now and I think it would give everyone a headache.

UPDATE: see post below for version 0.1.2 complete with source code; it's still a complete mess, but I commented it today, so you might be able to read it, I don't promise you won't get a headache anyway, though.

As I said over there, please note:
  • PSG only
  • uncompressed VGM only
  • up to VGM version 1.50
Have fun! Or don't.
Last edited by Tom on 2018-03-03, 1:55:54, edited 1 time in total.
Also known as nineko.

Post by vampirefrog »

Tom wrote:Have fun! Or don't.
You can't tell me what to do!
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

Version 0.1.2 is attached to this post. I took my time to comment my code, which is still confusing, but at least it has comments everywhere now.

I doubt I'll ever work again on this.
Attachments
Vgm Reverse 012 (with source).rar
Version 0.1.2 complete with source code
(9.28 KiB) Downloaded 263 times
Also known as nineko.
Post Reply