+Karl G Posted July 17, 2020 Share Posted July 17, 2020 Are there any possible adverse effects if you write to PF0 if there are values in the unused lower nybble that haven't been masked off? I am just wondering if I can piggyback other data with the data I have stored for the PF0 register. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted July 17, 2020 Share Posted July 17, 2020 Works great, in Frantic: LDY at cycle 40 is used on the next scanline to update Missile 1 at cycle 13 and right side PF0 at cycle 31 LDA at cycle 57 is used to update left side PF0 at cycle 60 and the Ball at cycle 63 (VDELBL is on, so its for the next scanline). KernelLoop: ; at this point the registers hold the following: ; A - graphics for player 1 ; Y - enable for missile 1 & PF0 for right side of screen ; PF0 and PF1 have already been updated for left side of room ; GRP0 (on VDEL) has been preloaded with player 0 graphics ; BL (on VDEL) has been preenabled with missile data ; at cycle 73 sta GRP1 ; 3 76/0 - before 22 - also updates GRP0 & BL via VDEL lda #<DS_COLUP0 ; 2 2 sta COLUP0 ; 3 5 - before 22 lda #<DS_COLUP1 ; 2 7 sta COLUP1 ; 3 10 - before 22 sty ENAM1 ; 3 13 - before 22 lda #<DS_EVENT_M0 ; 2 15 - bit 7 triggers kernel event sta ENAM0 ; 3 18 - before 22 sbmi KernelEvent ; 2 20 - 3 21 if taken SLEEP 3 ; 3 23 UPDATE_SPEECH ; 5 28 sty PF0 ; 3 31 - PF0R, 28-49 lda #<DS_PF2L ; 2 33 sta PF2 ; 3 36 - PF2L, before 38 ldy DS_PF0R_M1 ; 4 40 - any after sty PF0, loads for next line lda #<DS_PF1R ; 2 42 sta PF1 ; 3 45 - PF1R, 39-54 lda #<DS_GRP0 ; 2 47 sta GRP0 ; 3 50 - any, on VDEL lda #<DS_PF2R ; 2 52 sta PF2 ; 3 55 - PF2R, 50-65 lda #<DS_PF0L_BL ; 2 57 sta PF0 ; 3 60 - PF0L, after 55 sta ENABL ; 3 63 - any, on VDEL lda #<DS_PF1L ; 2 65 sta PF1 ; 3 68 - PF1L, 66 - 28 lda #<DS_GRP1 ; 2 70 jmp KernelLoop ; 3 73 2 1 Quote Link to comment Share on other sites More sharing options...
JeremiahK Posted July 19, 2020 Share Posted July 19, 2020 (edited) The low bit of colors can be used this way, too. After performing an ASL, it is ready to be used for one of the ENAxx registers. Edited July 19, 2020 by JeremiahK 4 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.