@database AMCAF-Manual @index sbefindex @remark $VER: AMCAF V1.40 (17-Jan-95) manual written by Chris Hodges @node main "AMCAF Extension Manual English" AMCAF Extension V1.40 Manual by Chris Hodges. AMCAF V1.50beta4 is the FINAL RELEASE! FREEWARE! NO DEMO VERSION ANYMORE! Sorry, but I didn't have time to update the manual. You'll have to find out the new commands since V1.40 yourself (or by looking at the history). @{" Introduction " link svorwort} - Important information about AMCAF @{" How to Register " link sregiste} - How to get the full version @{" Bank Commands " link mbankbef} > Commands for bank handling @{" Graphic Commands " link mgfx_bef} > Graphic and effect commands @{" Disk Commands " link mdiskbef} > Commands for disk handling @{" Time and Date Commands " link mzedabef} > Current date and time etc. @{" Joystick & Mouse Support " link mjoymbef} > Additional gameport commands @{" Vector Commands " link mvecrbef} > Commands to rotate points in 3D @{" Protracker Commands " link mprotbef} > Commands to replay tracker music @{" String&Integer Functions " link mstribef} > Functions for strings and integers @{" Miscellaneous Commands " link mmiscbef} > Various commands and functions @{" Extension Commands " link mextebef} > Interior commands @{" Notes " link sdisks } - Some notes about the two disks @{" Command index " link sbefindex} @{" Additional index " link szusindex} @{" Buglist " link sbuglist} @{" Greetings " link sgreeting} @{" Copyrights " link scopyright} @{" History " link shistory} AMCAF is Copyright 1994/95 by Chris Hodges. All rights reserved. @endnode @node sregiste "How to register AMCAF" How to register AMCAF You don't need to register anymore. AMCAF development has finally ceased. I think it's a bit overdue to abandon this project. Over 5 years of development... phew! However, you're still encouraged to contact me: Snail-Mail: Chris Hodges Kennedystraße 8 D-82178 Puchheim West Germany Tel: +49-89/8005856 (Voice/Modem) Bank account: Christopher Hodges Account 359 68 63 Sparkasse Fürstenfeldbruck BLZ 700 530 70 E-Mail: platon@cu-muc.de WWW: http://platon.home.pages.de/ IRC: platon42 on #amiga, #amigager (Efnet) @endnode @node svorwort "Important information about the AMCAF extension" Welcome to the new world of AMCAF. Welcome to the demo version of AMCAF. You will certainly be very satisfied with this product. This extension contains over 200 commands and functions for various areas. The AMCAF extension is more than 42 KB in size which makes it the biggest extension for AMOS Professional known to me. Some commands may work better or even require Kickstart 2.04 or higher. If you want to take full advantage of the AMCAF extension then you should really think about upgrading to 2.0 or 3.1, if you haven't already. By the way, the extension must be entered at slot number 8 in the AMOS Pro extension list, but this is done by the installation software for you! Don't forget to read the @{" Notes " link sdisks}, too! No program is absolutely bugfree and for that reason I ask you to please report any bugs as quickly as possible. However, it's rather useless, if you only write: The command xxx crashes my machine. Please give me a detailed description of your computer and enclose the part of the program that causes the problem, but only if you like doing that kind of thing. I welcome any suggestions that you may have, any problems that you may encounter, bug reports for certain, or even any hints and tips that you may have for me! @{" Contact address " link myaddress} If you have got access to a ftp site, there will be free updates coming up regularily on Aminet (dev/amos). Make sure you download the English version and not the German one. ************************************************************************** * * *** ATTENTION *** ATTENTION *** ATTENTION *** ATTENTION *** ATTENTION **** * * * AMCAF is NOT sold by The Software Society anymore! You will only get * * into trouble when buying AMCAF from them, despite they only have the * * old german version and not the english one! Moreover, it's much more * * expensive than the shareware version (somebody had to pay about 120 DM * * for it instead the 30 DM shareware fee). * * * * So DON'T buy AMCAF from The Software Society, register it HERE. * * * ************************************************************************** Enjoy AMCAF and may the force be with you! Chris Hodges @endnode @node sdisks "Notes about the enclosed disks" Notes about the installation and examples disks. If you haven't already installed AMCAF, you should do so as soon as possible, because no example program runs without the AMCAF extension (which is quite obvious ;-) ). The installation process is quite easy and quicky done. Just read the instructions carefully which appear when you start the installation program. During the process you will be asked to enter your name, if you are using a registered version. Please enter it correctly. It will be encrypted and saved into the extension file. Remember that you MUST NOT copy the registered version of AMCAF to anybody else. YOU have paid for this software, why should someone else get it for free? AMCAF can either be written directly onto harddisk or onto a copy of your AMOSPro_System disk. When installing to disk, AMCAF allows you to either delete some files directly on the disk to get some free space for the extension or to copy the system files to a new disk (preferably FFS), which is formatted by the program directly. Due to lack of space on the examples disk, the file "mod.no good" has been written onto the installation-disk. The only program that needs this file is the demo "NoGood.AMOS". It automatically loads the file either from the install disk or harddisk. To unleash the power of the command "Set Rain Colour", the main Amos Pro library must be modified a bit (or better: a byte). So please first start the program "SetRainColourPatch" and then restart AMOS Professional. This patch remains permanently so you have only to start it once. The examples haven't been written for you to start them, look at them for a moment and then load the next. Most of the programs are well documentated and allow you to learn something new. Take your time, it's worth it. Some commands are very sensitive agains abuse. Do save your programs regularily, especially when you've added a new routine. @endnode @node myaddress "Send your mail to..." If you have any questions or even found a bug, then leave me a mail or call me directly. Don't forget to enclosed a DETAILED DESCRIPTION OF THE ERROR with the configuration of your computer and the piece of code which doesn't work correctly if you've encountered a bug. Snail-Mail: Chris Hodges Kennedystraße 8 D-82178 Puchheim West Germany Tel: +49-89/8005856 (Voice/Modem) Bank account: Christopher Hodges Account 359 68 63 Sparkasse Fürstenfeldbruck BLZ 700 530 70 E-Mail: platon@cu-muc.de WWW: http://platon.home.pages.de/ IRC: platon42 on #amiga, #amigager (Efnet) @endnode @node sbuglist "Some bugs you must take care of" Bug report This is a small list of AMOS bugs you must be aware of: 1. The AMOS string management is not bugfree. Be especially careful with AMAL programs! 2. The AMOS Default routines are not called: If you load AMOS and then start a program, the extension default routines are not called. I.e if a music is running from the previous call, it will not be stopped. Conclusion: - Call any accessory (e.g the help-accessory) once. 3. Programs cannot be compiled: The compiler prints out the error 'Not an AMOS program'. If you use memory banks, all bank lengths must be even. If this is not the case, the programs do work from the editor but not compiled. Conclusion: - Extend odd banks by one byte using Bank Stretch. 4. A program that uses data lines does not work correctly when compiled: There must not be any comments after a data line. Data commands must be completely alone on a line. Otherwise the compiler will interprete these comments as data. Conclusion: - Write the comments into a seperate line. Even worse: a friend of mine was faced to a guru when trying to compile a program that uses aprox. 500 KB of data lines. As for now, I found no solution for this problem. Bugs that are interesting for extension programmers: 1. Your commands or functions can only have a maximum of 9 parameters. Everything above this will not be put on -(a3). 2. All routines, that are jumped to directy by a token must be placed in the first 32 KB of code. Otherwise the command will crash. Additionally the distance of a RBras or RBccs jump must not exceed 32 KB. @endnode @node scopyright "Copyrights" Amiga is a trademark of Escom AG. MC68xxx series are trademark of Motorola Inc. AMOS by François Lionet. Copyright 1990 Mandarin/Jawx. Copyright 1991 Europress Software Ltd. AMOS Pro by François Lionet. Copyright 1992 Europress Software Ltd. AMCAF by Chris Hodges. Copyright 1994 The Software Society. Copyright 1995 Chris Hodges. AMIPS by Thomas Nölker. Copyright 1993 The Software Society. TOME by Aaron Fothergill. Copyright 1991 Shadow Software. PowerPacker by Nico François. Copyright 1990 PowerPeak. ProTracker 2.2 by P. Hanning. Copyright 1992 Noxious. (PD) Turbo Imploder by P. Struijk & A. Brouver. Freeware 1991. @endnode @node sgreeting "You think you will be greeted? ;)" First, best regards to everybody who has registered AMCAF, thank you very much. Then special greetings fly to: My parents (Hallo!) My brother (Come on! I want to see a wonderful raytracing animation!) My sister (Hi pumpkin!) Hans Peter Obermeier (Anything new? ;-)) Ralf Schulz (Oh, I cannot beleve you've bought an ugly MS-Tinbox... :-( ) Markus Ungerer (Schreib mal wieder eine Kurzmail!) Bernd Ungerer (Danke fürs Beta-Testen und für die guten (?) Vorschläge!) Michael Ufer (You little hobby magician! Thx for the many refreshing mails) Oliver Ufer (Thx for the huge amount of suggestions ;-) ) Oliver Seibert (Surprise had been the best box known to me!) Oliver K. Dirk Drießen (Man gönnt sich ja sonst nix ;-)) Ralph Bernecker (Hello jMS/Dr.Feelgood/Striker/fELON) Alexander Kunz (Thx 4 da kewl tunes and support!) Omer Sasic (+++) Claude Müller (Greetings to Swiss! I hope your back from the army soon!) Dirk Schulten (Hallo Maus-User! ;-) ) Andre Panser (Schreib mal wieder) Andreas Duncker (Thx for your supporting mail) Mathias Mischler (Thx für your support and logement!) Andreas Zymny (Das Quotezeichen bleibt UNKONFIGURIERBAR! Basta! ;-) ) Kriegsheld (Jaja! Eigentlich ist ja heute schon morgen, gelle?) Henning Baron Rainer Benda Robert Rothhardt (Thx for the best time in all my school life!) Florian Fackler (Strato Impact rulez!) Thomas Nölker (Good luck with your AMIPS-Extension!) Jürgen Schäfer (Sorry wegen der Gif-Geschichte, vielleicht kommt das noch) Greg Cox (Keep up the good work!) Michael Cox (Thanks for adding me to the mailing list ;-) ) Marco Eberhardt (Thanks for your nice mails) Carsten Albert Paul Hickman (death to all tennis players! ;-))) ) Andy Church Ben Wyatt (Greetings! ;-))) ) Petri Hakkinen (nice 3D engine!) Roy Antonsen (stop drinking so much booze ;-) ) Martijn Wehrens (nice mails from ya! Keep that up) Semprini (you're a REAL friend!) Mark Wellington (nice stories from ya, keep that up!) Daniel Rädel Thomas Nokielski Jari Jokivuori and all the others, who know me and I forgot by mistake. In addition, more greetings go to my modem friends: Magic, Lemming, VIP, Schneemann, Killer, Marvin, Harry, Holger, Caboose, Blue Shogun, Ralli, REYem, Nosy and Kily. Merlin, WotaN, Vinzenz, Fritz, Braumeister, Amigaman and Kai. Dr.Dre, Tomy, Brocker, Case, Omer and Guru. Curses to: Hendrik Heimer (You know why, Mr. Software Society) François Lionet Jester (Christoph Steinecke) Nobody (Horst Bressem) Intel, IBM and MicroSoft German Telekom Europress Data Becker and Sybex R2B2 ($§%$&%§$) Phase 5 Good... I hope, I've forgotten anyone... erm yes... greetings to all members of the RAMSES-Computerclub. CU ______ __ __ ______ __ _____ /,____/\ / /\/,/\ / __ //\ /,/\ / ___/\ ///\___\// /_/// //,/_/'/ //// //./___\/ /'/_/_ / __ '/ /// __/ //'/ / \__, /\ /_____/\ /_/\/_/ //_/\_\_\//_/ / /____/ / \_____\/ \_\/\_\/ \_\/\_\ \_\/ \____\/ @endnode @node shistory "AMCAF history" AMCAF extension history. V1.50beta 11-Jan-98 ------------------- - Found some wrongly assembled lines in the protracker vibrato table. If someone encountered some scarce problems the modules using fine-vibrato, these should be gone now. - New c2p routine by Mikael Kalms. Up to 20%-80% faster and now also supports plane depth from 4 to 6! - Fixed a little bug that wouldn't play samples longer than 64KB correctly (just a lsr.w instead of a lsr.l). - Probably fixed a lot of bugs and spurious crashes introduced with the last beta. - Fixed a newly introduced bug in Lzstr$ and Lsstr$. - Found something new out about AMOS and fixed some bugs with editor- compiled programs. - Added new transition commands: - Alloc Trans Source bank - Set Trans Source bank/address - Alloc Trans Map bank,width,height - Set Trans Map bank/address,width,height - Alloc Code Bank bank,size - Trans Screen Runtime scr,bitplane,ox,oy - Trans Screen Dynamic scr,bitplane,ox,oy - Trans Screen Static NOT YET IMPLEMENTED - Trans C2p chkbuf NOT YET IMPLEMENTED Some last words: Allocating the Code bank to small will cause memory overwrites. Wrong or stupid parameter values are not checked for validity. The Trans commands are still a bit slow (3 VBLs for a 256x256 pixel transition with MC68060 and all caches disabled, 0.8 VBLs for the same transition with all caches turned on). Maybe the C2P Transition will be a bit better. Still need to update the c2p to a state-of-the-art routine (by Kalms). - New for ALL PT sample commands: Entering a negative value as channel bitmask will trigger the Pt Free Voice function which will search for the best channel number to use for sample replaying. Really handy indeed! Pt Free Voice is rather complex: - it first checks if the bitmask is zero and if so, it returns 0. - then it checks, if only one bit was set in the mask and returns the same. - after that, it finds out if all four channels (or the ones given in the bitmask) are currently playing a sound. If so, it returns the channel bit of the sound which will cut off least. - if there are free channels, it verifies, if music is playing at all. If not, it returns the first free channel. - so for music is playing, it looks if the user has masked out a channel from the music (and which is currently free). - then it checks for the remaining channels are playing looping sounds for those will be not taken if necessary. - the last step finds out the shortest sound currently played on the channels, and then returns its channel bit. So you'll get the most of your game sfx and music if you're using the free voice function! - New functions: - =Pt Free Voice[(bitmask)] - Lzstr and Lsstr now return '9999...' if number is too large to fit into the given amount of digits. - Sample&music-mixer changed to be more accurate (samples could have been cut off some VBLs too early if the music was playing at higher cia speeds than 125bmp) with cia-timed mods (at least this should have been the case in theory). - The sample replayer now uses a 2 byte chip mem buffer to kill the high pitched beep sound sometimes appeared on samples which started with 2 non-zero bytes. FixSamBank should now no longer be required. - Pt Raw Play can now play looping samples by giving a negative length. - Implemented Vu Meters to AMAL. BUT it will ONLY work, if you REMOVE the original AMOS Music Extension. No other way to get it work! - Added support for negative numbers in Lzstr$ and Lsstr$. V1.44 27-Jul-96 --------------- - Fixed a bug in Ssave. - Fixed a minor bug in Pt Play (cia speed is now reset to 125). - Fixed a bug in Qsqr. Now bigger numbers than 0-65535 can be used. (Warning: starting with numbers >65535 it gets a bit inaccurate! Remember that the resolution of the result remains 8 bit!) V1.43 02-Nov-96 --------------- - Added Sload/Ssave. Just the same commands like in the music extension. Now you can really remove it! - Misc bugfixes. V1.42 18-Oct-96 --------------- - Added support for Set Tmpras for Fellipse&Fcircle commands. - Added type check for Protracker modules. V1.41 29-Mar-96 --------------- - Fixed bug in Xfire. - Misc changes. V1.40 26-Dec-95 --------------- - New commands: - =Pt Cpattern - =Pt Cpos - =Pt Cinstr(channel) - =Pt Cnote(channel) - Pt Sam Freq channel,freq - =Vclip(v,lower To upper) - =Vin(v,lower To upper) - =Vmod(v,upper) - =Vmod(v,lower To upper) - =Insstr$(a$,b$,pos) - =Cutstr$(a$,pos1 To pos2) - =Replacestr$(a$,search$ To replace$) - =Itemstr$(a$,item) - =Itemstr$(a$,item,sep$) - =Qarc(dx,dy) - =Even(val) - =Odd(val) - =Ham Point(x,y) - Set Object Date file$,date,time - =Aga Detect - Pal Spread c1,rgb1 To c2,rgb2 - =Ct String(time$) - =Cd String(date$) - C2p Convert st,wx,wy To screen,ox,oy - C2p Shift st,wx,wy To st2,shift - C2p Fire st,wx,wy To st2,sub - Pal Set Screen now does a 'View' automatically. - Another bug in Ptile Paste has been fixed. - Sine-Table moved and shortened, so I save about 1536 Bytes, added Arctan-Table. V1.31 03-Oct-95 --------------- - Actually, the bug hasn't been in Change Bank Font but in Make Bank Font. Although this bug is now fixed, I suppose you have to recreate all old bank fonts. - Finally removed Rnc Unpack and =Rnp. - Fixed a bug in Pt Stop which cut off the channels, even if no music had been playing. - New commands: - Pt Continue - Fixed a bug in Change Bank Font. V1.30 31-Aug-95 --------------- - NEXT OFFICAL UPDATE. - Various changes to get the extension under the 32 KB limit. - Best Pen now supports EHB mode. - Found a bug in the PlaySample routine and removed it. - Removed a little bug in Pt Raw Play. - Obvious bug in Extpath$ fixed (Thx Ben!) - New commands: - =Best Pen($RGB[,c1 To c2]) - Bzoom s1,x1,y1,x2,y2 To s2,x3,y3,m - =X Smouse - =Y Smouse - Limit Smouse [x1,y1 To x2,y2] - Smouse X x - Smouse Y y - Smouse Speed speed - =Smouse Key - =Xfire(port,button) V1.19 30-Jun-95 --------------- - New commands: - Exchange Bob i1,i2 - Exchange Icon i1,i2 V1.18 21-Mar-95 --------------- - NEXT OFFICAL UPDATE. - Fixed a very scarcely appearing bug in Turbo Plot. V1.17 16-Feb-95 --------------- - Little bug in the protracker routines: mask for FineSlideUp was $D instead of $F, what resulted in ignoring $2 slides. (Thx Patrick) V1.16 29-Jan-95 --------------- - Little flaw appeared with the protracker cia replay code: Pt Cia Speed did not work correctly in compiled programs (but I don't know why!). - Forgotten a Pt Sam command by mistake: - Pt Sam Volume [voice,] volume - Reworked code a bit to ensure the demoversion is working (32 KB limit!). - New palatte handling commands: - Pal Get Screen palnr,screen - Pal Set Screen palnr,screen - =Pal Get(palnr,colindex) - Pal Set palnr,colindex,colour V1.1 28-Dec-94 -------------- - Adapted protracker replaycode to handle samples correctly. - New commands: - =Pt Data Base - =Pt Instr Address(samnr) - =Pt Instr Length(samnr) - Pt Bank bank - Pt Raw Play voice,address,length,freq - Pt Instr Play samnr - Pt Instr Play voice,samnr[,freq] - Pt Sam Bank bank - Pt Sam Play samnr - Pt Sam Play voice,samnr[,freq] - Pt Sam Stop voice - Tiny optimations on Ham Fade. - One more bug in Ptile Paste removed. - Bug in Speek: Speek did only allow even addresses. - Silly bug in Lsstr$ and Lzstr$. Often they did produce trashed strings or didn't return from the call. V1.0 16-Oct-94 -------------- - VERY FIRST RELEASE VERSION! - Removed a few little bugs in the registration code. V1.0ß 06-Oct-94 --------------- - Imploder Load didn't free the lock on a file if the loading process was successful. Fixed. V1.0ß 22-Sep-94 --------------- - Every string allocation reserves two bytes more. Now there seem to be no problems with the stringbuffer anymore. V1.0ß 28-Aug-94 --------------- - Ptile Paste had a bug. Removed. - =Extpath$ did overwrite 32 KB of variable buffer using empty strings!!! Argl... - =Ham Best completely rewritten. Works even better now. - Added one more errorcheck to Coords Read and =Count Pixels. - Coords Bank reserved a bank which was not completely used up and could hold exactly one pair of coordinates less. - Coords Bank corrupted the memory or crashed when trying to create a bank with zero coordinates. The same with Splinters Bank. Bug removed. - =Ham Best rewritten. Now it is much quicker as before! Hint came from Dr. Peter Kittel, now ex-employee of Commodore, Class 95. - Protracker: Vumeter did not support the C-Command, for that reason =Pt Vu returned 64 as volume most of the time. Bug removed. - Protracker: If a channel had been turned off, neither the signal could be received nor have speed and other commands been taken notice of. Implemented subroutine to handle this case. - Renamed Secexp to Binexp and Seclog to Binlog. - Protracker: added more init code. Now there should not be any flaws with funks or patternrepeats when playing many modules after each other. - Moved database from chipram to fastram (really should have done this much earlier!). - Due to the improvements named above, the code became to long to execute a certain branch command. This caused AMOS to crash. Bug removed. V0.992ß 27-Jul-94 ----------------- - Yeah, got some vacations at last and can now fully concentrate on the manual. Releasedate of V1.0 was set to 1.9.94. - Extension restructured, so ensure that all functions, that do have a token, are placed into the upper 32 KB. Now everything should work again correctly. - Now you can switch between CIA and VBL timing while playing a module. - Encountered a small bug in Bank Copy which was killed immediately. - Reimplemented some commands: Rnc Unpack and =Rnp. - New commands: - =Qsqr(value) - Bcircle x,y,r,c - Added clipping for Turbo Plot, Shade Pix and Turbo Point. Now they are as secure as the normal Plot and Point commands. - Improved the speed of Ham Fade a little. - When reaching the end of a song, Pt Signal now reports $FF. V0.991ß 18-Jul-94 ----------------- - New commands: - Set Rain Colour rainnr,colour - Rain Fade rainnr,colour - Rain Fade rainnr To rainnr V0.990ß 01-Jul-94 ----------------- - Removed some command to shrink the size of the extension: - Rnc Unpack - =Rnp - Deleted a few error messages from Io Error$. V0.990ß 04-Jun-94 ----------------- - 'Created' a lethal bug by resorting the command groups. Seems to be an AMOS interior bug, but when I write Audio Lock and Audio Free at the end of the extension every other command should work. However, I could not test if every command works, so be warned! Strangely enough, all commands do work when compiled, which indicates the existence of this AMOS bug. DO NOT USE AUDIO LOCK OR AUDIO UNLOCK IN THE INTERPRETER MODE!!! - New commands: Blitter Copy Limit screen Blitter Copy Limit x1,y1 To x2,y2 Blitter Copy sc1,pl1 [,sc2,pl2 [,sc3,pl3]] To sc4,pl4 [,minterm] V0.989ß 03-Jun-94 ----------------- - Discovered bugs in Blitter Fill and Blitter Clear which have caused some strange structure faults (e.g quiting from For-Next loops) V0.989ß 03-Jun-94 ----------------- - Made Blitter Fill more secure. - New commands: - Blitter Clear screen,plane - Blitter Clear screen,plane,x1,y1 To x2,y2 - Blitter Wait - flag=Blitter Busy - Shade Pix x,y - Shade Pix x,y,planes V0.988ß 02-Jun-94 ----------------- - At last Turbo Draw does now support clipping. Even implemented some special checkroutines for the blitter mode. V0.988ß 31-May-94 ----------------- - Hurray!!! Splinters do now work totally correctly. - Various optimations on Splinters and Td Stars. - Reduced memory consumption from 32 to 22 bytes per Splinter. - Reduced memory consumption from 16 to 12 bytes per Td Star. V0.987ß 29-May-94 ----------------- - New commands, to satisfy Markus: - Make Bank Font bank - Change Bank Font bank - New function: - =Cop Pos - Little flaw: Pt Play did not reset the signal to zero. - New functions: - =Vec Pos Z(x,y,z) - =Vec Pos Z - Removed private commands. V0.986ß 27-May-94 ----------------- - Added three quite private temporary commands (for a maildisk) Will be removed immediately after completing the maildisk. - Private A bank1,bank2,bitplane,maxrand - =Private B(bank2) - =Private C(bank2) DO NOT USE!!! Wrong use will crash the computer!!! - New function: - =Qrnd(value) as replacement for Rnd... does not need Randomize and is faster. - Error in the tokenlist caused a wrong syntax of Blitter Fill to be converted into Pt Play. Funny :) - Found and removed an error in the Blitter Fill commands. Blitter Fill filled the screen one line to deep -> memory got corrupted. - There was a bug in the vector rotation calculation with negative positions. V0.986ß 25-May-94 ----------------- - New command to stop Bernd from complaining: - Change Print Font bank V0.986ß 24-May-94 ----------------- - Completed the Vec Rot commands. Removed =Vec Rot Adr again. - Vec Rot commands: - Vec Rot Pos posx,posy,posz - Vec Rot Angles angx,angy,angz - Vec Rot Precalc - =Vec Rot X(x,y,z) - =Vec Rot X - =Vec Rot Y(x,y,z) - =Vec Rot Y V0.985ß 24-May-94 ----------------- - Removed a bug in Cd Date$. (Thx Bernd) - Discovered and corrected a cheap bug in Blitter Fill screen,plane. - Removed the bug in Turbo Draw when using the blitter mode. - New commands: - =Qsin(angle,factor) angle must be between 0 and 1023 - =Qcos(angle,factor) factor is the value that is multiplied with the sinus value. - Vec Rot Pos midx,midy,midz Positions for the vector rotation. - Vec Rot Angles angx,angy,angz Rotationangle. - Still buggy: - Vec Rot Precalc Creation of the matrix - =Vec Rot X(x,y,z) Calculation of the new x-value - =Vec Rot Y(x,y,z) Calculation of the new y-value - Added the function =Vec Rot Adr for testing reasons. V0.984ß 21-May-94 ----------------- - New syntaxes for Blitter Fill: - Blitter Fill screen,plane - Blitter Fill screen,plane,x1,y1,x2,y2 - Blitter Fill s1,p1 To s2,p2 - Blitter Fill s1,p1,x1,y1,x2,y2 To s2,p2 - Turbo Draw doesn't draw on non-existing bitplanes anymore. (Thx Marc) - Change Font now adds '.font' automatically, if needed. (Thx Markus) I'm afraid to say that there are no history entries for the other half of the year. @endnode @node mbankbef "Easy to use bank manipulation commands" Bank management and modification. AMCAF contains many commands that are dedicated to AMOS memory banks. With all these commands it's important to use EVEN addresses, if there are some demanded. Otherwise you will crash any computer with MC68000 processor. In addition, the lengths of every bank must be even, or the compiler will report a "Not an AMOS program" error, but this is a problem of AMOS and not of AMCAF. @{" General aspects " link dbanks} - Some information about AMOS banks Commands: @{" Bank Permanent " link cbnkperm} - Makes a bank @{" Permanent " link dpermanent} @{" Bank Temporary " link cbnktemp} - Makes a bank @{" Temporary " link dtemporaer} @{" Bank To Fast " link cbnkfast} - Moves a bank into @{" Fast ram " link dfastram} @{" Bank To Chip " link cbnkchip} - Moves a bank into @{" Chip ram " link dchipram} @{" Bank Stretch " link cbnkstre} - Extends a bank after it has been reserved @{" Bank Copy " link cbnkcopy} - Copies a bank @{" Bank Name " link cbnkname} - Changes the name of a bank @{" Bank Code xxx.y " link mbnkcode} > Commands to encode and decode banks @{" Bank Delta Encode " link cbnkdlte} - Prepares a bank with delta-encoding @{" Bank Delta Decode " link cbnkdltd} - Removes the delta-encoding of a bank Functions: @{" =Bank Checksum " link fbnkchec} - Calculates a checksum of a bank @{" =Bank Name$ " link fbnkname} - Returns the name of a bank @endnode @node mbnkcode "Bank Code commands" Bank Code commands Using these commands you can encode banks in many different ways to protect them from unauthorized access and insight. Especially manual copy protections can be made more secure by encoding the specific keyword bank. Each command comes in two versions, one with the suffix @{" .b " link dbyte} and one with @{" .w" link dword}. By using the .b version the codenumber can range from 1 to 255, the .w version allows codes from 1 to 65535. However, the rotational commands are an exception as the codes may only reach from 1 to 7 and from 1 to 15 respectively. Every command has the following syntax Bank Code xxx.y code,bank Bank Code xxx.y code,startaddress To endaddress Command versions: @{" Bank Code Add.y " link cbcodadd} - Additional algorithm encoding @{" Bank Code Xor.y " link cbcodxor} - Xor algorithm encoding @{" Bank Code Mix.y " link cbcodmix} - Mix between Add und Xor @{" Bank Code Rol.y " link cbcodrol} - Rotation to the left @{" Bank Code Ror.y " link cbcodror} - Rotation to the right @endnode @node mdiskbef "Disk commands" Disk handling commands AMCAF tries to cover this area as well and provides you with the commands you have been desperately seeking for in AMOS until now. @{" Primary commands " link mdskprim} > Commands for loading, saving, copying, etc. @{" File access " link mdskobje} > Commands for handling files @{" Support functions " link mdskhelp} > Additional functions for file handling etc. @{" Packersupport " link mdskpack} > Powerpacker and Imploder commands @endnode @node mdskhelp "Disk support functions" Disk support functions These are various functions to help you with disk access and filenames. @{" =Io Error " link fioerror} - Returns the last dos error code @{" =Io Error$ " link fioerstr} - Returns a dos errorstring @{" =Filename$ " link ffilname} - Returns the filename of a full path @{" =Path$ " link fpathstr} - Returns the directory of a full path @{" =Extpath$ " link fextpath} - Appends a "/" to a path if required @{" =Object Protection$" link fobjprst} - Returns a @{" Protection flags " link dprotflags} string @{" =Pattern Match " link fpatmatc} - Compares a string with a certain pattern @{" =Disk State " link fdskstat} - Returns the state of a disk device @{" =Disk Type " link fdsktype} - Returns the type of a volume @{" =Dos Hash " link fdoshash} - Calculates the hash value of a file @endnode @node mdskobje "Commands to handle DOS objects" Dos object handling commands. The AMOS functions Dir First$ and Dir Next$ are neither very reliable nor very easy to use. Using these commands you could only get the name and the length of the object but what could you do if you wanted to know even more? Thankfully, AMCAF provides you with an easy solution for these problems. Commands: @{" Examine Object " link cexamobj} - Gets all information about an @{" Object " link dobject} @{" Examine Dir " link cexamdir} - Inits the reading of a drawer @{" Examine Stop " link cexastop} - Stops the reading of a directory Functions: @{" =Examine Next$ " link fexanext} - Reads the next entry in a directory @{" =Object Name$ " link fobjname} - Returns the name of an @{" Object " link dobject} @{" =Object Type " link fobjtype} - Returns the type of an @{" Object " link dobject} @{" =Object Size " link fobjsize} - Gives back the length of a file @{" =Object Blocks " link fobjblks} - Returns the length of a file in blocks @{" =Object Protection " link fobjprot} - Returns the @{" Protection flags " link dprotflags} of an @{" object " link dobject} @{" =Object Time " link fobjtime} - Returns the time of creation of an @{" object " link dobject} @{" =Object Date " link fobjdate} - Returns the date of creation of an @{" object " link dobject} @{" =Object Comment$ " link fobjcomm} - Gives back the filenote of an @{" Object " link dobject} @endnode @node mdskpack "Packer support" Packer support Packer are nearly the most important tools, if you try to fit a lot of files onto a disk. Powerpacker and File-Imploder are two of the best and how else could it be, AMCAF does support them to some extent. @{" Ppfromdisk " link cppfrdsk} - Loads and unpacks a powerpacked file @{" Ppunpack " link cppunpak} - Unpacks a powerpacked file @{" Pptodisk " link cpptodsk} - Packs and saves a file as PP20 @{" Imploder Load " link cimpload} - Loads and decrunches a FileImploder file @{" Imploder Unpack " link cimpunpk} - Decrunches a FileImploder bank @endnode @node mdskprim "Primary disk commands" Primary disk commands AMCAF gives you some very easy to use commands to load, save, and modify files. @{" File Copy " link cfilcopy} - Copies a file @{" Wload " link cfiwload} - Loads a file @{" Temporarily " link dtemporaer} @{" Dload " link cfidload} - Loads a file @{" Permanently " link dpermanent} @{" Wsave " link cfiwsave} - Saves a file to disk @{" Dsave " link cfidsave} - Saves a file to disk @{" Protect Object " link cprotobj} - Modifies the @{" Protection bits " link dprotflags} of an @{" object " link dobject} @{" Set Object Comment " link cobjcomm} - Sets the filenote of an @{" Object " link dobject} @{" Set Object Date " link cobjdate} - Sets the date of an @{" Object " link dobject} @{" Launch " link claunchp} - Starts a new process @endnode @node mextebef "Interior extension commands" Interior extension commands and commands for advanced users Again some commands and functions for advanced users. Before using these, think about what you are doing, then again, and once more, and more important, save your program before starting it. Commands: @{" Extdefault " link cextdefa} - Calls the default routine of an extension @{" Extremove " link cextremo} - Removes a extension from memory @{" Extreinit " link cextrein} - Tries to revoke a extension Functions: @{" =Amos Task " link famostsk} - Returns the address of the AMOS task structure @{" =Amcaf Version$ " link famcafvs} - Returns an AMCAF version string @{" =Amcaf Base " link famcafba} - Gives back the address of the AMCAF data base @{" =Amcaf Length " link famcafle} - Returns the length of the AMCAF data base @endnode @node mfourbef "Four player adapter support" Four player adapter If you are writing games, it's a good thing to add a multi player option. Given the case even four or more players may compete against each others, you should think about implementing the four player adapter. Obviously, it's more comfortable to enjoy a game when using a joystick than a keyboard. @{" How to build a four player adapter " link dfourplayer} Functions: @{" =Pjoy " link ffourjoy} - Acquire direction of a joystick @{" =Pjup " link ffourjup} - Check if joystick is pressed up @{" =Pjdown " link ffourjdo} - Check if joystick is pressed down @{" =Pjleft " link ffourjle} - Check if joystick is pressed left @{" =Pjright " link ffourjri} - Check if joystick is pressed right @{" =Pfire " link ffourfir} - Check if fire button is pressed @endnode @node mgfx_bef "Graphic and effect commands" Graphic and effect commands AMCAF contains a lot of graphic commands, many of which you surely can use in your games or demos. However, you should be aware that most commands do not check the parameters you use! This improves the speed of some commands. Remember to save your commands, due to the fact that a small mistake can crash your computer. @{" Basic commands " link mgfxgrun} > New basic commands @{" Graphical effect commands " link mgfxeffe} > Effects @{" Font commands " link mgfxfont} > Commands for fonts loading etc. @{" Colour instructions " link mgfxcolo} > Commands and functions for colour management @{" Blitter commands " link mgfxblit} > Direct control of the blitter chip @{" Other commands " link mgfxmisc} > Misc commands and functions @{" Commands for system hacker" link mgfxprof} > For advanced users only. @endnode @node mgfxblit "Commands to directly access the amiga blitter chip" Blitter commands AMCAF makes it possible to control the @{" Blitter " link dblitter} by hand and to clear, fill, copy or modify @{" Bitplanes " link dbitplane} directly. Commands: @{" Blitter Copy " link cbltcopy} - Copying and modifying a bitplane @{" Blitter Copy Limit " link cbltcplm} - Setting the Blitter Copy area @{" Blitter Fill " link cbltfill} - Filling polygons using the blitter @{" Blitter Clear " link cbltcler} - Clearing a bitplane with the help of the blitter @{" Blitter Wait " link cbltwait} - Waiting for the blitter has finished his task @{" Turbo Draw " link cturdraw} - Fast replacement for Draw @{" Bcircle " link cbcircle} - Drawing a circle to fill it using the blitter Functions: @{" =Blitter Busy " link fbltbusy} - Returns the blitter's current state @endnode @node mgfxcolo "Supportfunctions for colour management" Functions to manipulate colours Playing with colour was often linked with complex formulas. But now there is a series of helping commands - only AMCAF makes it possible! Commands: @{" Rain Fade " link crainfad} - Fades a rainbow out or to another one @{" Set Rain Colour " link csetrain} - Changes the affecting colour of a rainbow @{" Pal Spread " link cpspread} - Spreads from one colour entrie to another @{" Pal Get Screen " link cpgetscr} - Saves the palette of a screen @{" Pal Set Screen " link cpsetscr} - Sets the palette of a screen @{" Pal Set " link cpsetcol} - Changes an entry of a saved palette @{" Amcaf Aga Notation " link camcafaa} - Toggle @{" AGA-Amiga " link dagaamiga} colour format Functions: @{" =Pal Get " link fpgetcol} - Reads a saved palette entry @{" =Red Val " link fcredval} - Calculates the red value of a colour @{" =Green Val " link fcgreval} - Calculates the green value of a colour @{" =Blue Val " link fcbluval} - Calculates the blue value of a colour @{" =Glue Colour " link fgluecol} - Generates a colour using the three colour values @{" =Mix Colour " link fmixcolo} - Mixes two colours @{" =Best Pen " link fbestpen} - Calculates the nearest pen for $RGB @{" =Ham Point " link fhampoin} - Returns the RGB value of a ham pixel @{" =Ham Colour " link fhamcolo} - Calculates a colour in @{" HAM mode " link dham} @{" =Ham Best " link fhambest} - Calculates the best colour in @{" HAM mode " link dham} @{" =Rgb To Rrggbb " link frgbtaga} - Converts a ECS-colour into @{" AGA colour format " link dagaamiga} @{" =Rrggbb To Rgb " link fagatrgb} - Converts a @{" AGA colour " link dagaamiga} into a ECS-colour value @endnode @node mgfxeffe "Graphical effect commands" Graphical effect commands A big part of AMCAF contains graphical effects. If you only want to have a few stars or simply want to make a logo explode or create some neat effects using shade bobs, AMCAF makes (nearly) everything possible! @{" Mask Copy " link cmskcopy} - Screen Copy with a mask @remark {" Ptile " link mprotile} > Ptile commands group @{" Pix Shift " link mpixshif} > Pix Shift commands group @{" Shade Bobs " link mshadbob} > Shade Bobs commands group @{" Td Stars " link mtdstars} > Td Stars commands group @{" Splinters " link msplinte} > Splinters commands group @endnode @node mgfxfont "Font commands" Font commands AMCAF provides you with powerful instructions for font managing. For example the Change Font command allows you to set a font without having to get the full font list using Get Disk Fonts etc. and therefore reduces the time to access disk considerably. Especially hard disk drive users will be very happy about this command. Additionally, you even get the unbelevable opportunity to store any diskfont in an AMOS memory bank and so are totally independent of the fonts directory and the diskfont.library. Commands: @{" Change Font " link cchafont} - Loading a font directly from disk @{" Make Bank Font " link cmkbkfnt} - Creating a font bank @{" Change Bank Font " link cchbkfnt} - Setting the screen font using a font bank @{" Change Print Font " link cchprfnt} - Changing the font that is used by Print. Functions: @{" =Font Style " link ffontsty} - Getting the attributes of a font @endnode @node mgfxgrun "Basic commands" Basic graphical commands AMCAF expands the basic command set of AMOS by some important commands. Commands: @{" Bzoom " link cblkzoom} - Zooms a region @{" Ham Fade Out " link chamfade} - Fades out a ham picture @{" Convert Grey " link ccongrey} - Creates a grey scale picture @{" Turbo Plot " link cturplot} - Fast replacement for Plot @{" Turbo Draw " link cturdraw} - Fast replacement for Draw @{" Fcircle " link cfcircle} - Draws a filled circle @{" Fellipse " link cfellips} - Draws a filled ellipse @{" Raster Wait " link craswait} - Waits for a specific raster position Functions: @{" =Turbo Point " link fturpoin} - Fast replacement for Point @{" =X Raster " link fxraster} - Gets the X position of the raster beam @{" =Y Raster " link fyraster} - Gets the Y position of the raster beam @endnode @node mgfxmisc "More miscellaneous graphic commands" More commands @{" Set Ntsc " link csetntsc} - Switches to the 60Hz NTSC mode @{" Set Pal " link cset_pal} - Switches back to 50Hz PAL mode @{" Set Sprite Priority" link csetspri} - Changes the sprite priority in Dual playfield mode @endnode @node mgfxprof "Functions of advanced users" Functions for advanced users Here are some more commands for Assembler and C freaks. @{" =Scrn Rastport " link fscrrast} - Returns the screen rastport address @{" =Scrn Bitmap " link fscrbitm} - Returns the screen bitmap address @{" =Scrn Layer " link fscrlaye} - Returns the screen layer address @{" =Scrn Layerinfo " link fscrlayi} - Returns the screen layer info address @{" =Scrn Region " link fscrregi} - Returns the screen region address @endnode @node mjoymbef "Four player adapter, second mouse and pad support" Gameport peripherial support AMCAF enables you to use an optional connected four player adapter as well as a second mouse connected to joystick port 1. Moreover, you can read out the second fire button of a joystick or if the lowlevel.library is present even the other 5 buttons on the pad. @{" 4-Player Adapter commands " link mfourbef} > Support commands for the four player adapter @{" Second mouse commands " link msmoubef} > Enables second mouse usage @{" =Xfire " link fextfire} - Reads out the fire buttons on a gamepad @endnode @node mmiscbef "Various other commands and functions" Various other commands and functions Most of the commands have now been mentioned, leaving us with the bits and pieces which cannot be clearly divided into a certain group. Commands: @{" Exchange Bob " link cexchbob} - Swaps the two images in the sprite bank @{" Exchange Icon " link cexchico} - Swaps the two images in the icon bank @{" Audio Lock " link caudlock} - Reserves the audio device @{" Audio Free " link caudfree} - Frees the audio device @{" Open Workbench " link copenwor} - Reopens the workbench again @{" Flush Libs " link cflushli} - Frees as much as possible memory @{" Write Cli " link cwritcli} - Writes something into the cli window @{" Reset Computer " link crescomp} - Resets your computer @{" Nop " link cnoopera} - No effect Functions: @{" =Aga Detect " link fagadtct} - Checks if the computer has AGA chipset @{" =Scanstr$ " link fscanstr} - Returns the name of a key @{" =Command Name$ " link fcomname} - Acquires the name of the program @{" =Tool Types$ " link ftooltyp} - Reads the Tool Types of an icon @{" =Amos Cli " link famoscli} - Returns the CLI number of AMOS. @{" =Speek " link fsgnpeek} - Peeking a signed @{" byte " link dbyte} @{" =Sdeek " link fsgndeek} - Deeking a signed @{" word " link dword} @{" =Cpu " link fcpu } - Returns the number of the fitted CPU @{" =Fpu " link ffpu } - Acquires the id number of an coprocessor @{" =Nfn " link fnofunct} - No effect @{" =Cop Pos " link fcop_pos} - Returns the current address of the copper list @endnode @node mpixshif "Pix Shift commands group" Pix Shift commands group Using these commands you can increase or decrease the colour indexes in a rectangular area. These instructions work pixelwise and therefore makes it possible to limit the colours, and so the Pix Shift commands are slower than @{" Shade Bobs " link mshadbob}. @{" Pix Shift Up " link cpixshup} - Increase colour indexes (@{" cyclic " link dcyclic}) @{" Pix Shift Down " link cpixshdo} - Decrease colour indexes (@{" cyclic " link dcyclic}) @{" Pix Brighten " link cpixbrig} - Increase colour indexes (not @{" cyclic " link dcyclic}) @{" Pix Darken " link cpixdark} - Decrease colour indexes (not @{" cyclic " link dcyclic}) @{" Make Pix Mask " link cpixmask} - Picks up a mask for the shifting process @{" Shade Pix " link cshadpix} - Plots a shade pixel @endnode @node mprotbef "Commands to replay protracker musics" Commands to replay protracker musics As the AMOS Tracker commands are really crap and contain a lot of bugs, of course there is a replacement for them in the AMCAF extension. Since version 1.1 there are new commands even to replay sound effects during the normal protracker music. The AMOS Music Extension is rather obsolete now. Here a brief list of all advances of the AMCAF commands: - CIA timing or VBL timing. - Volume control. - Channel toggling. - Vu meters. - Possibility to receive signals from the module. - Support of all Protracker effect commands. - Playback of sound effects along with the music. Commands: @{" Pt Play " link cpt_play} - Replays a module @{" Pt Stop " link cpt_stop} - Stops the current music @{" Pt Continue " link cpt_cont} - Restarts a previously stopped music @{" Pt Volume " link cptvolum} - Setting the volume of the music @{" Pt Voice " link cptvoice} - Toggling the audio channels @{" Pt Cia Speed " link cptspeed} - Changing the replaying speed @{" Pt Raw Play " link cptrawpl} - Plays a chunk of memory as sound sample @{" Pt Bank " link cpt_bank} - Sets the bank for the use with Pt Instr Play @{" Pt Instr Play " link cptinspl} - Plays an instrument of a protracker module @{" Pt Sam Bank " link cptsambk} - Sets the bank to use with AMOS samples @{" Pt Sam Play " link cptsampl} - Replays a sample from an AMOS Sam Bank @{" Pt Sam Stop " link cptsamst} - Stops the sfx on specific audio channels @{" Pt Sam Volume " link cptsamvo} - Sets the volume of a sound effect @{" Pt Sam Freq " link cptsamfr} - Changes the replaying speed of a sample Functions: @{" =Pt Vu " link fptvumet} - Returns the current Vumeter value @{" =Pt Signal " link fptsigna} - Checking for signals from the music @{" =Pt Cpattern " link fptcpatt} - Gets the current song position @{" =Pt Cpos " link fptcposi} - Returns the current pattern line @{" =Pt Cinstr " link fptcinst} - Returns the current instrument being played @{" =Pt Cnote " link fptcnote} - Gets the frequency of the current instrument @{" =Pt Instr Address " link fptinadr} - Returns the address of an instrument @{" =Pt Instr Length " link fptinlen} - Returns the length of an instrument @{" =Pt Data Base " link fptdatab} - Gets the address of the PT-DataBase @endnode @node mprotile "Processor Tile commands group" Processor Tile (Ptile) commands group PTiles were thought to be a replacement for @{" TOME " link dtome} 16x16 tiles. Instead of using the @{" Blitter " link dblitter}, the processor is used which is even with a MC68000 fitted much faster at such small objects. The speed improvement is even higher when using accelerater oards and @{" Fast ram " link dfastram}. Until now there are only two commands, but that might be changing in further versions of AMCAF. Advantages: - Very fast. - No @{" Chip ram " link dchipram} required. Disadvantages: - Only tile sizes of 16x16 allowed. - Only placeable in distances of 16x16 pixels. - Custom bank format (no @{" Icon banks " link diconbanks}) Commands: @{" Ptile Bank " link cptilbnk} - Setting the Ptile bank @{" Paste Ptile " link cpasptil} - Plotting a Ptile @endnode @node mshadbob "Shade Bobs commands group" Shade Bobs commands group Shade Bobs aren't really bobs, but "in the scene" this is the common name for such effects. Shade Bobs increase or decrease colour values of the pixel they are placed on. This is rather similar to colour cycling, however using Shade Bobs the pixels on the screen are affected and not the palette entries! When using Shade Bobs you cannot limit the colours to a certain range but only the amount of bitplanes that will be used to be @{" cycled " link dcyclic} through. Additionally, Shade Bobs may leave the screen boundaries. @{" Shade Bob Mask " link cshbmask} - Determinate the image to use for the bobs @{" Shade Bob Planes " link cshbplan} - Setting the number of bitplanes to use @{" Shade Bob Up " link cshbshup} - Places a Shade Bob that increases the colours @{" Shade Bob Down " link cshbshdo} - Places a Shade Bob that decreases the colours @endnode @node msmoubef "Commands to utilisize a second mouse" Commands for a mouse in port 1 On request of some users, AMCAF now supports the reading of a second mouse in joystick port 1. Therefore you can now realize your games which require a second mouse in a two player mode. Commands: @{" Limit Smouse " link climsmou} - Defines the movement region @{" Smouse Speed " link csmouspd} - Sets the speed of the mouse @{" Smouse X " link csmousex} - Sets the x coordinate of the mouse @{" Smouse Y " link csmousey} - Sets the y coordinate Functions: @{" =X Smouse " link fxsmouse} - Reads the x coordinate @{" =Y Smouse " link fysmouse} - Reads the y coordinate of the mouse @{" =Smouse Key " link fsmousek} - Checks the mouse key @endnode @node msplinte "Splinters commands group" Splinters commands group Splinters are similar to Td Stars, but they don't destroy the background and use the colour of the pixel they have removed and Splinters require a list of coordinates. Each coordinate requires four bytes, i.e already a field of 16x16 coordinates consumes 16 KB of memory. Commands: @{" Coords Bank " link ccrdbank} - Reserves a bank to store the coordinates @{" Coords Read " link ccrdread} - Reading the coordinates into a bank @{" Splinters Bank " link csplbank} - Reserves memory for the splinters @{" Splinters Colour " link csplcolo} - Sets the to-use colours @{" Splinters Limit " link cspllimi} - Changes the limits of the splinters @{" Splinters Max " link csplimax} - Sets the maximum of new appearing splinters @{" Splinters Fuel " link csplfuel} - Sets the range of a splinter @{" Splinters Gravity " link csplgrav} - Changes the gravity @{" Splinters Init " link csplinit} - Initialises the splinters bank @{" Splinters Do " link csplindo} - Do a complete drawing process @{" Splinters Del " link csplidel} - Clears the splinters @{" Splinters Move " link csplmove} - Moves the splinters @{" Splinters Draw " link cspldraw} - Draws the splinters to the screen @{" Splinters Back " link csplback} - Gets the background pixels Functions: @{" =Count Pixels " link fcounpix} - Counts the number of pixels in a specific area @{" =Splinters Active " link fspliact} - Returns how many splinters are still moving @endnode @node mstribef "Various string and integer supporting functions" Various string and integer supporting functions Functions: @{" =Binexp " link fbinexpo} - Exponential function on basis of two @{" =Binlog " link fbinloga} - Logarithmic function on basis of two @{" =Lsl " link flogleft} - Quick multiplication by a power of two @{" =Lsr " link flogrigh} - Quick division by a power of two @{" =Wordswap " link fwrdswap} - Swapping the upper and lower 16 bits @{" =Qarc " link fqarc } - Fast arc function @{" =Qsin " link fqsine } - Fast sine function @{" =Qcos " link fqcosine} - Fast cosine function @{" =Qrnd " link fqrandom} - Fast replacement for Rnd @{" =Qsqr " link fqsquare} - Fast replacement for Sqr @{" =Asc.w " link fascword} - Converting a @{" Word string " link dword} into a number @{" =Asc.l " link fasclong} - Converting a @{" Long string " link dlong} into a number @{" =Vclip " link fvalclip} - Restricts a value to a given range @{" =Vin " link fvaluein} - Tests, if the value is within a range @{" =Vmod " link fvalmodu} - Does a modulo operation on a value @{" =Even " link feven } - Returns, if a number is even @{" =Odd " link fodd } - Returns, if a number is odd @{" =Pattern Match " link fpatmatc} - Compares a string with a certain pattern @{" =Chr.w$ " link fchrword} - Creating a @{" Word string " link dword} @{" =Chr.l$ " link fchrlong} - Creating a @{" Long string " link dlong} @{" =Lzstr$ " link flzstrin} - Returns a right ajusted number with leading zeros @{" =Lsstr$ " link flsstrin} - Returns a right ajusted number @{" =Insstr$ " link finsstrg} - Inserts a string into a string @{" =Cutstr$ " link fcutstrg} - Cuts out a piece of a string @{" =Replacestr$ " link frplcstr} - Replaces a string with another one @{" =Itemstr$ " link fitemstr} - Returns an 'item' contained in a string @endnode @node mtdstars "Td Stars commands group" Td Stars commands group Using these commands you not only can realize 3D star effects, because the commands are rather versatile. @{" Td Stars Bank " link ctdstbnk} - Reserves some memory for the stars @{" Td Stars Planes " link ctdstpla} - Selects the planes to be used for the stars @{" Td Stars Limit " link ctdstlim} - Sets the limits of the stars @{" Td Stars Origin " link ctdstorg} - Places the origin of the stars @{" Td Stars Gravity " link ctdstgra} - Determins the gravity force @{" Td Stars Accelerate" link ctdstacc} - Toggles the acceleration @{" Td Stars Init " link ctdstini} - Inits the stars @{" Td Stars Do " link ctdstado} - Does a complete drawing process @{" Td Stars Del " link ctdstdel} - Clears the stars from the screen @{" Td Stars Move " link ctdstmov} - Moves the stars @{" Td Stars Draw " link ctdstdra} - Draws the stars @endnode @node mvecrbef "Vector rotation commands" Commands to rotate three dimensional points. At first: THIS SHOULD NOT BE A REPLACEMENT FOR THE 3D-EXTENSION... At least not at this time. Nevertheless you can create vector graphics without problems which is proved by the example programs. Commands: @{" Vec Rot Pos " link cvecrpos} - Positions the camera @{" Vec Rot Angles " link cvecrang} - Sets the viewing angles @{" Vec Rot Precalc " link cvecrpre} - Calculates the precalc matrix Functions: @{" =Vec Rot X " link fvecrotx} - Calculates the 2D X value @{" =Vec Rot Y " link fvecroty} - Determinates Y value @{" =Vec Rot Z " link fvecrotz} - Returns the Z coordinate @endnode @node mzedabef "Time and date functions" Time and date functions These commands are used to convert a disk object or system time. Functions: @{" =Current Time " link fcurtime} - Acquires the current time @{" =Ct Time$ " link fcttimes} - Creates a complete time string @{" =Ct Hour " link fct_hour} - Extracts the hour from a time @{" =Ct Minute " link fctminut} - Returns the minute of a time stamp @{" =Ct Second " link fctsecon} - Calculates the second of a time @{" =Ct Tick " link fct_tick} - Extracts the 1/50 from the time @{" =Ct String " link fct_strg} - Evaluates a string into a time code @{" =Current Date " link fcurdate} - Acquires the current date @{" =Cd Date$ " link fcddates} - Creates a complete date string @{" =Cd Year " link fcd_year} - Extracts the year from a date @{" =Cd Month " link fcdmonth} - Calculates the month @{" =Cd Day " link fcd__day} - Returns the day of the date @{" =Cd Weekday " link fcdweekd} - Gets the weekday from the date stamp @{" =Cd String " link fcd_strg} - Converts a string into the date stamp @endnode @node szusindex "Overview over all additional information" @{" General bank aspects " link dbanks} @{" Icon and sprite banks " link diconbanks} @{" Permanent banks " link dpermanent} @{" Temporary banks " link dtemporaer} @{" Chip ram " link dchipram} @{" Fast ram " link dfastram} @{" Ranger ram " link drangram} @{" Byte " link dbyte} @{" Word " link dword} @{" Long word " link dlong} @{" Cyclic " link dcyclic} @{" Aga-Amigas " link dagaamiga} @{" HAM-Mode " link dham} @{" Disk object " link dobject} @{" Blitter " link dblitter} @{" Blitter minterms " link dblitterminiterms} @{" Protection flags " link dprotflags} @{" TOME " link dtome} @{" 4-Player adapter " link dfourplayer} @{" AMCAF-Structure " link dstructur} @{" Bitplanes " link dbitplane} @endnode @node dagaamiga "Information about the new A1200/A4000/CD³²" Information about AGA-Amigas The new Amigas A1200, A4000 and CD³² have the AGA-Chipset. This new chipset makes is possible not only to display 6 Bitplanes but even 8 @{" Bitplanes " link dbitplane} in nearly every resolution. These Amigas have 12 additional colour bits to the normal 12 bits ($0RGB) and therefore can use a 24 bit value ($00RRGGBB). Even if AMOS Pro V2.0 does not currently support AGA, nevertheless AMCAF contains some commands for the future implementation. The most important advantages of AGA-Amigs: - Locale library: Many programs can use different languages - Kickstart 3.0 with improved graphic routines - Many, new, high resolutions - up to 256 colours in nearly every resolution - new @{" HAM8-Mode " link dham} for over 262.000 colours - 16 colour Dual Playfields possible - MC68020+ for more processor power - 2 MB @{" Chip ram " link dchipram} My advice: If you still have an old Amiga you should think about buying a new Amiga, it's worth it! @endnode @node dbanks "Banks" A few bits of information about banks AMOS banks are a linear block of memory (there are two @{" Exceptions " link diconbanks}). In these chunks various kinds of data is stored. AMOS uses them mostly for packed graphics, sounds, musics, AMAL programs, menus, resources and other data. Generally, there are four main types of banks: - Banks, that are stored in @{" Chip ram " link dchipram} and remain there @{" permanently " link dpermanent} - Banks, that are stored in @{" Fast ram " link dfastram} and remain there @{" permanently " link dpermanent} - Banks, that are stored in @{" Chip ram " link dchipram} and remain there @{" temporarily " link dtemporaer} only - Banks, that are stored in @{" Fast ram " link dfastram} and remain there @{" temporarily " link dtemporaer} only @endnode @node dbitplane "What bitplanes are and what you can do with them" Bitplanes Let's go for a small tutorial, in which bitplanes and how they work is explained. 1. What is a bitplane? On Amiga the video picture is created by so called bitplanes. These are linear blocks in chip memory, of which every single bit represents one dot on the screen. Using only one bitplane, you can only see two different colours (either bit set or bit clear). If more than one bitplane is placed on top of others, you will get 2^n colours for n bitplanes. Example: We have an 16 colours screen. So it has got 4 bitplanes. Normally, the bitplanes are counted from 0 to n-1... Binary 0 1 0 1 = Decimal 5 | | | | .---v---v---v---v-------------------- | | | `----+ 1 | | | | Bitplane 0 | | | |--v^--v^--v^--v^--v------------------- | | `------+--+ 0 | | | | Bitplane 1 | | | |--v^--v^--v^--v^--v------------------ | `--------+--+--+ 1 | | | | Bitplane 2 | | | |--v^--v^--v^--v^--v----------------- `----------+--+--+--+ 0 | | | | Bitplane 3 | | | |---^---^---^---' | | | | | | | | | | You must imagine the bitplanes to be 'overlapped over each other'. The colour index 5 is displayed in the bitplanes like that. Which colour the dot on the screen finally has, is determinated by the palette settings. 2. Overlapping and transparency. Imagine, you draw a figure A in bitplane 0 and a figure B in bitplane 1 only. This produces the following: The area, on which none of the figures are displayed, has got the colour zero (both bitplanes are cleared: %00), whereas on regions, where only figure A is appearing, the colour 2^0=1 is used (bit 0 is set, bit 1 is clear: %01). Figure B alone sets the bit in bitplane 1 and therefore is displayed in colour 2^1=2 (=%10). If both figures are overlapping, the bits in both bitplanes are set and this results in colour 2^0+2^1=3 (=%11). Now we can define the palette. For instance: Palette 0,$F00,$F0,$FF0 The background is black ($000), figure A is red ($F00) and figure B is green ($0F0), when overlapping yellow is generated ($FF0). By just thinking about these corelation you can achieve nice effects. Try to find out, how the two figures will look like, when using these palettes: 1. Palette 0,$FFF,$888,$FFF 2. Palette 0,0,0,$FFF You find the solution below. 3. Glenz and Fade When e.g a cube appears 'transparent', out of glas or electric, the effect is called 'Glenz'. This is mostly used for vector effects. There are two major types of Glenz vectors: a) Wire frame objects: With Glenz wire frame objects the lines are drawn in a different bitplane per vertical plane keeping the two or three previous frames intact. These old and new frames then overlap, and by choosing the right palette (additive colour values per bitplane) the points where the lines are overlapping look lighter and somehow glitter. Example for an additive colour palette (eight coloured screen): DARK=$333 : LIGHTER=$666 : BRIGHT=$FFF ' %000 %001 %010 %011 %100 %101 %110 %111 Palette 0,DARK,DARK,LIGHTER,DARK,LIGHTER,LIGHTER,BRIGHT Just look at the bit values and count the number of setted bits to get the right colour value. By changing the palette permanently you can also create a Motion Blur or Fade effect. To achieve this, you must set every colour with the bit for the current bitplane, in which you are drawing at the moment, to the brightest colour, all colours with the bit of the previous bitplane and not with the bit of the current one to a middle colour and so on... b) Solid objects: Glenz on solid object is done like this: the polygons, that are facing away from the viewer (and therefore cannot actually be seen) are drawn on an other bitplane than the polygons that face the viewer. By setting the colours according to the bitplanes, the object will seem to be transparent. The only thing to do is to mix the colours of the bitplanes, in which the different polygons are drawn. 4. Bitplane modes and their specialities. The old ECS-Amigas can only display up to 6 bitplanes simultaneously. So 2^6=64 colours is the maximum (excluding the @{" HAM mode " link dham} ). Though there are some special modes: a) ExtraHalfBright (EHB). As the OCS and ECS chipset has only 32 colour registers, the other 32 colours are displayed at half the value. When using EHB you can produce some neat shadow effects by writing into the 6th bitplane. Note: EHB pictures cannot be faded out perfectly. b) Hold And Modify (HAM). Some method, to decompress six bitplanes to twelve bitplanes by hardware. Therefore the colours from 16 to 63 are used reach the wanted colour by changing the red, green or blue value of previous colour. Very good for static pictures and precalculated animation but useless for games and realtime graphics. The only sense-making oportunity to display moving objects on a HAM screen is to use sprites. Also see @{" HAM mode " link dham}. c) Dual Playfield. The Amiga chipset can display all even bitplanes (0,2,4) seperated from the odd ones (1,3,5). It's better to say, he puts the one playfield on top of the other by using colour 0 as 'window' to the other playfield. In this mode each playfield can have 2^3=8 colours. The chipset has got seperate control registers for even and odd bitplanes each, as each Playfield must be independant for Dual Playfield mode. - The BitPLane CONtrol (BPLCON0) $100. Here you determine the number of bitplanes and the resolution and can toggle the special modes. Bit table: 15 HIRES Toggle hires mode 14-12 BPUx Number of bitplanes 11 HOMOD Toggle @{" HoldAndModify " link dham} 10 DBPLF Toggle Dual Playfield 9 COLOR Toggle colour burst output 8 GAUD Use audio input from a genlock 7 8BPL 8 bitplanes (AGA) 6 SHIRES Superhires (ECS/AGA) 3 LPEN Activate lightpen 2 LACE Enable interlace mode 1 ERSY Switch to external synchronization - The scroll register (BPLCON1) $102. By using this register, the screen can be scrolled to the left by up to 15 pixels. The bits 0-3 are used for the even bitplanes, the bits 4-7 for the odd ones. - The modulo registers (BPL1MOD/BPL2MOD) $108/$10A. These registers set the amount of bytes to be added to the memory of the bitplanes after each rasterline. This is utilized by playfields that are bigger than the visible area. When writing a negative value you can achieve vertical zoomers or mirror effects. If you want to alter a register using Set Rain Colour you can calculate the new 'colour' with the following formula: (REGADR-$180)/2 Note: Enabling 5 to 6 bitplanes in low resolution or 3 to 4 bitplanes in high resolution will cost free processor time, even if you only display the screen. This is true when the running program is placed in chip ram or must access chip ram. 5. How can I access all these effects? Simple: Define a rainbow, call @{" Set Rain Colour " link csetrain} and enter the new values for the registers using Rain() instead of supporting the colours. The only limitation: Due to the AMOS rainbow restrictions you can only manipulate ONE (!) register per rasterline. Look carefully at the example programs. These demonstrate every single effect mentioned here. By the way: You can get the pointer to the single bitplanes using Logbase(planenr) and Phybase(planenr). Enjoy! Solution to the questions in 2: 1. Palette 0,$FFF,$888,$FFF Figure A is white and is moving 'over' figure B, which is grey, because if they overlap the colour white is created. 2. Palette 0,0,0,$FFF Figur A and Figur B are invisible as long as they down overlap. Only if both are placed over each other colour 3 is created which was set to $FFF (white). @endnode @node dblitter "The Blitter-Chip" The Blitter-Chip The Blitter is a coprocessor inside the Amiga which is mainly used to copy and combine data (therefore BLockImageTransferER). Additionally, it can fill polygons and draw lines. The Blitter is rather fast at this and works with an unbelevable speed of up to 16 million pixels per second. All data that is accessed by the Blitter chip must be in @{" Chip ram " link dchipram}. AMOS uses the blitter for Bobs, Icons, Screen Copy and many other commands. The MC68020 and higher is much faster if only need to copy data. The Blitter works at word boundaries and this results in cutting down the X coordinates to the nearest multiple of 16. To fill a polygon using the Blitter, the lines must be only one pixel thick. This is the reason why there are two different ways to draw lines. Also see: @{" Turbo Draw " link cturdraw} @{" Bcircle " link cbcircle} @{" Blitter Fill " link cbltfill} @{" Blitter Copy " link cbltcopy} @{" Blitter Clear " link cbltcler} @{" Blitter minterms " link dblitterminiterms} @endnode @node dblitterminiterms "Description to Blitter minterms" Blitter minterms: The Blitter chip knows 256 different copying and combining modes. These determinated in two steps: 1. Eight different boolean terms are used upon the three databits. Each of the terms returns true on a specific combination of A, B and C. 2. These eight results of the terms are combined together using a logical OR. This result is the target bit D. Bit Minterm Input-Bit ___ 0 ABC 000 __ 1 ABC 001 _ _ 2 ABC 010 _ 3 ABC 011 __ 4 ABC 100 _ 5 ABC 101 _ 6 ABC 110 7 ABC 111 Procedure: 1. At which of the eight combinations of ABC should D be true? 2. Now set the bits of the bitmask. 3. If not all of the three source data streams are required, every combination with the unused bits and the desired bits must be chosen. Also see: @{" Blitter Copy " link cbltcopy} @endnode @node dbyte "Byte" A byte A bytes has got 8 bits, therefore you can display values from 0 up to 255. A byte normally has got the suffix '.b' (in assembler). Two bytes together create a @{" Word " link dword}, four a @{" Longword " link dlong}. @endnode @node dchipram "Chip ram" Chip ram On Amiga computers, chip ram is the area in memory, which is accessed by both custom chips and the CPU. At the moment, the size of chip ram is limited to 2 MB (even on A1200 and A4000), and old A500 do only have 512 KB chip ram by default. For that reason your program should not use more than this 512 KB of chip memory. However, this does NOT mean, that your program needs to run on 512 KB total memory! As custom chips access the memory at the same time with the processor, the CPU is slowed down, if the program is held in chip ram. This effect is even more severe if the screen uses more than 16 colours in lowres or more than 8 colours in hires (not A1200/A4000). Chip ram is mainly required for screens, bobs and sprites, music and sound effects, floppy disk drives and copperlists. Also see: @{" Fast ram " link dfastram} @{" Ranger ram " link drangram} @endnode @node dcyclic "Cyclic" Cyclic If a number reaches the upper boundary, the number is set to the lower boundary value and vice versa. Example: UB=31 (upper boundary) LB=1 (lower boundary) N=3 (number) Do Inc N If N>UB Then N=LB If N