All values are in decimal.
8XP File:
(1-11)Header (11 bytes): 42,42,84,73,56,51,70,42,26,10,0
(12-52)Comment (42 bytes): 42 bytes of ASCII, if the comment is <42 bytes then fill the rest of the space with 0s
(53)Comment Delimiter: 0
(54-55)Length of the Data Section (2 bytes): Length of the data section+19
(56-57)Random Stuff (2 bytes): 13,0
(58-59)Length of the Data Section (2 bytes): Length of the data section+2
(60)Protected (1 byte): 6 if yes, 5 if no
(61-68)Program Name (8 bytes): Program Name (in ASCII)-fill with 0s if <8 bytes
(69-70)More Random Stuff (2 bytes): 0,0
(71-72)Length of the Data Section (2 bytes): Length of the data section+2
(73-74)Length of the Data Section (2 bytes): Length of the data section
(75-?)Data Section (Varies): The program's data
Checksum: Checksum of 56 bytes to the byte before the checksum
Would the checksum include itself? And the would the checksum's value = 74 + bytes of data?
METADATA:
Sizes:
Offset Length Description
Packet
|
| Header
| | 0 8 **TI83F*
| | 8 3 $1A $0A $00
| | 11 42 Comment - padded with zeros or spaces.
| | 53 2 Length of data section. Should be equal to filesize - 57
| End Header
|
| Data
| | 55 2 Always has a value of $0B or $0D? (prefer $0B?)
| | 57 2 Length of Variable Data Section
| | 59 1 Variable type ID ($05 for programs)
| | 60 8 Variable name (padded with zeros)
| | 68 1 Version (??), usually $00. (Present if byte 55 == $0D)
| | 69 1 Archive flag. $80 archived, $00 if not. (Present if byte 55 == $0D)
| | 70 2 Length of Variable Data Section (repeat of bytes @ 57)
| |
| | Variable Data
| | | 72 2 Length of Actual Data / 2
| | | 74 n Actual Data
| | End Variable Data
| |
| End Data
|
| 74 + n 2 Checksum (sum of Data section)
|
End Packet
@Michael_Lee, thanks! I'll try doing everything that way when I get back to my computer. Just a question though... Isn't the part where it says "final size - 57" the same as Data Section + 19 (76, 74 bytes before the Data Section and the checksum, minus that 57)?
Hmm... My exporting seems to be slightly off... It works generally, but it's a little broken...
Here's what happens with DRIFTER as an example program. I open it, then export it as a different file. Opening works perfectly.Spoiler For Open:Spoiler For Open, then save, then open again:
4: The only time double-posting is allowed (posting two messages in a row in the same topic) is either if there has been 6 hours since your last post, 3 hours if your thread has been bumped out of the New Posts page, 1 hour if it's a project update or immediately if you need to upload more than 10 file attachments at once. Otherwise, update the last post using the "EDIT" button. It will be marked as unread for all members (altough it won't bump the thread).
9->A
The data section would be 39-04-41 (in bytes). Would the checksum be 124, or 3?
METADATA:
Sizes:
Offset Length Description
<snip>
| Data
| | 55 2 Always has a value of $0B or $0D? (prefer $0B?)
| | 57 2 Length of Variable Data Section
| | 59 1 Variable type ID ($05 for programs)
| | 60 8 Variable name (padded with zeros)
| | 68 1 Version (??), usually $00. (Present if byte 55 == $0D)
| | 69 1 Archive flag. $80 archived, $00 if not. (Present if byte 55 == $0D)
| | 70 2 Length of Variable Data Section (repeat of bytes @ 57)
| |
| | Variable Data
| | | 72 2 Length of Actual Data / 2
| | | 74 n Actual Data
| | End Variable Data
| |
| End Data
<snip>
...is the checksum.3->A
Packet
|
| Header
| | **TI83F* 2A2A54493833462A
| | (part of signature) 1A0A00
| | Comment 546F6B656E697A656420
| | 7573696E67205449436F
| | 6E766572742076302E35
| | 00000000000000000000
| | 0000
| | Length of Data section 1600
| End Header
|
| Data
| | Mystery value 0B00
| | Length of Variable Data 0500
| | Variable type ID 05
| | Variable name (TEST) 5445535400000000
| | Version (??) 00
| | Archive flag 00
| | Length of Variable Data 0500
| |
| | Variable Data
| | | Length of actual data 0300
| | | Actual data: 3->A 330441
| | End Variable Data
| |
| End Data
|
| Checksum D501
|
End Packet
The checksum, however, is the sum of all the bytes.