HuDK
HuDK copied to clipboard
Coding guidelines
Write coding guidelines!
thanks! though I'd imagine anything involving zero page is going to be a nightmare to get working with both set{wla,cc65} and pceas.
I think I'll drop wla-dx support for the time being.
Back on the guidelines :
Labels are in snake case.
Macro/routines should be named : target_action. Where target is the hardware, module on which the action is performed. For example, the routine setting the current PSG channel may be psg_set_chn
, and the name of the routine that deletes a Backup RAM entry may be bm_delete
.
Exceptions to this rule are "standard" functions or algorithms. For example the routine to compare two string may be strcmp, and sorting two byte-arrays simply sort.
I didn't find a good alternative to doxygen for asm. If anyone has an idea, let me know.
I found these two software. http://www.naturaldocs.org/languages.html (for assembly) I have not tested it but I know cpctelera uses it.(http://lronaldo.github.io/cpctelera/files/sprites/cpct_drawSpriteMasked-asm.html)
https://github.com/mrshankly/asm_doc I have no executable for asmdoc but it should be compilable under Windows
Natural Docs looks cools. It can do both asm and C. I'll try it asap.
Anyway, let's not forgot to add a nifty header to the source files! C version:
/*
* HuDK
* [small description]
* Licensed under the MIT License
* (c) 2016 {authors name}
*/
ASM version:
;;
;; HuDK
;; [small description]
;; Licensed under the MIT License
;; (c) 2016 {authors name}
;;
I think I'll stick with Natural Docs. http://blockos.org/docs/HuDK/files/word-inc.html
Cool. The doc seem easy to read.
Code documentation is now accessible here: http://blockos.github.io/HuDK/doc
The hw docs are far from begin complete atm.