Robocop looks like it uses 8x16 sprites. MMC5 does 8x16 sprites a little weird -- it has a completely different set of registers for BG tiles and for sprite tiles. That way it can give 8x16 sprites twice as many tiles to choose from (they don't have to share the pattern tables with the BG like they normally would have to)
So when the game is swapping BG CHR tiles, you'd want to use $5128-512B .. and when swapping Sprite CHR tiles you'd want to use $5124-5127. Note that $5120-5123 will probably go unused -- those are going to be your extra sprite tiles that the original game won't be using.
So looking at this:
07:DA90: A2 05 LDX #$05
>07:DA92: 8E 00 80 STX $8000 = #$72 ;MMC5_equivalents? ; <---- loop here
07:DA95: B5 13 LDA $13,X @ $0017 = #$00
07:DA97: 8D 01 80 STA $8001 = #$20 ;MMC5_equivalents?
07:DA9A: CA DEX
07:DA9B: 10 F5 BPL $DA92 ; <---- jump to loop
X is controlling which portion of CHR gets swapped (via the write to $8000). What makes this tricky is that when X=0 or X=1, the game is selecting a 2K block of BG tiles.... whereas when X=2,3,4 or 5, you are selecting a 1K block of Sprite tiles. Aside from BG and sprites being different, these are also different SIZES.
From the MMC5 standpoint, you'll probably be in 1K CHR mode, which means you'll have to swap in two different 1K pages instead of the 2K page for BG tiles.
There isn't really a simple way to reconsile the differences here -- so you'll probably have to split this loop into two parts -- one to select BG and one to select sprites:
; The 0,1 values are 2K BG pages
; You MIGHT be able to shave a few bytes by making a very small loop, but I
; didn't check and it wouldn't be more than a byte or two if even that.
LDX $13 ; load first 2K page number
STX $5128 ; swap first half in
STX $5129 ; swap second half in
LDX $14 ; do same for next 2K page number
; the 2,3,4,5 values are 1K Sprite pages
; this is easier to loop
LDX #$03 ; we're going to loop 4 times counting down 3->0
LDA $15,X ; read from $15,X instead of $13,X because we're only interested in the spr pages
The other parts are IRQ related. Fortunately the overlap between MMC3 and MMC5 is enough that this isn't TOO terrible... but it's still kind of barfy.
07:DA36: A9 B0 LDA #$B0
>07:DA38: 8D 00 C0 STA $C000 = #$20 ;MMC5_equivalents?
07:DA3B: A9 00 LDA #$00
07:DA3D: 8D 01 C0 STA $C001 = #$1D ;MMC5_equivalents?
07:DA40: A5 44 LDA $44 = #$00
07:DA42: D0 06 BNE $DA4A
07:DA44: 8D 00 E0 STA $E000 = #$72 ;MMC5_equivalents?
07:DA47: 4C 4D DA JMP $DA4D
07:DA4A: 8D 01 E0 STA $E001 = #$20 ;MMC5_equivalents?
$C000 controls which scanline the IRQ is to fire on. The MMC5 equivalent of that is $5203.
Writing any value to $C001 just triggers the IRQ counter to restart. This doesn't need to be done on MMC5 since it automatically primes itself when rendering starts.
There is a SLIGHT difference in how each mapper counts scanlines, but I don't think it'll make a big difference here. I would say just use the game's original scanline counter values and tweak them by a scanline or two only if the screen splits look bad. I suspect they'll be fine.
$E000 and $E001 control whether the IRQ counter is enabled. Writing any value to $E000 will acknowledge the IRQ and disable it. Writing any value to $E001 will enable it. The code here seems to use $44 as the flag to enable/disable IRQs (nonzero = enabled)
On MMC5, IRQs are controlled by the high bit of $5204. You can also acknowledge IRQs by reading from $5204
So the MMC5 equivalent to the above would be....
LDA #$B0 ; (maybe need to adjust this value if it looks bad, but probably not)
STA $5203 ; set scanline for the IRQ to fire
LDA $5204 ; acknowledge any pending IRQ -- probably need to put this in the IRQ handler, too, the
; game is certainly writing to $E000 at that point in the code to do this.
LDA $44 ; Do we want to enable IRQs?
BEQ Skip ; If zero (disabled), keep the zero in A
LDA #$80 ; Otherwise (nonzero, enabled) put #$80 in A
STA $5204 ; write A to enable/disable IRQs as appropriate
I'll stop there for now. I didn't look at the startup or PRG swapping bits you posted since you said the graphics stuff is what you were having problems with, but if you are still having problems with that lemme know.