4 ms·
What you've said sounds more likely. The original code can be seen here: http://www.ionpool.net/arcade/astcode/asteroids_code_project.html http://www.ionpool.ne
by FatalLogic 6y ago
What you've said sounds more likely. The original code can be seen here: http://www.ionpool.net/arcade/astcode/asteroids_code_project.html http://www.ionpool.net/arcade/astcode/asteroids_code_project...
The rotation code apparently starts at 0x7086, which adds or subtracts 3 from a one byte variable. If that 8 bit variable maps to a full 360 degrees of rotation, that would result in steps of about 4.2 degrees, but I don't know because I couldn't follow the code after that
- justinlloyd 6y agoReaching back in some ancient memory from 35+ years ago I recall that the rotation tables were sin/cos and the cos table overlapped the sin table by 180 degrees. I think there was 256 entries in When the ship rotated it stepped through the rotation table by three entries at a time, and took advantage of the 8-bit accumulator wrapping around. Then the value was used as a look-up in a table. The ships direction was a value of 0x00 to 0xFF, and that was used as an index in to the rotation table. I would need to read through the disassembly again to refresh my memory.