digital-sound-antiques / vgm-conv

Chip-type and clock converter for VGM
ISC License
46 stars 3 forks source link

Incorrect AY8910 to OPL3 conversion #63

Closed ReimuNotMoe closed 9 months ago

ReimuNotMoe commented 2 years ago

Incorrect AY8910 to OPL3 conversion observed in vgm-conv 0.9.2 installed from npm.

The song is Opening of the MSX2 game Sorcerian. You can download the VGM files here: https://vgmrips.net/packs/pack/sorcerian-msx2-opll

The command issued was: cat 01\ Opening.vgm | vgm-conv -f ym2413 -t ymf262 | vgm-conv -f ay8910 -t ymf262 > out.vgm

The conversion was correct in an earlier version, but I have no idea about the exact version number.

okaxaki commented 2 years ago

Thanks. It seems that PSG parts conflicts with FM parts... but very strange.

In general vgm-conv does not support to convert multiple chips into a single chip, but exceptionally, I designed that vgm-conv exceptionally allows YM2413 + AY8910 into YMF262 by mapping YM2413 to the first OPL port of YMF262 and AY8910 to the second OPL port.

I will investigate the problem.

okaxaki commented 2 years ago

Humm, this is okay...

vgm-conv -f ay8910 -t ymf262 -i 01\ Opening.vgz | vgm-conv -f ym2413 -t ymf262 -o test.vgm

The following generates corrupted PSG part...

vgm-conv -f ym2413 -t ymf262 -i 01\ Opening.vgz | vgm-conv -f ay8910 -t ymf262 -o test.vgm 
denjhang commented 1 year ago

Under Windows 10 system, I cannot use the following statement: vgm-conv -f ay8910 -t ymf262 -i 01\ Opening.vgz | vgm-conv -f ym2413 -t ymf262 -o test.vgm

okaxaki commented 1 year ago

I'm not sure recent Windows allows pipe | operation for large binary stream in the command-line.

vgm-conv -f ay8910 -t ymf262 -i 01\ Opening.vgz | vgm-conv -f ym2413 -t ymf262 -o test.vgm

is equivalent to

vgm-conv -f ay8910 -t ymf262 -i 01\ Opening.vgz -o temp.vgm
vgm-conv -i temp.vgm -f ym2413 -t ymf262 -o test.vgm

The latter should work on Windows command-line.

denjhang commented 1 year ago

If you look at these screenshots, npm seems to be against me. 截图未命名0116212043 截图未命名0116212328 截图未命名0116212340

okaxaki commented 1 year ago

Please avoid to use pipe | character on your Windows command prompt. The pipe | does not work on Windows command line.

Further, --to chip ymf262 of the latter command is invalid.