vogons - very old games on new systems Last Visit : never :: 2013-5-21 @ 10:08 pm : Now
?FAQ sSearch mMemberlist uUsergroups
rRegister pProfile "Messages lLog in
View posts : unanswered
Forum Index :: DOSBox Patches ::
up Multiple SVGA Chipset patch
Goto page 1, 2, 3 ... 16, 17, 18  Next
Reply with quote Multiple SVGA Chipset patch :: 2005-4-28 @ 08:48 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
A couple weeks ago I started discussion about multiple SVGA chipset choices in DOSBox. To prove that those were not just empty words on my side I started coding and actually got something working. Right now I have some deadlines looming in my daily job so I may not be able to spend any time on this thing (not that I had that much time before but it was just enough). I don't want this code to be lost and I think some people may be interested, so I've submitted a patch (#1191552).
This is not a complete solution but basic stuff works and does it sufficiently well. You can switch between ET3000, ET4000, S3, and <none> in dosbox.conf, configure RAM size for ET4000. WHATVGA recognizes chipsets correctly, Deluxe Paint IIe works fine, those pesky Legend games have no problems at all. Again, this is not 100% implementation but it is a good start. The entire SVGA support is modularized and new chipsets can be added with no effort (basic support for a new chipset would take 30-45 minutes to implement). If you don't want to use it, just don't modify dosbox.conf and DOSBox will work exactly as it did before. I don't think there is any measurable performance impact with my patch.
Some interesting side notes:
- As I remember, there are two versions of Deluxe Paint IIe -- one with VESA support and the other (older) without. The older one actually does not even have support for ET4000 or more than 512K of videoram. Interestingly enough, the gallery.exe app was never updated, so it is incompatible with "stock" DOSBox. Works in ET3000 mode just fine. Unfortunately, I don't have the older version anymore but I vividly remember patching ET3000 bank switching to work on my ET4000.
- The thing that started all this, Eric the Unready, gave me a surprise. That was really bad example to start with. Floppy and CD versions are quite different but report the same version number. CD version supports VESA and runs in 800x600x16 mode (called SVGA) in slightly patched DOSBox. 640x480x256 mode (called XGA) is completely broken in that version, regardless of chipset. Floppy version does not support VESA at all (neither does it support S3) but both SVGA and XGA modes work fine with my patch. Said that, that XGA mode is useless... and not documented in the manual.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 05:24 am
ih8registrations
Oldbie
no avatar
Joined: 2003-07-25
Posts: 880
It patches fine under mingw on 98se.

For those scratching your heads about what to write in dosbox.conf, the section and options are:

[vga]
#svgachipset -- s3 trio64, tseng et3000, tseng et4000, none
svgachipset=tseng et4000
videoram=1024


Alas, there's more to do to in order to run dawn patrol.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 05:45 am
HunterZ
Friendly Neighbourhood Moderator
[avatar]
Joined: 2003-01-31
Posts: 5533
Location: Seattle
Would it make sense to combine this with the machine= setting? For example, you would choose machine=et4000 instead of machine=vga to emulate the Tseng ET4000 SVGA chipset.

Just a thought (take it with a grian of salt).

_________________
You're perfect, yes it's true...but without me, you're only you.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 09:14 am
eL_PuSHeR
Moderator
[avatar]
Joined: 2003-06-20
Posts: 6131
Agreed. That would make things easier. No need to have a zillion different parameters with a clogged conf file. Besides S3 and TSENG were S/VGA cards, so they cannot be confussed with anything else.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 09:19 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
Good, at least now I know that I did not mess up the patch itself. It was quite complex patch after all.
I was not sure about dosbox.conf, both approaches kinda make sense. One of my goals was to isolate "other" SVGA implementations from the core as much as possible (if you check you will find that Tseng is mentioned only in vga_svga.cpp), putting chipset info in "machine=" line breaks it to some extent but really not that bad. Let's see what other people say.
I don't know about Dawn Patrol but I may have some time to take a closer look to see what registers that thing accesses (assuming that I can find a copy of that game and that my computer does not die on me -- it is quite unwell lately, ordering new mobo this weekend).
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 05:42 pm
ih8registrations
Oldbie
no avatar
Joined: 2003-07-25
Posts: 880
You can find Dawn Patrol at home of the underdogs:
http://www.the-underdogs.org/game.php?gameid=1841

machine=chipset would follow current nomenclature(though I find it awkward as they aren't synonyms; I think of cpu). I'd be less verbose: et4000 instead of tseng et4000.

For separation, I'm inclined to put each chipset in it's own file.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 08:44 pm
robertmo
l33t
[avatar]
Joined: 2003-06-18
Posts: 3789
what is
svgachipset=none
for?
Post new topicReply to topic
Hidden
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 09:14 pm
HunterZ
Friendly Neighbourhood Moderator
[avatar]
Joined: 2003-01-31
Posts: 5533
Location: Seattle
Disables all SVGA extensions, I'd guess.

_________________
You're perfect, yes it's true...but without me, you're only you.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 10:11 pm
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
Precisely. Not sure if that has any practical use but it was very easy to add so I though "why not."
One thought about putting SVGA choice in "machine" tag. That may break frontends. Right now the implementation defaults to S3 if no SVGA config is provided so old frontends will continue working without any issues. If the info is rolled into "machine" then "machine=vga" looks like it should mean "no svga" and the original setup should be "machine=s3". We may consider renaming "machine" to something better (any ideas?) and leave "machine" for compatibility. Video RAM setting can be rolled into the same line easily.
Dawn Patrol does not seem to be rare game by any means so I should have no problems getting a real copy, meanwhile HOTU version should do. Just in case, is that version known good?
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-01 @ 11:22 pm
ih8registrations
Oldbie
no avatar
Joined: 2003-07-25
Posts: 880
It's what I'm using to test, there's also the later h2h version at HOTU. The last incarnation of the series you still have to buy(there's a link to an online vendor at HOTU if interested).

I've added the other ten et4000 video modes. I just copied for mode 8 & A so they're not really 2 color and the two 1280x1024 modes don't display correctly yet. Of course, the 256 color 1280x1024 uses more than 1MB.

I've also been playing around with big rez text modes, 160x120/1280x960, and changing default mode 3(currently 80x96). I think I'll make it a config option.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-02 @ 04:49 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
Here's what I found. First of all, it looks like it is almost working. It's just that the memory handler is incorrect. This game uses SVGA banked memory in non-linear mode (similar to EGA, very popular technique). Simple hack in vga_memory.cpp, using vgaph.h256 instead of vgaph.hmap confirmed this theory but the result was still not quite correct. So, two pieces of the puzzle left: figure out when to switch to vgaph.h256-like mapper and fix mapper limitation as it does not expect more than 256K of RAM. In the last case it really should be different mapper.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-02 @ 06:06 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
A couple of technical details: it seems that two spots in vga_memory.cpp need to be fixed.
a) In VGA_SetupHandlers the section for M_LIN8 should look exactly like the one for M_VGA (can be collapsed into one section).
b) VGA_GFX_256U_WriteHandler should also write latched value at 128K and 192K (in addition to 64K).
I am not sure who owns that code, I'd like to get confirmation that I understand the internal logic correctly.
Still missing something -- the game runs and all graphics are there but the screen flickers too much. There are also redraw artefacts in menus.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-02 @ 08:06 am
robertmo
l33t
[avatar]
Joined: 2003-06-18
Posts: 3789
Just in case this might help: Navy Strike is a game by the same company and i think have the same problem.
Post new topicReply to topic
Hidden
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-02 @ 10:03 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
Thanks. That's quite typical for games from the same company to share some peculiarities, bugs, etc. In this case I would not be surprised if there are other (i.e., not Rowan/Empire) games that use the same techniques.
On the more technical note -- does anybody know exactly how paged and banked RAM accesses are supposed to interact with each other? Dawn Patrol apparently switches to paged access but I am also seeing a lot of bank switching. My gut feeling is that I have broken logic there somewhere.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-03 @ 09:48 pm
ih8registrations
Oldbie
no avatar
Joined: 2003-07-25
Posts: 880
Well, based on your details, I'm where you're at; have got et4000 svga working in dawn patrol. The menu articfacts you're referring, the fact that sometimes it doesn't draw the background the first time? As for flickering, it should be a delay or an update not happening as fast as it should.

et4k had vesa so I figure it should be setup like it is for s3. I've added modes to the vesa list since only up to 800x600 were included(us navy allows 1024x748).
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-04 @ 01:32 am
ih8registrations
Oldbie
no avatar
Joined: 2003-07-25
Posts: 880
Terminal Velocity SVGA mode doesn't work using et4000; just gives a blank screeen while still running.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-04 @ 07:51 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
Before we get to Terminal Velocity, let's figure out Dawn Patrol. It is just so close! I had a thought about redraw timing but there are two things that are not consistent with that kind of problem: it is only the upper part of the screen that blinks, while the lower is fine but missing gun turrets; the other one is that if you browse "pages" you can find quite of a few with blinking videos. Also, that first menu missing background... No, this is definitely memory mapping issue. I am seeing a lot of bank switching and coupled with latched memory it is not that clear how is that supposed to work.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-04 @ 08:22 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
On the second thought, after looking at those artefacts again, you are right and it may be timing. Or: timing and memory issue. It is easy to prove that memory is not 100% there yet. In vga_memory.cpp in VGA_NormalReadHandler add one line at the beginning: start += 64*1024*vga.svga.bank_read; Similarly, in VGA_GFX_256U_WriteHandler that should be start += 64*1024*vga.svga.bank_write; Notice that a few things look different now, starting with the Empire logo? There is something else missing -- there must be another (Rowan) logo appearing immediately after Empire. Where is it? My guess is in the same place where the background of the first menu is. Signing off for today, long day tomorrow.
Post new topicReply to topic
Offline
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-04 @ 07:20 pm
robertmo
l33t
[avatar]
Joined: 2003-06-18
Posts: 3789
One more game:

Wonderland (by Magnetic Scrolls, 1990)

For 800x600x16colors it has only two options:
1. Super VGA
2. Paradise (works with my Paradise PVGA1A-JK card)

I wonder whether your patches already bring this game back to life in 800x600 Wink
Post new topicReply to topic
Hidden
Reply with quote Re: Patch for Tseng SVGA support is available in SourceForge :: 2005-5-05 @ 08:15 am
vasyl
Oldbie
no avatar
Joined: 2005-03-27
Posts: 680
Haven't played that one in ages, did not even remember that it had SVGA mode. It has rather quirky setup, I could not install the original (although I haven't tried running from the original floppies, I prefer not to touch them more than necessary, using images instead), and the HOTU version, while different, was not any better. I'll have to mess with that setup a little more when I have time. However, it ran far enough for me to get pretty good idea if it works with my patch. Most likely, it is. The game claims VESA compatibility but that particular mode is not supported in DOSBox 0.63. I have it enabled in my patch so it is very likely to run (use S3 mode). Said that, it may just be easier to use Magnetic to play this one.
Back to Tseng and Dawn Patrol. Unfortunately, no news, just did not have any time today. Side question though. Does anybody have list of DOS games supporting SVGA? I vaguely remember seeing such a list (it had more info than just that) some ten years ago.
Post new topicReply to topic
Offline
page 1 of 18
Goto page 1, 2, 3 ... 16, 17, 18  Next
All times are GMT
Moderate
Quick Reply & Options
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001-2003 phpBB Group.
vogons and vogons site design and content herein is under a creative commons license 2002-2003 zetafleet.dom.
This site hosts no abandonware. There is no material that is knowingly illegal here.
zetafleet.dom will not be held responsible for users' posts.
This disclaimer is brought to you thanks to the BSA.