home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Emulation / ZXAMSpectrum / ZXAM_Rexx / Español / LoadSCR.zxam < prev    next >
Text File  |  1995-07-31  |  989b  |  34 lines

  1. /* este scrip carga una pantalla de spectrum (ficheros .scr salvados por "Z80") */
  2.     
  3.     /* comprobar si el emulador está ahi... */
  4.     address command
  5.     
  6.     if ~show(ports,ZXAM_REXX) then do
  7.         requestchoice 'title "ZXAM Script error..." body "No encuentro el puerto del emulador!!" gadgets "AARGH!"'
  8.         exit
  9.         end
  10.  
  11.     /* Almacenar el estado inicial del emulador */
  12.     running=zxamactrun()    /* 1=en marcha */
  13.     zxamstop()              /* lo paramos */
  14.  
  15.     /* requester LOAD */
  16.     oldpath=zxamactloadpath()
  17.     oldpattern=zxamactpattern()
  18.     zxampattern('#?.scr')
  19.     nombre=zxamloadrequester('Selecciona el fichero .scr...')
  20.     zxamloadpath(oldpath)
  21.     zxampattern(oldpattern)
  22.     if nombre='' then exit 0    /* CANCEL */
  23.     
  24.     pantalla=zxampploadfile(nombre)    /* cargamos el fichero completo */
  25.  
  26.     if length(pantalla)~=6912 then exit   /* comprobar si es una pantalla de spectrum */
  27.     
  28.     zxamputmem(16384,pantalla)    /* colocar el fichero en la pantalla... */
  29.     
  30.     /* dejar el emulador como estaba */
  31.     if running=1 then zxamrun()
  32.  
  33.     exit
  34.