OR a virtual memory approach, which could work; ie: virtual memory might brutalize the speed if the game jumps all over, but if its a halfway smart VM system, it'd be okay; make pages of 32k or something, so they're pretty big but not too big, and then page in as you need them.. paging from SMC would be very slow, but what the heck. (ie: Pages of 32k.. not that big, but how big are graphcis on SNES? You dont' want the pages too big since you don't want to load in an extra few humdred K when you only need 5 bytes.. but not too small so you dont' page like mad).
I've thought about it on occasion..
vmmalloc() and vmfree() and then macros to access it VM(basehandle,ptr); so instead of just using foo[1000] you'd use:
handle = vmmalloc ( 3000000 );
Then use VMARR ( handle, 1000 ) to get foo[1000] type functionality, or VM(handle,p) to get "*p" type functionality.
But it'd slow your reads down by half.. so you woudlnt' do this for emulated memory or stack or thelike, but you would use it for accessing the memory mapped cartridge, say.
But its easier just to say "no SNES carts larger than 4MB" anyway, since SNES emulation is already slow and making it slower would just be a drag.
jeff