Home » Personal collection » Acorn ADFS disks » Electron » Sideways_ROMS.ADF » PixMap/PixMap

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 ADFS disks » Electron » Sideways_ROMS.ADF
Filename: PixMap/PixMap
Read OK:
File size: 06BC bytes
Load address: FFFF0E00
Exec address: FFFF8023
Duplicates

There is 1 duplicate copy 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%
  385VDU23,1,0;0;0;0;
  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%
��23,1,0;0;0;0;
��=&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 81 12 ef 32 33  |e$..|..M%.....23|
000003a0  2c 31 2c 30 3b 30 3b 30  3b 30 3b 0d 01 86 0b d3  |,1,0;0;0;0;.....|
000003b0  3d 26 32 37 30 30 0d 01  90 0a f2 73 68 61 70 65  |=&2700.....shape|
000003c0  0d 01 9a 0b d6 6d 61 70  70 65 72 0d 01 a4 33 ff  |.....mapper...3.|
000003d0  28 22 53 41 56 45 20 22  2b 73 61 76 65 24 2b 22  |("SAVE "+save$+"|
000003e0  20 22 2b c3 7e 28 3f 28  6d 6f 64 65 2b 31 29 2a  | "+.~(?(mode+1)*|
000003f0  26 31 30 30 29 2b 22 20  38 30 30 30 22 29 0d 01  |&100)+" 8000")..|
00000400  ae 17 f1 22 4d 61 70 70  65 64 20 61 6e 64 20 73  |..."Mapped and s|
00000410  61 76 65 64 22 0d 01 b8  17 e8 27 22 4d 61 70 20  |aved".....'"Map |
00000420  61 6e 6f 74 68 65 72 22  3b 79 6e 24 0d 01 c2 17  |another";yn$....|
00000430  e7 20 a7 22 59 79 22 2c  c0 79 6e 24 2c 31 29 29  |. ."Yy",.yn$,1))|
00000440  20 fd 30 0d 01 cc 05 e0  0d 01 d6 05 3a 0d 01 e0  | .0.........:...|
00000450  0a dd f2 64 65 73 74 0d  01 ea 26 e7 20 6d 24 3d  |...dest...&. m$=|
00000460  22 34 22 20 63 68 24 3d  22 28 30 2c 34 29 22 20  |"4" ch$="(0,4)" |
00000470  8b 20 63 68 24 3d 22 28  31 2c 35 29 22 0d 01 f4  |. ch$="(1,5)"...|
00000480  05 f5 0d 01 fe 23 f1 27  22 4d 6f 64 65 20 74 6f  |.....#.'"Mode to|
00000490  20 6d 61 70 20 70 69 63  74 75 72 65 20 74 6f 20  | map picture to |
000004a0  22 63 68 24 3b 0d 02 08  07 e8 6d 24 0d 02 12 1c  |"ch$;.....m$....|
000004b0  fd 20 a7 63 68 24 2c 6d  24 29 20 80 20 ac a7 22  |. .ch$,m$) . .."|
000004c0  28 29 2c 22 2c 6d 24 29  0d 02 1c 05 e1 0d 02 26  |(),",m$).......&|
000004d0  0b dd f2 73 68 61 70 65  0d 02 30 0f 66 25 3d 8e  |...shape..0.f%=.|
000004e0  28 66 69 6c 65 24 29 0d  02 3a 0d e8 23 66 25 2c  |(file$)..:..#f%,|
000004f0  6e 75 6d 25 0d 02 44 15  e3 20 73 68 61 70 65 25  |num%..D.. shape%|
00000500  3d 30 20 b8 20 6e 75 6d  25 0d 02 4e 26 e8 23 66  |=0 . num%..N&.#f|
00000510  25 2c 73 78 25 2c 73 79  25 2c 66 78 25 2c 66 79  |%,sx%,sy%,fx%,fy|
00000520  25 2c 78 78 25 2c 78 79  25 2c 74 79 70 65 25 0d  |%,xx%,xy%,type%.|
00000530  02 58 1b e7 20 74 79 70  65 25 3e 31 32 37 20 e6  |.X.. type%>127 .|
00000540  30 2c 30 20 8b 20 e6 30  2c 31 0d 02 62 14 74 79  |0,0 . .0,1..b.ty|
00000550  70 65 25 3d 74 79 70 65  25 20 80 31 32 37 0d 02  |pe%=type% .127..|
00000560  6c 2b e7 20 74 79 70 65  25 3d 32 20 ec 73 78 25  |l+. type%=2 .sx%|
00000570  2c 73 79 25 3a ec 78 78  25 2c 78 79 25 3a f0 38  |,sy%:.xx%,xy%:.8|
00000580  35 2c 66 78 25 2c 66 79  25 0d 02 76 49 e7 20 74  |5,fx%,fy%..vI. t|
00000590  79 70 65 25 3d 33 20 ec  73 78 25 2c 73 79 25 3a  |ype%=3 .sx%,sy%:|
000005a0  ec 73 78 25 2c 66 79 25  3a f0 38 35 2c 66 78 25  |.sx%,fy%:.85,fx%|
000005b0  2c 66 79 25 3a ec 73 78  25 2c 73 79 25 3a ec 66  |,fy%:.sx%,sy%:.f|
000005c0  78 25 2c 73 79 25 3a f0  38 35 2c 66 78 25 2c 66  |x%,sy%:.85,fx%,f|
000005d0  79 25 0d 02 80 15 e7 20  74 79 70 65 25 3d 34 20  |y%..... type%=4 |
000005e0  f2 63 69 72 63 6c 65 0d  02 8a 05 ed 0d 02 94 08  |.circle.........|
000005f0  d9 23 66 25 0d 02 9e 05  e1 0d 02 a8 0c dd f2 63  |.#f%...........c|
00000600  69 72 63 6c 65 0d 02 b2  11 63 73 74 65 70 3d 32  |ircle....cstep=2|
00000610  2a af 2f 78 78 25 0d 02  bc 23 6d 75 6c 74 3d b6  |*./xx%...#mult=.|
00000620  28 28 66 78 25 2d 73 78  25 29 5e 32 2b 28 66 79  |((fx%-sx%)^2+(fy|
00000630  25 2d 73 79 25 29 5e 32  29 0d 02 c6 17 e3 61 6e  |%-sy%)^2).....an|
00000640  67 3d 30 20 b8 20 32 2a  af 20 88 63 73 74 65 70  |g=0 . 2*. .cstep|
00000650  0d 02 d0 2d ec 73 78 25  2c 73 79 25 3a ec 73 78  |...-.sx%,sy%:.sx|
00000660  25 2b 6d 75 6c 74 2a 9b  28 61 6e 67 29 2c 73 79  |%+mult*.(ang),sy|
00000670  25 2b 6d 75 6c 74 2a b5  28 61 6e 67 29 0d 02 da  |%+mult*.(ang)...|
00000680  33 f0 38 35 2c 73 78 25  2b 6d 75 6c 74 2a 9b 28  |3.85,sx%+mult*.(|
00000690  61 6e 67 2b 63 73 74 65  70 29 2c 73 79 25 2b 6d  |ang+cstep),sy%+m|
000006a0  75 6c 74 2a b5 28 61 6e  67 2b 63 73 74 65 70 29  |ult*.(ang+cstep)|
000006b0  0d 02 e4 05 ed 0d 02 ee  05 e1 0d ff              |............|
000006bc
PixMap/PixMap.m0
PixMap/PixMap.m1
PixMap/PixMap.m2
PixMap/PixMap.m4
PixMap/PixMap.m5