11 March 2016 - Forum Rules
Started by redmagejoe, December 10, 2019, 03:09:14 AM
Quotea usable disassembler available that works with CDLs and is also mapper aware
Quote from: redmagejoe on January 22, 2020, 06:56:18 AMI am certainly using the Chaos Rush translation, which I have an unofficial v1.8 for
Quote from: Cyneprepou4uk on January 22, 2020, 07:38:49 AMIDA 5.2 can do it if you have scripts for it.
QuoteSo while you at it, can you record a video of how you make a disassembly from scratch?
LDA #$20STA $10LDA #$80STA $11LDA ($10),Y
LDA #<Label_8020STA $10LDA #>Label_8020STA $11LDA ($10),Y
QuoteThe big problem with IDA is that it's not free
Quote from: Disch on January 22, 2020, 03:53:37 AMI dunno if there's a usable disassembler available that works with CDLs and is also mapper aware, though, so I'll probably have to just whip something up in Python (which, IIRC, is what I did for FF1).I hope you're not too offended, but I think it would actually be significantly easier for me to build a new disassembly from scratch than it would be to try to build off of what you have. And in the process I might be able to make an actually re-usable disassembler.
Quote from: Disch on January 22, 2020, 03:53:37 AMJust to verify, after skimming the thread it looks like everyone here is using the Chaos Rush translation. Is that correct?Is that what the CDL is built on, too?
Quote from: Disch on January 22, 2020, 10:56:35 AMFor example, there might be code like this in the disassembly:
; call $0C:$8F49; external control flow target (from $0B:$9645)0x03FB27|$0F:$FB17:A9 49 LDA #$49 ; $0C:$8F490x03FB29|$0F:$FB19:D0 16 BNE $FB31 ; call $0C:$8F4C; external control flow target (from $05:$A14E, $05:$A52A, $05:$A745, $05:$A7B8)0x03FB2B|$0F:$FB1B:A9 4C LDA #$4C ; $0C:$8F4C0x03FB2D|$0F:$FB1D:D0 12 BNE $FB31 ; call $0C:$8F4F; external control flow target (from $05:$9FBD, $05:$A0F7, $05:$A13A, $05:$A413)0x03FB2F|$0F:$FB1F:A9 4F LDA #$4F ; $0C:$8F4F0x03FB31|$0F:$FB21:D0 0E BNE $FB31 ; call $0C:$8F52; external control flow target (from $05:$A54A)0x03FB33|$0F:$FB23:A9 52 LDA #$52 ; $0C:$8F520x03FB35|$0F:$FB25:D0 0A BNE $FB31 ; call $0C:$8F55; external control flow target (from $05:$A4E7)0x03FB37|$0F:$FB27:A9 55 LDA #$55 ; $0C:$8F550x03FB39|$0F:$FB29:D0 06 BNE $FB31 ; call $0C:$8F580x03FB3B|$0F:$FB2B:A9 58 LDA #$58 ; $0C:$8F580x03FB3D|$0F:$FB2D:D0 02 BNE $FB31 ; call $0C:$8F5B; external control flow target (from $05:$A1CD, $05:$A3E3)0x03FB3F|$0F:$FB2F:A9 5B LDA #$5B ; $0C:$8F5B; control flow target (from $FB19, $FB1D, $FB21, $FB25, $FB29, $FB2D)0x03FB41|$0F:$FB31:85 40 STA $40 0x03FB43|$0F:$FB33:A9 8F LDA #$8F 0x03FB45|$0F:$FB35:85 41 STA $41 0x03FB47|$0F:$FB37:A9 0C LDA #$0C 0x03FB49|$0F:$FB39:4C 88 FA JMP $FA88 ; swap in PRG bank in A, saving $3E to $3F and A to $3E, then JSR ($0040)
Quote from: abw on January 22, 2020, 11:53:43 AMOne of my pet projects has been a NES disassembler that leverages a CDL file to provide (with many caveats) [a ton of stuff]
QuoteThat said, I guess I ought to post the re-assemblable version of what I've got. There are plenty of missing labels, so use with caution. [snip] The CDL file found on the internet was for the Japanese ROM (MD5: 374ED97BE8BFD628F6B359A720549ECD), so that's what I've been working from.
Quote from: redmagejoe on January 22, 2020, 11:43:01 AMI haven't distributed it or tried to upload it as an addendum because I didn't get any feedback from Chaos Rush one way or another.
Quote from: redmagejoe on January 22, 2020, 11:43:01 AMAlso, I am going to be taking a VERY brief hiatus on this project (less than a week) while I focus on a work project.
Quote from: Disch on January 22, 2020, 01:02:30 PMI think a reasonable goal (at least at the start) would be something that can be reassembled out of the box, but with the caveat that if you add/remove bytes and move data around, some stuff might break.
Quote from: Disch on January 22, 2020, 01:02:30 PMNice! I like some of your ideas here, like adding a line to tell what parts of the code are jumping to each label.
Quote from: Disch on January 22, 2020, 01:02:30 PMAlso, did you automatically detect the PRG swapping routine or did you add those notes manually?
Quote from: Disch on January 22, 2020, 01:02:30 PMI suppose if you're working with the J Rom and I'm working with the Chaos Rush translation, then I'm not COMPLETELY duplicating your work . I'm torn between really wanting to do this because it's fun, but also recognizing that I'd be redoing a lot of stuff that you've done already.Maybe instead of FF2, I should work on FF3? Though I'd still be duplicating the work on the disassembler...... or maybe I can do some kind of automated CDL generator? That'd be something new.
QuoteWithout that, it's too easy to look at a bunch of code and say "oh, I can make this little change and everything will be awesome" only to find out that some other code is branching into the middle of your changes and crashing the system
Quote from: CoolCatBomberMan on January 23, 2020, 08:29:49 PMI'm not sure how relevant this is, but Hironobu Sakaguchi explained why the Ultima bug is a thing: when he first discovered it, he wanted the bug fixed, but some jerk programmer said no, because the bug reflected how legendary weapons/items in real life rarely live up to their own hype. Then, he ciphered the bug, so Sakaguchi couldn't fix it himself. So, here's to hoping you don't have too much trouble fixing Ultima.
Quote from: redmagejoe on January 22, 2020, 11:43:01 AMI haven't distributed it or tried to upload it as an addendum because I didn't get any feedback from Chaos Rush one way or another. I reached out to him, but the only response I got was "I don't do ROM hacking any more".
Quote from: Chaos Rush on January 24, 2020, 10:12:22 AMAnyways if you want to make a v1.8, go ahead.
Quotebut I also wish people could understand that I'm not obligated to work on them until perfection, nor am I obligated to work on projects I never even started to begin with
QuoteIf you're making a disassembly, I think you should work with the Japanese version and just make a new English version from there
Quote from: redmagejoe on December 10, 2019, 03:09:14 AMTested: Stats cannot go above 99 with stat-raising equipment in the Anniversary Edition. Cap stats at 99 no matter what for this patch.Tested: Stats can stack bonuses from multiple equipment in the remakes. Giant's Helm + Power Sash + Giant's Glove will yield +30 Strength in the remake. Try to implement this behavior into this patch.
0x013B33: 2210x013D5D: 6890x015D77: 4090x03400D: 30x0387CB: 690x03F75E: 1780x03F83B: 21... Fixed bank below, can't use above addresses0x03F858: 184 <- 39/184 used by my combat counter fix0x03FEFC: 1960x03FFCD: 30x03FFDD: 19 <- abw's RNG WIP uses 12/19
Quote from: redmagejoe on January 24, 2020, 12:17:21 AMStill working on my work project, but thought I'd pop in to say that, given that Ultima behaves the way Sakaguchi wanted it to in the remake, and knowing that was his original intent, it is definitely a priority to attempt to make it work in this version. Perhaps that will be our Final Challenge.
Quote from: Disch on January 24, 2020, 11:16:49 AMEhhhhh, gonna disagree with you there.[...]The only people a disassembly of the J ROM would be useful to would be the Japanese hacking community (who I'm not targeting) and people looking to retranslate a game that already has several serviceable translations. Which I'm not opposed to, but doesn't strike me as a very large audience. It would be next to useless for hackers looking to make other modifications to the game -- as they're almost certainly going to be using an English translation as a base.
Quote from: redmagejoe on January 24, 2020, 02:55:44 PMHad some downtime, so thought I'd try to find the area relevant to a seemingly simple fix, and wow, how easy it was to track down stat bonuses from equipment. All I did was Ctrl+F ADC #$0A (+10), and behold, it's literally the only Add Carry of 10 in the entire code. Sure enough, I changed it to $14 (+20) and all equipment gave +20 instead of +10. So the routine at 0x003F23 handles stat bonuses from equipment. Should be easy to figure out how to apply these two fixes. It's just a matter of utilizing space effectively.
Quote from: abw on January 25, 2020, 02:28:34 PMThat should be easy enough - it looks like $00:$BF13 is only called from one place, so you can save 4 bytes (JSR $BF13 and its RTS) by inlining the function and you can save 2 more bytes by flipping LDX #$00/INX/INX/CPX #$06 to LDX #$06/DEX/DEX, which is enough to add CMP #$64/BCC +2/LDA #$63 before writing the updated stat. If you really want more space for some reason, I'll note that the CLC at $00:$BF1F is useless since we know A < 128 (because we didn't take the BMI), so A + 16 can't overflow, and as long as the current stat value from the LDA ($7A),Y at $00:$BF1D is less than 246 (and if it's not, something has gone seriously wrong somewhere), we also know that adding 10 to it won't overflow, so the CLC at $00:$BF24 is also not needed.
0x003F0F|$00:$BEFF:A2 00 LDX #$00; control flow target (from $BF10)0x003F11|$00:$BF01:B5 44 LDA $44,X0x003F13|$00:$BF03:85 5E STA $5E0x003F15|$00:$BF05:B5 45 LDA $45,X0x003F17|$00:$BF07:85 5F STA $5F0x003F19|$00:$BF09:20 13 BF JSR $BF130x003F1C|$00:$BF0C:E8 INX0x003F1D|$00:$BF0D:E8 INX0x003F1E|$00:$BF0E:E0 06 CPX #$060x003F20|$00:$BF10:D0 EF BNE $BF010x003F22|$00:$BF12:60 RTS; control flow target (from $BF09)0x003F23|$00:$BF13:A0 04 LDY #$040x003F25|$00:$BF15:B1 5E LDA ($5E),Y0x003F27|$00:$BF17:30 12 BMI $BF2B0x003F29|$00:$BF19:18 CLC0x003F2A|$00:$BF1A:69 10 ADC #$100x003F2C|$00:$BF1C:A8 TAY0x003F2D|$00:$BF1D:B1 7A LDA ($7A),Y0x003F2F|$00:$BF1F:18 CLC0x003F30|$00:$BF20:69 0A ADC #$0A0x003F32|$00:$BF22:48 PHA0x003F33|$00:$BF23:98 TYA0x003F34|$00:$BF24:18 CLC0x003F35|$00:$BF25:69 10 ADC #$100x003F37|$00:$BF27:A8 TAY0x003F38|$00:$BF28:68 PLA0x003F39|$00:$BF29:91 7A STA ($7A),Y; control flow target (from $BF17)0x003F3B|$00:$BF2B:60 RTS
0x003F0F|$00:$BEFF:A2 06 LDX #$06; control flow target (from $BF10)0x003F11|$00:$BF01:B5 44 LDA $44,X0x003F13|$00:$BF03:85 5E STA $5E0x003F15|$00:$BF05:B5 45 LDA $45,X0x003F17|$00:$BF07:85 5F STA $5F0x003F19|$00:$BF09:A0 04 LDY #$040x003F1B|$00:$BF0B:B1 5E LDA ($5E),Y0x003F1D|$00:$BF0D:30 16 BMI $BF250x003F1F|$00:$BF0F:18 CLC0x003F20|$00:$BF10:69 10 ADC #$100x003F22|$00:$BF12:A8 TAY0x003F23|$00:$BF13:B1 7A LDA ($7A),Y0x003F25|$00:$BF15:69 0A ADC #$0A0x003F27|$00:$BF17:48 PHA0x003F28|$00:$BF18:98 TYA0x003F29|$00:$BF19:69 10 ADC #$100x003F2B|$00:$BF1B:A8 TAY0x003F2C|$00:$BF1C:68 PLA0x003F2D|$00:$BF1D:C9 64 CMP #$640x003F2F|$00:$BF1F:90 02 BCC $BF230x003F31|$00:$BF21:A9 63 LDA #$630x003F33|$00:$BF23:91 7A STA ($7A),Y0x003F35|$00:$BF25:CA DEX0x003F36|$00:$BF26:CA DEX0x003F37|$00:$BF27:D0 D8 BNE $BF010x003F39|$00:$BF29:60 RTS0x003F3A|$00:$BF2A:EA NOP0x003F3B|$00:$BF2B:EA NOP
Quote from: redmagejoe on January 25, 2020, 03:00:40 PMAlso do the other CLCs after BMI need to remain?
Page created in 0.170 seconds with 19 queries.