\N2\C2\LN\LF\CT\F6\C3 3/4 OF ALL DEMOS DONT WORK ON ALL AMIGAS\C2\LF\LN\LF\F7\FU\C1by Poison/DEVILS\LF\LF \F8The Amiga development goes forward. Now faster processors and new kickstart are very common. Too bad that many coders can develop themself to program demos that work on most machines. This is an article which will give you some hints to \C2how to prevent incompatility:\LF\LF Operating system v2.0\C1 appeared some months ago, but a lot of demos still not work, because the majority of coders are lazy, and have a mentality that consists of making their demos work on the most current machine (for now) the A500, and not thinking about the \C2problems that owners of expanded machines will have. \C1Sometimes a demo which needs 1 MB of memory only looks for the A500 memory expansion (adress $C00000) without recognizing the 1 MB chip expansion of A500+ and A2000 (at adress $80000) or extra fast memory (extensions beginning at $200000).\LF\LF Sometimes a demo in two (or more) disks is able to load from an extra floppy drive but only seeks for df1:, and on A2000 (there's probably more of these machines than you think), the first external drive is df2:, physical floppy unit TWO, don't ask me why, but in majority of cases df2: is not recognized. It's not dramatic for a demo, but \C2it proves how the land of compatibily is far!\C1 But all coders don't code "compatible" 'cause they're lazy, a lot of them never heard about df2:, or stuff like that.\LF\LF And the problems of compatibility doesn't appear only on A2000, there's also a lot of productions that crash on big processors like 68030 & Amigas with "PC bridgeboard" (PC emulator) cards... \C3It's time to write one time for all what a coder should and shouldn't do to make his demos work on all machines :\LF\LF \C2\CTMEMORY\LF\FU\C1\LF \C3Always test all memory expansion adresses.\C1 You can use your own routine (you know, putting a byte at expansion adress then testing if the byte was written and looking if it wasn't written at adress $0) but I don't think it's a good idea, here's why :\LF\LF PC Bridgeboard cards need a 128 KB ram to exchange data between PC side and Amiga one, this memory is not available for exec library (AllocMem etc.), but it's in Amiga adressing space. The problem is that on an A2000B, with only 1MB chip memory, this 128 KB ram is at adress $200000!! If you test by your own routine the memory here, the byte will be written ok because there \C2IS\C1 memory, but your program will think there's here an expansion card of 512 KB or more (because it's the same address!) and in fact only 128 KB are here. All this speech was to advice you to use exec's routine TypeOfMem(a1= expansion_adress), this function needs of course the adress of mem to test (in a1), and then returns in d0 : NULL (0) if there's no mem here (according to exec, so no more problems with bridgeboard cards), and a value different of 0 (special values! -see later) if you can use the mem here. \C3Example of use in his little proggy :\LF\F9\LF \C1 * TypeOfMem's offset in exec\LF\LF TypeOfMem equ -534\LF\LF \C1 move.l 4.w,a6 \C2* exec lib\LF \C1 move.l #$200000,a4 \C2* test mem\LF \C1 move.l a4,a1 \C2* at $200000\LF \C1 jsr TypeOfMem(a6) \C2* call func\LF \C1 tst.l d0 \C2* d0<>0\LF \C1 bne memfound \C2* =mem found\LF \C1 move.l #$C00000,a4 \C2* test mem\LF \C1 move.l a4,a1 \C2* at $C00000\LF \C1 jsr TypeOfMem(a6) \LF \C1 tst.l d0 \C2* idem\LF \C1 bne memfound\LF ...\LF \C1 memfound: \C2* if mem found\LF \C1 move.l a4,extramem \C2* save addr\LF \C1 ...\LF\LF \F8Not very complex, and \C2you must do it, if you want total mem expansion compatibility\C1. Another useful thing in this method is that TypeOfMem returns you the... type of memory (you couldn't guess it eh ?) at the adress requested (in d0). So bit 1 of d0 will be set if expansion is CHIP memory, and idem for bit 2 if expansion is FAST mem. Of course these two bits can't be set in the same time! (bit 0 of d0 will normally be set, it indicates that memory is PUBLIC, you don't have to worry about that). Call TypeOfMem before destroying exec, of course! (it's very easy to get the extra ram adress if there's any, save it somewhere and then send system to hell). That's for the memory.\LF\LF \CT\C2\XX