Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/nesasm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-08-27 07:24:31 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-08-27 07:24:31 +0300
commit044aa3ade48062fb5de43f0e77ab5fce9492a7a2 (patch)
treef54b4382280cb4c26fb9617b9323b789e3764097
parent3afee38e52af284fd059f0b9d83954a1c4ec7618 (diff)
Old documentation removedv3.0
-rw-r--r--documentation/index.txt22
-rw-r--r--documentation/readme.txt93
-rw-r--r--documentation/usage.txt378
3 files changed, 0 insertions, 493 deletions
diff --git a/documentation/index.txt b/documentation/index.txt
deleted file mode 100644
index 53125bf..0000000
--- a/documentation/index.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-
- -*[ MAGIC KIT v2.51 ]*-
- -----------------
-
- \MAGICKIT
- |
- |--\DOC
- |
- |--\NES INDEX.TXT -- this file
-
- HISTORY.TXT -- revision history of the assembler
-
- USAGE.TXT -- how to use the assembler; syntax, etc...
-
- CPU_INST.TXT -- a list of all the 6502 CPU instructions
- and addressing modes
-
- NESHDR20.TXT -- iNES header/format information file
-
-
---
-
diff --git a/documentation/readme.txt b/documentation/readme.txt
deleted file mode 100644
index c62a23a..0000000
--- a/documentation/readme.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-
- -*[ MAGIC KIT v2.51 ]*-
- -----------------
-
- Hi,
-
-
- PC-Engine news :
- ---------------
-
- This new release of MagicKit is mainly a HuC release,
- many new directives have been specialy added for the PC-Engine
- HuC C compiler, and several sub-routines were changed to work
- better in a C environment.
-
- The only new "asm" features are a few new sub-routines and
- macros to deal with scrolling and maps. The startup code
- as also been enhanced; especially the interrupt handlers,
- and gamepad support is also better.
-
- And to go with the new map sub-routines, INCBIN has been
- enhanced to support .FMP map files. Those files are produced
- by the excellent Mappy map editor :
-
- http://www.geocities.com/SiliconValley/Vista/7336/robmpy.htm
-
-
- NES news :
- ---------
-
- The NES version of the assembler also benefits of the .FMP
- map files support, but except that not much new things were
- added. There's just a new predefined function : SIZEOF().
- It returns the size of any data element.
-
- The NES version still lacks a good library, any help is
- welcome.
-
-
- Well I will let you code now. ;)
-
- And between two coding sessions, visit MagicKit homepage. :)
-
- http://www.magicengine.com/mkit/index.html
-
-
- Have fun!
- David
-
-
- Thanks to
- ---------
-
- - David Shadoff and Bt Garner for their input (and coding!) for
- improving the assembler, for providing some sample code, and
- for helping (a lot!) to write more documentation.
-
- - Zeograd for resuming my C compiler project and for
- continuing to work on it. Nice work Zeo!
-
- - Charles Doty for adding NES support to the assembler.
-
- - Tony Young for letting me distribute his NES 'JUNK' demo with
- MagicKit. Don't forget to ask him if you want to use his demo
- in one of your project or if you want to put it on your web
- page.
-
- - Jens Ch. Restemeier, and Paul Clifford, for making those
- excellent documentations on the PC-Engine hardware.
-
- - Hiroyuki Ito, for Japanese support - coming soon, a Japanese
- website and translated version of the documentation !
-
- - dil, for his Tetris CG artwork used in the SLIDSHOW demo.
-
- - J. H. Van Ornum, for his old 6502 assembler (May 11th, 1984).
- The source code of his assembler has been used as a base
- for MagicKit assembler.
-
- - DJ Delorie, for DJGPP.
- If you search for a fast, good and free C compiler,
- go to : <http://www.delorie.com/djgpp>
-
- - Charles Sandmann, for CWSDPMI.
- A pretty good DPMI server.
- <ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/csdpmi*.zip>
-
- - anybody who uses this assembler to write a demo or a game
-
-
---
-David Michel <dmichel@easynet.fr>
-
diff --git a/documentation/usage.txt b/documentation/usage.txt
deleted file mode 100644
index d26e26e..0000000
--- a/documentation/usage.txt
+++ /dev/null
@@ -1,378 +0,0 @@
-
- -*[ NES ASM v2.51 ]*-
- ---------------
-
-
- Usage
- -----
-
- NESASM [-options] [-? (for help)] infile[.ASM]
-
- The assembler accepts only one input file 'infile' that will be
- assembled into ROM file (.NES extension) directly useable
- by an emulator.
-
- A listing file can also be generated (.LST extension) if the LIST
- directive is encountered in the input file.
-
- Here's a description of the different options:
-
-
- Option Description
- ------ -----------
-
- -s
- -S Show segment usage. If one of those options is specified
- the assembler will display information on the ROM bank
- usage. Use '-s' to show basic information and '-S' to
- show more detailed information.
-
- -l # Control output of the listing file:
-
- 0 - disable completely the listing file even if the
- LIST directive is used in the input file
- 1 - minimun level; code produced by DB, DW and DEFCHR
- will not be dumped
- 2 - normal level; only code produced by DEFCHR will not
- be dumped
- 3 - maximun level; all the code is dumped in the
- listing file
-
- The default level is level 2.
-
- -m Force macros expansion in the listing file, even if the
- MLIST directive is not seen in the input file.
-
- -raw Control the header generation. By default the assembler
- always adds an header to the ROM file; unless '-raw' is
- specified, in this case no ROM header is generated.
-
-
- Include path
- ------------
-
- By default the assembler looks in the current directory when
- loading an include file, but when it doesn't find the file it
- then uses the environment variable 'NES_INCLUDE' to get a list
- of include paths. Ideally, you will want to set this variable in
- your 'AUTOEXEC.BAT' file, and have it point to the 'NES'
- directory of MagicKit.
-
- ex: set NES_INCLUDE=c:\magickit\nes
-
-
- Symbols
- -------
-
- Two types of symbol are supported, global symbols and local
- symbols. Local symbols are preceded by a dot '.' and are valid
- only between two global symbols. A symbol can be followed by
- a colon ':' but this is not necessary.
-
-
- Expressions
- -----------
-
- The assembler supports very complex expressions. You can use
- as many level of parenthesis as you want and spaces between
- operators and numbers are possible.
-
- Numbers can be written in three bases : hexadecimal ($7F),
- binary (%0101) and decimal (48). Character values are also
- supported ('A').
-
- All the usual operators are present :
-
- +, -, *, /, %, ^, &, |, ~, <<, >>
-
- As well as the comparison operators :
-
- =, !=, !, <, >, <=, >=
-
- For the priority, the same rules as C apply.
-
- You can also use predefined or user-defined functions in
- an expression.
-
-
- Predefined functions
- --------------------
-
- HIGH() - Returns the high byte of a value.
-
- LOW() - Returns the low byte.
-
- BANK() - Returns the bank index of a symbol. If no symbol,
- or more than one, are given, the function will
- return an error.
-
- PAGE() - Returns the page index of a label. See above for
- errors.
-
- SIZEOF() - Returns the size of a data element.
-
-
- User-defined functions
- ----------------------
-
- User-defined functions are declared with the .FUNC directive,
- for example:
-
- SCR_ADDR .func (\1) + ((\2) << 5)
-
- Up to nine arguments, \1 to \9, can be used.
-
- To call a function simply enclose arguments within parenthesis
- and separate them with a comma:
-
- stw #SCR_ADDR(10,4)+$2000,<$20
-
- User-defined functions can be very useful, one often needs to use
- the same calculation again and again in expressions. Defining a
- function will save you a lot of work, and reduce typo errors. :)
-
- Note that function calls can be nested, you can call one function
- from another without any problem, however, recursive calls will
- produce an error.
-
-
- Macros
- ------
-
- While functions are very useful to replace common expressions by
- just a function call, macros are used to replace common groups
- of instructions by a single line of code.
-
- You start a macro definition with:
-
- label .macro
-
- Or you can also place the label after the '.macro' keyword, like
- this:
-
- .macro label
-
- After follow the body of the macro, which is terminated by
- the '.endm' directive.
-
- As an example let's define a 'neg' macro to negate the accumulator.
-
- neg .macro
- eor #$FF
- inc A
- .endm
-
- Macros can also have parameters. In the macro body, you refer to
- a parameter by using the backslash character ('\') followed by
- a digit. Nine parameters can be used, \1 to \9.
-
- Here's another example:
-
- add .macro ; add a value to register A
- clc ; (handle carry flag)
- adc \1+1
- .endm
-
- Other 'special' parameters can be used, here's a list of all
- the possible parameter you can use inside a macro:
-
-
- Parameter Description
- --------- -----------
- \1 - \9 Input parameter - up to nine can be used in a macro call
-
- \# Number of input parameters
-
- \?1 - \?9 Returns 'type' of input parameter:
- ARG_NONE (= 0) = No argument
- ARG_REG (= 1) = register -> A, X, Y
- ARG_IMMEDIATE (= 2) = Immediate data type -> #xx
- ARG_ABSOLUTE (= 3) = Abosulte addressing -> label, $xxxx
- ARG_INDIRECT (= 4) = Indirect addressing -> [label]
- ARG_STRING (= 5) = String argument -> "..."
- ARG_LABEL (= 6) = Label argument -> label
-
- \@ Special parameter that returns a different number for
- each macro; can be used to define local symbols inside
- macros:
-
- abs .macro
- lda \1
- bpl .x\@
- eor #$FF
- inc A
- sta \1
- .x\@:
- .endm
-
-
- Directives
- ----------
-
-
- LIST - Enable the listing file generation. You can later stop
- temporarily the output with the NOLIST directive and
- restart it again with LIST.
-
- NOLIST - Stop the listing output.
-
- MLIST - Allow macro expansion in the listing file.
-
- NOMLIST - Stop expanding macros in the listing file. This directive
- won't have any effect if you use the '-m' command line
- option.
-
- OPT - ...
-
- EQU - Assign a value to a symbol. The character '=' has
- the same function too.
-
- BANK - Select a 8KB ROM bank (0-127) and reset the location
- counter to the latest known position in this bank.
-
- ORG - Set the location of the program counter. The thirteen
- lower bits of the address inform the assembler about
- the offset in the ROM bank and the third upper bits
- represent the page index.
-
- DB - Store one or more data bytes at the current location.
-
- DW - Store data words.
-
- BYTE - Same as DB.
-
- WORD - Same as DW.
-
- DS - Reserve space at the current location. This space will
- be filled with zeroes if this directive is used in the
- CODE or DATA group.
-
- RSSET - Set the internal counter of the RS directive to
- a specified value.
-
- RS - Assign a value to a symbol; a bit like EQU but here
- the value assigned is taken from an internal counter,
- and after the assignation this counter is increased
- by the amount specified in the RS directive.
- This is a very handy way of defining structure member
- offsets, here's a small example:
-
- ; C:
- ; --
- ; struct {
- ; short p_x;
- ; short p_y;
- ; byte p_color;
- ; } pixel;
- ;
- ; ASM:
- ; ----
-
- .rsset $0 ; set the initial value of RS counter
- P_X .rs 2
- P_Y .rs 2
- P_COLOR .rs 1
-
- You can later use these symbols as offsets in a 'pixel'
- struct:
-
- ldy #P_COLOR
- lda [pixel_ptr],Y
-
- MACRO - Start a macro definition.
-
- ENDM - End a macro definition.
-
- PROC - ...
-
- ENDP - ...
-
- PROCGROUP - ...
-
- ENDPROCGROUP - ...
-
- INCBIN - Include a binary file at the current location. If the file
- is bigger than a ROM bank, as many successive banks as
- necessary will be used.
-
- INCLUDE - Include a source file at the current location.
- Up to 7 levels are possible.
-
- INCCHR - Extract a part of a PCX file and convert it into NES
- 4-color 8x8 graphic characters. Three syntaxes are
- possible :
-
- INCCHR "pic.pcx"
-
- Without any additional parameters, the command
- convert the whole PCX file.
-
- INCCHR "pic.pcx",32,4
-
- Tell the assembler to convert only 4 rows
- of 32 characters (a character size is 8x8).
-
- INCCHR "pic.pcx",48,16,32,4
-
- Same as above but start extracting characters
- from coordinate 48,16 (in pixels).
-
- DEFCHR - Define a character tile (8x8 pixels). The directive takes
- 8 arguments (stored as 32-bit values of 8 nybbles each),
- one argument for each row of pixel data. This directive
- takes also care to reorganize the pixel data to the NES
- required bit format. Note that only color indexes 0 to 3
- can be used, as the NES tiles are only 4-color. An error
- will be generated if you try to use more colors.
-
- zero: .defchr $00111110,\
- $01000011,\
- $01000101,\
- $01001001,\
- $01010001,\
- $01100001,\
- $00111110,\
- $00000000
-
- ZP - Select the Zero-Page section ($0000-$00FF).
-
- BSS - Select the RAM section ($0200-$07FF).
-
- CODE - Select the program code section.
-
- DATA - Select the program data section.
-
- Note: In ZP and BSS sections you can only allocate storage,
- ---- you can *not* store initial values.
-
- IF - Conditional assembly directive. This directive will evaluate
- the supplied expression and then turn conditional assembly
- on or off depending on the result. If the result is null
- conditional assembly is turned off, and on if the result is
- non null.
- IFDEF
- IFNDEF - These directives allow conditional assembly depending on
- whether a label is defined or not.
-
- ELSE - Toggle conditional assembly on to off, or vice verca.
-
- ENDIF - Terminate the current level of conditional assembly.
- Report an error if the number of IF's and ENDIF's doesn't
- match.
-
- FAIL - When the assembler encounters this directive, it aborts
- the compilation. Can be used within a macro for argument
- error detection.
-
- INESPRG - Specifies the number of 16k prg banks.
-
- INESCHR - Specifies the number of 8k chr banks.
-
- INESMAP - Specifies the NES mapper used.
-
- INESMIR - Specifies VRAM mirroring of the banks. Refer to iNES header
- document (neshdr20.txt).
-
-
---
-