Re: [cc65] Super simple picture routine needs a faster way

Date view Thread view Subject view

From: MagerValp (MagerValp_at_cling.gu.se)
Date: 2002-11-29 14:47:48


>>>>> "V" == Visa  <visy_at_tukka.org> writes:

V> Okay, so I have made a little program that reads the picture from a
V> file using Groepaz's routines. I use his putpixel to draw the pixel
V> to the screen. the image is stored like unsigned char pic1[32000] =
V> {0,0,0,0...}. I know this eats a lot of memory, and it is VERY
V> slow, so, is there any faster way to blit the image on the screen.
V> Sorry for being such a newbie, but I really suck at programming.

First of all, work with the picture 8 pixels (4 in multicolour) at a
time. This will reduce the memory consumption to 8K, and speed up all
the processing immensely. To copy memory, use the memcpy in string.h.
If you're not familiar with how the C64 stores bitmaps and colours in
memory, read through the graphics chapter in the Programmer's Referen-
ce Guide.

Work sure is boring today so I wrote a small example koala viewer. You
can grab the source from

  http://www.cling.gu.se/~cl3polof/loadkoala.zip

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp_at_cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-11-29 14:49:02 CET