This lesson will introduce player input by allowing the paddle to be moved. As an exception to the general goal of "no cargo-culting", @pinobatch's input routine shall be used, with modifications to "simplify" it. This is because the rationale behind its choices are complex and subtle, and thus out of scope. A footnote could be made, linking to some explanation; though I'm not aware of any discussion of its inner workings that isn't a long Discord thread.
TODO: gb-asm-tutorial's code license is "public domain", whereas Pino's input routine is zlib-licensed. We must figure out either a relicensing deal, or a way to preserve this license. I do not want to use the "repeated ldh a, [rP1] method, as it has shaky origins and copyright implication; Pino's routine is a good unencumbered implementation, and even a simpler version (only using nops, for example) might be considered a derivative work.
The paddle must "collide" with the edges of the playfield; this shall be implemented as a simple position check.
This lesson will introduce player input by allowing the paddle to be moved. As an exception to the general goal of "no cargo-culting", @pinobatch's input routine shall be used, with modifications to "simplify" it. This is because the rationale behind its choices are complex and subtle, and thus out of scope. A footnote could be made, linking to some explanation; though I'm not aware of any discussion of its inner workings that isn't a long Discord thread.
The paddle must "collide" with the edges of the playfield; this shall be implemented as a simple position check.