Spin stamp loader
Peter Verkaik
Posts: 3,956
The problem I have with the Prop IDE download to·a spin stamp
is that it always downloads the full 32kB.
I am thinking of writing a loader that uses P16-P18
(pins SOUT,SIN,ATN on the spinstamp), sacrificing
a cog to monitor/download, but only so much bytes
as the program occupies.
I realize I can only download to eeprom that way
but it will preserve the area beyond programsize
up to $7FFF.
Is there a fixed address that holds the programlength?
If not, I need to scan the program eeprom image
to find where the unused area starts.
Has anyone already written such an object?
(This object needs to be included with every program
for which I want to download via P16-P18).
regards peter
is that it always downloads the full 32kB.
I am thinking of writing a loader that uses P16-P18
(pins SOUT,SIN,ATN on the spinstamp), sacrificing
a cog to monitor/download, but only so much bytes
as the program occupies.
I realize I can only download to eeprom that way
but it will preserve the area beyond programsize
up to $7FFF.
Is there a fixed address that holds the programlength?
If not, I need to scan the program eeprom image
to find where the unused area starts.
Has anyone already written such an object?
(This object needs to be included with every program
for which I want to download via P16-P18).
regards peter
Comments
<edit>
Oh, you mean the Propeller always overwrites the entire eeprom? Yes, it does. No, nobody has written a compatible downloader for the prop yet but it's not difficult.
Just grab Chips booter.spin code and change it to :
a) monitor different pins
b) only write to the eeprom as much as is downloaded
c) ensure any program you download does not rely on the remainder of the memory space being zero
d)..profit [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Missed it by ->" "<- that much!
Post Edited (BradC) : 6/20/2009 12:44:32 PM GMT
FemtoBasic's EEPROM/SDcard loader uses VBASE and DBASE. It only reads VBASE*4 bytes from either the EEPROM or an SDcard file. FemtoBasic's COPY statement uses VBASE to specify how much needs to be copied to/from EEPROM or an SDcard file.
There have been some downloaders posted to the forum. I think one used XModem and another used YModem. The ROM bootloader (PNut) source has been posted and you could modify that to get you seamless compatibility from the PC side.
If I understand it correctly, the VAR area does not hold initializers (otherwise you
would copy DBASE*4 bytes), and the DAT area proceeds the VAR area.
Is that right?
regards peter