VOGONS

Common searches


First post, by sirkope

User metadata
Rank Newbie
Rank
Newbie

Hi,

Could someone tell me how can I run anything with 360x240x8bit resolution under dosbox? The Legacy: Realm of terror game use this resolution, and I can't make it work...

Reply 3 of 12, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

You are correct. Some of DreamForge Entertainment games did use this "unchained mode" resolution. Sometimes it is referred as "mode-x" too. Every standard VGA should support it, because i think it's accomplish by setting some register on the VGA card, not using VESA. It's just a special "tweaked" mode 13h. Instead of MCGA 320x200x8 mode being directly addressed (1 pixel = 1 byte) they use a similar "banking" concept as with CGA and EGA modes where a pixel on screen would not match a byte in video memory. I don't know how to explain this better, sorry. I am going to check a book a have about programming CGA, EGA and VGA to see if I find some info there.

Reply 4 of 12, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Did you try the cvs version at http://forum.pixelz.org allready ?

I think it has support for mode-x (AFAICS doom uses it as well )

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 12, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

This is the explanation for mode-x. A little on the technical side, though...

þ What is Chain-4?

You people out there all have at least 256k vga cards. Most of you have
512k vga cards, and some have 1MB vga cards. But what you see on your
screen, as discussed in previous trainers, is 64k of data! What happened
to the other 192k??? Chain-4 is a method of using all 256k at one time.

The way this is done is simple. 1 screen = 64k. 64k * 4 = 256k.
Therefore, chain-4 allows you to write to four screens, while displaying
one of them. You can then move around these four screens to see the data
on them. Think of the Chain-4 screen as a big canvas. The viewport,
the bit you see out of, is a smaller rectangle which can be anywhere
over the bigger canvas.

+----------------------------+ Chain-4 screen
| +--+ |
| | | <- Viewport |
| +--+ |
| |
+----------------------------+

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
þ The size of the chain-4 screen

The Chain-4 screen, can be any size that adds up to 4 screens.

For example, it can be 4 screens across and one screen down, or one
screen across and 4 screens down, or two screens across and two screens
down, and any size in between.

In the sample program, the size is a constant. The size * 8 is how many
pixels across there are on the chain-4 screen, ie
Size = 40 = 320 pixels across = 1 screen across, 4 screens down
Size = 80 = 640 pixels across = 2 screens across, 2 screens down
etc.

We need to know the size of the screen for almost all dealings with the
Chain-4 screen, for obvious reasons.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
þ Layout of the chain-4 screen, and accessing it

If you will remember all the way back to Part 1 of this series, I
explained that the memory layout of the MCGA screen is linear. Ie, the
top left hand pixel was pixel zero, the one to the right of it was
number one, the next one was number two etc. With Chain-4, things are
very different.

Chain-4 gets the 4 screens and chains them together (hence the name 😀).
Each screen has a different plane value, and must be accessed
differently. The reason for this is that a segment of memory is only 64k
big, so that we could not fit the entire Chain-4 screen into one
segment.

All Chain-4 screens are accessed from $a000, just like in MCGA mode.
What we do is, before we write to the screen, find out what plane we are
writing to, set that plane, then plot the pixel. Here is how we find out
how far in to plot the pixel and what plane it is on :

Instead of the linear model of MCGA mode, ie :
--------------------------------------------------------
³00³01³02³03³04³05³06³07³08³09³10³11³ ...

Each plane of the Chain-4 screen accesses the memory in this way :

Plane 0 :
-----------------------------------------------------------
³00³ ³ ³ ³01³ ³ ³ ³02³ ³ ³ ³ ...

Plane 1 :
-----------------------------------------------------------
³ ³00³ ³ ³ ³01³ ³ ³ ³02³ ³ ³ ...

Plane 2 :
-----------------------------------------------------------
³ ³ ³00³ ³ ³ ³01³ ³ ³ ³02³ ³ ...

Plane 3 :
-----------------------------------------------------------
³ ³ ³ ³00³ ³ ³ ³01³ ³ ³ ³02³ ...

In this way, by choosing the right plane to write to, we can access all
of the 256k of memory available to us. The plane that we write to can
easily be found by the simple calculation of x mod 4, and the x
coordinate is also found by x div 4. We work out our y by multiplying
it by the size of our chain-4 screen.

NOTE : It is possible to write to all four planes at once by setting the
correct port values.

Reply 10 of 12, by sirkope

User metadata
Rank Newbie
Rank
Newbie
eL_PuSHeR wrote:

Men, you are KING ! I've downloaded it, then first, after the into, the program quited, BUT... then I've mixed the new exe with a previous SDL.DLL (283KByte, comes with the actual -0.58- version of dosbox) and a dosbox.cfg file and it's working !!!!!!

For your reward, it comes a pic from the game:

and a link for the game :
*cough*on the underdogs*cough*

Attachments

  • Filename
    legacy.jpg
    File size
    248.03 KiB
    Downloads
    702 downloads
    File license
    Fair use/fair dealing exception