fuzziqersoftware / resource_dasm

Classic Mac OS resource fork and application disassembler, with reverse-engineering tools for specific applications
MIT License
114 stars 13 forks source link

Minor Issue: BCD Version numbers in 'vers' resources #76

Closed mhelsley closed 11 months ago

mhelsley commented 11 months ago

"Inside Macintosh: Toolbox Essentials" says that, in vers resources the first two binary bytes are encoded in binary coded decimal or BCD. (Page 7-69)

For instance, resource_dasm output suggests that Dark Castle 1.1 is version 1.16 because the first two bytes of the vers resource are 0x01 0x10. 1.16 would be correct if taking the bytes were sufficient. However, each digit is encoded in a nibble rather than a byte. So there are 4 digits and the version number is 01.10 in hex aka 1.1 in decimal

https://github.com/fuzziqersoftware/resource_dasm/blob/1cd70f30b4970861ec6e1763da7376e2dd646c24/src/ResourceFile.cc#L1160

fuzziqersoftware commented 11 months ago

Thanks for the report - I hadn't looked too closely at vers resources before now. This is fixed now.