GithubHelp home page GithubHelp logo

smw-irq's Introduction

Documentation style:

1) Tabs are the method of spacing with a width of 8.
2) \n is the preferred line ending for consistency.
3) Labels and code should never share a line.
4) Underscores are the naming convention of choice.  Case variations are not permitted.
5) Prefer sublabels whenever possible.
6) A newline may be added after jumps/subroutines/forced branches/or branches into other subroutines.
7) The "soft margin" width is 120 characters per line. 
8) Lines missing an address should have the address added.
9) At this time RAM defines should NOT be used.
10) Abbreviations should be avoided where possible to enforce maximum consistency.  Exceptions list below.
11) Opcode suffixes are currently required.  At some point they will be removed however.
12) Avoid +/- labels if reasonable.
13) Opcodes and hex numbers are written in upper case.
14) Documentation should be enough to at a mimium explain the result of an operation, rather than the operation itself.
15) All labels should recieve meaningful names, code/data labels should be gradually removed.
16) It is required to where possible convert numeric addresses to labels.  Especially those used in DMA.


The comment structure:
The comment structure is rather simple and is rather basic. The backslash (\) is used to represent a new level of code,
the pipe (|) is used to designate continuation of the current code level, and finally the forwardslash (/) closes a 
level of code.  You may nest comments up to two levels deep.  An example of the comment structure looks something like
this:

(code section)					(address column) (comment wall) 
mode_7_static_background_scroll:		;		\ 
	LDA.b #$59				;$008416	 |\ set layer 1 tilemap address to $5800, mirror X
	STA.w $2107				;$008418	 |/
	LDA.b #$07				;$00841B	 |\ set layer 1 base character address to $7000
	STA.w $210B				;$00841D	 |/
	LDA $1A					;$008420	 |\ Set layer 1 X position.
	STA.w $210D				;$008422	 | |
	LDA $1B					;$008425	 | |
	STA.w $210D				;$008427	 |/
	LDA $1C					;$00842A	 |\ Set relative layer 1 Y position.
	CLC					;$00842C	 | |
	ADC.w $1888				;$00842D	 | | Add in the relative amount.
	STA.w $210E				;$008430	 | |
	LDA $1D					;$008433	 | |
	STA.w $210E				;$008435	 |/
	RTS					;$008438	/


Acceptable abbreviations:
Abbreviations are enforced on the following words for maximum consistency and ease of typing.  Abbreviations are
carefully chosen to avoid ambiguity and not compromise readability in any way.  If you feel a word is lacking an
abbreviations please contact p4plus2 so the potential inclusion can be discussed.  To clarify, acronyms do not count as
abbreviations and may be used.  (NOTE: these should be treated as case sensitive!!)  

(abbreviations = base word)
OW = overworld
BG = background
gfx = graphics
info = information
init = initialization

smw-irq's People

Contributors

marioe avatar p4plus2 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.