diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 4931b50..3ed51ba 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -160,6 +160,7 @@ incsrc quickswap.asm incsrc endingsequence.asm incsrc cuccostorm.asm incsrc retro.asm +incsrc dpadinvert.asm warnpc $A58000 ;org $228000 ; contrib area diff --git a/dpadinvert.asm b/dpadinvert.asm new file mode 100644 index 0000000..ab4ae02 --- /dev/null +++ b/dpadinvert.asm @@ -0,0 +1,18 @@ +;================================================================================ +; D-Pad Invert +; runs in NMI, must use minimum possible # of cycles +;-------------------------------------------------------------------------------- +; Filtered Joypad 1 Register: [BYST | udlr]. +!INVERT_DPAD = "$7F50CB" +InvertDPad: + LDA !INVERT_DPAD : BEQ .normal + .inverted + LDA $4219 + BIT.b #$0C : BEQ + : EOR #$0C : + + BIT.b #$03 : BEQ + : EOR #$03 : + + STA $01 +RTL + .normal + LDA $4219 : STA $01 +RTL +;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index 581e8ad..48eac74 100644 --- a/hooks.asm +++ b/hooks.asm @@ -41,6 +41,13 @@ ReturnCheckZSNES: ;JSL.l OnDungeonEntrance ;-------------------------------------------------------------------------------- +;================================================================================ +; D-Pad Invert +;-------------------------------------------------------------------------------- +org $0083D9 ; <- 3D9 - Bank00.asm : 611 (LDA $4219 : STA $01) +JSL.l InvertDPad : NOP +;-------------------------------------------------------------------------------- + ;================================================================================ ; Dungeon Exit Hook ;-------------------------------------------------------------------------------- diff --git a/tables.asm b/tables.asm index c16466e..e56e37e 100644 --- a/tables.asm +++ b/tables.asm @@ -1402,6 +1402,8 @@ dw #9999 ; Rupee Limit ; $7F50C8 - Infinite Arrows Modifier ; $7F50C9 - Infinite Bombs Modifier ; $7F50CA - Infinite Magic Modifier +; $7F50CB - Invert D-Pad +; $7F50CC - Temporary OHKO ; $7F50D0 - $7F50FF - Block Cypher Parameters ; $7F5100 - $7F51FF - Block Cypher Buffer