flat assembler
Message board for the users of flat assembler.

Index > DOS > Print Image Vga 16 color

Author
Thread Post new topic Reply to topic
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Hi, here there is a simple example to print image in Vga standard mode
16 color 4bit..
Bye Wink
Post 15 Mar 2007, 14:18
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386
Quote:
here there is a simple example to print image in Vga standard mode


Thanks, but:

- It does not print, it tries to load it and display it on the screen only
- It is not a "standard" VGA mode, but a highly deprecated one 640*350,
for me it works in QEMU only, but not natively, 640*480 would be better
- It uses MMX without testing before, also there are no system requirements detectable
- "Interrupt MS-Kernel" is definitely a thing of the past Laughing

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 16 Mar 2007, 05:40
View user's profile Send private message Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth
> - It is not a "standard" VGA mode, but a highly deprecated one 640*350,
for me it works in QEMU only, but not natively

Then your graphics card is not VGA compatible, since mode 10h is a "native" EGA mode (for EGAs with 64k memory this mode is limited to 4 colors, however) and VGA comprises EGA.
Post 16 Mar 2007, 06:09
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386
Quote:
your graphics card is not VGA compatible


Possible ... this mode is very old nevertheless ... even more
when considering the MMX code used Laughing

Does it work for you ? Question

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 16 Mar 2007, 06:58
View user's profile Send private message Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth
> Does it work for you ?

Yes. (NVidea FX 5200)
Post 16 Mar 2007, 08:53
View user's profile Send private message Visit poster's website Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
ok, here there is a 640*480 simple example to display image to the screen in
Vga Standard mode 12h without MMX Wink
minimal 386 cpu. Image file is formatted with index to the palette from 0 to 0fh , 16 colors 4bit.
Post 16 Mar 2007, 12:43
View user's profile Send private message Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Last example with 8086 code Wink
Post 16 Mar 2007, 19:51
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Japheth wrote:
> - It is not a "standard" VGA mode, but a highly deprecated one 640*350,
for me it works in QEMU only, but not natively

Then your graphics card is not VGA compatible, since mode 10h is a "native" EGA mode (for EGAs with 64k memory this mode is limited to 4 colors, however) and VGA comprises EGA.


I've heard that some newer video cards don't support EGA at all (don't ask me why)! It's SO annoying, IMO, when backwards compatibility is dropped because of the lame-o "we don't need it, no one uses it, it's old" crapola.

Even if your video card supports it, you also need a monitor that allows it, plus an OS that allows it (grrr, Vista supposedly borks on DOS gfx proggies, e.g. Hugi compo). Thank God for emulation (DOSBox, QEMU, BOCHS, etc).

EDIT: Just FYI, all three (DRAW, DISPLAY, 8086) work on my Win XP Home SP2 (P4) w/ ATI RAGE128 (VESA 2.0). However, under DOSBox 0.70 on the same cpu, all work except DRAW (MMX version). Funny that the 8086 version is 316 bytes (today is 3/16) but the MMX version is 286 bytes (but needs a Pentium w/ MMX). Razz Oh, and it'd be nicer if you could specify the raw file via cmdline (really easy to implement).
Post 16 Mar 2007, 21:29
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386
Quote:
is a 640*480 simple example to display image to the screen in
Vga Standard mode 12h without MMX minimal 386 cpu. Image file is
formatted with index to the palette from 0 to 0fh , 16 colors 4bit.


Quote:
Last example with 8086 code


COOL Smile

Both examples do work on my EGA-incompatible card. Laughing

Add to "official" examples please Wink

Quote:
Vista supposedly borks on DOS gfx proggies, e.g. Hugi compo). Thank God for emulation


Thanks God for BOCHS and QEMU on DOS ... rest is for the Devil Laughing

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 17 Mar 2007, 05:54
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.