-
Notifications
You must be signed in to change notification settings - Fork 3
Math
Michiel van Oosterhout edited this page Feb 18, 2015
·
1 revision
Multiplication and division using CPU or PPU registers.
Multiplication using the CPU:
- store 8-bit multiplicand in $4202
- store 8-bit multiplier in $4203
- wait 8 cycles
- read 16-bit quotient from $4216
Division using the CPU:
- store 16-bit dividend in $4204
- store 8-bit divisor in $4206
- wait 16 cycles
- read 16-bit quotient from $4214
- read 16-bit remainder from $4216
Multiplication using the PPU:
- store 16-bit multiplicand in $211B
- store 8-bit multiplier in $211C
- wait
- read 24-bit product from $2134