Ancient | All the Same | ATOFont | Drawings | Flash | Lecherous Gnomes | Me | Nintendo DS | PPM | PSP | Rumor Engine | S3TC-BOXEN | Tests | Tile Driller | VSOFont | WLA DX | Wzonka-Lad

WLA DX - Yet Another GB-Z80/Z80/6502/65C02/6510/65816/6800/6801/6809/8008/HUC6280/SPC-700 Multi Platform Cross Assembler Package
Originally written by Ville Helin in 1998-2008


Sexy Mofo!


Features:
  • Fast
  • SNES support
  • SMS/GG support
  • Gameboy support
  • PC-Engine support
  • Support for object and library files
  • You can patch ROM images with code
  • Multilevel macros (actually, functions)
  • Numerous ways to comment code away
  • ROM image and program file compiling
  • NO$GMB/NO$SNES symbol file writing

  • Compiles code for the following CPU's:
  • 6502 (NES, etc.)
  • 65C02 (VIC-20, etc.)
  • 6510 (C64, etc.)
  • 65816 (SNES, etc.)
  • 6800 (APF-MP1000, etc.)
  • 6801 (???)
  • 6809 (Vectrex, etc.)
  • 8008 (Mark-8, etc.)
  • GB-Z80 (Game Boy)
  • HuC6280 (PC-Engine)
  • SPC-700 (SNES sound chip)
  • Z80 (GG, SMS, MSX, Spectrum, Ti86, etc.)

  • ... on the following platforms:
  • AmigaOS 1-3 (680x0)
  • AmigaOS 4 (PPC)
  • MSDOS
  • Linux
  • Un*x
  • Win32

  • Sources (it's best to grab the latest):

    GitHub repository! The development continues there...

    WLA DX 9.9 (.tar.gz)
    WLA DX 9.8 (.tar.gz)
    WLA DX 9.7 (.tar.gz)
    WLA DX 9.6 (.tar.gz)
    WLA DX 9.5 (.tar.gz)
    WLA DX 9.4 (.tar.gz)
    WLA DX 9.3 (.tar.gz)
    WLA DX 9.2 (.tar.gz)
    WLA DX 9.1 (.tar.gz)
    WLA DX 8.9 (.rar)
    WLA DX 7.8 (.tar.gz) Unsupported 7.x -tree
    Ancient WLA DX 1.6 - 4.4 (.rar)


    Binaries (UNSUPPORTED):

    Amiga/Win32 (link)


    Documentation:

    README (15-Aug-2019)
    README (OLD)
    CHANGELOG
    WLA File Formats


    Mnemonic lists:

    6502 (alphabetical, opcode)
    65C02 (alphabetical, opcode)
    6510 (alphabetical, opcode)
    65816 (alphabetical, opcode)
    GB-Z80 (alphabetical, opcode)
    HuC6280 (alphabetical, opcode)
    SPC-700 (alphabetical, opcode)
    Z80 (alphabetical, opcode)


    Example sourcefiles (GB-Z80):

    A simple scroller (.tar.gz)
    A simple parallax scroller (.tar.gz)


    Useful sourcefiles (GB-Z80):

    GBComp (.zip) by Sam Nova
    PacBoy (.tar.gz) by Aleksi Eeben
    PacGirl (.tar.gz) by Aleksi Eeben
    Many useful GBC routines (.tar.gz) by Ville Helin
    M4x4 (C2P/GBC) (.tar.gz) by Ville Helin
    SM4x4 (Static C2P/GBC) (.tar.gz) by Ville Helin
    C4x4 (288 Color C2P/GBC) (.tar.gz) by Ville Helin


    Related links:

    NesDev @ Parodius
    SMS Power S8-Dev
    Jeff Frohwein's Gameboy Dev'rs
    Martin Konrad's GGT, the coolest thing ever written using WLA DX!


    WLA history:

    v9.9 (15-Aug-2019)
  • [ALL] Added unions: .UNION (and .NEXTU and .ENDU).
  • [ALL] Added a new syntax to .DSTRUCT (old works, too).
  • [ALL] Changed the way ".ENUM xyz DESC" works.
  • [ALL] .ROW and .DATA should now work better with 16-bit and 24-bit values.
  • [ALL] Defines with negative values are now parsed better.
  • [ALL] .BLOCK (and .ENDB) prints the block size once again.
  • [ALL] Added support for C++ style comments (//).
  • [ALL] WLA assembles now "WLA4" library files and "WLAV" object files.
  • [ALL] References to a pending computation from inside a define from inside a pending computation should work now.
  • [ALL] WLA can now be given string definitions from the command line.
  • [680] Added support for MC6800.
  • [680] Added support for MC6801.
  • [680] Added support for MC6809.
  • [800] Added support for I8008.
  • [658] 24-bit addresses of .RAMSECTION labels should work now when using .LOROM / .HIROM. / .EXHIROM.
  • [GB ] Fixed Pocket Camera cartridge type, added support for 64Mbit ROM and 512kbit RAM types.

  • v9.8 (21-Jun-2019)
  • [ALL] Deprecated and removed section's size giving inside section's name string.
  • [ALL] Getting bank number with :CADDR works again.
  • [ALL] WLA assembles now "WLA3" library files and "WLAU" object files.
  • [ALL] .REPEATs, .DBs, .DWs, .DLs and macro calls don't mess up listfiles any more.
  • [ALL] Added support for prioritizing sections when placing them to the output ROM/PRG.
  • [ALL] The _sizeof_[label]s for labels that are followed by a dotted .DSB etc. are now calculated correctly.
  • [ALL] The maximum allowed number of digits for floats is now 24 instead of the old 8.
  • [ALL] _sizeof_[label]s are now calculated correctly for .STRUCTs in .RAMSECTIONs.
  • [ALL] WLA's -x flag now creates SECTIONSTART_[section name] and SECTIONEND_[section name] labels for each section.
  • [ALL] The assembler and the linker now display examples about how to run them when run with incorrect parameters.
  • [ALL] .RAMSECTIONs can now be used inside libraries but BANK and SLOT must be defined for the RAMSECTIONs under [ramsections] in WLALINK's linkfile.
  • [ALL] WLA (WLALINK did this already) assumes that there are 256 RAM banks for each SLOT. The number of ROM banks doesn't affect the number of RAM banks any more.
  • [ALL] Added APPENDTO to .RAMSECTIONs.
  • [ALL] Added .TABLE, .ROW and .DATA - an alternative to .DB, .DW and .DL.
  • [ALL] When allocating a new unknown reference, we'll set its base to 0 instead of not initializing base at all.
  • [ALL] When inserting padding to a section (for example for an unsolved 8-bit reference) we now set the padding to be $CD instead of letting it be uninitialized.
  • [ALL] References from bank header sections are now found when we discard unreferenced sections.
  • [ALL] Fix buffer overflow for \xXX strings.
  • [ALL] Fixed a possible crash bug when printing opcodes in DEBUG executable.
  • [ALL] Allow .BACKGROUND file to be smaller than the output ROM.
  • [ALL] Fixed a couple possible buffer overflows.
  • [ALL] Fixed CRC calculating on some 64-bit platforms.
  • [ALL] Macros rounded all floating point arguments to integers - not any more.
  • [ALL] Added support for "string".length.
  • [ALL] The documentation is now ReadTheDocs.org compatible.
  • [ALL] Running the assembler/linker without arguments shows now also the version's date.
  • [ALL] Added -A to WLALINK - Add address-to-line mapping data to WLA symbol file.
  • [ALL] WLA and WLALINK give now more information about the cause when a memory overwrite/overflow occurs.
  • [ALL] Added .ADDR (alias of .DW).
  • [ALL] Updated the dotted to-be-skipped directives list in .ENUM and .RAMSECTION to contain missing items.
  • [ALL] .DEFINE now supports keyword EXPORT (auto export).
  • [ALL] Added .PRINT - a combination and more usable version of .PRINTT and .PRINTV.
  • [ALL] .PRINTV's HEX/DEC are optional. Default is DEC.
  • [ALL] Added .ENUMID - creates definitions with an auto-incrementing value. Can autoexport as well.
  • [GB ] Added support for .VERSION (Mask ROM version number).
  • [GB ] Fixed the handling of RAMSIZE inside of .GBHEADER.
  • [GB ] New licensee code is set to $0000 if old licensee code is used.
  • [GB ] Added VERSION ($014C) to .GBHEADER.
  • [GB ] Added the following mnemonic aliases: 1. LDH A,(C) --> LD A,($FF00+C) 2. LDH (C),A --> LD ($FF00+C),A
  • [658] Added .DSL.
  • [658] Added .FARADDR (alias of .DL).
  • [658] Added support for DL/LONG/DSL to .STRUCT and .RAMSECTION.
  • [658] Added support for .EXHIROM.
  • [658] MVN and MVP had source and destination in wrong order in the output binary.
  • [SPC] Fixed a typo, RET1 is now RETI.
  • [SPC] Fixed a typo, "AND1 mem.bit, C" ($CA) is now "MOV1 mem.bit, C"
  • [SPC] Fixed AND1, EOR1, MOV1, NOT1 and OR1 (used to take two 8-bit arguments, now 13-bit address and 3-bit value.
  • [SPC] Fixed many 8-bit PC relative label references to be direct references.
  • [Z80] Added shadow register aliases of opcodes that use registers A, F, BC, DE and HL. For example, "AND A'" assembles to the same (0xA7) as "AND A". The aliases are meant for programmers who want to explicitly show when they are using the shadow registers.

  • v9.7 (17-Apr-2018)
  • [ALL] We now use CMake instead of plain Makefiles.
  • [ALL] Added INSTANCEOF support to .STRUCT.
  • [ALL] Removed DEBUG opcode from GB-Z80.
  • [ALL] WLALINK now reserves the bytes the checksummer uses if WLA is used to calculate a checksum.
  • [ALL] Added ALIGN to .RAMSECTIONs.
  • [ALL] .RANSECTIONs now use the BANK when placing sections.
  • [ALL] .BLOCK needs to be now terminated with .ENDB.
  • [ALL] Fixed some typos in error messages.
  • [ALL] Added a directory called "bug_exhibition" for bug reports.
  • [ALL] When parsing "\1.w" the parser now associates the ".w" part with the "\1" part.
  • [ALL] Recursive macro calls with recursive argument references should work now.
  • [ALL] .ASC can now map also byte data.
  • [ALL] Rewrote the macro argument expander.
  • [ALL] Fixed .INCDIR/.INCBIN cache bug.
  • [ALL] Added support for -I [include directory].
  • [ALL] Added ASCII commands to strings.
  • [ALL] Renamed .SECTION IDENTIFIER to NAMESPACE.
  • [ALL] Added support for local labels with @ prefix.
  • [ALL] "historical" contains now old. depcerated files.
  • [ALL] Updated WLA/WLALINK argument parser.
  • [ALL] Sphnix is now used to generate the documents.
  • [ALL] Various bug, crash and error message fixes.
  • [ALL] Labels can now be 255 characters long instead of 63.
  • [ALL] Various fixes to negative range for 8-bit two's complement.
  • [ALL] Power operator supports fractional values.
  • [ALL] Expressions are allowed to be outside 16bit range.
  • [ALL] Added support for _sizeof_[label] automatic definitions to WLALINK, these measure the distance between two consecutive labels in bytes.
  • [ALL] Unreferenced section discarding now handles also RAM sections.
  • [ALL] It's possible to append to a section using APPENDTO.
  • [ALL] .IFDEFs can be used in .ENUMs and .RAMSECTIONs.
  • [ALL] .BASE is now universal, not just 65816 specific.
  • [ALL] Speeded up label handling in WLALINK.
  • [Z80] Added .SMSHEADER.
  • [Z80] Added support for "SUB IXH" and "SUB IXL", and kept the old aliases "SUB A, IXH" and "SUB A, IXL".
  • [Z80] Fixed .SDSCTAG parsing.
  • [658] Added support for .DL.
  • [GB ] Added support for .COUNTRYCODE.
  • [GB ] Added support for .GBHEADER.
  • [GB ] NO$GMB symbol files are now BGB (emulator) compatible.
  • [GB ] Added support for .NINTENDOLOGO.
  • [GB ] Added DESTINATIONCODE as an alias for COUNTRYCODE.
  • [GB ] Added support for .ROMGBCONLY.

  • v9.6 (27-Jan-2015)
  • [ALL] Fixed usage info (was missing -i).
  • [ALL] Moved the project to GitHub: https://github.com/vhelin/wla-dx
  • [ALL] Renamed local variables in a lot of functions to make the code easier to understand.
  • [ALL] Moved LDFLAGS to end of GCC invocation to fix builds.
  • [ALL] Changed "-pedantic" to "-pedantic-errors -Wextras" in WLA's and WLALINK's makefiles.
  • [ALL] Add ability to compile using Microsoft CL, LINK, and NMAKE / Added makefile generator m4 scripts.
  • [ALL] Fixed .ROMBANKMAP and .BANKS allocation to prevent heap corruption when .BANKS allocated exceeds .BANKSTOTAL
  • [ALL] Added support for more than 255 sections per file.
  • [ALL] WLA compiles now "WLAW" library files and "WLAL" object files.
  • [ALL] Added optional running index definition to .REPEAT / .REPT.
  • [ALL] The calculation parser in WLA DX is now smarter - it knows more places when to stop parsing.
  • [ALL] Feeding address labels via named ARGS to a .MACRO failed before, because they were interpreted as strings, not address labels.
  • [ALL] Changed all references to bash to sh in scripts.
  • [ALL] Added support for SEMISUBFREE sections.
  • [Z80] .SDSCTAG & .SMSTAG & .COMPUTESMSCHECKSUM now work with 8KB & 16KB ROMs.
  • [Z80] .SDSCTAG's minor version number is now parsed correctly.

  • v9.5 (14-Aug-2008)
  • [ALL] The unix.sh now takes the number of jobs make commands should create, speeding up the compiling on CPUs with more than one core.
  • [ALL] .DSTRUCTs can now be issued without passing values to all struct members (will be init to $00 or .EMPTYFILL).

  • v9.4 (02-Mar-2008)
  • [ALL] Enhanced the documentation.
  • [ALL] .DEFINE without a definition value, and a .DEFINE that would have an address label as the definition value would make WLA count the linenumbers afterwards wrong.
  • [ALL] Issuing a loose .ENDM will give an error.
  • [ALL] All macros must have at least a name.
  • [ALL] Added .DBM (define bytes through a filter macro) and .DWM (define words through a filter macro).
  • [ALL] Added FILTER to .INCBIN (circulate all the data through a filter macro).
  • [ALL] Fixed overflow checks in .INCBIN's SKIP and READ.
  • [ALL] Integrated Mersenne Twister by Takuji Nishimura and Makoto Matsumoto (.SEED, .DBRND and .DWRND use that now instead of the stdlib's srand() and rand()).
  • [ALL] It's possible to use '\!' to get the name of the currently parsed source file (works like '\@').
  • [Z80] If a pending computation follows "JR" or "DJNZ", all the label references inside are relative.
  • [GB ] If a pending computation follows "JR", all the label references inside are relative.
  • [65?] If a pending computation follows "BCC", "BCS", "BEQ", "BMI", "BNE", "BPL", "BVC", "BVS", all the label references inside are relative.
  • [65C] If a pending computation follows "BCC", "BCS", "BEQ", "BMI", "BNE", "BPL", "BVC", "BVS", "BRA", "BBR*", "BBS*", all the label references inside are relative.
  • [658] If a pending computation follows "BCC", "BCS", "BEQ", "BMI", "BNE", "BPL", "BVC", "BVS", "BRA", "BRL", "PER", all the label references inside are relative.
  • [HuC] If a pending computation follows "BCC", "BCS", "BEQ", "BMI", "BNE", "BPL", "BVC", "BVS", "BSR", "BBR*", "BBS*", "BRA", all the label references inside are relative.
  • [SPC] If a pending computation follows "BCC", "BCS", "BEQ", "BMI", "BNE", "BPL", "BVC", "BVS", "BRA", "BBS", "BBC", "CBNE *", "DBNZ *", all the label references inside are relative.

  • v9.3 (09-Sep-2006)
  • [ALL] Updated makefiles (by Tobias Pflug).
  • [ALL] Added 'memorymaps'-directory, where you can find default .MEMORYMAPs for various machines.
  • [ALL] Enhanced .MEMORYMAP defining.
  • [ALL] Added .ASCIITABLE (.ASCTABLE) and .ASC.
  • [ALL] .DEFINE works also without a definition value (defaults to 0).
  • [ALL] Added .BLOCK and .ENDB.
  • [ALL] Added .SYM (and alias .SYMBOL).
  • [ALL] Added .BR (and alias .BREAKPOINT).
  • [ALL] Added .SHIFT.
  • [ALL] Relaxed the MACRO argument counting. Any MACRO can now be called with varying number of arguments.
  • [ALL] .DEFINE can now handle definitions where lone address labels appear (e.g., only "MAIN+0" used to work).
  • [ALL] Added AmigaOS4 makefiles (by Ventzislav Tzvetkov).
  • [ALL] Some code cleanups.
  • [ALL] Fixed the WIN32 makefiles (by Daniel Horchner).
  • [650] Fixed class 4 opcodes to work again.

  • v9.2 (22-Aug-2004)
  • [ALL] WLA can generate makefile rules (flag 'M') describing the dependencies of the main source file.
  • [ALL] Added flag 'q' to suppress .PRINT* -directives.
  • [ALL] Hexadecimal values can now be given using the suffix 'h' (e.g., 10h and 0abh).
  • [ALL] Fixed the preprocessor to handle cases like "-: jr -".
  • [ALL] Sections did affect the .ORG outside of them, in some special cases.
  • [ALL] Added "RETURNORG" to .SECTION to (hopefully) fix this thing once and for all.

  • v9.1 (26-Jun-2004)
  • [ALL] Sections do not affect the .ORG outside of them.
  • [ALL] Code cleanups.
  • [ALL] .IFs can compare string definitions.
  • [ALL] WLA compiles now "WLAV" library files and "WLAK" object files.
  • [ALL] Added preliminary support for list files.
  • [ALL] Added aliases .DEF (.DEFINE), .REDEF (.REDEFINE), .UNDEF (.UNDEFINE), .WORD (.DW), .BYT (.DB), .BYTE (.DB), .ASC (.DB), .EQU (.DEFINE) and .REPEAT (.REPT).
  • [ALL] Added .FOPEN, .FCLOSE, .FREAD and .FSIZE.
  • [ALL] Increased the case insensitivity in many directives.
  • [ALL] It's possible to use "=" in .DEFINE and .REDEFINE.
  • [ALL] The initial size of a section can now be given with the keyword "SIZE" (take a look at the README).
  • [ALL] .FAIL exits nicer.
  • [ALL] .ENUM can do descending enumeration.
  • [ALL] Added operators '>' (get the high byte) and '<' (get the low byte).
  • [ALL] FREE, SEMIFREE and SUPERFREE sections can be aligned.
  • [ALL] Added "FSIZE" to .INCBIN.
  • [ALL] .STRUCT creates more definitions.
  • [ALL] Structure members can now be used in computations.
  • [ALL] Relaxed the handling of '.' in stack calculator. Now for example "AND1 C,1+2+3.3-2-1" works (SPC-700).
  • [Z80] Fixed opcodes in group 7 to work again. A new feature in 9.0 broke these.
  • [658] .SNESHEADER, .SNESNATIVEVECTOR and .SNESEMUVECTOR don't work with libraries any more.
  • [658] .SNESNATIVEVECTOR and .SNESEMUVECTOR don't change .ORG anymore.
  • [658] All the vectors of .SNESNATIVEVECTOR and .SNESEMUVECTOR are optional and default to $0000.
  • [658] Added .SMC, .INDEX and .ACCU.
  • [658] Operand hinting overrides SEP/REP/.INDEX/.ACCU when dealing with immediate value opcodes (now when did this break?), and .8BIT/.16BIT/.24BIT affect only the rest of the opcodes. WARNING! Check your code as this fix may break it.
  • [658] "LDY.W #?" works now.
  • [658] Added 24bit operand hint .l.
  • [65x] Added more operand size checks to opcode parsers.