I have ported the WDC Tools based w65c816sxb-hacker to use the CC65 suite of tools. W65c816sxb-hacker was developed by Andrew Jacobs and is...
Quote:
A tool for modifying the firmware on your WDC W65C816SXB Development Board
The SXB development board has a 128K Flash ROM that can be updated under
software control. The design of the SXB board divides the ROM into four 32K
banks and maps one these into the memory area between $00:8000 and $00:FFFF.
A tool for modifying the firmware on your WDC W65C816SXB Development Board
The SXB development board has a 128K Flash ROM that can be updated under
software control. The design of the SXB board divides the ROM into four 32K
banks and maps one these into the memory area between $00:8000 and $00:FFFF.
Currently I generate a direct copy of the original binary found on Github. This original binary was lacking the last few commits that were made to the original repository. I will redo the missed commits and a few other oddities when I have had more time to test.
I have ported w65c265sxb-hacker. This produces output which is identical to the WDC Tools version. I am waiting for USPS to deliver my W65C265SXB board to test it.
One oddity that I noticed on both the sxb-hacker ports.
When the assembler is parsing addresses, it starts by assuming that an address is ABSOLUTE. ... To specify an address that is a direct page address, the `<' character precedes the address or expression.
In CA65 on the other hand, addresses default to the size of the segment based on the memory model. I assume you have the direct page set at page 0. See the CA65 documentation at Address sizes and Memory models.
Quote:
ca65 assigns each segment and each symbol an address size. ... The default address size of a segment depends on the memory model used.
Direct page could be anywhere so LDA 0,X is ambiguous unless the assembler has more info. By defaulting to the 16 bit address it won’t be wrong if zeropage was intended but it wll be wrong if direct page was intended AND the page is no longer at $0000. If you are using the direct page feature then you should tag your labels/addresses.
Defaulting to generating a direct page instruction is more fragile as changing the direct page elsewhere will break the program.
I have changed my mind, WDC’s choice is better for under-specified addresses as it doesn’t break 6502 code when used in a 65816 environment in which direct page might have been moved.
Does the assembler allow the use of '<' or '>' to force the address size?
The CA65 assembler uses < and > to select the low byte and the high byte respectively. It uses ^ to select the bank byte.
The address size can be forced using z:, a: and f: as prefixes for 8, 16 and 24 bit addresses.