I see your point and you obviously have enough experience to deal with the case.
Yet you have to admit that you had few ideas about the source of your 'trouble' - as we all have when it comes to these obscure setup problems.
The point is not to overreact - arbitrarily disabling interupts and features cannot be a solution. As you experienced the mess will only increase.
I can write how I would deal with it but cannot be entirely clear on some details because I don't have XP.
One point in advance - you think you corned the error location at the midi ports.
That conclusion is definetely wrong - because you didn't verify the source yet, it only manifests itself at the midi port.
I once had a system that complained 'the Oracle driver bla, bla is corrupted or not installed'. OMG I thought, not THAT install again
Fortunately it was a virtual machine so I copied a backup image over it - same error.
Ok, went to a twin machine with an identical setup, verfied that the Oracle stuff worked, quit the system and transferred a copy to the failing machine.
The exact image that worked 5 minutes ago produced the same error
You should have seen my face...
It was clear that the error message was a fake, so I considered WHAT was the difference between the 2 boxes, what had changed in the last couple of days ?
Nothing but a Dimm - removed the new memory, started the machine and bingo(!), all up and running.
If had reacted according to the error message about the corrupt database driver I could have installed that box over and over again, including Windows and it would always fail...
Does that remind you on something ?
so here it goes:
if you don't have a copy of your allkeys file on USB stick (or similiar), copy the file SCOPE.RGY from the appbin folder. It's the system's current key file.
inspect all the capps on the mobo for bulky tops (you know what I mean, it's not very likely, but just to be sure)
if you're not absolutely sure that the heatsink sits properly, set the bios so the machine doesn't exceed (say) 2 GHZ (the Giga has a factor in BIOS for that)
remove the video card and use the onboard
disable all unneeded peripherals as usual
install from scratch on an empty drive without the Luna, using an original install medium or a verfied copy.
You will most likely have a DVD writer in your machine and those can be totally unreliable.
I've seen disks with tons of read errors that finally managed to 'copy' scans over to the HD which were completely messed up - due to almost invisible fingerprints.
check if Windows is ok
make an image copy of the empty system state if you like.
I can't tell anything about XP registration/activation but afaik it should be the point here.
There may be software to circumvent it - if you plan to use something in this direction you can stop here and spare the rest.
Return to the empty disk and install Win98 or W2K instead.
As mentioned I don't have it myself and I don't suspect that you use whatever copies, but I mention it for completeness.
now install the card's drivers and afterwards the card itself according to the instructions from a RELIABLE source.
If it's on CD I'd copy it over to the HD as that seems to work better.
A download may not always be reliable - to be sure you could make 2 new downloads and verify that the content is identical.
This should give you a more or less basic setup to check any errors you previously had.
Do not install a sequencer or any fancy stuff yet. The point is to verify your Luna works.
if there's anything strange with the hardware it should show up now
good luck, Tom
(I know you know most of the blurb above, but that's how I would do it)