Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape39b_acorn_eu_1992_october.wav » PixMap

PixMap

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape39b_acorn_eu_1992_october.wav
Filename: PixMap
Read OK:
File size: 06AA bytes
Load address: FFFF1A00
Exec address: FFFF8023
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10REM BBC Pixel Mapper
   20REM by Martin Dawe
   30REM (c) Acorn Computing
   40:
   50OSCLI("LOAD mapcode 2C00")
   60REPEAT
   70MODE3
   80HIMEM=&2700
   90buff=&88:size=&89:pos=&79:ylen=&7A
  100mode=&A00:file=&A0B
  110mapper=&2C00
  120REPEAT
  130INPUT'"Source mode of picture to be mapped";m$
  140UNTIL INSTR("01245",m$)
  150half%=FALSE
  160IF INSTR("45",m$) PROCdest:IF INSTR("01",m$) half%=TRUE
  170M%=VAL(m$)
  180IF M%>3 ?buff=&30:?size=&28 ELSE ?buff=&27:?size=&5
  190!mode=&27285801:!(mode+4)=&03110288
  200IF M%<4 !mode=&4F503000
  210IF M%=0 OR M%=4 !(mode+4)=&07010380
  220IF M%=2 !(mode+4)=&015501AA
  230IF M%=0 !(mode+8)=&280 ELSEIF M%=1 OR M%=4 !(mode+8)=&140 ELSE !(mode+8)=&A0
  240IF half% ?(mode+10)=1
  250?pos=?(mode+1)
  260REPEAT
  270INPUT'"Vertical length of this picture (max 256)";y%
  280UNTIL y%>0 AND y%<257
  290?ylen=y%-1
  300PRINT
  310OSCLI("CAT")
  320REPEAT
  330INPUT'"Filename of this picture";file$
  340UNTIL LEN(file$)<21
  350$file=file$+CHR$13
  360INPUT'"Filename of shape file to map picture to";file$
  370INPUT'"Filename to save mapped picture as";save$
  380MODEM%
  390HIMEM=&2700
  400PROCshape
  410CALLmapper
  420OSCLI("SAVE "+save$+" "+STR$~(?(mode+1)*&100)+" 8000")
  430PRINT"Mapped and saved"
  440INPUT'"Map another";yn$
  450IF INSTR("Yy",LEFT$(yn$,1)) UNTIL0
  460END
  470:
  480DEFPROCdest
  490IF m$="4" ch$="(0,4)" ELSE ch$="(1,5)"
  500REPEAT
  510PRINT'"Mode to map picture to "ch$;
  520INPUTm$
  530UNTIL INSTR(ch$,m$) AND NOTINSTR("(),",m$)
  540ENDPROC
  550DEFPROCshape
  560f%=OPENIN(file$)
  570INPUT#f%,num%
  580FOR shape%=0 TO num%
  590INPUT#f%,sx%,sy%,fx%,fy%,xx%,xy%,type%
  600IF type%>127 GCOL0,0 ELSE GCOL0,1
  610type%=type% AND127
  620IF type%=2 MOVEsx%,sy%:MOVExx%,xy%:PLOT85,fx%,fy%
  630IF type%=3 MOVEsx%,sy%:MOVEsx%,fy%:PLOT85,fx%,fy%:MOVEsx%,sy%:MOVEfx%,sy%:PLOT85,fx%,fy%
  640IF type%=4 PROCcircle
  650NEXT
  660CLOSE#f%
  670ENDPROC
  680DEFPROCcircle
  690cstep=2*PI/xx%
  700mult=SQR((fx%-sx%)^2+(fy%-sy%)^2)
  710FORang=0 TO 2*PI STEPcstep
  720MOVEsx%,sy%:MOVEsx%+mult*COS(ang),sy%+mult*SIN(ang)
  730PLOT85,sx%+mult*COS(ang+cstep),sy%+mult*SIN(ang+cstep)
  740NEXT
  750ENDPROC

� BBC Pixel Mapper
� by Martin Dawe
� (c) Acorn Computing
(:
2�("LOAD mapcode 2C00")
<�
F�3
P�=&2700
Z&buff=&88:size=&89:pos=&79:ylen=&7A
dmode=&A00:file=&A0B
nmapper=&2C00
x�
�.�'"Source mode of picture to be mapped";m$
�� �"01245",m$)
�half%=�
�)� �"45",m$) �dest:� �"01",m$) half%=�
�M%=�(m$)
�3� M%>3 ?buff=&30:?size=&28 � ?buff=&27:?size=&5
�'!mode=&27285801:!(mode+4)=&03110288
�� M%<4 !mode=&4F503000
�%� M%=0 � M%=4 !(mode+4)=&07010380
�� M%=2 !(mode+4)=&015501AA
�G� M%=0 !(mode+8)=&280 �� M%=1 � M%=4 !(mode+8)=&140 � !(mode+8)=&A0
�� half% ?(mode+10)=1
�?pos=?(mode+1)
�
4�'"Vertical length of this picture (max 256)";y%
� y%>0 � y%<257
"?ylen=y%-1
,�
6�("CAT")
@�
J&�'"Filename of this picture";file$
T� �(file$)<21
^$file=file$+�13
h6�'"Filename of shape file to map picture to";file$
r0�'"Filename to save mapped picture as";save$
|�M%
��=&2700
�
�shape
��mapper
�3�("SAVE "+save$+" "+�~(?(mode+1)*&100)+" 8000")
��"Mapped and saved"
��'"Map another";yn$
�� �"Yy",�yn$,1)) �0
��
�:
�
��dest
�&� m$="4" ch$="(0,4)" � ch$="(1,5)"
��
�#�'"Mode to map picture to "ch$;
�m$
� �ch$,m$) � ��"(),",m$)
�
&��shape
0f%=�(file$)
:
�#f%,num%
D� shape%=0 � num%
N&�#f%,sx%,sy%,fx%,fy%,xx%,xy%,type%
X� type%>127 �0,0 � �0,1
btype%=type% �127
l+� type%=2 �sx%,sy%:�xx%,xy%:�85,fx%,fy%
vI� type%=3 �sx%,sy%:�sx%,fy%:�85,fx%,fy%:�sx%,sy%:�fx%,sy%:�85,fx%,fy%
�� type%=4 �circle
��
��#f%
��
���circle
�cstep=2*�/xx%
�#mult=�((fx%-sx%)^2+(fy%-sy%)^2)
��ang=0 � 2*� �cstep
�-�sx%,sy%:�sx%+mult*�(ang),sy%+mult*�(ang)
�3�85,sx%+mult*�(ang+cstep),sy%+mult*�(ang+cstep)
��
��
�
00000000  0d 00 0a 16 f4 20 42 42  43 20 50 69 78 65 6c 20  |..... BBC Pixel |
00000010  4d 61 70 70 65 72 0d 00  14 14 f4 20 62 79 20 4d  |Mapper..... by M|
00000020  61 72 74 69 6e 20 44 61  77 65 0d 00 1e 19 f4 20  |artin Dawe..... |
00000030  28 63 29 20 41 63 6f 72  6e 20 43 6f 6d 70 75 74  |(c) Acorn Comput|
00000040  69 6e 67 0d 00 28 05 3a  0d 00 32 1a ff 28 22 4c  |ing..(.:..2..("L|
00000050  4f 41 44 20 6d 61 70 63  6f 64 65 20 32 43 30 30  |OAD mapcode 2C00|
00000060  22 29 0d 00 3c 05 f5 0d  00 46 06 eb 33 0d 00 50  |")..<....F..3..P|
00000070  0b d3 3d 26 32 37 30 30  0d 00 5a 26 62 75 66 66  |..=&2700..Z&buff|
00000080  3d 26 38 38 3a 73 69 7a  65 3d 26 38 39 3a 70 6f  |=&88:size=&89:po|
00000090  73 3d 26 37 39 3a 79 6c  65 6e 3d 26 37 41 0d 00  |s=&79:ylen=&7A..|
000000a0  64 17 6d 6f 64 65 3d 26  41 30 30 3a 66 69 6c 65  |d.mode=&A00:file|
000000b0  3d 26 41 30 42 0d 00 6e  10 6d 61 70 70 65 72 3d  |=&A0B..n.mapper=|
000000c0  26 32 43 30 30 0d 00 78  05 f5 0d 00 82 2e e8 27  |&2C00..x.......'|
000000d0  22 53 6f 75 72 63 65 20  6d 6f 64 65 20 6f 66 20  |"Source mode of |
000000e0  70 69 63 74 75 72 65 20  74 6f 20 62 65 20 6d 61  |picture to be ma|
000000f0  70 70 65 64 22 3b 6d 24  0d 00 8c 12 fd 20 a7 22  |pped";m$..... ."|
00000100  30 31 32 34 35 22 2c 6d  24 29 0d 00 96 0b 68 61  |01245",m$)....ha|
00000110  6c 66 25 3d a3 0d 00 a0  29 e7 20 a7 22 34 35 22  |lf%=....). ."45"|
00000120  2c 6d 24 29 20 f2 64 65  73 74 3a e7 20 a7 22 30  |,m$) .dest:. ."0|
00000130  31 22 2c 6d 24 29 20 68  61 6c 66 25 3d b9 0d 00  |1",m$) half%=...|
00000140  aa 0c 4d 25 3d bb 28 6d  24 29 0d 00 b4 33 e7 20  |..M%=.(m$)...3. |
00000150  4d 25 3e 33 20 3f 62 75  66 66 3d 26 33 30 3a 3f  |M%>3 ?buff=&30:?|
00000160  73 69 7a 65 3d 26 32 38  20 8b 20 3f 62 75 66 66  |size=&28 . ?buff|
00000170  3d 26 32 37 3a 3f 73 69  7a 65 3d 26 35 0d 00 be  |=&27:?size=&5...|
00000180  27 21 6d 6f 64 65 3d 26  32 37 32 38 35 38 30 31  |'!mode=&27285801|
00000190  3a 21 28 6d 6f 64 65 2b  34 29 3d 26 30 33 31 31  |:!(mode+4)=&0311|
000001a0  30 32 38 38 0d 00 c8 1a  e7 20 4d 25 3c 34 20 21  |0288..... M%<4 !|
000001b0  6d 6f 64 65 3d 26 34 46  35 30 33 30 30 30 0d 00  |mode=&4F503000..|
000001c0  d2 25 e7 20 4d 25 3d 30  20 84 20 4d 25 3d 34 20  |.%. M%=0 . M%=4 |
000001d0  21 28 6d 6f 64 65 2b 34  29 3d 26 30 37 30 31 30  |!(mode+4)=&07010|
000001e0  33 38 30 0d 00 dc 1e e7  20 4d 25 3d 32 20 21 28  |380..... M%=2 !(|
000001f0  6d 6f 64 65 2b 34 29 3d  26 30 31 35 35 30 31 41  |mode+4)=&015501A|
00000200  41 0d 00 e6 47 e7 20 4d  25 3d 30 20 21 28 6d 6f  |A...G. M%=0 !(mo|
00000210  64 65 2b 38 29 3d 26 32  38 30 20 8b e7 20 4d 25  |de+8)=&280 .. M%|
00000220  3d 31 20 84 20 4d 25 3d  34 20 21 28 6d 6f 64 65  |=1 . M%=4 !(mode|
00000230  2b 38 29 3d 26 31 34 30  20 8b 20 21 28 6d 6f 64  |+8)=&140 . !(mod|
00000240  65 2b 38 29 3d 26 41 30  0d 00 f0 18 e7 20 68 61  |e+8)=&A0..... ha|
00000250  6c 66 25 20 3f 28 6d 6f  64 65 2b 31 30 29 3d 31  |lf% ?(mode+10)=1|
00000260  0d 00 fa 12 3f 70 6f 73  3d 3f 28 6d 6f 64 65 2b  |....?pos=?(mode+|
00000270  31 29 0d 01 04 05 f5 0d  01 0e 34 e8 27 22 56 65  |1)........4.'"Ve|
00000280  72 74 69 63 61 6c 20 6c  65 6e 67 74 68 20 6f 66  |rtical length of|
00000290  20 74 68 69 73 20 70 69  63 74 75 72 65 20 28 6d  | this picture (m|
000002a0  61 78 20 32 35 36 29 22  3b 79 25 0d 01 18 13 fd  |ax 256)";y%.....|
000002b0  20 79 25 3e 30 20 80 20  79 25 3c 32 35 37 0d 01  | y%>0 . y%<257..|
000002c0  22 0e 3f 79 6c 65 6e 3d  79 25 2d 31 0d 01 2c 05  |".?ylen=y%-1..,.|
000002d0  f1 0d 01 36 0c ff 28 22  43 41 54 22 29 0d 01 40  |...6..("CAT")..@|
000002e0  05 f5 0d 01 4a 26 e8 27  22 46 69 6c 65 6e 61 6d  |....J&.'"Filenam|
000002f0  65 20 6f 66 20 74 68 69  73 20 70 69 63 74 75 72  |e of this pictur|
00000300  65 22 3b 66 69 6c 65 24  0d 01 54 11 fd 20 a9 28  |e";file$..T.. .(|
00000310  66 69 6c 65 24 29 3c 32  31 0d 01 5e 13 24 66 69  |file$)<21..^.$fi|
00000320  6c 65 3d 66 69 6c 65 24  2b bd 31 33 0d 01 68 36  |le=file$+.13..h6|
00000330  e8 27 22 46 69 6c 65 6e  61 6d 65 20 6f 66 20 73  |.'"Filename of s|
00000340  68 61 70 65 20 66 69 6c  65 20 74 6f 20 6d 61 70  |hape file to map|
00000350  20 70 69 63 74 75 72 65  20 74 6f 22 3b 66 69 6c  | picture to";fil|
00000360  65 24 0d 01 72 30 e8 27  22 46 69 6c 65 6e 61 6d  |e$..r0.'"Filenam|
00000370  65 20 74 6f 20 73 61 76  65 20 6d 61 70 70 65 64  |e to save mapped|
00000380  20 70 69 63 74 75 72 65  20 61 73 22 3b 73 61 76  | picture as";sav|
00000390  65 24 0d 01 7c 07 eb 4d  25 0d 01 86 0b d3 3d 26  |e$..|..M%.....=&|
000003a0  32 37 30 30 0d 01 90 0a  f2 73 68 61 70 65 0d 01  |2700.....shape..|
000003b0  9a 0b d6 6d 61 70 70 65  72 0d 01 a4 33 ff 28 22  |...mapper...3.("|
000003c0  53 41 56 45 20 22 2b 73  61 76 65 24 2b 22 20 22  |SAVE "+save$+" "|
000003d0  2b c3 7e 28 3f 28 6d 6f  64 65 2b 31 29 2a 26 31  |+.~(?(mode+1)*&1|
000003e0  30 30 29 2b 22 20 38 30  30 30 22 29 0d 01 ae 17  |00)+" 8000")....|
000003f0  f1 22 4d 61 70 70 65 64  20 61 6e 64 20 73 61 76  |."Mapped and sav|
00000400  65 64 22 0d 01 b8 17 e8  27 22 4d 61 70 20 61 6e  |ed".....'"Map an|
00000410  6f 74 68 65 72 22 3b 79  6e 24 0d 01 c2 17 e7 20  |other";yn$..... |
00000420  a7 22 59 79 22 2c c0 79  6e 24 2c 31 29 29 20 fd  |."Yy",.yn$,1)) .|
00000430  30 0d 01 cc 05 e0 0d 01  d6 05 3a 0d 01 e0 0a dd  |0.........:.....|
00000440  f2 64 65 73 74 0d 01 ea  26 e7 20 6d 24 3d 22 34  |.dest...&. m$="4|
00000450  22 20 63 68 24 3d 22 28  30 2c 34 29 22 20 8b 20  |" ch$="(0,4)" . |
00000460  63 68 24 3d 22 28 31 2c  35 29 22 0d 01 f4 05 f5  |ch$="(1,5)".....|
00000470  0d 01 fe 23 f1 27 22 4d  6f 64 65 20 74 6f 20 6d  |...#.'"Mode to m|
00000480  61 70 20 70 69 63 74 75  72 65 20 74 6f 20 22 63  |ap picture to "c|
00000490  68 24 3b 0d 02 08 07 e8  6d 24 0d 02 12 1c fd 20  |h$;.....m$..... |
000004a0  a7 63 68 24 2c 6d 24 29  20 80 20 ac a7 22 28 29  |.ch$,m$) . .."()|
000004b0  2c 22 2c 6d 24 29 0d 02  1c 05 e1 0d 02 26 0b dd  |,",m$).......&..|
000004c0  f2 73 68 61 70 65 0d 02  30 0f 66 25 3d 8e 28 66  |.shape..0.f%=.(f|
000004d0  69 6c 65 24 29 0d 02 3a  0d e8 23 66 25 2c 6e 75  |ile$)..:..#f%,nu|
000004e0  6d 25 0d 02 44 15 e3 20  73 68 61 70 65 25 3d 30  |m%..D.. shape%=0|
000004f0  20 b8 20 6e 75 6d 25 0d  02 4e 26 e8 23 66 25 2c  | . num%..N&.#f%,|
00000500  73 78 25 2c 73 79 25 2c  66 78 25 2c 66 79 25 2c  |sx%,sy%,fx%,fy%,|
00000510  78 78 25 2c 78 79 25 2c  74 79 70 65 25 0d 02 58  |xx%,xy%,type%..X|
00000520  1b e7 20 74 79 70 65 25  3e 31 32 37 20 e6 30 2c  |.. type%>127 .0,|
00000530  30 20 8b 20 e6 30 2c 31  0d 02 62 14 74 79 70 65  |0 . .0,1..b.type|
00000540  25 3d 74 79 70 65 25 20  80 31 32 37 0d 02 6c 2b  |%=type% .127..l+|
00000550  e7 20 74 79 70 65 25 3d  32 20 ec 73 78 25 2c 73  |. type%=2 .sx%,s|
00000560  79 25 3a ec 78 78 25 2c  78 79 25 3a f0 38 35 2c  |y%:.xx%,xy%:.85,|
00000570  66 78 25 2c 66 79 25 0d  02 76 49 e7 20 74 79 70  |fx%,fy%..vI. typ|
00000580  65 25 3d 33 20 ec 73 78  25 2c 73 79 25 3a ec 73  |e%=3 .sx%,sy%:.s|
00000590  78 25 2c 66 79 25 3a f0  38 35 2c 66 78 25 2c 66  |x%,fy%:.85,fx%,f|
000005a0  79 25 3a ec 73 78 25 2c  73 79 25 3a ec 66 78 25  |y%:.sx%,sy%:.fx%|
000005b0  2c 73 79 25 3a f0 38 35  2c 66 78 25 2c 66 79 25  |,sy%:.85,fx%,fy%|
000005c0  0d 02 80 15 e7 20 74 79  70 65 25 3d 34 20 f2 63  |..... type%=4 .c|
000005d0  69 72 63 6c 65 0d 02 8a  05 ed 0d 02 94 08 d9 23  |ircle..........#|
000005e0  66 25 0d 02 9e 05 e1 0d  02 a8 0c dd f2 63 69 72  |f%...........cir|
000005f0  63 6c 65 0d 02 b2 11 63  73 74 65 70 3d 32 2a af  |cle....cstep=2*.|
00000600  2f 78 78 25 0d 02 bc 23  6d 75 6c 74 3d b6 28 28  |/xx%...#mult=.((|
00000610  66 78 25 2d 73 78 25 29  5e 32 2b 28 66 79 25 2d  |fx%-sx%)^2+(fy%-|
00000620  73 79 25 29 5e 32 29 0d  02 c6 17 e3 61 6e 67 3d  |sy%)^2).....ang=|
00000630  30 20 b8 20 32 2a af 20  88 63 73 74 65 70 0d 02  |0 . 2*. .cstep..|
00000640  d0 2d ec 73 78 25 2c 73  79 25 3a ec 73 78 25 2b  |.-.sx%,sy%:.sx%+|
00000650  6d 75 6c 74 2a 9b 28 61  6e 67 29 2c 73 79 25 2b  |mult*.(ang),sy%+|
00000660  6d 75 6c 74 2a b5 28 61  6e 67 29 0d 02 da 33 f0  |mult*.(ang)...3.|
00000670  38 35 2c 73 78 25 2b 6d  75 6c 74 2a 9b 28 61 6e  |85,sx%+mult*.(an|
00000680  67 2b 63 73 74 65 70 29  2c 73 79 25 2b 6d 75 6c  |g+cstep),sy%+mul|
00000690  74 2a b5 28 61 6e 67 2b  63 73 74 65 70 29 0d 02  |t*.(ang+cstep)..|
000006a0  e4 05 ed 0d 02 ee 05 e1  0d ff                    |..........|
000006aa
PixMap.m0
PixMap.m1
PixMap.m2
PixMap.m4
PixMap.m5