VOGONS


First post, by peterferrie

User metadata
Rank Oldbie
Rank
Oldbie

Pandemonium demo by DEMANIACS hooks irq 2, which DOSBox does support, then reads port 3c2h, which DOSBox doesn't support (hard-coded return value, instead of toggling bit 7 occasionally).
I'll try patching it to use port 3dah instead, but is there a better workaround?

Reply 1 of 11, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Are you sure this works for vga then? As irq2 was almost never implemented
for vga cards (intlist states that the original ibm vga doesn't call irq2 as vret
interrupt, but that information might not be correct iirc).

Reply 5 of 11, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I've played with this a bit...

The video-internal interrupt stuff is supported on EGA as well as the VGA cards I tried:

EGA: 3c2 supported, interrupt is triggered

S3 Trio64: 3c2 supported, no interrupt

ET4000 default: 3c2 supported, no interrupt
ET4000 with additional jumper: 3c2 supported, interrupt is triggered

ET3000: same as ET4000
TVGA8900: same as ET4000

PVGA1A: 3c2 supported, interrupt is not connected on bus

The documentation that floats around on the internet is incomplete, they do say you have to set CRTC index 11 bit 4 to 0 to clear the interrupt, but miss the fact that you have to set it back to 1 after that if you ever want to see an interrupt (and the 3c2 flag) again. I've found out by looking at what 'Gauntlet' does. The people who wrote the documentation probably couldn't make it work and thus wrote 'EGA only??' there.

1+1=10

Reply 9 of 11, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Are you sure that irq9 is triggered? Would make sense for 2pic machines
at least, but the intlist explicitly mentions it as irq2 only.

The 0x70 for read_p3c2 comes from some vgatest utility that checks values
against ibm vga ones (ih8regs modified it accordingly iirc), so might not hurt
to OR the 0x60 back in for vga?

Thanks for the patch, looks fine.

Reply 10 of 11, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The IRQ2 pin on the ISA bus is IRQ2 for 1-pic machines and IRQ9 for 2-pic. My test program was looking at the irr of the 2nd pic and the interrupt was requested there.

The 0x60 only showed on the ET4000, neither on the S3 nor paradise. That's why I thought... but it shouldn't matter.

1+1=10