Since I no longer had the original X816 assembler source code I began rebuilding a new 65816 assembler a few months ago using Free Pascal but I've gotten to the point where it needs some real world testing and suggestions. The archive contains only the executable and a readme which is the actual directive/opcode table embedded into the .exe. It's a brief rundown of all the current and some future planned directives and functions. Scroll further down the readme and you will see the opcode tables for 65816, 6502, SPC700 (both native and 65816-style), as well as a partial SuperFX implementation.
Here's a short example of the setup, with a couple of nested repeats and a final bin save.
How functionable is it? I've been able to convert some older simple source codes, including the Tricks Zoomer which I recoded into mode 21 and use some direct page addressing just for testing. Really only the 65816 side has been regularly tested. I cut/pasted some SPC700 instructions with deliberate errors to test but that's about it.
Here's a short example of the setup, with a couple of nested repeats and a final bin save.
Code:
.snes lorom
.list
.symbol
.verbose off
.repeat 3,@y
.repeat 10,@x
nop
.echox "current address:",@pc
.echox @x+@y*10
.endrepeat
.endrepeat
.snes savebin
.list
.symbol
.verbose off
.repeat 3,@y
.repeat 10,@x
nop
.echox "current address:",@pc
.echox @x+@y*10
.endrepeat
.endrepeat
.snes savebin
How functionable is it? I've been able to convert some older simple source codes, including the Tricks Zoomer which I recoded into mode 21 and use some direct page addressing just for testing. Really only the 65816 side has been regularly tested. I cut/pasted some SPC700 instructions with deliberate errors to test but that's about it.
Code:
36 00008042 .cpu spc700
.target cpu SPC700
37 00000000 .base $0000
38 00000000 39 and (x),(y) ;$39,1,0,
39 00000001 28 34 and a,#$1234 ;$28,2,4,
*** error #2 line 39 value out of range >255
40 00000003 26 and a,(x) ;$26,1,0,
41 00000004 37 34 and a,[$1234]+y ;$37,2,1,
*** error #3 line 41 address out of range >255
42 00000006 27 35 and a,[$1234+1+x] ;$27,2,1,
*** error #4 line 42 address out of range >255
43 00000008 24 12 and a,$12 ;$24,2,1,
44 0000000A 34 12 and a,$12+x ;$34,2,1,
45 0000000C 25 34 12 and a,$1234 ;$25,3,2,
46 0000000F 35 35 12 and a,$1234+1+x ;$35,3,2,
47 00000012 36 35 12 and a,$1234+1+y ;$36,3,2,
48 00000015 38 34 34 and $1234,#$1234 ;$38,3,33,
*** error #5 line 48 value out of range >255
49 00000018 29 34 34 and $1234,$1234 ;$29,3,32,
*** error #6 line 49 address out of range >255
50 0000001B 6A 34 32 and1 c,/$1234.1 ;$6a,3,42,
51 0000001E 4A 34 52 and1 c,$1234.2 ;$4a,3,42,
52 00000021 88 21 adc a,#$4321
*** error #7 line 52 value out of range >255
53 00000023 97 70 adc a,[main&$ff]+y
54 00000025 0A 34 72 or1 c,$1234.3
55 00000028 3B 12 rol $12+x
56 0000002A 75 59 01 cmp a,345+x
57 0000002D 6F ret
58 00008042 [00002E] .endb
59 00008070
60 00008070 .cpu 65816
.target cpu 65816
61 00008070 main:
62 00008070 4C 70 80 - jmp -
.target cpu SPC700
37 00000000 .base $0000
38 00000000 39 and (x),(y) ;$39,1,0,
39 00000001 28 34 and a,#$1234 ;$28,2,4,
*** error #2 line 39 value out of range >255
40 00000003 26 and a,(x) ;$26,1,0,
41 00000004 37 34 and a,[$1234]+y ;$37,2,1,
*** error #3 line 41 address out of range >255
42 00000006 27 35 and a,[$1234+1+x] ;$27,2,1,
*** error #4 line 42 address out of range >255
43 00000008 24 12 and a,$12 ;$24,2,1,
44 0000000A 34 12 and a,$12+x ;$34,2,1,
45 0000000C 25 34 12 and a,$1234 ;$25,3,2,
46 0000000F 35 35 12 and a,$1234+1+x ;$35,3,2,
47 00000012 36 35 12 and a,$1234+1+y ;$36,3,2,
48 00000015 38 34 34 and $1234,#$1234 ;$38,3,33,
*** error #5 line 48 value out of range >255
49 00000018 29 34 34 and $1234,$1234 ;$29,3,32,
*** error #6 line 49 address out of range >255
50 0000001B 6A 34 32 and1 c,/$1234.1 ;$6a,3,42,
51 0000001E 4A 34 52 and1 c,$1234.2 ;$4a,3,42,
52 00000021 88 21 adc a,#$4321
*** error #7 line 52 value out of range >255
53 00000023 97 70 adc a,[main&$ff]+y
54 00000025 0A 34 72 or1 c,$1234.3
55 00000028 3B 12 rol $12+x
56 0000002A 75 59 01 cmp a,345+x
57 0000002D 6F ret
58 00008042 [00002E] .endb
59 00008070
60 00008070 .cpu 65816
.target cpu 65816
61 00008070 main:
62 00008070 4C 70 80 - jmp -