NESRevPlus
Moderator: Moderators
Tried new version on my NROM-128 game. It seperated a lot of the data and stuff well, but it just missed some arrays badly and combined 2 seperate arrays that were used in the same subroutine or someting but used in completely different rays. One of them was at the very beginning of my data file, and it combined these arrays:
and the call for those two beginning arrays is this, away from other data completely:
DecompressToPPU:
LDA RLEPointersLow,X
STA <DecompressDataPointer
LDA RLEPointersHigh,X
STA <DecompressDataPointer+1
And in the data for the disassembly, it produces:
So it combines the one array with the files it points to for some reason, which I think may be a mistake because the array access shouldn't affect it. I think a key to making this work well would be having a cal register value range from an emulator being included to help separate those arrays while playing the game. But honestly, it works damn well, I think it's a great tool to reverse engineer games and I'm sure the person that will be studying the games code when released will be able to figure it out so it may hurt, but I don't believe it will cripple it at all. Good luck improving it! 
Code: Select all
RLEPointersHigh:
.db HIGH(MainNametable)
.db HIGH(TitleNametable)
.db HIGH(OpeningNametable)
RLEPointersLow:
.db LOW(MainNametable)
.db LOW(TitleNametable)
.db LOW(OpeningNametable)
MainNametable: .incbin "Screens/RLECompressedMainScreen.bin"
TitleNametable: .incbin "Screens/RLECompressedTitleScreen.bin"
OpeningNametable: .incbin "Screens/RLECompressedOpeningScreen.bin"
DecompressToPPU:
LDA RLEPointersLow,X
STA <DecompressDataPointer
LDA RLEPointersHigh,X
STA <DecompressDataPointer+1
And in the data for the disassembly, it produces:
Code: Select all
LC000:
.DB $C0,$C2,$C4
LC003:
;1606 bytes
.DB $06,$BE,$C2,$01,$01,$25,$02,$09,$01,$14,$05,$08,$01,$0A,$02
(All other .db statements here.)
Last edited by 3gengames on Wed Jun 06, 2012 11:30 am, edited 2 times in total.
I have pretty much the exact same impression.
This:
ended up as:
I'm puzzled by the how the header labels ended up being divided. Absolutely everything past that is read through at least one layer of indirect indexed, so I didn't expect it to be picked up and separated.
Relevant code to the header labels.
In another location:
After each I read indirectly, but some of them set y in various ways before the read. I could imagine if the whole thing was one giant block, or if it was each header's two bytes, then a solid block, or if it was single a label per each byte of the header. How it is now with the first two headers together, then one more, then the last in the block totally puzzles me.
I haven't really dived in to see how close it got with the rest of my data in this game, but I'm pretty impressed.
I never posted, but I tried the old version with a smaller game (since then it didn't support this one's size) and read through a lot more than this one and it did extremely well with what I checked.
Last note: I get an unhandled exception every time I minimize the program with a disassembly open. It minimizes fine before it opens a rom, though.
This:
Code: Select all
.org $C000
met16header:
.dw met16sets_bank00
met32header:
.dw met32sets_bank00
metscreenheader:
.dw metscreensets_bank00
metlevelheader:
.dw metlevelsets_bank00
Code: Select all
LC000:
DC.B $08,$C0,$12,$C0
LC004:
DC.B $1A,$C0
LC006:
;3102 bytes
DC.B $1E,$C0,$22,$C0,$50,$C0,$7E,$C0,$AC,$C0,$DA,$C0,$08,$C1,$45
DC.B $C1,$82,$C1,$BF,$C1,$FC,$C1,$4C,$C2,$75,$CB,$79,$CB,$00,$FE
DC.B $80,$84,$87,$FE,$84,$FE,$FE,$87,$00,$89,$8A,$FE,$8D,$00,$FE
(Removed for brevity)
Relevant code to the header labels.
Code: Select all
;"reserved" variables are zero page temp RAM.
lda met16header
sta reservedE
lda met16header+1
sta reservedF
Code: Select all
lda met16header
sta reserved0
lda met16header+1
sta reserved1
Code: Select all
lda met32header
sta reservedE
lda met32header+1
sta reservedF
Code: Select all
lda metscreenheader
sta reserved0
lda metscreenheader+1
sta reserved1
Code: Select all
lda metlevelheader
sta reserved0
lda metlevelheader+1
sta reserved1
I haven't really dived in to see how close it got with the rest of my data in this game, but I'm pretty impressed.
I never posted, but I tried the old version with a smaller game (since then it didn't support this one's size) and read through a lot more than this one and it did extremely well with what I checked.
Last note: I get an unhandled exception every time I minimize the program with a disassembly open. It minimizes fine before it opens a rom, though.
Re: NESRevPlus
I'm thinking about a new feature for NESRevPlus.. Some sort of graphical view that separates all subroutines and visually displays how they relate to eachother. Similar to a database-diagram.
However, the problem I'm having is how to do this visually. Anyone has any ideas how to solve this?
However, the problem I'm having is how to do this visually. Anyone has any ideas how to solve this?
Re: NESRevPlus
Do you want me to dig out the Python code that I used to make the call graph of Thwaite?