Home | Reviews | GUIpedia | Forum | Fun500


agumaDOS Palette
This is about FreeBASIC, not QBASIC, but I figured I should just post it here. So anyway, is there something different about the way DOS handles its palette, as opposed to Windows? Because my dimming function works in Windows, but in DOS it just turns everything all pinkish. I don't want to use dithering because that won't make it look as good and it's deathly slow in DOS.
2009-03-281:48 PM

ToddRe:DOS Palette
You have to remember that Windows provides more available memory to DOS applications than in protected mode. It's a common case sometimes with DOS programs that use graphics heavily. I'm not sure exactly what it is but judging on experience I'd say it is probably something regarding the amount of available memory DOS and Windows provide applications to use. Pure DOS runs in real mode but Windows DOS (without Windows running) uses protected mode. It could be limiting your use of graphics. Try reducing the GUI's resolution to something smaller and see if that makes a difference. At least it can help diagnose the problem.
2009-03-282:53 PM

agumaRe:DOS Palette
It doesn't help, and anyway it started out at 640x480.
2009-03-283:23 PM

BrandonRe:DOS Palette
It has to do with how you PUT, are you using PSET?
2009-03-283:27 PM

ToddRe:DOS Palette
The way I PUT in FB is to use a two-dimensional array with two indices for the width and height of the image.
2009-03-284:18 PM

BrandonRe:DOS Palette
No, I mean in the PUT command there an attribute were you set how to PUT the image, one is PSET, and if I had it set to the wrong one I got the same issue as Aguma.
2009-03-284:35 PM

agumaRe:DOS Palette
yes, I use PSET, not XOR (the default), but I don't PUT anything after I switch the palette; I just use it for the error handler which uses a rectangle instead of an actual window object.
2009-03-284:45 PM

BrandonRe:DOS Palette
When does this pinkish error occur?
2009-03-285:13 PM

agumaRe:DOS Palette
when I switch the palette! but only in dosbox, not windows. I don't get it. Well not that all of it gets pinkish, just all the colors get all distorted and stuff- they're just supposed to get dimmer.
2009-03-285:32 PM

BrandonRe:DOS Palette
Ok, I think I understand, my best guess is that its an FBDOS bug, FBDOS's graphics lib has a lot of quirks.
2009-03-285:38 PM

agumaRe:DOS Palette
Oh, then I guess dithering it is! Is there any faster way than just plotting every other pixel?
2009-03-285:46 PM

BrandonRe:DOS Palette
Just don't do it :P
2009-03-285:52 PM

agumaRe:DOS Palette
but I want the screen to look grayish so you can focus on the blindingly white box in the center that's buzzing at your face! (Well it doesn't actually buzz)
2009-03-285:54 PM

BrandonRe:DOS Palette
Well If you make the box white and in the center of my screen, I'll see it.
2009-03-285:59 PM

agumaRe:DOS Palette
Okay, I just wanted it to look a bit cool.
2009-03-286:10 PM

ksrRe:DOS Palette
Have you tried running your program on actual DOS? It might be a DOSBox thing. Also, post some code.
2009-03-297:07 AM

ToddRe:DOS Palette
DOSBox? I thought aguma was running it in DOS mode. But if it's DOSBox or an emulator, it could very well be a setting or bug in the emulator. Sometimes it could be the speed being too slow or the emulated graphics driver not able to handle the fading.
2009-03-2912:29 PM

BASIC Programming Help


2021 Brandon Cornell