Re: LZ-Adv: vid_mem ques.
[Prev][Next][Index][Thread]
Mark D Lippmann wrote:
>
> I use (point on) and (point off) regularly in programs, but I was
> wondering if there is a way to load info. directly into the vid mem. I
> have at least 8 questions on how to go about doing that I will ask them
> if I need to, but can someone just explain how to do it?
>
> So my question is:
>
> How do you directly access the video memory to create graphics?
All you need to know is that the video memory range from $FC00-$FFFF.
Each row is 16 bytes, which makes 8 pixels=1 byte. $FC00 is in the
top left corner btw (note that FIND_PIXEL uses the bottom left
corner as 0,0)
Each byte contains 8 pixels like this:
0 1 2 3
$FC0x |76543210|76543210|76543210|76543210|..
this are the bits
x= 0......7.8.....15.16....23.24....31.32...
If you want to set a pixel at the first row, on x location 19, it will
be byte $FC02 and bit 4 (bit 4 = $08 when ORing)
All this will be covered in ZShell lesson #5 TOMORROW (!!) when you'll
learn about the stack (PUSH and POP) and EVERYTHING you need to know
about graphics! I will also compare my sprite routine with NASR (it will
probably be a bit slower, but not so much I think).
<pre>
--
Jimmy Mårdell I just don't care about the whales,
mailto:mja@algonet.se who cares if the ecosystem fails?
http://www.algonet.se/~mja We are the crowns of creation,
IRC: Yarin we may do whatever we please - Fuck nature /CRD
</pre>
References: