Subject: [stella] Fishing for comments From: KirkIsrael@xxxxxxxxxxxxx Date: 2 Jul 2002 02:29:57 -0000 |
So I revamped thin red line, and got myself a missile that (gasp) isn't the height of the screen! And you can move it where ever you want with the joystick! I'm so happpy. It actually came together pretty well, and my kernal is somewhat reminiscent of a real kernel, in keeping track of the height of the missile and all. So any suggestions re: blatant inefficiencies are welcome. Also, how do you do a logical NOT? I'm a little worried I'm playing a little fast and loose with what I'm putting in VBLANK, but the controller still seems to work... --snip-- ; yet another moving dot by Kirk Israel processor 6502 include vcs.h org $F000 YPosFromBot = $80; VisibleMissileLine = $81; ;generic start up stuff... Start SEI CLD TXS LDX #$FF LDA #0 ClearMem STA 0,X DEX BNE ClearMem LDA #$00 STA COLUBK LDA #33 STA COLUP0 LDA #80 STA YPosFromBot ;Initial Y Position LDA #$20 STA NUSIZ0 ;Quad Width ;VSYNC time MainLoop LDA #2 STA VSYNC STA WSYNC STA WSYNC STA WSYNC LDA #43 STA TIM64T LDA #0 STA VSYNC ;Main Computations; check down, up, left, right ;general idea is to do a BIT compare to see if ;a certain direction is pressed, and skip the value ;change if so LDA #$10 ;Down? BIT SWCHA BNE SkipMoveDown INC YPosFromBot SkipMoveDown LDA #$20 ;Up? BIT SWCHA BNE SkipMoveUp DEC YPosFromBot SkipMoveUp ;assum horiz position will be zero LDX #$00 LDA #$40 ;Left? BIT SWCHA BNE SkipMoveLeft LDX #$10 SkipMoveLeft LDA #$80 ;Right? BIT SWCHA BNE SkipMoveRight LDX #$F0 SkipMoveRight STX HMM0 ;set the move for missile 0 WaitForVblankEnd LDA INTIM BNE WaitForVblankEnd LDY #191 STA VBLANK STA WSYNC STA HMOVE ;main scanline loop... ScanLoop STA WSYNC ; here the idea is that VisibleMissileLine ; is zero if the line isn't being drawn now, ; otherwise it's however many lines we have to go CheckActivateMissile CPY YPosFromBot BNE SkipActivateMissile LDA #8 STA VisibleMissileLine SkipActivateMissile ;turn missile off then see if it's turned on LDA #0 STA ENAM0 ; ;if the VisibleMissileLine is non zero, ;we're drawing it ; LDA VisibleMissileLine BEQ FinishMissile IsMissileOn LDA #2 STA ENAM0 DEC VisibleMissileLine FinishMissile DEY BNE ScanLoop LDA #2 STA WSYNC STA VBLANK LDX #30 OverScanWait STA WSYNC DEX BNE OverScanWait JMP MainLoop org $FFFC .word Start .word Start --snip-- -- KirkIsrael@xxxxxxxxxxxxx http://kisrael.com "If anyone disagrees with anything I say, I am quite prepared not only to retract it, but also to deny under oath that I ever said it." --T. Lehrer ---------------------------------------------------------------------------------------------- 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] Higher Resolution thro, Chris Wilkson | Thread | Re: [stella] Fishing for comments, Andrew Davie |
Re: [stella] Higher Resolution thro, Thomas Jentzsch | Date | Re: [stella] thin red line moves in, Charles Mullins |
Month |