Paddle reading is done
I've redone the dragon routines so only 1 fireball is visible while the dragon's onscreen. I've not yet written the "dragon not there" code, but that should be pretty easy.
With this change I was able to keep the dragon routine with 2 double wide sprites at single line resolution w/single line shifting and still squeeze in enough time to read 2 paddles every other scanline on each frame. The following macros are used to read the paddles. The value of Paddles2Read is either 0 or 1. Due to timing issues there was not always enough cycles to read 2 paddles at the same time, so there's a macro to read the even, odd and both.
MAC READ_PADDLE_1_OR_3 ldx Paddles2Read; 13-14 cycles lda INPT0,x bpl .save .byte $2c .save sty Paddle1,x ENDM MAC READ_PADDLE_2_OR_4 ldx Paddles2Read; 13-14 cycles lda INPT2,x bpl .save .byte $2c .save sty Paddle3,x ENDM MAC READ_TWO_PADDLES ldx Paddles2Read; 21-23 cycles lda INPT0,x bpl .save1 .byte $2c .save1 sty Paddle1,x lda INPT2,x bpl .save2 .byte $2c .save2 sty Paddle3,x ENDM
If you'd like to test out the paddles, START the game. The first 2 digits of the score line will be the current paddle's reading. the 3rd digit will be which paddle's reading is shown. Hit RESET to change the paddle being shown. Paddle readings range from 00 - 4A, which covers the 75 distinct shield positions possible.
BINmm.bin
SourceMedieval_Mayhem.zip

6 Comments
Recommended Comments