Declaring Variables in XKAS

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Declaring Variables in XKAS
by on (#174891)
I'm sorry if this is a dumb question but I am declaring variables in a from-scratch rom in xkas. I am declaring shadow hardware registers like this:

Code:
define INIDISP         $0000
define OBSEL         $0001
define OAMADDL         $0002
define OAMDATA         $0003
define BGMODE         $0004
define MOSAIC         $0005
define BG1SC         $0006
define BG2SC         $0007
define bg3SC         $0008


It worked in my last experiment, however it is very tedious; I'm only up to $2121 and I want to kill myself. When I was using ASM6 for nes there was an enum directive and .db etc. Is there something like this for xkas or, at the very least, a better method than the abouve?
Re: Declaring Variables in XKAS
by on (#174893)
AzimuthFE wrote:
Is there something like this for xkas or, at the very least, a better method than the abouve?

Not really.

xkas isn't really recommended for anything other than patching existing ROMs for reasons like this; for developing "from scratch" you'll probably have a better time with something like ca65 or WLADX.