I hacked the nes version of Tetris, to uae SRAM for its score saving and loading. I also have some player 2 registers that reside within the SRAM.
I modified the rom to use MMC3_118.
Now my rom works on an actual RetroPak (needs already created .sav for SRAM, it works on Nintendulator, and the latest build of FCEUX.
Someone contacted me, saying they tried to install my work on a tksrom board, and he told me the scores and names are all screwed up, and player 2 has no tile flip functionality, and he said Nestopia gave him the same result.
The code I have for my sram is A980 8D01A0.
So I looked at my reset vector and I placed the code there, before I do any kind of modification to the sram. I boot the rom, and I get the same error. It seems like all of $6000-$7FFF is filled with 60's, cause thats the tile id that shows up where the names and scores should be.
I checked the nestopia log, and it does notice the A001, and loads the .sav.
I am so lost. Id appreciate any suggestions. Thank You.
-infidelity
I can't really help you debug your issue but I thought it might be useful to let you know that I have Sram issue with your hack on my Everdrive N8 also. All the slot for high score seem to be set to 0606060. I wasn't able to beat this score so I am not sure if it would overwrite those value or if it's really a bug in the sram check routine.
I looked at that ROM and also found the problem, I was going to make a version that added SRAM but still...you need to enable SRAM on MMC3 before you do anything, but I think you did that. Why do you need to run code from it, though? No free space in ROM and can't just change the interrupt vector to boot to it first? Any step by step process of what happens/doesn't work? As I'm kind of mixed up at what the exact problem is.
ETA: Also, if possible, just make it mapper 4. Nobody wants to take extra steps to make a repro when it could have been done completely fine on a standard MMC3 board.
ETA: The problem is you mess with SRAM before you enable it. Enable it before you even think of touching it and whatnot and your problem should be fixed. I'd try to hack it, but I hate messing with writing around code, haha.
ETA: Enabling MMC3 WRAM before I start the game didn't help...let me also fix the header as I remember that was a problem too. ETA: Nope. I'll keep messing with it until whatever...idk what to say. Also, it even better idea.
3gengames wrote:
ETA: Also, if possible, just make it mapper 4. Nobody wants to take extra steps to make a repro when it could have been done completely fine on a standard MMC3 board..
Even better: the original US release was MMC1(implying SIROM). Just enable the battery bit in the header and there's no reason to use MMC3 or TKSROM.
I used mmc3 so I could perform a bankswap routine, I was unable to do it within mmc1. Regardless of my player 2 functions being withn sram, sram isnt working within nestopia.
I added the wram code at the beginning of the reset vector, and it just didnt do anything.
So I dont know why this is happening.
What bank swap do you need to do? MMC3 is more limited than MMC1 in bank swapping ability.
The bankswap isnt the issue, my routine works fine, the game wouldnt boot in anything if I did that incorrectly.
I just dont understand why its happening within nestopia. Nintendulator is just as picky as nestopia, but nintendulator is doing fine with my hack.
Well something doesn't work...those variables are in SRAM? Then something is wrong with SRAM. You DON'T enable it in the beginning. I added that to a ROM and it still doesn't work, though. I'm not exactly sure what is happening honestly. Still, never said the bank swap is the issue. I'm just saying you can do it better to eliminate the need it to use an MMC3 board, because you use no features of the MMC3 which are not offered in the MMC1.
Don't both Tetris and Dr. Mario use 1-screen mirroring? Perhaps that's the specific MMC1 feature that requires the use of TxSROM.
to READ/write sram,you need Enable the sram first!
here is the sample code
Code:
LDA #$80
STA $A001
byemu wrote:
to READ/write sram,you need Enable the sram first!
here is the sample code
Code:
LDA #$80
STA $A001
I hacked a rom and put that exact code in it with the same results. Also fixed the header as it doesn't change the SRAM flag in the iNES header. Still broken.
I havent changed the header, but I added the sram code to the beginning of my reset vector earlier today, and it didnt work. Im baffled. Btw, whete in the header do you change the battery bit?
Add the code quoted to the current ROM. But just go edit with NESTopia.
infidelity wrote:
I havent changed the header, but I added the sram code to the beginning of my reset vector earlier today, and it didnt work. Im baffled. Btw, whete in the header do you change the battery bit?
could you share your rom,and ican help you debug it!
tepples wrote:
Don't both Tetris and Dr. Mario use 1-screen mirroring? Perhaps that's the specific MMC1 feature that requires the use of TxSROM.
This is a wild tangent, but you can extract an MMC3 build of Tetris out of the SMB+Tetris+NWC multicart.
PRG is 32 KiB starting at file offset 0x8010; CHR is 8KiB starting at file offset 0x5C010 then 8KiB starting at file offset 0x5A010. It needs some minor fixup—e.g. the high score starts as all FFs.
That's also a PAL build...
I got it working properly on Nestopia now. I dont have the internet, I do my online stuff via my smartphone. When I get the chance ill upload the new .ips, and ill put up a detailed list of what I did. It had alot to do with adding additional writes to $A001.
-infidelity
Request: Make it MMC1 again. Learn how the serial writes work and it shouldn't be much to change at all.
Here is my latest .ips.
Tetris Zero (MMC3-118-v2)http://acmlm.kafuka.org/uploader/get.php?id=4409This is taken from the .txt within the .zip file.
4-16-13
infidelity
Tetris Zero Fix For TKROM Board & Nestopia
It was brought to my attention that when inserting Tetris Zero on a TKROM board, that the score system was all messed up, the tile id's for the players names were screwed up, and the 2nd player has no A/B button functions during in-game play.
I knew right away that this specificly had to deal with SRAM. My custom score saving system is stored within SRAM, as well as some of player 2's in-game piece & controller functions.
During my searches and fixes, i was slowly getting various functions back up and running, but then i came across that if you obtain a high score, the name entry screen was bypassed, and you were unable to write your name.
I already had a write of 80 to $A001 within the HW bank, which enables SRAM. But for some bizzare reason, i've had to add that same code throughout the rom, before every write within the region of $6000-$7FFF.
So what i wil do, is just paste the things that i added/changed from my notes.
Force WRAM At End Of Bankswap Routine, Wipe Out WRAM At CHR Routine
$FE2D = EAEAEAEAEA
$FF27 = A980 8D01A0
OK! Scores Appear! But, still no proper 2nd player function during gameplay
Push Bits For Player 2
$D7A0 = A980 8D01A0 A900 8DFF7F 4CF2A3
$8209 = 20B3AD (originaly 20B8AD)
$ADC3 = A980 8D01A0
$D920 = A980 8D01A0 ADF27F 60 (all 00's originaly)
$DA50 = 2010D9 (originaly ADF27F)
$DA37 = 2010D9 (originaly ADF27F)
OK! 2nd Player Pieces Appears! Can enable/disable the next
piece icon! Can rotate falling piece! But, NEXT piece does not change,
falling piece doesn't change.
$AE5F = A980 8D01A0 202EAE 60
OK! 2nd Player Next Piece Changes! But, the actual piece does not come down. And
the flip doesn't reset itself when the next piece comes down.
$81F0 = 5BAE ;60AE original
$AE6B = A980 8D01A0
$81F2 = 18AE ;68AE original
$AE28 = A980 8D01A0 4C68AE
OK! 2nd Player Next Piece changes without flickering in the box! But, that actual
next piece does not come down.
$AE4D = 4CB1B 0000000
$B0C1 = A980 8D01A0 A5A6 8DF17F 60
$AE59 = 20E4B0 EAEAEA
$B0F4 = A980 8D01A0 ADF17F 8DF07F 60
OK! 2nd Player In-Game Is Working Properly At This Point! But, player 2 score doesnt
work....
$A29A = 206BB7 (original 2070B7)
$B77B = (4F4E original)
$AE78 = A980 8D01A0 A901 8DF37F 4CA299
$B488 = A980 8D01A0 4C30B6 (originaly 00's)
$A10A = 4C78B4 (original 4C30B6)
Going to do logs of writes to 6000-7FFF after you press start on the victory screen
that lets you insert your score
$BB60 $A061,$A068,$A06F,$A133,$A1FF,$A12B,$B6A5,$B6B1,$B6BD (changes to 2054BB's)
$BB70 $A1DB,$A1E2,$A1E9 (change to 206BBB's)
$BB80
$BB90 $A07C (change to 2080BB)
$BBA0 $A1FA (change to 2093BB)
$BBB0
$BBC0 $B6E9 (change to 4CBBBB)
$BC23 = 0D2060
$BC4A = A980 8D01A0 60
$BB64 = A980 8D01A0 A5BE C902 F004 B90060 60 B92060 60 000000000000000000
$BB90 = A980 8D01A0 A5BE C902 F004 B91860 60 B93860 60 000000000000000000000000
$BBA3 = A980 8D01A0 A5BE C902 F004 BD1860 60 BD3860 60 00000000000000000000
OK! Player 2 Can Enter Score! But, when player 1 wins, and player 2 has already entered they're name, they're name is glitched. So i need to check the reads to $6000-$7FFF
$B969 = 4CA8BB (originaly 4C58BA)
$BBB8 = A980 8D01A0 4C58BA
$BB35 = 2060BC EAEAEAEAEA
$BC70 = A980 8D01A0 A924 999E60 88 10F3 60 (originaly all 00's)
$A041 = A980 8D01A0 (originaly EA's)
$A17A = 4CD1B0 0000000000000000000000
$B0E1 = A980 8D01A0 A5BE C902 F004 B95060 60 B98060 60
$AA4B = 4CDBAF
$AFEB = A980 8D01A0
OK! Score names appear correctly, when writing new name for high score!
DONE! Game runs normaly in Nestopia!
Anyone know why enabling WRAM wouldn't keep it enabled? That sounds very iffy.
Tried this on a real cart tonight and the player 2 controls are working now. Player 2 pieces are also working but I think there may be a bug where p2 does not get the piece shown as next. I can't figure out what the condition is for that, or even if it's happening for sure. Might just be my short attention span. Anyway, the big issues from the first patch seem to be sorted out.
In the 2 player modes, is clearing multiple lines supposed to bump up the other player's field? I was expecting that would happen with this patch for some reason- maybe just confusing that behavior with a different version.
No I dont believe you're seeing things.
Ive tried very hard to create a separate NEXT piece for p2.
Originaly in the hidden 2p mode, both players go for one NEXT piece. Whichever players piece lands/completes first, obtains the NEXT piece.
It was difficult trying to keep my code from glitching. I thought I finally figured it out, but I guess not.
As for the random block appearances for the opposing player, I think I removed that back in my first initial release.