----------------------------------------------- About optimized graphic routines in PuzzleBOBS. ----------------------------------------------- As you can see in the PuzzleBOBS configuration file ore in the menu's "Config Game" voice you have a lot of possibility to set the blitting mode of graphic routines. Now you could choose five methods. To set one of them use the value you find near "=" and put its directly in config file. Between square brakets you can find the relative menu's option. 1) AmigaOS Blitting functions. =0 (default) [Os funcs] ------------------------------ This uses the normal AmigaOS routines BltBitMap(),BltBitMapRastPort(),BltMaskBitMapRastPort() BltClear() and ClipBlit(). Unsfortunately on Amiga standard bitmaps BltMaskBitMapRastPort() is very slow. This is used always when you play game in window. This method allows you to use other external programs that are able to optimize the Blitter work. 2) Optimized gfx functions. =1 [Opt funcs] --------------------------- This uses corrispettives of BltBitMap(),BltBitMapRastPort() and ClipBlit(),that use blitter and are quite faster than AmigaOS functions and dont'allow to play in a window. BltClear() and BltMaskBitMapRastPort() were not cloned and game uses AmigaOs functions. This method can't be used with graphic boards, so only on standard amiga screens. Be careful because could works badly (leaves imperfections on screen). 3) Cpu graphic routines. =2 [cpu slow] ------------------------ The Blitter is a very old slow chip and if you have a very fast processor with some fast mem could be better to set this mode which uses only your Cpu as graphic operator. So this method not allows the game in window so if you play in window or PIP will be used the 1) mode. Consider that the blitter is not faster than a 68020+ ,with some fast mem and caches enabled. This method works very well on standard Amiga screens even if could be very slow, so is better to use the 4) method very much faster than this one. This method could be used on graphic boards also but can has some troubles or cause graphical imperfections on screen, so be careful using this. 4) Cpu graphic routines and data in Fast Mem. =3 [cpu fast] --------------------------------------------- This method uses the otpimized cpu functions you saw in 3) and moreover allocates gfx data in fast mem (Public_mem) to speed cpu work thanks clones of BitMapScale(),AllocBitMap() and FreeBitMap(). This method not allows to play in a window. This approach speeds a lot blitting procedures because the only area in CHIP_MEM is the video memory of screen. This method works very well on standard Amiga system, however could be used on graphic boards also, but can cause some troubles or graphical imperfections on screen, so be careful using this. 5) Blitter and Cpu cooperative parallel method. =4 [Mix] ----------------------------------------------- By this method part of blit will done by Cpu and the remanent by Blitter at the same time (first starts Blitter and then the Cpu). Moreover you could choose the quantity of blitter or cpu work using the percentage value you find after this flag in the ConfigFile. This indicates how blit in height size will done by Blitter. No gfx data will be allocated in FastMem. If you set this to zero will be used the 3) method, else if 100 the 2) method. In all others value will be used this method. Try to find the best report between cpu and blitter usage. Remeber that this method could not be used if you use graphic board's screens, in that case will be selected the 1) method. --------------- IMPORTANT NOTES --------------- When you select the 2) or 3) method and you choose to play on a graphic board's screen you must be careful if you choose a screen mode bigger than the area used in the ConfigFile. For example a 320x256 ConfigFile used on a 640x480 graphic board's screen. In this case you will surely get a lot of imperfections on screen, so be very careful using this. If the screen mode is smaller you will not get any troubles, for example using a 640*512 ConfigFile on a 320x240 graphic board's screen, because you will be able to scroll by mouse the screen. The same above effect not appears in any way using the standard amiga screens when you use both a bigger screen mode and a smaller one. Remeber that if you play game in window (also in a PIP) will be always used the AmigaOS graphic functions. ---------- LAST NOTES ---------- BltMaskBitMapRastPort() is a very complex functions to optimize, and is not possible to write ones by using only one blitter operation. AmigaOs does this blit by a number of sub blitter operations equal to the height of blit. For this reason BltMaskBitMapRastPort() was not cloned and in the 2) method uses the AmigaOs function. In all cpu functions it was well cloned. Finally consider that if yoy play game in a screen some functions that blit in rastports will be redirect to blit in bitmaps. This because graphic functions calls in rastports are slower than in bitmaps and are usefull only when you use a window. Moreover were cloned also BitMapScale(),AllocBitMap() and FreeBitMap() forcing them to work to data in FAST_MEM (PUBLIC_MEM) ever when you play with the 3) method. The BitMapScale() clone has a lower quality in comparison with the Os function one. Redirection of graphic functions. -------------------------------- BltBitMap() ---> BltBitMap() BltBitMapRastPort() ---> BltBitMap() ClipBlit() ---> BltBitMap() BltClear() ---> BltClear() BltMaskBitMapRastPort() ---> BltMaskBitMapRastPort() List of cloned graphic functions and percentage of usage in game. percentage of usage (based on: a_function_call/all_function_calls )*¹ ------------------------------------------------------------------- function on window on screen BltBitMap() 50% 68% BltBitMapRastPort() 14% 0% ClipBlit() 4% 0% BltClear() 2% 2% BltMaskBitMapRastPort() 30% 30% cloned using CPU ---------------- BltBitMap() BltBitMapRastPort() ClipBlit() BltClear() BltMaskBitMapRastPort() cloned using BLITTER -------------------- BltBitMap() *² BltBitMapRastPort() *² ClipBlit() *² *¹ a "call" is a graphic function call in the source code. *² These functions are quite faster than AmigaOs corrispettives.The only advantages are: Functions were written in fast assembler and they are very speed in initializating blitter chip and during blitting they don't control blit limits and rastport's layers re-building (this last only when using BltBitMapRastPort() ).