Mapper 012 on a real hardware

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Cyneprepou4uk
Posts: 5
Joined: Fri Jun 21, 2019 12:20 am
Location: Belarus

Mapper 012 on a real hardware

Post by Cyneprepou4uk » Wed Sep 25, 2019 6:48 am

If I do this stuff in fceux,

Code: Select all

 00:8100: A9 00     LDA #$00
 00:8102: 8D 00 41  STA $4100 = #$FF
 00:8105: A9 00     LDA #$00
 00:8107: 8D 00 80  STA $8000 = #$2B
 00:810A: A9 40     LDA #$40
 00:810C: 8D 01 80  STA $8001 = #$2B   ; select bank #40
 00:810F: A9 01     LDA #$01
 00:8111: 8D 00 41  STA $4100 = #$FF
 00:8114: A9 01     LDA #$01
 00:8116: 8D 00 80  STA $8000 = #$2B
 00:8119: A9 80     LDA #$80
 00:811B: 8D 01 80  STA $8001 = #$2B   ; select bank #180
 00:811E: 60        RTS -----------------------------------------
I get chr banks #40 and #180 at the same time. I want to know if it is a bug, coz perhaps writing #01 in $4100 should force my current bank #40 to switch to #140. Or does fceux emulate it like it should be?

https://wiki.nesdev.com/w/index.php/INES_Mapper_012

lidnariq
Posts: 8768
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Mapper 012 on a real hardware

Post by lidnariq » Wed Sep 25, 2019 9:38 am

FCEUX is probably wrong. It's got a "multiple versions of the truth" problem, and it only synchronizes each individual CHR banking register when the game writes to that specific one. (M12Write should probably call FixMMC3CHR(MMC3_cmd))

Achieving the specific results that FCEUX emulates in hardware is more complex than just without the extra indirection.

Post Reply