Discussion Forum for all things Microbee
Some Microworld BASIC 5.29e Trivia - Printable Version

+- Discussion Forum for all things Microbee (https://microbeetechnology.com.au/forum)
+-- Forum: Microbee Forum (https://microbeetechnology.com.au/forum/forum-1.html)
+--- Forum: Microbee Software and Documentation (https://microbeetechnology.com.au/forum/forum-7.html)
+--- Thread: Some Microworld BASIC 5.29e Trivia (/thread-267.html)



Some Microworld BASIC 5.29e Trivia - someone - 16-01-2021

Microworld BASIC Ver 5.29e (MWB) is a larger version that occupies a 16K and 8K ROM.
Its increased size is to accommodate the true 512 x 256 HIRES2 graphics mode that the Alpha Plus and later models support.
Even though it uses 24K of ROM, it only still occupies the standard 16K of Z80 memory space (%8000-%BFFF).
It is accomplished using BIT 5 of the APLUS soft switch (I/O port %1C) to select which of the ROMs occupies memory address (%8000-%9FFF).
The default (resetted) setting for the 8K ROM to be active.

So, what's in the extra ROM?
The normal MWB binaries for %B000-%CFFF slightly modified to accommodate the new HIRES2 mode.

If that's the case then what's in the 2nd half of the 16K ROM? 
It's the logic that switches between new HIRES2 and existing graphics mode routines, Alpha Plus cursor movement key combination scanning routines and tonnes empty space that are located at %8000-9FFF.

So, how do you access these new routines and are there any caveats?
Well the most obvious caveat is that the calling code must not reside within the %8000-%9FFF memory space otherwise it'd be switched out (unless some special conditions are met).

Someone has no idea whether the HIRES2 API was ever officially published. With that being the case, HIRES2 functions would be accessed in the usual way through the MWB Jump table.


RE: Some Microworld BASIC 5.29e Trivia - ChickenMan - 17-01-2021

The HIRES2 line plotting was updated to the faster Bresenham's Algorithm in BASIC 6.32e. You can read further about it in the Catcher v6 #4a p10


RE: Some Microworld BASIC 5.29e Trivia - someone - 17-01-2021

(17-01-2021, 12:58 AM)ChickenMan Wrote: The HIRES2 line plotting was updated to the faster Bresenham's Algorithm in BASIC 6.32e.  You can read further about it in the Catcher v6 #4a p10

Many thanks Chickenman!

   
Fig.1 Fast line drawing on an Oscilloscope!

Although quick, Bresenham's pixel based line draw algorithm isn't necessarily the fastest. There are others about that are also quick.
The Gamma which had the faster 68000 16-bit processor and more working registers used an additive line drawing algorithm.

Be aware that Monte Chan's Turbo Pascal Hires graphics library for the original microbee (circa 1983), Storymaker (for the Alpha Plus), GSTAR and some other demonstrations were already using Bresenham line and Michener's circle algorithms. Unlike the standard microbee routines these routines ensured that swapping the coordinate order didn't leave pixel dregs on the screen.  The dregs are caused by the decision calculation on when to change rows or columns and this decision point can be in a different position when drawing the same line but in opposite directions.

In addition to pixel based algorithms, there are some graphics hardware optimisations that can be applied.
Examples include:
  • Rather than the slow pixel by pixel plotting which is calculation intensive and slow, deltas are used and screen updates are only performed when a complete byte based bitmask is complete.
  • Horizontal and vertical lines are recognized and optimised accordingly.
The Alpha microbee HIRES graphics drawing is relatively slower because it has the overhead of optimising the use and reuse of PCG characters to cover as much screen real estate as it can with only 128 PCG chars.  The Alpha Plus and Gamma don't have this worry although the Alpha Plus has the overhead of switching PCG banks and other possible overheads such as colour and attribute RAM updates.

There should be a few animated line drawing and unfolding and rotating cube demonstrations around for both the Alpha Plus and Gamma machines to show off their speed.