One of the things that was puzzling me was how the reset car position worked, why does it show up in the center of the track about line 0x1B0?

I looked at this and looked at it, and couldn't figure out how it gets put there.

If you look at a track, it shows up at offset 0x1b0 (since this track starts at 0x600, it is on the line 0x7b0) in the middle.
Code
/mnt/z/mame/roms/lemans/005839.n6	1536
adr:600 6  3210| 6      | 6 4    | 6 4   0| 6 4  1 | 65   1 | 654  1 |7     10|7  4  10|7  4  1 |7 5   1 |7 54  1 |7 54   0|7 54    |76      |
adr:61076  3210|76  321 |7 54321 |7 5432 0|7 5432  |7 5 32  |7  432  |7   3 10| 6543 10| 65432  | 65 32  | 6 432  | 6 432 0| 6 4321 | 6  321 |
adr:6207   3210|        |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |        |  5 3 1 |7 5     |        |        |        |
adr:630        |        |  5     |        |        |        |        | 6543  0|       0|       0|        |    3   |        |        |        |
adr:640        |        | 6      |        |        |        |        | 6543  0|        |7    2  |        |     2  |        |        |        |
adr:650        |        | 6      |  5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7       |7  4    |    3   |    3   |        |        |        |
adr:660        |        | 6      |   4    |        |     2  |        |        |        |76      |  5     |  5     |        |        |        |
adr:670        |        | 6      |   4    |        |  5     |        |        |       0|        |7       |7       |        |        |        |
adr:680        |        |  5     |  5     |       0| 65 32 0|   4 2 0| 6 4 2 0| 6 4 2  |      1 |      1 |7 5 3   |        |        |        |
adr:690        |        |   4    | 6      |    3   |        |7       |        | 65 32 0|    3   |    3   |     2  |        |        |        |
adr:6a0        |        |  5     |  5     | 6      |     2  |        |        |        |  5     |  5     |     2  |        |        |        |
adr:6b0        |        | 6      |   4  1 |        |  5     |    3 1 |7 5 3 1 |7 5 3 1 |7 5     |  543  0|     2  |        |        |        |
adr:6c0        |        | 6      |   43   |       0| 6 43  0| 6      |        |        |   4    |      1 |     2  |        |        |        |
adr:6d0        |        |  5     |  5     |    3   |      1 |        |        |        |    3   |    3 1 |     2  |        |        |        |
adr:6e0        |        |   4    | 6      |  5     |   4    |     2 0| 6 4 2 0| 6 4 2 0|      1 |7 5   1 |     2  |        |        |        |
adr:6f0        |        |  5     |  5     |  5     |   4    |   4    |   4    |   43  0| 6     0|      1 |     2  |        |        |        |
adr:700        |        | 6      |   4    |   4 2  |     2  |    3   | 6      |   43  0|  5     |7     1 |     2  |        |        |        |
adr:710        |        | 6      |   4    |   4   0|      1 |     2  |7      0| 6 4    |   4    | 6 4 2  |     2  |        |        |        |
adr:720        |        |  5     |  5     |  5     |7      0|      10|      1 |    3   |    3   |        |     2  |        |        |        |
adr:730        |        |   4    | 6      | 6     0|      10|      1 |     2  |     2  |     2  | 65 32 0|    3   |        |        |        |
adr:740        |        |  5     |  5     |  5  2  |     2 0|      1 |     2  |      1 |       0| 6 4 2 0| 6 4    |        |        |        |
adr:750        |        | 6      |   4    |   43   |   4   0|        |     2  |       0|        |        |    3   |        |        |        |
adr:760        |        | 6      |   4    |   4    | 6      |7       |    3   |        | 6      | 65 32 0|     2  |        |        |        |
adr:770        |        | 6      |   4    |  5     |76543210|76543210|76543210|76543210|76543210|7654    |     2  |        |        |        |
adr:780        |        | 6      |   4    |       0|    3  0|        |        |    3  0|        |    3   |     2  |        |        |        |
adr:790        |        | 6      |   4    |       0|    3  0|        |        |    3  0|        |    3   |     2  |        |        |        |
adr:7a0        |        | 6      |    3 1 |7 5 3 1 |76543210|76543210|76543210|76543210|76543210|7654    |     2  |        |        |        |
adr:7b0        |        | 6      |        | 65432 0|        |        |STARTPOS|        |        |        |     2  |        |        |        |
adr:7c0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:7d0        |        | 6      |        | 65432 0|        |        |        |        |        |        |     2  |        |        |        |
adr:7e0        |        |  5     |        | 65432 0|        |        |        |        |        |        |    3   |        |        |        |
adr:7f0        |        |    3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5 3 1 |7 5     |        |        |        |


Well, the vertical position counter is 12 bits (0-4096) and if we reset it to zero at the start of the frame, where will the car end up?

The screen is 521 lines so let's divide 4096 by 521.

so we divide it and we get 7.86 frames

> (4096 / 521)
7.8618042226488

multiply 7 * 521 = 3647

and subtract 4096 - 3647 = 449 which is 0x1c1 which is really close to 0x1b0. Maybe it's slightly different because of when the vertical blank hits.


===============================




[Linked Image from i.imgur.com]


Also I was trying to figure out how the 9314 worked (used to do checkpoints and scoring) and recreate it in Logisim, but it's got this weird symbol that looks like an AND gate but the inputs come into the side.

What does this mean?

edit: after a bunch of searching around, it's a wired and.

[Linked Image from i.imgur.com]