|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Mode 13h
----- Original Message ----- From: Tommi Pirinen <tommi.pirinen@dlc.fi> To: <gameprogrammer@gameprogrammer.com> Sent: Wednesday, September 08, 1999 5:53 PM Subject: Re: Mode 13h > for some reason most of the modern compiles compile this code but it doesn't > work. Compilers I meant > and actually faster method than y*320 is (y<<6)+(y<<8) but that isn't > necessary for modern computers they are too fast anyways. > And for some compilers it has to be unsigned char far. and color must be > unsigned char (0 - 255). > about the outportb you use. isn't 0x3C9 Palette address. so writing > anything to that address will change the value for that palette index (which > is set via 0x3c7 I think) > correct me if I'm wrong as I'm typing this in a bit hurry and don't have > time to check the information. > --Tommi Pirinen > ----- Original Message ----- > From: Nick Hill <nikhilwiz@yahoo.com> > To: <gameprogrammer@gameprogrammer.com> > Sent: Wednesday, September 08, 1999 5:27 AM > Subject: Re: Mode 13h > > > > make a pointer to 0xA000 > > unsigned char *VidMem=0xA000. This makes a pointer to tha vid. mem. > > Mode 13h is a linear buffer where 1 byte represents one pixel. u can > > plot a pixel by writing the color of tha pixel to tha particular mem. > > loc. Since the data in the vid. mem. start from (0,0) and proceeds > > along tha row, the first 320 bytes represents tha first row., u get tha > > idea. so tha formula to calc. tha byte at (x,y) on screen will be : > > > > pos=y * 320 + x; > > VidMem[pos]=color; > > > > where color is tha color of tha pixel u wanna plot. Keep it under 255, > > as Mode 13h s'portz only that much. thazz why tha data type on VidMem > > also is defined as unsigned char... so that u wont end up writing > > NEthin' oth' than 0-255. Hope this helped. > > > > Nikhil. > > > > --- Peter Peterssen <getoutnow@Hotmail.com> wrote: > > > Hello.. > > > > > > Mode 13H. Wow. Then, perhaps you can tell me how the > > > heck I draw a dot on > > > the screen like X and Y ? > > > > > > I do call 0xA0000 and the use the.. > > > outportb(0x3c9, red); > > > outportb(0x3c9, green); > > > outportb(0x3c9, blue); > > > > > > .. for the background layout and then .. > > > > > > b= 0; > > > pokeb(0xa0000, B,30) > > > > > > .. for the actual dot. > > > > > > This doensnt work unless i add 1 to red OR green OR > > > blue. ( I dont see the > > > dot on the screen). > > > > > > So, as you see Im totaly lost and really dont get > > > the whole thing. Do you > > > have an example how to structure something? > > > > > > ______________________________________________________ > > > Get Your Private, Free Email at > > > http://www.hotmail.com > > > ================================================================= > > > To SUBSCRIBE or UNSUBSCRIBE please visit > > > http://gameprogrammer.com/mailinglist.html > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Bid and sell for free at http://auctions.yahoo.com > > ================================================================= > > To SUBSCRIBE or UNSUBSCRIBE please visit > > http://gameprogrammer.com/mailinglist.html > > ================================================================= > To SUBSCRIBE or UNSUBSCRIBE please visit > http://gameprogrammer.com/mailinglist.html ================================================================= To SUBSCRIBE or UNSUBSCRIBE please visit http://gameprogrammer.com/mailinglist.html
|
|