home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Emulatoren / zxam20.lha / ZXAM Spectrum / ZXAM_Rexx / Español / ShowScreen.zxam < prev    next >
Encoding:
Text File  |  1995-01-21  |  3.3 KB  |  90 lines

  1. /* este script muestra la pantalla actual del spectrum usando el multiview */
  2.     
  3.     address command
  4.     
  5.     if ~show(ports,ZXAM_REXX) then do
  6.         requestchoice 'title "ZXAM Script error..." body "No encuentro el puerto del emulador!!" gadgets "AARGH!"'
  7.         exit 0
  8.         end
  9.  
  10. /* Abrimos el fichero */
  11.  
  12.     if ~OPEN('fichero','t:zxamscreen.tmp','Write') then exit 0
  13.     
  14. /* cabecera identificadora. indica tamaño TODO menos 'FORM' */
  15.     dummy=writech('fichero','FORM')
  16.     dummy=writech('fichero','000060a8'x)    /* tamaño total */
  17.     dummy=writech('fichero','ILBM')
  18.  
  19. /* chunk ANNO */
  20.     dummy=writech('fichero','ANNO')
  21.     dummy=writech('fichero','00000033'x)    /* tamaño 51 caracteres */
  22.     dummy=writech('fichero','Saved by ZXAM Spectrum Emulator AGA (by Toni Pomar)')
  23.     dummy=writech('fichero','00'x)        /* pad para alinear */
  24.  
  25. /* chunk BMHD, o sea, bloque indicador de tamaño página */
  26.     dummy=writech('fichero','BMHD')
  27.     dummy=writech('fichero','00000014'x)    /* tamaño 20 */
  28.     dummy=writech('fichero','0100'x)    /* ancho */
  29.     dummy=writech('fichero','00c0'x)    /* alto */
  30.     dummy=writech('fichero','0000'x)    /* pos x */
  31.     dummy=writech('fichero','0000'x)    /* pos y */
  32.     dummy=writech('fichero','04'x)        /* nro bitplanos */
  33.     dummy=writech('fichero','00'x)        /* masking */
  34.     dummy=writech('fichero','00'x)        /* compression */
  35.     dummy=writech('fichero','00'x)        /* Pad1 */
  36.     dummy=writech('fichero','0000'x)    /* color transparente */
  37.     dummy=writech('fichero','2c2c'x)    /* aspect 44:44 */
  38.     dummy=writech('fichero','0140'x)    /* ancho página fuente (320) */
  39.     dummy=writech('fichero','0100'x)    /* alto página fuente (256) */
  40.  
  41. /* chunk CAMG, o sea, modo de pantalla (PAL:Baja resolución) */
  42.     dummy=writech('fichero','CAMG')
  43.     dummy=writech('fichero','00000004'x)    /* tamaño 4 */
  44.     dummy=writech('fichero','00000000'x)    /* 00021000 = PAL:Baja resolución */
  45.  
  46. /* chunk CMAP, o sea, mapa de colores */
  47.  
  48.     dummy=writech('fichero','CMAP')
  49.     dummy=writech('fichero','00000030'x)    /* tamaño 48 (16 colores*3 bytes) */
  50.     
  51.     /* color del borde */
  52.     /* El color (0 a 7) es el índice para la tabla de colores */
  53.     /* que creamos en forma de cadena MUY larga */
  54.     dummy=writech('fichero',x2c(substr('000000000099990000990099009900009999999900999999',(zxamgetreg(bor)*6)+1,6)))
  55.     
  56.     dummy=writech('fichero','000099'x)    /* color 1 */
  57.     dummy=writech('fichero','990000'x)    /* color 2 */
  58.     dummy=writech('fichero','990099'x)    /* color 3 */
  59.     dummy=writech('fichero','009900'x)    /* color 4 */
  60.     dummy=writech('fichero','009999'x)    /* color 5 */
  61.     dummy=writech('fichero','999900'x)    /* color 6 */
  62.     dummy=writech('fichero','999999'x)    /* color 7 */
  63.     dummy=writech('fichero','000000'x)    /* color 8 */
  64.     dummy=writech('fichero','0000aa'x)    /* color 9 */
  65.     dummy=writech('fichero','bb0000'x)    /* color 10 */
  66.     dummy=writech('fichero','cc00cc'x)    /* color 11 */
  67.     dummy=writech('fichero','00cc00'x)    /* color 12 */
  68.     dummy=writech('fichero','00dddd'x)    /* color 13 */
  69.     dummy=writech('fichero','eeee00'x)    /* color 14 */
  70.     dummy=writech('fichero','ffffff'x)    /* color 15 */
  71.     
  72.  
  73. /* chunk BODY, o sea, bitplanos en formato entrelazado */
  74.  
  75.     dummy=writech('fichero','BODY')
  76.     dummy=writech('fichero','00006000'x)    /* tamaño 6144*4 (4 bpls de 256*192) */
  77.  
  78. /* usamos una funcion especial del emulador para sacar la pantalla en 4 bitplanos */
  79.  
  80.     dummy=writech('fichero',zxamgetscr())
  81.  
  82.     dummy=close('fichero')
  83.     
  84.     address command
  85.  
  86.     'sys:utilities/multiview <nil: >nil: t:zxamscreen.tmp window'
  87.     
  88.     'delete t:zxamscreen.tmp'
  89.  
  90.