<< BACK  ----- THE C65 BITMAP MEMORY LOCATIONS AND STRUCTURE -----


===============================================================================
This text assumes that you are familiar with the basic structure of a bitmapped
graphic.

All information and programs in this text are tested on a V910612 ROM Version.
Older (and newer) ROMs may vary the results..
===============================================================================

For a start here are the locations of the bitplanes in the different 320x200
color modes:

2 PLANES (4 Colors)
===================

$0E000 - $0FFFF    Bitplane 1 (Value of bit 0)
$0C000 - $0CFFF    Bitplane 2 (Value of bit 1)


3 PLANES (8 Colors)
===================

$0E000 - $0FFFF    Bitplane 1 (Value of bit 0)
$1C000 - $1CFFF    Bitplane 2 (Value of bit 1)
$0C000 - $0CFFF    Bitplane 3 (Value of bit 2)


4 PLANES (16 Colors)
====================

$0E000 - $0FFFF    Bitplane 1 (Value of bit 0)
$1C000 - $1CFFF    Bitplane 2 (Value of bit 1)
$0C000 - $0CFFF    Bitplane 3 (Value of bit 2)
$0A000 - $0AFFF    Bitplane 4 (Value of bit 3)

5 PLANES (32 Colors)
====================

$0E000 - $0FFFF    Bitplane 1 (Value of bit 0)
$1C000 - $1CFFF    Bitplane 2 (Value of bit 1)
$0C000 - $0CFFF    Bitplane 3 (Value of bit 2)
$1A000 - $1AFFF    Bitplane 4 (Value of bit 3)
$0A000 - $0AFFF    Bitplane 5 (Value of bit 4)

6 PLANES (64 Colors)
====================

$0E000 - $0FFFF    Bitplane 1 (Value of bit 0)
$1C000 - $1CFFF    Bitplane 2 (Value of bit 1)
$0C000 - $0CFFF    Bitplane 3 (Value of bit 2)
$1A000 - $1AFFF    Bitplane 4 (Value of bit 3)
$0A000 - $0AFFF    Bitplane 5 (Value of bit 4)
$08000 - $08FFF    Bitplane 6 (value of bit 5)

7 PLANES (128 Colors)
=====================

$0E000 - $0FFFF    Bitplane 1 (Value of bit 0)
$1C000 - $1CFFF    Bitplane 2 (Value of bit 1)
$0C000 - $0CFFF    Bitplane 3 (Value of bit 2)
$1A000 - $1AFFF    Bitplane 4 (Value of bit 3)
$0A000 - $0AFFF    Bitplane 5 (Value of bit 4)
$18000 - $18FFF    Bitplane 6 (Value of bit 5)
$08000 - $08FFF    Bitplane 7 (Value of bit 6)


Please note, that the bitmap-structure in the C65 is quite pathetic (as
it is on C64, too):
Bits/Pixels are stored in character-lines. First 8 bits in a bitmap
are the first character bit-row of the first character, 2 second eight bits
are the second row and so on. The 9th byte makes the first row of the
second character:

======= CHAR 1 ======== ======== CHAR 2 =======

00 01 02 03 04 05 06 07 64 65 66 67 68 69 70 71
08 09 10 11 12 13 14 15 72 73 74 75 76 77 78 79
16 17 18 19 20 21 22 23 80 81 82 83 84 85 86 87
24 25 26 27 28 29 30 31 88 89 90 91 92 93 94 95
32 33 34 35 36 37 38 39 96 97 98 .. .. ..
40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63

The numbers from 00 to 98 are the offsets from the start of the plane.
So have much fun poking a horizontal line over the whole screen into
memory.

Here is an example wich fills the whole screen, line by line:

.
. (Def, Open, Set Screen and all...)
.
100 SQ=57344                         :REM Start of our bitplane in memory
110 FOR DLU=1 TO 25                  :REM Do this for 25 characters high
120 FOR ZLE=1 TO 8                   :REM Do it for every bit-row of character
130 SW=SQ+ZLE                        :REM  Prepare current offset
140 FOR X=SW TO SW+312 STEP 8        :REM   Now we can start with the poking
150 BANK0:POKE X,255                 :REM    HUH, here we are :-)
160 NEXT X
170 NEXT ZLE
180 SQ=SQ+320                        :REM  Prepare next offset
190 NEXT DLU
.
. (Close Screen and stuff..)
.