Subject: Re: [stella] don't put ur eggs in one "pot" From: gentlben@xxxxxxxxxxxx Date: Tue, 03 Aug 1999 11:46:25 -0700 |
Eckhard Stolberg wrote: > At 18:38 02.08.99 -0700, you wrote: > > >however, i am still somewhat puzzled about the > >other thing...when the paddle is turned clockwise, INPT# > >bit 7 is supposed to take more cycles before bit 7 is > >set to one, right? > > This is correct. It is a bit difficult to say what's wrong with your > code without beeing able to see all of it, but in the other post you > mentioned having a LDA INPTx/BMI/INC loop. That would mean that the > counter value would get bigger the further the paddle is turned clockwise. > If you want to position your object further down the screen the higher > the counter is, then the reference counter in the display routine must > count upwards too. Are you sure your display routine does this? ;-) are you referring to the scanline counter? because in the code, Y pretty much serves as the scanline counter until all but the bottommost line is drawn...and it is incremented in every scanline before WSYNC...the code doesn't actually execute until below the score display, and until it executes, the paddles are not tracked. here is the snippet of my code that is the display routine...i have a seperate routine for my first scanline because of the fact that it comes immediately after a line that uses #$FF on the playfield regs to make a top border...this routine doesnt actually execute until the second scanline in the "playground", which is where the missiles and ball are at. what it does is basically evaluates the scanline versus the start and end positions of the missiles and ball, and then acts on them, then checks the paddles for bit 7 set, and increments the potentiometer counters if bit 7 has not been set...and then increments Y and determines if the last line has yet to be reached...and so on... ; CONTINUEPLAYGROUNDDISPLAY ; Main display routine for missiles and ball (below score and top border) ; This is executed on the second scanline in the playground ; $DA, $DB - Ball start and end Y positions ; $DC, $DD - Missile 0 start and end Y positions ; $DE, $DF - Missile 1 start and end Y positions SUB1 STA WSYNC CPY $DA BCC SUB2 CPY $DB BCS SUB2 STX ENABL CPY $DC BCC SUB3 CPY $DD BCS SUB3 STX ENAM0 CPY $DE BCC NEXTA CPY $DF BCS NEXTA STX ENAM1 JMP NEXT SUB2 STA ENABL CPY $DC BCC SUB3 CPY $DD BCS SUB3 STX ENAM0 CPY $DE BCC NEXTA CPY $DF BCS NEXTA STX ENAM1 JMP NEXT SUB3 STA ENAM0 CPY $DE BCC NEXTA CPY $DF BCS NEXTA STX ENAM1 JMP NEXT NEXTA STA ENAM1 NEXT LDA INPT0 BMI PAD1 INC $C0 PAD1 LDA INPT1 BMI INIT INC $C1 ; A few odds and ends to sort out before the next scanline INIT INY CPY #$AB BNE SUB1 STA WSYNC this is the code that is executed during overscan and turns off the paddles and all objects, then whatever value is stored in $C0 and $C1 is put in the start Y position variables, and those same values plus 15 are stored in the end position variables. LDX #$82 STX VBLANK ; Turn on vertical blank and turn off paddles LDA #$00 STA PF0 ; Disable all objects in case they havent been STA PF1 ; already turned off somewhere in the display STA PF2 STA ENAM0 STA ENAM1 STA ENABL LDA $C0 STA $DC CLC ADC #$15 STA $DD LDA $C1 STA $DE CLC ADC #$15 STA $DF JMP VLOOP ; This takes us back to initialization procedures if you need the whole code, ill post it. keep in mind this code is merely an alpha version. dee -- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] don't put ur eggs in o, Eckhard Stolberg | Thread | Re: [stella] don't put ur eggs in o, Eckhard Stolberg |
[stella] Re: removal from your mail, ALMT1 | Date | Re: [stella] submissions, Glenn Saunders |
Month |