Here is the issue: I don’t really know what they are! So I’m going to put my understanding of them here but am relying on someone to verify or correct my explanation. I’ll update this post with any corrections and improvements made.
Pointer Tables
This forum post on Zoprha’s Domain looks to be the best explanation of pointer tables I’ve found: http://www.zophar.net/forums/showthread ... nter+table but they are also explained on this NesDev article: http://wiki.nesdev.com/w/index.php/Pointer_table and I’m fairly certain http://www.romhacking.net has some docs on the matter as well although my search proved fruitless (well one article by KingMike on converting SNES 2 byte pointers to 3 byte pointers).
The majority of reading I’ve done explains them in terms of game text and they are used where variable length data is used (such as in game dialog where each sentence is of different length or graphics data that isn’t all a set size).
Imagine, to make things easier for your developers, you keep all your text together in your ROM (ignore actual lengths in this example):
Code: Select all
00600000: “Princess is in another castle#”
00600013: “All your base#”
00600020: “C-c-c-combo breaker#”
00600025: “SNAKE!!!#”
Code: Select all
00300000: $00600000
00300004: $00600013
00300008: $00600020
0030000C: $00600025
Code: Select all
Move.l #$00300000, A0
Move.l $08(A0), A1
Move.l (A1), D0
Do something with D0
Jump Tables
When I think of a jump table I just think of a section of code that has multiple jump statements together like this section from Toejam and Earl:
Code: Select all
00001286 48E7 3038 MOVEM.L D2-D3/A2-A4,-(A7)
0000128A 247C 00026F76 MOVE.L #$00026F76,A2
00001290 267C 00FF8000 MOVE.L #$00FF8000,A3
00001296 287C 00026FDA MOVE.L #$00026FDA,A4
0000129C 16BC 0060 MOVE.B #$60,(A3)
000012A0 4EBA F2AA JSR $0000054C(pc) (Clear Ram Routine 1)
000012A4 4878 0001 PEA $0001
000012A8 42A7 CLR.L -(A7)
000012AA 4879 00FF800E PEA $00FF800E
000012B0 4EB9 00025900 JSR $00025900 (VDP Writes Routine 1)
000012B6 4EB9 0003E384 JSR $0003E384 (RAM Writes Routine 1)
000012BC 4EBA FF1A JSR $000011D8(pc) (I/O Routine 1)
000012C0 4EB9 0003F50A JSR $0003F50A (I/O Routine 2)
000012C6 4EB9 0003ECFE JSR $0003ECFE (Massive Routine 1)
Does anyone have a real world 68K example of either of these or better explanation? Is my thinking right or terribly, terribly wrong?