Consider #define'ing AICA RAM size to 2/8MB, selected by another definition (command-line given) to switch between NAOMI and DC. Also, rather than doing that if (in_range) you could do address & mask, where mask is size - 1. This way you can always have wide SA and not worry about it, as it will get masked and fit into DC memory even if you set the high bits.
This BTW makes my life much easier, I can work on either project and when I change the sources I just copy the files over.

I know next to nothing about Saturn but my DSP code treats invalid IRA as hardware zeros. Well it's either that or the address decoder only tests the highest bits and will wrap.
Then again I've seen some "invalid" values being written to hardware and performing neat tricks smile