mapper 19?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

mapper 19?

Post by Zepper »

http://wiki.nesdev.com/w/index.php/INES_Mapper_019

1. Writes to $C000-$C7FF affects $2000-$23FF, and "Values ≥ $E0 denote NES NTRAM if" is set to "always".
What happens if a value < $E0 is written there?
Is possible to map CHR ROM/RAM in the nametables' space? HOW???

2. What means "Pages $E0-$FF are the last $20 banks of CHR-ROM"? I see Nintendulator uses value ANDed with $1F, but shouldn't be "the last banks"???

I'm not understanding this stuff.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: mapper 19?

Post by lidnariq »

Zepper wrote: Tue May 18, 2021 3:26 pm 1. Writes to $C000-$C7FF affects $2000-$23FF, and "Values ≥ $E0 denote NES NTRAM if" is set to "always".
What happens if a value < $E0 is written there?
Is possible to map CHR ROM/RAM in the nametables' space? HOW???
That is exactly what it means. The 163 enables the CHR ROM instead of enabling the NES's NTRAM when the PPU is fetching from a nametable.
2. What means "Pages $E0-$FF are the last $20 banks of CHR-ROM"? I see Nintendulator uses value ANDed with $1F, but shouldn't be "the last banks"???
The last $20 banks. The last 0x20 banks. The last 32 banks. Whatever you want.

Pertinently, it's any of the last 32 banks, not just (say) the last 2, which someone might naively assume, since there's only 2 banks of NTRAM.
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: mapper 19?

Post by Quietust »

Zepper wrote: Tue May 18, 2021 3:26 pm 2. What means "Pages $E0-$FF are the last $20 banks of CHR-ROM"? I see Nintendulator uses value ANDed with $1F, but shouldn't be "the last banks"???
That part of the code is actually a bit convoluted - what it's doing is checking if it's mapping bank $00-$DF or if the corresponding bit of $E800 is set, and if that's the case then it maps CHR ROM, and otherwise (i.e. if it's bank $E0-$FF and the corresponding $E800 bit is clear) it tries to map RAM there.

Interestingly, the & 0x1F there appears to be part of a bug - it's mapping a CHR RAM bank (out of a maximum of 32KB) rather than a nametable bank (out of a maximum of 2KB) as it's apparently supposed to, so that line should read else EMU->SetCHR_NT1(i, CHR[ i ] & 1);.
Last edited by Quietust on Tue May 18, 2021 6:15 pm, edited 2 times in total.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: mapper 19?

Post by Zepper »

I though about "the last32 banks" out of a total of 64, for example... and how they would be selectable.
Sorry for the language barrier.
Thanks for the help.
puppydrum64
Posts: 160
Joined: Sat Apr 24, 2021 7:25 am

Re: mapper 19?

Post by puppydrum64 »

Honestly I don't think it's the language barrier, I found the wiki entries on the VRC6 mappers very confusing as well.
User avatar
aquasnake
Posts: 515
Joined: Fri Sep 13, 2019 11:22 pm

Re: mapper 19?

Post by aquasnake »

does any game ever use this mode?

if not, there's no need to emulate.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: mapper 19?

Post by lidnariq »

Nametables in CHR ROM? Yes. Several. At the very least Battle Fleet.

Nametable RAM as CHR RAM? We haven't yet documented any, but I wouldn't count on its absence. There's certainly several games that have suspicious neither-pattern-nor-padding-nor-nametable data occupying a whole aligned KB in the uppermost 32KB of their CHR ROM.
User avatar
aquasnake
Posts: 515
Joined: Fri Sep 13, 2019 11:22 pm

Re: mapper 19?

Post by aquasnake »

mapper 209, 211, 68 they use chr rom as nametable.

but mapper 19 is not exactly like the above, it will use internal(ciram) as chr ram by this mode, this is really rare, i dont know which game does use this feature
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: mapper 19?

Post by NewRisingSun »

Notable examples of mapper 19 games using ROM nametables are "Final Lap", for the race track, and "Mappy Kids", for the world map.
Post Reply