[stella] brother can you spare a kernal?

Subject: [stella] brother can you spare a kernal?
From: KirkIsrael@xxxxxxxxxxxxx
Date: 10 Sep 2003 02:38:43 -0000
So, heading my way to a poorlords-like scheme...
I got all the elements I need for the kernal, but I just 
can't make 'em fit.

Full source at http://alienbill.com/joustpong/

My basic idea with the kernal is I use 
ballBuffer,p0DrawBuffer,p1DrawBuffer
that I fill with something like skipdraw,
and then slam into the right TIA locations
at the start of the line, and I do something 
similar with bufferPFLeft and bufferPFRight--
every 4 scanlines I change their values, and
then STA PF0 is sprinkled through the two line 
kernal at the right time for the assymetrical 
playfield.

It works pretty well, but I have no room for this:
	DEC scanlineInPFBlock
	BNE DoneChangingPlayfieldBrick
	LDA #SCANLINES_PER_BRICK
	STA scanlineInPFBlock
	INC counterPFBlock
	LDX counterPFBlock
	LDA playfieldMatrixLeft,X
	STA bufferPFLeft
	LDA playfieldMatrixRight,X
	STA bufferPFRight
(the same code appears below, commented out, in the kernal.)

Would anyone like to collaborate with me on this?
I'm kind of stuck :-/ 

Kernal follows....

;--------------------------------------
;MAIN GAME KERNAL
;--------------------------------------

	LDX #GAME_KERNAL_LENGTH
;--------------------------------------
;MAIN SCANLINE LOOP
;--------------------------------------

MainGameLoop 
	STA WSYNC 	

	LDA bufferPFLeft ;get leftside of PF loaded
	STA PF0




	LDA booleanGameOver
	BNE DoneWithBall ;game is over, never draw ball

	LDA ballBuffer 
	STA ENABL
DoneWithBall 

	LDA p0DrawBuffer	
	STA GRP0		

	LDA p1DrawBuffer	
	STA GRP1	

;--------------------------------------
;do buffer for P0
;--------------------------------------

	TXA; transfer scanline count to A
 	SEC
      	SBC p0YPosFromBot
	adc #SPRITEHEIGHT+1
	bcc skipDrawP0          ; out of range???
	tay
	lda (pointerP0Graphic),y
	sta p0DrawBuffer
skipDrawP0
	
	LDA bufferPFRight ;left pf is drawn, ready for right
	STA PF0

;--------------------------------------
;do buffer for P1
;--------------------------------------
	TXA; transfer scanline count to A
 	SEC                     
      	SBC p1YPosFromBot       
	adc #SPRITEHEIGHT+1 	
	bcc skipDrawP1           
	tay
	lda (pointerP1Graphic),y 
	sta p1DrawBuffer
skipDrawP1


;--------------------------------------
;do buffer for Ball
;--------------------------------------
	ldy #0
	TXA; transfer scanline count to A
 	SEC                     
      	SBC ballPosFromBot      
	adc #2
	LDA bufferPFLeft
	STA PF0
	bcc skipDrawBall           ; out of range???
	tay
	ldy #2   ; use indirect loading here
skipDrawBall
	sty ballBuffer



	SLEEP 16

	LDA bufferPFRight
	STA PF0	
	

	
	SLEEP 10
	
	
;	DEC scanlineInPFBlock
;	BNE DoneChangingPlayfieldBrick
;
;	LDA #SCANLINES_PER_BRICK
;	STA scanlineInPFBlock
;
;
;	INC counterPFBlock
;	LDX counterPFBlock
;	LDA playfieldMatrixLeft,X
;	STA bufferPFLeft
;	LDA playfieldMatrixRight,X
;	STA bufferPFRight

DoneChangingPlayfieldBrick



	;SLEEP 41-43
	
;	SLEEP 60


;now just finish counting of scanloop
	DEX		
	BNE MainGameLoop




----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread