Jump to content
  • entries
  • comments
  • views


Recommended Comments

When I rewrote the Kernels I used cd-w's suggestion from back at the beginning. After sleeping on it, I believe that change will make it possible for me to squeeze in 1 more datastream.

What I've been concerned with is this - I'm using the missiles to draw the station cores, and drawing the cores as part of the sprite update (so if player 0 drew the station then missile 1 will draw the core for a hopeful, though uncontrollable, color difference). This results in extra flicker for the shots flying in the vicinity of the station. Even worse, if two onscreen stations are lined up vertically with their cores exposed then shots in the vertical band containing the cores would end up becoming invisible - so you could be killed by something you cannot see, never good thing.

So, I'm going to take a detour and see if I can't add an update to the ball reposition routines to also set the ball size, which will let me use it for drawing shots as well as multicolored stars.

Making this change will require every kernel to be udpated (56 of them!) to handle the extra datastream. At first glance most will be fairly straightforward, though RealResblStrobe68 for the ball will be tricky so I'll do that one first to see if it's possible.

R75:                        ;   75
        ; Y holds M0
        ; X holds GRP1
        ; A holds M1
        sta.w HMOVE         ; 4 79/3
        stx GRP1            ; 3  6
        sta ENAM1           ; 3  9
        sty ENAM0           ; 3 12
        jmp (NextKernel)    ; 5 17              


RealResblStrobe68:              ;   20
        lda #<DS_NUSIZ_COLUPF   ; 2 22
        sta COLUPF              ; 3 25        
        lda #<DS_GRP0           ; 2 27
        sta GRP0                ; 3 30 <- on VDEL, for next scanline
        lda #<DS_JUMP           ; 2 32
        sta NextKernel          ; 3 35
        sta HMCLR               ; 3 38 ' reset missile/ball HMOVE
        lda #<DS_HMP0           ; 2 40
        sta HMP0                ; 3 43
        lda #<DS_HMP1           ; 2 45        
        sta HMP1                ; 3 48
        lda #<DS_COLUP_HMMB     ; 2 50
        sta HMBL                ; 3 53
        lda #<DS_M1M0BL         ; 2 55
        sta ENABL               ; 3 58 <- on VDEL, for next scanline
        lsr                     ; 2 60        
        tay                     ; 2 62 <- Y enable for M0
        lsr                     ; 2 64 <- A has enable for M1
        sta.w RESBL             ; 4 68
        ldx DS_GRP1             ; 4 72
        jmp R75                 ; 3 75   

Basically I'll clone the code from R75 and put it just after RealResblStrobe68. Removing the jmp R75 gives me time for a sta CTRLPF, I just need to adjust the routine so I can change both sta.w instructions to sta , while maintaining the RESBL @ 68, to give me time to add in lda #<DS_CTRLPF.

All the other RealResblStrobexx routines have a SLEEP 2 in them which means I won't have to eliminate sta.w instructions. All the player and missile reposition routines do not need the sta CTRLPF, just the lda #<DS_CTRLPF to keep the datastream in sync.
Link to comment

A couple of the original datastreams:

  • DS_COLUP_HMMB - held color for players or HM value for missiles/ball
  • DS_NUSIZ_COLUPF - held size for players/missiles, or color for ball

are now three:

  • DS_HMMB - HMM0, HMM1 or HMBL

Rewrote the 11 ball reposition routines during lunch, looks like this will work out for resizing & recoloring the ball.


Still 45 kernels to go, after which I'll need to update the C code to use the revised datastreams.

Link to comment
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...