Comments (17)
How's this?
from dosbox-x.
To more accurately explain what is supposed to be going on in VGA terms: for '90s Nvidia, ATi, and possibly some Cirrus Logic and C&T graphics adapters, enabling the mode 13h pixel doubling bit of the VGA mode control register while in 640x350 text mode would result in a 256-color 320x350 text mode with 4 colors per character. The 4 colors are indexed using the background and foreground colors as the high and low nibbles of the palette index.
For reference, here is how modern MZX enables this hack: https://github.com/AliceLR/megazeux/blob/88a20a39ac50e70eabd4925a6a1433ae0be0e127/arch/djgpp/render_ega.c#L98
static void ega_set_smzx(boolean is_ati)
{
// Super MegaZeux mode:
// In a nutshell, this sets bit 6 of the VGA Mode Control Register.
// Bit 6 controls the pixel width - if 1, the pixel width is doubled,
// creating one 8-bit pixel instead of two 4-bit pixels. HOWEVER,
// normally, this is only done in Mode 13h.
//
// nVidia and some Cirrus Logic cards support this; ATI cards
// also "support" it, but swap the order of joining the pixels
// and require a weird horizontal pixel shift value - see below.
outportb(0x3C0, 0x10);
outportb(0x3C0, 0x4C);
if(is_ati)
{
// set horizontal pixel shift to Undefined (0.5 pixels, in theory)
outportb(0x3C0, 0x13);
outportb(0x3C0, 0x01);
}
}
I don't have any test programs for this ready since I wasn't prepared to request this yet, but in the old DOS versions of MegaZeux you could load the file PAL_ED.MZX, press "P" to open the palette editor, and press "X" to display the entire 256 color palette. It should show something that looks like this:
Instead, what DOSBox and DOSBox-X display is this:
from dosbox-x.
I just tested on an old GeForce 6200 AGP card, and that card does SMZX mode correctly. Tested on 2.93 DJGPP build.
from dosbox-x.
Ew... very clever! Someone figured out how 256-color mode works and hacked text mode to fit within it! 👍
VGA 256-color mode is really just 4 bits shifted into an 8-bit register per dot clock, but that would make a strange unhelpful 640x200 256-color mode, so there is a bit to latch every other pixel so that you only see the completed 8-bit value and not the intermediate ones. This is also why it is impossible to do a 640x200 256-color tweakmode on standard VGA hardware.
from dosbox-x.
I have an old Pentium laptop with a Cirrus chipset (and 4KB bank switching to prove to naive DOS games jam developers that not all VESA BIOSes bank switch on multiples of 64KB even if the window itself is 64KB 😆), maybe this trick works there too.
from dosbox-x.
I can confirm:
A 486 laptop with a Paradise/Western Digital SVGA chipset doesn't work this way. You can set the bit and halve the resolution of text mode, but it doesn't allow this hack to work.
A Pentium laptop (Toshiba Satellite Pro) with a Chips & Tech chipset does appear to work in a way that allows this hack to work. Setting that bit halves the resolution and makes the text multicolored that suggest 256-color 4-bit shifting behavior.
from dosbox-x.
Do you have specifics on these laptop models/graphics? I've been trying to keep a list of every known model that's been tested so far so we have more data.
A 486 laptop with a Paradise/Western Digital SVGA chipset doesn't work this way. You can set the bit and halve the resolution of text mode, but it doesn't allow this hack to work.
This sounds a lot like what happens with my ThinkPad 560X's NeoMagic chipset. The left pixel always gets doubled and tweaking the horizontal pixel shift register doesn't help.
Is the Satellite Pro a 400 CDS or comparable, by any chance? I had an unknown model Satellite Pro circa 2004 most likely with a C&T chipset that supported this hack. I remember it having used the same pixel ordering as the Nvidia cards (the left pixel of each pair contributes the low nibble of the color, IIRC).
The ATi cards that support this—in addition to needing that horizontal shift setting—apparently also have the nibbles in the opposite order.
from dosbox-x.
Do you have specifics on these laptop models/graphics? I've been trying to keep a list of every known model that's been tested so far so we have more data.
A 486 laptop with a Paradise/Western Digital SVGA chipset doesn't work this way. You can set the bit and halve the resolution of text mode, but it doesn't allow this hack to work.
This sounds a lot like what happens with my ThinkPad 560X's NeoMagic chipset. The left pixel always gets doubled and tweaking the horizontal pixel shift register doesn't help.
Is the Satellite Pro a 400 CDS or comparable, by any chance? I had an unknown model Satellite Pro circa 2004 most likely with a C&T chipset that supported this hack. I remember it having used the same pixel ordering as the Nvidia cards (the left pixel of each pair contributes the low nibble of the color, IIRC).
The ATi cards that support this—in addition to needing that horizontal shift setting—apparently also have the nibbles in the opposite order.
The Pentium laptop in question is a Toshiba Satellite Pro 465CDX (1997 era DOS/Windows 95 era laptop). It was a great laptop for it's time for both DOS gaming and Windows 95 OSR2 gaming. It came out right when Intel Pentium CPUs with MMX were appearing in laptops which was fun to play with from assembly language. Most Toshiba laptops of the time period including the Libretto use C&T chipsets.
The 486 laptop is a Compaq LTE Elite 450CX with a Paradise/Western Digital SVGA chipset. Seems to be about 1994-era. When I put a CF card in it I had to pick one 512MB or smaller for the BIOS to work with it.
from dosbox-x.
If your Toshiba laptop was made 2000-ish or later it may have an Intel chipset instead of Chips & Tech because Intel acquired C&T around that time. https://en.wikipedia.org/wiki/Chips_and_Technologies
I have a Toshiba laptop I bought sometime around 2004 with an Intel graphics chipset (the 855GM) which runs perfectly fine with Linux and Windows XP.
from dosbox-x.
One thing that DOSBox-X has already implemented regarding this bit was the discovery some time ago that if you set up 320x200 256-color mode on VGA, and then switch OFF this bit, you get a strange 640x200 256-color mode because you get to see the intermediate "pixels" that result when the 8-bit value is halfway shifted out to shift the next pixel in. I suppose if you arrange the color palette just right you might exploit this odd tweakmode for high res 256-color graphics on standard VGA, but obviously not for gaming. While it seems to work on most chipsets I noticed Tseng ET4000 cards react in that case by just making it a 640x200 256-color mode with the 320x200 screen squeezed on the left side and the right side is just edge pixels repeated, but then again ET4000 cards have their own weird edge cases with standard VGA compatibility.
from dosbox-x.
How's this?
Looks great!
from dosbox-x.
Awesome. It's done.
from dosbox-x.
Not sure if hardware testing follow-up belongs in this issue, but so far I've received feedback from a MegaZeux user with a Compaq 4704 motherboard (onboard S3 Trio64V) that suggests this chip performs the same left pixel doubling as the NeoMagic MagicGraph128XD.
from dosbox-x.
Not sure if hardware testing follow-up belongs in this issue, but so far I've received feedback from a MegaZeux user with a Compaq 4704 motherboard (onboard S3 Trio64V) that suggests this chip performs the same left pixel doubling as the NeoMagic MagicGraph128XD.
So it does the same thing my 486 laptop with the Paradise/WD chipset does, and it only doubles pixels, instead of combining them into 8 bit pixels?
from dosbox-x.
So it does the same thing my 486 laptop with the Paradise/WD chipset does, and it only doubles pixels, instead of combining them into 8 bit pixels?
Yes, I think so. Here's a sample from PAL_ED.MZX that demonstrates the doubled pixels and 4-bit indexing:
edit: for good measure, here's the NeoMagic MagicGraph128XD showing the same behavior:
from dosbox-x.
Yeah, that's pixel doubling. If it's just doubled pixels and there's no colors between the colors, that's what it's doing.
from dosbox-x.
How's this?
Looks great!
Exactly like my ultra-janky MZX port I made back in the day (though I used automatic interpolation outside of the MZX runtime for SMZX Mode 1 until Mode 2 came out).
from dosbox-x.
Related Issues (20)
- Windows 98 HOT 1
- Questions about the last nightly build HOT 1
- Disabling the FPU doesn’t stop Quake from running HOT 2
- Inukaze vs Windows 98SE via DOSBox-X 2024.03.01 HOT 2
- XQueryPointer starts to return constant values after mouse "lock" (cursor sticks to the screen edges) HOT 4
- [Solved] Is VGA 9dot font hardcoded in DOSBox? HOT 5
- Does not work at all on Sonoma HOT 1
- DOSbox-X crashes on startup with a PCIe parallel card with address D100 in Windows 10 HOT 19
- Set custom icon from config file?
- Freeze at Joan of Arc: The Siege & The Sword HOT 1
- Screen blank freeze at Bleem 1.4 demo HOT 2
- MT-32/CM32L emulator game issues - Rise of the Dragon, Bumpy HOT 1
- Custom characters and graphical mouse of Norton Desktop for DOS are not working HOT 22
- redirecting any access to the autoexec.bat and config.sys files to a drive the user chooses HOT 3
- Inukaze -VS- Windows 95 OSR2.1 [ Magic3D Drivers ] HOT 11
- Where are these CRTC timings coming from? HOT 1
- New SFT code causes Windows 3.1 to crash on exit with Invalid Opcode exception (executing random code in HMA). HOT 10
- Input crashes when 1) moving app window to other monitor, 2) switching app windows, 3) minimizing and restoring HOT 5
- Please add the "FIND" command to SHELL_Cmd cmd_list[] HOT 3
- Can't get MIDI Fluidsynth to recognize SF2 Sound font file in Arch Linux HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dosbox-x.