[stella] there is no spoon. the missile won't go left.

Subject: [stella] there is no spoon. the missile won't go left.
From: KirkIsrael@xxxxxxxxxxxxx
Date: 25 Jun 2002 04:26:37 -0000
(First off, Garon: thanks for your history of the dig.
 And I'm sorry if I started to sound excessively bitchy,
 I know we're all hobbyists here.  Frankly, if I hadn't
 found this site (thanks Thomas) I'm not sure if I would've 
 had the guts to undertake all this.
 I guess my main suggestion would be to try to mend some
 of the busted links...the "bad code" issue is a little deeper.
 But have links into the list archive is great. And I'm amazed
 no one has complemented the look of the site...maybe I'm just
 overcome by that frontpage picture of Lydia Perez...)


Ok, to be fair I haven't spent enough time trying out what
Ruffin Bailey posted on the missile code...the thing is,
I remade the *very same bug* in my own version of the same problem 
based on Nick Bensema's playfield primer....progress! 
(I hope I haven't stripped out too much stuff...)

So what I was hoping to achieve was a moving missile,
except never turning off ENAM0, thus making a big vertical
bar. The thing is, I can't figure out how to change it's 
rate/direction of horizontal movement by fiddling with
HMM0. Seems like no matter what I set it to, (like, now 
it's currently zero'd out) the bar keeps on its march to 
the right...

Other suggestions for the code are welcome...preferably
"you really should do this" more than super tight coding
tricks.  Once I put the code in to make it a more reasonable
vertice size, I'd like to start building tutorials based on it.



--snip--
; thin red line by Kirk Israel
; liberally lifted from Nick Bensema's playfield primer 

	processor 6502
	include vcs.h

	org $F000

Start

;;Fairly Standard "memory clearing" code
;;Including walking back through memory to zero it all out
	SEI  ; Disable interrupts, if there are any.
	CLD  ; Clear BCD math bit.
	LDX  #$FF
	TXS  ; Set stack to beginning.
	LDA #0
ClearMem 
	STA 0,X
	DEX
	BNE ClearMem


       LDA #00
       STA COLUBK  ;background black

       LDA #33
       STA COLUP0  ;missile reddish

MainLoop
;*********************** VERTICAL BLANK HANDLER
	LDX  #0
	LDA  #2
;(GOT RID OF 3 WSYNC HERE, ALA PREVIOS CONVERSATIONS...)
	STA  VSYNC ;Begin vertical sync.
	STA  WSYNC ; First line of VSYNC
	STA  WSYNC ; Second line of VSYNC.

;sneak in timer code here so we know when to start drawing
	LDA  #44
	STA  TIM64T
	LDA #0

	STA  WSYNC ; Third line of VSYNC.
	STA  VSYNC ;

DrawScreen ;**************************** SCREEN DRAWING ROUTINES
	LDA INTIM
	BNE DrawScreen ; kill time if the timer's not yet zero
	STA WSYNC
	STA VBLANK  ;End the VBLANK period with a zero.
	LDY #191 

	LDA #$00
	STA HMM0  ;movement is 0?, right?
	STA HMOVE ;and activate that movement

ScanLoop ; ================================== SCANNING LOOP
; WSYNC is placed BEFORE all of this action takes place.
	STA WSYNC                

;do drawring here
	LDA #2
	STA ENAM0
	DEY
	BNE ScanLoop

	LDA #2
	STA WSYNC  ;Finish this scanline.
	STA VBLANK ; Make TIA output invisible,
OverScan   ;***************************** OVERSCAN CALCULATIONS
	LDX #30
KillLines
	 STA WSYNC
	 DEX
	 BNE KillLines



	JMP  MainLoop      ;Continue forever.
 
	org $FFFC
	.word Start
	.word Start

--snip--

















-- 
KirkIsrael@xxxxxxxxxxxxx    http://kisrael.com
"May the wind always be at your back 
    but not coming out of you yourself personally"
          --Prairie Home Commonplace Book "Irish Envy"


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


Current Thread