Unfortunately, it looks like Outlanders is pretty stupid and has a bunch of hard-coded writes like
LDA #$03
STA $C003
all over the place in addition to
sta $C000,y
rts
when they could've saved space
ldy #value
jsr The Offset Where One Instance Of STA $C000,Y Is
If you need to expand the table, I found the controller routine has some fat that can be cut.
Original routine
[code]
07:C29F:A9 01 LDA #$01
07:C2A1:8D 16 40 STA $4016 = #$FF
07:C2A4:A9 00 LDA #$00
07:C2A6:8D 16 40 STA $4016 = #$FF ;strobe controller port 1
07:C2A9:85 45 STA $0045 = #$00
07:C2AB:A2 00 LDX #$00
07:C2AD:20 B5 C2 JSR $C2B5
07:C2B0:E8 INX
07:C2B1:A9 00 LDA #$00
07:C2B3:85 45 STA $0045 = #$00 ;$45 status of current pad
07:C2B5:A0 08 LDY #$08 ;number of reads left
07:C2B7:85 45 STA $0045 = #$00
07:C2B9:BD 16 40 LDA $4016,X @ $4016 = #$FF ;read port
07:C2BC:85 46 STA $0046 = #$00
07:C2BE:4A LSR ;D0 -> carry, D1 -> D0
07:C2BF:05 46 ORA $0046 = #$00 ;$46 = 1 if D1/D0 = 1
07:C2C1:4A LSR ;button push into carry
07:C2C2:A5 45 LDA $0045 = #$00
07:C2C4:2A ROL ;insert into button register
07:C2C5:88 DEY
07:C2C6:D0 EF BNE $C2B7 ;repeat for all buttons
07:C2C8:86 46 STX $0046 = #$00
07:C2CA:06 46 ASL $0046 = #$00 ;$46 = 0 for pad 1, 2 for pad2
07:C2CC:A6 46 LDX $0046 = #$00
07:C2CE:B4 47 LDY $47,X @ $0047 = #$00 ;old button data
07:C2D0:84 46 STY $0046 = #$00
07:C2D2:95 47 STA $47,X @ $0047 = #$00
07:C2D4:95 48 STA $48,X @ $0048 = #$00
07:C2D6:29 FF AND #$FF
07:C2D8:10 08 BPL $C2E2
07:C2DA:24 46 BIT $0046 = #$00
07:C2DC:10 04 BPL $C2E2
07:C2DE:29 7F AND #$7F
07:C2E0:95 48 STA $48,X @ $0048 = #$00
Replacement code, seems to work okay.
EDIT: NO IT'S NOT WORKING, DON'T INSERT YET. SEEMS I MADE AN ERROR.
I HAVE TO GO SO I WILL CHECK LATER TONIGHT AND FIX THIS.
ldx #$01
stx $4016
dex
stx $4016 ;store controller
;here we'll assume X = 0 for player 1
jsr PadRead
inx ;onto player 2 and repeat the loop
PadRead:
ldy #$08
PadLoop:
lda $4016,x ;$4016 for P1 and $4017 fot P2
and #$03 ;check just D1/D0
bne EitherPressed
clc
bcc $01
sec
; now carry = 0 if neither line is pressed, 1 = if either pressed
rol $45
dey
bne PadLoop
txa
asl a
tax ;A = A*2 (by coincidence, it will still be 0 for P1, we don't care for P2)
ldy $47,x ;last button press (from $47 for P1, $49 for P2)
sty $46
lda $45 ;current pad status
sta $47,x ;store to last button status
bpl End ;last button press wasn't A, quit
lda $46 ;A wasn't pressed on previous check
bpl End
;if we're here, A was pressed on both frames
lda $47,x
and #$7F
End:
sta $48,x
rts
Should free up 13 bytes at $1C2E6-1C2F2 after inserted. Maybe that's enough you move the beginning of the reset routine (starts at $C008, reset vector is at $2000C (on NES, is always at $FFFC-FFFD of fixed bank) to free up $C008-C00F to expand the bank table.