home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 6
/
AACD06.ISO
/
AACD
/
Emulation
/
ZXAMSpectrum
/
ZXAM_Rexx
/
English
/
ShowScreen.zxam
< prev
next >
Wrap
Text File
|
1995-07-31
|
3KB
|
98 lines
/* this script shows the actual Spectrum's screen */
address command
if ~show(ports,ZXAM_REXX) then do
requestchoice 'title "ZXAM Script error..." body "I can''t find the emulator''s port!!" gadgets "AARGH!"'
exit 0
end
/* store the initial status of the emulator */
running=zxamactrun() /* 1=running */
zxamstop() /* stop the emulation */
/* open file */
if ~OPEN('fichero','t:zxamscreen.tmp','Write') then exit 0
/* ID header */
dummy=writech('fichero','FORM')
dummy=writech('fichero','000060a8'x) /* total size */
dummy=writech('fichero','ILBM')
/* chunk ANNO */
dummy=writech('fichero','ANNO')
dummy=writech('fichero','00000033'x) /* size 51 chars */
dummy=writech('fichero','Saved by ZXAM Spectrum Emulator AGA (by Toni Pomar)')
dummy=writech('fichero','00'x) /* pad to align */
/* chunk BMHD */
dummy=writech('fichero','BMHD')
dummy=writech('fichero','00000014'x) /* size 20 */
dummy=writech('fichero','0100'x) /* width */
dummy=writech('fichero','00c0'x) /* height */
dummy=writech('fichero','0000'x) /* pos x */
dummy=writech('fichero','0000'x) /* pos y */
dummy=writech('fichero','04'x) /* nro bitplanes */
dummy=writech('fichero','00'x) /* masking */
dummy=writech('fichero','00'x) /* compression */
dummy=writech('fichero','00'x) /* Pad1 */
dummy=writech('fichero','0000'x) /* transparent color */
dummy=writech('fichero','2c2c'x) /* aspect 44:44 */
dummy=writech('fichero','0140'x) /* width source page (320) */
dummy=writech('fichero','0100'x) /* heigth source page (256) */
/* chunk CAMG */
dummy=writech('fichero','CAMG')
dummy=writech('fichero','00000004'x) /* size 4 */
dummy=writech('fichero','00000000'x) /* 00021000 = PAL:Lo-res */
/* chunk CMAP */
dummy=writech('fichero','CMAP')
dummy=writech('fichero','00000030'x) /* size 48 (16 colors*3 bytes) */
/* border color */
/* color 0 to 7 acts as an index to acces to the array */
dummy=writech('fichero',x2c(substr('000000000099990000aa00aa00aa0000bbbbcccc00dddddd',(zxamgetreg(bor)*6)+1,6)))
dummy=writech('fichero','000099'x) /* color 1 */
dummy=writech('fichero','990000'x) /* color 2 */
dummy=writech('fichero','aa00aa'x) /* color 3 */
dummy=writech('fichero','00aa00'x) /* color 4 */
dummy=writech('fichero','00bbbb'x) /* color 5 */
dummy=writech('fichero','cccc00'x) /* color 6 */
dummy=writech('fichero','dddddd'x) /* color 7 */
dummy=writech('fichero','000000'x) /* color 8 */
dummy=writech('fichero','0000aa'x) /* color 9 */
dummy=writech('fichero','bb0000'x) /* color 10 */
dummy=writech('fichero','cc00cc'x) /* color 11 */
dummy=writech('fichero','00cc00'x) /* color 12 */
dummy=writech('fichero','00dddd'x) /* color 13 */
dummy=writech('fichero','eeee00'x) /* color 14 */
dummy=writech('fichero','ffffff'x) /* color 15 */
/* chunk BODY */
dummy=writech('fichero','BODY')
dummy=writech('fichero','00006000'x) /* size 6144*4 (4 bpls of 256*192) */
/* we use a special emulator's function to extract and convert to bitplanes */
dummy=writech('fichero',zxamgetscr())
dummy=close('fichero')
address command
'sys:utilities/multiview <nil: >nil: t:zxamscreen.tmp window'
'delete >nil: t:zxamscreen.tmp'
/* restore the status */
if running=1 then zxamrun()
exit