Article View: gnu.gcc.help
Article #292Direct video question (djgcc)
From: I Reid
Date: Sat, 29 Aug 1992 01:59
Date: Sat, 29 Aug 1992 01:59
29 lines
1533 bytes
1533 bytes
Hi! I've just started playing about with DJ's port of GCC for MSDos (not quite the latest version, but it was all I had to hand) and I was trying to implement some graphics bits and bobs using it. I've had a couple of problems with this and I wondered if anyone could point me in the right direction/send me some code. I will of course summarise if there is any interest. The problem... I have a number of slices of data which I want to read into memory (about 130K each) and display on my Tseng 4000 based SVGA setup. 1. Am I correct in thinking that that the protected mode stuff is set up to map my 1Mb of video memory into a linear chunk of memory at 0xD0000000? If so, can I allocate some memory with malloc, read my file into it and do something like this? memcpy (0xD0000000, buf, 512); where buf is my malloc'ed memory. I've been trying to do this but have been getting segmentation problems. Any clues anyone? 2. I read in the notes on libgr.a that djgcc understands the paging mechanisms used by various supervga cards. Can anyone send me some sample code for performing the mode switch to 800x600 'cos all I seem to be able to get from it is 320x200 which isn't much use to me. Many thanks, Iain
Technical Details
Message-ID:
<25332@castle.ed.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!edcastle!eonu24Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!edcastle!eonu24 From: eonu24@castle.ed.ac.uk (I Reid) Newsgroups: gnu.gcc.help Subject: Direct video question (djgcc) Message-ID: <25332@castle.ed.ac.uk> Date: 29 Aug 92 01:59:17 GMT Distribution: gnu Organization: Edinburgh University Lines: 29