VOGONS


First post, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

I'm writing the DOS target for my RPG game engine at the moment and I'm using additional memory pages for double buffering, artwork, sprites etc.

There's a little bit of automation of memory layout (all VRAM, various split VRAM/RAM configs, all RAM) to hold assets, based on the amount of memory/pages detected on the video card (all at 320x240 mode-x, VESA1/2/3 or VBEAF). So far I'm catering for the following, detected at runtime:

<256KB - 1x primary display (doublebuffer and all assets in RAM) - not sure this configuration is even feasible?
256KB - 1x primary display, 1x doublebuffer screen, 1x screen of art/UI elements (all sprites in RAM)
512KB - 1x primary display, 1x doublebuffer screen, 1x screen of art/UI elements, 1x screen of sprites/tiles, 1x screen of boss sprites, 1x free page (some sprites in RAM)
1MB+ - 1x primary display, 1x doublebuffer screen, 1x screen of art/UI elements, 3x screen of sprites/tiles, 4x screen of boss sprites, 3x free pages (all sprites in VRAM)

Were there ever any VGA cards produced that had an amount of memory not falling in to the categories above - 640kb or 768KB, for instance? I can't recall ever hearing of one, but if it exists, then it would need to be a configuration I cater for.

My collection database and technical wiki:
https://www.target-earth.net

Reply 1 of 11, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
megatron-uk wrote on 2022-12-20, 13:53:
I'm writing the DOS target for my RPG game engine at the moment and I'm using additional memory pages for double buffering, artw […]
Show full quote

I'm writing the DOS target for my RPG game engine at the moment and I'm using additional memory pages for double buffering, artwork, sprites etc.

There's a little bit of automation of memory layout (all VRAM, various split VRAM/RAM configs, all RAM) to hold assets, based on the amount of memory/pages detected on the video card (all at 320x240 mode-x, VESA1/2/3 or VBEAF). So far I'm catering for the following, detected at runtime:

<256KB - 1x primary display (doublebuffer and all assets in RAM) - not sure this configuration is even feasible?
256KB - 1x primary display, 1x doublebuffer screen, 1x screen of art/UI elements (all sprites in RAM)
512KB - 1x primary display, 1x doublebuffer screen, 1x screen of art/UI elements, 1x screen of sprites/tiles, 1x screen of boss sprites, 1x free page (some sprites in RAM)
1MB+ - 1x primary display, 1x doublebuffer screen, 1x screen of art/UI elements, 3x screen of sprites/tiles, 4x screen of boss sprites, 3x free pages (all sprites in VRAM)

Were there ever any VGA cards produced that had an amount of memory not falling in to the categories above - 640kb or 768KB, for instance? I can't recall ever hearing of one, but if it exists, then it would need to be a configuration I cater for.

If you use VESA modes then instead of these "jumps" according to detected RAM sizes you can ask the VESA BIOS how many video pages are supported in the given video mode.
You can do this by calling VESA Function 01h Return VBE Mode Information and looking at the byte value of NumberOfImagePages (at offset 29) in the returned ModeInfoBlock struct.
If the card can provide you e.g. 4 video pages in your selected video mode it's all the same regardless the card has 512KB or 768KB or 1MB of memory.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 3 of 11, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie
Falcosoft wrote on 2022-12-20, 14:33:

If you use VESA modes then instead of these "jumps" according to detected RAM sizes you can ask the VESA BIOS how many video pages are supported in the given video mode.
You can do this by calling VESA Function 01h Return VBE Mode Information and looking at the byte value of NumberOfImagePages (at offset 29) in the returned ModeInfoBlock struct.
If the card can provide you e.g. 4 video pages in your selected video mode it's all the same regardless the card has 512KB or 768KB or 1MB of memory.

Yes, I am using the equivalent in Allegro - asking for 'n' times the physical resolution in virtual resolution and then backing off until 'n' gives me a screen mode that works (e.g. assume a virtual resolution of 320 by (240 * n) and decrease 'n' until the requested virtual resolution is set), which gives me the number of pages of that size to work with. I suspect underneath it is using the same calls (at least in VESA modes; not sure what it is doing in mode-x screen modes).

It's just that my memory / asset management decisions are based on those 256/512/1024/1024+ sizes and how many 32x32 sprites (or whatever size of asset) can fit on a virtual screen; rather than filling all the space up for sprites I'm trying to balance things out by always having a certain amount of a given type of asset (background art, ui buttons, sprites, effects etc) in video memory - simple example, when there isn't enough pages of video memory for all sprites, then making sure that at least all of the resting animation frames are in in vram, since they'll be the most common ones needed.

My collection database and technical wiki:
https://www.target-earth.net

Reply 4 of 11, by rmay635703

User metadata
Rank Oldbie
Rank
Oldbie

I have encountered old
128kb and 150kb video cards
The 128kb one was labeled as if it were VGA, my guess is EGA, MCGA at best.

Given the rarity and the likelyhood these were at best not fully VGA, I don’t think they are worth worrying about unless EGA and proprietary devices are of interest

Reply 5 of 11, by mkarcher

User metadata
Rank l33t
Rank
l33t
rmay635703 wrote on 2022-12-20, 19:14:

The 128kb one was labeled as if it were VGA, my guess is EGA, MCGA at best.

I don't think MCGA was ever made on a card. As far as I know, the only implementation of MCGA is a pair of two custom logic chips accompanied by some memory and logic support chips as part of the PS/2 Model 25 and PS/2 Model 30 (both in the 8086 variant) mainboard.

Reply 6 of 11, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, they sound like oddball ones. Since mode X requires 76KB of memory (320 * 240 * 1) , I guess the minimum specification potentially is 128KB, if such a card existed and allowed itself to be set to mode X. That would give you a page-and-a-bit worth of display, so in my asset management logic above, it would place the double buffer region and all other assets in system memory.

Planar stuff is... not on my radar right now. It's one of the reasons I've actually been working on more oddball stuff like the Sinclair QL over, say, the Amiga/Atari ST. Thinking about planar graphics really fries my brain.

(Yes, I know mode X is planar... but Allegro hides it all from you - so accessing mode X bitmaps is no different to blitting something to-from a VESA linear framebuffer. One of my other platforms, the X68000 also has a planar arrangement, but only for the text layer; the sprites and other graphic layers are all nice, simple, contiguous memory).

My collection database and technical wiki:
https://www.target-earth.net

Reply 7 of 11, by mkarcher

User metadata
Rank l33t
Rank
l33t

If your program requires mode X capability, your program won't run on any pre-VGA card. VGA-compatible cards always have (at least) 256KB, so no need to worry about graphics cards with less than 256KB. While EGA cards with 64KB can be encountered in the wild, less than 256KB is no option for VGA.

Reply 8 of 11, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

That makes it somewhat easier, then.

It needs to run in mode X, VESA 1/2/3 or with a 320x240 VBE/AF driver (admittedly there are few cards which fall in to the latter category.

I may return to EGA at some point, once I decide to look at any planar type systems - but I'm leaving that until all the functionality of the engine is in place and working across the main test platforms (SDL, Dos/Allegro, QL, X68000 and MSX2).

My collection database and technical wiki:
https://www.target-earth.net

Reply 9 of 11, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

NeoMagic NM2070 came with 768KB of video memory. Cyrix MediaGX has integrated video and allows you to choose in the BIOS how much system RAM to set aside for video. I recall there being some unusual options there like 1.5MB or something. Trident Cyber 9525 had 2.5MB.

again another retro game on itch: https://90soft90.itch.io/shmup-salad

Reply 10 of 11, by rasz_pl

User metadata
Rank l33t
Rank
l33t

1.25MB was also an option on some cards specifically for 1280x1024 at 256 colors (8-bit) example https://theretroweb.com/motherboards/s/dsm-computer-96-m2933
ET6000 2.25MB was specifically for 1024x768 at 16-bit 24-bit

Last edited by rasz_pl on 2022-12-22, 08:54. Edited 1 time in total.

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 11 of 11, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
rasz_pl wrote on 2022-12-22, 08:11:

ET6000 2.25MB was specifically for 1024x768 at 16-bit

Correction: 24 bpp

1024x768x24bpp needs precisely 2.25 MB, so 2 MB was not enough, but 4 MB was waste of memory.
MDRAM with its fine granularity of chip capacities was convenient.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...