File
Last updated
Last updated
The main types of files you will be dealing with are likely:
Patch Files - individual algorithms saved as .spcd.
Bank files - groups of 8 algorithms saved as .spbk
So, you have the standard new, open, save and save as functions for both of those.
You can add "information" to both patches and banks. "Untitled" will be shown on the top line until you save the file.
Open Hex allows you to read the first program from a HEX file into a patch slot in SpinCAD. It does not show anything in the display as there is nothing to edit. If you wish to load something other than the first program in the HEX file, you will have to edit it to remove the lines prior to the program you wish loaded into the patch slot.
Next there are a couple functions which help transfer patches to the Spin IDE.
Save as ASM saves the current patch's ASM to a .spn file. This is a one-way process as it is not possible to open .spn files in SpinCAD Designer.
Copy ASM to Clipboard copies the current patch's ASM to the clipboard. Now you can paste it into the Spin IDE or a text editor.
Finally, we can export the entire bank, either to a HEX file for EEPROM programming, or to a Spin Project (1 .spj plus 8 .spn files). Note that when you "Export to Spin Project", you have to have saved all of the patches using "Save Patch" first. The same file name is then used for the generated .spn files as part of the project.
The code which implements these functions can be found below.