There is also the 6502.org wiki that someone else had started.
I was gonna hype the wiki, but you beat me to it!
Does anyone have a good source of 65816 code snipets?
(snip)
I am working on font generation using look-up tables and block move routines.
I've got a few 65816 routines/techniques that I could add to the wiki, including two memory move routines. One is an extension of my 6502 memory move routines in the repostory that uses [zp],Y addressing, moves 2 bytes at time, and can handle lengths up to 16 meg. The other is faster, as it self modifies MVN and MVP instructions, and can also handle lengths up to 16 meg (MVN and MVP by themselves cannot span banks). (Actually lengths of >64k should generally be minimized since they are so time-consuming, but block spanning is useful.) I'll have to double check them, because I don't remember how extensively, or even if, I've tested them.
Other routines/techniques are:
1. m & x flag independence
2. Relative JSR and data
3. Parameter passing via the stack (it's not the only to do it, but it's available)
Can you add a 65816 Native Mode software section to your wiki? It would be better to keep it seperate from the 6502 code as the examples would not be cross compatible in most cases.
I agree that this is a reasonable category. I've started one called "65816 specific code" and added an m & x flag independence article as a starting point.
Most 6502 code should be applicable to the 65816, so a "6502 specific" category is probably not necessary.
ROM is expected to be at $00xxxx-$00FFFF, which seems silly.
Yes it does, but this is a ramification of the fact that RESET puts the 65816 in emulation mode, rather than native mode.
When _VP is asserted, the ROM (which normally sits in banks $FF and $E1) vectors are banked into bank zero. These vectors point into I/O space (which for Apple II compatibility, sits in bank zero anyway at $00C0xx), which then have hard-wired registers containing long-jumps into bank $E1.
Banks $FE and $FF are ROM. Bank $E1 is RAM (and I/O). At power up (RESET), bank $E1 is initialized with default values for various vectors (interrupt and otherwise).
Indirect jumps are also hardwired to be bank zero, BUT not indirect-indexed. E.g., JMP ($ABCD) will always fetch its vector from $00ABCD, while JMP ($ABCD,X) will use the current program bank.
Yes. JMP/JML [abs] is also uses bank 0, and JSR (abs,X) uses the program bank.
The part before the pipe is the webpage name on the wiki, and the part after the pipe is what we humans see on the website.
It's able to figure out that [[[A Webpage Name]]] means the page a-webpage-name, but I like to explicitly state both the page name and what is displayed for clarity's sake.