VOGONS


First post, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

After taking a close look at a couple of Sierra video drivers, I have started to write a new one from scratch!
The result is a "PCPLUS.DRV" that provides full 16-color support on Plantronics compatible graphics cards:

kqpcplus.png
Filename
kqpcplus.png
File size
38.66 KiB
Views
4684 views
File comment
King's Quest IV demo in Plantronics mode in PCem
File license
Fair use/fair dealing exception

All source code is published under LGPL in my FOSS SCI Drivers git repo.

Last edited by Benedikt on 2020-08-11, 12:14. Edited 1 time in total.

Reply 1 of 134, by keropi

User metadata
Rank l33t++
Rank
l33t++

ooh nice!!!
I recently started messing with the Amstrad PC1512 and sierra's PC1512.DRV and found some games to be working fine with it.. a couple produce game breaking issues though like KQ1 remake (driver does not support scrolling of 1st screen, weird issue) or SQ3 that has unreadable text

cf4lTWIl.png

swnIndTl.png

the plantronics driver is also interesting as some CGAs do support it - I think ATI wonders do?

edit: btw link to driver is broken

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

Reply 2 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
keropi wrote on 2020-08-11, 12:03:

ooh nice!!!
I recently started messing with the Amstrad PC1512 and sierra's PC1512.DRV and found some games to be working fine with it.. a couple produce game breaking issues though like KQ1 remake (driver does not support scrolling of 1st screen, weird issue) or SQ3 that has unreadable text

I'll have to disappoint you: My driver does not implement hardware-scrolling, either.
Not sure what the unreadable text is about. The driver merely copies from an internal frame buffer to the screen, adjusting for the pixel format and memory model.

keropi wrote on 2020-08-11, 12:03:

the plantronics driver is also interesting as some CGAs do support it - I think ATI wonders do?

edit: btw link to driver is broken

Yes. The entire ATI "Small Wonder" Graphics Solution series does. The Paradise PVC4 and some other chips support it, as well.
(Fixed the link. Thanks!)

Reply 3 of 134, by keropi

User metadata
Rank l33t++
Rank
l33t++

I will take some PCem shots later about the text issue, it's the 1512 "cga" controller to blame - basically the text+text_box are the same color.

If your driver does not support scrolling how do you play KQ1 remake?
The 1st screen in the game that is also used in the intro scrolls left/right - on the 1512 the system just waits forever when scrolling is about to begin. So it soft-locks on intro and in-game. If you go past this screen and save then you can play the game with 16colors since the other screens fade in/out (I am not sure there are no more scrolling screens though). Using the 4color CGA driver works because on it there is no scrolling. It's just a programming omission I doubt they tested the PC1512.DRV that much....

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

Reply 4 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

My guess on why Sierra's PC1512 driver locks up the game is that it does not even provide a dummy function.
The MCGA driver does not implement hardware scrolling, either, but its call table has an entry that leads to an empty dummy function.
The PC1512 driver's call table is one entry too short, which means that the driver will do funny things when the game tries to call the hardware scrolling function via call table index.

My driver provides a dummy entry, just like the MCGA driver, and should therefore work.
(Except that it won't scroll, obviously.)

Reply 5 of 134, by keropi

User metadata
Rank l33t++
Rank
l33t++

in theory can this dummy function be added to the 1512 driver to disable scrolling?

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

Reply 6 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

I'll answer in your PC1512.DRV thread.

EDIT: My guess from above was wrong: The call table does have all 9 entries and my disassembler was confused! Anyway, I answered there.

Reply 7 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
keropi wrote on 2020-08-11, 12:03:

ooh nice!!!
I recently started messing with the Amstrad PC1512 and sierra's PC1512.DRV and found some games to be working fine with it.. a couple produce game breaking issues though like KQ1 remake (driver does not support scrolling of 1st screen, weird issue) or SQ3 that has unreadable text

The only scrolling-related function in the drivers appears to be able to shake the screen, only and unable to do anything else.
I have therefore renamed it from hw_scroll_dummy to shake_screen.
It is still a dummy function, but the intended functionality and all parameters are now documented.

The now apparent fact that this 9th function in the call-table is a dedicated screen shaking function and our inability to get the PC1512 driver fully working by patching it out leads me to believe that your game-freezing problems with KQ1's scrolling first screen and PC1512.DRV are indeed unrelated.

Could you try your PCem setup with Plantronics ColorPlus emulation and PCPLUS.DRV, just to be sure? (I'd have to get the games, first.)

Reply 8 of 134, by keropi

User metadata
Rank l33t++
Rank
l33t++

OK I just tested - the same thing happens with the plantronics driver: on 1st screen that is special and scrolls the plantronics version does the same as the 1512 one: it waits for ever and crashes/freezes the system...

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

Reply 9 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

Alright. So I got hold of the King's Quest I SCI remake and interestingly, it will lock up even with the original color CGA driver copied over from King's Quest IV.
Maybe they added another function to the call table? Let's have a look...

EDIT: A quick look with a hex editor confirms that. The call table in CGA320M.DRV has 20 bytes, i.e. 10 entries.
Let's look further...

Reply 10 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

That was easy!

This is a valid stub implementation for the scroll function:

mov     si,di
jmp update_rect

It doesn't really scroll, but CGA320M doesn't do that, either.

Reply 12 of 134, by root42

User metadata
Rank l33t
Rank
l33t

Extremely cool project! I don't have any of those more rare graphics cards, but sometimes I wished for new iMuse drivers for Monkey island 2 and Indy 4. 😀

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

Reply 13 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

There was a copy-paste bug in the restore_background helper function.
With that resolved, the driver does not seem to produce any further graphical errors.

The following games definitely work:

  • King's Quest I (SCI)
  • King's Quest IV
  • Space Quest I (SCI)
  • Space Quest III
  • Codename: ICEMAN
  • Quest for Glory I
  • Quest for Glory II

I still have to test some more.

Reply 16 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

The list of known-working games is now as follows:

  • Codename: ICEMAN
  • Conquests of Camelot
  • Hoyle's Book of Games 1
  • Hoyle's Book of Games 2
  • Hoyle's Book of Games 3
  • King's Quest I (SCI)
  • King's Quest IV
  • Leisure Suit Larry 1 (SCI)
  • Leisure Suit Larry 3
  • Mixed-Up Mother Goose
  • Police Quest II
  • Police Quest III
  • Quest for Glory I
  • Quest for Glory II
  • Space Quest I (SCI)
  • Space Quest III
  • The Colonel's Bequest

I fact, I have not found a single game with 320x200 pixel 16-color mode that doesn't work with the new driver.
The dedicated EGA editions of King's Quest V and certain other games should work, as well, but they are not readily available and the VGA editions are useless in this context.

Reply 17 of 134, by keropi

User metadata
Rank l33t++
Rank
l33t++

that's a very nice list for older systems that have a cga capable of plantronics mode

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

Reply 18 of 134, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

Indeed. All in all, some twenty titles should work with this driver.

The API/ABI of the SCI1/SCI1.1 256-color drivers apparently isn't all that different, either:

  • The engine's internal frame buffer that the driver has to copy and convert rectangles from has 320x200 8-bit pixels rather than 320x200 4-bit pixels
  • The mouse cursor has 256-color pixels and a color key instead of an AND-mask and an OR-mask (EDIT: Apparently not in SCI1, see this vcfed-thread)
  • The call-table has another three entries that I would call set_palette, get_palette and animate_palette, where animate_palette is always either an alias of set_palette or a dummy function.

Reply 19 of 134, by Anonymous Coward

User metadata
Rank l33t
Rank
l33t

Apparently the ATI Graphics Solution cards support an extended plantronics mode that does 640x200x16. Is there any chance to support the Sierra EGA/VGA games that use EGA 640x200x16 to emulate 256 colours?

"Will the highways on the internets become more few?" -Gee Dubya
V'Ger XT|Upgraded AT|Ultimate 386|Super VL/EISA 486|SMP VL/EISA Pentium