srec_hp64k(5)

πŸ“¦
version 1.65.0 Β· 2 versions
, in opensuse-leap 16.0

🌸 NAME 🌸

srec_hp64k β€” HP64000 Absolute Data Format πŸ’–

Okay bestie, welcome to the srec_hp64k(5) page from the File Formats Manual β€” this is the HP64000 Absolute Data Format, and it is lowkey iconic in a deeply binary way ✨

✨ DESCRIPTION ✨

This format is the output of the HP 64000 Development System Linker and associated tools. All fields are 16-bit words. This is a binary (non-text) file format. No cap, it's not here to be pretty in your terminal β€” it's here to be data 🫢

πŸ’– File Format πŸ’–

Files in this format start with a header record.

Then comes the Processor Information Record.

Then comes the data itself, organized into records. Slay, structure πŸ’…

πŸ¦‹ Overall Structure πŸ¦‹

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Magic     β”‚ Processor   β”‚  Data       β”‚             β”‚  Data       β”‚
β”‚   Number    β”‚ Information β”‚  Record #1  β”‚   ------    β”‚  Record #N  β”‚
β”‚   0x8204    β”‚ Record(PIR) β”‚             β”‚             β”‚  (N <=127)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The header consists of 8 words which are interpreted as a null terminated string:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Data  β”‚        β”‚  Data  β”‚
β”‚  Word  β”‚ ------ β”‚  Word  β”‚
β”‚  1     β”‚        β”‚  8     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧠 Processor Information Record (PIR) 🧠

The PIR does not have a checksum; it is therefore possible that a corrupt file header will go undetected. Bestie, that's the vibe check failing silently 😭
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Data    β”‚  Data    β”‚ Transfer β”‚ Transfer β”‚
β”‚  Bus     β”‚  Width   β”‚ Address  β”‚ Address  β”‚
β”‚  Width   β”‚  Base    β”‚ LS Word  β”‚ MS Word  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Data Record πŸ“

Each data record consists of a byte count followed by the commensurate number of words. The data part of each record is raw byte values, no encoding. It's giving "just bytes, no thoughts" πŸ’€

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Number  β”‚ Load    β”‚ Load    β”‚  Data   β”‚         β”‚  Data   β”‚
β”‚ of      β”‚ Address β”‚ Address β”‚  Word   β”‚ ------  β”‚  Word   β”‚
β”‚ Bytes   β”‚ LS Word β”‚ MS Word β”‚  1      β”‚         β”‚  N      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The checksum is calculated by a simple sum of unsigned bytes into a 32-bit accumulator. Cute, simple, math-coded πŸ”₯

πŸ’… Commentary πŸ’…

The implementation is based on two documents:

  • HP 64000 Logic Development System - File Format Reference Manual, #64980-90933, 1985
  • HP 64700 Operating Environment - Absolute File Translator. HP Part No. B1471-97008, 1992

These documents disagree on some points, and also do not quite match actual examples (firmware update files from early 90's equipment; probably generated from an unknown MC68k toolchain). Messy lore, honestly 🫠

The main points of disagreement are:

  • Two first bytes of the file, before any header or the "Processor Information Record", are not officially documented anywhere yet found. (68k linker docs may be worth investigating if they can be found). In this implementation they are set to "82 04", where 04 matches HP doc's "type" value of 4 for Absolute files. Mysterious first bytes, very main character energy πŸ‘‘
  • Header: Only mentioned in B1471. 16 bytes of user data? Present in this implementation. Question mark included, because same 😭
  • recsize (author's terminology) : redundant field, before every record, giving length of its record minus 1, i.e. recsize == (DataRecord.numbytes + 6) - 1

πŸ“š SOURCE πŸ“š

srec_cat version 1.65 Copyright (C) 1998... Peter Miller

The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command. Read the license bestie, it's right there ✨

🫢 MAINTAINER 🫢

  • Scott Finneran β€” E-Mail: scottfinneran@yahoo.com.au
  • Peter Miller β€” E-Mail: pmiller@opensource.org.au

Signed off with Reference Manual / SRecord energy and srec_cat version 1.65 β€” this is srec_hp64k(5), periodt πŸ’–πŸŽ€

πŸ“¦ where this page comes from