S98 tools
What kind of tools? For converting S98s to VGM :v
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
When converting an S98 to VGM, the first FM note does not play. Why is this? Or am I just not converting it properly? Or is my VGM player not playing it correctly?
I have attached the original S98 file and the VGM file for reference.
I have attached the original S98 file and the VGM file for reference.
- Attachments
-
- manji_07.S98
- (271.9 KiB) Downloaded 456 times
-
- manji_07.vgm
- (286.44 KiB) Downloaded 474 times
I'm HarmoDevil. Formerly Dr Devil, but I still use the drdevil username here.
Check out my Soundcloud.
I might get back to VGM ripping someday.
Check out my Soundcloud.
I might get back to VGM ripping someday.
It was an existing rip.
Hopefully, in the future, someone will modify the program so that old .s98 files will convert to .vgm properly.
Hopefully, in the future, someone will modify the program so that old .s98 files will convert to .vgm properly.
I'm HarmoDevil. Formerly Dr Devil, but I still use the drdevil username here.
Check out my Soundcloud.
I might get back to VGM ripping someday.
Check out my Soundcloud.
I might get back to VGM ripping someday.
- ValleyBell Offline
- Posts: 4823
- Joined: 2011-12-01, 20:20:07
- Location: Germany
There are two things that can cause oddities:
- The YM2608 can run in YM2203 mode and does this by default (like the OPL2 fallback on OPL3). S98 files seem to lack the YM2608 enable command pretty often. (56 29 80 in VGMs)
I'm pretty sure this is the issue, btw. You can fix this by hex-editing the VGM. (I think just overwriting the first command should work.) - The VGM you posted has LOTS of commands at sample 0. This might be due to the way the S98 was trimmed. MAME's sound emulators sometimes don't like that. (I didn't see any KeyOn command before the loop point though. Those cause the most problems, so it should work.)
Sounds like good ideas to me. Unfortunately, I'm not very good at hacking so it will take a long time before I fully understand the ideas.
I'm HarmoDevil. Formerly Dr Devil, but I still use the drdevil username here.
Check out my Soundcloud.
I might get back to VGM ripping someday.
Check out my Soundcloud.
I might get back to VGM ripping someday.
Hi,
S982.exe 0.3 is newest?
I have Hoot's ssg_mix information.
It is parameter for fmgen's psg.cpp
void PSG::SetVolume(int volume)
{
double base = 0x4000 / 3.0 * pow(10.0, volume / 40.0);
for (int i=31; i>=2; i--)
{
EmitTable = int(base);
base /= 1.189207115;
}
EmitTable[1] = 0;
EmitTable[0] = 0;
MakeEnvelopTable();
SetChannelMask(~mask);
}
>pow(10.0, volume / 40.0)
It means 2 x power decibel.
derived these value
PC-8801 10^(-2/40) -> 89.1 %
PC-88VA 10^(-4/40) -> 79.4 %
PC-9801-26(K) 10^(-13/40) -> 47.3 %
PC-9801-86 10^(-18/40) -> 35.5 %
S982.exe 0.3 is newest?
I have Hoot's ssg_mix information.
It is parameter for fmgen's psg.cpp
void PSG::SetVolume(int volume)
{
double base = 0x4000 / 3.0 * pow(10.0, volume / 40.0);
for (int i=31; i>=2; i--)
{
EmitTable = int(base);
base /= 1.189207115;
}
EmitTable[1] = 0;
EmitTable[0] = 0;
MakeEnvelopTable();
SetChannelMask(~mask);
}
>pow(10.0, volume / 40.0)
It means 2 x power decibel.
derived these value
PC-8801 10^(-2/40) -> 89.1 %
PC-88VA 10^(-4/40) -> 79.4 %
PC-9801-26(K) 10^(-13/40) -> 47.3 %
PC-9801-86 10^(-18/40) -> 35.5 %
>I did convert some Sharp X1 s98 files (PSG only) with S982, but it has become a treble.
Some Hoot's S98-out have problem.
I did S982 with -hootx1 option.
The output's VGM header reports,
YM2151 -> 4MHz
YM2149(AY-3-8910) -> 4MHz <- It's wrong, It must be 2MHz.
I patched to wrong VGMs, it become correct sounds.
Some Hoot's S98-out have problem.
I did S982 with -hootx1 option.
The output's VGM header reports,
YM2151 -> 4MHz
YM2149(AY-3-8910) -> 4MHz <- It's wrong, It must be 2MHz.
I patched to wrong VGMs, it become correct sounds.
S98toVGM converter C lang version
I wrote C version converter.
It was still under development, and not supported multi-chip.
Usage
S982VGM filename [master volume] [ssg volume]
volume option needs percent value.
master volume changes VGM header's VolumeModifier.
ssg volume changes Extra header's Volume.
I'll attach binary and source.
Source code needs vgmtools's header.
I was compiled by VC2017
It was still under development, and not supported multi-chip.
Usage
S982VGM filename [master volume] [ssg volume]
volume option needs percent value.
master volume changes VGM header's VolumeModifier.
ssg volume changes Extra header's Volume.
I'll attach binary and source.
Source code needs vgmtools's header.
I was compiled by VC2017
- Attachments
-
- S982VGM.zip
- (14.01 KiB) Downloaded 437 times
-
- S982VGM_src.zip
- (3.72 KiB) Downloaded 402 times
New version of S982VGM.
I've implemented dual-chip feature but not yet tested.
These features not yet supported.
DATA block
ADPCM
TAGs
I've implemented dual-chip feature but not yet tested.
These features not yet supported.
DATA block
ADPCM
TAGs
- Attachments
-
- S982VGM_src.zip
- Source Code
- (4.81 KiB) Downloaded 425 times
-
- S982VGM.zip
- Binary
- (14.99 KiB) Downloaded 460 times
As is well known, the Hoot's S98 output resolution is only 10/1000.
But it can modify to high resolution via binary patch.
The corresponding binaries are as follows.
68 E8 03 00 00 6A 0A 6A
PUSH 1000
PUSH 10
PUSH ~
to
68 00 EE 02 00 6A 01 6A
PUSH 192000
PUSH 1
PUSH ~
There are 46 corresponding binaries on Hoot 2017/12/31 version.
This will increase the resolution to 1/192000.
However, there may be some conflict with the driver of Hoot and the playback speed may be wrong.
Especially, I'll not recommend 1/44100 or 1/48000.
In addition, I do not know players of S98 which supported 1/192000 resolution.
But, You can convert this S98 to VGM via S982VGM.
But it can modify to high resolution via binary patch.
The corresponding binaries are as follows.
68 E8 03 00 00 6A 0A 6A
PUSH 1000
PUSH 10
PUSH ~
to
68 00 EE 02 00 6A 01 6A
PUSH 192000
PUSH 1
PUSH ~
There are 46 corresponding binaries on Hoot 2017/12/31 version.
This will increase the resolution to 1/192000.
However, there may be some conflict with the driver of Hoot and the playback speed may be wrong.
Especially, I'll not recommend 1/44100 or 1/48000.
In addition, I do not know players of S98 which supported 1/192000 resolution.
But, You can convert this S98 to VGM via S982VGM.
- ValleyBell Offline
- Posts: 4823
- Joined: 2011-12-01, 20:20:07
- Location: Germany
I'm a bit late, but thanks for all your hard work!
The volume algorithms are really useful (I'll use them sometime to make a proper list of VGM volume values.) and the Hoot patch is very neat.
I have a small question that is only slightly related: Do you know where I can find S98 files that use sound chips other than OPNA?
I was only able to find S98 files that use OPNA, YM2149 PSG and OPM. I haven't seen any S98 that uses e.g. a chip from the OPL series.
The volume algorithms are really useful (I'll use them sometime to make a proper list of VGM volume values.) and the Hoot patch is very neat.
I have a small question that is only slightly related: Do you know where I can find S98 files that use sound chips other than OPNA?
I was only able to find S98 files that use OPNA, YM2149 PSG and OPM. I haven't seen any S98 that uses e.g. a chip from the OPL series.
- RandomName Offline
- Posts: 22
- Joined: 2016-06-24, 19:21:35
OPL3DEMO S98 from Programming Terrace Wiki
- RandomName Offline
- Posts: 22
- Joined: 2016-06-24, 19:21:35
You can also convert OPLx DRO/VGM to S98. Just do a search on Ru^3 Honpo for "Update 2011/01/04". The filename is s98v3conv_110104.zip