home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gcc / help / 2006 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.5 KB

  1. Path: sparky!uunet!mcsun!uknet!edcastle!eonu24
  2. From: eonu24@castle.ed.ac.uk (I Reid)
  3. Newsgroups: gnu.gcc.help
  4. Subject: Direct video question (djgcc)
  5. Message-ID: <25332@castle.ed.ac.uk>
  6. Date: 29 Aug 92 01:59:17 GMT
  7. Distribution: gnu
  8. Organization: Edinburgh University
  9. Lines: 29
  10.  
  11. Hi! I've just started playing about with DJ's port of GCC for MSDos (not quite
  12. the latest version, but it was all I had to hand) and I was trying to implement
  13. some graphics bits and bobs using it. I've had a couple of problems with this
  14. and I wondered if anyone could point me in the right direction/send me some
  15. code. I will of course summarise if there is any interest.
  16.  
  17. The problem...
  18.  
  19. I have a number of slices of data which I want to read into memory (about 130K
  20. each) and display on my Tseng 4000 based SVGA setup. 
  21.  
  22. 1. Am I correct in thinking that that the protected mode stuff is set up to map
  23. my 1Mb of video memory into a linear chunk of memory at 0xD0000000? If so, can
  24. I allocate some memory with malloc, read my file into it and do something like
  25. this?
  26.  
  27. memcpy (0xD0000000, buf, 512);
  28.  
  29. where buf is my malloc'ed memory. I've been trying to do this but have been
  30. getting segmentation problems. Any clues anyone?
  31.  
  32. 2. I read in the notes on libgr.a that djgcc understands the paging mechanisms
  33. used by various supervga cards. Can anyone send me some sample code for
  34. performing the mode switch to 800x600 'cos all I seem to be able to get from it
  35. is 320x200 which isn't much use to me.
  36.  
  37. Many thanks,
  38.  
  39. Iain
  40.