I have a pretty big question here that I am finding really difficult to answer with just a couple of reference books, the internet, and yours truly.
- I just want to display a bitmap. Wait a couple secs.
- Wipe it from memory.
- Display another bitmap. Wait again.
- Wipe that one from memory.
- Display a final bitmap. Wait for one last time.
- And, you've guessed it, wipe that from memory.
- Then enter the standard character mode. & Continue running my code - which starts with a screen blank, and moves into asking the user for some text input etc...
Bits in bold I am having real trouble with!
This is the code I am using to run the display bitmap part, at the mo it is just going into an infinite loop...
*=$1000
lda $4710
sta $d020
sta $d021
ldx #$00
loaddccimage
lda $3f40,x
sta $0400,x
lda $4040,x
sta $0500,x
lda $4140,x
sta $0600,x
lda $4240,x
sta $0700,x
lda $4328,x
sta $d800,x
lda $4428,x
sta $d900,x
lda $4528,x
sta $da00,x
lda $4628,x
sta $db00,x
inx
bne loaddccimage
lda #$3b
sta $d011
lda #$18
sta $d016
lda #$18
sta $d018
jsr *
*=$1FFE
incbin "ASTRO1.prg"
I have, so far, tried repeating the code thinking that it could just over-write everything but the *=$1FFE doesn't seem to work chronologically, with each file, I get a memory over-write error and it always defaults to displaying the last bitmap I call with the incbin function. Is there a way to reset everything (but just go to black) between each bitmap frame? Or am I just loading these images in incorrectly?
Moving then into character mode is also going to be tricky as I can't find a way to do this even with one bitmap. Perhaps this entire code structure is the wrong way to go about, idk...
Or is this simply something the c64 can't do? I am reluctant to go here as I am sure I have seen bitmaps cycle in game intros before - just really scratching my head to figure out how it could be done.
Thanks again guys and sorry for the lack of understanding here, I am new to programming in general but think i'm on the right track. I hope that many can learn from your answers as this is genuinely something I think there isn't really any information on.
Your Commodore loving friend,
James (Smokeyparkin)
You have three alternatives.
About going back to the character mode, just setting $d011, $d016 and $d018 to their initial values would be enough (also $dd00 if you change it).
For creating a delay, check my answer here: How to create a delay in asm for the MOS 6502
For keyboard input, check my answer here: Compare keystrokes - Assembly CCS64