Commit Graph
33 Commits
Author SHA1 Message Date
Jonas Volman 5bc7b6c8be Use semantic PackBits names and TIFF fields 2026-07-14 17:43:27 -07:00
Jonas Volman 4078156c16 Match tif_packbits: all 5 functions, .rdata, .data
Functions matched (all EQUAL via hardened comparator):
- _code_0005bff0 (PackBitsPreEncode): 0x40 bytes, 2 relocs
- _code_0005c030 (PackBitsEncode): 0x230 bytes, 7 relocs
- _code_0005c260 (PackBitsDecode): 0x110 bytes, 3 relocs
- _code_0005c370 (PackBitsEncodeChunk): 0x50 bytes, 1 reloc
- _TIFFInitPackBits: 0x50 bytes, 4 relocs

Changes:
- Remove #include <assert.h> and assert() call
- Rename static functions to target VA-based symbol names
- Replace bcopy() with _csmemcpy() (XDK standard)
- Put RCSID string in .data as _data_002daf38
- Use direct offset stores for struct fields whose layout
  differs between this repo's tiffioP.h and the original binary
- Reorder function definitions alphabetically to match section
  ordering in the original COFF
2026-07-14 17:43:24 -07:00
Jonas Volman 206fb9accd Match TIFFFieldWithTag 2026-07-14 17:16:03 -07:00
Jonas Volman 2d63f6fe16 Match TIFFFindFieldInfo 2026-07-14 17:16:03 -07:00
Jonas Volman 84113d8e79 Match TIFF directory field data 2026-07-14 17:16:03 -07:00
Jonas Volman 221d2b9c68 Match ThunderDecode 2026-07-14 15:06:14 -07:00
Jonas Volman d8e1e09484 Match DumpModeDecode 2026-07-14 14:58:57 -07:00
Jonas Volman ee5a743c81 Match DumpModeEncode 2026-07-14 14:58:57 -07:00
Jonas Volman 4a4812dea8 Suppress exact legacy tif_dir warnings 2026-07-14 14:49:30 -07:00
Jonas Volman 2bb27626b0 Restore TIFFFreeDirectory line metadata 2026-07-14 14:46:54 -07:00
Jonas Volman 95c3d0acf7 Match TIFFSetDirectory 2026-07-14 14:46:53 -07:00
Jonas Volman a170618fb0 Match tif_dir tag-change helper 2026-07-14 14:46:53 -07:00
Jonas Volman 16c32f46bc Match tif_dir set-field helper 2026-07-14 14:46:53 -07:00
Jonas Volman ed92e67344 Match tif_dir allocation helpers 2026-07-14 14:46:52 -07:00
Jonas Volman 329e6f5929 Match TIFFFreeDirectory 2026-07-14 14:46:52 -07:00
Jonas Volman c6c39d89ff Match TIFFDefaultDirectory 2026-07-14 14:46:51 -07:00
Jonas Volman 2cdff41f20 Match tif_dir get-field helper 2026-07-14 14:46:51 -07:00
Jonas Volman 8b3b2bc43c Match code_0005b9b0 2026-07-14 14:45:40 -07:00
Jonas Volman a1d269e25b Match TIFFFdOpen 2026-07-14 14:38:31 -07:00
Jonas Volman 5ed05e8f08 Match TIFFOpen 2026-07-14 14:38:21 -07:00
Jonas Volman a82131f53a Match TIFFInitOrder 2026-07-14 14:38:21 -07:00
Jonas Volman 78aa92402b Fix TIFF raw buffer pointer cast 2026-07-14 14:31:41 -07:00
Jonas Volman 262bb3d790 Match TIFFReadBufferSetup 2026-07-14 14:29:55 -07:00
Jonas Volman 40310014db Match TIFFGrowStrips 2026-07-14 14:15:11 -07:00
Jonas Volman a62225c063 Match TIFFBufferSetup 2026-07-14 14:15:11 -07:00
Jonas Volman 4223afb200 Match TIFFSetupStrips 2026-07-14 14:15:11 -07:00
Jonas Volman 3b222643ee Match tif_compress scheme table layout 2026-07-14 14:07:54 -07:00
Jonas Volman 06aa27d621 Restore tif_compress codec scheme set 2026-07-14 14:07:54 -07:00
Jonas Volman 4d63323d8b Match source/bitmaps/libtiff/tif_compat.obj
Root cause: TIFFGetFileSize was excluded on xbox by #if guard
checking only unix/__unix/MSDOS/VMS. The Xbox XDK sys/stat.h
provides fstat(), and the original Jan 2002 build included
this function.

Fix: add defined(xbox) to the preprocessor guard and map
fstat->_fstat to match the original build's name decoration
convention (original compiler prepends _ even to names
already starting with _, producing __fstat symbol).

Verification:
  - .text section (48 bytes, MD5 36278163024e40f7...): MATCH
  - .data section (90 bytes, MD5 ac8cc86417f9c2db...): MATCH
  - External symbol __fstat: MATCH
  - objdiff-cli interactive diff: 100.00%

Canonical report 0/1 previously due to the #if guard causing
zero functions to be emitted in the base build.
2026-07-14 13:58:08 -07:00
Jonas Volman 48337766c8 Match tif_close object 2026-07-14 13:38:25 -07:00
Jonas Volman 0b2f3008ce Match tif_warning object 2026-07-14 13:10:57 -07:00
Jonas Volman b60640c79d Match tif_error object 2026-07-14 13:10:00 -07:00
punpckhdq e830efbd7c Initial commit 2025-11-27 02:27:27 +00:00