Sonic and Sega Retro Message Board: VGM Logging with Gens/GS - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

VGM Logging with Gens/GS that includes PCM and PWM

#16 User is offline Andlabs 

Posted 27 September 2010 - 12:35 PM

  • 「いっきまーす」
  • Posts: 2070
  • Joined: 11-July 08
  • Gender:Male
  • Project:Writing my own MD/Genesis sound driver :D
  • Wiki edits:7,061
Random: what exactly is your optimizer doing when it calculates "blocks?" I'm assuming it's possible to only store the original samples at one frequency and use the PCM chip registers and individual channels's memory banks to change playback rate and bank, like the original Sonic CD code does — for the record, the original SNCBNK file for Collision Chaos is 236KB (which includes the actual driver code, the SMPS data for both the music and some SFX, and the SFX samples themselves).
This post has been edited by Andlabs: 27 September 2010 - 12:36 PM

#17 User is offline ValleyBell 

Posted 27 September 2010 - 05:07 PM

  • Posts: 137
  • Joined: 08-September 10
  • Gender:Male
  • Project:vgm tools and vgm packs, other random projects
  • Wiki edits:10
Actually I'm storing the original samples as they are stored in SNCBNK files. It works just like you described Sonic CD's driver.

The "blocks" are based on the chip's banking system. When sound driver writes data to the PCM RAM, it fills a complete bank consecutively (usually from address 0x000 to 0xFFF - a bank has 4 KB). These consecutive writes are merged to one "block" (maybe I could also call it "bank"). -Step 1
Then it compares all blocks with each other and generates a "block database". There it writes down where it needs to write which block. -Step 2
During Step 3 the database is written and the actual blocks are replaced with pointers to the database.
Note: a sample can take more than one block

I hope that helps to understand the "blocks". Sorry, but I can't explain very well.

Btw: Theoretically OptVgmRF could be improved. It's block size is 0x1000 (one bank), but the start-address-register has a step size of 0x0100.
In practice no game seems to start a sample in the middle of a bank.

#18 User is offline Puto 

Posted 27 September 2010 - 05:52 PM

  • Shin'ichi Kudō, detective.
  • Posts: 1977
  • Joined: 31-July 05
  • Gender:Male
  • Location:Portugal, Oeiras
  • Project:Part of Team Megamix, but haven't done any actual work in ages.
  • Wiki edits:51
If I recall correctly, compressing an unoptimised DAC-VGM with 7-zip/LZMA would get me very small filesizes (50kb~ range) even without using optvgm. That might work for PWM VGMs too.

#19 User is offline Andlabs 

Posted 27 September 2010 - 05:58 PM

  • 「いっきまーす」
  • Posts: 2070
  • Joined: 11-July 08
  • Gender:Male
  • Project:Writing my own MD/Genesis sound driver :D
  • Wiki edits:7,061
Okay, cool. I wonder exactly what will happen if we try to use optimization techniques on 32X VGMs considering how different games use the PWM to different extents... I don't have high hopes for any compression on After Burner Complete.
This post has been edited by Andlabs: 27 September 2010 - 06:00 PM

#20 User is offline nineko 

Posted 27 September 2010 - 06:29 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
Yes, I was actually thinking about that game when, in one of my earlier posts, I said that the PWM is used like multiple DAC streams most of the times, implying that there are some games that do other things with it :P
Not sure how it should be compressed, but on the other hand I am very happy to have been proven wrong about the PCM streams, so I'll just wait for ValleyBell's next move smile.png

edit: here's a video in case someone isn't familiar with that game:

Jump to 0:44 and listen to those guitars. Yes. Yes they are.
This post has been edited by nineko: 27 September 2010 - 06:33 PM

#21 User is offline Hendricks 266 

Posted 27 September 2010 - 07:34 PM

  • Posts: 326
  • Joined: 01-June 05
  • Gender:Male
  • Location:United States
  • Wiki edits:58
QUOTE (ValleyBell @ Sep 27 2010, 12:20 PM)
PWM doesn't have a very high priority for me because Gens/GS lacks still the accuracy for "good" vgm dumps with DAC or PWM.

Talk to Steve Snake. I'd love to see SCD and 32X VGM dumps in Fusion.

#22 User is offline DalekSam 

Posted 28 September 2010 - 04:05 AM

  • woop woop yo ass too fat
  • Posts: 1753
  • Joined: 19-February 08
  • Gender:Male
  • Location:Northern Ireland, Belfast
  • Project:nothing
  • Wiki edits:165
I'm pretty sure I'm overlooking something here, but is there a possibilty this new format spec be put into in_vgm? It's kinda tedious using a seperate program for VGMs, and I'd really like to be able to casually open 32x VGMs. :/

#23 User is offline Overlord 

Posted 28 September 2010 - 02:29 PM

  • "I am Death, not Taxes. I turn up only once."
  • Posts: 12409
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Likewise for the foobar VGM player (foo_gep).

#24 User is offline ValleyBell 

Posted 29 September 2010 - 04:35 PM

  • Posts: 137
  • Joined: 08-September 10
  • Gender:Male
  • Project:vgm tools and vgm packs, other random projects
  • Wiki edits:10
There are already some people that work on the implementation of the recent vgm spec. It doesn't look like Maxim is doing something to in_vgm, but others showed some interest.
And just to mention it: I'm using my vgm player quite often because I hate to kill Winamp's playlist by double-clicking a file. But I still like in_vgm.

QUOTE (ValleyBell @ Sep 22 2010, 10:57 PM)
Also I want to ask, if some people that are very familiar with 32x hardware can help me to find the best way (I.e. small files) to log the PWM.

When I wrote this I thought of some way to emulate the 32x synthesis, but since I read that it's software syntheses (done by a game's eingine?) the only way seems to be the current way of logging (and a DAC-like way to optimize).

#25 User is offline DalekSam 

Posted 02 October 2010 - 04:57 AM

  • woop woop yo ass too fat
  • Posts: 1753
  • Joined: 19-February 08
  • Gender:Male
  • Location:Northern Ireland, Belfast
  • Project:nothing
  • Wiki edits:165
I was trying to show some people on #smwc about this, but unfortunately they cannot download the Gens/GS update. Any chance of re-uploading it or putting it somewhere else?

#26 User is offline ValleyBell 

Posted 03 October 2010 - 04:28 AM

  • Posts: 137
  • Joined: 08-September 10
  • Gender:Male
  • Project:vgm tools and vgm packs, other random projects
  • Wiki edits:10
I checked the links and they work fine for me. Maybe they have problems with Mediafire in general. Maybe someone could mirror the files on a private webspace.

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users