VOGONS


Reply 720 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
keropi wrote:

Is it the same with another unused IRQ? Did you check IRQ3 that we know for sure works?
You don't have a scsi card installed or a network adapter, right?

There are no other cards installed at all, i.e., it's either the MPU or no cards. There is also no SCSI or network integrated on the motherboard.

IRQ 3 (and indeed all other IRQ pins) show "high" on the logic probe during power-up. Curiously, so does the serial port's IRQ 4 pin. I'm not entirely familiar with how exactly these IRQ pins work on an electrical level, so maybe this is normal. Anyway, the IRQ 3 is indeed known working and on an electrical level at the ISA connector looks no different from IRQ 2.

edit: Another thing I tried was installing a 3COM Etherlink III card instead of the MPU. It has software-configurable IRQ, so I tried IRQ 9 on it to see if that works. It doesn't, but again works on other free IRQs. So I think we have to conclude that IRQ 2/9 is just not being delivered correctly on this system. An extreme solution would be to physically trace the line all the way on the motherboard, but it may be quite difficult to do so, and I suspect in the end it will just go to some unknown pin on a large IC.

Reply 721 of 894, by keropi

User metadata
Rank l33t++
Rank
l33t++

I see... I think nothing can be done then for IRQ2 on this system... maybe IBM did something different with cascading 😐

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 722 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
keropi wrote:

I see... I think nothing can be done then for IRQ2 on this system... maybe IBM did something different with cascading 😐

If we assume that it's IBM's weird implementation but the IRQ itself is actually free, do you (or anyone here) know if it is possible to somehow remap it in software? That is, something like have an IRQ handler for IRQ 3 that triggers IRQ 2/9 so that any software waiting for IRQ 2 will be called by IRQ 3? (Sorry if this is a non-sensical idea, I don't really know the internals of PC IRQs.)

Reply 723 of 894, by root42

User metadata
Rank l33t
Rank
l33t
Arkku wrote:
keropi wrote:

I see... I think nothing can be done then for IRQ2 on this system... maybe IBM did something different with cascading 😐

If we assume that it's IBM's weird implementation but the IRQ itself is actually free, do you (or anyone here) know if it is possible to somehow remap it in software? That is, something like have an IRQ handler for IRQ 3 that triggers IRQ 2/9 so that any software waiting for IRQ 2 will be called by IRQ 3? (Sorry if this is a non-sensical idea, I don't really know the internals of PC IRQs.)

Indeed this might be possible, by installing a TSR which handles IRQ 3 and then in turn calls the handler for IRQ 2... I think my assembler fu is to rusty to do this, but I know that some people here could do it, if it is indeed possible.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 724 of 894, by keropi

User metadata
Rank l33t++
Rank
l33t++

IMHO the speed impact of such TSR would not make this an attractive solution... especially for 386 systems
It would be better patching irq values to hard-coded games rather than a tsr - IMHO again.

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 725 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
keropi wrote:

IMHO the speed impact of such TSR would not make this an attractive solution... especially for 386 systems
It would be better patching irq values to hard-coded games rather than a tsr - IMHO again.

I agree that patching the games would be a better option, but it requires per-game reverse engineering. On the other hand the list of games with hard-coded IRQ 2 for MPU is not that long, so the total amount of work to cover all popular/interesting games would not be insurmountable.

As for the TSR, again I must preface this by saying that I don't really know how IRQs, or indeed DOS TSRs, work internally, but in theory the performance hit from jumping from one handler to another could be fairly negligible (look up the other handler and jump to it?). Perhaps there is a greater overhead in the TSR itself, though.

Reply 727 of 894, by keropi

User metadata
Rank l33t++
Rank
l33t++

tbh I never saw a complete list of games that are hardcoded to use IRQ2/port330 , is there one somewhere?
Maybe it's not that bad, maybe several share the same sound engine so patching will be easier.

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 728 of 894, by bjwil1991

User metadata
Rank l33t
Rank
l33t

An example would be King's Quest V-VII for DOS. However, I found a utility for sierra games that'll allow you to change the port number from 330 to 300, for example. I suggest copying the file and renaming it to another file, such as MT32.EXT (cannot remember the exact filename and extension).

C:\KQ6>copy MT32.EXT MT-32.EXT

The utility is Sierra MIDI Port Changer: http://www.sierrahelp.com/Utilities/SoundUtilities.html

Discord: https://discord.gg/U5dJw7x
Systems from the Compaq Portable 1 to Ryzen 9 5950X
Twitch: https://twitch.tv/retropcuser

Reply 729 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
keropi wrote:

tbh I never saw a complete list of games that are hardcoded to use IRQ2/port330 , is there one somewhere?
Maybe it's not that bad, maybe several share the same sound engine so patching will be easier.

I don't know of a complete list (although one could be useful), but it can't be particularly long since UART mode requires no IRQ, so it's a subset of the intelligent mode MPU games, which is already a small subset of all MPU-compatible games. The SoftMPU list of compatible intelligent mode games has some info regarding the ones with hard-coded IRQ.

Reply 730 of 894, by doaks80

User metadata
Rank Member
Rank
Member
bjwil1991 wrote:
An example would be King's Quest V-VII for DOS. However, I found a utility for sierra games that'll allow you to change the port […]
Show full quote

An example would be King's Quest V-VII for DOS. However, I found a utility for sierra games that'll allow you to change the port number from 330 to 300, for example. I suggest copying the file and renaming it to another file, such as MT32.EXT (cannot remember the exact filename and extension).

C:\KQ6>copy MT32.EXT MT-32.EXT

The utility is Sierra MIDI Port Changer: http://www.sierrahelp.com/Utilities/SoundUtilities.html

I tried this with PQ1 and it worked, but it didn't work with SQ3 and BAK.

k6-3+ 400 / s3 virge DX+voodoo1 / awe32(32mb)
via c3 866 / s3 savage4+voodoo2 sli / audigy1+awe64(8mb)
athlon xp 3200+ / voodoo5 5500 / diamond mx300
pentium4 3400 / geforce fx5950U / audigy2 ZS
core2duo E8500 / radeon HD5850 / x-fi titanium

Reply 731 of 894, by bjwil1991

User metadata
Rank l33t
Rank
l33t

Quick question: is BAK Betrayal at Krondor? The utility is a hit and miss in certain games.

The utility only works with Sierra On-Line games as it doesn't work on Dynamix games very well (I know they were a part of Sierra back then). I should try the utility on the A10 v1.5 game and see how it works.

Discord: https://discord.gg/U5dJw7x
Systems from the Compaq Portable 1 to Ryzen 9 5950X
Twitch: https://twitch.tv/retropcuser

Reply 732 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
bjwil1991 wrote:

However, I found a utility for sierra games that'll allow you to change the port number from 330 to 300, for example.

Out of curiosity and since the original problem was the unavailability of IRQ 2/9, when is the port 330h not available? The only setups that come to mind are a SCSI controller hard-coded to 330h for BIOS to boot off of it, or the intelligent MPU + a sound card where a "dumb" MPU clone is hard-coded at 330h that can't be disabled, but I have never encountered the latter in practice and the SCSI seems like an unusual choice for retrogaming.

Reply 733 of 894, by appiah4

User metadata
Rank l33t++
Rank
l33t++

In other and completely unrelated news I will FINALLY get around to testing my card this weekend. 😎

Attachments

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 734 of 894, by bjwil1991

User metadata
Rank l33t
Rank
l33t

@Arkku: there are utilities around that'll allow you to change the boot ROM and MPU from one to the other. I had to do the same thing for my 3Com EtherLink III 3C509-TP card's address from 300h to 280h since that conflicted with my Sound Blaster 16 CT2740's MPU (I have a Yamaha DB50XG on that card). One thing I wish I can make is a daughterboard logic board that'll have MIDI in, out, thru, or purchase a unit that has a WaveTable header (overseas shipping isn't an option).

Discord: https://discord.gg/U5dJw7x
Systems from the Compaq Portable 1 to Ryzen 9 5950X
Twitch: https://twitch.tv/retropcuser

Reply 735 of 894, by keropi

User metadata
Rank l33t++
Rank
l33t++

^ Arkku's issue is not the port but the fact that he can't use IRQ2 with his PS/2 system.
I don't understand what this "daughterboard logic board" is, is it something like the interface serdashop has? https://www.serdashop.com/CHiLL

@appiah4
nice, midi cables galore 🤣

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 736 of 894, by bjwil1991

User metadata
Rank l33t
Rank
l33t

That's the one. Unfortunately, all of that is overseas and not sold locally in the US. However, I have no idea if Amazon sells them locally in the US.

Discord: https://discord.gg/U5dJw7x
Systems from the Compaq Portable 1 to Ryzen 9 5950X
Twitch: https://twitch.tv/retropcuser

Reply 737 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
root42 wrote:

Indeed this might be possible, by installing a TSR which handles IRQ 3 and then in turn calls the handler for IRQ 2...

Well, for what it's worth I tried writing such a TSR this weekend, but it doesn't seem to work with any games (or the mqdiag.exe utility). Laser Squad seems to be a good test case since it allows specifying the IRQ on the command line and simply quits on failure (some other games either stay silent or hang forever). Oddly enough, I am able to register a handler for IRQ 2 myself and trigger it by calling IRQ 3 ("int 0Bh") programmatically. Maybe next time I have time for this I will try triggering the IRQ physically from the ISA bus pin, but patching the games is starting to look better all the time. =)

(Given that this is the first IRQ handler or indeed DOS TSR that I've written, I may also have done something wrong, but basically I'm using the "int 21h, AX=250Bh" to register the handler, which is just "int 0Ah" followed by "iret". Perhaps there is some separate hardware IRQ status bit somewhere that would have to be set in addition to this.)

Reply 738 of 894, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie
Arkku wrote:

(Given that this is the first IRQ handler or indeed DOS TSR that I've written, I may also have done something wrong, but basically I'm using the "int 21h, AX=250Bh" to register the handler, which is just "int 0Ah" followed by "iret". Perhaps there is some separate hardware IRQ status bit somewhere that would have to be set in addition to this.)

you want to jmp to IRQ 3 address, not call INT 0x0A. I've see things check stack address to see if the return address pointed to previous INT, this tests if it was software called or hardware called. also if your in V86 mode, this may not bubble up to the top.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 739 of 894, by Arkku

User metadata
Rank Newbie
Rank
Newbie
BloodyCactus wrote:

you want to jmp to IRQ 3 address, not call INT 0x0A. I've see things check stack address to see if the return address pointed to previous INT, this tests if it was software called or hardware called. also if your in V86 mode, this may not bubble up to the top.

This applies only to a few old games so it's all in real mode. Meanwhile I don't really see the difference between calling "INT 0Ah" vs obtaining the handler's address from the interrupt vector and jumping to it, in particular how (or indeed why) an interrupt handler would detect that it's not a real hardware interrupt. The return address would be inside my TSR, i.e., in an arbitrary DOS program, so isn't that also the case for the real hardware interrupt occurring during the arbitrary DOS program? I suppose a game could check whether the return address is in its own memory, but why would it, and wouldn't that also mess up the IRQ cascade for 2/9?

Can you elaborate a bit on how/what/where the "INT 0Ah" solution would go wrong? It seems that the alternative is quite a bit more complex, but that may be partly because I'm more familiar with 32- and 64-bit x86 assembly and keep running into problems where the desired opcode doesn't exist in 16-bit 8086…

(edit: Well, I did finally manage to get the JMP version working, basically by loading the destination segment and address directly from the interrupt vector into a local pointer, then restoring registers and finally with a far jump through the pointer. Again it seems to be working if I set up my own IRQ handler for 0Ah (IRQ 2) and then do "INT 0Bh" (IRQ 3), but still no luck with games.)