home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 703.dms / 703.adf / STOS_Iff_Converter / ST2IFF.ASC next >
Text File  |  1989-08-11  |  2KB  |  41 lines

  1. 10 rem ************************************************************
  2. 20 rem **            ATARI To IFF Picture converter              **
  3. 30 rem **                                                        **
  4. 40 rem **                  By Francois Lionet                    **
  5. 50 rem ************************************************************
  6. 60 key off : mode 1 : curs on : show on : locate 0,0 : centre ">> IFF picture converter <<<"
  7. 70 N$=file select$("*.PI1","  Please choose a .NEO or .PI1              picture.")
  8. 80 if N$="" then default : end 
  9. 90 X=instr(N$,".PI1") : if X=0 then X=instr(N$,".NEO")
  10. 100 if X=0 then bell : goto 60
  11. 110 NS$=left$(N$,X)+"IFF"
  12. 120 hide on : curs off : mode 0 : fade 1 : wait 7
  13. 130 load N$
  14. 140 erase 11 : reserve as work 11,50000
  15. 150 AD=start(11)
  16. 160 A$="FORM" : gosub 400 : A=0 : gosub 390 : A$="ILBM" : gosub 400
  17. 170 A$="BMHD" : gosub 400 : A=20 : gosub 390
  18. 180 doke AD,320 : doke AD+2,200 : doke AD+4,0 : doke AD+6,0 : poke AD+8,4 : poke AD+9,0 : poke AD+10,0 : poke AD+11,0 : doke AD+12,0 : poke AD+14,10 : poke AD+15,11 : doke AD+16,320 : doke AD+18,200
  19. 190 AD=AD+20
  20. 200 A$="CMAP" : gosub 400 : A=48 : gosub 390
  21. 210 for X=0 to 15
  22. 220 C=colour(X) : R=(C and $700)/$100 : G=(C and $70)/$10 : B=C and $7
  23. 230 poke AD,R*32 : poke AD+1,G*32 : poke AD+2,B*32 : AD=AD+3
  24. 240 next X
  25. 250 A$="BODY" : gosub 400 : A=32000 : gosub 390
  26. 260 for Y=0 to 199
  27. 270 for P=0 to 3 : AE=logic+Y*160+P*2
  28. 280 for X=0 to 19*8 step 8
  29. 290 doke AD,deek(AE+X) : doke AE+X,0 : AD=AD+2
  30. 300 next X
  31. 310 next P
  32. 320 next Y
  33. 330 loke start(11)+4,AD-start(11)-8
  34. 340 fade 1 : wait 8 : fade 1,0,$777 : mode 1 : locate 0,10 : centre "Saving "+NS$
  35. 350 show on 
  36. 360 NS$=file select$("*.iff",space$((32-len(N$))/2)+NS$)
  37. 370 bsave NS$,start(11) to AD
  38. 380 goto 60
  39. 390 loke AD,A : AD=AD+4 : return 
  40. 400 loke AD,leek(varptr(A$)) : AD=AD+4 : return 
  41.