Board index » delphi » HELP A BEGINNER PLEASE!!

HELP A BEGINNER PLEASE!!

Im just starting with borland turbo pascal 7.0 and i cant figure out how
to do one simple thing... get in screen mode 13 (320x200x256) using the
graph unit... its driving me NUTS!!!  Im used to basic wheere i can jjust
go SCREEN 13 and poof.... 320x200x256, its even easier in ASM i just go
mov ax, 013h then int 010h...

____________________________
Intrepid
bs...@torfree.net
Mississauga, Ontario, Canada
----------------------------

ps:  dont say do inline assembly and do it the asm way cuz then i cant
use the graph.tpu library

 

Re:HELP A BEGINNER PLEASE!!


Quote
bs...@torfree.net (Brad Kimmel) wrote:
>Im just starting with borland turbo pascal 7.0 and i cant figure out how
>to do one simple thing... get in screen mode 13 (320x200x256) using the
>graph unit... its driving me NUTS!!!  Im used to basic wheere i can jjust
>go SCREEN 13 and poof.... 320x200x256, its even easier in ASM i just go
>mov ax, 013h then int 010h...

Well, the best way to do it is exactly what you listed below in the
ps...because the graph.tpu stuff is highly inefficient and you will be
dissatisfied with its performance if you do a lot of graphics.  As to
get what you are wanting out of graph.tpu look at page 34 of the
programmers reference.

Quote
>ps:  dont say do inline assembly and do it the asm way cuz then i cant
>use the graph.tpu library

best way...

procedure graphmode13; assembler;
  asm
     mov ax, $13
     int $10
  end;

Re:HELP A BEGINNER PLEASE!!


Quote
In article <DxJ7u3.DDH.0.qu...@torfree.net> bs...@torfree.net (Brad Kimmel) writes:
>Im just starting with borland turbo pascal 7.0 and i cant figure out how
>to do one simple thing... get in screen mode 13 (320x200x256) using the
>graph unit... its driving me NUTS!!!  Im used to basic wheere i can jjust
>go SCREEN 13 and poof.... 320x200x256, its even easier in ASM i just go
>mov ax, 013h then int 010h...

ftp://ftp.simtel.net/pub/simtelnet/msdos/borland/bgvga256.zip

This is the Borland BGI driver for mode 13h.  One minor disclaimer:  It has
the (IMHO) inherent suckfulness of BGI graphics and is extremely slow for
mode 13h graphics.  Powered by Olympic champion snails.

Quote
>____________________________
>Intrepid
>bs...@torfree.net
>Mississauga, Ontario, Canada
>----------------------------
>ps:  dont say do inline assembly and do it the asm way cuz then i cant
>use the graph.tpu library

procedure setmode (mode : byte); assembler;

asm
  xor   ah,ah
  mov   al,[mode]
  int   10h
end;

Painfully simple.  Besides, this mode is very easy to write your own
graphics routines for (and only a little hard if you want to write *good*
graphics routines!).  I'm not going to go into any great length to explain
it because volumes of text have already been written and posted on the
subject.  You shouldn't have to look very far to find a shareware, freeware,
or public domain library that's easy to use and much better than using the
BGI functions.

But if you don't care squat about performance, go ahead and use the BGI.

--
Scott Earnest          | We now return you to our regularly scheduled |
siny...@{*word*104}space.org | chaos and mayhem. . . .                      |

Re:HELP A BEGINNER PLEASE!!


Quote
Brad Kimmel wrote:

> Im just starting with borland turbo pascal 7.0 and i cant figure out
...cut...
> go SCREEN 13 and poof.... 320x200x256, its even easier in ASM i just go
> mov ax, 013h then int 010h...

hmm. do it the asm way :-) and write your own tpu. not very difficult.
SWAG will get you quite a bit of the way. (check my reply to: Henrique -
3D Graphics Help).

OK. The borland way... The most typical error is to forget the path when
using InitGraph.

Also: GET SWAG!!!!
Also: GET SWAG!!!!
Also: GET SWAG!!!!
Also: GET SWAG!!!!

                                        - KRister

Re:HELP A BEGINNER PLEASE!!


Brad Kimmel <bs...@torfree.net> wrote in article
<DxJ7u3.DDH.0.qu...@torfree.net>...

Quote
> Im just starting with borland turbo pascal 7.0 and i cant figure out how
> to do one simple thing... get in screen mode 13 (320x200x256) using the
> graph unit... its driving me NUTS!!!  Im used to basic wheere i can jjust
> go SCREEN 13 and poof.... 320x200x256, its even easier in ASM i just go
> mov ax, 013h then int 010h...

I don't think the graph.tpu supports 320*200*256.. You'll have to use
inline assembly.
-That's what I'm doing... :)

Re:HELP A BEGINNER PLEASE!!


In article <01bba2b0$575ee040$ea648fc2@nyco> "Nyco (Bj?rn Erik Haug)" <b...@sn.no> writes:

Quote
>Brad Kimmel <bs...@torfree.net> wrote in article
><DxJ7u3.DDH.0.qu...@torfree.net>...
>> Im just starting with borland turbo pascal 7.0 and i cant figure out how
>> to do one simple thing... get in screen mode 13 (320x200x256) using the
>> graph unit... its driving me NUTS!!!  Im used to basic wheere i can jjust
>> go SCREEN 13 and poof.... 320x200x256, its even easier in ASM i just go
>> mov ax, 013h then int 010h...
>I don't think the graph.tpu supports 320*200*256.. You'll have to use
>inline assembly.
>-That's what I'm doing... :)

I've posted this before, but I'll post it again.

GRAPH.TPU is an intermediate.  On its own, it knows nothing about any
graphics mode.  That's what the BGI drivers are for.  As long a BGI driver
is provided for some particular mode, GRAPH.TPU should be able to produce
graphics in that mode.

Although a BGI for 320x200x256 wasn't included in the package, that doesn't
mean it doesn't exist.  The "official" Borland version can be found at:

ftp://ftp.simtel.net/pub/simtelnet/msdos/borland/bgvga256.zip

Of course, the performance of this BGI is rather pathetic, so writing your
own procedures and/or getting a third-party mode 13h library off the net is
a much better way to go.

--
Scott Earnest          | We now return you to our regularly scheduled |
siny...@{*word*104}space.org | chaos and mayhem. . . .                      |

Other Threads