Skip to content
Clément Gallet edited this page Mar 23, 2015 · 1 revision
  • Inside the function for loading a monster's graphic palette, width, height and graphic pointer (code relevant for the sketch glitch)
  • Messes up the stack (one PLY instruction)
$C1/2060 16 08       ASL $08,x
$C1/2062 C2 20       REP #$20                
$C1/2064 BF 00 70 D2 LDA $D27000,x[$D2:7004] 
$C1/2068 29 FF 7F    AND #$7FFF              
$C1/206B 8D 78 81    STA $8178  [$00:8178]   
$C1/206E 7B          TDC                     
$C1/206F E2 20       SEP #$20                
$C1/2071 BF 01 70 D2 LDA $D27001,x[$D2:7005] 
$C1/2075 29 80       AND #$80                
$C1/2077 8D 7C 81    STA $817C  [$00:817C]   
$C1/207A BF 02 70 D2 LDA $D27002,x[$D2:7006] 
$C1/207E 4A          LSR A                   
$C1/207F 0D 7C 81    ORA $817C  [$00:817C]   
$C1/2082 8D 7C 81    STA $817C  [$00:817C]   
$C1/2085 4A          LSR A                   
$C1/2086 4A          LSR A                   
$C1/2087 4A          LSR A                   
$C1/2088 4A          LSR A                   
$C1/2089 4A          LSR A                   
$C1/208A 29 01       AND #$01                
$C1/208C 8D 7B 81    STA $817B  [$00:817B]   
$C1/208F BF 04 70 D2 LDA $D27004,x[$D2:7008] 
$C1/2093 8D 7A 81    STA $817A  [$00:817A]   
$C1/2096 AD 77 81    LDA $8177  [$00:8177]   
$C1/2099 0A          ASL A                   
$C1/209A 0A          ASL A                   
$C1/209B AA          TAX                     
$C1/209C 86 10       STX $10    [$00:1310]   
$C1/209E A9 C2       LDA #$C2                
$C1/20A0 85 14       STA $14    [$00:1314]   
$C1/20A2 AD 00 20    LDA $2000  [$00:2000]   
$C1/20A5 0A          ASL A                   
$C1/20A6 AA          TAX                     
$C1/20A7 C2 20       REP #$20                
$C1/20A9 BF BC CF C2 LDA $C2CFBC,x[$C2:CFC0] 
$C1/20AD 18          CLC                     
$C1/20AE 65 10       ADC $10    [$00:1310]   
$C1/20B0 85 12       STA $12    [$00:1312]   
$C1/20B2 A7 12       LDA [$12]  [$00:0000]   
$C1/20B4 18          CLC                     
$C1/20B5 69 0F AE    ADC #$AE0F              
$C1/20B8 65 26       ADC $26    [$00:1326]   
$C1/20BA 85 61       STA $61    [$00:1361]   
$C1/20BC E6 12       INC $12    [$00:1312]   
$C1/20BE E6 12       INC $12    [$00:1312]   
$C1/20C0 A7 12       LDA [$12]  [$00:0000]   
$C1/20C2 8D 26 82    STA $8226  [$00:8226]   
$C1/20C5 AD 78 81    LDA $8178  [$00:8178]   
$C1/20C8 0A          ASL A                   
$C1/20C9 0A          ASL A                   
$C1/20CA 0A          ASL A                   
$C1/20CB 85 64       STA $64    [$00:1364]   
$C1/20CD 9C 24 82    STZ $8224  [$00:8224]   
$C1/20D0 FA          PLX                     
$C1/20D1 A5 16       LDA $16    [$00:1316]   
$C1/20D3 9D E7 80    STA $80E7,x[$00:80EB]   
$C1/20D6 7B          TDC                     
$C1/20D7 E2 20       SEP #$20                
$C1/20D9 AD 79 81    LDA $8179  [$00:8179]   
$C1/20DC 4A          LSR A                   
$C1/20DD 4A          LSR A                   
$C1/20DE 4A          LSR A                   
$C1/20DF 4A          LSR A                   
$C1/20E0 4A          LSR A                   
$C1/20E1 85 66       STA $66    [$00:1366]   
$C1/20E3 A5 64       LDA $64    [$00:1364]   
$C1/20E5 18          CLC                     
$C1/20E6 69 00       ADC #$00                
$C1/20E8 85 64       STA $64    [$00:1364]   
$C1/20EA A5 65       LDA $65    [$00:1365]   
$C1/20EC 69 70       ADC #$70                
$C1/20EE 85 65       STA $65    [$00:1365]   
$C1/20F0 A5 66       LDA $66    [$00:1366]   
$C1/20F2 69 E9       ADC #$E9                
$C1/20F4 85 66       STA $66    [$00:1366]   
$C1/20F6 60          RTS                     
Clone this wiki locally