Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Fast(er) Plot Routine for Boriel Basic
#3
(2025-10-30, 11:12 AM)boriel Wrote: 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.

I didn't do any "millisecond" timings, but to fill the whole screen with the Boriel point, took about 15 seconds, substituting this one took about 5 - there are probably other/better ways to do it, and I don't know if there are other parts I've done incorrectly - eg it uses a very small lookup table - does it create that each time the procedure is called, or does it create it at compile time.

I only did this for "fun" and learning, so it might be useful for someone to adapt and use.  I understand each "command" but not how they all interact together to do what they do :-)
Reply


Messages In This Thread
RE: A Fast(er) Plot Routine for Boriel Basic - by tubz74 - 2025-10-30, 03:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)