First, I know that MMC5 on real hardware is a pain but one of my friends has been doing some, should I say "Experiments", on Laser Invasion carts, so I decided I could do a game that uses MMC5 and have him do a (limited) repro run
Anyway... I managed to initiate the MMC5 mapper, and I have a full CHR screen ready (As in a CHR file big enough to fill the whole screen), BUT I don't seem to get how the ExRam works.
From what I can understand, the MMC5 graphics can be done in the $5C00-$5FFF range with XXYYYYYY (X for attribute of the tile and Y for 4KB CHR bank) writes to it, but I don't seem to know when I can do those writes, and I don't really seem to understand the ExRam "Modes" the MMC5 has (AFAIK, it has possibilities for normal RAM and extended nametables/attributes)
Needless to say, I'm a noob at MMC5 game programming, and I would need some help on how to use this ExRAM to use the special graphics done by the MMC5.
EDIT: SRC here - http://pastebin.com/ZE03i80C
What am I doing wrong? (Sorry for the unused variables, I tend to recycle SRCs from existing projects)
Basically, the PPU Viewer shows my screen perfectly fine, but FCEUX and NEStopia show only one 4KB CHR bank per "region" of the screen, and it's a different one on both emulators (my .chr file is 16KB wide)
EDIT #2 -
Right after I turn on the screen with JSR PPUCleanup, I put the routine in my source code to wait for render more, and it now works perfectly on NEStopia and PuNes.
However, FCEUX seems to think the MMC5 is not in ExRAM graphics mode, and only shows the bottommost part of the CHR
Anyway... I managed to initiate the MMC5 mapper, and I have a full CHR screen ready (As in a CHR file big enough to fill the whole screen), BUT I don't seem to get how the ExRam works.
From what I can understand, the MMC5 graphics can be done in the $5C00-$5FFF range with XXYYYYYY (X for attribute of the tile and Y for 4KB CHR bank) writes to it, but I don't seem to know when I can do those writes, and I don't really seem to understand the ExRam "Modes" the MMC5 has (AFAIK, it has possibilities for normal RAM and extended nametables/attributes)
Needless to say, I'm a noob at MMC5 game programming, and I would need some help on how to use this ExRAM to use the special graphics done by the MMC5.
EDIT: SRC here - http://pastebin.com/ZE03i80C
What am I doing wrong? (Sorry for the unused variables, I tend to recycle SRCs from existing projects)
Basically, the PPU Viewer shows my screen perfectly fine, but FCEUX and NEStopia show only one 4KB CHR bank per "region" of the screen, and it's a different one on both emulators (my .chr file is 16KB wide)
EDIT #2 -
Code:
LDX #$00
.waitrender
INX
BNE .waitrender
INY
CPY #$26
BNE .waitrender
LDX #$00
.titlerender
LDA #%00000000
STA $5C00,x
LDA #%00000001
STA $5D00,x
LDA #%00000010
STA $5E00,x
LDA #%00000011
STA $5F00,x
INX
CPX #$00
BNE .titlerender
.waitrender
INX
BNE .waitrender
INY
CPY #$26
BNE .waitrender
LDX #$00
.titlerender
LDA #%00000000
STA $5C00,x
LDA #%00000001
STA $5D00,x
LDA #%00000010
STA $5E00,x
LDA #%00000011
STA $5F00,x
INX
CPX #$00
BNE .titlerender
Right after I turn on the screen with JSR PPUCleanup, I put the routine in my source code to wait for render more, and it now works perfectly on NEStopia and PuNes.
However, FCEUX seems to think the MMC5 is not in ExRAM graphics mode, and only shows the bottommost part of the CHR