Beginner help for DOS version

DOS specific questions.
Posts: 10
Joined: Mar 03, 2019 4:09

Re: Beginner help for DOS version

Postby Richard_ » Nov 05, 2020 12:08

@ DamageX

Thankyou for your interest.

It is taking me a lot longer to try to sort myself out for the DOS version than I would have expected.

Regarding the number of colors for 8 bit graphics on my 3200 x 1800 display:-

I ran my own test program (FreeBASIC DOS version and booting up from a usb drive (therefore now NO windows OS anywhere) for 8 bit graphics mode (3200 x 1800).

Since at present (because no windows) I cannot do a screenshot (and wanting if possible to avoid taking a digital photo) - I simply included some code I wrote to create a .bmp file capturing all 3200x1800 pixels, using bit8index = point (x,y) for all 3200x1800 pixels and saved into a 256color.bmp file. Attached below is my simulated screenshot of the 3200x1800 display (the .bmp file was converted to .png file using MS PAINT). Note because of an error when running my test program at the saving the image, only about half the screen was successfully captured - I recovered the valid part and dark green area was not captured.


Below is the actual SOURCE image for the code

ScreenRes 3200, 1800, 8
img =bmp_load(C:\Polor256.bmp)
put (2600,800),img


The full 8 bit color set (actually a few less than 256 colors) is displayed at the bottom of the screenshot. So yes I do get (almost) 256 colors.

I am now also trying to sort out why the displayed 2D color spectrum (from Polor256.png source) is color-wise mixed up - I think it has to do with the 256 color palette of PAINT 256color bmp files being very different from the inspected RGB values of pixels viewed manually by me on my HP display.
Posts: 10
Joined: Mar 03, 2019 4:09

Re: Beginner help for DOS version

Postby Richard_ » Nov 08, 2020 4:47

Just in case anyone is interested in my progress...

BOOTING FreeBASIC DOS from 16GByte USB stick with FreeDOS version 1.2 now (so have C:\> prompt on text screen).

Tried again my test program to test for 3200x1800 and 256 colors (called X.bas ---> X.exe fbc x.bas no switches or anything used)

On just typing in x.exe (Enter) MANY TIMES (which should automatically produce my simulated screenshot as a .BMP file of size 5,761,078 bytes (which I change using MS PAINT to .png for inclusion into this reply) - results are:-

Many times the ERROR message (below) is generated and a truncated .bmp file produced

General Protection Fault at cip = 0001723f, error = 8a10
eax = 00015001 ebx = 000010c0 ecx = 00000000
edx = 00000533 esi = 00001b5a edi = 0000234c
ebp = 00157aa8 esp = 00002328
program = C:\x.exe
cs: sel = 00a7 base =00400000 limit=007fffff
ds: sel = 003b invalid
es: sel = 0033 invalid
fs: sel = 0033 invalid
gs: sel = 00bf base = 00000000 limit = 0010ffff
ss: sel = 0033 invalid
App stack : [00157de8 .. 00057dec]
Exceptn stack [00057d28 .. 00055de8]
Call frame traceback EIPs:
General Protection Fault in RMCB at eip = 110f; flags =3002
eax = 00380001 ebx = 000010c0
ecx = 00000000 edx = 00057dff
esi = 00001b5a edi = 000003cc
ebp = 00000000 esp = 000003b8
cs = 2b ds = 3b es = 8f fs = 33 gs = 0 ss = 8f error = 00a4

SO on running x.exe a total of 15 times in succession the size of the generated .bmp file were


On the only two instances of 5,761,078 (i.e. the largest values and = correct complete .bmp image) did my program exit properly (no error message above) - note that there were multiple sets of the incorrect sizes (Total 15 runs = 2 correct + 13 faulty). The correct results (converted by PAINT to .png) is shown below and on quick inspection appears to be 100% correct EXCEPT for my 2D color spectrum Polor256.png MISSING ALL TOGETHER compared to what I see on my 3200x1800 display.

scrn8-4.png ... 4.png?dl=1

Anyone have any ideas on the error message and how to fix? I will try soon adding small time delays inside the loop getting 3200x1800 pixels color info - the program as it collected pixel color wrote straight away to the usb stick (of probably better than average quality based on purchase price).
Posts: 10
Joined: Mar 03, 2019 4:09

Re: Beginner help for DOS version

Postby Richard_ » Nov 08, 2020 6:49

Have now my 2D spectrum block (silly mistake of line being ' (ie REM)


When viewing the display - the 256 colors + etc are WRONG but the 2D spectrum block (C:\Polor256.bmp) is RIGHT
The saved image via my screenshot code - the 256 colors + etc is RIGHT but the 2D spectrum block is WRONG

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 1 guest