VOGONS


First post, by kao

User metadata
Rank Member
Rank
Member

Some games, especially Sierra ones, have a screen-shaking effect (eg falling out of the tree in KQ1) which is done by adjusting the horizontal and vertical sync position registers in the 6845 controller. DOSBox does not currently support this, thus the effect is absent when the games are run in CGA or Tandy mode.

The shaking effect works in EGA mode, but I don't know how it's done on there.

Reply 1 of 22, by VileR

User metadata
Rank l33t
Rank
l33t
kao wrote:

The shaking effect works in EGA mode

I've noted its absence in CGA mode before, but this is news to me... haven't really played KQ1 (etc) in ages -- could you be more specific as to when/where this occurs?

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 2 of 22, by kao

User metadata
Rank Member
Rank
Member

I've noted its absence in CGA mode before, but this is news to me... haven't really played KQ1 (etc) in ages -- could you be more specific as to when/where this occurs?

http://www.youtube.com/watch?v=EdNGpUjbPPA

@ 1:26

All AGI/SCI games do that shaking effect when your character falls from somewhere. Also in KQ3 when the wizard zaps you with his spells.

Reply 3 of 22, by collector

User metadata
Rank l33t
Rank
l33t

It works with EGA and the VGA modes. I can understand wanting Tandy with the AGI games for the Tandy audio, but fail to see why someone would want to use either Tandy or CGA with an SCI0 game unless someone originally played the games on such a machine at the time and wanted the nostalgia factor. Most copies (if any) of KQ1SCI didn't even ship with a CGA driver and using Tandy only gives you the one voice PC speaker instead of the 3 voice +noise channel that the AGI games give you with Tandy in DOSBox. That said, it would be desirable to have it working with Tandy for the AGI games.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 4 of 22, by kao

User metadata
Rank Member
Rank
Member

It works with EGA and the VGA modes

It does, but I'm curious what registers are used since they're apparently supported by DOSBox, but not the CGA ones.

Most copies (if any) of KQ1SCI didn't even ship with a CGA driver and using Tandy only gives you the one voice PC speaker instead of the 3 voice +noise channel that the AGI games give you with Tandy in DOSBox.

Are you sure you're not basing that off of copies obtained from abandonware sites? Because my original KQ4 disks have the full complement of CGA and Tandy video/sound drivers.

But then it's possible you're right because most Sierra games from 89-92 shipped on 720k and 1.2MB floppies. They appear to have been designed for newer systems and may not have CGA/Tandy drivers. Whereas KQ4 (being an older game from 1988) shipped on 360k and 720k disks and was probably still made with the idea of 8086 support.

I can also recall at least one non-Sierra game (Defender of the Crown) that shakes the screen.

That said, it would be desirable to have it working with Tandy for the AGI games

AFAIK, the Tandy CRTC registers are accessed and set up the same way as CGA (although some of the values might be different in Modes 8, 9, and A). Therefore if we add code to DOSbox's Tandy mode to emulate the HPOS and VPOS registers, it could then also be put into the CGA mode with no modifications.

This could be done for the PCjr as well (remembering that AGI games have to work on there too) but the registers aren't accessed the same way as on Tandy/CGA.

Reply 5 of 22, by collector

User metadata
Rank l33t
Rank
l33t

I own all of the KQ games several times over on the original media, NOT abandonware copies. It is not strange that KQ4 has a CGA driver while KQ1SCI did not. Remember, KQ4 is the very first SCI game. KQ1SCI is a later remake. KQ4 was released to introduce Sierra's new SCI engine. An AGI version was developed simultaneously for those that did not meet the high requirements of SCI. KQ4 signifies the beginning of the end of the AGI era. KQ1SCI. one of the last of the SCI0 games, was released near the end of the EGA era for Sierra and near the beginning of the VGA games.

Yes, AGI games were originally designed for PCjr. In fact, KQ1 was the very first game written for the PCjr. IBM commissioned Sierra to write a game to show off the advanced capabilities of the PCjr. Sierra created AGI for this purpose. They did design it for easy portability, though, so most AGI games would support CGA, too.

It would be interesting to hear what one of the DOSBox devs might have to add about this shaking on Tandy.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 6 of 22, by kao

User metadata
Rank Member
Rank
Member

I own all of the KQ games several times over on the original media, NOT abandonware copies.

Well that's cool. I have originals of KQ4 and a copy of KQ3 I just got on Ebay. A KQ5 CD somewhere as well, but I can't find that just now. I also have an original Troll's Tale booter disk.

An AGI version was developed simultaneously for those that did not meet the high requirements of SCI

Yeah...I know. I've tried running KQ4 on an IBM 5150 w/ CGA. You really don't want to do that.

I also quite unexpectedly found the AGI KQ4 on an abandonware site. Wanted to test it with DOSBox and thought I was downloading the SCI version until I opened the ZIP file. Which is a pleasant surprise since I didn't know any copies of AGI KQ4 were even on the net.

It is not strange that KQ4 has a CGA driver while KQ1SCI did not.

I'd assumed all Sierra games distributed on 720k/1.2MB disks no longer had CGA support, yet the remake version of Oil's Well does (although that isn't an SCI game). My favorite part of that game is that you can press F8 to cycle through all the CGA palettes.

They did design it for easy portability, though, so most AGI games would support CGA, too

Actually I think the original reason was because KQ1 was too complicated to easily write in assembly language, so they decided to use a scripting engine instead. It's for the same reason LucasArts used the SCUMM engine.

Reply 7 of 22, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

KQ1SCI certainly has drivers for CGA and Tandy 3-Voice sound as originally released on floppy disk. The earliest releases of this remake came on both 360KB and 720KB disks. This is the earliest box : http://www.vintage-sierra.net/kq/kqv6.php Then there is this box : http://www.mobygames.com/game/roberta-william … crown/cover-art Finally there is this box : http://www.mocagh.org/loadpage.php?getgame=kqvga

It seems that third box did reduce the graphics and sound drivers and may be the most prevalent release, along with Kixx and Slash releases. The CD collections stripped the drivers, and you often get these on abandonware sites. Ditto for KQ4SCI.

CGA, Tandy and PCjr. have a Motorolla CRTC 6485 controller or clone and access it in the same way, so the code need not be modified in this instance. This causes the screen shaking, as when Manannan kills Gwydion in KQ3.

Early 16-color SCI1 games like King's Quest V have CGA video drivers, and 360K and 720K versions of a game from Sierra always have the same drivers.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 8 of 22, by kao

User metadata
Rank Member
Rank
Member

It seems that third box did reduce the graphics and sound drivers and may be the most prevalent release, along with Kixx and Slash releases. The CD collections stripped the drivers, and you often get these on abandonware sites. Ditto for KQ4SCI.

Some of the drivers also vary between releases. The original release of KQ4 (August 1988) turns the background blue in CGA mode (if you're in 320x200, cyan, red, white, and blue and in 640x200, the foreground is blue). The second printing was released in September 89 (my KQ4 disks are the second printing). This turns the background black in 320x200 and the foreground white in 640x200.

CGA, Tandy and PCjr. have a Motorolla CRTC 6485 controller or clone and access it in the same way, so the code need not be modified in this instance. This causes the screen shaking, as when Manannan kills Gwydion in KQ3.

That's true. The CRTC registers work the same on all three, but the way you access them on the PCjr is a little different so some modifications have to be made there.

Early 16-color SCI1 games like King's Quest V have CGA video drivers

Yeah they did have a CGA/Tandy/EGA KQ5 but it's really rare like AGI KQ4. Most copies of KQ5 were either the VGA floppy version or the CD version.

The EGA KQ5, interestingly enough, also includes some drivers for plasma portables and laptops.

Reply 9 of 22, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

The KQ4 second printing has one less disk than the first printing and tweaked the background graphics a bit.

The only registers of the CGA and PCjr. which are in the same place are the 6845 registers at 3D4 and 3D5 and the status register at 3DA. The 6845 is still a discrete component on the Jr. and is not addressed through the Video Gate Array.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 10 of 22, by nikiniki

User metadata
Rank Member
Rank
Member

I noted some difference between AGI and SCI shakescreens on the PCjr.

With AGI, the screen shakes but it stays in the center of the screen.
With SCI, the screen shifts to left when the shakescreeen occurs and stayed to left. I need to adjust the monitor to center the screen manualy.

Don't forget the first sci games are not supported the PCjr mode.

Reply 11 of 22, by kao

User metadata
Rank Member
Rank
Member

The KQ4 second printing has one less disk than the first printing and tweaked the background graphics a bit.

I've never seen the first printing, but my copy has eight 360k disks and four 720k disks.

I noted some difference between AGI and SCI shakescreens on the PCjr.

With AGI, the screen shakes but it stays in the center of the screen.
With SCI, the screen shifts to left when the shakescreeen occurs and stayed to left. I need to adjust the monitor to center the screen manually.

It does that on CGA too. I found it kinda annoying since I couldn't reset the screen except by exiting the game and restarting. AGI games shift the screen diagonally, but SCI just moves it left and right.

Also this link has the manual for the booter KQ2 and it says you can adjust the picture by CTRL+ALT+LEFT/RIGHT. I never knew that you could do that on AGI games, but SCI may not have this feature. Don't remember the KQ4 manual mentioning anything about it.

http://www.sierragamers.com/uploads/24082/the … _2_tech_ref.pdf

Don't forget the first sci games are not supported the PCjr mode.

I know that they dropped PCjr support on SCI. In fact I recall a funny post on some forum where a guy said (paraphrasing) "It really disappointed me as a kid to learn that KQ4 wouldn't work on my PCjr because I didn't have enough memory. I wrote a complaint letter to Sierra and got back a rather icy reply from Ken Williams himself to the effect of 'It is more important to me to move my company forward and keep it profitable than continuing to support your PCjr'".

Reply 12 of 22, by kao

User metadata
Rank Member
Rank
Member

Screen shaking support could also be added for Hercules mode since again, it's 6845-based and would work essentially the same way, but I also don't know if AGI/SCI games do that on Hercules. I have a Hercules card+5151 monitor, but I can't test it because the card is in one of my Pentiums and Sierra games won't run in Hercules mode in dual-display setups (they use B800 for the main video page and B000 as a secondary page and as you can imagine this doesn't work too good).

Hercules mode on AGI is interesting because it produces a pop-up box for entering text ala SCI.

Reply 13 of 22, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

Screen shaking on CGA320C.DRV (and AGI) is implemented by modifying the horizontal/vertical sync position registers. Normally, those are used for centering the text/graphics data within the overscan area. Which is why it's conceptually nontrivial to emulate screen shaking on CGA without also emulating the overscan, because the emulation would then have to distinguish between writes to the register with the intention to center the screen (and thus should be ignored if no overscan border is emulated) and writes to the same registers with the intention to shake the screen (which then should be emulated).
Emulating the overscan properly is conceptually trivial (the 4:3 image resolution will then be based on Horizontal/Vertical Total minus the [fixed] Sync Pulse Width instead of the Horizontal/Vertical Displayed register) but annoying to the user, as the default BIOS values produce a screen that is shifted to the left which most games don't correct by themselves.

Reply 14 of 22, by collector

User metadata
Rank l33t
Rank
l33t

ykhwong's build does have an overscan patch, but of course the screen shake is still absent with the CGA driver.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 15 of 22, by VileR

User metadata
Rank l33t
Rank
l33t

If I remember correctly, that patch doesn't fully reproduce the behavior of real hardware, not in the case of CGA anyway.

Any other non-Sierra CGA games that do the screen-shaking thing, besides Defender of the Crown? One that I'm aware of is Lost Tomb from Datasoft; I haven't tested this on actual hardware, but the original arcade game shakes the screen when an "earthquake" occurs, and at the same spot in the PC conversion there's a routine that keeps writing different values to the horizontal sync position register, so I assume it's trying a similar trick.

NewRisingSun wrote:

Emulating the overscan properly is conceptually trivial (the 4:3 image resolution will then be based on Horizontal/Vertical Total minus the [fixed] Sync Pulse Width instead of the Horizontal/Vertical Displayed register) but annoying to the user, as the default BIOS values produce a screen that is shifted to the left which most games don't correct by themselves.

It would probably be "acceptable" to tweak the default H-position value in order to produce a centered screen... but that would break any game that does try to compensate for it. Fully emulating the overscan would be neat indeed, but given how DOSBox does its rendering and scaling, the total display size (active framebuffer area + overscan / border) would produce oddball resolutions that may be tricky to implement.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 16 of 22, by kao

User metadata
Rank Member
Rank
Member

Screen shaking on CGA320C.DRV (and AGI) is implemented by modifying the horizontal/vertical sync position registers. Normally, those are used for centering the text/graphics data within the overscan area. Which is why it's conceptually nontrivial to emulate screen shaking on CGA without also emulating the overscan, because the emulation would then have to distinguish between writes to the register with the intention to center the screen (and thus should be ignored if no overscan border is emulated) and writes to the same registers with the intention to shake the screen (which then should be emulated).

I know that DOSBox doesn't emulate the border in text mode. The inventory screen on AGI V2 and V3 has black text, a white background, and a blue border (booter AGI just has gray text on a blue background+border). On VGA, the text border is very small and hard to see, but it's quite huge on CGA/Tandy/EGA.

but annoying to the user, as the default BIOS values produce a screen that is shifted to the left which most games don't correct by themselves.

I'm well aware of that fact. If you use the CGA composite output on a TV/monitor with a curved screen, the picture is slightly shifted off the left edge. DOS provided a feature in the MODE command where it would load a TSR that hooked INT 10h and automatically shifted the picture when Function 0h was called. Of course, you can't always use that, particularly if running a booter game.

Reply 17 of 22, by kao

User metadata
Rank Member
Rank
Member

Since I mentioned Hercules mode, I should add that DOSBox's emulation of it still leaves a lot to be desired, especially the fact that it makes the picture white when most monochrome monitors were green or amber. That of course would be trivial to implement since you can just add a switch to select the display color. It won't display in full screen either, although that's kind of harder to work around because of the Hercules/MDA resolution.

One other slightly unrelated thing I should add. I've found that many games in DOSBox work best if you go to Windows Control Panel and turn on VSync. On real hardware, it was common to only alter graphics during the vertical retrace phase to prevent flickering and ragged animation. Also if you run CGA games on VGA, many are choppy (eg. Alley Cat and Sierra games) because they're expecting a 60Hz refresh and the latter's 70Hz messes them up. If run on real CGA, they have completely smooth animation.

Reply 18 of 22, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie
kao wrote:

Since I mentioned Hercules mode, I should add that DOSBox's emulation of it still leaves a lot to be desired, especially the fact that it makes the picture white when most monochrome monitors were green or amber. That of course would be trivial to implement since you can just add a switch to select the display color.

If you had bothered to read what comes up when you start DosBox in Hercules mode you'd know that "switch" already exists.

Reply 19 of 22, by collector

User metadata
Rank l33t
Rank
l33t
VileRancour wrote:

If I remember correctly, that patch doesn't fully reproduce the behavior of real hardware, not in the case of CGA anyway.

It has been a while since that patch was originally written, but I seem to remember something to that effect, too, which was why it was, at least in part, never added to the official DOSBox.