Wayne Gretzky and the NHLPA All-Stars/Hidden content

From Sega Retro

Back to: Wayne Gretzky and the NHLPA All-Stars.

Uncompiled source code

Uncompiled source code can be found at several points in the ROM:

0004AE00:

CODEPLACE      ; PLOTTING SHADOWS!
                                
 MOVE.L #DUDVAR,A5      ; GET POINTER TO SECTION
 MOVE.W #DUDCHUNKIND,D5         ; INDEX!
                                                        
.PS1
 TST.W (A5,D5)                  ; CHECK IF PLAYER ON
 BEQ.S .NOSHAD
 TST.W DUDSHADFR(A5,D5)
 BEQ.S .NOSHAD                  ; SKIP IF NO SHADOW TO PLOT!

 MOVE DUDX(A5,D5),D0
 MOVE DUDYS(A5,D5),D1
 BEQ.S .NOSHAD          ; IF Y = 0- SKIP HIM
        
 LSR.W	#PSHIFT,D0             ; SAVE Y VALUE OF PUCK!
        SUB D2,D1               ; GET POSITION OF PUCK LESS ALTITUDE
        MOVE.W D1,SPY                           
        SUB WINDOWX,D0        ; GET WINDOWY
        MOVE.W D0,SPX
                                                  				                                                                
;;        MOVE PUCKFR,D0              ; AND PLOT THE PUCKER!
;;         JSR SAFEVIDEO_PLOT                 ; GENERAL PLOT TO VIDEO TAPE!
;        JSR SAFEGENERAL_PLOT

        POP D1                  
        TST.W PERIODOVER        ; IF REGULAR PERIOD OVER!
        BNE.S .SKIPSHAD
                                        
        MOVE.W D1,SPY
        MOVE #$5,D0              ; AND PLOT THE SHADOW!
        BSR SAFEVIDEO_PLOT                 ; GENERAL PLOT TO VIDEO TAPE!

.SKIPSHAD               
        RTS  


 XDEF INITDUDELIST
INITDUDELIST
 CLR.W PTEMP
                                                
 MOVE #(NUMDUDS+2)*2,D2         ; MAKE BIGGER  FOR PUCK AND GOALS....
                           
 MOVE.L #PLOTDUDELIST,A1        ; GET PLOT LIST!
.ID2
 MOVE.W PTEMP,D0
 ADD #$80,PTEMP
 MOVE D0,(A1)+                  ; SAVE WHICH GUY TO PLOT!
 SUBQ #2,D2                     ; ONE LESS GUY!
 BPL.S .ID2                      ; NOT DONE YET!

 MOVE.W #$FFFF,(A1)+            ; FLAG FOR END!
 RTS


SORTDUDES
; OK- THIS ONE GOES THROUGH DUDES AND JUST REA-ARRANGES THEM ONE AT A TIME...
 MOVE.L #DUDVAR,A5      ; GET POINTER TO SECTION

 tst.w gamenum
 beq.s .MAINGAME

; UHH- HERE CLEAR ALL PUCKX AND THAT SHIT...
 MOVE.W #LGOALDUD,D5            ; POINT TO LEFT GOAL...
 CLR.W DUDYS(A5,D5)
 CLR.W DUDFR(A5,D5)
 MOVE.W #RGOALDUD,D5            ; POINT TO LEFT GOAL...
 CLR.W DUDYS(A5,D5)
 CLR.W DUDFR(A5,D5)
 MOVE.W #PUCKDUD,D5            ; POINT TO LEFT GOAL...
 CLR.W DUDYS(A5,D5)
 CLR.W DUDFR(A5,D5)
 BRA .SORTEM

.MAINGAME
 MOVE.W #LGOALDUD,D5            ; POINT TO LEFT GOAL...
 MOVE.W GOALX,D0
 ASL #PSHIFT,D0
 MOVE.W D0,DUDX(A5,D5)
 MOVE.W GOALY,D0
 ASL #PSHIFT,D0
 MOVE D0,DUDYS(A5,D5)
 ADD D0,D0
 MOVE D0,DUDY(A5,D5)
 MOVE.W #4,DUDFR(A5,D5)
                      
 MOVE.W #RGOALDUD,D5            ; POINT TO LEFT GOAL...
 MOVE.W GOALX+2,D0
 ASL #PSHIFT,D0
 MOVE.W D0,DUDX(A5,D5)
 MOVE.W GOALY+2,D0
 ASL #PSHIFT,D0
 MOVE D0,DUDYS(A5,D5)
 ADD D0,D0
 MOVE D0,DUDY(A5,D5)
 MOVE.W #4+FLIP,DUDFR(A5,D5)

 MOVE.W #PUCKDUD,D5            ; POINT TO LEFT GOAL...
; MOVE.W #RGOALDUD,D5            ; POINT TO LEFT GOAL...
 MOVE.W PUCKX,DUDX(A5,D5)
 MOVE.W PUCKY,D0
 MOVE.W D0,DUDY(A5,D5)

 SUB.W PUCKA,D0                 ; TAKE OFF ALTITUDE!
 LSR #1,D0
 MOVE.W D0,DUDYS(A5,D5)
 MOVE.W PUCKFR,DUDFR(A5,D5)
                

.SORTEM        
; ANYWAYS SORT THE DAMN THING...
 MOVE.L #PLOTDUDELIST,A1        ; GET PLOT LIST!
.SDL
 MOVE.W (A1),D5                 ; GET GUY....
 MOVE.W 2(A1),D4                ; GET OTHER GUY!
 BMI.S .SWAPDONE                     ; OK- DONE...
        
 MOVE DUDY(A5,D5),D0
 CMP DUDY(A5,D4),D0
 BHS .NOSWAP            ; equal no swap!
                        
; WOW! SWAP THEM!
 MOVE D4,(A1)
 MOVE D5,2(A1)

.NOSWAP
 ADDQ.L #2,A1                     ; GO TO NEXT...
 BRA .SDL

.SWAPDONE
 RTS


; END OF FILE
; COACH.A       -
;
;
;       HANDLES PAUSED OPTIONS AND COACHING OPTIONS DURING GAMEPLAY!
 
	OPT	NOABSPCADD,E,NOCASE
	NAME	FLUFF

; SO LINE CHANGE CAN BE CALLED FROM COACHING SCREEN!



 INCLUDE S:ASM.INC
 INCLUDE S:DMA.INC
 INCLUDE S:SOUNDS.INC
                               
	SECTION CODE,,C

        
     XREF _gemspauseall
     XREF _gemsresumeall

 XREF SAVELINES                  ; OK- SAVE THE LINES       
 XREF CLEARRVSCREEN
 XREF CLEARLVSCREEN
                                       
 XREF FROMCOACHLINE0
 XREF FROMCOACHLINE1

        XREF SETSTATS
        XREF CLEARMOSTVSCREEN                        
        XREF CLEARVSCREEN                        
        XREF CLEARSCREENA
        XREF CLEARSCREENB
        XREF SETALLPAL                                 


000BAA00:

IF LESS THAN! */
MYIFL MACRO P1,P2,P3
         CMP.W P2,P1
         BLO.S P3         
     ENDM               

        
;/* LONG JUMP IF LESS */
MYIFLL MACRO P1,P2,P3
         CMP.W P2,P1
         BLO P3         
     ENDM               
                                
; IF LESS THAN! */
MYIFLE MACRO P1,P2,P3
         CMP.W P2,P1
         BLS.S P3         
     ENDM               

; DOES A QUICKY COMPARISON! */
MYIFG MACRO P1,P2,P3
         CMP.W P2,P1
         BHI.S P3         
     ENDM               
          
MYIFGL MACRO P1,P2,P3
         CMP.W P2,P1
         BHI P3         
     ENDM               

MYIFGE MACRO P1,P2,P3
         CMP.W P2,P1
         BHS.S P3
     ENDM               
                  
MYIFNE MACRO P1,P2,P3
         CMP.W P2,P1
         BNE.S P3         
     ENDM               


BOXCHECK MACRO X,Y,LEFT,RIGHT,TOP,BOTTOM
 LOCAL .NOTHIT,.BCDONE
 MYIFL X,LEFT,.NOTHIT
 MYIFG X,RIGHT,.NOTHIT
 MYIFL Y,TOP,.NOTHIT
 MYIFG Y,BOTTOM,.NOTHIT
 SETEQ
 BRA.S .BCDONE
.NOTHIT
 SETNE
.BCDONE
 ENDM





                                 
RANGERLH MACRO REG,LOW,HIGH
 LOCAL L1,L2

; CHECKS IF SOMETHING IN RANGE!
 IFL LOW,REG,L1          ; IF WAY PAST THEN WRAPPED UNDER- NOT NEGATIVE!
 MOVE.W LOW,REG           ; IF SO, STOP!
 BRA.S L2                  ; WHY NEEDED?
                                            
L1:                    
 IFG HIGH,REG,L2       ; IS IT LOWER THAN BOTTOM  THEN KOSHER!?
 MOVE.W	HIGH,REG
                        

References


Wayne Gretzky and the NHLPA All-Stars

WayneGretzkyNHLPAAllStars title.png

Main page | Comparisons | Hidden content | Magazine articles | Reception | Region coding | Technical information | Bootlegs


Sega Mega Drive
Prototypes: Prototype | 1995-02-17