I'm going to avoid giving out direct code for this one because I think you can manage it yourself.
The weird thing about MMC1 regs is that they have to be written to one bit at a time, in sets of 5. So when you see any write to the $8000-FFFF range, only the low bit matters*.
So for example.... the "typical" case looks like this:
LDA #$13 ; same value to write in A. $13 = %00010011
; we need to perform 5 writes to get MMC1 to recognize this. Each write takes the low bit of the written value
; games will usually alternate between STA/LSR... each LSR shifting down the bits so the next one is written on the
; next STA
STA $9FFF ; A=%00010011 <- low bit is 1, therefore 1 gets put in the reg
; new MMC1 reg contents = ????1
LSR A ; now A=%00001001 <- low bit still 1...
STA $9FFF ; new MMC1 reg = ???11
LSR A ; now A=%00000100 <- low bit is now 0
STA $9FFF ; new MMC1 reg = ??011
LSR A ; now A=%00000010 <- low bit is 0
STA $9FFF ; new MMC1 reg = ?0011
LSR A ; now A=%00000001 <- low bit is 1
STA $9FFF ; new MMC1 reg = 10011
; all 5 bits written -- so this write is complete and %10011 (or $13) is the value written to the register.
Knowing that, we can figure out what something like this is doing:
01C05A: A2 FF LDX #$FF ; X=$FF
01C05C: 9A TXS
01C05D: E8 INX ; X=$00
01C05E: 8E FF 9F STX $9FFF = #$00 ; low bit of X=0 -- mmc1 reg = ????0
01C061: E8 INX ; X=$01
01C062: 8E FF 9F STX $9FFF = #$00 ; low bit of X=1 -- mmc1 reg = ???10
01C065: 8E FF 9F STX $9FFF = #$00 ; low bit of X=1 -- mmc1 reg = ??110
01C068: 8E FF 9F STX $9FFF = #$00 ; low bit of X=1 -- mmc1 reg = ?1110
01C06B: 8E FF 9F STX $9FFF = #$00 ; low bit of X=1 -- mmc1 reg = 11110
; As you can see, the code effectively wrote $1E to the $9FFF register
You should be able to figure out what writes to $9FFF accomplish (they are CHR swapping, IIRC, but double check on the wiki). And you should be able to figure out how to mimic that on MMC5 easily enough.
*(The high bit matters too, but if the high bit is set, the game is resetting the mapper which is probably only going to happen once at startup and therefore you can probably ignore it)