delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/22/22:53:35

From: "Duncan Coutts" <Duncan DOT Coutts AT dial DOT pipex DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Graphics in djgpp and inline asm in djgpp
Date: Wed, 22 Sep 1999 23:03:49 +0100
Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom
Lines: 39
Message-ID: <7sbk0u$6n5$1@lure.pipex.net>
References: <363f3759 DOT 2670843 AT news DOT algonet DOT se>
NNTP-Posting-Host: aa177.du.pipex.com
X-Trace: lure.pipex.net 938038110 6885 193.130.240.177 (22 Sep 1999 22:08:30 GMT)
X-Complaints-To: abuse AT uk DOT uu DOT net
NNTP-Posting-Date: 22 Sep 1999 22:08:30 GMT
X-Newsreader: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>I need help with 2 things:
>
>1. I need to convert this asm code for waiting for the vertical
>retrace converted to a function that djgpp accepts.

[snip]
>2. I used these routines(below) for graphics before
>i changed to djgpp. When i use djgpp they dont
>work(execept set_mode). I have figured out its beacause you cant
>use far pointers and different memory models in djgpp.
>If some1 could help me to port this code to djgpp code
>or has any other code for graphics in djgpp it would be very help
full
>if you sent them to my(i dont want to use allergo).

[snip]

The change to protected mode is quite important especially at a low
level. You can't just access arbitrary memory locations (such as A000
or the byte you are checking for in your WaitForRetrace function).
Getting around the memory protection is a bit complicated. I suggest
you read the DJGPP FAQ as it mentions these issues.

My favourite solution is to allocate a selector and to use the farptr
functions. If you know what you are doing then this can be done is
asm.

Consider for using vesa rather than vga. It is fairly standard these
days and it still allows fast routines along with higher resolutions
and colour depths. 16bit colour modes are quite good for example. I
have managed to make VBE2.0 LFB (Linear Frame Buffer) with page
swapping work under DJGPP. Do some research on the web, but I can send
code if you like.

Duncan Coutts.




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019