- If this bit is modified in mid-frame, on an IBM CGA board the change takes effect immediately (at the current beam position).
This is similar to how certain games modify the color select register (3D9h) for extended-palette tricks, as in California Games or Frogger. PCem emulates this behavior for 3D9h, but not for 3D8h as far as I can tell.
- If data is sent to the CRTC while this bit is set to 0 (video off), PCem seems to turn the video back on, as if it was set to 1.
I haven't ascertained exactly which CRTC registers trigger this behavior when written, but that doesn't happen on (IBM) CGA hardware, where there's no interdependence between the registers on the MC6845 and the CGA 'proper'.
CGA mode select register (3D8h) inaccuracy
CGA mode select register (3D8h) inaccuracy
While playing with some display-related code I noted a couple of discrepancies between PCem v14 and the real hardware. Both have to do with CGA register 3D8h, specifically bit 3 (+VIDEO):
Re: CGA mode select register (3D8h) inaccuracy
Maybe the same that happens here
viewtopic.php?f=3&t=500
viewtopic.php?f=3&t=500
Re: CGA mode select register (3D8h) inaccuracy
Hmm, nah- that thread seems to be about composite color reproduction (unless I'm missing something)... this is unrelated.
Actually, the issues I mentioned above don't matter for any game/demo that I know of, so far. But I'm working on some neat stuff that relies on this functionality, and having the correct behavior in PCem would be convenient for quick testing.
Re: CGA mode select register (3D8h) inaccuracy
May you please provide some sample code? Just asking
Re: CGA mode select register (3D8h) inaccuracy
Sorry for taking a while, but here' s a program that at least checks for issue #1 described above. It shows a test screen for 4 seconds - the +VIDEO bit in the Mode Control register is cleared after the first row of text, so nothing should be visible below it.
Left: results in PCem
Right: results in DOSBox (and on real hardware with an IBM CGA)
Left: results in PCem
Right: results in DOSBox (and on real hardware with an IBM CGA)
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: CGA mode select register (3D8h) inaccuracy
PCem doesn't currently emulate 3d8h bit 3 at all, so it's not entirely surprising it doesn't work. Should be pretty trivial to add...
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: CGA mode select register (3D8h) inaccuracy
Added to the stock CGA at rev 1207.