Irmorton
by asmagicianmaks
Game: SMW
Description: Pressing L or R takes you to Morton's Castle
;xxxxxxx1 - modify blank tile map16 ;xxxxxx1x - show a random stripe ;xxxxx1xx - change a bunch of PPU regs (if 0 it restores them back) ;xxxx1xxx - show every stripe (retry $13 issue) Main: LDA !carl_initialized STA $0F LSR $0F BCC + LDA $5B BMI + REP #$30 ;LDA #$8158 LDA $13 ASL #3 ORA #$8000 AND #$83FF STA $1008|!addr ;change blank tile map16 data SEP #$30 + LDA $0100|!addr CMP #$28 BEQ + CMP #$24 BEQ + CMP #$1E BEQ + CMP #$1A BEQ + CMP #$13 BEQ + CMP #$0D BEQ + CMP #$14 BNE .end LDA $0D9B|!addr BMI .regmadness .end RTL + LDA $0DAE|!addr BNE .end LDA $0DB1|!addr BEQ .end LDA $0F AND #$01 BEQ .regmadness LDA $0F AND #$04 BEQ + LDA $7FC700 INC STA $7FC700 BRA ++ + LDA $13 ++ AND #$07 ASL TAX LDA.b #Ptrs>>16 STA $02 PHB LDA #$7F PHA PLB REP #$31 LDA.l Ptrs,x STA $00 LDA.l Length,x TAY ADC.w $837B STA.w $837B TAX DEY #2 LDA.w #$FFFF STA.w $837D,x DEX #2 - LDA.b [$00],y STA.w $837D,x DEX #2 DEY #2 BPL - PLB SEP #$30 .regmadness LSR $0F BCC + STZ $24 LDA $3E ORA #$08 STA $3E ;layer 3 priority + LDA #$80 STA $2100 LSR $0F BCS ++ LDA #$00 STA $2133 LDA #$03 STA $2101 BRA + ++ LDA #$C5 STA $2133 LDA $13 AND #$7F STA $2101 ;OAM size LDA $5B BMI + LDA #$31 STA $2108 ;Layer 2 tilemap + LDA $0DAE|!addr STA $2100 JMP .end Ptrs: dw Stripe1,Stripe2,Stripe3,Stripe4 dw Stripe5,Stripe6,Stripe7,Stripe8 Length: dw Stripe1_end-Stripe1,Stripe2_end-Stripe2 dw Stripe3_end-Stripe3,Stripe4_end-Stripe4 dw Stripe5_end-Stripe5,Stripe6_end-Stripe6 dw Stripe7_end-Stripe7,Stripe8_end-Stripe8 '!' = $391A : '.' = $391B : '-' = $391C : ',' = $391D '?' = $391E : '#' = $395A : '(' = $395B : ')' = $395C '/' = $391F ;space '`' = $395D ;apostrophe '%' = $399F ;fish 'A' = $3900 : 'B' = $3901 : 'C' = $3902 : 'D' = $3903 : 'E' = $3904 : 'F' = $3905 : 'G' = $3906 : 'H' = $3907 : 'I' = $3908 : 'J' = $3909 : 'K' = $390A : 'L' = $390B : 'M' = $390C : 'N' = $390D : 'O' = $390E : 'P' = $390F : 'Q' = $3910 : 'R' = $3911 : 'S' = $3912 : 'T' = $3913 : 'U' = $3914 : 'V' = $3915 : 'W' = $3916 : 'X' = $3917 : 'Y' = $3918 : 'Z' = $3919 'a' = $3940 : 'b' = $3941 : 'c' = $3942 : 'd' = $3943 : 'e' = $3944 : 'f' = $3945 : 'g' = $3946 : 'h' = $3947 : 'i' = $3948 : 'j' = $3949 : 'k' = $394A : 'l' = $394B : 'm' = $394C : 'n' = $394D : 'o' = $394E : 'p' = $394F : 'q' = $3950 : 'r' = $3951 : 's' = $3952 : 't' = $3953 : 'u' = $3954 : 'v' = $3955 : 'w' = $3956 : 'x' = $3957 : 'y' = $3958 : 'z' = $3959 '0' = $3922 : '1' = $3923 : '2' = $3924 : '3' = $3925 : '4' = $3926 : '5' = $3927 : '6' = $3928 : '7' = $3929 : '8' = $392A : '9' = $392B ;normal digits start at $64 ;full digits start at $22 ;;;"0123456789ABCDEFGHIJKLMNOPQRSTUV" Stripe1: db $53,$40,00,.end-.start-1 .start dw "Sub/to/PatCdr/for/free/V-Bucks//" .end Stripe2: db $53,$40,00,.end-.start-1 .start dw "Sub/to/PatCdr/for/a/notification" .end Stripe3: db $53,$40,00,.end-.start-1 .start dw "Sub/to/PatCdr/for/free/Bitcoin//" .end Stripe4: db $53,$44,00,.end-.start-1 .start dw "Greetings/from/Poland!//" .end Stripe5: db $53,$41,00,.end-.start-1 .start dw "Morton/Koopa/Jr/is/behind/you!" .end Stripe7: db $50,$80,00,.end-.start-1 .start dw "Lorem/ipsum/dolor/sit/amet,/consectetur/adipiscing/elit,/sed/do/eiusmod/tempor/incididunt/ut/labore/et/dolore/magna/aliqua." .end Stripe8: db $52,$0A,00,.end-.start-1 dw "This/stream/" db $52,$2A,00,.end-.start-1 dw "is/sponsored" db $52,$4A,00,.end-.start-1 dw "/////by/////" db $52,$6A,00,.end-.start-1 .start dw "//OpenVPN///" .end Stripe6: db $50,$81,$00,$1B db $0A,$38,$16,$38,$0A,$38,$23,$38 ;$0DF4A9 | AMAZING FLYIN' db $12,$38,$17,$38,$10,$38,$FC,$00 db $0F,$38,$15,$38,$22,$38,$12,$38 db $17,$38,$85,$38 db $50,$A1,$00,$1B db $11,$38,$0A,$38,$16,$38,$16,$38 ;$0DF4C9 | HAMMER BROTHER db $0E,$38,$1B,$38,$FC,$00,$0B,$38 db $1B,$38,$18,$38,$1D,$38,$11,$38 db $0E,$38,$1B,$38 db $50,$F2,$00,$15 db $1C,$38,$1E,$38,$19,$38,$0E,$38 ;$0DF4E9 | SUPER KOOPA db $1B,$38,$FC,$00,$14,$38,$18,$38 db $18,$38,$19,$38,$0A,$38 db $52,$57,$00,$0F db $0C,$38,$11,$38,$0A,$38,$1B,$38 ;$0DF503 | CHARGIN' db $10,$38,$12,$38,$17,$38,$85,$38 db $52,$78,$00,$09 db $0C,$38,$11,$38,$1E,$38,$0C,$38 ;$0DF517 | CHUCK db $14,$38 db $52,$A4,$00,$0D db $13,$38,$1E,$38,$16,$38,$19,$38 ;$0DF525 | JUMPING db $12,$38,$17,$38,$10,$38 db $52,$C1,$00,$19 db $19,$38,$12,$38,$1B,$38,$11,$38 ;$0DF537 | PIRHANA PLANT db $0A,$38,$17,$38,$0A,$38,$FC,$00 db $19,$38,$15,$38,$0A,$38,$17,$38 db $1D,$38 db $53,$30,$00,$0D db $1F,$38,$18,$38,$15,$38,$0C,$38 ;$0DF555 | VOLCANO db $0A,$38,$17,$38,$18,$38 db $53,$51,$00,$09 db $15,$38,$18,$38,$1D,$38,$1E,$38 ;$0DF567 | LOTUS db $1C,$38 .endback to listings