I have documented every byte of The Sentinel game code, but that doesn't mean that I've fully understood every byte (though it's close). Almost every single aspect of the code is explained, but there are a few issues that could benefit from another look.
This page lists all of the outstanding issues of which I am aware. These are the notes I made as I analysed the source, so they are fairly terse and might not be terribly clear.
Main game loop
--------------
- SetScannerAndPause: Why the pause? This whole routine seems to have been patched into the code as an afterthought
Drawing the landscape
---------------------
- quadrantOffset: Explain what this is used for
- viewingQuadrantOpp: Explain what this is used for
- DrawLandscapeView (Part 1 of 3): Explain uses of quadrantOffset and viewingQuadrantOpp
- DrawLandscapeView (Part 3 of 3): Why does comparing drawViewPitchHi to 2 (after dlan21) mean that we're off-screen?
- GetTileViewEdges: Does the logic in this routine make sense? Is my analysis of buffersMinYaw/bufferMinYaw(Hi Lo) incorrect, and therefore the bits in tileIsOnScreen are incorrectly documented in GetTileViewAngles?
- DrawTileAndObjects: Explain uses of quadrantOffset, viewingQuadrantOpp and triangleStartPoint
- DrawSlopingTile: Explain triangleStart/triangleStartPoint, and the adding of 16 to A
- DrawTwoFaceTile: Explain the triangleStartPoint and A arguments that are passed from DrawSlopingTile
Drawing polygons
----------------
- DrawPolygonLines (Part 1 of 4): Why add 96 from bufferOffset(Hi Lo) to the address of the right row buffer in (S R)?
- DrawPolygonLines (Part 2 of 4): Why xPolygonRightEdge = bufferYawWidth * 2 at dpol7 (is bufferYawWidth in "pixels"?)
- DrawPolygonLines (Part 3 of 4): Explain the two similar calculations that "Set Y to the offset within the character row"
- GetPolygonLines (Part 1 of 6): Explain trianglePointAdd, triangleStart, Y =+ 2, mod 64 for polygonPoint+2, and how does triangle point logic work?
- GetPolygonLines (Part 5 of 6): Clarify INC xPolygonAddrHi logic around choosing left vs right depending on sign of yDelta, why skip horizontal edge count (just before gpol12) when yEdgeDeltaLo = 0?
- TracePolygonEdge (Part 2 of 8), (Part 3 of 8), (Part 4 of 8), (Part 5 of 8), (Part 7 of 8): Why does the slope error value start at ~(yEdgeDeltaLo / 2) or ~(xEdgeDelta / 2)? Why subtract yEdgeDeltaLo or xEdgeDelta from the slope error?
- TracePolygonEdge (Part 7 of 8): Why increment (A Y) just before tred38? Explain calls to ModifyStoringCode, whole thing needs explaining better
- TracePolygonEdge (Part 8 of 8): Why increment (A Y) just before tred47? Explain calls to ModifyStoringCode, whole thing needs explaining better
- ModifyStoringCode: Explain effects of modified code properly
Maths (Geometry)
----------------
- GetAngleFromCoords (Part 1 of 3), (Part 2 of 3): Explain the early abort of shift-and-subtract (the BEQ gang10 at gang6) and what this does to bit 5 of the result (the ADC #%00100000 before gang9 and the ORA #%00100000 at the end of part 2)
- GetSightsVector: Improve pixel-to-angle commentary, explain pitch angle addition of (3 32)
- GetHypotenuseAngle: Why zero bits 0 and 1 of xDeltaLo to store in W? Explain the quadrant sign changes for the angle around ghyp6 and ghyp10
- GetPitchAngleDelta: Why the 32 in (objectPitchAngle 32)? Explain division by 16
Gameplay
--------
- ScanForMeanieTree: Why set minObjWidth = 104 (just before mean5) when morphing a tree to a meanie? Half widths for each are 114 to 74
- DrainObjectEnergy: Why set minObjWidth = 116 (at dobj4) when morphing a boulder to tree? Half widths for each are 122 to 144
Screen buffer
-------------
- buffersOffsetHi, buffersOffsetLo, xBuffersLeft, xBuffersWidth, buffersMinYaw: What do these values mean?
- ConfigureBuffer: How do these variables work? Especially the bit 7 flip for bufferMaxYawHi
- ConfigureObjBuffer: How do these variables work? Especially setting bufferMinYaw(Hi Lo), the bit 7 flip for bufferMaxYawHi and xBufferRight
- DitherScreenBuffer: Explain why the calculation of ditherStore gives us a random pixel to update