Excellent. How much faster is this?
Boriel Basic uses the ROM to get the pixel address on the screen (and save memory), but the rest is done in the code.
Also, to make this routine fully compatible, you should work with HL = 0x0000 (as is the screen starts at 0x0000, not at 0x4000) and do
LD DE, (SCREEN_PTR)
ADD HL, DE
before writting to it.
This will allow the screen buffering to work with your routine too.
NOTE: Other drawing routines (DRAW, CIRCLE...) use the Bresenham algorithm already, and each pixel address is computed relatively to the previous plotted pixel.
Boriel Basic uses the ROM to get the pixel address on the screen (and save memory), but the rest is done in the code.
Also, to make this routine fully compatible, you should work with HL = 0x0000 (as is the screen starts at 0x0000, not at 0x4000) and do
LD DE, (SCREEN_PTR)
ADD HL, DE
before writting to it.
This will allow the screen buffering to work with your routine too.
NOTE: Other drawing routines (DRAW, CIRCLE...) use the Bresenham algorithm already, and each pixel address is computed relatively to the previous plotted pixel.
---
Boriel
Boriel

