VOGONS


First post, by TeaRex

User metadata
Rank Member
Rank
Member

Has anybody ever looked into the U7 earthquake effect? The whole screen is supposed to shake up and down (via some hardware scrolling VGA registers I believe). Instead you only get the lowest few pixel lines flashing in DOSBox.

How to reproduce: Install Ultima7 if you haven't (must have Forge Of Virtue Add-On, so the CD version is preferable). Start a new game. During the very first conversation (just after Iolo says "I shall accompany thee") there will (or rather won't in DOSBox) be the shaking effect, then Iolo says something about Lord British knowing the reason for this quake. The effect happens again later in the game, but this is the easiest way to trigger it.

The only posts I found about this were from 2004, when DOSBox 0.61 was current. Has there been any work on it?

Thanks for any answers. PLEASE NOTE that I am NOT DEMANDING for you to fix this just asking if anybody has looked into it, what the results were, and if I could help with it.

tearex

Reply 2 of 25, by TeaRex

User metadata
Rank Member
Rank
Member

Hmmm.... there's nothing all that random about the effect if I remember correctly, just the screen bouncing up and down for a few seconds.

As for the ROM data, maybe the DOSBox "ROM" memory area could be filled with random junk bytes before the callbacks are installed? Admittedly not too pretty, but it should fix the problem of lack of random seed data.

tearex

Reply 7 of 25, by TeaRex

User metadata
Rank Member
Rank
Member
wd wrote:

Did those static-screens change appearance?

If you mean the black-and-white screen that appears for a short moment before/after the Guardian comes up in the intro, yes they did. There's not just a few white dots any more but fairly equal amounts of black and white.

I didn't notice a change in the blue background of the Guardian's speech, nor in the red screen that appears at "Journey Onward".

tearex

Reply 8 of 25, by TeaRex

User metadata
Rank Member
Rank
Member
Qbix wrote:

did you try vgaonly ? although I am not sure if that would "fix" this issue

I'm using vgaonly anyways for the 9x16 text mode support. So in fact it is the only thing I have tried. Is there any point in trying the several SVGA machine types?

tearex

Reply 10 of 25, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Just wanted to mention that Ultima 7's screen "noise" looks at only bit 0 of the bytes in the system bios rom. I tried putting this at the end of the constructor in memory.cpp:

for (i=0;i<0xfff0;i++) phys_writeb(0xf0000+i,rand()&1);

rand()&1 achieves the same effect as rand()&0xff but is somewhat less messy looking. Still a bit messy, though. 😉

Reply 11 of 25, by TeaRex

User metadata
Rank Member
Rank
Member

OK, sorry for resurrecting this now... The Earthquake effect that this thread was originally discussing seems to be implemented in a much simpler way than I thought: it's based on INT 10h AH=06h and AH=07H VGA BIOS functions for scrolling the screen up and down, which work in graphics mode just as well. On real 386-era hardware this is simply much slower than with DOSBox (since DOSBox implements these functions in native code, independent of cycles). That's all there is to it. So a simple delay in those routines should do the trick (I'll try it later when I get time).

Do you have a general mechanism already in place for slowing down BIOS calls? Since I'd assume that more than one game expects them not to run too fast.

Thanks for your patience!

tearex

Reply 13 of 25, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Loading some VGA BIOS with a debug build improves the shaking effect, so I tried adding a fixed number of cycles to the scroll functions by waiting in a loop. It does improve the bouncing of the screen, but doesn't work very well, and appears to depend on how many cycles DOSBox is running at compared to how many are consumed by the wait loop. What I usually see is random horizontal bands of the screen moving.

Another approach with vertical retrace turned out much better. The entire screen bounces up and down with little of the "tearing" seen in the other approach, and it's independent of how many cycles DOSBox is running at. I don't know if any video BIOS checks for retrace in its scroll functions, but it could improve the effect on real hardware as well.

I made a small loader program that waits for retrace before the scroll functions are called; and also patches INTRO.EXE in memory to use its code segment instead of the system BIOS segment for the white noise effect, which creates a more "snowy" result in DOSBox. Simply run the program in the folder where U7 is installed. Source code is included in the attached archive.

Attachments

  • Filename
    u7fx.zip
    File size
    1.12 KiB
    Downloads
    715 downloads
    File license
    Fair use/fair dealing exception

Reply 15 of 25, by Zósite K. S.

User metadata
Rank Newbie
Rank
Newbie

Outstanding!! Ripsaw8080, I just have no words to thank you for this splendid little fix. Now if only it could be implemented into the DOSBox main code somehow.

AFAIK, in order to run Ultima VII "by the book" with DOSBox only THIS issue remains unsolved.

RSV/VA Zósite Kónstyte Styles/M/FRG Phoenix

Reply 16 of 25, by keropi

User metadata
Rank l33t++
Rank
l33t++

while searching the web-archive for moslo deluxe documentation (yeah I have it registered but the private area is not working!!!!) I found this Ultima 7 fix in their site 😳

Qfix allows the Ultima VII computer game to be run with Riva 128 video boards. The vertical earthquake display effect is replaced by a lateral movement (consistent with slippage on a strike-slip fault instead of a thrust fault).

Qfix is a TSR (terminate-and-stay-resident) program. When run it remains in memory until your computer is rebooted (or in the case of a Windows DOS box, until the box is closed). Qfix does not alter any files or system settings. While resident, Qfix occupies approximately 600 bytes of RAM.

You can run Qfix.com at the DOS command line prior to running Ultima7.com or you can add a line to load it in your autoexec.bat file. It will work with any VGA-compatible display board. It affects only vertical scroll only in 320 x 200 x 256-color graphics mode.

it states riva128 cards, but it maybe also usefull in dosbox... haven't tried it (and I can't imagine doing it soon) but here it is 😁

Attachments

  • Filename
    qfix.zip
    File size
    1.96 KiB
    Downloads
    361 downloads
    File license
    Fair use/fair dealing exception

🎵 PCMIDI mpu site
🎧 Orpheus soundcard site
Action Rewind site
💻 WTB Amstrad PC7486SLC-33

Reply 17 of 25, by TeaRex

User metadata
Rank Member
Rank
Member

IIRC, Qfix just reroutes the INT10 call of the vertical scrolling routine (which was broken in the Riva 128 BIOS) to the horizontal scrolling routine. Since both routines are implemented in too-fast native code in DOSBox, I doubt that it would help.

tearex

Reply 18 of 25, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't think there ever was a video bios that had horizontal scroll routines; it would have been non-standard. That TSR pushes the pixels around in video memory by itself. It's similar in some ways to loading a video bios in DOSBox, where the "too-fast" internal code is no longer being used, and you get a lot of shearing on the screen.

Reply 19 of 25, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

Sorry for posting slightly OT, but I had this on my mind for a while now: ripsaw8080, do you think it'd make sense to collect all your "custom game fixes" into one thread, or pack them all together and offer the archive in a dedicated thread? Or create a thread with links to the others? You know, like some kind of inventory/directory. I'd hate playing a game and finding out afterwards that there's a fix for a problem I didn't really notice (though the Ultimas are quite low on my "must play" list I have to admit, UUW is placed a bit better) (; .