HOW TO USE FLOOD EFFECT ---------------------- Flood Effect loads an IFF picture and displays it with a "flood effect" so that it floods the screen. This has been seen many times in games such as Total Recall and Humans, but has never been accessible to the average user without machine code knowledge. This program loads an IFF file called "Picture.IFF" which it finds in the same directory as Effect itself. This picture is then displayed after pressing the mouse, and a further mouse press is needed to return to DOS. You can use any picture as long as it is IFF, lo-res and 5 or less planes. You must call your picture "Picture.IFF" and it must be present in the same directory/disk as the file Effect is. If either of these is disobeyed, Effect will not find your picture and not display it. When it loads, the screen will go blank until you press the left mouse button to start it. This is so you can get your video ready. Another mouse press exits to DOS afterwards. The Devpac II written source code is contained on this disk's root directory. You can use it any way you like and is freely distributable. Don't pester me on how it works though as it is quite well commented and should be OK to understand. A. Ives. PS. For some unknown reason, Effect doesn't seem to want to powerpack, although the unpacked version works. If you get it to powerpack, it should reduce from 150K down to about 9K. I think it's because my Powerpacker is a bit crashy on A1200s, but it might work OK on your A500/A2000/A3000 etc. I've tried Imploder 4 but that doesn't seem to like it either. Greetings go to:- Ensignia for writing Mayhem which is one of the best PD games, I`ve ever played. Wild Copper for their old RV demo (?) with the red vectors which made me want an Amiga in the first place. Rombo for building the best digitiser. Dave Jones & Jolyon Ralph for their 68000 magazine articles. Alpha Flight for writing Seven Tiles. Teijo Kinnunen for writing Med. Dionysus for writing Puggs In Space which is one of the best demos I've seen. The Unknown authors - sorry I can`t remember all your names, but this is a list of their much appreciated work. Whoever wrote:- HamLab +, the demo version which converts pictures between resolutions, If you write an AGA version and distribute it in England, I would buy it. Distribute it the same way OctaMed is. Killing Game Show, the bloke who did the in-game music which I still think is the best module yet written on the Amiga. Honest. Atoms, The game on the AF coverdisk which is really original and more fun than most of their coverdisks. Interlock- the writers of this coverdisk game which looks boring but is really absorbing and addictive. About my fave Amos game. The Power- the authors of The power for inspiring me to write my next take-the-world-by-storm game. I know Atomix was first though. Textra- The small word-processor which I always use instead of Ed. MuchMore- The writer of Muchmore which scrolls the text up nicely. Very easy on the eyes. #filenå`into this program. bsr openfile beq error move.l #plane6,d2 bsr readdata move.l d0,d6 bsr closefile LOOP: btst #10,$dff016 beq Error btst #6,$bfe001 ;Mouse Wait to show bne.s LOOP ;the picture. NoMouse: lea.l Plane1,a0 ;This blanking the planes bsr BlankAPlane ;isn't strictly necessary, lea.l Plane2,a0 ;but if you want to display bsr BlankAPlane ;more pictures, this should lea.l Plane3,a0 ;be done in between. bsr BlankAPlane lea.l Plane4,a0 bsr BlankAPlane lea.l Plane5,a0 bsr BlankAPlane moveq.l #0,d0 lea.l plane6+28,a0 move.b (a0),d0 beq error move.b d0,planes lsl.l #4,d0 ori.b #$02,d0 move.b d0,noofbps ;pokes the number of bit ;planes into Bplcon0 in the ;copper list. bsr FindFORM add.l #48,a0 lea.l colour0,a1 moveq.l #0,d7 moveq.l #1,d6 move.b noofbps,d7 lsr.b #4,d7 NoColsLoop lsl.b #1,d6 subq.l #1,d7 bne.s NoColsLoop move.l d6,d7 bsr FindCMAP add.l #4,a0 CMAPloop moveq.l #0,d0 ;This bit pokes all the moveq.l #0,d1 ;colours in the copper move.b (a0)+,d0 ;list. lsl.l #4,d0 move.b (a0)+,d0 move.b (a0)+,d1 lsr.l #4,d1 or.b d1,d0 move.w d0,(a1)+ add.l #2,a1 subq.l #1,d7 bne.s CMAPloop bsr findBODY ;Data address in a0 move.l a0,d5 move.l (a0)+,d7 add.l d7,d5 ;Put end address in d5 lea.l plane1b,a1 ;This bit actually uncodes lea.l plane2b,a2 ;the Iff picture data, lea.l plane3b,a3 ;taking out all the runbyte lea.l plane4b,a4 ;compression and making lea.l plane5b,a5 ;straight bitmaps out of PlaneLoop: cmp.l d5,a0 ;the Iff BODY part. bge.s DoTotal move.l a1,a6 bsr DoAPlane move.l a6,a1 cmp.b #2,planes blt.s PlaneLoop move.l a2,a6 bsr DoAPlane move.l a6,a2 cmp.b #3,planes blt.s PlaneLoop move.l a3,a6 bsr DoAPlane move.l a6,a3 cmp.b #4,planes blt.s PlaneLoop move.l a4,a6 bsr DoAPlane move.l a6,a4 cmp.b #5,planes blt.s PlaneLoop move.l a5,a6 bsr DoAPlane move.l a6,a5 bra.s PlaneLoop DoTotal: bsr TotalRecall ;Call the display effect. MouseWait2 btst #6,$bfe001 ;Mouse Wait to return bne.s MouseWait2 ;to DOS. error: move.l OLD,$dff080 ;Put old copper list back. BasicError: moveq.l #0,d0 ;Stop any DOS errors. rts ;Return to DOS ;********************Ending Point********************** DoAPlane: moveq.l #0,d4 ;This bit unpacks a plane DoMore: moveq.l #0,d6 ;of BODY data at a time. move.b (a0)+,d6 bpl DoVerb bsr Replicate bra.s DoneDupl DoVerb bsr Verbatim DoneDupl cmp.l #40,d4 blt.s DoMore rts Verbatim: addq.b #1,d6 ;Verbatim means copy VerbLoop: move.b (a0)+,(a6)+ ;direct. It does. addq.l #1,d4 subq.b #1,d6 bne.s VerbLoop rts Replicate: cmp.b #128,d6 ;Replicate copies a beq.s DoneRep ;string of data a Not128: neg.b d6 ;certain amount of addq.b #1,d6 ;times, specified cmp.b #128,d6 ;in the BODY data. beq.s DoneRep ;This is the bit move.b (a0)+,d0 ;which uncompresses Reploop: move.b d0,(a6)+ ;runbyte compression. addq.l #1,d4 subq.b #1,d6 bne.s RepLoop DoneRep: rts FindBODY: lea.l plane6,a0 ;This searches for FBLoop: cmp.b #66,(a0)+ ;the ASCII "BODY" bne.s FBloop ;in the IFF data. cmp.b #79,(a0)+ bne.s FBloop cmp.b #68,(a0)+ bne.s FBloop cmp.b #89,(a0)+ bne.s FBloop rts FindCMAP: lea.l plane6+38,a0 ;This searches for FMAPLoop: cmp.b #67,(a0)+ ;the ASCII "CMAP" bne.s FMAPLoop ;in the IFF data. cmp.b #77,(a0)+ bne.s FMAPLoop cmp.b #65,(a0)+ bne.s FMAPLoop cmp.b #80,(a0)+ bne.s FMAPLoop rts FindFORM: lea.l plane6,a0 ;This searches for FormLoop: cmp.b #70,(a0)+ ;the ASCII "FORM" bne.s FORMLoop ;in the IFF data. cmp.b #79,(a0)+ bne.s FORMLoop cmp.b #82,(a0)+ bne.s FORMLoop cmp.b #77,(a0)+ bne.s FORMLoop sub.l #4,a0 rts ReadData: move.l dosbase,a6 ;This reads the data move.l filehd,d1 ;from the disk file. move.l #$ffffff,d3 jsr read(a6) rts OpenFile: move.l dosbase,a6 jsr open(a6) move.l d0,filehd rts CloseFile: move.l dosbase,a6 move.l filehd,d1 jsr Close(a6) rts Delay: move.l #700000,d1 ;Don't use delays like DelayLoop: sub.l #1,d1 ;this, use a CIA timer. bne.s DelayLoop ;You can do this if you rts ;are only doing it for ;your own use, as I was. ;The speed will vary on ;different Amiga models. BlankAPlane: move.l #2560,d7 BlankPLoop: move.l #0,(a0)+ subq.l #1,d7 bne.s BlankPLoop rts TotalRecall: lea.l Plane5b+10200,a5 ;This effect was called lea.l Plane4b+10200,a4 ;"Total Recall" because lea.l Plane3b+10200,a3 ;of the effect used by lea.l Plane2b+10200,a2 ;Ocean in the game. lea.l Plane1b+10200,a1 ;I called it this, so you lea.l Plane5+10200,a0 ;know what I mean. move.l #Plane5+10200,CurrentPos moveq.l #0,d7 moveq.l #0,d6 moveq.l #0,d5 move.w #256,d7 ;Times to do whole screen PassLoop: move.w d7,d5 ;No of lines to do move.l CurrentPos,a0 ;Current Line address in a0 RasterLoop: move.b #10,d6 ;No of Longs in each line LineLoop: move.l (a5)+,(a0) ;Do a LongWord in each sub.l #20480,a0 ;of destination bitplanes move.l (a4)+,(a0) sub.l #20480,a0 move.l (a3)+,(a0) sub.l #20480,a0 move.l (a2)+,(a0) sub.l #20480,a0 move.l (a1)+,(a0)+ add.l #81920,a0 subq.b #1,d6 bne.s LineLoop ;Done a long in each plane sub.l #80,a0 ;Done a line sub.l #40,a5 sub.l #40,a4 sub.l #40,a3 sub.l #40,a2 sub.l #40,a1 subq.w #1,d5 ;Copy same line all way bne.s RasterLoop ;up screen sub.l #40,a5 sub.l #40,a4 sub.l #40,a3 sub.l #40,a2 sub.l #40,a1 sub.l #40,CurrentPos ;Change start line and copy subq.w #1,d7 ;upwards to 1 line less bne PassLoop rts NEW: dc.w diwstart,$2c81 ;This is our copper list. dc.w diwstop,$2cc1 dc.w ddfstart,$38 dc.w ddfstop,$d0 dc.w bplcon0 Noofbps dc.w $4200 dc.w bplcon1,$0 dc.w $108,0,$10a,0 ;clears bitplane modulos. ;Only really necessary on ;A1200s/A4000s. dc.w col0 Colour0 dc.w $000 ;All these colour values get dc.w col1,$fff ;poked in by earlier code that dc.w col2,$fff ;reads their values from the dc.w col3,$fff ;Iff CMAP block. dc.w col4,$fff ;Changing these fffs won't do dc.w col5,$fff ;anything. dc.w col6,$fff dc.w col7,$fff dc.w col8,$fff dc.w col9,$fff dc.w col10,$fff dc.w col11,$fff dc.w col12,$fff dc.w col13,$fff dc.w col14,$fff dc.w col15,$fff dc.w col16,$000 dc.w col17,$000 dc.w col18,$000 dc.w col19,$000 dc.w col20,$000 dc.w col21,$000 dc.w col22,$000 dc.w col23,$000 dc.w col24,$000 dc.w col25,$000 dc.w col26,$000 dc.w col27,$000 dc.w col28,$000 dc.w col29,$000 dc.w col30,$000 dc.w col31,$000 dc.w bpl1pth Bp1h dc.w 0 dc.w bpl1ptl Bp1l dc.w 0 dc.w bpl2pth Bp2h dc.w 0 dc.w bpl2ptl Bp2l dc.w 0 dc.w bpl3pth Bp3h dc.w 0 dc.w bpl3ptl Bp3l dc.w 0 dc.w bpl4pth Bp4h dc.w 0 dc.w bpl4ptl Bp4l dc.w 0 dc.w bpl5pth Bp5h dc.w 0 dc.w bpl5ptl Bp5l dc.w 0 dc.w spr0pth,0,spr0ptl,3 dc.w spr1pth,0,spr1ptl,3 dc.w spr2pth,0,spr2ptl,3 dc.w spr3pth,0,spr3ptl,3 dc.w spr4pth,0,spr4ptl,3 dc.w spr5pth,0,spr5ptl,3 dc.w spr6pth,0,spr6ptl,3 dc.w spr7pth,0,spr7ptl,3 dc.w $ffff,$fffe even PLANE1: dcb.b 10240,0 ;I don't pretend this is the best Plane1b: dcb.b 10240,0 ;way of allocating planes, but it PLANE2: dcb.b 10240,0 ;is old code and I couldn't be Plane2b: dcb.b 10240,0 ;bothered to change it all. PLANE3: dcb.b 10240,0 ;You should dcb.b 51200 and use Plane3b: dcb.b 10240,0 ;plane1+10240, plane1+20480 type PLANE4: dcb.b 10240,0 ;address references, but this Plane4b: dcb.b 10240,0 ;way you can delete the spare PLANE5: dcb.b 10240,0 ;planes if you are only using 3 Plane5b: dcb.b 10240,0 ;or 4. OLD: dc.l 0 Filehd: dc.l 0 dosbase: dc.l 0 conhandle: dc.l 0 CurrentPos: dc.l 0 FilePoint: dc.l 0 EndByte: dc.l 0 Planes: dc.b 4 DosName: dc.b "dos.library",0 Gfxname: dc.b "graphics.library",0 Filename: dc.b ":Picture.IFF",0 ;Your picture's filename. ;Only 5 planes (32 cols) ;or less. No HAM*8 JPEGs ;or anything. SECTION Source,DATA even PLANE6: dcb.b 51200,0 END ÅH