News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: (SNES) Reverse engineering a patch for a defunct author  (Read 1188 times)

Sarah Shinespark

  • Full Member
  • ***
  • Posts: 102
  • Creator of Arcana: Seal of Rimsala
    • View Profile
(SNES) Reverse engineering a patch for a defunct author
« on: November 23, 2020, 10:02:15 pm »
I'm investigating some graphics glitches and occasional crashes in Geiger's Debugger for Arcana FastROM patch, decided to disassemble it. There are countless 00->80 byte changes, and some functions were replaced with ASM jumps (with no evidence that the overwritten code was accounted for so far), and there's some minor subroutines that ORA 80 to the bank number every time the main loop is called.

Vast majority of the code though, seems to be constantly updating a range of RAM values. Wall of code procedes:
Pastebin
The indented code is from a different trace than the rest.

My thing is, staring at all this, I'm tempted to gut it altogether and return to manually editing bank 00 to 80 for traced code rather than relying on a tool to "recognize" function calls and such. But, I'm not entirely sure how important this constantly-initializing code is. (I've also been putting it off because of the reverting process having patch conflicts)

slidelljohn

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
Re: (SNES) Reverse engineering a patch for a defunct author
« Reply #1 on: November 23, 2020, 11:15:53 pm »
The 0x00 to 0x80 and ORA 80 to the bank number are for fast rom access. If there are so many
problems with the patch it might best to start a new fast rom patch from scratch. If you do
want to go through the code that was modified I have a IPS patch to text tool somewhere that you
can use that would probably help you with that. It would show all modifications that were made.
« Last Edit: November 23, 2020, 11:40:04 pm by slidelljohn »

Sarah Shinespark

  • Full Member
  • ***
  • Posts: 102
  • Creator of Arcana: Seal of Rimsala
    • View Profile
Re: (SNES) Reverse engineering a patch for a defunct author
« Reply #2 on: November 24, 2020, 09:35:10 am »
Oh I know what those smaller changes are for, I just mentioned them instead of documenting them. I'm using IPS Peek to review all the byte changes, is it something like that? And I'm not even sure how necessary some of this code is, other than runtime-updating the bank to fast rom which takes a lot of cycles.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 331
    • View Profile
Re: (SNES) Reverse engineering a patch for a defunct author
« Reply #3 on: November 24, 2020, 12:40:20 pm »
Yea, the tool I made was something like IPS Peek but IPS Peek looks a lot better. The tool I made just dumped everything to a text file. I never even knew about IPS Peek. I’m probably going to test that tool out next time I need to dig into a IPS file.

Sarah Shinespark

  • Full Member
  • ***
  • Posts: 102
  • Creator of Arcana: Seal of Rimsala
    • View Profile
Re: (SNES) Reverse engineering a patch for a defunct author
« Reply #4 on: November 26, 2020, 09:23:59 am »
Well if you're up for it, maybe make a version of that program that selectively patches again. Deleting selective patches manually is a pain in the ass.

EDIT:
That might do it. For some reason the internal header wasn't changed to FastROM.
« Last Edit: November 28, 2020, 09:16:53 am by Sarah Shinespark »