Here's a thought or two about possible mapper implementations that would help when making higher-level languages for the NES. I hope if anyone is working on new mappers (which I am not BTW), you'll take these into consideration.
Use address lines for register state transfer, not data lines
For instance, let's say you have eight bits of state per register. A conventional mapper might use the eight data bus lines for state transfer, and A14-A12 for function selection. This allows function state transfer such as this:
This is convenient for assembly programmers and useful when value is dynamic. However, there's a better approach: use A0-A7 for state transfer, and A14-A12 for function selection. This allows dynamic function state transfer like this:
And static state transfer, where value is known at assembly time, can be done in a single instruction without disturbing the contents of any register:
This allows far method calls to be done in a thread-safe and efficient manor, and will help ease pains of high-level language designers when dealing with limited contiguous address space.
Random access mass data storage
The ability to access a mass storage device like a serial flash chip or SD card via a byte-wide mapper register would be optimal for accessing data. Any dynamically loaded data like level layouts can easily be read and shoved into WRAM. This means less parallel storage is required (128kb should be plenty for program code - data) and more content can be placed into the game without the worry or hassle of compression and storage constraints.
With these two points in mind, I guess you'd use high address lines for function select and A0-A2 for bank select on a given function.
Use address lines for register state transfer, not data lines
For instance, let's say you have eight bits of state per register. A conventional mapper might use the eight data bus lines for state transfer, and A14-A12 for function selection. This allows function state transfer such as this:
Code:
lda value
sta function_address
sta function_address
This is convenient for assembly programmers and useful when value is dynamic. However, there's a better approach: use A0-A7 for state transfer, and A14-A12 for function selection. This allows dynamic function state transfer like this:
Code:
ldx value
sta function_address,x
sta function_address,x
And static state transfer, where value is known at assembly time, can be done in a single instruction without disturbing the contents of any register:
Code:
sta function_address+value
This allows far method calls to be done in a thread-safe and efficient manor, and will help ease pains of high-level language designers when dealing with limited contiguous address space.
Random access mass data storage
The ability to access a mass storage device like a serial flash chip or SD card via a byte-wide mapper register would be optimal for accessing data. Any dynamically loaded data like level layouts can easily be read and shoved into WRAM. This means less parallel storage is required (128kb should be plenty for program code - data) and more content can be placed into the game without the worry or hassle of compression and storage constraints.
With these two points in mind, I guess you'd use high address lines for function select and A0-A2 for bank select on a given function.