' *** SPECSHOW.LST *** 2nd GFA-Manual, page 20-30 > PROCEDURE spectrum_load_show(spectrum$,VAR loaded!) ' ' *** Put Spectrum 512 picture on screen (Low resolution only) ' *** Palette of Spectrum-picture is used (save current palette first!) ' *** Press any key if you get tired of looking at the picture ' *** On a Mega STE the sytem cache must be off ' *** MMU graphics chips released before December 1985 can't show 512 colours ' *** Variabele loaded!=TRUE if successful ' *** Original Procedure(s) by Rich Noe (sorry, I couldn't test Procedure) ' *** SPECTR_1.INL (675 bytes) must be loaded in INLINE-line spec1.show% ' *** SPECTR_2.INL (235 bytes) must be loaded in INLINE-line spec2.decomp% ' ' *** Global: spec1.show% spec2.decomp% [INLINE-addresses] ' *** Standard: low.res! ' *** Procedure: Program_exit ' LOCAL pic%,comp%,bit.map%,colr.map% IF low.res! IF EXIST(spectrum$) LET loaded!=FALSE DIM spec.screen%(25552) ! set aside place to store pics DIM spec.stor%(25552) ! another place to store pics pic%=(V:spec.screen%(0)+255) AND &HFFFF00 ! find an address div by 256 comp%=(V:spec.stor%(0)+255) AND &HFFFF00 ! another address div by 256 bit.map%=pic% ! place to store the pic% colr.map%=bit.map%+32000 ! place to store color palette IF RIGHT$(spectrum$,1)="C" ! this picture is compressed BLOAD spectrum$,comp% ! load it ~C:spec2.decomp%(L:comp%,L:bit.map%,L:colr.map%) ! decompress it ELSE BLOAD spectrum$,pic% ! load an uncompressed pic ENDIF ~C:spec1.show%(1,L:bit.map%,L:colr.map%) ! display all those colors ~INP(2) ! wait for keypress ~C:spec1.show%(0) ! dump the memory ERASE spec.screen%(),spec.stor%() ! erase arrays LET loaded!=TRUE ! success ELSE m$=" *** Error ***|File " m$=m$+RIGHT$(spectrum$,LEN(spectrum$)-RINSTR(spectrum$,"\")) m$=m$+" was|not found by the |Procedure Spectrum_load_show" ALERT 3,m$,1,"Continue|Quit",k IF k=2 @program_exit ENDIF ENDIF ELSE m$=" *** Error ***| |Spectrum-pictures |need Low resolution" ALERT 3,m$,1,"Continue|Quit",k IF k=2 @program_exit ENDIF ENDIF ' RETURN ' ********* '