Chuugoku Taitei (Sachen).nes is bad dump? emu bug?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#132054)
File: Chuugoku Taitei (Sachen).nes
Directory:
Soft-patched: No
CRC: 037006F7
SHA-1: C0BABB7AA3D15F3FC66E017CD923C34EEDA22C33
System: NES-NTSC
Board: mapper 4?? mm3?
PRG-ROM: 256k
CHR-ROM: 128k

Attachment:
Chuugoku Taitei (Sachen)_001.png
Chuugoku Taitei (Sachen)_001.png [ 8.25 KiB | Viewed 5523 times ]
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#132072)
In GoodNES, the board is marked as Mapper 116 (Huang-1), but in emulation, the game seems to rely on
1- having RAM, unlike what http://wiki.nesdev.com/w/index.php/INES_Mapper_116 says, and
2- the register at $4100 mapping 0 to MMC3-like behavior, and
3- switching between mapper modes during runtime.

I think it's more likely bad emulation, due to insufficient documentation.
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#132085)
Agreed with lidnariq -- this looks more like incorrect emulation of a mapper. especially since the CHR data shown that's garbled happens at a specific scanline.

Reverse-engineering of the ROM, and/or having the actual cart/board, would be needed here.
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#132099)
Thank you lidnariq and koitsu!
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196160)
Results from debugging:
  • Extended register at $4100
  • Battery-backed WRAM at $6000
  • MMC3 at $8000-$FFFF
  • At least 4K of CHR-RAM in addition to CHR-ROM, used for Chinese text
  • Four pages of additional nametable RAM, used for the playboard but not the status bar

Extended register bits:
Code:
.... ..CN
C: CHR data source for PPU $0000-$0FFF
    0: CHR-ROM from MMC3
    1: CHR-RAM
N: Nametable data source
    0: Console CIRAM, two pages, MMC3 mirroring
    1: Cartridge RAM, four pages
When C=1, N seems to be ignored, i.e. register values 2 and 3 seem to behave identically.

I suppose no mapper number has been assigned for this yet.
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196161)
NewRisingSun wrote:
Results from debugging:
  • Extended register at $4100
  • Battery-backed WRAM at $6000
  • MMC3 at $8000-$FFFF
  • At least 4K of CHR-RAM in addition to CHR-ROM, used for Chinese text
  • Four pages of additional nametable RAM, used for the playboard but not the status bar

Extended register bits:
Code:
.... ..CN
C: CHR data source for PPU $0000-$0FFF
    0: CHR-ROM from MMC3
    1: CHR-RAM
N: Nametable data source
    0: Console CIRAM, two pages, MMC3 mirroring
    1: Cartridge RAM, four pages
When C=1, N seems to be ignored, i.e. register values 2 and 3 seem to behave identically.

I suppose no mapper number has been assigned for this yet.



this mapper irq It may not seem like standard MMC3

Your proposal and I code as before

status bar is bug!
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196163)
The status bar will become corrupt as the playboard scrolls if you don't keep the console CIRAM and the four additional nametable pages separate. Attached is my WIP Nintendulator source, which does not show a corrupt status bar. (I temporarily reused mapper number 243.)
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196168)
NewRisingSun wrote:
The status bar will become corrupt as the playboard scrolls if you don't keep the console CIRAM and the four additional nametable pages separate. Attached is my WIP Nintendulator source, which does not show a corrupt status bar. (I temporarily reused mapper number 243.)

Remark: you aren't saving ExNameTable, which will cause Problems once you start using savestates. A much better option is to simply use SetCHR_RAM - version 0.975 provides 256KB, and even 0.970 provides 32KB.
Also, modes 2 and 3 leave PPU $1000-$1FFF uninitialized, which probably isn't what you want.
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196171)
Like this? I'm not that familiar with the save/load interface. From where does it know how much CHR RAM to save, in particular in the absence of a NES 2.0 header?
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196174)
NewRisingSun wrote:
Like this? I'm not that familiar with the save/load interface. From where does it know how much CHR RAM to save, in particular in the absence of a NES 2.0 header?


thank you! case 1 exnmt.working in nestopia.

CHRRAM save,but ines 2.0 emu not woking save.

Attachment:
Chuugoku Taitei (Sachen)_001.png
Chuugoku Taitei (Sachen)_001.png [ 11.58 KiB | Viewed 4489 times ]
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196195)
NewRisingSun wrote:
Like this? I'm not that familiar with the save/load interface. From where does it know how much CHR RAM to save, in particular in the absence of a NES 2.0 header?

Savestates will automatically detect how much RAM to include - they stop once they encounter uninitialized data.

The logic you currently have is mapping the first 4KB of CHR RAM to both $0000-$0FFF and $1000-$1FFF for modes 2 and 3, and the second 4KB to the nametables in mode 1. It wasn't fully clear from the prior description if that's how it's supposed to work.
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196197)
Quietust wrote:
Savestates will automatically detect how much RAM to include - they stop once they encounter uninitialized data.
Okay. So does the CHR RAM field of the NES 2.0 header get used outside the mapper DLL?
Quietust wrote:
The logic you currently have is mapping the first 4KB of CHR RAM to both $0000-$0FFF and $1000-$1FFF for modes 2 and 3, and the second 4KB to the nametables in mode 1. It wasn't fully clear from the prior description if that's how it's supposed to work.
Remember that this is all based on debugging the game and tweaking the mapper emulation code until no more glitches are observable. I don't have the cartridge itself, so I cannot say how the cartridge hardware works internally. As a result, because it seems to make no difference for the game what PPU $1000-$1FFF maps to in modes 2 and 3, my description was necessarily lacking on this aspect.
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196200)
NewRisingSun wrote:
So does the CHR RAM field of the NES 2.0 header get used outside the mapper DLL?

Yes - it restricts the number of CHR RAM banks you can map (for NES 1.0 headers, the limit is set to 32KB).
Re: Chuugoku Taitei (Sachen).nes is bad dump? emu bug?
by on (#196358)
This looks A LOT like a heavy extension of the Street Heroes board. It even has the same extended register.