[Patch] MDSI Genius video card

Discussion of development and patch submission.
Post Reply
User avatar
JohnElliott
Posts: 113
Joined: Sun 31 Jan, 2016 7:29 pm

[Patch] MDSI Genius video card

Post by JohnElliott »

This patch is a bit theoretical, because I don't have the original video card (a mono portrait card, resolution 728x1008).

What I do have is some drivers. Windows 1.04 and GEM 3 both come with drivers for this card, and there's a driver for a PS/2 version of the card at mpoli.fi. Despite being for PS/2, both DOS drivers (GMC_ANSI.SYS and INS_ANSI.SYS) appear to work with this emulation. You need to have either GMC_ANSI.SYS or INS_ANSI.SYS loaded before trying to use Windows 1.04.

I haven't tested any of the other drivers in the driver pack (for Windows/286, Windows/386, Lotus 1-2-3, etc.)

Since I don't have the card, I don't have a dump of its character ROM. So I tweaked the MDA font to fit and used that: http://www.seasip.info/tmp/8x12.bin.
Attachments
genius.patch
(22.52 KiB) Downloaded 322 times
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [Patch] MDSI Genius video card

Post by omarsis81 »

Thanks JohnElliott! I never heard of that card before!
Would you be interested in emulating more modern cards, like the Matrox Millennium or Mystique? Or you're just interested in pre VGA only?
User avatar
JohnElliott
Posts: 113
Joined: Sun 31 Jan, 2016 7:29 pm

Re: [Patch] MDSI Genius video card

Post by JohnElliott »

Pre-VGA only. Mainly cards for which GEM or GSX drivers exist, because I'm familiar enough with those drivers to disassemble them and grok what they're doing. I don't have that same level of knowledge with Windows 1.0x video drivers, for example (it doesn't help that, as I recall, they use self-modifying code).
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Patch] MDSI Genius video card

Post by SarahWalker »

I seem to be having some issues with this. For me, loading GMC_ANSI.SYS gives a completely white screen, at least on the 'Generic XT clone' system. I've also been unable to get Windows 1.04 to work.
User avatar
JohnElliott
Posts: 113
Joined: Sun 31 Jan, 2016 7:29 pm

Re: [Patch] MDSI Genius video card

Post by JohnElliott »

While developing it I used the IBM XT system, with MS-DOS 3.3.

The genxt BIOS reports 704k RAM, so I think it's trying to extend conventional RAM into the memory used by the Genius card. And then when GMC_ANSI or Windows start using that RAM, important things get overwritten. That suggests the card needs to start up only mapping the B0000-BFFFF range, not the whole A0000-C7FFF range. Which is a one-line change in genius_init() (vid_genius.c:563):

Code: Select all

        mem_mapping_add(&genius->mapping, 0xb0000, 0x10000, genius_read, NULL, NULL, genius_write, NULL, NULL,  NULL, 0, genius);
Incidentally, on my Linux system I found that before this change was made, using GMC_ANSI.SYS in the genxt configuration caused pcem to crash:

Code: Select all

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000055094a in readmemwl (seg=712656, addr=65535) at mem.c:1126
#2  0x00000000004fa41c in readmemw (s=712656, a=65535) at 808x.c:60
#3  0x00000000004fdeb1 in execx86 (cycs=47727) at 808x.c:1189
#4  0x0000000000556c61 in runpc () at pc.c:445
#5  0x000000000050bca5 in main (argc=3, argv=0x7fffffffe1b8)
    at allegro-main.c:129
(gdb) print _mem_read_b[addr2 >> 14]
$1 = (uint8_t (*)(uint32_t, void *)) 0x597e3e <genius_read>

(gdb) print _mem_read_b[(seg + ((addr + 1) & 0xffff)) >> 14]
$2 = (uint8_t (*)(uint32_t, void *)) 0x0
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: [Patch] MDSI Genius video card

Post by SarahWalker »

Committed at rev 663.
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [Patch] MDSI Genius video card

Post by omarsis81 »

John: if you are keen on pre-VGA cards, perhaps you can take a look at the CGA composite mode, its colors are a bit mixed up
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Patch] MDSI Genius video card

Post by Battler »

- omarsis81: They are not. The composite mode filter was written by reenigne based on painstaking testing of both old and new real CGA cards. You are just using the wrong CGA model for the specific game.

Edit: And I suspect the game was actually for the Tandy, which had yet another set of composite mode colors, that reenigne did not (yet) implement. The same goes for the PCjr.
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [Patch] MDSI Genius video card

Post by omarsis81 »

Maniac Mansion (the enhanced version at least) as indeed support for Tandy, but clearly the guy who's reviewing Composite Mode on the youtube video I posted is showing the composite mode in CGA, as he switches from the 3 color RGB to Composite on the fly
Also, I tried the Tandy version using PCem's Tandy 1000 and the Tandy mode for Maniac Mansion is clearly different.
Of course I tried PCem's Old and New version. The grass from the very beginning of the game is far from the green is supposed to be

Another example is Battle Chess. It has a special Composite mode you can access by entering chess /comp.
As you can see, the chess pieces are supposed to look Red and Blue, and in PCem they are violet.
Again, I tested it against the Old and the New mode
battlechess.jpg
battlechess.jpg (146.04 KiB) Viewed 9069 times
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [Patch] MDSI Genius video card

Post by omarsis81 »

Battler: do you have a CGA monitor and card?
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: [Patch] MDSI Genius video card

Post by Battler »

Unfortunately, I don't. Also, the color difference might as well be due to different tint settings. Remember, this is NTSC we're talking about where tint is newer twice the same (hence its satyrical expansion to Never Twice the Same Color). The emulation 86Box has is based on reenigne's well-calibrated monitor, but some games might be designed for less well-calibrated monitors.
So far, we have Maniac Mansion and Battle Chess looking wrong, but King's Quest and 8088mph looking right. If you can PM me Maniac Mansion and Battle Chess, and instructions on how to run them, I might look into this. Chances are, the 3-color composite mode filter does not get the correct parameters passed to it.
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [Patch] MDSI Genius video card

Post by omarsis81 »

Battler wrote:Unfortunately, I don't. Also, the color difference might as well be due to different tint settings. Remember, this is NTSC we're talking about where tint is newer twice the same (hence its satyrical expansion to Never Twice the Same Color). The emulation 86Box has is based on reenigne's well-calibrated monitor, but some games might be designed for less well-calibrated monitors.
So far, we have Maniac Mansion and Battle Chess looking wrong, but King's Quest and 8088mph looking right. If you can PM me Maniac Mansion and Battle Chess, and instructions on how to run them, I might look into this. Chances are, the 3-color composite mode filter does not get the correct parameters passed to it.
Maybe its only the black palette and that causes other minor color changes. In Maniac Mansion is more than the tint, because the black door looking blue looks something else, but I'm not expert...
You'll get that PM when I reach home in about 7 or 8 hours from now on.
Thanks for looking at it!
Post Reply