mkw icon indicating copy to clipboard operation
mkw copied to clipboard

Finish GhostFile

Open riidefi opened this issue 3 years ago • 0 comments

  • [ ] Match GhostFile::writeHeader (loop irregularity)
  • [ ] Investigate matching hack in GhostFileGroup::get
  • [ ] Decompile GhostFile::init
  • [ ] Decompile RawGhostFile::compress
  • [ ] Decompile RawGhostFile::decompress

stebler:

GhostFile::writeHeader is non-matching because of some weirdness in the lap times loop. I'm at least confident that bit fields are used because they got me to immediately match parts of GhostFile::readHeader and GhostFile::writeHeader that didn't work with the inline getters over reinterpret_cast I initially tried. Using a local union can get the loop closer to the original asm, but scheduling and regalloc stay different.

GhostFileGroup::get needed some hack to prevent the compiler from shortening it with a lbzxu instruction. It is disabled when NON_MATCHING is set.

GhostFile::init, RawGhostFile::compress and RawGhostFile::decompress will be decompiled at a later time.

riidefi avatar Oct 08 '21 14:10 riidefi