|
im about to implement chr bank switching in the mapper4 (mmc3). While implementing mmc1, i thought of using 2 patern table pointer like so:
byte patern_table[0x2000] byte *patern_table0 byte *patern_table1
Now, i only have to do
patern_table0 = &chr_rom[bank * 0x1000]
to put the bank in place. (my ppu use the pointers to read and write data into parten tables). On a game with no mapper, i simply do
patern_table0 = patern_table; patern_table1 = &patern_table[0x1000];
Now, with mapper 4, there is some 1k bank switching (8 different banks), so this scheme doesnt work anymore. I was thinking of splitting even more my patern table (patern_table0,1,2,3,4,5,6 and 7) but it fells wrong to me. Is this a correct and somewhat efficient method or am i going to hell with this?
|