Slimelite BBS

chunky.lha

Back to lib

Link library for fast chunky-gfx-routines

Size
92K (94,314 bytes)
Added
2026-11-20 02:43
Downloads
3
Long Description
INTRODUCTION ============ A while ago I've tried to code a game for the Amiga which should have SVGA quality. But I don't have expected the sillyness of Commodore as they designed the new AGA-Custom chips. My tears have washed my t-shirt when I saw the 'great' chip-ram-bandwidth and my neighbours thought of a bloody-mess as I expected that the Blitter is simply useless when it comes to a display of 640x480x256 After a while I saw that the cpu is several times faster in blitting with or without a mask and later I expected that it is more-than-10-times as fast as the system graphics routines when I use a temporary chunky buffer to draw my graphics in and then blast it over the bitmap. That was the time I decided to code a chunky-graphics-link-library for everybody's use. And that's it. CONTENTS ======== When you receive a copy of chunky.lha, it should contain this files: lib-src/ chunky.c the main chunky-gfx-routines chunky.h the header file text.c functions for rendering text c2p.asm a simple chunky to planar routine by Morten Eriksen p2c.asm a simple planar to chunky routine by Morten Eriksen makefile a makefile for GNU/C libchunky.a the link lib for GNU/C tst-src/ chunky.h a copy of the above test1.c the lines test source test2.c the Insertion test source test3.c the text test source test4.c the fixed-width font test for WB chunky.readme this file test1 the lines test executable test2 the Insertion test executable test3 the text test executable test4 the fixed-width font test for WB results040.txt all test results for a MC68040 results030.txt all test results for a MC68030 TIME TABLE ========== This is the result of the program 'test' which opens a display of 640x480x256 and calls several timed graphic routines with the original gfx.OS and with my new gfx.chunky. Test-Machine: A1200 with MC68040 and 8MB Fast I suppose, you should have a MC68030 + 4MB as minimum 1. Several Graphic functions ( test1.c ) ---------------------------------------- I've timed DrawChunkyPort() seperatly to make the results clearer. Draw 640 vertical lines with color raising: Elapsed time for function v_lines_chk(): 0.195829 sec. Elapsed time for function v_lines_rpt(): 12.308480 sec. Draw 480 horizontal lines with color raising: Elapsed time for function h_lines_chk(): 0.058839 sec. Elapsed time for function h_lines_rpt(): 12.255457 sec. Draw 480 diagonal lines from 0/0 -> 640/y with color raising: Elapsed time for function s_lines_chk(): 0.418446 sec. Elapsed time for function s_lines_rpt(): 12.247091 sec. Draw 256 filled boxes with color raising from 0->255: Elapsed time for function rect1_chk(): 0.052174 sec. Elapsed time for function rect1_rpt(): 0.873216 sec. Time to convert the 640x480x256 ChunkyPort to the display: Elapsed time for function DrawChunkyPort(): 0.299809 sec. 2. Draw on background ( test2.c ) --------------------------------- The first function creates its own ChunkyPort, draws there and then copy the chunkyContents into the RastPort w/o destroying background gfx The second one creates its ChunkyPort from RastPort at the position of the later rewritten ChunkyBuffer. This ensures that all the rendering does not destroy the background. As you can see, the second one is four times as fast as the first one Elapsed time for function InsertChunkyPort(): 0.417537 sec. Elapsed time for function CreateChunkyFromRastPort(): 0.108726 sec. 3. Draw some text ( test3.c ) ----------------------------- This program writes 512 times the text 'This is a test...' with different colors onto the screen The font is set to 'courier.font/13' Elapsed time fo