User Tools

Site Tools


metroid:disassembly:game_engine_page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
metroid:disassembly:game_engine_page [2015/06/07 12:12] – Fucking tabs snarfblammetroid:disassembly:game_engine_page [2016/03/06 17:29] (current) – infos on breakable blocks snarfblam
Line 1928: Line 1928:
         jsr CheckMissileToggle         jsr CheckMissileToggle
         jsr UpdateItems                 ;($DB37)Display of power-up items.         jsr UpdateItems                 ;($DB37)Display of power-up items.
-        jsr LFDE3+        jsr UpdateTourianItems          ;($FDE3)
  
 ;Clear remaining sprite RAM ;Clear remaining sprite RAM
Line 6515: Line 6515:
         ldx #$C0         ldx #$C0
 *       lda TileRoutine,x *       lda TileRoutine,x
-        beq +      ; 0 = free slot+        beq +                           ; 0 = free slot
         jsr Xminus16         jsr Xminus16
         bne -         bne -
         lda TileRoutine,x         lda TileRoutine,x
-        bne ++++         ; no more slots, can't blast tile+        bne ++++                        ; no more slots, can't blast tile
 *       inc TileRoutine,x *       inc TileRoutine,x
         lda $04         lda $04
Line 6527: Line 6527:
         sta TileWRAMHi,x         sta TileWRAMHi,x
         lda InArea         lda InArea
-        cmp #$11+        cmp #$11                        ; In Norfair?
         bne +         bne +
-        cpy #$76+        cpy #$76                        ; Special case for the four-small-bubbles breakable block
         bne +         bne +
         lda #$04         lda #$04
         bne ++         bne ++
-*       tya+*       tya                             ; Destroyed block ID
         clc         clc
         adc #$10         adc #$10
Line 9371: Line 9371:
 *       rts *       rts
  
-LFDE3:  lda EndTimerHi +UpdateTourianItems: 
-        cmp #$99 +; Adds mother brain and zebetite  
-        bne + +LFDE3:  lda EndTimerHi          ; Determine if this is the first frame the end timer is running 
-        clc +        cmp #$99                ; (it will have a value of 99.99 the first frame) 
-        sbc EndTimerLo  ; A = zero if timer just started +        bne +                    
-        bne +      branch if not +        clc                      
-        sta $06 +        sbc EndTimerLo           
-        lda #$38 +        bne +                   On the first frame of the end timer: 
-        sta $07 +                                 
-        jsr LDC54 +        sta $06                 ;  
-*       ldx #$20 +        lda #$38                ; 
-*       jsr LFE05 +        sta $07                 ;    Add [mother brain defeated] to item history 
-        txa +        jsr LDC54               ;  
-        sec +                                 
-        sbc #$08 +*       ldx #$20                ; Loop through zebetites (@ x = 20, 18, 10, 8, 0) 
-        tax +*       jsr CheckZebetite       ;     ($FE05) Update one zebetite 
-        bne - +        txa                     ;     (Subtract 8 from x) 
- +        sec                      
-LFE05:  lda $0758,x +        sbc #$08                 
-        sec +        tax                      
-        sbc #$02 +        bne -                    
-        bne --- +                                 
-        sta $06 +CheckZebetite                    
-        inc $0758,x +LFE05:  lda $0758,            ;  
-        txa +        sec                      
-        lsr +        sbc #$02                ;  
-        adc #$3C +        bne ---                 ; Exit if zebetite state != 2 
-        sta $07 +        sta $06                 ; Store 0 to $06 
-        jmp LDC54+        inc $0758,            ; Set zebetite state to 3 
 +        txa                      
 +        lsr                     ; A =  zebetite index * 4 (10, C, 8, 4, or 0) 
 +        adc #$3C                ;      + $3C 
 +        sta $07                  
 +        jmp LDC54               ; Add zebetite to item history
  
 ; Tile degenerate/regenerate ; Tile degenerate/regenerate
metroid/disassembly/game_engine_page.1433679142.txt.gz · Last modified: 2015/06/07 12:12 by snarfblam