eeprom file format
ae
Posts: 7
Hi All,
What is the definition of the·initialization section(first 16 bytes) of the eeprom file. That is saved from propeller Tool.
What is the definition of the·initialization section(first 16 bytes) of the eeprom file. That is saved from propeller Tool.
Comments
Bytes :
0-3 Clock speed
4 : Clock Mode
5 : Checksum
6-7 : PBase - Start of object
8-9 : VBase - Start of Variables
10-11 : DBase - Start of Stack
12-13 : PCurr - Pointer to start of first spin object to run
14-15 : DCurr - Stack pointer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
Adjust it so adding all 32k bytes together == 0
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
It must be sum of some part of the memory area.
The checksum must be adjusted so the sum of all bytes in the 32k image == 0
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
Yes I was adding all of the bytes in the image. The message from Mike Green earlier in this thread said to sum all 32k bytes. Actually, my image isn't a full 32k bytes so I was only summing the bytes that were actually part of the .binary file but I don't think that should matter since any remaining bytes would be zero and not affect the checksum.
Sorry David, I read the original stuff too fast. I thought my post was only there a few seconds before realizing my error so I deleted it. (First time ever to delete a post.)
These bytes are added to the beginning of the stack at run time. The extra bytes cause a Spin cog to jump to the ROM address $FFF9 when it terminates. The code at $FFF9 contains a few Spin bytecode instructions to get the cog ID and issue a cogstop.
If you add the extra bytes to $14 you will get $00.
Version 1.3.2 of the Propeller Tool truncates saved binary files immediately before the FFFFF9FFFFFFF9FF sequence would normally appear in the eeprom. But the saved eeprom file itself DOES in fact contain that byte sequence.