pachuco / ESSPlayMid

Attempt at reversing ES1969 proprietary 11-spices-and-herbs midi driver.
6 stars 1 forks source link

Jank in ASM midi replayer #1

Open pachuco opened 1 year ago

pachuco commented 1 year ago

Ok, so my IDA+MASM rip of the NT4 midi driver didn't go entirely well.

  1. There is a bug that occur with some of the instruments(Timpani, Lead 3 Calliope, Electric Piano 2, etc.) that sounds like the ratio on one of the operators is higher than should.
  2. Output volume is lower in ASM replayer compared to XP driver. Not sure what is the case with real NT4 driver.

https://files.catbox.moe/si7y9x.mid crestest.mid https://files.catbox.moe/o4dz2u.ogg First half is recording from XP's driver. Second half is recorded from ASM replayer. Lead3 and EP2 patches playing.

pachuco commented 1 year ago

Problem 2 should be evaluated after problem 1 is resolved. It might be only perceived because of overal timbre volume.

pachuco commented 1 year ago

https://files.catbox.moe/c33xgn.mid meteor_herd.mid This has broken fadeout at the end.

leecher1337 commented 1 year ago

Dumb question: How to get your replayer? The main.c is just for MIDI in, so I wonder how you do your tests?

pachuco commented 1 year ago

To compile the project, provide it with GCC in path. You also need to link against "buttio" driver(compiled with RosBE's GCC). But I reccomend you discard Buttio because it's ass, and use your favorite portio driver instead. Run build.bat.

Upon compiling, you will have an executable that will listen to a midi port, via winmm. Run that without parameters to get usage info.

In device manager, look for your AudioDrive soundcard, go to Hardware Resources, check the 2nd bar. It should be a range from Base+0x0 to Base+0xF. Edit config.ini from bin folder accordingly.

You now get a midi cable driver and an adequate midi player. In my case, I have used Tobias Erichsen's loopMIDI and Tom Grandgent's TMIDI.

Testing is done by listening to midis until I get bored, comparing playback between 32bit XP driver's implementation, the NT4 ASM port, and the partial C port(as it evolves).

The woes reported here only include differences between XP and NT4 asm port.

leecher1337 commented 1 year ago

So, I setup loopMIDI Port, then I start essmidi.exe with parameter to open loopMIDI Port, start TMIDI und select loopMIDI Port on MIDI Out and play a MID and hope that I will hear something? Hm, currently, I don't hear anything, even though I'm using buttio. Will have to experiment with the settings, but is this setup correct in general?

leecher1337 commented 1 year ago

Ah, stupid me, didn't change FM Base address in config

pachuco commented 1 year ago

Ah, stupid me, forgot to indicate that in the walkthrough before. It is dangerous to hammer random io ports, and I could have had someone else's blood on my hands.

There, I updated guide and commited a default value which registers as invalid config.