| |||
Views: 88,480,189 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-25-24 04:26 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 2 guests | 2 bots |
Main - ROM Hacking - CHR-ROM MMC4 PPU Question | New thread | New reply |
infidelity |
| ||
Fuzz Ball Level: 66 Posts: 195/968 EXP: 2367810 Next: 94041 Since: 05-24-07 Last post: 957 days Last view: 813 days |
I've converted an MMC1 rom to MMC4, and got it to boot and play. In this rom, the GFX are loaded from the right side of the PPU, and the sprites are loaded from left side of the PPU.
I examined various MMC4 roms with the PPU open, and see that GFX are loaded from the left of the PPU, and sprites are loaded from the right of the PPU. I was able to make what was a CHR-RAM rom, to a CHR-ROM rom. I'm able to swap chunks of gfx in and out of the PPU at will. Now, for my particular rom, I'm unable to load... 00-3F, 40-7F, 80-BF, C0-FF on the left of the PPU, and... 00-7F, 80-FF on the right of the PPU. Whenever I try to set the $8000 bits for that, the PPU will actualy show it, but instantly crash the rom? This is what my PPU looks like, before doing any modifications to $8000, and what various MMC4 CHR-ROM PPU setups look like This is the code I have running. *it's a tweaked version of what is at the end of SMB2's rom. 0A 48 A906 8D0080 68 8D0180 0901 48 A907 8D0080 68 8D0180 60 Originaly, the A906 & A907, were 86 and 87, but that gave me tearing/glitches through the game. And when I set them to 07/06, it didnt cause tearing. But, when I try making them either C6/C7, thats when the game crashes. From Disch's Notes on MMC4 "$8000: [CP.. .AAA] C = CHR mode select (see CHR setup) P = PRG mode select (see PRG setup) A = Address for use with $8001" So i'm at my skills end of figuring this one out. Is there anything wrong with my pasted asm, and if so, what should I do to change how the PPU sets itself up for my likeing? Thank You for reading. :-) |
Hamtaro126 |
| ||
Cheep-cheep Level: 33 Posts: 151/194 EXP: 212816 Next: 16363 Since: 05-02-07 From: Shelton, WA Last post: 2471 days Last view: 2314 days |
First of all, You're using MMC3, Which is what SMB2 and 3 uses, MMC4 is totally different. (Mapper 4 = MMC3, Mapper 10 = MMC4)
And Second, You are supposed to make sure to switch CHR ROM banks in place of CHR-RAM stuff. It is actually hard, But you can disassemble the game to see if you can find the needs for the hack. Example CHR Switching routine: LDA #$08 ;CHR Reg 0 - Bank 8 STA $8000 LDA #$80 STA $8001 LDA #$09 ;CHR Reg 1 - Bank 9 STA $8000 LDA #$81 STA $8001 ____________________ Mah boi, romhacking is what all true warriors strive for! I wonder what's for dinner? |
infidelity |
| ||
Fuzz Ball Level: 66 Posts: 196/968 EXP: 2367810 Next: 94041 Since: 05-24-07 Last post: 957 days Last view: 813 days |
Yes mapper 4 my bad. The original chr-ram routines are obsolete due to the mapper change. All of the gfx are arranged and appear correctly now. The game works, displays fine. I just want to change where the mapper loads the 4 8kb/2 16kb chunks in the ppu. |
Hamtaro126 |
| ||
Cheep-cheep Level: 33 Posts: 152/194 EXP: 212816 Next: 16363 Since: 05-02-07 From: Shelton, WA Last post: 2471 days Last view: 2314 days |
Posted by iLove6502 You should still do $8x in $8001 (x meaning bank select), as 2k banks must be in the left (PPU $0000-0FFF) and 4k banks go on the right (PPU $1000-1FFF). It also is correct in that you need 16k Banks via $8000-$BFFF, But you need to enable SRAM by looking at $A001, Mirroring will also need to be modified to be at $A000. ____________________ Mah boi, romhacking is what all true warriors strive for! I wonder what's for dinner? |
infidelity |
| ||
Fuzz Ball Level: 66 Posts: 197/968 EXP: 2367810 Next: 94041 Since: 05-24-07 Last post: 957 days Last view: 813 days |
With you saying "must" about the 2 16k being on the left, and 4 8k on the right, sounds like my idea cant work, np then. And yes, ive modified my $A000 mirroring with custom asm, so now my hor/ver scrolls function correctly as they did in MMC1. |
never-obsolete |
| ||
Rat Level: 24 Posts: 78/96 EXP: 74488 Next: 3637 Since: 02-22-07 From: Phoenix, AZ Last post: 2595 days Last view: 2595 days |
Which side ($0000 or $1000) that has 2x2KB and 1x4KB can be set with bit7 of the bank select register ($8000). Which table sprites and backgrounds use can be changed with the ppu control register (assuming 8x8 sprites, otherwise bit0 of oam_t determines the table for sprites).
Now I'm confused as to your problem. Is the game crashing or is not displaying the correct graphics? If the latter, did you change the bank numbers that its supposed to be swapping in? edit: If it is a graphics problem, is it in the pattern table viewer or on screen? |
infidelity |
| ||
Fuzz Ball Level: 66 Posts: 198/968 EXP: 2367810 Next: 94041 Since: 05-24-07 Last post: 957 days Last view: 813 days |
All the gfx for BG/Sprites work. They all appear correctly. Ive been trying to make it so 1x4kb is on the left ($0000) and 2x2kb is on the right ($1000), but when trying to do that, the rom crashes, as explained in my 1st post. :-) |
Main - ROM Hacking - CHR-ROM MMC4 PPU Question | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 67, rows: 94/94, time: 0.016 seconds. |