This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Can you force vertical mirroring in mmc3_118?

Can you force vertical mirroring in mmc3_118?
by on (#115882)
Ive converted Fester's Quest from MMC1 to MMC3_118.

The gameplay requires 1 screen mirroring, so thats whyi had to switch to 118, cause mmc3 lacks that mirroring type.

The problem im having, is that im unable to force vertical mirroring within 118, which the pre-title screen requires to be drawn properly. ( fester on the lounge chair when the ufo captures people)

Ive tried messing with $8000-$8001, but I see no changes. Any advice?

I read disch's notes and read the nesdev wiki on 118, but I couldnt figure it out.

Like for a test, I loaded 80 into $8000, then tried loading 3C into $8001, and I would stick that code somewhere where it would be constantly read, but again, with the nametable open, I saw no changes, the 1 screen mirroring just keeps going. :-(
Re: Can you force vertical mirroring in mmc3_118?
by on (#115883)
To get vertical mirroring on mapper 118 (TxSROM), it will require the most significant bit of $8000 to ALWAYS be set and four writes to $8001.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115888)
I have "A980 8D0080 A93C 8D0180 8D0180 8D0180 8D0180 60" but I see no change, I also tried 00-FF for 8D0180 and still no change.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115889)
For help, do NOT post hex crap. Post what would be the disassembly of it in text. Hex values, despite knowing most, don't help much as it's a pain for anyone to wade through it. But not too sure....my question is why use these mappers? Why not hack it to straight MMC3 or something?
Re: Can you force vertical mirroring in mmc3_118?
by on (#115890)
Hacking a game that relies on single-screen mirroring to standard MMC3 would require a complete rewrite of the scrolling engine.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115891)
Ah, gotcha. Does the cart have access to the 2 address lines for CIRAM or not? But still, sounds like if you're doing everything by the book, check other writes in the engine and other mods.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115892)
I have a 20 byte chr pointer table. Values range from 00,04,08,0C,10,etc, up to 7C.

I increased the values through the table by 80. The ppu shows the correct gfx, but the nametable switches to Single Screen (Table 1) not to Vertical mirroring.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115893)
When I said "you'll need four writes to $8001" I meant something like
Code:
ldx #$82
stx $8000
lda #$af
sta $8001
ldx #$83
stx $8000
lda #$ae
sta $8001
ldx #$84
stx $8000
lda #$bf
sta $8001
ldx #$85
stx $8000
lda #$be
sta $8001
; there's no internal postincrement.

Anyway, romhacking something to specifically target TxSROM seems debatably unuseful. If you're reusing existing boards, surely MMC1s are as easy to find? And if you're not, there are less goofy mappers. And multicarts of TxSROM games can only be stuffed together with other TxSROM games.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115896)
This is my custom chr engine asm i wrote up, which is to preserve the original mmc1
chr values loaded by Fester's Quest, and then converted to the proper mmc3 chr values.

I've done this was about 5 mmc1 roms with no issues, it's just that this rom is set up
specificly for vertical mirroring for the pre-title screen, and 1 screen mirroring
for the rest of the game. A brief explanation of some registers/addresses.

$D8 = contains the the Y value to read the $A000-$BFFF mmc1 chr page from B990BF
B99AC9 = represents the value to be loaded by $D8's Y, for the chr page for $A000-$BFFF
B990BF = represents the value to be loaded by $D8's Y, for the chr page for $C000-$DFFF

I changed my A900,A901,A902,A903,A904,A905's to A280,A281,A282,A283,A284,A285's

Here is my asm...
Code:
$BF00:A4 D8     LDY $00D8 = #$05
$BF02:B9 9A C9  LDA $C99A,Y @ $C99F = #$07
$BF05:48        PHA
$BF06:A2 80     LDX #$80
$BF08:8E 00 80  STX $8000 = #$38
$BF0B:68        PLA
$BF0C:A8        TAY
$BF0D:B9 90 BF  LDA $BF90,Y @ $BF97 = #$9C
$BF10:8D 01 80  STA $8001 = #$39
$BF13:A2 81     LDX #$81
$BF15:8E 00 80  STX $8000 = #$38
$BF18:B9 90 BF  LDA $BF90,Y @ $BF97 = #$9C
$BF1B:38        SEC
$BF1C:69 01     ADC #$01
$BF1E:8D 01 80  STA $8001 = #$39
$BF21:A4 D8     LDY $00D8 = #$05
$BF23:B9 AC C9  LDA $C9AC,Y @ $C9B1 = #$06
$BF26:48        PHA
$BF27:A2 82     LDX #$82
$BF29:8E 00 80  STX $8000 = #$38
$BF2C:68        PLA
$BF2D:A8        TAY
$BF2E:B9 90 BF  LDA $BF90,Y @ $BF96 = #$98
$BF31:8D 01 80  STA $8001 = #$39
$BF34:A2 83     LDX #$83
$BF36:8E 00 80  STX $8000 = #$38
$BF39:B9 90 BF  LDA $BF90,Y @ $BF96 = #$98
$BF3C:38        SEC
$BF3D:69 00     ADC #$00
$BF3F:8D 01 80  STA $8001 = #$39
$BF42:A2 84     LDX #$84
$BF44:8E 00 80  STX $8000 = #$38
$BF47:B9 90 BF  LDA $BF90,Y @ $BF96 = #$98
$BF4A:38        SEC
$BF4B:69 01     ADC #$01
$BF4D:8D 01 80  STA $8001 = #$39
$BF50:A2 85     LDX #$85
$BF52:8E 00 80  STX $8000 = #$38
$BF55:B9 90 BF  LDA $BF90,Y @ $BF96 = #$98
$BF58:38        SEC
$BF59:69 02     ADC #$02
$BF5B:8D 01 80  STA $8001 = #$39

END

With the +80 changes to $8000 & $8001, i only get Single Screen (Table 1), not
Vertical mirroring which is what i need.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115898)
Why make it MMC3? Whats so bad about keeping it MMC1? What do you need to do? But eh, thats too long for me to mess with...just use the fceux debugger and plunk through it...keep the mapper docs close by. ;) :)
Re: Can you force vertical mirroring in mmc3_118?
by on (#115900)
Yes I use fceux debugger, emu version 2.2.1

im not getting into a debate on why im converting roms to mmc3, its a new personal challange is all it is.

Im moving on, not bothering with it anymore.

Edit - Actualy I took the cheap way out. I bypassed the ufo sequence, and I have the rom jump straight to the title screen. Game runs fine on mapper 118.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115910)
infidelity wrote:
it's just that this rom is set up
specificly for vertical mirroring for the pre-title screen, and 1 screen mirroring
for the rest of the game. A brief explanation of some registers/addresses.


Neither the standard MMC3 nor the 118 variant can do both vertical and single screen mirroring. Sounds like you're trying to hack something that can only be done in hardware or a complete re-write of the scrolling engine.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115912)
Thank you for the info.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115915)
Of course you can do vertical mirroring with 118. You just have to set bit 7 of $8000 to invert MMC3 A12, clear bit 7 of registers 2 and 4, and set bit 7 of registers 3 and 5.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115919)
Ill try again then, thank you!

Edit. Just to clairify in the clearing of registers 2 & 4, and the setting of registers 3 & 5, thats for $8001 correct?

Edit 2 - Works! Got the rom cycling through the different mirrorings! Thank you for the explaination! :-)
Re: Can you force vertical mirroring in mmc3_118?
by on (#115921)
tepples wrote:
Of course you can do vertical mirroring with 118. You just have to set bit 7 of $8000 to invert MMC3 A12, clear bit 7 of registers 2 and 4, and set bit 7 of registers 3 and 5.


Only if you can assume that the game never uses NT mirrors $2800-$3000. If that's indeed a safe assumption then yes you can have the effect of vertical mirroring, but technically it's not true vertical mirroring.

You can get true horizontal mirroring from #118, but you can't get true vertical mirroring due to reg 0 & 1's 2KB size.
Re: Can you force vertical mirroring in mmc3_118?
by on (#115923)
Uh, mapper 118, unlike its related mappers 95 and 207, can do vertical mirroring just fine.
(Reference: my table on the wiki)
Re: Can you force vertical mirroring in mmc3_118?
by on (#115931)
Ahhh, nvm my blabbering...

I had it in my head that CHR A12 was toggling within $2000-2FFF, which is obviously wrong...