Article View: rec.games.programmer
Article #1954Re: 256 VGA (mode 13h)
From: Greg Alt
Date: Tue, 12 Jan 1993 22:55
Date: Tue, 12 Jan 1993 22:55
17 lines
1493 bytes
1493 bytes
In article <C0qLEE.JI8@dcs.ed.ac.uk>, bal@dcs.ed.ac.uk (Benjamin Librojo) writes: > Has anyone out there written code for directly accessing display >memory in VGA 320X200 (256 colors) mode ? For some reason in my program, >if the y-coord is greater than 100 the x position of the pixel seems to be >out by about ten pixels. Does anyone know why this is? Am I doing something I had this same problem a while ago. The problem is how you are computing the address for the pixel (I think). You might want to try setting up an array of chars that is 64000 long, and just index into it. Another idea would be to have it print out the memory addresses that it is calculating right around the part where it messes up; that should give you an idea of how you are computing it incorrectly. It is probably something like unsigned vs. signed variables or casting problems. ---- Join the Greg Alt boycott! Put /galt/h :j in your killfile today! ----
Technical Details
Message-ID:
<1993Jan12.155509.7367@hellgate.utah.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!usc!cs.utexas.edu!hellgate.utah.edu!peruvian.cs.utah.edu!galtReferences:
<C0qLEE.JI8@dcs.ed.ac.uk>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!usc!cs.utexas.edu!hellgate.utah.edu!peruvian.cs.utah.edu!galt From: galt%peruvian.cs.utah.edu@cs.utah.edu (Greg Alt) Subject: Re: 256 VGA (mode 13h) Date: 12 Jan 93 15:55:08 MST Message-ID: <1993Jan12.155509.7367@hellgate.utah.edu> Followup-To: rec.games.programmer Reply-To: galt%peruvian.utah.edu@cs.utah.edu Organization: University of Utah, CS Dept., Salt Lake City References: <C0qLEE.JI8@dcs.ed.ac.uk> Lines: 17