It is currently Thu Nov 14, 2019 7:25 pm

All times are UTC - 7 hours



Forum rules


1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.



Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Mar 07, 2019 9:01 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11432
Location: Rio de Janeiro - Brazil
koitsu wrote:
Cute -- vertical. This could be from an internal database that's forcing the mirroring though... so which mirroring is true?

Do notice that the information you posted before says "Solder Pad", not "Mirroring". The solder pad labels on Nintendo's PCBs refer to name table arrangement, which is the opposite of the mirroring nomenclature used by emulators. So what you're seeing here is actually consistent: the solder pad marked "H" results in the name tables being arranged side by side, and mirrored vertically. The solder pad marked "V" would stack the name tables vertically, mirrored horizontally. It's very confusing that whoever created the iNES header went with "mirroting" instead of the convention that was clearly used in the PCBs.

However, since the MMC1 has dynamically controlled mirroring, the H/V setting in the header does nothing. Unless some emulator is using that information when it shouldn't.

Quote:
1. This romhack actually uses vertical mirroring, best I can tell. If triple verification is needed, I can happily go look at the MMC1 writes for mirroring and determine from that. But vertical makes the most sense, IMO.

The emulator might be selecting vertical mirroring automatically (by default or from the header setting), which an actual MMC1 isn't guaranteed to do. Only debugging will tell if the mirroring is being properly configured.


Top
 Profile  
 
PostPosted: Thu Mar 07, 2019 9:03 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 4213
Location: A world gone mad
I was curious about the 6502 code aspect of it, so I used Mesen. At boot, it does tweaks MMC1's registers like so:

Code:
LF322:
  lda #$80     ; Reset MMC1, lock PRG-ROM last bank to $C000-FFFF
  sta $8000
  lda #$1E     ; $1E = %00011110
  sta $8000    ; Write 0 to MMC1 control reg - low bit of mirror
  lsr A
  sta $8000    ; Write 1 to MMC1 control reg - high bit of mirror
  lsr A
  sta $8000    ; Write 1 to MMC1 control reg - low bit of PRG-ROM bank mode
  lsr A
  sta $8000    ; Write 1 to MMC1 control reg - high bit of PRG-ROM bank mode
  lsr A
  sta $8000    ; Write 1 to MMC1 control reg - CHR-ROM bank mode
  rts
;
; Mirroring: %10 (2): vertical
; PRG-ROM bank mode: %11 (3): fix last bank at $C000 and switch 16 KB bank at $8000
; CHR-ROM bank mode: %1 (1): switch two separate 4 KB banks
;
; References:
; https://wiki.nesdev.com/w/index.php/MMC1
; https://wiki.nesdev.com/w/index.php/Programming_MMC1
;

Maybe it changes things later on (as stated, you can change mirroring dynamically with MMC1), but yeah, vertical.


Top
 Profile  
 
PostPosted: Thu Mar 07, 2019 9:09 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 4213
Location: A world gone mad
tokumaru wrote:
Do notice that the information you posted before says "Solder Pad", not "Mirroring". The solder pad labels on Nintendo's PCBs refer to name table arrangement, which is the opposite of the mirroring nomenclature used by emulators. So what you're seeing here is actually consistent: the solder pad marked "H" results in the name tables being arranged side by side, and mirrored vertically. The solder pad marked "V" would stack the name tables vertically, mirrored horizontally. It's very confusing that whoever created the iNES header went with "mirroting" instead of the convention that was clearly used in the PCBs.

I've always remembered it as: "vertical mirroring is more intended for horizontally-scrolling games, horizontal mirroring is more intended for vertically-scrolling games". I assumed that the H and V on the solder pads correlated with that. Gah. This explains a couple decades of confusion that I'd run into on occasion. Yup, too bad Marat didn't just call the NES header bit "screen layout" or "nametable organisation" to correlate it with the silkscreening. Ah well, at least from an actual address range perspective it makes sense.

Thanks!


Top
 Profile  
 
PostPosted: Thu Mar 07, 2019 10:39 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 977
Location: -29.794229 -55.795374
Hey!
I had a similar problem when I did my translated Legend of Zelda repro.
I think the pictures in this post shows nicelly what I did.
I'm not sure if I had cut any track of the PCB, and I can't be sure by looking at the picture, but I can happilly check it tomorrow, when it's day here.
Of course, if the OP still cares.


Top
 Profile  
 
PostPosted: Wed Mar 27, 2019 6:01 am 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21688
Location: NE Indiana, USA (NTSC)
koitsu wrote:
I've always remembered it as: "vertical mirroring is more intended for horizontally-scrolling games, horizontal mirroring is more intended for vertically-scrolling games". I assumed that the H and V on the solder pads correlated with that. Gah. This explains a couple decades of confusion that I'd run into on occasion. Yup, too bad Marat didn't just call the NES header bit "screen layout" or "nametable organisation" to correlate it with the silkscreening.

I've been explaining what I call the "nametable arrangement" nomenclature in previous posts dating back to roughly January 2009. The oldest extant revision of the "Mirroring" page on NESdev Wiki also contains "arrangement". (I can't tell when or by whom that was added because edit history prior to June 2009 was lost.)

I guess the "reverse" engineers lived up to their name by reversing the terms.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group