Jump to content

Robert Gremillion

New Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

19 Good

About Robert Gremillion

  • Rank
    Space Invader

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I tried to re-arrange the lines like this but had no luck getting the track lines to look OK. I will try again on Sunday and see if I can squeeze this down. Thanks for responding!!!
  2. My dream is to make something that doesn't need bankswitching. Thanks for responding!
  3. I did have ldx PFOffset above the first WSYNC in one of my tests but I still didn't have enough time to get the coaster color set up. I think the two commented out lines take 8 cycles to perform. There was one more method to show the sprite without a mask. I don't know if that can be used here also to save 5 cycles from the rider being drawn??? Thanks for responding!
  4. Here's the MaskDraw demo that SpiceWare created. Thanks!!!
  5. I was able to make it work!!! I made the sprites both 8 lines high so I could share the same mask graphic. I have some weird issues when it falls through the screen. My main goal was to reduce the drawing speed so I could draw double track lines. You can see the before and after videos here... I don't have enough clock cycles to color the coaster sprite. I think it looks better with the gray bottom. ldy #96 ; X counts the number of remaining scanlines .GameLineLoop: ;-------------------------------------------------------------------------------------------- .SetupPlayfield: sta WSYNC ; first scanline ldx PFOffset ; 3 03 lda $80,x ; 4 07 sta PF0 ; 3 10 lda $81,x ; 4 14 sta PF1 ; 3 17 lda $82,x ; 4 21 sta PF2 ; 3 24 ; set PF0, PF1, and PF2 playfield/terrain pattern lda (RiderSpritePtr),y ; 5 29 and (RiderMaskPtr),Y ; 5 34 sta GRP0 ; 3 37 lda $83,x ; 4 41 sta PF0 ; 3 44 lda $84,x ; 4 48 sta PF1 ; 3 51 lda $85,x ; 4 54 sta PF2 ; 3 57 ; set PF0, PF1, and PF2 playfield/terrain pattern lda (CoasterSpritePtr),Y ; 5 62 and (CoasterMaskPtr),Y ; 5 67 sta GRP1 ; 3 70 ;lda (CoasterColorPtr),y ;sta COLUP1 ;-------------------------------------------------------------------------------------------- sta WSYNC ; second scanline ldx PFOffset lda $80,x sta PF0 lda $81,x sta PF1 lda $82,x sta PF2 ; set PF0, PF1, and PF2 playfield/terrain pattern nop nop lda $83,x sta PF0 lda $84,x sta PF1 lda $85,x sta PF2 ; set PF0, PF1, and PF2 playfield/terrain pattern cpy #55 ; compare x to 55 bcs .SkipSetPlayfields ; cpy #44 ; compare x to 44 bcc .SkipSetPlayfields ; lda PFOffset ; this code is upping the offset by 6 sbc #6 ; move this code near end of frame sta PFOffset ; update if over x over 45 lines ; stop incrementing if x over 55 lines? .SkipSetPlayfields dey ; Y-- bne .GameLineLoop ; repeat next main game scanline until finished I don't know if I will keep the double lines or not. If I get rid of them I guess I could add a ball or missile? Thanks for helping me!!!!
  6. Yeah, I guess I need help. The part that is messing me up is setting the Mask pointer.
  7. I will play around with it this weekend and see if I can "get" it. I did create a post asking for a simple Mask example using my Sprite. I might need help next week if I cannot get it. Thank you for responding! P.S. I see you are in Houston! I am in Clear Lake!
  8. Does someone have a complete simple example of using MaskDraw? I'm looking at the Stay Frosty example and the entire thing is 1000 light years above my head. I want to draw this sprite as fast as I can. Thanks! RiderSprite: .byte #%00000000 ; .byte #%00011000 ; ## .byte #%00100100 ; # # .byte #%01101010 ; ## # # .byte #%11100110 ; ## ## .byte #%11101010 ; ## # # .byte #%10100101 ; # # # # .byte #%10011001 ; # ## # .byte #%10000001 ; # #
  9. I don't understand what's happening with a Mask. I have this sprite that can be monochrome. RiderSprite: .byte #%00000000 ; .byte #%00011000 ; ## .byte #%00100100 ; # # .byte #%01101010 ; ## # # .byte #%11100110 ; ## ## .byte #%11101010 ; ## # # .byte #%10100101 ; # # # # .byte #%10011001 ; # ## # .byte #%10000001 ; # # Does the mask match the size of the sprite? Or does it match the size of the arena? Thanks!
  10. Thanks for responding. I will see if I can get that method to work. I thought I saw another method that took 15 cycles??? Did I dream that? 🙂
  11. I am drawing these 2 sprites and want to reduce the cycles in the kernel. What are the better methods? I am looping through x 96 times... Thanks, .IsInsideSpriteP0Check: ; check if should render sprite player0 txa ; 2 transfer X to A sec ; 2 make sure carry flag is set sbc RiderYPos ; 3 subtract sprite Y coordinate cmp #RIDER_HEIGHT ; 2 are we inside the sprite height bounds? bcc .DrawSpriteP0 ; 2 if result < SpriteHeight, call subroutine lda #0 ; 2 else, set lookup index to 0 .DrawSpriteP0: tay ; 2 load Y so we can work with pointer lda (RiderSpritePtr),Y ; 5 load player bitmap slice of data sta GRP0 ; 3 set graphics for player 0 .IsInsideSpriteP1Check: ; check if should render sprite player1 txa ; 2 transfer X to A sec ; 2 make sure carry flag is set sbc CoasterYPos ; 3 subtract sprite Y coordinate cmp #COASTER_HEIGHT ; 2 are we inside the sprite height bounds? bcc .DrawSpriteP1 ; 2 if result < SpriteHeight, call subroutine lda #0 ; 2 else, set index to 0 .DrawSpriteP1: tay ; 2 lda (CoasterSpritePtr),Y ; 5 load player bitmap slice of data sta GRP1 ; 3 set graphics for player 0 lda (CoasterColorPtr),Y ; 5 load player color from lookup table sta COLUP1 ; 3 set color for player 0 slice Thank you!
  12. I have two questions. 1. How do you make sure a button is being pressed and released? Do you keep a flag to test for that? 2. What's the "normal" way to make a double jump? Do you wait until the player is half way through the first jump? Here's what I have so far...
  13. Looks great! Guess what my wife crocheted this week! 🙂
×
×
  • Create New...