Board index » delphi » Hardware graphics access

Hardware graphics access

Hi

I'm doing my second year at college in England, and I am trying to find out
about graphics modes to use in my final project.  I have been shown how to
generate an interrupt 16 to get to the BIOS graphics handling routines, but
I cannot remember which registers to set when I use it, or what graphics
modes I can use.

I also used the 'MEM' array to write directly to the graphics hardware, and
had a pretty funky looking random-coloured-random-position dot program
working in about 30 secs, but I cannot remember what the memory
offset/address was.

If u can help, *please* do!

Thanx

Mark

P.S. Please mail me a copy of any replies, as I have difficulty finding a
news server that takes this newsgroup and may not be able to get back here
again!!!!!

 

Re:Hardware graphics access


 $A000:0000

I think is what you are looking for.

Duan Nguyen

http://www.3-cities.com/~nguyen

Ema Nymton wrote in article <01bcd80a$190a28a0$1b0150c3@titanic>...

Quote
>Hi

>I'm doing my second year at college in England, and I am trying to find out
>about graphics modes to use in my final project.  I have been shown how to
>generate an interrupt 16 to get to the BIOS graphics handling routines, but
>I cannot remember which registers to set when I use it, or what graphics
>modes I can use.

>I also used the 'MEM' array to write directly to the graphics hardware, and
>had a pretty funky looking random-coloured-random-position dot program
>working in about 30 secs, but I cannot remember what the memory
>offset/address was.

>If u can help, *please* do!

>Thanx

>Mark

>P.S. Please mail me a copy of any replies, as I have difficulty finding a
>news server that takes this newsgroup and may not be able to get back here
>again!!!!!

Re:Hardware graphics access


In article <01bcd80a$190a28a0$1b0150c3@titanic>, e_nym...@hotmail.com says...

Quote
>[...] I am trying to find out about graphics modes to use in my final
>project.  I have been shown how to generate an interrupt 16 to get to the
>BIOS graphics handling routines [...]
>I also used the 'MEM' array to write directly to the graphics hardware, and
>had a pretty funky looking random-coloured-random-position dot

Hi!

The BIOS functions are the slowest gfx routines.
The direct-access is extremely hardware-dependent.

Turbo/Borland pascal has a GRAPH.TPU gfx programming. These are not the
fastest, but easy to use. You need the correct BGI driver for your video card.
A short example:

uses graph;
var driver, mode: integer;

begin
  DetectGraph(driver,mode);
  InitGraph(driver,mode,'c:\bp\bgi'); {Path to BGI drivers}
  { gfx routines }
  CloseGraph;
end.

To see the routines put the cursor to the 'graph' and press ctrl-f1.
BandiT

-------------------------------------------------------
Get PR-Tracker -- tracks problem reports, defects, bugs
INFORMATION:  http://www.prtracker.com/info.html
DOWNLOAD:     http://www.prtracker.com/download.html/x/

Re:Hardware graphics access


Hi,

Try this (it's fairly basic stuff)

Switching to normal VGA mode (320x200x256color):

ASM  { go into assembler mode }
  mov ax,$13 { select video mode number }
  int 10h   { call interrupt 10(hex) (that's int 16) }
END;

Putting a pixel on this screen use:

mem[$a000:offset]:=color;

offset is 0-64000 and color is 0-255

To calculate an Y+X position use replace offset with:
(y*320)+x

Experiment with it!

Greets,
--
Pascal Bestebroer
Just4Fun Productions
internet: http://people.zeelandnet.nl/rpb/pindex.html
e-mail  : r...@zeelandnet.nl

Other Threads