pachuco / ESSPlayMid

Attempt at reversing ES1969 proprietary 11-spices-and-herbs midi driver.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jank in ASM midi replayer

pachuco opened this issue · comments

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.

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

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

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

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.

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?

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

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.