MAGNUM PRO - SOURCE AND AMOS CODERS NOTES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By Wai Hung Liu Source is supplied on disk as follows: (Root directory) Source (drawer) Source.ASCII (source saved as plain text file to read) Source.AMOS (in AMOS format to load) Docs (drawer) Source.docs Dear user, Thanks for purchasing Magnum Pro edition from F1 Licenceware, my thanks to F1 Licenceware for enabling this product to reach you! I have spent too long on Magnum and must move on to other projects and in any case my group manager will kill me if I don't get on with some group projects! Firstly, since you obtained the source from F1 LW you can use it as you wish, in your own productions and the like, but you must not SPREAD the source! You can of course keep copies for yourself but remember piracy not hurt big companies, but it'll start my chainsaw on your home... ;-) Seriously, if I find that people are spreading the source then I must ask whether I should ever supply the source again. Anybody found selling this source, or spreading it, whether an individual or public domain comp., etc. will be prosecuted! Harsh as it may seem, that is the reality of today's piracy where anything on 3.5" of blue plastic seems to be spread... Secondly, remember that the source is not easy to understand. (Nobody ever understands another programmers code...) Persist and perhaps you'll pick up some new ideas and tips in AMOS programming. I was going to try and comment the entire program but then I realised I wasn't in an assembler! If anything, the AMOS editor should be revamped (the AMOS Pro one isn't much better either!). I think rather than disect the entire program to bits and create a 400k text file for you to read, I'll leave the actual _discovering_ to you, it's more fun! ;-] I'm sure you'll be surprised at the actual simplicity of the whole program! Here is the thesis... (nah!) basic functioning of the program: Essentially, Magnum is a diskmagazine in it's own right. I have manipulated it and made it into a disk magazine _Creator_ though not fully configurable as I leave it. (That's why the source is here, so you can use it to make your OWN diskmag!) First it loads in the index file and copies the text to be displayed on screen into a string buffer. Then the second line of text underneath that. EXAMPLE Editorial df0:editorial.text Just sample text on screen *empty* Gfx *iff*ram:picture.iff Music *iff*df0:mod.yeah This continues until the whole file is completed. Then the options are printed out on screen, in the example above "Editorial" will be printed as the first option. Now, if you click on it, the program checks the second string with "df0:editorial.text" in it. If this was "*empty*" then nothing would happen so we don't load anything. If not, it is passed onto a loading routine which checks for "*iff*" and "*music*". So the correct type of file is loaded and processed, be it text, a picture, or a soundtracker module. This in effect is the _engine_ of the program as it is the _creation_ part and allows the user to customise the program. A few extras are supplied in the index file such as colours but those are unimportant. You could add your own extras such as time delays, fonts to use, etc. The second part of the program is text output. A routine calculates the "pages" of your article and where in memory they lie. Then another routine shows this page, selecting the correct colours. The symbol @ is used to select different colours as it is not often used in articles. If you wanted to extend it, you could place any character followed by a value, which could select to load clipart. However this would require quite a bit of work!. The only thing left to comment on the source is that you should read it and try to understand SMALL parts of it first, don't expect to run it straight away and write your own disk magazine. Effort is needed! Setting up a disk is not too complicated and with basic dos knowledge it is a breeze. Remember that you can compile the program for speed... (Either with AMOS Compiler or AMOS PRO Compiler) Your manuals will tell you everything on how to set up a disk, placing relevant programs, etc. Normally, AMOS compiled programs need diskfont.library so remember to place that in your LIBS: drawer! If you don't have SID, FILEMASTER, or DISKMASTER they are available in PD libraries, they will help with the setting up of files, dirs, etc. Once you've written your own diskmag in AMOS, make sure it is what you want, then get some articles and unleash it on the world! No matter how fancy the code of a disk magazine, it is the articles that make or break it. Have fun and work hard! Best regards, Wai Hung (Simon) Liu