The hex code above is pretty foreign to me, although I can see that each set of three appears to increment.
Hexadecimal is just a numeral system with a base of 16 instead of 10.
Because we need to represent the numbers 10-15 with a single digit, we use the letters A through F:
A = 10, B = 11, C = 12, D = 13, E = 14, F = 15
As an example, 76 (decimal) is the equivalent of 4C (hex).
In decimal notation, 76 = ( 7 x 10 ) + ( 6 x 1 ) = 70 + 6
Similarly, in hexadecimal, 4C = ( 4 x 16 ) + ( 12 x 1 ) = 64 + 12
Do I read this left-to-right or top-to-bottom?
Left to right.
Does each set of three represent an X-position on the screen?
Each set represents 3 separate values, 1 for each frame. I grouped them that way to show that the X-Position increases by +1 for the first 2 frames, but is unchanged in the 3rd frame. I should have presented the data more clearly.
So, the first 4 sets (3F 40 40; 41 42 42; 43 44 44; 45 46 46) contain Mario's X-Position for 12 consecutive frames:
| | X-Position | | X-Position |
Frame | | (Hex) | | (Decimal) |
01 | | 3F | | 63 |
02 | | 40 | | 64 |
03 | | 40 | | 64 |
04 | | 41 | | 65 |
05 | | 42 | | 66 |
06 | | 42 | | 66 |
07 | | 43 | | 67 |
08 | | 44 | | 68 |
09 | | 44 | | 68 |
10 | | 45 | | 69 |
11 | | 46 | | 70 |
12 | | 46 | | 70 |
What would this code look like if there was no dead frame?
If all dead frames were eliminated, the X-Position would increase by +1 for
every frame, not just 2 out of 3.
So, it would look like this:
3F 40 41 | | 42 43 44 | | 45 46 47 | | 48 49 4A | | 4B 4C 4D | | 4E 4F 50 | | 51 52 53 | | 54 55 56 |
57 58 59 | | 5A 5B 5C | | 5D 5E 5F | | 60 61 62 | | 63 64 65 | | 66 67 68 | | 69 6A 6B | | 6C 6D 6E |
6F 70 71 | | 72 73 74 | | 75 76 77 | | 78 79 7A | | 7B 7C 7D | | 7E 7F 80 | | 81 82 83 | | 84 85 86 |
87 88 89 | | 8A 8B 8C | | 8D 8E 8F | | 90 91 92 | | 93 94 95 | | 96 97 98 | | 99 9A 9B | | 9C 9D 9E |
9F A0 A1 | | A2 A3 A4 | | A5 A6 A7 | | A8 A9 AA | | AB AC AD | | AE AF B0 | | B1 B2 B3 | | B4 B5 B6 |
B7 B8 B9 | | BA BB BC | | BD BE BF | | C0 C1 C2 | | C3 C4 C5 | | C6 C7 C8 | | C9 CA CB | | CC CD CE |
CF D0 D1 | | D2 D3 D4 | | D5 D6 D7 | | D8 D9 DA | | DB DC DD | | DE DF E0 | | E1 E2 E3 | | E4 E5 E6 |
E7 E8 E9 | | EA |
The table is smaller, because fewer frames would be required to reach the right edge of the screen.