News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: RoboCop MMC3 to MMC5 Almost Finished  (Read 206 times)

Dracula X

  • Full Member
  • ***
  • Posts: 101
    • View Profile
    • My YouTube Page for ROM hacking
RoboCop MMC3 to MMC5 Almost Finished
« on: January 11, 2020, 09:57:50 pm »
I'm almost finished converting this mapper but I'm having a proble on trying to figure out on how to set up the PPU and CHR.

Heres what I have so far:

Power up or Reset:
Code: [Select]
07:FF00: 78        SEI
 07:FF01: D8        CLD
 07:FF02: A9 00     LDA #$00
>07:FF04: 8D 00 E0  STA $E000 = #$72 ;MMC5_equivalents?
 07:FF07: 85 44     STA $44 = #$FF
 07:FF09: A9 00     LDA #$00
 07:FF0B: 8D 10 40  STA DMC_FREQ = #$00
 07:FF0E: A9 40     LDA #$40
 07:FF10: 8D 17 40  STA JOY2_FRAME = #$00
 07:FF13: A9 28     LDA #$28
 07:FF15: 8D 00 20  STA PPU_CTRL = #$00
 07:FF18: A9 00     LDA #$00
 07:FF1A: 8D 01 20  STA PPU_MASK = #$00
 07:FF1D: 8D 03 20  STA PPU_OAM_ADDR = #$00
 07:FF20: AD 02 20  LDA PPU_STATUS = #$00
 07:FF23: 10 FB     BPL $FF20
 07:FF25: AD 02 20  LDA PPU_STATUS = #$00
 07:FF28: 30 FB     BMI $FF25
 07:FF2A: AD 02 20  LDA PPU_STATUS = #$00
 07:FF2D: 10 FB     BPL $FF2A
 07:FF2F: AD 02 20  LDA PPU_STATUS = #$00
 07:FF32: 30 FB     BMI $FF2F
 07:FF34: AD 02 20  LDA PPU_STATUS = #$00
 07:FF37: A9 10     LDA #$10
 07:FF39: AA        TAX
 07:FF3A: 8D 06 20  STA PPU_ADDRESS = #$00
 07:FF3D: 8D 06 20  STA PPU_ADDRESS = #$00
 07:FF40: 49 00     EOR #$00
 07:FF42: CA        DEX
 07:FF43: D0 F5     BNE $FF3A
 07:FF45: A9 00     LDA #$00
 07:FF47: 8D 00 80  STA $8000 = #$07 ;MMC5_equivalents?
 07:FF4A: A9 00     LDA #$00
 07:FF4C: 8D 00 A0  STA $A000 = #$01 ; I know how to work around this one
 07:FF4F: A9 00     LDA #$00
 07:FF51: 85 0C     STA $0C = #$FF
 07:FF53: A2 00     LDX #$00
 07:FF55: 86 0D     STX $0D = #$FF
 07:FF57: 8D 05 20  STA PPU_SCROLL = #$00
 07:FF5A: 8E 05 20  STX PPU_SCROLL = #$00
 07:FF5D: A2 FF     LDX #$FF
 07:FF5F: 9A        TXS
 07:FF60: 20 14 C0  JSR $C014
 07:FF63: 20 B7 CD  JSR $CDB7
 07:FF66: A9 0D     LDA #$0D
 07:FF68: 20 3E C3  JSR $C33E bank
 07:FF6B: 20 00 80  JSR $8000
 07:FF6E: A9 A8     LDA #$A8
 07:FF70: 85 09     STA $09 = #$00
 07:FF72: 8D 00 20  STA PPU_CTRL = #$00
 07:FF75: 20 1D C0  JSR $C01D
 07:FF78: A9 1E     LDA #$1E
 07:FF7A: 85 0A     STA $0A = #$00
 07:FF7C: 4C 00 C0  JMP $C000

Bankswitch code:
Code: [Select]
bank:
 07:C33E: 78        SEI
 07:C33F: 85 19     STA $19 = #$0D
 07:C341: A2 06     LDX #$06
>07:C343: 8E 00 80  STX $8000 = #$07
 07:C346: 8D 01 80  STA $8001 = #$0C
 07:C349: 58        CLI
 07:C34A: 60        RTS -----------------------------------------
bank2:
 07:C34B: 78        SEI
 07:C34C: 85 1A     STA $1A = #$00
 07:C34E: A2 07     LDX #$07
 07:C350: 8E 00 80  STX $8000 = #$07
 07:C353: 8D 01 80  STA $8001 = #$0C
 07:C356: 58        CLI
 07:C357: 60        RTS -----------------------------------------

This is what I have:
Code: [Select]
bank:
 07:C33E: 78        SEI
 07:C33F: 85 19     STA $19 = #$0D
 07:C341: A2 06     ORA #$09
>07:C343: 8E 00 80  STA $5114 = #$07
 07:C346: 8D 01 80  STA $8001 = #$0C ;MMC5_equivalents?
 07:C349: 58        CLI
 07:C34A: 60        RTS -----------------------------------------
bank2:
 07:C34B: 78        SEI
 07:C34C: 85 1A     STA $1A = #$00
 07:C34E: A2 07     ORA #$09
 07:C350: 8E 00 80  STA $5115 = #$07
 07:C353: 8D 01 80  STA $8001 = #$0C ;MMC5_equivalents?
 07:C356: 58        CLI
 07:C357: 60        RTS -----------------------------------------

Now I'm trying to get the PPU and CHR to work:

Code: [Select]
07:DA21: A9 00     LDA #$00
 07:DA23: 8D 06 20  STA PPU_ADDRESS = #$00
 07:DA26: 8D 06 20  STA PPU_ADDRESS = #$00
 07:DA29: AD 02 20  LDA PPU_STATUS = #$00
 07:DA2C: A5 0C     LDA $0C = #$00
 07:DA2E: 8D 05 20  STA PPU_SCROLL = #$00
 07:DA31: A5 0D     LDA $0D = #$00
 07:DA33: 8D 05 20  STA PPU_SCROLL = #$00
 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?

And here:
Code: [Select]
07:DA7A: E0 08     CPX #$08
 07:DA7C: F0 07     BEQ $DA85
 07:DA7E: E0 10     CPX #$10
 07:DA80: B0 08     BCS $DA8A
 07:DA82: 4C 5B DA  JMP $DA5B
 07:DA85: A5 65     LDA $65 = #$00
 07:DA87: 4C 5B DA  JMP $DA5B
 07:DA8A: A9 00     LDA #$00
 07:DA8C: 85 64     STA $64 = #$00
 07:DA8E: 85 65     STA $65 = #$00
 07:DA90: A2 05     LDX #$05
>07:DA92: 8E 00 80  STX $8000 = #$72 ;MMC5_equivalents?
 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
 07:DA9D: A5 19     LDA $19 = #$FF
 07:DA9F: 48        PHA
 07:DAA0: A9 0D     LDA #$0D
 07:DAA2: 20 3E C3  JSR $C33E bank
 07:DAA5: 20 06 80  JSR $8006
 07:DAA8: 68        PLA
 07:DAA9: 20 3E C3  JSR $C33E bank
 07:DAAC: 60        RTS -----------------------------------------

So I'm trying to figure out the MMC5_equivalents except for $A000 and $A001.