Jump to content
Sign in to follow this  
RSS Bot

SpiceWare's Blog - Paddle reading is done

Recommended Posts

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.

 

CODE 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.

 

 

BIN mm.bin

 

Source Medieval_Mayhem.zip

 

http://www.atariage.com/forums/index.php?a...&showentry=1466

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...