Skip to content

Neko Project 21 VGM mod

Current version: 20130727 (released on 2015-08-08)

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

Neko Project 21 VGM mod

Post by ValleyBell »

I made a wiki page for it, so you can get all important information from there.

After it was lying on the FTP for about 2 weeks now, I finally found the time to make the release post/wiki page.

A note to my beta testers:
This version is slightly newer and should save the AY8910 volume level correctly for the YM2608.

Enjoy!

P.S.: Sorry for the inactiveness lately. I've been busy with real life. (university stuff, illness, ...)

Re: Neko Project 21 VGM mod

Post by Rotating Username »

Great! It's nice to be able to log to a better documented and generally friendlier format.

Oh right, I had a question. It might have been answered somewhere else already, or just be a dumb thing to ask in general, but this seems like the right moment...

Many PC-88/98 games had support for not just basic OPN music tracks, but also enhanced versions via OPNA (they also sometimes had exclusive tracks and such for the latter, but that's beside the point). Other titles added OPNA support in re-releases or possibly via other methods. I may be wrong, but I was under the assumption that in most cases, the exact same data is passed to the computer, with the extra channels being played if they are supported.

I haven't done more than a casual perusal of S98 files, but it generally seems like OPN and OPNA versions are logged separately. If a tool could be created/modified to compare raw VGM logs of OPN and OPNA against each other to check for differences, it seems that instead of fully looping/optimizing/tagging two sets of logs for every game (if someone is being neurotically thorough), games which are confirmed to send the same OPN data in both circumstances could be logged just to OPNA, and then VGM players could add a button/config file toggle as to whether to play the additional channels or not.

Obviously this is very low priority, and most people just want the OPNA audio if available. But it's something to think about, I guess? Unless it's already been talked about, or I'm just talking nonsense, or some other reason. I felt it was worth proposing.
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

Interesting thought, but I think for all purposes intended that's actually not the case with the games that I've encountered. Some of which actually transpose the key of the song, to being completely different songs altogether. Additionally, the fact many of these games have separate files for respective OPN and OPNA song versions, is another indication that this is less likely to be the case.

Having said that, I can see the value in having something like that, but given the way the chip commands are interpreted, there seems little incentive to going backwards, and one could say a similar prospect could be had for YMF262 -> YM3812 from which you will obviously lose two operator waveforms as opposed to just channels and stereo.
-dj.tuBIG/MaliceX
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

ValleyBell wrote:A note to my beta testers:
This version is slightly newer and should save the AY8910 volume level correctly for the YM2608.
I just noticed for YM2203 that 0xD0 (SSG-FM volume offset) was changed from 0x80 to 0x81 for OPN logs. The beta version had 0x80 for OPN, but at 0x81 it seems the SSG is waaaay too loud. Can anyone confirm if this is correct behaviour according to the NEC PC-9801-26K soundcard? I'll assume it's correct for the time being.
-dj.tuBIG/MaliceX
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

If anyone wants to compile a list of sound boards and their respective SSG volume levels, please feel free to do it.
In the emulator I use volume levels relative to the FM part, but absolute SSG volume levels (with FM staying at 100%) or absolute FM volume levels (with the SSG staying at 100%) work, too.

My current volume levels are:
  • YM2203 0x100 (100%), SSG 0x19A (160%)
  • YM2603 0x100 (100%), SSG 0xCD (80% - actually the chip halves the FM volume internally, but I removed that for a slightly higher precision, so it's 160%/2)
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Bug or Not Supported?
Device -> Sound -> Speak board
VGM is not output in YM2608 (Is output in YM2203).

Speak board is required by the "King breeder" (This game is using the PCM).
https://www.youtube.com/watch?v=z1laL7cii8I
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Definitely a bug.
I need to rethink how I decide between YM2203, YM2608 and the rest. (Spark Board seems to even have 2xYM2608, which doesn't work yet either)
That would also allow for a cleanup. Right now I'm calling most of the VGM logging functions from within the S98 routines.
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Okay, to wait for the next update.
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

Just a word of warning. I'm currently logging Eiyuu Densetsu/The Legend of Heroes III and IV, and (with the help of ValleyBell) noticed commands sometimes will be fed to the logger too quickly to the point the emulated chip doesn't have enough time to register those changes between waits (particularly those using SSG-EG; this is falcom jdk we're talking about here...).

Although these are ultimately edge-cases, you may want to keep the emulated CPU at 2x or 4x from the base clock. (1x is too slow, and in fact you will only have a minimum of 6-7 wait samples in size). 4x should be optimal in most cases.

Examples of the problem (note the bassline):
- Log at x14 CPU speed (too fast) - https://dl.dropboxusercontent.com/u/128 ... x14%29.vgm
- Log at x1 CPU speed (too slow) - https://dl.dropboxusercontent.com/u/128 ... MHz%29.vgm
- Log at x4 CPU speed (OK) - https://dl.dropboxusercontent.com/u/128 ... HEROES.vgm
-dj.tuBIG/MaliceX
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

np2.exe VGM mod Do you have support planned? or np21 fix possible?
(np2 is PC-9801, np21 is PC-9821)
There may not be correctly played song on np21.exe.(np2 is play correctly.)
Mess is played correctly, but it does not support OPNA.

Example:
Edit:Remove file.
Rance 4.1 - My glorious days - NP2_0009.vgm (np21 VGM mod)
Rance 4.1 - My glorious days - pc9821_09.vgm (Mess 156 VGM mod)

Rance 4.1 - House of Alice - NP2_0016.vgm (np21 VGM mod)
Rance 4.1 - House of Alice - pc9821_16.vgm (Mess 156 VGM mod)
Last edited by 2ch-H on 2015-04-15, 11:05:02, edited 1 time in total.
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

2ch-H wrote:np2.exe VGM mod Do you have support planned? or np21 fix possible?
(np2 is PC-9801, np21 is PC-9821)
There may not be correctly played song on np21.exe.(np2 is play correctly.)
Mess is played correctly, but it does not support OPNA.

Example:
Rance 4.1 - My glorious days - NP2_0009.vgm (np21 VGM mod)
Rance 4.1 - My glorious days - pc9821_09.vgm (Mess 156 VGM mod)

Rance 4.1 - House of Alice - NP2_0016.vgm (np21 VGM mod)
Rance 4.1 - House of Alice - pc9821_16.vgm (Mess 156 VGM mod)
2ch-H: Actually I recently discovered that MESS does. Steps to enabling OPNA (PC-9801-86, so NO SPEAKBOARD) are as follows:
  • Start MESS with any PC-98x1 series
  • Once running, set keyboard emulation to Partial Emulation mode
  • Press TAB to open MESS menu
  • Go to "Slot Devices"
  • Change "cbus0" from pc9801_26 -> pc9801_86
  • Reset the running machine
Congratulations. PC-98 OPNA mode in MESS. Note that some SSG drivers such as PDR (for PMD) still does not work correctly in MESS, this may be of help for problematic games that don't play correctly in Neko Project.
-dj.tuBIG/MaliceX
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

MaliceX wrote: 2ch-H: Actually I recently discovered that MESS does. Steps to enabling OPNA (PC-9801-86, so NO SPEAKBOARD) are as follows:
  • Start MESS with any PC-98x1 series
  • Once running, set keyboard emulation to Partial Emulation mode
  • Press TAB to open MESS menu
  • Go to "Slot Devices"
  • Change "cbus0" from pc9801_26 -> pc9801_86
  • Reset the running machine
Congratulations. PC-98 OPNA mode in MESS. Note that some SSG drivers such as PDR (for PMD) still does not work correctly in MESS, this may be of help for problematic games that don't play correctly in Neko Project.
Thank you for the information, it was working correctly.
I vgm set of Rance 4.1/4.2 will use that way.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I just updated the Neko Project VGM mod. It fixes crashes when trying to make screenshots of PC9821 games. (The bug was present in the original already.)
You can get the updated executable from the wiki page.

Thanks to Doommaster1994 for telling me about the bug and providing a test case.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

I updated the Neko Project VGM mod.
VGM logging is done properly now (and not hacked into the S98 logger anymore), so both S98 and VGM logging is possible. But there are some chips that are logged to VGM only.
All sound chips supported by VGM should be logged now, DeltaT support should work, too.
I successfully tested PC-9801-26K (YM2203), PC-9801-86 (YM2608), Speakboard (YM2608) and AMD-98 (2xAY8910, sorry - no 3rd PSG chip, also no panning).

Thanks a lot to bmos and GTheGuardian for beta-testing my WIP builds during the last few days.

Post by Kaminari »

Thanks! That will be very useful.

[Edit] The wiki page seems down?
Post Reply