jrlepage wrote:I'm afraid I know bugger all about any sort of programming, so I wouldn't be able to help. :<
I can tell you the files I need to merge use bankswitching and that they have the NTSC flag only (no dual NSFs). That's all I can say, I'm afraid. I am but a musician...
Then, if this idea of execution tracing is used, it would also have to trace all bankswitching and then recompile the program to use different bank numbers! If the bank numbers are being calculated, or the bank numbers are being used for things other than bank numbers, then it would have to add instructions, and might interfere if exact CPU clock timing is required.
Another simpler idea (probably not relevant to what you are doing, though): If no more than one input file uses bankswitching: Set a high bank number used for the init routine which sets up everything and calls the input file's init routine (it could copy a part of itself into RAM and execute there before switching the initial banks). If the play addresses differ, then it should also ensure no input files use MMC5 ExRAM, so that the jump to play routine could be stored there.
rainwarrior wrote:NSFPlay intentionally blocks FDS ram writes from conflicting locations if other expansions are enabled, so VRC6/VRC7/5B should not cause a problem for that player.
All bets are off for other players. Implementations of FDS RAM for NSF players differs widely.
Yes I know, the implementation can differ widely and that the specification says about those things. (If you know you are using it only with players that block FDS RAM writes from conflicting locations, you could modify CombiNSF to ignore that error.)
(My hardware implementation (not yet built) does not block writes, as this is simpler; however it does have flags to: write-protect FDS RAM, mute VRC6 audio, mute VRC7 audio, and mute Sunsoft 5B audio. Famicom Disk System audio, MMC5 audio, and Namco 163 audio cannot be muted in this way.)
If you want to know about CombiNSF working you can look at the source-codes! Even modify if you like to do so; it is designed that methods can be added, and method 0 to try each method until finding one which is not error. (If anyone send a patch, I might add it; if I figure out the algorithms myself, I will program them myself.)