Files
gen1recomp/tests
johnjohto c24c7cbcb7 Export fidelity: name padding, wOptions, as-caught catchRate (#206)
Auditing the reporter's PKHeX screenshots against the emitted bytes
turned up three fidelity bugs in the .sav export:

- Name fields on a templateless export stayed zero-filled after the
  $50 terminator; every real save the naming screen wrote $50-pads
  the tail, and the zero tail is what PKHeX rendered as "JOHN{}".
  encodeName now pads zero tail bytes with $50 (nonzero template
  bytes still survive untouched).
- wOptions was never written, dropping text speed / battle style /
  battle effects on export.  Templateless exports now pack it from
  save.options (the recomp's textSpeed 1/3/5 are pokered's exact
  values); with a template the cartridge's own byte still wins.
- The party/box catch-rate byte was always re-derived from the
  current species, but Gen1 freezes it at catch time (evolution does
  not update it), which is why PKHeX demanded "a preevolution catch
  rate".  Pokemon.new now stamps the as-caught catchRate and
  Evolution.apply's in-place mutation preserves it.

The reported emulator crash itself is not addressed here: the encoder
is byte-identical to the reporter's version, and a byte-level audit
(offsets vs Bulbapedia's save map, all three checksums, a real
gameplay save round-trip, pokered's LoadMapData regenerating every
zeroed cache) shows the current export is structurally valid.
2026-07-28 09:00:07 -04:00
..
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-17 20:30:02 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-22 12:28:51 -04:00
2026-07-25 12:36:53 -04:00
2026-07-23 15:17:20 -04:00
2026-07-26 14:11:07 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-25 12:36:53 -04:00
2026-07-24 09:06:29 -04:00
2026-07-19 16:18:18 -04:00
2026-07-25 12:36:53 -04:00
2026-07-24 09:06:29 -04:00
2026-07-21 05:50:40 -04:00
2026-07-23 15:42:54 -04:00
2026-07-24 09:06:29 -04:00
2026-07-23 16:55:03 -04:00
2026-07-19 16:18:18 -04:00
2026-07-25 12:36:53 -04:00
2026-07-24 09:06:29 -04:00
2026-07-21 05:50:40 -04:00
2026-07-24 09:06:29 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-24 09:26:43 -04:00
2026-07-26 13:38:52 -04:00
2026-07-26 13:38:52 -04:00
2026-07-19 16:18:18 -04:00
2026-07-24 09:06:29 -04:00
2026-07-24 09:06:29 -04:00
2026-07-19 16:18:18 -04:00
2026-07-24 09:06:29 -04:00
2026-07-23 16:55:03 -04:00
2026-07-25 12:36:53 -04:00
2026-07-21 05:50:40 -04:00
2026-07-23 16:55:03 -04:00
2026-07-24 09:26:43 -04:00
2026-07-24 09:06:29 -04:00
2026-07-21 05:50:40 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-26 13:38:52 -04:00
2026-07-27 08:37:11 -04:00
2026-07-17 20:30:02 -04:00
2026-07-17 20:30:02 -04:00
2026-07-17 20:30:02 -04:00