Giter Site home page Giter Site logo

superfamicheck's People

Contributors

greg-kennedy avatar optiroc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

marcellodash

superfamicheck's Issues

Fixing checksum on ExHiROM games can take two iterations

Hi again!

When you have an ExHiROM game where the checksum bytes themselves are corrupt (more precisely, when checksum != (checksum complement XOR $FFFF), it takes two iterations to actually fix the checksum.

To reproduce, with Tales of Phantasia as an example:

  • Go to offset $40FFDC, and overwrite the checksum bytes (should be A8 83 57 7C) with, say, 12 34 56 78
  • Check and fix the ROM. SuperFamicheck will output the following:
superfamicheck tales.sfc -f
ROM info for file "tales.sfc"

 Header at   0x40ffb0
 Title       TALES OF PHANTASIA   
 Game code   ATVJ
 Maker code  AF
 Country     0x00 (Japan)
 Version     1.0

 ROM size    0x0d (8192KB, actual size 6144KB)
 RAM size    0x03 (8KB)
 Map mode    0x05 (Extended HiROM)
 Chipset     0x02 (ROM, RAM, Battery)
 Speed       120ns

 Checksum    0x7856
 Complement  0x3412

The following issues were found:
 Checksum/complement should be 0x7b6d/0x8492

Writing ROM image to file "tales.sfc"
 Fixed checksum
  • The new checksum is obviously bad, too. However, running the command once more yields the correct result:
superfamicheck tales.sfc -f
ROM info for file "tales.sfc"

  Header at   0x40ffb0
  Title       TALES OF PHANTASIA   
  Game code   ATVJ
  Maker code  AF
  Country     0x00 (Japan)
  Version     1.0

  ROM size    0x0d (8192KB, actual size 6144KB)
  RAM size    0x03 (8KB)
  Map mode    0x05 (Extended HiROM)
  Chipset     0x02 (ROM, RAM, Battery)
  Speed       120ns

  Checksum    0x7b6d
  Complement  0x8492

The following issues were found:
  Checksum/complement should be 0x7c57/0x83a8

Writing ROM image to file "tales.sfc"
  Fixed checksum

This means that fixing the checksum within one iteration only works if the checksum is bad but its complement still equals checksum XOR $FFFF.

This issue only seems to be affecting ExHiROM games. I also tried it with Super Mario World (4 Mbit LoROM) and Chrono Trigger (32 Mbit HiROM), and it fixed the checksum in both cases immediately.

Thanks! :-)

"Fixed checksum" output when removing copier header

Hi!

Upon removing a copier header, the tool reports the checksum was fixed although it wasn't, nor was it bad in the first place.

superfamicheck TALES.SWC -f
ROM info for file "TALES.SWC"

  Header at   0x40ffb0
  Title       TALES OF PHANTASIA   
  Game code   ATVJ
  Maker code  AF
  Country     0x00 (Japan)
  Version     1.0

  ROM size    0x0d (8192KB, actual size 6144KB)
  RAM size    0x03 (8KB)
  Map mode    0x05 (Extended HiROM)
  Chipset     0x02 (ROM, RAM, Battery)
  Speed       120ns

  Checksum    0x7c57
  Complement  0x83a8

The following issues were found:
  File has a copier header (0x200 bytes)

Writing ROM image to file "TALES.SWC"
  Removed copier header
  Fixed checksum

Thanks! :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.