Skip to content

Valkyrie No Densetsu

Namco System 2 (YM2151, C140)

Moderator: Staff

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

Valkyrie No Densetsu

Post by ValleyBell »

TitleValkyrie no Densetsu
ComposerHiroyuki Kawada
SystemNamco System 2
Sound ChipsYM2151, C140
Tracks18
Playing time31:18
Pack author2ch-H
Pack version1.01
Last Update2022-07-23

Post by tcmbackwards »

The YM2151 is too quiet in several of these files. I tried to edit them myself but I can't find how to create the extra header required to set chip volumes. Is there a guide anywhere on how to do it? Do any of the tools add the header?
  • ctr Offline
  • Posts: 492
  • Joined: 2013-07-17, 23:32:39

Post by ctr »

Post by tcmbackwards »

Excellent. I added the header and I can adjust volumes.

Now, is it a better idea to boost the YM2151 or attenuate the C140? I've seen posts about how System 2 volume is supposed to work:
I already added an "extra header" section that allows to adjust the chip volume on a per-vgm basis in v1.70.
I just haven't written tools that write these values yet. (Currently I resize the header with vgm_ptch and overwrite a few bytes using a mini-tool.)

Anyway, I found:
- MAME Namco System 2 "default": YM2151 0.80, C140 0.75 (100%/94%)
- MAME Namco System 2 "default3": YM2151 1.00, C140 0.45 (100%/45%)
- MAME Namco System 2 "metlhawk": YM2151 0.80, C140 1.00 (100%/125%)
- MAME Namco System 21: YM2151 0.30, C140 0.50 (100%/166%)
- M1 Namco System 2: YM2151 0.80, C140 0.40 (100%/50%)
- M1 Namco System 21: YM2151 0.80, C140 0.45 (100%/56%)
This is really a mess, but I think I'll go with default values of YM2151 100% and C140 50% for the next release of VGMPlay.
I'm using Foobar2000 foo_gep to listen and it doesn't seem to have the special case of Namco System 2 volume adjustment that Valleybell put in vgmplay.

Here's my subjective observation, let me know if I got these volume levels wrong:

0x10d: 03 00 00 82 Boost YM2151 to 200%, the volume is pretty close to MAME
0x10d: 1c 00 80 00 Attenuate C140 to 50%, for some reason this sounds slightly better, maybe something with how the player is normalizing the rest of the volume?
  • ctr Offline
  • Posts: 492
  • Joined: 2013-07-17, 23:32:39

Post by ctr »

You'd write '80 80' to reduce volume by half. '80 00' sets the volume to 128 directly.

I don't think there's a "perfectly" accurate sound mix, and the OST releases were typically not recorded from the real hardware (it's noticeable from how clean the PCM sounds), so going by ear is probably best.

And the sound mix in M1 and MAME are probably based on guesswork anyway.

Post by tcmbackwards »

This is what I was going from:
extraheader.xsc:

Code: Select all

; volume example
; 80 00 = 0.50x   <-- why not 80 80?
; 80 81 = 1.50x
; 00 82 = 2.00x
; 40 83 = 3.25x
So now I'm wondering, is bit 0x0080 a flag that the volume is a multiplier?

Any recommendations for multiplier vs. absolute volume for compatibility with different VGM players?
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I'll quickly explain a few things. One important thing to know is that on x86 systems, 2-byte numbers are stored backwards. ("Little Endian" byte order) i.e. a number 0x1234 is stored as "34 12" in VGMs.

Code: Select all

0.50x = 0x0080 = 80 00
1.50x = 0x0180 = 80 01
2.00x = 0x0200 = 00 02
3.25x = 0x0340 = 40 03
You can add 0x8000 to the actual value (0x0200 + 0x8000 = 0x8200, resulting in bytes 00 82 for the file), in order to make the volume being multiplied with whatever VGMPlay uses as "default" volume.
However, I recommend to do that only for the YM2203/2608/2610's SSG.

If you want to go the safe route, just define the volume for both chips, the YM2151 and the C140.
For YM2151 at 1.00 and C140 at 0.50, the byte sequence would be:

Code: Select all

define 2 chips
|     YM2151        C140
v   |---------|  |---------|
02  03 00 00 01  1C 00 80 00
    ^     |---|  ^     |---|
    |     volume |     volume
    ID    0x0100 ID    0x0080
  • ctr Offline
  • Posts: 492
  • Joined: 2013-07-17, 23:32:39

Post by ctr »

tcmbackwards wrote:

Code: Select all

; volume example
; 80 00 = 0.50x   <-- why not 80 80?
; 80 81 = 1.50x
; 00 82 = 2.00x
; 40 83 = 3.25x
Sorry, that was a typo.
Post Reply