#Bitplanes and such II
2 messages in this thread
The problem is that your Amiga will try to load your program into fast RAM if
you have it (which you probably do). The Amiga custom hardware can only access
data stored in Chip RAM. Using ds.l to create space for your bitplanes will
result in the bitplane data being in fast RAM, along with the rest of the
program. The custom chips will ignore the top few bits of the bitplane
addresses and will therefore be looking in the wrong place for the data – you
will not see what you expect on the screen.
Allocate the memory for your bitplanes using the AllocMem function in the EXEC
library as follows (using devpac)
move.l #memory_required_in_bytes,d0
move.l #(MEMF_CHIP|MEMF_PUBLIC|MEMF_CLEAR),d1
CALLEXEC AllocMem
The function returns with d0 containing the address of the block of memory, or
0 if it could not be allocated.
Use this address to calculate your bitplane pointers.
Mal
Binary Dreams
Mal –
Many thanks for the reply. I actually thought of posting the question to
you when I saw your name on GamDev, but I wasn't quite frustrated enough.
<g> (The screen has to be in CHIP RAM! ARRGH! It's always the _obvious_
stuff that gets me! 'Scuse me while I bang my head on the wall. <g>)
– Jim, on AutoPilot!