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
Last revisionBoth sides next revision
metroid:disassembly:game_engine_page [2015/06/07 12:12] – Fucking tabs snarfblammetroid:disassembly:game_engine_page [2015/06/07 15:00] – Added comments on MB/Zebetite password tracking 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 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.txt · Last modified: 2016/03/06 17:29 by snarfblam