Techniques for bigger jump tables?
Posted: Mon Nov 06, 2017 2:37 am
I usually employ the jump table/split jump table technique, running as many parallel tables as I need values for my structs. However, this creates a hard cap of 256 entries/indexes. So what I'm wondering, what are the various techniques for creating "structs" that can accommodate more than 256 entries?
The wiki unfortunately doesn't have (that I could find) a page on techniques for this. I'm especially interested in techniques that have some advantage over the others (cycles, complexity, etc). Right tool for the problem, right? I'm also curious if these techniques have any "name" like we have for "split jump table" or "rts trick", so I can google up more information.
The one I already know about is the classic LDA (address),Y trick, where you store the address to a blobish struct and read out it's values by adjusting Y.
But I imagine there must be more. Maybe using the carry to switch between table1 and table2, or jump tables of jump tables, or MMC5's multiplication register, or using some self-modifying code, etc.
The wiki unfortunately doesn't have (that I could find) a page on techniques for this. I'm especially interested in techniques that have some advantage over the others (cycles, complexity, etc). Right tool for the problem, right? I'm also curious if these techniques have any "name" like we have for "split jump table" or "rts trick", so I can google up more information.
The one I already know about is the classic LDA (address),Y trick, where you store the address to a blobish struct and read out it's values by adjusting Y.
But I imagine there must be more. Maybe using the carry to switch between table1 and table2, or jump tables of jump tables, or MMC5's multiplication register, or using some self-modifying code, etc.