| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| bh.py | 2020-06-23 | 12.7 kB | |
| VGA.spin | 2020-06-23 | 16.1 kB | |
| F32.spin | 2020-06-23 | 41.2 kB | |
| F32.hex | 2020-06-23 | 4.6 kB | |
| HSUART.spin | 2020-06-23 | 10.1 kB | |
| UART.spin | 2020-06-23 | 9.9 kB | |
| TV.spin | 2020-06-23 | 27.2 kB | |
| VGA.hex | 2020-06-23 | 2.1 kB | |
| hexrom | 2020-06-23 | 37 Bytes | |
| MONOWAVE.spin | 2020-06-23 | 4.6 kB | |
| README.TXT | 2020-06-23 | 2.4 kB | |
| HSUART.hex | 2020-06-23 | 1.5 kB | |
| UART.hex | 2020-06-23 | 1.2 kB | |
| Totals: 13 Items | 133.7 kB | 0 | |
Your spin file is really just PASM code to be loaded into a cog but the Prop tool may require a dummy pub start.
Add a header at the start of the DAT section:
org
byte ".ROM" ' ROM signature
word @UARTEnd-@UART ' size
byte "UART " ' name
' 1234567890
The ROM name should be exactly 10 characters so pad with spaces as need be. Add a label to the end of the dat section so that the size can be calculated.
word @UARTEnd-@UART ' size
Compile and save your spin PASM file as binary and then run bh.py like this (using UART.binary) to convert it to hex:
python bh.py --binaries=0,UART.binary
( or use the bash script if you can: ./hexrom UART )
I may simplify bh.py to assume .binary files and insert the SAVEROM text.
This will produce a hex file like this:
:20000000001BB70000501000FC010402F8010802EC010200E80100002E524F4DD00155414D
:200020005254202020202020F0E9BCA074EABC0001F4FCA075F4BC2C01E8FC8074EABC00AA
:20004000010EFDA0750EBD2C01E8FC8074EEBC0402E8FC8074F0BC0878F2BCA001F2FC2896
:200060000CF2FC8404E8FC807404BD0402E8FC80741ABD04011AFD8402E8FC807410BD0465
:2000800002E8FC80741CBD04011CFD8402E8FC8074E8BC0474FCBCA000F6FCA074F63C0481
:2000A00002E8FC8074F63C0402E8FC807400BDA000FAFCA074FA3C0402E8FC807402BDA07C
:2000C00000F8FCA074F83C0404EE7C6202EE7C6187E89B6887ECAB684818FDA00908FDA0A0
:2000E000790ABDA08C0CBD5C01EE7C62F2F53C612F00645CF10BBD80780ABD808C0CBD5C86
:2001000085E8BCA0F1E9BC8400E87CC135004C5CF2F53C610106FD303408FDE47106BD6C85
:2001200001EE7C627206956C1706FD287BEABCA082EABC8075063D0001F6FC808DF6BC6004
:200140007EF63C042D007C5C8618BD5C80FABC047CFA3C864800685C7CECBCA08EECBC6057
:2001600088ECBC807612BD007312BD6801F8FC8081F83C040112FD2C0A14FDA006EE7C62E9
:200180006200545CF117BDA00112FD2987E8BF707816BD808618BD5C8BE8BCA0F1E9BC84A6
:2001A00000E87CC15B004C5C5814FDE448007C5CF117BDA004EE7C6202EE7C610112E16C48
:2001C0000112FD2987E8AB7087EC97747816BD808618BD5C8BE8BCA0F1E9BC8400E87CC14E
:1C01E0006A004C5C6314FDE448007C5C00000080FFFFFFFF00FFFFFF32000000CE
:00000001FF
Just edit with a text editor and insert a line at the top that says: SAVEROM
SAVEROM
:20000000001BB70000501000FC010402F8010802EC010200E80100002E524F4DD00155414D
:200020005254202020202020F0E9BCA074EABC0001F4FCA075F4BC2C01E8FC8074EABC00AA