Home » Personal collection » Acorn hard disk » apps » !FastGrab » !RunImage

!RunImage

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 hard disk » apps » !FastGrab
Filename: !RunImage
Read OK:
File size: 23C2A bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > !RunImage
   20debug%=FALSE
   30PROCget_board_version
   40ON ERROR ON ERROR OFF:PROCerror(0)
   50version$="Version 2.00 (13th Oct 1992)"
   60PROCinit
   70ON ERROR PROCerror(-1)
   80REPEAT
   90PROCwimpservice(USR(pollcode),pb%)
  100UNTIL FALSE
  110END
  120DEF PROCinit
  130PROCsetvars
  140taskhandle%=FNtaskinit("FastGrab")
  150SYS "WVCGrab_Refresh",0
  160PROCsetupwindows
  170PROCfudgeinit
  180IF NOT debug% VDU 21
  190PROCassemble
  200VDU 6
  210A%=livearea%+60:B%=&20100:CALLblank
  220PROCgetchoices
  230PROCinstallonbar
  240PROCmodechanged
  250PROCcwin(3)
  260PROCcwin(4)
  270!rdb=w%(3,0):!udb=w%(3,0):!livewb=w%(3,0):livewb!4=livearea%
  280!spritearea=livearea%:!spritead=livearea%+16
  290!dragging%=0:!pollad=pb%
  300REM PROCadjustlive
  310PROCcalclive
  320PROCshutlivedisplay
  330SYS "Wimp_SlotSize",-1,-1 TO originalslot%
  340ENDPROC
  350
  360DEF PROCround(RETURN value%,round%)
  370IF (value% MOD round%)=0 ENDPROC
  380value%=((value%+round%) DIV round%)*round%
  390ENDPROC
  400
  410DEF PROCfudgeinit
  420IF NOT debug% VDU 21
  430PROCdolivecode
  440PROCdograbcode
  450VDU 6
  460livename$="pic"
  470dragtype%=-1
  480nextlocation%=HIMEM
  490DIM livearea% &20800
  500!livearea%=&20700
  510livearea%!4=1
  520livearea%!8=16
  530$(livearea%+20)="grabbed"
  540livearea%!32=&3F
  550livearea%!36=&7F
  560livearea%!40=&00
  570livearea%!44=&1F
  580livearea%!48=&2C
  590livearea%!52=&2C
  600livearea%!56=15
  610!livedumpad%=livearea%+60
  620CALL set_8bit
  630ENDPROC
  640
  650DEF PROCadd_palette_to_sprite(sprite_area%,sprite_ad%,sprite_pal%)
  660LOCAL pal%,z%
  670pal%=sprite_ad%+44
  680sprite_ad%!32+=2048
  690sprite_ad%!36+=2048
  700sprite_ad%!00+=2048
  710sprite_area%!12+=2048
  720REM Bung a palette into the sprite area
  730FORz%=0TO255
  740 B%=(z%<<8) OR (z%<<16) OR (z%<<24)
  750 pal%!(z%*8)=B%:pal%!(z%*8+4)=B%
  760NEXT
  770PROCpalette_for_sprite(sprite_area%,sprite_ad%,sprite_pal%)
  780ENDPROC
  790
  800DEF PROClive_grey
  810!livedumpad%=livearea%+60+2048
  820old_sat%=saturation%
  830saturation%=0
  840$satad%="0"
  850PROCsaturation
  860PROCadd_palette_to_sprite(livearea%,livearea%+16,livepal%)
  870PROCoptimise_liveplot
  880ENDPROC
  890
  900DEF PROClive_colour
  910saturation%=old_sat%
  920$satad%=STR$(saturation%)
  930PROCsaturation
  940!livedumpad%=livearea%+60
  950sptr%=livearea%+16
  960sptr%!32-=2048
  970sptr%!36-=2048
  980sptr%!00-=2048
  990livearea%!12-=2048
 1000PROCpalette_for_sprite(livearea%,livearea%+16,livepal%)
 1010PROCoptimise_liveplot
 1020ENDPROC
 1030
 1040DEF PROCdograbcode
 1050DIM GAP &2000,L% 0
 1060FOR Pass%=8 TO 10 STEP 2
 1070P%=GAP
 1080[
 1090OPT Pass%
 1100.VRAM_Grab
 1110SWI     22                      ; Into SVC mode
 1120MOV     R0,R15
 1130ORR     R0,R0,#3<<26
 1140TEQP    R15,R0                  ; FIQ's off too...
 1150
 1160SWI     "WVCGrab_MemBases"      ; Get base of podule space
 1170
 1180LDRB    R8,[R1]                 ; RAS only Refresh cycle
 1190MOV     R9,#0
 1200
 1210ORR     r4,r1,#&1000            ; Page mode read cycle address
 1220ORR     r3,r1,#&1800            ; Terminate cycle address
 1230ORR     r2,r1,#&800             ; Initiate Read/SR to memory transfer
 1240ORR     r2,r2,#&008             ; VRAM address 8
 1250ORR     r7,r1,#&1000            ; Page mode read (CAS low)
 1260ADD     r7,r7,#&001C            ; This gets around the pipelining issue
 1270LDR     R10,pagestep
 1280LDR     R11,pixelstep
 1290.next_row_down
 1300LDRB    R8,[R2],R10             ; Initiate SR to memory transfer
 1310;LDRB    R8,[R7]             ; Get a pixel from VRAM - fixes pipeline
 1320SUB     R7,R7,#16
 1330.row_read
 1340LDRB    R8,[R7],R11             ; Get a pixel from VRAM
 1350STRB    R8,[R5],#1              ; Store it in the buffer
 1360CMP     R7,R3                   ; End of the row reached?
 1370BLT     row_read
 1380
 1390SUB     R7,R7,#&800             ; Do the next row down
 1400ADD     R7,R7,#&10
 1410LDR     R8,[R7,#&800]
 1420CMP     R2,R4
 1430BLE     next_row_down
 1440TEQP    R15,#0
 1450MOVNV   R6,R6
 1460MOVS    R15,R14
 1470.pagestep
 1480EQUD 8
 1490.pixelstep
 1500EQUD 4
 1510
 1520.mask EQUD      32767
 1530
 1540.read16bit
 1550; r0=output address, r1=line number reqd
 1560SWI     "OS_EnterOS"
 1570MOV     r6,r0                   ; Bung address for data (a line) into r6
 1580MOV     r0,r15
 1590ORR     r0,r0,#3<<26            ; Change processor mode
 1600TEQP    r15,r0
 1610
 1620LDR     r3,packR3
 1630LDR     r4,packR4
 1640LDR     r5,packR5
 1650MOV     r0,#0
 1660MOV     r1,r1,LSL#3             ; Convert line number
 1670LDR     r8,[r3,r1]              ; Initiate read cycle
 1680
 1690LDR     r7,mask
 1700
 1710;LDR     r8,[r4,r0,LSL#2]        ; Get a pixel from the VRAM into r8 (16bit)
 1720;ADD     r0,r0,#1
 1730
 1740.get_another_byte
 1750LDR     r8,[r4,r0,LSL#2]        ; Get a pixel from the VRAM into r8 (16bit)
 1760
 1770;MOV     r8,#%11000<<10          ; Blue data
 1780;ORR     r8,r8,#%11101<<5        ; Green data
 1790;ORR     r8,r8,#%11000           ; Red data
 1800
 1810ADD     r0,r0,#1
 1820
 1830AND     r8,r8,r7                ; Get bottom fifteen bits
 1840AND     r9,r8,#&ff00            ; Get top byte from 15 bits
 1850MOV     r9,r9,LSR#8
 1860STRB    r8,[r6],#1              ; Store bottom byte in output buffer
 1870STRB    r9,[r6],#1              ; Store top byte in output buffer
 1880CMP     r0,#512                 ; Did we read the full line yet?
 1890BNE     get_another_byte        ; If not, get on with the job
 1900LDR     r8,[r5,#0]
 1910TEQP    r15,#0
 1920MOVNV   r0,R0
 1930MOV     r15,r14
 1940
 1950.packline
 1960SWI     "OS_EnterOS"
 1970; r0=output address, r1=line number reqd
 1980MOV     R12,R0                  ; Address for data (a line)
 1990MOV     R0,R15
 2000ORR     R0,R0,#3<<26
 2010TEQP    R15,R0
 2020LDR     R3,packR3
 2030LDR     R4,packR4
 2040LDR     R5,packR5
 2050MOV     R0,#0
 2060MOV     R1,R1,LSL#3
 2070LDR     R8,[R3,R1]              ; Initiate read
 2080.Next_Byte
 2090LDR     R8,[R4,R0,LSL #2]       ; Get a pixel from the VRAM
 2100ADD     R0,R0,#1                ; Increment pixel counter
 2110LDR     R7,[R4,R0,LSL #2]       ; Get a second pixel from the VRAM
 2120ADD     R0,R0,#1                ; Inc pixel ctr
 2130AND     R9,R8,#&F
 2140AND     R10,R7,#&F
 2150ORR     R11,R10,R9,LSL #4
 2160STRB    R11,[R12,#512]          ; Bung byte into buffer
 2170AND     R9,R8,#&F0
 2180AND     R10,R7,#&F0
 2190ORR     R11,R9,R10,LSR #4
 2200STRB    R11,[R12,#256]          ; Bung byte into buffer
 2210AND     R9,R8,#&F00
 2220MOV     R9,R9,LSR #4
 2230AND     R10,R7,#&F00
 2240ORR     R11,R9,R10,LSR #8
 2250STRB    R11,[R12],#1            ; Bung byte into buffer
 2260CMP     R0,#&200                ; Have we done a complete line yet?
 2270BNE     Next_Byte
 2280LDR     R8,[R5,#0]              ; Terminate cycle
 2290TEQP    R15,#0
 2300MOVNV   R6,R6
 2310MOV     R15,R14
 2320
 2330.membaseR0
 2340EQUD 0
 2350.membaseR1
 2360EQUD 0
 2370.packR3
 2380EQUD 0
 2390.packR4
 2400EQUD 0
 2410.packR5
 2420EQUD 0
 2430
 2440.set_8bit
 2450SWI     22
 2460SWI     "WVCGrab_MemBases"
 2470ADD     R0,R0,#&2000    ; &2000=Paging reg for V9 Mk I
 2480MOV     R1,#&10
 2490STRB    R1,[R0]
 2500ADD     r0,r0,#&1000    ; &3000=Paging reg for V9 Mk II
 2510STRB    R1,[R0]
 2520
 2530TEQP    R15,#0
 2540MOVNV   R0,R0
 2550MOVS    R15,R14
 2560.set_12bit
 2570SWI     22
 2580SWI     "WVCGrab_MemBases"
 2590ADD     R0,R0,#&2000    ; &2000=Paging reg for V9 Mk I
 2600MOV     R1,#0
 2610STRB    R1,[R0]
 2620ADD     r0,r0,#&1000    ; &3000=Paging reg for V9 Mk II
 2630STRB    R1,[R0]
 2640TEQP    R15,#0
 2650MOVNV   R0,R0
 2660MOVS    R15,R14
 2670
 2680.Refresh_Frame
 2690SWI     22
 2700SWI     "WVCGrab_MemBases"
 2710ADD     R0,R1,#&1800
 2720LDR     R2,[R1,#0]
 2730MOV     R0,#256
 2740.Refresh_Loop
 2750LDR     R2,[R1,R0]       ; Refresh Cycle
 2760SUBS    R0,R0,#1
 2770BNE     Refresh_Loop
 2780TEQP    R15,#0
 2790MOVNV   R0,R0
 2800MOVS    R15,R14
 2810
 2820]
 2830NEXT Pass%
 2840SYS "WVCGrab_MemBases" TO r0,r1
 2850!packR3=r1 OR &800
 2860!packR4=r1 OR &1000
 2870!packR5=r1 OR &1800
 2880ENDPROC
 2890
 2900DEF PROCdolivecode
 2910DIM livegap% &1200,L% 0
 2920FOR pass%=8 TO 10 STEP 2
 2930P%=livegap%
 2940[
 2950OPT pass%
 2960.live_grab
 2970SWI     22              ; Interrupts off
 2980MOV     R0,R15
 2990ORR     R0,R0,#3<<26
 3000TEQP    R15,R0          ; Turn off fast interrupts too (sorry...)
 3010LDR     R1,livebaseR1   ; Get base of podule space
 3020LDR     R5,livedumpad%  ; Get address for 8bpp output
 3030ORR     R2,R1,#&1000    ; Page mode read cycle address
 3040ORR     R6,R1,#&800     ; Initiate pixel read cycle address
 3050MOV     R9,#&1800       ; Terminate cycle address
 3060
 3070MOV     R11,#0
 3080
 3090.livefield_poll
 3100LDR     R8,[R6]         ; Start pixel read cycle
 3110LDR     R8,[R1,R9]      ; Terminate read cycle
 3120ADD     R11,R11,#1      ; Increment counter
 3130CMP     R11,#&8000      ; Too many tries?
 3140BGT     signalgone      ; If not, complain...
 3150TST     r8,#&4000       ; Video signal present?
 3160BEQ     livefield_poll  ; If no signal, wait for a while
 3170MOV     R11,#0
 3180
 3190MOV     R11,#1
 3200.livevert_poll
 3210LDR     R8,[R6]         ; Start pixel read cycle
 3220LDR     R8,[R1,R9]      ; Terminate read cycle
 3230ADD     R11,R11,#1      ; Increment counter
 3240CMP     R11,#&8000      ; How long...
 3250BGT     signalgone
 3260TST     R8,#&2000
 3270BEQ     livevert_poll
 3280
 3290MOV     R11,#0
 3300.livevert_poll1
 3310LDR     R8,[R6]         ; Start pixel read
 3320LDR     R8,[R1,R9]      ; Terminate pixel read
 3330ADD     R11,R11,#1      ; Inc counter
 3340CMP     R11,#&8000      ; Too many yet?
 3350BGT     signalgone
 3360TST     R8,#&2000
 3370BNE     livevert_poll1
 3380
 3390LDR     R8,[R1]         ; Read word from VRAM
 3400LDR     R12,fielding    ; Grabbing single field at the moment?
 3410CMP     R12,#0
 3420BEQ     bothfields      ; If not, don't care which field this is
 3430LDR     R11,evenfield   ; Otherwise, find out which field is required
 3440MOV     R11,R11,LSL #14
 3450AND     R12,R8,#1<<14
 3460CMP     R12,R11         ; Is this the field to do?
 3470BEQ     bothfields      ; If so, grab it
 3480B       livefield_poll  ; Otherwise, wait for the next frame...
 3490
 3500.bothfields
 3510STR     R8,[R6]         ; Start SR to memory transfer
 3520STR     R8,[R1,R9]      ; Terminate transfer cycle
 3530STR     R8,[R1]         ; RAS only refresh, to allow serial VRAM transfer
 3540MOV     R10,#&1000
 3550MOV     R12,#0
 3560
 3570.livenext_row
 3580MOV     r0,#0
 3590
 3600.liveEnd_Blank          ; Wait for the end blank signal
 3610LDR     R8,[R6]         ; Start pixel read cycle
 3620
 3630LDR     R8,[R1,R9]      ; Terminate cycle
 3640
 3650ADD     R0,R0,#1        ; Increment row counter
 3660CMP     R0,#&8000
 3670BGT     signalgone
 3680TST     R8,#&1000       ; Blank signal found?
 3690BEQ     liveEnd_Blank
 3700
 3710MOV     R11,#0
 3720.liverow_data_in        ; Read data into VRAM
 3730LDR     R8,[R6]         ; Start read cycle
 3740LDR     R8,[R1,R9]      ; Terminate read cycle
 3750ADD     R11,R11,#1
 3760CMP     R11,#&8000
 3770BGT     signalgone
 3780TST     R8,#&1000
 3790BNE     liverow_data_in
 3800
 3810STRB    R8,[R6],#8      ; Pass VRAM address to V9 and start read cycle
 3820STRB    R8,[R1,R9]      ; Terminate read cycle
 3830CMP     R6,R2           ; Read 512*16bit words into VRAM yet?
 3840BLT     livenext_row    ; If not, get the next row !!!
 3850ORR     R4,R1,#&1000
 3860ORR     R3,R1,#&1800
 3870ORR     R2,R1,#&800     ; Cycle type 2a
 3880ORR     R2,R2,#8        ; VRAM Address &08
 3890ORR     R7,R1,#&1000    ; Page mode read cycle
 3900ORR     R7,R7,#&20      ; VRAM Address &14 at the start
 3910
 3920LDR     R10,livepagestep
 3930LDR     R11,livepixelstep
 3940
 3950ADD     r9,r1,#&2000    ; Paging register address
 3960ADD     r12,r1,#&3000
 3970
 3980.livenext_row_down
 3990;MOV     r0,#1<<6        ; Bit 6 controls hardware dithering
 4000;STR     r0,[r12]        ; Store in paging reg
 4010;STR     r0,[r9]
 4020;MOV     r0,#0
 4030;STR     r0,[r12]
 4040;STR     r0,[r9]
 4050
 4060LDRB    R8,[R2],R10     ; Initiate read cycle for next line
 4070SUB     R7,R7,#16       ; Decrement page mode read counter
 4080
 4090.liverow_read
 4100LDRB    R8,[R7],R11     ; Do page mode read to scan the line
 4110STRB    R8,[R5],#1      ; Put the 8bpp data into the live buffer
 4120CMP     R7,R3           ; Read a whole line yet?
 4130BLT     liverow_read    ; If not, get another pixel
 4140
 4150SUB     R7,R7,#&800     ; Decrement page mode counter
 4160ADD     R7,R7,#&10
 4170LDR     R8,[R7,#&800]   ; Set page mode address
 4180CMP     R2,R4           ; Read 256 lines yet?
 4190BLT     livenext_row_down; If not, get another line !!!
 4200LDR     R0,signalpresent
 4210CMP     R0,#0
 4220BEQ     signalback
 4230TEQP    R15,#0
 4240MOVNV   R0,R0
 4250MOVS    PC,R14
 4260.signalback
 4270MOV     R0,#1
 4280STR     R0,signalpresent
 4290MOV     R0,#0
 4300SWI     "WVCGrab_Refresh" ; Turns refresh off, signal is back
 4310ADR     R7,signal
 4320B       udicon
 4330.signalgone
 4340LDR     R0,signalpresent
 4350CMP     R0,#0
 4360BNE     changeicon
 4370TEQP    R15,#0
 4380MOVNV   R6,R6
 4390MOVS    PC,R14
 4400.changeicon
 4410MOV     R0,#0
 4420STR     R0,signalpresent
 4430MOV     R0,#1
 4440SWI     "WVCGrab_Refresh" ; Turns refresh on, signal has gone
 4450ADR     R7,nosignal
 4460.udicon
 4470LDMIA   R7,{R1-R3}
 4480ADR     R7,barspace
 4490STMIA   R7,{R1-R3}
 4500ADR     R1,iconb
 4510SWI     "Wimp_SetIconState"
 4520TEQP    R15,#0
 4530MOVNV   R6,R6
 4540MOVS    PC,R14
 4550.signal
 4560EQUS    "barsignal"+CHR$0+CHR$0
 4570ALIGN
 4580.nosignal
 4590EQUS    "barnosignal"
 4600EQUB    0
 4610ALIGN
 4620.signalpresent
 4630EQUD    1
 4640.barspace
 4650EQUS    "barsignal"
 4660EQUB    0
 4670ALIGN
 4680.livebaseR1
 4690EQUD    0
 4700.fielding
 4710EQUD    0
 4720.evenfield
 4730EQUD    1
 4740.livedumpad%
 4750EQUD    0
 4760.livepagestep
 4770EQUD    16
 4780.livepixelstep
 4790EQUD    8
 4800.iconb
 4810EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
 4820EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
 4830EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
 4840EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
 4850EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
 4860]
 4870NEXT pass%
 4880SYS "WVCGrab_MemBases" TO ,r1
 4890!livebaseR1=r1
 4900ENDPROC
 4910
 4920DEF PROCsetvars
 4930longsp%=8400
 4940templatespace%=8096
 4950maxmenusize%=1000
 4960DIM block% 4,pb% 2048,iconsp% templatespace%,mouseb% 20,menub% 10000,longitems% longsp%,mb% 30048,magt% 32,livepal% 256,grabpal% 256,modeb% 100
 4970liveplot%=liveplot%
 4980tempsize%=8000
 4990DIM tempb% tempsize%,w%(17,2)
 5000DIM IICblock% 10
 5010ctempb%=tempb%
 5020$(modeb%+4)="a0-9"+CHR$0
 5030submode$="Mode|*modeb%,modeb%+4,4|"
 5040FOR set%=0 TO 28 STEP 4
 5050magt%!set%=1
 5060NEXT
 5070$block%="TASK"
 5080wksp%=iconsp%
 5090spnd%=iconsp%+templatespace%
 5100close%=FALSE
 5110quitting%=FALSE
 5120quithand%=0
 5130scrappy%=FALSE
 5140saved8%=TRUE
 5150saved12%=TRUE
 5160oldmode%=MODE
 5170live%=TRUE
 5180grabex%=FALSE
 5190cfsid%=FALSE
 5200oldmenu%=-1
 5210slave%=FALSE
 5220qflag%=FALSE
 5230c%=FALSE
 5240ENDPROC
 5250DEF FNtaskinit(task$)
 5260SYS "Wimp_Initialise",200,!block%,task$ TO wimpversion%,taskhandle%
 5270=taskhandle%
 5280DEF PROCsetupwindows
 5290LOCAL os%
 5300sh%=OPENIN("<FastGrab$Dir>.Resources.Sprites")
 5310IF sh%=0 ERROR 214,"Sprite file cannot be found"
 5320DIM sprites% EXT#sh%+16
 5330!sprites%=EXT#sh%+16
 5340sprites%!4=0
 5350sprites%!8=16
 5360sprites%!12=16
 5370CLOSE#sh%
 5380SYS "OS_SpriteOp",266,sprites%,"<FastGrab$Dir>.Resources.Sprites"
 5390SYS "Wimp_OpenTemplate",,"<FastGrab$Dir>.Resources.Templates"
 5400PROCltemp("Parameters",w%(1,1),0):REM Change 0 to -1 for new icons!
 5410modead%=FNiconad(1,0)
 5420x1ad%=FNiconad(1,1)
 5430x2ad%=FNiconad(1,2)
 5440y1ad%=FNiconad(1,3)
 5450y2ad%=FNiconad(1,4)
 5460sharpenad%=FNiconad(1,22)
 5470blackad%=FNiconad(1,30)
 5480gammaad%=FNiconad(1,31)
 5490PROCltemp("PALWindow",w%(2,1),0)
 5500brightad%=FNiconad(2,3)
 5510contad%=FNiconad(2,8)
 5520satad%=FNiconad(2,13)
 5530PROCltemp("LiveWin",w%(3,1),0)
 5540w%(3,1)?39=&FF
 5550PROCltemp("LivePane",w%(4,1),0)
 5560w%(4,1)!68=sprites%
 5570w%(4,1)!(88+4+16+32*1)=w%(4,1)!(88+4+16+32*1) OR 1<<22
 5580IF (board_is_16_bit%=FALSE AND allow_dithering%=FALSE) THEN w%(4,1)!(88+4+16+32*4)=w%(4,1)!(88+4+16+32*4) OR 1<<22
 5590valid%=!(w%(4,1)+88+4+24+32*3)
 5600IF board_is_16_bit% THEN
 5610 $valid%="stb_16bit,tb_8bit"
 5620ELSE
 5630 $valid%="stb_12bit,tb_8bit"
 5640ENDIF
 5650PROCltemp("8BitShow",w%(5,1),0)
 5660w%(5,1)?39=&FF
 5670grabwtitlead%=wksp%-255
 5680PROCltemp("GrabPane",w%(6,1),0)
 5690w%(6,1)!68=sprites%
 5700PROCltemp("SprSaveWin",w%(7,1),0)
 5710outsprad%=FNiconad(7,2)
 5720PROCltemp("RawSaveWin",w%(8,1),0)
 5730outrawad%=FNiconad(8,2)
 5740PROCltemp("Magnifier",w%(9,1),0)
 5750mag1ad%=FNiconad(9,0):$mag1ad%="1"
 5760mag2ad%=FNiconad(9,1):$mag2ad%="1"
 5770PROCltemp("SpriteInfo",w%(10,1),0)
 5780grabnamead%=FNiconad(10,0)
 5790grabmodead%=FNiconad(10,1)
 5800grabmaskad%=FNiconad(10,2)
 5810grabwidtad%=FNiconad(10,3)
 5820grabbytead%=FNiconad(10,4)
 5830grabpalad%=FNiconad(10,5)
 5840grabheigad%=FNiconad(10,6)
 5850PROCltemp("RawInfo",w%(11,1),0)
 5860rawbytesad%=FNiconad(11,1)
 5870rawwidthad%=FNiconad(11,3)
 5880rawheightad%=FNiconad(11,5)
 5890rawbrightad%=FNiconad(11,9)
 5900rawcontad%=FNiconad(11,11)
 5910rawsatad%=FNiconad(11,10)
 5920PROCltemp("Info",w%(13,1),-1)
 5930$FNiconad(13,7)=version$
 5940PROCltemp("ImageInfo",w%(14,1),0)
 5950$FNiconad(14,4)=FNChangeFSIVersion
 5960PROCltemp("Query",w%(15,1),0)
 5970queryad%=FNiconad(15,1)
 5980PROCltemp("SpeedWin",w%(17,1),0)
 5990speedad%=FNiconad(17,3)
 6000SYS"Wimp_CloseTemplate"
 6010ENDPROC
 6020
 6030DEF FNiconad(wh%,ih%)
 6040=!(w%(wh%,1)+112+ih%*32)
 6050
 6060DEF PROCltemp(tempname$,RETURN address%,indirected%)
 6070SYS "Wimp_LoadTemplate",,ctempb%+4,wksp%,spnd%,-1,tempname$,0 TO ,,wksp%,,,,found%
 6080IF found%=0 SYS "Wimp_CloseTemplate":ERROR 0,"Template file is incorrect"
 6090address%=ctempb%
 6100IF (ctempb%-tempb%+tempsize%<400) ERROR 0,"Templates need more space"
 6110ctempb%+=4+88+ctempb%!88*32
 6120IF indirected% address%!68=sprites%
 6130ENDPROC
 6140DEF PROCgetchoices
 6150inc%=OPENIN("<FastGrab$Dir>.Resources.Choices")
 6160IF inc%=0 THEN
 6170$modead%="15"
 6180$x1ad%="1"
 6190$x2ad%="1"
 6200$y1ad%="1"
 6210$y2ad%="1"
 6220outmode$=" "
 6230PROCsetflags(0)
 6240$sharpenad%=""
 6250contrast%=32
 6260savedcont%=32
 6270saturation%=32
 6280old_sat%=saturation%
 6290savedsat%=32
 6300brightness%=0
 6310savedbright%=0
 6320bit%=12
 6330dithered%=1
 6340IF board_is_16_bit% OR allow_dithering% THEN
 6350 dither$=">"
 6360ELSE
 6370 dither$="<"
 6380ENDIF
 6390IF allow_mono% THEN
 6400 mono$=""
 6410ELSE
 6420 mono$="<"
 6430ENDIF
 6440ltool$=">"
 6450gtool$=">"
 6460speed%=99
 6470field$=""
 6480!fielding=0
 6490!evenfield=0
 6500PROCfieldmenu
 6510cache$=""
 6520$modeb%="15"
 6530grabsize%=0
 6540livesize%=2
 6550PROCselect(26,0)
 6560PROCselect(27,0)
 6570PROCselect(28,0)
 6580$blackad%="32"
 6590PROCselect(29,0)
 6600$gammaad%="2.2"
 6610ELSE
 6620mode%=BGET#inc%
 6630$modead%=STR$mode%
 6640INPUT#inc%,$x1ad%
 6650INPUT#inc%,$y1ad%
 6660INPUT#inc%,$x2ad%
 6670INPUT#inc%,$y2ad%
 6680options%=BGET#inc% OR (BGET#inc%)<<8
 6690PROCsetflags(options%)
 6700$sharpenad%=STR$(BGET#inc%)
 6710brightness%=BGET#inc%
 6720savedbright%=brightness%
 6730contrast%=BGET#inc%
 6740savedcont%=contrast%
 6750saturation%=BGET#inc%
 6760savedsat%=saturation%
 6770old_sat%=saturation%
 6780tool%=BGET#inc%
 6790IF (tool% AND 1) bit%=12 ELSE bit%=8
 6800IF (tool% AND 2) ltool$=">" ELSE ltool$=""
 6810IF (tool% AND 4) gtool$=">" ELSE gtool$=""
 6820IF (tool% AND 8) cache$=">" ELSE cache$=""
 6830IF (tool% AND 16) field$=">":!fielding=1 ELSE field$="":!fielding=0
 6840!evenfield=(tool% AND 32)>>4
 6850IF (tool% AND 128) mono$=">" ELSE mono$=""
 6860IF allow_mono%=FALSE THEN mono$="<"
 6870IF board_is_16_bit% THEN
 6880 IF (tool% AND 64) THEN dithered%=1:dither$=">" ELSE dithered%=0:dither$=""
 6890 PROCchange_LCA(dithered%)
 6900ELSE
 6910 SYS "WVCGrab_LCA",0
 6920 CALL set_8bit
 6930 IF allow_dithering% THEN
 6940  dithered%=1
 6950  dither$=">"
 6960 ELSE
 6970  dithered%=0
 6980  dither$="<"
 6990 ENDIF
 7000ENDIF
 7010old_sat%=saturation%
 7020PROCfieldmenu
 7030speed%=BGET#inc%
 7040modeval%=BGET#inc%:$modeb%=STR$modeval%
 7050grabsize%=BGET#inc%
 7060livesize%=BGET#inc%
 7070sel%=BGET#inc%:IF sel% PROCselect(26,1)
 7080sel%=BGET#inc%:IF sel% PROCselect(27,1)
 7090sel%=BGET#inc%:IF sel% PROCselect(28,1)
 7100$blackad%=STR$(BGET#inc%)
 7110sel%=BGET#inc%:IF sel% PROCselect(29,1)
 7120INPUT#inc%,$gammaad%
 7130precise%=BGET#inc%
 7140IF precise% THEN
 7150 on%=32:outmode$="P"
 7160 FOR s%=7 TO 32
 7170  IF s%=on% PROCiconset(1,s%,1<<21,1<<21) ELSE PROCiconset(1,s%,1<<21,0)
 7180 NEXT
 7190ENDIF
 7200CLOSE#inc%
 7210ENDIF
 7220grabsize$=FNsetsizemenu(grabsize%)
 7230livesize$=FNsetsizemenu(livesize%)
 7240PROCspeed:$speedad%=STR$speed%
 7250PROCcontrast:$contad%=STR$contrast%
 7260PROCbrightness:$brightad%=STR$brightness%
 7270PROCsaturation:$satad%=STR$saturation%
 7280IF bit%=12 THEN
 7290 PROCiconset(4,3,1<<21,0)
 7300ELSE
 7310 PROCiconset(4,3,1<<21,1<<21)
 7320ENDIF
 7330ENDPROC
 7340DEF PROCsetflags(set%)
 7350IF set% AND 256 THEN
 7360PROCiconset(1,6,1<<21,0)
 7370PROCiconset(1,5,1<<21,1<<21)
 7380ELSE
 7390PROCiconset(1,6,1<<21,1<<21)
 7400PROCiconset(1,5,1<<21,0)
 7410ENDIF
 7420CASE set% AND 3 OF
 7430WHEN 0
 7440 outmode$=" "
 7450 on%=7
 7460WHEN 1
 7470 outmode$="C"
 7480 on%=8
 7490WHEN 2
 7500 outmode$="D"
 7510 on%=9
 7520WHEN 3
 7530 outmode$="T"
 7540 on%=10
 7550ENDCASE
 7560FOR s%=7 TO 32
 7570 IF s%=on% PROCiconset(1,s%,1<<21,1<<21) ELSE PROCiconset(1,s%,1<<21,0)
 7580NEXT
 7590PROCselect(11,(set% AND 4)>>2)
 7600PROCselect(12,(set% AND 8)>>3)
 7610PROCselect(13,(set% AND 16)>>4)
 7620PROCselect(14,(set% AND 32)>>5)
 7630PROCselect(15,(set% AND 64)>>6)
 7640PROCselect(16,(set% AND 128)>>7)
 7650PROCselect(23,(set% AND 512)>>9)
 7660PROCselect(24,(set% AND 1024)>>10)
 7670PROCselect(25,(set% AND 2048)>>11)
 7680PROCselect(27,(set% AND 4096)>>12)
 7690ENDPROC
 7700
 7710DEF PROCselect(icon%,select%)
 7720PROCiconset(1,icon%,1<<21,select%<<21)
 7730ENDPROC
 7740
 7750DEF PROCwimpservice(event%,pb%)
 7760CASE event% OF
 7770WHEN 0
 7780 CASE !dragging% OF
 7790 WHEN 1,2,3
 7800  PROCdopaldrag
 7810 WHEN 4
 7820  PROCdospeeddrag
 7830 ENDCASE
 7840WHEN 1
 7850 PROCredrawwin
 7860WHEN 2
 7870 CASE !pb% OF
 7880 WHEN w%(3,0)
 7890  PROCdopane(w%(3,0))
 7900 WHEN w%(5,0)
 7910  PROCdopane(w%(5,0))
 7920 OTHERWISE
 7930  SYS "Wimp_OpenWindow",,pb%
 7940 ENDCASE
 7950WHEN 3
 7960 CASE !pb% OF
 7970 WHEN w%(3,0)
 7980  PROCshutlivedisplay
 7990 WHEN w%(5,0)
 8000  PROCdwin(5)
 8010  !grabwb=0
 8020  IF gtool$=">" PROCdwin(6)
 8030 OTHERWISE
 8040  SYS "Wimp_DeleteWindow",,pb%
 8050  w%(FNwindowid(!pb%),2)=FALSE
 8060 ENDCASE
 8070WHEN 6
 8080 PROCclickwindow
 8090WHEN 7
 8100 PROCdragend
 8110WHEN 8
 8120 PROChandlekey
 8130WHEN 9
 8140 PROCmenuselect
 8150WHEN 17,18
 8160 PROCmessage
 8170ENDCASE
 8180ENDPROC
 8190
 8200DEF PROCshutlivedisplay
 8210PROCdwin(3)
 8220!livewb=0
 8230IF ltool$=">" PROCdwin(4)
 8240live%=FALSE
 8250!maskad=%1100000110001
 8260IF !signalpresent $barspace="bardorms" ELSE $barspace="bardormn"
 8270!mb%=-1
 8280mb%!4=iconbar%
 8290mb%!8=0
 8300mb%!12=0
 8310SYS "Wimp_SetIconState",,mb%
 8320ENDPROC
 8330
 8340DEF FNdumpsprite
 8350$(mb%+4)="Sprite not saved - discard it?"
 8360SYS "Wimp_ReportError",mb%,7,"FastGrab" TO ,response%
 8370IF response%=2 =FALSE ELSE =TRUE
 8380
 8390DEF PROCshutdown(arg%)
 8400IF arg% THEN
 8410 IF NOT saved12% AND (debug%=FALSE) THEN
 8420  PROCquery(2,"Image not saved in FastGrab: are you sure you want to quit?")
 8430  ENDPROC
 8440 ENDIF
 8450 IF slave% THEN
 8460  $mb%="<FastGrab$Dir>.Resources.TwelveBit"
 8470  SYS "OS_FSControl",27,mb%,,0
 8480  slave%=FALSE
 8490 ENDIF
 8500ENDIF
 8510close%=TRUE
 8520IF quitting% THEN
 8530 SYS "Wimp_GetCaretPosition",,mb%
 8540 mb%!24=&1FC
 8550 SYS "Wimp_SendMessage",8,mb%,0
 8560 SYS "Wimp_SendMessage",8,mb%,quithand%
 8570ENDIF
 8580SYS "Wimp_CloseDown",taskhandle%,"TASK"
 8590END
 8600ENDPROC
 8610
 8620DEF PROCquery(qnum%,message$)
 8630qflag%=qnum%
 8640$queryad%=message$
 8650PROCmenu(15,rightscr%/2-738/2,topscr%/2+276/2,0)
 8660ENDPROC
 8670
 8680DEF PROCredrawwin
 8690CASE !pb% OF
 8700WHEN w%(2,0)
 8710 SYS "Wimp_RedrawWindow",,pb% TO more%
 8720 x0%=pb%!4-pb%!20
 8730 y0%=pb%!16-pb%!24
 8740 WHILE more%
 8750  CLG
 8760  SYS "Wimp_SetColour",7
 8770  RECTANGLE FILL x0%+140,y0%-36,brightness%*4,20
 8780  RECTANGLE FILL x0%+140,y0%-80,contrast%*4,20
 8790  RECTANGLE FILL x0%+140,y0%-124,saturation%*4,20
 8800  SYS "Wimp_GetRectangle",,pb% TO more%
 8810 ENDWHILE
 8820WHEN w%(17,0)
 8830 SYS "Wimp_RedrawWindow",,pb% TO more%
 8840 x0%=pb%!4-pb%!20
 8850 y0%=pb%!16-pb%!24
 8860 WHILE more%
 8870  CLG
 8880  SYS "Wimp_SetColour",7
 8890  RECTANGLE FILL x0%+140,y0%-36,speed%*2,20
 8900  SYS "Wimp_GetRectangle",,pb% TO more%
 8910 ENDWHILE
 8920ENDCASE
 8930ENDPROC
 8940
 8950DEF PROCdopane(toolwindow%)
 8960CASE toolwindow% OF
 8970WHEN w%(3,0)
 8980 pane%=w%(4,0)
 8990 paneopen%=(ltool$=">")
 9000WHEN w%(5,0)
 9010 pane%=w%(6,0)
 9020 paneopen%=(gtool$=">")
 9030OTHERWISE
 9040 ERROR 100,"This window is paneless!"
 9050ENDCASE
 9060!mb%=toolwindow%
 9070SYS "Wimp_GetWindowState",,mb%
 9080IF mb%!32 AND 1<<19 THEN
 9090 PROCtogglewindowsize(mb%)
 9100 SYS "Wimp_OpenWindow",,pb%
 9110 SYS "Wimp_GetWindowState",,pb%
 9120ENDIF
 9130IF pb%!4<=mb%!4 towards%=TRUE ELSE towards%=FALSE
 9140!mb%=pane%
 9150mb%!4=pb%!4-88
 9160mb%!8=pb%!8
 9170mb%!12=pb%!4-4
 9180mb%!16=pb%!16
 9190mb%!20=0
 9200mb%!24=0
 9210mb%!28=pb%!28
 9220IF towards% THEN
 9230 IF paneopen% THEN
 9240  SYS "Wimp_OpenWindow",,mb%
 9250  pb%!28=pane%
 9260 ENDIF
 9270 SYS "Wimp_OpenWindow",,pb%
 9280ELSE
 9290 SYS "Wimp_OpenWindow",,pb%
 9300 IF paneopen% SYS "Wimp_OpenWindow",,mb%
 9310ENDIF
 9320ENDPROC
 9330
 9340DEF PROCtogglewindowsize(block%)
 9350win%=FNwindowid(!block%)
 9360REM IF w%(win%,1)!44<-rightscr% THEN
 9370REM  block%!4=0
 9380REM  block%!12=rightscr%-48
 9390REM ENDIF
 9400REM IF w%(win%,1)!56>topscr% THEN
 9410REM  block%!8=48
 9420REM  block%!16=topscr%-48
 9430REM ENDIF
 9440block%!12=block%!4+w%(win%,1)!52
 9450block%!8=block%!16-w%(win%,1)!56
 9460ENDPROC
 9470
 9480DEF FNwindowid(handle%)
 9490LOCAL win%
 9500win%=0
 9510WHILE w%(win%,0)<>handle%
 9520 win%+=1
 9530ENDWHILE
 9540=win%
 9550
 9560DEF PROCclickwindow
 9570
 9580adjust%=pb%!4 AND 1
 9590
 9600CASE pb%!12 OF
 9610
 9620WHEN -2
 9630 CASE pb%!16 OF
 9640 WHEN iconbar%
 9650  CASE pb%!8 OF
 9660  WHEN 2
 9670   mousex%=!pb%
 9680   mousey%=186
 9690   menu%=FNcmenu(0,"FastGrab|@13'Info|Quit|",96)
 9700   mentype%=0
 9710  WHEN 4
 9720   IF NOT live% THEN
 9730    w%(3,1)!4=rightscr%/2-livex%/2
 9740    w%(3,1)!8=topscr%/2-livey%/2
 9750    w%(3,1)!12=rightscr%/2+livex%/2
 9760    w%(3,1)!16=topscr%/2+livey%/2
 9770    IF w%(3,1)!8<0 w%(3,1)!8=84
 9780    w%(3,1)!20=0
 9790    w%(3,1)!24=0
 9800    w%(3,1)!28=-1
 9810    PROCcwin(3)
 9820    !rdb=w%(3,0)
 9830    !udb=w%(3,0)
 9840    !livewb=w%(3,0)
 9850    SYS "Wimp_OpenWindow",,w%(3,1)
 9860    IF ltool$=">" THEN
 9870     w%(4,1)!4=w%(3,1)!4-88
 9880     w%(4,1)!8=w%(3,1)!8
 9890     w%(4,1)!12=w%(4,1)!4+84
 9900     w%(4,1)!16=w%(3,1)!16
 9910     w%(4,1)!28=-1
 9920     IF grabex% PROCiconset(4,1,1<<22,0)
 9930     PROCcwin(4)
 9940     SYS "Wimp_OpenWindow",,w%(4,1)
 9950    ENDIF
 9960    IF !signalpresent THEN $barspace="barsignal" ELSE $barspace="barnosignal"
 9970    !mb%=-1
 9980    mb%!4=iconbar%
 9990    mb%!8=0
10000    mb%!12=0
10010    SYS "Wimp_SetIconState",,mb%
10020    live%=TRUE
10030    !maskad=%1100000110000
10040   ELSE
10050    IF ltool$=">" THEN
10060     !mb%=w%(4,0)
10070     SYS "Wimp_GetWindowState",,mb%
10080     mb%!28=-1
10090     SYS "Wimp_OpenWindow",,mb%
10100     !mb%=w%(3,0)
10110     SYS "Wimp_GetWindowState",,mb%
10120     mb%!28=w%(4,0)
10130     SYS "Wimp_OpenWindow",,mb%
10140    ELSE
10150     !mb%=w%(3,0)
10160     SYS "Wimp_GetWindowState",,mb%
10170     mb%!28=-1
10180     SYS "Wimp_OpenWindow",,mb%
10190    ENDIF
10200   ENDIF
10210 ENDCASE
10220ENDCASE
10230
10240WHEN w%(3,0)
10250 CASE pb%!8 OF
10260 WHEN 2
10270  PROClivemenu
10280 ENDCASE
10290
10300WHEN w%(4,0)
10310 IF (pb%!8 AND 4) THEN
10320  CASE pb%!16 OF
10330   WHEN 0
10340    PROCgrab
10350    PROCshowgrab
10360   WHEN 1
10370    PROCshowgrab
10380   WHEN 2
10390    PROCmenu(2,!pb%-290,pb%!4+68,0)
10400   WHEN 3
10410    IF bit%=12 bit%=8 ELSE bit%=12
10420   WHEN 4
10430    dithered%=dithered% EOR 1
10440    PROCchange_LCA(dithered%)
10450  ENDCASE
10460 ENDIF
10470 IF (pb%!8 AND 2) PROClivemenu
10480
10490WHEN w%(5,0)
10500 CASE pb%!8 OF
10510 WHEN 2
10520  PROCgrabmenu
10530 ENDCASE
10540WHEN w%(6,0)
10550 IF (pb%!8 AND 4) THEN
10560 CASE pb%!16 OF
10570 WHEN 0
10580  PROCmenu(1,!pb%-354,pb%!4+264,0)
10590 WHEN 1
10600  PROCmenu(9,!pb%-136,pb%!4+64,0)
10610 WHEN 2
10620  PROCmenu(7,!pb%-122,pb%!4+84,0)
10630   dragtype%=0
10640 WHEN 3
10650  PROCmenu(8,!pb%-122,pb%!4+84,0)
10660  dragtype%=1
10670 ENDCASE
10680 ENDIF
10690 IF (pb%!8 AND 2) PROCgrabmenu
10700
10710WHEN w%(9,0)
10720 IF (pb%!8 AND 1)=0 THEN
10730  CASE pb%!16 OF
10740  WHEN 2
10750   PROCmagstring(1,0)
10760  WHEN 3
10770   PROCmagstring(-1,0)
10780  WHEN 4
10790   PROCmagstring(0,1)
10800  WHEN 5
10810   PROCmagstring(0,-1)
10820  ENDCASE
10830 ELSE
10840  CASE pb%!16 OF
10850  WHEN 2
10860   PROCmagstring(-1,0)
10870  WHEN 3
10880   PROCmagstring(1,0)
10890  WHEN 4
10900   PROCmagstring(0,-1)
10910  WHEN 5
10920   PROCmagstring(0,1)
10930  ENDCASE
10940 ENDIF
10950
10960WHEN w%(7,0)
10970 CASE pb%!16 OF
10980 WHEN 1
10990  PROCsavesprite
11000 WHEN 0
11010  IF (pb%!8 AND &50)<>0 THEN
11020   PROCgst(pb%,w%(7,0))
11030   !mb%=w%(7,0)
11040   mb%!4=0
11050   SYS "Wimp_GetIconState",,mb%
11060   ilx%=mb%!8:ity%=mb%!12
11070   irx%=mb%!16:iby%=mb%!20
11080   PROCgst(mb%,w%(7,0))
11090   !pb%=w%(7,0)
11100   pb%!4=5
11110   pb%!8=mb%!4+ilx%
11120   pb%!12=mb%!16+ity%
11130   pb%!16=mb%!4+irx%
11140   pb%!20=mb%!16+iby%
11150   pb%!24=0
11160   pb%!28=0
11170   pb%!32=&7FFFFFFF
11180   pb%!36=&7FFFFFFF
11190   SYS "Wimp_DragBox",,pb%
11200   dragtype%=0
11210  ENDIF
11220 ENDCASE
11230
11240WHEN w%(8,0)
11250 CASE pb%!16 OF
11260 WHEN 1
11270  PROCsaveraw
11280 WHEN 0
11290  IF (pb%!8 AND &50)<>0 THEN
11300   PROCgst(pb%,w%(8,0))
11310   !mb%=w%(8,0)
11320   mb%!4=0
11330   SYS "Wimp_GetIconState",,mb%
11340   ilx%=mb%!8:ity%=mb%!12
11350   irx%=mb%!16:iby%=mb%!20
11360   PROCgst(mb%,w%(8,0))
11370   !pb%=w%(8,0)
11380   pb%!4=5
11390   pb%!8=mb%!4+ilx%
11400   pb%!12=mb%!16+ity%
11410   pb%!16=mb%!4+irx%
11420   pb%!20=mb%!16+iby%
11430   pb%!24=0
11440   pb%!28=0
11450   pb%!32=&7FFFFFFF
11460   pb%!36=&7FFFFFFF
11470   SYS "Wimp_DragBox",,pb%
11480   dragtype%=1
11490  ENDIF
11500 ENDCASE
11510
11520WHEN w%(1,0)
11530 CASE pb%!16 OF
11540 WHEN 7
11550  outmode$=" "
11560 WHEN 8
11570  outmode$="C"
11580 WHEN 9
11590  outmode$="D"
11600 WHEN 10
11610  outmode$="T"
11620 WHEN 32
11630  outmode$="P"
11640 WHEN 25
11650  SYS "Wimp_CreateMenu",,-1
11660  PROCgocfsi
11670 ENDCASE
11680 IF (pb%!8 AND 1) AND (pb%!16<11) PROCiconset(1,pb%!16,1<<21,1<<21)
11690
11700WHEN w%(2,0)
11710 adjust%=pb%!8 AND 1
11720 ch%=FALSE
11730 CASE pb%!16 OF
11740 WHEN 1
11750  IF adjust% THEN
11760   IF brightness%<>0 brightness%-=1:ch%=TRUE
11770  ELSE
11780   IF brightness%<>63 brightness%+=1:ch%=TRUE
11790  ENDIF
11800  IF ch% $brightad%=STR$brightness%:PROCudpbar(-36,brightness%)
11810 WHEN 2
11820  IF adjust% THEN
11830   IF brightness%<>63 brightness%+=1:ch%=TRUE
11840  ELSE
11850   IF brightness%<>0 brightness%-=1:ch%=TRUE
11860  ENDIF
11870  IF ch% $brightad%=STR$brightness%:PROCudpbar(-36,brightness%)
11880 WHEN 6
11890  IF adjust% THEN
11900   IF contrast%<>0 contrast%-=1:ch%=TRUE
11910  ELSE
11920   IF contrast%<>63 contrast%+=1:ch%=TRUE
11930  ENDIF
11940  IF ch% $contad%=STR$contrast%:PROCudpbar(-80,contrast%)
11950 WHEN 7
11960  IF adjust% THEN
11970   IF contrast%<>63 contrast%+=1:ch%=TRUE
11980  ELSE
11990   IF contrast%<>0 contrast%-=1:ch%=TRUE
12000  ENDIF
12010  IF ch% $contad%=STR$contrast%:PROCudpbar(-80,contrast%)
12020 WHEN 11
12030  IF adjust% THEN
12040   IF saturation%<>0 saturation%-=1:ch%=TRUE
12050  ELSE
12060   IF saturation%<>63 saturation%+=1:ch%=TRUE
12070  ENDIF
12080  IF ch% $satad%=STR$saturation%:PROCudpbar(-124,saturation%)
12090 WHEN 12
12100  IF adjust% THEN
12110   IF saturation%<>63 saturation%+=1:ch%=TRUE
12120  ELSE
12130   IF saturation%<>0 saturation%-=1:ch%=TRUE
12140  ENDIF
12150  IF ch% $satad%=STR$saturation%:PROCudpbar(-124,saturation%)
12160 WHEN 4
12170  PROCpalslide(pb%,-36,1)
12180 WHEN 9
12190  PROCpalslide(!pb%,-80,2)
12200 WHEN 14
12210  PROCpalslide(!pb%,-124,3)
12220 WHEN 0
12230  PROCsetpal(0,32,32)
12240 WHEN 16
12250  PROCsetpal(savedbright%,savedcont%,savedsat%)
12260 ENDCASE
12270
12280WHEN w%(15,0)
12290 CASE qflag% OF
12300 WHEN 1
12310  CASE pb%!16 OF
12320  WHEN 0
12330   PROCmenu(8,!pb%-122,pb%!4+84,0)
12340   dragtype%=1
12350  WHEN 2
12360   PROCdeletegrabbed
12370  ENDCASE
12380 WHEN 2
12390  CASE pb%!16 OF
12400  WHEN 0
12410   PROCshutdown(0)
12420  WHEN 2
12430  ENDCASE
12440 WHEN 3
12450  CASE pb%!16 OF
12460  WHEN 0
12470   PROCmenu(7,!pb%-122,pb%!4+84,0)
12480   dragtype%=0
12490  WHEN 2
12500   PROCdeletegrabbed
12510  ENDCASE
12520 ENDCASE
12530 PROCclwin(15)
12540
12550WHEN w%(17,0)
12560 CASE pb%!16 OF
12570 WHEN 0
12580  PROCspeedslide(!pb%)
12590 WHEN 1
12600  IF (pb%!8 AND 1) THEN
12610   IF speed%<>0 THEN
12620    speed%-=1
12630    $speedad%=STR$speed%
12640    PROCspeedbar
12650   ENDIF
12660  ELSE
12670   IF speed%<>99 THEN
12680    speed%+=1
12690    $speedad%=STR$speed%
12700    PROCspeedbar
12710   ENDIF
12720  ENDIF
12730 WHEN 2
12740  IF (pb%!8 AND 1) THEN
12750   IF speed%<>99 THEN
12760    speed%+=1
12770    $speedad%=STR$speed%
12780    PROCspeedbar
12790   ENDIF
12800  ELSE
12810   IF speed%<>0 THEN
12820    speed%-=1
12830    $speedad%=STR$speed%
12840    PROCspeedbar
12850   ENDIF
12860  ENDIF
12870 ENDCASE
12880ENDCASE
12890ENDPROC
12900
12910DEF PROClivemenu
12920mousex%=!pb%
12930mousey%=pb%!4
12940IF bit%=12 THEN
12950 tick12$=">"
12960 cachem$=cache$
12970ELSE
12980 tick12$=""
12990 cachem$="<"
13000ENDIF
13010IF grabex% shade$="" ELSE shade$="<"
13020IF mono$=">" THEN ms$="<" ELSE ms$=""
13030temp0$="FastGrab|Grab frame|'0156grabsize$'Frame size|'0156livesize$'Live size|"
13040IF board_is_16_bit% THEN
13050 temp1$=ms$+tick12$+"16 bit data|"+ms$+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
13060ELSE
13070 temp1$=tick12$+"12 bit data|"+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
13080ENDIF
13090menu%=FNcmenu(0,temp0$+temp1$,236)
13100mentype%=1
13110ENDPROC
13120
13130DEF PROCgrabmenu
13140mousex%=!pb%
13150mousey%=pb%!4
13160IF grab12% raw$="" ELSE raw$="<"
13170temp0$="FastGrab|@10'Sprite info|@9'Zoom|@7'Save sprite|@1'"+raw$+"ChangeFSI|@14'Credits|"
13180IF board_is_16_bit% THEN
13190 temp1$="@11'"+raw$+"16 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
13200ELSE
13210 temp1$="@11'"+raw$+"12 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
13220ENDIF
13230menu%=FNcmenu(0,temp0$+temp1$,220)
13240mentype%=2
13250ENDPROC
13260
13270DEF PROCpalslide(xpos%,ypos%,dragnum%)
13280!dragging%=dragnum%
13290!mb%=w%(2,0)
13300SYS "Wimp_GetWindowState",,mb%
13310mb%!24=140+mb%!4
13320mb%!28=ypos%+mb%!16
13330mb%!32=392+mb%!4
13340mb%!36=ypos%+20+mb%!16
13350mb%!8=mb%!24
13360mb%!12=mb%!28
13370mb%!16=xpos%
13380mb%!20=mb%!36
13390mb%!4=7
13400SYS "Wimp_DragBox",,mb%
13410ENDPROC
13420
13430DEF PROCudpbar(bary%,value%)
13440IF value%<0 ENDPROC
13450!mb%=w%(2,0)
13460mb%!4=142
13470mb%!8=bary%
13480mb%!12=394
13490mb%!16=bary%+22
13500SYS "Wimp_UpdateWindow",,mb% TO more%
13510x0%=mb%!4-mb%!20
13520y0%=mb%!16-mb%!24
13530WHILE more%
13540 CLG
13550 SYS "Wimp_SetColour",7
13560 RECTANGLE FILL x0%+140,y0%+bary%,value%*4,20
13570 SYS "Wimp_GetRectangle",,mb% TO more%
13580ENDWHILE
13590!mb%=w%(2,0)
13600mb%!4=84
13610mb%!8=bary%-4
13620mb%!12=136
13630mb%!16=bary%+26
13640SYS "Wimp_UpdateWindow",,mb% TO more%
13650x0%=mb%!4-mb%!20
13660y0%=mb%!16-mb%!24
13670WHILE more%
13680 CLG
13690 SYS "Wimp_GetRectangle",,mb% TO more%
13700ENDWHILE
13710CASE bary% OF
13720WHEN -36
13730 PROCbrightness
13740WHEN -80
13750 PROCcontrast
13760WHEN -124
13770 PROCsaturation
13780ENDCASE
13790ENDPROC
13800
13810DEF PROCsetpal(b%,c%,s%)
13820brightness%=b%:contrast%=c%:saturation%=s%
13830$brightad%=STR$(b%)
13840$contad%=STR$(c%)
13850$satad%=STR$(s%)
13860PROCudpbar(-36,b%)
13870PROCudpbar(-80,c%)
13880PROCudpbar(-124,s%)
13890ENDPROC
13900
13910DEF FNcalcbar(xpos%)
13920LOCAL winpos%,value%
13930!mb%=w%(2,0)
13940SYS "Wimp_GetWindowState",,mb%
13950winpos%=xpos%-mb%!4
13960=(winpos%-140)/4
13970
13980DEF PROCdopaldrag
13990SYS "Wimp_GetPointerInfo",,mb%
14000CASE !dragging% OF
14010WHEN 1
14020 newbright%=FNcalcbar(!mb%)
14030 IF brightness%=newbright% ENDPROC
14040 brightness%=newbright%
14050 $brightad%=STR$brightness%
14060 PROCudpbar(-36,brightness%)
14070WHEN 2
14080 newcont%=FNcalcbar(!mb%)
14090 IF contrast%=newcont% ENDPROC
14100 contrast%=newcont%
14110 $contad%=STR$contrast%
14120 PROCudpbar(-80,contrast%)
14130WHEN 3
14140 newsat%=FNcalcbar(!mb%)
14150 IF saturation%=newsat% ENDPROC
14160 saturation%=newsat%
14170 $satad%=STR$saturation%
14180 PROCudpbar(-124,saturation%)
14190ENDCASE
14200ENDPROC
14210
14220DEF PROCspeedslide(xpos%)
14230!dragging%=4
14240!mb%=w%(17,0)
14250SYS "Wimp_GetWindowState",,mb%
14260mb%!24=140+mb%!4
14270mb%!28=-36+mb%!16
14280mb%!32=338+mb%!4
14290mb%!36=-16+mb%!16
14300mb%!8=mb%!24
14310mb%!12=mb%!28
14320mb%!16=xpos%
14330mb%!20=mb%!36
14340mb%!4=7
14350SYS "Wimp_DragBox",,mb%
14360ENDPROC
14370
14380DEF PROCspeedbar
14390IF speed%<0 ENDPROC
14400!mb%=w%(17,0)
14410mb%!4=142
14420mb%!8=-36
14430mb%!12=340
14440mb%!16=-14
14450SYS "Wimp_UpdateWindow",,mb% TO more%
14460x0%=mb%!4-mb%!20
14470y0%=mb%!16-mb%!24
14480WHILE more%
14490 CLG
14500 SYS "Wimp_SetColour",7
14510 RECTANGLE FILL x0%+140,y0%-36,speed%*2,20
14520 SYS "Wimp_GetRectangle",,mb% TO more%
14530ENDWHILE
14540!mb%=w%(17,0)
14550mb%!4=84
14560mb%!8=-40
14570mb%!12=136
14580mb%!16=-10
14590SYS "Wimp_UpdateWindow",,mb% TO more%
14600x0%=mb%!4-mb%!20
14610y0%=mb%!16-mb%!24
14620WHILE more%
14630 CLG
14640 SYS "Wimp_GetRectangle",,mb% TO more%
14650ENDWHILE
14660PROCspeed
14670ENDCASE
14680ENDPROC
14690
14700DEF FNcalcspeed(xpos%)
14710LOCAL winpos%,value%
14720!mb%=w%(17,0)
14730SYS "Wimp_GetWindowState",,mb%
14740winpos%=xpos%-mb%!4
14750=(winpos%-140)/2
14760
14770DEF PROCdospeeddrag
14780SYS "Wimp_GetPointerInfo",,mb%
14790newspeed%=FNcalcspeed(!mb%)
14800IF speed%=newspeed% ENDPROC
14810speed%=newspeed%
14820$speedad%=STR$speed%
14830PROCspeedbar
14840ENDPROC
14850
14860DEF PROCspeed
14870!speedval=99-speed%
14880ENDPROC
14890
14900DEF PROCcontrast
14910?IICblock%=2
14920IICblock%?1=contrast%
14930SYS &240,136,IICblock%,2
14940ENDPROC
14950
14960DEF PROCsaturation
14970?IICblock%=1
14980IICblock%?1=saturation%
14990SYS &240,136,IICblock%,2
15000ENDPROC
15010
15020DEF PROCbrightness
15030?IICblock%=0
15040IICblock%?1=brightness%
15050SYS &240,136,IICblock%,2
15060ENDPROC
15070
15080DEF PROCchkbnds(address%)
15090IF LEN$address%=0 $address%="0"
15100IF VAL$address%>63 $address%="63"
15110ENDPROC
15120
15130DEF PROCdragend
15140LOCAL dx%,dy%,dw%,di%
15150CASE !dragging% OF
15160WHEN 1,2,3,4
15170 !dragging%=0
15180 ENDPROC
15190ENDCASE
15200CASE dragtype% OF
15210WHEN 0,1
15220 SYS "Wimp_GetPointerInfo",,mb%
15230 dx%=!mb%
15240 dy%=mb%!4
15250 dw%=mb%!12
15260 di%=mb%!16
15270 CASE dragtype% OF
15280 WHEN 0
15290  fnamelen%=LEN($outsprad%)
15300  filesize%=spritesize%-4
15310  filetype%=&FF9
15320  $(mb%+44)=FNzt(outsprad%)+CHR$0+CHR$0+CHR$0+CHR$0
15330 WHEN 1
15340  fnamelen%=LEN($outrawad%)
15350  filesize%=rawsize%
15360  filetype%=&FFD
15370  $(mb%+44)=FNzt(outrawad%)+CHR$0+CHR$0+CHR$0+CHR$0
15380 ENDCASE
15390 PROCround(fnamelen%,4)
15400 fnamelen%+=4
15410 dummy%=filesize%
15420 PROCround(dummy%,4)
15430 !mb%=44+fnamelen%
15440 mb%!12=0
15450 mb%!16=1
15460 mb%!20=dw%
15470 mb%!24=di%
15480 mb%!28=dx%
15490 mb%!32=dy%
15500 mb%!36=dummy%+1024
15510 mb%!40=filetype%
15520 SYS "Wimp_SendMessage",17,mb%,dw%,di%
15530 myref%=mb%!8
15540 dragtype%=-1
15550ENDCASE
15560ENDPROC
15570
15580DEF PROCdatasaveack
15590IF pb%!12=myref% THEN
15600 save$=FNzt(pb%+44)
15610 CASE filetype% OF
15620 WHEN &FF9
15630  SYS "OS_SpriteOp",&10C,grabarea%,save$
15640  IF pb%!36<>-1 THEN
15650   IF cfsid% suffix$=" CFSI" ELSE suffix$=" 8 bit"
15660   saved8%=TRUE
15670   $grabwtitlead%=save$+suffix$
15680   PROCupdatetitle
15690  ENDIF
15700 WHEN &FFD
15710  rawout%=OPENOUT(save$)
15720  IF slave% THEN
15730   rawin%=OPENIN("<FastGrab$Dir>.Resources.TwelveBit")
15740   IF rawin%=0 ERROR 214,"Cache file cannot be found"
15750   SYS "OS_GBPB",4,rawin%,livearea%+100,100000
15760   SYS "OS_GBPB",2,rawout%,livearea%+100,100000
15770   SYS "OS_GBPB",4,rawin%,livearea%+100,96628
15780   SYS "OS_GBPB",2,rawout%,livearea%+100,96628
15790   CLOSE#rawin%
15800  ELSE
15810   SYS "OS_GBPB",2,rawout%,rawarea%,rawsize%
15820  ENDIF
15830  CLOSE#rawout%
15840  IF pb%!36<>-1 THEN
15850   saved12%=TRUE
15860   IF board_is_16_bit% $grabwtitlead%=save$+" 16 bit" ELSE $grabwtitlead%=save$+" 12 bit"
15870   PROCupdatetitle
15880  ENDIF
15890 ENDCASE
15900 pb%!12=pb%!8
15910 pb%!16=3
15920 SYS "Wimp_SendMessage",18,pb%,pb%!4
15930 SYS "Wimp_CreateMenu",,-1
15940ENDIF
15950ENDPROC
15960
15970DEF FNzt(address%)
15980LOCAL pos%
15990pos%=0
16000string$=""
16010REPEAT
16020 string$+=CHR$address%?pos%
16030 pos%+=1
16040UNTIL address%?pos%<32
16050=string$
16060
16070DEF PROCputword(handle%,word%)
16080BPUT#handle%,word% AND &FF
16090BPUT#handle%,(word% AND &FF00)>>8
16100BPUT#handle%,(word% AND &FF0000)>>16
16110BPUT#handle%,(word% AND &FF000000)>>24
16120ENDPROC
16130
16140DEF FNgetword(handle%)
16150byte0%=BGET#handle%
16160byte1%=BGET#handle%
16170byte2%=BGET#handle%
16180byte3%=BGET#handle%
16190=(byte3%<<24) OR (byte2%<<16) OR (byte1%<<8) OR byte0%
16200
16210DEF PROChandlekey
16220mine%=FALSE
16230CASE !pb% OF
16240
16250WHEN w%(1,0)
16260 CASE pb%!24 OF
16270 WHEN 13
16280  mine%=TRUE
16290  CASE pb%!4 OF
16300  WHEN 0,1,2,3
16310   SYS "Wimp_SetCaretPosition",w%(1,0),pb%!4+1,,,-1,LEN($FNiconad(1,pb%!4+1))
16320  WHEN 4
16330   SYS "Wimp_SetCaretPosition",w%(1,0),22,,,-1,LEN($sharpenad%)
16340  WHEN 22
16350   SYS "Wimp_SetCaretPosition",w%(1,0),30,,,-1,LEN($blackad%)
16360  WHEN 30
16370   SYS "Wimp_SetCaretPosition",w%(1,0),31,,,-1,LEN($gammaad%)
16380  WHEN 31
16390   SYS "Wimp_CreateMenu",,-1
16400   PROCgocfsi
16410   ENDPROC
16420  ENDCASE
16430 WHEN &18E
16440  mine%=TRUE
16450  CASE pb%!4 OF
16460  WHEN 0,1,2,3
16470   SYS "Wimp_SetCaretPosition",w%(1,0),pb%!4+1,,,-1,LEN($FNiconad(1,pb%!4+1))
16480  WHEN 4
16490   SYS "Wimp_SetCaretPosition",w%(1,0),22,,,-1,LEN($sharpenad%)
16500  WHEN 22
16510   SYS "Wimp_SetCaretPosition",w%(1,0),30,,,-1,LEN$(blackad%)
16520  WHEN 30
16530   SYS "Wimp_SetCaretPosition",w%(1,0),31,,,-1,LEN$(gammaad%)
16540  WHEN 31
16550   SYS "Wimp_SetCaretPosition",w%(1,0),0,,,-1,LEN$(modead%)
16560  ENDCASE
16570 WHEN &18F
16580  mine%=TRUE
16590  CASE pb%!4 OF
16600  WHEN 0
16610   SYS "Wimp_SetCaretPosition",w%(1,0),31,,,-1,LEN($gammaad%)
16620  WHEN 1
16630   SYS "Wimp_SetCaretPosition",w%(1,0),0,,,-1,LEN$(modead%)
16640  WHEN 2,3,4
16650   SYS "Wimp_SetCaretPosition",w%(1,0),pb%!4-1,,,-1,LEN($FNiconad(1,pb%!4-1))
16660  WHEN 22
16670   SYS "Wimp_SetCaretPosition",w%(1,0),4,,,-1,LEN($FNiconad(1,4))
16680  WHEN 30
16690   SYS "Wimp_SetCaretPosition",w%(1,0),22,,,-1,LEN($sharpenad%)
16700  WHEN 31
16710   SYS "Wimp_SetCaretPosition",w%(1,0),30,,,-1,LEN($blackad%)
16720  ENDCASE
16730 ENDCASE
16740
16750WHEN w%(9,0)
16760 CASE pb%!24 OF
16770 WHEN &18E,&18F
16780  mine%=TRUE
16790  CASE pb%!4 OF
16800  WHEN 0
16810   SYS "Wimp_SetCaretPosition",w%(9,0),1,,,-1,LEN($mag2ad%)
16820  WHEN 1
16830   SYS "Wimp_SetCaretPosition",w%(9,0),0,,,-1,LEN($mag1ad%)
16840  ENDCASE
16850 WHEN 13
16860  mine%=TRUE
16870  CASE pb%!4 OF
16880  WHEN 0
16890   SYS "Wimp_SetCaretPosition",w%(9,0),1,,,-1,LEN($mag2ad%)
16900  WHEN 1
16910   SYS "Wimp_SetCaretPosition",w%(9,0),0,,,-1,LEN($mag1ad%)
16920  ENDCASE
16930 ENDCASE
16940 IF mine% PROCmagstring(0,0)
16950
16960WHEN w%(7,0)
16970 CASE pb%!24 OF
16980 WHEN 13
16990  mine%=TRUE
17000  PROCsavesprite
17010  SYS "Wimp_CreateMenu",,-1
17020 ENDCASE
17030
17040WHEN w%(8,0)
17050 CASE pb%!24 OF
17060 WHEN 13
17070  mine%=TRUE
17080  PROCsaveraw
17090  SYS "Wimp_CreateMenu",,-1
17100 ENDCASE
17110
17120WHEN w%(2,0)
17130 CASE pb%!24 OF
17140 WHEN 13
17150  mine%=TRUE
17160  CASE pb%!4 OF
17170  WHEN 3
17180   SYS "Wimp_SetCaretPosition",w%(2,0),8,,,-1,LEN($contad%)
17190   PROCchkbnds(brightad%)
17200   brightness%=VAL$brightad%
17210   PROCudpbar(-36,brightness%)
17220  WHEN 8
17230   SYS "Wimp_SetCaretPosition",w%(2,0),13,,,-1,LEN($satad%)
17240   PROCchkbnds(contad%)
17250   contrast%=VAL$contad%
17260   PROCudpbar(-80,contrast%)
17270  WHEN 13
17280   SYS "Wimp_CreateMenu",,-1
17290   PROCchkbnds(satad%)
17300   saturation%=VAL$satad%
17310  ENDCASE
17320 WHEN &18E
17330  mine%=TRUE
17340  CASE pb%!4 OF
17350  WHEN 3
17360   SYS "Wimp_SetCaretPosition",w%(2,0),8,,,-1,LEN($contad%)
17370   PROCchkbnds(brightad%)
17380   brightness%=VAL$brightad%
17390   PROCudpbar(-36,brightness%)
17400  WHEN 8
17410   SYS "Wimp_SetCaretPosition",w%(2,0),13,,,-1,LEN($satad%)
17420   PROCchkbnds(contad%)
17430   contrast%=VAL$contad%
17440   PROCudpbar(-80,contrast%)
17450  WHEN 13
17460   SYS "Wimp_SetCaretPosition",w%(2,0),3,,,-1,LEN($brightad%)
17470   PROCchkbnds(satad%)
17480   saturation%=VAL$satad%
17490   PROCudpbar(-124,saturation%)
17500  ENDCASE
17510 WHEN &18F
17520  mine%=TRUE
17530  CASE pb%!4 OF
17540  WHEN 3
17550   SYS "Wimp_SetCaretPosition",w%(2,0),13,,,-1,LEN($satad%)
17560   PROCchkbnds(brightad%)
17570   brightness%=VAL$brightad%
17580   PROCudpbar(-36,brightness%)
17590  WHEN 8
17600   SYS "Wimp_SetCaretPosition",w%(2,0),3,,,-1,LEN($brightad%)
17610   PROCchkbnds(contad%)
17620   contrast%=VAL$contad%
17630   PROCudpbar(-80,contrast%)
17640  WHEN 13
17650   SYS "Wimp_SetCaretPosition",w%(2,0),8,,,-1,LEN($contad%)
17660   PROCchkbnds(satad%)
17670   saturation%=VAL$satad%
17680   PROCudpbar(-124,saturation%)
17690  ENDCASE
17700 ENDCASE
17710
17720WHEN w%(17,0)
17730 CASE pb%!24 OF
17740 WHEN 13
17750  mine%=TRUE
17760  speed%=VAL$speedad%
17770  PROCspeed
17780  SYS "Wimp_CreateMenu",,-1
17790 ENDCASE
17800 OTHERWISE
17810  SYS "Wimp_ProcessKey",pb%!24
17820ENDCASE
17830
17840IF NOT mine% SYS "Wimp_ProcessKey",pb%!24
17850
17860ENDPROC
17870
17880DEF PROCmessage
17890CASE pb%!16 OF
17900WHEN 0
17910 PROCshutdown(0)
17920WHEN 1
17930 PROCdatasave
17940WHEN 2
17950 PROCdatasaveack
17960WHEN 3
17970 PROCfilecoming
17980WHEN 8
17990 pb%!12=pb%!8
18000 SYS "Wimp_SendMessage",19,pb%
18010 quitting%=TRUE
18020 quithand%=pb%!4
18030 PROCshutdown(-1)
18040WHEN 9
18050 PROCmodechanged
18060 PROCupdatesprite
18070WHEN &502
18080 PROCsendhelp
18090WHEN &400C0
18100 PROCmenuwarning
18110WHEN &400C1
18120 PROCmodechanged
18130ENDCASE
18140ENDPROC
18150
18160DEF PROCfilecoming
18170IF pb%!20=-2 THEN
18180 IF pb%!40<>&FFD ERROR 42,"FastGrab can only process files of type Data"
18190 lh%=OPENIN(FNzt(pb%+44)+CHR$13)
18200 IF lh%=0 ERROR 214,"File not found"
18210 IF FNgetword(lh%)<>&6372654D CLOSE#lh%:ERROR 42,"Fastgrab can only process video image files from the Hawk V9 and Hawk V9 Mk II"
18220 CASE FNgetword(lh%) OF
18230 WHEN &74666F53
18240  in_file_bits%=12
18250 WHEN &31666F53
18260  in_file_bits%=16
18270 OTHERWISE
18280  CLOSE#lh%
18290  ERROR 42,"FastGrab can only process video image files from the Hawk V9 and Hawk V9 Mk II"
18300 ENDCASE
18310 SYS "Wimp_SendMessage",19,pb%,pb%!4
18320 SYS "Wimp_SlotSize",originalslot%,-1
18330 nextlocation%=HIMEM
18340 spritesize%=0
18350 inx%=FNgetword(lh%)
18360 gpx%=inx%
18370 iny%=FNgetword(lh%)
18380 gpy%=iny%
18390 CASE in_file_bits% OF
18400 WHEN 12
18410 rawsize%=inx%*iny%*3/2+20
18420 $grabwtitlead%=$(pb%+44)+" 12 bit"
18430 WHEN 16
18440 rawsize%=inx%*iny%*2+20
18450 $grabwtitlead%=$(pb%+44)+" 16 bit"
18460 ENDCASE
18470 PROCupdatetitle
18480 grab12%=TRUE
18490 grabex%=TRUE
18500 PROCgrabmemory(20,0)
18510 SYS "OS_GBPB",3,lh%,rawarea%,rawsize%,0
18520 CLOSE#lh%
18530 IF scrappy% THEN
18540  scrappy%=FALSE
18550  *Remove <Wimp$Scrap>
18560 ENDIF
18570 PROCsetupraw(rawsize%,rawarea%!8,rawarea%!12,rawarea%?17,rawarea%?18,rawarea%?19)
18580 done%=FNChangeFSI("ChangeFSI null null 15 1:1",-1,-1,grabarea%,0,0,ram%,0,rawarea%)
18590 cfsid%=TRUE
18600 grabarea%=ram%
18610 sprex%=TRUE
18620 saved8%=TRUE
18630 saved12%=TRUE
18640 PROCsetupsprite
18650 IF NOT w%(5,2) THEN
18660  PROCcwin(5)
18670  !grabwb=w%(5,0)
18680 ENDIF
18690 IF NOT w%(6,2) PROCcwin(6)
18700 grabwb!4=grabarea%
18710 grabwb!8=grabarea%+16
18720 SYS "OS_SpriteOp",&228,grabarea%,grabarea%+16 TO ,,,grabwx%,grabwy%,spmask%,spmd%
18730 SYS "OS_ReadModeVariable",-1,4 TO ,,xshift%
18740 SYS "OS_ReadModeVariable",-1,5 TO ,,yshift%
18750 grabwx%=grabwx%<<xshift%
18760 grabwy%=grabwy%<<yshift%
18770 PROCadjustgrab
18780 PROCmagstring(0,0)
18790ENDIF
18800ENDPROC
18810
18820DEF PROCdatasave
18830IF pb%!20=-2 AND pb%!24=iconbar% THEN
18840 !pb%=60
18850 pb%!12=pb%!8
18860 pb%!16=2
18870 pb%!36=-1
18880 $(pb%+44)="<Wimp$Scrap>"
18890 pb%?56=0
18900 SYS "Wimp_SendMessage",17,pb%,pb%!4
18910 scrappy%=TRUE
18920ENDIF
18930ENDPROC
18940
18950DEF PROCgocfsi
18960LOCAL fsi$
18970IF $modead%="" mode$="15"
18980mode$=$modead%
18990CASE VAL(mode$) OF
19000WHEN 2,4,5,10
19010 mode$="15"
19020OTHERWISE
19030 SYS "OS_ReadModeVariable",VALmode$,0 TO ,,modeflags%;armflags%
19040 IF (armflags% AND 1<<29) THEN
19050  mode$="15 "
19060 ELSE
19070  IF (modeflags% AND 1) mode$="15"
19080  SYS "OS_ReadModeVariable",VALmode$,3 TO ,,ncolour%
19090  IF ncolour%<15 AND outmode$="T" outmode$=" "
19100 ENDIF
19110ENDCASE
19120$modead%=mode$
19130IF VAL$x1ad%<1 $x1ad%="1"
19140IF VAL$x2ad%<1 $x2ad%="1"
19150IF VAL$y1ad%<1 $y1ad%="1"
19160IF VAL$y2ad%<1 $y2ad%="1"
19170IF FNselected(5) THEN
19180 scale$=" = "
19190ELSE
19200 scale$=" "+$x1ad%+":"+$x2ad%+" "+$y1ad%+":"+$y2ad%
19210ENDIF
19220option$=" "
19230IF FNselected(11) option$+="-range "
19240IF FNselected(12) option$+="-equal "
19250IF FNselected(14) option$+="-invert "
19260IF FNselected(15) option$+="-sharpen"+$(sharpenad%)
19270IF FNselected(23) option$+="-hflip "
19280IF FNselected(24) option$+="-vflip "
19290IF FNselected(16) option$+="-noscale "
19300IF FNselected(26) option$+="-nodither "
19310IF FNselected(27) option$+="-brighten "
19320IF FNselected(28) option$+="-black"+$(blackad%)
19330IF $gammaad%="" $gammad%="2.2"
19340IF FNselected(29) option$+="-gamma"+$(gammaad%)
19350fsi$="ChangeFSI null Piccy1 "+mode$+outmode$+scale$+option$
19360IF FNselected(13) SYS "Wimp_SetMode",0
19370SYS "Wimp_SlotSize",precfsislot%,-1
19380IF board_is_16_bit% THEN in_file_bits%=16 ELSE in_file_bits%=12
19390done%=FNChangeFSI(fsi$,-1,-1,grabarea%,0,0,ram%,0,rawarea%)
19400cfsid%=TRUE
19410grabarea%=ram%
19420IF done%=100 ERROR 42,"Histogram equalization of image not possible"
19430sprex%=TRUE
19440saved8%=FALSE
19450$grabwtitlead%="<untitled> * CFSI"
19460IF MODE=oldmode% THEN
19470PROCmodechanged
19480PROCupdatetitle
19490ELSE
19500SYS "Wimp_SetMode",oldmode%
19510ENDIF
19520PROCsetupsprite
19530grabwb!4=grabarea%
19540grabwb!8=grabarea%+16
19550SYS "OS_SpriteOp",&228,grabarea%,grabarea%+16 TO ,,,grabwx%,grabwy%,spmask%,spmd%
19560SYS "OS_ReadModeVariable",-1,4 TO ,,xshift%
19570SYS "OS_ReadModeVariable",-1,5 TO ,,yshift%
19580grabwx%=grabwx%<<xshift%
19590grabwy%=grabwy%<<yshift%
19600PROCadjustgrab
19610PROCmagstring(0,0)
19620ENDPROC
19630
19640DEF PROCsetupsprite
19650LOCAL sx%,sy%,spmd%
19660SYS "OS_SpriteOp",&228,grabarea%,grabarea%+16 TO ,,,sx%,sy%,spmask%,spmd%
19670$grabnamead%=oname$
19680$grabmodead%=STR$spmd%
19690CASE spmask% OF
19700WHEN 0:$grabmaskad%="No"
19710WHEN 1:$grabmaskad%="Yes"
19720ENDCASE
19730$grabwidtad%=STR$sx%
19740sptr%=grabarea%+16
19750IF sptr%!32=44 THEN
19760$grabpalad%="No"
19770ELSE
19780$grabpalad%="Yes"
19790ENDIF
19800$grabbytead%=STR$(!sptr%)
19810$grabheigad%=STR$sy%
19820ENDPROC
19830DEF PROCsetupraw(size%,xsize%,ysize%,b%,c%,s%)
19840$rawbytesad%=STR$size%
19850$rawwidthad%=STR$xsize% :
19860$rawheightad%=STR$ysize%
19870$rawbrightad%=STR$b%
19880$rawcontad%=STR$c%
19890$rawsatad%=STR$s%
19900ENDPROC
19910
19920DEF FNselected(icon%)
19930IF w%(1,2) THEN
19940!mb%=w%(1,0)
19950mb%!4=icon%
19960SYS "Wimp_GetIconState",,mb%
19970IF mb%!24 AND 1<<21 THEN =1 ELSE =0
19980ELSE
19990IF !(w%(1,1)+108+(32*icon%)) AND (1<<21) THEN
20000=1
20010ELSE
20020=0
20030ENDIF
20040ENDIF
20050
20060DEF PROCiconset(window%,icon%,clear%,eor%)
20070IF w%(window%,2) THEN
20080!mb%=w%(window%,0)
20090mb%!4=icon%
20100mb%!8=eor%
20110mb%!12=clear%
20120SYS "Wimp_SetIconState",,mb%
20130ELSE
20140w%(window%,1)!(108+32*icon%)=(w%(window%,1)!(108+32*icon%) AND NOT clear%) EOR eor%
20150ENDIF
20160ENDPROC
20170
20180DEF PROCadjustlive
20190PROCcalclive
20200!mb%=w%(3,0)
20210SYS "Wimp_GetWindowState",,mb%
20220mb%!8=mb%!16-livey%
20230mb%!12=mb%!4+livex%
20240IF mb%!4<0 mb%!4=0
20250IF mb%!8>rightscr% mb%!8=rightscr%
20260SYS "Wimp_OpenWindow",,mb%
20270IF ltool$=">" THEN
20280!mb%=w%(4,0)
20290mb%!12=mb%!4-4
20300mb%!4-=88
20310SYS "Wimp_OpenWindow",,mb%
20320ENDIF
20330ENDPROC
20340
20350DEF PROCcalclive
20360lpx%=512/(2^livesize%)
20370!livepagestep=8*(2^livesize%)
20380!livepixelstep=2^(livesize%+2)
20390lpy%=lpx%/2
20400livearea%!12=lpx%*lpy%+60
20410livearea%!16=livearea%!12-16
20420livearea%!32=(lpx%/4)-1
20430livearea%!36=lpy%-1
20440SYS "OS_ReadModeVariable",15,4 TO ,,xshift%
20450SYS "OS_ReadModeVariable",15,5 TO ,,yshift%
20460livex%=lpx%<<xshift%
20470livey%=lpy%<<yshift%
20480!livewb=w%(3,0)
20490livewb!4=livearea%
20500livewb!8=livearea%+16
20510livewb!12=0
20520livewb!16=-livey%
20530!livexsize=livex%
20540!liveysize=-livey%
20550!mb%=0
20560mb%!4=-livey%
20570mb%!8=livex%
20580mb%!12=0
20590SYS "Wimp_SetExtent",w%(3,0),mb%
20600w%(3,1)!44=0
20610w%(3,1)!48=-livey%
20620w%(3,1)!52=livex%
20630w%(3,1)!56=0
20640ENDPROC
20650
20660DEF PROCadjustgrab
20670LOCAL sheight%,swidth%,smode%,sch%,scw%
20680SYS "OS_SpriteOp",&228,grabarea%,grabarea%+16 TO ,,,swidth%,sheight%,,smode%
20690SYS "OS_ReadModeVariable",smode%,4 TO ,,xshift%
20700SYS "OS_ReadModeVariable",smode%,5 TO ,,yshift%
20710scw%=(swidth%<<xshift%)*VAL($mag1ad%)/VAL($mag2ad%)
20720sch%=(sheight%<<yshift%)*VAL($mag1ad%)/VAL($mag2ad%)
20730scw%=(scw% DIV 4)*4
20740sch%=(sch% DIV 4)*4
20750grabwb!12=0
20760grabwb!16=-sch%
20770IF scw%<=108 OR sch%<=108 THEN
20780 IF w%(5,1)?39=&FF THEN
20790  PROCdwin(5)
20800  w%(5,1)?39=0
20810  PROCcwin(5)
20820  SYS "Wimp_OpenWindow",,w%(5,1)
20830 ENDIF
20840SYS "Wimp_ForceRedraw",w%(5,0),0,-256,128,0
20850ELSE
20860 IF w%(5,1)?39=0 THEN
20870  PROCdwin(5)
20880  w%(5,1)?39=&FF
20890  PROCcwin(5)
20900  SYS "Wimp_OpenWindow",,w%(5,1)
20910 ENDIF
20920ENDIF
20930IF w%(5,2) THEN
20940 !mb%=0
20950 mb%!4=-sch%
20960 mb%!8=scw%
20970 mb%!12=0
20980 SYS "Wimp_SetExtent",w%(5,0),mb%
20990ELSE
21000 w%(5,1)!44=!mb%
21010 w%(5,1)!48=mb%!4
21020 w%(5,1)!52=mb%!8
21030 w%(5,1)!56=mb%!12
21040ENDIF
21050SYS "Wimp_GetWindowState",,w%(5,1)
21060SYS "Wimp_ForceRedraw",w%(5,0),0,-sch%,scw%,0
21070w%(5,1)!8=w%(5,1)!16-sch%
21080w%(5,1)!12=w%(5,1)!4+scw%
21090SYS "Wimp_OpenWindow",,w%(5,1)
21100IF gtool$=">" THEN
21110 !mb%=w%(6,0)
21120 mb%!4=w%(5,1)!4-88
21130 mb%!8=w%(5,1)!8
21140 mb%!12=w%(5,1)!4-4
21150 mb%!16=w%(5,1)!16
21160 mb%!28=w%(5,1)!28
21170 SYS "Wimp_OpenWindow",,mb%
21180ENDIF
21190PROCpalette_for_sprite(grabarea%,grabarea%+16,grabpal%)
21200ENDPROC
21210
21220DEF PROCmagstring(one%,two%)
21230SYS "Wimp_ReadPixTrans",&200,grabarea%,grabarea%+16,,,,magt%+16,mb%
21240IF one%<>0 $mag1ad%=STR$(VAL($mag1ad%)+one%)
21250IF two%<>0 $mag2ad%=STR$(VAL($mag2ad%)+two%)
21260IF VAL($mag1ad%)<1 $mag1ad%="1":ENDPROC
21270IF VAL($mag1ad%)>999 $mag1ad%="999":ENDPROC
21280IF VAL($mag2ad%)<1 $mag2ad%="1":ENDPROC
21290IF VAL($mag2ad%)>999 $mag2ad%="999":ENDPROC
21300IF w%(9,2) SYS "Wimp_ForceRedraw",w%(9,0),72,0,200,290
21310!magt%=magt%!16*VAL($mag1ad%)
21320magt%!4=magt%!20*VAL($mag1ad%)
21330magt%!8=magt%!24*VAL($mag2ad%)
21340magt%!12=magt%!28*VAL($mag2ad%)
21350PROCadjustgrab
21360ENDPROC
21370DEF PROCgrab
21380PROCdeletegrabbed
21390saved12%=FALSE
21400saved8%=FALSE
21410$grabwtitlead%="<untitled> * 8 bit"
21420PROCupdatetitle
21430gpx%=512/(2^grabsize%)
21440!pagestep=8*(2^grabsize%)
21450!pixelstep=2^(grabsize%+2)
21460gpy%=gpx%/2
21470spritesize%=gpx%*gpy%+56
21480IF board_is_16_bit% rawsize%=262164 ELSE rawsize%=199628
21490nextlocation%=HIMEM
21500SYS "OS_ReadModeVariable",VAL($modeb%),4 TO ,,xshift%
21510SYS "OS_ReadModeVariable",VAL($modeb%),5 TO ,,yshift%
21520grabwx%=gpx%<<xshift%
21530grabwy%=gpy%<<yshift%
21540IF NOT w%(5,2) THEN
21550 PROCcwin(5)
21560 !grabwb=w%(5,0)
21570ENDIF
21580IF NOT w%(6,2) PROCcwin(6)
21590IF mono$=">" THEN
21600 PROCgrabmemory(8,-1)
21610 grabwb!4=grabarea%
21620 grabwb!8=grabarea%+16
21630 PROCreadV98
21640 grab12%=FALSE
21650 PROCiconset(6,0,1<<22,1<<22)
21660 PROCiconset(6,3,1<<22,1<<22)
21670ELSE
21680 IF bit%=12 THEN
21690  PROCgrabmemory(20,-1)
21700  PROCreadV912
21710  CALLset_8bit
21720  !grabarea%=spritesize%
21730  grabarea%!4=1
21740  grabarea%!8=16
21750  grabarea%!12=spritesize%
21760  grabwb!4=grabarea%
21770  grabwb!8=grabarea%+16
21780  PROCreadV98
21790  grab12%=TRUE
21800  PROCiconset(6,0,1<<22,0)
21810  PROCiconset(6,3,1<<22,0)
21820  PROCsetupraw(rawsize%,gpx%,gpy%,brightness%,contrast%,saturation%)
21830 ELSE
21840  PROCgrabmemory(8,-1)
21850  grabwb!4=grabarea%
21860  grabwb!8=grabarea%+16
21870  PROCreadV98
21880  grab12%=FALSE
21890  PROCiconset(6,0,1<<22,1<<22)
21900  PROCiconset(6,3,1<<22,1<<22)
21910 ENDIF
21920ENDIF
21930LOCAL ERROR
21940ON ERROR ON ERROR OFF:$modeb%="15":grabarea%!56=15
21950SYS "Wimp_ReadPixTrans",&200,grabwb!4,grabwb!8,,,,magt%,mb%
21960RESTORE ERROR
21970PROCiconset(4,1,1<<22,0)
21980$grabnamead%="grabbed"
21990$grabmodead%=$modeb%
22000$grabmaskad%="No"
22010$grabwidtad%=STR$gpx%
22020IF mono$<>">" THEN $grabpalad%="No" ELSE $grabpalad%="Yes"
22030SYS "OS_SpriteOp",&218,grabarea%,grabarea%+16 TO ,,sptr%
22040$grabbytead%=STR$(!sptr%)
22050$grabheigad%=STR$gpy%
22060$grabwidtad%=STR$gpx%
22070grabwb!20=magt%
22080grabex%=TRUE
22090grabch%=TRUE
22100grabch%=FALSE
22110PROCadjustgrab
22120PROCmagstring(0,0)
22130ENDPROC
22140
22150DEF PROCgrabmemory(arg%,arg1%)
22160SYS "Wimp_SlotSize",-1,-1 TO currentslot%,,freeslot%
22170IF freeslot%<=spritesize% ERROR 42,"Cannot claim enough memory to grab image"
22180CASE arg% OF
22190WHEN 8
22200 SYS "Wimp_SlotSize",currentslot%+spritesize%,-1
22210 grabarea%=nextlocation%
22220 nextlocation%+=spritesize%
22230 !grabarea%=spritesize%
22240 grabarea%!4=1
22250 grabarea%!8=16
22260 grabarea%!12=spritesize%
22270 grabwb!4=grabarea%
22280 grabwb!8=grabarea%+16
22290WHEN 20
22300 IF freeslot%<=spritesize%+rawsize% OR cache$=">" AND arg1% THEN
22310  SYS "Wimp_SlotSize",currentslot%+spritesize%,-1
22320  precfsislot%=currentslot%
22330  grabarea%=nextlocation%
22340  nextlocation%+=spritesize%
22350  slave%=TRUE
22360  twelvehandle%=OPENOUT("<FastGrab$Dir>.Resources.TwelveBit")
22370  PROCputword(twelvehandle%,&6372654D)
22380  PROCputword(twelvehandle%,&74666F53)
22390  PROCputword(twelvehandle%,512)
22400  PROCputword(twelvehandle%,256)
22410  BPUT#twelvehandle%,0
22420  rawarea%=0
22430 ELSE
22440  slave%=FALSE
22450  SYS "Wimp_SlotSize",currentslot%+rawsize%+spritesize%,-1
22460  precfsislot%=currentslot%+rawsize%
22470  rawarea%=nextlocation%
22480  grabarea%=nextlocation%+rawsize%
22490  nextlocation%+=rawsize%+spritesize%
22500 ENDIF
22510ENDCASE
22520ENDPROC
22530
22540DEF PROCreadV98
22550grabarea%!16=spritesize%+44
22560$(grabarea%+20)="grabbed"+CHR$0+CHR$0+CHR$0+CHR$0+CHR$0
22570grabarea%!32=(gpx%/4)-1
22580grabarea%!36=gpy%-1
22590grabarea%!40=&00
22600grabarea%!44=&1F
22610grabarea%!48=&2C
22620grabarea%!52=&2C
22630grabarea%!56=VAL($modeb%)
22640IF mono$=">" THEN
22650 PROCadd_palette_to_sprite(grabarea%,grabarea%+16,grabpal%)
22660 F%=grabarea%+60+2048
22670 CALL VRAM_Grab
22680ELSE
22690 F%=grabarea%+60
22700 CALL set_8bit
22710 CALL VRAM_Grab
22720ENDIF
22730PROCmodechanged
22740ENDPROC
22750
22760DEF PROCreadV912
22770SYS &406C0
22780
22790IF board_is_16_bit% THEN
22800 CALL Refresh_Frame
22810 SYS "WVCGrab_LCA",2
22820 CALL Refresh_Frame
22830ENDIF
22840
22850CALL set_12bit
22860
22870IF slave% THEN
22880 SYS "WVCGrab_Refresh",1
22890 BPUT#twelvehandle%,brightness%
22900 BPUT#twelvehandle%,contrast%
22910 BPUT#twelvehandle%,saturation%
22920 A%=mb%
22930 FOR B%=0 TO 255
22940  IF board_is_16_bit% THEN
22950   CALL read16bit
22960   SYS "OS_GBPB",2,twelvehandle%,mb%,1024
22970  ELSE
22980   CALL packline
22990   SYS "OS_GBPB",2,twelvehandle%,mb%,768
23000  ENDIF
23010  SYS &406C4,(B%/255)*100
23020 NEXT
23030 CLOSE#twelvehandle%
23040 SYS "WVCGrab_Refresh",0
23050ELSE
23060 FOR B%=0 TO 255
23070  SYS &406C4,(B%/255)*100
23080  IF board_is_16_bit% THEN
23090   A%=rawarea%+20+(B%*1024)
23100   CALL read16bit
23110  ELSE
23120   A%=rawarea%+20+(B%*768)
23130   CALL packline
23140  ENDIF
23150 NEXT
23160ENDIF
23170
23180PROCchange_LCA(dithered%)
23190
23200SYS &406C1
23210IF rawarea% THEN
23220 !rawarea%=&6372654D  : REM "Merc"
23230 IF board_is_16_bit% THEN
23240  rawarea%!4=&31666F53 : REM "Sof1"
23250 ELSE
23260  rawarea%!4=&74666F53 : REM "Soft"
23270 ENDIF
23280 rawarea%!8=gpx%
23290 rawarea%!12=gpy%
23300 rawarea%?16=0
23310 rawarea%?17=brightness%
23320 rawarea%?18=contrast%
23330 rawarea%?19=saturation%
23340ENDIF
23350
23360CALL set_8bit
23370
23380ENDPROC
23390
23400DEF PROCshowgrab
23410IF NOT w%(5,2) PROCcwin(5):!grabwb=w%(5,0)
23420IF NOT w%(6,2) AND gtool$=">" PROCcwin(6)
23430!mb%=w%(5,0)
23440IF NOT grabch% THEN
23450 SYS "Wimp_GetWindowState",,mb%
23460 mb%!28=-1
23470 SYS "Wimp_OpenWindow",,mb%
23480ELSE
23490 mb%!4=rightscr%/2-grabwx%/2
23500 mb%!8=topscr%/2-grabwy%/2
23510 mb%!12=rightscr%/2+grabwx%/2
23520 mb%!16=topscr%/2+grabwy%/2
23530 IF mb%!8<0 mb%!8=84
23540 mb%!20=0
23550 mb%!24=0
23560 mb%!28=-1
23570 SYS "Wimp_OpenWindow",,mb%
23580 SYS "Wimp_ForceRedraw",w%(5,0),0,-grabwy%,grabwx%,0
23590ENDIF
23600IF gtool$=">" THEN
23610 !mb%=w%(6,0)
23620 mb%!4-=88
23630 mb%!12=mb%!4+84
23640 SYS "Wimp_OpenWindow",,mb%
23650ENDIF
23660ENDPROC
23670
23680DEF PROCdeletegrabbed
23690IF NOT grabex% ENDPROC
23700saved8%=TRUE
23710saved12%=TRUE
23720cfsid%=FALSE
23730PROCdwin(5)
23740!grabwb=0
23750PROCdwin(6)
23760SYS "Wimp_SlotSize",originalslot%,-1
23770grabex%=FALSE
23780PROCiconset(4,1,1<<22,1<<22)
23790IF slave% THEN
23800 $mb%="<FastGrab$Dir>.Resources.TwelveBit"
23810 SYS "OS_FSControl",27,mb%,,0
23820 slave%=FALSE
23830ENDIF
23840ENDPROC
23850
23860DEF PROCpalette_for_sprite(sprite_area%,sprite_ad%,pal_ad%)
23870LOCAL paltemp%
23880DIM paltemp% 2048
23890
23900SYS "OS_SpriteOp",&228,sprite_area%,sprite_ad% TO ,,,sprite_x%,sprite_y%,sprite_mask%,sprite_mode%
23910
23920CASE sprite_ad%!32 OF
23930WHEN 44
23940 REM Use default palette for the screen mode
23950 SYS "ColourTrans_SelectTable",sprite_mode%,0,-1,-1,pal_ad%
23960WHEN 2048+44
23970 REM Use 256 grey level palette
23980 FOR grab%=0 TO 2048-8 STEP 8
23990  paltemp%!(grab%>>1)=sprite_ad%!(grab%+44)
24000 NEXT
24010 FOR Q%=0 TO 255
24020  SYS "ColourTrans_ReturnColourNumber",paltemp%!(Q%<<2) TO pal_ad%?Q%
24030 NEXT
24040OTHERWISE
24050 REM Use the sprite's palette
24060 FOR grab%=0 TO 164 STEP 8
24070  paltemp%!(grab%/2)=sprite_ad%!(grab%+44)
24080 NEXT
24090 SYS "ColourTrans_SelectTable",sprite_mode%,paltemp%,-1,-1,pal_ad%
24100ENDCASE
24110ENDPROC
24120
24130DEF PROCoptimise_liveplot
24140liveplot%=-1
24150FOR Q%=0 TO 255
24160 IF livepal%?Q%<>Q% liveplot%=livepal%
24170NEXT
24180livewb!24=liveplot%
24190!colmap=liveplot%
24200ENDPROC
24210
24220DEF PROCmodechanged
24230LOCAL xshift%,yshift%,sptr%,spmd%,grab%,palptr%
24240oldmode%=MODE
24250SYS "OS_ReadModeVariable",-1,4 TO ,,xshift%
24260SYS "OS_ReadModeVariable",-1,5 TO ,,yshift%
24270SYS "OS_ReadModeVariable",-1,11 TO ,,rightscr%
24280SYS "OS_ReadModeVariable",-1,12 TO ,,topscr%
24290rightscr%=rightscr%<<xshift%
24300topscr%=topscr%<<yshift%
24310SYS "Wimp_ReadPixTrans",&200,livearea%,livearea%+16,,,,livemag,mb%
24320IF w%(5,2) THEN
24330  PROCpalette_for_sprite(grabarea%,grabarea%+16,grabpal%)
24340 !mb%=w%(5,0)
24350 SYS "Wimp_GetWindowState",,mb%
24360 IF mb%!32 AND 1<<16 THEN
24370  grabwx%=gpx%<<xshift%
24380  grabwy%=gpy%<<yshift%
24390  PROCmagstring(0,0)
24400 ENDIF
24410ENDIF
24420PROCpalette_for_sprite(livearea%,livearea%+16,livepal%)
24430PROCoptimise_liveplot
24440ENDPROC
24450
24460DEF PROCupdatesprite
24470IF w%(3,2) THEN
24480 !mb%=w%(3,0)
24490 SYS "Wimp_UpdateWindow",,mb% TO more%
24500 x0%=mb%!4-mb%!20
24510 y0%=mb%!16-mb%!24
24520 WHILE more%
24530  SYS "OS_SpriteOp",&134,livearea%,livename$,x0%,y0%-livey%,8,0,livepal%
24540  SYS "Wimp_GetRectangle",,mb% TO more%
24550 ENDWHILE
24560ENDIF
24570ENDPROC
24580
24590DEF PROCsendhelp
24600h$="This window belongs to FastGrab."+CHR$0
24610CASE pb%!32 OF
24620WHEN -2
24630h$="This is the FastGrab icon.|MClick SELECT to see the live output from the Hawk V9 Colour digitiser.|MDrag a twelve bit image file onto it to process the image and display it.|M"
24640IF w%(3,2) THEN
24650IF !signalpresent h$+="The live display is working." ELSE h$+="There is no video signal at present."
24660ELSE
24670h$+="The live display is now dormant."
24680ENDIF
24690WHEN w%(2,0)
24700CASE pb%!36 OF
24710WHEN 4:h$="This slider bar controls the brightness of the picture from the Hawk V9."
24720WHEN 9:h$="This slider bar controls the contrast of the picture from the Hawk V9."
24730WHEN 14:h$="This slider bar controls the saturation of the picture from the Hawk V9."
24740WHEN 1,2,6,7,11,12
24750CASE pb%!36 OF
24760WHEN 1:bar$="brightness":act$="increase"
24770WHEN 2:bar$="brightness":act$="decrease"
24780WHEN 6:bar$="contrast":act$="increase"
24790WHEN 7:bar$="contrast":act$="decrease"
24800WHEN 11:bar$="saturation":act$="increase"
24810WHEN 12:bar$="saturation":act$="decrease"
24820ENDCASE
24830h$="Click on this icon to "+act$+" the "+bar$+" of the picture from the Hawk V9.|MClicking on it with adjust will have the opposite effect."
24840WHEN 0:h$="Click on this icon to reset the PAL decoder to its default settings."
24850WHEN 16:h$="Click on this icon to reset the PAL decoder to the settings saved on disc."
24860OTHERWISE h$="This window controls the PAL decoder, which adjusts the video image received from the Hawk V9 board."
24870ENDCASE
24880WHEN w%(3,0)
24890h$="This window shows the live display from the Hawk V9 Colour Digitiser."
24900IF !signalpresent=0 h$+="|MAt the moment there is no video signal, so the image is static."
24910WHEN w%(4,0)
24920CASE pb%!36 OF
24930WHEN 0:h$="Click on the camera icon to grab a frame from the Hawk V9 Colour Digitiser."
24940WHEN 1:h$="Click on the eye-con to view the stored frame."
24950WHEN 2:h$="Click on this icon to adjust the PAL decoder."
24960WHEN 3
24970 IF board_is_16_bit% THEN
24980  h$="Click on this icon to toggle between storing both 16 bit data and 8 bit data or just eight bit data."
24990 ELSE
25000  h$="Click on this icon to toggle between storing both 12 bit data and 8 bit data or just eight bit data."
25010 ENDIF
25020WHEN 4:h$="Click on this icon to toggle between dithered and non-dithered images."
25030ENDCASE
25040WHEN w%(5,0)
25050h$="This window shows a frame which has been captured by the Hawk V9 Colour Digitiser."
25060WHEN w%(6,0)
25070CASE pb%!36 OF
25080WHEN 0:h$="Click on this icon to process the image using the ChangeFSI routine.|MChangeFSI is included by courtesy of its author, Roger Wilson of Acorn Computers Limited."
25090WHEN 1:h$="Click on this icon to adjust the scale factors for the image.|MThis shows what will happen if SpriteExtend is used for scaling.|MThe ChangeFSI routine produces much better scaling, but it is a little slower."
25100WHEN 2:h$="Click on this icon to save the image as a Sprite file."
25110WHEN 3
25120 IF board_is_16_bit% THEN
25130  h$="Click on this icon to save the image as a Data file, in 16-bit video format."
25140 ELSE
25150  h$="Click on this icon to save the image as a Data file, in 12-bit video format."
25160 ENDIF
25170ENDCASE
25180WHEN w%(9,0)
25190CASE pb%!36 OF
25200WHEN -1:h$="This is the Zoom window.|MIt allows you to adjust the size of the display using the SpriteExtend scaling routines.|MUsing ChangeFSI gives better results but it is a little slower."
25210WHEN 0:h$="This number is the scaling multiplier.|MYou can either type a number in, or use the arrow icons to adjust it.|M"
25220WHEN 1:h$="This number is the scaling divisor.|MYou can either type a number in, or use the arrow icons to adjust it."
25230WHEN 2:h$="Click on this icon to increase the scaling multiplier.|MAdjust-click on it the decrease the value."
25240WHEN 3:h$="Click on this icon to decrease the scaling multiplier.|MAdjust-click on it to increase the value."
25250WHEN 4:h$="Click on this icon to increase the scaling divisor.|MAdjust-click on it to decrease the value."
25260WHEN 5:h$="Click on this icon to decrease the scaling divisor.|MAdjust-click on it to increase the value."
25270ENDCASE
25280WHEN w%(10,0)
25290h$="This window displays information about the current sprite image.|MIt may have less than eight bits per pixel if it has been processed using ChangeFSI."
25300CASE pb%!36 OF
25310WHEN 0:h$="This is the name of the sprite."
25320WHEN 1:h$="This is the screen mode in which the sprite was produced."
25330WHEN 2:h$="This tells you whether or not the sprite has a transparency mask."
25340WHEN 3:h$="This is the width of the sprite, in pixels."
25350WHEN 4:h$="This is the size of the sprite, in bytes."
25360WHEN 5:h$="This tells you whether or not the sprite has its own palette."
25370WHEN 6:h$="This is the height of the sprite, in pixels."
25380ENDCASE
25390WHEN w%(11,0)
25400h$="This window displays information about the twelve bit 'raw' data."
25410CASE pb%!36 OF
25420WHEN 1:h$="This is the size of the data, in bytes."
25430WHEN 3:h$="This is the width of the image, in pixels."
25440WHEN 5:h$="This is the height of the image, in pixels."
25450WHEN 9:h$="The image was grabbed at the brightness setting shown."
25460WHEN 10:h$="The image was grabbed at the saturation setting shown."
25470WHEN 11:h$="The image was grabbed at the contrast setting shown."
25480ENDCASE
25490WHEN w%(13,0)
25500h$="This window contains information on FastGrab's development."
25510CASE pb%!36 OF
25520WHEN 1,2:h$="FastGrab is a real time video grabbing system for use with RISC OS computers. It is designed to work with the Wild Vision Hawk V9 Real Time Colour Digitiser."
25530WHEN 3,4:h$="All original FastGrab code is by Robert W Hamilton @ Mercenary Software."
25540WHEN 5:h$="This is the Wild Vision logo."
25550WHEN 6:h$="FastGrab was written for Wild Vision."
25560WHEN 7
25570ds%=INSTR(version$,"(")
25580de%=INSTR(version$,")")
25590h$="This is "+LEFT$(version$,ds%-2)+" of FastGrab and it was last updated on "+MID$(version$,ds%+1,de%-ds%-1)+"."
25600ENDCASE
25610WHEN w%(14,0)
25620h$="This window gives some development information on the ChangeFSI program."
25630CASE pb%!36 OF
25640WHEN 1:h$="ChangeFSI takes its name from R W Floyd and L Steinberg, whose 'error diffusion' technique is used to improve output.|MThe 'I' is for integer, as the program uses this form of arithmetic."
25650WHEN 2:h$="Mercenary Software and Wild Vision would like to thank Roger Wilson, of Acorn Computers Limited, for his permission to use ChangeFSI in FastGrab."
25660ENDCASE
25670WHEN w%(1,0)
25680CASE pb%!36 OF
25690WHEN -1:h$="This parameters in this window are those used by the ChangeFSI image processing routine."
25700WHEN 0:h$="Enter the output mode to be used here. It should be a graphics mode - note that modes 2,4,5 and 10 are not supported. If you attempt to use an invalid mode, mode 15 will be used instead."
25710WHEN 1,2,3,4
25720CASE pb%!36 OF
25730WHEN 1:h$="This is the x output ratio."
25740WHEN 2:h$="This is the x input ratio."
25750WHEN 3:h$="This is the y output ratio."
25760WHEN 4:h$="This is the y input ratio."
25770ENDCASE
25780h$+="|MSet the scaling ratios as you do in Paint and Draw."
25790WHEN 5:h$="Select this icon to scale the output to fit the output mode."
25800WHEN 6:h$="Select this icon to use the scale ratios in the boxes."
25810WHEN 7:h$="Select this icon for standard output."
25820WHEN 8:h$="Select this icon for 2 or 4 bit colour, or for clustered dithering in one bit per pixel modes."
25830WHEN 9:h$="Select this icon for digital RGB output."
25840WHEN 10:h$="Select this icon for no tinting in 256 colour modes, or sixteen grey levels in 16 colour modes."
25850WHEN 11:h$="Select this icon to expand the dynamic range of the source.|MAdjust-clicking on this icon when it is selected will unselect it."
25860WHEN 12:h$="Select this icon to apply histogram equalisation to the source.|MAdjust-clicking on this icon when it is selected will unselect it."
25870WHEN 13:h$="Select this icon to process in Mode 0.|MThis will speed things up, especially if you are in a high-resolution mode for viewing the output."
25880WHEN 14:h$="Select this icon to invert the source before processing."
25890WHEN 15:h$="Select this icon to pre-sharpen the source."
25900WHEN 16:h$="Select this icon to omit ChangeFSI's pixel correction routines. This means that the size of the pixels is ignored when translating images."
25910WHEN 22:h$="Enter the value for sharpening here, in the range 8-31 (31=soft, 8=harsh)."
25920WHEN 23:h$="Select this icon to flip the image horizontally."
25930WHEN 24:h$="Select this icon to flip the image vertically."
25940WHEN 25:h$="Click on this icon to process the image with the current parameters."
25950WHEN 26:h$="Select this icon to disable dithering of the output image."
25960WHEN 27:h$="Select this icon to artificially brighten the output image."
25970WHEN 28:h$="Select this icon to apply black correction to the image before processing. This corrects for the size of black ink spots (eg on printers)."
25980WHEN 29:h$="Select this icon to apply gamma correction to the image before processing. "
25990WHEN 30:h$="Enter the value for black correction here, in the range 0-128 (0=not at all, 128=harsh)."
26000WHEN 31:h$="Enter the value for gamma correction here. The default value is 2.2."
26010ENDCASE
26020WHEN w%(17,0)
26030CASE pb%!36 OF
26040WHEN -1:h$="This window allows you to adjust the speed of FastGrab's live display."
26050WHEN 0:h$="This slider bar controls the speed of FastGrab's live display. 0 is the slowest speed, and 99 the fastest."
26060WHEN 1:h$="Click on this icon to increase the speed of FastGrab's live display.|MAdjust click on it to slow the display down."
26070WHEN 2:h$="Click on this icon to slow down FastGrab's live display.|MAdjust click on it to increase the speed of the display."
26080WHEN 3:h$="This field sets the speed of FastGrab's live display."
26090ENDCASE
26100ENDCASE
26110h$+=CHR$0
26120fnamelen%=LEN(h$)
26130PROCround(fnamelen%,4)
26140!mb%=20+fnamelen%
26150mb%!8=-1
26160mb%!12=pb%!8
26170mb%!16=&503
26180$(mb%+20)=h$
26190SYS "Wimp_SendMessage",17,mb%,0
26200ENDPROC
26210DEF PROCsavesprite
26220IF INSTR($outsprad%,".")=0 ERROR 42,"To save, drag the icon to a directory viewer."
26230SYS "OS_SpriteOp",&10C,grabarea%,$outsprad%
26240saved8%=TRUE
26250IF cfsid% THEN $grabwtitlead%=$outsprad%+" CFSI" ELSE $grabwtitlead%=$outsprad%+"8 bit"
26260PROCupdatetitle
26270ENDPROC
26280DEF PROCsaveraw
26290IF INSTR($outrawad%,".")=0 ERROR 42,"To save, drag the icon to a directory viewer."
26300rawout%=OPENOUT($outrawad%)
26310IF slave% THEN
26320rawin%=OPENIN("<FastGrab$Dir>.Resources.TwelveBit")
26330IF rawin%=0 CLOSE#rawout%:ERROR 214,"Cache file not found"
26340SYS "OS_GBPB",4,rawin%,livearea%+100,100000
26350SYS "OS_GBPB",2,rawout%,livearea%+100,100000
26360SYS "OS_GBPB",4,rawin%,livearea%+100,96628
26370SYS "OS_GBPB",2,rawout%,livearea%+100,96628
26380ELSE
26390SYS "OS_GBPB",2,rawout%,rawarea%,rawsize%
26400ENDIF
26410CLOSE#rawout%
26420saved12%=TRUE
26430IF board_is_16_bit% $grabwtitlead%=$outrawad%+" 16 bit" ELSE $grabwtitlead%=$outrawad%+" 12 bit"
26440PROCupdatetitle
26450ENDPROC
26460DEF PROCupdatetitle
26470IF w%(5,2) THEN
26480!mb%=w%(5,0)
26490SYS "Wimp_GetWindowOutline",,mb%
26500SYS "Wimp_ForceRedraw",-1,mb%!4,mb%!16-48,mb%!12,mb%!16
26510ENDIF
26520ENDPROC
26530DEF PROCinstallonbar
26540!pb%=-1
26550pb%!4=0
26560pb%!8=0
26570pb%!12=68
26580pb%!16=68
26590pb%!20=%100000010 OR %10<<12
26600pb%!24=barspace
26610pb%!28=sprites%
26620pb%!32=11
26630SYS "Wimp_CreateIcon",,pb% TO iconbar%
26640!iconb=-1
26650iconb!4=iconbar%
26660ENDPROC
26670DEF PROCgst(block%,handle%)
26680!block%=handle%
26690SYS "Wimp_GetWindowState",,block%
26700ENDPROC
26710DEF FNopen(block%,handle%)
26720PROCgst(block%,handle%)
26730=block%!32 AND 1<<16
26740
26750DEF FNcmenu(level%,text$,width%)
26760LOCAL newtext$,title$,ptr%,shade%,tick%,dotted%,submenu%,writable%,rjust%,warnmenu%
26770IF level%=0 THEN
26780longpointer%=longitems%
26790mnb%=menub%
26800ELSE
26810mnb%+=maxmenusize%
26820ENDIF
26830title$=LEFT$(text$,INSTR(text$,"|")-1)
26840text$=MID$(text$,INSTR(text$,"|")+1)
26850$mnb%=LEFT$(title$,11)
26860mnb%?12=7
26870mnb%?13=2
26880mnb%?14=7
26890mnb%?15=0
26900mnb%!16=width%
26910mnb%!20=44
26920mnb%!24=0
26930IF RIGHT$(text$,1)<>"|" text$+="|"
26940ptr%=mnb%+28
26950REPEAT
26960shade%=0:tick%=0
26970dotted%=0:writable%=0
26980rjust%=0:submenu%=-1
26990warnmenu%=0
27000WHILE INSTR("<>:*'�#@",LEFT$(text$,1))
27010CASE LEFT$(text$,1) OF
27020WHEN "<"
27030shade%=&400000
27040text$=MID$(text$,2)
27050WHEN ">"
27060tick%=1
27070text$=MID$(text$,2)
27080WHEN ":"
27090dotted%=2
27100text$=MID$(text$,2)
27110WHEN "*"
27120writable%=4
27130text$=MID$(text$,2)
27140WHEN "'"
27150text$=MID$(text$,2)
27160newtext$=EVAL(LEFT$(MID$(text$,5),INSTR(text$,"'")-1))
27170width%=VAL(LEFT$(text$,4))
27180text$=MID$(text$,INSTR(text$,"'")+1)
27190submenu%=FNcmenu(level%+1,newtext$,width%)
27200WHEN "�"
27210submenu%=VAL(MID$(text$,2,4))
27220text$=RIGHT$(text$,LEN(text$)-5)
27230WHEN "#"
27240rjust%=1
27250text$=MID$(text$,2)
27260WHEN "@"
27270text$=MID$(text$,2)
27280warnmenu%=8
27290submenu%=VAL(LEFT$(text$,INSTR(text$,"'")))
27300IF submenu%=0 submenu%=-1
27310text$=MID$(text$,INSTR(text$,"'")+1)
27320ENDCASE
27330ENDWHILE
27340IF writable% THEN
27350i%=INSTR(text$,",")
27360ptr%!12=EVAL(LEFT$(text$,i%-1))
27370text$=MID$(text$,i%+1)
27380i%=INSTR(text$,",")
27390ptr%!16=EVAL(LEFT$(text$,i%-1))
27400text$=MID$(text$,i%+1)
27410ptr%!20=EVAL(LEFT$(text$,INSTR(text$,"|")))
27420ELSE
27430IF LEN(LEFT$(text$,INSTR(text$,"|")-1))>11 THEN
27440long%=1
27450$longpointer%=LEFT$(text$,INSTR(text$,"|")-1)+CHR$13
27460ptr%!12=longpointer%
27470ptr%!16=&FFFFFFFF
27480ptr%!20=LEN(LEFT$(text$,INSTR(text$,"|")-1)+CHR$13)
27490longpointer%+=LEN(LEFT$(text$,INSTR(text$,"|")-1)+CHR$13)
27500IF longpointer%>longitems%+longsp% ERROR 0,"Menu workspace exceeded"
27510ELSE
27520long%=0
27530$(ptr%+12)=LEFT$(LEFT$(text$,INSTR(text$,"|")-1),11)
27540ENDIF
27550ENDIF
27560text$=MID$(text$,INSTR(text$,"|")+1)
27570!ptr%=tick% OR dotted% OR writable% OR (&80 AND (text$="")) OR warnmenu%
27580ptr%!4=submenu%
27590ptr%!8=shade% OR writable%<<6 OR long%<<8 OR &010021 OR rjust%<<9 OR 7<<24
27600ptr%+=24
27610UNTIL text$=""
27620IF level%=0 SYS "Wimp_CreateMenu",0,menub%,mousex%-64,mousey%
27630=mnb%
27640
27650DEF PROCmenu(window%,x%,y%,sub%)
27660IF oldmenu%<>-1 AND oldmenu%<>window% PROCdwin(oldmenu%)
27670PROCcwin(window%)
27680IF sub% THEN
27690SYS "Wimp_CreateSubMenu",,w%(window%,0),x%,y%
27700ELSE
27710SYS "Wimp_CreateMenu",,w%(window%,0),x%,y%
27720ENDIF
27730oldmenu%=window%
27740ENDPROC
27750
27760DEF PROCmenuselect
27770LOCAL adjust%
27780SYS "Wimp_GetPointerInfo",,mouseb%
27790adjust%=mouseb%!8 AND 1
27800CASE mentype% OF
27810WHEN 0
27820 CASE !pb% OF
27830 WHEN 0
27840  adjust%=FALSE
27850  SYS "Wimp_CreateMenu",,-1
27860  PROCmenu(13,!mouseb%-64,mouseb%!4,0)
27870 WHEN 1
27880  PROCshutdown(-1)
27890 ENDCASE
27900WHEN 1
27910 CASE !pb% OF
27920 WHEN 0
27930  PROCgrab
27940 WHEN 1
27950  IF pb%!4>=0 THEN
27960   grabsize%=pb%!4
27970   grabsize$=FNsetsizemenu(grabsize%)
27980  ENDIF
27990 WHEN 2
28000  IF pb%!4>=0 THEN
28010   IF livesize%>pb%!4 THEN
28020     A%=livearea%+60
28030     B%=&20100
28040     CALLblank
28050   ENDIF
28060   livesize%=pb%!4
28070   PROCadjustlive
28080   livesize$=FNsetsizemenu(livesize%)
28090  ENDIF
28100 WHEN 3
28110  IF bit%=12 THEN
28120   bit%=8
28130   PROCiconset(4,3,1<<21,1<<21)
28140  ELSE
28150   bit%=12
28160   PROCiconset(4,3,1<<21,0)
28170  ENDIF
28180 WHEN 4
28190  dithered%=dithered% EOR 1
28200  PROCtoggle(dither$)
28210  PROCchange_LCA(dithered%)
28220 WHEN 5
28230  PROCtoggle(mono$)
28240  IF mono$=">" THEN
28250   PROClive_grey
28260   PROCiconset(4,3,1<<22,1<<22)
28270   PROCiconset(4,4,1<<22,1<<22)
28280  ELSE
28290   PROClive_colour
28300   PROCiconset(4,3,1<<22,0)
28310   PROCiconset(4,4,1<<22,0)
28320  ENDIF
28330  PROCchange_LCA(dithered%)
28340 WHEN 6
28350  CASE pb%!4 OF
28360  WHEN -1
28370   IF field$="" THEN
28380    field$=">"
28390    !fielding=1
28400   ELSE
28410    field$=""
28420    !fielding=0
28430   ENDIF
28440  WHEN 0
28450   IF field$="" THEN field$=">"
28460    !fielding=1
28470    !evenfield=0
28480   ELSE
28490    !fielding=0
28500   ENDIF
28510  WHEN 1
28520   IF field$="" THEN field$=">"
28530    !fielding=1
28540    !evenfield=1
28550   ELSE
28560    !fielding=0
28570   ENDIF
28580  ENDCASE
28590  PROCfieldmenu
28600 WHEN 7
28610  PROCtoggle(cache$)
28620 WHEN 8
28630  PROCshowgrab
28640 WHEN 10
28650  IF pb%!4<>-1 THEN
28660   SYS "OS_ReadModeVariable",VAL($modeb%),3 TO ,,ncol%
28670   IF ncol%<>63 THEN
28680    $(modeb%)="15"
28690    ERROR 42,"Not a 256 colour mode"
28700   ENDIF
28710  ENDIF
28720 WHEN 12
28730  PROCsavechoices
28740 WHEN 13
28750  IF ltool$="" THEN
28760   ltool$=">"
28770   !mb%=w%(3,0)
28780   SYS "Wimp_GetWindowState",,mb%
28790   PROCcwin(4)
28800   !mb%=w%(4,0)
28810   mb%!4-=88
28820   mb%!12=mb%!4+84
28830   mb%!20=0
28840   mb%!24=0
28850   SYS "Wimp_OpenWindow",,mb%
28860  ELSE
28870   ltool$=""
28880   PROCdwin(4)
28890  ENDIF
28900 ENDCASE
28910WHEN 2
28920 CASE !pb% OF
28930 WHEN 7
28940  adjust%=FALSE
28950  IF grab12% THEN
28960   IF NOT saved12% THEN
28970    PROCquery(1,"Do you want to save the raw data?")
28980   ELSE
28990    PROCdeletegrabbed
29000   ENDIF
29010  ELSE
29020   IF NOT saved8% THEN
29030    PROCquery(3,"Do you want to save the sprite?")
29040   ELSE
29050    PROCdeletegrabbed
29060   ENDIF
29070  ENDIF
29080 WHEN 8
29090  IF gtool$="" THEN
29100   gtool$=">"
29110   !mb%=w%(5,0)
29120   SYS "Wimp_GetWindowState",,mb%
29130   PROCcwin(6)
29140   !mb%=w%(6,0)
29150   mb%!4-=88
29160   mb%!12=mb%!4+84
29170   mb%!20=0
29180   mb%!24=0
29190   SYS "Wimp_OpenWindow",,mb%
29200  ELSE
29210   gtool$=""
29220   PROCdwin(6)
29230  ENDIF
29240 ENDCASE
29250ENDCASE
29260IF adjust% AND (NOT close%) THEN
29270 CASE mentype% OF
29280 WHEN 0
29290  menu%=FNcmenu(0,"FastGrab|@13'Info|Quit|",96)
29300 WHEN 1
29310  IF bit%=12 THEN
29320  tick12$=">"
29330  cachem$=cache$
29340  ELSE
29350   tick12$=""
29360   cachem$="<"
29370  ENDIF
29380  IF grabex% shade$="" ELSE shade$="<"
29390  temp0$="FastGrab|Grab frame|'0156grabsize$'Frame size|'0156livesize$'Live size|"
29400  IF mono$=">" THEN ms$="<" ELSE ms$=""
29410  IF board_is_16_bit% THEN
29420   temp1$=ms$+tick12$+"16 bit data|"+ms$+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
29430  ELSE
29440   temp1$=tick12$+"12 bit data|"+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
29450  ENDIF
29460  menu%=FNcmenu(0,temp0$+temp1$,236)
29470 WHEN 2
29480  IF grab12% raw$="" ELSE raw$="<"
29490  temp0$="FastGrab|@10'Sprite info|@9'Zoom|@6'Save sprite|@1'"+raw$+"ChangeFSI|@14'Credits|"
29500  IF board_is_16_bit% THEN
29510   temp1$="@11'"+raw$+"16 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
29520  ELSE
29530   temp1$="@11'"+raw$+"12 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
29540  ENDIF
29550  menu%=FNcmenu(0,temp0$+temp1$,220)
29560 ENDCASE
29570ENDIF
29580ENDPROC
29590
29600DEF PROCtoggle(RETURN swap$)
29610IF swap$=">" THEN swap$="" ELSE swap$=">"
29620ENDPROC
29630
29640DEF PROCcwin(number%)
29650IF NOT w%(number%,2) THEN
29660 SYS "Wimp_CreateWindow",,w%(number%,1)+4 TO w%(number%,0)
29670 !w%(number%,1)=w%(number%,0)
29680 w%(number%,2)=TRUE
29690ENDIF
29700ENDPROC
29710
29720DEF PROCdwin(number%)
29730IF w%(number%,2) THEN
29740 SYS "Wimp_GetWindowInfo",,w%(number%,1)
29750 SYS "Wimp_DeleteWindow",,w%(number%,1)
29760 w%(number%,2)=FALSE
29770 w%(number%,0)=-1
29780ENDIF
29790ENDPROC
29800
29810DEF PROCclwin(number%)
29820IF w%(number%,2) THEN
29830 SYS "Wimp_GetWindowInfo",,w%(number%,1)
29840 SYS "Wimp_CloseWindow",,w%(number%,1)
29850ENDIF
29860ENDPROC
29870
29880DEF PROCfieldmenu
29890subfield$="Field|"
29900IF !fielding=0 THEN
29910 subfield$+="Even|Odd|"
29920ELSE
29930 IF !evenfield THEN
29940  subfield$+="Even|>Odd|"
29950 ELSE
29960  subfield$+=">Even|Odd|"
29970 ENDIF
29980ENDIF
29990ENDPROC
30000
30010DEF FNsetsizemenu(value%)
30020LOCAL size$
30030CASE value% OF
30040WHEN 0
30050 size$=">512 � 256|256 � 128|128 �  64|"
30060WHEN 1
30070 size$="512 � 256|>256 � 128|128 �  64|"
30080WHEN 2
30090 size$="512 � 256|256 � 128|>128 �  64|"
30100WHEN 3
30110 size$="512 � 256|256 � 128|128 �  64|>"
30120OTHERWISE
30130 ERROR 0,"Invalid frame size"
30140ENDCASE
30150="Size|"+size$+" 64 �  32"
30160
30170DEF PROCmenuwarning
30180PROCmenu(pb%!20,pb%!24,pb%!28,-1)
30190ENDPROC
30200
30210DEF PROCsavechoices
30220outc%=OPENOUT("<FastGrab$Dir>.Resources.Choices")
30230BPUT#outc%,VAL$modead%
30240PRINT#outc%,$x1ad%
30250PRINT#outc%,$y1ad%
30260PRINT#outc%,$x2ad%
30270PRINT#outc%,$y2ad%
30280CASE outmode$ OF
30290WHEN " "
30300 outset%=0
30310WHEN "C"
30320 outset%=1
30330WHEN "D"
30340 outset%=2
30350WHEN "T"
30360 outset%=3
30370WHEN "P"
30380 outset%=0:REM Cannot be used here!
30390ENDCASE
30400BPUT#outc%,outset% OR FNselected(11)<<2 OR FNselected(12)<<3 OR FNselected(13)<<4 OR FNselected(14)<<5 OR FNselected(15)<<6 OR FNselected(16)<<7
30410BPUT#outc%,FNselected(5) OR FNselected(23)<<1 OR FNselected(24)<<2 OR FNselected(25)<<3 OR FNselected(27)<<4
30420BPUT#outc%,VAL($sharpenad%)
30430BPUT#outc%,brightness%
30440savedbright%=brightness%
30450BPUT#outc%,contrast%
30460savedcont%=contrast%
30470IF mono$=">" THEN
30480 BPUT#outc%,old_sat%
30490ELSE
30500 BPUT#outc%,saturation%
30510ENDIF
30520savedsat%=saturation%
30530BPUT#outc%,ABS(bit%=12) OR ABS(ltool$=">")<<1 OR ABS(gtool$=">")<<2 OR ABS(cache$=">")<<3 OR ABS(field$=">")<<4 OR !evenfield<<5 OR dithered%<<6 OR ABS(mono$=">")<<7
30540BPUT#outc%,speed%
30550BPUT#outc%,VAL($modeb%)
30560BPUT#outc%,grabsize%
30570BPUT#outc%,livesize%
30580BPUT#outc%,FNselected(26)
30590BPUT#outc%,FNselected(27)
30600BPUT#outc%,FNselected(28)
30610BPUT#outc%,VAL$blackad%
30620BPUT#outc%,FNselected(29)
30630PRINT#outc%,$gammaad%
30640BPUT#outc%,FNselected(32)
30650CLOSE#outc%
30660ENDPROC
30670
30680DEF PROCerror(arg%)
30690IF arg% THEN
30700 PROCcloseopen(c%)
30710 IF MODE<>oldmode% SYS "Wimp_SetMode",oldmode%
30720 !mb%=0
30730ENDIF
30740CASE ERR OF
30750WHEN &1E6
30760 flags%=1
30770 $(mb%+4)="FastGrab requires the Wild Vision Hawk V9 and its module to be present."
30780WHEN 11
30790 IF debug% THEN
30800 flags%=2
30810 $(mb%+4)="It's fallen over at line "+STR$(ERL)+" "+REPORT$
30820ELSE
30830 flags%=1
30840 $(mb%+4)="Cannot claim enough memory to process image"
30850ENDIF
30860WHEN 42
30870 flags%=1
30880 $(mb%+4)=REPORT$
30890WHEN 214
30900 flags%=1
30910 $(mb%+4)=REPORT$
30920WHEN 223,183
30930 flags%=1
30940 $(mb%+4)="Unexpected end of file"
30950WHEN 643
30960 flags%=1
30970 $(mb%+4)="Too many windows have been created"
30980WHEN 1800
30990 flags%=1
31000 $(mb%+4)="Cannot grab in this mode - using mode 15 instead"
31010 grabarea%!56=15
31020WHEN &108C2
31030 $(mb%+4)="File open - could not save file"
31040 flags%=1
31050WHEN &10C85
31060 $(mb%+4)="Types don't match"
31070 flags%=1
31080WHEN &108C6
31090 $(mb%+4)="Disc full - could not save file"
31100 flags%=1
31110WHEN &108CC
31120 $(mb%+4)="Bad name - could not save file"
31130 flags%=1
31140WHEN &108D6
31150 $(mb%+4)="Directory not found - could not save file"
31160 flags%=1
31170OTHERWISE
31180 $(mb%+4)=REPORT$+" (Internal error :MSE#5"+STR$ERL+") "+STR$ERR
31190 flags%=2
31200 arg%=0
31210ENDCASE
31220IF flags% THEN
31230 SYS "Wimp_ReportError",mb%,flags%,"FastGrab" TO ,response%
31240 IF arg%=0 PROCshutdown(0)
31250 IF response%=2 PROCshutdown(-1)
31260ENDIF
31270ENDPROC
31280
31290DEF PROCcloseopen(RETURN handle%)
31300IF handle% CLOSE#handle%
31310handle%=0
31320ENDPROC
31330
31340DEF PROCassemble
31350DIM code% 4096,L% 0
31360FOR opt%=8 TO 10 STEP 2
31370P%=code%
31380[
31390OPT opt%
31400.pollcode
31410MOV R12,R14
31420.fastloop
31430SWI "OS_ReadMonotonicTime"
31440LDR R1,speedval
31450ADD R2,R0,R1
31460MOV R11,#1
31470LDR R3,dragging%
31480CMP R3,#0
31490LDREQ R1,speedval
31500ADDEQ R2,R0,R1
31510LDR R0,maskad
31520LDR R1,pollad
31530SWIEQ "Wimp_PollIdle"
31540SWINE "Wimp_Poll"
31550CMP R0,#0
31560MOVEQ R11,#0
31570BLEQ updatecode
31580CMP R0,#1
31590MOVEQ R11,#0
31600BLEQ redrawhandler
31610CMP R11,#1
31620BNE fastloop
31630MOVS PC,R12
31640.pollad
31650EQUD 0
31660.speedval
31670EQUD 0
31680.redrawhandler
31690LDR R3,[R1]
31700STR R3,rdb
31710ADR R10,windowlist
31720.lookup
31730LDR R4,[R10]
31740CMP R3,R4
31750BEQ skip
31760CMP R4,#&20
31770MOVEQS PC,R12
31780ADD R10,R10,#28
31790B lookup
31800.skip
31810ADR R1,rdb
31820SWI "Wimp_RedrawWindow"
31830LDMIA R1,{R2-R8}
31840SUB R9,R6,R8
31850SUB R8,R3,R7
31860.redrawloop
31870CMP R0,#0
31880MOVEQS PC,R14
31890MOV R0,#&234
31900LDMIB R10,{R1-R4,R6,R7}
31910ADD R3,R3,R8
31920ADD R4,R4,R9
31930MOV R5,#0
31940SWI "OS_SpriteOp"
31950ADR R1,rdb
31960SWI "Wimp_GetRectangle"
31970B redrawloop
31980MOVS PC,R14
31990.updatecode
32000ADR R0,stack
32010;STMIA R0,{R2-R14}
32020STMIA R0,{R12,R14}
32030BL live_grab
32040ADR R0,stack
32050LDMIA R0,{R12,R14}
32060;LDMIA R0,{R2-R14}
32070MOV R0,#0
32080STR R0,udb+4
32090STR R0,udb+16
32100LDR R0,livexsize
32110STR R0,udb+12
32120LDR R0,liveysize
32130STR R0,udb+8
32140ADR R1,udb
32150SWI "Wimp_UpdateWindow"
32160LDMIA R1,{R2-R8}
32170SUB R9,R6,R8
32180SUB R8,R3,R7
32190.updateloop
32200CMP R0,#0
32210BEQ skipupdate
32220MOV R0,#&234
32230LDR R1,spritearea
32240LDR R2,spritead
32250MOV R3,#0
32260LDR R4,livewb+16
32270ADD R3,R3,R8
32280ADD R4,R4,R9
32290MOV R5,#0
32300ADR R6,livemag
32310LDR R7,colmap
32320SWI "OS_SpriteOp"
32330ADR R1,udb
32340SWI "Wimp_GetRectangle"
32350B updateloop
32360.skipupdate
32370LDR R1,dragging%
32380CMP R1,#0
32390MOVNE PC,R12
32400MOV PC,R14
32410.livemag
32420EQUD 1
32430EQUD 1
32440EQUD 1
32450EQUD 1
32460.rdb
32470EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32480EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32490.stack
32500EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32510EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32520EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32530.maskad
32540EQUD 0
32550.windowlist
32560.livewb
32570EQUD w%(3,0)
32580EQUD livearea%
32590EQUD livearea%+16
32600EQUD 0
32610EQUD -512
32620EQUD 0
32630EQUD 0
32640.grabwb
32650EQUD w%(5,0)
32660EQUD 0
32670EQUD 0
32680EQUD 0
32690EQUD -1024
32700EQUD 0
32710EQUD 0
32720EQUD &20
32730.livexsize
32740EQUD 0
32750.liveysize
32760EQUD 0
32770.udb
32780EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32790EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
32800.spritearea
32810EQUD 0
32820.spritead
32830EQUD 0
32840.colmap
32850EQUD 0
32860.dragging%
32870EQUD 0
32880.unpack
32890ADD R2,R0,#768
32900MOV R4,#&F
32910.unpackloop
32920LDR R3,[R0],#4
32930MOV R5,#0
32940.bitloop
32950AND R6,R3,R4,LSL R5
32960MOV R6,R6,LSR R5
32970ADD R5,R5,#4
32980AND R7,R3,R4,LSL R5
32990MOV R7,R7,LSR R5
33000ADD R5,R5,#4
33010STRB R7,[R1],#1
33020STRB R6,[R1],#1
33030CMP R5,#32
33040BNE bitloop
33050CMP R2,R0
33060BNE unpackloop
33070MOVS PC,R14
33080.blank
33090MOV R2,#0
33100ADD R1,R0,R1
33110.blankloop
33120STR R2,[R0],#4
33130CMP R0,R1
33140BLT blankloop
33150MOVS PC,R14
33160]
33170NEXT
33180grabwb!24=grabpal%
33190ENDPROC
33200
33210DEF FNChangeFSIVersion="0.82 (5 Feb 91)"
33220
33230DEF FNChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,RETURN ram%,fast%,V9Area%)
33240LOCAL A$(),r%(),g%(),b%(),rpal%(),gpal%(),bpal%(),table%(),cl%(),xl%(),xl2%()
33250LOCAL xp%(),rm%(),rm1%(),rm2%(),vals%(),nl%(),A%(),B%(),new%(),st%()
33260WHILELEFT$(A$,1)<>" "ANDLENA$<>0 A$=MID$(A$,2):ENDWHILE
33270WHILELEFT$(A$,1)=" " A$=MID$(A$,2):ENDWHILE
33280WHILERIGHT$(A$,1)=" " A$=LEFT$(A$):ENDWHILE
33290IFFNuc(LEFT$(A$,5))="-QUIT" THEN
33300A$=MID$(A$,7):WHILELEFT$(A$,1)<>" "ANDLENA$<>0 A$=MID$(A$,2):ENDWHILE
33310WHILELEFT$(A$,1)=" " A$=MID$(A$,2):ENDWHILE
33320ENDIF
33330DIM A$(100):ARG%=0:B%=INSTR(A$," ")
33340WHILE B%<>0
33350ARG%+=1:A$(ARG%)=LEFT$(A$,B%-1):A$=MID$(A$,B%+1)
33360WHILE LEFT$(A$,1)=" ":A$=MID$(A$,2):ENDWHILE
33370B%=INSTR(A$," ")
33380ENDWHILE
33390IFA$<>"" ARG%+=1:A$(ARG%)=A$
33400
33410invert%=FALSE:range%=FALSE:sharpen%=FALSE:info%=FALSE:dither%=TRUE:black%=FALSE
33420hist%=FALSE:equal%=FALSE:vflip%=FALSE:hflip%=FALSE:scale%=TRUE:scaleo%=TRUE
33430gamma=1:rotate%=FALSE:max%=20000000:bright%=15
33440rwt=.30:gwt=.59:bwt=.11
33450IFARG%<3 THEN
33460PRINT"ChangeFSI interactive input [try 'ChangeFSI -help' for command line]"
33470INPUT"Source file: "s$,"Destination file: "f$,"Output mode: "m$
33480INPUT"(X)Scale (e.g. 2:1): "xs$:INPUT"Y Scale: "ys$
33490INPUT"Info on input picture?"a$:IFFNuc(LEFT$(a$,1))="Y" info%=TRUE
33500INPUT"Invert picture colours?"a$:IFFNuc(LEFT$(a$,1))="Y" invert%=TRUE
33510INPUT"Compute histogram of input?"a$:IFFNuc(LEFT$(a$,1))="Y" hist%=TRUE
33520INPUT"Apply histogram equalisation?"a$:IFFNuc(LEFT$(a$,1))="Y" equal%=TRUE
33530INPUT"Expand input dynamic range?"a$:IFFNuc(LEFT$(a$,1))="Y" range%=TRUE:equal%=FALSE
33540INPUT"Sharpen picture by (e.g. 12 for harsh, 24 for soft) "a$
33550IFa$<>"" sharpen%=VALa$
33560INPUT"Rotate?"a$:IFFNuc(LEFT$(a$,1))="Y" rotate%=TRUE
33570ELSE
33580REPEAT A%=ARG%
33590IFFNuc(A$(ARG%))="-INFO" info%=TRUE:A$(ARG%)="":ARG%-=1
33600IFFNuc(A$(ARG%))="-HIST" hist%=TRUE:A$(ARG%)="":ARG%-=1
33610IFFNuc(A$(ARG%))="-EQUAL" equal%=TRUE:range%=FALSE:A$(ARG%)="":ARG%-=1
33620IFFNuc(A$(ARG%))="-RANGE" range%=TRUE:equal%=FALSE:A$(ARG%)="":ARG%-=1
33630IFFNuc(A$(ARG%))="-INVERT" invert%=TRUE:A$(ARG%)="":ARG%-=1
33640IFFNuc(A$(ARG%))="-NOSCALE" scale%=FALSE:scaleo%=FALSE:A$(ARG%)="":ARG%-=1
33650IFFNuc(A$(ARG%))="-NOSIZE" scale%=FALSE:A$(ARG%)="":ARG%-=1
33660IFFNuc(A$(ARG%))="-NODITHER" dither%=FALSE:A$(ARG%)="":ARG%-=1
33670IFFNuc(A$(ARG%))="-BRIGHTEN" bright%=16:A$(ARG%)="":ARG%-=1
33680IFFNuc(A$(ARG%))="-ROTATE" rotate%=TRUE:A$(ARG%)="":ARG%-=1
33690IFFNuc(A$(ARG%))="-VFLIP" vflip%=TRUE:A$(ARG%)="":ARG%-=1
33700IFFNuc(A$(ARG%))="-HFLIP" hflip%=TRUE:A$(ARG%)="":ARG%-=1
33710IFFNuc(A$(ARG%))="-NOMODE" fast%=FALSE:A$(ARG%)="":ARG%-=1
33720IFFNuc(LEFT$(A$(ARG%),6))="-BLACK" THEN
33730black%=32:IFLENA$(ARG%)>6 black%=VALMID$(A$(ARG%),7):IFblack%>128 black%=128
33740A$(ARG%)="":ARG%-=1
33750ENDIF
33760IFFNuc(LEFT$(A$(ARG%),6))="-GAMMA" THEN
33770gamma=2.2:IFLENA$(ARG%)>6 gamma=VALMID$(A$(ARG%),7)
33780A$(ARG%)="":ARG%-=1
33790ENDIF
33800IFFNuc(LEFT$(A$(ARG%),8))="-SHARPEN" THEN
33810sharpen%=TRUE:IFLENA$(ARG%)>8 sharpen%=VALMID$(A$(ARG%),9)
33820A$(ARG%)="":ARG%-=1
33830ENDIF
33840IFFNuc(LEFT$(A$(ARG%),4))="-RED" rwt=VALMID$(A$(ARG%),5):A$(ARG%)="":ARG%-=1
33850IFFNuc(LEFT$(A$(ARG%),6))="-GREEN" gwt=VALMID$(A$(ARG%),7):A$(ARG%)="":ARG%-=1
33860IFFNuc(LEFT$(A$(ARG%),5))="-BLUE" bwt=VALMID$(A$(ARG%),6):A$(ARG%)="":ARG%-=1
33870IFFNuc(LEFT$(A$(ARG%),4))="-MAX" THEN
33880max%=VALMID$(A$(ARG%),5):IFINSTR(A$(ARG%),"K")ORINSTR(A$(ARG%),"k") max%=max%*1024
33890A$(ARG%)="":ARG%-=1
33900ENDIF
33910UNTILA%=ARG%
33920s$=A$(1):f$=A$(2):m$=A$(3):xs$=A$(4):ys$=A$(5)
33930ENDIF
33940IFokinfo% ELSEinfo%=FALSE
33950IFworkspace%>=0 THEN
33960flex%=FALSE
33970ELSE
33980IFworklimit%=0 THENflex%=FALSE ELSEflex%=TRUE:nextlocation%=worklimit%
33990ENDIF
34000pnm$=FNuc(m$):CASE pnm$ OF
34010WHEN"AIM":m=-1:m$=""
34020WHEN"P1":m=-2:m$="":spm=18
34030WHEN"P4":m=-2:m$="":spm=18
34040WHEN"P2":m=-2:m$="T":spm=20
34050WHEN"P5":m=-2:m$="T":spm=20
34060OTHERWISE:m=VALm$:spm=m:m$=FNuc(RIGHT$(m$,1)):IFINSTR("CDTP",m$)=0 m$=""
34070ENDCASE
34080IFxs$="" OR LEFT$(xs$,1)="-" THEN
34090xmul%=1:xdiv%=1:ymul%=1:ydiv%=1
34100ELSE
34110IFys$="" ys$=xs$
34120xmul%=VALxs$:xdiv%=VALMID$(xs$,INSTR(xs$,":")+1)
34130ymul%=VALys$:ydiv%=VALMID$(ys$,INSTR(ys$,":")+1)
34140ENDIF
34150dir=FALSE
34160REM flag=-1:SYS8,5,s$ TO r0,,r2:dir=r0=2
34170IFdir THEN
34180panic=TRUE:SYS8,5,s$+".raw" TO r0,,r2:IFr0=1 s$+=".raw":dir=FALSE:panic=FALSE
34190IFpanic SYS8,5,s$+".red" TO r0,,r2:IFr0=1 panic=FALSE
34200IFpanic ERROR 42,"Directory given"
34210ENDIF
34220ftype=r2>>8 AND &FFF:bits=28:F=2^bits:c%=0:cc%=0:ccc%=0:o%=0
34230IFdir THEN
34240c%=OPENIN(s$+".red"):IFc%=0 ERROR 42,"Red file "+s$+".red not found"
34250cc%=OPENIN(s$+".green"):IFcc%=0 ERROR42,"Green file "+s$+".green not found"
34260ccc%=OPENIN(s$+".blue"):IFccc%=0 ERROR42,"Blue file "+s$+".blue not found"
34270ELSE
34280REM c%=OPENINs$:IFc%=0 ERROR 42,"File "+s$+" not found"
34290ENDIF
34300DIM r%(255)
34310DIM g%(255),b%(255)
34320CASE ftype OF
34330WHEN &FF9:flag=0
34340OTHERWISE
34350REM PTR#c%=0:S$="":FORI%=1TO8:S$+=CHR$BGET#c%:NEXT
34360REM IFflag=-1 IFS$="MercSoft" flag=902
34370REM flag=902:REM My format or else! !! fIX THIS !!
34380IF in_file_bits%=16 THEN flag=903 ELSE flag=902
34390ENDCASE
34400IFflag=-1:ERROR 42,"Sorry: format not recognised - please try again or contact your supplier"
34410step24=1:input=8:ham=0:planar%=0:bigendianbits=FALSE
34420compression=0:rflag=flag:cache%=FALSE:striprows%=-1:cachebytes%=FALSE
34430CASE flag OF
34440WHEN 0
34450quant%=4:PTR#c%=4:F%=FNW+&1C:PTR#c%=F%:st%=FNW+F%-&20:PTR#c%=F%+8
34460sm=FNW:SYS53,sm,3 TO ,,I%
34470CASE I% OF
34480WHEN 1:IFst%=F%+12 PROCdefpal2 ELSEPROCipal(2)
34490PTR#c%=F%-16:sx%=(FNW+1)*32:rowbytes%=sx%>>3:input=1
34500WHEN 3:IFst%=F%+12 PROCdefpal4 ELSEPROCipal(4)
34510PTR#c%=F%-16:sx%=(FNW+1)*16:rowbytes%=sx%>>2:input=2
34520WHEN 15:IFst%=F%+12 PROCdefpal16 ELSEPROCipal(16)
34530PTR#c%=F%-16:sx%=(FNW+1)*8:rowbytes%=sx%>>1:input=4
34540WHEN 63:IFst%=F%+12 PROCdefpal ELSEPROCipal63
34550PTR#c%=F%-16:sx%=(FNW+1)*4:rowbytes%=sx%
34560OTHERWISE ERROR42,"Not understood RISC OS sprite"
34570ENDCASE
34580sy%=FNW+1:PTR#c%=st%:cache%=TRUE
34590SYS53,sm,4 TO ,,nx:SYS53,sm,5 TO ,,ny:nx=1<<nx:ny=1<<ny
34600IFscale% xmul%=xmul%*nx/2:ymul%=ymul%*ny/2
34610offset%=0
34620info$="RISC OS sprite, mode "+STR$sm+" "+STR$sx%+" by "+STR$sy%+" pixels, "+FNbits(input)
34630
34640WHEN 900
34650quant%=8:sx%=256:sy%=256:st%=0:PTR#c%=0:IFscale% ymul%=ymul%*2:xmul%=xmul%*2
34660FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%():rowbytes%=sx%:rflag=0:cache%=TRUE
34670info$="AIM .raw image, 256 by 256 pixels, 8 bits per pixel"
34680
34690WHEN 901
34700quant%=4:sx%=256:sy%=256:IFscale% ymul%=ymul%*2:xmul%=xmul%*2
34710buff%=FNdim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2
34720FORC%=0TO255:r%(C%)=(C%AND&F0)/&F0*F:NEXT:g%()=r%():b%()=r%()
34730input=24:info$="Hawk V9 Triple image, 256 by 256 pixels, 12 bits per pixel"
34740
34750WHEN 902
34760 offset%=20
34770 IF slave% THEN
34780  c%=OPENIN("<FastGrab$Dir>.Resources.TwelveBit")
34790  IF c%=0 ERROR 214,"Cache file cannot be found"
34800  offset%=20
34810  PTR#c%=20
34820  DIM tspace% 1024
34830 ENDIF
34840quant%=4
34850sx%=512
34860rowbytes%=sx%*3/2
34870sy%=256
34880st%=20
34890PROCsize
34900buff%=FNdim(sx%*3)
34910rb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2:rats%=FNdim(rowbytes%)
34920FORC%=0TO255:r%(C%)=(C%AND&F)/&F*F:NEXT:g%()=r%():b%()=r%()
34930input=24:info$="Hawk V9 Colour image, "+STR$sx%+" by "+STR$sy%+" pixels, 12 bits per pixel"
34940
34950WHEN 903
34960 offset%=20
34970 IF slave% THEN
34980    c%=OPENIN("<FastGrab$Dir>.Resources.TwelveBit")
34990  IF c%=0 ERROR 214,"Cache file cannot be found"
35000  offset%=20
35010  PTR#c%=20
35020  DIM tspace% 1024
35030 ENDIF
35040quant%=5
35050sx%=512
35060rowbytes%=sx%*2
35070sy%=256
35080st%=20
35090PROCsize
35100buff%=FNdim(sx%*3)
35110rb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2:rats%=FNdim(rowbytes%)
35120FOR C%=0 TO 255:r%(C%)=(C%AND&1F)/&1F*F:NEXT:g%()=r%()*1.6:b%()=r%()
35130input=24:info$="Hawk V9 Mk II Colour image, "+STR$sx%+" by "+STR$sy%+" pixels, 16 bits per pixel"
35140
35150ENDCASE
35160IFinfo% PRINTinfo$
35170SYS"Hourglass_On",1:hour%=&406c4
35180IFinvert% r%()=F-r%():g%()=F-g%():b%()=F-b%()
35190CASE m OF
35200WHEN -1:x%=256:y%=256:ncol=255:IFscaleo% xdiv%=xdiv%*2:ydiv%=ydiv%*2
35210WHEN -2:x%=sx%:y%=sy%:IFspm=18 ncol=1 ELSEncol=15
35220OTHERWISE
35230SYS53,m,4 TO ,,nx:SYS53,m,5 TO ,,ny:nx=1<<nx:ny=1<<ny
35240SYS53,m,11 TO ,,x%:SYS53,m,12 TO ,,y%:x%+=1:y%+=1
35250SYS53,m,3 TO ,,ncol:IFscaleo% THEN
35260IFrotate% THEN
35270xdiv%=xdiv%*ny/2:ydiv%=ydiv%*nx/2
35280ELSE
35290xdiv%=xdiv%*nx/2:ydiv%=ydiv%*ny/2
35300ENDIF
35310ENDIF
35320ENDCASE
35330IFm$="P" THEN
35340J%=4096:IFncol<63 J%+=(ncol+1)*4
35350lookup%=FNdim(J%):palette%=lookup%+4096
35360I%=OPENIN("<FastGrab$Dir>.Resources.CFSIict"+STR$ncol)
35370IFI% THEN
35380CLOSE#I%:OSCLI"load <FastGrab$Dir>.Resources.CFSIict"+STR$ncol+" "+STR$~lookup%
35390ELSE
35400I%=&40744:FORB%=0TO15:SYShour%,B%*100DIV16
35410FORG%=0TO15:L%=(B%<<8 OR G%<<4)+lookup%
35420C%=B%<<28ORB%<<24 OR G%<<20ORG%<<16
35430FORR%=0TO15:SYSI%,C%OR R%<<12ORR%<<8 TO L%?R%:NEXT
35440NEXT:NEXT
35450IFncol<63 THEN
35460FORI%=0TOncol:SYS"OS_ReadPalette",I%,16 TO ,,palette%!(I%<<2):NEXT
35470ENDIF
35480I%=OPENOUT("<FastGrab$Dir>.Resources.CFSIict"+STR$ncol)
35490FORB%=0TOJ%-1:BPUT#I%,lookup%?B%:NEXT
35500CLOSE#I%
35510ENDIF
35520ENDIF
35530IFfast% IFMODE<>0 MODE0
35540IFrotate% SWAP x%,y%:SWAP xmul%,ymul%
35550IFxdiv%=0 xdiv%=sx%
35560IFydiv%=0 ydiv%=sy%
35570IFxs$="=" xmul%=x%:xdiv%=sx%
35580IFys$="=" ymul%=y%:ydiv%=sy%
35590IFncol=1 THEN
35600CASE m$ OF
35610WHEN"C":xdiv%=xdiv%*4:ydiv%=ydiv%*4
35620DIM A%(16),B%(16)
35630A%()=0,&00000001,&08000001,&08000101,&08080101,&08080103,&0C080103,&0C080303,&0C0C0303,&0C0E0303,&0C0E0703,&0E0E0703,&0E0E0707,&0E0F0707,&0E0F0F07,&0F0F0F07,&0F0F0F0F
35640B%()=0,&00000008,&01000008,&01000808,&01010808,&0101080C,&0301080C,&03010C0C,&03030C0C,&03070C0C,&03070E0C,&07070E0C,&07070E0E,&070F0E0E,&070F0F0E,&0F0F0F0E,&0F0F0F0F
35650even_gard=FNdim(17*32*4):odd_gard=FNdim(17*32*4)
35660FORI%=0TO16:FORJ%=0TO16:even_gard!(J%*32*4+I%*4)=A%(I%)ORB%(J%)<<4:NEXT:NEXT
35670FORI%=0TO16:FORJ%=0TO16:odd_gard!(I%*32*4+J%*4)=B%(I%)ORA%(J%)<<4:NEXT:NEXT
35680WHEN"T":xdiv%=xdiv%*3:ydiv%=ydiv%*3
35690DIM A%(9),B%(9)
35700A%()=0,&0001,&4001,&4041,&4043,&40C3,&60C3,&61C3,&71C3,&71C7
35710B%()=0,&0004,&1004,&1104,&1106,&1186,&3186,&31C6,&71C6,&71C7
35720even_gard=FNdim(10*16*4):odd_gard=FNdim(10*16*4)
35730FORI%=0TO9:FORJ%=0TO9:even_gard!(J%*16*4+I%*4)=A%(I%)ORB%(J%)<<3:NEXT:NEXT
35740FORI%=0TO9:FORJ%=0TO9:odd_gard!(I%*16*4+J%*4)=B%(I%)ORA%(J%)<<3:NEXT:NEXT
35750WHEN"D":xdiv%=xdiv%*2:ydiv%=ydiv%*2
35760DIM A%(4),B%(4)
35770A%()=0,&1,&21,&31,&33
35780B%()=0,&2,&12,&32,&33
35790even_gard=FNdim(5*8):odd_gard=FNdim(5*8)
35800FORI%=0TO4:FORJ%=0TO4:even_gard?(J%*8+I%)=A%(I%)ORB%(J%)<<2:NEXT:NEXT
35810FORI%=0TO4:FORJ%=0TO4:odd_gard?(I%*8+J%)=B%(I%)ORA%(J%)<<2:NEXT:NEXT
35820ENDCASE
35830ENDIF
35840PROCreduce(xmul%,xdiv%):PROCreduce(ymul%,ydiv%)
35850IFinfo% PRINT"Size ratios are x ";xmul%":"xdiv%" y "ymul%":"ydiv%
35860x%=sx%*xmul%/xdiv%+.9999:y%=sy%*ymul%/ydiv%+.9999:rows%=sy%
35870order%=x%*y%>sx%*sy%
35880CASE m OF
35890WHEN -1:col=0
35900OTHERWISE
35910IFm$="D" IFncol<>15 ANDncol<>1 m$=""
35920col=0:IFncol>15 OR m$="C" OR m$="D" OR m$="P" col=2
35930ENDCASE
35940IFncol=1 THEN
35950CASE m$ OF
35960WHEN"C":col=0:x%=x%+1ANDNOT1
35970WHEN"D":col=0:x%=x%+3ANDNOT3
35980WHEN"T":col=0:x%=x%+1ANDNOT1
35990ENDCASE
36000ENDIF
36010IFsharpen%=TRUE sharpen%=24
36020DIM cl%(x%+7,col)
36030DIM xl%(x%+7,col),xp%(sx%+7,col)
36040DIM xl2%(x%+7,col)
36050IFsharpen% THEN
36060IForder% THEN
36070DIM rm%(sx%+7,col),rm1%(sx%+7,col),rm2%(sx%+7,col)
36080ELSE
36090DIM rm%(x%+7,col),rm1%(x%+7,col),rm2%(x%+7,col)
36100ENDIF
36110ENDIF
36120IFhist%ORequal% DIM vals%(256,col)
36130DIM nl%(x%+7,col)
36140totvals%=x%*(col+1)
36150totvals2%=sx%*(col+1)
36160code%=FNdim(8192):SP=13
36170IFcache% THEN
36180SYS&20023,"ChangeFSI$Cache",code%,-1 TO,,Z
36190IFZ<>0 THEN
36200SYS35,"ChangeFSI$Cache",code%,20 TO,,Z:code%?Z=13:cache%=VAL$code%
36210IFINSTR($code%,"K")ORINSTR($code%,"k") cache%=cache%*1024
36220ELSE
36230cache%=8192
36240ENDIF
36250IFcachebytes% THEN
36260filesize%=EXT#c%-PTR#c%:IFcache%>filesize% cache%=filesize%
36270cacherows%=cache%
36280ELSE
36290filesize%=sy%*rowbytes%:IFcache%<rowbytes% cache%=rowbytes%
36300IFcache%>filesize% cache%=filesize%
36310cacherows%=striprows%:IFcacherows%<1 cacherows%=cache%DIVrowbytes%
36320cache%=cacherows%*rowbytes%
36330ENDIF
36340datacache%=FNdim(cache%):PROCrefill:IFcache%>=filesize% rowstogo%=-1
36350ENDIF
36360FORZ=0TO2STEP2:P%=code%
36370CASE ncol OF
36380WHEN 255
36390[OPT Z
36400.fs%
36410STMFD SP !,{R14}
36420LDR R1,[R9,#5*8]:LDR R1,[R1]
36430LDR R10,[R9,#4*8]
36440LDR R11,[R9,#3*8]
36450LDR R12,[R9,#2*8]:LDR R12,[R12]
36460LDR R8,[R9,#8]:LDR R8,[R8]
36470LDR R9,[R9]:LDR R9,[R9]
36480LDR R4,[R10],R8
36490.fsloop
36500TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
36510ADD R0,R4,#256:MOV R0,R0,LSR #bits-8
36520CMP R0,#256:MOVCS R0,#255:STRB R0,[R12],R1
36530MOV R2,R0,LSL #bits-8
36540]
36550IFdither% THEN
36560[OPT Z
36570SUB R4,R4,R2
36580MOVCS R4,#0
36590ADD R2,R4,R4,LSL #1
36600LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
36610STR R3,[R11,-R8]
36620ADD R2,R4,R4,LSL #2
36630LDR R3,[R11]:ADD R3,R3,R2,ASR #4
36640STR R3,[R11]
36650MOV R3,R4,ASR #4
36660STR R3,[R11,R8]!
36670RSB R2,R4,R4,LSL #3
36680LDR R4,[R10],R8
36690ADD R4,R4,R2,ASR #4
36700]
36710ELSE
36720[OPT Z
36730LDR R4,[R10],R8
36740]
36750ENDIF
36760[OPT Z
36770SUBS R9,R9,#1:BNE fsloop
36780LDMFD SP !,{PC}^
36790]
36800WHEN 63
36810IFm$="P" THEN
36820[OPT Z
36830.div15
36840]
36850FORI%=0TO255
36860[OPT Z
36870EQUD (I%AND7 OR (I%AND16)>>1)/bright%*F
36880EQUD (I%AND3 OR (I%AND&60)>>3)/bright%*F
36890EQUD (I%AND3 OR (I%AND8)>>1 OR (I%AND128)>>4)/bright%*F
36900]
36910NEXT
36920[OPT Z
36930.colmatchloc EQUD lookup%
36940EQUD div15
36950]
36960ELSE
36970[OPT Z
36980.div15 EQUD 0
36990EQUD 4/bright%*F
37000EQUD 8/bright%*F
37010EQUD 12/bright%*F
37020]
37030ENDIF
37040[OPT Z
37050.fs%
37060STMFD SP !,{R14}
37070LDR R1,[R9,#5*8]:LDR R1,[R1]
37080LDR R10,[R9,#4*8]
37090LDR R11,[R9,#3*8]
37100LDR R12,[R9,#2*8]:LDR R12,[R12]
37110LDR R8,[R9,#8]:LDR R8,[R8]
37120LDR R9,[R9]:LDR R9,[R9]
37130LDR R4,[R10]
37140LDR R5,[R10,#4]
37150LDR R6,[R10,#8]
37160]
37170IFm$="P" THEN
37180[OPT Z
37190LDR R7,colmatchloc+4
37200]
37210ELSE
37220[OPT Z
37230ADR R7,div15
37240]
37250ENDIF
37260[OPT Z
37270.fsloop
37280ADD R10,R10,R8
37290]
37300IFm$="P" THEN
37310[OPT Z
37320TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
37330MOV R0,R4,LSR #(bits-4):CMP R0,#15:MOVCS R0,#15
37340TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
37350MOV R3,R5,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:ORR R0,R0,R3,LSL #4
37360TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
37370MOV R3,R6,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:ORR R0,R0,R3,LSL #8
37380LDR R3,colmatchloc
37390LDRB R0,[R3,R0]
37400ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
37410LDR R2,[R3],#4:SUB R4,R4,R2
37420LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
37430]
37440ELSE
37450[OPT Z
37460TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
37470MOV R3,R4,LSR #bits-2
37480CMP R3,#4:MOVCS R3,#3
37490SUB R14,R4,R3,LSL #bits-2
37500LDR R2,[R7,R3,LSL #2]
37510SUB R4,R4,R2
37520AND R2,R3,#1:MOV R0,R2,LSL #2
37530AND R2,R3,#2:ORR R0,R0,R2,LSL #3
37540TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
37550MOV R3,R5,LSR #bits-2
37560CMP R3,#4:MOVCS R3,#3
37570SUB R2,R5,R3,LSL #bits-2
37580ADD R14,R14,R2
37590LDR R2,[R7,R3,LSL #2]
37600SUB R5,R5,R2
37610ORR R0,R0,R3,LSL #5
37620TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
37630MOV R3,R6,LSR #bits-2
37640CMP R3,#4:MOVCS R3,#3
37650SUB R2,R6,R3,LSL #bits-2
37660ADD R14,R14,R2
37670LDR R2,[R7,R3,LSL #2]
37680SUB R6,R6,R2
37690AND R2,R3,#1:ORR R0,R0,R2,LSL #3
37700AND R2,R3,#2:ORR R0,R0,R2,LSL #6
37710]
37720IFm$<>"T" THEN
37730[OPT Z
37740ADD R2,R14,R14,LSL #2
37750MOV R2,R2,LSR #bits
37760CMP R2,#3:MOVCS R2,#3
37770ORR R0,R0,R2
37780LDR R2,[R7,R2,LSL #2]
37790SUB R4,R4,R2,LSR #2
37800SUB R5,R5,R2,LSR #2
37810SUB R6,R6,R2,LSR #2
37820]
37830ENDIF
37840ENDIF
37850[OPT Z
37860STRB R0,[R12],R1
37870]
37880IFdither% THEN
37890[OPT Z
37900ADD R0,R11,#4
37910ADD R2,R4,R4,LSL #1
37920LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
37930STR R3,[R11,-R8]
37940ADD R2,R4,R4,LSL #2
37950LDR R3,[R11]:ADD R3,R3,R2,ASR #4
37960STR R3,[R11]
37970MOV R3,R4,ASR #4
37980STR R3,[R11,R8]!
37990RSB R2,R4,R4,LSL #3
38000LDR R4,[R10]
38010ADD R4,R4,R2,ASR #4
38020ADD R2,R5,R5,LSL #1
38030LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
38040STR R3,[R0,-R8]
38050MOV R3,R5,ASR #4
38060STR R3,[R0,R8]
38070ADD R2,R5,R5,LSL #2
38080LDR R3,[R0]:ADD R3,R3,R2,ASR #4
38090STR R3,[R0],#4
38100RSB R2,R5,R5,LSL #3
38110LDR R5,[R10,#4]
38120ADD R5,R5,R2,ASR #4
38130ADD R2,R6,R6,LSL #1
38140LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
38150STR R3,[R0,-R8]
38160ADD R2,R6,R6,LSL #2
38170LDR R3,[R0]:ADD R3,R3,R2,ASR #4
38180STR R3,[R0]
38190MOV R3,R6,ASR #4
38200STR R3,[R0,R8]
38210RSB R2,R6,R6,LSL #3
38220LDR R6,[R10,#8]
38230ADD R6,R6,R2,ASR #4
38240]
38250ELSE
38260[OPT Z
38270LDMIA R10,{R4,R5,R6}
38280]
38290ENDIF
38300[OPT Z
38310SUBS R9,R9,#1:BNE fsloop
38320LDMFD SP !,{PC}^
38330]
38340WHEN 15
38350divtable=P%:CASE m$ OF
38360WHEN "D"
38370WHEN "P"
38380FORI%=0TO15*4STEP4
38390[OPT Z
38400EQUD (palette%!I%>>12AND&F)/bright%*F
38410EQUD (palette%!I%>>20AND&F)/bright%*F
38420EQUD (palette%!I%>>28AND&F)/bright%*F
38430]
38440NEXT
38450[OPT Z
38460.colmatchloc EQUD lookup%
38470]
38480WHEN "C"
38490FORI%=0TO3
38500[OPT Z
38510EQUD I%/(bright%DIV4)*F
38520]
38530NEXT
38540WHEN "T"
38550FORI%=0TO15
38560[OPT Z
38570EQUD I%/bright%*F
38580]
38590NEXT
38600WHEN ""
38610FORI%=0TO7
38620[OPT Z
38630EQUD I%/(bright%DIV2)*F
38640]
38650NEXT
38660ENDCASE
38670[OPT Z
38680.fs%
38690STMFD SP !,{R14}
38700LDR R1,[R9,#5*8]:LDR R1,[R1]
38710LDR R10,[R9,#4*8]
38720LDR R11,[R9,#3*8]
38730LDR R12,[R9,#2*8]:LDR R12,[R12]
38740LDR R8,[R9,#8]:LDR R8,[R8]
38750LDR R9,[R9]:LDR R9,[R9]
38760]
38770IFm$="C" OR m$="D" OR m$="P" THEN
38780[OPT Z
38790LDR R4,[R10]
38800LDR R5,[R10,#4]
38810LDR R6,[R10,#8]
38820]
38830ELSE
38840[OPT Z
38850LDR R4,[R10],R8
38860]
38870ENDIF
38880IFm$="C"ORm$="T"ORm$=""ORm$="P" THEN
38890[OPT Z
38900ADR R7,divtable
38910]
38920ENDIF
38930[OPT Z
38940.fsloop
38950]
38960CASE m$ OF
38970WHEN "P"
38980[OPT Z
38990ADD R10,R10,R8
39000TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
39010MOV R0,R4,LSR #(bits-4):CMP R0,#15:MOVCS R0,#15
39020TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
39030MOV R3,R5,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:ORR R0,R0,R3,LSL #4
39040TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
39050MOV R3,R6,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:ORR R0,R0,R3,LSL #8
39060LDR R3,colmatchloc
39070LDRB R0,[R3,R0]
39080ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
39090LDR R2,[R3],#4:SUB R4,R4,R2
39100LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
39110MOV R3,R0
39120]
39130WHEN "D"
39140[OPT Z
39150ADD R10,R10,R8
39160MOV R3,#0
39170TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
39180CMP R4,#F>>1
39190SUBCS R4,R4,#F:ORRCS R3,R3,#1
39200TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
39210CMP R5,#F>>1
39220SUBCS R5,R5,#F:ORRCS R3,R3,#2
39230TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
39240CMP R6,#F>>1
39250SUBCS R6,R6,#F:ORRCS R3,R3,#4
39260]
39270WHEN "C"
39280[OPT Z
39290ADD R10,R10,R8
39300TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
39310MOV R3,R5,LSR #bits-2:CMP R3,#3:MOVCS R3,#3
39320LDR R2,[R7,R3,LSL #2]
39330SUB R5,R5,R2
39340TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
39350CMP R4,#F>>1
39360SUBCS R4,R4,#F:ORRCS R3,R3,#4
39370TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
39380CMP R6,#F>>1
39390SUBCS R6,R6,#F:ORRCS R3,R3,#8
39400]
39410WHEN "T"
39420[OPT Z
39430TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
39440MOV R3,R4,LSR #bits-4:CMP R3,#15:MOVCS R3,#15
39450LDR R2,[R7,R3,LSL #2]
39460SUB R4,R4,R2
39470]
39480WHEN ""
39490[OPT Z
39500TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
39510MOV R3,R4,LSR #bits-3:CMP R3,#7:MOVCS R3,#7
39520LDR R2,[R7,R3,LSL #2]
39530SUB R4,R4,R2
39540]
39550ENDCASE
39560[OPT Z
39570MOV R2,R12,LSR #1
39580TST R12,#1
39590LDRB R0,[R2]
39600ANDEQ R0,R0,#&F0:ORREQ R0,R0,R3
39610ANDNE R0,R0,#&0F:ORRNE R0,R0,R3,LSL #4
39620STRB R0,[R2]
39630ADD R12,R12,R1
39640]
39650IFm$="C" OR m$="D" OR m$="P" THEN
39660IFdither% THEN
39670[OPT Z
39680ADD R0,R11,#4
39690ADD R2,R4,R4,LSL #1
39700LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
39710STR R3,[R11,-R8]
39720ADD R2,R4,R4,LSL #2
39730LDR R3,[R11]:ADD R3,R3,R2,ASR #4
39740STR R3,[R11]
39750MOV R3,R4,ASR #4
39760STR R3,[R11,R8]!
39770RSB R2,R4,R4,LSL #3
39780LDR R4,[R10]
39790ADD R4,R4,R2,ASR #4
39800ADD R2,R5,R5,LSL #1
39810LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
39820STR R3,[R0,-R8]
39830MOV R3,R5,ASR #4
39840STR R3,[R0,R8]
39850ADD R2,R5,R5,LSL #2
39860LDR R3,[R0]:ADD R3,R3,R2,ASR #4
39870STR R3,[R0],#4
39880RSB R2,R5,R5,LSL #3
39890LDR R5,[R10,#4]
39900ADD R5,R5,R2,ASR #4
39910ADD R2,R6,R6,LSL #1
39920LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
39930STR R3,[R0,-R8]
39940ADD R2,R6,R6,LSL #2
39950LDR R3,[R0]:ADD R3,R3,R2,ASR #4
39960STR R3,[R0]
39970MOV R3,R6,ASR #4
39980STR R3,[R0,R8]
39990RSB R2,R6,R6,LSL #3
40000LDR R6,[R10,#8]
40010ADD R6,R6,R2,ASR #4
40020]
40030ELSE
40040[OPT Z
40050LDMIA R10,{R4,R5,R6}
40060]
40070ENDIF
40080ELSE
40090IFdither% THEN
40100[OPT Z
40110ADD R2,R4,R4,LSL #1
40120LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
40130STR R3,[R11,-R8]
40140ADD R2,R4,R4,LSL #2
40150LDR R3,[R11]:ADD R3,R3,R2,ASR #4
40160STR R3,[R11]
40170MOV R3,R4,ASR #4
40180STR R3,[R11,R8]!
40190RSB R2,R4,R4,LSL #3
40200LDR R4,[R10],R8
40210ADD R4,R4,R2,ASR #4
40220]
40230ELSE
40240[OPT Z
40250LDR R4,[R10],R8
40260]
40270ENDIF
40280ENDIF
40290[OPT Z
40300SUBS R9,R9,#1:BNE fsloop
40310LDMFD SP !,{PC}^
40320]
40330WHEN 3
40340IFm$<>"C" THEN
40350[OPT Z
40360.div3 EQUD 0
40370EQUD 1/(bright%DIV4)*F
40380EQUD 2/(bright%DIV4)*F
40390EQUD F
40400]
40410ENDIF
40420[OPT Z
40430.fs%
40440STMFD SP !,{R14}
40450LDR R1,[R9,#5*8]:LDR R1,[R1]
40460LDR R10,[R9,#4*8]
40470LDR R11,[R9,#3*8]
40480LDR R12,[R9,#2*8]
40490LDR R12,[R12]
40500LDR R8,[R9,#8]
40510LDR R8,[R8]
40520LDR R9,[R9]
40530LDR R9,[R9]
40540]
40550IFm$="C" THEN
40560[OPT Z
40570LDR R4,[R10]
40580LDR R5,[R10,#4]
40590LDR R6,[R10,#8]
40600]
40610ELSE
40620[OPT Z
40630LDR R4,[R10],R8
40640ADR R7,div3
40650]
40660ENDIF
40670[OPT Z
40680.fsloop
40690]
40700IFm$="C" THEN
40710[OPT Z
40720ADD R10,R10,R8
40730TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
40740TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
40750TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
40760MOV R3,#0
40770CMP R4,#F>>1:ORRCS R3,R3,#1
40780CMP R5,#F>>1:ORRCS R3,R3,#2
40790CMP R6,#F>>1:ORRCS R3,R3,#4
40800CMP R3,#6:MOVEQ R3,#1:BEQ octcyan
40810BCS octwhite
40820CMP R3,#4:BEQ octblue
40830MOVCS R3,#2:BCS octmagenta
40840CMP R3,#2:BEQ octgreen
40850BCS octyellow
40860CMP R3,#0:BEQ octblack
40870.octred
40880RSB R0,R4,#F
40890CMP R5,R0
40900BLT octred1
40910CMP R5,R6
40920MOVGE R3,#3
40930MOVLT R3,#2
40940B octconvert
40950.octred1
40960CMP R0,R6
40970MOVGE R3,#0
40980MOVLT R3,#2
40990B octconvert
41000.octgreen
41010RSB R0,R5,#F
41020CMP R0,R4
41030BLT octgreen1
41040CMP R0,R6
41050MOVGE R3,#0
41060MOVLT R3,#1
41070B octconvert
41080.octgreen1
41090CMP R4,R6
41100MOVGE R3,#3
41110MOVLT R3,#1
41120B octconvert
41130.octblue
41140RSB R0,R6,#F
41150CMP R0,R4
41160BLT octblue1
41170CMP R0,R5
41180MOVGE R3,#0
41190MOVLT R3,#1
41200B octconvert
41210.octblue1
41220CMP R4,R5
41230MOVGE R3,#2
41240MOVLT R3,#1
41250B octconvert
41260.octwhite
41270CMP R4,R5
41280BLT octwhite1
41290CMP R5,R6
41300MOVGE R3,#3
41310MOVLT R3,#2
41320B octconvert
41330.octwhite1
41340CMP R4,R6
41350MOVGE R3,#3
41360MOVLT R3,#1
41370.octconvert
41380CMP R3,#1
41390.octcyan
41400SUBEQ R5,R5,#F
41410SUBEQ R6,R6,#F
41420.octmagenta
41430CMP R3,#2
41440SUBEQ R4,R4,#F
41450SUBEQ R6,R6,#F
41460.octyellow
41470CMP R3,#3
41480SUBEQ R4,R4,#F
41490SUBEQ R5,R5,#F
41500.octblack
41510MOV R2,R12,LSR #2
41520AND R7,R12,#3:MOV R7,R7,LSL #1
41530MOV R14,#3
41540MOV R14,R14,LSL R7
41550LDRB R0,[R2]:BIC R0,R0,R14:ORR R0,R0,R3,LSL R7:STRB R0,[R2]
41560ADD R12,R12,R1
41570]
41580IFdither% THEN
41590[OPT Z
41600ADD R0,R11,#4
41610ADD R2,R4,R4,LSL #1
41620LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
41630STR R3,[R11,-R8]
41640ADD R2,R4,R4,LSL #2
41650LDR R3,[R11]:ADD R3,R3,R2,ASR #4
41660STR R3,[R11]
41670MOV R3,R4,ASR #4
41680STR R3,[R11,R8]!
41690RSB R2,R4,R4,LSL #3
41700LDR R4,[R10]
41710ADD R4,R4,R2,ASR #4
41720ADD R2,R5,R5,LSL #1
41730LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
41740STR R3,[R0,-R8]
41750MOV R3,R5,ASR #4
41760STR R3,[R0,R8]
41770ADD R2,R5,R5,LSL #2
41780LDR R3,[R0]:ADD R3,R3,R2,ASR #4
41790STR R3,[R0],#4
41800RSB R2,R5,R5,LSL #3
41810LDR R5,[R10,#4]
41820ADD R5,R5,R2,ASR #4
41830ADD R2,R6,R6,LSL #1
41840LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
41850STR R3,[R0,-R8]
41860ADD R2,R6,R6,LSL #2
41870LDR R3,[R0]:ADD R3,R3,R2,ASR #4
41880STR R3,[R0]
41890MOV R3,R6,ASR #4
41900STR R3,[R0,R8]
41910RSB R2,R6,R6,LSL #3
41920LDR R6,[R10,#8]
41930ADD R6,R6,R2,ASR #4
41940]
41950ELSE
41960[OPT Z
41970LDMIA R10,{R4,R5,R6}
41980]
41990ENDIF
42000ELSE
42010[OPT Z
42020TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
42030MOV R3,R4,LSR #bits-2:CMP R3,#3:MOVCS R3,#3
42040LDR R2,[R7,R3,LSL #2]
42050SUB R4,R4,R2
42060MOV R2,R12,LSR #2
42070AND R5,R12,#3:MOV R5,R5,LSL #1
42080MOV R6,#3:MOV R6,R6,LSL R5
42090LDRB R0,[R2]:BIC R0,R0,R6:ORR R0,R0,R3,LSL R5:STRB R0,[R2]
42100ADD R12,R12,R1
42110]
42120IFdither% THEN
42130[OPT Z
42140ADD R2,R4,R4,LSL #1
42150LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
42160STR R3,[R11,-R8]
42170ADD R2,R4,R4,LSL #2
42180LDR R3,[R11]:ADD R3,R3,R2,ASR #4
42190STR R3,[R11]
42200MOV R3,R4,ASR #4
42210STR R3,[R11,R8]!
42220RSB R2,R4,R4,LSL #3
42230LDR R4,[R10],R8
42240ADD R4,R4,R2,ASR #4
42250]
42260ELSE
42270[OPT Z
42280LDR R4,[R10],R8
42290]
42300ENDIF
42310ENDIF
42320[OPT Z
42330SUBS R9,R9,#1:BNE fsloop
42340LDMFD SP !,{PC}^
42350]
42360WHEN 1
42370CASE m$ OF
42380WHEN"C"
42390[OPT Z
42400.divtable EQUD 0
42410EQUD (1-black%/256*2)/16*F
42420EQUD (2-black%/256*4)/16*F
42430EQUD (3-black%/256*5)/16*F
42440EQUD (4-black%/256*6)/16*F
42450EQUD (5-black%/256*7)/16*F
42460EQUD (6-black%/256*8)/16*F
42470EQUD (7-black%/256*8)/16*F
42480EQUD (8-black%/256*8)/16*F
42490EQUD (9-black%/256*8)/16*F
42500EQUD (10-black%/256*8)/16*F
42510EQUD (11-black%/256*7)/16*F
42520EQUD (12-black%/256*6)/16*F
42530EQUD (13-black%/256*5)/16*F
42540EQUD (14-black%/256*4)/16*F
42550EQUD (15-black%/256*2)/16*F
42560EQUD F
42570.evenrow_gard DCD even_gard
42580.oddrow_gard DCD odd_gard
42590.rowinc DCD 0
42600.fs%
42610STMFD SP !,{R14}
42620LDR R1,[R9,#5*8]:LDR R1,[R1]
42630LDR R10,[R9,#4*8]
42640LDR R11,[R9,#3*8]
42650LDR R12,[R9,#2*8]
42660LDR R12,[R12]
42670LDR R8,[R9,#8]
42680LDR R8,[R8]
42690LDR R9,[R9]
42700LDR R9,[R9]
42710LDR R4,[R10],R8
42720TEQ R8,#0
42730LDRPL R6,evenrow_gard
42740LDRMI R6,oddrow_gard
42750MOV R1,R1,LSL #1
42760LDR R7,rowinc
42770ADR R14,divtable
42780.fsloop
42790TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
42800ADD R5,R4,#F>>5
42810MOVS R5,R5,LSR #bits-4
42820LDRNE R0,[R14,R5,LSL #2]
42830SUBNE R4,R4,R0
42840]
42850IFdither% THEN
42860[OPT Z
42870ADD R2,R4,R4,LSL #1
42880LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
42890STR R3,[R11,-R8]
42900ADD R2,R4,R4,LSL #2
42910LDR R3,[R11]:ADD R3,R3,R2,ASR #4
42920STR R3,[R11]
42930MOV R3,R4,ASR #4
42940STR R3,[R11,R8]!
42950RSB R2,R4,R4,LSL #3
42960LDR R4,[R10],R8
42970ADDS R4,R4,R2,ASR #4
42980]
42990ELSE
43000[OPT Z
43010LDR R4,[R10],R8
43020]
43030ENDIF
43040[OPT Z
43050MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
43060ADD R3,R4,#F>>5
43070MOVS R3,R3,LSR #bits-4
43080LDRNE R0,[R14,R3,LSL #2]
43090SUBNE R4,R4,R0
43100ORR R5,R5,R3,LSL #5:LDR R3,[R6,R5,LSL #2]
43110MOV R2,R12,LSR #1:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2],R7
43120MOV R3,R3,LSR #8:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2]
43130ADD R12,R12,R1
43140]
43150IFdither% THEN
43160[OPT Z
43170ADD R2,R4,R4,LSL #1
43180LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
43190STR R3,[R11,-R8]
43200ADD R2,R4,R4,LSL #2
43210LDR R3,[R11]:ADD R3,R3,R2,ASR #4
43220STR R3,[R11]
43230MOV R3,R4,ASR #4
43240STR R3,[R11,R8]!
43250RSB R2,R4,R4,LSL #3
43260LDR R4,[R10],R8
43270ADD R4,R4,R2,ASR #4
43280]
43290ELSE
43300[OPT Z
43310LDR R4,[R10],R8
43320]
43330ENDIF
43340[OPT Z
43350SUBS R9,R9,#2:BNE fsloop
43360LDMFD SP !,{PC}^
43370]
43380WHEN"T"
43390[OPT Z
43400.divtable EQUD 0
43410EQUD (1-black%/256*2)/9*F
43420EQUD (2-black%/256*4)/9*F
43430EQUD (3-black%/256*5)/9*F
43440EQUD (4-black%/256*6)/9*F
43450EQUD (5-black%/256*6)/9*F
43460EQUD (6-black%/256*5)/9*F
43470EQUD (7-black%/256*4)/9*F
43480EQUD (8-black%/256*2)/9*F
43490EQUD F
43500.evenrow_gard DCD even_gard
43510.oddrow_gard DCD odd_gard
43520.rowinc DCD 0
43530.fs%
43540STMFD SP !,{R14}
43550LDR R1,[R9,#5*8]:LDR R1,[R1]
43560LDR R10,[R9,#4*8]
43570LDR R11,[R9,#3*8]
43580LDR R12,[R9,#2*8]
43590LDR R12,[R12]
43600LDR R8,[R9,#8]
43610LDR R8,[R8]
43620LDR R9,[R9]
43630LDR R9,[R9]
43640LDR R4,[R10],R8
43650TEQ R8,#0
43660LDRPL R6,evenrow_gard
43670LDRMI R6,oddrow_gard
43680MOV R1,R1,LSL #1
43690LDR R7,rowinc
43700ADR R14,divtable
43710.fsloop
43720TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
43730ADD R5,R4,#F>>4
43740ADD R5,R5,R5,LSL #3
43750MOVS R5,R5,LSR #bits
43760LDRNE R0,[R14,R5,LSL #2]
43770SUBNE R4,R4,R0
43780]
43790IFdither% THEN
43800[OPT Z
43810ADD R2,R4,R4,LSL #1
43820LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
43830STR R3,[R11,-R8]
43840ADD R2,R4,R4,LSL #2
43850LDR R3,[R11]:ADD R3,R3,R2,ASR #4
43860STR R3,[R11]
43870MOV R3,R4,ASR #4
43880STR R3,[R11,R8]!
43890RSB R2,R4,R4,LSL #3
43900LDR R4,[R10],R8
43910ADDS R4,R4,R2,ASR #4
43920]
43930ELSE
43940[OPT Z
43950LDR R4,[R10],R8
43960]
43970ENDIF
43980[OPT Z
43990MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
44000ADD R3,R4,#F>>4
44010ADD R3,R3,R3,LSL #3
44020MOVS R3,R3,LSR #bits
44030LDRNE R0,[R14,R3,LSL #2]
44040SUBNE R4,R4,R0
44050ORR R5,R5,R3,LSL #4:LDR R5,[R6,R5,LSL #2]
44060MOV R2,R12,LSR #1
44070AND R3,R5,#&3F
44080STRB R3,[R2],R7
44090MOV R3,R5,LSR #6:AND R3,R3,#&3F
44100STRB R3,[R2],R7
44110MOV R3,R5,LSR #12:STRB R3,[R2]
44120ADD R12,R12,R1
44130]
44140IFdither% THEN
44150[OPT Z
44160ADD R2,R4,R4,LSL #1
44170LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
44180STR R3,[R11,-R8]
44190ADD R2,R4,R4,LSL #2
44200LDR R3,[R11]:ADD R3,R3,R2,ASR #4
44210STR R3,[R11]
44220MOV R3,R4,ASR #4
44230STR R3,[R11,R8]!
44240RSB R2,R4,R4,LSL #3
44250LDR R4,[R10],R8
44260ADD R4,R4,R2,ASR #4
44270]
44280ELSE
44290[OPT Z
44300LDR R4,[R10],R8
44310]
44320ENDIF
44330[OPT Z
44340SUBS R9,R9,#2:BNE fsloop
44350LDMFD SP !,{PC}^
44360]
44370WHEN"D"
44380[OPT Z
44390.divtable EQUD 0
44400EQUD (1-black%/256*2)/4*F
44410EQUD (2-black%/256*4)/4*F
44420EQUD (3-black%/256*2)/4*F
44430EQUD F
44440.evenrow_gard DCD even_gard
44450.oddrow_gard DCD odd_gard
44460.rowinc DCD 0
44470.fs%
44480STMFD SP !,{R14}
44490LDR R1,[R9,#5*8]:LDR R1,[R1]
44500LDR R10,[R9,#4*8]
44510LDR R11,[R9,#3*8]
44520LDR R12,[R9,#2*8]
44530LDR R12,[R12]
44540LDR R8,[R9,#8]
44550LDR R8,[R8]
44560LDR R9,[R9]
44570LDR R9,[R9]
44580LDR R4,[R10],R8
44590TEQ R8,#0
44600LDRPL R6,evenrow_gard
44610LDRMI R6,oddrow_gard
44620MOV R1,R1,LSL #1
44630LDR R7,rowinc
44640ADR R14,divtable
44650.fsloop
44660TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
44670ADD R5,R4,#F>>3
44680MOVS R5,R5,LSR #bits-2
44690LDRNE R0,[R14,R5,LSL #2]
44700SUBNE R4,R4,R0
44710]
44720IFdither% THEN
44730[OPT Z
44740ADD R2,R4,R4,LSL #1
44750LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
44760STR R3,[R11,-R8]
44770ADD R2,R4,R4,LSL #2
44780LDR R3,[R11]:ADD R3,R3,R2,ASR #4
44790STR R3,[R11]
44800MOV R3,R4,ASR #4
44810STR R3,[R11,R8]!
44820RSB R2,R4,R4,LSL #3
44830LDR R4,[R10],R8
44840ADDS R4,R4,R2,ASR #4
44850]
44860ELSE
44870[OPT Z
44880LDR R4,[R10],R8
44890]
44900ENDIF
44910[OPT Z
44920MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
44930ADD R3,R4,#F>>3
44940MOVS R3,R3,LSR #bits-2
44950LDRNE R0,[R14,R3,LSL #2]
44960SUBNE R4,R4,R0
44970ORR R5,R5,R3,LSL #3:LDRB R5,[R6,R5]
44980MOV R2,R12,LSR #2
44990TST R12,#2
45000AND R3,R5,#&F:LDRB R0,[R2]
45010ANDEQ R0,R0,#&F0:ORREQ R0,R0,R3
45020ANDNE R0,R0,#&0F:ORRNE R0,R0,R3,LSL #4
45030STRB R0,[R2],R7
45040MOV R3,R5,LSR #4:LDRB R0,[R2]
45050ANDEQ R0,R0,#&F0:ORREQ R0,R0,R3
45060ANDNE R0,R0,#&0F:ORRNE R0,R0,R3,LSL #4
45070STRB R0,[R2]
45080ADD R12,R12,R1
45090]
45100IFdither% THEN
45110[OPT Z
45120ADD R2,R4,R4,LSL #1
45130LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
45140STR R3,[R11,-R8]
45150ADD R2,R4,R4,LSL #2
45160LDR R3,[R11]:ADD R3,R3,R2,ASR #4
45170STR R3,[R11]
45180MOV R3,R4,ASR #4
45190STR R3,[R11,R8]!
45200RSB R2,R4,R4,LSL #3
45210LDR R4,[R10],R8
45220ADD R4,R4,R2,ASR #4
45230]
45240ELSE
45250[OPT Z
45260LDR R4,[R10],R8
45270]
45280ENDIF
45290[OPT Z
45300SUBS R9,R9,#2:BNE fsloop
45310LDMFD SP !,{PC}^
45320]
45330OTHERWISE
45340[OPT Z
45350.fs%
45360STMFD SP !,{R14}
45370LDR R1,[R9,#5*8]:LDR R1,[R1]
45380LDR R10,[R9,#4*8]
45390LDR R11,[R9,#3*8]
45400LDR R12,[R9,#2*8]
45410LDR R12,[R12]
45420LDR R8,[R9,#8]
45430LDR R8,[R8]
45440LDR R9,[R9]
45450LDR R9,[R9]
45460LDR R4,[R10],R8
45470MOV R7,#1
45480.fsloop
45490TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
45500]
45510IFblack% THEN
45520[OPT Z
45530MOV R2,R12,LSR #3
45540AND R5,R12,#7:MOV R6,#1:MOV R6,R6,LSL R5
45550LDRB R0,[R2,#-(x%+7>>3)]
45560SUB R3,R4,#F
45570CMP R7,#0
45580ADDNE R4,R4,#black%<<(bits-8)
45590ADDEQ R3,R3,#black%<<(bits-8)
45600TST R0,R6
45610ADDNE R4,R4,#black%<<(bits-8)
45620ADDEQ R3,R3,#black%<<(bits-8)
45630MOVS R0,R3:RSBMI R0,R3,#0
45640CMP R4,R0
45650MOVCC R3,#0
45660MOVCS R4,R3:MOVCS R3,#1
45670MOV R7,R3
45680]
45690ELSE
45700[OPT Z
45710ADD R3,R4,#F>>1:MOV R3,R3,LSR #bits
45720SUB R4,R4,R3,LSL #bits
45730MOV R2,R12,LSR #3
45740AND R5,R12,#7:MOV R6,#1:MOV R6,R6,LSL R5
45750]
45760ENDIF
45770[OPT Z
45780LDRB R0,[R2]:BIC R0,R0,R6:ORR R0,R0,R3,LSL R5
45790STRB R0,[R2]
45800ADD R12,R12,R1
45810]
45820IFdither% THEN
45830[OPT Z
45840ADD R2,R4,R4,LSL #1
45850LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
45860STR R3,[R11,-R8]
45870ADD R2,R4,R4,LSL #2
45880LDR R3,[R11]:ADD R3,R3,R2,ASR #4
45890STR R3,[R11]
45900MOV R3,R4,ASR #4
45910STR R3,[R11,R8]!
45920RSB R2,R4,R4,LSL #3
45930LDR R4,[R10],R8
45940ADD R4,R4,R2,ASR #4
45950]
45960ELSE
45970[OPT Z
45980LDR R4,[R10],R8
45990]
46000ENDIF
46010[OPT Z
46020SUBS R9,R9,#1:BNE fsloop
46030LDMFD SP !,{PC}^
46040]
46050ENDCASE
46060ENDCASE
46070[OPT Z
46080.sxloc DCD sx%
46090]
46100CASE col OF
46110WHEN 0
46120IFinput<=8 THEN
46130[OPT Z
46140.mappix%
46150LDR R0,sxloc
46160LDR R1,[R9]:LDR R1,[R1]
46170LDR R2,[R9,#3*8]
46180LDR R5,[R9,#4*8]
46190.mappixlp
46200LDRB R6,[R1],#step24
46210]
46220ENDIF
46230CASE input OF
46240WHEN 8
46250[OPT Z
46260LDR R7,[R2,R6,LSL #2]:STR R7,[R5],#4
46270SUBS R0,R0,#1:BNE mappixlp
46280MOVS PC,R14
46290]
46300WHEN 4
46310IFbigendianbits THEN
46320[OPT Z
46330MOV R10,R6,LSR #4
46340LDR R7,[R2,R10,LSL #2]
46350AND R10,R6,#&F
46360]
46370ELSE
46380[OPT Z
46390AND R10,R6,#&F
46400LDR R7,[R2,R10,LSL #2]
46410MOV R10,R6,LSR #4
46420]
46430ENDIF
46440[OPT Z
46450LDR R8,[R2,R10,LSL #2]:STMIA R5!,{R7,R8}
46460SUBS R0,R0,#2:BHI mappixlp
46470MOVS PC,R14
46480]
46490WHEN 2
46500IFbigendianbits THEN
46510[OPT Z
46520MOV R10,R6,LSR #6
46530LDR R7,[R2,R10,LSL #2]
46540AND R10,R6,#&30
46550LDR R8,[R2,R10,LSR #2]
46560AND R10,R6,#&C
46570LDR R9,[R2,R10]
46580AND R10,R6,#&3
46590]
46600ELSE
46610[OPT Z
46620AND R10,R6,#&3
46630LDR R7,[R2,R10,LSL #2]
46640AND R10,R6,#&C
46650LDR R8,[R2,R10]
46660AND R10,R6,#&30
46670LDR R9,[R2,R10,LSR #2]
46680MOV R10,R6,LSR #6
46690]
46700ENDIF
46710[OPT Z
46720LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
46730SUBS R0,R0,#4:BHI mappixlp
46740MOVS PC,R14
46750]
46760WHEN 1
46770IFbigendianbits THEN
46780[OPT Z
46790AND R10,R6,#&80
46800LDR R7,[R2,R10,LSR #5]
46810AND R10,R6,#&40
46820LDR R8,[R2,R10,LSR #4]
46830AND R10,R6,#&20
46840LDR R9,[R2,R10,LSR #3]
46850AND R10,R6,#&10
46860LDR R10,[R2,R10,LSR #2]:STMIA R5!,{R7,R8,R9,R10}
46870AND R10,R6,#&8
46880LDR R7,[R2,R10,LSR #1]
46890AND R10,R6,#&4
46900LDR R8,[R2,R10]
46910AND R10,R6,#&2
46920LDR R9,[R2,R10,LSL #1]
46930AND R10,R6,#&1
46940]
46950ELSE
46960[OPT Z
46970AND R10,R6,#&1
46980LDR R7,[R2,R10,LSL #2]
46990AND R10,R6,#&2
47000LDR R8,[R2,R10,LSL #1]
47010AND R10,R6,#&4
47020LDR R9,[R2,R10]
47030AND R10,R6,#&8
47040LDR R10,[R2,R10,LSR #1]:STMIA R5!,{R7,R8,R9,R10}
47050AND R10,R6,#&10
47060LDR R7,[R2,R10,LSR #2]
47070AND R10,R6,#&20
47080LDR R8,[R2,R10,LSR #3]
47090AND R10,R6,#&40
47100LDR R9,[R2,R10,LSR #4]
47110MOV R10,R6,LSR #7
47120]
47130ENDIF
47140[OPT Z
47150LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
47160SUBS R0,R0,#8:BHI mappixlp
47170MOVS PC,R14
47180]
47190WHEN 16
47200[OPT Z
47210.mappix%
47220LDR R0,sxloc
47230LDR R1,[R9]:LDR R1,[R1]
47240LDR R2,[R9,#8]:LDR R2,[R2]
47250LDR R3,[R9,#4*8]
47260LDR R4,[R9,#3*8]
47270LDR R5,[R9,#2*8]
47280LDR R6,[R9,#5*8]
47290LDR R7,[R9,#6*8]
47300LDR R8,[R9,#7*8]
47310CMP R1,R2
47320ADDEQ R2,R2,#1
47330.mappixlp
47340LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
47350LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:ORR R9,R9,R10
47360AND R10,R9,#255:LDR R10,[R3,R10,LSL #2]
47370MOV R11,R9,LSR #8:AND R11,R11,#255:LDR R11,[R4,R11,LSL #2]
47380MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
47390ADD R10,R10,R11:ADD R10,R10,R12:STMIA R8!,{R10}
47400SUBS R0,R0,#1:BNE mappixlp
47410MOVS PC,R14
47420]
47430WHEN 24
47440[OPT Z
47450.mappix%
47460LDR R0,sxloc
47470LDR R1,[R9,#2*8]:LDR R1,[R1]
47480LDR R2,[R9,#8]:LDR R2,[R2]
47490LDR R3,[R9]:LDR R3,[R3]
47500LDR R4,[R9,#5*8]
47510LDR R5,[R9,#4*8]
47520LDR R6,[R9,#3*8]
47530LDR R7,[R9,#6*8]
47540.mappixlp
47550LDRB R8,[R1],#step24:LDR R8,[R4,R8,LSL #2]
47560LDRB R9,[R2],#step24:LDR R9,[R5,R9,LSL #2]:ADD R8,R8,R9
47570LDRB R9,[R3],#step24:LDR R9,[R6,R9,LSL #2]:ADD R8,R8,R9:STR R8,[R7],#4
47580SUBS R0,R0,#1:BNE mappixlp
47590MOVS PC,R14
47600]
47610WHEN 422
47620[OPT Z
47630.mappix%
47640LDR R0,sxloc
47650LDR R1,[R9]:LDR R1,[R1]
47660ADD R1,R1,#1
47670LDR R4,[R9,#1*8]
47680LDR R7,[R9,#8*8]
47690.mappixlp
47700LDRB R8,[R1],#2
47710LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
47720SUBS R0,R0,#1:BNE mappixlp
47730MOVS PC,R14
47740]
47750ENDCASE
47760[OPT Z
47770.xsample%
47780LDR R0,[R9]:LDR R0,[R0]
47790LDR R1,[R9,#8]
47800LDR R2,[R9,#2*8]
47810LDR R3,[R9,#3*8]:LDR R3,[R3]
47820LDR R4,[R9,#4*8]:LDR R4,[R4]
47830MOV R11,R4
47840.xsamplelp
47850LDMIA R1,{R5}
47860SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#4
47870SUBS R12,R3,#1
47880BEQ xdonediv
47890.xdivlp
47900CMP R12,R11
47910BCC xdivlp2
47920LDMIA R1!,{R8}:MLA R5,R8,R11,R5
47930SUBS R12,R12,R11:MOV R11,R4
47940BNE xdivlp
47950B xdonediv
47960.xdivlp2
47970LDMIA R1,{R8}
47980SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#4
47990ADD R5,R5,R8
48000SUBS R12,R12,#1:BNE xdivlp
48010.xdonediv
48020STMIA R2!,{R5}
48030SUBS R0,R0,#1:BPL xsamplelp
48040MOVS PC,R14
48050]
48060WHEN 2
48070IFinput<=8 THEN
48080[OPT Z
48090.mappix%
48100LDR R0,sxloc
48110LDR R1,[R9]:LDR R1,[R1]
48120LDR R2,[R9,#3*8]
48130LDR R3,[R9,#2*8]
48140LDR R4,[R9,#8]
48150LDR R5,[R9,#4*8]
48160.mappixlp
48170LDRB R6,[R1],#step24
48180]
48190ENDIF
48200CASE input OF
48210WHEN 8
48220IFham THEN
48230[OPT Z
48240ADR R9,ltable
48250MOVS R7,R6,LSR #4:AND R6,R6,#15
48260LDREQ R10,[R2,R6,LSL #2]:LDREQ R11,[R3,R6,LSL #2]:LDREQ R12,[R4,R6,LSL #2]
48270CMP R7,#1:LDREQ R12,[R9,R6,LSL #2]
48280CMP R7,#2:LDREQ R10,[R9,R6,LSL #2]
48290CMP R7,#3:LDREQ R11,[R9,R6,LSL #2]
48300STMIA R5!,{R10,R11,R12}
48310SUBS R0,R0,#1:BNE mappixlp
48320MOVS PC,R14
48330.ltable
48340]
48350FORI%=0TO15
48360[OPT Z
48370EQUD I%/15*F
48380]
48390NEXT
48400ELSE
48410[OPT Z
48420LDR R7,[R2,R6,LSL #2]:LDR R8,[R3,R6,LSL #2]:LDR R9,[R4,R6,LSL #2]
48430STMIA R5!,{R7,R8,R9}
48440SUBS R0,R0,#1:BNE mappixlp
48450MOVS PC,R14
48460]
48470ENDIF
48480WHEN 4
48490IFbigendianbits THEN
48500[OPT Z
48510MOV R10,R6,LSR #4
48520LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
48530STMIA R5!,{R7,R8,R9}
48540AND R10,R6,#&F
48550]
48560ELSE
48570[OPT Z
48580AND R10,R6,#&F
48590LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
48600STMIA R5!,{R7,R8,R9}
48610MOV R10,R6,LSR #4
48620]
48630ENDIF
48640[OPT Z
48650LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
48660STMIA R5!,{R7,R8,R9}
48670SUBS R0,R0,#2:BHI mappixlp
48680MOVS PC,R14
48690]
48700WHEN 2
48710IFbigendianbits THEN
48720[OPT Z
48730MOV R10,R6,LSR #6
48740LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
48750STMIA R5!,{R7,R8,R9}
48760AND R10,R6,#&30
48770LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
48780STMIA R5!,{R7,R8,R9}
48790AND R10,R6,#&C
48800LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
48810STMIA R5!,{R7,R8,R9}
48820AND R10,R6,#&3
48830]
48840ELSE
48850[OPT Z
48860AND R10,R6,#&3
48870LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
48880STMIA R5!,{R7,R8,R9}
48890AND R10,R6,#&C
48900LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
48910STMIA R5!,{R7,R8,R9}
48920AND R10,R6,#&30
48930LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
48940STMIA R5!,{R7,R8,R9}
48950MOV R10,R6,LSR #6
48960]
48970ENDIF
48980[OPT Z
48990LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
49000STMIA R5!,{R7,R8,R9}
49010SUBS R0,R0,#4:BHI mappixlp
49020MOVS PC,R14
49030]
49040WHEN 1
49050IFbigendianbits THEN
49060[OPT Z
49070AND R10,R6,#&80
49080LDR R7,[R2,R10,LSR #5]:LDR R8,[R3,R10,LSR #5]:LDR R9,[R4,R10,LSR #5]
49090STMIA R5!,{R7,R8,R9}
49100AND R10,R6,#&40
49110LDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
49120STMIA R5!,{R7,R8,R9}
49130AND R10,R6,#&20
49140LDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
49150STMIA R5!,{R7,R8,R9}
49160AND R10,R6,#&10
49170LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
49180STMIA R5!,{R7,R8,R9}
49190AND R10,R6,#&8
49200LDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
49210STMIA R5!,{R7,R8,R9}
49220AND R10,R6,#&4
49230LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
49240STMIA R5!,{R7,R8,R9}
49250AND R10,R6,#&2
49260LDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
49270STMIA R5!,{R7,R8,R9}
49280AND R10,R6,#&1
49290]
49300ELSE
49310[OPT Z
49320AND R10,R6,#&1
49330LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
49340STMIA R5!,{R7,R8,R9}
49350AND R10,R6,#&2
49360LDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
49370STMIA R5!,{R7,R8,R9}
49380AND R10,R6,#&4
49390LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
49400STMIA R5!,{R7,R8,R9}
49410AND R10,R6,#&8
49420LDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
49430STMIA R5!,{R7,R8,R9}
49440AND R10,R6,#&10
49450LDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
49460STMIA R5!,{R7,R8,R9}
49470AND R10,R6,#&20
49480LDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
49490STMIA R5!,{R7,R8,R9}
49500AND R10,R6,#&40
49510LDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
49520STMIA R5!,{R7,R8,R9}
49530MOV R10,R6,LSR #7
49540]
49550ENDIF
49560[OPT Z
49570LDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
49580STMIA R5!,{R7,R8,R9}
49590SUBS R0,R0,#8:BHI mappixlp
49600MOVS PC,R14
49610]
49620WHEN 16
49630[OPT Z
49640.mappix%
49650LDR R0,sxloc
49660LDR R1,[R9]:LDR R1,[R1]
49670LDR R2,[R9,#8]:LDR R2,[R2]
49680LDR R3,[R9,#4*8]
49690LDR R4,[R9,#3*8]
49700LDR R5,[R9,#2*8]
49710LDR R6,[R9,#5*8]
49720LDR R7,[R9,#6*8]
49730LDR R8,[R9,#7*8]
49740CMP R1,R2
49750ADDEQ R2,R2,#1
49760.mappixlp
49770LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
49780LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:ORR R9,R9,R10
49790AND R10,R9,#255:LDR R10,[R3,R10,LSL #2]
49800MOV R11,R9,LSR #8:AND R11,R11,#255:LDR R11,[R4,R11,LSL #2]
49810MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
49820STMIA R8!,{R10,R11,R12}
49830SUBS R0,R0,#1:BNE mappixlp
49840MOVS PC,R14
49850]
49860WHEN 24
49870[OPT Z
49880.mappix%
49890LDR R0,sxloc
49900LDR R1,[R9,#2*8]:LDR R1,[R1]
49910LDR R2,[R9,#8]:LDR R2,[R2]
49920LDR R3,[R9]:LDR R3,[R3]
49930LDR R4,[R9,#5*8]
49940LDR R5,[R9,#4*8]
49950LDR R6,[R9,#3*8]
49960LDR R7,[R9,#6*8]
49970.mappixlp
49980LDRB R8,[R1],#step24:LDR R9,[R4,R8,LSL #2]
49990LDRB R8,[R2],#step24:LDR R10,[R5,R8,LSL #2]
50000LDRB R8,[R3],#step24:LDR R11,[R6,R8,LSL #2]
50010STMIA R7!,{R9,R10,R11}
50020SUBS R0,R0,#1:BNE mappixlp
50030MOVS PC,R14
50040]
50050WHEN 423
50060[OPT Z
50070.mappix%
50080LDR R0,sxloc
50090LDR R1,[R9]:LDR R1,[R1]
50100LDR R2,[R9,#1*8]
50110LDR R3,[R9,#2*8]
50120LDR R4,[R9,#3*8]
50130LDR R5,[R9,#4*8]
50140LDR R6,[R9,#5*8]
50150LDR R7,[R9,#6*8]
50160LDR R8,[R9,#7*8]
50170LDR R9,[R9,#8*8]
50180STMFD SP !,{R14}
50190.mappixlp
50200LDR R10,[R1],#4
50210AND R11,R10,#&FF00
50220LDR R11,[R2,R11,LSR #6]
50230AND R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
50240AND R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
50250MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50260AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
50270AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
50280MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50290AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
50300AND R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
50310MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50320AND R11,R10,#&FF000000
50330LDR R11,[R2,R11,LSR #22]
50340AND R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
50350AND R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
50360MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50370AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
50380AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
50390MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50400AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
50410AND R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
50420MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50430SUBS R0,R0,#2:BNE mappixlp
50440LDMFD SP !,{PC}^
50450]
50460WHEN 422
50470[OPT Z
50480.mappix%
50490LDR R0,sxloc
50500LDR R1,[R9]:LDR R1,[R1]
50510LDR R2,[R9,#1*8]
50520LDR R3,[R9,#2*8]
50530LDR R5,[R9,#4*8]
50540LDR R6,[R9,#5*8]
50550LDR R7,[R9,#6*8]
50560LDR R9,[R9,#8*8]
50570STMFD SP !,{R14}
50580.mappixlp
50590LDR R10,[R1],#4
50600AND R11,R10,#&FF00
50610LDR R11,[R2,R11,LSR #6]
50620AND R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
50630MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50640AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
50650AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
50660MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50670AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
50680MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50690AND R11,R10,#&FF000000
50700LDR R11,[R2,R11,LSR #22]
50710AND R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
50720MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50730AND R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
50740AND R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
50750MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50760AND R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
50770MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
50780SUBS R0,R0,#2:BNE mappixlp
50790LDMFD SP !,{PC}^
50800]
50810ENDCASE
50820[OPT Z
50830.xsample%
50840LDR R0,[R9]:LDR R0,[R0]
50850LDR R1,[R9,#8]
50860LDR R2,[R9,#2*8]
50870LDR R3,[R9,#3*8]:LDR R3,[R3]
50880LDR R4,[R9,#4*8]:LDR R4,[R4]
50890MOV R11,R4
50900.xsamplelp
50910LDMIA R1,{R5,R6,R7}
50920SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#12
50930SUBS R12,R3,#1
50940BEQ xdonediv
50950.xdivlp
50960CMP R12,R11
50970BCC xdivlp2
50980LDMIA R1!,{R8,R9,R10}:MLA R5,R8,R11,R5:MLA R6,R9,R11,R6:MLA R7,R10,R11,R7
50990SUBS R12,R12,R11:MOV R11,R4
51000BNE xdivlp
51010B xdonediv
51020.xdivlp2
51030LDMIA R1,{R8,R9,R10}
51040SUBS R11,R11,#1:MOVEQ R11,R4:ADDEQ R1,R1,#12
51050ADD R5,R5,R8:ADD R6,R6,R9:ADD R7,R7,R10
51060SUBS R12,R12,#1:BNE xdivlp
51070.xdonediv
51080STMIA R2!,{R5,R6,R7}
51090SUBS R0,R0,#1:BPL xsamplelp
51100MOVS PC,R14
51110]
51120ENDCASE
51130IFcompression=5 THEN
51140[OPT Z
51150.firstcode DCD 0
51160.oldcode DCD 0
51170.codesize DCD setcodes%+1
51180.stack DCD stk%
51190.sp DCD stk%
51200.maxcode DCD clearcode%+2
51210.maxcodesize DCD 2*clearcode%
51220.LZWdecode%
51230LDR R2,firstcode:LDR R3,oldcode:LDR R4,stack:LDR R5,codesize
51240LDR R6,sp:LDR R7,maxcode:LDR R8,maxcodesize
51250LDR R10,[R9]:LDR R10,[R10]
51260LDR R11,[R9,#8]:LDR R11,[R11]
51270LDR R12,[R9,#24]
51280STMFD SP !,{R14}
51290.lzwloop
51300CMP R6,R4
51310BHI lzwunstack
51320.lzwengine
51330BL getcode
51340CMP R0,#clearcode%
51350BEQ lzwclear
51360MOV R1,R0
51370CMP R0,R7
51380STRCSB R2,[R6],#1
51390MOVCS R0,R3
51400CMP R0,#clearcode%
51410BCC lzwdonepush
51420.lzwpushtable
51430LDR R14,[R12,R0,LSL #2]
51440STRB R14,[R6],#1
51450MOV R0,R14,LSR #16
51460CMP R0,#clearcode%
51470BCS lzwpushtable
51480.lzwdonepush
51490LDR R2,[R12,R0,LSL #2]
51500BIC R2,R2,#&FF0000
51510BIC R2,R2,#&FF000000
51520STRB R2,[R6],#1
51530CMP R7,#4096
51540BCS lzwnocode
51550ORR R0,R2,R3,LSL #16
51560STR R0,[R12,R7,LSL #2]
51570ADD R7,R7,#1
51580CMP R7,R8
51590BCC lzwnocode
51600CMP R8,#4096
51610ADDCC R5,R5,#1
51620MOVCC R8,R8,LSL #1
51630]
51640IFflag=1500 THEN
51650[OPT Z
51660ORRCC R8,R8,#1
51670]
51680ENDIF
51690[OPT Z
51700.lzwnocode
51710MOV R3,R1
51720CMP R6,R4
51730BLS lzwengine
51740.lzwunstack
51750LDRB R0,[R6,#-1]!
51760.lzwloopend
51770STRB R0,[R11],#1
51780SUBS R10,R10,#1
51790BNE lzwloop
51800STR R2,firstcode:STR R3,oldcode:STR R5,codesize
51810STR R6,sp:STR R7,maxcode:STR R8,maxcodesize
51820LDMFD SP !,{PC}^
51830.lzwclear
51840MOV R0,#0
51850MOV R3,R12
51860.lzwdefaulttable
51870STR R0,[R3],#4
51880ADD R0,R0,#1:CMP R0,#clearcode%
51890BCC lzwdefaulttable
51900MOV R5,#setcodes%+1
51910MOV R7,#clearcode%
51920MOV R8,R7,LSL #1
51930]
51940IFflag=1500 THEN
51950[OPT Z
51960SUB R8,R8,#1
51970]
51980ENDIF
51990[OPT Z
52000ADD R7,R7,#2
52010BL getcode
52020MOV R2,R0
52030MOV R3,R0
52040MOV R6,R4
52050B lzwloopend
52060.curbit DCD 0
52070.lastbit DCD 0
52080.buf DCD buf%
52090.getcode
52100STMFD SP !,{R6,R7,R8}
52110ADR R6,curbit
52120LDMIA R6,{R6,R7,R8}
52130ADD R1,R5,R6
52140CMP R1,R7
52150BCS needmoredata
52160.simplecode
52170ADD R7,R8,R6,LSR #3
52180BIC R7,R7,#3
52190LDMIA R7,{R0,R7}
52200]
52210IFflag=1500 THEN
52220[OPT Z
52230EOR R1,R0,R0,ROR #16
52240BIC R1,R1,#&FF0000
52250MOV R0,R0,ROR #8
52260EOR R0,R0,R1,LSR #8
52270EOR R1,R7,R7,ROR #16
52280BIC R1,R1,#&FF0000
52290MOV R7,R7,ROR #8
52300EOR R7,R7,R1,LSR #8
52310ANDS R1,R6,#31:MOVNE R0,R0,LSL R1:RSBNE R1,R1,#32:ORRNE R0,R0,R7,LSR R1
52320RSB R1,R5,#32
52330MOV R0,R0,LSR R1
52340]
52350ELSE
52360[OPT Z
52370ANDS R1,R6,#31:MOVNE R0,R0,LSR R1:RSBNE R1,R1,#32:ORRNE R0,R0,R7,LSL R1
52380MVN R1,#0:BIC R0,R0,R1,LSL R5
52390]
52400ENDIF
52410[OPT Z
52420ADD R6,R6,R5
52430STR R6,curbit
52440LDMFD SP !,{R6,R7,R8}
52450MOV PC,R14
52460.needmoredata
52470STMFD SP !,{R2,R3,R4}
52480MOV R3,R7,LSR #3
52490SUB R0,R3,#2
52500LDRB R0,[R8,R0]
52510STRB R0,[R8]
52520SUB R0,R3,#1
52530LDRB R0,[R8,R0]
52540STRB R0,[R8,#1]
52550LDR R1,[R9,#16]
52560LDR R1,[R1]
52570]
52580IFflag=1500 THEN
52590[OPT Z
52600MOV R0,#256
52610MOV R3,#256
52620]
52630ELSE
52640[OPT Z
52650SWI "OS_BGet"
52660MOVS R3,R0
52670BEQ simplecode1
52680]
52690ENDIF
52700[OPT Z
52710SUB R6,R6,R7
52720ADD R6,R6,#16
52730ADD R0,R0,#2
52740MOV R7,R0,LSL #3
52750STR R7,lastbit
52760MOV R0,#4
52770ADD R2,R8,#2
52780SWI "OS_GBPB"
52790.simplecode1
52800LDMFD SP !,{R2,R3,R4}
52810B simplecode
52820]
52830ENDIF
52840IFrange% THEN
52850[OPT Z
52860.maxmin%
52870LDR R0,[R9]:LDR R0,[R0]
52880LDR R1,[R9,#8]
52890LDR R2,min
52900LDR R3,max
52910.maxminlp
52920LDR R4,[R1],#4
52930CMP R4,R3:MOVCS R3,R4
52940CMP R4,R2:MOVCC R2,R4
52950SUBS R0,R0,#1:BNE maxminlp
52960STR R2,min
52970STR R3,max
52980MOVS PC,R14
52990.min DCD F
53000.max DCD 0
53010]
53020ENDIF
53030IFsharpen% THEN
53040sharp=(col+1)*4:IFsharpen%<>8 sharpmul%=F/(sharpen%-8)
53050[OPT Z
53060.sharp%
53070LDR R0,[R9]:LDR R0,[R0]
53080LDR R1,[R9,#8]
53090LDR R2,[R9,#16]
53100LDR R3,[R9,#24]
53110LDR R4,[R9,#32]
53120]
53130CASE sharpen% OF
53140WHEN 8,9,12,16,24
53150OTHERWISE
53160[OPT Z
53170MOV R8,#sharpmul% AND &FF
53180ORR R8,R8,#sharpmul% AND &FF00
53190MOV R9,#(sharpmul% >> 16) AND &FF
53200ORR R9,R9,#(sharpmul% >> 16) AND &FF00
53210]
53220ENDCASE
53230[OPT Z
53240.sharplp
53250LDR R5,[R1,#-sharp]
53260LDR R6,[R1,#sharp]:ADD R5,R5,R6
53270LDR R6,[R1],#4:ADD R5,R5,R6
53280LDR R6,[R3,#-sharp]:ADD R5,R5,R6
53290LDR R6,[R3,#sharp]:ADD R5,R5,R6
53300LDR R6,[R3],#4:ADD R5,R5,R6
53310LDR R6,[R2,#-sharp]:ADD R5,R5,R6
53320LDR R6,[R2,#sharp]:ADD R5,R5,R6
53330LDR R6,[R2],#4
53340MOV R6,R6,LSR #1
53350MOV R7,#sharpen%
53360MUL R7,R6,R7
53370SUBS R5,R7,R5,LSR #1
53380MOVCC R5,#0
53390]
53400CASE sharpen% OF
53410WHEN 8,9
53420[OPT Z
53430MOV R6,R5,LSL #1
53440]
53450WHEN 10
53460[OPT Z
53470MOV R6,R5
53480]
53490WHEN 12
53500[OPT Z
53510MOV R6,R5,LSR #1
53520]
53530WHEN 16
53540[OPT Z
53550MOV R6,R5,LSR #2
53560]
53570WHEN 24
53580[OPT Z
53590MOV R6,R5,LSR #3
53600]
53610OTHERWISE
53620[OPT Z
53630MOV R6,R5,LSR #16
53640EOR R5,R5,R6,LSL #16
53650MUL R7,R8,R5
53660MUL R5,R9,R5
53670MUL R10,R6,R8
53680MUL R6,R9,R6
53690ADDS R10,R5,R10
53700ADDCS R6,R6,#&10000
53710ADDS R7,R7,R10,LSL #16
53720ADC R6,R6,R10,LSR #16
53730MOV R6,R6,LSL #(32-27)
53740ORRS R6,R6,R7,LSR #27
53750ADDCS R6,R6,#1
53760]
53770ENDCASE
53780[OPT Z
53790CMP R6,#F:MOVCS R6,#F
53800STR R6,[R4],#4
53810SUBS R0,R0,#1
53820BNE sharplp
53830MOVS PC,R14
53840]
53850ENDIF
53860IFhist%ORequal% THEN
53870[OPT Z
53880.histo%
53890LDR R0,[R9]:LDR R0,[R0]
53900LDR R1,[R9,#8]
53910LDR R2,[R9,#16]
53920.histlp
53930LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
53940MOV R3,R3,LSR #bits-8
53950]
53960IFcol=2 THEN
53970[OPT Z
53980ADD R3,R3,R3,LSL #1
53990LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
54000LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
54010MOV R3,R3,LSR #bits-8
54020ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
54030LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
54040LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
54050MOV R3,R3,LSR #bits-8
54060ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
54070]
54080ENDIF
54090[OPT Z
54100LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
54110SUBS R0,R0,#1
54120BNE histlp
54130MOVS PC,R14
54140]
54150ENDIF
54160IFequal% THEN
54170[OPT Z
54180.histequal%
54190LDR R0,[R9]:LDR R0,[R0]
54200LDR R1,[R9,#8]
54210LDR R2,[R9,#16]
54220.equallp
54230LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
54240MOV R3,R3,LSR #bits-8
54250]
54260IFcol=2 THEN
54270[OPT Z
54280LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
54290MOV R3,R3,LSR #bits-8
54300ADD R3,R3,R3,LSL #1
54310LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
54320LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
54330MOV R3,R3,LSR #bits-8
54340ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
54350LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
54360LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
54370MOV R3,R3,LSR #bits-8
54380ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
54390]
54400ENDIF
54410[OPT Z
54420LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
54430SUBS R0,R0,#1
54440BNE equallp
54450MOVS PC,R14
54460]
54470ENDIF
54480CASE rflag OF
54490WHEN 201,800,801,1000,1001
54500[OPT Z
54510.rlexpand%
54520LDR R0,[R9]
54530LDR R1,[R0]
54540LDR R2,[R9,#8]:LDR R2,[R2]
54550LDR R3,[R9,#16]
54560LDR R4,[R3]
54570CMP R4,#1:MOVLTS PC,R14
54580LDR R5,[R9,#24]:LDR R5,[R5]
54590.rle
54600STRB R2,[R1],#1
54610SUB R4,R4,#1
54620CMP R1,R5
54630TEQNE R4,#0
54640BNE rle
54650.rlexit
54660STR R1,[R0]
54670STR R4,[R3]
54680MOVS PC,R14
54690]
54700WHEN 902
54710WHEN 903
54720[OPT Z
54730.unpack16
54740MOV     r4,#31          ; 5 bits set mask
54750MOV     r5,#512         ; Pixel counter
54760.unpack16loop
54770LDRB    r3,[r0],#1      ; Get half a pixel from the sprite
54780LDRB    r2,[r0],#1      ; Get second half of the pixel
54790ORR     r2,r3,r2,LSL#8  ; Combine data into one pixel
54800AND     r3,r2,#31       ; Get red pixel
54810
54820STRB    r3,[r1,#0]      ; Store in buffer
54830AND     r3,r2,r4,LSL#5  ; Get green pixel
54840MOV     r3,r3,LSR#5
54850
54860STRB    r3,[r1,#512]    ; Store in buffer
54870AND     r3,r2,r4,LSL#10 ; Get blue pixel
54880MOV     r3,r3,LSR#10
54890
54900STRB    r3,[r1,#1024]
54910ADD     r1,r1,#1
54920SUBS    r5,r5,#1
54930BNE     unpack16loop
54940MOVS    r15,r14
54950
54960.unpack
54970ADD R2,R0,#768
54980MOV R4,#&F
54990.unpackloop
55000LDR R3,[R0],#4
55010MOV R5,#0
55020.bitloop
55030AND R6,R3,R4,LSL R5
55040MOV R6,R6,LSR R5
55050ADD R5,R5,#4
55060AND R7,R3,R4,LSL R5
55070MOV R7,R7,LSR R5
55080ADD R5,R5,#4
55090STRB R7,[R1],#1
55100STRB R6,[R1],#1
55110CMP R5,#32
55120BNE bitloop
55130CMP R2,R0
55140BNE unpackloop
55150MOVS PC,R14
55160]
55170ENDCASE
55180
55190IFplanar%<0 THEN
55200C%=7:IFflag=2600 C%=15
55210[OPT Z
55220.plancnv%
55230LDR R0,sxloc
55240LDR R1,[R9]:LDR R1,[R1]
55250LDR R3,[R9,#8]:LDR R3,[R3]
55260LDR R4,[R9,#16]:LDR R4,[R4]
55270MOV R9,#C%
55280.planelp
55290MOV R7,#0
55300MOV R5,R3
55310]
55320FORN%=1TOplanes%
55330[OPT Z
55340LDR R6,[R5],R4
55350]
55360IFflag=2600 THEN
55370[OPT Z
55380MOV R6,R6,LSL #8
55390BIC R6,R6,#&FF000000
55400ORR R6,R6,R6,LSR #16
55410]
55420ENDIF
55430[OPT Z
55440MOV R6,R6,LSR R9
55450AND R6,R6,#1
55460ORR R7,R7,R6,LSL #(N%-1)
55470]
55480NEXT
55490[OPT Z
55500STRB R7,[R1],#1
55510SUBS R9,R9,#1:MOVMI R9,#C%
55520]
55530IFflag=2600 THEN
55540[OPT Z
55550MOVMI R3,R5
55560]
55570ELSE
55580[OPT Z
55590ADDMI R3,R3,#1
55600]
55610ENDIF
55620[OPT Z
55630SUBS R0,R0,#1:BNE planelp
55640MOVS PC,R14
55650]
55660ENDIF
55670NEXT
55680CASE ncol OF
55690WHEN 255:size%=1
55700WHEN 63:size%=1
55710WHEN 15:size%=2
55720WHEN 3:size%=4
55730WHEN 1:size%=8:IFm$="C" size%=2
55740IFm$="D" size%=4
55750IFm$="T" size%=2
55760ENDCASE
55770CASE flag OF
55780WHEN 501:IFinfo% PRINT"Reading interlaced GIF"
55790sz%=sx%*sy%:datacache%=FNdim(sz%+100):buff%=datacache%:rowbytes%=sx%:rowstogo%=-1
55800FORY%=0TOsy%-1STEP8:X%=buff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
55810FORY%=4TOsy%-1STEP8:X%=buff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
55820FORY%=2TOsy%-1STEP4:X%=buff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
55830FORY%=1TOsy%-1STEP2:X%=buff%+Y%*sx%:CALL LZWdecode%,table%(0),c%,X%,sx%:NEXT
55840ENDCASE
55850IFgamma<>1 THEN
55860k=1/gamma:FORC%=0TO255
55870IFr%(C%) r%(C%)=((r%(C%)/F)^k)*F
55880IFg%(C%) g%(C%)=((g%(C%)/F)^k)*F
55890IFb%(C%) b%(C%)=((b%(C%)/F)^k)*F
55900NEXT
55910ENDIF
55920rmax=F:gmax=F:bmax=F
55930IFcol=0 THEN
55940IFinput<9 THEN
55950FORC%=0TO255:r%(C%)=r%(C%)*rwt+g%(C%)*gwt+b%(C%)*bwt:NEXT
55960ELSE
55970IFinput<>422 THEN
55980rmax=F*rwt:gmax=F*gwt:bmax=F*bwt
55990FORC%=0TO255:r%(C%)=r%(C%)*rwt:g%(C%)=g%(C%)*gwt:b%(C%)=b%(C%)*bwt:NEXT
56000ENDIF
56010ENDIF
56020ENDIF
56030IFNOTorder% PROCadjustpalette(1/ydiv%/xdiv%,0)
56040IFrange% THEN
56050IFinfo% PRINT"Scanning data to compute parameters for '-range'"
56060IForder% THEN
56070Y%=0:REPEAT SYShour%,Y%*100DIVsy%
56080PROCiprow(xp%()):CALLmaxmin%,xp%(1,0),totvals2%:Y%+=1
56090UNTILY%=sy% OR!min<255 AND!max+255>=F
56100ELSE
56110Y%=0:ysamp%=1:REPEAT SYShour%,Y%*100DIVy%
56120PROCscaledpixelrow(cl%()):CALLmaxmin%,cl%(1,0),totvals%:Y%+=1
56130UNTILY%=y% OR !min<255 AND !max+255>=F
56140ENDIF
56150IF!max+255>=F AND!min<255 range%=FALSE:range$="No point in '-range' on this image"
56160IFrange% PROCadjustpalette(F/(!max-!min),!min/ydiv%/xdiv%):range$="Input image maximum "+STR$(!max/F*100)+"% minimum "+STR$(!min/F*100)+"%"
56170PROCrewind:IFinfo% PRINTrange$
56180ENDIF
56190IFhist% ORequal% THEN
56200IFequal% IFinfo% PRINT"Scanning data to compute parameters for '-equal'"
56210IForder% THEN
56220FORyr%=0TOsy%-1:SYShour%,yr%*100DIVsy%
56230PROCiprow(xp%()):CALLhisto%,xp%(1,0),vals%(0,0),sx%
56240NEXT
56250ELSE
56260ysamp%=1:FORyr%=0TOy%-1:SYShour%,yr%*100DIVy%
56270PROCscaledpixelrow(cl%()):CALLhisto%,cl%(1,0),vals%(0,0),x%
56280NEXT
56290ENDIF
56300IFinfo% PRINT"Done. Now processing the picture"
56310ENDIF
56320IFinput<>422 THEN
56330FORC%=0TO255
56340IFr%(C%)<0 r%(C%)=0
56350IFg%(C%)<0 g%(C%)=0
56360IFb%(C%)<0 b%(C%)=0
56370IFr%(C%)>rmax r%(C%)=rmax
56380IFg%(C%)>gmax g%(C%)=gmax
56390IFb%(C%)>bmax b%(C%)=bmax
56400NEXT
56410ENDIF
56420IFhist% THEN
56430M%=0:ZM%=-1:FORC%=0TOcol
56440FORZ%=0TO256:IFvals%(Z%,C%)>M% M%=vals%(Z%,C%):ZM%=Z%
56450NEXT:NEXT
56460IFZM%=-1 OR okinfo%=0 THEN=100
56470IF col>0 THEN
56480MODE66:ht=500
56490IFMODE<>66 MODE16:ht=400
56500LINE0,6,2000,6
56510ELSE
56520MODE18:ht=400:LINE0,6,1024,6
56530ENDIF
56540M=M%/(ht*2-8):FORC%=0TOcol:CASE C% OF
56550WHEN 0:GCOL1
56560WHEN 1:GCOL2
56570WHEN 2:GCOL4
56580ENDCASE
56590IF col>0 THEN
56600FORZ%=0TO256:IFvals%(Z%,C%) X%=Z%*3+C%<<1:LINEX%,8,X%,vals%(Z%,C%)/M+8
56610NEXT
56620ELSE
56630FORZ%=0TO256:IFvals%(Z%,C%) X%=Z%<<2:RECTANGLE FILLX%,8,2,vals%(Z%,C%)/M
56640NEXT
56650ENDIF
56660NEXT
56670IFc% CLOSE#c%:c%=0
56680IFcc% CLOSE#cc%:cc%=0
56690IFccc% CLOSE#ccc%:ccc%=0
56700SYS"Hourglass_Off"
56710=100
56720ENDIF
56730oname$="p"+STR$m+m$:IFrange% oname$+="r"
56740IFequal% oname$+="e"
56750IFsharpen% oname$+="s"+STR$sharpen%
56760IFblack% oname$+="b"+STR$black%
56770IFgamma<>1 A%=@%:@%=&1020100:oname$+="g"+STR$gamma:@%=A%
56780IFbright%=16 oname$+="b"
56790xsp%=x%:ysp%=y%:IFrotate% SWAP xsp%,ysp%
56800CASE m OF
56810WHEN -1:xwords%=xsp%:sz%=xwords%*ysp%:Y%=ysp%:PROCgetoutput(sz%,0,xwords%,Y%)
56820base%=ram%
56830OTHERWISE:xwords%=xsp%/size%+3.9999ANDNOT3:sz%=xwords%*ysp%:X%=xsp%:Y%=ysp%
56840IFncol=1 THEN
56850CASE m$ OF
56860WHEN"C":!rowinc=xwords%:xwords%=xwords%*4:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*4
56870WHEN"T":!rowinc=xwords%:xwords%=xwords%*3:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*3
56880WHEN"D":!rowinc=xwords%:xwords%=xwords%*2:sz%=xwords%*ysp%:X%=xsp%*2:Y%=ysp%*2
56890ENDCASE
56900ENDIF
56910A%=Y%:PROCgetoutput(sz%,1024,xwords%,Y%)
56920ram%!4=0:ram%!8=16:ram%!12=16:SYS&2e,&109,ram%
56930SYS&2e,&10f,ram%,oname$,(ncol<63)AND1,X%,Y%,spm
56940base%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
56950ram%!12=ram%!12-Y%*xwords%+A%*xwords%
56960pal%=base%+11*4:base%+=base%!(8*4)
56970CASE ncol OF
56980WHEN 15
56990CASE m$ OF
57000WHEN "P"
57010FORZ%=0TO15:PROCcol(Z%,(palette%!(Z%<<2)>>8)AND&F0F0F0):NEXT
57020WHEN "D"
57030FORZ%=0TO7:A%=0:IFZ%AND1 A%+=&F0
57040IFZ%AND2 A%+=&F000
57050IFZ%AND4 A%+=&F00000
57060PROCcol(Z%,A%):NEXT
57070WHEN "C"
57080FORZ%=0TO15:A%=0:IFZ%AND4 A%+=&F0
57090IFZ%AND3 A%+=(Z%AND3)*5<<12:IF(Z%AND3)=1 A%+=&1000
57100IFZ%AND8 A%+=&F00000
57110PROCcol(Z%,A%):NEXT
57120WHEN "T"
57130FORZ%=0TO15:A%=Z%<<4:PROCcol(Z%,A%ORA%<<8ORA%<<16):NEXT
57140WHEN ""
57150FORZ%=0TO15:A%=(Z%AND7)/7*15+.2<<4:PROCcol(Z%,A%ORA%<<8ORA%<<16):NEXT
57160ENDCASE
57170WHEN 3
57180IFm$="C" THEN
57190PROCcol(0,0):PROCcol(1,&F0F000):PROCcol(2,&F000F0):PROCcol(3,&F0F0)
57200ELSE
57210FORZ%=0TO3:A%=Z%*5<<4:PROCcol(Z%,A%ORA%<<8ORA%<<16):NEXT
57220ENDIF
57230WHEN 1:PROCcol(0,0):PROCcol(1,&F0F0F0)
57240ENDCASE
57250ENDCASE
57260LOCAL ERROR
57270ON ERROR LOCAL:RESTORE ERROR:PROCSave:ERROR ERR,REPORT$+" internal ("+STR$ERL+")"
57280SYS"Hourglass_LEDs",3
57290ysamp%=1:nl%()=0:step%=4*(col+1)
57300addr%=base%*size%:rowstep%=xwords%*size%:colstep%=1:dist%=xsp%-1
57310IFrotate% THEN
57320SWAP colstep%,rowstep%
57330addr%+=(ysp%-1)*colstep%:colstep%=-colstep%:dist%=(ysp%-1)*colstep%
57340ENDIF
57350outlim%=(base%+xwords%*Y%)*size%-1:oddcolstep%=-colstep%:oddstep%=-step%
57360IForder% PROCadjustpalette(1/ydiv%/xdiv%,0)
57370IFsy%=y% AND sx%=x% AND range%=FALSE AND sharpen%=FALSE AND equal%=FALSE THEN
57380IFdither% THEN
57390FORyr%=0 TO y%-1:SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
57400PROCiprow(cl%()):cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
57410IFyr%AND1 THEN
57420CALLfs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
57430ELSE
57440A%+=dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
57450ENDIF
57460NEXT
57470ELSE
57480I%=step%:FORyr%=0TOy%-1:SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
57490PROCiprow(cl%()):B%=x%:A%=addr%:addr%+=rowstep%:CALLfs%,colstep%,cl%(1,0),I%,A%,I%,B%
57500NEXT
57510ENDIF
57520ELSE
57530IFequal% THEN
57540PROCrewind:Havg%=SUM(vals%())/256/(col+1):DIM new%(256,col)
57550FORB%=0TOcol:R%=0:Hint%=0:FORZ%=0TO256:L%=R%:Hint%+=vals%(Z%,B%)
57560WHILEHint%>Havg%:Hint%-=Havg%:R%+=1:ENDWHILE
57570new%(Z%,B%)=(L%+R%)/2*F/256
57580NEXT:NEXT
57590ENDIF
57600IFsharpen% THEN
57610IForder% THEN
57620yread%=sy%-1:PROCiprow(rm1%()):IFequal% PROCfit2(rm1%())
57630FORB%=0TOcol:rm1%(0,B%)=rm1%(1,B%):rm1%(sx%+1,B%)=rm1%(sx%,B%):NEXT
57640ELSE
57650yread%=y%-1:PROCscaledpixelrow(rm1%()):IFequal% PROCfit(rm1%())
57660FORB%=0TOcol:rm1%(0,B%)=rm1%(1,B%):rm1%(x%+1,B%)=rm1%(x%,B%):NEXT
57670ENDIF
57680rm2%()=rm1%()
57690ENDIF
57700IForder% THEN
57710FORyr%=0 TO y%-1
57720SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
57730IFsy%=y% THEN
57740PROCsharppixelrow(cl%())
57750ELSE
57760ysamp%-=1:IFysamp%=0 PROCsharppixelrow(xl%()):ysamp%=ymul%
57770IFydiv%=1 THEN
57780cl%()=xl%()
57790ELSE
57800IFysamp%>=ydiv% THEN
57810ysamp%-=ydiv%:cl%()=xl%()*ydiv%
57820ELSE
57830cl%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
57840REPEAT
57850IFysamp%=0 PROCsharppixelrow(xl%()):ysamp%=ymul%
57860IFysamp%>Y% THEN
57870ysamp%-=Y%:xl2%()=xl%()*Y%:cl%()=cl%()+xl2%():Y%=0
57880ELSE
57890Y%-=ysamp%:xl2%()=xl%()*ysamp%:cl%()=cl%()+xl2%():ysamp%=0
57900ENDIF
57910UNTIL Y%=0
57920ENDIF
57930ysamp%+=1
57940ENDIF
57950ENDIF
57960cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
57970IFyr%AND1 THEN
57980CALLfs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
57990ELSE
58000A%+=dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
58010ENDIF
58020NEXT
58030ELSE
58040FORyr%=0 TO y%-1
58050SYShour%,yr%*100DIVy%:IFaddr%>outlim% PROCflushoutput
58060IFsharpen% THEN
58070IFyread% yread%-=1:PROCscaledpixelrow(rm%()):IFequal% PROCfit(rm%())
58080FORB%=0TOcol:rm%(0,B%)=rm%(1,B%):rm%(x%+1,B%)=rm%(x%,B%):NEXT
58090CALL sharp%,cl%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals%
58100SWAP rm2%(),rm1%():rm1%()=rm%()
58110ELSE
58120PROCscaledpixelrow(cl%()):IFequal% PROCfit(cl%())
58130ENDIF
58140cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
58150IFyr%AND1 THEN
58160CALLfs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
58170ELSE
58180A%+=dist%:CALLfs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
58190ENDIF
58200NEXT
58210ENDIF
58220ENDIF
58230PROCSave
58240=0
58250DEF PROCgetoutput(A%,E%,B%,RETURN C%)
58260IFA%>max% AND rotate%=FALSE THEN
58270C%=max%DIVB%+1:A%=xwords%*C%+E%:first%=TRUE:o%=OPENOUTf$
58280ELSE
58290A%+=E%
58300ENDIF
58310IFspritearea%<0 THENram%=FNdim(A%) ELSEram%=spritearea%
58320!ram%=A%
58330ENDPROC
58340DEF PROCflushoutput
58350IFspritearea%<0 ANDoksave% THEN
58360IFhflip% SYS&2e,256+47,ram%,oname$
58370A%=base%:IFfirst% A%=ram%+4:first%=FALSE
58380SYS12,2,o%,A%,addr%DIVsize%-A%
58390ENDIF
58400addr%=base%*size%
58410ENDPROC
58420DEF PROCSave
58430IFc% CLOSE#c%:c%=0
58440IFcc% CLOSE#cc%:cc%=0
58450IFccc% CLOSE#ccc%:ccc%=0
58460CASE m OF
58470WHEN -1:IFspritearea%<0 ANDoksave% THEN
58480IFo% PROCflushoutput ELSESYS"OS_File",10,f$,&004,,ram%,ram%+sz%
58490ENDIF
58500WHEN -2:o%=OPENOUTf$:BPUT#o%,pnm$
58510IFvflip% SYS&2e,256+33,ram%,oname$
58520IFhflip% SYS&2e,256+47,ram%,oname$
58530CASE pnm$ OF
58540WHEN "P1"
58550BPUT#o%,"# "+f$+".pbm (options "+oname$+")"
58560BPUT#o%,STR$xsp%+" "+STR$ysp%
58570FORY%=0TOysp%-1:B%=base%+Y%*xwords%
58580FORX%=0TOxsp%-1:IFB%?(X%>>3)AND(1<<(X%AND7)) BPUT#o%,"1"; ELSEBPUT#o%,"0";
58590NEXT
58600BPUT#o%,""
58610NEXT
58620WHEN "P4"
58630BPUT#o%,"# "+f$+".pbm (options "+oname$+") binary encoded"
58640BPUT#o%,STR$xsp%+" "+STR$ysp%
58650FORX%=0TO255:code%?X%=X%<<7 OR X%<<5AND&40 OR X%<<3AND&20 OR X%<<1AND&10 OR X%>>1AND8 OR X%>>3AND4 ORX%>>5AND2 ORX%>>7:NEXT
58660FORY%=0TOysp%-1:B%=base%+Y%*xwords%
58670FORX%=0TOxsp%-1STEP8:BPUT#o%,code%?(B%?(X%>>3)):NEXT
58680NEXT
58690WHEN "P2"
58700BPUT#o%,"# "+f$+".pgm (options "+oname$+")"
58710BPUT#o%,STR$xsp%+" "+STR$ysp%
58720BPUT#o%,"15"
58730FORY%=0TOysp%-1:B%=base%+Y%*xwords%
58740FORX%=0TOxsp%-1:C%=B%?(X%>>1):IFX%AND1 C%=C%>>4 ELSEC%=C%AND15
58750BPUT#o%," "+STR$C%;
58760NEXT
58770BPUT#o%,""
58780NEXT
58790WHEN "P5"
58800BPUT#o%,"# "+f$+".pgm (options "+oname$+") binary encoded"
58810BPUT#o%,STR$xsp%+" "+STR$ysp%
58820BPUT#o%,"15"
58830FORY%=0TOysp%-1:B%=base%+Y%*xwords%
58840FORX%=0TOxsp%-1:C%=B%?(X%>>1):IFX%AND1 C%=C%>>4 ELSEC%=C%AND15
58850BPUT#o%,C%
58860NEXT
58870NEXT
58880ENDCASE
58890CLOSE#o%:o%=0
58900OTHERWISE
58910IFvflip% SYS&2e,256+33,ram%,oname$
58920IFhflip% SYS&2e,256+47,ram%,oname$
58930IFncol=1ANDm$="T" THEN
58940FORX%=(xsp%*4-1)DIV8*8+6TO6STEP-8
58950SYS&2e,&12e,ram%,oname$,X%
58960SYS&2e,&12e,ram%,oname$,X%
58970NEXT
58980ENDIF
58990IFspritearea%<0 ANDoksave% THEN
59000IFo% PROCflushoutput ELSESYS&2e,&10c,ram%,f$
59010ENDIF
59020ENDCASE
59030IFo% CLOSE#o%:o%=0:OSCLI"settype "+f$+" ff9"
59040SYS"Hourglass_Off"
59050ENDPROC
59060DEFPROCdefpal
59070FORC%=0TO255
59080r%(C%)=(C%AND7 OR (C%AND16)>>1)/15*F
59090g%(C%)=(C%AND3 OR (C%AND&60)>>3)/15*F
59100b%(C%)=(C%AND3 OR (C%AND8)>>1 OR (C%AND128)>>4)/15*F
59110NEXT
59120ENDPROC
59130DEFPROCdefpal2
59140r%(0)=F:g%(0)=F:b%(0)=F
59150ENDPROC
59160DEFPROCdefpal4
59170r%()=15,10,5,0:FORC%=0TO3:r%(C%)=r%(C%)/15*F:NEXT
59180g%()=r%():b%()=r%()
59190ENDPROC
59200DEFPROCdefpal16
59210r%()=15,13,11,9,7,5,3,0,0,14, 0,13,14,5,15, 0
59220g%()=15,13,11,9,7,5,3,0,4,14,12, 0,14,8,11,10
59230b%()=15,13,11,9,7,5,3,0,9, 0, 0, 0,11,0, 0,15
59240FORC%=0TO15:r%(C%)=r%(C%)/15*F:g%(C%)=g%(C%)/15*F:b%(C%)=b%(C%)/15*F:NEXT
59250ENDPROC
59260DEFPROCipal63
59270PTR#c%=&38:DIM rpal%(15),gpal%(15),bpal%(15)
59280FORC%=0TO15:D%=BGET#c%
59290rpal%(C%)=BGET#c%>>4 AND 7
59300gpal%(C%)=BGET#c%>>4 AND 3
59310bpal%(C%)=BGET#c%>>4 AND 7
59320D%=FNW:NEXT
59330FORC%=0TO255
59340r%(C%)=(rpal%(C%AND15)OR(C%AND16)>>1)/15*F
59350g%(C%)=(gpal%(C%AND15)OR(C%AND&60)>>3)/15*F
59360b%(C%)=(bpal%(C%AND15)OR(C%AND128)>>4)/15*F
59370NEXT
59380ENDPROC
59390DEFPROCipal(D%)
59400PTR#c%=&38
59410FORC%=0TOD%-1:D%=BGET#c%
59420r%(C%)=(BGET#c%>>4)/15*F
59430g%(C%)=(BGET#c%>>4)/15*F
59440b%(C%)=(BGET#c%>>4)/15*F
59450D%=FNW:NEXT
59460ENDPROC
59470DEF PROCnopal
59480FORC%=0TO255:r%(C%)=C%/255*F:NEXT:g%()=r%():b%()=r%()
59490ENDPROC
59500DEF PROCcol(A%,B%)
59510B%=B%<<8ORB%<<4OR&10:pal%!(A%*8)=B%:pal%!(A%*8+4)=B%
59520ENDPROC
59530DEF FNbits(A%)
59540IFA%=1 THEN="1 bit per pixel" ELSE=STR$A%+" bits per pixel"
59550DEF FNfits
59560LOCALZ%,s$
59570FORZ%=1TO80:s$+=CHR$BGET#c%:NEXT
59580=s$
59590DEF FNuc(a$)
59600LOCALZ%,z$,b$
59610FORZ%=1TOLENa$
59620z$=MID$(a$,Z%,1)
59630IFz$>="a"IFz$<="z" z$=CHR$(ASCz$-32)
59640b$+=z$:NEXT
59650=b$
59660DEF FNdim(A%)
59670LOCAL B%
59680IFflex% THEN
59690B%=nextlocation%:A%=A%+3ANDNOT3:nextlocation%+=A%
59700SYS"Wimp_SlotSize",-1,-1 TO currentslot%
59710IFcurrentslot%+&8000<nextlocation% THEN
59720SYS "Wimp_SlotSize",nextlocation%-&8000,-1 TO currentslot%
59730IFcurrentslot%+&8000<nextlocation% ERROR 42,"Can't get enough memory to process image"
59740ENDIF
59750ELSE
59760IFworkspace%<0 THEN
59770DIM B% A%
59780ELSE
59790B%=workspace%:workspace%+=A%+3ANDNOT3:IFworkspace%>worklimit% ERROR42,"Not enough workspace"
59800ENDIF
59810ENDIF
59820=B%
59830DEF FNW=FNW1(c%)
59840DEF FNW1(c%)=BGET#c% OR BGET#c%<<8 OR BGET#c%<<16 OR BGET#c%<<24
59850DEF FNHW=BGET#c% OR BGET#c%<<8
59860DEF FNbeHW=BGET#c%<<8 OR BGET#c%
59870DEF FNbeW=BGET#c%<<24 OR BGET#c%<<16 OR BGET#c%<<8 OR BGET#c%
59880DEF FNtiff(T%)
59890CASE T% OF
59900WHEN 1:=BGET#c%
59910WHEN 2:LOCALs$,t$:REPEATs$+=t$:t$=CHR$BGET#c%:UNTILt$=CHR$0:=s$
59920WHEN 3:IFbigendian THEN=BGET#c%<<8 OR BGET#c% ELSE=BGET#c% OR BGET#c%<<8
59930WHEN 4:IFbigendian THEN=FNbeW ELSE=FNW1(c%)
59940ENDCASE
59950ERROR 42,"Silly TIFF tag:"+STR$T%
59960DEF PROCnextstrip
59970rowstogo%=striprows%
59980stripptr+=1:PTR#c%=st%(stripptr)
59990IFcompression=5 THEN
60000!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
60010!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
60020ENDIF
60030ENDPROC
60040DEF PROCwatford(wtsx%,RETURN rep%,RETURN wt%,X%,c%)
60050CALLrlexpand%,wtsx%,rep%,wt%,X%
60060REPEAT C%=BGET#c%:CASE C%>>6 OF
60070WHEN 0:?X%=C%:X%+=1:wt%=C%
60080WHEN 1:wt%-=1:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60090WHEN 2:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60100WHEN 3:wt%+=1:rep%=C%AND63:CALLrlexpand%,wtsx%,rep%,wt%,X%
60110ENDCASE
60120UNTILX%=wtsx%
60130ENDPROC
60140DEF PROCsize
60150IFscale% THEN
60160IFsx%<=320 IFsy%<=256 xmul%=xmul%*2:ymul%=ymul%*2
60170IFsy%<=sx%/2 ymul%=ymul%*2
60180ENDIF
60190ENDPROC
60200DEF PROCreduce(RETURN A%,RETURN B%)
60210LOCAL C%,D%:C%=A%:D%=B%
60220REPEAT IFC%<D% SWAP C%,D%
60230C%=C%MODD%
60240UNTILC%=0
60250A%=A%DIVD%:B%=B%DIVD%
60260ENDPROC
60270DEF PROCreadpixelrow(z%())
60280IFrows% THEN
60290rows%-=1:IFsx%=x% THEN
60300PROCiprow(z%())
60310ELSE
60320PROCiprow(xp%()):CALLxsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
60330ENDIF
60340ELSE
60350z%()=0
60360ENDIF
60370ENDPROC
60380DEF PROCsharppixelrow(z%())
60390IFrows% THEN
60400rows%-=1:IFsx%=x% THEN
60410IFsharpen% PROCsharp(z%()) ELSEPROCiprow(z%()):IFequal% PROCfit2(z%())
60420ELSE
60430IFsharpen% PROCsharp(xp%()) ELSEPROCiprow(xp%()):IFequal% PROCfit2(xp%())
60440CALLxsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
60450ENDIF
60460ELSE
60470z%()=0
60480ENDIF
60490ENDPROC
60500DEF PROCsharp(z%())
60510yread%-=1:IFyread% PROCiprow(rm%()):IFequal% PROCfit2(rm%())
60520FORB%=0TOcol:rm%(0,B%)=rm%(1,B%):rm%(sx%+1,B%)=rm%(sx%,B%):NEXT
60530CALL sharp%,z%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals2%
60540SWAP rm2%(),rm1%():rm1%()=rm%()
60550ENDPROC
60560DEF PROCscaledpixelrow(z%())
60570IFsy%=y% THEN
60580PROCreadpixelrow(z%())
60590ELSE
60600ysamp%-=1:IFysamp%=0 PROCreadpixelrow(xl%()):ysamp%=ymul%
60610IFydiv%=1 THEN
60620z%()=xl%()
60630ELSE
60640IFysamp%>=ydiv% THEN
60650ysamp%-=ydiv%:z%()=xl%()*ydiv%
60660ELSE
60670LOCALY%:z%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
60680REPEAT
60690IFysamp%=0 PROCreadpixelrow(xl%()):ysamp%=ymul%
60700IFysamp%>Y% THEN
60710ysamp%-=Y%:xl2%()=xl%()*Y%:z%()=z%()+xl2%():Y%=0
60720ELSE
60730Y%-=ysamp%:xl2%()=xl%()*ysamp%:z%()=z%()+xl2%():ysamp%=0
60740ENDIF
60750UNTIL Y%=0
60760ENDIF
60770ysamp%+=1
60780ENDIF
60790ENDIF
60800ENDPROC
60810DEF PROCfit(z%())
60820CALLhistequal%,z%(1,0),new%(0,0),x%
60830ENDPROC
60840DEF PROCfit2(z%())
60850CALLhistequal%,z%(1,0),new%(0,0),sx%
60860ENDPROC
60870DEF PROCadjustpalette(mul,sub)
60880IFmul=1 AND sub=0 ENDPROC
60890FORC%=0TO255
60900r%(C%)=(r%(C%)-sub)*mul+1:g%(C%)=(g%(C%)-sub)*mul+1:b%(C%)=(b%(C%)-sub)*mul+1
60910NEXT
60920IF ham THEN
60930 FORC%=0TO15*4STEP4:ltable!C%=(ltable!C%-sub)*mul+1:NEXT
60940ENDIF
60950IF input=422 THEN
60960FORC%=0TO255
60970rpal%(C%)=(rpal%(C%)-sub)*mul+1:gpal%(C%)=(gpal%(C%)-sub)*mul+1
60980bpal%(C%)=(bpal%(C%)-sub)*mul+1:table%(C%)=(table%(C%)-sub)*mul+1
60990NEXT
61000ENDIF
61010ENDPROC
61020
61030DEF PROCrefill
61040IFstriprows%>0 PROCnextstrip
61050SYS12,4,c%,datacache%,cache%:rowstogo%=cacherows%:buff%=datacache%
61060IFinput=24 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
61070ENDPROC
61080
61090DEF PROCiprow(z%())
61100CASE rflag OF
61110WHEN 0:CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),buff%:buff%+=rowbytes%:rowstogo%-=1:IFrowstogo%=0 PROCrefill
61120ENDPROC
61130
61140WHEN 901:SYS12,4,c%,rb%,sx%:SYS12,4,cc%,gb%,sx%:SYS12,4,ccc%,bb%,sx%
61150CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:ENDPROC
61160WHEN 902
61170 IF slave% THEN
61180  SYS 12,4,c%,tspace%,768
61190  A%=tspace%
61200 ELSE
61210  A%=V9Area%+offset%
61220 ENDIF
61230 B%=rb%
61240 CALL unpack
61250 offset%+=768
61260 REM SYS12,4,c%,rats%,rowbytes%:CALLunpack%
61270CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:ENDPROC
61280
61290WHEN 903
61300 IF slave% THEN
61310  SYS 12,4,c%,tspace%,1024
61320  A%=tspace%
61330 ELSE
61340  A%=V9Area%+offset%
61350 ENDIF
61360 B%=rb%
61370 CALL unpack16
61380 offset%+=1024
61390 REM SYS12,4,c%,rats%,rowbytes%:CALLunpack%
61400CALLmappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:ENDPROC
61410
61420ENDCASE
61430ENDPROC
61440
61450DEF PROCrewind
61460rows%=sy%:CASE flag OF
61470WHEN 0:PTR#c%=st%
61480
61490WHEN 900:PTR#c%=0
61500WHEN 901:PTR#c%=0:PTR#cc%=0:PTR#ccc%=0
61510WHEN 902
61520 IF slave% THEN
61530  PTR#c%=st%
61540 ELSE
61550  offset%=20
61560 ENDIF
61570WHEN 903
61580 IF slave% THEN
61590  PTR#c%=st%
61600 ELSE
61610  offset%=20
61620 ENDIF
61630ENDCASE
61640
61650IFcache% THEN
61660IFcache%<filesize% SYS12,4,c%,datacache%,cache%:rowstogo%=cacherows%
61670buff%=datacache%
61680IFinput=24 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
61690ENDIF
61700ENDPROC
61710
61720DEF PROCchange_LCA(new%)
61730IF mono$=">" THEN SYS "WVCGrab_LCA",3:ENDPROC
61740IF board_is_16_bit% OR allow_dithering% THEN
61750 SYS "WVCGrab_LCA",new%
61760 CALL set_8bit
61770 IF dithered%=1 THEN
61780  PROCiconset(4,4,1<<21,1<<21)
61790 ELSE
61800  PROCiconset(4,4,1<<21,0)
61810 ENDIF
61820ENDIF
61830ENDPROC
61840
61850DEF FNfind_slot_for_V9
61860DIM slot_b% 16
61870V9_slot%=-1
61880FOR s%=0 TO 3
61890 !slot_b%=0
61900 slot_b%!4=0
61910 SYS "XPodule_ReadHeader",,,slot_b%,s%
61920 manuf%=slot_b%?5 OR (slot_b%?6<<8)
61930 prod%=slot_b%?3 OR (slot_b%?4<<8)
61940 IF manuf%=9 AND prod%=82 THEN V9_slot%=s%
61950NEXT
61960=V9_slot%
61970
61980DEF PROCget_board_version
61990slot%=FNfind_slot_for_V9
62000IF slot%=-1 ERROR 42,"Hawk V9 not present":END
62010r0=0
62020modstat%=-1
62030REPEAT
62040SYS "Podule_EnumerateChunks",r0,,,slot% TO r0,r1,r2
62050IF r2=%11110011 THEN
62060 modstat%=r0-1
62070 size%=r1
62080ENDIF
62090UNTIL modstat%<>-1 OR r0=0
62100
62110DIM buff% size%
62120SYS "Podule_ReadChunk",modstat%,,buff%,slot%
62130m$=""
62140FOR l%=0 TO size%-1
62150 m$+=CHR$(buff%?l%)
62160NEXT
62170
62180CASE LEFT$(m$,1) OF
62190 WHEN "S"
62200   board_is_16_bit%=FALSE
62210   allow_dithering%=FALSE
62220   allow_mono%=FALSE
62230 WHEN "D"
62240  allow_dithering%=TRUE
62250  board_is_16_bit%=TRUE
62260  allow_mono%=TRUE
62270 OTHERWISE
62280  allow_dithering%=FALSE
62290  board_is_16_bit%=FALSE
62300  allow_mono%=FALSE
62310ENDCASE
62320ENDPROC

� > !RunImage
debug%=�
�get_board_version
(� � � � �:�error(0)
2+version$="Version 2.00 (13th Oct 1992)"
<	�init
F� � �error(-1)
P�
Z!�wimpservice(�(pollcode),pb%)
d� �
n�
x� �init
��setvars
�%taskhandle%=�taskinit("FastGrab")
�ș "WVCGrab_Refresh",0
��setupwindows
��fudgeinit
�� � debug% � 21
�
�assemble
�� 6
�$A%=livearea%+60:B%=&20100:�blank
��getchoices
��installonbar
��modechanged
��cwin(3)
�cwin(4)
@!rdb=w%(3,0):!udb=w%(3,0):!livewb=w%(3,0):livewb!4=livearea%
0!spritearea=livearea%:!spritead=livearea%+16
"!dragging%=0:!pollad=pb%
,� PROCadjustlive
6
�calclive
@�shutlivedisplay
J,ș "Wimp_SlotSize",-1,-1 � originalslot%
T�
^
h� �round(� value%,round%)
r� (value% � round%)=0 �
|,value%=((value%+round%) � round%)*round%
��
�
�� �fudgeinit
�� � debug% � 21
��dolivecode
��dograbcode
�� 6
�livename$="pic"
�dragtype%=-1
�nextlocation%=�
�� livearea% &20800
�!livearea%=&20700
�livearea%!4=1
livearea%!8=16
$(livearea%+20)="grabbed"
livearea%!32=&3F
&livearea%!36=&7F
0livearea%!40=&00
:livearea%!44=&1F
Dlivearea%!48=&2C
Nlivearea%!52=&2C
Xlivearea%!56=15
b!livedumpad%=livearea%+60
l� set_8bit
v�
�
�A� �add_palette_to_sprite(sprite_area%,sprite_ad%,sprite_pal%)
�
� pal%,z%
�pal%=sprite_ad%+44
�sprite_ad%!32+=2048
�sprite_ad%!36+=2048
�sprite_ad%!00+=2048
�sprite_area%!12+=2048
�)� Bung a palette into the sprite area
�
�z%=0�255
�% B%=(z%<<8) � (z%<<16) � (z%<<24)
�$ pal%!(z%*8)=B%:pal%!(z%*8+4)=B%
��
<�palette_for_sprite(sprite_area%,sprite_ad%,sprite_pal%)
�

 � �live_grey
*"!livedumpad%=livearea%+60+2048
4old_sat%=saturation%
>saturation%=0
H$satad%="0"
R�saturation
\;�add_palette_to_sprite(livearea%,livearea%+16,livepal%)
f�optimise_liveplot
p�
z
�� �live_colour
�saturation%=old_sat%
�$satad%=�(saturation%)
��saturation
�!livedumpad%=livearea%+60
�sptr%=livearea%+16
�sptr%!32-=2048
�sptr%!36-=2048
�sptr%!00-=2048
�livearea%!12-=2048
�8�palette_for_sprite(livearea%,livearea%+16,livepal%)
��optimise_liveplot
��

� �dograbcode
� GAP &2000,L% 0
$� Pass%=8 � 10 � 2
.
P%=GAP
8[
B
OPT Pass%
L.VRAM_Grab
V3SWI     22                      ; Into SVC mode
`MOV     R0,R15
j�R     R0,R0,#3<<26
t6TEQP    R15,R0                  ; FIQ's off too...
~
�>SWI     "WVCGrab_MemBases"      ; Get base of podule space
�
�<LDRB    R8,[R1]                 ; RAS only Refresh cycle
�MOV     R9,#0
�
�A�R     r4,r1,#&1000            ; Page mode read cycle address
�<�R     r3,r1,#&1800            ; Terminate cycle address
�H�R     r2,r1,#&800             ; Initiate Read/SR to memory transfer
�3�R     r2,r2,#&008             ; VRAM address 8
�=�R     r7,r1,#&1000            ; Page mode read (CAS low)
�KADD     r7,r7,#&001C            ; This gets around the pipelining issue
�LDR     R10,pagestep
LDR     R11,pixelstep

.next_row_down
DLDRB    R8,[R2],R10             ; Initiate SR to memory transfer
I;LDRB    R8,[R7]             ; Get a pixel from VRAM - fixes pipeline
(SUB     R7,R7,#16
2
.row_read
<;LDRB    R8,[R7],R11             ; Get a pixel from VRAM
F<STRB    R8,[R5],#1              ; Store it in the buffer
P=CMP     R7,R3                   ; End of the row reached?
ZBLT     row_read
d
n:SUB     R7,R7,#&800             ; Do the next row down
xADD     R7,R7,#&10
�LDR     R8,[R7,#&800]
�CMP     R2,R4
�BLE     next_row_down
�TEQP    R15,#0
�MOVNV   R6,R6
�MOVS    R15,R14
�
.pagestep
�
EQUD 8
�.pixelstep
�
EQUD 4
�
�.mask EQUD      32767
�
.read16bit
,; r0=output address, r1=line number reqd
SWI     "OS_EnterOS"
"LMOV     r6,r0                   ; Bung address for data (a line) into r6
,MOV     r0,r15
6:�R     r0,r0,#3<<26            ; Change processor mode
@TEQP    r15,r0
J
TLDR     r3,packR3
^LDR     r4,packR4
hLDR     r5,packR5
rMOV     r0,#0
|9MOV     r1,r1,LSL#3             ; Convert line number
�9LDR     r8,[r3,r1]              ; Initiate read cycle
�
�LDR     r7,mask
�
�P;LDR     r8,[r4,r0,LSL#2]        ; Get a pixel from the VRAM into r8 (16bit)
�;ADD     r0,r0,#1
�
�.get_another_byte
�OLDR     r8,[r4,r0,LSL#2]        ; Get a pixel from the VRAM into r8 (16bit)
�
�0;MOV     r8,#%11000<<10          ; Blue data
�0;�R     r8,r8,#%11101<<5        ; Green data
�.;�R     r8,r8,#%11000           ; Red data

ADD     r0,r0,#1

&;�     r8,r8,r7                ; Get bottom fifteen bits
0=�     r9,r8,#&ff00            ; Get top byte from 15 bits
:MOV     r9,r9,LSR#8
DHSTRB    r8,[r6],#1              ; Store bottom byte in output buffer
NESTRB    r9,[r6],#1              ; Store top byte in output buffer
XDCMP     r0,#512                 ; Did we read the full line yet?
bABNE     get_another_byte        ; If not, get on with the job
lLDR     r8,[r5,#0]
vTEQP    r15,#0
�MOVNV   r0,R0
�MOV     r15,r14
�
�
.packline
�SWI     "OS_EnterOS"
�,; r0=output address, r1=line number reqd
�?MOV     R12,R0                  ; Address for data (a line)
�MOV     R0,R15
��R     R0,R0,#3<<26
�TEQP    R15,R0
�LDR     R3,packR3
�LDR     R4,packR4
�LDR     R5,packR5
MOV     R0,#0
MOV     R1,R1,LSL#3
3LDR     R8,[R3,R1]              ; Initiate read
 .Next_Byte
*?LDR     R8,[R4,R0,LSL #2]       ; Get a pixel from the VRAM
4=ADD     R0,R0,#1                ; Increment pixel counter
>FLDR     R7,[R4,R0,LSL #2]       ; Get a second pixel from the VRAM
H3ADD     R0,R0,#1                ; Inc pixel ctr
R�     R9,R8,#&F
\�     R10,R7,#&F
f�R     R11,R10,R9,LSL #4
p;STRB    R11,[R12,#512]          ; Bung byte into buffer
z�     R9,R8,#&F0
��     R10,R7,#&F0
��R     R11,R9,R10,LSR #4
�;STRB    R11,[R12,#256]          ; Bung byte into buffer
��     R9,R8,#&F00
�MOV     R9,R9,LSR #4
��     R10,R7,#&F00
��R     R11,R9,R10,LSR #8
�;STRB    R11,[R12],#1            ; Bung byte into buffer
�GCMP     R0,#&200                ; Have we done a complete line yet?
�BNE     Next_Byte
�5LDR     R8,[R5,#0]              ; Terminate cycle
�TEQP    R15,#0
�MOVNV   R6,R6
	MOV     R15,R14
	
	.membaseR0
	$
EQUD 0
	..membaseR1
	8
EQUD 0
	B.packR3
	L
EQUD 0
	V.packR4
	`
EQUD 0
	j.packR5
	t
EQUD 0
	~
	�
.set_8bit
	�SWI     22
	�SWI     "WVCGrab_MemBases"
	�:ADD     R0,R0,#&2000    ; &2000=Paging reg for V9 Mk I
	�MOV     R1,#&10
	�STRB    R1,[R0]
	�;ADD     r0,r0,#&1000    ; &3000=Paging reg for V9 Mk II
	�STRB    R1,[R0]
	�
	�TEQP    R15,#0
	�MOVNV   R0,R0
	�MOVS    R15,R14
.set_12bit

SWI     22
SWI     "WVCGrab_MemBases"
:ADD     R0,R0,#&2000    ; &2000=Paging reg for V9 Mk I
(MOV     R1,#0
2STRB    R1,[R0]
<;ADD     r0,r0,#&1000    ; &3000=Paging reg for V9 Mk II
FSTRB    R1,[R0]
PTEQP    R15,#0
ZMOVNV   R0,R0
dMOVS    R15,R14
n
x.Refresh_Frame
�SWI     22
�SWI     "WVCGrab_MemBases"
�ADD     R0,R1,#&1800
�LDR     R2,[R1,#0]
�MOV     R0,#256
�.Refresh_Loop
�,LDR     R2,[R1,R0]       ; Refresh Cycle
�SUBS    R0,R0,#1
�BNE     Refresh_Loop
�TEQP    R15,#0
�MOVNV   R0,R0
�MOVS    R15,R14
�
]
� Pass%
!ș "WVCGrab_MemBases" � r0,r1
"!packR3=r1 � &800
,!packR4=r1 � &1000
6!packR5=r1 � &1800
@�
J
T� �dolivecode
^� livegap% &1200,L% 0
h� pass%=8 � 10 � 2
rP%=livegap%
|[
�
OPT pass%
�.live_grab
�,SWI     22              ; Interrupts off
�MOV     R0,R15
��R     R0,R0,#3<<26
�ETEQP    R15,R0          ; Turn off fast interrupts too (sorry...)
�6LDR     R1,livebaseR1   ; Get base of podule space
�9LDR     R5,livedumpad%  ; Get address for 8bpp output
�9�R     R2,R1,#&1000    ; Page mode read cycle address
�>�R     R6,R1,#&800     ; Initiate pixel read cycle address
�5MOV     R9,#&1800       ; Terminate cycle address
�
�MOV     R11,#0

.livefield_poll
4LDR     R8,[R6]         ; Start pixel read cycle
&2LDR     R8,[R1,R9]      ; Terminate read cycle
0/ADD     R11,R11,#1      ; Increment counter
:-CMP     R11,#&8000      ; Too many tries?
D1BGT     signalgone      ; If not, complain...
N3TST     r8,#&4000       ; Video signal present?
X<BEQ     livefield_poll  ; If no signal, wait for a while
bMOV     R11,#0
l
vMOV     R11,#1
�.livevert_poll
�4LDR     R8,[R6]         ; Start pixel read cycle
�2LDR     R8,[R1,R9]      ; Terminate read cycle
�/ADD     R11,R11,#1      ; Increment counter
�)CMP     R11,#&8000      ; How long...
�BGT     signalgone
�TST     R8,#&2000
�BEQ     livevert_poll
�
�MOV     R11,#0
�.livevert_poll1
�.LDR     R8,[R6]         ; Start pixel read
�2LDR     R8,[R1,R9]      ; Terminate pixel read

)ADD     R11,R11,#1      ; Inc counter

+CMP     R11,#&8000      ; Too many yet?

BGT     signalgone

 TST     R8,#&2000

*BNE     livevert_poll1

4

>1LDR     R8,[R1]         ; Read word from VRAM

HBLDR     R12,fielding    ; Grabbing single field at the moment?

RCMP     R12,#0

\DBEQ     bothfields      ; If not, don't care which field this is

fILDR     R11,evenfield   ; Otherwise, find out which field is required

pMOV     R11,R11,LSL #14

z�     R12,R8,#1<<14

�6CMP     R12,R11         ; Is this the field to do?

�,BEQ     bothfields      ; If so, grab it

�CB       livefield_poll  ; Otherwise, wait for the next frame...

�

�.bothfields

�9STR     R8,[R6]         ; Start SR to memory transfer

�6STR     R8,[R1,R9]      ; Terminate transfer cycle

�MSTR     R8,[R1]         ; RAS only refresh, to allow serial VRAM transfer

�MOV     R10,#&1000

�MOV     R12,#0

�

�.livenext_row

�MOV     r0,#0

;.liveEnd_Blank          ; Wait for the end blank signal
4LDR     R8,[R6]         ; Start pixel read cycle
$
.-LDR     R8,[R1,R9]      ; Terminate cycle
8
B3ADD     R0,R0,#1        ; Increment row counter
LCMP     R0,#&8000
VBGT     signalgone
`1TST     R8,#&1000       ; Blank signal found?
jBEQ     liveEnd_Blank
t
~MOV     R11,#0
�1.liverow_data_in        ; Read data into VRAM
�.LDR     R8,[R6]         ; Start read cycle
�2LDR     R8,[R1,R9]      ; Terminate read cycle
�ADD     R11,R11,#1
�CMP     R11,#&8000
�BGT     signalgone
�TST     R8,#&1000
�BNE     liverow_data_in
�
�JSTRB    R8,[R6],#8      ; Pass VRAM address to V9 and start read cycle
�2STRB    R8,[R1,R9]      ; Terminate read cycle
�ACMP     R6,R2           ; Read 512*16bit words into VRAM yet?
:BLT     livenext_row    ; If not, get the next row !!!

�R     R4,R1,#&1000
�R     R3,R1,#&1800
*�R     R2,R1,#&800     ; Cycle type 2a
(-�R     R2,R2,#8        ; VRAM Address &08
21�R     R7,R1,#&1000    ; Page mode read cycle
<:�R     R7,R7,#&20      ; VRAM Address &14 at the start
F
PLDR     R10,livepagestep
ZLDR     R11,livepixelstep
d
n5ADD     r9,r1,#&2000    ; Paging register address
xADD     r12,r1,#&3000
�
�.livenext_row_down
�@;MOV     r0,#1<<6        ; Bit 6 controls hardware dithering
�2;STR     r0,[r12]        ; Store in paging reg
�;STR     r0,[r9]
�;MOV     r0,#0
�;STR     r0,[r12]
�;STR     r0,[r9]
�
�?LDRB    R8,[R2],R10     ; Initiate read cycle for next line
�>SUB     R7,R7,#16       ; Decrement page mode read counter
�
�.liverow_read
@LDRB    R8,[R7],R11     ; Do page mode read to scan the line
DSTRB    R8,[R5],#1      ; Put the 8bpp data into the live buffer
4CMP     R7,R3           ; Read a whole line yet?
"7BLT     liverow_read    ; If not, get another pixel
,
69SUB     R7,R7,#&800     ; Decrement page mode counter
@ADD     R7,R7,#&10
J3LDR     R8,[R7,#&800]   ; Set page mode address
T1CMP     R2,R4           ; Read 256 lines yet?
^;BLT     livenext_row_down; If not, get another line !!!
hLDR     R0,signalpresent
rCMP     R0,#0
|BEQ     signalback
�TEQP    R15,#0
�MOVNV   R0,R0
�MOVS    PC,R14
�.signalback
�MOV     R0,#1
�STR     R0,signalpresent
�MOV     R0,#0
�ASWI     "WVCGrab_Refresh" ; Turns refresh off, signal is back
�ADR     R7,signal
�B       udicon
�.signalgone
�LDR     R0,signalpresent
�CMP     R0,#0
BNE     changeicon
TEQP    R15,#0
MOVNV   R6,R6
&MOVS    PC,R14
0.changeicon
:MOV     R0,#0
DSTR     R0,signalpresent
NMOV     R0,#1
XASWI     "WVCGrab_Refresh" ; Turns refresh on, signal has gone
bADR     R7,nosignal
l.udicon
vLDMIA   R7,{R1-R3}
�ADR     R7,barspace
�STMIA   R7,{R1-R3}
�ADR     R1,iconb
�SWI     "Wimp_SetIconState"
�TEQP    R15,#0
�MOVNV   R6,R6
�MOVS    PC,R14
�.signal
�EQUS    "barsignal"+�0+�0
�	ALIGN
�
.nosignal
�EQUS    "barnosignal"
�
EQUB    0
	ALIGN
.signalpresent

EQUD    1
 
.barspace
*EQUS    "barsignal"
4
EQUB    0
>	ALIGN
H.livebaseR1
R
EQUD    0
\
.fielding
f
EQUD    0
p.evenfield
z
EQUD    1
�.livedumpad%
�
EQUD    0
�.livepagestep
�EQUD    16
�.livepixelstep
�
EQUD    8
�
.iconb
�;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
�;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
�;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
�;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
�;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
�]
� pass%
ș "WVCGrab_MemBases" � ,r1
!livebaseR1=r1
$�
.
8� �setvars
Blongsp%=8400
Ltemplatespace%=8096
Vmaxmenusize%=1000
`�� block% 4,pb% 2048,iconsp% templatespace%,mouseb% 20,menub% 10000,longitems% longsp%,mb% 30048,magt% 32,livepal% 256,grabpal% 256,modeb% 100
jliveplot%=liveplot%
ttempsize%=8000
~� tempb% tempsize%,w%(17,2)
�� IICblock% 10
�ctempb%=tempb%
�$(modeb%+4)="a0-9"+�0
�'submode$="Mode|*modeb%,modeb%+4,4|"
�� set%=0 � 28 � 4
�magt%!set%=1
��
�$block%="TASK"
�wksp%=iconsp%
� spnd%=iconsp%+templatespace%
�close%=�
�quitting%=�
quithand%=0

scrappy%=�

saved8%=�
saved12%=�
(oldmode%=�
2live%=�
<
grabex%=�
Fcfsid%=�
Poldmenu%=-1
Zslave%=�
dqflag%=�
nc%=�
x�
�� �taskinit(task$)
�Eș "Wimp_Initialise",200,!block%,task$ � wimpversion%,taskhandle%
�=taskhandle%
�� �setupwindows
�	� os%
�-sh%=�("<FastGrab$Dir>.Resources.Sprites")
�/� sh%=0 � 214,"Sprite file cannot be found"
�� sprites% �#sh%+16
�!sprites%=�#sh%+16
�sprites%!4=0
�sprites%!8=16
�sprites%!12=16
�	�#sh%
Dș "OS_SpriteOp",266,sprites%,"<FastGrab$Dir>.Resources.Sprites"
@ș "Wimp_OpenTemplate",,"<FastGrab$Dir>.Resources.Templates"
B�ltemp("Parameters",w%(1,1),0):� Change 0 to -1 for new icons!
"modead%=�iconad(1,0)
,x1ad%=�iconad(1,1)
6x2ad%=�iconad(1,2)
@y1ad%=�iconad(1,3)
Jy2ad%=�iconad(1,4)
Tsharpenad%=�iconad(1,22)
^blackad%=�iconad(1,30)
hgammaad%=�iconad(1,31)
r!�ltemp("PALWindow",w%(2,1),0)
|brightad%=�iconad(2,3)
�contad%=�iconad(2,8)
�satad%=�iconad(2,13)
��ltemp("LiveWin",w%(3,1),0)
�w%(3,1)?39=&FF
� �ltemp("LivePane",w%(4,1),0)
�w%(4,1)!68=sprites%
�9w%(4,1)!(88+4+16+32*1)=w%(4,1)!(88+4+16+32*1) � 1<<22
�g� (board_is_16_bit%=� � allow_dithering%=�) � w%(4,1)!(88+4+16+32*4)=w%(4,1)!(88+4+16+32*4) � 1<<22
�"valid%=!(w%(4,1)+88+4+24+32*3)
�� board_is_16_bit% �
�  $valid%="stb_16bit,tb_8bit"
��
�  $valid%="stb_12bit,tb_8bit"
�
 �ltemp("8BitShow",w%(5,1),0)
w%(5,1)?39=&FF
&grabwtitlead%=wksp%-255
0 �ltemp("GrabPane",w%(6,1),0)
:w%(6,1)!68=sprites%
D"�ltemp("SprSaveWin",w%(7,1),0)
Noutsprad%=�iconad(7,2)
X"�ltemp("RawSaveWin",w%(8,1),0)
boutrawad%=�iconad(8,2)
l!�ltemp("Magnifier",w%(9,1),0)
v%mag1ad%=�iconad(9,0):$mag1ad%="1"
�%mag2ad%=�iconad(9,1):$mag2ad%="1"
�#�ltemp("SpriteInfo",w%(10,1),0)
�grabnamead%=�iconad(10,0)
�grabmodead%=�iconad(10,1)
�grabmaskad%=�iconad(10,2)
�grabwidtad%=�iconad(10,3)
�grabbytead%=�iconad(10,4)
�grabpalad%=�iconad(10,5)
�grabheigad%=�iconad(10,6)
� �ltemp("RawInfo",w%(11,1),0)
�rawbytesad%=�iconad(11,1)
�rawwidthad%=�iconad(11,3)
�rawheightad%=�iconad(11,5)
rawbrightad%=�iconad(11,9)
rawcontad%=�iconad(11,11)
rawsatad%=�iconad(11,10)
 �ltemp("Info",w%(13,1),-1)
*$�iconad(13,7)=version$
4"�ltemp("ImageInfo",w%(14,1),0)
>$$�iconad(14,4)=�ChangeFSIVersion
H�ltemp("Query",w%(15,1),0)
Rqueryad%=�iconad(15,1)
\!�ltemp("SpeedWin",w%(17,1),0)
fspeedad%=�iconad(17,3)
pș"Wimp_CloseTemplate"
z�
�
�� �iconad(wh%,ih%)
�=!(w%(wh%,1)+112+ih%*32)
�
�.� �ltemp(tempname$,� address%,indirected%)
�Tș "Wimp_LoadTemplate",,ctempb%+4,wksp%,spnd%,-1,tempname$,0 � ,,wksp%,,,,found%
�G� found%=0 ș "Wimp_CloseTemplate":� 0,"Template file is incorrect"
�address%=ctempb%
�D� (ctempb%-tempb%+tempsize%<400) � 0,"Templates need more space"
�ctempb%+=4+88+ctempb%!88*32
�&� indirected% address%!68=sprites%
��
�� �getchoices
.inc%=�("<FastGrab$Dir>.Resources.Choices")
� inc%=0 �
$modead%="15"
$$x1ad%="1"
.$x2ad%="1"
8$y1ad%="1"
B$y2ad%="1"
Loutmode$=" "
V�setflags(0)
`$sharpenad%=""
jcontrast%=32
tsavedcont%=32
~saturation%=32
�old_sat%=saturation%
�savedsat%=32
�brightness%=0
�savedbright%=0
�bit%=12
�dithered%=1
�+� board_is_16_bit% � allow_dithering% �
� dither$=">"
��
� dither$="<"
��
�� allow_mono% �

 mono$=""

�
 mono$="<"
�
(ltool$=">"
2gtool$=">"
<
speed%=99
F
field$=""
P!fielding=0
Z!evenfield=0
d�fieldmenu
n
cache$=""
x$modeb%="15"
�grabsize%=0
�livesize%=2
��select(26,0)
��select(27,0)
��select(28,0)
�$blackad%="32"
��select(29,0)
�$gammaad%="2.2"
��
�mode%=�#inc%
�$modead%=�mode%
��#inc%,$x1ad%
��#inc%,$y1ad%
�#inc%,$x2ad%
�#inc%,$y2ad%
!options%=�#inc% � (�#inc%)<<8
"�setflags(options%)
,$sharpenad%=�(�#inc%)
6brightness%=�#inc%
@savedbright%=brightness%
Jcontrast%=�#inc%
Tsavedcont%=contrast%
^saturation%=�#inc%
hsavedsat%=saturation%
rold_sat%=saturation%
|tool%=�#inc%
�"� (tool% � 1) bit%=12 � bit%=8
�(� (tool% � 2) ltool$=">" � ltool$=""
�(� (tool% � 4) gtool$=">" � gtool$=""
�(� (tool% � 8) cache$=">" � cache$=""
�A� (tool% � 16) field$=">":!fielding=1 � field$="":!fielding=0
�!evenfield=(tool% � 32)>>4
�(� (tool% � 128) mono$=">" � mono$=""
�� allow_mono%=� � mono$="<"
�� board_is_16_bit% �
�F � (tool% � 64) � dithered%=1:dither$=">" � dithered%=0:dither$=""
� �change_LCA(dithered%)
��
� ș "WVCGrab_LCA",0
 � set_8bit
 � allow_dithering% �
  dithered%=1
&  dither$=">"
0 �
:  dithered%=0
D  dither$="<"
N �
X�
bold_sat%=saturation%
l�fieldmenu
vspeed%=�#inc%
�%modeval%=�#inc%:$modeb%=�modeval%
�grabsize%=�#inc%
�livesize%=�#inc%
�$sel%=�#inc%:� sel% �select(26,1)
�$sel%=�#inc%:� sel% �select(27,1)
�$sel%=�#inc%:� sel% �select(28,1)
�$blackad%=�(�#inc%)
�$sel%=�#inc%:� sel% �select(29,1)
��#inc%,$gammaad%
�precise%=�#inc%
�� precise% �
� on%=32:outmode$="P"
� � s%=7 � 32
B  � s%=on% �iconset(1,s%,1<<21,1<<21) � �iconset(1,s%,1<<21,0)
 �
�
 
�#inc%
*�
4%grabsize$=�setsizemenu(grabsize%)
>%livesize$=�setsizemenu(livesize%)
H�speed:$speedad%=�speed%
R!�contrast:$contad%=�contrast%
\'�brightness:$brightad%=�brightness%
f$�saturation:$satad%=�saturation%
p� bit%=12 �
z �iconset(4,3,1<<21,0)
��
� �iconset(4,3,1<<21,1<<21)
��
��
�� �setflags(set%)
�� set% � 256 �
��iconset(1,6,1<<21,0)
��iconset(1,5,1<<21,1<<21)
��
��iconset(1,6,1<<21,1<<21)
��iconset(1,5,1<<21,0)
��
�Ȏ set% � 3 �
� 0
 outmode$=" "

 on%=7
$� 1
. outmode$="C"
8
 on%=8
B� 2
L outmode$="D"
V
 on%=9
`� 3
j outmode$="T"
t on%=10
~�
�� s%=7 � 32
�A � s%=on% �iconset(1,s%,1<<21,1<<21) � �iconset(1,s%,1<<21,0)
��
��select(11,(set% � 4)>>2)
��select(12,(set% � 8)>>3)
��select(13,(set% � 16)>>4)
��select(14,(set% � 32)>>5)
��select(15,(set% � 64)>>6)
��select(16,(set% � 128)>>7)
��select(23,(set% � 512)>>9)
�!�select(24,(set% � 1024)>>10)
�!�select(25,(set% � 2048)>>11)
!�select(27,(set% � 4096)>>12)

�

� �select(icon%,select%)
('�iconset(1,icon%,1<<21,select%<<21)
2�
<
F� �wimpservice(event%,pb%)
PȎ event% �
Z� 0
d Ȏ !dragging% �
n � 1,2,3
x  �dopaldrag
� � 4
�  �dospeeddrag
� �
�� 1
� �redrawwin
�� 2
� Ȏ !pb% �
� � w%(3,0)
�  �dopane(w%(3,0))
� � w%(5,0)
�  �dopane(w%(5,0))
� 
�  ș "Wimp_OpenWindow",,pb%
 �
� 3
 Ȏ !pb% �
" � w%(3,0)
,  �shutlivedisplay
6 � w%(5,0)
@  �dwin(5)
J  !grabwb=0
T  � gtool$=">" �dwin(6)
^ 
h!  ș "Wimp_DeleteWindow",,pb%
r  w%(�windowid(!pb%),2)=�
| �
�� 6
� �clickwindow
�� 7
�
 �dragend
�� 8
� �handlekey
�� 9
� �menuselect
�� 17,18
�
 �message
��
��
�
 � �shutlivedisplay
 �dwin(3)
 
!livewb=0
 &� ltool$=">" �dwin(4)
 0live%=�
 :!maskad=%1100000110001
 D@� !signalpresent $barspace="bardorms" � $barspace="bardormn"
 N!mb%=-1
 Xmb%!4=iconbar%
 bmb%!8=0
 lmb%!12=0
 vș "Wimp_SetIconState",,mb%
 ��
 �
 �� �dumpsprite
 �-$(mb%+4)="Sprite not saved - discard it?"
 �7ș "Wimp_ReportError",mb%,7,"FastGrab" � ,response%
 �� response%=2 =� � =�
 �
 �� �shutdown(arg%)
 �� arg% �
 �  � � saved12% � (debug%=�) �
 �M  �query(2,"Image not saved in FastGrab: are you sure you want to quit?")
 �  �
 � �
! � slave% �
!/  $mb%="<FastGrab$Dir>.Resources.TwelveBit"
!!  ș "OS_FSControl",27,mb%,,0
!   slave%=�
!* �
!4�
!>close%=�
!H� quitting% �
!R$ ș "Wimp_GetCaretPosition",,mb%
!\ mb%!24=&1FC
!f" ș "Wimp_SendMessage",8,mb%,0
!p* ș "Wimp_SendMessage",8,mb%,quithand%
!z�
!�*ș "Wimp_CloseDown",taskhandle%,"TASK"
!��
!��
!�
!�� �query(qnum%,message$)
!�qflag%=qnum%
!�$queryad%=message$
!�1�menu(15,rightscr%/2-738/2,topscr%/2+276/2,0)
!��
!�
!�� �redrawwin
!�
Ȏ !pb% �
!�
� w%(2,0)
"( ș "Wimp_RedrawWindow",,pb% � more%
" x0%=pb%!4-pb%!20
" y0%=pb%!16-pb%!24
"$
 ȕ more%
".  �
"8  ș "Wimp_SetColour",7
"B+  ȓ Ȑ x0%+140,y0%-36,brightness%*4,20
"L)  ȓ Ȑ x0%+140,y0%-80,contrast%*4,20
"V,  ȓ Ȑ x0%+140,y0%-124,saturation%*4,20
"`)  ș "Wimp_GetRectangle",,pb% � more%
"j �
"t� w%(17,0)
"~( ș "Wimp_RedrawWindow",,pb% � more%
"� x0%=pb%!4-pb%!20
"� y0%=pb%!16-pb%!24
"�
 ȕ more%
"�  �
"�  ș "Wimp_SetColour",7
"�&  ȓ Ȑ x0%+140,y0%-36,speed%*2,20
"�)  ș "Wimp_GetRectangle",,pb% � more%
"� �
"��
"��
"�
"�� �dopane(toolwindow%)
#Ȏ toolwindow% �
#

� w%(3,0)
# pane%=w%(4,0)
# paneopen%=(ltool$=">")
#(
� w%(5,0)
#2 pane%=w%(6,0)
#< paneopen%=(gtool$=">")
#F
#P% � 100,"This window is paneless!"
#Z�
#d!mb%=toolwindow%
#n!ș "Wimp_GetWindowState",,mb%
#x� mb%!32 � 1<<19 �
#� �togglewindowsize(mb%)
#� ș "Wimp_OpenWindow",,pb%
#�" ș "Wimp_GetWindowState",,pb%
#��
#�*� pb%!4<=mb%!4 towards%=� � towards%=�
#�!mb%=pane%
#�mb%!4=pb%!4-88
#�mb%!8=pb%!8
#�mb%!12=pb%!4-4
#�mb%!16=pb%!16
#�mb%!20=0
#�mb%!24=0
#�mb%!28=pb%!28
$� towards% �
$ � paneopen% �
$  ș "Wimp_OpenWindow",,mb%
$"  pb%!28=pane%
$, �
$6 ș "Wimp_OpenWindow",,pb%
$@�
$J ș "Wimp_OpenWindow",,pb%
$T* � paneopen% ș "Wimp_OpenWindow",,mb%
$^�
$h�
$r
$|� �togglewindowsize(block%)
$�win%=�windowid(!block%)
$�&� IF w%(win%,1)!44<-rightscr% THEN
$��  block%!4=0
$��  block%!12=rightscr%-48
$�� ENDIF
$�#� IF w%(win%,1)!56>topscr% THEN
$��  block%!8=48
$��  block%!16=topscr%-48
$�� ENDIF
$�$block%!12=block%!4+w%(win%,1)!52
$�$block%!8=block%!16-w%(win%,1)!56
$��
$�
%� �windowid(handle%)
%
� win%
%
win%=0
%&ȕ w%(win%,0)<>handle%
%0 win%+=1
%:�
%D	=win%
%N
%X� �clickwindow
%b
%ladjust%=pb%!4 � 1
%v
%�Ȏ pb%!12 �
%�
%�� -2
%� Ȏ pb%!16 �
%� � iconbar%
%�  Ȏ pb%!8 �
%�	  � 2
%�   mousex%=!pb%
%�   mousey%=186
%�3   menu%=�cmenu(0,"FastGrab|@13'Info|Quit|",96)
%�   mentype%=0
%�	  � 4
%�   � � live% �
&&    w%(3,1)!4=rightscr%/2-livex%/2
&$    w%(3,1)!8=topscr%/2-livey%/2
&'    w%(3,1)!12=rightscr%/2+livex%/2
& %    w%(3,1)!16=topscr%/2+livey%/2
&*"    � w%(3,1)!8<0 w%(3,1)!8=84
&4    w%(3,1)!20=0
&>    w%(3,1)!24=0
&H    w%(3,1)!28=-1
&R    �cwin(3)
&\    !rdb=w%(3,0)
&f    !udb=w%(3,0)
&p    !livewb=w%(3,0)
&z%    ș "Wimp_OpenWindow",,w%(3,1)
&�    � ltool$=">" �
&�     w%(4,1)!4=w%(3,1)!4-88
&�     w%(4,1)!8=w%(3,1)!8
&�      w%(4,1)!12=w%(4,1)!4+84
&�     w%(4,1)!16=w%(3,1)!16
&�     w%(4,1)!28=-1
&�(     � grabex% �iconset(4,1,1<<22,0)
&�     �cwin(4)
&�&     ș "Wimp_OpenWindow",,w%(4,1)
&�	    �
&�J    � !signalpresent � $barspace="barsignal" � $barspace="barnosignal"
&�    !mb%=-1
&�    mb%!4=iconbar%
'    mb%!8=0
'    mb%!12=0
'#    ș "Wimp_SetIconState",,mb%
'$    live%=�
'.    !maskad=%1100000110000
'8   �
'B    � ltool$=">" �
'L     !mb%=w%(4,0)
'V&     ș "Wimp_GetWindowState",,mb%
'`     mb%!28=-1
'j"     ș "Wimp_OpenWindow",,mb%
't     !mb%=w%(3,0)
'~&     ș "Wimp_GetWindowState",,mb%
'�     mb%!28=w%(4,0)
'�"     ș "Wimp_OpenWindow",,mb%
'�	    �
'�     !mb%=w%(3,0)
'�&     ș "Wimp_GetWindowState",,mb%
'�     mb%!28=-1
'�"     ș "Wimp_OpenWindow",,mb%
'�	    �
'�   �
'� �
'��
'�
(
� w%(3,0)
(
 Ȏ pb%!8 �
( � 2
(  �livemenu
(( �
(2
(<
� w%(4,0)
(F � (pb%!8 � 4) �
(P  Ȏ pb%!16 �
(Z
   � 0
(d
    �grab
(n    �showgrab
(x
   � 1
(�    �showgrab
(�
   � 2
(�$    �menu(2,!pb%-290,pb%!4+68,0)
(�
   � 3
(�"    � bit%=12 bit%=8 � bit%=12
(�
   � 4
(�    dithered%=dithered% � 1
(�    �change_LCA(dithered%)
(�  �
(� �
(� � (pb%!8 � 2) �livemenu
(�
(�
� w%(5,0)
) Ȏ pb%!8 �
) � 2
)  �grabmenu
)" �
),
� w%(6,0)
)6 � (pb%!8 � 4) �
)@ Ȏ pb%!16 �
)J � 0
)T#  �menu(1,!pb%-354,pb%!4+264,0)
)^ � 1
)h"  �menu(9,!pb%-136,pb%!4+64,0)
)r � 2
)|"  �menu(7,!pb%-122,pb%!4+84,0)
)�   dragtype%=0
)� � 3
)�"  �menu(8,!pb%-122,pb%!4+84,0)
)�  dragtype%=1
)� �
)� �
)� � (pb%!8 � 2) �grabmenu
)�
)�
� w%(9,0)
)� � (pb%!8 � 1)=0 �
)�  Ȏ pb%!16 �
)�	  � 2
)�   �magstring(1,0)
*	  � 3
*   �magstring(-1,0)
*	  � 4
*&   �magstring(0,1)
*0	  � 5
*:   �magstring(0,-1)
*D  �
*N �
*X  Ȏ pb%!16 �
*b	  � 2
*l   �magstring(-1,0)
*v	  � 3
*�   �magstring(1,0)
*�	  � 4
*�   �magstring(0,-1)
*�	  � 5
*�   �magstring(0,1)
*�  �
*� �
*�
*�
� w%(7,0)
*� Ȏ pb%!16 �
*� � 1
*�  �savesprite
*� � 0
+  � (pb%!8 � &50)<>0 �
+   �gst(pb%,w%(7,0))
+   !mb%=w%(7,0)
+    mb%!4=0
+*"   ș "Wimp_GetIconState",,mb%
+4   ilx%=mb%!8:ity%=mb%!12
+>   irx%=mb%!16:iby%=mb%!20
+H   �gst(mb%,w%(7,0))
+R   !pb%=w%(7,0)
+\   pb%!4=5
+f   pb%!8=mb%!4+ilx%
+p   pb%!12=mb%!16+ity%
+z   pb%!16=mb%!4+irx%
+�   pb%!20=mb%!16+iby%
+�   pb%!24=0
+�   pb%!28=0
+�   pb%!32=&7FFFFFFF
+�   pb%!36=&7FFFFFFF
+�   ș "Wimp_DragBox",,pb%
+�   dragtype%=0
+�  �
+� �
+�
+�
� w%(8,0)
+� Ȏ pb%!16 �
+� � 1
,  �saveraw
, � 0
,  � (pb%!8 � &50)<>0 �
,$   �gst(pb%,w%(8,0))
,.   !mb%=w%(8,0)
,8   mb%!4=0
,B"   ș "Wimp_GetIconState",,mb%
,L   ilx%=mb%!8:ity%=mb%!12
,V   irx%=mb%!16:iby%=mb%!20
,`   �gst(mb%,w%(8,0))
,j   !pb%=w%(8,0)
,t   pb%!4=5
,~   pb%!8=mb%!4+ilx%
,�   pb%!12=mb%!16+ity%
,�   pb%!16=mb%!4+irx%
,�   pb%!20=mb%!16+iby%
,�   pb%!24=0
,�   pb%!28=0
,�   pb%!32=&7FFFFFFF
,�   pb%!36=&7FFFFFFF
,�   ș "Wimp_DragBox",,pb%
,�   dragtype%=1
,�  �
,� �
,�
-
� w%(1,0)
-
 Ȏ pb%!16 �
- � 7
-  outmode$=" "
-( � 8
-2  outmode$="C"
-< � 9
-F  outmode$="D"
-P	 � 10
-Z  outmode$="T"
-d	 � 32
-n  outmode$="P"
-x	 � 25
-�  ș "Wimp_CreateMenu",,-1
-�
  �gocfsi
-� �
-�? � (pb%!8 � 1) � (pb%!16<11) �iconset(1,pb%!16,1<<21,1<<21)
-�
-�
� w%(2,0)
-� adjust%=pb%!8 � 1
-�
 ch%=�
-� Ȏ pb%!16 �
-� � 1
-�  � adjust% �
-�,   � brightness%<>0 brightness%-=1:ch%=�
-�  �
.-   � brightness%<>63 brightness%+=1:ch%=�
.  �
.<  � ch% $brightad%=�brightness%:�udpbar(-36,brightness%)
." � 2
.,  � adjust% �
.6-   � brightness%<>63 brightness%+=1:ch%=�
.@  �
.J,   � brightness%<>0 brightness%-=1:ch%=�
.T  �
.^<  � ch% $brightad%=�brightness%:�udpbar(-36,brightness%)
.h � 6
.r  � adjust% �
.|(   � contrast%<>0 contrast%-=1:ch%=�
.�  �
.�)   � contrast%<>63 contrast%+=1:ch%=�
.�  �
.�6  � ch% $contad%=�contrast%:�udpbar(-80,contrast%)
.� � 7
.�  � adjust% �
.�)   � contrast%<>63 contrast%+=1:ch%=�
.�  �
.�(   � contrast%<>0 contrast%-=1:ch%=�
.�  �
.�6  � ch% $contad%=�contrast%:�udpbar(-80,contrast%)
.�	 � 11
.�  � adjust% �
/,   � saturation%<>0 saturation%-=1:ch%=�
/  �
/-   � saturation%<>63 saturation%+=1:ch%=�
/&  �
/0:  � ch% $satad%=�saturation%:�udpbar(-124,saturation%)
/:	 � 12
/D  � adjust% �
/N-   � saturation%<>63 saturation%+=1:ch%=�
/X  �
/b,   � saturation%<>0 saturation%-=1:ch%=�
/l  �
/v:  � ch% $satad%=�saturation%:�udpbar(-124,saturation%)
/� � 4
/�  �palslide(pb%,-36,1)
/� � 9
/�  �palslide(!pb%,-80,2)
/�	 � 14
/�  �palslide(!pb%,-124,3)
/� � 0
/�  �setpal(0,32,32)
/�	 � 16
/�0  �setpal(savedbright%,savedcont%,savedsat%)
/� �
/�
/�� w%(15,0)
0 Ȏ qflag% �
0 � 1
0  Ȏ pb%!16 �
0 	  � 0
0*#   �menu(8,!pb%-122,pb%!4+84,0)
04   dragtype%=1
0>	  � 2
0H   �deletegrabbed
0R  �
0\ � 2
0f  Ȏ pb%!16 �
0p	  � 0
0z   �shutdown(0)
0�	  � 2
0�  �
0� � 3
0�  Ȏ pb%!16 �
0�	  � 0
0�#   �menu(7,!pb%-122,pb%!4+84,0)
0�   dragtype%=0
0�	  � 2
0�   �deletegrabbed
0�  �
0� �
0� �clwin(15)
0�
1� w%(17,0)
1 Ȏ pb%!16 �
1 � 0
1$  �speedslide(!pb%)
1. � 1
18  � (pb%!8 � 1) �
1B   � speed%<>0 �
1L    speed%-=1
1V    $speedad%=�speed%
1`    �speedbar
1j   �
1t  �
1~   � speed%<>99 �
1�    speed%+=1
1�    $speedad%=�speed%
1�    �speedbar
1�   �
1�  �
1� � 2
1�  � (pb%!8 � 1) �
1�   � speed%<>99 �
1�    speed%+=1
1�    $speedad%=�speed%
1�    �speedbar
1�   �
2  �
2
   � speed%<>0 �
2    speed%-=1
2    $speedad%=�speed%
2(    �speedbar
22   �
2<  �
2F �
2P�
2Z�
2d
2n� �livemenu
2xmousex%=!pb%
2�mousey%=pb%!4
2�� bit%=12 �
2� tick12$=">"
2� cachem$=cache$
2��
2� tick12$=""
2� cachem$="<"
2��
2�$� grabex% shade$="" � shade$="<"
2�"� mono$=">" � ms$="<" � ms$=""
2�Ttemp0$="FastGrab|Grab frame|'0156grabsize$'Frame size|'0156livesize$'Live size|"
2�� board_is_16_bit% �
2�� temp1$=ms$+tick12$+"16 bit data|"+ms$+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
3�
3� temp1$=tick12$+"12 bit data|"+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
3�
3"%menu%=�cmenu(0,temp0$+temp1$,236)
3,mentype%=1
36�
3@
3J� �grabmenu
3Tmousex%=!pb%
3^mousey%=pb%!4
3h � grab12% raw$="" � raw$="<"
3r^temp0$="FastGrab|@10'Sprite info|@9'Zoom|@7'Save sprite|@1'"+raw$+"ChangeFSI|@14'Credits|"
3|� board_is_16_bit% �
3�^ temp1$="@11'"+raw$+"16 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
3��
3�^ temp1$="@11'"+raw$+"12 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
3��
3�%menu%=�cmenu(0,temp0$+temp1$,220)
3�mentype%=2
3��
3�
3�%� �palslide(xpos%,ypos%,dragnum%)
3�!dragging%=dragnum%
3�!mb%=w%(2,0)
3�!ș "Wimp_GetWindowState",,mb%
3�mb%!24=140+mb%!4
4mb%!28=ypos%+mb%!16
4mb%!32=392+mb%!4
4mb%!36=ypos%+20+mb%!16
4&mb%!8=mb%!24
40mb%!12=mb%!28
4:mb%!16=xpos%
4Dmb%!20=mb%!36
4Nmb%!4=7
4Xș "Wimp_DragBox",,mb%
4b�
4l
4v� �udpbar(bary%,value%)
4�� value%<0 �
4�!mb%=w%(2,0)
4�
mb%!4=142
4�mb%!8=bary%
4�mb%!12=394
4�mb%!16=bary%+22
4�'ș "Wimp_UpdateWindow",,mb% � more%
4�x0%=mb%!4-mb%!20
4�y0%=mb%!16-mb%!24
4�ȕ more%
4� �
4� ș "Wimp_SetColour",7
4�( ȓ Ȑ x0%+140,y0%+bary%,value%*4,20
5( ș "Wimp_GetRectangle",,mb% � more%
5�
5!mb%=w%(2,0)
5 mb%!4=84
5*mb%!8=bary%-4
54mb%!12=136
5>mb%!16=bary%+26
5H'ș "Wimp_UpdateWindow",,mb% � more%
5Rx0%=mb%!4-mb%!20
5\y0%=mb%!16-mb%!24
5fȕ more%
5p �
5z( ș "Wimp_GetRectangle",,mb% � more%
5��
5�Ȏ bary% �
5�	� -36
5� �brightness
5�	� -80
5� �contrast
5�
� -124
5� �saturation
5��
5��
5�
5�� �setpal(b%,c%,s%)
5�.brightness%=b%:contrast%=c%:saturation%=s%
6$brightad%=�(b%)
6$contad%=�(c%)
6$satad%=�(s%)
6$�udpbar(-36,b%)
6.�udpbar(-80,c%)
68�udpbar(-124,s%)
6B�
6L
6V� �calcbar(xpos%)
6`� winpos%,value%
6j!mb%=w%(2,0)
6t!ș "Wimp_GetWindowState",,mb%
6~winpos%=xpos%-mb%!4
6�=(winpos%-140)/4
6�
6�� �dopaldrag
6�!ș "Wimp_GetPointerInfo",,mb%
6�Ȏ !dragging% �
6�� 1
6� newbright%=�calcbar(!mb%)
6� � brightness%=newbright% �
6� brightness%=newbright%
6� $brightad%=�brightness%
6� �udpbar(-36,brightness%)
6�� 2
7 newcont%=�calcbar(!mb%)
7
 � contrast%=newcont% �
7 contrast%=newcont%
7 $contad%=�contrast%
7( �udpbar(-80,contrast%)
72� 3
7< newsat%=�calcbar(!mb%)
7F � saturation%=newsat% �
7P saturation%=newsat%
7Z $satad%=�saturation%
7d �udpbar(-124,saturation%)
7n�
7x�
7�
7�� �speedslide(xpos%)
7�!dragging%=4
7�!mb%=w%(17,0)
7�!ș "Wimp_GetWindowState",,mb%
7�mb%!24=140+mb%!4
7�mb%!28=-36+mb%!16
7�mb%!32=338+mb%!4
7�mb%!36=-16+mb%!16
7�mb%!8=mb%!24
7�mb%!12=mb%!28
7�mb%!16=xpos%
7�mb%!20=mb%!36
8mb%!4=7
8ș "Wimp_DragBox",,mb%
8�
8"
8,� �speedbar
86� speed%<0 �
8@!mb%=w%(17,0)
8J
mb%!4=142
8T
mb%!8=-36
8^mb%!12=340
8hmb%!16=-14
8r'ș "Wimp_UpdateWindow",,mb% � more%
8|x0%=mb%!4-mb%!20
8�y0%=mb%!16-mb%!24
8�ȕ more%
8� �
8� ș "Wimp_SetColour",7
8�% ȓ Ȑ x0%+140,y0%-36,speed%*2,20
8�( ș "Wimp_GetRectangle",,mb% � more%
8��
8�!mb%=w%(17,0)
8�mb%!4=84
8�
mb%!8=-40
8�mb%!12=136
8�mb%!16=-10
8�'ș "Wimp_UpdateWindow",,mb% � more%
9x0%=mb%!4-mb%!20
9y0%=mb%!16-mb%!24
9ȕ more%
9& �
90( ș "Wimp_GetRectangle",,mb% � more%
9:�
9D
�speed
9N�
9X�
9b
9l� �calcspeed(xpos%)
9v� winpos%,value%
9�!mb%=w%(17,0)
9�!ș "Wimp_GetWindowState",,mb%
9�winpos%=xpos%-mb%!4
9�=(winpos%-140)/2
9�
9�� �dospeeddrag
9�!ș "Wimp_GetPointerInfo",,mb%
9�newspeed%=�calcspeed(!mb%)
9�� speed%=newspeed% �
9�speed%=newspeed%
9�$speedad%=�speed%
9�
�speedbar
9��
:
:� �speed
:!speedval=99-speed%
: �
:*
:4� �contrast
:>?IICblock%=2
:HIICblock%?1=contrast%
:Rș &240,136,IICblock%,2
:\�
:f
:p� �saturation
:z?IICblock%=1
:�IICblock%?1=saturation%
:�ș &240,136,IICblock%,2
:��
:�
:�� �brightness
:�?IICblock%=0
:�IICblock%?1=brightness%
:�ș &240,136,IICblock%,2
:��
:�
:�� �chkbnds(address%)
:� � �$address%=0 $address%="0"
:�"� �$address%>63 $address%="63"
;�
;
;� �dragend
;$� dx%,dy%,dw%,di%
;.Ȏ !dragging% �
;8
� 1,2,3,4
;B !dragging%=0
;L �
;V�
;`Ȏ dragtype% �
;j	� 0,1
;t" ș "Wimp_GetPointerInfo",,mb%
;~
 dx%=!mb%
;� dy%=mb%!4
;� dw%=mb%!12
;� di%=mb%!16
;� Ȏ dragtype% �
;� � 0
;�  fnamelen%=�($outsprad%)
;�  filesize%=spritesize%-4
;�  filetype%=&FF9
;�*  $(mb%+44)=�zt(outsprad%)+�0+�0+�0+�0
;� � 1
;�  fnamelen%=�($outrawad%)
;�  filesize%=rawsize%
<  filetype%=&FFD
<
*  $(mb%+44)=�zt(outrawad%)+�0+�0+�0+�0
< �
< �round(fnamelen%,4)
<( fnamelen%+=4
<2 dummy%=filesize%
<< �round(dummy%,4)
<F !mb%=44+fnamelen%
<P
 mb%!12=0
<Z
 mb%!16=1
<d mb%!20=dw%
<n mb%!24=di%
<x mb%!28=dx%
<� mb%!32=dy%
<� mb%!36=dummy%+1024
<� mb%!40=filetype%
<�) ș "Wimp_SendMessage",17,mb%,dw%,di%
<� myref%=mb%!8
<� dragtype%=-1
<��
<��
<�
<�� �datasaveack
<�� pb%!12=myref% �
<� save$=�zt(pb%+44)
<� Ȏ filetype% �
= � &FF9
=+  ș "OS_SpriteOp",&10C,grabarea%,save$
=  � pb%!36<>-1 �
="2   � cfsid% suffix$=" CFSI" � suffix$=" 8 bit"
=,   saved8%=�
=6#   $grabwtitlead%=save$+suffix$
=@   �updatetitle
=J  �
=T � &FFD
=^  rawout%=�(save$)
=h  � slave% �
=r5   rawin%=�("<FastGrab$Dir>.Resources.TwelveBit")
=|4   � rawin%=0 � 214,"Cache file cannot be found"
=�1   ș "OS_GBPB",4,rawin%,livearea%+100,100000
=�2   ș "OS_GBPB",2,rawout%,livearea%+100,100000
=�0   ș "OS_GBPB",4,rawin%,livearea%+100,96628
=�1   ș "OS_GBPB",2,rawout%,livearea%+100,96628
=�   �#rawin%
=�  �
=�/   ș "OS_GBPB",2,rawout%,rawarea%,rawsize%
=�  �
=�  �#rawout%
=�  � pb%!36<>-1 �
=�   saved12%=�
=�Y   � board_is_16_bit% $grabwtitlead%=save$+" 16 bit" � $grabwtitlead%=save$+" 12 bit"
=�   �updatetitle
>  �
> �
> pb%!12=pb%!8
>&
 pb%!16=3
>0' ș "Wimp_SendMessage",18,pb%,pb%!4
>: ș "Wimp_CreateMenu",,-1
>D�
>N�
>X
>b� �zt(address%)
>l
� pos%
>v
pos%=0
>�string$=""
>��
>� string$+=�address%?pos%
>� pos%+=1
>�� address%?pos%<32
>�=string$
>�
>�� �putword(handle%,word%)
>��#handle%,word% � &FF
>� �#handle%,(word% � &FF00)>>8
>�#�#handle%,(word% � &FF0000)>>16
>�%�#handle%,(word% � &FF000000)>>24
>��
?
?� �getword(handle%)
?byte0%=�#handle%
? byte1%=�#handle%
?*byte2%=�#handle%
?4byte3%=�#handle%
?>7=(byte3%<<24) � (byte2%<<16) � (byte1%<<8) � byte0%
?H
?R� �handlekey
?\mine%=�
?f
Ȏ !pb% �
?p
?z
� w%(1,0)
?� Ȏ pb%!24 �
?�	 � 13
?�
  mine%=�
?�  Ȏ pb%!4 �
?�  � 0,1,2,3
?�M   ș "Wimp_SetCaretPosition",w%(1,0),pb%!4+1,,,-1,�($�iconad(1,pb%!4+1))
?�	  � 4
?�@   ș "Wimp_SetCaretPosition",w%(1,0),22,,,-1,�($sharpenad%)
?�
  � 22
?�>   ș "Wimp_SetCaretPosition",w%(1,0),30,,,-1,�($blackad%)
?�
  � 30
?�>   ș "Wimp_SetCaretPosition",w%(1,0),31,,,-1,�($gammaad%)
?�
  � 31
@   ș "Wimp_CreateMenu",,-1
@   �gocfsi
@   �
@$  �
@. � &18E
@8
  mine%=�
@B  Ȏ pb%!4 �
@L  � 0,1,2,3
@VM   ș "Wimp_SetCaretPosition",w%(1,0),pb%!4+1,,,-1,�($�iconad(1,pb%!4+1))
@`	  � 4
@j@   ș "Wimp_SetCaretPosition",w%(1,0),22,,,-1,�($sharpenad%)
@t
  � 22
@~>   ș "Wimp_SetCaretPosition",w%(1,0),30,,,-1,�$(blackad%)
@�
  � 30
@�>   ș "Wimp_SetCaretPosition",w%(1,0),31,,,-1,�$(gammaad%)
@�
  � 31
@�<   ș "Wimp_SetCaretPosition",w%(1,0),0,,,-1,�$(modead%)
@�  �
@� � &18F
@�
  mine%=�
@�  Ȏ pb%!4 �
@�	  � 0
@�>   ș "Wimp_SetCaretPosition",w%(1,0),31,,,-1,�($gammaad%)
@�	  � 1
@�<   ș "Wimp_SetCaretPosition",w%(1,0),0,,,-1,�$(modead%)
A
  � 2,3,4
A
M   ș "Wimp_SetCaretPosition",w%(1,0),pb%!4-1,,,-1,�($�iconad(1,pb%!4-1))
A
  � 22
AA   ș "Wimp_SetCaretPosition",w%(1,0),4,,,-1,�($�iconad(1,4))
A(
  � 30
A2@   ș "Wimp_SetCaretPosition",w%(1,0),22,,,-1,�($sharpenad%)
A<
  � 31
AF>   ș "Wimp_SetCaretPosition",w%(1,0),30,,,-1,�($blackad%)
AP  �
AZ �
Ad
An
� w%(9,0)
Ax Ȏ pb%!24 �
A� � &18E,&18F
A�
  mine%=�
A�  Ȏ pb%!4 �
A�	  � 0
A�<   ș "Wimp_SetCaretPosition",w%(9,0),1,,,-1,�($mag2ad%)
A�	  � 1
A�<   ș "Wimp_SetCaretPosition",w%(9,0),0,,,-1,�($mag1ad%)
A�  �
A�	 � 13
A�
  mine%=�
A�  Ȏ pb%!4 �
A�	  � 0
A�<   ș "Wimp_SetCaretPosition",w%(9,0),1,,,-1,�($mag2ad%)
B	  � 1
B<   ș "Wimp_SetCaretPosition",w%(9,0),0,,,-1,�($mag1ad%)
B  �
B" �
B, � mine% �magstring(0,0)
B6
B@
� w%(7,0)
BJ Ȏ pb%!24 �
BT	 � 13
B^
  mine%=�
Bh  �savesprite
Br  ș "Wimp_CreateMenu",,-1
B| �
B�
B�
� w%(8,0)
B� Ȏ pb%!24 �
B�	 � 13
B�
  mine%=�
B�  �saveraw
B�  ș "Wimp_CreateMenu",,-1
B� �
B�
B�
� w%(2,0)
B� Ȏ pb%!24 �
B�	 � 13
B�
  mine%=�
C  Ȏ pb%!4 �
C	  � 3
C<   ș "Wimp_SetCaretPosition",w%(2,0),8,,,-1,�($contad%)
C&   �chkbnds(brightad%)
C0   brightness%=�$brightad%
C:   �udpbar(-36,brightness%)
CD	  � 8
CN<   ș "Wimp_SetCaretPosition",w%(2,0),13,,,-1,�($satad%)
CX   �chkbnds(contad%)
Cb   contrast%=�$contad%
Cl   �udpbar(-80,contrast%)
Cv
  � 13
C�   ș "Wimp_CreateMenu",,-1
C�   �chkbnds(satad%)
C�   saturation%=�$satad%
C�  �
C� � &18E
C�
  mine%=�
C�  Ȏ pb%!4 �
C�	  � 3
C�<   ș "Wimp_SetCaretPosition",w%(2,0),8,,,-1,�($contad%)
C�   �chkbnds(brightad%)
C�   brightness%=�$brightad%
C�   �udpbar(-36,brightness%)
C�	  � 8
D<   ș "Wimp_SetCaretPosition",w%(2,0),13,,,-1,�($satad%)
D   �chkbnds(contad%)
D   contrast%=�$contad%
D    �udpbar(-80,contrast%)
D*
  � 13
D4>   ș "Wimp_SetCaretPosition",w%(2,0),3,,,-1,�($brightad%)
D>   �chkbnds(satad%)
DH   saturation%=�$satad%
DR    �udpbar(-124,saturation%)
D\  �
Df � &18F
Dp
  mine%=�
Dz  Ȏ pb%!4 �
D�	  � 3
D�<   ș "Wimp_SetCaretPosition",w%(2,0),13,,,-1,�($satad%)
D�   �chkbnds(brightad%)
D�   brightness%=�$brightad%
D�   �udpbar(-36,brightness%)
D�	  � 8
D�>   ș "Wimp_SetCaretPosition",w%(2,0),3,,,-1,�($brightad%)
D�   �chkbnds(contad%)
D�   contrast%=�$contad%
D�   �udpbar(-80,contrast%)
D�
  � 13
D�<   ș "Wimp_SetCaretPosition",w%(2,0),8,,,-1,�($contad%)
D�   �chkbnds(satad%)
E   saturation%=�$satad%
E    �udpbar(-124,saturation%)
E  �
E$ �
E.
E8� w%(17,0)
EB Ȏ pb%!24 �
EL	 � 13
EV
  mine%=�
E`  speed%=�$speedad%
Ej  �speed
Et  ș "Wimp_CreateMenu",,-1
E~ �
E� 
E�!  ș "Wimp_ProcessKey",pb%!24
E��
E�
E�)� � mine% ș "Wimp_ProcessKey",pb%!24
E�
E��
E�
E�� �message
E�Ȏ pb%!16 �
E�� 0
E� �shutdown(0)
F� 1
F
 �datasave
F� 2
F �datasaveack
F(� 3
F2 �filecoming
F<� 8
FF pb%!12=pb%!8
FP! ș "Wimp_SendMessage",19,pb%
FZ quitting%=�
Fd quithand%=pb%!4
Fn �shutdown(-1)
Fx� 9
F� �modechanged
F� �updatesprite
F�
� &502
F� �sendhelp
F�� &400C0
F� �menuwarning
F�� &400C1
F� �modechanged
F��
F��
F�
F�� �filecoming
F�� pb%!20=-2 �
GG � pb%!40<>&FFD � 42,"FastGrab can only process files of type Data"
G lh%=�(�zt(pb%+44)+�13)
G# � lh%=0 � 214,"File not found"
G"{ � �getword(lh%)<>&6372654D �#lh%:� 42,"Fastgrab can only process video image files from the Hawk V9 and Hawk V9 Mk II"
G, Ȏ �getword(lh%) �
G6 � &74666F53
G@  in_file_bits%=12
GJ � &31666F53
GT  in_file_bits%=16
G^ 
Gh  �#lh%
Gr[  � 42,"FastGrab can only process video image files from the Hawk V9 and Hawk V9 Mk II"
G| �
G�' ș "Wimp_SendMessage",19,pb%,pb%!4
G�( ș "Wimp_SlotSize",originalslot%,-1
G� nextlocation%=�
G� spritesize%=0
G� inx%=�getword(lh%)
G� gpx%=inx%
G� iny%=�getword(lh%)
G� gpy%=iny%
G� Ȏ in_file_bits% �
G�	 � 12
G� rawsize%=inx%*iny%*3/2+20
G�' $grabwtitlead%=$(pb%+44)+" 12 bit"
G�	 � 16
H rawsize%=inx%*iny%*2+20
H' $grabwtitlead%=$(pb%+44)+" 16 bit"
H �
H& �updatetitle
H0 grab12%=�
H: grabex%=�
HD �grabmemory(20,0)
HN+ ș "OS_GBPB",3,lh%,rawarea%,rawsize%,0
HX
 �#lh%
Hb � scrappy% �
Hl  scrappy%=�
Hv  *Remove <Wimp$Scrap>
H� �
H�S �setupraw(rawsize%,rawarea%!8,rawarea%!12,rawarea%?17,rawarea%?18,rawarea%?19)
H�W done%=�ChangeFSI("ChangeFSI null null 15 1:1",-1,-1,grabarea%,0,0,ram%,0,rawarea%)
H�
 cfsid%=�
H� grabarea%=ram%
H�
 sprex%=�
H� saved8%=�
H� saved12%=�
H� �setupsprite
H� � � w%(5,2) �
H�  �cwin(5)
H�  !grabwb=w%(5,0)
H� �
I � � w%(6,2) �cwin(6)
I grabwb!4=grabarea%
I grabwb!8=grabarea%+16
I T ș "OS_SpriteOp",&228,grabarea%,grabarea%+16 � ,,,grabwx%,grabwy%,spmask%,spmd%
I*. ș "OS_ReadModeVariable",-1,4 � ,,xshift%
I4. ș "OS_ReadModeVariable",-1,5 � ,,yshift%
I> grabwx%=grabwx%<<xshift%
IH grabwy%=grabwy%<<yshift%
IR �adjustgrab
I\ �magstring(0,0)
If�
Ip�
Iz
I�� �datasave
I�#� pb%!20=-2 � pb%!24=iconbar% �
I� !pb%=60
I� pb%!12=pb%!8
I�
 pb%!16=2
I� pb%!36=-1
I� $(pb%+44)="<Wimp$Scrap>"
I�
 pb%?56=0
I�' ș "Wimp_SendMessage",17,pb%,pb%!4
I� scrappy%=�
I��
I��
I�
J
� �gocfsi
J
� fsi$
J� $modead%="" mode$="15"
J$mode$=$modead%
J.Ȏ �(mode$) �
J8� 2,4,5,10
JB mode$="15"
JL
JV? ș "OS_ReadModeVariable",�mode$,0 � ,,modeflags%;armflags%
J` � (armflags% � 1<<29) �
Jj  mode$="15 "
Jt �
J~#  � (modeflags% � 1) mode$="15"
J�4  ș "OS_ReadModeVariable",�mode$,3 � ,,ncolour%
J�/  � ncolour%<15 � outmode$="T" outmode$=" "
J� �
J��
J�$modead%=mode$
J�� �$x1ad%<1 $x1ad%="1"
J�� �$x2ad%<1 $x2ad%="1"
J�� �$y1ad%<1 $y1ad%="1"
J�� �$y2ad%<1 $y2ad%="1"
J�� �selected(5) �
J� scale$=" = "
J��
K7 scale$=" "+$x1ad%+":"+$x2ad%+" "+$y1ad%+":"+$y2ad%
K
�
Koption$=" "
K&� �selected(11) option$+="-range "
K(&� �selected(12) option$+="-equal "
K2'� �selected(14) option$+="-invert "
K<5� �selected(15) option$+="-sharpen"+$(sharpenad%)
KF&� �selected(23) option$+="-hflip "
KP&� �selected(24) option$+="-vflip "
KZ(� �selected(16) option$+="-noscale "
Kd)� �selected(26) option$+="-nodither "
Kn)� �selected(27) option$+="-brighten "
Kx1� �selected(28) option$+="-black"+$(blackad%)
K�!� $gammaad%="" $gammad%="2.2"
K�1� �selected(29) option$+="-gamma"+$(gammaad%)
K�?fsi$="ChangeFSI null Piccy1 "+mode$+outmode$+scale$+option$
K�'� �selected(13) ș "Wimp_SetMode",0
K�&ș "Wimp_SlotSize",precfsislot%,-1
K�<� board_is_16_bit% � in_file_bits%=16 � in_file_bits%=12
K�>done%=�ChangeFSI(fsi$,-1,-1,grabarea%,0,0,ram%,0,rawarea%)
K�cfsid%=�
K�grabarea%=ram%
K�C� done%=100 � 42,"Histogram equalization of image not possible"
K�sprex%=�
K�
saved8%=�
K�&$grabwtitlead%="<untitled> * CFSI"
L� �=oldmode% �
L�modechanged
L�updatetitle
L"�
L,ș "Wimp_SetMode",oldmode%
L6�
L@�setupsprite
LJgrabwb!4=grabarea%
LTgrabwb!8=grabarea%+16
L^Sș "OS_SpriteOp",&228,grabarea%,grabarea%+16 � ,,,grabwx%,grabwy%,spmask%,spmd%
Lh-ș "OS_ReadModeVariable",-1,4 � ,,xshift%
Lr-ș "OS_ReadModeVariable",-1,5 � ,,yshift%
L|grabwx%=grabwx%<<xshift%
L�grabwy%=grabwy%<<yshift%
L��adjustgrab
L��magstring(0,0)
L��
L�
L�� �setupsprite
L�� sx%,sy%,spmd%
L�Kș "OS_SpriteOp",&228,grabarea%,grabarea%+16 � ,,,sx%,sy%,spmask%,spmd%
L�$grabnamead%=oname$
L�$grabmodead%=�spmd%
L�Ȏ spmask% �
L�� 0:$grabmaskad%="No"
L�� 1:$grabmaskad%="Yes"
M�
M$grabwidtad%=�sx%
Msptr%=grabarea%+16
M&� sptr%!32=44 �
M0$grabpalad%="No"
M:�
MD$grabpalad%="Yes"
MN�
MX$grabbytead%=�(!sptr%)
Mb$grabheigad%=�sy%
Ml�
Mv-� �setupraw(size%,xsize%,ysize%,b%,c%,s%)
M�$rawbytesad%=�size%
M�$rawwidthad%=�xsize% :
M�$rawheightad%=�ysize%
M�$rawbrightad%=�b%
M�$rawcontad%=�c%
M�$rawsatad%=�s%
M��
M�
M�� �selected(icon%)
M�� w%(1,2) �
M�!mb%=w%(1,0)
M�mb%!4=icon%
M�ș "Wimp_GetIconState",,mb%
N� mb%!24 � 1<<21 � =1 � =0
N�
N+� !(w%(1,1)+108+(32*icon%)) � (1<<21) �
N =1
N*�
N4=0
N>�
NH�
NR
N\)� �iconset(window%,icon%,clear%,eor%)
Nf� w%(window%,2) �
Np!mb%=w%(window%,0)
Nzmb%!4=icon%
N�mb%!8=eor%
N�mb%!12=clear%
N�ș "Wimp_SetIconState",,mb%
N��
N�Qw%(window%,1)!(108+32*icon%)=(w%(window%,1)!(108+32*icon%) � � clear%) � eor%
N��
N��
N�
N�� �adjustlive
N�
�calclive
N�!mb%=w%(3,0)
N�!ș "Wimp_GetWindowState",,mb%
N�mb%!8=mb%!16-livey%
Omb%!12=mb%!4+livex%
O� mb%!4<0 mb%!4=0
O%� mb%!8>rightscr% mb%!8=rightscr%
O$ș "Wimp_OpenWindow",,mb%
O.� ltool$=">" �
O8!mb%=w%(4,0)
OBmb%!12=mb%!4-4
OL
mb%!4-=88
OVș "Wimp_OpenWindow",,mb%
O`�
Oj�
Ot
O~� �calclive
O�lpx%=512/(2^livesize%)
O�!!livepagestep=8*(2^livesize%)
O�"!livepixelstep=2^(livesize%+2)
O�lpy%=lpx%/2
O�livearea%!12=lpx%*lpy%+60
O� livearea%!16=livearea%!12-16
O�livearea%!32=(lpx%/4)-1
O�livearea%!36=lpy%-1
O�-ș "OS_ReadModeVariable",15,4 � ,,xshift%
O�-ș "OS_ReadModeVariable",15,5 � ,,yshift%
O�livex%=lpx%<<xshift%
O�livey%=lpy%<<yshift%
P!livewb=w%(3,0)
P
livewb!4=livearea%
Plivewb!8=livearea%+16
Plivewb!12=0
P(livewb!16=-livey%
P2!livexsize=livex%
P<!liveysize=-livey%
PF
!mb%=0
PPmb%!4=-livey%
PZmb%!8=livex%
Pdmb%!12=0
Pn#ș "Wimp_SetExtent",w%(3,0),mb%
Pxw%(3,1)!44=0
P�w%(3,1)!48=-livey%
P�w%(3,1)!52=livex%
P�w%(3,1)!56=0
P��
P�
P�� �adjustgrab
P�'� sheight%,swidth%,smode%,sch%,scw%
P�Nș "OS_SpriteOp",&228,grabarea%,grabarea%+16 � ,,,swidth%,sheight%,,smode%
P�1ș "OS_ReadModeVariable",smode%,4 � ,,xshift%
P�1ș "OS_ReadModeVariable",smode%,5 � ,,yshift%
P�3scw%=(swidth%<<xshift%)*�($mag1ad%)/�($mag2ad%)
P�4sch%=(sheight%<<yshift%)*�($mag1ad%)/�($mag2ad%)
P�scw%=(scw% � 4)*4
Qsch%=(sch% � 4)*4
Qgrabwb!12=0
Qgrabwb!16=-sch%
Q"� scw%<=108 � sch%<=108 �
Q, � w%(5,1)?39=&FF �
Q6  �dwin(5)
Q@  w%(5,1)?39=0
QJ  �cwin(5)
QT#  ș "Wimp_OpenWindow",,w%(5,1)
Q^ �
Qh.ș "Wimp_ForceRedraw",w%(5,0),0,-256,128,0
Qr�
Q| � w%(5,1)?39=0 �
Q�  �dwin(5)
Q�  w%(5,1)?39=&FF
Q�  �cwin(5)
Q�#  ș "Wimp_OpenWindow",,w%(5,1)
Q� �
Q��
Q�� w%(5,2) �
Q� !mb%=0
Q� mb%!4=-sch%
Q� mb%!8=scw%
Q�
 mb%!12=0
Q�$ ș "Wimp_SetExtent",w%(5,0),mb%
Q��
R w%(5,1)!44=!mb%
R w%(5,1)!48=mb%!4
R w%(5,1)!52=mb%!8
R& w%(5,1)!56=mb%!12
R0�
R:%ș "Wimp_GetWindowState",,w%(5,1)
RD0ș "Wimp_ForceRedraw",w%(5,0),0,-sch%,scw%,0
RNw%(5,1)!8=w%(5,1)!16-sch%
RXw%(5,1)!12=w%(5,1)!4+scw%
Rb!ș "Wimp_OpenWindow",,w%(5,1)
Rl� gtool$=">" �
Rv !mb%=w%(6,0)
R� mb%!4=w%(5,1)!4-88
R� mb%!8=w%(5,1)!8
R� mb%!12=w%(5,1)!4-4
R� mb%!16=w%(5,1)!16
R� mb%!28=w%(5,1)!28
R� ș "Wimp_OpenWindow",,mb%
R��
R�8�palette_for_sprite(grabarea%,grabarea%+16,grabpal%)
R��
R�
R�� �magstring(one%,two%)
R�Fș "Wimp_ReadPixTrans",&200,grabarea%,grabarea%+16,,,,magt%+16,mb%
R�*� one%<>0 $mag1ad%=�(�($mag1ad%)+one%)
S*� two%<>0 $mag2ad%=�(�($mag2ad%)+two%)
S"� �($mag1ad%)<1 $mag1ad%="1":�
S&� �($mag1ad%)>999 $mag1ad%="999":�
S "� �($mag2ad%)<1 $mag2ad%="1":�
S*&� �($mag2ad%)>999 $mag2ad%="999":�
S48� w%(9,2) ș "Wimp_ForceRedraw",w%(9,0),72,0,200,290
S>!magt%=magt%!16*�($mag1ad%)
SH magt%!4=magt%!20*�($mag1ad%)
SR magt%!8=magt%!24*�($mag2ad%)
S\!magt%!12=magt%!28*�($mag2ad%)
Sf�adjustgrab
Sp�
Sz� �grab
S��deletegrabbed
S�saved12%=�
S�
saved8%=�
S�'$grabwtitlead%="<untitled> * 8 bit"
S��updatetitle
S�gpx%=512/(2^grabsize%)
S�!pagestep=8*(2^grabsize%)
S�!pixelstep=2^(grabsize%+2)
S�gpy%=gpx%/2
S�spritesize%=gpx%*gpy%+56
S�8� board_is_16_bit% rawsize%=262164 � rawsize%=199628
S�nextlocation%=�
S�5ș "OS_ReadModeVariable",�($modeb%),4 � ,,xshift%
T5ș "OS_ReadModeVariable",�($modeb%),5 � ,,yshift%
Tgrabwx%=gpx%<<xshift%
Tgrabwy%=gpy%<<yshift%
T$� � w%(5,2) �
T.
 �cwin(5)
T8 !grabwb=w%(5,0)
TB�
TL� � w%(6,2) �cwin(6)
TV� mono$=">" �
T` �grabmemory(8,-1)
Tj grabwb!4=grabarea%
Tt grabwb!8=grabarea%+16
T~
 �readV98
T� grab12%=�
T� �iconset(6,0,1<<22,1<<22)
T� �iconset(6,3,1<<22,1<<22)
T��
T� � bit%=12 �
T�  �grabmemory(20,-1)
T�  �readV912
T�  �set_8bit
T�  !grabarea%=spritesize%
T�  grabarea%!4=1
T�  grabarea%!8=16
T�  grabarea%!12=spritesize%
U  grabwb!4=grabarea%
U
  grabwb!8=grabarea%+16
U  �readV98
U  grab12%=�
U(  �iconset(6,0,1<<22,0)
U2  �iconset(6,3,1<<22,0)
U<E  �setupraw(rawsize%,gpx%,gpy%,brightness%,contrast%,saturation%)
UF �
UP  �grabmemory(8,-1)
UZ  grabwb!4=grabarea%
Ud  grabwb!8=grabarea%+16
Un  �readV98
Ux  grab12%=�
U�  �iconset(6,0,1<<22,1<<22)
U�  �iconset(6,3,1<<22,1<<22)
U� �
U��
U�� �
U�*� � � � �:$modeb%="15":grabarea%!56=15
U�>ș "Wimp_ReadPixTrans",&200,grabwb!4,grabwb!8,,,,magt%,mb%
U�� �
U��iconset(4,1,1<<22,0)
U�$grabnamead%="grabbed"
U�$grabmodead%=$modeb%
U�$grabmaskad%="No"
U�$grabwidtad%=�gpx%
V7� mono$<>">" � $grabpalad%="No" � $grabpalad%="Yes"
V:ș "OS_SpriteOp",&218,grabarea%,grabarea%+16 � ,,sptr%
V$grabbytead%=�(!sptr%)
V"$grabheigad%=�gpy%
V,$grabwidtad%=�gpx%
V6grabwb!20=magt%
V@
grabex%=�
VJ
grabch%=�
VT
grabch%=�
V^�adjustgrab
Vh�magstring(0,0)
Vr�
V|
V�� �grabmemory(arg%,arg1%)
V�6ș "Wimp_SlotSize",-1,-1 � currentslot%,,freeslot%
V�L� freeslot%<=spritesize% � 42,"Cannot claim enough memory to grab image"
V�
Ȏ arg% �
V�� 8
V�3 ș "Wimp_SlotSize",currentslot%+spritesize%,-1
V� grabarea%=nextlocation%
V� nextlocation%+=spritesize%
V� !grabarea%=spritesize%
V� grabarea%!4=1
V� grabarea%!8=16
V� grabarea%!12=spritesize%
V� grabwb!4=grabarea%
W grabwb!8=grabarea%+16
W� 20
W= � freeslot%<=spritesize%+rawsize% � cache$=">" � arg1% �
W&4  ș "Wimp_SlotSize",currentslot%+spritesize%,-1
W0  precfsislot%=currentslot%
W:  grabarea%=nextlocation%
WD   nextlocation%+=spritesize%
WN  slave%=�
WX;  twelvehandle%=�("<FastGrab$Dir>.Resources.TwelveBit")
Wb'  �putword(twelvehandle%,&6372654D)
Wl'  �putword(twelvehandle%,&74666F53)
Wv!  �putword(twelvehandle%,512)
W�!  �putword(twelvehandle%,256)
W�  �#twelvehandle%,0
W�  rawarea%=0
W� �
W�  slave%=�
W�=  ș "Wimp_SlotSize",currentslot%+rawsize%+spritesize%,-1
W�(  precfsislot%=currentslot%+rawsize%
W�  rawarea%=nextlocation%
W�&  grabarea%=nextlocation%+rawsize%
W�)  nextlocation%+=rawsize%+spritesize%
W� �
W��
W��
X
X� �readV98
Xgrabarea%!16=spritesize%+44
X ,$(grabarea%+20)="grabbed"+�0+�0+�0+�0+�0
X*grabarea%!32=(gpx%/4)-1
X4grabarea%!36=gpy%-1
X>grabarea%!40=&00
XHgrabarea%!44=&1F
XRgrabarea%!48=&2C
X\grabarea%!52=&2C
Xfgrabarea%!56=�($modeb%)
Xp� mono$=">" �
Xz< �add_palette_to_sprite(grabarea%,grabarea%+16,grabpal%)
X� F%=grabarea%+60+2048
X� � VRAM_Grab
X��
X� F%=grabarea%+60
X� � set_8bit
X� � VRAM_Grab
X��
X��modechanged
X��
X�
X�� �readV912
X�
ș &406C0
X�
Y� board_is_16_bit% �
Y � Refresh_Frame
Y ș "WVCGrab_LCA",2
Y$ � Refresh_Frame
Y.�
Y8
YB� set_12bit
YL
YV� slave% �
Y` ș "WVCGrab_Refresh",1
Yj  �#twelvehandle%,brightness%
Yt �#twelvehandle%,contrast%
Y~  �#twelvehandle%,saturation%
Y� A%=mb%
Y� � B%=0 � 255
Y�  � board_is_16_bit% �
Y�   � read16bit
Y�,   ș "OS_GBPB",2,twelvehandle%,mb%,1024
Y�  �
Y�   � packline
Y�+   ș "OS_GBPB",2,twelvehandle%,mb%,768
Y�  �
Y�  ș &406C4,(B%/255)*100
Y� �
Y� �#twelvehandle%
Z ș "WVCGrab_Refresh",0
Z
�
Z � B%=0 � 255
Z  ș &406C4,(B%/255)*100
Z(  � board_is_16_bit% �
Z2   A%=rawarea%+20+(B%*1024)
Z<   � read16bit
ZF  �
ZP   A%=rawarea%+20+(B%*768)
ZZ   � packline
Zd  �
Zn �
Zx�
Z�
Z��change_LCA(dithered%)
Z�
Z�
ș &406C1
Z�� rawarea% �
Z�$ !rawarea%=&6372654D  : � "Merc"
Z� � board_is_16_bit% �
Z�%  rawarea%!4=&31666F53 : � "Sof1"
Z� �
Z�%  rawarea%!4=&74666F53 : � "Soft"
Z� �
Z� rawarea%!8=gpx%
Z� rawarea%!12=gpy%
[ rawarea%?16=0
[ rawarea%?17=brightness%
[ rawarea%?18=contrast%
[" rawarea%?19=saturation%
[,�
[6
[@� set_8bit
[J
[T�
[^
[h� �showgrab
[r(� � w%(5,2) �cwin(5):!grabwb=w%(5,0)
[|%� � w%(6,2) � gtool$=">" �cwin(6)
[�!mb%=w%(5,0)
[�� � grabch% �
[�" ș "Wimp_GetWindowState",,mb%
[� mb%!28=-1
[� ș "Wimp_OpenWindow",,mb%
[��
[�  mb%!4=rightscr%/2-grabwx%/2
[� mb%!8=topscr%/2-grabwy%/2
[�! mb%!12=rightscr%/2+grabwx%/2
[� mb%!16=topscr%/2+grabwy%/2
[� � mb%!8<0 mb%!8=84
[�
 mb%!20=0
[�
 mb%!24=0
\ mb%!28=-1
\ ș "Wimp_OpenWindow",,mb%
\7 ș "Wimp_ForceRedraw",w%(5,0),0,-grabwy%,grabwx%,0
\&�
\0� gtool$=">" �
\: !mb%=w%(6,0)
\D mb%!4-=88
\N mb%!12=mb%!4+84
\X ș "Wimp_OpenWindow",,mb%
\b�
\l�
\v
\�� �deletegrabbed
\�� � grabex% �
\�
saved8%=�
\�saved12%=�
\�cfsid%=�
\��dwin(5)
\�
!grabwb=0
\��dwin(6)
\�'ș "Wimp_SlotSize",originalslot%,-1
\�
grabex%=�
\��iconset(4,1,1<<22,1<<22)
\�� slave% �
\�. $mb%="<FastGrab$Dir>.Resources.TwelveBit"
]  ș "OS_FSControl",27,mb%,,0
]
 slave%=�
]�
] �
]*
]4:� �palette_for_sprite(sprite_area%,sprite_ad%,pal_ad%)
]>� paltemp%
]H� paltemp% 2048
]R
]\dș "OS_SpriteOp",&228,sprite_area%,sprite_ad% � ,,,sprite_x%,sprite_y%,sprite_mask%,sprite_mode%
]f
]pȎ sprite_ad%!32 �
]z� 44
]�. � Use default palette for the screen mode
]�> ș "ColourTrans_SelectTable",sprite_mode%,0,-1,-1,pal_ad%
]�
� 2048+44
]�! � Use 256 grey level palette
]� � grab%=0 � 2048-8 � 8
]�/  paltemp%!(grab%>>1)=sprite_ad%!(grab%+44)
]� �
]� � Q%=0 � 255
]�G  ș "ColourTrans_ReturnColourNumber",paltemp%!(Q%<<2) � pal_ad%?Q%
]� �
]�
]� � Use the sprite's palette
]� � grab%=0 � 164 � 8
^.  paltemp%!(grab%/2)=sprite_ad%!(grab%+44)
^ �
^E ș "ColourTrans_SelectTable",sprite_mode%,paltemp%,-1,-1,pal_ad%
^$�
^.�
^8
^B� �optimise_liveplot
^Lliveplot%=-1
^V� Q%=0 � 255
^`) � livepal%?Q%<>Q% liveplot%=livepal%
^j�
^tlivewb!24=liveplot%
^~!colmap=liveplot%
^��
^�
^�� �modechanged
^�/� xshift%,yshift%,sptr%,spmd%,grab%,palptr%
^�oldmode%=�
^�-ș "OS_ReadModeVariable",-1,4 � ,,xshift%
^�-ș "OS_ReadModeVariable",-1,5 � ,,yshift%
^�0ș "OS_ReadModeVariable",-1,11 � ,,rightscr%
^�.ș "OS_ReadModeVariable",-1,12 � ,,topscr%
^� rightscr%=rightscr%<<xshift%
^�topscr%=topscr%<<yshift%
^�Eș "Wimp_ReadPixTrans",&200,livearea%,livearea%+16,,,,livemag,mb%
_� w%(5,2) �
_
:  �palette_for_sprite(grabarea%,grabarea%+16,grabpal%)
_ !mb%=w%(5,0)
_" ș "Wimp_GetWindowState",,mb%
_( � mb%!32 � 1<<16 �
_2  grabwx%=gpx%<<xshift%
_<  grabwy%=gpy%<<yshift%
_F  �magstring(0,0)
_P �
_Z�
_d8�palette_for_sprite(livearea%,livearea%+16,livepal%)
_n�optimise_liveplot
_x�
_�
_�� �updatesprite
_�� w%(3,2) �
_� !mb%=w%(3,0)
_�( ș "Wimp_UpdateWindow",,mb% � more%
_� x0%=mb%!4-mb%!20
_� y0%=mb%!16-mb%!24
_�
 ȕ more%
_�K  ș "OS_SpriteOp",&134,livearea%,livename$,x0%,y0%-livey%,8,0,livepal%
_�)  ș "Wimp_GetRectangle",,mb% � more%
_� �
_��
_��
`
`� �sendhelp
`,h$="This window belongs to FastGrab."+�0
`"Ȏ pb%!32 �
`,� -2
`6�h$="This is the FastGrab icon.|MClick SELECT to see the live output from the Hawk V9 Colour digitiser.|MDrag a twelve bit image file onto it to process the image and display it.|M"
`@� w%(3,2) �
`Jd� !signalpresent h$+="The live display is working." � h$+="There is no video signal at present."
`T�
`^*h$+="The live display is now dormant."
`h�
`r
� w%(2,0)
`|Ȏ pb%!36 �
`�U� 4:h$="This slider bar controls the brightness of the picture from the Hawk V9."
`�S� 9:h$="This slider bar controls the contrast of the picture from the Hawk V9."
`�V� 14:h$="This slider bar controls the saturation of the picture from the Hawk V9."
`�� 1,2,6,7,11,12
`�Ȏ pb%!36 �
`�)� 1:bar$="brightness":act$="increase"
`�)� 2:bar$="brightness":act$="decrease"
`�'� 6:bar$="contrast":act$="increase"
`�'� 7:bar$="contrast":act$="decrease"
`�*� 11:bar$="saturation":act$="increase"
`�*� 12:bar$="saturation":act$="decrease"
`��
`��h$="Click on this icon to "+act$+" the "+bar$+" of the picture from the Hawk V9.|MClicking on it with adjust will have the opposite effect."
aQ� 0:h$="Click on this icon to reset the PAL decoder to its default settings."
aX� 16:h$="Click on this icon to reset the PAL decoder to the settings saved on disc."
ao h$="This window controls the PAL decoder, which adjusts the video image received from the Hawk V9 board."
a&�
a0
� w%(3,0)
a:Nh$="This window shows the live display from the Hawk V9 Colour Digitiser."
aD^� !signalpresent=0 h$+="|MAt the moment there is no video signal, so the image is static."
aN
� w%(4,0)
aXȎ pb%!36 �
abX� 0:h$="Click on the camera icon to grab a frame from the Hawk V9 Colour Digitiser."
al;� 1:h$="Click on the eye-con to view the stored frame."
av:� 2:h$="Click on this icon to adjust the PAL decoder."
a�� 3
a� � board_is_16_bit% �
a�o  h$="Click on this icon to toggle between storing both 16 bit data and 8 bit data or just eight bit data."
a� �
a�o  h$="Click on this icon to toggle between storing both 12 bit data and 8 bit data or just eight bit data."
a� �
a�S� 4:h$="Click on this icon to toggle between dithered and non-dithered images."
a��
a�
� w%(5,0)
a�[h$="This window shows a frame which has been captured by the Hawk V9 Colour Digitiser."
a�
� w%(6,0)
a�Ȏ pb%!36 �
a��� 0:h$="Click on this icon to process the image using the ChangeFSI routine.|MChangeFSI is included by courtesy of its author, Roger Wilson of Acorn Computers Limited."
b�� 1:h$="Click on this icon to adjust the scale factors for the image.|MThis shows what will happen if SpriteExtend is used for scaling.|MThe ChangeFSI routine produces much better scaling, but it is a little slower."
bC� 2:h$="Click on this icon to save the image as a Sprite file."
b� 3
b  � board_is_16_bit% �
b*W  h$="Click on this icon to save the image as a Data file, in 16-bit video format."
b4 �
b>W  h$="Click on this icon to save the image as a Data file, in 12-bit video format."
bH �
bR�
b\
� w%(9,0)
bfȎ pb%!36 �
bp�� -1:h$="This is the Zoom window.|MIt allows you to adjust the size of the display using the SpriteExtend scaling routines.|MUsing ChangeFSI gives better results but it is a little slower."
bz|� 0:h$="This number is the scaling multiplier.|MYou can either type a number in, or use the arrow icons to adjust it.|M"
b�w� 1:h$="This number is the scaling divisor.|MYou can either type a number in, or use the arrow icons to adjust it."
b�o� 2:h$="Click on this icon to increase the scaling multiplier.|MAdjust-click on it the decrease the value."
b�n� 3:h$="Click on this icon to decrease the scaling multiplier.|MAdjust-click on it to increase the value."
b�k� 4:h$="Click on this icon to increase the scaling divisor.|MAdjust-click on it to decrease the value."
b�k� 5:h$="Click on this icon to decrease the scaling divisor.|MAdjust-click on it to increase the value."
b��
b�� w%(10,0)
bʟh$="This window displays information about the current sprite image.|MIt may have less than eight bits per pixel if it has been processed using ChangeFSI."
b�Ȏ pb%!36 �
b�,� 0:h$="This is the name of the sprite."
b�F� 1:h$="This is the screen mode in which the sprite was produced."
b�N� 2:h$="This tells you whether or not the sprite has a transparency mask."
b�8� 3:h$="This is the width of the sprite, in pixels."
c6� 4:h$="This is the size of the sprite, in bytes."
cJ� 5:h$="This tells you whether or not the sprite has its own palette."
c9� 6:h$="This is the height of the sprite, in pixels."
c$�
c.� w%(11,0)
c8Jh$="This window displays information about the twelve bit 'raw' data."
cBȎ pb%!36 �
cL4� 1:h$="This is the size of the data, in bytes."
cV7� 3:h$="This is the width of the image, in pixels."
c`8� 5:h$="This is the height of the image, in pixels."
cjC� 9:h$="The image was grabbed at the brightness setting shown."
ctD� 10:h$="The image was grabbed at the saturation setting shown."
c~B� 11:h$="The image was grabbed at the contrast setting shown."
c��
c�� w%(13,0)
c�Dh$="This window contains information on FastGrab's development."
c�Ȏ pb%!36 �
c��� 1,2:h$="FastGrab is a real time video grabbing system for use with RISC OS computers. It is designed to work with the Wild Vision Hawk V9 Real Time Colour Digitiser."
c�W� 3,4:h$="All original FastGrab code is by Robert W Hamilton @ Mercenary Software."
c�*� 5:h$="This is the Wild Vision logo."
c�2� 6:h$="FastGrab was written for Wild Vision."
c�� 7
c�ds%=�version$,"(")
c�de%=�version$,")")
c�lh$="This is "+�version$,ds%-2)+" of FastGrab and it was last updated on "+�version$,ds%+1,de%-ds%-1)+"."
d�
d
� w%(14,0)
dQh$="This window gives some development information on the ChangeFSI program."
dȎ pb%!36 �
d(�� 1:h$="ChangeFSI takes its name from R W Floyd and L Steinberg, whose 'error diffusion' technique is used to improve output.|MThe 'I' is for integer, as the program uses this form of arithmetic."
d2�� 2:h$="Mercenary Software and Wild Vision would like to thank Roger Wilson, of Acorn Computers Limited, for his permission to use ChangeFSI in FastGrab."
d<�
dF
� w%(1,0)
dPȎ pb%!36 �
dZf� -1:h$="This parameters in this window are those used by the ChangeFSI image processing routine."
dd�� 0:h$="Enter the output mode to be used here. It should be a graphics mode - note that modes 2,4,5 and 10 are not supported. If you attempt to use an invalid mode, mode 15 will be used instead."
dn
� 1,2,3,4
dxȎ pb%!36 �
d�(� 1:h$="This is the x output ratio."
d�'� 2:h$="This is the x input ratio."
d�(� 3:h$="This is the y output ratio."
d�'� 4:h$="This is the y input ratio."
d��
d�?h$+="|MSet the scaling ratios as you do in Paint and Draw."
d�I� 5:h$="Select this icon to scale the output to fit the output mode."
d�C� 6:h$="Select this icon to use the scale ratios in the boxes."
d�2� 7:h$="Select this icon for standard output."
d�k� 8:h$="Select this icon for 2 or 4 bit colour, or for clustered dithering in one bit per pixel modes."
d�5� 9:h$="Select this icon for digital RGB output."
d�m� 10:h$="Select this icon for no tinting in 256 colour modes, or sixteen grey levels in 16 colour modes."
d��� 11:h$="Select this icon to expand the dynamic range of the source.|MAdjust-clicking on this icon when it is selected will unselect it."
e�� 12:h$="Select this icon to apply histogram equalisation to the source.|MAdjust-clicking on this icon when it is selected will unselect it."
e�� 13:h$="Select this icon to process in Mode 0.|MThis will speed things up, especially if you are in a high-resolution mode for viewing the output."
eF� 14:h$="Select this icon to invert the source before processing."
e"9� 15:h$="Select this icon to pre-sharpen the source."
e,�� 16:h$="Select this icon to omit ChangeFSI's pixel correction routines. This means that the size of the pixels is ignored when translating images."
e6X� 22:h$="Enter the value for sharpening here, in the range 8-31 (31=soft, 8=harsh)."
e@>� 23:h$="Select this icon to flip the image horizontally."
eJ<� 24:h$="Select this icon to flip the image vertically."
eTR� 25:h$="Click on this icon to process the image with the current parameters."
e^H� 26:h$="Select this icon to disable dithering of the output image."
ehI� 27:h$="Select this icon to artificially brighten the output image."
er�� 28:h$="Select this icon to apply black correction to the image before processing. This corrects for the size of black ink spots (eg on printers)."
e|Y� 29:h$="Select this icon to apply gamma correction to the image before processing. "
e�f� 30:h$="Enter the value for black correction here, in the range 0-128 (0=not at all, 128=harsh)."
e�R� 31:h$="Enter the value for gamma correction here. The default value is 2.2."
e��
e�� w%(17,0)
e�Ȏ pb%!36 �
e�T� -1:h$="This window allows you to adjust the speed of FastGrab's live display."
e�w� 0:h$="This slider bar controls the speed of FastGrab's live display. 0 is the slowest speed, and 99 the fastest."
e�� 1:h$="Click on this icon to increase the speed of FastGrab's live display.|MAdjust click on it to slow the display down."
e�� 2:h$="Click on this icon to slow down FastGrab's live display.|MAdjust click on it to increase the speed of the display."
e�B� 3:h$="This field sets the speed of FastGrab's live display."
e��
e��
e�
h$+=�0
ffnamelen%=�(h$)
f�round(fnamelen%,4)
f!mb%=20+fnamelen%
f&mb%!8=-1
f0mb%!12=pb%!8
f:mb%!16=&503
fD$(mb%+20)=h$
fN"ș "Wimp_SendMessage",17,mb%,0
fX�
fb� �savesprite
flM� �$outsprad%,".")=0 � 42,"To save, drag the icon to a directory viewer."
fv.ș "OS_SpriteOp",&10C,grabarea%,$outsprad%
f�
saved8%=�
f�T� cfsid% � $grabwtitlead%=$outsprad%+" CFSI" � $grabwtitlead%=$outsprad%+"8 bit"
f��updatetitle
f��
f�� �saveraw
f�M� �$outrawad%,".")=0 � 42,"To save, drag the icon to a directory viewer."
f�rawout%=�($outrawad%)
f�� slave% �
f�2rawin%=�("<FastGrab$Dir>.Resources.TwelveBit")
f�5� rawin%=0 �#rawout%:� 214,"Cache file not found"
f�.ș "OS_GBPB",4,rawin%,livearea%+100,100000
f�/ș "OS_GBPB",2,rawout%,livearea%+100,100000
f�-ș "OS_GBPB",4,rawin%,livearea%+100,96628
g.ș "OS_GBPB",2,rawout%,livearea%+100,96628
g�
g,ș "OS_GBPB",2,rawout%,rawarea%,rawsize%
g �
g*
�#rawout%
g4saved12%=�
g>`� board_is_16_bit% $grabwtitlead%=$outrawad%+" 16 bit" � $grabwtitlead%=$outrawad%+" 12 bit"
gH�updatetitle
gR�
g\� �updatetitle
gf� w%(5,2) �
gp!mb%=w%(5,0)
gz#ș "Wimp_GetWindowOutline",,mb%
g�:ș "Wimp_ForceRedraw",-1,mb%!4,mb%!16-48,mb%!12,mb%!16
g��
g��
g�� �installonbar
g�!pb%=-1
g�pb%!4=0
g�pb%!8=0
g�
pb%!12=68
g�
pb%!16=68
g�pb%!20=%100000010 � %10<<12
g�pb%!24=barspace
g�pb%!28=sprites%
g�
pb%!32=11
h(ș "Wimp_CreateIcon",,pb% � iconbar%
h
!iconb=-1
hiconb!4=iconbar%
h$�
h.� �gst(block%,handle%)
h8!block%=handle%
hB$ș "Wimp_GetWindowState",,block%
hL�
hV� �open(block%,handle%)
h`�gst(block%,handle%)
hj=block%!32 � 1<<16
ht
h~!� �cmenu(level%,text$,width%)
h�S� newtext$,title$,ptr%,shade%,tick%,dotted%,submenu%,writable%,rjust%,warnmenu%
h�� level%=0 �
h�longpointer%=longitems%
h�mnb%=menub%
h��
h�mnb%+=maxmenusize%
h��
h� title$=�text$,�text$,"|")-1)
h�text$=�text$,�text$,"|")+1)
h�$mnb%=�title$,11)
h�
mnb%?12=7
h�
mnb%?13=2
i
mnb%?14=7
i

mnb%?15=0
imnb%!16=width%
imnb%!20=44
i(
mnb%!24=0
i2� �text$,1)<>"|" text$+="|"
i<ptr%=mnb%+28
iF�
iPshade%=0:tick%=0
iZdotted%=0:writable%=0
idrjust%=0:submenu%=-1
inwarnmenu%=0
ixȕ �"<>:*'�#@",�text$,1))
i�Ȏ �text$,1) �
i�	� "<"
i�shade%=&400000
i�text$=�text$,2)
i�	� ">"
i�tick%=1
i�text$=�text$,2)
i�	� ":"
i�
dotted%=2
i�text$=�text$,2)
i�	� "*"
i�writable%=4
i�text$=�text$,2)
j	� "'"
jtext$=�text$,2)
j)newtext$=�(��text$,5),�text$,"'")-1))
j"width%=�(�text$,4))
j,text$=�text$,�text$,"'")+1)
j6-submenu%=�cmenu(level%+1,newtext$,width%)
j@	� "�"
jJsubmenu%=�(�text$,2,4))
jTtext$=�text$,�(text$)-5)
j^	� "#"
jhrjust%=1
jrtext$=�text$,2)
j|	� "@"
j�text$=�text$,2)
j�warnmenu%=8
j�#submenu%=�(�text$,�text$,"'")))
j�� submenu%=0 submenu%=-1
j�text$=�text$,�text$,"'")+1)
j��
j��
j�� writable% �
j�i%=�text$,",")
j�ptr%!12=�(�text$,i%-1))
j�text$=�text$,i%+1)
j�i%=�text$,",")
j�ptr%!16=�(�text$,i%-1))
ktext$=�text$,i%+1)
k"ptr%!20=�(�text$,�text$,"|")))
k�
k&#� �(�text$,�text$,"|")-1))>11 �
k0long%=1
k:+$longpointer%=�text$,�text$,"|")-1)+�13
kDptr%!12=longpointer%
kNptr%!16=&FFFFFFFF
kX(ptr%!20=�(�text$,�text$,"|")-1)+�13)
kb.longpointer%+=�(�text$,�text$,"|")-1)+�13)
klC� longpointer%>longitems%+longsp% � 0,"Menu workspace exceeded"
kv�
k�long%=0
k�)$(ptr%+12)=��text$,�text$,"|")-1),11)
k��
k��
k�text$=�text$,�text$,"|")+1)
k�F!ptr%=tick% � dotted% � writable% � (&80 � (text$="")) � warnmenu%
k�ptr%!4=submenu%
k�Iptr%!8=shade% � writable%<<6 � long%<<8 � &010021 � rjust%<<9 � 7<<24
k�ptr%+=24
k�� text$=""
k�?� level%=0 ș "Wimp_CreateMenu",0,menub%,mousex%-64,mousey%
k�	=mnb%
k�
l� �menu(window%,x%,y%,sub%)
l6� oldmenu%<>-1 � oldmenu%<>window% �dwin(oldmenu%)
l�cwin(window%)
l � sub% �
l*0ș "Wimp_CreateSubMenu",,w%(window%,0),x%,y%
l4�
l>-ș "Wimp_CreateMenu",,w%(window%,0),x%,y%
lH�
lRoldmenu%=window%
l\�
lf
lp� �menuselect
lz
� adjust%
l�%ș "Wimp_GetPointerInfo",,mouseb%
l�adjust%=mouseb%!8 � 1
l�Ȏ mentype% �
l�� 0
l� Ȏ !pb% �
l� � 0
l�  adjust%=�
l�  ș "Wimp_CreateMenu",,-1
l�'  �menu(13,!mouseb%-64,mouseb%!4,0)
l� � 1
l�  �shutdown(-1)
l� �
l�� 1
m Ȏ !pb% �
m � 0
m  �grab
m$ � 1
m.  � pb%!4>=0 �
m8   grabsize%=pb%!4
mB(   grabsize$=�setsizemenu(grabsize%)
mL  �
mV � 2
m`  � pb%!4>=0 �
mj   � livesize%>pb%!4 �
mt     A%=livearea%+60
m~     B%=&20100
m�     �blank
m�   �
m�   livesize%=pb%!4
m�   �adjustlive
m�(   livesize$=�setsizemenu(livesize%)
m�  �
m� � 3
m�  � bit%=12 �
m�
   bit%=8
m�    �iconset(4,3,1<<21,1<<21)
m�  �
m�   bit%=12
n   �iconset(4,3,1<<21,0)
n
  �
n � 4
n  dithered%=dithered% � 1
n(  �toggle(dither$)
n2  �change_LCA(dithered%)
n< � 5
nF  �toggle(mono$)
nP  � mono$=">" �
nZ   �live_grey
nd    �iconset(4,3,1<<22,1<<22)
nn    �iconset(4,4,1<<22,1<<22)
nx  �
n�   �live_colour
n�   �iconset(4,3,1<<22,0)
n�   �iconset(4,4,1<<22,0)
n�  �
n�  �change_LCA(dithered%)
n� � 6
n�  Ȏ pb%!4 �
n�
  � -1
n�   � field$="" �
n�    field$=">"
n�    !fielding=1
n�   �
n�    field$=""
o    !fielding=0
o   �
o	  � 0
o"   � field$="" � field$=">"
o,    !fielding=1
o6    !evenfield=0
o@   �
oJ    !fielding=0
oT   �
o^	  � 1
oh   � field$="" � field$=">"
or    !fielding=1
o|    !evenfield=1
o�   �
o�    !fielding=0
o�   �
o�  �
o�  �fieldmenu
o� � 7
o�  �toggle(cache$)
o� � 8
o�  �showgrab
o�	 � 10
o�  � pb%!4<>-1 �
o�6   ș "OS_ReadModeVariable",�($modeb%),3 � ,,ncol%
o�   � ncol%<>63 �
p    $(modeb%)="15"
p$    � 42,"Not a 256 colour mode"
p   �
p&  �
p0	 � 12
p:  �savechoices
pD	 � 13
pN  � ltool$="" �
pX   ltool$=">"
pb   !mb%=w%(3,0)
pl$   ș "Wimp_GetWindowState",,mb%
pv   �cwin(4)
p�   !mb%=w%(4,0)
p�   mb%!4-=88
p�   mb%!12=mb%!4+84
p�   mb%!20=0
p�   mb%!24=0
p�    ș "Wimp_OpenWindow",,mb%
p�  �
p�   ltool$=""
p�   �dwin(4)
p�  �
p� �
p�� 2
p� Ȏ !pb% �
q � 7
q  adjust%=�
q  � grab12% �
q    � � saved12% �
q*5    �query(1,"Do you want to save the raw data?")
q4   �
q>    �deletegrabbed
qH   �
qR  �
q\   � � saved8% �
qf3    �query(3,"Do you want to save the sprite?")
qp   �
qz    �deletegrabbed
q�   �
q�  �
q� � 8
q�  � gtool$="" �
q�   gtool$=">"
q�   !mb%=w%(5,0)
q�$   ș "Wimp_GetWindowState",,mb%
q�   �cwin(6)
q�   !mb%=w%(6,0)
q�   mb%!4-=88
q�   mb%!12=mb%!4+84
q�   mb%!20=0
q�   mb%!24=0
r    ș "Wimp_OpenWindow",,mb%
r  �
r   gtool$=""
r$   �dwin(6)
r.  �
r8 �
rB�
rL� adjust% � (� close%) �
rV Ȏ mentype% �
r` � 0
rj2  menu%=�cmenu(0,"FastGrab|@13'Info|Quit|",96)
rt � 1
r~  � bit%=12 �
r�  tick12$=">"
r�  cachem$=cache$
r�  �
r�   tick12$=""
r�   cachem$="<"
r�  �
r�&  � grabex% shade$="" � shade$="<"
r�V  temp0$="FastGrab|Grab frame|'0156grabsize$'Frame size|'0156livesize$'Live size|"
r�$  � mono$=">" � ms$="<" � ms$=""
r�  � board_is_16_bit% �
r�   temp1$=ms$+tick12$+"16 bit data|"+ms$+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
r�  �
s�   temp1$=tick12$+"12 bit data|"+dither$+"Dithering|"+mono$+"Monochrome|"+field$+"'0076subfield$'Single field|"+cachem$+"Force cacheing|"+shade$+"Show frame|@2'PAL decoder|'0060submode$'Grab mode|@17'V9 speed|Save choices|"+ltool$+"Toolbox|"
s
  �
s'  menu%=�cmenu(0,temp0$+temp1$,236)
s � 2
s("  � grab12% raw$="" � raw$="<"
s2`  temp0$="FastGrab|@10'Sprite info|@9'Zoom|@6'Save sprite|@1'"+raw$+"ChangeFSI|@14'Credits|"
s<  � board_is_16_bit% �
sF`   temp1$="@11'"+raw$+"16 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
sP  �
sZ`   temp1$="@11'"+raw$+"12 bit info|@8'"+raw$+"Save raw data|Delete image|"+gtool$+"Toolbox|"
sd  �
sn'  menu%=�cmenu(0,temp0$+temp1$,220)
sx �
s��
s��
s�
s�� �toggle(� swap$)
s�&� swap$=">" � swap$="" � swap$=">"
s��
s�
s�� �cwin(number%)
s�� � w%(number%,2) �
s�< ș "Wimp_CreateWindow",,w%(number%,1)+4 � w%(number%,0)
s�! !w%(number%,1)=w%(number%,0)
s� w%(number%,2)=�
s��
t�
t
t� �dwin(number%)
t"� w%(number%,2) �
t,+ ș "Wimp_GetWindowInfo",,w%(number%,1)
t6* ș "Wimp_DeleteWindow",,w%(number%,1)
t@ w%(number%,2)=�
tJ w%(number%,0)=-1
tT�
t^�
th
tr� �clwin(number%)
t|� w%(number%,2) �
t�+ ș "Wimp_GetWindowInfo",,w%(number%,1)
t�) ș "Wimp_CloseWindow",,w%(number%,1)
t��
t��
t�
t�� �fieldmenu
t�subfield$="Field|"
t�� !fielding=0 �
t� subfield$+="Even|Odd|"
t��
t� � !evenfield �
t�  subfield$+="Even|>Odd|"
t� �
u  subfield$+=">Even|Odd|"
u �
u�
u&�
u0
u:� �setsizemenu(value%)
uD� size$
uNȎ value% �
uX� 0
ub, size$=">512 � 256|256 � 128|128 �  64|"
ul� 1
uv, size$="512 � 256|>256 � 128|128 �  64|"
u�� 2
u�, size$="512 � 256|256 � 128|>128 �  64|"
u�� 3
u�, size$="512 � 256|256 � 128|128 �  64|>"
u�
u� � 0,"Invalid frame size"
u��
u�="Size|"+size$+" 64 �  32"
u�
u�� �menuwarning
u�"�menu(pb%!20,pb%!24,pb%!28,-1)
u��
u�
v� �savechoices
v/outc%=�("<FastGrab$Dir>.Resources.Choices")
v�#outc%,�$modead%
v �#outc%,$x1ad%
v*�#outc%,$y1ad%
v4�#outc%,$x2ad%
v>�#outc%,$y2ad%
vHȎ outmode$ �
vR	� " "
v\ outset%=0
vf	� "C"
vp outset%=1
vz	� "D"
v� outset%=2
v�	� "T"
v� outset%=3
v�	� "P"
v�% outset%=0:� Cannot be used here!
v��
v���#outc%,outset% � �selected(11)<<2 � �selected(12)<<3 � �selected(13)<<4 � �selected(14)<<5 � �selected(15)<<6 � �selected(16)<<7
v�d�#outc%,�selected(5) � �selected(23)<<1 � �selected(24)<<2 � �selected(25)<<3 � �selected(27)<<4
v��#outc%,�($sharpenad%)
v��#outc%,brightness%
v�savedbright%=brightness%
v��#outc%,contrast%
v�savedcont%=contrast%
w� mono$=">" �
w �#outc%,old_sat%
w�
w$ �#outc%,saturation%
w.�
w8savedsat%=saturation%
wB��#outc%,�(bit%=12) � �(ltool$=">")<<1 � �(gtool$=">")<<2 � �(cache$=">")<<3 � �(field$=">")<<4 � !evenfield<<5 � dithered%<<6 � �(mono$=">")<<7
wL�#outc%,speed%
wV�#outc%,�($modeb%)
w`�#outc%,grabsize%
wj�#outc%,livesize%
wt�#outc%,�selected(26)
w~�#outc%,�selected(27)
w��#outc%,�selected(28)
w��#outc%,�$blackad%
w��#outc%,�selected(29)
w��#outc%,$gammaad%
w��#outc%,�selected(32)
w��#outc%
w��
w�
w�� �error(arg%)
w�� arg% �
w� �closeopen(c%)
w�- � �<>oldmode% ș "Wimp_SetMode",oldmode%
x !mb%=0
x
�
x
Ȏ � �
x
� &1E6
x(
 flags%=1
x2W $(mb%+4)="FastGrab requires the Wild Vision Hawk V9 and its module to be present."
x<� 11
xF � debug% �
xP
 flags%=2
xZ5 $(mb%+4)="It's fallen over at line "+�(�)+" "+�$
xd�
xn
 flags%=1
xx; $(mb%+4)="Cannot claim enough memory to process image"
x��
x�� 42
x�
 flags%=1
x� $(mb%+4)=�$
x�	� 214
x�
 flags%=1
x� $(mb%+4)=�$
x�
� 223,183
x�
 flags%=1
x�& $(mb%+4)="Unexpected end of file"
x�	� 643
x�
 flags%=1
x�2 $(mb%+4)="Too many windows have been created"
y
� 1800
y
 flags%=1
y@ $(mb%+4)="Cannot grab in this mode - using mode 15 instead"
y" grabarea%!56=15
y,� &108C2
y6/ $(mb%+4)="File open - could not save file"
y@
 flags%=1
yJ� &10C85
yT! $(mb%+4)="Types don't match"
y^
 flags%=1
yh� &108C6
yr/ $(mb%+4)="Disc full - could not save file"
y|
 flags%=1
y�� &108CC
y�. $(mb%+4)="Bad name - could not save file"
y�
 flags%=1
y�� &108D6
y�9 $(mb%+4)="Directory not found - could not save file"
y�
 flags%=1
y�
y�5 $(mb%+4)=�$+" (Internal error :MSE#5"+Þ+") "+ß
y�
 flags%=2
y� arg%=0
y��
y�� flags% �
y�= ș "Wimp_ReportError",mb%,flags%,"FastGrab" � ,response%
z � arg%=0 �shutdown(0)
z  � response%=2 �shutdown(-1)
z�
z&�
z0
z:� �closeopen(� handle%)
zD� handle% �#handle%
zN
handle%=0
zX�
zb
zl� �assemble
zv� code% 4096,L% 0
z�� opt%=8 � 10 � 2
z�P%=code%
z�[
z�OPT opt%
z�
.pollcode
z�MOV R12,R14
z�
.fastloop
z�SWI "OS_ReadMonotonicTime"
z�LDR R1,speedval
z�ADD R2,R0,R1
z�MOV R11,#1
z�LDR R3,dragging%
z�
CMP R3,#0
{LDREQ R1,speedval
{ADDEQ R2,R0,R1
{LDR R0,maskad
{ LDR R1,pollad
{*SWIEQ "Wimp_PollIdle"
{4SWINE "Wimp_Poll"
{>
CMP R0,#0
{H
�Q R11,#0
{RBLEQ updatecode
{\
CMP R0,#1
{f
�Q R11,#0
{pBLEQ redrawhandler
{zCMP R11,#1
{�BNE fastloop
{�MOVS PC,R12
{�.pollad
{�
EQUD 0
{�
.speedval
{�
EQUD 0
{�.redrawhandler
{�LDR R3,[R1]
{�STR R3,rdb
{�ADR R10,windowlist
{�.lookup
{�LDR R4,[R10]
{�
CMP R3,R4
|BEQ skip
|CMP R4,#&20
|�QS PC,R12
|$ADD R10,R10,#28
|.B lookup
|8	.skip
|BADR R1,rdb
|LSWI "Wimp_RedrawWindow"
|VLDMIA R1,{R2-R8}
|`SUB R9,R6,R8
|jSUB R8,R3,R7
|t.redrawloop
|~
CMP R0,#0
|��QS PC,R14
|�MOV R0,#&234
|�LDMIB R10,{R1-R4,R6,R7}
|�ADD R3,R3,R8
|�ADD R4,R4,R9
|�
MOV R5,#0
|�SWI "OS_SpriteOp"
|�ADR R1,rdb
|�SWI "Wimp_GetRectangle"
|�B redrawloop
|�MOVS PC,R14
|�.updatecode
}ADR R0,stack
}
;STMIA R0,{R2-R14}
}STMIA R0,{R12,R14}
}BL live_grab
}(ADR R0,stack
}2LDMIA R0,{R12,R14}
}<;LDMIA R0,{R2-R14}
}F
MOV R0,#0
}PSTR R0,udb+4
}ZSTR R0,udb+16
}dLDR R0,livexsize
}nSTR R0,udb+12
}xLDR R0,liveysize
}�STR R0,udb+8
}�ADR R1,udb
}�SWI "Wimp_UpdateWindow"
}�LDMIA R1,{R2-R8}
}�SUB R9,R6,R8
}�SUB R8,R3,R7
}�.updateloop
}�
CMP R0,#0
}�BEQ skipupdate
}�MOV R0,#&234
}�LDR R1,spritearea
}�LDR R2,spritead
}�
MOV R3,#0
~LDR R4,livewb+16
~ADD R3,R3,R8
~ADD R4,R4,R9
~"
MOV R5,#0
~,ADR R6,livemag
~6LDR R7,colmap
~@SWI "OS_SpriteOp"
~JADR R1,udb
~TSWI "Wimp_GetRectangle"
~^B updateloop
~h.skipupdate
~rLDR R1,dragging%
~|
CMP R1,#0
~�MOVNE PC,R12
~�MOV PC,R14
~�.livemag
~�
EQUD 1
~�
EQUD 1
~�
EQUD 1
~�
EQUD 1
~�.rdb
~�;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
~�4EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
~�
.stack
~�BEQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
~�BEQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
BEQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
.maskad

EQUD 0
&.windowlist
0.livewb
:EQUD w%(3,0)
DEQUD livearea%
NEQUD livearea%+16
X
EQUD 0
b
EQUD -512
l
EQUD 0
v
EQUD 0
�.grabwb
�EQUD w%(5,0)
�
EQUD 0
�
EQUD 0
�
EQUD 0
�EQUD -1024
�
EQUD 0
�
EQUD 0
�EQUD &20
�.livexsize
�
EQUD 0
�.liveysize
�
EQUD 0
�.udb
�BEQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
�-EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0
� .spritearea
�*
EQUD 0
�4
.spritead
�>
EQUD 0
�H.colmap
�R
EQUD 0
�\.dragging%
�f
EQUD 0
�p.unpack
�zADD R2,R0,#768
��MOV R4,#&F
��.unpackloop
��LDR R3,[R0],#4
��
MOV R5,#0
��.bitloop
��� R6,R3,R4,LSL R5
��MOV R6,R6,LSR R5
��ADD R5,R5,#4
��� R7,R3,R4,LSL R5
��MOV R7,R7,LSR R5
��ADD R5,R5,#4
��STRB R7,[R1],#1
��STRB R6,[R1],#1
�CMP R5,#32
�BNE bitloop
�
CMP R2,R0
�$BNE unpackloop
�.MOVS PC,R14
�8
.blank
�B
MOV R2,#0
�LADD R1,R0,R1
�V.blankloop
�`STR R2,[R0],#4
�j
CMP R0,R1
�tBLT blankloop
�~MOVS PC,R14
��]
���
��grabwb!24=grabpal%
���
��
��)� �ChangeFSIVersion="0.82 (5 Feb 91)"
��
��[� �ChangeFSI(A$,spritearea%,workspace%,worklimit%,oksave%,okinfo%,� ram%,fast%,V9Area%)
��M� A$(),r%(),g%(),b%(),rpal%(),gpal%(),bpal%(),table%(),cl%(),xl%(),xl2%()
��D� xp%(),rm%(),rm1%(),rm2%(),vals%(),nl%(),A%(),B%(),new%(),st%()
��$ȕ�A$,1)<>" "��A$<>0 A$=�A$,2):�
��ȕ�A$,1)=" " A$=�A$,2):�
�ȕ�A$,1)=" " A$=�A$):�
�
�uc(�A$,5))="-QUIT" �
�.A$=�A$,7):ȕ�A$,1)<>" "��A$<>0 A$=�A$,2):�
�ȕ�A$,1)=" " A$=�A$,2):�
�(�
�2 � A$(100):ARG%=0:B%=�A$," ")
�<ȕ B%<>0
�F+ARG%+=1:A$(ARG%)=�A$,B%-1):A$=�A$,B%+1)
�Pȕ �A$,1)=" ":A$=�A$,2):�
�ZB%=�A$," ")
�d�
�n�A$<>"" ARG%+=1:A$(ARG%)=A$
�x
��<invert%=�:range%=�:sharpen%=�:info%=�:dither%=�:black%=�
��9hist%=�:equal%=�:vflip%=�:hflip%=�:scale%=�:scaleo%=�
��.gamma=1:rotate%=�:max%=20000000:bright%=15
��rwt=.30:gwt=.59:bwt=.11
��
�ARG%<3 �
��K�"ChangeFSI interactive input [try 'ChangeFSI -help' for command line]"
��?�"Source file: "s$,"Destination file: "f$,"Output mode: "m$
��/�"(X)Scale (e.g. 2:1): "xs$:�"Y Scale: "ys$
��8�"Info on input picture?"a$:�uc(�a$,1))="Y" info%=�
��;�"Invert picture colours?"a$:�uc(�a$,1))="Y" invert%=�
��=�"Compute histogram of input?"a$:�uc(�a$,1))="Y" hist%=�
��@�"Apply histogram equalisation?"a$:�uc(�a$,1))="Y" equal%=�
��G�"Expand input dynamic range?"a$:�uc(�a$,1))="Y" range%=�:equal%=�
�=�"Sharpen picture by (e.g. 12 for harsh, 24 for soft) "a$
��a$<>"" sharpen%=�a$
�+�"Rotate?"a$:�uc(�a$,1))="Y" rotate%=�
�"�
�,
� A%=ARG%
�66�uc(A$(ARG%))="-INFO" info%=�:A$(ARG%)="":ARG%-=1
�@6�uc(A$(ARG%))="-HIST" hist%=�:A$(ARG%)="":ARG%-=1
�JA�uc(A$(ARG%))="-EQUAL" equal%=�:range%=�:A$(ARG%)="":ARG%-=1
�TA�uc(A$(ARG%))="-RANGE" range%=�:equal%=�:A$(ARG%)="":ARG%-=1
�^:�uc(A$(ARG%))="-INVERT" invert%=�:A$(ARG%)="":ARG%-=1
�hD�uc(A$(ARG%))="-NOSCALE" scale%=�:scaleo%=�:A$(ARG%)="":ARG%-=1
�r9�uc(A$(ARG%))="-NOSIZE" scale%=�:A$(ARG%)="":ARG%-=1
�|<�uc(A$(ARG%))="-NODITHER" dither%=�:A$(ARG%)="":ARG%-=1
��=�uc(A$(ARG%))="-BRIGHTEN" bright%=16:A$(ARG%)="":ARG%-=1
��:�uc(A$(ARG%))="-ROTATE" rotate%=�:A$(ARG%)="":ARG%-=1
��8�uc(A$(ARG%))="-VFLIP" vflip%=�:A$(ARG%)="":ARG%-=1
��8�uc(A$(ARG%))="-HFLIP" hflip%=�:A$(ARG%)="":ARG%-=1
��8�uc(A$(ARG%))="-NOMODE" fast%=�:A$(ARG%)="":ARG%-=1
��!�uc(�A$(ARG%),6))="-BLACK" �
��Fblack%=32:�A$(ARG%)>6 black%=��A$(ARG%),7):�black%>128 black%=128
��A$(ARG%)="":ARG%-=1
���
��!�uc(�A$(ARG%),6))="-GAMMA" �
��.gamma=2.2:�A$(ARG%)>6 gamma=��A$(ARG%),7)
��A$(ARG%)="":ARG%-=1
���
�#�uc(�A$(ARG%),8))="-SHARPEN" �
�2sharpen%=�:�A$(ARG%)>8 sharpen%=��A$(ARG%),9)
�A$(ARG%)="":ARG%-=1
�&�
�0C�uc(�A$(ARG%),4))="-RED" rwt=��A$(ARG%),5):A$(ARG%)="":ARG%-=1
�:E�uc(�A$(ARG%),6))="-GREEN" gwt=��A$(ARG%),7):A$(ARG%)="":ARG%-=1
�DD�uc(�A$(ARG%),5))="-BLUE" bwt=��A$(ARG%),6):A$(ARG%)="":ARG%-=1
�N�uc(�A$(ARG%),4))="-MAX" �
�XDmax%=��A$(ARG%),5):�A$(ARG%),"K")��A$(ARG%),"k") max%=max%*1024
�bA$(ARG%)="":ARG%-=1
�l�
�v�A%=ARG%
��2s$=A$(1):f$=A$(2):m$=A$(3):xs$=A$(4):ys$=A$(5)
���
���okinfo% �info%=�
���workspace%>=0 �
��flex%=�
���
��<�worklimit%=0 �flex%=� �flex%=�:nextlocation%=worklimit%
���
��pnm$=�uc(m$):Ȏ pnm$ �
���"AIM":m=-1:m$=""
���"P1":m=-2:m$="":spm=18
���"P4":m=-2:m$="":spm=18
���"P2":m=-2:m$="T":spm=20
��"P5":m=-2:m$="T":spm=20
�5:m=�m$:spm=m:m$=�uc(�m$,1)):�"CDTP",m$)=0 m$=""
��
� �xs$="" � �xs$,1)="-" �
�*#xmul%=1:xdiv%=1:ymul%=1:ydiv%=1
�4�
�>�ys$="" ys$=xs$
�H'xmul%=�xs$:xdiv%=��xs$,�xs$,":")+1)
�R'ymul%=�ys$:ydiv%=��ys$,�ys$,":")+1)
�\�
�f	dir=�
�p*� flag=-1:SYS8,5,s$ TO r0,,r2:dir=r0=2
�z
�dir �
��Cpanic=�:ș8,5,s$+".raw" � r0,,r2:�r0=1 s$+=".raw":dir=�:panic=�
��1�panic ș8,5,s$+".red" � r0,,r2:�r0=1 panic=�
��!�panic � 42,"Directory given"
���
��>ftype=r2>>8 � &FFF:bits=28:F=2^bits:c%=0:cc%=0:ccc%=0:o%=0
��
�dir �
��>c%=�(s$+".red"):�c%=0 � 42,"Red file "+s$+".red not found"
��Ecc%=�(s$+".green"):�cc%=0 �42,"Green file "+s$+".green not found"
��Dccc%=�(s$+".blue"):�ccc%=0 �42,"Blue file "+s$+".blue not found"
���
��9� c%=OPENINs$:IFc%=0 ERROR 42,"File "+s$+" not found"
���
��
� r%(255)
�� g%(255),b%(255)
�Ȏ ftype �
�� &FF9:flag=0
�$
�.4� PTR#c%=0:S$="":FORI%=1TO8:S$+=CHR$BGET#c%:NEXT
�8(� IFflag=-1 IFS$="MercSoft" flag=902
�B4� flag=902:REM My format or else! !! fIX THIS !!
�L,� in_file_bits%=16 � flag=903 � flag=902
�V�
�`\�flag=-1:� 42,"Sorry: format not recognised - please try again or contact your supplier"
�j4step24=1:input=8:ham=0:planar%=0:bigendianbits=�
�tAcompression=0:rflag=flag:cache%=�:striprows%=-1:cachebytes%=�
�~
Ȏ flag �
��� 0
��=quant%=4:�#c%=4:F%=�W+&1C:�#c%=F%:st%=�W+F%-&20:�#c%=F%+8
��sm=�W:ș53,sm,3 � ,,I%
��Ȏ I% �
��%� 1:�st%=F%+12 �defpal2 ��ipal(2)
��5�#c%=F%-16:sx%=(�W+1)*32:rowbytes%=sx%>>3:input=1
��%� 3:�st%=F%+12 �defpal4 ��ipal(4)
��5�#c%=F%-16:sx%=(�W+1)*16:rowbytes%=sx%>>2:input=2
��(� 15:�st%=F%+12 �defpal16 ��ipal(16)
��4�#c%=F%-16:sx%=(�W+1)*8:rowbytes%=sx%>>1:input=4
��$� 63:�st%=F%+12 �defpal ��ipal63
��)�#c%=F%-16:sx%=(�W+1)*4:rowbytes%=sx%
�) �42,"Not understood RISC OS sprite"
�
�
�sy%=�W+1:�#c%=st%:cache%=�
�7ș53,sm,4 � ,,nx:ș53,sm,5 � ,,ny:nx=1<<nx:ny=1<<ny
�(-�scale% xmul%=xmul%*nx/2:ymul%=ymul%*ny/2
�2
offset%=0
�<Sinfo$="RISC OS sprite, mode "+�sm+" "+�sx%+" by "+�sy%+" pixels, "+�bits(input)
�F
�P	� 900
�ZMquant%=8:sx%=256:sy%=256:st%=0:�#c%=0:�scale% ymul%=ymul%*2:xmul%=xmul%*2
�dR�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%():rowbytes%=sx%:rflag=0:cache%=�
�n?info$="AIM .raw image, 256 by 256 pixels, 8 bits per pixel"
�x
��	� 901
��@quant%=4:sx%=256:sy%=256:�scale% ymul%=ymul%*2:xmul%=xmul%*2
��=buff%=�dim(sx%*3):rb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2
��9�C%=0�255:r%(C%)=(C%�&F0)/&F0*F:�:g%()=r%():b%()=r%()
��Oinput=24:info$="Hawk V9 Triple image, 256 by 256 pixels, 12 bits per pixel"
��
��	� 902
�� offset%=20
�� � slave% �
��0  c%=�("<FastGrab$Dir>.Resources.TwelveBit")
��/  � c%=0 � 214,"Cache file cannot be found"
��  offset%=20
��
  �#c%=20
�  � tspace% 1024
� �
�quant%=4
�"sx%=512
�,rowbytes%=sx%*3/2
�6sy%=256
�@
st%=20
�J	�size
�Tbuff%=�dim(sx%*3)
�^Arb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2:rats%=�dim(rowbytes%)
�h7�C%=0�255:r%(C%)=(C%�&F)/&F*F:�:g%()=r%():b%()=r%()
�rYinput=24:info$="Hawk V9 Colour image, "+�sx%+" by "+�sy%+" pixels, 12 bits per pixel"
�|
��	� 903
�� offset%=20
�� � slave% �
��2    c%=�("<FastGrab$Dir>.Resources.TwelveBit")
��/  � c%=0 � 214,"Cache file cannot be found"
��  offset%=20
��
  �#c%=20
��  � tspace% 1024
�� �
��quant%=5
��sx%=512
��rowbytes%=sx%*2
��sy%=256
�
st%=20
�	�size
�buff%=�dim(sx%*3)
�&Arb%=buff%:gb%=buff%+sx%:bb%=buff%+sx%*2:rats%=�dim(rowbytes%)
�0@� C%=0 � 255:r%(C%)=(C%�&1F)/&1F*F:�:g%()=r%()*1.6:b%()=r%()
�:_input=24:info$="Hawk V9 Mk II Colour image, "+�sx%+" by "+�sy%+" pixels, 16 bits per pixel"
�D
�N�
�X�info% �info$
�b#ș"Hourglass_On",1:hour%=&406c4
�l0�invert% r%()=F-r%():g%()=F-g%():b%()=F-b%()
�v
Ȏ m �
��D� -1:x%=256:y%=256:ncol=255:�scaleo% xdiv%=xdiv%*2:ydiv%=ydiv%*2
��.� -2:x%=sx%:y%=sy%:�spm=18 ncol=1 �ncol=15
��
��5ș53,m,4 � ,,nx:ș53,m,5 � ,,ny:nx=1<<nx:ny=1<<ny
��1ș53,m,11 � ,,x%:ș53,m,12 � ,,y%:x%+=1:y%+=1
�� ș53,m,3 � ,,ncol:�scaleo% �
���rotate% �
��%xdiv%=xdiv%*ny/2:ydiv%=ydiv%*nx/2
���
��%xdiv%=xdiv%*nx/2:ydiv%=ydiv%*ny/2
���
���
���
�
�m$="P" �
�#J%=4096:�ncol<63 J%+=(ncol+1)*4
�*lookup%=�dim(J%):palette%=lookup%+4096
� 2I%=�("<FastGrab$Dir>.Resources.CFSIict"+�ncol)
�*	�I% �
�4E�#I%:�"load <FastGrab$Dir>.Resources.CFSIict"+�ncol+" "+�~lookup%
�>�
�H(I%=&40744:�B%=0�15:șhour%,B%*100�16
�R'�G%=0�15:L%=(B%<<8 � G%<<4)+lookup%
�\$C%=B%<<28�B%<<24 � G%<<20�G%<<16
�f,�R%=0�15:șI%,C%� R%<<12�R%<<8 � L%?R%:�
�p�:�
�z�ncol<63 �
��>�I%=0�ncol:ș"OS_ReadPalette",I%,16 � ,,palette%!(I%<<2):�
���
��2I%=�("<FastGrab$Dir>.Resources.CFSIict"+�ncol)
�� �B%=0�J%-1:�#I%,lookup%?B%:�
���#I%
���
���
���fast% ��<>0 �0
��$�rotate% Ȕ x%,y%:Ȕ xmul%,ymul%
���xdiv%=0 xdiv%=sx%
���ydiv%=0 ydiv%=sy%
���xs$="=" xmul%=x%:xdiv%=sx%
���ys$="=" ymul%=y%:ydiv%=sy%
�
�ncol=1 �
�Ȏ m$ �
�$�"C":xdiv%=xdiv%*4:ydiv%=ydiv%*4
�$� A%(16),B%(16)
�.�A%()=0,&00000001,&08000001,&08000101,&08080101,&08080103,&0C080103,&0C080303,&0C0C0303,&0C0E0303,&0C0E0703,&0E0E0703,&0E0E0707,&0E0F0707,&0E0F0F07,&0F0F0F07,&0F0F0F0F
�8�B%()=0,&00000008,&01000008,&01000808,&01010808,&0101080C,&0301080C,&03010C0C,&03030C0C,&03070C0C,&03070E0C,&07070E0C,&07070E0E,&070F0E0E,&070F0F0E,&0F0F0F0E,&0F0F0F0F
�B2even_gard=�dim(17*32*4):odd_gard=�dim(17*32*4)
�LC�I%=0�16:�J%=0�16:even_gard!(J%*32*4+I%*4)=A%(I%)�B%(J%)<<4:�:�
�VB�I%=0�16:�J%=0�16:odd_gard!(I%*32*4+J%*4)=B%(I%)�A%(J%)<<4:�:�
�`$�"T":xdiv%=xdiv%*3:ydiv%=ydiv%*3
�j� A%(9),B%(9)
�t@A%()=0,&0001,&4001,&4041,&4043,&40C3,&60C3,&61C3,&71C3,&71C7
�~@B%()=0,&0004,&1004,&1104,&1106,&1186,&3186,&31C6,&71C6,&71C7
��2even_gard=�dim(10*16*4):odd_gard=�dim(10*16*4)
��A�I%=0�9:�J%=0�9:even_gard!(J%*16*4+I%*4)=A%(I%)�B%(J%)<<3:�:�
��@�I%=0�9:�J%=0�9:odd_gard!(I%*16*4+J%*4)=B%(I%)�A%(J%)<<3:�:�
��$�"D":xdiv%=xdiv%*2:ydiv%=ydiv%*2
��� A%(4),B%(4)
��A%()=0,&1,&21,&31,&33
��B%()=0,&2,&12,&32,&33
��*even_gard=�dim(5*8):odd_gard=�dim(5*8)
��<�I%=0�4:�J%=0�4:even_gard?(J%*8+I%)=A%(I%)�B%(J%)<<2:�:�
��;�I%=0�4:�J%=0�4:odd_gard?(I%*8+J%)=B%(I%)�A%(J%)<<2:�:�
���
���
�-�reduce(xmul%,xdiv%):�reduce(ymul%,ydiv%)
�
@�info% �"Size ratios are x ";xmul%":"xdiv%" y "ymul%":"ydiv%
�?x%=sx%*xmul%/xdiv%+.9999:y%=sy%*ymul%/ydiv%+.9999:rows%=sy%
�order%=x%*y%>sx%*sy%
�(
Ȏ m �
�2� -1:col=0
�<
�F$�m$="D" �ncol<>15 �ncol<>1 m$=""
�P3col=0:�ncol>15 � m$="C" � m$="D" � m$="P" col=2
�Z�
�d
�ncol=1 �
�nȎ m$ �
�x�"C":col=0:x%=x%+1��1
���"D":col=0:x%=x%+3��3
���"T":col=0:x%=x%+1��1
���
���
���sharpen%=� sharpen%=24
��� cl%(x%+7,col)
��"� xl%(x%+7,col),xp%(sx%+7,col)
��� xl2%(x%+7,col)
���sharpen% �
��
�order% �
��4� rm%(sx%+7,col),rm1%(sx%+7,col),rm2%(sx%+7,col)
���
��1� rm%(x%+7,col),rm1%(x%+7,col),rm2%(x%+7,col)
��
��
�"�hist%�equal% � vals%(256,col)
�"� nl%(x%+7,col)
�,totvals%=x%*(col+1)
�6totvals2%=sx%*(col+1)
�@code%=�dim(8192):SP=13
�J
�cache% �
�T,ș&20023,"ChangeFSI$Cache",code%,-1 �,,Z
�^�Z<>0 �
�hBș35,"ChangeFSI$Cache",code%,20 �,,Z:code%?Z=13:cache%=�$code%
�r1�$code%,"K")��$code%,"k") cache%=cache%*1024
�|�
��cache%=8192
���
���cachebytes% �
��:filesize%=�#c%-�#c%:�cache%>filesize% cache%=filesize%
��cacherows%=cache%
���
��>filesize%=sy%*rowbytes%:�cache%<rowbytes% cache%=rowbytes%
��&�cache%>filesize% cache%=filesize%
��Ccacherows%=striprows%:�cacherows%<1 cacherows%=cache%�rowbytes%
��cache%=cacherows%*rowbytes%
���
��Cdatacache%=�dim(cache%):�refill:�cache%>=filesize% rowstogo%=-1
���
��Z=0�2�2:P%=code%
�
Ȏ ncol �
�	� 255
�&
[OPT Z
�0.fs%
�:STMFD SP !,{R14}
�D LDR R1,[R9,#5*8]:LDR R1,[R1]
�NLDR R10,[R9,#4*8]
�XLDR R11,[R9,#3*8]
�b#LDR R12,[R9,#2*8]:LDR R12,[R12]
�lLDR R8,[R9,#8]:LDR R8,[R8]
�vLDR R9,[R9]:LDR R9,[R9]
��LDR R4,[R10],R8
��.fsloop
��/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��(ADD R0,R4,#256:MOV R0,R0,LSR #bits-8
��.CMP R0,#256:MOVCS R0,#255:STRB R0,[R12],R1
��MOV R2,R0,LSL #bits-8
��]
���dither% �
��
[OPT Z
��SUB R4,R4,R2
��MOVCS R4,#0
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�STR R3,[R11,-R8]
�ADD R2,R4,R4,LSL #2
�$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
� STR R3,[R11]
�*MOV R3,R4,ASR #4
�4STR R3,[R11,R8]!
�>RSB R2,R4,R4,LSL #3
�HLDR R4,[R10],R8
�RADD R4,R4,R2,ASR #4
�\]
�f�
�p
[OPT Z
�zLDR R4,[R10],R8
��]
���
��
[OPT Z
��SUBS R9,R9,#1:BNE fsloop
��LDMFD SP !,{PC}^
��]
��� 63
��
�m$="P" �
��
[OPT Z
��
.div15
��]
��
�I%=0�255
��
[OPT Z
�&EQUD (I%�7 � (I%�16)>>1)/bright%*F
�'EQUD (I%�3 � (I%�&60)>>3)/bright%*F
�3EQUD (I%�3 � (I%�8)>>1 � (I%�128)>>4)/bright%*F
�$]
�.�
�8
[OPT Z
�B.colmatchloc EQUD lookup%
�LEQUD div15
�V]
�`�
�j
[OPT Z
�t.div15 EQUD 0
�~EQUD 4/bright%*F
��EQUD 8/bright%*F
��EQUD 12/bright%*F
��]
���
��
[OPT Z
��.fs%
��STMFD SP !,{R14}
�� LDR R1,[R9,#5*8]:LDR R1,[R1]
��LDR R10,[R9,#4*8]
��LDR R11,[R9,#3*8]
��#LDR R12,[R9,#2*8]:LDR R12,[R12]
��LDR R8,[R9,#8]:LDR R8,[R8]
�LDR R9,[R9]:LDR R9,[R9]
�
LDR R4,[R10]
�LDR R5,[R10,#4]
�LDR R6,[R10,#8]
�(]
�2
�m$="P" �
�<
[OPT Z
�FLDR R7,colmatchloc+4
�P]
�Z�
�d
[OPT Z
�nADR R7,div15
�x]
���
��
[OPT Z
��.fsloop
��ADD R10,R10,R8
��]
��
�m$="P" �
��
[OPT Z
��/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��3MOV R0,R4,LSR #(bits-4):CMP R0,#15:MOVCS R0,#15
��/TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
��FMOV R3,R5,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:�R R0,R0,R3,LSL #4
��/TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
��FMOV R3,R6,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:�R R0,R0,R3,LSL #8
�LDR R3,colmatchloc
�LDRB R0,[R3,R0]
�+ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
�"LDR R2,[R3],#4:SUB R4,R4,R2
�,.LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
�6]
�@�
�J
[OPT Z
�T/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�^MOV R3,R4,LSR #bits-2
�hCMP R3,#4:MOVCS R3,#3
�rSUB R14,R4,R3,LSL #bits-2
�|LDR R2,[R7,R3,LSL #2]
��SUB R4,R4,R2
��� R2,R3,#1:MOV R0,R2,LSL #2
��!� R2,R3,#2:�R R0,R0,R2,LSL #3
��/TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
��MOV R3,R5,LSR #bits-2
��CMP R3,#4:MOVCS R3,#3
��SUB R2,R5,R3,LSL #bits-2
��ADD R14,R14,R2
��LDR R2,[R7,R3,LSL #2]
��SUB R5,R5,R2
���R R0,R0,R3,LSL #5
��/TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
��MOV R3,R6,LSR #bits-2
�CMP R3,#4:MOVCS R3,#3
�SUB R2,R6,R3,LSL #bits-2
�ADD R14,R14,R2
�&LDR R2,[R7,R3,LSL #2]
�0SUB R6,R6,R2
�:!� R2,R3,#1:�R R0,R0,R2,LSL #3
�D!� R2,R3,#2:�R R0,R0,R2,LSL #6
�N]
�X�m$<>"T" �
�b
[OPT Z
�lADD R2,R14,R14,LSL #2
�vMOV R2,R2,LSR #bits
��CMP R2,#3:MOVCS R2,#3
���R R0,R0,R2
��LDR R2,[R7,R2,LSL #2]
��SUB R4,R4,R2,LSR #2
��SUB R5,R5,R2,LSR #2
��SUB R6,R6,R2,LSR #2
��]
���
���
��
[OPT Z
��STRB R0,[R12],R1
��]
���dither% �
�
[OPT Z
�ADD R0,R11,#4
�ADD R2,R4,R4,LSL #1
� (LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�*STR R3,[R11,-R8]
�4ADD R2,R4,R4,LSL #2
�>$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�HSTR R3,[R11]
�RMOV R3,R4,ASR #4
�\STR R3,[R11,R8]!
�fRSB R2,R4,R4,LSL #3
�pLDR R4,[R10]
�zADD R4,R4,R2,ASR #4
��ADD R2,R5,R5,LSL #1
��'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R0,-R8]
��MOV R3,R5,ASR #4
��STR R3,[R0,R8]
��ADD R2,R5,R5,LSL #2
��#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
��STR R3,[R0],#4
��RSB R2,R5,R5,LSL #3
��LDR R5,[R10,#4]
��ADD R5,R5,R2,ASR #4
��ADD R2,R6,R6,LSL #1
��'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
�STR R3,[R0,-R8]
�ADD R2,R6,R6,LSL #2
�#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
�$STR R3,[R0]
�.MOV R3,R6,ASR #4
�8STR R3,[R0,R8]
�BRSB R2,R6,R6,LSL #3
�LLDR R6,[R10,#8]
�VADD R6,R6,R2,ASR #4
�`]
�j�
�t
[OPT Z
�~LDMIA R10,{R4,R5,R6}
��]
���
��
[OPT Z
��SUBS R9,R9,#1:BNE fsloop
��LDMFD SP !,{PC}^
��]
��� 15
��divtable=P%:Ȏ m$ �
��	� "D"
��	� "P"
���I%=0�15*4�4
��
[OPT Z
�'EQUD (palette%!I%>>12�&F)/bright%*F
�
'EQUD (palette%!I%>>20�&F)/bright%*F
�'EQUD (palette%!I%>>28�&F)/bright%*F
�]
�(�
�2
[OPT Z
�<.colmatchloc EQUD lookup%
�F]
�P	� "C"
�Z�I%=0�3
�d
[OPT Z
�nEQUD I%/(bright%�4)*F
�x]
���
��	� "T"
���I%=0�15
��
[OPT Z
��EQUD I%/bright%*F
��]
���
��� ""
���I%=0�7
��
[OPT Z
��EQUD I%/(bright%�2)*F
��]
���
��
�
[OPT Z
�.fs%
�"STMFD SP !,{R14}
�, LDR R1,[R9,#5*8]:LDR R1,[R1]
�6LDR R10,[R9,#4*8]
�@LDR R11,[R9,#3*8]
�J#LDR R12,[R9,#2*8]:LDR R12,[R12]
�TLDR R8,[R9,#8]:LDR R8,[R8]
�^LDR R9,[R9]:LDR R9,[R9]
�h]
�r�m$="C" � m$="D" � m$="P" �
�|
[OPT Z
��LDR R4,[R10]
��LDR R5,[R10,#4]
��LDR R6,[R10,#8]
��]
���
��
[OPT Z
��LDR R4,[R10],R8
��]
���
��!�m$="C"�m$="T"�m$=""�m$="P" �
��
[OPT Z
��ADR R7,divtable
��]
��
�
[OPT Z
�.fsloop
�&]
�0Ȏ m$ �
�:	� "P"
�D
[OPT Z
�NADD R10,R10,R8
�X/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�b3MOV R0,R4,LSR #(bits-4):CMP R0,#15:MOVCS R0,#15
�l/TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
�vFMOV R3,R5,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:�R R0,R0,R3,LSL #4
��/TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
��FMOV R3,R6,LSR #(bits-4):CMP R3,#15:MOVCS R3,#15:�R R0,R0,R3,LSL #8
��LDR R3,colmatchloc
��LDRB R0,[R3,R0]
��+ADD R3,R0,R0,LSL #1:ADD R3,R7,R3,LSL #2
��LDR R2,[R3],#4:SUB R4,R4,R2
��.LDMIA R3,{R2,R3}:SUB R5,R5,R2:SUB R6,R6,R3
��
MOV R3,R0
��]
��	� "D"
��
[OPT Z
��ADD R10,R10,R8
��
MOV R3,#0
�/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�CMP R4,#F>>1
� SUBCS R4,R4,#F:�RCS R3,R3,#1
� /TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
�*CMP R5,#F>>1
�4 SUBCS R5,R5,#F:�RCS R3,R3,#2
�>/TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
�HCMP R6,#F>>1
�R SUBCS R6,R6,#F:�RCS R3,R3,#4
�\]
�f	� "C"
�p
[OPT Z
�zADD R10,R10,R8
��/TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
��/MOV R3,R5,LSR #bits-2:CMP R3,#3:MOVCS R3,#3
��LDR R2,[R7,R3,LSL #2]
��SUB R5,R5,R2
��/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��CMP R4,#F>>1
�� SUBCS R4,R4,#F:�RCS R3,R3,#4
��/TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
��CMP R6,#F>>1
�� SUBCS R6,R6,#F:�RCS R3,R3,#8
��]
��	� "T"
��
[OPT Z
�/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�1MOV R3,R4,LSR #bits-4:CMP R3,#15:MOVCS R3,#15
�LDR R2,[R7,R3,LSL #2]
�$SUB R4,R4,R2
�.]
�8� ""
�B
[OPT Z
�L/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�V/MOV R3,R4,LSR #bits-3:CMP R3,#7:MOVCS R3,#7
�`LDR R2,[R7,R3,LSL #2]
�jSUB R4,R4,R2
�t]
�~�
��
[OPT Z
��MOV R2,R12,LSR #1
��TST R12,#1
��LDRB R0,[R2]
�� �EQ R0,R0,#&F0:�REQ R0,R0,R3
��'�NE R0,R0,#&0F:�RNE R0,R0,R3,LSL #4
��STRB R0,[R2]
��ADD R12,R12,R1
��]
���m$="C" � m$="D" � m$="P" �
���dither% �
��
[OPT Z
�ADD R0,R11,#4
�
ADD R2,R4,R4,LSL #1
�(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�STR R3,[R11,-R8]
�(ADD R2,R4,R4,LSL #2
�2$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�<STR R3,[R11]
�FMOV R3,R4,ASR #4
�PSTR R3,[R11,R8]!
�ZRSB R2,R4,R4,LSL #3
�dLDR R4,[R10]
�nADD R4,R4,R2,ASR #4
�xADD R2,R5,R5,LSL #1
��'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R0,-R8]
��MOV R3,R5,ASR #4
��STR R3,[R0,R8]
��ADD R2,R5,R5,LSL #2
��#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
��STR R3,[R0],#4
��RSB R2,R5,R5,LSL #3
��LDR R5,[R10,#4]
��ADD R5,R5,R2,ASR #4
��ADD R2,R6,R6,LSL #1
��'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R0,-R8]
�ADD R2,R6,R6,LSL #2
�#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
�STR R3,[R0]
�"MOV R3,R6,ASR #4
�,STR R3,[R0,R8]
�6RSB R2,R6,R6,LSL #3
�@LDR R6,[R10,#8]
�JADD R6,R6,R2,ASR #4
�T]
�^�
�h
[OPT Z
�rLDMIA R10,{R4,R5,R6}
�|]
���
���
���dither% �
��
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
�LDR R4,[R10],R8
�ADD R4,R4,R2,ASR #4
�]
�&�
�0
[OPT Z
�:LDR R4,[R10],R8
�D]
�N�
�X�
�b
[OPT Z
�lSUBS R9,R9,#1:BNE fsloop
�vLDMFD SP !,{PC}^
��]
��� 3
���m$<>"C" �
��
[OPT Z
��.div3 EQUD 0
��EQUD 1/(bright%�4)*F
��EQUD 2/(bright%�4)*F
��
EQUD F
��]
���
��
[OPT Z
��.fs%
��STMFD SP !,{R14}
� LDR R1,[R9,#5*8]:LDR R1,[R1]
�LDR R10,[R9,#4*8]
�LDR R11,[R9,#3*8]
� LDR R12,[R9,#2*8]
�*LDR R12,[R12]
�4LDR R8,[R9,#8]
�>LDR R8,[R8]
�HLDR R9,[R9]
�RLDR R9,[R9]
�\]
�f
�m$="C" �
�p
[OPT Z
�zLDR R4,[R10]
��LDR R5,[R10,#4]
��LDR R6,[R10,#8]
��]
���
��
[OPT Z
��LDR R4,[R10],R8
��ADR R7,div3
��]
���
��
[OPT Z
��.fsloop
��]
��
�m$="C" �
�
[OPT Z
�ADD R10,R10,R8
�/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�$/TEQ R5,#0:MOVMI R5,#0:CMP R5,#F:MOVCS R5,#F
�./TEQ R6,#0:MOVMI R6,#0:CMP R6,#F:MOVCS R6,#F
�8
MOV R3,#0
�BCMP R4,#F>>1:�RCS R3,R3,#1
�LCMP R5,#F>>1:�RCS R3,R3,#2
�VCMP R6,#F>>1:�RCS R3,R3,#4
�`"CMP R3,#6:�Q R3,#1:BEQ octcyan
�jBCS octwhite
�tCMP R3,#4:BEQ octblue
�~MOVCS R3,#2:BCS octmagenta
��CMP R3,#2:BEQ octgreen
��BCS octyellow
��CMP R3,#0:BEQ octblack
��.octred
��RSB R0,R4,#F
��
CMP R5,R0
��BLT octred1
��
CMP R5,R6
��MOVGE R3,#3
��MOVLT R3,#2
��B octconvert
��.octred1
�
CMP R0,R6
�
MOVGE R3,#0
�MOVLT R3,#2
�B octconvert
�(
.octgreen
�2RSB R0,R5,#F
�<
CMP R0,R4
�FBLT octgreen1
�P
CMP R0,R6
�ZMOVGE R3,#0
�dMOVLT R3,#1
�nB octconvert
�x.octgreen1
��
CMP R4,R6
��MOVGE R3,#3
��MOVLT R3,#1
��B octconvert
��.octblue
��RSB R0,R6,#F
��
CMP R0,R4
��BLT octblue1
��
CMP R0,R5
��MOVGE R3,#0
��MOVLT R3,#1
��B octconvert
��
.octblue1
�
CMP R4,R5
�MOVGE R3,#2
�MOVLT R3,#1
�"B octconvert
�,
.octwhite
�6
CMP R4,R5
�@BLT octwhite1
�J
CMP R5,R6
�TMOVGE R3,#3
�^MOVLT R3,#2
�hB octconvert
�r.octwhite1
�|
CMP R4,R6
��MOVGE R3,#3
��MOVLT R3,#1
��.octconvert
��
CMP R3,#1
��.octcyan
��SUBEQ R5,R5,#F
��SUBEQ R6,R6,#F
��.octmagenta
��
CMP R3,#2
��SUBEQ R4,R4,#F
��SUBEQ R6,R6,#F
��.octyellow
��
CMP R3,#3
�SUBEQ R4,R4,#F
�SUBEQ R5,R5,#F
�
.octblack
�&MOV R2,R12,LSR #2
�0 � R7,R12,#3:MOV R7,R7,LSL #1
�:MOV R14,#3
�DMOV R14,R14,LSL R7
�N>LDRB R0,[R2]:BIC R0,R0,R14:�R R0,R0,R3,LSL R7:STRB R0,[R2]
�XADD R12,R12,R1
�b]
�l�dither% �
�v
[OPT Z
��ADD R0,R11,#4
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10]
��ADD R4,R4,R2,ASR #4
��ADD R2,R5,R5,LSL #1
�'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
�STR R3,[R0,-R8]
�MOV R3,R5,ASR #4
� STR R3,[R0,R8]
�*ADD R2,R5,R5,LSL #2
�4#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
�>STR R3,[R0],#4
�HRSB R2,R5,R5,LSL #3
�RLDR R5,[R10,#4]
�\ADD R5,R5,R2,ASR #4
�fADD R2,R6,R6,LSL #1
�p'LDR R3,[R0,-R8]:ADD R3,R3,R2,ASR #4
�zSTR R3,[R0,-R8]
��ADD R2,R6,R6,LSL #2
��#LDR R3,[R0]:ADD R3,R3,R2,ASR #4
��STR R3,[R0]
��MOV R3,R6,ASR #4
��STR R3,[R0,R8]
��RSB R2,R6,R6,LSL #3
��LDR R6,[R10,#8]
��ADD R6,R6,R2,ASR #4
��]
���
��
[OPT Z
��LDMIA R10,{R4,R5,R6}
��]
��
��
�
[OPT Z
�$/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�./MOV R3,R4,LSR #bits-2:CMP R3,#3:MOVCS R3,#3
�8LDR R2,[R7,R3,LSL #2]
�BSUB R4,R4,R2
�LMOV R2,R12,LSR #2
�V � R5,R12,#3:MOV R5,R5,LSL #1
�`MOV R6,#3:MOV R6,R6,LSL R5
�j=LDRB R0,[R2]:BIC R0,R0,R6:�R R0,R0,R3,LSL R5:STRB R0,[R2]
�tADD R12,R12,R1
�~]
���dither% �
��
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
�ADD R4,R4,R2,ASR #4
�
]
��
�
[OPT Z
�(LDR R4,[R10],R8
�2]
�<�
�F�
�P
[OPT Z
�ZSUBS R9,R9,#1:BNE fsloop
�dLDMFD SP !,{PC}^
�n]
�x� 1
��Ȏ m$ �
���"C"
��
[OPT Z
��.divtable EQUD 0
��EQUD (1-black%/256*2)/16*F
��EQUD (2-black%/256*4)/16*F
��EQUD (3-black%/256*5)/16*F
��EQUD (4-black%/256*6)/16*F
��EQUD (5-black%/256*7)/16*F
��EQUD (6-black%/256*8)/16*F
��EQUD (7-black%/256*8)/16*F
��EQUD (8-black%/256*8)/16*F
��EQUD (9-black%/256*8)/16*F
�EQUD (10-black%/256*8)/16*F
�EQUD (11-black%/256*7)/16*F
�EQUD (12-black%/256*6)/16*F
�"EQUD (13-black%/256*5)/16*F
�,EQUD (14-black%/256*4)/16*F
�6EQUD (15-black%/256*2)/16*F
�@
EQUD F
�J.evenrow_gard DCD even_gard
�T.oddrow_gard DCD odd_gard
�^.rowinc DCD 0
�h.fs%
�rSTMFD SP !,{R14}
�| LDR R1,[R9,#5*8]:LDR R1,[R1]
��LDR R10,[R9,#4*8]
��LDR R11,[R9,#3*8]
��LDR R12,[R9,#2*8]
��LDR R12,[R12]
��LDR R8,[R9,#8]
��LDR R8,[R8]
��LDR R9,[R9]
��LDR R9,[R9]
��LDR R4,[R10],R8
��
TEQ R8,#0
��LDRPL R6,evenrow_gard
��LDRMI R6,oddrow_gard
��MOV R1,R1,LSL #1
�LDR R7,rowinc
�ADR R14,divtable
�.fsloop
�&/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�0ADD R5,R4,#F>>5
�:MOVS R5,R5,LSR #bits-4
�DLDRNE R0,[R14,R5,LSL #2]
�NSUBNE R4,R4,R0
�X]
�b�dither% �
�l
[OPT Z
�vADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
��ADDS R4,R4,R2,ASR #4
��]
���
��
[OPT Z
�LDR R4,[R10],R8
�]
��
� 
[OPT Z
�*%MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�4ADD R3,R4,#F>>5
�>MOVS R3,R3,LSR #bits-4
�HLDRNE R0,[R14,R3,LSL #2]
�RSUBNE R4,R4,R0
�\,�R R5,R5,R3,LSL #5:LDR R3,[R6,R5,LSL #2]
�fFMOV R2,R12,LSR #1:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2],R7
�pBMOV R3,R3,LSR #8:STRB R3,[R2],R7:MOV R3,R3,LSR #8:STRB R3,[R2]
�zADD R12,R12,R1
��]
���dither% �
��
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
�ADD R4,R4,R2,ASR #4
�]
��
�$
[OPT Z
�.LDR R4,[R10],R8
�8]
�B�
�L
[OPT Z
�VSUBS R9,R9,#2:BNE fsloop
�`LDMFD SP !,{PC}^
�j]
�t�"T"
�~
[OPT Z
��.divtable EQUD 0
��EQUD (1-black%/256*2)/9*F
��EQUD (2-black%/256*4)/9*F
��EQUD (3-black%/256*5)/9*F
��EQUD (4-black%/256*6)/9*F
��EQUD (5-black%/256*6)/9*F
��EQUD (6-black%/256*5)/9*F
��EQUD (7-black%/256*4)/9*F
��EQUD (8-black%/256*2)/9*F
��
EQUD F
��.evenrow_gard DCD even_gard
��.oddrow_gard DCD odd_gard
�.rowinc DCD 0
�
.fs%
�STMFD SP !,{R14}
� LDR R1,[R9,#5*8]:LDR R1,[R1]
�(LDR R10,[R9,#4*8]
�2LDR R11,[R9,#3*8]
�<LDR R12,[R9,#2*8]
�FLDR R12,[R12]
�PLDR R8,[R9,#8]
�ZLDR R8,[R8]
�dLDR R9,[R9]
�nLDR R9,[R9]
�xLDR R4,[R10],R8
��
TEQ R8,#0
��LDRPL R6,evenrow_gard
��LDRMI R6,oddrow_gard
��MOV R1,R1,LSL #1
��LDR R7,rowinc
��ADR R14,divtable
��.fsloop
��/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��ADD R5,R4,#F>>4
��ADD R5,R5,R5,LSL #3
��MOVS R5,R5,LSR #bits
��LDRNE R0,[R14,R5,LSL #2]
��SUBNE R4,R4,R0
�]
��dither% �
�
[OPT Z
�"ADD R2,R4,R4,LSL #1
�,(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�6STR R3,[R11,-R8]
�@ADD R2,R4,R4,LSL #2
�J$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�TSTR R3,[R11]
�^MOV R3,R4,ASR #4
�hSTR R3,[R11,R8]!
�rRSB R2,R4,R4,LSL #3
�|LDR R4,[R10],R8
��ADDS R4,R4,R2,ASR #4
��]
���
��
[OPT Z
��LDR R4,[R10],R8
��]
���
��
[OPT Z
��%MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��ADD R3,R4,#F>>4
��ADD R3,R3,R3,LSL #3
��MOVS R3,R3,LSR #bits
��LDRNE R0,[R14,R3,LSL #2]
�SUBNE R4,R4,R0
�,�R R5,R5,R3,LSL #4:LDR R5,[R6,R5,LSL #2]
�MOV R2,R12,LSR #1
�&� R3,R5,#&3F
�0STRB R3,[R2],R7
�:!MOV R3,R5,LSR #6:� R3,R3,#&3F
�DSTRB R3,[R2],R7
�N"MOV R3,R5,LSR #12:STRB R3,[R2]
�XADD R12,R12,R1
�b]
�l�dither% �
�v
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
��MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
��ADD R4,R4,R2,ASR #4
��]
���
�
[OPT Z
�LDR R4,[R10],R8
�]
� �
�*
[OPT Z
�4SUBS R9,R9,#2:BNE fsloop
�>LDMFD SP !,{PC}^
�H]
�R�"D"
�\
[OPT Z
�f.divtable EQUD 0
�pEQUD (1-black%/256*2)/4*F
�zEQUD (2-black%/256*4)/4*F
��EQUD (3-black%/256*2)/4*F
��
EQUD F
��.evenrow_gard DCD even_gard
��.oddrow_gard DCD odd_gard
��.rowinc DCD 0
��.fs%
��STMFD SP !,{R14}
�� LDR R1,[R9,#5*8]:LDR R1,[R1]
��LDR R10,[R9,#4*8]
��LDR R11,[R9,#3*8]
��LDR R12,[R9,#2*8]
��LDR R12,[R12]
��LDR R8,[R9,#8]
�LDR R8,[R8]
�LDR R9,[R9]
�LDR R9,[R9]
�$LDR R4,[R10],R8
�.
TEQ R8,#0
�8LDRPL R6,evenrow_gard
�BLDRMI R6,oddrow_gard
�LMOV R1,R1,LSL #1
�VLDR R7,rowinc
�`ADR R14,divtable
�j.fsloop
�t/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
�~ADD R5,R4,#F>>3
��MOVS R5,R5,LSR #bits-2
��LDRNE R0,[R14,R5,LSL #2]
��SUBNE R4,R4,R0
��]
���dither% �
��
[OPT Z
��ADD R2,R4,R4,LSL #1
��(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
��STR R3,[R11,-R8]
��ADD R2,R4,R4,LSL #2
��$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
��STR R3,[R11]
�MOV R3,R4,ASR #4
�
STR R3,[R11,R8]!
�RSB R2,R4,R4,LSL #3
�LDR R4,[R10],R8
�(ADDS R4,R4,R2,ASR #4
�2]
�<�
�F
[OPT Z
�PLDR R4,[R10],R8
�Z]
�d�
�n
[OPT Z
�x%MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��ADD R3,R4,#F>>3
��MOVS R3,R3,LSR #bits-2
��LDRNE R0,[R14,R3,LSL #2]
��SUBNE R4,R4,R0
��&�R R5,R5,R3,LSL #3:LDRB R5,[R6,R5]
��MOV R2,R12,LSR #2
��TST R12,#2
��� R3,R5,#&F:LDRB R0,[R2]
�� �EQ R0,R0,#&F0:�REQ R0,R0,R3
��'�NE R0,R0,#&0F:�RNE R0,R0,R3,LSL #4
��STRB R0,[R2],R7
��!MOV R3,R5,LSR #4:LDRB R0,[R2]
�� �EQ R0,R0,#&F0:�REQ R0,R0,R3
�'�NE R0,R0,#&0F:�RNE R0,R0,R3,LSL #4
�STRB R0,[R2]
�ADD R12,R12,R1
�"]
�,�dither% �
�6
[OPT Z
�@ADD R2,R4,R4,LSL #1
�J(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�TSTR R3,[R11,-R8]
�^ADD R2,R4,R4,LSL #2
�h$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�rSTR R3,[R11]
�|MOV R3,R4,ASR #4
��STR R3,[R11,R8]!
��RSB R2,R4,R4,LSL #3
��LDR R4,[R10],R8
��ADD R4,R4,R2,ASR #4
��]
���
��
[OPT Z
��LDR R4,[R10],R8
��]
���
��
[OPT Z
��SUBS R9,R9,#2:BNE fsloop
��LDMFD SP !,{PC}^
�]
�
�
[OPT Z
�&.fs%
�0STMFD SP !,{R14}
�: LDR R1,[R9,#5*8]:LDR R1,[R1]
�DLDR R10,[R9,#4*8]
�NLDR R11,[R9,#3*8]
�XLDR R12,[R9,#2*8]
�bLDR R12,[R12]
�lLDR R8,[R9,#8]
�vLDR R8,[R8]
��LDR R9,[R9]
��LDR R9,[R9]
��LDR R4,[R10],R8
��
MOV R7,#1
��.fsloop
��/TEQ R4,#0:MOVMI R4,#0:CMP R4,#F:MOVCS R4,#F
��]
��
�black% �
��
[OPT Z
��MOV R2,R12,LSR #3
��*� R5,R12,#7:MOV R6,#1:MOV R6,R6,LSL R5
��LDRB R0,[R2,#-(x%+7>>3)]
��SUB R3,R4,#F
�
CMP R7,#0
�!ADDNE R4,R4,#black%<<(bits-8)
�!ADDEQ R3,R3,#black%<<(bits-8)
� 
TST R0,R6
�*!ADDNE R4,R4,#black%<<(bits-8)
�4!ADDEQ R3,R3,#black%<<(bits-8)
�>MOVS R0,R3:RSBMI R0,R3,#0
�H
CMP R4,R0
�RMOVCC R3,#0
�\MOVCS R4,R3:MOVCS R3,#1
�f
MOV R7,R3
�p]
�z�
��
[OPT Z
��'ADD R3,R4,#F>>1:MOV R3,R3,LSR #bits
��SUB R4,R4,R3,LSL #bits
��MOV R2,R12,LSR #3
��*� R5,R12,#7:MOV R6,#1:MOV R6,R6,LSL R5
��]
���
��
[OPT Z
��0LDRB R0,[R2]:BIC R0,R0,R6:�R R0,R0,R3,LSL R5
��STRB R0,[R2]
��ADD R12,R12,R1
��]
���dither% �
�
[OPT Z
�ADD R2,R4,R4,LSL #1
�(LDR R3,[R11,-R8]:ADD R3,R3,R2,ASR #4
�$STR R3,[R11,-R8]
�.ADD R2,R4,R4,LSL #2
�8$LDR R3,[R11]:ADD R3,R3,R2,ASR #4
�BSTR R3,[R11]
�LMOV R3,R4,ASR #4
�VSTR R3,[R11,R8]!
�`RSB R2,R4,R4,LSL #3
�jLDR R4,[R10],R8
�tADD R4,R4,R2,ASR #4
�~]
���
��
[OPT Z
��LDR R4,[R10],R8
��]
���
��
[OPT Z
��SUBS R9,R9,#1:BNE fsloop
��LDMFD SP !,{PC}^
��]
���
���
��
[OPT Z
�.sxloc DCD sx%
�
]
�Ȏ col �
�� 0
�(�input<=8 �
�2
[OPT Z
�<.mappix%
�FLDR R0,sxloc
�PLDR R1,[R9]:LDR R1,[R1]
�ZLDR R2,[R9,#3*8]
�dLDR R5,[R9,#4*8]
�n
.mappixlp
�xLDRB R6,[R1],#step24
��]
���
��Ȏ input �
��� 8
��
[OPT Z
��(LDR R7,[R2,R6,LSL #2]:STR R7,[R5],#4
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��]
��� 4
���bigendianbits �
��
[OPT Z
��MOV R10,R6,LSR #4
�LDR R7,[R2,R10,LSL #2]
�� R10,R6,#&F
�]
�"�
�,
[OPT Z
�6� R10,R6,#&F
�@LDR R7,[R2,R10,LSL #2]
�JMOV R10,R6,LSR #4
�T]
�^�
�h
[OPT Z
�r,LDR R8,[R2,R10,LSL #2]:STMIA R5!,{R7,R8}
�|SUBS R0,R0,#2:BHI mappixlp
��MOVS PC,R14
��]
��� 2
���bigendianbits �
��
[OPT Z
��MOV R10,R6,LSR #6
��LDR R7,[R2,R10,LSL #2]
��� R10,R6,#&30
��LDR R8,[R2,R10,LSR #2]
��� R10,R6,#&C
��LDR R9,[R2,R10]
��� R10,R6,#&3
��]
��
�
[OPT Z
�� R10,R6,#&3
�&LDR R7,[R2,R10,LSL #2]
�0� R10,R6,#&C
�:LDR R8,[R2,R10]
�D� R10,R6,#&30
�NLDR R9,[R2,R10,LSR #2]
�XMOV R10,R6,LSR #6
�b]
�l�
�v
[OPT Z
��4LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
��SUBS R0,R0,#4:BHI mappixlp
��MOVS PC,R14
��]
��� 1
���bigendianbits �
��
[OPT Z
��� R10,R6,#&80
��LDR R7,[R2,R10,LSR #5]
��� R10,R6,#&40
��LDR R8,[R2,R10,LSR #4]
��� R10,R6,#&20
��LDR R9,[R2,R10,LSR #3]
�� R10,R6,#&10
�4LDR R10,[R2,R10,LSR #2]:STMIA R5!,{R7,R8,R9,R10}
�� R10,R6,#&8
� LDR R7,[R2,R10,LSR #1]
�*� R10,R6,#&4
�4LDR R8,[R2,R10]
�>� R10,R6,#&2
�HLDR R9,[R2,R10,LSL #1]
�R� R10,R6,#&1
�\]
�f�
�p
[OPT Z
�z� R10,R6,#&1
��LDR R7,[R2,R10,LSL #2]
��� R10,R6,#&2
��LDR R8,[R2,R10,LSL #1]
��� R10,R6,#&4
��LDR R9,[R2,R10]
��� R10,R6,#&8
��4LDR R10,[R2,R10,LSR #1]:STMIA R5!,{R7,R8,R9,R10}
��� R10,R6,#&10
��LDR R7,[R2,R10,LSR #2]
��� R10,R6,#&20
��LDR R8,[R2,R10,LSR #3]
��� R10,R6,#&40
��LDR R9,[R2,R10,LSR #4]
�MOV R10,R6,LSR #7
�]
��
�$
[OPT Z
�.4LDR R10,[R2,R10,LSL #2]:STMIA R5!,{R7,R8,R9,R10}
�8SUBS R0,R0,#8:BHI mappixlp
�BMOVS PC,R14
�L]
�V� 16
�`
[OPT Z
�j.mappix%
�tLDR R0,sxloc
�~LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#8]:LDR R2,[R2]
��LDR R3,[R9,#4*8]
��LDR R4,[R9,#3*8]
��LDR R5,[R9,#2*8]
��LDR R6,[R9,#5*8]
��LDR R7,[R9,#6*8]
��LDR R8,[R9,#7*8]
��
CMP R1,R2
��ADDEQ R2,R2,#1
��
.mappixlp
��.LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
��>LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:�R R9,R9,R10
�)� R10,R9,#255:LDR R10,[R3,R10,LSL #2]
�
<MOV R11,R9,LSR #8:� R11,R11,#255:LDR R11,[R4,R11,LSL #2]
�.MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
�3ADD R10,R10,R11:ADD R10,R10,R12:STMIA R8!,{R10}
�(SUBS R0,R0,#1:BNE mappixlp
�2MOVS PC,R14
�<]
�F� 24
�P
[OPT Z
�Z.mappix%
�dLDR R0,sxloc
�n LDR R1,[R9,#2*8]:LDR R1,[R1]
�xLDR R2,[R9,#8]:LDR R2,[R2]
��LDR R3,[R9]:LDR R3,[R3]
��LDR R4,[R9,#5*8]
��LDR R5,[R9,#4*8]
��LDR R6,[R9,#3*8]
��LDR R7,[R9,#6*8]
��
.mappixlp
��.LDRB R8,[R1],#step24:LDR R8,[R4,R8,LSL #2]
��;LDRB R9,[R2],#step24:LDR R9,[R5,R9,LSL #2]:ADD R8,R8,R9
��JLDRB R9,[R3],#step24:LDR R9,[R6,R9,LSL #2]:ADD R8,R8,R9:STR R8,[R7],#4
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��]
��	� 422
�
[OPT Z
�.mappix%
�LDR R0,sxloc
�"LDR R1,[R9]:LDR R1,[R1]
�,ADD R1,R1,#1
�6LDR R4,[R9,#1*8]
�@LDR R7,[R9,#8*8]
�J
.mappixlp
�TLDRB R8,[R1],#2
�^>LDR R8,[R4,R8,LSL #2]:CMP R8,#F:MOVCS R8,#F:STR R8,[R7],#4
�hSUBS R0,R0,#1:BNE mappixlp
�rMOVS PC,R14
�|]
���
��
[OPT Z
��
.xsample%
��LDR R0,[R9]:LDR R0,[R0]
��LDR R1,[R9,#8]
��LDR R2,[R9,#2*8]
�� LDR R3,[R9,#3*8]:LDR R3,[R3]
�� LDR R4,[R9,#4*8]:LDR R4,[R4]
��MOV R11,R4
��.xsamplelp
��LDMIA R1,{R5}
��,SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#4
��SUBS R12,R3,#1
�BEQ xdonediv
�.xdivlp
�CMP R12,R11
�&BCC xdivlp2
�0#LDMIA R1!,{R8}:MLA R5,R8,R11,R5
�:SUBS R12,R12,R11:MOV R11,R4
�DBNE xdivlp
�NB xdonediv
�X.xdivlp2
�bLDMIA R1,{R8}
�l,SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#4
�vADD R5,R5,R8
��SUBS R12,R12,#1:BNE xdivlp
��
.xdonediv
��STMIA R2!,{R5}
��SUBS R0,R0,#1:BPL xsamplelp
��MOVS PC,R14
��]
��� 2
���input<=8 �
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R2,[R9,#3*8]
�LDR R3,[R9,#2*8]
�LDR R4,[R9,#8]
�LDR R5,[R9,#4*8]
� 
.mappixlp
�*LDRB R6,[R1],#step24
�4]
�>�
�HȎ input �
�R� 8
�\
�ham �
�f
[OPT Z
�pADR R9,ltable
�z!MOVS R7,R6,LSR #4:� R6,R6,#15
��NLDREQ R10,[R2,R6,LSL #2]:LDREQ R11,[R3,R6,LSL #2]:LDREQ R12,[R4,R6,LSL #2]
��&CMP R7,#1:LDREQ R12,[R9,R6,LSL #2]
��&CMP R7,#2:LDREQ R10,[R9,R6,LSL #2]
��&CMP R7,#3:LDREQ R11,[R9,R6,LSL #2]
��STMIA R5!,{R10,R11,R12}
��SUBS R0,R0,#1:BNE mappixlp
��MOVS PC,R14
��.ltable
��]
���I%=0�15
��
[OPT Z
��EQUD I%/15*F
��]
��
��
�
[OPT Z
�$ELDR R7,[R2,R6,LSL #2]:LDR R8,[R3,R6,LSL #2]:LDR R9,[R4,R6,LSL #2]
�.STMIA R5!,{R7,R8,R9}
�8SUBS R0,R0,#1:BNE mappixlp
�BMOVS PC,R14
�L]
�V�
�`� 4
�j�bigendianbits �
�t
[OPT Z
�~MOV R10,R6,LSR #4
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&F
��]
���
��
[OPT Z
��� R10,R6,#&F
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��MOV R10,R6,LSR #4
��]
���
�
[OPT Z
�
HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�STMIA R5!,{R7,R8,R9}
�SUBS R0,R0,#2:BHI mappixlp
�(MOVS PC,R14
�2]
�<� 2
�F�bigendianbits �
�P
[OPT Z
�ZMOV R10,R6,LSR #6
�dHLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�nSTMIA R5!,{R7,R8,R9}
�x� R10,R6,#&30
��HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&C
��3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&3
��]
���
��
[OPT Z
��� R10,R6,#&3
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&C
�3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
�STMIA R5!,{R7,R8,R9}
�� R10,R6,#&30
�"HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
�,STMIA R5!,{R7,R8,R9}
�6MOV R10,R6,LSR #6
�@]
�J�
�T
[OPT Z
�^HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
�hSTMIA R5!,{R7,R8,R9}
�rSUBS R0,R0,#4:BHI mappixlp
�|MOVS PC,R14
��]
��� 1
���bigendianbits �
��
[OPT Z
��� R10,R6,#&80
��HLDR R7,[R2,R10,LSR #5]:LDR R8,[R3,R10,LSR #5]:LDR R9,[R4,R10,LSR #5]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&40
��HLDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&20
��HLDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
��STMIA R5!,{R7,R8,R9}
�� R10,R6,#&10
�HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
�STMIA R5!,{R7,R8,R9}
�&� R10,R6,#&8
�0HLDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
�:STMIA R5!,{R7,R8,R9}
�D� R10,R6,#&4
�N3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
�XSTMIA R5!,{R7,R8,R9}
�b� R10,R6,#&2
�lHLDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
�vSTMIA R5!,{R7,R8,R9}
��� R10,R6,#&1
��]
���
��
[OPT Z
��� R10,R6,#&1
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&2
��HLDR R7,[R2,R10,LSL #1]:LDR R8,[R3,R10,LSL #1]:LDR R9,[R4,R10,LSL #1]
��STMIA R5!,{R7,R8,R9}
��� R10,R6,#&4
��3LDR R7,[R2,R10]:LDR R8,[R3,R10]:LDR R9,[R4,R10]
��STMIA R5!,{R7,R8,R9}
�� R10,R6,#&8
�HLDR R7,[R2,R10,LSR #1]:LDR R8,[R3,R10,LSR #1]:LDR R9,[R4,R10,LSR #1]
�STMIA R5!,{R7,R8,R9}
� � R10,R6,#&10
�*HLDR R7,[R2,R10,LSR #2]:LDR R8,[R3,R10,LSR #2]:LDR R9,[R4,R10,LSR #2]
�4STMIA R5!,{R7,R8,R9}
�>� R10,R6,#&20
�HHLDR R7,[R2,R10,LSR #3]:LDR R8,[R3,R10,LSR #3]:LDR R9,[R4,R10,LSR #3]
�RSTMIA R5!,{R7,R8,R9}
�\� R10,R6,#&40
�fHLDR R7,[R2,R10,LSR #4]:LDR R8,[R3,R10,LSR #4]:LDR R9,[R4,R10,LSR #4]
�pSTMIA R5!,{R7,R8,R9}
�zMOV R10,R6,LSR #7
��]
���
��
[OPT Z
��HLDR R7,[R2,R10,LSL #2]:LDR R8,[R3,R10,LSL #2]:LDR R9,[R4,R10,LSL #2]
��STMIA R5!,{R7,R8,R9}
��SUBS R0,R0,#8:BHI mappixlp
��MOVS PC,R14
��]
��� 16
��
[OPT Z
��.mappix%
��LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
�LDR R2,[R9,#8]:LDR R2,[R2]
�LDR R3,[R9,#4*8]
�LDR R4,[R9,#3*8]
�$LDR R5,[R9,#2*8]
�.LDR R6,[R9,#5*8]
�8LDR R7,[R9,#6*8]
�BLDR R8,[R9,#7*8]
�L
CMP R1,R2
�VADDEQ R2,R2,#1
�`
.mappixlp
�j.LDRB R9,[R1],#step24:LDRB R10,[R2],#step24
�t>LDR R9,[R6,R9,LSL #2]:LDR R10,[R7,R10,LSL #2]:�R R9,R9,R10
�~)� R10,R9,#255:LDR R10,[R3,R10,LSL #2]
ˆ<MOV R11,R9,LSR #8:� R11,R11,#255:LDR R11,[R4,R11,LSL #2]
’.MOV R12,R9,LSR #16:LDR R12,[R5,R12,LSL #2]
œSTMIA R8!,{R10,R11,R12}
¦SUBS R0,R0,#1:BNE mappixlp
°MOVS PC,R14
º]
��� 24
��
[OPT Z
��.mappix%
��LDR R0,sxloc
�� LDR R1,[R9,#2*8]:LDR R1,[R1]
�LDR R2,[R9,#8]:LDR R2,[R2]
�LDR R3,[R9]:LDR R3,[R3]
�
LDR R4,[R9,#5*8]
�LDR R5,[R9,#4*8]
�LDR R6,[R9,#3*8]
�(LDR R7,[R9,#6*8]
�2
.mappixlp
�<.LDRB R8,[R1],#step24:LDR R9,[R4,R8,LSL #2]
�F/LDRB R8,[R2],#step24:LDR R10,[R5,R8,LSL #2]
�P/LDRB R8,[R3],#step24:LDR R11,[R6,R8,LSL #2]
�ZSTMIA R7!,{R9,R10,R11}
�dSUBS R0,R0,#1:BNE mappixlp
�nMOVS PC,R14
�x]
Â	� 423
Ì
[OPT Z
Ö.mappix%
àLDR R0,sxloc
êLDR R1,[R9]:LDR R1,[R1]
ôLDR R2,[R9,#1*8]
þLDR R3,[R9,#2*8]
��LDR R4,[R9,#3*8]
��LDR R5,[R9,#4*8]
��LDR R6,[R9,#5*8]
��LDR R7,[R9,#6*8]
��LDR R8,[R9,#7*8]
�LDR R9,[R9,#8*8]
�STMFD SP !,{R14}
�
.mappixlp
�LDR R10,[R1],#4
�"� R11,R10,#&FF00
�,LDR R11,[R2,R11,LSR #6]
�6:� R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
�@@� R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
�J8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�T:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
�^@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
�h8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�r:� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
�|@� R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
Ć8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
� R11,R10,#&FF000000
ĚLDR R11,[R2,R11,LSR #22]
Ĥ:� R12,R10,#&FF:LDR R12,[R7,R12,LSL #2]:ADD R14,R12,R11
Į@� R12,R10,#&FF0000:LDR R12,[R8,R12,LSR #14]:ADDS R14,R14,R12
ĸ8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
��@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��:� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADD R14,R12,R11
��@� R12,R10,#&FF0000:LDR R12,[R4,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�SUBS R0,R0,#2:BNE mappixlp
�LDMFD SP !,{PC}^
�]
�	� 422
�&
[OPT Z
�0.mappix%
�:LDR R0,sxloc
�DLDR R1,[R9]:LDR R1,[R1]
�NLDR R2,[R9,#1*8]
�XLDR R3,[R9,#2*8]
�bLDR R5,[R9,#4*8]
�lLDR R6,[R9,#5*8]
�vLDR R7,[R9,#6*8]
ŀLDR R9,[R9,#8*8]
ŊSTMFD SP !,{R14}
Ŕ
.mappixlp
ŞLDR R10,[R1],#4
Ũ� R11,R10,#&FF00
ŲLDR R11,[R2,R11,LSR #6]
ż@� R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
��@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
��8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
��;� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
�8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�� R11,R10,#&FF000000
�LDR R11,[R2,R11,LSR #22]
�@� R12,R10,#&FF0000:LDR R12,[R7,R12,LSR #14]:ADDS R14,R12,R11
� 8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�*:� R12,R10,#&FF:LDR R12,[R5,R12,LSL #2]:ADD R14,R12,R11
�4@� R12,R10,#&FF0000:LDR R12,[R6,R12,LSR #14]:ADDS R14,R14,R12
�>8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�H;� R12,R10,#&FF:LDR R12,[R3,R12,LSL #2]:ADDS R14,R12,R11
�R8MOVMI R14,#0:CMP R14,#F:MOVCS R14,#F:STR R14,[R9],#4
�\SUBS R0,R0,#2:BNE mappixlp
�fLDMFD SP !,{PC}^
�p]
�z�
Ƅ
[OPT Z
Ǝ
.xsample%
ƘLDR R0,[R9]:LDR R0,[R0]
ƢLDR R1,[R9,#8]
ƬLDR R2,[R9,#2*8]
ƶ LDR R3,[R9,#3*8]:LDR R3,[R3]
� LDR R4,[R9,#4*8]:LDR R4,[R4]
��MOV R11,R4
��.xsamplelp
��LDMIA R1,{R5,R6,R7}
��-SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#12
��SUBS R12,R3,#1
�BEQ xdonediv
�.xdivlp
�CMP R12,R11
�BCC xdivlp2
�$MLDMIA R1!,{R8,R9,R10}:MLA R5,R8,R11,R5:MLA R6,R9,R11,R6:MLA R7,R10,R11,R7
�.SUBS R12,R12,R11:MOV R11,R4
�8BNE xdivlp
�BB xdonediv
�L.xdivlp2
�VLDMIA R1,{R8,R9,R10}
�`-SUBS R11,R11,#1:�Q R11,R4:ADDEQ R1,R1,#12
�j+ADD R5,R5,R8:ADD R6,R6,R9:ADD R7,R7,R10
�tSUBS R12,R12,#1:BNE xdivlp
�~
.xdonediv
LjSTMIA R2!,{R5,R6,R7}
ǒSUBS R0,R0,#1:BPL xsamplelp
ǜMOVS PC,R14
Ǧ]
ǰ�
Ǻ�compression=5 �
��
[OPT Z
��.firstcode DCD 0
��.oldcode DCD 0
��.codesize DCD setcodes%+1
��.stack DCD stk%
�.sp DCD stk%
�.maxcode DCD clearcode%+2
�
!.maxcodesize DCD 2*clearcode%
�.LZWdecode%
�@LDR R2,firstcode:LDR R3,oldcode:LDR R4,stack:LDR R5,codesize
�(/LDR R6,sp:LDR R7,maxcode:LDR R8,maxcodesize
�2LDR R10,[R9]:LDR R10,[R10]
�<!LDR R11,[R9,#8]:LDR R11,[R11]
�FLDR R12,[R9,#24]
�PSTMFD SP !,{R14}
�Z.lzwloop
�d
CMP R6,R4
�nBHI lzwunstack
�x.lzwengine
ȂBL getcode
ȌCMP R0,#clearcode%
ȖBEQ lzwclear
Ƞ
MOV R1,R0
Ȫ
CMP R0,R7
ȴSTRCSB R2,[R6],#1
ȾMOVCS R0,R3
��CMP R0,#clearcode%
��BCC lzwdonepush
��.lzwpushtable
��LDR R14,[R12,R0,LSL #2]
��STRB R14,[R6],#1
�MOV R0,R14,LSR #16
�CMP R0,#clearcode%
�BCS lzwpushtable
�.lzwdonepush
�"LDR R2,[R12,R0,LSL #2]
�,BIC R2,R2,#&FF0000
�6BIC R2,R2,#&FF000000
�@STRB R2,[R6],#1
�JCMP R7,#4096
�TBCS lzwnocode
�^�R R0,R2,R3,LSL #16
�hSTR R0,[R12,R7,LSL #2]
�rADD R7,R7,#1
�|
CMP R7,R8
ɆBCC lzwnocode
ɐCMP R8,#4096
ɚADDCC R5,R5,#1
ɤMOVCC R8,R8,LSL #1
ɮ]
ɸ�flag=1500 �
��
[OPT Z
���RCC R8,R8,#1
��]
���
��
[OPT Z
��.lzwnocode
�
MOV R3,R1
�
CMP R6,R4
�BLS lzwengine
�.lzwunstack
�&LDRB R0,[R6,#-1]!
�0.lzwloopend
�:STRB R0,[R11],#1
�DSUBS R10,R10,#1
�NBNE lzwloop
�X3STR R2,firstcode:STR R3,oldcode:STR R5,codesize
�b/STR R6,sp:STR R7,maxcode:STR R8,maxcodesize
�lLDMFD SP !,{PC}^
�v
.lzwclear
ʀ
MOV R0,#0
ʊMOV R3,R12
ʔ.lzwdefaulttable
ʞSTR R0,[R3],#4
ʨ#ADD R0,R0,#1:CMP R0,#clearcode%
ʲBCC lzwdefaulttable
ʼMOV R5,#setcodes%+1
��MOV R7,#clearcode%
��MOV R8,R7,LSL #1
��]
���flag=1500 �
��
[OPT Z
�SUB R8,R8,#1
�]
��
�
[OPT Z
� ADD R7,R7,#2
�*BL getcode
�4
MOV R2,R0
�>
MOV R3,R0
�H
MOV R6,R4
�RB lzwloopend
�\.curbit DCD 0
�f.lastbit DCD 0
�p.buf DCD buf%
�z.getcode
˄STMFD SP !,{R6,R7,R8}
ˎADR R6,curbit
˘LDMIA R6,{R6,R7,R8}
ˢADD R1,R5,R6
ˬ
CMP R1,R7
˶BCS needmoredata
�.simplecode
��ADD R7,R8,R6,LSR #3
��BIC R7,R7,#3
��LDMIA R7,{R0,R7}
��]
���flag=1500 �
�
[OPT Z
�� R1,R0,R0,ROR #16
�BIC R1,R1,#&FF0000
�MOV R0,R0,ROR #8
�$� R0,R0,R1,LSR #8
�.� R1,R7,R7,ROR #16
�8BIC R1,R1,#&FF0000
�BMOV R7,R7,ROR #8
�L� R7,R7,R1,LSR #8
�VH�S R1,R6,#31:MOVNE R0,R0,LSL R1:RSBNE R1,R1,#32:�RNE R0,R0,R7,LSR R1
�`RSB R1,R5,#32
�jMOV R0,R0,LSR R1
�t]
�~�
̈
[OPT Z
̒H�S R1,R6,#31:MOVNE R0,R0,LSR R1:RSBNE R1,R1,#32:�RNE R0,R0,R7,LSL R1
̜!MVN R1,#0:BIC R0,R0,R1,LSL R5
̦]
̰�
̺
[OPT Z
��ADD R6,R6,R5
��STR R6,curbit
��LDMFD SP !,{R6,R7,R8}
��MOV PC,R14
��.needmoredata
�STMFD SP !,{R2,R3,R4}
�MOV R3,R7,LSR #3
�
SUB R0,R3,#2
�LDRB R0,[R8,R0]
�STRB R0,[R8]
�(SUB R0,R3,#1
�2LDRB R0,[R8,R0]
�<STRB R0,[R8,#1]
�FLDR R1,[R9,#16]
�PLDR R1,[R1]
�Z]
�d�flag=1500 �
�n
[OPT Z
�xMOV R0,#256
͂MOV R3,#256
͌]
͖�
͠
[OPT Z
ͪSWI "OS_BGet"
ʹMOVS R3,R0
;BEQ simplecode1
��]
���
��
[OPT Z
��SUB R6,R6,R7
��ADD R6,R6,#16
�ADD R0,R0,#2
�MOV R7,R0,LSL #3
�STR R7,lastbit
�
MOV R0,#4
�"ADD R2,R8,#2
�,SWI "OS_GBPB"
�6.simplecode1
�@LDMFD SP !,{R2,R3,R4}
�JB simplecode
�T]
�^�
�h
�range% �
�r
[OPT Z
�|.maxmin%
ΆLDR R0,[R9]:LDR R0,[R0]
ΐLDR R1,[R9,#8]
ΚLDR R2,min
ΤLDR R3,max
ή
.maxminlp
θLDR R4,[R1],#4
��CMP R4,R3:MOVCS R3,R4
��CMP R4,R2:MOVCC R2,R4
��SUBS R0,R0,#1:BNE maxminlp
��STR R2,min
��STR R3,max
��MOVS PC,R14
�.min DCD F
�.max DCD 0
�]
��
�&�sharpen% �
�09sharp=(col+1)*4:�sharpen%<>8 sharpmul%=F/(sharpen%-8)
�:
[OPT Z
�D.sharp%
�NLDR R0,[R9]:LDR R0,[R0]
�XLDR R1,[R9,#8]
�bLDR R2,[R9,#16]
�lLDR R3,[R9,#24]
�vLDR R4,[R9,#32]
π]
ϊȎ sharpen% �
ϔ� 8,9,12,16,24
Ϟ
Ϩ
[OPT Z
ϲMOV R8,#sharpmul% � &FF
ϼ�R R8,R8,#sharpmul% � &FF00
��#MOV R9,#(sharpmul% >> 16) � &FF
��'�R R9,R9,#(sharpmul% >> 16) � &FF00
��]
���
��
[OPT Z
�.sharplp
�LDR R5,[R1,#-sharp]
�#LDR R6,[R1,#sharp]:ADD R5,R5,R6
�LDR R6,[R1],#4:ADD R5,R5,R6
� $LDR R6,[R3,#-sharp]:ADD R5,R5,R6
�*#LDR R6,[R3,#sharp]:ADD R5,R5,R6
�4LDR R6,[R3],#4:ADD R5,R5,R6
�>$LDR R6,[R2,#-sharp]:ADD R5,R5,R6
�H#LDR R6,[R2,#sharp]:ADD R5,R5,R6
�RLDR R6,[R2],#4
�\MOV R6,R6,LSR #1
�fMOV R7,#sharpen%
�pMUL R7,R6,R7
�zSUBS R5,R7,R5,LSR #1
ЄMOVCC R5,#0
Ў]
ИȎ sharpen% �
Т	� 8,9
Ь
[OPT Z
жMOV R6,R5,LSL #1
�]
��� 10
��
[OPT Z
��
MOV R6,R5
��]
��� 12
�
[OPT Z
�MOV R6,R5,LSR #1
�]
�� 16
�$
[OPT Z
�.MOV R6,R5,LSR #2
�8]
�B� 24
�L
[OPT Z
�VMOV R6,R5,LSR #3
�`]
�j
�t
[OPT Z
�~MOV R6,R5,LSR #16
ш� R5,R5,R6,LSL #16
ђMUL R7,R8,R5
ќMUL R5,R9,R5
ѦMUL R10,R6,R8
ѰMUL R6,R9,R6
ѺADDS R10,R5,R10
��ADDCS R6,R6,#&10000
��ADDS R7,R7,R10,LSL #16
��ADC R6,R6,R10,LSR #16
��MOV R6,R6,LSL #(32-27)
���RS R6,R6,R7,LSR #27
�ADDCS R6,R6,#1
�]
�
�
�
[OPT Z
�CMP R6,#F:MOVCS R6,#F
�(STR R6,[R4],#4
�2SUBS R0,R0,#1
�<BNE sharplp
�FMOVS PC,R14
�P]
�Z�
�d�hist%�equal% �
�n
[OPT Z
�x.histo%
҂LDR R0,[R9]:LDR R0,[R0]
ҌLDR R1,[R9,#8]
ҖLDR R2,[R9,#16]
Ҡ.histlp
Ҫ(LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
ҴMOV R3,R3,LSR #bits-8
Ҿ]
���col=2 �
��
[OPT Z
��ADD R3,R3,R3,LSL #1
��<LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
��(LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
�MOV R3,R3,LSR #bits-8
�$ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
�<LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
�(LDR R3,[R2],#4:CMP R3,#F:MOVCS R3,#F
�"MOV R3,R3,LSR #bits-8
�,$ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
�6]
�@�
�J
[OPT Z
�T<LDR R4,[R1,R3,LSL #2]:ADD R4,R4,#1:STR R4,[R1,R3,LSL #2]
�^SUBS R0,R0,#1
�hBNE histlp
�rMOVS PC,R14
�|]
ӆ�
Ӑ
�equal% �
Ӛ
[OPT Z
Ӥ.histequal%
ӮLDR R0,[R9]:LDR R0,[R0]
ӸLDR R1,[R9,#8]
��LDR R2,[R9,#16]
��.equallp
��%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
��MOV R3,R3,LSR #bits-8
��]
���col=2 �
�
[OPT Z
�%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
�MOV R3,R3,LSR #bits-8
�ADD R3,R3,R3,LSL #1
�&(LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
�0%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
�:MOV R3,R3,LSR #bits-8
�D$ADD R3,R3,R3,LSL #1:ADD R3,R3,#1
�N(LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
�X%LDR R3,[R2]:CMP R3,#F:MOVCS R3,#F
�bMOV R3,R3,LSR #bits-8
�l$ADD R3,R3,R3,LSL #1:ADD R3,R3,#2
�v]
Ԁ�
Ԋ
[OPT Z
Ԕ(LDR R4,[R1,R3,LSL #2]:STR R4,[R2],#4
ԞSUBS R0,R0,#1
ԨBNE equallp
ԲMOVS PC,R14
Լ]
���
��Ȏ rflag �
��� 201,800,801,1000,1001
��
[OPT Z
��.rlexpand%
�LDR R0,[R9]
�LDR R1,[R0]
�LDR R2,[R9,#8]:LDR R2,[R2]
�LDR R3,[R9,#16]
� LDR R4,[R3]
�*CMP R4,#1:MOVLTS PC,R14
�4LDR R5,[R9,#24]:LDR R5,[R5]
�>.rle
�HSTRB R2,[R1],#1
�RSUB R4,R4,#1
�\
CMP R1,R5
�fTEQNE R4,#0
�pBNE rle
�z.rlexit
ՄSTR R1,[R0]
ՎSTR R4,[R3]
՘MOVS PC,R14
բ]
լ	� 902
ն	� 903
�
[OPT Z
��
.unpack16
��-MOV     r4,#31          ; 5 bits set mask
��+MOV     r5,#512         ; Pixel counter
��.unpack16loop
��>LDRB    r3,[r0],#1      ; Get half a pixel from the sprite
�:LDRB    r2,[r0],#1      ; Get second half of the pixel
�8�R     r2,r3,r2,LSL#8  ; Combine data into one pixel
�)�     r3,r2,#31       ; Get red pixel
�
�$-STRB    r3,[r1,#0]      ; Store in buffer
�.+�     r3,r2,r4,LSL#5  ; Get green pixel
�8MOV     r3,r3,LSR#5
�B
�L-STRB    r3,[r1,#512]    ; Store in buffer
�V*�     r3,r2,r4,LSL#10 ; Get blue pixel
�`MOV     r3,r3,LSR#10
�j
�tSTRB    r3,[r1,#1024]
�~ADD     r1,r1,#1
ֈSUBS    r5,r5,#1
֒BNE     unpack16loop
֜MOVS    r15,r14
֦
ְ.unpack
ֺADD R2,R0,#768
��MOV R4,#&F
��.unpackloop
��LDR R3,[R0],#4
��
MOV R5,#0
��.bitloop
�� R6,R3,R4,LSL R5
�MOV R6,R6,LSR R5
�
ADD R5,R5,#4
�� R7,R3,R4,LSL R5
�MOV R7,R7,LSR R5
�(ADD R5,R5,#4
�2STRB R7,[R1],#1
�<STRB R6,[R1],#1
�FCMP R5,#32
�PBNE bitloop
�Z
CMP R2,R0
�dBNE unpackloop
�nMOVS PC,R14
�x]
ׂ�
׌
ז�planar%<0 �
נC%=7:�flag=2600 C%=15
ת
[OPT Z
״
.plancnv%
׾LDR R0,sxloc
��LDR R1,[R9]:LDR R1,[R1]
��LDR R3,[R9,#8]:LDR R3,[R3]
��LDR R4,[R9,#16]:LDR R4,[R4]
��MOV R9,#C%
��.planelp
�
MOV R7,#0
�
MOV R5,R3
�]
��N%=1�planes%
�"
[OPT Z
�,LDR R6,[R5],R4
�6]
�@�flag=2600 �
�J
[OPT Z
�TMOV R6,R6,LSL #8
�^BIC R6,R6,#&FF000000
�h�R R6,R6,R6,LSR #16
�r]
�|�
؆
[OPT Z
ؐMOV R6,R6,LSR R9
ؚ� R6,R6,#1
ؤ�R R7,R7,R6,LSL #(N%-1)
خ]
ظ�
��
[OPT Z
��STRB R7,[R1],#1
��SUBS R9,R9,#1:MOVMI R9,#C%
��]
���flag=2600 �
��
[OPT Z
�MOVMI R3,R5
�]
��
�
[OPT Z
�&ADDMI R3,R3,#1
�0]
�:�
�D
[OPT Z
�NSUBS R0,R0,#1:BNE planelp
�XMOVS PC,R14
�b]
�l�
�v�
ـ
Ȏ ncol �
ي� 255:size%=1
ٔ� 63:size%=1
ٞ� 15:size%=2
٨� 3:size%=4
ٲ� 1:size%=8:�m$="C" size%=2
ټ�m$="D" size%=4
���m$="T" size%=2
���
��
Ȏ flag �
��*� 501:�info% �"Reading interlaced GIF"
��Tsz%=sx%*sy%:datacache%=�dim(sz%+100):buff%=datacache%:rowbytes%=sx%:rowstogo%=-1
�D�Y%=0�sy%-1�8:X%=buff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
�D�Y%=4�sy%-1�8:X%=buff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
�D�Y%=2�sy%-1�4:X%=buff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
�D�Y%=1�sy%-1�2:X%=buff%+Y%*sx%:� LZWdecode%,table%(0),c%,X%,sx%:�
� �
�*�gamma<>1 �
�4k=1/gamma:�C%=0�255
�>#�r%(C%) r%(C%)=((r%(C%)/F)^k)*F
�H#�g%(C%) g%(C%)=((g%(C%)/F)^k)*F
�R#�b%(C%) b%(C%)=((b%(C%)/F)^k)*F
�\�
�f�
�prmax=F:gmax=F:bmax=F
�z�col=0 �
ڄ�input<9 �
ڎ7�C%=0�255:r%(C%)=r%(C%)*rwt+g%(C%)*gwt+b%(C%)*bwt:�
ژ�
ڢ�input<>422 �
ڬ$rmax=F*rwt:gmax=F*gwt:bmax=F*bwt
ڶE�C%=0�255:r%(C%)=r%(C%)*rwt:g%(C%)=g%(C%)*gwt:b%(C%)=b%(C%)*bwt:�
��
���
���
��,�order% �adjustpalette(1/ydiv%/xdiv%,0)
��
�range% �
��>�info% �"Scanning data to compute parameters for '-range'"
�
�order% �
�Y%=0:� șhour%,Y%*100�sy%
�3�iprow(xp%()):�maxmin%,xp%(1,0),totvals2%:Y%+=1
�"�Y%=sy% �!min<255 �!max+255>=F
�$�
�.%Y%=0:ysamp%=1:� șhour%,Y%*100�y%
�8;�scaledpixelrow(cl%()):�maxmin%,cl%(1,0),totvals%:Y%+=1
�B#�Y%=y% � !min<255 � !max+255>=F
�L�
�VO�!max+255>=F �!min<255 range%=�:range$="No point in '-range' on this image"
�`��range% �adjustpalette(F/(!max-!min),!min/ydiv%/xdiv%):range$="Input image maximum "+�(!max/F*100)+"% minimum "+�(!min/F*100)+"%"
�j�rewind:�info% �range$
�t�
�~�hist% �equal% �
ۈF�equal% �info% �"Scanning data to compute parameters for '-equal'"
ے
�order% �
ۜ$�yr%=0�sy%-1:șhour%,yr%*100�sy%
ۦ1�iprow(xp%()):�histo%,xp%(1,0),vals%(0,0),sx%
۰�
ۺ�
��+ysamp%=1:�yr%=0�y%-1:șhour%,yr%*100�y%
��9�scaledpixelrow(cl%()):�histo%,cl%(1,0),vals%(0,0),x%
���
���
��.�info% �"Done. Now processing the picture"
��
��input<>422 �
�

�C%=0�255
��r%(C%)<0 r%(C%)=0
��g%(C%)<0 g%(C%)=0
�(�b%(C%)<0 b%(C%)=0
�2�r%(C%)>rmax r%(C%)=rmax
�<�g%(C%)>gmax g%(C%)=gmax
�F�b%(C%)>bmax b%(C%)=bmax
�P�
�Z�
�d�hist% �
�nM%=0:ZM%=-1:�C%=0�col
�x5�Z%=0�256:�vals%(Z%,C%)>M% M%=vals%(Z%,C%):ZM%=Z%
܂�:�
܌�ZM%=-1 � okinfo%=0 �=100
ܖ
� col>0 �
ܠ�66:ht=500
ܪ��<>66 �16:ht=400
ܴ�0,6,2000,6
ܾ�
���18:ht=400:�0,6,1024,6
���
��#M=M%/(ht*2-8):�C%=0�col:Ȏ C% �
��
� 0:�1
��
� 1:�2
�
� 2:�4
��
�
� col>0 �
�C�Z%=0�256:�vals%(Z%,C%) X%=Z%*3+C%<<1:�X%,8,X%,vals%(Z%,C%)/M+8
�"�
�,�
�6?�Z%=0�256:�vals%(Z%,C%) X%=Z%<<2:ȓ ȐX%,8,2,vals%(Z%,C%)/M
�@�
�J�
�T�
�^�c% �#c%:c%=0
�h�cc% �#cc%:cc%=0
�r�ccc% �#ccc%:ccc%=0
�|ș"Hourglass_Off"
݆=100
ݐ�
ݚ(oname$="p"+�m+m$:�range% oname$+="r"
ݤ�equal% oname$+="e"
ݮ#�sharpen% oname$+="s"+�sharpen%
ݸ�black% oname$+="b"+�black%
��8�gamma<>1 A%=@%:@%=&1020100:oname$+="g"+�gamma:@%=A%
���bright%=16 oname$+="b"
��)xsp%=x%:ysp%=y%:�rotate% Ȕ xsp%,ysp%
��
Ȏ m �
��K� -1:xwords%=xsp%:sz%=xwords%*ysp%:Y%=ysp%:�getoutput(sz%,0,xwords%,Y%)
��base%=ram%
�C:xwords%=xsp%/size%+3.9999��3:sz%=xwords%*ysp%:X%=xsp%:Y%=ysp%
�
�ncol=1 �
�Ȏ m$ �
�O�"C":!rowinc=xwords%:xwords%=xwords%*4:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*4
�&O�"T":!rowinc=xwords%:xwords%=xwords%*3:sz%=xwords%*ysp%:X%=xsp%*4:Y%=ysp%*3
�0O�"D":!rowinc=xwords%:xwords%=xwords%*2:sz%=xwords%*ysp%:X%=xsp%*2:Y%=ysp%*2
�:�
�D�
�N)A%=Y%:�getoutput(sz%,1024,xwords%,Y%)
�X1ram%!4=0:ram%!8=16:ram%!12=16:ș&2e,&109,ram%
�b0ș&2e,&10f,ram%,oname$,(ncol<63)�1,X%,Y%,spm
�lJbase%=ram%+ram%!8:base%!(5*4)=A%-1:!base%=!base%-Y%*xwords%+A%*xwords%
�v)ram%!12=ram%!12-Y%*xwords%+A%*xwords%
ހ&pal%=base%+11*4:base%+=base%!(8*4)
ފ
Ȏ ncol �
ޔ� 15
ޞȎ m$ �
ި	� "P"
޲5�Z%=0�15:�col(Z%,(palette%!(Z%<<2)>>8)�&F0F0F0):�
޼	� "D"
���Z%=0�7:A%=0:�Z%�1 A%+=&F0
���Z%�2 A%+=&F000
���Z%�4 A%+=&F00000
���col(Z%,A%):�
��	� "C"
��Z%=0�15:A%=0:�Z%�4 A%+=&F0
�.�Z%�3 A%+=(Z%�3)*5<<12:�(Z%�3)=1 A%+=&1000
��Z%�8 A%+=&F00000
��col(Z%,A%):�
� 	� "T"
�*0�Z%=0�15:A%=Z%<<4:�col(Z%,A%�A%<<8�A%<<16):�
�4� ""
�><�Z%=0�15:A%=(Z%�7)/7*15+.2<<4:�col(Z%,A%�A%<<8�A%<<16):�
�H�
�R� 3
�\
�m$="C" �
�f;�col(0,0):�col(1,&F0F000):�col(2,&F000F0):�col(3,&F0F0)
�p�
�z1�Z%=0�3:A%=Z%*5<<4:�col(Z%,A%�A%<<8�A%<<16):�
߄�
ߎ!� 1:�col(0,0):�col(1,&F0F0F0)
ߘ�
ߢ�
߬� �
߶/� � �:� �:�Save:� �,�$+" internal ("+Þ+")"
�ș"Hourglass_LEDs",3
��$ysamp%=1:nl%()=0:step%=4*(col+1)
��Daddr%=base%*size%:rowstep%=xwords%*size%:colstep%=1:dist%=xsp%-1
���rotate% �
��Ȕ colstep%,rowstep%
��Gaddr%+=(ysp%-1)*colstep%:colstep%=-colstep%:dist%=(ysp%-1)*colstep%
��
�Loutlim%=(base%+xwords%*Y%)*size%-1:oddcolstep%=-colstep%:oddstep%=-step%
�+�order% �adjustpalette(1/ydiv%/xdiv%,0)
�9�sy%=y% � sx%=x% � range%=� � sharpen%=� � equal%=� �
�$�dither% �
�.@�yr%=0 � y%-1:șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�8J�iprow(cl%()):cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
�B�yr%�1 �
�L/�fs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
�V�
�`AA%+=dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
�j�
�t�
�~�
�GI%=step%:�yr%=0�y%-1:șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�S�iprow(cl%()):B%=x%:A%=addr%:addr%+=rowstep%:�fs%,colstep%,cl%(1,0),I%,A%,I%,B%
��
��
��
�
�equal% �
��9�rewind:Havg%=Ǝ(vals%())/256/(col+1):� new%(256,col)
��>�B%=0�col:R%=0:Hint%=0:�Z%=0�256:L%=R%:Hint%+=vals%(Z%,B%)
��&ȕHint%>Havg%:Hint%-=Havg%:R%+=1:�
��new%(Z%,B%)=(L%+R%)/2*F/256
���:�
��
��sharpen% �
�

�order% �
�5yread%=sy%-1:�iprow(rm1%()):�equal% �fit2(rm1%())
�A�B%=0�col:rm1%(0,B%)=rm1%(1,B%):rm1%(sx%+1,B%)=rm1%(sx%,B%):�
�(�
�2<yread%=y%-1:�scaledpixelrow(rm1%()):�equal% �fit(rm1%())
�<?�B%=0�col:rm1%(0,B%)=rm1%(1,B%):rm1%(x%+1,B%)=rm1%(x%,B%):�
�F�
�Prm2%()=rm1%()
�Z�
�d
�order% �
�n�yr%=0 � y%-1
�x2șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
�
�sy%=y% �
��sharppixelrow(cl%())
��
�:ysamp%-=1:�ysamp%=0 �sharppixelrow(xl%()):ysamp%=ymul%
��ydiv%=1 �
�cl%()=xl%()
��
���ysamp%>=ydiv% �
��#ysamp%-=ydiv%:cl%()=xl%()*ydiv%
���
��/cl%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
���
�0�ysamp%=0 �sharppixelrow(xl%()):ysamp%=ymul%
��ysamp%>Y% �
�6ysamp%-=Y%:xl2%()=xl%()*Y%:cl%()=cl%()+xl2%():Y%=0
��
�">Y%-=ysamp%:xl2%()=xl%()*ysamp%:cl%()=cl%()+xl2%():ysamp%=0
�,�
�6
� Y%=0
�@�
�J
ysamp%+=1
�T�
�^�
�h<cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
�r�yr%�1 �
�|/�fs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
��
�AA%+=dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
��
��
��
��yr%=0 � y%-1
��2șhour%,yr%*100�y%:�addr%>outlim% �flushoutput
���sharpen% �
��@�yread% yread%-=1:�scaledpixelrow(rm%()):�equal% �fit(rm%())
��;�B%=0�col:rm%(0,B%)=rm%(1,B%):rm%(x%+1,B%)=rm%(x%,B%):�
��;� sharp%,cl%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals%
��!Ȕ rm2%(),rm1%():rm1%()=rm%()
��
�.�scaledpixelrow(cl%()):�equal% �fit(cl%())
��
�<cl%()=cl%()+nl%():nl%()=0:B%=x%:A%=addr%:addr%+=rowstep%
�&�yr%�1 �
�0/�fs%,colstep%,cl%(1,0),nl%(1,0),A%,step%,B%
�:�
�DAA%+=dist%:�fs%,oddcolstep%,cl%(x%,0),nl%(x%,0),A%,oddstep%,B%
�N�
�X�
�b�
�l�
�v	�Save
�=0
�� �getoutput(A%,E%,B%,� C%)
��A%>max% � rotate%=� �
�1C%=max%�B%+1:A%=xwords%*C%+E%:first%=�:o%=�f$
��
�
A%+=E%
��
��3�spritearea%<0 �ram%=�dim(A%) �ram%=spritearea%
��!ram%=A%
���
��� �flushoutput
���spritearea%<0 �oksave% �
�$�hflip% ș&2e,256+47,ram%,oname$
�'A%=base%:�first% A%=ram%+4:first%=�
�ș12,2,o%,A%,addr%�size%-A%
��
� addr%=base%*size%
�*�
�4� �Save
�>�c% �#c%:c%=0
�H�cc% �#cc%:cc%=0
�R�ccc% �#ccc%:ccc%=0
�\
Ȏ m �
�f"� -1:�spritearea%<0 �oksave% �
�p;�o% �flushoutput �ș"OS_File",10,f$,&004,,ram%,ram%+sz%
�z�
�� -2:o%=�f$:�#o%,pnm$
�$�vflip% ș&2e,256+33,ram%,oname$
�$�hflip% ș&2e,256+47,ram%,oname$
�
Ȏ pnm$ �
�
� "P1"
�,�#o%,"# "+f$+".pbm (options "+oname$+")"
��#o%,�xsp%+" "+�ysp%
��$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
��=�X%=0�xsp%-1:�B%?(X%>>3)�(1<<(X%�7)) �#o%,"1"; ��#o%,"0";
���
���#o%,""
���
�
� "P4"
�;�#o%,"# "+f$+".pbm (options "+oname$+") binary encoded"
��#o%,�xsp%+" "+�ysp%
�f�X%=0�255:code%?X%=X%<<7 � X%<<5�&40 � X%<<3�&20 � X%<<1�&10 � X%>>1�8 � X%>>3�4 �X%>>5�2 �X%>>7:�
�$$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
�.,�X%=0�xsp%-1�8:�#o%,code%?(B%?(X%>>3)):�
�8�
�B
� "P2"
�L,�#o%,"# "+f$+".pgm (options "+oname$+")"
�V�#o%,�xsp%+" "+�ysp%
�`
�#o%,"15"
�j$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
�t7�X%=0�xsp%-1:C%=B%?(X%>>1):�X%�1 C%=C%>>4 �C%=C%�15
�~�#o%," "+�C%;
��
��#o%,""
��
�
� "P5"
�;�#o%,"# "+f$+".pgm (options "+oname$+") binary encoded"
��#o%,�xsp%+" "+�ysp%
��
�#o%,"15"
��$�Y%=0�ysp%-1:B%=base%+Y%*xwords%
��7�X%=0�xsp%-1:C%=B%?(X%>>1):�X%�1 C%=C%>>4 �C%=C%�15
���#o%,C%
���
��
��
�

�#o%:o%=0
�
�$�vflip% ș&2e,256+33,ram%,oname$
�($�hflip% ș&2e,256+47,ram%,oname$
�2�ncol=1�m$="T" �
�<�X%=(xsp%*4-1)�8*8+6�6�-8
�Fș&2e,&12e,ram%,oname$,X%
�Pș&2e,&12e,ram%,oname$,X%
�Z�
�d�
�n�spritearea%<0 �oksave% �
�x(�o% �flushoutput �ș&2e,&10c,ram%,f$
��
��
�'�o% �#o%:o%=0:�"settype "+f$+" ff9"
�ș"Hourglass_Off"
��
���defpal
�
�C%=0�255
��#r%(C%)=(C%�7 � (C%�16)>>1)/15*F
��$g%(C%)=(C%�3 � (C%�&60)>>3)/15*F
��0b%(C%)=(C%�3 � (C%�8)>>1 � (C%�128)>>4)/15*F
���
���
�
��defpal2
�r%(0)=F:g%(0)=F:b%(0)=F
��
�
��defpal4
�"/r%()=15,10,5,0:�C%=0�3:r%(C%)=r%(C%)/15*F:�
�,g%()=r%():b%()=r%()
�6�
�@��defpal16
�J1r%()=15,13,11,9,7,5,3,0,0,14, 0,13,14,5,15, 0
�T1g%()=15,13,11,9,7,5,3,0,4,14,12, 0,14,8,11,10
�^1b%()=15,13,11,9,7,5,3,0,9, 0, 0, 0,11,0, 0,15
�hG�C%=0�15:r%(C%)=r%(C%)/15*F:g%(C%)=g%(C%)/15*F:b%(C%)=b%(C%)/15*F:�
�r�
�|��ipal63
�,�#c%=&38:� rpal%(15),gpal%(15),bpal%(15)
��C%=0�15:D%=�#c%
�rpal%(C%)=�#c%>>4 � 7
�gpal%(C%)=�#c%>>4 � 3
�bpal%(C%)=�#c%>>4 � 7
�D%=�W:�
��
�C%=0�255
��)r%(C%)=(rpal%(C%�15)�(C%�16)>>1)/15*F
��*g%(C%)=(gpal%(C%�15)�(C%�&60)>>3)/15*F
��*b%(C%)=(bpal%(C%�15)�(C%�128)>>4)/15*F
���
���
���ipal(D%)
��#c%=&38
��C%=0�D%-1:D%=�#c%
�r%(C%)=(�#c%>>4)/15*F
�&g%(C%)=(�#c%>>4)/15*F
�0b%(C%)=(�#c%>>4)/15*F
�:D%=�W:�
�D�
�N� �nopal
�X3�C%=0�255:r%(C%)=C%/255*F:�:g%()=r%():b%()=r%()
�b�
�l� �col(A%,B%)
�v6B%=B%<<8�B%<<4�&10:pal%!(A%*8)=B%:pal%!(A%*8+4)=B%
��
�� �bits(A%)
�5�A%=1 �="1 bit per pixel" �=�A%+" bits per pixel"
�� �fits
�
�Z%,s$
��Z%=1�80:s$+=��#c%:�
�=s$
��
� �uc(a$)
��
�Z%,z$,b$
��
�Z%=1��a$
��z$=�a$,Z%,1)
��!�z$>="a"�z$<="z" z$=�(�z$-32)
�b$+=z$:�
�=b$
�� �dim(A%)
�� B%
� �flex% �
�*1B%=nextlocation%:A%=A%+3��3:nextlocation%+=A%
�4*ș"Wimp_SlotSize",-1,-1 � currentslot%
�>'�currentslot%+&8000<nextlocation% �
�H<ș "Wimp_SlotSize",nextlocation%-&8000,-1 � currentslot%
�RU�currentslot%+&8000<nextlocation% � 42,"Can't get enough memory to process image"
�\�
�f�
�p�workspace%<0 �
�z� B% A%
��
�WB%=workspace%:workspace%+=A%+3��3:�workspace%>worklimit% �42,"Not enough workspace"
��
��
�=B%
�� �W=�W1(c%)
�2� �W1(c%)=�#c% � �#c%<<8 � �#c%<<16 � �#c%<<24
��� �HW=�#c% � �#c%<<8
��� �beHW=�#c%<<8 � �#c%
��/� �beW=�#c%<<24 � �#c%<<16 � �#c%<<8 � �#c%
��� �tiff(T%)
��Ȏ T% �
�
� 1:=�#c%
�*� 2:�s$,t$:�s$+=t$:t$=��#c%:�t$=�0:=s$
�4� 3:�bigendian �=�#c%<<8 � �#c% �=�#c% � �#c%<<8
�#� 4:�bigendian �=�beW �=�W1(c%)
�$�
�.� 42,"Silly TIFF tag:"+�T%
�8� �nextstrip
�Browstogo%=striprows%
�L"stripptr+=1:�#c%=st%(stripptr)
�V�compression=5 �
�`F!firstcode=0:!oldcode=0:!codesize=setcodes%+1:!stack=stk%:!sp=stk%
�jH!maxcode=clearcode%+2:!maxcodesize=2*clearcode%:!curbit=0:!lastbit=0
�t�
�~�
�(� �watford(wtsx%,� rep%,� wt%,X%,c%)
� �rlexpand%,wtsx%,rep%,wt%,X%
�� C%=�#c%:Ȏ C%>>6 �
�� 0:?X%=C%:X%+=1:wt%=C%
�6� 1:wt%-=1:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
�/� 2:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
��6� 3:wt%+=1:rep%=C%�63:�rlexpand%,wtsx%,rep%,wt%,X%
���
��
�X%=wtsx%
���
��� �size
�
�scale% �
�3�sx%<=320 �sy%<=256 xmul%=xmul%*2:ymul%=ymul%*2
�
�sy%<=sx%/2 ymul%=ymul%*2
��
��
�(� �reduce(� A%,� B%)
�2� C%,D%:C%=A%:D%=B%
�<� �C%<D% Ȕ C%,D%
�FC%=C%�D%
�P	�C%=0
�ZA%=A%�D%:B%=B%�D%
�d�
�n� �readpixelrow(z%())
�x�rows% �
�rows%-=1:�sx%=x% �
��iprow(z%())
��
�;�iprow(xp%()):�xsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
��
��
�
z%()=0
���
���
��� �sharppixelrow(z%())
���rows% �
��rows%-=1:�sx%=x% �
�<�sharpen% �sharp(z%()) ��iprow(z%()):�equal% �fit2(z%())
��
�?�sharpen% �sharp(xp%()) ��iprow(xp%()):�equal% �fit2(xp%())
�-�xsample%,xmul%,xdiv%,z%(1,0),xp%(1,0),x%
�"�
�,�
�6
z%()=0
�@�
�J�
�T� �sharp(z%())
�^8yread%-=1:�yread% �iprow(rm%()):�equal% �fit2(rm%())
�h=�B%=0�col:rm%(0,B%)=rm%(1,B%):rm%(sx%+1,B%)=rm%(sx%,B%):�
�r;� sharp%,z%(1,0),rm%(1,0),rm1%(1,0),rm2%(1,0),totvals2%
�|!Ȕ rm2%(),rm1%():rm1%()=rm%()
��
�� �scaledpixelrow(z%())
�
�sy%=y% �
��readpixelrow(z%())
��
�9ysamp%-=1:�ysamp%=0 �readpixelrow(xl%()):ysamp%=ymul%
���ydiv%=1 �
��z%()=xl%()
���
���ysamp%>=ydiv% �
��"ysamp%-=ydiv%:z%()=xl%()*ydiv%
���
�2�Y%:z%()=xl%()*ysamp%:Y%=ydiv%-ysamp%:ysamp%=0
��
�/�ysamp%=0 �readpixelrow(xl%()):ysamp%=ymul%
��ysamp%>Y% �
�&4ysamp%-=Y%:xl2%()=xl%()*Y%:z%()=z%()+xl2%():Y%=0
�0�
�:<Y%-=ysamp%:xl2%()=xl%()*ysamp%:z%()=z%()+xl2%():ysamp%=0
�D�
�N
� Y%=0
�X�
�b
ysamp%+=1
�l�
�v�
��
�� �fit(z%())
�$�histequal%,z%(1,0),new%(0,0),x%
��
�� �fit2(z%())
�%�histequal%,z%(1,0),new%(0,0),sx%
��
��� �adjustpalette(mul,sub)
���mul=1 � sub=0 �
��
�C%=0�255
��Qr%(C%)=(r%(C%)-sub)*mul+1:g%(C%)=(g%(C%)-sub)*mul+1:b%(C%)=(b%(C%)-sub)*mul+1
���
�� ham �
�3 �C%=0�15*4�4:ltable!C%=(ltable!C%-sub)*mul+1:�
��
�� input=422 �
� 
�C%=0�255
�*Crpal%(C%)=(rpal%(C%)-sub)*mul+1:gpal%(C%)=(gpal%(C%)-sub)*mul+1
�4Ebpal%(C%)=(bpal%(C%)-sub)*mul+1:table%(C%)=(table%(C%)-sub)*mul+1
�>�
�H�
�R�
�\
�f
� �refill
�p�striprows%>0 �nextstrip
�zEș12,4,c%,datacache%,cache%:rowstogo%=cacherows%:buff%=datacache%
�:�input=24 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
��
�
�� �iprow(z%())
�Ȏ rflag �
�c� 0:�mappix%,z%(1,0),r%(0),g%(0),b%(0),buff%:buff%+=rowbytes%:rowstogo%-=1:�rowstogo%=0 �refill
��
��
��B� 901:ș12,4,c%,rb%,sx%:ș12,4,cc%,gb%,sx%:ș12,4,ccc%,bb%,sx%
��4�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:�
��	� 902
�� � slave% �
�  ș 12,4,c%,tspace%,768
�  A%=tspace%
� �
�  A%=V9Area%+offset%
�$ �
�. B%=rb%
�8
 � unpack
�B offset%+=768
�L- � SYS12,4,c%,rats%,rowbytes%:CALLunpack%
�V4�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:�
�`
�j	� 903
�t � slave% �
�~  ș 12,4,c%,tspace%,1024
�  A%=tspace%
� �
�  A%=V9Area%+offset%
� �
� B%=rb%
� � unpack16
�� offset%+=1024
��- � SYS12,4,c%,rats%,rowbytes%:CALLunpack%
��4�mappix%,z%(1,0),r%(0),g%(0),b%(0),rb%,gb%,bb%:�
��
���
��
�
�

� �rewind
�rows%=sy%:Ȏ flag �
�� 0:�#c%=st%
�(
�2� 900:�#c%=0
�<!� 901:�#c%=0:�#cc%=0:�#ccc%=0
�F	� 902
�P � slave% �
�Z  �#c%=st%
�d �
�n  offset%=20
�x �
�	� 903
� � slave% �
�  �#c%=st%
� �
�  offset%=20
� �
��
��
��
�cache% �
��F�cache%<filesize% ș12,4,c%,datacache%,cache%:rowstogo%=cacherows%
��buff%=datacache%
��:�input=24 rb%=buff%+rbo%:gb%=buff%+gbo%:bb%=buff%+bbo%
��
��
�
�� �change_LCA(new%)
�"&� mono$=">" � ș "WVCGrab_LCA",3:�
�,+� board_is_16_bit% � allow_dithering% �
�6 ș "WVCGrab_LCA",new%
�@ � set_8bit
�J � dithered%=1 �
�T  �iconset(4,4,1<<21,1<<21)
�^ �
�h  �iconset(4,4,1<<21,0)
�r �
�|�
��
�
�� �find_slot_for_V9
�� slot_b% 16
�V9_slot%=-1
�� s%=0 � 3
�� !slot_b%=0
�� slot_b%!4=0
��) ș "XPodule_ReadHeader",,,slot_b%,s%
��& manuf%=slot_b%?5 � (slot_b%?6<<8)
��% prod%=slot_b%?3 � (slot_b%?4<<8)
��( � manuf%=9 � prod%=82 � V9_slot%=s%
��
�
=V9_slot%
�
�� �get_board_version
�&slot%=�find_slot_for_V9
�0+� slot%=-1 � 42,"Hawk V9 not present":�
�:r0=0
�Dmodstat%=-1
�N�
�X5ș "Podule_EnumerateChunks",r0,,,slot% � r0,r1,r2
�b� r2=%11110011 �
�l modstat%=r0-1
�v
 size%=r1
��
�� modstat%<>-1 � r0=0
�
�� buff% size%
�/ș "Podule_ReadChunk",modstat%,,buff%,slot%
�	m$=""
�� l%=0 � size%-1
�� m$+=�(buff%?l%)
���
��
��Ȏ �m$,1) �
��
 � "S"
�   board_is_16_bit%=�
�   allow_dithering%=�
�   allow_mono%=�
�
 � "D"
�   allow_dithering%=�
�*  board_is_16_bit%=�
�4  allow_mono%=�
�> 
�H  allow_dithering%=�
�R  board_is_16_bit%=�
�\  allow_mono%=�
�f�
�p�
�
00000000  0d 00 0a 11 f4 20 3e 20  21 52 75 6e 49 6d 61 67  |..... > !RunImag|
00000010  65 0d 00 14 0c 64 65 62  75 67 25 3d a3 0d 00 1e  |e....debug%=....|
00000020  16 f2 67 65 74 5f 62 6f  61 72 64 5f 76 65 72 73  |..get_board_vers|
00000030  69 6f 6e 0d 00 28 17 ee  20 85 20 ee 20 85 20 87  |ion..(.. . . . .|
00000040  3a f2 65 72 72 6f 72 28  30 29 0d 00 32 2b 76 65  |:.error(0)..2+ve|
00000050  72 73 69 6f 6e 24 3d 22  56 65 72 73 69 6f 6e 20  |rsion$="Version |
00000060  32 2e 30 30 20 28 31 33  74 68 20 4f 63 74 20 31  |2.00 (13th Oct 1|
00000070  39 39 32 29 22 0d 00 3c  09 f2 69 6e 69 74 0d 00  |992)"..<..init..|
00000080  46 12 ee 20 85 20 f2 65  72 72 6f 72 28 2d 31 29  |F.. . .error(-1)|
00000090  0d 00 50 05 f5 0d 00 5a  21 f2 77 69 6d 70 73 65  |..P....Z!.wimpse|
000000a0  72 76 69 63 65 28 ba 28  70 6f 6c 6c 63 6f 64 65  |rvice(.(pollcode|
000000b0  29 2c 70 62 25 29 0d 00  64 07 fd 20 a3 0d 00 6e  |),pb%)..d.. ...n|
000000c0  05 e0 0d 00 78 0b dd 20  f2 69 6e 69 74 0d 00 82  |....x.. .init...|
000000d0  0c f2 73 65 74 76 61 72  73 0d 00 8c 25 74 61 73  |..setvars...%tas|
000000e0  6b 68 61 6e 64 6c 65 25  3d a4 74 61 73 6b 69 6e  |khandle%=.taskin|
000000f0  69 74 28 22 46 61 73 74  47 72 61 62 22 29 0d 00  |it("FastGrab")..|
00000100  96 1a c8 99 20 22 57 56  43 47 72 61 62 5f 52 65  |.... "WVCGrab_Re|
00000110  66 72 65 73 68 22 2c 30  0d 00 a0 11 f2 73 65 74  |fresh",0.....set|
00000120  75 70 77 69 6e 64 6f 77  73 0d 00 aa 0e f2 66 75  |upwindows.....fu|
00000130  64 67 65 69 6e 69 74 0d  00 b4 13 e7 20 ac 20 64  |dgeinit..... . d|
00000140  65 62 75 67 25 20 ef 20  32 31 0d 00 be 0d f2 61  |ebug% . 21.....a|
00000150  73 73 65 6d 62 6c 65 0d  00 c8 07 ef 20 36 0d 00  |ssemble..... 6..|
00000160  d2 24 41 25 3d 6c 69 76  65 61 72 65 61 25 2b 36  |.$A%=livearea%+6|
00000170  30 3a 42 25 3d 26 32 30  31 30 30 3a d6 62 6c 61  |0:B%=&20100:.bla|
00000180  6e 6b 0d 00 dc 0f f2 67  65 74 63 68 6f 69 63 65  |nk.....getchoice|
00000190  73 0d 00 e6 11 f2 69 6e  73 74 61 6c 6c 6f 6e 62  |s.....installonb|
000001a0  61 72 0d 00 f0 10 f2 6d  6f 64 65 63 68 61 6e 67  |ar.....modechang|
000001b0  65 64 0d 00 fa 0c f2 63  77 69 6e 28 33 29 0d 01  |ed.....cwin(3)..|
000001c0  04 0c f2 63 77 69 6e 28  34 29 0d 01 0e 40 21 72  |...cwin(4)...@!r|
000001d0  64 62 3d 77 25 28 33 2c  30 29 3a 21 75 64 62 3d  |db=w%(3,0):!udb=|
000001e0  77 25 28 33 2c 30 29 3a  21 6c 69 76 65 77 62 3d  |w%(3,0):!livewb=|
000001f0  77 25 28 33 2c 30 29 3a  6c 69 76 65 77 62 21 34  |w%(3,0):livewb!4|
00000200  3d 6c 69 76 65 61 72 65  61 25 0d 01 18 30 21 73  |=livearea%...0!s|
00000210  70 72 69 74 65 61 72 65  61 3d 6c 69 76 65 61 72  |pritearea=livear|
00000220  65 61 25 3a 21 73 70 72  69 74 65 61 64 3d 6c 69  |ea%:!spritead=li|
00000230  76 65 61 72 65 61 25 2b  31 36 0d 01 22 1c 21 64  |vearea%+16..".!d|
00000240  72 61 67 67 69 6e 67 25  3d 30 3a 21 70 6f 6c 6c  |ragging%=0:!poll|
00000250  61 64 3d 70 62 25 0d 01  2c 14 f4 20 50 52 4f 43  |ad=pb%..,.. PROC|
00000260  61 64 6a 75 73 74 6c 69  76 65 0d 01 36 0d f2 63  |adjustlive..6..c|
00000270  61 6c 63 6c 69 76 65 0d  01 40 14 f2 73 68 75 74  |alclive..@..shut|
00000280  6c 69 76 65 64 69 73 70  6c 61 79 0d 01 4a 2c c8  |livedisplay..J,.|
00000290  99 20 22 57 69 6d 70 5f  53 6c 6f 74 53 69 7a 65  |. "Wimp_SlotSize|
000002a0  22 2c 2d 31 2c 2d 31 20  b8 20 6f 72 69 67 69 6e  |",-1,-1 . origin|
000002b0  61 6c 73 6c 6f 74 25 0d  01 54 05 e1 0d 01 5e 04  |alslot%..T....^.|
000002c0  0d 01 68 1d dd 20 f2 72  6f 75 6e 64 28 f8 20 76  |..h.. .round(. v|
000002d0  61 6c 75 65 25 2c 72 6f  75 6e 64 25 29 0d 01 72  |alue%,round%)..r|
000002e0  1b e7 20 28 76 61 6c 75  65 25 20 83 20 72 6f 75  |.. (value% . rou|
000002f0  6e 64 25 29 3d 30 20 e1  0d 01 7c 2c 76 61 6c 75  |nd%)=0 ...|,valu|
00000300  65 25 3d 28 28 76 61 6c  75 65 25 2b 72 6f 75 6e  |e%=((value%+roun|
00000310  64 25 29 20 81 20 72 6f  75 6e 64 25 29 2a 72 6f  |d%) . round%)*ro|
00000320  75 6e 64 25 0d 01 86 05  e1 0d 01 90 04 0d 01 9a  |und%............|
00000330  10 dd 20 f2 66 75 64 67  65 69 6e 69 74 0d 01 a4  |.. .fudgeinit...|
00000340  13 e7 20 ac 20 64 65 62  75 67 25 20 ef 20 32 31  |.. . debug% . 21|
00000350  0d 01 ae 0f f2 64 6f 6c  69 76 65 63 6f 64 65 0d  |.....dolivecode.|
00000360  01 b8 0f f2 64 6f 67 72  61 62 63 6f 64 65 0d 01  |....dograbcode..|
00000370  c2 07 ef 20 36 0d 01 cc  13 6c 69 76 65 6e 61 6d  |... 6....livenam|
00000380  65 24 3d 22 70 69 63 22  0d 01 d6 10 64 72 61 67  |e$="pic"....drag|
00000390  74 79 70 65 25 3d 2d 31  0d 01 e0 13 6e 65 78 74  |type%=-1....next|
000003a0  6c 6f 63 61 74 69 6f 6e  25 3d 93 0d 01 ea 16 de  |location%=......|
000003b0  20 6c 69 76 65 61 72 65  61 25 20 26 32 30 38 30  | livearea% &2080|
000003c0  30 0d 01 f4 15 21 6c 69  76 65 61 72 65 61 25 3d  |0....!livearea%=|
000003d0  26 32 30 37 30 30 0d 01  fe 11 6c 69 76 65 61 72  |&20700....livear|
000003e0  65 61 25 21 34 3d 31 0d  02 08 12 6c 69 76 65 61  |ea%!4=1....livea|
000003f0  72 65 61 25 21 38 3d 31  36 0d 02 12 1d 24 28 6c  |rea%!8=16....$(l|
00000400  69 76 65 61 72 65 61 25  2b 32 30 29 3d 22 67 72  |ivearea%+20)="gr|
00000410  61 62 62 65 64 22 0d 02  1c 14 6c 69 76 65 61 72  |abbed"....livear|
00000420  65 61 25 21 33 32 3d 26  33 46 0d 02 26 14 6c 69  |ea%!32=&3F..&.li|
00000430  76 65 61 72 65 61 25 21  33 36 3d 26 37 46 0d 02  |vearea%!36=&7F..|
00000440  30 14 6c 69 76 65 61 72  65 61 25 21 34 30 3d 26  |0.livearea%!40=&|
00000450  30 30 0d 02 3a 14 6c 69  76 65 61 72 65 61 25 21  |00..:.livearea%!|
00000460  34 34 3d 26 31 46 0d 02  44 14 6c 69 76 65 61 72  |44=&1F..D.livear|
00000470  65 61 25 21 34 38 3d 26  32 43 0d 02 4e 14 6c 69  |ea%!48=&2C..N.li|
00000480  76 65 61 72 65 61 25 21  35 32 3d 26 32 43 0d 02  |vearea%!52=&2C..|
00000490  58 13 6c 69 76 65 61 72  65 61 25 21 35 36 3d 31  |X.livearea%!56=1|
000004a0  35 0d 02 62 1d 21 6c 69  76 65 64 75 6d 70 61 64  |5..b.!livedumpad|
000004b0  25 3d 6c 69 76 65 61 72  65 61 25 2b 36 30 0d 02  |%=livearea%+60..|
000004c0  6c 0e d6 20 73 65 74 5f  38 62 69 74 0d 02 76 05  |l.. set_8bit..v.|
000004d0  e1 0d 02 80 04 0d 02 8a  41 dd 20 f2 61 64 64 5f  |........A. .add_|
000004e0  70 61 6c 65 74 74 65 5f  74 6f 5f 73 70 72 69 74  |palette_to_sprit|
000004f0  65 28 73 70 72 69 74 65  5f 61 72 65 61 25 2c 73  |e(sprite_area%,s|
00000500  70 72 69 74 65 5f 61 64  25 2c 73 70 72 69 74 65  |prite_ad%,sprite|
00000510  5f 70 61 6c 25 29 0d 02  94 0d ea 20 70 61 6c 25  |_pal%)..... pal%|
00000520  2c 7a 25 0d 02 9e 16 70  61 6c 25 3d 73 70 72 69  |,z%....pal%=spri|
00000530  74 65 5f 61 64 25 2b 34  34 0d 02 a8 17 73 70 72  |te_ad%+44....spr|
00000540  69 74 65 5f 61 64 25 21  33 32 2b 3d 32 30 34 38  |ite_ad%!32+=2048|
00000550  0d 02 b2 17 73 70 72 69  74 65 5f 61 64 25 21 33  |....sprite_ad%!3|
00000560  36 2b 3d 32 30 34 38 0d  02 bc 17 73 70 72 69 74  |6+=2048....sprit|
00000570  65 5f 61 64 25 21 30 30  2b 3d 32 30 34 38 0d 02  |e_ad%!00+=2048..|
00000580  c6 19 73 70 72 69 74 65  5f 61 72 65 61 25 21 31  |..sprite_area%!1|
00000590  32 2b 3d 32 30 34 38 0d  02 d0 29 f4 20 42 75 6e  |2+=2048...). Bun|
000005a0  67 20 61 20 70 61 6c 65  74 74 65 20 69 6e 74 6f  |g a palette into|
000005b0  20 74 68 65 20 73 70 72  69 74 65 20 61 72 65 61  | the sprite area|
000005c0  0d 02 da 0d e3 7a 25 3d  30 b8 32 35 35 0d 02 e4  |.....z%=0.255...|
000005d0  25 20 42 25 3d 28 7a 25  3c 3c 38 29 20 84 20 28  |% B%=(z%<<8) . (|
000005e0  7a 25 3c 3c 31 36 29 20  84 20 28 7a 25 3c 3c 32  |z%<<16) . (z%<<2|
000005f0  34 29 0d 02 ee 24 20 70  61 6c 25 21 28 7a 25 2a  |4)...$ pal%!(z%*|
00000600  38 29 3d 42 25 3a 70 61  6c 25 21 28 7a 25 2a 38  |8)=B%:pal%!(z%*8|
00000610  2b 34 29 3d 42 25 0d 02  f8 05 ed 0d 03 02 3c f2  |+4)=B%........<.|
00000620  70 61 6c 65 74 74 65 5f  66 6f 72 5f 73 70 72 69  |palette_for_spri|
00000630  74 65 28 73 70 72 69 74  65 5f 61 72 65 61 25 2c  |te(sprite_area%,|
00000640  73 70 72 69 74 65 5f 61  64 25 2c 73 70 72 69 74  |sprite_ad%,sprit|
00000650  65 5f 70 61 6c 25 29 0d  03 0c 05 e1 0d 03 16 04  |e_pal%).........|
00000660  0d 03 20 10 dd 20 f2 6c  69 76 65 5f 67 72 65 79  |.. .. .live_grey|
00000670  0d 03 2a 22 21 6c 69 76  65 64 75 6d 70 61 64 25  |..*"!livedumpad%|
00000680  3d 6c 69 76 65 61 72 65  61 25 2b 36 30 2b 32 30  |=livearea%+60+20|
00000690  34 38 0d 03 34 18 6f 6c  64 5f 73 61 74 25 3d 73  |48..4.old_sat%=s|
000006a0  61 74 75 72 61 74 69 6f  6e 25 0d 03 3e 11 73 61  |aturation%..>.sa|
000006b0  74 75 72 61 74 69 6f 6e  25 3d 30 0d 03 48 0f 24  |turation%=0..H.$|
000006c0  73 61 74 61 64 25 3d 22  30 22 0d 03 52 0f f2 73  |satad%="0"..R..s|
000006d0  61 74 75 72 61 74 69 6f  6e 0d 03 5c 3b f2 61 64  |aturation..\;.ad|
000006e0  64 5f 70 61 6c 65 74 74  65 5f 74 6f 5f 73 70 72  |d_palette_to_spr|
000006f0  69 74 65 28 6c 69 76 65  61 72 65 61 25 2c 6c 69  |ite(livearea%,li|
00000700  76 65 61 72 65 61 25 2b  31 36 2c 6c 69 76 65 70  |vearea%+16,livep|
00000710  61 6c 25 29 0d 03 66 16  f2 6f 70 74 69 6d 69 73  |al%)..f..optimis|
00000720  65 5f 6c 69 76 65 70 6c  6f 74 0d 03 70 05 e1 0d  |e_liveplot..p...|
00000730  03 7a 04 0d 03 84 12 dd  20 f2 6c 69 76 65 5f 63  |.z...... .live_c|
00000740  6f 6c 6f 75 72 0d 03 8e  18 73 61 74 75 72 61 74  |olour....saturat|
00000750  69 6f 6e 25 3d 6f 6c 64  5f 73 61 74 25 0d 03 98  |ion%=old_sat%...|
00000760  1a 24 73 61 74 61 64 25  3d c3 28 73 61 74 75 72  |.$satad%=.(satur|
00000770  61 74 69 6f 6e 25 29 0d  03 a2 0f f2 73 61 74 75  |ation%).....satu|
00000780  72 61 74 69 6f 6e 0d 03  ac 1d 21 6c 69 76 65 64  |ration....!lived|
00000790  75 6d 70 61 64 25 3d 6c  69 76 65 61 72 65 61 25  |umpad%=livearea%|
000007a0  2b 36 30 0d 03 b6 16 73  70 74 72 25 3d 6c 69 76  |+60....sptr%=liv|
000007b0  65 61 72 65 61 25 2b 31  36 0d 03 c0 12 73 70 74  |earea%+16....spt|
000007c0  72 25 21 33 32 2d 3d 32  30 34 38 0d 03 ca 12 73  |r%!32-=2048....s|
000007d0  70 74 72 25 21 33 36 2d  3d 32 30 34 38 0d 03 d4  |ptr%!36-=2048...|
000007e0  12 73 70 74 72 25 21 30  30 2d 3d 32 30 34 38 0d  |.sptr%!00-=2048.|
000007f0  03 de 16 6c 69 76 65 61  72 65 61 25 21 31 32 2d  |...livearea%!12-|
00000800  3d 32 30 34 38 0d 03 e8  38 f2 70 61 6c 65 74 74  |=2048...8.palett|
00000810  65 5f 66 6f 72 5f 73 70  72 69 74 65 28 6c 69 76  |e_for_sprite(liv|
00000820  65 61 72 65 61 25 2c 6c  69 76 65 61 72 65 61 25  |earea%,livearea%|
00000830  2b 31 36 2c 6c 69 76 65  70 61 6c 25 29 0d 03 f2  |+16,livepal%)...|
00000840  16 f2 6f 70 74 69 6d 69  73 65 5f 6c 69 76 65 70  |..optimise_livep|
00000850  6c 6f 74 0d 03 fc 05 e1  0d 04 06 04 0d 04 10 11  |lot.............|
00000860  dd 20 f2 64 6f 67 72 61  62 63 6f 64 65 0d 04 1a  |. .dograbcode...|
00000870  14 de 20 47 41 50 20 26  32 30 30 30 2c 4c 25 20  |.. GAP &2000,L% |
00000880  30 0d 04 24 16 e3 20 50  61 73 73 25 3d 38 20 b8  |0..$.. Pass%=8 .|
00000890  20 31 30 20 88 20 32 0d  04 2e 0a 50 25 3d 47 41  | 10 . 2....P%=GA|
000008a0  50 0d 04 38 05 5b 0d 04  42 0d 4f 50 54 20 50 61  |P..8.[..B.OPT Pa|
000008b0  73 73 25 0d 04 4c 0e 2e  56 52 41 4d 5f 47 72 61  |ss%..L..VRAM_Gra|
000008c0  62 0d 04 56 33 53 57 49  20 20 20 20 20 32 32 20  |b..V3SWI     22 |
000008d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000008e0  20 20 20 20 20 3b 20 49  6e 74 6f 20 53 56 43 20  |     ; Into SVC |
000008f0  6d 6f 64 65 0d 04 60 12  4d 4f 56 20 20 20 20 20  |mode..`.MOV     |
00000900  52 30 2c 52 31 35 0d 04  6a 17 84 52 20 20 20 20  |R0,R15..j..R    |
00000910  20 52 30 2c 52 30 2c 23  33 3c 3c 32 36 0d 04 74  | R0,R0,#3<<26..t|
00000920  36 54 45 51 50 20 20 20  20 52 31 35 2c 52 30 20  |6TEQP    R15,R0 |
00000930  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000940  20 3b 20 46 49 51 27 73  20 6f 66 66 20 74 6f 6f  | ; FIQ's off too|
00000950  2e 2e 2e 0d 04 7e 04 0d  04 88 3e 53 57 49 20 20  |.....~....>SWI  |
00000960  20 20 20 22 57 56 43 47  72 61 62 5f 4d 65 6d 42  |   "WVCGrab_MemB|
00000970  61 73 65 73 22 20 20 20  20 20 20 3b 20 47 65 74  |ases"      ; Get|
00000980  20 62 61 73 65 20 6f 66  20 70 6f 64 75 6c 65 20  | base of podule |
00000990  73 70 61 63 65 0d 04 92  04 0d 04 9c 3c 4c 44 52  |space.......<LDR|
000009a0  42 20 20 20 20 52 38 2c  5b 52 31 5d 20 20 20 20  |B    R8,[R1]    |
000009b0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 52  |             ; R|
000009c0  41 53 20 6f 6e 6c 79 20  52 65 66 72 65 73 68 20  |AS only Refresh |
000009d0  63 79 63 6c 65 0d 04 a6  11 4d 4f 56 20 20 20 20  |cycle....MOV    |
000009e0  20 52 39 2c 23 30 0d 04  b0 04 0d 04 ba 41 84 52  | R9,#0.......A.R|
000009f0  20 20 20 20 20 72 34 2c  72 31 2c 23 26 31 30 30  |     r4,r1,#&100|
00000a00  30 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 50  |0            ; P|
00000a10  61 67 65 20 6d 6f 64 65  20 72 65 61 64 20 63 79  |age mode read cy|
00000a20  63 6c 65 20 61 64 64 72  65 73 73 0d 04 c4 3c 84  |cle address...<.|
00000a30  52 20 20 20 20 20 72 33  2c 72 31 2c 23 26 31 38  |R     r3,r1,#&18|
00000a40  30 30 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |00            ; |
00000a50  54 65 72 6d 69 6e 61 74  65 20 63 79 63 6c 65 20  |Terminate cycle |
00000a60  61 64 64 72 65 73 73 0d  04 ce 48 84 52 20 20 20  |address...H.R   |
00000a70  20 20 72 32 2c 72 31 2c  23 26 38 30 30 20 20 20  |  r2,r1,#&800   |
00000a80  20 20 20 20 20 20 20 20  20 20 3b 20 49 6e 69 74  |          ; Init|
00000a90  69 61 74 65 20 52 65 61  64 2f 53 52 20 74 6f 20  |iate Read/SR to |
00000aa0  6d 65 6d 6f 72 79 20 74  72 61 6e 73 66 65 72 0d  |memory transfer.|
00000ab0  04 d8 33 84 52 20 20 20  20 20 72 32 2c 72 32 2c  |..3.R     r2,r2,|
00000ac0  23 26 30 30 38 20 20 20  20 20 20 20 20 20 20 20  |#&008           |
00000ad0  20 20 3b 20 56 52 41 4d  20 61 64 64 72 65 73 73  |  ; VRAM address|
00000ae0  20 38 0d 04 e2 3d 84 52  20 20 20 20 20 72 37 2c  | 8...=.R     r7,|
00000af0  72 31 2c 23 26 31 30 30  30 20 20 20 20 20 20 20  |r1,#&1000       |
00000b00  20 20 20 20 20 3b 20 50  61 67 65 20 6d 6f 64 65  |     ; Page mode|
00000b10  20 72 65 61 64 20 28 43  41 53 20 6c 6f 77 29 0d  | read (CAS low).|
00000b20  04 ec 4b 41 44 44 20 20  20 20 20 72 37 2c 72 37  |..KADD     r7,r7|
00000b30  2c 23 26 30 30 31 43 20  20 20 20 20 20 20 20 20  |,#&001C         |
00000b40  20 20 20 3b 20 54 68 69  73 20 67 65 74 73 20 61  |   ; This gets a|
00000b50  72 6f 75 6e 64 20 74 68  65 20 70 69 70 65 6c 69  |round the pipeli|
00000b60  6e 69 6e 67 20 69 73 73  75 65 0d 04 f6 18 4c 44  |ning issue....LD|
00000b70  52 20 20 20 20 20 52 31  30 2c 70 61 67 65 73 74  |R     R10,pagest|
00000b80  65 70 0d 05 00 19 4c 44  52 20 20 20 20 20 52 31  |ep....LDR     R1|
00000b90  31 2c 70 69 78 65 6c 73  74 65 70 0d 05 0a 12 2e  |1,pixelstep.....|
00000ba0  6e 65 78 74 5f 72 6f 77  5f 64 6f 77 6e 0d 05 14  |next_row_down...|
00000bb0  44 4c 44 52 42 20 20 20  20 52 38 2c 5b 52 32 5d  |DLDRB    R8,[R2]|
00000bc0  2c 52 31 30 20 20 20 20  20 20 20 20 20 20 20 20  |,R10            |
00000bd0  20 3b 20 49 6e 69 74 69  61 74 65 20 53 52 20 74  | ; Initiate SR t|
00000be0  6f 20 6d 65 6d 6f 72 79  20 74 72 61 6e 73 66 65  |o memory transfe|
00000bf0  72 0d 05 1e 49 3b 4c 44  52 42 20 20 20 20 52 38  |r...I;LDRB    R8|
00000c00  2c 5b 52 37 5d 20 20 20  20 20 20 20 20 20 20 20  |,[R7]           |
00000c10  20 20 3b 20 47 65 74 20  61 20 70 69 78 65 6c 20  |  ; Get a pixel |
00000c20  66 72 6f 6d 20 56 52 41  4d 20 2d 20 66 69 78 65  |from VRAM - fixe|
00000c30  73 20 70 69 70 65 6c 69  6e 65 0d 05 28 15 53 55  |s pipeline..(.SU|
00000c40  42 20 20 20 20 20 52 37  2c 52 37 2c 23 31 36 0d  |B     R7,R7,#16.|
00000c50  05 32 0d 2e 72 6f 77 5f  72 65 61 64 0d 05 3c 3b  |.2..row_read..<;|
00000c60  4c 44 52 42 20 20 20 20  52 38 2c 5b 52 37 5d 2c  |LDRB    R8,[R7],|
00000c70  52 31 31 20 20 20 20 20  20 20 20 20 20 20 20 20  |R11             |
00000c80  3b 20 47 65 74 20 61 20  70 69 78 65 6c 20 66 72  |; Get a pixel fr|
00000c90  6f 6d 20 56 52 41 4d 0d  05 46 3c 53 54 52 42 20  |om VRAM..F<STRB |
00000ca0  20 20 20 52 38 2c 5b 52  35 5d 2c 23 31 20 20 20  |   R8,[R5],#1   |
00000cb0  20 20 20 20 20 20 20 20  20 20 20 3b 20 53 74 6f  |           ; Sto|
00000cc0  72 65 20 69 74 20 69 6e  20 74 68 65 20 62 75 66  |re it in the buf|
00000cd0  66 65 72 0d 05 50 3d 43  4d 50 20 20 20 20 20 52  |fer..P=CMP     R|
00000ce0  37 2c 52 33 20 20 20 20  20 20 20 20 20 20 20 20  |7,R3            |
00000cf0  20 20 20 20 20 20 20 3b  20 45 6e 64 20 6f 66 20  |       ; End of |
00000d00  74 68 65 20 72 6f 77 20  72 65 61 63 68 65 64 3f  |the row reached?|
00000d10  0d 05 5a 14 42 4c 54 20  20 20 20 20 72 6f 77 5f  |..Z.BLT     row_|
00000d20  72 65 61 64 0d 05 64 04  0d 05 6e 3a 53 55 42 20  |read..d...n:SUB |
00000d30  20 20 20 20 52 37 2c 52  37 2c 23 26 38 30 30 20  |    R7,R7,#&800 |
00000d40  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 44 6f  |            ; Do|
00000d50  20 74 68 65 20 6e 65 78  74 20 72 6f 77 20 64 6f  | the next row do|
00000d60  77 6e 0d 05 78 16 41 44  44 20 20 20 20 20 52 37  |wn..x.ADD     R7|
00000d70  2c 52 37 2c 23 26 31 30  0d 05 82 19 4c 44 52 20  |,R7,#&10....LDR |
00000d80  20 20 20 20 52 38 2c 5b  52 37 2c 23 26 38 30 30  |    R8,[R7,#&800|
00000d90  5d 0d 05 8c 11 43 4d 50  20 20 20 20 20 52 32 2c  |]....CMP     R2,|
00000da0  52 34 0d 05 96 19 42 4c  45 20 20 20 20 20 6e 65  |R4....BLE     ne|
00000db0  78 74 5f 72 6f 77 5f 64  6f 77 6e 0d 05 a0 12 54  |xt_row_down....T|
00000dc0  45 51 50 20 20 20 20 52  31 35 2c 23 30 0d 05 aa  |EQP    R15,#0...|
00000dd0  11 4d 4f 56 4e 56 20 20  20 52 36 2c 52 36 0d 05  |.MOVNV   R6,R6..|
00000de0  b4 13 4d 4f 56 53 20 20  20 20 52 31 35 2c 52 31  |..MOVS    R15,R1|
00000df0  34 0d 05 be 0d 2e 70 61  67 65 73 74 65 70 0d 05  |4.....pagestep..|
00000e00  c8 0a 45 51 55 44 20 38  0d 05 d2 0e 2e 70 69 78  |..EQUD 8.....pix|
00000e10  65 6c 73 74 65 70 0d 05  dc 0a 45 51 55 44 20 34  |elstep....EQUD 4|
00000e20  0d 05 e6 04 0d 05 f0 19  2e 6d 61 73 6b 20 45 51  |.........mask EQ|
00000e30  55 44 20 20 20 20 20 20  33 32 37 36 37 0d 05 fa  |UD      32767...|
00000e40  04 0d 06 04 0e 2e 72 65  61 64 31 36 62 69 74 0d  |......read16bit.|
00000e50  06 0e 2c 3b 20 72 30 3d  6f 75 74 70 75 74 20 61  |..,; r0=output a|
00000e60  64 64 72 65 73 73 2c 20  72 31 3d 6c 69 6e 65 20  |ddress, r1=line |
00000e70  6e 75 6d 62 65 72 20 72  65 71 64 0d 06 18 18 53  |number reqd....S|
00000e80  57 49 20 20 20 20 20 22  4f 53 5f 45 6e 74 65 72  |WI     "OS_Enter|
00000e90  4f 53 22 0d 06 22 4c 4d  4f 56 20 20 20 20 20 72  |OS".."LMOV     r|
00000ea0  36 2c 72 30 20 20 20 20  20 20 20 20 20 20 20 20  |6,r0            |
00000eb0  20 20 20 20 20 20 20 3b  20 42 75 6e 67 20 61 64  |       ; Bung ad|
00000ec0  64 72 65 73 73 20 66 6f  72 20 64 61 74 61 20 28  |dress for data (|
00000ed0  61 20 6c 69 6e 65 29 20  69 6e 74 6f 20 72 36 0d  |a line) into r6.|
00000ee0  06 2c 12 4d 4f 56 20 20  20 20 20 72 30 2c 72 31  |.,.MOV     r0,r1|
00000ef0  35 0d 06 36 3a 84 52 20  20 20 20 20 72 30 2c 72  |5..6:.R     r0,r|
00000f00  30 2c 23 33 3c 3c 32 36  20 20 20 20 20 20 20 20  |0,#3<<26        |
00000f10  20 20 20 20 3b 20 43 68  61 6e 67 65 20 70 72 6f  |    ; Change pro|
00000f20  63 65 73 73 6f 72 20 6d  6f 64 65 0d 06 40 12 54  |cessor mode..@.T|
00000f30  45 51 50 20 20 20 20 72  31 35 2c 72 30 0d 06 4a  |EQP    r15,r0..J|
00000f40  04 0d 06 54 15 4c 44 52  20 20 20 20 20 72 33 2c  |...T.LDR     r3,|
00000f50  70 61 63 6b 52 33 0d 06  5e 15 4c 44 52 20 20 20  |packR3..^.LDR   |
00000f60  20 20 72 34 2c 70 61 63  6b 52 34 0d 06 68 15 4c  |  r4,packR4..h.L|
00000f70  44 52 20 20 20 20 20 72  35 2c 70 61 63 6b 52 35  |DR     r5,packR5|
00000f80  0d 06 72 11 4d 4f 56 20  20 20 20 20 72 30 2c 23  |..r.MOV     r0,#|
00000f90  30 0d 06 7c 39 4d 4f 56  20 20 20 20 20 72 31 2c  |0..|9MOV     r1,|
00000fa0  72 31 2c 4c 53 4c 23 33  20 20 20 20 20 20 20 20  |r1,LSL#3        |
00000fb0  20 20 20 20 20 3b 20 43  6f 6e 76 65 72 74 20 6c  |     ; Convert l|
00000fc0  69 6e 65 20 6e 75 6d 62  65 72 0d 06 86 39 4c 44  |ine number...9LD|
00000fd0  52 20 20 20 20 20 72 38  2c 5b 72 33 2c 72 31 5d  |R     r8,[r3,r1]|
00000fe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00000ff0  49 6e 69 74 69 61 74 65  20 72 65 61 64 20 63 79  |Initiate read cy|
00001000  63 6c 65 0d 06 90 04 0d  06 9a 13 4c 44 52 20 20  |cle........LDR  |
00001010  20 20 20 72 37 2c 6d 61  73 6b 0d 06 a4 04 0d 06  |   r7,mask......|
00001020  ae 50 3b 4c 44 52 20 20  20 20 20 72 38 2c 5b 72  |.P;LDR     r8,[r|
00001030  34 2c 72 30 2c 4c 53 4c  23 32 5d 20 20 20 20 20  |4,r0,LSL#2]     |
00001040  20 20 20 3b 20 47 65 74  20 61 20 70 69 78 65 6c  |   ; Get a pixel|
00001050  20 66 72 6f 6d 20 74 68  65 20 56 52 41 4d 20 69  | from the VRAM i|
00001060  6e 74 6f 20 72 38 20 28  31 36 62 69 74 29 0d 06  |nto r8 (16bit)..|
00001070  b8 15 3b 41 44 44 20 20  20 20 20 72 30 2c 72 30  |..;ADD     r0,r0|
00001080  2c 23 31 0d 06 c2 04 0d  06 cc 15 2e 67 65 74 5f  |,#1.........get_|
00001090  61 6e 6f 74 68 65 72 5f  62 79 74 65 0d 06 d6 4f  |another_byte...O|
000010a0  4c 44 52 20 20 20 20 20  72 38 2c 5b 72 34 2c 72  |LDR     r8,[r4,r|
000010b0  30 2c 4c 53 4c 23 32 5d  20 20 20 20 20 20 20 20  |0,LSL#2]        |
000010c0  3b 20 47 65 74 20 61 20  70 69 78 65 6c 20 66 72  |; Get a pixel fr|
000010d0  6f 6d 20 74 68 65 20 56  52 41 4d 20 69 6e 74 6f  |om the VRAM into|
000010e0  20 72 38 20 28 31 36 62  69 74 29 0d 06 e0 04 0d  | r8 (16bit).....|
000010f0  06 ea 30 3b 4d 4f 56 20  20 20 20 20 72 38 2c 23  |..0;MOV     r8,#|
00001100  25 31 31 30 30 30 3c 3c  31 30 20 20 20 20 20 20  |%11000<<10      |
00001110  20 20 20 20 3b 20 42 6c  75 65 20 64 61 74 61 0d  |    ; Blue data.|
00001120  06 f4 30 3b 84 52 20 20  20 20 20 72 38 2c 72 38  |..0;.R     r8,r8|
00001130  2c 23 25 31 31 31 30 31  3c 3c 35 20 20 20 20 20  |,#%11101<<5     |
00001140  20 20 20 3b 20 47 72 65  65 6e 20 64 61 74 61 0d  |   ; Green data.|
00001150  06 fe 2e 3b 84 52 20 20  20 20 20 72 38 2c 72 38  |...;.R     r8,r8|
00001160  2c 23 25 31 31 30 30 30  20 20 20 20 20 20 20 20  |,#%11000        |
00001170  20 20 20 3b 20 52 65 64  20 64 61 74 61 0d 07 08  |   ; Red data...|
00001180  04 0d 07 12 14 41 44 44  20 20 20 20 20 72 30 2c  |.....ADD     r0,|
00001190  72 30 2c 23 31 0d 07 1c  04 0d 07 26 3b 80 20 20  |r0,#1......&;.  |
000011a0  20 20 20 72 38 2c 72 38  2c 72 37 20 20 20 20 20  |   r8,r8,r7     |
000011b0  20 20 20 20 20 20 20 20  20 20 20 3b 20 47 65 74  |           ; Get|
000011c0  20 62 6f 74 74 6f 6d 20  66 69 66 74 65 65 6e 20  | bottom fifteen |
000011d0  62 69 74 73 0d 07 30 3d  80 20 20 20 20 20 72 39  |bits..0=.     r9|
000011e0  2c 72 38 2c 23 26 66 66  30 30 20 20 20 20 20 20  |,r8,#&ff00      |
000011f0  20 20 20 20 20 20 3b 20  47 65 74 20 74 6f 70 20  |      ; Get top |
00001200  62 79 74 65 20 66 72 6f  6d 20 31 35 20 62 69 74  |byte from 15 bit|
00001210  73 0d 07 3a 17 4d 4f 56  20 20 20 20 20 72 39 2c  |s..:.MOV     r9,|
00001220  72 39 2c 4c 53 52 23 38  0d 07 44 48 53 54 52 42  |r9,LSR#8..DHSTRB|
00001230  20 20 20 20 72 38 2c 5b  72 36 5d 2c 23 31 20 20  |    r8,[r6],#1  |
00001240  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 53 74  |            ; St|
00001250  6f 72 65 20 62 6f 74 74  6f 6d 20 62 79 74 65 20  |ore bottom byte |
00001260  69 6e 20 6f 75 74 70 75  74 20 62 75 66 66 65 72  |in output buffer|
00001270  0d 07 4e 45 53 54 52 42  20 20 20 20 72 39 2c 5b  |..NESTRB    r9,[|
00001280  72 36 5d 2c 23 31 20 20  20 20 20 20 20 20 20 20  |r6],#1          |
00001290  20 20 20 20 3b 20 53 74  6f 72 65 20 74 6f 70 20  |    ; Store top |
000012a0  62 79 74 65 20 69 6e 20  6f 75 74 70 75 74 20 62  |byte in output b|
000012b0  75 66 66 65 72 0d 07 58  44 43 4d 50 20 20 20 20  |uffer..XDCMP    |
000012c0  20 72 30 2c 23 35 31 32  20 20 20 20 20 20 20 20  | r0,#512        |
000012d0  20 20 20 20 20 20 20 20  20 3b 20 44 69 64 20 77  |         ; Did w|
000012e0  65 20 72 65 61 64 20 74  68 65 20 66 75 6c 6c 20  |e read the full |
000012f0  6c 69 6e 65 20 79 65 74  3f 0d 07 62 41 42 4e 45  |line yet?..bABNE|
00001300  20 20 20 20 20 67 65 74  5f 61 6e 6f 74 68 65 72  |     get_another|
00001310  5f 62 79 74 65 20 20 20  20 20 20 20 20 3b 20 49  |_byte        ; I|
00001320  66 20 6e 6f 74 2c 20 67  65 74 20 6f 6e 20 77 69  |f not, get on wi|
00001330  74 68 20 74 68 65 20 6a  6f 62 0d 07 6c 16 4c 44  |th the job..l.LD|
00001340  52 20 20 20 20 20 72 38  2c 5b 72 35 2c 23 30 5d  |R     r8,[r5,#0]|
00001350  0d 07 76 12 54 45 51 50  20 20 20 20 72 31 35 2c  |..v.TEQP    r15,|
00001360  23 30 0d 07 80 11 4d 4f  56 4e 56 20 20 20 72 30  |#0....MOVNV   r0|
00001370  2c 52 30 0d 07 8a 13 4d  4f 56 20 20 20 20 20 72  |,R0....MOV     r|
00001380  31 35 2c 72 31 34 0d 07  94 04 0d 07 9e 0d 2e 70  |15,r14.........p|
00001390  61 63 6b 6c 69 6e 65 0d  07 a8 18 53 57 49 20 20  |ackline....SWI  |
000013a0  20 20 20 22 4f 53 5f 45  6e 74 65 72 4f 53 22 0d  |   "OS_EnterOS".|
000013b0  07 b2 2c 3b 20 72 30 3d  6f 75 74 70 75 74 20 61  |..,; r0=output a|
000013c0  64 64 72 65 73 73 2c 20  72 31 3d 6c 69 6e 65 20  |ddress, r1=line |
000013d0  6e 75 6d 62 65 72 20 72  65 71 64 0d 07 bc 3f 4d  |number reqd...?M|
000013e0  4f 56 20 20 20 20 20 52  31 32 2c 52 30 20 20 20  |OV     R12,R0   |
000013f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001400  20 41 64 64 72 65 73 73  20 66 6f 72 20 64 61 74  | Address for dat|
00001410  61 20 28 61 20 6c 69 6e  65 29 0d 07 c6 12 4d 4f  |a (a line)....MO|
00001420  56 20 20 20 20 20 52 30  2c 52 31 35 0d 07 d0 17  |V     R0,R15....|
00001430  84 52 20 20 20 20 20 52  30 2c 52 30 2c 23 33 3c  |.R     R0,R0,#3<|
00001440  3c 32 36 0d 07 da 12 54  45 51 50 20 20 20 20 52  |<26....TEQP    R|
00001450  31 35 2c 52 30 0d 07 e4  15 4c 44 52 20 20 20 20  |15,R0....LDR    |
00001460  20 52 33 2c 70 61 63 6b  52 33 0d 07 ee 15 4c 44  | R3,packR3....LD|
00001470  52 20 20 20 20 20 52 34  2c 70 61 63 6b 52 34 0d  |R     R4,packR4.|
00001480  07 f8 15 4c 44 52 20 20  20 20 20 52 35 2c 70 61  |...LDR     R5,pa|
00001490  63 6b 52 35 0d 08 02 11  4d 4f 56 20 20 20 20 20  |ckR5....MOV     |
000014a0  52 30 2c 23 30 0d 08 0c  17 4d 4f 56 20 20 20 20  |R0,#0....MOV    |
000014b0  20 52 31 2c 52 31 2c 4c  53 4c 23 33 0d 08 16 33  | R1,R1,LSL#3...3|
000014c0  4c 44 52 20 20 20 20 20  52 38 2c 5b 52 33 2c 52  |LDR     R8,[R3,R|
000014d0  31 5d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1]              |
000014e0  3b 20 49 6e 69 74 69 61  74 65 20 72 65 61 64 0d  |; Initiate read.|
000014f0  08 20 0e 2e 4e 65 78 74  5f 42 79 74 65 0d 08 2a  |. ..Next_Byte..*|
00001500  3f 4c 44 52 20 20 20 20  20 52 38 2c 5b 52 34 2c  |?LDR     R8,[R4,|
00001510  52 30 2c 4c 53 4c 20 23  32 5d 20 20 20 20 20 20  |R0,LSL #2]      |
00001520  20 3b 20 47 65 74 20 61  20 70 69 78 65 6c 20 66  | ; Get a pixel f|
00001530  72 6f 6d 20 74 68 65 20  56 52 41 4d 0d 08 34 3d  |rom the VRAM..4=|
00001540  41 44 44 20 20 20 20 20  52 30 2c 52 30 2c 23 31  |ADD     R0,R0,#1|
00001550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001560  3b 20 49 6e 63 72 65 6d  65 6e 74 20 70 69 78 65  |; Increment pixe|
00001570  6c 20 63 6f 75 6e 74 65  72 0d 08 3e 46 4c 44 52  |l counter..>FLDR|
00001580  20 20 20 20 20 52 37 2c  5b 52 34 2c 52 30 2c 4c  |     R7,[R4,R0,L|
00001590  53 4c 20 23 32 5d 20 20  20 20 20 20 20 3b 20 47  |SL #2]       ; G|
000015a0  65 74 20 61 20 73 65 63  6f 6e 64 20 70 69 78 65  |et a second pixe|
000015b0  6c 20 66 72 6f 6d 20 74  68 65 20 56 52 41 4d 0d  |l from the VRAM.|
000015c0  08 48 33 41 44 44 20 20  20 20 20 52 30 2c 52 30  |.H3ADD     R0,R0|
000015d0  2c 23 31 20 20 20 20 20  20 20 20 20 20 20 20 20  |,#1             |
000015e0  20 20 20 3b 20 49 6e 63  20 70 69 78 65 6c 20 63  |   ; Inc pixel c|
000015f0  74 72 0d 08 52 13 80 20  20 20 20 20 52 39 2c 52  |tr..R..     R9,R|
00001600  38 2c 23 26 46 0d 08 5c  14 80 20 20 20 20 20 52  |8,#&F..\..     R|
00001610  31 30 2c 52 37 2c 23 26  46 0d 08 66 1c 84 52 20  |10,R7,#&F..f..R |
00001620  20 20 20 20 52 31 31 2c  52 31 30 2c 52 39 2c 4c  |    R11,R10,R9,L|
00001630  53 4c 20 23 34 0d 08 70  3b 53 54 52 42 20 20 20  |SL #4..p;STRB   |
00001640  20 52 31 31 2c 5b 52 31  32 2c 23 35 31 32 5d 20  | R11,[R12,#512] |
00001650  20 20 20 20 20 20 20 20  20 3b 20 42 75 6e 67 20  |         ; Bung |
00001660  62 79 74 65 20 69 6e 74  6f 20 62 75 66 66 65 72  |byte into buffer|
00001670  0d 08 7a 14 80 20 20 20  20 20 52 39 2c 52 38 2c  |..z..     R9,R8,|
00001680  23 26 46 30 0d 08 84 15  80 20 20 20 20 20 52 31  |#&F0.....     R1|
00001690  30 2c 52 37 2c 23 26 46  30 0d 08 8e 1c 84 52 20  |0,R7,#&F0.....R |
000016a0  20 20 20 20 52 31 31 2c  52 39 2c 52 31 30 2c 4c  |    R11,R9,R10,L|
000016b0  53 52 20 23 34 0d 08 98  3b 53 54 52 42 20 20 20  |SR #4...;STRB   |
000016c0  20 52 31 31 2c 5b 52 31  32 2c 23 32 35 36 5d 20  | R11,[R12,#256] |
000016d0  20 20 20 20 20 20 20 20  20 3b 20 42 75 6e 67 20  |         ; Bung |
000016e0  62 79 74 65 20 69 6e 74  6f 20 62 75 66 66 65 72  |byte into buffer|
000016f0  0d 08 a2 15 80 20 20 20  20 20 52 39 2c 52 38 2c  |.....     R9,R8,|
00001700  23 26 46 30 30 0d 08 ac  18 4d 4f 56 20 20 20 20  |#&F00....MOV    |
00001710  20 52 39 2c 52 39 2c 4c  53 52 20 23 34 0d 08 b6  | R9,R9,LSR #4...|
00001720  16 80 20 20 20 20 20 52  31 30 2c 52 37 2c 23 26  |..     R10,R7,#&|
00001730  46 30 30 0d 08 c0 1c 84  52 20 20 20 20 20 52 31  |F00.....R     R1|
00001740  31 2c 52 39 2c 52 31 30  2c 4c 53 52 20 23 38 0d  |1,R9,R10,LSR #8.|
00001750  08 ca 3b 53 54 52 42 20  20 20 20 52 31 31 2c 5b  |..;STRB    R11,[|
00001760  52 31 32 5d 2c 23 31 20  20 20 20 20 20 20 20 20  |R12],#1         |
00001770  20 20 20 3b 20 42 75 6e  67 20 62 79 74 65 20 69  |   ; Bung byte i|
00001780  6e 74 6f 20 62 75 66 66  65 72 0d 08 d4 47 43 4d  |nto buffer...GCM|
00001790  50 20 20 20 20 20 52 30  2c 23 26 32 30 30 20 20  |P     R0,#&200  |
000017a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
000017b0  48 61 76 65 20 77 65 20  64 6f 6e 65 20 61 20 63  |Have we done a c|
000017c0  6f 6d 70 6c 65 74 65 20  6c 69 6e 65 20 79 65 74  |omplete line yet|
000017d0  3f 0d 08 de 15 42 4e 45  20 20 20 20 20 4e 65 78  |?....BNE     Nex|
000017e0  74 5f 42 79 74 65 0d 08  e8 35 4c 44 52 20 20 20  |t_Byte...5LDR   |
000017f0  20 20 52 38 2c 5b 52 35  2c 23 30 5d 20 20 20 20  |  R8,[R5,#0]    |
00001800  20 20 20 20 20 20 20 20  20 20 3b 20 54 65 72 6d  |          ; Term|
00001810  69 6e 61 74 65 20 63 79  63 6c 65 0d 08 f2 12 54  |inate cycle....T|
00001820  45 51 50 20 20 20 20 52  31 35 2c 23 30 0d 08 fc  |EQP    R15,#0...|
00001830  11 4d 4f 56 4e 56 20 20  20 52 36 2c 52 36 0d 09  |.MOVNV   R6,R6..|
00001840  06 13 4d 4f 56 20 20 20  20 20 52 31 35 2c 52 31  |..MOV     R15,R1|
00001850  34 0d 09 10 04 0d 09 1a  0e 2e 6d 65 6d 62 61 73  |4.........membas|
00001860  65 52 30 0d 09 24 0a 45  51 55 44 20 30 0d 09 2e  |eR0..$.EQUD 0...|
00001870  0e 2e 6d 65 6d 62 61 73  65 52 31 0d 09 38 0a 45  |..membaseR1..8.E|
00001880  51 55 44 20 30 0d 09 42  0b 2e 70 61 63 6b 52 33  |QUD 0..B..packR3|
00001890  0d 09 4c 0a 45 51 55 44  20 30 0d 09 56 0b 2e 70  |..L.EQUD 0..V..p|
000018a0  61 63 6b 52 34 0d 09 60  0a 45 51 55 44 20 30 0d  |ackR4..`.EQUD 0.|
000018b0  09 6a 0b 2e 70 61 63 6b  52 35 0d 09 74 0a 45 51  |.j..packR5..t.EQ|
000018c0  55 44 20 30 0d 09 7e 04  0d 09 88 0d 2e 73 65 74  |UD 0..~......set|
000018d0  5f 38 62 69 74 0d 09 92  0e 53 57 49 20 20 20 20  |_8bit....SWI    |
000018e0  20 32 32 0d 09 9c 1e 53  57 49 20 20 20 20 20 22  | 22....SWI     "|
000018f0  57 56 43 47 72 61 62 5f  4d 65 6d 42 61 73 65 73  |WVCGrab_MemBases|
00001900  22 0d 09 a6 3a 41 44 44  20 20 20 20 20 52 30 2c  |"...:ADD     R0,|
00001910  52 30 2c 23 26 32 30 30  30 20 20 20 20 3b 20 26  |R0,#&2000    ; &|
00001920  32 30 30 30 3d 50 61 67  69 6e 67 20 72 65 67 20  |2000=Paging reg |
00001930  66 6f 72 20 56 39 20 4d  6b 20 49 0d 09 b0 13 4d  |for V9 Mk I....M|
00001940  4f 56 20 20 20 20 20 52  31 2c 23 26 31 30 0d 09  |OV     R1,#&10..|
00001950  ba 13 53 54 52 42 20 20  20 20 52 31 2c 5b 52 30  |..STRB    R1,[R0|
00001960  5d 0d 09 c4 3b 41 44 44  20 20 20 20 20 72 30 2c  |]...;ADD     r0,|
00001970  72 30 2c 23 26 31 30 30  30 20 20 20 20 3b 20 26  |r0,#&1000    ; &|
00001980  33 30 30 30 3d 50 61 67  69 6e 67 20 72 65 67 20  |3000=Paging reg |
00001990  66 6f 72 20 56 39 20 4d  6b 20 49 49 0d 09 ce 13  |for V9 Mk II....|
000019a0  53 54 52 42 20 20 20 20  52 31 2c 5b 52 30 5d 0d  |STRB    R1,[R0].|
000019b0  09 d8 04 0d 09 e2 12 54  45 51 50 20 20 20 20 52  |.......TEQP    R|
000019c0  31 35 2c 23 30 0d 09 ec  11 4d 4f 56 4e 56 20 20  |15,#0....MOVNV  |
000019d0  20 52 30 2c 52 30 0d 09  f6 13 4d 4f 56 53 20 20  | R0,R0....MOVS  |
000019e0  20 20 52 31 35 2c 52 31  34 0d 0a 00 0e 2e 73 65  |  R15,R14.....se|
000019f0  74 5f 31 32 62 69 74 0d  0a 0a 0e 53 57 49 20 20  |t_12bit....SWI  |
00001a00  20 20 20 32 32 0d 0a 14  1e 53 57 49 20 20 20 20  |   22....SWI    |
00001a10  20 22 57 56 43 47 72 61  62 5f 4d 65 6d 42 61 73  | "WVCGrab_MemBas|
00001a20  65 73 22 0d 0a 1e 3a 41  44 44 20 20 20 20 20 52  |es"...:ADD     R|
00001a30  30 2c 52 30 2c 23 26 32  30 30 30 20 20 20 20 3b  |0,R0,#&2000    ;|
00001a40  20 26 32 30 30 30 3d 50  61 67 69 6e 67 20 72 65  | &2000=Paging re|
00001a50  67 20 66 6f 72 20 56 39  20 4d 6b 20 49 0d 0a 28  |g for V9 Mk I..(|
00001a60  11 4d 4f 56 20 20 20 20  20 52 31 2c 23 30 0d 0a  |.MOV     R1,#0..|
00001a70  32 13 53 54 52 42 20 20  20 20 52 31 2c 5b 52 30  |2.STRB    R1,[R0|
00001a80  5d 0d 0a 3c 3b 41 44 44  20 20 20 20 20 72 30 2c  |]..<;ADD     r0,|
00001a90  72 30 2c 23 26 31 30 30  30 20 20 20 20 3b 20 26  |r0,#&1000    ; &|
00001aa0  33 30 30 30 3d 50 61 67  69 6e 67 20 72 65 67 20  |3000=Paging reg |
00001ab0  66 6f 72 20 56 39 20 4d  6b 20 49 49 0d 0a 46 13  |for V9 Mk II..F.|
00001ac0  53 54 52 42 20 20 20 20  52 31 2c 5b 52 30 5d 0d  |STRB    R1,[R0].|
00001ad0  0a 50 12 54 45 51 50 20  20 20 20 52 31 35 2c 23  |.P.TEQP    R15,#|
00001ae0  30 0d 0a 5a 11 4d 4f 56  4e 56 20 20 20 52 30 2c  |0..Z.MOVNV   R0,|
00001af0  52 30 0d 0a 64 13 4d 4f  56 53 20 20 20 20 52 31  |R0..d.MOVS    R1|
00001b00  35 2c 52 31 34 0d 0a 6e  04 0d 0a 78 12 2e 52 65  |5,R14..n...x..Re|
00001b10  66 72 65 73 68 5f 46 72  61 6d 65 0d 0a 82 0e 53  |fresh_Frame....S|
00001b20  57 49 20 20 20 20 20 32  32 0d 0a 8c 1e 53 57 49  |WI     22....SWI|
00001b30  20 20 20 20 20 22 57 56  43 47 72 61 62 5f 4d 65  |     "WVCGrab_Me|
00001b40  6d 42 61 73 65 73 22 0d  0a 96 18 41 44 44 20 20  |mBases"....ADD  |
00001b50  20 20 20 52 30 2c 52 31  2c 23 26 31 38 30 30 0d  |   R0,R1,#&1800.|
00001b60  0a a0 16 4c 44 52 20 20  20 20 20 52 32 2c 5b 52  |...LDR     R2,[R|
00001b70  31 2c 23 30 5d 0d 0a aa  13 4d 4f 56 20 20 20 20  |1,#0]....MOV    |
00001b80  20 52 30 2c 23 32 35 36  0d 0a b4 11 2e 52 65 66  | R0,#256.....Ref|
00001b90  72 65 73 68 5f 4c 6f 6f  70 0d 0a be 2c 4c 44 52  |resh_Loop...,LDR|
00001ba0  20 20 20 20 20 52 32 2c  5b 52 31 2c 52 30 5d 20  |     R2,[R1,R0] |
00001bb0  20 20 20 20 20 20 3b 20  52 65 66 72 65 73 68 20  |      ; Refresh |
00001bc0  43 79 63 6c 65 0d 0a c8  14 53 55 42 53 20 20 20  |Cycle....SUBS   |
00001bd0  20 52 30 2c 52 30 2c 23  31 0d 0a d2 18 42 4e 45  | R0,R0,#1....BNE|
00001be0  20 20 20 20 20 52 65 66  72 65 73 68 5f 4c 6f 6f  |     Refresh_Loo|
00001bf0  70 0d 0a dc 12 54 45 51  50 20 20 20 20 52 31 35  |p....TEQP    R15|
00001c00  2c 23 30 0d 0a e6 11 4d  4f 56 4e 56 20 20 20 52  |,#0....MOVNV   R|
00001c10  30 2c 52 30 0d 0a f0 13  4d 4f 56 53 20 20 20 20  |0,R0....MOVS    |
00001c20  52 31 35 2c 52 31 34 0d  0a fa 04 0d 0b 04 05 5d  |R15,R14........]|
00001c30  0d 0b 0e 0b ed 20 50 61  73 73 25 0d 0b 18 21 c8  |..... Pass%...!.|
00001c40  99 20 22 57 56 43 47 72  61 62 5f 4d 65 6d 42 61  |. "WVCGrab_MemBa|
00001c50  73 65 73 22 20 b8 20 72  30 2c 72 31 0d 0b 22 15  |ses" . r0,r1..".|
00001c60  21 70 61 63 6b 52 33 3d  72 31 20 84 20 26 38 30  |!packR3=r1 . &80|
00001c70  30 0d 0b 2c 16 21 70 61  63 6b 52 34 3d 72 31 20  |0..,.!packR4=r1 |
00001c80  84 20 26 31 30 30 30 0d  0b 36 16 21 70 61 63 6b  |. &1000..6.!pack|
00001c90  52 35 3d 72 31 20 84 20  26 31 38 30 30 0d 0b 40  |R5=r1 . &1800..@|
00001ca0  05 e1 0d 0b 4a 04 0d 0b  54 11 dd 20 f2 64 6f 6c  |....J...T.. .dol|
00001cb0  69 76 65 63 6f 64 65 0d  0b 5e 19 de 20 6c 69 76  |ivecode..^.. liv|
00001cc0  65 67 61 70 25 20 26 31  32 30 30 2c 4c 25 20 30  |egap% &1200,L% 0|
00001cd0  0d 0b 68 16 e3 20 70 61  73 73 25 3d 38 20 b8 20  |..h.. pass%=8 . |
00001ce0  31 30 20 88 20 32 0d 0b  72 0f 50 25 3d 6c 69 76  |10 . 2..r.P%=liv|
00001cf0  65 67 61 70 25 0d 0b 7c  05 5b 0d 0b 86 0d 4f 50  |egap%..|.[....OP|
00001d00  54 20 70 61 73 73 25 0d  0b 90 0e 2e 6c 69 76 65  |T pass%.....live|
00001d10  5f 67 72 61 62 0d 0b 9a  2c 53 57 49 20 20 20 20  |_grab...,SWI    |
00001d20  20 32 32 20 20 20 20 20  20 20 20 20 20 20 20 20  | 22             |
00001d30  20 3b 20 49 6e 74 65 72  72 75 70 74 73 20 6f 66  | ; Interrupts of|
00001d40  66 0d 0b a4 12 4d 4f 56  20 20 20 20 20 52 30 2c  |f....MOV     R0,|
00001d50  52 31 35 0d 0b ae 17 84  52 20 20 20 20 20 52 30  |R15.....R     R0|
00001d60  2c 52 30 2c 23 33 3c 3c  32 36 0d 0b b8 45 54 45  |,R0,#3<<26...ETE|
00001d70  51 50 20 20 20 20 52 31  35 2c 52 30 20 20 20 20  |QP    R15,R0    |
00001d80  20 20 20 20 20 20 3b 20  54 75 72 6e 20 6f 66 66  |      ; Turn off|
00001d90  20 66 61 73 74 20 69 6e  74 65 72 72 75 70 74 73  | fast interrupts|
00001da0  20 74 6f 6f 20 28 73 6f  72 72 79 2e 2e 2e 29 0d  | too (sorry...).|
00001db0  0b c2 36 4c 44 52 20 20  20 20 20 52 31 2c 6c 69  |..6LDR     R1,li|
00001dc0  76 65 62 61 73 65 52 31  20 20 20 3b 20 47 65 74  |vebaseR1   ; Get|
00001dd0  20 62 61 73 65 20 6f 66  20 70 6f 64 75 6c 65 20  | base of podule |
00001de0  73 70 61 63 65 0d 0b cc  39 4c 44 52 20 20 20 20  |space...9LDR    |
00001df0  20 52 35 2c 6c 69 76 65  64 75 6d 70 61 64 25 20  | R5,livedumpad% |
00001e00  20 3b 20 47 65 74 20 61  64 64 72 65 73 73 20 66  | ; Get address f|
00001e10  6f 72 20 38 62 70 70 20  6f 75 74 70 75 74 0d 0b  |or 8bpp output..|
00001e20  d6 39 84 52 20 20 20 20  20 52 32 2c 52 31 2c 23  |.9.R     R2,R1,#|
00001e30  26 31 30 30 30 20 20 20  20 3b 20 50 61 67 65 20  |&1000    ; Page |
00001e40  6d 6f 64 65 20 72 65 61  64 20 63 79 63 6c 65 20  |mode read cycle |
00001e50  61 64 64 72 65 73 73 0d  0b e0 3e 84 52 20 20 20  |address...>.R   |
00001e60  20 20 52 36 2c 52 31 2c  23 26 38 30 30 20 20 20  |  R6,R1,#&800   |
00001e70  20 20 3b 20 49 6e 69 74  69 61 74 65 20 70 69 78  |  ; Initiate pix|
00001e80  65 6c 20 72 65 61 64 20  63 79 63 6c 65 20 61 64  |el read cycle ad|
00001e90  64 72 65 73 73 0d 0b ea  35 4d 4f 56 20 20 20 20  |dress...5MOV    |
00001ea0  20 52 39 2c 23 26 31 38  30 30 20 20 20 20 20 20  | R9,#&1800      |
00001eb0  20 3b 20 54 65 72 6d 69  6e 61 74 65 20 63 79 63  | ; Terminate cyc|
00001ec0  6c 65 20 61 64 64 72 65  73 73 0d 0b f4 04 0d 0b  |le address......|
00001ed0  fe 12 4d 4f 56 20 20 20  20 20 52 31 31 2c 23 30  |..MOV     R11,#0|
00001ee0  0d 0c 08 04 0d 0c 12 13  2e 6c 69 76 65 66 69 65  |.........livefie|
00001ef0  6c 64 5f 70 6f 6c 6c 0d  0c 1c 34 4c 44 52 20 20  |ld_poll...4LDR  |
00001f00  20 20 20 52 38 2c 5b 52  36 5d 20 20 20 20 20 20  |   R8,[R6]      |
00001f10  20 20 20 3b 20 53 74 61  72 74 20 70 69 78 65 6c  |   ; Start pixel|
00001f20  20 72 65 61 64 20 63 79  63 6c 65 0d 0c 26 32 4c  | read cycle..&2L|
00001f30  44 52 20 20 20 20 20 52  38 2c 5b 52 31 2c 52 39  |DR     R8,[R1,R9|
00001f40  5d 20 20 20 20 20 20 3b  20 54 65 72 6d 69 6e 61  |]      ; Termina|
00001f50  74 65 20 72 65 61 64 20  63 79 63 6c 65 0d 0c 30  |te read cycle..0|
00001f60  2f 41 44 44 20 20 20 20  20 52 31 31 2c 52 31 31  |/ADD     R11,R11|
00001f70  2c 23 31 20 20 20 20 20  20 3b 20 49 6e 63 72 65  |,#1      ; Incre|
00001f80  6d 65 6e 74 20 63 6f 75  6e 74 65 72 0d 0c 3a 2d  |ment counter..:-|
00001f90  43 4d 50 20 20 20 20 20  52 31 31 2c 23 26 38 30  |CMP     R11,#&80|
00001fa0  30 30 20 20 20 20 20 20  3b 20 54 6f 6f 20 6d 61  |00      ; Too ma|
00001fb0  6e 79 20 74 72 69 65 73  3f 0d 0c 44 31 42 47 54  |ny tries?..D1BGT|
00001fc0  20 20 20 20 20 73 69 67  6e 61 6c 67 6f 6e 65 20  |     signalgone |
00001fd0  20 20 20 20 20 3b 20 49  66 20 6e 6f 74 2c 20 63  |     ; If not, c|
00001fe0  6f 6d 70 6c 61 69 6e 2e  2e 2e 0d 0c 4e 33 54 53  |omplain.....N3TS|
00001ff0  54 20 20 20 20 20 72 38  2c 23 26 34 30 30 30 20  |T     r8,#&4000 |
00002000  20 20 20 20 20 20 3b 20  56 69 64 65 6f 20 73 69  |      ; Video si|
00002010  67 6e 61 6c 20 70 72 65  73 65 6e 74 3f 0d 0c 58  |gnal present?..X|
00002020  3c 42 45 51 20 20 20 20  20 6c 69 76 65 66 69 65  |<BEQ     livefie|
00002030  6c 64 5f 70 6f 6c 6c 20  20 3b 20 49 66 20 6e 6f  |ld_poll  ; If no|
00002040  20 73 69 67 6e 61 6c 2c  20 77 61 69 74 20 66 6f  | signal, wait fo|
00002050  72 20 61 20 77 68 69 6c  65 0d 0c 62 12 4d 4f 56  |r a while..b.MOV|
00002060  20 20 20 20 20 52 31 31  2c 23 30 0d 0c 6c 04 0d  |     R11,#0..l..|
00002070  0c 76 12 4d 4f 56 20 20  20 20 20 52 31 31 2c 23  |.v.MOV     R11,#|
00002080  31 0d 0c 80 12 2e 6c 69  76 65 76 65 72 74 5f 70  |1.....livevert_p|
00002090  6f 6c 6c 0d 0c 8a 34 4c  44 52 20 20 20 20 20 52  |oll...4LDR     R|
000020a0  38 2c 5b 52 36 5d 20 20  20 20 20 20 20 20 20 3b  |8,[R6]         ;|
000020b0  20 53 74 61 72 74 20 70  69 78 65 6c 20 72 65 61  | Start pixel rea|
000020c0  64 20 63 79 63 6c 65 0d  0c 94 32 4c 44 52 20 20  |d cycle...2LDR  |
000020d0  20 20 20 52 38 2c 5b 52  31 2c 52 39 5d 20 20 20  |   R8,[R1,R9]   |
000020e0  20 20 20 3b 20 54 65 72  6d 69 6e 61 74 65 20 72  |   ; Terminate r|
000020f0  65 61 64 20 63 79 63 6c  65 0d 0c 9e 2f 41 44 44  |ead cycle.../ADD|
00002100  20 20 20 20 20 52 31 31  2c 52 31 31 2c 23 31 20  |     R11,R11,#1 |
00002110  20 20 20 20 20 3b 20 49  6e 63 72 65 6d 65 6e 74  |     ; Increment|
00002120  20 63 6f 75 6e 74 65 72  0d 0c a8 29 43 4d 50 20  | counter...)CMP |
00002130  20 20 20 20 52 31 31 2c  23 26 38 30 30 30 20 20  |    R11,#&8000  |
00002140  20 20 20 20 3b 20 48 6f  77 20 6c 6f 6e 67 2e 2e  |    ; How long..|
00002150  2e 0d 0c b2 16 42 47 54  20 20 20 20 20 73 69 67  |.....BGT     sig|
00002160  6e 61 6c 67 6f 6e 65 0d  0c bc 15 54 53 54 20 20  |nalgone....TST  |
00002170  20 20 20 52 38 2c 23 26  32 30 30 30 0d 0c c6 19  |   R8,#&2000....|
00002180  42 45 51 20 20 20 20 20  6c 69 76 65 76 65 72 74  |BEQ     livevert|
00002190  5f 70 6f 6c 6c 0d 0c d0  04 0d 0c da 12 4d 4f 56  |_poll........MOV|
000021a0  20 20 20 20 20 52 31 31  2c 23 30 0d 0c e4 13 2e  |     R11,#0.....|
000021b0  6c 69 76 65 76 65 72 74  5f 70 6f 6c 6c 31 0d 0c  |livevert_poll1..|
000021c0  ee 2e 4c 44 52 20 20 20  20 20 52 38 2c 5b 52 36  |..LDR     R8,[R6|
000021d0  5d 20 20 20 20 20 20 20  20 20 3b 20 53 74 61 72  |]         ; Star|
000021e0  74 20 70 69 78 65 6c 20  72 65 61 64 0d 0c f8 32  |t pixel read...2|
000021f0  4c 44 52 20 20 20 20 20  52 38 2c 5b 52 31 2c 52  |LDR     R8,[R1,R|
00002200  39 5d 20 20 20 20 20 20  3b 20 54 65 72 6d 69 6e  |9]      ; Termin|
00002210  61 74 65 20 70 69 78 65  6c 20 72 65 61 64 0d 0d  |ate pixel read..|
00002220  02 29 41 44 44 20 20 20  20 20 52 31 31 2c 52 31  |.)ADD     R11,R1|
00002230  31 2c 23 31 20 20 20 20  20 20 3b 20 49 6e 63 20  |1,#1      ; Inc |
00002240  63 6f 75 6e 74 65 72 0d  0d 0c 2b 43 4d 50 20 20  |counter...+CMP  |
00002250  20 20 20 52 31 31 2c 23  26 38 30 30 30 20 20 20  |   R11,#&8000   |
00002260  20 20 20 3b 20 54 6f 6f  20 6d 61 6e 79 20 79 65  |   ; Too many ye|
00002270  74 3f 0d 0d 16 16 42 47  54 20 20 20 20 20 73 69  |t?....BGT     si|
00002280  67 6e 61 6c 67 6f 6e 65  0d 0d 20 15 54 53 54 20  |gnalgone.. .TST |
00002290  20 20 20 20 52 38 2c 23  26 32 30 30 30 0d 0d 2a  |    R8,#&2000..*|
000022a0  1a 42 4e 45 20 20 20 20  20 6c 69 76 65 76 65 72  |.BNE     livever|
000022b0  74 5f 70 6f 6c 6c 31 0d  0d 34 04 0d 0d 3e 31 4c  |t_poll1..4...>1L|
000022c0  44 52 20 20 20 20 20 52  38 2c 5b 52 31 5d 20 20  |DR     R8,[R1]  |
000022d0  20 20 20 20 20 20 20 3b  20 52 65 61 64 20 77 6f  |       ; Read wo|
000022e0  72 64 20 66 72 6f 6d 20  56 52 41 4d 0d 0d 48 42  |rd from VRAM..HB|
000022f0  4c 44 52 20 20 20 20 20  52 31 32 2c 66 69 65 6c  |LDR     R12,fiel|
00002300  64 69 6e 67 20 20 20 20  3b 20 47 72 61 62 62 69  |ding    ; Grabbi|
00002310  6e 67 20 73 69 6e 67 6c  65 20 66 69 65 6c 64 20  |ng single field |
00002320  61 74 20 74 68 65 20 6d  6f 6d 65 6e 74 3f 0d 0d  |at the moment?..|
00002330  52 12 43 4d 50 20 20 20  20 20 52 31 32 2c 23 30  |R.CMP     R12,#0|
00002340  0d 0d 5c 44 42 45 51 20  20 20 20 20 62 6f 74 68  |..\DBEQ     both|
00002350  66 69 65 6c 64 73 20 20  20 20 20 20 3b 20 49 66  |fields      ; If|
00002360  20 6e 6f 74 2c 20 64 6f  6e 27 74 20 63 61 72 65  | not, don't care|
00002370  20 77 68 69 63 68 20 66  69 65 6c 64 20 74 68 69  | which field thi|
00002380  73 20 69 73 0d 0d 66 49  4c 44 52 20 20 20 20 20  |s is..fILDR     |
00002390  52 31 31 2c 65 76 65 6e  66 69 65 6c 64 20 20 20  |R11,evenfield   |
000023a0  3b 20 4f 74 68 65 72 77  69 73 65 2c 20 66 69 6e  |; Otherwise, fin|
000023b0  64 20 6f 75 74 20 77 68  69 63 68 20 66 69 65 6c  |d out which fiel|
000023c0  64 20 69 73 20 72 65 71  75 69 72 65 64 0d 0d 70  |d is required..p|
000023d0  1b 4d 4f 56 20 20 20 20  20 52 31 31 2c 52 31 31  |.MOV     R11,R11|
000023e0  2c 4c 53 4c 20 23 31 34  0d 0d 7a 17 80 20 20 20  |,LSL #14..z..   |
000023f0  20 20 52 31 32 2c 52 38  2c 23 31 3c 3c 31 34 0d  |  R12,R8,#1<<14.|
00002400  0d 84 36 43 4d 50 20 20  20 20 20 52 31 32 2c 52  |..6CMP     R12,R|
00002410  31 31 20 20 20 20 20 20  20 20 20 3b 20 49 73 20  |11         ; Is |
00002420  74 68 69 73 20 74 68 65  20 66 69 65 6c 64 20 74  |this the field t|
00002430  6f 20 64 6f 3f 0d 0d 8e  2c 42 45 51 20 20 20 20  |o do?...,BEQ    |
00002440  20 62 6f 74 68 66 69 65  6c 64 73 20 20 20 20 20  | bothfields     |
00002450  20 3b 20 49 66 20 73 6f  2c 20 67 72 61 62 20 69  | ; If so, grab i|
00002460  74 0d 0d 98 43 42 20 20  20 20 20 20 20 6c 69 76  |t...CB       liv|
00002470  65 66 69 65 6c 64 5f 70  6f 6c 6c 20 20 3b 20 4f  |efield_poll  ; O|
00002480  74 68 65 72 77 69 73 65  2c 20 77 61 69 74 20 66  |therwise, wait f|
00002490  6f 72 20 74 68 65 20 6e  65 78 74 20 66 72 61 6d  |or the next fram|
000024a0  65 2e 2e 2e 0d 0d a2 04  0d 0d ac 0f 2e 62 6f 74  |e............bot|
000024b0  68 66 69 65 6c 64 73 0d  0d b6 39 53 54 52 20 20  |hfields...9STR  |
000024c0  20 20 20 52 38 2c 5b 52  36 5d 20 20 20 20 20 20  |   R8,[R6]      |
000024d0  20 20 20 3b 20 53 74 61  72 74 20 53 52 20 74 6f  |   ; Start SR to|
000024e0  20 6d 65 6d 6f 72 79 20  74 72 61 6e 73 66 65 72  | memory transfer|
000024f0  0d 0d c0 36 53 54 52 20  20 20 20 20 52 38 2c 5b  |...6STR     R8,[|
00002500  52 31 2c 52 39 5d 20 20  20 20 20 20 3b 20 54 65  |R1,R9]      ; Te|
00002510  72 6d 69 6e 61 74 65 20  74 72 61 6e 73 66 65 72  |rminate transfer|
00002520  20 63 79 63 6c 65 0d 0d  ca 4d 53 54 52 20 20 20  | cycle...MSTR   |
00002530  20 20 52 38 2c 5b 52 31  5d 20 20 20 20 20 20 20  |  R8,[R1]       |
00002540  20 20 3b 20 52 41 53 20  6f 6e 6c 79 20 72 65 66  |  ; RAS only ref|
00002550  72 65 73 68 2c 20 74 6f  20 61 6c 6c 6f 77 20 73  |resh, to allow s|
00002560  65 72 69 61 6c 20 56 52  41 4d 20 74 72 61 6e 73  |erial VRAM trans|
00002570  66 65 72 0d 0d d4 16 4d  4f 56 20 20 20 20 20 52  |fer....MOV     R|
00002580  31 30 2c 23 26 31 30 30  30 0d 0d de 12 4d 4f 56  |10,#&1000....MOV|
00002590  20 20 20 20 20 52 31 32  2c 23 30 0d 0d e8 04 0d  |     R12,#0.....|
000025a0  0d f2 11 2e 6c 69 76 65  6e 65 78 74 5f 72 6f 77  |....livenext_row|
000025b0  0d 0d fc 11 4d 4f 56 20  20 20 20 20 72 30 2c 23  |....MOV     r0,#|
000025c0  30 0d 0e 06 04 0d 0e 10  3b 2e 6c 69 76 65 45 6e  |0.......;.liveEn|
000025d0  64 5f 42 6c 61 6e 6b 20  20 20 20 20 20 20 20 20  |d_Blank         |
000025e0  20 3b 20 57 61 69 74 20  66 6f 72 20 74 68 65 20  | ; Wait for the |
000025f0  65 6e 64 20 62 6c 61 6e  6b 20 73 69 67 6e 61 6c  |end blank signal|
00002600  0d 0e 1a 34 4c 44 52 20  20 20 20 20 52 38 2c 5b  |...4LDR     R8,[|
00002610  52 36 5d 20 20 20 20 20  20 20 20 20 3b 20 53 74  |R6]         ; St|
00002620  61 72 74 20 70 69 78 65  6c 20 72 65 61 64 20 63  |art pixel read c|
00002630  79 63 6c 65 0d 0e 24 04  0d 0e 2e 2d 4c 44 52 20  |ycle..$....-LDR |
00002640  20 20 20 20 52 38 2c 5b  52 31 2c 52 39 5d 20 20  |    R8,[R1,R9]  |
00002650  20 20 20 20 3b 20 54 65  72 6d 69 6e 61 74 65 20  |    ; Terminate |
00002660  63 79 63 6c 65 0d 0e 38  04 0d 0e 42 33 41 44 44  |cycle..8...B3ADD|
00002670  20 20 20 20 20 52 30 2c  52 30 2c 23 31 20 20 20  |     R0,R0,#1   |
00002680  20 20 20 20 20 3b 20 49  6e 63 72 65 6d 65 6e 74  |     ; Increment|
00002690  20 72 6f 77 20 63 6f 75  6e 74 65 72 0d 0e 4c 15  | row counter..L.|
000026a0  43 4d 50 20 20 20 20 20  52 30 2c 23 26 38 30 30  |CMP     R0,#&800|
000026b0  30 0d 0e 56 16 42 47 54  20 20 20 20 20 73 69 67  |0..V.BGT     sig|
000026c0  6e 61 6c 67 6f 6e 65 0d  0e 60 31 54 53 54 20 20  |nalgone..`1TST  |
000026d0  20 20 20 52 38 2c 23 26  31 30 30 30 20 20 20 20  |   R8,#&1000    |
000026e0  20 20 20 3b 20 42 6c 61  6e 6b 20 73 69 67 6e 61  |   ; Blank signa|
000026f0  6c 20 66 6f 75 6e 64 3f  0d 0e 6a 19 42 45 51 20  |l found?..j.BEQ |
00002700  20 20 20 20 6c 69 76 65  45 6e 64 5f 42 6c 61 6e  |    liveEnd_Blan|
00002710  6b 0d 0e 74 04 0d 0e 7e  12 4d 4f 56 20 20 20 20  |k..t...~.MOV    |
00002720  20 52 31 31 2c 23 30 0d  0e 88 31 2e 6c 69 76 65  | R11,#0...1.live|
00002730  72 6f 77 5f 64 61 74 61  5f 69 6e 20 20 20 20 20  |row_data_in     |
00002740  20 20 20 3b 20 52 65 61  64 20 64 61 74 61 20 69  |   ; Read data i|
00002750  6e 74 6f 20 56 52 41 4d  0d 0e 92 2e 4c 44 52 20  |nto VRAM....LDR |
00002760  20 20 20 20 52 38 2c 5b  52 36 5d 20 20 20 20 20  |    R8,[R6]     |
00002770  20 20 20 20 3b 20 53 74  61 72 74 20 72 65 61 64  |    ; Start read|
00002780  20 63 79 63 6c 65 0d 0e  9c 32 4c 44 52 20 20 20  | cycle...2LDR   |
00002790  20 20 52 38 2c 5b 52 31  2c 52 39 5d 20 20 20 20  |  R8,[R1,R9]    |
000027a0  20 20 3b 20 54 65 72 6d  69 6e 61 74 65 20 72 65  |  ; Terminate re|
000027b0  61 64 20 63 79 63 6c 65  0d 0e a6 16 41 44 44 20  |ad cycle....ADD |
000027c0  20 20 20 20 52 31 31 2c  52 31 31 2c 23 31 0d 0e  |    R11,R11,#1..|
000027d0  b0 16 43 4d 50 20 20 20  20 20 52 31 31 2c 23 26  |..CMP     R11,#&|
000027e0  38 30 30 30 0d 0e ba 16  42 47 54 20 20 20 20 20  |8000....BGT     |
000027f0  73 69 67 6e 61 6c 67 6f  6e 65 0d 0e c4 15 54 53  |signalgone....TS|
00002800  54 20 20 20 20 20 52 38  2c 23 26 31 30 30 30 0d  |T     R8,#&1000.|
00002810  0e ce 1b 42 4e 45 20 20  20 20 20 6c 69 76 65 72  |...BNE     liver|
00002820  6f 77 5f 64 61 74 61 5f  69 6e 0d 0e d8 04 0d 0e  |ow_data_in......|
00002830  e2 4a 53 54 52 42 20 20  20 20 52 38 2c 5b 52 36  |.JSTRB    R8,[R6|
00002840  5d 2c 23 38 20 20 20 20  20 20 3b 20 50 61 73 73  |],#8      ; Pass|
00002850  20 56 52 41 4d 20 61 64  64 72 65 73 73 20 74 6f  | VRAM address to|
00002860  20 56 39 20 61 6e 64 20  73 74 61 72 74 20 72 65  | V9 and start re|
00002870  61 64 20 63 79 63 6c 65  0d 0e ec 32 53 54 52 42  |ad cycle...2STRB|
00002880  20 20 20 20 52 38 2c 5b  52 31 2c 52 39 5d 20 20  |    R8,[R1,R9]  |
00002890  20 20 20 20 3b 20 54 65  72 6d 69 6e 61 74 65 20  |    ; Terminate |
000028a0  72 65 61 64 20 63 79 63  6c 65 0d 0e f6 41 43 4d  |read cycle...ACM|
000028b0  50 20 20 20 20 20 52 36  2c 52 32 20 20 20 20 20  |P     R6,R2     |
000028c0  20 20 20 20 20 20 3b 20  52 65 61 64 20 35 31 32  |      ; Read 512|
000028d0  2a 31 36 62 69 74 20 77  6f 72 64 73 20 69 6e 74  |*16bit words int|
000028e0  6f 20 56 52 41 4d 20 79  65 74 3f 0d 0f 00 3a 42  |o VRAM yet?...:B|
000028f0  4c 54 20 20 20 20 20 6c  69 76 65 6e 65 78 74 5f  |LT     livenext_|
00002900  72 6f 77 20 20 20 20 3b  20 49 66 20 6e 6f 74 2c  |row    ; If not,|
00002910  20 67 65 74 20 74 68 65  20 6e 65 78 74 20 72 6f  | get the next ro|
00002920  77 20 21 21 21 0d 0f 0a  17 84 52 20 20 20 20 20  |w !!!.....R     |
00002930  52 34 2c 52 31 2c 23 26  31 30 30 30 0d 0f 14 17  |R4,R1,#&1000....|
00002940  84 52 20 20 20 20 20 52  33 2c 52 31 2c 23 26 31  |.R     R3,R1,#&1|
00002950  38 30 30 0d 0f 1e 2a 84  52 20 20 20 20 20 52 32  |800...*.R     R2|
00002960  2c 52 31 2c 23 26 38 30  30 20 20 20 20 20 3b 20  |,R1,#&800     ; |
00002970  43 79 63 6c 65 20 74 79  70 65 20 32 61 0d 0f 28  |Cycle type 2a..(|
00002980  2d 84 52 20 20 20 20 20  52 32 2c 52 32 2c 23 38  |-.R     R2,R2,#8|
00002990  20 20 20 20 20 20 20 20  3b 20 56 52 41 4d 20 41  |        ; VRAM A|
000029a0  64 64 72 65 73 73 20 26  30 38 0d 0f 32 31 84 52  |ddress &08..21.R|
000029b0  20 20 20 20 20 52 37 2c  52 31 2c 23 26 31 30 30  |     R7,R1,#&100|
000029c0  30 20 20 20 20 3b 20 50  61 67 65 20 6d 6f 64 65  |0    ; Page mode|
000029d0  20 72 65 61 64 20 63 79  63 6c 65 0d 0f 3c 3a 84  | read cycle..<:.|
000029e0  52 20 20 20 20 20 52 37  2c 52 37 2c 23 26 32 30  |R     R7,R7,#&20|
000029f0  20 20 20 20 20 20 3b 20  56 52 41 4d 20 41 64 64  |      ; VRAM Add|
00002a00  72 65 73 73 20 26 31 34  20 61 74 20 74 68 65 20  |ress &14 at the |
00002a10  73 74 61 72 74 0d 0f 46  04 0d 0f 50 1c 4c 44 52  |start..F...P.LDR|
00002a20  20 20 20 20 20 52 31 30  2c 6c 69 76 65 70 61 67  |     R10,livepag|
00002a30  65 73 74 65 70 0d 0f 5a  1d 4c 44 52 20 20 20 20  |estep..Z.LDR    |
00002a40  20 52 31 31 2c 6c 69 76  65 70 69 78 65 6c 73 74  | R11,livepixelst|
00002a50  65 70 0d 0f 64 04 0d 0f  6e 35 41 44 44 20 20 20  |ep..d...n5ADD   |
00002a60  20 20 72 39 2c 72 31 2c  23 26 32 30 30 30 20 20  |  r9,r1,#&2000  |
00002a70  20 20 3b 20 50 61 67 69  6e 67 20 72 65 67 69 73  |  ; Paging regis|
00002a80  74 65 72 20 61 64 64 72  65 73 73 0d 0f 78 19 41  |ter address..x.A|
00002a90  44 44 20 20 20 20 20 72  31 32 2c 72 31 2c 23 26  |DD     r12,r1,#&|
00002aa0  33 30 30 30 0d 0f 82 04  0d 0f 8c 16 2e 6c 69 76  |3000.........liv|
00002ab0  65 6e 65 78 74 5f 72 6f  77 5f 64 6f 77 6e 0d 0f  |enext_row_down..|
00002ac0  96 40 3b 4d 4f 56 20 20  20 20 20 72 30 2c 23 31  |.@;MOV     r0,#1|
00002ad0  3c 3c 36 20 20 20 20 20  20 20 20 3b 20 42 69 74  |<<6        ; Bit|
00002ae0  20 36 20 63 6f 6e 74 72  6f 6c 73 20 68 61 72 64  | 6 controls hard|
00002af0  77 61 72 65 20 64 69 74  68 65 72 69 6e 67 0d 0f  |ware dithering..|
00002b00  a0 32 3b 53 54 52 20 20  20 20 20 72 30 2c 5b 72  |.2;STR     r0,[r|
00002b10  31 32 5d 20 20 20 20 20  20 20 20 3b 20 53 74 6f  |12]        ; Sto|
00002b20  72 65 20 69 6e 20 70 61  67 69 6e 67 20 72 65 67  |re in paging reg|
00002b30  0d 0f aa 14 3b 53 54 52  20 20 20 20 20 72 30 2c  |....;STR     r0,|
00002b40  5b 72 39 5d 0d 0f b4 12  3b 4d 4f 56 20 20 20 20  |[r9]....;MOV    |
00002b50  20 72 30 2c 23 30 0d 0f  be 15 3b 53 54 52 20 20  | r0,#0....;STR  |
00002b60  20 20 20 72 30 2c 5b 72  31 32 5d 0d 0f c8 14 3b  |   r0,[r12]....;|
00002b70  53 54 52 20 20 20 20 20  72 30 2c 5b 72 39 5d 0d  |STR     r0,[r9].|
00002b80  0f d2 04 0d 0f dc 3f 4c  44 52 42 20 20 20 20 52  |......?LDRB    R|
00002b90  38 2c 5b 52 32 5d 2c 52  31 30 20 20 20 20 20 3b  |8,[R2],R10     ;|
00002ba0  20 49 6e 69 74 69 61 74  65 20 72 65 61 64 20 63  | Initiate read c|
00002bb0  79 63 6c 65 20 66 6f 72  20 6e 65 78 74 20 6c 69  |ycle for next li|
00002bc0  6e 65 0d 0f e6 3e 53 55  42 20 20 20 20 20 52 37  |ne...>SUB     R7|
00002bd0  2c 52 37 2c 23 31 36 20  20 20 20 20 20 20 3b 20  |,R7,#16       ; |
00002be0  44 65 63 72 65 6d 65 6e  74 20 70 61 67 65 20 6d  |Decrement page m|
00002bf0  6f 64 65 20 72 65 61 64  20 63 6f 75 6e 74 65 72  |ode read counter|
00002c00  0d 0f f0 04 0d 0f fa 11  2e 6c 69 76 65 72 6f 77  |.........liverow|
00002c10  5f 72 65 61 64 0d 10 04  40 4c 44 52 42 20 20 20  |_read...@LDRB   |
00002c20  20 52 38 2c 5b 52 37 5d  2c 52 31 31 20 20 20 20  | R8,[R7],R11    |
00002c30  20 3b 20 44 6f 20 70 61  67 65 20 6d 6f 64 65 20  | ; Do page mode |
00002c40  72 65 61 64 20 74 6f 20  73 63 61 6e 20 74 68 65  |read to scan the|
00002c50  20 6c 69 6e 65 0d 10 0e  44 53 54 52 42 20 20 20  | line...DSTRB   |
00002c60  20 52 38 2c 5b 52 35 5d  2c 23 31 20 20 20 20 20  | R8,[R5],#1     |
00002c70  20 3b 20 50 75 74 20 74  68 65 20 38 62 70 70 20  | ; Put the 8bpp |
00002c80  64 61 74 61 20 69 6e 74  6f 20 74 68 65 20 6c 69  |data into the li|
00002c90  76 65 20 62 75 66 66 65  72 0d 10 18 34 43 4d 50  |ve buffer...4CMP|
00002ca0  20 20 20 20 20 52 37 2c  52 33 20 20 20 20 20 20  |     R7,R3      |
00002cb0  20 20 20 20 20 3b 20 52  65 61 64 20 61 20 77 68  |     ; Read a wh|
00002cc0  6f 6c 65 20 6c 69 6e 65  20 79 65 74 3f 0d 10 22  |ole line yet?.."|
00002cd0  37 42 4c 54 20 20 20 20  20 6c 69 76 65 72 6f 77  |7BLT     liverow|
00002ce0  5f 72 65 61 64 20 20 20  20 3b 20 49 66 20 6e 6f  |_read    ; If no|
00002cf0  74 2c 20 67 65 74 20 61  6e 6f 74 68 65 72 20 70  |t, get another p|
00002d00  69 78 65 6c 0d 10 2c 04  0d 10 36 39 53 55 42 20  |ixel..,...69SUB |
00002d10  20 20 20 20 52 37 2c 52  37 2c 23 26 38 30 30 20  |    R7,R7,#&800 |
00002d20  20 20 20 20 3b 20 44 65  63 72 65 6d 65 6e 74 20  |    ; Decrement |
00002d30  70 61 67 65 20 6d 6f 64  65 20 63 6f 75 6e 74 65  |page mode counte|
00002d40  72 0d 10 40 16 41 44 44  20 20 20 20 20 52 37 2c  |r..@.ADD     R7,|
00002d50  52 37 2c 23 26 31 30 0d  10 4a 33 4c 44 52 20 20  |R7,#&10..J3LDR  |
00002d60  20 20 20 52 38 2c 5b 52  37 2c 23 26 38 30 30 5d  |   R8,[R7,#&800]|
00002d70  20 20 20 3b 20 53 65 74  20 70 61 67 65 20 6d 6f  |   ; Set page mo|
00002d80  64 65 20 61 64 64 72 65  73 73 0d 10 54 31 43 4d  |de address..T1CM|
00002d90  50 20 20 20 20 20 52 32  2c 52 34 20 20 20 20 20  |P     R2,R4     |
00002da0  20 20 20 20 20 20 3b 20  52 65 61 64 20 32 35 36  |      ; Read 256|
00002db0  20 6c 69 6e 65 73 20 79  65 74 3f 0d 10 5e 3b 42  | lines yet?..^;B|
00002dc0  4c 54 20 20 20 20 20 6c  69 76 65 6e 65 78 74 5f  |LT     livenext_|
00002dd0  72 6f 77 5f 64 6f 77 6e  3b 20 49 66 20 6e 6f 74  |row_down; If not|
00002de0  2c 20 67 65 74 20 61 6e  6f 74 68 65 72 20 6c 69  |, get another li|
00002df0  6e 65 20 21 21 21 0d 10  68 1c 4c 44 52 20 20 20  |ne !!!..h.LDR   |
00002e00  20 20 52 30 2c 73 69 67  6e 61 6c 70 72 65 73 65  |  R0,signalprese|
00002e10  6e 74 0d 10 72 11 43 4d  50 20 20 20 20 20 52 30  |nt..r.CMP     R0|
00002e20  2c 23 30 0d 10 7c 16 42  45 51 20 20 20 20 20 73  |,#0..|.BEQ     s|
00002e30  69 67 6e 61 6c 62 61 63  6b 0d 10 86 12 54 45 51  |ignalback....TEQ|
00002e40  50 20 20 20 20 52 31 35  2c 23 30 0d 10 90 11 4d  |P    R15,#0....M|
00002e50  4f 56 4e 56 20 20 20 52  30 2c 52 30 0d 10 9a 12  |OVNV   R0,R0....|
00002e60  4d 4f 56 53 20 20 20 20  50 43 2c 52 31 34 0d 10  |MOVS    PC,R14..|
00002e70  a4 0f 2e 73 69 67 6e 61  6c 62 61 63 6b 0d 10 ae  |...signalback...|
00002e80  11 4d 4f 56 20 20 20 20  20 52 30 2c 23 31 0d 10  |.MOV     R0,#1..|
00002e90  b8 1c 53 54 52 20 20 20  20 20 52 30 2c 73 69 67  |..STR     R0,sig|
00002ea0  6e 61 6c 70 72 65 73 65  6e 74 0d 10 c2 11 4d 4f  |nalpresent....MO|
00002eb0  56 20 20 20 20 20 52 30  2c 23 30 0d 10 cc 41 53  |V     R0,#0...AS|
00002ec0  57 49 20 20 20 20 20 22  57 56 43 47 72 61 62 5f  |WI     "WVCGrab_|
00002ed0  52 65 66 72 65 73 68 22  20 3b 20 54 75 72 6e 73  |Refresh" ; Turns|
00002ee0  20 72 65 66 72 65 73 68  20 6f 66 66 2c 20 73 69  | refresh off, si|
00002ef0  67 6e 61 6c 20 69 73 20  62 61 63 6b 0d 10 d6 15  |gnal is back....|
00002f00  41 44 52 20 20 20 20 20  52 37 2c 73 69 67 6e 61  |ADR     R7,signa|
00002f10  6c 0d 10 e0 12 42 20 20  20 20 20 20 20 75 64 69  |l....B       udi|
00002f20  63 6f 6e 0d 10 ea 0f 2e  73 69 67 6e 61 6c 67 6f  |con.....signalgo|
00002f30  6e 65 0d 10 f4 1c 4c 44  52 20 20 20 20 20 52 30  |ne....LDR     R0|
00002f40  2c 73 69 67 6e 61 6c 70  72 65 73 65 6e 74 0d 10  |,signalpresent..|
00002f50  fe 11 43 4d 50 20 20 20  20 20 52 30 2c 23 30 0d  |..CMP     R0,#0.|
00002f60  11 08 16 42 4e 45 20 20  20 20 20 63 68 61 6e 67  |...BNE     chang|
00002f70  65 69 63 6f 6e 0d 11 12  12 54 45 51 50 20 20 20  |eicon....TEQP   |
00002f80  20 52 31 35 2c 23 30 0d  11 1c 11 4d 4f 56 4e 56  | R15,#0....MOVNV|
00002f90  20 20 20 52 36 2c 52 36  0d 11 26 12 4d 4f 56 53  |   R6,R6..&.MOVS|
00002fa0  20 20 20 20 50 43 2c 52  31 34 0d 11 30 0f 2e 63  |    PC,R14..0..c|
00002fb0  68 61 6e 67 65 69 63 6f  6e 0d 11 3a 11 4d 4f 56  |hangeicon..:.MOV|
00002fc0  20 20 20 20 20 52 30 2c  23 30 0d 11 44 1c 53 54  |     R0,#0..D.ST|
00002fd0  52 20 20 20 20 20 52 30  2c 73 69 67 6e 61 6c 70  |R     R0,signalp|
00002fe0  72 65 73 65 6e 74 0d 11  4e 11 4d 4f 56 20 20 20  |resent..N.MOV   |
00002ff0  20 20 52 30 2c 23 31 0d  11 58 41 53 57 49 20 20  |  R0,#1..XASWI  |
00003000  20 20 20 22 57 56 43 47  72 61 62 5f 52 65 66 72  |   "WVCGrab_Refr|
00003010  65 73 68 22 20 3b 20 54  75 72 6e 73 20 72 65 66  |esh" ; Turns ref|
00003020  72 65 73 68 20 6f 6e 2c  20 73 69 67 6e 61 6c 20  |resh on, signal |
00003030  68 61 73 20 67 6f 6e 65  0d 11 62 17 41 44 52 20  |has gone..b.ADR |
00003040  20 20 20 20 52 37 2c 6e  6f 73 69 67 6e 61 6c 0d  |    R7,nosignal.|
00003050  11 6c 0b 2e 75 64 69 63  6f 6e 0d 11 76 16 4c 44  |.l..udicon..v.LD|
00003060  4d 49 41 20 20 20 52 37  2c 7b 52 31 2d 52 33 7d  |MIA   R7,{R1-R3}|
00003070  0d 11 80 17 41 44 52 20  20 20 20 20 52 37 2c 62  |....ADR     R7,b|
00003080  61 72 73 70 61 63 65 0d  11 8a 16 53 54 4d 49 41  |arspace....STMIA|
00003090  20 20 20 52 37 2c 7b 52  31 2d 52 33 7d 0d 11 94  |   R7,{R1-R3}...|
000030a0  14 41 44 52 20 20 20 20  20 52 31 2c 69 63 6f 6e  |.ADR     R1,icon|
000030b0  62 0d 11 9e 1f 53 57 49  20 20 20 20 20 22 57 69  |b....SWI     "Wi|
000030c0  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
000030d0  0d 11 a8 12 54 45 51 50  20 20 20 20 52 31 35 2c  |....TEQP    R15,|
000030e0  23 30 0d 11 b2 11 4d 4f  56 4e 56 20 20 20 52 36  |#0....MOVNV   R6|
000030f0  2c 52 36 0d 11 bc 12 4d  4f 56 53 20 20 20 20 50  |,R6....MOVS    P|
00003100  43 2c 52 31 34 0d 11 c6  0b 2e 73 69 67 6e 61 6c  |C,R14.....signal|
00003110  0d 11 d0 1d 45 51 55 53  20 20 20 20 22 62 61 72  |....EQUS    "bar|
00003120  73 69 67 6e 61 6c 22 2b  bd 30 2b bd 30 0d 11 da  |signal"+.0+.0...|
00003130  09 41 4c 49 47 4e 0d 11  e4 0d 2e 6e 6f 73 69 67  |.ALIGN.....nosig|
00003140  6e 61 6c 0d 11 ee 19 45  51 55 53 20 20 20 20 22  |nal....EQUS    "|
00003150  62 61 72 6e 6f 73 69 67  6e 61 6c 22 0d 11 f8 0d  |barnosignal"....|
00003160  45 51 55 42 20 20 20 20  30 0d 12 02 09 41 4c 49  |EQUB    0....ALI|
00003170  47 4e 0d 12 0c 12 2e 73  69 67 6e 61 6c 70 72 65  |GN.....signalpre|
00003180  73 65 6e 74 0d 12 16 0d  45 51 55 44 20 20 20 20  |sent....EQUD    |
00003190  31 0d 12 20 0d 2e 62 61  72 73 70 61 63 65 0d 12  |1.. ..barspace..|
000031a0  2a 17 45 51 55 53 20 20  20 20 22 62 61 72 73 69  |*.EQUS    "barsi|
000031b0  67 6e 61 6c 22 0d 12 34  0d 45 51 55 42 20 20 20  |gnal"..4.EQUB   |
000031c0  20 30 0d 12 3e 09 41 4c  49 47 4e 0d 12 48 0f 2e  | 0..>.ALIGN..H..|
000031d0  6c 69 76 65 62 61 73 65  52 31 0d 12 52 0d 45 51  |livebaseR1..R.EQ|
000031e0  55 44 20 20 20 20 30 0d  12 5c 0d 2e 66 69 65 6c  |UD    0..\..fiel|
000031f0  64 69 6e 67 0d 12 66 0d  45 51 55 44 20 20 20 20  |ding..f.EQUD    |
00003200  30 0d 12 70 0e 2e 65 76  65 6e 66 69 65 6c 64 0d  |0..p..evenfield.|
00003210  12 7a 0d 45 51 55 44 20  20 20 20 31 0d 12 84 10  |.z.EQUD    1....|
00003220  2e 6c 69 76 65 64 75 6d  70 61 64 25 0d 12 8e 0d  |.livedumpad%....|
00003230  45 51 55 44 20 20 20 20  30 0d 12 98 11 2e 6c 69  |EQUD    0.....li|
00003240  76 65 70 61 67 65 73 74  65 70 0d 12 a2 0e 45 51  |vepagestep....EQ|
00003250  55 44 20 20 20 20 31 36  0d 12 ac 12 2e 6c 69 76  |UD    16.....liv|
00003260  65 70 69 78 65 6c 73 74  65 70 0d 12 b6 0d 45 51  |epixelstep....EQ|
00003270  55 44 20 20 20 20 38 0d  12 c0 0a 2e 69 63 6f 6e  |UD    8.....icon|
00003280  62 0d 12 ca 3b 45 51 55  44 20 30 3a 45 51 55 44  |b...;EQUD 0:EQUD|
00003290  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
000032a0  3a 45 51 55 44 20 30 3a  45 51 55 44 20 30 3a 45  |:EQUD 0:EQUD 0:E|
000032b0  51 55 44 20 30 3a 45 51  55 44 20 30 0d 12 d4 3b  |QUD 0:EQUD 0...;|
000032c0  45 51 55 44 20 30 3a 45  51 55 44 20 30 3a 45 51  |EQUD 0:EQUD 0:EQ|
000032d0  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
000032e0  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
000032f0  3a 45 51 55 44 20 30 0d  12 de 3b 45 51 55 44 20  |:EQUD 0...;EQUD |
00003300  30 3a 45 51 55 44 20 30  3a 45 51 55 44 20 30 3a  |0:EQUD 0:EQUD 0:|
00003310  45 51 55 44 20 30 3a 45  51 55 44 20 30 3a 45 51  |EQUD 0:EQUD 0:EQ|
00003320  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
00003330  20 30 0d 12 e8 3b 45 51  55 44 20 30 3a 45 51 55  | 0...;EQUD 0:EQU|
00003340  44 20 30 3a 45 51 55 44  20 30 3a 45 51 55 44 20  |D 0:EQUD 0:EQUD |
00003350  30 3a 45 51 55 44 20 30  3a 45 51 55 44 20 30 3a  |0:EQUD 0:EQUD 0:|
00003360  45 51 55 44 20 30 3a 45  51 55 44 20 30 0d 12 f2  |EQUD 0:EQUD 0...|
00003370  3b 45 51 55 44 20 30 3a  45 51 55 44 20 30 3a 45  |;EQUD 0:EQUD 0:E|
00003380  51 55 44 20 30 3a 45 51  55 44 20 30 3a 45 51 55  |QUD 0:EQUD 0:EQU|
00003390  44 20 30 3a 45 51 55 44  20 30 3a 45 51 55 44 20  |D 0:EQUD 0:EQUD |
000033a0  30 3a 45 51 55 44 20 30  0d 12 fc 05 5d 0d 13 06  |0:EQUD 0....]...|
000033b0  0b ed 20 70 61 73 73 25  0d 13 10 1f c8 99 20 22  |.. pass%...... "|
000033c0  57 56 43 47 72 61 62 5f  4d 65 6d 42 61 73 65 73  |WVCGrab_MemBases|
000033d0  22 20 b8 20 2c 72 31 0d  13 1a 12 21 6c 69 76 65  |" . ,r1....!live|
000033e0  62 61 73 65 52 31 3d 72  31 0d 13 24 05 e1 0d 13  |baseR1=r1..$....|
000033f0  2e 04 0d 13 38 0e dd 20  f2 73 65 74 76 61 72 73  |....8.. .setvars|
00003400  0d 13 42 10 6c 6f 6e 67  73 70 25 3d 38 34 30 30  |..B.longsp%=8400|
00003410  0d 13 4c 17 74 65 6d 70  6c 61 74 65 73 70 61 63  |..L.templatespac|
00003420  65 25 3d 38 30 39 36 0d  13 56 15 6d 61 78 6d 65  |e%=8096..V.maxme|
00003430  6e 75 73 69 7a 65 25 3d  31 30 30 30 0d 13 60 91  |nusize%=1000..`.|
00003440  de 20 62 6c 6f 63 6b 25  20 34 2c 70 62 25 20 32  |. block% 4,pb% 2|
00003450  30 34 38 2c 69 63 6f 6e  73 70 25 20 74 65 6d 70  |048,iconsp% temp|
00003460  6c 61 74 65 73 70 61 63  65 25 2c 6d 6f 75 73 65  |latespace%,mouse|
00003470  62 25 20 32 30 2c 6d 65  6e 75 62 25 20 31 30 30  |b% 20,menub% 100|
00003480  30 30 2c 6c 6f 6e 67 69  74 65 6d 73 25 20 6c 6f  |00,longitems% lo|
00003490  6e 67 73 70 25 2c 6d 62  25 20 33 30 30 34 38 2c  |ngsp%,mb% 30048,|
000034a0  6d 61 67 74 25 20 33 32  2c 6c 69 76 65 70 61 6c  |magt% 32,livepal|
000034b0  25 20 32 35 36 2c 67 72  61 62 70 61 6c 25 20 32  |% 256,grabpal% 2|
000034c0  35 36 2c 6d 6f 64 65 62  25 20 31 30 30 0d 13 6a  |56,modeb% 100..j|
000034d0  17 6c 69 76 65 70 6c 6f  74 25 3d 6c 69 76 65 70  |.liveplot%=livep|
000034e0  6c 6f 74 25 0d 13 74 12  74 65 6d 70 73 69 7a 65  |lot%..t.tempsize|
000034f0  25 3d 38 30 30 30 0d 13  7e 1f de 20 74 65 6d 70  |%=8000..~.. temp|
00003500  62 25 20 74 65 6d 70 73  69 7a 65 25 2c 77 25 28  |b% tempsize%,w%(|
00003510  31 37 2c 32 29 0d 13 88  12 de 20 49 49 43 62 6c  |17,2)..... IICbl|
00003520  6f 63 6b 25 20 31 30 0d  13 92 12 63 74 65 6d 70  |ock% 10....ctemp|
00003530  62 25 3d 74 65 6d 70 62  25 0d 13 9c 19 24 28 6d  |b%=tempb%....$(m|
00003540  6f 64 65 62 25 2b 34 29  3d 22 61 30 2d 39 22 2b  |odeb%+4)="a0-9"+|
00003550  bd 30 0d 13 a6 27 73 75  62 6d 6f 64 65 24 3d 22  |.0...'submode$="|
00003560  4d 6f 64 65 7c 2a 6d 6f  64 65 62 25 2c 6d 6f 64  |Mode|*modeb%,mod|
00003570  65 62 25 2b 34 2c 34 7c  22 0d 13 b0 15 e3 20 73  |eb%+4,4|"..... s|
00003580  65 74 25 3d 30 20 b8 20  32 38 20 88 20 34 0d 13  |et%=0 . 28 . 4..|
00003590  ba 10 6d 61 67 74 25 21  73 65 74 25 3d 31 0d 13  |..magt%!set%=1..|
000035a0  c4 05 ed 0d 13 ce 12 24  62 6c 6f 63 6b 25 3d 22  |.......$block%="|
000035b0  54 41 53 4b 22 0d 13 d8  11 77 6b 73 70 25 3d 69  |TASK"....wksp%=i|
000035c0  63 6f 6e 73 70 25 0d 13  e2 20 73 70 6e 64 25 3d  |consp%... spnd%=|
000035d0  69 63 6f 6e 73 70 25 2b  74 65 6d 70 6c 61 74 65  |iconsp%+template|
000035e0  73 70 61 63 65 25 0d 13  ec 0c 63 6c 6f 73 65 25  |space%....close%|
000035f0  3d a3 0d 13 f6 0f 71 75  69 74 74 69 6e 67 25 3d  |=.....quitting%=|
00003600  a3 0d 14 00 0f 71 75 69  74 68 61 6e 64 25 3d 30  |.....quithand%=0|
00003610  0d 14 0a 0e 73 63 72 61  70 70 79 25 3d a3 0d 14  |....scrappy%=...|
00003620  14 0d 73 61 76 65 64 38  25 3d b9 0d 14 1e 0e 73  |..saved8%=.....s|
00003630  61 76 65 64 31 32 25 3d  b9 0d 14 28 0e 6f 6c 64  |aved12%=...(.old|
00003640  6d 6f 64 65 25 3d eb 0d  14 32 0b 6c 69 76 65 25  |mode%=...2.live%|
00003650  3d b9 0d 14 3c 0d 67 72  61 62 65 78 25 3d a3 0d  |=...<.grabex%=..|
00003660  14 46 0c 63 66 73 69 64  25 3d a3 0d 14 50 0f 6f  |.F.cfsid%=...P.o|
00003670  6c 64 6d 65 6e 75 25 3d  2d 31 0d 14 5a 0c 73 6c  |ldmenu%=-1..Z.sl|
00003680  61 76 65 25 3d a3 0d 14  64 0c 71 66 6c 61 67 25  |ave%=...d.qflag%|
00003690  3d a3 0d 14 6e 08 63 25  3d a3 0d 14 78 05 e1 0d  |=...n.c%=...x...|
000036a0  14 82 16 dd 20 a4 74 61  73 6b 69 6e 69 74 28 74  |.... .taskinit(t|
000036b0  61 73 6b 24 29 0d 14 8c  45 c8 99 20 22 57 69 6d  |ask$)...E.. "Wim|
000036c0  70 5f 49 6e 69 74 69 61  6c 69 73 65 22 2c 32 30  |p_Initialise",20|
000036d0  30 2c 21 62 6c 6f 63 6b  25 2c 74 61 73 6b 24 20  |0,!block%,task$ |
000036e0  b8 20 77 69 6d 70 76 65  72 73 69 6f 6e 25 2c 74  |. wimpversion%,t|
000036f0  61 73 6b 68 61 6e 64 6c  65 25 0d 14 96 10 3d 74  |askhandle%....=t|
00003700  61 73 6b 68 61 6e 64 6c  65 25 0d 14 a0 13 dd 20  |askhandle%..... |
00003710  f2 73 65 74 75 70 77 69  6e 64 6f 77 73 0d 14 aa  |.setupwindows...|
00003720  09 ea 20 6f 73 25 0d 14  b4 2d 73 68 25 3d 8e 28  |.. os%...-sh%=.(|
00003730  22 3c 46 61 73 74 47 72  61 62 24 44 69 72 3e 2e  |"<FastGrab$Dir>.|
00003740  52 65 73 6f 75 72 63 65  73 2e 53 70 72 69 74 65  |Resources.Sprite|
00003750  73 22 29 0d 14 be 2f e7  20 73 68 25 3d 30 20 85  |s").../. sh%=0 .|
00003760  20 32 31 34 2c 22 53 70  72 69 74 65 20 66 69 6c  | 214,"Sprite fil|
00003770  65 20 63 61 6e 6e 6f 74  20 62 65 20 66 6f 75 6e  |e cannot be foun|
00003780  64 22 0d 14 c8 17 de 20  73 70 72 69 74 65 73 25  |d"..... sprites%|
00003790  20 a2 23 73 68 25 2b 31  36 0d 14 d2 16 21 73 70  | .#sh%+16....!sp|
000037a0  72 69 74 65 73 25 3d a2  23 73 68 25 2b 31 36 0d  |rites%=.#sh%+16.|
000037b0  14 dc 10 73 70 72 69 74  65 73 25 21 34 3d 30 0d  |...sprites%!4=0.|
000037c0  14 e6 11 73 70 72 69 74  65 73 25 21 38 3d 31 36  |...sprites%!8=16|
000037d0  0d 14 f0 12 73 70 72 69  74 65 73 25 21 31 32 3d  |....sprites%!12=|
000037e0  31 36 0d 14 fa 09 d9 23  73 68 25 0d 15 04 44 c8  |16.....#sh%...D.|
000037f0  99 20 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |. "OS_SpriteOp",|
00003800  32 36 36 2c 73 70 72 69  74 65 73 25 2c 22 3c 46  |266,sprites%,"<F|
00003810  61 73 74 47 72 61 62 24  44 69 72 3e 2e 52 65 73  |astGrab$Dir>.Res|
00003820  6f 75 72 63 65 73 2e 53  70 72 69 74 65 73 22 0d  |ources.Sprites".|
00003830  15 0e 40 c8 99 20 22 57  69 6d 70 5f 4f 70 65 6e  |..@.. "Wimp_Open|
00003840  54 65 6d 70 6c 61 74 65  22 2c 2c 22 3c 46 61 73  |Template",,"<Fas|
00003850  74 47 72 61 62 24 44 69  72 3e 2e 52 65 73 6f 75  |tGrab$Dir>.Resou|
00003860  72 63 65 73 2e 54 65 6d  70 6c 61 74 65 73 22 0d  |rces.Templates".|
00003870  15 18 42 f2 6c 74 65 6d  70 28 22 50 61 72 61 6d  |..B.ltemp("Param|
00003880  65 74 65 72 73 22 2c 77  25 28 31 2c 31 29 2c 30  |eters",w%(1,1),0|
00003890  29 3a f4 20 43 68 61 6e  67 65 20 30 20 74 6f 20  |):. Change 0 to |
000038a0  2d 31 20 66 6f 72 20 6e  65 77 20 69 63 6f 6e 73  |-1 for new icons|
000038b0  21 0d 15 22 18 6d 6f 64  65 61 64 25 3d a4 69 63  |!..".modead%=.ic|
000038c0  6f 6e 61 64 28 31 2c 30  29 0d 15 2c 16 78 31 61  |onad(1,0)..,.x1a|
000038d0  64 25 3d a4 69 63 6f 6e  61 64 28 31 2c 31 29 0d  |d%=.iconad(1,1).|
000038e0  15 36 16 78 32 61 64 25  3d a4 69 63 6f 6e 61 64  |.6.x2ad%=.iconad|
000038f0  28 31 2c 32 29 0d 15 40  16 79 31 61 64 25 3d a4  |(1,2)..@.y1ad%=.|
00003900  69 63 6f 6e 61 64 28 31  2c 33 29 0d 15 4a 16 79  |iconad(1,3)..J.y|
00003910  32 61 64 25 3d a4 69 63  6f 6e 61 64 28 31 2c 34  |2ad%=.iconad(1,4|
00003920  29 0d 15 54 1c 73 68 61  72 70 65 6e 61 64 25 3d  |)..T.sharpenad%=|
00003930  a4 69 63 6f 6e 61 64 28  31 2c 32 32 29 0d 15 5e  |.iconad(1,22)..^|
00003940  1a 62 6c 61 63 6b 61 64  25 3d a4 69 63 6f 6e 61  |.blackad%=.icona|
00003950  64 28 31 2c 33 30 29 0d  15 68 1a 67 61 6d 6d 61  |d(1,30)..h.gamma|
00003960  61 64 25 3d a4 69 63 6f  6e 61 64 28 31 2c 33 31  |ad%=.iconad(1,31|
00003970  29 0d 15 72 21 f2 6c 74  65 6d 70 28 22 50 41 4c  |)..r!.ltemp("PAL|
00003980  57 69 6e 64 6f 77 22 2c  77 25 28 32 2c 31 29 2c  |Window",w%(2,1),|
00003990  30 29 0d 15 7c 1a 62 72  69 67 68 74 61 64 25 3d  |0)..|.brightad%=|
000039a0  a4 69 63 6f 6e 61 64 28  32 2c 33 29 0d 15 86 18  |.iconad(2,3)....|
000039b0  63 6f 6e 74 61 64 25 3d  a4 69 63 6f 6e 61 64 28  |contad%=.iconad(|
000039c0  32 2c 38 29 0d 15 90 18  73 61 74 61 64 25 3d a4  |2,8)....satad%=.|
000039d0  69 63 6f 6e 61 64 28 32  2c 31 33 29 0d 15 9a 1f  |iconad(2,13)....|
000039e0  f2 6c 74 65 6d 70 28 22  4c 69 76 65 57 69 6e 22  |.ltemp("LiveWin"|
000039f0  2c 77 25 28 33 2c 31 29  2c 30 29 0d 15 a4 12 77  |,w%(3,1),0)....w|
00003a00  25 28 33 2c 31 29 3f 33  39 3d 26 46 46 0d 15 ae  |%(3,1)?39=&FF...|
00003a10  20 f2 6c 74 65 6d 70 28  22 4c 69 76 65 50 61 6e  | .ltemp("LivePan|
00003a20  65 22 2c 77 25 28 34 2c  31 29 2c 30 29 0d 15 b8  |e",w%(4,1),0)...|
00003a30  17 77 25 28 34 2c 31 29  21 36 38 3d 73 70 72 69  |.w%(4,1)!68=spri|
00003a40  74 65 73 25 0d 15 c2 39  77 25 28 34 2c 31 29 21  |tes%...9w%(4,1)!|
00003a50  28 38 38 2b 34 2b 31 36  2b 33 32 2a 31 29 3d 77  |(88+4+16+32*1)=w|
00003a60  25 28 34 2c 31 29 21 28  38 38 2b 34 2b 31 36 2b  |%(4,1)!(88+4+16+|
00003a70  33 32 2a 31 29 20 84 20  31 3c 3c 32 32 0d 15 cc  |32*1) . 1<<22...|
00003a80  67 e7 20 28 62 6f 61 72  64 5f 69 73 5f 31 36 5f  |g. (board_is_16_|
00003a90  62 69 74 25 3d a3 20 80  20 61 6c 6c 6f 77 5f 64  |bit%=. . allow_d|
00003aa0  69 74 68 65 72 69 6e 67  25 3d a3 29 20 8c 20 77  |ithering%=.) . w|
00003ab0  25 28 34 2c 31 29 21 28  38 38 2b 34 2b 31 36 2b  |%(4,1)!(88+4+16+|
00003ac0  33 32 2a 34 29 3d 77 25  28 34 2c 31 29 21 28 38  |32*4)=w%(4,1)!(8|
00003ad0  38 2b 34 2b 31 36 2b 33  32 2a 34 29 20 84 20 31  |8+4+16+32*4) . 1|
00003ae0  3c 3c 32 32 0d 15 d6 22  76 61 6c 69 64 25 3d 21  |<<22..."valid%=!|
00003af0  28 77 25 28 34 2c 31 29  2b 38 38 2b 34 2b 32 34  |(w%(4,1)+88+4+24|
00003b00  2b 33 32 2a 33 29 0d 15  e0 18 e7 20 62 6f 61 72  |+32*3)..... boar|
00003b10  64 5f 69 73 5f 31 36 5f  62 69 74 25 20 8c 0d 15  |d_is_16_bit% ...|
00003b20  ea 20 20 24 76 61 6c 69  64 25 3d 22 73 74 62 5f  |.  $valid%="stb_|
00003b30  31 36 62 69 74 2c 74 62  5f 38 62 69 74 22 0d 15  |16bit,tb_8bit"..|
00003b40  f4 05 cc 0d 15 fe 20 20  24 76 61 6c 69 64 25 3d  |......  $valid%=|
00003b50  22 73 74 62 5f 31 32 62  69 74 2c 74 62 5f 38 62  |"stb_12bit,tb_8b|
00003b60  69 74 22 0d 16 08 05 cd  0d 16 12 20 f2 6c 74 65  |it"........ .lte|
00003b70  6d 70 28 22 38 42 69 74  53 68 6f 77 22 2c 77 25  |mp("8BitShow",w%|
00003b80  28 35 2c 31 29 2c 30 29  0d 16 1c 12 77 25 28 35  |(5,1),0)....w%(5|
00003b90  2c 31 29 3f 33 39 3d 26  46 46 0d 16 26 1b 67 72  |,1)?39=&FF..&.gr|
00003ba0  61 62 77 74 69 74 6c 65  61 64 25 3d 77 6b 73 70  |abwtitlead%=wksp|
00003bb0  25 2d 32 35 35 0d 16 30  20 f2 6c 74 65 6d 70 28  |%-255..0 .ltemp(|
00003bc0  22 47 72 61 62 50 61 6e  65 22 2c 77 25 28 36 2c  |"GrabPane",w%(6,|
00003bd0  31 29 2c 30 29 0d 16 3a  17 77 25 28 36 2c 31 29  |1),0)..:.w%(6,1)|
00003be0  21 36 38 3d 73 70 72 69  74 65 73 25 0d 16 44 22  |!68=sprites%..D"|
00003bf0  f2 6c 74 65 6d 70 28 22  53 70 72 53 61 76 65 57  |.ltemp("SprSaveW|
00003c00  69 6e 22 2c 77 25 28 37  2c 31 29 2c 30 29 0d 16  |in",w%(7,1),0)..|
00003c10  4e 1a 6f 75 74 73 70 72  61 64 25 3d a4 69 63 6f  |N.outsprad%=.ico|
00003c20  6e 61 64 28 37 2c 32 29  0d 16 58 22 f2 6c 74 65  |nad(7,2)..X".lte|
00003c30  6d 70 28 22 52 61 77 53  61 76 65 57 69 6e 22 2c  |mp("RawSaveWin",|
00003c40  77 25 28 38 2c 31 29 2c  30 29 0d 16 62 1a 6f 75  |w%(8,1),0)..b.ou|
00003c50  74 72 61 77 61 64 25 3d  a4 69 63 6f 6e 61 64 28  |trawad%=.iconad(|
00003c60  38 2c 32 29 0d 16 6c 21  f2 6c 74 65 6d 70 28 22  |8,2)..l!.ltemp("|
00003c70  4d 61 67 6e 69 66 69 65  72 22 2c 77 25 28 39 2c  |Magnifier",w%(9,|
00003c80  31 29 2c 30 29 0d 16 76  25 6d 61 67 31 61 64 25  |1),0)..v%mag1ad%|
00003c90  3d a4 69 63 6f 6e 61 64  28 39 2c 30 29 3a 24 6d  |=.iconad(9,0):$m|
00003ca0  61 67 31 61 64 25 3d 22  31 22 0d 16 80 25 6d 61  |ag1ad%="1"...%ma|
00003cb0  67 32 61 64 25 3d a4 69  63 6f 6e 61 64 28 39 2c  |g2ad%=.iconad(9,|
00003cc0  31 29 3a 24 6d 61 67 32  61 64 25 3d 22 31 22 0d  |1):$mag2ad%="1".|
00003cd0  16 8a 23 f2 6c 74 65 6d  70 28 22 53 70 72 69 74  |..#.ltemp("Sprit|
00003ce0  65 49 6e 66 6f 22 2c 77  25 28 31 30 2c 31 29 2c  |eInfo",w%(10,1),|
00003cf0  30 29 0d 16 94 1d 67 72  61 62 6e 61 6d 65 61 64  |0)....grabnamead|
00003d00  25 3d a4 69 63 6f 6e 61  64 28 31 30 2c 30 29 0d  |%=.iconad(10,0).|
00003d10  16 9e 1d 67 72 61 62 6d  6f 64 65 61 64 25 3d a4  |...grabmodead%=.|
00003d20  69 63 6f 6e 61 64 28 31  30 2c 31 29 0d 16 a8 1d  |iconad(10,1)....|
00003d30  67 72 61 62 6d 61 73 6b  61 64 25 3d a4 69 63 6f  |grabmaskad%=.ico|
00003d40  6e 61 64 28 31 30 2c 32  29 0d 16 b2 1d 67 72 61  |nad(10,2)....gra|
00003d50  62 77 69 64 74 61 64 25  3d a4 69 63 6f 6e 61 64  |bwidtad%=.iconad|
00003d60  28 31 30 2c 33 29 0d 16  bc 1d 67 72 61 62 62 79  |(10,3)....grabby|
00003d70  74 65 61 64 25 3d a4 69  63 6f 6e 61 64 28 31 30  |tead%=.iconad(10|
00003d80  2c 34 29 0d 16 c6 1c 67  72 61 62 70 61 6c 61 64  |,4)....grabpalad|
00003d90  25 3d a4 69 63 6f 6e 61  64 28 31 30 2c 35 29 0d  |%=.iconad(10,5).|
00003da0  16 d0 1d 67 72 61 62 68  65 69 67 61 64 25 3d a4  |...grabheigad%=.|
00003db0  69 63 6f 6e 61 64 28 31  30 2c 36 29 0d 16 da 20  |iconad(10,6)... |
00003dc0  f2 6c 74 65 6d 70 28 22  52 61 77 49 6e 66 6f 22  |.ltemp("RawInfo"|
00003dd0  2c 77 25 28 31 31 2c 31  29 2c 30 29 0d 16 e4 1d  |,w%(11,1),0)....|
00003de0  72 61 77 62 79 74 65 73  61 64 25 3d a4 69 63 6f  |rawbytesad%=.ico|
00003df0  6e 61 64 28 31 31 2c 31  29 0d 16 ee 1d 72 61 77  |nad(11,1)....raw|
00003e00  77 69 64 74 68 61 64 25  3d a4 69 63 6f 6e 61 64  |widthad%=.iconad|
00003e10  28 31 31 2c 33 29 0d 16  f8 1e 72 61 77 68 65 69  |(11,3)....rawhei|
00003e20  67 68 74 61 64 25 3d a4  69 63 6f 6e 61 64 28 31  |ghtad%=.iconad(1|
00003e30  31 2c 35 29 0d 17 02 1e  72 61 77 62 72 69 67 68  |1,5)....rawbrigh|
00003e40  74 61 64 25 3d a4 69 63  6f 6e 61 64 28 31 31 2c  |tad%=.iconad(11,|
00003e50  39 29 0d 17 0c 1d 72 61  77 63 6f 6e 74 61 64 25  |9)....rawcontad%|
00003e60  3d a4 69 63 6f 6e 61 64  28 31 31 2c 31 31 29 0d  |=.iconad(11,11).|
00003e70  17 16 1c 72 61 77 73 61  74 61 64 25 3d a4 69 63  |...rawsatad%=.ic|
00003e80  6f 6e 61 64 28 31 31 2c  31 30 29 0d 17 20 1e f2  |onad(11,10).. ..|
00003e90  6c 74 65 6d 70 28 22 49  6e 66 6f 22 2c 77 25 28  |ltemp("Info",w%(|
00003ea0  31 33 2c 31 29 2c 2d 31  29 0d 17 2a 1b 24 a4 69  |13,1),-1)..*.$.i|
00003eb0  63 6f 6e 61 64 28 31 33  2c 37 29 3d 76 65 72 73  |conad(13,7)=vers|
00003ec0  69 6f 6e 24 0d 17 34 22  f2 6c 74 65 6d 70 28 22  |ion$..4".ltemp("|
00003ed0  49 6d 61 67 65 49 6e 66  6f 22 2c 77 25 28 31 34  |ImageInfo",w%(14|
00003ee0  2c 31 29 2c 30 29 0d 17  3e 24 24 a4 69 63 6f 6e  |,1),0)..>$$.icon|
00003ef0  61 64 28 31 34 2c 34 29  3d a4 43 68 61 6e 67 65  |ad(14,4)=.Change|
00003f00  46 53 49 56 65 72 73 69  6f 6e 0d 17 48 1e f2 6c  |FSIVersion..H..l|
00003f10  74 65 6d 70 28 22 51 75  65 72 79 22 2c 77 25 28  |temp("Query",w%(|
00003f20  31 35 2c 31 29 2c 30 29  0d 17 52 1a 71 75 65 72  |15,1),0)..R.quer|
00003f30  79 61 64 25 3d a4 69 63  6f 6e 61 64 28 31 35 2c  |yad%=.iconad(15,|
00003f40  31 29 0d 17 5c 21 f2 6c  74 65 6d 70 28 22 53 70  |1)..\!.ltemp("Sp|
00003f50  65 65 64 57 69 6e 22 2c  77 25 28 31 37 2c 31 29  |eedWin",w%(17,1)|
00003f60  2c 30 29 0d 17 66 1a 73  70 65 65 64 61 64 25 3d  |,0)..f.speedad%=|
00003f70  a4 69 63 6f 6e 61 64 28  31 37 2c 33 29 0d 17 70  |.iconad(17,3)..p|
00003f80  1a c8 99 22 57 69 6d 70  5f 43 6c 6f 73 65 54 65  |..."Wimp_CloseTe|
00003f90  6d 70 6c 61 74 65 22 0d  17 7a 05 e1 0d 17 84 04  |mplate"..z......|
00003fa0  0d 17 8e 16 dd 20 a4 69  63 6f 6e 61 64 28 77 68  |..... .iconad(wh|
00003fb0  25 2c 69 68 25 29 0d 17  98 1c 3d 21 28 77 25 28  |%,ih%)....=!(w%(|
00003fc0  77 68 25 2c 31 29 2b 31  31 32 2b 69 68 25 2a 33  |wh%,1)+112+ih%*3|
00003fd0  32 29 0d 17 a2 04 0d 17  ac 2e dd 20 f2 6c 74 65  |2)......... .lte|
00003fe0  6d 70 28 74 65 6d 70 6e  61 6d 65 24 2c f8 20 61  |mp(tempname$,. a|
00003ff0  64 64 72 65 73 73 25 2c  69 6e 64 69 72 65 63 74  |ddress%,indirect|
00004000  65 64 25 29 0d 17 b6 54  c8 99 20 22 57 69 6d 70  |ed%)...T.. "Wimp|
00004010  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
00004020  63 74 65 6d 70 62 25 2b  34 2c 77 6b 73 70 25 2c  |ctempb%+4,wksp%,|
00004030  73 70 6e 64 25 2c 2d 31  2c 74 65 6d 70 6e 61 6d  |spnd%,-1,tempnam|
00004040  65 24 2c 30 20 b8 20 2c  2c 77 6b 73 70 25 2c 2c  |e$,0 . ,,wksp%,,|
00004050  2c 2c 66 6f 75 6e 64 25  0d 17 c0 47 e7 20 66 6f  |,,found%...G. fo|
00004060  75 6e 64 25 3d 30 20 c8  99 20 22 57 69 6d 70 5f  |und%=0 .. "Wimp_|
00004070  43 6c 6f 73 65 54 65 6d  70 6c 61 74 65 22 3a 85  |CloseTemplate":.|
00004080  20 30 2c 22 54 65 6d 70  6c 61 74 65 20 66 69 6c  | 0,"Template fil|
00004090  65 20 69 73 20 69 6e 63  6f 72 72 65 63 74 22 0d  |e is incorrect".|
000040a0  17 ca 14 61 64 64 72 65  73 73 25 3d 63 74 65 6d  |...address%=ctem|
000040b0  70 62 25 0d 17 d4 44 e7  20 28 63 74 65 6d 70 62  |pb%...D. (ctempb|
000040c0  25 2d 74 65 6d 70 62 25  2b 74 65 6d 70 73 69 7a  |%-tempb%+tempsiz|
000040d0  65 25 3c 34 30 30 29 20  85 20 30 2c 22 54 65 6d  |e%<400) . 0,"Tem|
000040e0  70 6c 61 74 65 73 20 6e  65 65 64 20 6d 6f 72 65  |plates need more|
000040f0  20 73 70 61 63 65 22 0d  17 de 1f 63 74 65 6d 70  | space"....ctemp|
00004100  62 25 2b 3d 34 2b 38 38  2b 63 74 65 6d 70 62 25  |b%+=4+88+ctempb%|
00004110  21 38 38 2a 33 32 0d 17  e8 26 e7 20 69 6e 64 69  |!88*32...&. indi|
00004120  72 65 63 74 65 64 25 20  61 64 64 72 65 73 73 25  |rected% address%|
00004130  21 36 38 3d 73 70 72 69  74 65 73 25 0d 17 f2 05  |!68=sprites%....|
00004140  e1 0d 17 fc 11 dd 20 f2  67 65 74 63 68 6f 69 63  |...... .getchoic|
00004150  65 73 0d 18 06 2e 69 6e  63 25 3d 8e 28 22 3c 46  |es....inc%=.("<F|
00004160  61 73 74 47 72 61 62 24  44 69 72 3e 2e 52 65 73  |astGrab$Dir>.Res|
00004170  6f 75 72 63 65 73 2e 43  68 6f 69 63 65 73 22 29  |ources.Choices")|
00004180  0d 18 10 0e e7 20 69 6e  63 25 3d 30 20 8c 0d 18  |..... inc%=0 ...|
00004190  1a 11 24 6d 6f 64 65 61  64 25 3d 22 31 35 22 0d  |..$modead%="15".|
000041a0  18 24 0e 24 78 31 61 64  25 3d 22 31 22 0d 18 2e  |.$.$x1ad%="1"...|
000041b0  0e 24 78 32 61 64 25 3d  22 31 22 0d 18 38 0e 24  |.$x2ad%="1"..8.$|
000041c0  79 31 61 64 25 3d 22 31  22 0d 18 42 0e 24 79 32  |y1ad%="1"..B.$y2|
000041d0  61 64 25 3d 22 31 22 0d  18 4c 10 6f 75 74 6d 6f  |ad%="1"..L.outmo|
000041e0  64 65 24 3d 22 20 22 0d  18 56 10 f2 73 65 74 66  |de$=" "..V..setf|
000041f0  6c 61 67 73 28 30 29 0d  18 60 12 24 73 68 61 72  |lags(0)..`.$shar|
00004200  70 65 6e 61 64 25 3d 22  22 0d 18 6a 10 63 6f 6e  |penad%=""..j.con|
00004210  74 72 61 73 74 25 3d 33  32 0d 18 74 11 73 61 76  |trast%=32..t.sav|
00004220  65 64 63 6f 6e 74 25 3d  33 32 0d 18 7e 12 73 61  |edcont%=32..~.sa|
00004230  74 75 72 61 74 69 6f 6e  25 3d 33 32 0d 18 88 18  |turation%=32....|
00004240  6f 6c 64 5f 73 61 74 25  3d 73 61 74 75 72 61 74  |old_sat%=saturat|
00004250  69 6f 6e 25 0d 18 92 10  73 61 76 65 64 73 61 74  |ion%....savedsat|
00004260  25 3d 33 32 0d 18 9c 11  62 72 69 67 68 74 6e 65  |%=32....brightne|
00004270  73 73 25 3d 30 0d 18 a6  12 73 61 76 65 64 62 72  |ss%=0....savedbr|
00004280  69 67 68 74 25 3d 30 0d  18 b0 0b 62 69 74 25 3d  |ight%=0....bit%=|
00004290  31 32 0d 18 ba 0f 64 69  74 68 65 72 65 64 25 3d  |12....dithered%=|
000042a0  31 0d 18 c4 2b e7 20 62  6f 61 72 64 5f 69 73 5f  |1...+. board_is_|
000042b0  31 36 5f 62 69 74 25 20  84 20 61 6c 6c 6f 77 5f  |16_bit% . allow_|
000042c0  64 69 74 68 65 72 69 6e  67 25 20 8c 0d 18 ce 10  |dithering% .....|
000042d0  20 64 69 74 68 65 72 24  3d 22 3e 22 0d 18 d8 05  | dither$=">"....|
000042e0  cc 0d 18 e2 10 20 64 69  74 68 65 72 24 3d 22 3c  |..... dither$="<|
000042f0  22 0d 18 ec 05 cd 0d 18  f6 13 e7 20 61 6c 6c 6f  |".......... allo|
00004300  77 5f 6d 6f 6e 6f 25 20  8c 0d 19 00 0d 20 6d 6f  |w_mono% ..... mo|
00004310  6e 6f 24 3d 22 22 0d 19  0a 05 cc 0d 19 14 0e 20  |no$=""......... |
00004320  6d 6f 6e 6f 24 3d 22 3c  22 0d 19 1e 05 cd 0d 19  |mono$="<".......|
00004330  28 0e 6c 74 6f 6f 6c 24  3d 22 3e 22 0d 19 32 0e  |(.ltool$=">"..2.|
00004340  67 74 6f 6f 6c 24 3d 22  3e 22 0d 19 3c 0d 73 70  |gtool$=">"..<.sp|
00004350  65 65 64 25 3d 39 39 0d  19 46 0d 66 69 65 6c 64  |eed%=99..F.field|
00004360  24 3d 22 22 0d 19 50 0f  21 66 69 65 6c 64 69 6e  |$=""..P.!fieldin|
00004370  67 3d 30 0d 19 5a 10 21  65 76 65 6e 66 69 65 6c  |g=0..Z.!evenfiel|
00004380  64 3d 30 0d 19 64 0e f2  66 69 65 6c 64 6d 65 6e  |d=0..d..fieldmen|
00004390  75 0d 19 6e 0d 63 61 63  68 65 24 3d 22 22 0d 19  |u..n.cache$=""..|
000043a0  78 10 24 6d 6f 64 65 62  25 3d 22 31 35 22 0d 19  |x.$modeb%="15"..|
000043b0  82 0f 67 72 61 62 73 69  7a 65 25 3d 30 0d 19 8c  |..grabsize%=0...|
000043c0  0f 6c 69 76 65 73 69 7a  65 25 3d 32 0d 19 96 11  |.livesize%=2....|
000043d0  f2 73 65 6c 65 63 74 28  32 36 2c 30 29 0d 19 a0  |.select(26,0)...|
000043e0  11 f2 73 65 6c 65 63 74  28 32 37 2c 30 29 0d 19  |..select(27,0)..|
000043f0  aa 11 f2 73 65 6c 65 63  74 28 32 38 2c 30 29 0d  |...select(28,0).|
00004400  19 b4 12 24 62 6c 61 63  6b 61 64 25 3d 22 33 32  |...$blackad%="32|
00004410  22 0d 19 be 11 f2 73 65  6c 65 63 74 28 32 39 2c  |".....select(29,|
00004420  30 29 0d 19 c8 13 24 67  61 6d 6d 61 61 64 25 3d  |0)....$gammaad%=|
00004430  22 32 2e 32 22 0d 19 d2  05 cc 0d 19 dc 10 6d 6f  |"2.2".........mo|
00004440  64 65 25 3d 9a 23 69 6e  63 25 0d 19 e6 13 24 6d  |de%=.#inc%....$m|
00004450  6f 64 65 61 64 25 3d c3  6d 6f 64 65 25 0d 19 f0  |odead%=.mode%...|
00004460  11 e8 23 69 6e 63 25 2c  24 78 31 61 64 25 0d 19  |..#inc%,$x1ad%..|
00004470  fa 11 e8 23 69 6e 63 25  2c 24 79 31 61 64 25 0d  |...#inc%,$y1ad%.|
00004480  1a 04 11 e8 23 69 6e 63  25 2c 24 78 32 61 64 25  |....#inc%,$x2ad%|
00004490  0d 1a 0e 11 e8 23 69 6e  63 25 2c 24 79 32 61 64  |.....#inc%,$y2ad|
000044a0  25 0d 1a 18 21 6f 70 74  69 6f 6e 73 25 3d 9a 23  |%...!options%=.#|
000044b0  69 6e 63 25 20 84 20 28  9a 23 69 6e 63 25 29 3c  |inc% . (.#inc%)<|
000044c0  3c 38 0d 1a 22 17 f2 73  65 74 66 6c 61 67 73 28  |<8.."..setflags(|
000044d0  6f 70 74 69 6f 6e 73 25  29 0d 1a 2c 19 24 73 68  |options%)..,.$sh|
000044e0  61 72 70 65 6e 61 64 25  3d c3 28 9a 23 69 6e 63  |arpenad%=.(.#inc|
000044f0  25 29 0d 1a 36 16 62 72  69 67 68 74 6e 65 73 73  |%)..6.brightness|
00004500  25 3d 9a 23 69 6e 63 25  0d 1a 40 1c 73 61 76 65  |%=.#inc%..@.save|
00004510  64 62 72 69 67 68 74 25  3d 62 72 69 67 68 74 6e  |dbright%=brightn|
00004520  65 73 73 25 0d 1a 4a 14  63 6f 6e 74 72 61 73 74  |ess%..J.contrast|
00004530  25 3d 9a 23 69 6e 63 25  0d 1a 54 18 73 61 76 65  |%=.#inc%..T.save|
00004540  64 63 6f 6e 74 25 3d 63  6f 6e 74 72 61 73 74 25  |dcont%=contrast%|
00004550  0d 1a 5e 16 73 61 74 75  72 61 74 69 6f 6e 25 3d  |..^.saturation%=|
00004560  9a 23 69 6e 63 25 0d 1a  68 19 73 61 76 65 64 73  |.#inc%..h.saveds|
00004570  61 74 25 3d 73 61 74 75  72 61 74 69 6f 6e 25 0d  |at%=saturation%.|
00004580  1a 72 18 6f 6c 64 5f 73  61 74 25 3d 73 61 74 75  |.r.old_sat%=satu|
00004590  72 61 74 69 6f 6e 25 0d  1a 7c 10 74 6f 6f 6c 25  |ration%..|.tool%|
000045a0  3d 9a 23 69 6e 63 25 0d  1a 86 22 e7 20 28 74 6f  |=.#inc%...". (to|
000045b0  6f 6c 25 20 80 20 31 29  20 62 69 74 25 3d 31 32  |ol% . 1) bit%=12|
000045c0  20 8b 20 62 69 74 25 3d  38 0d 1a 90 28 e7 20 28  | . bit%=8...(. (|
000045d0  74 6f 6f 6c 25 20 80 20  32 29 20 6c 74 6f 6f 6c  |tool% . 2) ltool|
000045e0  24 3d 22 3e 22 20 8b 20  6c 74 6f 6f 6c 24 3d 22  |$=">" . ltool$="|
000045f0  22 0d 1a 9a 28 e7 20 28  74 6f 6f 6c 25 20 80 20  |"...(. (tool% . |
00004600  34 29 20 67 74 6f 6f 6c  24 3d 22 3e 22 20 8b 20  |4) gtool$=">" . |
00004610  67 74 6f 6f 6c 24 3d 22  22 0d 1a a4 28 e7 20 28  |gtool$=""...(. (|
00004620  74 6f 6f 6c 25 20 80 20  38 29 20 63 61 63 68 65  |tool% . 8) cache|
00004630  24 3d 22 3e 22 20 8b 20  63 61 63 68 65 24 3d 22  |$=">" . cache$="|
00004640  22 0d 1a ae 41 e7 20 28  74 6f 6f 6c 25 20 80 20  |"...A. (tool% . |
00004650  31 36 29 20 66 69 65 6c  64 24 3d 22 3e 22 3a 21  |16) field$=">":!|
00004660  66 69 65 6c 64 69 6e 67  3d 31 20 8b 20 66 69 65  |fielding=1 . fie|
00004670  6c 64 24 3d 22 22 3a 21  66 69 65 6c 64 69 6e 67  |ld$="":!fielding|
00004680  3d 30 0d 1a b8 1e 21 65  76 65 6e 66 69 65 6c 64  |=0....!evenfield|
00004690  3d 28 74 6f 6f 6c 25 20  80 20 33 32 29 3e 3e 34  |=(tool% . 32)>>4|
000046a0  0d 1a c2 28 e7 20 28 74  6f 6f 6c 25 20 80 20 31  |...(. (tool% . 1|
000046b0  32 38 29 20 6d 6f 6e 6f  24 3d 22 3e 22 20 8b 20  |28) mono$=">" . |
000046c0  6d 6f 6e 6f 24 3d 22 22  0d 1a cc 1f e7 20 61 6c  |mono$=""..... al|
000046d0  6c 6f 77 5f 6d 6f 6e 6f  25 3d a3 20 8c 20 6d 6f  |low_mono%=. . mo|
000046e0  6e 6f 24 3d 22 3c 22 0d  1a d6 18 e7 20 62 6f 61  |no$="<"..... boa|
000046f0  72 64 5f 69 73 5f 31 36  5f 62 69 74 25 20 8c 0d  |rd_is_16_bit% ..|
00004700  1a e0 46 20 e7 20 28 74  6f 6f 6c 25 20 80 20 36  |..F . (tool% . 6|
00004710  34 29 20 8c 20 64 69 74  68 65 72 65 64 25 3d 31  |4) . dithered%=1|
00004720  3a 64 69 74 68 65 72 24  3d 22 3e 22 20 8b 20 64  |:dither$=">" . d|
00004730  69 74 68 65 72 65 64 25  3d 30 3a 64 69 74 68 65  |ithered%=0:dithe|
00004740  72 24 3d 22 22 0d 1a ea  1b 20 f2 63 68 61 6e 67  |r$="".... .chang|
00004750  65 5f 4c 43 41 28 64 69  74 68 65 72 65 64 25 29  |e_LCA(dithered%)|
00004760  0d 1a f4 05 cc 0d 1a fe  17 20 c8 99 20 22 57 56  |......... .. "WV|
00004770  43 47 72 61 62 5f 4c 43  41 22 2c 30 0d 1b 08 0f  |CGrab_LCA",0....|
00004780  20 d6 20 73 65 74 5f 38  62 69 74 0d 1b 12 19 20  | . set_8bit.... |
00004790  e7 20 61 6c 6c 6f 77 5f  64 69 74 68 65 72 69 6e  |. allow_ditherin|
000047a0  67 25 20 8c 0d 1b 1c 11  20 20 64 69 74 68 65 72  |g% .....  dither|
000047b0  65 64 25 3d 31 0d 1b 26  11 20 20 64 69 74 68 65  |ed%=1..&.  dithe|
000047c0  72 24 3d 22 3e 22 0d 1b  30 06 20 cc 0d 1b 3a 11  |r$=">"..0. ...:.|
000047d0  20 20 64 69 74 68 65 72  65 64 25 3d 30 0d 1b 44  |  dithered%=0..D|
000047e0  11 20 20 64 69 74 68 65  72 24 3d 22 3c 22 0d 1b  |.  dither$="<"..|
000047f0  4e 06 20 cd 0d 1b 58 05  cd 0d 1b 62 18 6f 6c 64  |N. ...X....b.old|
00004800  5f 73 61 74 25 3d 73 61  74 75 72 61 74 69 6f 6e  |_sat%=saturation|
00004810  25 0d 1b 6c 0e f2 66 69  65 6c 64 6d 65 6e 75 0d  |%..l..fieldmenu.|
00004820  1b 76 11 73 70 65 65 64  25 3d 9a 23 69 6e 63 25  |.v.speed%=.#inc%|
00004830  0d 1b 80 25 6d 6f 64 65  76 61 6c 25 3d 9a 23 69  |...%modeval%=.#i|
00004840  6e 63 25 3a 24 6d 6f 64  65 62 25 3d c3 6d 6f 64  |nc%:$modeb%=.mod|
00004850  65 76 61 6c 25 0d 1b 8a  14 67 72 61 62 73 69 7a  |eval%....grabsiz|
00004860  65 25 3d 9a 23 69 6e 63  25 0d 1b 94 14 6c 69 76  |e%=.#inc%....liv|
00004870  65 73 69 7a 65 25 3d 9a  23 69 6e 63 25 0d 1b 9e  |esize%=.#inc%...|
00004880  24 73 65 6c 25 3d 9a 23  69 6e 63 25 3a e7 20 73  |$sel%=.#inc%:. s|
00004890  65 6c 25 20 f2 73 65 6c  65 63 74 28 32 36 2c 31  |el% .select(26,1|
000048a0  29 0d 1b a8 24 73 65 6c  25 3d 9a 23 69 6e 63 25  |)...$sel%=.#inc%|
000048b0  3a e7 20 73 65 6c 25 20  f2 73 65 6c 65 63 74 28  |:. sel% .select(|
000048c0  32 37 2c 31 29 0d 1b b2  24 73 65 6c 25 3d 9a 23  |27,1)...$sel%=.#|
000048d0  69 6e 63 25 3a e7 20 73  65 6c 25 20 f2 73 65 6c  |inc%:. sel% .sel|
000048e0  65 63 74 28 32 38 2c 31  29 0d 1b bc 17 24 62 6c  |ect(28,1)....$bl|
000048f0  61 63 6b 61 64 25 3d c3  28 9a 23 69 6e 63 25 29  |ackad%=.(.#inc%)|
00004900  0d 1b c6 24 73 65 6c 25  3d 9a 23 69 6e 63 25 3a  |...$sel%=.#inc%:|
00004910  e7 20 73 65 6c 25 20 f2  73 65 6c 65 63 74 28 32  |. sel% .select(2|
00004920  39 2c 31 29 0d 1b d0 14  e8 23 69 6e 63 25 2c 24  |9,1).....#inc%,$|
00004930  67 61 6d 6d 61 61 64 25  0d 1b da 13 70 72 65 63  |gammaad%....prec|
00004940  69 73 65 25 3d 9a 23 69  6e 63 25 0d 1b e4 10 e7  |ise%=.#inc%.....|
00004950  20 70 72 65 63 69 73 65  25 20 8c 0d 1b ee 18 20  | precise% ..... |
00004960  6f 6e 25 3d 33 32 3a 6f  75 74 6d 6f 64 65 24 3d  |on%=32:outmode$=|
00004970  22 50 22 0d 1b f8 10 20  e3 20 73 25 3d 37 20 b8  |"P".... . s%=7 .|
00004980  20 33 32 0d 1c 02 42 20  20 e7 20 73 25 3d 6f 6e  | 32...B  . s%=on|
00004990  25 20 f2 69 63 6f 6e 73  65 74 28 31 2c 73 25 2c  |% .iconset(1,s%,|
000049a0  31 3c 3c 32 31 2c 31 3c  3c 32 31 29 20 8b 20 f2  |1<<21,1<<21) . .|
000049b0  69 63 6f 6e 73 65 74 28  31 2c 73 25 2c 31 3c 3c  |iconset(1,s%,1<<|
000049c0  32 31 2c 30 29 0d 1c 0c  06 20 ed 0d 1c 16 05 cd  |21,0).... ......|
000049d0  0d 1c 20 0a d9 23 69 6e  63 25 0d 1c 2a 05 cd 0d  |.. ..#inc%..*...|
000049e0  1c 34 25 67 72 61 62 73  69 7a 65 24 3d a4 73 65  |.4%grabsize$=.se|
000049f0  74 73 69 7a 65 6d 65 6e  75 28 67 72 61 62 73 69  |tsizemenu(grabsi|
00004a00  7a 65 25 29 0d 1c 3e 25  6c 69 76 65 73 69 7a 65  |ze%)..>%livesize|
00004a10  24 3d a4 73 65 74 73 69  7a 65 6d 65 6e 75 28 6c  |$=.setsizemenu(l|
00004a20  69 76 65 73 69 7a 65 25  29 0d 1c 48 1c f2 73 70  |ivesize%)..H..sp|
00004a30  65 65 64 3a 24 73 70 65  65 64 61 64 25 3d c3 73  |eed:$speedad%=.s|
00004a40  70 65 65 64 25 0d 1c 52  21 f2 63 6f 6e 74 72 61  |peed%..R!.contra|
00004a50  73 74 3a 24 63 6f 6e 74  61 64 25 3d c3 63 6f 6e  |st:$contad%=.con|
00004a60  74 72 61 73 74 25 0d 1c  5c 27 f2 62 72 69 67 68  |trast%..\'.brigh|
00004a70  74 6e 65 73 73 3a 24 62  72 69 67 68 74 61 64 25  |tness:$brightad%|
00004a80  3d c3 62 72 69 67 68 74  6e 65 73 73 25 0d 1c 66  |=.brightness%..f|
00004a90  24 f2 73 61 74 75 72 61  74 69 6f 6e 3a 24 73 61  |$.saturation:$sa|
00004aa0  74 61 64 25 3d c3 73 61  74 75 72 61 74 69 6f 6e  |tad%=.saturation|
00004ab0  25 0d 1c 70 0f e7 20 62  69 74 25 3d 31 32 20 8c  |%..p.. bit%=12 .|
00004ac0  0d 1c 7a 1a 20 f2 69 63  6f 6e 73 65 74 28 34 2c  |..z. .iconset(4,|
00004ad0  33 2c 31 3c 3c 32 31 2c  30 29 0d 1c 84 05 cc 0d  |3,1<<21,0)......|
00004ae0  1c 8e 1e 20 f2 69 63 6f  6e 73 65 74 28 34 2c 33  |... .iconset(4,3|
00004af0  2c 31 3c 3c 32 31 2c 31  3c 3c 32 31 29 0d 1c 98  |,1<<21,1<<21)...|
00004b00  05 cd 0d 1c a2 05 e1 0d  1c ac 15 dd 20 f2 73 65  |............ .se|
00004b10  74 66 6c 61 67 73 28 73  65 74 25 29 0d 1c b6 12  |tflags(set%)....|
00004b20  e7 20 73 65 74 25 20 80  20 32 35 36 20 8c 0d 1c  |. set% . 256 ...|
00004b30  c0 19 f2 69 63 6f 6e 73  65 74 28 31 2c 36 2c 31  |...iconset(1,6,1|
00004b40  3c 3c 32 31 2c 30 29 0d  1c ca 1d f2 69 63 6f 6e  |<<21,0).....icon|
00004b50  73 65 74 28 31 2c 35 2c  31 3c 3c 32 31 2c 31 3c  |set(1,5,1<<21,1<|
00004b60  3c 32 31 29 0d 1c d4 05  cc 0d 1c de 1d f2 69 63  |<21)..........ic|
00004b70  6f 6e 73 65 74 28 31 2c  36 2c 31 3c 3c 32 31 2c  |onset(1,6,1<<21,|
00004b80  31 3c 3c 32 31 29 0d 1c  e8 19 f2 69 63 6f 6e 73  |1<<21).....icons|
00004b90  65 74 28 31 2c 35 2c 31  3c 3c 32 31 2c 30 29 0d  |et(1,5,1<<21,0).|
00004ba0  1c f2 05 cd 0d 1c fc 11  c8 8e 20 73 65 74 25 20  |.......... set% |
00004bb0  80 20 33 20 ca 0d 1d 06  07 c9 20 30 0d 1d 10 11  |. 3 ...... 0....|
00004bc0  20 6f 75 74 6d 6f 64 65  24 3d 22 20 22 0d 1d 1a  | outmode$=" "...|
00004bd0  0a 20 6f 6e 25 3d 37 0d  1d 24 07 c9 20 31 0d 1d  |. on%=7..$.. 1..|
00004be0  2e 11 20 6f 75 74 6d 6f  64 65 24 3d 22 43 22 0d  |.. outmode$="C".|
00004bf0  1d 38 0a 20 6f 6e 25 3d  38 0d 1d 42 07 c9 20 32  |.8. on%=8..B.. 2|
00004c00  0d 1d 4c 11 20 6f 75 74  6d 6f 64 65 24 3d 22 44  |..L. outmode$="D|
00004c10  22 0d 1d 56 0a 20 6f 6e  25 3d 39 0d 1d 60 07 c9  |"..V. on%=9..`..|
00004c20  20 33 0d 1d 6a 11 20 6f  75 74 6d 6f 64 65 24 3d  | 3..j. outmode$=|
00004c30  22 54 22 0d 1d 74 0b 20  6f 6e 25 3d 31 30 0d 1d  |"T"..t. on%=10..|
00004c40  7e 05 cb 0d 1d 88 0f e3  20 73 25 3d 37 20 b8 20  |~....... s%=7 . |
00004c50  33 32 0d 1d 92 41 20 e7  20 73 25 3d 6f 6e 25 20  |32...A . s%=on% |
00004c60  f2 69 63 6f 6e 73 65 74  28 31 2c 73 25 2c 31 3c  |.iconset(1,s%,1<|
00004c70  3c 32 31 2c 31 3c 3c 32  31 29 20 8b 20 f2 69 63  |<21,1<<21) . .ic|
00004c80  6f 6e 73 65 74 28 31 2c  73 25 2c 31 3c 3c 32 31  |onset(1,s%,1<<21|
00004c90  2c 30 29 0d 1d 9c 05 ed  0d 1d a6 1d f2 73 65 6c  |,0)..........sel|
00004ca0  65 63 74 28 31 31 2c 28  73 65 74 25 20 80 20 34  |ect(11,(set% . 4|
00004cb0  29 3e 3e 32 29 0d 1d b0  1d f2 73 65 6c 65 63 74  |)>>2).....select|
00004cc0  28 31 32 2c 28 73 65 74  25 20 80 20 38 29 3e 3e  |(12,(set% . 8)>>|
00004cd0  33 29 0d 1d ba 1e f2 73  65 6c 65 63 74 28 31 33  |3).....select(13|
00004ce0  2c 28 73 65 74 25 20 80  20 31 36 29 3e 3e 34 29  |,(set% . 16)>>4)|
00004cf0  0d 1d c4 1e f2 73 65 6c  65 63 74 28 31 34 2c 28  |.....select(14,(|
00004d00  73 65 74 25 20 80 20 33  32 29 3e 3e 35 29 0d 1d  |set% . 32)>>5)..|
00004d10  ce 1e f2 73 65 6c 65 63  74 28 31 35 2c 28 73 65  |...select(15,(se|
00004d20  74 25 20 80 20 36 34 29  3e 3e 36 29 0d 1d d8 1f  |t% . 64)>>6)....|
00004d30  f2 73 65 6c 65 63 74 28  31 36 2c 28 73 65 74 25  |.select(16,(set%|
00004d40  20 80 20 31 32 38 29 3e  3e 37 29 0d 1d e2 1f f2  | . 128)>>7).....|
00004d50  73 65 6c 65 63 74 28 32  33 2c 28 73 65 74 25 20  |select(23,(set% |
00004d60  80 20 35 31 32 29 3e 3e  39 29 0d 1d ec 21 f2 73  |. 512)>>9)...!.s|
00004d70  65 6c 65 63 74 28 32 34  2c 28 73 65 74 25 20 80  |elect(24,(set% .|
00004d80  20 31 30 32 34 29 3e 3e  31 30 29 0d 1d f6 21 f2  | 1024)>>10)...!.|
00004d90  73 65 6c 65 63 74 28 32  35 2c 28 73 65 74 25 20  |select(25,(set% |
00004da0  80 20 32 30 34 38 29 3e  3e 31 31 29 0d 1e 00 21  |. 2048)>>11)...!|
00004db0  f2 73 65 6c 65 63 74 28  32 37 2c 28 73 65 74 25  |.select(27,(set%|
00004dc0  20 80 20 34 30 39 36 29  3e 3e 31 32 29 0d 1e 0a  | . 4096)>>12)...|
00004dd0  05 e1 0d 1e 14 04 0d 1e  1e 1c dd 20 f2 73 65 6c  |........... .sel|
00004de0  65 63 74 28 69 63 6f 6e  25 2c 73 65 6c 65 63 74  |ect(icon%,select|
00004df0  25 29 0d 1e 28 27 f2 69  63 6f 6e 73 65 74 28 31  |%)..('.iconset(1|
00004e00  2c 69 63 6f 6e 25 2c 31  3c 3c 32 31 2c 73 65 6c  |,icon%,1<<21,sel|
00004e10  65 63 74 25 3c 3c 32 31  29 0d 1e 32 05 e1 0d 1e  |ect%<<21)..2....|
00004e20  3c 04 0d 1e 46 1e dd 20  f2 77 69 6d 70 73 65 72  |<...F.. .wimpser|
00004e30  76 69 63 65 28 65 76 65  6e 74 25 2c 70 62 25 29  |vice(event%,pb%)|
00004e40  0d 1e 50 0f c8 8e 20 65  76 65 6e 74 25 20 ca 0d  |..P... event% ..|
00004e50  1e 5a 07 c9 20 30 0d 1e  64 14 20 c8 8e 20 21 64  |.Z.. 0..d. .. !d|
00004e60  72 61 67 67 69 6e 67 25  20 ca 0d 1e 6e 0c 20 c9  |ragging% ...n. .|
00004e70  20 31 2c 32 2c 33 0d 1e  78 10 20 20 f2 64 6f 70  | 1,2,3..x.  .dop|
00004e80  61 6c 64 72 61 67 0d 1e  82 08 20 c9 20 34 0d 1e  |aldrag.... . 4..|
00004e90  8c 12 20 20 f2 64 6f 73  70 65 65 64 64 72 61 67  |..  .dospeeddrag|
00004ea0  0d 1e 96 06 20 cb 0d 1e  a0 07 c9 20 31 0d 1e aa  |.... ...... 1...|
00004eb0  0f 20 f2 72 65 64 72 61  77 77 69 6e 0d 1e b4 07  |. .redrawwin....|
00004ec0  c9 20 32 0d 1e be 0e 20  c8 8e 20 21 70 62 25 20  |. 2.... .. !pb% |
00004ed0  ca 0d 1e c8 0e 20 c9 20  77 25 28 33 2c 30 29 0d  |..... . w%(3,0).|
00004ee0  1e d2 16 20 20 f2 64 6f  70 61 6e 65 28 77 25 28  |...  .dopane(w%(|
00004ef0  33 2c 30 29 29 0d 1e dc  0e 20 c9 20 77 25 28 35  |3,0)).... . w%(5|
00004f00  2c 30 29 0d 1e e6 16 20  20 f2 64 6f 70 61 6e 65  |,0)....  .dopane|
00004f10  28 77 25 28 35 2c 30 29  29 0d 1e f0 06 20 7f 0d  |(w%(5,0)).... ..|
00004f20  1e fa 1f 20 20 c8 99 20  22 57 69 6d 70 5f 4f 70  |...  .. "Wimp_Op|
00004f30  65 6e 57 69 6e 64 6f 77  22 2c 2c 70 62 25 0d 1f  |enWindow",,pb%..|
00004f40  04 06 20 cb 0d 1f 0e 07  c9 20 33 0d 1f 18 0e 20  |.. ...... 3.... |
00004f50  c8 8e 20 21 70 62 25 20  ca 0d 1f 22 0e 20 c9 20  |.. !pb% ...". . |
00004f60  77 25 28 33 2c 30 29 0d  1f 2c 16 20 20 f2 73 68  |w%(3,0)..,.  .sh|
00004f70  75 74 6c 69 76 65 64 69  73 70 6c 61 79 0d 1f 36  |utlivedisplay..6|
00004f80  0e 20 c9 20 77 25 28 35  2c 30 29 0d 1f 40 0e 20  |. . w%(5,0)..@. |
00004f90  20 f2 64 77 69 6e 28 35  29 0d 1f 4a 0f 20 20 21  | .dwin(5)..J.  !|
00004fa0  67 72 61 62 77 62 3d 30  0d 1f 54 1b 20 20 e7 20  |grabwb=0..T.  . |
00004fb0  67 74 6f 6f 6c 24 3d 22  3e 22 20 f2 64 77 69 6e  |gtool$=">" .dwin|
00004fc0  28 36 29 0d 1f 5e 06 20  7f 0d 1f 68 21 20 20 c8  |(6)..^. ...h!  .|
00004fd0  99 20 22 57 69 6d 70 5f  44 65 6c 65 74 65 57 69  |. "Wimp_DeleteWi|
00004fe0  6e 64 6f 77 22 2c 2c 70  62 25 0d 1f 72 1d 20 20  |ndow",,pb%..r.  |
00004ff0  77 25 28 a4 77 69 6e 64  6f 77 69 64 28 21 70 62  |w%(.windowid(!pb|
00005000  25 29 2c 32 29 3d a3 0d  1f 7c 06 20 cb 0d 1f 86  |%),2)=...|. ....|
00005010  07 c9 20 36 0d 1f 90 11  20 f2 63 6c 69 63 6b 77  |.. 6.... .clickw|
00005020  69 6e 64 6f 77 0d 1f 9a  07 c9 20 37 0d 1f a4 0d  |indow..... 7....|
00005030  20 f2 64 72 61 67 65 6e  64 0d 1f ae 07 c9 20 38  | .dragend..... 8|
00005040  0d 1f b8 0f 20 f2 68 61  6e 64 6c 65 6b 65 79 0d  |.... .handlekey.|
00005050  1f c2 07 c9 20 39 0d 1f  cc 10 20 f2 6d 65 6e 75  |.... 9.... .menu|
00005060  73 65 6c 65 63 74 0d 1f  d6 0b c9 20 31 37 2c 31  |select..... 17,1|
00005070  38 0d 1f e0 0d 20 f2 6d  65 73 73 61 67 65 0d 1f  |8.... .message..|
00005080  ea 05 cb 0d 1f f4 05 e1  0d 1f fe 04 0d 20 08 16  |............. ..|
00005090  dd 20 f2 73 68 75 74 6c  69 76 65 64 69 73 70 6c  |. .shutlivedispl|
000050a0  61 79 0d 20 12 0c f2 64  77 69 6e 28 33 29 0d 20  |ay. ...dwin(3). |
000050b0  1c 0d 21 6c 69 76 65 77  62 3d 30 0d 20 26 19 e7  |..!livewb=0. &..|
000050c0  20 6c 74 6f 6f 6c 24 3d  22 3e 22 20 f2 64 77 69  | ltool$=">" .dwi|
000050d0  6e 28 34 29 0d 20 30 0b  6c 69 76 65 25 3d a3 0d  |n(4). 0.live%=..|
000050e0  20 3a 1a 21 6d 61 73 6b  61 64 3d 25 31 31 30 30  | :.!maskad=%1100|
000050f0  30 30 30 31 31 30 30 30  31 0d 20 44 40 e7 20 21  |000110001. D@. !|
00005100  73 69 67 6e 61 6c 70 72  65 73 65 6e 74 20 24 62  |signalpresent $b|
00005110  61 72 73 70 61 63 65 3d  22 62 61 72 64 6f 72 6d  |arspace="bardorm|
00005120  73 22 20 8b 20 24 62 61  72 73 70 61 63 65 3d 22  |s" . $barspace="|
00005130  62 61 72 64 6f 72 6d 6e  22 0d 20 4e 0b 21 6d 62  |bardormn". N.!mb|
00005140  25 3d 2d 31 0d 20 58 12  6d 62 25 21 34 3d 69 63  |%=-1. X.mb%!4=ic|
00005150  6f 6e 62 61 72 25 0d 20  62 0b 6d 62 25 21 38 3d  |onbar%. b.mb%!8=|
00005160  30 0d 20 6c 0c 6d 62 25  21 31 32 3d 30 0d 20 76  |0. l.mb%!12=0. v|
00005170  1f c8 99 20 22 57 69 6d  70 5f 53 65 74 49 63 6f  |... "Wimp_SetIco|
00005180  6e 53 74 61 74 65 22 2c  2c 6d 62 25 0d 20 80 05  |nState",,mb%. ..|
00005190  e1 0d 20 8a 04 0d 20 94  11 dd 20 a4 64 75 6d 70  |.. ... ... .dump|
000051a0  73 70 72 69 74 65 0d 20  9e 2d 24 28 6d 62 25 2b  |sprite. .-$(mb%+|
000051b0  34 29 3d 22 53 70 72 69  74 65 20 6e 6f 74 20 73  |4)="Sprite not s|
000051c0  61 76 65 64 20 2d 20 64  69 73 63 61 72 64 20 69  |aved - discard i|
000051d0  74 3f 22 0d 20 a8 37 c8  99 20 22 57 69 6d 70 5f  |t?". .7.. "Wimp_|
000051e0  52 65 70 6f 72 74 45 72  72 6f 72 22 2c 6d 62 25  |ReportError",mb%|
000051f0  2c 37 2c 22 46 61 73 74  47 72 61 62 22 20 b8 20  |,7,"FastGrab" . |
00005200  2c 72 65 73 70 6f 6e 73  65 25 0d 20 b2 19 e7 20  |,response%. ... |
00005210  72 65 73 70 6f 6e 73 65  25 3d 32 20 3d a3 20 8b  |response%=2 =. .|
00005220  20 3d b9 0d 20 bc 04 0d  20 c6 15 dd 20 f2 73 68  | =.. ... ... .sh|
00005230  75 74 64 6f 77 6e 28 61  72 67 25 29 0d 20 d0 0c  |utdown(arg%). ..|
00005240  e7 20 61 72 67 25 20 8c  0d 20 da 20 20 e7 20 ac  |. arg% .. .  . .|
00005250  20 73 61 76 65 64 31 32  25 20 80 20 28 64 65 62  | saved12% . (deb|
00005260  75 67 25 3d a3 29 20 8c  0d 20 e4 4d 20 20 f2 71  |ug%=.) .. .M  .q|
00005270  75 65 72 79 28 32 2c 22  49 6d 61 67 65 20 6e 6f  |uery(2,"Image no|
00005280  74 20 73 61 76 65 64 20  69 6e 20 46 61 73 74 47  |t saved in FastG|
00005290  72 61 62 3a 20 61 72 65  20 79 6f 75 20 73 75 72  |rab: are you sur|
000052a0  65 20 79 6f 75 20 77 61  6e 74 20 74 6f 20 71 75  |e you want to qu|
000052b0  69 74 3f 22 29 0d 20 ee  07 20 20 e1 0d 20 f8 06  |it?"). ..  .. ..|
000052c0  20 cd 0d 21 02 0f 20 e7  20 73 6c 61 76 65 25 20  | ..!.. . slave% |
000052d0  8c 0d 21 0c 2f 20 20 24  6d 62 25 3d 22 3c 46 61  |..!./  $mb%="<Fa|
000052e0  73 74 47 72 61 62 24 44  69 72 3e 2e 52 65 73 6f  |stGrab$Dir>.Reso|
000052f0  75 72 63 65 73 2e 54 77  65 6c 76 65 42 69 74 22  |urces.TwelveBit"|
00005300  0d 21 16 21 20 20 c8 99  20 22 4f 53 5f 46 53 43  |.!.!  .. "OS_FSC|
00005310  6f 6e 74 72 6f 6c 22 2c  32 37 2c 6d 62 25 2c 2c  |ontrol",27,mb%,,|
00005320  30 0d 21 20 0e 20 20 73  6c 61 76 65 25 3d a3 0d  |0.! .  slave%=..|
00005330  21 2a 06 20 cd 0d 21 34  05 cd 0d 21 3e 0c 63 6c  |!*. ..!4...!>.cl|
00005340  6f 73 65 25 3d b9 0d 21  48 11 e7 20 71 75 69 74  |ose%=..!H.. quit|
00005350  74 69 6e 67 25 20 8c 0d  21 52 24 20 c8 99 20 22  |ting% ..!R$ .. "|
00005360  57 69 6d 70 5f 47 65 74  43 61 72 65 74 50 6f 73  |Wimp_GetCaretPos|
00005370  69 74 69 6f 6e 22 2c 2c  6d 62 25 0d 21 5c 10 20  |ition",,mb%.!\. |
00005380  6d 62 25 21 32 34 3d 26  31 46 43 0d 21 66 22 20  |mb%!24=&1FC.!f" |
00005390  c8 99 20 22 57 69 6d 70  5f 53 65 6e 64 4d 65 73  |.. "Wimp_SendMes|
000053a0  73 61 67 65 22 2c 38 2c  6d 62 25 2c 30 0d 21 70  |sage",8,mb%,0.!p|
000053b0  2a 20 c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |* .. "Wimp_SendM|
000053c0  65 73 73 61 67 65 22 2c  38 2c 6d 62 25 2c 71 75  |essage",8,mb%,qu|
000053d0  69 74 68 61 6e 64 25 0d  21 7a 05 cd 0d 21 84 2a  |ithand%.!z...!.*|
000053e0  c8 99 20 22 57 69 6d 70  5f 43 6c 6f 73 65 44 6f  |.. "Wimp_CloseDo|
000053f0  77 6e 22 2c 74 61 73 6b  68 61 6e 64 6c 65 25 2c  |wn",taskhandle%,|
00005400  22 54 41 53 4b 22 0d 21  8e 05 e0 0d 21 98 05 e1  |"TASK".!....!...|
00005410  0d 21 a2 04 0d 21 ac 1c  dd 20 f2 71 75 65 72 79  |.!...!... .query|
00005420  28 71 6e 75 6d 25 2c 6d  65 73 73 61 67 65 24 29  |(qnum%,message$)|
00005430  0d 21 b6 10 71 66 6c 61  67 25 3d 71 6e 75 6d 25  |.!..qflag%=qnum%|
00005440  0d 21 c0 16 24 71 75 65  72 79 61 64 25 3d 6d 65  |.!..$queryad%=me|
00005450  73 73 61 67 65 24 0d 21  ca 31 f2 6d 65 6e 75 28  |ssage$.!.1.menu(|
00005460  31 35 2c 72 69 67 68 74  73 63 72 25 2f 32 2d 37  |15,rightscr%/2-7|
00005470  33 38 2f 32 2c 74 6f 70  73 63 72 25 2f 32 2b 32  |38/2,topscr%/2+2|
00005480  37 36 2f 32 2c 30 29 0d  21 d4 05 e1 0d 21 de 04  |76/2,0).!....!..|
00005490  0d 21 e8 10 dd 20 f2 72  65 64 72 61 77 77 69 6e  |.!... .redrawwin|
000054a0  0d 21 f2 0d c8 8e 20 21  70 62 25 20 ca 0d 21 fc  |.!.... !pb% ..!.|
000054b0  0d c9 20 77 25 28 32 2c  30 29 0d 22 06 28 20 c8  |.. w%(2,0).".( .|
000054c0  99 20 22 57 69 6d 70 5f  52 65 64 72 61 77 57 69  |. "Wimp_RedrawWi|
000054d0  6e 64 6f 77 22 2c 2c 70  62 25 20 b8 20 6d 6f 72  |ndow",,pb% . mor|
000054e0  65 25 0d 22 10 15 20 78  30 25 3d 70 62 25 21 34  |e%.".. x0%=pb%!4|
000054f0  2d 70 62 25 21 32 30 0d  22 1a 16 20 79 30 25 3d  |-pb%!20.".. y0%=|
00005500  70 62 25 21 31 36 2d 70  62 25 21 32 34 0d 22 24  |pb%!16-pb%!24."$|
00005510  0d 20 c8 95 20 6d 6f 72  65 25 0d 22 2e 07 20 20  |. .. more%."..  |
00005520  da 0d 22 38 1b 20 20 c8  99 20 22 57 69 6d 70 5f  |.."8.  .. "Wimp_|
00005530  53 65 74 43 6f 6c 6f 75  72 22 2c 37 0d 22 42 2b  |SetColour",7."B+|
00005540  20 20 c8 93 20 c8 90 20  78 30 25 2b 31 34 30 2c  |  .. .. x0%+140,|
00005550  79 30 25 2d 33 36 2c 62  72 69 67 68 74 6e 65 73  |y0%-36,brightnes|
00005560  73 25 2a 34 2c 32 30 0d  22 4c 29 20 20 c8 93 20  |s%*4,20."L)  .. |
00005570  c8 90 20 78 30 25 2b 31  34 30 2c 79 30 25 2d 38  |.. x0%+140,y0%-8|
00005580  30 2c 63 6f 6e 74 72 61  73 74 25 2a 34 2c 32 30  |0,contrast%*4,20|
00005590  0d 22 56 2c 20 20 c8 93  20 c8 90 20 78 30 25 2b  |."V,  .. .. x0%+|
000055a0  31 34 30 2c 79 30 25 2d  31 32 34 2c 73 61 74 75  |140,y0%-124,satu|
000055b0  72 61 74 69 6f 6e 25 2a  34 2c 32 30 0d 22 60 29  |ration%*4,20."`)|
000055c0  20 20 c8 99 20 22 57 69  6d 70 5f 47 65 74 52 65  |  .. "Wimp_GetRe|
000055d0  63 74 61 6e 67 6c 65 22  2c 2c 70 62 25 20 b8 20  |ctangle",,pb% . |
000055e0  6d 6f 72 65 25 0d 22 6a  06 20 ce 0d 22 74 0e c9  |more%."j. .."t..|
000055f0  20 77 25 28 31 37 2c 30  29 0d 22 7e 28 20 c8 99  | w%(17,0)."~( ..|
00005600  20 22 57 69 6d 70 5f 52  65 64 72 61 77 57 69 6e  | "Wimp_RedrawWin|
00005610  64 6f 77 22 2c 2c 70 62  25 20 b8 20 6d 6f 72 65  |dow",,pb% . more|
00005620  25 0d 22 88 15 20 78 30  25 3d 70 62 25 21 34 2d  |%.".. x0%=pb%!4-|
00005630  70 62 25 21 32 30 0d 22  92 16 20 79 30 25 3d 70  |pb%!20.".. y0%=p|
00005640  62 25 21 31 36 2d 70 62  25 21 32 34 0d 22 9c 0d  |b%!16-pb%!24."..|
00005650  20 c8 95 20 6d 6f 72 65  25 0d 22 a6 07 20 20 da  | .. more%."..  .|
00005660  0d 22 b0 1b 20 20 c8 99  20 22 57 69 6d 70 5f 53  |."..  .. "Wimp_S|
00005670  65 74 43 6f 6c 6f 75 72  22 2c 37 0d 22 ba 26 20  |etColour",7.".& |
00005680  20 c8 93 20 c8 90 20 78  30 25 2b 31 34 30 2c 79  | .. .. x0%+140,y|
00005690  30 25 2d 33 36 2c 73 70  65 65 64 25 2a 32 2c 32  |0%-36,speed%*2,2|
000056a0  30 0d 22 c4 29 20 20 c8  99 20 22 57 69 6d 70 5f  |0.".)  .. "Wimp_|
000056b0  47 65 74 52 65 63 74 61  6e 67 6c 65 22 2c 2c 70  |GetRectangle",,p|
000056c0  62 25 20 b8 20 6d 6f 72  65 25 0d 22 ce 06 20 ce  |b% . more%.".. .|
000056d0  0d 22 d8 05 cb 0d 22 e2  05 e1 0d 22 ec 04 0d 22  |."...."...."..."|
000056e0  f6 1a dd 20 f2 64 6f 70  61 6e 65 28 74 6f 6f 6c  |... .dopane(tool|
000056f0  77 69 6e 64 6f 77 25 29  0d 23 00 14 c8 8e 20 74  |window%).#.... t|
00005700  6f 6f 6c 77 69 6e 64 6f  77 25 20 ca 0d 23 0a 0d  |oolwindow% ..#..|
00005710  c9 20 77 25 28 33 2c 30  29 0d 23 14 12 20 70 61  |. w%(3,0).#.. pa|
00005720  6e 65 25 3d 77 25 28 34  2c 30 29 0d 23 1e 1b 20  |ne%=w%(4,0).#.. |
00005730  70 61 6e 65 6f 70 65 6e  25 3d 28 6c 74 6f 6f 6c  |paneopen%=(ltool|
00005740  24 3d 22 3e 22 29 0d 23  28 0d c9 20 77 25 28 35  |$=">").#(.. w%(5|
00005750  2c 30 29 0d 23 32 12 20  70 61 6e 65 25 3d 77 25  |,0).#2. pane%=w%|
00005760  28 36 2c 30 29 0d 23 3c  1b 20 70 61 6e 65 6f 70  |(6,0).#<. paneop|
00005770  65 6e 25 3d 28 67 74 6f  6f 6c 24 3d 22 3e 22 29  |en%=(gtool$=">")|
00005780  0d 23 46 05 7f 0d 23 50  25 20 85 20 31 30 30 2c  |.#F...#P% . 100,|
00005790  22 54 68 69 73 20 77 69  6e 64 6f 77 20 69 73 20  |"This window is |
000057a0  70 61 6e 65 6c 65 73 73  21 22 0d 23 5a 05 cb 0d  |paneless!".#Z...|
000057b0  23 64 14 21 6d 62 25 3d  74 6f 6f 6c 77 69 6e 64  |#d.!mb%=toolwind|
000057c0  6f 77 25 0d 23 6e 21 c8  99 20 22 57 69 6d 70 5f  |ow%.#n!.. "Wimp_|
000057d0  47 65 74 57 69 6e 64 6f  77 53 74 61 74 65 22 2c  |GetWindowState",|
000057e0  2c 6d 62 25 0d 23 78 16  e7 20 6d 62 25 21 33 32  |,mb%.#x.. mb%!32|
000057f0  20 80 20 31 3c 3c 31 39  20 8c 0d 23 82 1b 20 f2  | . 1<<19 ..#.. .|
00005800  74 6f 67 67 6c 65 77 69  6e 64 6f 77 73 69 7a 65  |togglewindowsize|
00005810  28 6d 62 25 29 0d 23 8c  1e 20 c8 99 20 22 57 69  |(mb%).#.. .. "Wi|
00005820  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00005830  70 62 25 0d 23 96 22 20  c8 99 20 22 57 69 6d 70  |pb%.#." .. "Wimp|
00005840  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
00005850  2c 2c 70 62 25 0d 23 a0  05 cd 0d 23 aa 2a e7 20  |,,pb%.#....#.*. |
00005860  70 62 25 21 34 3c 3d 6d  62 25 21 34 20 74 6f 77  |pb%!4<=mb%!4 tow|
00005870  61 72 64 73 25 3d b9 20  8b 20 74 6f 77 61 72 64  |ards%=. . toward|
00005880  73 25 3d a3 0d 23 b4 0e  21 6d 62 25 3d 70 61 6e  |s%=..#..!mb%=pan|
00005890  65 25 0d 23 be 12 6d 62  25 21 34 3d 70 62 25 21  |e%.#..mb%!4=pb%!|
000058a0  34 2d 38 38 0d 23 c8 0f  6d 62 25 21 38 3d 70 62  |4-88.#..mb%!8=pb|
000058b0  25 21 38 0d 23 d2 12 6d  62 25 21 31 32 3d 70 62  |%!8.#..mb%!12=pb|
000058c0  25 21 34 2d 34 0d 23 dc  11 6d 62 25 21 31 36 3d  |%!4-4.#..mb%!16=|
000058d0  70 62 25 21 31 36 0d 23  e6 0c 6d 62 25 21 32 30  |pb%!16.#..mb%!20|
000058e0  3d 30 0d 23 f0 0c 6d 62  25 21 32 34 3d 30 0d 23  |=0.#..mb%!24=0.#|
000058f0  fa 11 6d 62 25 21 32 38  3d 70 62 25 21 32 38 0d  |..mb%!28=pb%!28.|
00005900  24 04 10 e7 20 74 6f 77  61 72 64 73 25 20 8c 0d  |$... towards% ..|
00005910  24 0e 12 20 e7 20 70 61  6e 65 6f 70 65 6e 25 20  |$.. . paneopen% |
00005920  8c 0d 24 18 1f 20 20 c8  99 20 22 57 69 6d 70 5f  |..$..  .. "Wimp_|
00005930  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 6d 62 25  |OpenWindow",,mb%|
00005940  0d 24 22 12 20 20 70 62  25 21 32 38 3d 70 61 6e  |.$".  pb%!28=pan|
00005950  65 25 0d 24 2c 06 20 cd  0d 24 36 1e 20 c8 99 20  |e%.$,. ..$6. .. |
00005960  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00005970  22 2c 2c 70 62 25 0d 24  40 05 cc 0d 24 4a 1e 20  |",,pb%.$@...$J. |
00005980  c8 99 20 22 57 69 6d 70  5f 4f 70 65 6e 57 69 6e  |.. "Wimp_OpenWin|
00005990  64 6f 77 22 2c 2c 70 62  25 0d 24 54 2a 20 e7 20  |dow",,pb%.$T* . |
000059a0  70 61 6e 65 6f 70 65 6e  25 20 c8 99 20 22 57 69  |paneopen% .. "Wi|
000059b0  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
000059c0  6d 62 25 0d 24 5e 05 cd  0d 24 68 05 e1 0d 24 72  |mb%.$^...$h...$r|
000059d0  04 0d 24 7c 1f dd 20 f2  74 6f 67 67 6c 65 77 69  |..$|.. .togglewi|
000059e0  6e 64 6f 77 73 69 7a 65  28 62 6c 6f 63 6b 25 29  |ndowsize(block%)|
000059f0  0d 24 86 1b 77 69 6e 25  3d a4 77 69 6e 64 6f 77  |.$..win%=.window|
00005a00  69 64 28 21 62 6c 6f 63  6b 25 29 0d 24 90 26 f4  |id(!block%).$.&.|
00005a10  20 49 46 20 77 25 28 77  69 6e 25 2c 31 29 21 34  | IF w%(win%,1)!4|
00005a20  34 3c 2d 72 69 67 68 74  73 63 72 25 20 54 48 45  |4<-rightscr% THE|
00005a30  4e 0d 24 9a 11 f4 20 20  62 6c 6f 63 6b 25 21 34  |N.$...  block%!4|
00005a40  3d 30 0d 24 a4 1d f4 20  20 62 6c 6f 63 6b 25 21  |=0.$...  block%!|
00005a50  31 32 3d 72 69 67 68 74  73 63 72 25 2d 34 38 0d  |12=rightscr%-48.|
00005a60  24 ae 0b f4 20 45 4e 44  49 46 0d 24 b8 23 f4 20  |$... ENDIF.$.#. |
00005a70  49 46 20 77 25 28 77 69  6e 25 2c 31 29 21 35 36  |IF w%(win%,1)!56|
00005a80  3e 74 6f 70 73 63 72 25  20 54 48 45 4e 0d 24 c2  |>topscr% THEN.$.|
00005a90  12 f4 20 20 62 6c 6f 63  6b 25 21 38 3d 34 38 0d  |..  block%!8=48.|
00005aa0  24 cc 1b f4 20 20 62 6c  6f 63 6b 25 21 31 36 3d  |$...  block%!16=|
00005ab0  74 6f 70 73 63 72 25 2d  34 38 0d 24 d6 0b f4 20  |topscr%-48.$... |
00005ac0  45 4e 44 49 46 0d 24 e0  24 62 6c 6f 63 6b 25 21  |ENDIF.$.$block%!|
00005ad0  31 32 3d 62 6c 6f 63 6b  25 21 34 2b 77 25 28 77  |12=block%!4+w%(w|
00005ae0  69 6e 25 2c 31 29 21 35  32 0d 24 ea 24 62 6c 6f  |in%,1)!52.$.$blo|
00005af0  63 6b 25 21 38 3d 62 6c  6f 63 6b 25 21 31 36 2d  |ck%!8=block%!16-|
00005b00  77 25 28 77 69 6e 25 2c  31 29 21 35 36 0d 24 f4  |w%(win%,1)!56.$.|
00005b10  05 e1 0d 24 fe 04 0d 25  08 18 dd 20 a4 77 69 6e  |...$...%... .win|
00005b20  64 6f 77 69 64 28 68 61  6e 64 6c 65 25 29 0d 25  |dowid(handle%).%|
00005b30  12 0a ea 20 77 69 6e 25  0d 25 1c 0a 77 69 6e 25  |... win%.%..win%|
00005b40  3d 30 0d 25 26 1a c8 95  20 77 25 28 77 69 6e 25  |=0.%&... w%(win%|
00005b50  2c 30 29 3c 3e 68 61 6e  64 6c 65 25 0d 25 30 0c  |,0)<>handle%.%0.|
00005b60  20 77 69 6e 25 2b 3d 31  0d 25 3a 05 ce 0d 25 44  | win%+=1.%:...%D|
00005b70  09 3d 77 69 6e 25 0d 25  4e 04 0d 25 58 12 dd 20  |.=win%.%N..%X.. |
00005b80  f2 63 6c 69 63 6b 77 69  6e 64 6f 77 0d 25 62 04  |.clickwindow.%b.|
00005b90  0d 25 6c 15 61 64 6a 75  73 74 25 3d 70 62 25 21  |.%l.adjust%=pb%!|
00005ba0  34 20 80 20 31 0d 25 76  04 0d 25 80 0f c8 8e 20  |4 . 1.%v..%.... |
00005bb0  70 62 25 21 31 32 20 ca  0d 25 8a 04 0d 25 94 08  |pb%!12 ..%...%..|
00005bc0  c9 20 2d 32 0d 25 9e 10  20 c8 8e 20 70 62 25 21  |. -2.%.. .. pb%!|
00005bd0  31 36 20 ca 0d 25 a8 0f  20 c9 20 69 63 6f 6e 62  |16 ..%.. . iconb|
00005be0  61 72 25 0d 25 b2 10 20  20 c8 8e 20 70 62 25 21  |ar%.%..  .. pb%!|
00005bf0  38 20 ca 0d 25 bc 09 20  20 c9 20 32 0d 25 c6 13  |8 ..%..  . 2.%..|
00005c00  20 20 20 6d 6f 75 73 65  78 25 3d 21 70 62 25 0d  |   mousex%=!pb%.|
00005c10  25 d0 12 20 20 20 6d 6f  75 73 65 79 25 3d 31 38  |%..   mousey%=18|
00005c20  36 0d 25 da 33 20 20 20  6d 65 6e 75 25 3d a4 63  |6.%.3   menu%=.c|
00005c30  6d 65 6e 75 28 30 2c 22  46 61 73 74 47 72 61 62  |menu(0,"FastGrab|
00005c40  7c 40 31 33 27 49 6e 66  6f 7c 51 75 69 74 7c 22  ||@13'Info|Quit|"|
00005c50  2c 39 36 29 0d 25 e4 11  20 20 20 6d 65 6e 74 79  |,96).%..   menty|
00005c60  70 65 25 3d 30 0d 25 ee  09 20 20 c9 20 34 0d 25  |pe%=0.%..  . 4.%|
00005c70  f8 12 20 20 20 e7 20 ac  20 6c 69 76 65 25 20 8c  |..   . . live% .|
00005c80  0d 26 02 26 20 20 20 20  77 25 28 33 2c 31 29 21  |.&.&    w%(3,1)!|
00005c90  34 3d 72 69 67 68 74 73  63 72 25 2f 32 2d 6c 69  |4=rightscr%/2-li|
00005ca0  76 65 78 25 2f 32 0d 26  0c 24 20 20 20 20 77 25  |vex%/2.&.$    w%|
00005cb0  28 33 2c 31 29 21 38 3d  74 6f 70 73 63 72 25 2f  |(3,1)!8=topscr%/|
00005cc0  32 2d 6c 69 76 65 79 25  2f 32 0d 26 16 27 20 20  |2-livey%/2.&.'  |
00005cd0  20 20 77 25 28 33 2c 31  29 21 31 32 3d 72 69 67  |  w%(3,1)!12=rig|
00005ce0  68 74 73 63 72 25 2f 32  2b 6c 69 76 65 78 25 2f  |htscr%/2+livex%/|
00005cf0  32 0d 26 20 25 20 20 20  20 77 25 28 33 2c 31 29  |2.& %    w%(3,1)|
00005d00  21 31 36 3d 74 6f 70 73  63 72 25 2f 32 2b 6c 69  |!16=topscr%/2+li|
00005d10  76 65 79 25 2f 32 0d 26  2a 22 20 20 20 20 e7 20  |vey%/2.&*"    . |
00005d20  77 25 28 33 2c 31 29 21  38 3c 30 20 77 25 28 33  |w%(3,1)!8<0 w%(3|
00005d30  2c 31 29 21 38 3d 38 34  0d 26 34 14 20 20 20 20  |,1)!8=84.&4.    |
00005d40  77 25 28 33 2c 31 29 21  32 30 3d 30 0d 26 3e 14  |w%(3,1)!20=0.&>.|
00005d50  20 20 20 20 77 25 28 33  2c 31 29 21 32 34 3d 30  |    w%(3,1)!24=0|
00005d60  0d 26 48 15 20 20 20 20  77 25 28 33 2c 31 29 21  |.&H.    w%(3,1)!|
00005d70  32 38 3d 2d 31 0d 26 52  10 20 20 20 20 f2 63 77  |28=-1.&R.    .cw|
00005d80  69 6e 28 33 29 0d 26 5c  14 20 20 20 20 21 72 64  |in(3).&\.    !rd|
00005d90  62 3d 77 25 28 33 2c 30  29 0d 26 66 14 20 20 20  |b=w%(3,0).&f.   |
00005da0  20 21 75 64 62 3d 77 25  28 33 2c 30 29 0d 26 70  | !udb=w%(3,0).&p|
00005db0  17 20 20 20 20 21 6c 69  76 65 77 62 3d 77 25 28  |.    !livewb=w%(|
00005dc0  33 2c 30 29 0d 26 7a 25  20 20 20 20 c8 99 20 22  |3,0).&z%    .. "|
00005dd0  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00005de0  2c 2c 77 25 28 33 2c 31  29 0d 26 84 16 20 20 20  |,,w%(3,1).&..   |
00005df0  20 e7 20 6c 74 6f 6f 6c  24 3d 22 3e 22 20 8c 0d  | . ltool$=">" ..|
00005e00  26 8e 1f 20 20 20 20 20  77 25 28 34 2c 31 29 21  |&..     w%(4,1)!|
00005e10  34 3d 77 25 28 33 2c 31  29 21 34 2d 38 38 0d 26  |4=w%(3,1)!4-88.&|
00005e20  98 1c 20 20 20 20 20 77  25 28 34 2c 31 29 21 38  |..     w%(4,1)!8|
00005e30  3d 77 25 28 33 2c 31 29  21 38 0d 26 a2 20 20 20  |=w%(3,1)!8.&.   |
00005e40  20 20 20 77 25 28 34 2c  31 29 21 31 32 3d 77 25  |   w%(4,1)!12=w%|
00005e50  28 34 2c 31 29 21 34 2b  38 34 0d 26 ac 1e 20 20  |(4,1)!4+84.&..  |
00005e60  20 20 20 77 25 28 34 2c  31 29 21 31 36 3d 77 25  |   w%(4,1)!16=w%|
00005e70  28 33 2c 31 29 21 31 36  0d 26 b6 16 20 20 20 20  |(3,1)!16.&..    |
00005e80  20 77 25 28 34 2c 31 29  21 32 38 3d 2d 31 0d 26  | w%(4,1)!28=-1.&|
00005e90  c0 28 20 20 20 20 20 e7  20 67 72 61 62 65 78 25  |.(     . grabex%|
00005ea0  20 f2 69 63 6f 6e 73 65  74 28 34 2c 31 2c 31 3c  | .iconset(4,1,1<|
00005eb0  3c 32 32 2c 30 29 0d 26  ca 11 20 20 20 20 20 f2  |<22,0).&..     .|
00005ec0  63 77 69 6e 28 34 29 0d  26 d4 26 20 20 20 20 20  |cwin(4).&.&     |
00005ed0  c8 99 20 22 57 69 6d 70  5f 4f 70 65 6e 57 69 6e  |.. "Wimp_OpenWin|
00005ee0  64 6f 77 22 2c 2c 77 25  28 34 2c 31 29 0d 26 de  |dow",,w%(4,1).&.|
00005ef0  09 20 20 20 20 cd 0d 26  e8 4a 20 20 20 20 e7 20  |.    ..&.J    . |
00005f00  21 73 69 67 6e 61 6c 70  72 65 73 65 6e 74 20 8c  |!signalpresent .|
00005f10  20 24 62 61 72 73 70 61  63 65 3d 22 62 61 72 73  | $barspace="bars|
00005f20  69 67 6e 61 6c 22 20 8b  20 24 62 61 72 73 70 61  |ignal" . $barspa|
00005f30  63 65 3d 22 62 61 72 6e  6f 73 69 67 6e 61 6c 22  |ce="barnosignal"|
00005f40  0d 26 f2 0f 20 20 20 20  21 6d 62 25 3d 2d 31 0d  |.&..    !mb%=-1.|
00005f50  26 fc 16 20 20 20 20 6d  62 25 21 34 3d 69 63 6f  |&..    mb%!4=ico|
00005f60  6e 62 61 72 25 0d 27 06  0f 20 20 20 20 6d 62 25  |nbar%.'..    mb%|
00005f70  21 38 3d 30 0d 27 10 10  20 20 20 20 6d 62 25 21  |!8=0.'..    mb%!|
00005f80  31 32 3d 30 0d 27 1a 23  20 20 20 20 c8 99 20 22  |12=0.'.#    .. "|
00005f90  57 69 6d 70 5f 53 65 74  49 63 6f 6e 53 74 61 74  |Wimp_SetIconStat|
00005fa0  65 22 2c 2c 6d 62 25 0d  27 24 0f 20 20 20 20 6c  |e",,mb%.'$.    l|
00005fb0  69 76 65 25 3d b9 0d 27  2e 1e 20 20 20 20 21 6d  |ive%=..'..    !m|
00005fc0  61 73 6b 61 64 3d 25 31  31 30 30 30 30 30 31 31  |askad=%110000011|
00005fd0  30 30 30 30 0d 27 38 08  20 20 20 cc 0d 27 42 16  |0000.'8.   ..'B.|
00005fe0  20 20 20 20 e7 20 6c 74  6f 6f 6c 24 3d 22 3e 22  |    . ltool$=">"|
00005ff0  20 8c 0d 27 4c 15 20 20  20 20 20 21 6d 62 25 3d  | ..'L.     !mb%=|
00006000  77 25 28 34 2c 30 29 0d  27 56 26 20 20 20 20 20  |w%(4,0).'V&     |
00006010  c8 99 20 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |.. "Wimp_GetWind|
00006020  6f 77 53 74 61 74 65 22  2c 2c 6d 62 25 0d 27 60  |owState",,mb%.'`|
00006030  12 20 20 20 20 20 6d 62  25 21 32 38 3d 2d 31 0d  |.     mb%!28=-1.|
00006040  27 6a 22 20 20 20 20 20  c8 99 20 22 57 69 6d 70  |'j"     .. "Wimp|
00006050  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 6d 62  |_OpenWindow",,mb|
00006060  25 0d 27 74 15 20 20 20  20 20 21 6d 62 25 3d 77  |%.'t.     !mb%=w|
00006070  25 28 33 2c 30 29 0d 27  7e 26 20 20 20 20 20 c8  |%(3,0).'~&     .|
00006080  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
00006090  77 53 74 61 74 65 22 2c  2c 6d 62 25 0d 27 88 17  |wState",,mb%.'..|
000060a0  20 20 20 20 20 6d 62 25  21 32 38 3d 77 25 28 34  |     mb%!28=w%(4|
000060b0  2c 30 29 0d 27 92 22 20  20 20 20 20 c8 99 20 22  |,0).'."     .. "|
000060c0  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
000060d0  2c 2c 6d 62 25 0d 27 9c  09 20 20 20 20 cc 0d 27  |,,mb%.'..    ..'|
000060e0  a6 15 20 20 20 20 20 21  6d 62 25 3d 77 25 28 33  |..     !mb%=w%(3|
000060f0  2c 30 29 0d 27 b0 26 20  20 20 20 20 c8 99 20 22  |,0).'.&     .. "|
00006100  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
00006110  61 74 65 22 2c 2c 6d 62  25 0d 27 ba 12 20 20 20  |ate",,mb%.'..   |
00006120  20 20 6d 62 25 21 32 38  3d 2d 31 0d 27 c4 22 20  |  mb%!28=-1.'." |
00006130  20 20 20 20 c8 99 20 22  57 69 6d 70 5f 4f 70 65  |    .. "Wimp_Ope|
00006140  6e 57 69 6e 64 6f 77 22  2c 2c 6d 62 25 0d 27 ce  |nWindow",,mb%.'.|
00006150  09 20 20 20 20 cd 0d 27  d8 08 20 20 20 cd 0d 27  |.    ..'..   ..'|
00006160  e2 06 20 cb 0d 27 ec 05  cb 0d 27 f6 04 0d 28 00  |.. ..'....'...(.|
00006170  0d c9 20 77 25 28 33 2c  30 29 0d 28 0a 0f 20 c8  |.. w%(3,0).(.. .|
00006180  8e 20 70 62 25 21 38 20  ca 0d 28 14 08 20 c9 20  |. pb%!8 ..(.. . |
00006190  32 0d 28 1e 0f 20 20 f2  6c 69 76 65 6d 65 6e 75  |2.(..  .livemenu|
000061a0  0d 28 28 06 20 cb 0d 28  32 04 0d 28 3c 0d c9 20  |.((. ..(2..(<.. |
000061b0  77 25 28 34 2c 30 29 0d  28 46 14 20 e7 20 28 70  |w%(4,0).(F. . (p|
000061c0  62 25 21 38 20 80 20 34  29 20 8c 0d 28 50 11 20  |b%!8 . 4) ..(P. |
000061d0  20 c8 8e 20 70 62 25 21  31 36 20 ca 0d 28 5a 0a  | .. pb%!16 ..(Z.|
000061e0  20 20 20 c9 20 30 0d 28  64 0d 20 20 20 20 f2 67  |   . 0.(d.    .g|
000061f0  72 61 62 0d 28 6e 11 20  20 20 20 f2 73 68 6f 77  |rab.(n.    .show|
00006200  67 72 61 62 0d 28 78 0a  20 20 20 c9 20 31 0d 28  |grab.(x.   . 1.(|
00006210  82 11 20 20 20 20 f2 73  68 6f 77 67 72 61 62 0d  |..    .showgrab.|
00006220  28 8c 0a 20 20 20 c9 20  32 0d 28 96 24 20 20 20  |(..   . 2.(.$   |
00006230  20 f2 6d 65 6e 75 28 32  2c 21 70 62 25 2d 32 39  | .menu(2,!pb%-29|
00006240  30 2c 70 62 25 21 34 2b  36 38 2c 30 29 0d 28 a0  |0,pb%!4+68,0).(.|
00006250  0a 20 20 20 c9 20 33 0d  28 aa 22 20 20 20 20 e7  |.   . 3.(."    .|
00006260  20 62 69 74 25 3d 31 32  20 62 69 74 25 3d 38 20  | bit%=12 bit%=8 |
00006270  8b 20 62 69 74 25 3d 31  32 0d 28 b4 0a 20 20 20  |. bit%=12.(..   |
00006280  c9 20 34 0d 28 be 1f 20  20 20 20 64 69 74 68 65  |. 4.(..    dithe|
00006290  72 65 64 25 3d 64 69 74  68 65 72 65 64 25 20 82  |red%=dithered% .|
000062a0  20 31 0d 28 c8 1e 20 20  20 20 f2 63 68 61 6e 67  | 1.(..    .chang|
000062b0  65 5f 4c 43 41 28 64 69  74 68 65 72 65 64 25 29  |e_LCA(dithered%)|
000062c0  0d 28 d2 07 20 20 cb 0d  28 dc 06 20 cd 0d 28 e6  |.(..  ..(.. ..(.|
000062d0  1c 20 e7 20 28 70 62 25  21 38 20 80 20 32 29 20  |. . (pb%!8 . 2) |
000062e0  f2 6c 69 76 65 6d 65 6e  75 0d 28 f0 04 0d 28 fa  |.livemenu.(...(.|
000062f0  0d c9 20 77 25 28 35 2c  30 29 0d 29 04 0f 20 c8  |.. w%(5,0).).. .|
00006300  8e 20 70 62 25 21 38 20  ca 0d 29 0e 08 20 c9 20  |. pb%!8 ..).. . |
00006310  32 0d 29 18 0f 20 20 f2  67 72 61 62 6d 65 6e 75  |2.)..  .grabmenu|
00006320  0d 29 22 06 20 cb 0d 29  2c 0d c9 20 77 25 28 36  |.)". ..),.. w%(6|
00006330  2c 30 29 0d 29 36 14 20  e7 20 28 70 62 25 21 38  |,0).)6. . (pb%!8|
00006340  20 80 20 34 29 20 8c 0d  29 40 10 20 c8 8e 20 70  | . 4) ..)@. .. p|
00006350  62 25 21 31 36 20 ca 0d  29 4a 08 20 c9 20 30 0d  |b%!16 ..)J. . 0.|
00006360  29 54 23 20 20 f2 6d 65  6e 75 28 31 2c 21 70 62  |)T#  .menu(1,!pb|
00006370  25 2d 33 35 34 2c 70 62  25 21 34 2b 32 36 34 2c  |%-354,pb%!4+264,|
00006380  30 29 0d 29 5e 08 20 c9  20 31 0d 29 68 22 20 20  |0).)^. . 1.)h"  |
00006390  f2 6d 65 6e 75 28 39 2c  21 70 62 25 2d 31 33 36  |.menu(9,!pb%-136|
000063a0  2c 70 62 25 21 34 2b 36  34 2c 30 29 0d 29 72 08  |,pb%!4+64,0).)r.|
000063b0  20 c9 20 32 0d 29 7c 22  20 20 f2 6d 65 6e 75 28  | . 2.)|"  .menu(|
000063c0  37 2c 21 70 62 25 2d 31  32 32 2c 70 62 25 21 34  |7,!pb%-122,pb%!4|
000063d0  2b 38 34 2c 30 29 0d 29  86 12 20 20 20 64 72 61  |+84,0).)..   dra|
000063e0  67 74 79 70 65 25 3d 30  0d 29 90 08 20 c9 20 33  |gtype%=0.).. . 3|
000063f0  0d 29 9a 22 20 20 f2 6d  65 6e 75 28 38 2c 21 70  |.)."  .menu(8,!p|
00006400  62 25 2d 31 32 32 2c 70  62 25 21 34 2b 38 34 2c  |b%-122,pb%!4+84,|
00006410  30 29 0d 29 a4 11 20 20  64 72 61 67 74 79 70 65  |0).)..  dragtype|
00006420  25 3d 31 0d 29 ae 06 20  cb 0d 29 b8 06 20 cd 0d  |%=1.).. ..).. ..|
00006430  29 c2 1c 20 e7 20 28 70  62 25 21 38 20 80 20 32  |).. . (pb%!8 . 2|
00006440  29 20 f2 67 72 61 62 6d  65 6e 75 0d 29 cc 04 0d  |) .grabmenu.)...|
00006450  29 d6 0d c9 20 77 25 28  39 2c 30 29 0d 29 e0 16  |)... w%(9,0).)..|
00006460  20 e7 20 28 70 62 25 21  38 20 80 20 31 29 3d 30  | . (pb%!8 . 1)=0|
00006470  20 8c 0d 29 ea 11 20 20  c8 8e 20 70 62 25 21 31  | ..)..  .. pb%!1|
00006480  36 20 ca 0d 29 f4 09 20  20 c9 20 32 0d 29 fe 16  |6 ..)..  . 2.)..|
00006490  20 20 20 f2 6d 61 67 73  74 72 69 6e 67 28 31 2c  |   .magstring(1,|
000064a0  30 29 0d 2a 08 09 20 20  c9 20 33 0d 2a 12 17 20  |0).*..  . 3.*.. |
000064b0  20 20 f2 6d 61 67 73 74  72 69 6e 67 28 2d 31 2c  |  .magstring(-1,|
000064c0  30 29 0d 2a 1c 09 20 20  c9 20 34 0d 2a 26 16 20  |0).*..  . 4.*&. |
000064d0  20 20 f2 6d 61 67 73 74  72 69 6e 67 28 30 2c 31  |  .magstring(0,1|
000064e0  29 0d 2a 30 09 20 20 c9  20 35 0d 2a 3a 17 20 20  |).*0.  . 5.*:.  |
000064f0  20 f2 6d 61 67 73 74 72  69 6e 67 28 30 2c 2d 31  | .magstring(0,-1|
00006500  29 0d 2a 44 07 20 20 cb  0d 2a 4e 06 20 cc 0d 2a  |).*D.  ..*N. ..*|
00006510  58 11 20 20 c8 8e 20 70  62 25 21 31 36 20 ca 0d  |X.  .. pb%!16 ..|
00006520  2a 62 09 20 20 c9 20 32  0d 2a 6c 17 20 20 20 f2  |*b.  . 2.*l.   .|
00006530  6d 61 67 73 74 72 69 6e  67 28 2d 31 2c 30 29 0d  |magstring(-1,0).|
00006540  2a 76 09 20 20 c9 20 33  0d 2a 80 16 20 20 20 f2  |*v.  . 3.*..   .|
00006550  6d 61 67 73 74 72 69 6e  67 28 31 2c 30 29 0d 2a  |magstring(1,0).*|
00006560  8a 09 20 20 c9 20 34 0d  2a 94 17 20 20 20 f2 6d  |..  . 4.*..   .m|
00006570  61 67 73 74 72 69 6e 67  28 30 2c 2d 31 29 0d 2a  |agstring(0,-1).*|
00006580  9e 09 20 20 c9 20 35 0d  2a a8 16 20 20 20 f2 6d  |..  . 5.*..   .m|
00006590  61 67 73 74 72 69 6e 67  28 30 2c 31 29 0d 2a b2  |agstring(0,1).*.|
000065a0  07 20 20 cb 0d 2a bc 06  20 cd 0d 2a c6 04 0d 2a  |.  ..*.. ..*...*|
000065b0  d0 0d c9 20 77 25 28 37  2c 30 29 0d 2a da 10 20  |... w%(7,0).*.. |
000065c0  c8 8e 20 70 62 25 21 31  36 20 ca 0d 2a e4 08 20  |.. pb%!16 ..*.. |
000065d0  c9 20 31 0d 2a ee 11 20  20 f2 73 61 76 65 73 70  |. 1.*..  .savesp|
000065e0  72 69 74 65 0d 2a f8 08  20 c9 20 30 0d 2b 02 1a  |rite.*.. . 0.+..|
000065f0  20 20 e7 20 28 70 62 25  21 38 20 80 20 26 35 30  |  . (pb%!8 . &50|
00006600  29 3c 3e 30 20 8c 0d 2b  0c 18 20 20 20 f2 67 73  |)<>0 ..+..   .gs|
00006610  74 28 70 62 25 2c 77 25  28 37 2c 30 29 29 0d 2b  |t(pb%,w%(7,0)).+|
00006620  16 13 20 20 20 21 6d 62  25 3d 77 25 28 37 2c 30  |..   !mb%=w%(7,0|
00006630  29 0d 2b 20 0e 20 20 20  6d 62 25 21 34 3d 30 0d  |).+ .   mb%!4=0.|
00006640  2b 2a 22 20 20 20 c8 99  20 22 57 69 6d 70 5f 47  |+*"   .. "Wimp_G|
00006650  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 6d 62  |etIconState",,mb|
00006660  25 0d 2b 34 1d 20 20 20  69 6c 78 25 3d 6d 62 25  |%.+4.   ilx%=mb%|
00006670  21 38 3a 69 74 79 25 3d  6d 62 25 21 31 32 0d 2b  |!8:ity%=mb%!12.+|
00006680  3e 1e 20 20 20 69 72 78  25 3d 6d 62 25 21 31 36  |>.   irx%=mb%!16|
00006690  3a 69 62 79 25 3d 6d 62  25 21 32 30 0d 2b 48 18  |:iby%=mb%!20.+H.|
000066a0  20 20 20 f2 67 73 74 28  6d 62 25 2c 77 25 28 37  |   .gst(mb%,w%(7|
000066b0  2c 30 29 29 0d 2b 52 13  20 20 20 21 70 62 25 3d  |,0)).+R.   !pb%=|
000066c0  77 25 28 37 2c 30 29 0d  2b 5c 0e 20 20 20 70 62  |w%(7,0).+\.   pb|
000066d0  25 21 34 3d 35 0d 2b 66  17 20 20 20 70 62 25 21  |%!4=5.+f.   pb%!|
000066e0  38 3d 6d 62 25 21 34 2b  69 6c 78 25 0d 2b 70 19  |8=mb%!4+ilx%.+p.|
000066f0  20 20 20 70 62 25 21 31  32 3d 6d 62 25 21 31 36  |   pb%!12=mb%!16|
00006700  2b 69 74 79 25 0d 2b 7a  18 20 20 20 70 62 25 21  |+ity%.+z.   pb%!|
00006710  31 36 3d 6d 62 25 21 34  2b 69 72 78 25 0d 2b 84  |16=mb%!4+irx%.+.|
00006720  19 20 20 20 70 62 25 21  32 30 3d 6d 62 25 21 31  |.   pb%!20=mb%!1|
00006730  36 2b 69 62 79 25 0d 2b  8e 0f 20 20 20 70 62 25  |6+iby%.+..   pb%|
00006740  21 32 34 3d 30 0d 2b 98  0f 20 20 20 70 62 25 21  |!24=0.+..   pb%!|
00006750  32 38 3d 30 0d 2b a2 17  20 20 20 70 62 25 21 33  |28=0.+..   pb%!3|
00006760  32 3d 26 37 46 46 46 46  46 46 46 0d 2b ac 17 20  |2=&7FFFFFFF.+.. |
00006770  20 20 70 62 25 21 33 36  3d 26 37 46 46 46 46 46  |  pb%!36=&7FFFFF|
00006780  46 46 0d 2b b6 1d 20 20  20 c8 99 20 22 57 69 6d  |FF.+..   .. "Wim|
00006790  70 5f 44 72 61 67 42 6f  78 22 2c 2c 70 62 25 0d  |p_DragBox",,pb%.|
000067a0  2b c0 12 20 20 20 64 72  61 67 74 79 70 65 25 3d  |+..   dragtype%=|
000067b0  30 0d 2b ca 07 20 20 cd  0d 2b d4 06 20 cb 0d 2b  |0.+..  ..+.. ..+|
000067c0  de 04 0d 2b e8 0d c9 20  77 25 28 38 2c 30 29 0d  |...+... w%(8,0).|
000067d0  2b f2 10 20 c8 8e 20 70  62 25 21 31 36 20 ca 0d  |+.. .. pb%!16 ..|
000067e0  2b fc 08 20 c9 20 31 0d  2c 06 0e 20 20 f2 73 61  |+.. . 1.,..  .sa|
000067f0  76 65 72 61 77 0d 2c 10  08 20 c9 20 30 0d 2c 1a  |veraw.,.. . 0.,.|
00006800  1a 20 20 e7 20 28 70 62  25 21 38 20 80 20 26 35  |.  . (pb%!8 . &5|
00006810  30 29 3c 3e 30 20 8c 0d  2c 24 18 20 20 20 f2 67  |0)<>0 ..,$.   .g|
00006820  73 74 28 70 62 25 2c 77  25 28 38 2c 30 29 29 0d  |st(pb%,w%(8,0)).|
00006830  2c 2e 13 20 20 20 21 6d  62 25 3d 77 25 28 38 2c  |,..   !mb%=w%(8,|
00006840  30 29 0d 2c 38 0e 20 20  20 6d 62 25 21 34 3d 30  |0).,8.   mb%!4=0|
00006850  0d 2c 42 22 20 20 20 c8  99 20 22 57 69 6d 70 5f  |.,B"   .. "Wimp_|
00006860  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 6d  |GetIconState",,m|
00006870  62 25 0d 2c 4c 1d 20 20  20 69 6c 78 25 3d 6d 62  |b%.,L.   ilx%=mb|
00006880  25 21 38 3a 69 74 79 25  3d 6d 62 25 21 31 32 0d  |%!8:ity%=mb%!12.|
00006890  2c 56 1e 20 20 20 69 72  78 25 3d 6d 62 25 21 31  |,V.   irx%=mb%!1|
000068a0  36 3a 69 62 79 25 3d 6d  62 25 21 32 30 0d 2c 60  |6:iby%=mb%!20.,`|
000068b0  18 20 20 20 f2 67 73 74  28 6d 62 25 2c 77 25 28  |.   .gst(mb%,w%(|
000068c0  38 2c 30 29 29 0d 2c 6a  13 20 20 20 21 70 62 25  |8,0)).,j.   !pb%|
000068d0  3d 77 25 28 38 2c 30 29  0d 2c 74 0e 20 20 20 70  |=w%(8,0).,t.   p|
000068e0  62 25 21 34 3d 35 0d 2c  7e 17 20 20 20 70 62 25  |b%!4=5.,~.   pb%|
000068f0  21 38 3d 6d 62 25 21 34  2b 69 6c 78 25 0d 2c 88  |!8=mb%!4+ilx%.,.|
00006900  19 20 20 20 70 62 25 21  31 32 3d 6d 62 25 21 31  |.   pb%!12=mb%!1|
00006910  36 2b 69 74 79 25 0d 2c  92 18 20 20 20 70 62 25  |6+ity%.,..   pb%|
00006920  21 31 36 3d 6d 62 25 21  34 2b 69 72 78 25 0d 2c  |!16=mb%!4+irx%.,|
00006930  9c 19 20 20 20 70 62 25  21 32 30 3d 6d 62 25 21  |..   pb%!20=mb%!|
00006940  31 36 2b 69 62 79 25 0d  2c a6 0f 20 20 20 70 62  |16+iby%.,..   pb|
00006950  25 21 32 34 3d 30 0d 2c  b0 0f 20 20 20 70 62 25  |%!24=0.,..   pb%|
00006960  21 32 38 3d 30 0d 2c ba  17 20 20 20 70 62 25 21  |!28=0.,..   pb%!|
00006970  33 32 3d 26 37 46 46 46  46 46 46 46 0d 2c c4 17  |32=&7FFFFFFF.,..|
00006980  20 20 20 70 62 25 21 33  36 3d 26 37 46 46 46 46  |   pb%!36=&7FFFF|
00006990  46 46 46 0d 2c ce 1d 20  20 20 c8 99 20 22 57 69  |FFF.,..   .. "Wi|
000069a0  6d 70 5f 44 72 61 67 42  6f 78 22 2c 2c 70 62 25  |mp_DragBox",,pb%|
000069b0  0d 2c d8 12 20 20 20 64  72 61 67 74 79 70 65 25  |.,..   dragtype%|
000069c0  3d 31 0d 2c e2 07 20 20  cd 0d 2c ec 06 20 cb 0d  |=1.,..  ..,.. ..|
000069d0  2c f6 04 0d 2d 00 0d c9  20 77 25 28 31 2c 30 29  |,...-... w%(1,0)|
000069e0  0d 2d 0a 10 20 c8 8e 20  70 62 25 21 31 36 20 ca  |.-.. .. pb%!16 .|
000069f0  0d 2d 14 08 20 c9 20 37  0d 2d 1e 12 20 20 6f 75  |.-.. . 7.-..  ou|
00006a00  74 6d 6f 64 65 24 3d 22  20 22 0d 2d 28 08 20 c9  |tmode$=" ".-(. .|
00006a10  20 38 0d 2d 32 12 20 20  6f 75 74 6d 6f 64 65 24  | 8.-2.  outmode$|
00006a20  3d 22 43 22 0d 2d 3c 08  20 c9 20 39 0d 2d 46 12  |="C".-<. . 9.-F.|
00006a30  20 20 6f 75 74 6d 6f 64  65 24 3d 22 44 22 0d 2d  |  outmode$="D".-|
00006a40  50 09 20 c9 20 31 30 0d  2d 5a 12 20 20 6f 75 74  |P. . 10.-Z.  out|
00006a50  6d 6f 64 65 24 3d 22 54  22 0d 2d 64 09 20 c9 20  |mode$="T".-d. . |
00006a60  33 32 0d 2d 6e 12 20 20  6f 75 74 6d 6f 64 65 24  |32.-n.  outmode$|
00006a70  3d 22 50 22 0d 2d 78 09  20 c9 20 32 35 0d 2d 82  |="P".-x. . 25.-.|
00006a80  1e 20 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |.  .. "Wimp_Crea|
00006a90  74 65 4d 65 6e 75 22 2c  2c 2d 31 0d 2d 8c 0d 20  |teMenu",,-1.-.. |
00006aa0  20 f2 67 6f 63 66 73 69  0d 2d 96 06 20 cb 0d 2d  | .gocfsi.-.. ..-|
00006ab0  a0 3f 20 e7 20 28 70 62  25 21 38 20 80 20 31 29  |.? . (pb%!8 . 1)|
00006ac0  20 80 20 28 70 62 25 21  31 36 3c 31 31 29 20 f2  | . (pb%!16<11) .|
00006ad0  69 63 6f 6e 73 65 74 28  31 2c 70 62 25 21 31 36  |iconset(1,pb%!16|
00006ae0  2c 31 3c 3c 32 31 2c 31  3c 3c 32 31 29 0d 2d aa  |,1<<21,1<<21).-.|
00006af0  04 0d 2d b4 0d c9 20 77  25 28 32 2c 30 29 0d 2d  |..-... w%(2,0).-|
00006b00  be 16 20 61 64 6a 75 73  74 25 3d 70 62 25 21 38  |.. adjust%=pb%!8|
00006b10  20 80 20 31 0d 2d c8 0a  20 63 68 25 3d a3 0d 2d  | . 1.-.. ch%=..-|
00006b20  d2 10 20 c8 8e 20 70 62  25 21 31 36 20 ca 0d 2d  |.. .. pb%!16 ..-|
00006b30  dc 08 20 c9 20 31 0d 2d  e6 11 20 20 e7 20 61 64  |.. . 1.-..  . ad|
00006b40  6a 75 73 74 25 20 8c 0d  2d f0 2c 20 20 20 e7 20  |just% ..-.,   . |
00006b50  62 72 69 67 68 74 6e 65  73 73 25 3c 3e 30 20 62  |brightness%<>0 b|
00006b60  72 69 67 68 74 6e 65 73  73 25 2d 3d 31 3a 63 68  |rightness%-=1:ch|
00006b70  25 3d b9 0d 2d fa 07 20  20 cc 0d 2e 04 2d 20 20  |%=..-..  ....-  |
00006b80  20 e7 20 62 72 69 67 68  74 6e 65 73 73 25 3c 3e  | . brightness%<>|
00006b90  36 33 20 62 72 69 67 68  74 6e 65 73 73 25 2b 3d  |63 brightness%+=|
00006ba0  31 3a 63 68 25 3d b9 0d  2e 0e 07 20 20 cd 0d 2e  |1:ch%=.....  ...|
00006bb0  18 3c 20 20 e7 20 63 68  25 20 24 62 72 69 67 68  |.<  . ch% $brigh|
00006bc0  74 61 64 25 3d c3 62 72  69 67 68 74 6e 65 73 73  |tad%=.brightness|
00006bd0  25 3a f2 75 64 70 62 61  72 28 2d 33 36 2c 62 72  |%:.udpbar(-36,br|
00006be0  69 67 68 74 6e 65 73 73  25 29 0d 2e 22 08 20 c9  |ightness%)..". .|
00006bf0  20 32 0d 2e 2c 11 20 20  e7 20 61 64 6a 75 73 74  | 2..,.  . adjust|
00006c00  25 20 8c 0d 2e 36 2d 20  20 20 e7 20 62 72 69 67  |% ...6-   . brig|
00006c10  68 74 6e 65 73 73 25 3c  3e 36 33 20 62 72 69 67  |htness%<>63 brig|
00006c20  68 74 6e 65 73 73 25 2b  3d 31 3a 63 68 25 3d b9  |htness%+=1:ch%=.|
00006c30  0d 2e 40 07 20 20 cc 0d  2e 4a 2c 20 20 20 e7 20  |..@.  ...J,   . |
00006c40  62 72 69 67 68 74 6e 65  73 73 25 3c 3e 30 20 62  |brightness%<>0 b|
00006c50  72 69 67 68 74 6e 65 73  73 25 2d 3d 31 3a 63 68  |rightness%-=1:ch|
00006c60  25 3d b9 0d 2e 54 07 20  20 cd 0d 2e 5e 3c 20 20  |%=...T.  ...^<  |
00006c70  e7 20 63 68 25 20 24 62  72 69 67 68 74 61 64 25  |. ch% $brightad%|
00006c80  3d c3 62 72 69 67 68 74  6e 65 73 73 25 3a f2 75  |=.brightness%:.u|
00006c90  64 70 62 61 72 28 2d 33  36 2c 62 72 69 67 68 74  |dpbar(-36,bright|
00006ca0  6e 65 73 73 25 29 0d 2e  68 08 20 c9 20 36 0d 2e  |ness%)..h. . 6..|
00006cb0  72 11 20 20 e7 20 61 64  6a 75 73 74 25 20 8c 0d  |r.  . adjust% ..|
00006cc0  2e 7c 28 20 20 20 e7 20  63 6f 6e 74 72 61 73 74  |.|(   . contrast|
00006cd0  25 3c 3e 30 20 63 6f 6e  74 72 61 73 74 25 2d 3d  |%<>0 contrast%-=|
00006ce0  31 3a 63 68 25 3d b9 0d  2e 86 07 20 20 cc 0d 2e  |1:ch%=.....  ...|
00006cf0  90 29 20 20 20 e7 20 63  6f 6e 74 72 61 73 74 25  |.)   . contrast%|
00006d00  3c 3e 36 33 20 63 6f 6e  74 72 61 73 74 25 2b 3d  |<>63 contrast%+=|
00006d10  31 3a 63 68 25 3d b9 0d  2e 9a 07 20 20 cd 0d 2e  |1:ch%=.....  ...|
00006d20  a4 36 20 20 e7 20 63 68  25 20 24 63 6f 6e 74 61  |.6  . ch% $conta|
00006d30  64 25 3d c3 63 6f 6e 74  72 61 73 74 25 3a f2 75  |d%=.contrast%:.u|
00006d40  64 70 62 61 72 28 2d 38  30 2c 63 6f 6e 74 72 61  |dpbar(-80,contra|
00006d50  73 74 25 29 0d 2e ae 08  20 c9 20 37 0d 2e b8 11  |st%).... . 7....|
00006d60  20 20 e7 20 61 64 6a 75  73 74 25 20 8c 0d 2e c2  |  . adjust% ....|
00006d70  29 20 20 20 e7 20 63 6f  6e 74 72 61 73 74 25 3c  |)   . contrast%<|
00006d80  3e 36 33 20 63 6f 6e 74  72 61 73 74 25 2b 3d 31  |>63 contrast%+=1|
00006d90  3a 63 68 25 3d b9 0d 2e  cc 07 20 20 cc 0d 2e d6  |:ch%=.....  ....|
00006da0  28 20 20 20 e7 20 63 6f  6e 74 72 61 73 74 25 3c  |(   . contrast%<|
00006db0  3e 30 20 63 6f 6e 74 72  61 73 74 25 2d 3d 31 3a  |>0 contrast%-=1:|
00006dc0  63 68 25 3d b9 0d 2e e0  07 20 20 cd 0d 2e ea 36  |ch%=.....  ....6|
00006dd0  20 20 e7 20 63 68 25 20  24 63 6f 6e 74 61 64 25  |  . ch% $contad%|
00006de0  3d c3 63 6f 6e 74 72 61  73 74 25 3a f2 75 64 70  |=.contrast%:.udp|
00006df0  62 61 72 28 2d 38 30 2c  63 6f 6e 74 72 61 73 74  |bar(-80,contrast|
00006e00  25 29 0d 2e f4 09 20 c9  20 31 31 0d 2e fe 11 20  |%).... . 11.... |
00006e10  20 e7 20 61 64 6a 75 73  74 25 20 8c 0d 2f 08 2c  | . adjust% ../.,|
00006e20  20 20 20 e7 20 73 61 74  75 72 61 74 69 6f 6e 25  |   . saturation%|
00006e30  3c 3e 30 20 73 61 74 75  72 61 74 69 6f 6e 25 2d  |<>0 saturation%-|
00006e40  3d 31 3a 63 68 25 3d b9  0d 2f 12 07 20 20 cc 0d  |=1:ch%=../..  ..|
00006e50  2f 1c 2d 20 20 20 e7 20  73 61 74 75 72 61 74 69  |/.-   . saturati|
00006e60  6f 6e 25 3c 3e 36 33 20  73 61 74 75 72 61 74 69  |on%<>63 saturati|
00006e70  6f 6e 25 2b 3d 31 3a 63  68 25 3d b9 0d 2f 26 07  |on%+=1:ch%=../&.|
00006e80  20 20 cd 0d 2f 30 3a 20  20 e7 20 63 68 25 20 24  |  ../0:  . ch% $|
00006e90  73 61 74 61 64 25 3d c3  73 61 74 75 72 61 74 69  |satad%=.saturati|
00006ea0  6f 6e 25 3a f2 75 64 70  62 61 72 28 2d 31 32 34  |on%:.udpbar(-124|
00006eb0  2c 73 61 74 75 72 61 74  69 6f 6e 25 29 0d 2f 3a  |,saturation%)./:|
00006ec0  09 20 c9 20 31 32 0d 2f  44 11 20 20 e7 20 61 64  |. . 12./D.  . ad|
00006ed0  6a 75 73 74 25 20 8c 0d  2f 4e 2d 20 20 20 e7 20  |just% ../N-   . |
00006ee0  73 61 74 75 72 61 74 69  6f 6e 25 3c 3e 36 33 20  |saturation%<>63 |
00006ef0  73 61 74 75 72 61 74 69  6f 6e 25 2b 3d 31 3a 63  |saturation%+=1:c|
00006f00  68 25 3d b9 0d 2f 58 07  20 20 cc 0d 2f 62 2c 20  |h%=../X.  ../b, |
00006f10  20 20 e7 20 73 61 74 75  72 61 74 69 6f 6e 25 3c  |  . saturation%<|
00006f20  3e 30 20 73 61 74 75 72  61 74 69 6f 6e 25 2d 3d  |>0 saturation%-=|
00006f30  31 3a 63 68 25 3d b9 0d  2f 6c 07 20 20 cd 0d 2f  |1:ch%=../l.  ../|
00006f40  76 3a 20 20 e7 20 63 68  25 20 24 73 61 74 61 64  |v:  . ch% $satad|
00006f50  25 3d c3 73 61 74 75 72  61 74 69 6f 6e 25 3a f2  |%=.saturation%:.|
00006f60  75 64 70 62 61 72 28 2d  31 32 34 2c 73 61 74 75  |udpbar(-124,satu|
00006f70  72 61 74 69 6f 6e 25 29  0d 2f 80 08 20 c9 20 34  |ration%)./.. . 4|
00006f80  0d 2f 8a 1a 20 20 f2 70  61 6c 73 6c 69 64 65 28  |./..  .palslide(|
00006f90  70 62 25 2c 2d 33 36 2c  31 29 0d 2f 94 08 20 c9  |pb%,-36,1)./.. .|
00006fa0  20 39 0d 2f 9e 1b 20 20  f2 70 61 6c 73 6c 69 64  | 9./..  .palslid|
00006fb0  65 28 21 70 62 25 2c 2d  38 30 2c 32 29 0d 2f a8  |e(!pb%,-80,2)./.|
00006fc0  09 20 c9 20 31 34 0d 2f  b2 1c 20 20 f2 70 61 6c  |. . 14./..  .pal|
00006fd0  73 6c 69 64 65 28 21 70  62 25 2c 2d 31 32 34 2c  |slide(!pb%,-124,|
00006fe0  33 29 0d 2f bc 08 20 c9  20 30 0d 2f c6 16 20 20  |3)./.. . 0./..  |
00006ff0  f2 73 65 74 70 61 6c 28  30 2c 33 32 2c 33 32 29  |.setpal(0,32,32)|
00007000  0d 2f d0 09 20 c9 20 31  36 0d 2f da 30 20 20 f2  |./.. . 16./.0  .|
00007010  73 65 74 70 61 6c 28 73  61 76 65 64 62 72 69 67  |setpal(savedbrig|
00007020  68 74 25 2c 73 61 76 65  64 63 6f 6e 74 25 2c 73  |ht%,savedcont%,s|
00007030  61 76 65 64 73 61 74 25  29 0d 2f e4 06 20 cb 0d  |avedsat%)./.. ..|
00007040  2f ee 04 0d 2f f8 0e c9  20 77 25 28 31 35 2c 30  |/.../... w%(15,0|
00007050  29 0d 30 02 10 20 c8 8e  20 71 66 6c 61 67 25 20  |).0.. .. qflag% |
00007060  ca 0d 30 0c 08 20 c9 20  31 0d 30 16 11 20 20 c8  |..0.. . 1.0..  .|
00007070  8e 20 70 62 25 21 31 36  20 ca 0d 30 20 09 20 20  |. pb%!16 ..0 .  |
00007080  c9 20 30 0d 30 2a 23 20  20 20 f2 6d 65 6e 75 28  |. 0.0*#   .menu(|
00007090  38 2c 21 70 62 25 2d 31  32 32 2c 70 62 25 21 34  |8,!pb%-122,pb%!4|
000070a0  2b 38 34 2c 30 29 0d 30  34 12 20 20 20 64 72 61  |+84,0).04.   dra|
000070b0  67 74 79 70 65 25 3d 31  0d 30 3e 09 20 20 c9 20  |gtype%=1.0>.  . |
000070c0  32 0d 30 48 15 20 20 20  f2 64 65 6c 65 74 65 67  |2.0H.   .deleteg|
000070d0  72 61 62 62 65 64 0d 30  52 07 20 20 cb 0d 30 5c  |rabbed.0R.  ..0\|
000070e0  08 20 c9 20 32 0d 30 66  11 20 20 c8 8e 20 70 62  |. . 2.0f.  .. pb|
000070f0  25 21 31 36 20 ca 0d 30  70 09 20 20 c9 20 30 0d  |%!16 ..0p.  . 0.|
00007100  30 7a 13 20 20 20 f2 73  68 75 74 64 6f 77 6e 28  |0z.   .shutdown(|
00007110  30 29 0d 30 84 09 20 20  c9 20 32 0d 30 8e 07 20  |0).0..  . 2.0.. |
00007120  20 cb 0d 30 98 08 20 c9  20 33 0d 30 a2 11 20 20  | ..0.. . 3.0..  |
00007130  c8 8e 20 70 62 25 21 31  36 20 ca 0d 30 ac 09 20  |.. pb%!16 ..0.. |
00007140  20 c9 20 30 0d 30 b6 23  20 20 20 f2 6d 65 6e 75  | . 0.0.#   .menu|
00007150  28 37 2c 21 70 62 25 2d  31 32 32 2c 70 62 25 21  |(7,!pb%-122,pb%!|
00007160  34 2b 38 34 2c 30 29 0d  30 c0 12 20 20 20 64 72  |4+84,0).0..   dr|
00007170  61 67 74 79 70 65 25 3d  30 0d 30 ca 09 20 20 c9  |agtype%=0.0..  .|
00007180  20 32 0d 30 d4 15 20 20  20 f2 64 65 6c 65 74 65  | 2.0..   .delete|
00007190  67 72 61 62 62 65 64 0d  30 de 07 20 20 cb 0d 30  |grabbed.0..  ..0|
000071a0  e8 06 20 cb 0d 30 f2 0f  20 f2 63 6c 77 69 6e 28  |.. ..0.. .clwin(|
000071b0  31 35 29 0d 30 fc 04 0d  31 06 0e c9 20 77 25 28  |15).0...1... w%(|
000071c0  31 37 2c 30 29 0d 31 10  10 20 c8 8e 20 70 62 25  |17,0).1.. .. pb%|
000071d0  21 31 36 20 ca 0d 31 1a  08 20 c9 20 30 0d 31 24  |!16 ..1.. . 0.1$|
000071e0  17 20 20 f2 73 70 65 65  64 73 6c 69 64 65 28 21  |.  .speedslide(!|
000071f0  70 62 25 29 0d 31 2e 08  20 c9 20 31 0d 31 38 15  |pb%).1.. . 1.18.|
00007200  20 20 e7 20 28 70 62 25  21 38 20 80 20 31 29 20  |  . (pb%!8 . 1) |
00007210  8c 0d 31 42 14 20 20 20  e7 20 73 70 65 65 64 25  |..1B.   . speed%|
00007220  3c 3e 30 20 8c 0d 31 4c  11 20 20 20 20 73 70 65  |<>0 ..1L.    spe|
00007230  65 64 25 2d 3d 31 0d 31  56 19 20 20 20 20 24 73  |ed%-=1.1V.    $s|
00007240  70 65 65 64 61 64 25 3d  c3 73 70 65 65 64 25 0d  |peedad%=.speed%.|
00007250  31 60 11 20 20 20 20 f2  73 70 65 65 64 62 61 72  |1`.    .speedbar|
00007260  0d 31 6a 08 20 20 20 cd  0d 31 74 07 20 20 cc 0d  |.1j.   ..1t.  ..|
00007270  31 7e 15 20 20 20 e7 20  73 70 65 65 64 25 3c 3e  |1~.   . speed%<>|
00007280  39 39 20 8c 0d 31 88 11  20 20 20 20 73 70 65 65  |99 ..1..    spee|
00007290  64 25 2b 3d 31 0d 31 92  19 20 20 20 20 24 73 70  |d%+=1.1..    $sp|
000072a0  65 65 64 61 64 25 3d c3  73 70 65 65 64 25 0d 31  |eedad%=.speed%.1|
000072b0  9c 11 20 20 20 20 f2 73  70 65 65 64 62 61 72 0d  |..    .speedbar.|
000072c0  31 a6 08 20 20 20 cd 0d  31 b0 07 20 20 cd 0d 31  |1..   ..1..  ..1|
000072d0  ba 08 20 c9 20 32 0d 31  c4 15 20 20 e7 20 28 70  |.. . 2.1..  . (p|
000072e0  62 25 21 38 20 80 20 31  29 20 8c 0d 31 ce 15 20  |b%!8 . 1) ..1.. |
000072f0  20 20 e7 20 73 70 65 65  64 25 3c 3e 39 39 20 8c  |  . speed%<>99 .|
00007300  0d 31 d8 11 20 20 20 20  73 70 65 65 64 25 2b 3d  |.1..    speed%+=|
00007310  31 0d 31 e2 19 20 20 20  20 24 73 70 65 65 64 61  |1.1..    $speeda|
00007320  64 25 3d c3 73 70 65 65  64 25 0d 31 ec 11 20 20  |d%=.speed%.1..  |
00007330  20 20 f2 73 70 65 65 64  62 61 72 0d 31 f6 08 20  |  .speedbar.1.. |
00007340  20 20 cd 0d 32 00 07 20  20 cc 0d 32 0a 14 20 20  |  ..2..  ..2..  |
00007350  20 e7 20 73 70 65 65 64  25 3c 3e 30 20 8c 0d 32  | . speed%<>0 ..2|
00007360  14 11 20 20 20 20 73 70  65 65 64 25 2d 3d 31 0d  |..    speed%-=1.|
00007370  32 1e 19 20 20 20 20 24  73 70 65 65 64 61 64 25  |2..    $speedad%|
00007380  3d c3 73 70 65 65 64 25  0d 32 28 11 20 20 20 20  |=.speed%.2(.    |
00007390  f2 73 70 65 65 64 62 61  72 0d 32 32 08 20 20 20  |.speedbar.22.   |
000073a0  cd 0d 32 3c 07 20 20 cd  0d 32 46 06 20 cb 0d 32  |..2<.  ..2F. ..2|
000073b0  50 05 cb 0d 32 5a 05 e1  0d 32 64 04 0d 32 6e 0f  |P...2Z...2d..2n.|
000073c0  dd 20 f2 6c 69 76 65 6d  65 6e 75 0d 32 78 10 6d  |. .livemenu.2x.m|
000073d0  6f 75 73 65 78 25 3d 21  70 62 25 0d 32 82 11 6d  |ousex%=!pb%.2..m|
000073e0  6f 75 73 65 79 25 3d 70  62 25 21 34 0d 32 8c 0f  |ousey%=pb%!4.2..|
000073f0  e7 20 62 69 74 25 3d 31  32 20 8c 0d 32 96 10 20  |. bit%=12 ..2.. |
00007400  74 69 63 6b 31 32 24 3d  22 3e 22 0d 32 a0 13 20  |tick12$=">".2.. |
00007410  63 61 63 68 65 6d 24 3d  63 61 63 68 65 24 0d 32  |cachem$=cache$.2|
00007420  aa 05 cc 0d 32 b4 0f 20  74 69 63 6b 31 32 24 3d  |....2.. tick12$=|
00007430  22 22 0d 32 be 10 20 63  61 63 68 65 6d 24 3d 22  |"".2.. cachem$="|
00007440  3c 22 0d 32 c8 05 cd 0d  32 d2 24 e7 20 67 72 61  |<".2....2.$. gra|
00007450  62 65 78 25 20 73 68 61  64 65 24 3d 22 22 20 8b  |bex% shade$="" .|
00007460  20 73 68 61 64 65 24 3d  22 3c 22 0d 32 dc 22 e7  | shade$="<".2.".|
00007470  20 6d 6f 6e 6f 24 3d 22  3e 22 20 8c 20 6d 73 24  | mono$=">" . ms$|
00007480  3d 22 3c 22 20 8b 20 6d  73 24 3d 22 22 0d 32 e6  |="<" . ms$="".2.|
00007490  54 74 65 6d 70 30 24 3d  22 46 61 73 74 47 72 61  |Ttemp0$="FastGra|
000074a0  62 7c 47 72 61 62 20 66  72 61 6d 65 7c 27 30 31  |b|Grab frame|'01|
000074b0  35 36 67 72 61 62 73 69  7a 65 24 27 46 72 61 6d  |56grabsize$'Fram|
000074c0  65 20 73 69 7a 65 7c 27  30 31 35 36 6c 69 76 65  |e size|'0156live|
000074d0  73 69 7a 65 24 27 4c 69  76 65 20 73 69 7a 65 7c  |size$'Live size||
000074e0  22 0d 32 f0 18 e7 20 62  6f 61 72 64 5f 69 73 5f  |".2... board_is_|
000074f0  31 36 5f 62 69 74 25 20  8c 0d 32 fa fb 20 74 65  |16_bit% ..2.. te|
00007500  6d 70 31 24 3d 6d 73 24  2b 74 69 63 6b 31 32 24  |mp1$=ms$+tick12$|
00007510  2b 22 31 36 20 62 69 74  20 64 61 74 61 7c 22 2b  |+"16 bit data|"+|
00007520  6d 73 24 2b 64 69 74 68  65 72 24 2b 22 44 69 74  |ms$+dither$+"Dit|
00007530  68 65 72 69 6e 67 7c 22  2b 6d 6f 6e 6f 24 2b 22  |hering|"+mono$+"|
00007540  4d 6f 6e 6f 63 68 72 6f  6d 65 7c 22 2b 66 69 65  |Monochrome|"+fie|
00007550  6c 64 24 2b 22 27 30 30  37 36 73 75 62 66 69 65  |ld$+"'0076subfie|
00007560  6c 64 24 27 53 69 6e 67  6c 65 20 66 69 65 6c 64  |ld$'Single field|
00007570  7c 22 2b 63 61 63 68 65  6d 24 2b 22 46 6f 72 63  ||"+cachem$+"Forc|
00007580  65 20 63 61 63 68 65 69  6e 67 7c 22 2b 73 68 61  |e cacheing|"+sha|
00007590  64 65 24 2b 22 53 68 6f  77 20 66 72 61 6d 65 7c  |de$+"Show frame||
000075a0  40 32 27 50 41 4c 20 64  65 63 6f 64 65 72 7c 27  |@2'PAL decoder|'|
000075b0  30 30 36 30 73 75 62 6d  6f 64 65 24 27 47 72 61  |0060submode$'Gra|
000075c0  62 20 6d 6f 64 65 7c 40  31 37 27 56 39 20 73 70  |b mode|@17'V9 sp|
000075d0  65 65 64 7c 53 61 76 65  20 63 68 6f 69 63 65 73  |eed|Save choices|
000075e0  7c 22 2b 6c 74 6f 6f 6c  24 2b 22 54 6f 6f 6c 62  ||"+ltool$+"Toolb|
000075f0  6f 78 7c 22 0d 33 04 05  cc 0d 33 0e f3 20 74 65  |ox|".3....3.. te|
00007600  6d 70 31 24 3d 74 69 63  6b 31 32 24 2b 22 31 32  |mp1$=tick12$+"12|
00007610  20 62 69 74 20 64 61 74  61 7c 22 2b 64 69 74 68  | bit data|"+dith|
00007620  65 72 24 2b 22 44 69 74  68 65 72 69 6e 67 7c 22  |er$+"Dithering|"|
00007630  2b 6d 6f 6e 6f 24 2b 22  4d 6f 6e 6f 63 68 72 6f  |+mono$+"Monochro|
00007640  6d 65 7c 22 2b 66 69 65  6c 64 24 2b 22 27 30 30  |me|"+field$+"'00|
00007650  37 36 73 75 62 66 69 65  6c 64 24 27 53 69 6e 67  |76subfield$'Sing|
00007660  6c 65 20 66 69 65 6c 64  7c 22 2b 63 61 63 68 65  |le field|"+cache|
00007670  6d 24 2b 22 46 6f 72 63  65 20 63 61 63 68 65 69  |m$+"Force cachei|
00007680  6e 67 7c 22 2b 73 68 61  64 65 24 2b 22 53 68 6f  |ng|"+shade$+"Sho|
00007690  77 20 66 72 61 6d 65 7c  40 32 27 50 41 4c 20 64  |w frame|@2'PAL d|
000076a0  65 63 6f 64 65 72 7c 27  30 30 36 30 73 75 62 6d  |ecoder|'0060subm|
000076b0  6f 64 65 24 27 47 72 61  62 20 6d 6f 64 65 7c 40  |ode$'Grab mode|@|
000076c0  31 37 27 56 39 20 73 70  65 65 64 7c 53 61 76 65  |17'V9 speed|Save|
000076d0  20 63 68 6f 69 63 65 73  7c 22 2b 6c 74 6f 6f 6c  | choices|"+ltool|
000076e0  24 2b 22 54 6f 6f 6c 62  6f 78 7c 22 0d 33 18 05  |$+"Toolbox|".3..|
000076f0  cd 0d 33 22 25 6d 65 6e  75 25 3d a4 63 6d 65 6e  |..3"%menu%=.cmen|
00007700  75 28 30 2c 74 65 6d 70  30 24 2b 74 65 6d 70 31  |u(0,temp0$+temp1|
00007710  24 2c 32 33 36 29 0d 33  2c 0e 6d 65 6e 74 79 70  |$,236).3,.mentyp|
00007720  65 25 3d 31 0d 33 36 05  e1 0d 33 40 04 0d 33 4a  |e%=1.36...3@..3J|
00007730  0f dd 20 f2 67 72 61 62  6d 65 6e 75 0d 33 54 10  |.. .grabmenu.3T.|
00007740  6d 6f 75 73 65 78 25 3d  21 70 62 25 0d 33 5e 11  |mousex%=!pb%.3^.|
00007750  6d 6f 75 73 65 79 25 3d  70 62 25 21 34 0d 33 68  |mousey%=pb%!4.3h|
00007760  20 e7 20 67 72 61 62 31  32 25 20 72 61 77 24 3d  | . grab12% raw$=|
00007770  22 22 20 8b 20 72 61 77  24 3d 22 3c 22 0d 33 72  |"" . raw$="<".3r|
00007780  5e 74 65 6d 70 30 24 3d  22 46 61 73 74 47 72 61  |^temp0$="FastGra|
00007790  62 7c 40 31 30 27 53 70  72 69 74 65 20 69 6e 66  |b|@10'Sprite inf|
000077a0  6f 7c 40 39 27 5a 6f 6f  6d 7c 40 37 27 53 61 76  |o|@9'Zoom|@7'Sav|
000077b0  65 20 73 70 72 69 74 65  7c 40 31 27 22 2b 72 61  |e sprite|@1'"+ra|
000077c0  77 24 2b 22 43 68 61 6e  67 65 46 53 49 7c 40 31  |w$+"ChangeFSI|@1|
000077d0  34 27 43 72 65 64 69 74  73 7c 22 0d 33 7c 18 e7  |4'Credits|".3|..|
000077e0  20 62 6f 61 72 64 5f 69  73 5f 31 36 5f 62 69 74  | board_is_16_bit|
000077f0  25 20 8c 0d 33 86 5e 20  74 65 6d 70 31 24 3d 22  |% ..3.^ temp1$="|
00007800  40 31 31 27 22 2b 72 61  77 24 2b 22 31 36 20 62  |@11'"+raw$+"16 b|
00007810  69 74 20 69 6e 66 6f 7c  40 38 27 22 2b 72 61 77  |it info|@8'"+raw|
00007820  24 2b 22 53 61 76 65 20  72 61 77 20 64 61 74 61  |$+"Save raw data|
00007830  7c 44 65 6c 65 74 65 20  69 6d 61 67 65 7c 22 2b  ||Delete image|"+|
00007840  67 74 6f 6f 6c 24 2b 22  54 6f 6f 6c 62 6f 78 7c  |gtool$+"Toolbox||
00007850  22 0d 33 90 05 cc 0d 33  9a 5e 20 74 65 6d 70 31  |".3....3.^ temp1|
00007860  24 3d 22 40 31 31 27 22  2b 72 61 77 24 2b 22 31  |$="@11'"+raw$+"1|
00007870  32 20 62 69 74 20 69 6e  66 6f 7c 40 38 27 22 2b  |2 bit info|@8'"+|
00007880  72 61 77 24 2b 22 53 61  76 65 20 72 61 77 20 64  |raw$+"Save raw d|
00007890  61 74 61 7c 44 65 6c 65  74 65 20 69 6d 61 67 65  |ata|Delete image|
000078a0  7c 22 2b 67 74 6f 6f 6c  24 2b 22 54 6f 6f 6c 62  ||"+gtool$+"Toolb|
000078b0  6f 78 7c 22 0d 33 a4 05  cd 0d 33 ae 25 6d 65 6e  |ox|".3....3.%men|
000078c0  75 25 3d a4 63 6d 65 6e  75 28 30 2c 74 65 6d 70  |u%=.cmenu(0,temp|
000078d0  30 24 2b 74 65 6d 70 31  24 2c 32 32 30 29 0d 33  |0$+temp1$,220).3|
000078e0  b8 0e 6d 65 6e 74 79 70  65 25 3d 32 0d 33 c2 05  |..mentype%=2.3..|
000078f0  e1 0d 33 cc 04 0d 33 d6  25 dd 20 f2 70 61 6c 73  |..3...3.%. .pals|
00007900  6c 69 64 65 28 78 70 6f  73 25 2c 79 70 6f 73 25  |lide(xpos%,ypos%|
00007910  2c 64 72 61 67 6e 75 6d  25 29 0d 33 e0 17 21 64  |,dragnum%).3..!d|
00007920  72 61 67 67 69 6e 67 25  3d 64 72 61 67 6e 75 6d  |ragging%=dragnum|
00007930  25 0d 33 ea 10 21 6d 62  25 3d 77 25 28 32 2c 30  |%.3..!mb%=w%(2,0|
00007940  29 0d 33 f4 21 c8 99 20  22 57 69 6d 70 5f 47 65  |).3.!.. "Wimp_Ge|
00007950  74 57 69 6e 64 6f 77 53  74 61 74 65 22 2c 2c 6d  |tWindowState",,m|
00007960  62 25 0d 33 fe 14 6d 62  25 21 32 34 3d 31 34 30  |b%.3..mb%!24=140|
00007970  2b 6d 62 25 21 34 0d 34  08 17 6d 62 25 21 32 38  |+mb%!4.4..mb%!28|
00007980  3d 79 70 6f 73 25 2b 6d  62 25 21 31 36 0d 34 12  |=ypos%+mb%!16.4.|
00007990  14 6d 62 25 21 33 32 3d  33 39 32 2b 6d 62 25 21  |.mb%!32=392+mb%!|
000079a0  34 0d 34 1c 1a 6d 62 25  21 33 36 3d 79 70 6f 73  |4.4..mb%!36=ypos|
000079b0  25 2b 32 30 2b 6d 62 25  21 31 36 0d 34 26 10 6d  |%+20+mb%!16.4&.m|
000079c0  62 25 21 38 3d 6d 62 25  21 32 34 0d 34 30 11 6d  |b%!8=mb%!24.40.m|
000079d0  62 25 21 31 32 3d 6d 62  25 21 32 38 0d 34 3a 10  |b%!12=mb%!28.4:.|
000079e0  6d 62 25 21 31 36 3d 78  70 6f 73 25 0d 34 44 11  |mb%!16=xpos%.4D.|
000079f0  6d 62 25 21 32 30 3d 6d  62 25 21 33 36 0d 34 4e  |mb%!20=mb%!36.4N|
00007a00  0b 6d 62 25 21 34 3d 37  0d 34 58 1a c8 99 20 22  |.mb%!4=7.4X... "|
00007a10  57 69 6d 70 5f 44 72 61  67 42 6f 78 22 2c 2c 6d  |Wimp_DragBox",,m|
00007a20  62 25 0d 34 62 05 e1 0d  34 6c 04 0d 34 76 1b dd  |b%.4b...4l..4v..|
00007a30  20 f2 75 64 70 62 61 72  28 62 61 72 79 25 2c 76  | .udpbar(bary%,v|
00007a40  61 6c 75 65 25 29 0d 34  80 10 e7 20 76 61 6c 75  |alue%).4... valu|
00007a50  65 25 3c 30 20 e1 0d 34  8a 10 21 6d 62 25 3d 77  |e%<0 ..4..!mb%=w|
00007a60  25 28 32 2c 30 29 0d 34  94 0d 6d 62 25 21 34 3d  |%(2,0).4..mb%!4=|
00007a70  31 34 32 0d 34 9e 0f 6d  62 25 21 38 3d 62 61 72  |142.4..mb%!8=bar|
00007a80  79 25 0d 34 a8 0e 6d 62  25 21 31 32 3d 33 39 34  |y%.4..mb%!12=394|
00007a90  0d 34 b2 13 6d 62 25 21  31 36 3d 62 61 72 79 25  |.4..mb%!16=bary%|
00007aa0  2b 32 32 0d 34 bc 27 c8  99 20 22 57 69 6d 70 5f  |+22.4.'.. "Wimp_|
00007ab0  55 70 64 61 74 65 57 69  6e 64 6f 77 22 2c 2c 6d  |UpdateWindow",,m|
00007ac0  62 25 20 b8 20 6d 6f 72  65 25 0d 34 c6 14 78 30  |b% . more%.4..x0|
00007ad0  25 3d 6d 62 25 21 34 2d  6d 62 25 21 32 30 0d 34  |%=mb%!4-mb%!20.4|
00007ae0  d0 15 79 30 25 3d 6d 62  25 21 31 36 2d 6d 62 25  |..y0%=mb%!16-mb%|
00007af0  21 32 34 0d 34 da 0c c8  95 20 6d 6f 72 65 25 0d  |!24.4.... more%.|
00007b00  34 e4 06 20 da 0d 34 ee  1a 20 c8 99 20 22 57 69  |4.. ..4.. .. "Wi|
00007b10  6d 70 5f 53 65 74 43 6f  6c 6f 75 72 22 2c 37 0d  |mp_SetColour",7.|
00007b20  34 f8 28 20 c8 93 20 c8  90 20 78 30 25 2b 31 34  |4.( .. .. x0%+14|
00007b30  30 2c 79 30 25 2b 62 61  72 79 25 2c 76 61 6c 75  |0,y0%+bary%,valu|
00007b40  65 25 2a 34 2c 32 30 0d  35 02 28 20 c8 99 20 22  |e%*4,20.5.( .. "|
00007b50  57 69 6d 70 5f 47 65 74  52 65 63 74 61 6e 67 6c  |Wimp_GetRectangl|
00007b60  65 22 2c 2c 6d 62 25 20  b8 20 6d 6f 72 65 25 0d  |e",,mb% . more%.|
00007b70  35 0c 05 ce 0d 35 16 10  21 6d 62 25 3d 77 25 28  |5....5..!mb%=w%(|
00007b80  32 2c 30 29 0d 35 20 0c  6d 62 25 21 34 3d 38 34  |2,0).5 .mb%!4=84|
00007b90  0d 35 2a 11 6d 62 25 21  38 3d 62 61 72 79 25 2d  |.5*.mb%!8=bary%-|
00007ba0  34 0d 35 34 0e 6d 62 25  21 31 32 3d 31 33 36 0d  |4.54.mb%!12=136.|
00007bb0  35 3e 13 6d 62 25 21 31  36 3d 62 61 72 79 25 2b  |5>.mb%!16=bary%+|
00007bc0  32 36 0d 35 48 27 c8 99  20 22 57 69 6d 70 5f 55  |26.5H'.. "Wimp_U|
00007bd0  70 64 61 74 65 57 69 6e  64 6f 77 22 2c 2c 6d 62  |pdateWindow",,mb|
00007be0  25 20 b8 20 6d 6f 72 65  25 0d 35 52 14 78 30 25  |% . more%.5R.x0%|
00007bf0  3d 6d 62 25 21 34 2d 6d  62 25 21 32 30 0d 35 5c  |=mb%!4-mb%!20.5\|
00007c00  15 79 30 25 3d 6d 62 25  21 31 36 2d 6d 62 25 21  |.y0%=mb%!16-mb%!|
00007c10  32 34 0d 35 66 0c c8 95  20 6d 6f 72 65 25 0d 35  |24.5f... more%.5|
00007c20  70 06 20 da 0d 35 7a 28  20 c8 99 20 22 57 69 6d  |p. ..5z( .. "Wim|
00007c30  70 5f 47 65 74 52 65 63  74 61 6e 67 6c 65 22 2c  |p_GetRectangle",|
00007c40  2c 6d 62 25 20 b8 20 6d  6f 72 65 25 0d 35 84 05  |,mb% . more%.5..|
00007c50  ce 0d 35 8e 0e c8 8e 20  62 61 72 79 25 20 ca 0d  |..5.... bary% ..|
00007c60  35 98 09 c9 20 2d 33 36  0d 35 a2 10 20 f2 62 72  |5... -36.5.. .br|
00007c70  69 67 68 74 6e 65 73 73  0d 35 ac 09 c9 20 2d 38  |ightness.5... -8|
00007c80  30 0d 35 b6 0e 20 f2 63  6f 6e 74 72 61 73 74 0d  |0.5.. .contrast.|
00007c90  35 c0 0a c9 20 2d 31 32  34 0d 35 ca 10 20 f2 73  |5... -124.5.. .s|
00007ca0  61 74 75 72 61 74 69 6f  6e 0d 35 d4 05 cb 0d 35  |aturation.5....5|
00007cb0  de 05 e1 0d 35 e8 04 0d  35 f2 17 dd 20 f2 73 65  |....5...5... .se|
00007cc0  74 70 61 6c 28 62 25 2c  63 25 2c 73 25 29 0d 35  |tpal(b%,c%,s%).5|
00007cd0  fc 2e 62 72 69 67 68 74  6e 65 73 73 25 3d 62 25  |..brightness%=b%|
00007ce0  3a 63 6f 6e 74 72 61 73  74 25 3d 63 25 3a 73 61  |:contrast%=c%:sa|
00007cf0  74 75 72 61 74 69 6f 6e  25 3d 73 25 0d 36 06 14  |turation%=s%.6..|
00007d00  24 62 72 69 67 68 74 61  64 25 3d c3 28 62 25 29  |$brightad%=.(b%)|
00007d10  0d 36 10 12 24 63 6f 6e  74 61 64 25 3d c3 28 63  |.6..$contad%=.(c|
00007d20  25 29 0d 36 1a 11 24 73  61 74 61 64 25 3d c3 28  |%).6..$satad%=.(|
00007d30  73 25 29 0d 36 24 13 f2  75 64 70 62 61 72 28 2d  |s%).6$..udpbar(-|
00007d40  33 36 2c 62 25 29 0d 36  2e 13 f2 75 64 70 62 61  |36,b%).6...udpba|
00007d50  72 28 2d 38 30 2c 63 25  29 0d 36 38 14 f2 75 64  |r(-80,c%).68..ud|
00007d60  70 62 61 72 28 2d 31 32  34 2c 73 25 29 0d 36 42  |pbar(-124,s%).6B|
00007d70  05 e1 0d 36 4c 04 0d 36  56 15 dd 20 a4 63 61 6c  |...6L..6V.. .cal|
00007d80  63 62 61 72 28 78 70 6f  73 25 29 0d 36 60 14 ea  |cbar(xpos%).6`..|
00007d90  20 77 69 6e 70 6f 73 25  2c 76 61 6c 75 65 25 0d  | winpos%,value%.|
00007da0  36 6a 10 21 6d 62 25 3d  77 25 28 32 2c 30 29 0d  |6j.!mb%=w%(2,0).|
00007db0  36 74 21 c8 99 20 22 57  69 6d 70 5f 47 65 74 57  |6t!.. "Wimp_GetW|
00007dc0  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 6d 62 25  |indowState",,mb%|
00007dd0  0d 36 7e 17 77 69 6e 70  6f 73 25 3d 78 70 6f 73  |.6~.winpos%=xpos|
00007de0  25 2d 6d 62 25 21 34 0d  36 88 14 3d 28 77 69 6e  |%-mb%!4.6..=(win|
00007df0  70 6f 73 25 2d 31 34 30  29 2f 34 0d 36 92 04 0d  |pos%-140)/4.6...|
00007e00  36 9c 10 dd 20 f2 64 6f  70 61 6c 64 72 61 67 0d  |6... .dopaldrag.|
00007e10  36 a6 21 c8 99 20 22 57  69 6d 70 5f 47 65 74 50  |6.!.. "Wimp_GetP|
00007e20  6f 69 6e 74 65 72 49 6e  66 6f 22 2c 2c 6d 62 25  |ointerInfo",,mb%|
00007e30  0d 36 b0 13 c8 8e 20 21  64 72 61 67 67 69 6e 67  |.6.... !dragging|
00007e40  25 20 ca 0d 36 ba 07 c9  20 31 0d 36 c4 1e 20 6e  |% ..6... 1.6.. n|
00007e50  65 77 62 72 69 67 68 74  25 3d a4 63 61 6c 63 62  |ewbright%=.calcb|
00007e60  61 72 28 21 6d 62 25 29  0d 36 ce 1f 20 e7 20 62  |ar(!mb%).6.. . b|
00007e70  72 69 67 68 74 6e 65 73  73 25 3d 6e 65 77 62 72  |rightness%=newbr|
00007e80  69 67 68 74 25 20 e1 0d  36 d8 1b 20 62 72 69 67  |ight% ..6.. brig|
00007e90  68 74 6e 65 73 73 25 3d  6e 65 77 62 72 69 67 68  |htness%=newbrigh|
00007ea0  74 25 0d 36 e2 1c 20 24  62 72 69 67 68 74 61 64  |t%.6.. $brightad|
00007eb0  25 3d c3 62 72 69 67 68  74 6e 65 73 73 25 0d 36  |%=.brightness%.6|
00007ec0  ec 1d 20 f2 75 64 70 62  61 72 28 2d 33 36 2c 62  |.. .udpbar(-36,b|
00007ed0  72 69 67 68 74 6e 65 73  73 25 29 0d 36 f6 07 c9  |rightness%).6...|
00007ee0  20 32 0d 37 00 1c 20 6e  65 77 63 6f 6e 74 25 3d  | 2.7.. newcont%=|
00007ef0  a4 63 61 6c 63 62 61 72  28 21 6d 62 25 29 0d 37  |.calcbar(!mb%).7|
00007f00  0a 1b 20 e7 20 63 6f 6e  74 72 61 73 74 25 3d 6e  |.. . contrast%=n|
00007f10  65 77 63 6f 6e 74 25 20  e1 0d 37 14 17 20 63 6f  |ewcont% ..7.. co|
00007f20  6e 74 72 61 73 74 25 3d  6e 65 77 63 6f 6e 74 25  |ntrast%=newcont%|
00007f30  0d 37 1e 18 20 24 63 6f  6e 74 61 64 25 3d c3 63  |.7.. $contad%=.c|
00007f40  6f 6e 74 72 61 73 74 25  0d 37 28 1b 20 f2 75 64  |ontrast%.7(. .ud|
00007f50  70 62 61 72 28 2d 38 30  2c 63 6f 6e 74 72 61 73  |pbar(-80,contras|
00007f60  74 25 29 0d 37 32 07 c9  20 33 0d 37 3c 1b 20 6e  |t%).72.. 3.7<. n|
00007f70  65 77 73 61 74 25 3d a4  63 61 6c 63 62 61 72 28  |ewsat%=.calcbar(|
00007f80  21 6d 62 25 29 0d 37 46  1c 20 e7 20 73 61 74 75  |!mb%).7F. . satu|
00007f90  72 61 74 69 6f 6e 25 3d  6e 65 77 73 61 74 25 20  |ration%=newsat% |
00007fa0  e1 0d 37 50 18 20 73 61  74 75 72 61 74 69 6f 6e  |..7P. saturation|
00007fb0  25 3d 6e 65 77 73 61 74  25 0d 37 5a 19 20 24 73  |%=newsat%.7Z. $s|
00007fc0  61 74 61 64 25 3d c3 73  61 74 75 72 61 74 69 6f  |atad%=.saturatio|
00007fd0  6e 25 0d 37 64 1e 20 f2  75 64 70 62 61 72 28 2d  |n%.7d. .udpbar(-|
00007fe0  31 32 34 2c 73 61 74 75  72 61 74 69 6f 6e 25 29  |124,saturation%)|
00007ff0  0d 37 6e 05 cb 0d 37 78  05 e1 0d 37 82 04 0d 37  |.7n...7x...7...7|
00008000  8c 18 dd 20 f2 73 70 65  65 64 73 6c 69 64 65 28  |... .speedslide(|
00008010  78 70 6f 73 25 29 0d 37  96 10 21 64 72 61 67 67  |xpos%).7..!dragg|
00008020  69 6e 67 25 3d 34 0d 37  a0 11 21 6d 62 25 3d 77  |ing%=4.7..!mb%=w|
00008030  25 28 31 37 2c 30 29 0d  37 aa 21 c8 99 20 22 57  |%(17,0).7.!.. "W|
00008040  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00008050  74 65 22 2c 2c 6d 62 25  0d 37 b4 14 6d 62 25 21  |te",,mb%.7..mb%!|
00008060  32 34 3d 31 34 30 2b 6d  62 25 21 34 0d 37 be 15  |24=140+mb%!4.7..|
00008070  6d 62 25 21 32 38 3d 2d  33 36 2b 6d 62 25 21 31  |mb%!28=-36+mb%!1|
00008080  36 0d 37 c8 14 6d 62 25  21 33 32 3d 33 33 38 2b  |6.7..mb%!32=338+|
00008090  6d 62 25 21 34 0d 37 d2  15 6d 62 25 21 33 36 3d  |mb%!4.7..mb%!36=|
000080a0  2d 31 36 2b 6d 62 25 21  31 36 0d 37 dc 10 6d 62  |-16+mb%!16.7..mb|
000080b0  25 21 38 3d 6d 62 25 21  32 34 0d 37 e6 11 6d 62  |%!8=mb%!24.7..mb|
000080c0  25 21 31 32 3d 6d 62 25  21 32 38 0d 37 f0 10 6d  |%!12=mb%!28.7..m|
000080d0  62 25 21 31 36 3d 78 70  6f 73 25 0d 37 fa 11 6d  |b%!16=xpos%.7..m|
000080e0  62 25 21 32 30 3d 6d 62  25 21 33 36 0d 38 04 0b  |b%!20=mb%!36.8..|
000080f0  6d 62 25 21 34 3d 37 0d  38 0e 1a c8 99 20 22 57  |mb%!4=7.8.... "W|
00008100  69 6d 70 5f 44 72 61 67  42 6f 78 22 2c 2c 6d 62  |imp_DragBox",,mb|
00008110  25 0d 38 18 05 e1 0d 38  22 04 0d 38 2c 0f dd 20  |%.8....8"..8,.. |
00008120  f2 73 70 65 65 64 62 61  72 0d 38 36 10 e7 20 73  |.speedbar.86.. s|
00008130  70 65 65 64 25 3c 30 20  e1 0d 38 40 11 21 6d 62  |peed%<0 ..8@.!mb|
00008140  25 3d 77 25 28 31 37 2c  30 29 0d 38 4a 0d 6d 62  |%=w%(17,0).8J.mb|
00008150  25 21 34 3d 31 34 32 0d  38 54 0d 6d 62 25 21 38  |%!4=142.8T.mb%!8|
00008160  3d 2d 33 36 0d 38 5e 0e  6d 62 25 21 31 32 3d 33  |=-36.8^.mb%!12=3|
00008170  34 30 0d 38 68 0e 6d 62  25 21 31 36 3d 2d 31 34  |40.8h.mb%!16=-14|
00008180  0d 38 72 27 c8 99 20 22  57 69 6d 70 5f 55 70 64  |.8r'.. "Wimp_Upd|
00008190  61 74 65 57 69 6e 64 6f  77 22 2c 2c 6d 62 25 20  |ateWindow",,mb% |
000081a0  b8 20 6d 6f 72 65 25 0d  38 7c 14 78 30 25 3d 6d  |. more%.8|.x0%=m|
000081b0  62 25 21 34 2d 6d 62 25  21 32 30 0d 38 86 15 79  |b%!4-mb%!20.8..y|
000081c0  30 25 3d 6d 62 25 21 31  36 2d 6d 62 25 21 32 34  |0%=mb%!16-mb%!24|
000081d0  0d 38 90 0c c8 95 20 6d  6f 72 65 25 0d 38 9a 06  |.8.... more%.8..|
000081e0  20 da 0d 38 a4 1a 20 c8  99 20 22 57 69 6d 70 5f  | ..8.. .. "Wimp_|
000081f0  53 65 74 43 6f 6c 6f 75  72 22 2c 37 0d 38 ae 25  |SetColour",7.8.%|
00008200  20 c8 93 20 c8 90 20 78  30 25 2b 31 34 30 2c 79  | .. .. x0%+140,y|
00008210  30 25 2d 33 36 2c 73 70  65 65 64 25 2a 32 2c 32  |0%-36,speed%*2,2|
00008220  30 0d 38 b8 28 20 c8 99  20 22 57 69 6d 70 5f 47  |0.8.( .. "Wimp_G|
00008230  65 74 52 65 63 74 61 6e  67 6c 65 22 2c 2c 6d 62  |etRectangle",,mb|
00008240  25 20 b8 20 6d 6f 72 65  25 0d 38 c2 05 ce 0d 38  |% . more%.8....8|
00008250  cc 11 21 6d 62 25 3d 77  25 28 31 37 2c 30 29 0d  |..!mb%=w%(17,0).|
00008260  38 d6 0c 6d 62 25 21 34  3d 38 34 0d 38 e0 0d 6d  |8..mb%!4=84.8..m|
00008270  62 25 21 38 3d 2d 34 30  0d 38 ea 0e 6d 62 25 21  |b%!8=-40.8..mb%!|
00008280  31 32 3d 31 33 36 0d 38  f4 0e 6d 62 25 21 31 36  |12=136.8..mb%!16|
00008290  3d 2d 31 30 0d 38 fe 27  c8 99 20 22 57 69 6d 70  |=-10.8.'.. "Wimp|
000082a0  5f 55 70 64 61 74 65 57  69 6e 64 6f 77 22 2c 2c  |_UpdateWindow",,|
000082b0  6d 62 25 20 b8 20 6d 6f  72 65 25 0d 39 08 14 78  |mb% . more%.9..x|
000082c0  30 25 3d 6d 62 25 21 34  2d 6d 62 25 21 32 30 0d  |0%=mb%!4-mb%!20.|
000082d0  39 12 15 79 30 25 3d 6d  62 25 21 31 36 2d 6d 62  |9..y0%=mb%!16-mb|
000082e0  25 21 32 34 0d 39 1c 0c  c8 95 20 6d 6f 72 65 25  |%!24.9.... more%|
000082f0  0d 39 26 06 20 da 0d 39  30 28 20 c8 99 20 22 57  |.9&. ..90( .. "W|
00008300  69 6d 70 5f 47 65 74 52  65 63 74 61 6e 67 6c 65  |imp_GetRectangle|
00008310  22 2c 2c 6d 62 25 20 b8  20 6d 6f 72 65 25 0d 39  |",,mb% . more%.9|
00008320  3a 05 ce 0d 39 44 0a f2  73 70 65 65 64 0d 39 4e  |:...9D..speed.9N|
00008330  05 cb 0d 39 58 05 e1 0d  39 62 04 0d 39 6c 17 dd  |...9X...9b..9l..|
00008340  20 a4 63 61 6c 63 73 70  65 65 64 28 78 70 6f 73  | .calcspeed(xpos|
00008350  25 29 0d 39 76 14 ea 20  77 69 6e 70 6f 73 25 2c  |%).9v.. winpos%,|
00008360  76 61 6c 75 65 25 0d 39  80 11 21 6d 62 25 3d 77  |value%.9..!mb%=w|
00008370  25 28 31 37 2c 30 29 0d  39 8a 21 c8 99 20 22 57  |%(17,0).9.!.. "W|
00008380  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00008390  74 65 22 2c 2c 6d 62 25  0d 39 94 17 77 69 6e 70  |te",,mb%.9..winp|
000083a0  6f 73 25 3d 78 70 6f 73  25 2d 6d 62 25 21 34 0d  |os%=xpos%-mb%!4.|
000083b0  39 9e 14 3d 28 77 69 6e  70 6f 73 25 2d 31 34 30  |9..=(winpos%-140|
000083c0  29 2f 32 0d 39 a8 04 0d  39 b2 12 dd 20 f2 64 6f  |)/2.9...9... .do|
000083d0  73 70 65 65 64 64 72 61  67 0d 39 bc 21 c8 99 20  |speeddrag.9.!.. |
000083e0  22 57 69 6d 70 5f 47 65  74 50 6f 69 6e 74 65 72  |"Wimp_GetPointer|
000083f0  49 6e 66 6f 22 2c 2c 6d  62 25 0d 39 c6 1e 6e 65  |Info",,mb%.9..ne|
00008400  77 73 70 65 65 64 25 3d  a4 63 61 6c 63 73 70 65  |wspeed%=.calcspe|
00008410  65 64 28 21 6d 62 25 29  0d 39 d0 18 e7 20 73 70  |ed(!mb%).9... sp|
00008420  65 65 64 25 3d 6e 65 77  73 70 65 65 64 25 20 e1  |eed%=newspeed% .|
00008430  0d 39 da 14 73 70 65 65  64 25 3d 6e 65 77 73 70  |.9..speed%=newsp|
00008440  65 65 64 25 0d 39 e4 15  24 73 70 65 65 64 61 64  |eed%.9..$speedad|
00008450  25 3d c3 73 70 65 65 64  25 0d 39 ee 0d f2 73 70  |%=.speed%.9...sp|
00008460  65 65 64 62 61 72 0d 39  f8 05 e1 0d 3a 02 04 0d  |eedbar.9....:...|
00008470  3a 0c 0c dd 20 f2 73 70  65 65 64 0d 3a 16 17 21  |:... .speed.:..!|
00008480  73 70 65 65 64 76 61 6c  3d 39 39 2d 73 70 65 65  |speedval=99-spee|
00008490  64 25 0d 3a 20 05 e1 0d  3a 2a 04 0d 3a 34 0f dd  |d%.: ...:*..:4..|
000084a0  20 f2 63 6f 6e 74 72 61  73 74 0d 3a 3e 10 3f 49  | .contrast.:>.?I|
000084b0  49 43 62 6c 6f 63 6b 25  3d 32 0d 3a 48 19 49 49  |ICblock%=2.:H.II|
000084c0  43 62 6c 6f 63 6b 25 3f  31 3d 63 6f 6e 74 72 61  |Cblock%?1=contra|
000084d0  73 74 25 0d 3a 52 1b c8  99 20 26 32 34 30 2c 31  |st%.:R... &240,1|
000084e0  33 36 2c 49 49 43 62 6c  6f 63 6b 25 2c 32 0d 3a  |36,IICblock%,2.:|
000084f0  5c 05 e1 0d 3a 66 04 0d  3a 70 11 dd 20 f2 73 61  |\...:f..:p.. .sa|
00008500  74 75 72 61 74 69 6f 6e  0d 3a 7a 10 3f 49 49 43  |turation.:z.?IIC|
00008510  62 6c 6f 63 6b 25 3d 31  0d 3a 84 1b 49 49 43 62  |block%=1.:..IICb|
00008520  6c 6f 63 6b 25 3f 31 3d  73 61 74 75 72 61 74 69  |lock%?1=saturati|
00008530  6f 6e 25 0d 3a 8e 1b c8  99 20 26 32 34 30 2c 31  |on%.:.... &240,1|
00008540  33 36 2c 49 49 43 62 6c  6f 63 6b 25 2c 32 0d 3a  |36,IICblock%,2.:|
00008550  98 05 e1 0d 3a a2 04 0d  3a ac 11 dd 20 f2 62 72  |....:...:... .br|
00008560  69 67 68 74 6e 65 73 73  0d 3a b6 10 3f 49 49 43  |ightness.:..?IIC|
00008570  62 6c 6f 63 6b 25 3d 30  0d 3a c0 1b 49 49 43 62  |block%=0.:..IICb|
00008580  6c 6f 63 6b 25 3f 31 3d  62 72 69 67 68 74 6e 65  |lock%?1=brightne|
00008590  73 73 25 0d 3a ca 1b c8  99 20 26 32 34 30 2c 31  |ss%.:.... &240,1|
000085a0  33 36 2c 49 49 43 62 6c  6f 63 6b 25 2c 32 0d 3a  |36,IICblock%,2.:|
000085b0  d4 05 e1 0d 3a de 04 0d  3a e8 18 dd 20 f2 63 68  |....:...:... .ch|
000085c0  6b 62 6e 64 73 28 61 64  64 72 65 73 73 25 29 0d  |kbnds(address%).|
000085d0  3a f2 20 e7 20 a9 24 61  64 64 72 65 73 73 25 3d  |:. . .$address%=|
000085e0  30 20 24 61 64 64 72 65  73 73 25 3d 22 30 22 0d  |0 $address%="0".|
000085f0  3a fc 22 e7 20 bb 24 61  64 64 72 65 73 73 25 3e  |:.". .$address%>|
00008600  36 33 20 24 61 64 64 72  65 73 73 25 3d 22 36 33  |63 $address%="63|
00008610  22 0d 3b 06 05 e1 0d 3b  10 04 0d 3b 1a 0e dd 20  |".;....;...;... |
00008620  f2 64 72 61 67 65 6e 64  0d 3b 24 15 ea 20 64 78  |.dragend.;$.. dx|
00008630  25 2c 64 79 25 2c 64 77  25 2c 64 69 25 0d 3b 2e  |%,dy%,dw%,di%.;.|
00008640  13 c8 8e 20 21 64 72 61  67 67 69 6e 67 25 20 ca  |... !dragging% .|
00008650  0d 3b 38 0d c9 20 31 2c  32 2c 33 2c 34 0d 3b 42  |.;8.. 1,2,3,4.;B|
00008660  11 20 21 64 72 61 67 67  69 6e 67 25 3d 30 0d 3b  |. !dragging%=0.;|
00008670  4c 06 20 e1 0d 3b 56 05  cb 0d 3b 60 12 c8 8e 20  |L. ..;V...;`... |
00008680  64 72 61 67 74 79 70 65  25 20 ca 0d 3b 6a 09 c9  |dragtype% ..;j..|
00008690  20 30 2c 31 0d 3b 74 22  20 c8 99 20 22 57 69 6d  | 0,1.;t" .. "Wim|
000086a0  70 5f 47 65 74 50 6f 69  6e 74 65 72 49 6e 66 6f  |p_GetPointerInfo|
000086b0  22 2c 2c 6d 62 25 0d 3b  7e 0d 20 64 78 25 3d 21  |",,mb%.;~. dx%=!|
000086c0  6d 62 25 0d 3b 88 0e 20  64 79 25 3d 6d 62 25 21  |mb%.;.. dy%=mb%!|
000086d0  34 0d 3b 92 0f 20 64 77  25 3d 6d 62 25 21 31 32  |4.;.. dw%=mb%!12|
000086e0  0d 3b 9c 0f 20 64 69 25  3d 6d 62 25 21 31 36 0d  |.;.. di%=mb%!16.|
000086f0  3b a6 13 20 c8 8e 20 64  72 61 67 74 79 70 65 25  |;.. .. dragtype%|
00008700  20 ca 0d 3b b0 08 20 c9  20 30 0d 3b ba 1d 20 20  | ..;.. . 0.;..  |
00008710  66 6e 61 6d 65 6c 65 6e  25 3d a9 28 24 6f 75 74  |fnamelen%=.($out|
00008720  73 70 72 61 64 25 29 0d  3b c4 1d 20 20 66 69 6c  |sprad%).;..  fil|
00008730  65 73 69 7a 65 25 3d 73  70 72 69 74 65 73 69 7a  |esize%=spritesiz|
00008740  65 25 2d 34 0d 3b ce 14  20 20 66 69 6c 65 74 79  |e%-4.;..  filety|
00008750  70 65 25 3d 26 46 46 39  0d 3b d8 2a 20 20 24 28  |pe%=&FF9.;.*  $(|
00008760  6d 62 25 2b 34 34 29 3d  a4 7a 74 28 6f 75 74 73  |mb%+44)=.zt(outs|
00008770  70 72 61 64 25 29 2b bd  30 2b bd 30 2b bd 30 2b  |prad%)+.0+.0+.0+|
00008780  bd 30 0d 3b e2 08 20 c9  20 31 0d 3b ec 1d 20 20  |.0.;.. . 1.;..  |
00008790  66 6e 61 6d 65 6c 65 6e  25 3d a9 28 24 6f 75 74  |fnamelen%=.($out|
000087a0  72 61 77 61 64 25 29 0d  3b f6 18 20 20 66 69 6c  |rawad%).;..  fil|
000087b0  65 73 69 7a 65 25 3d 72  61 77 73 69 7a 65 25 0d  |esize%=rawsize%.|
000087c0  3c 00 14 20 20 66 69 6c  65 74 79 70 65 25 3d 26  |<..  filetype%=&|
000087d0  46 46 44 0d 3c 0a 2a 20  20 24 28 6d 62 25 2b 34  |FFD.<.*  $(mb%+4|
000087e0  34 29 3d a4 7a 74 28 6f  75 74 72 61 77 61 64 25  |4)=.zt(outrawad%|
000087f0  29 2b bd 30 2b bd 30 2b  bd 30 2b bd 30 0d 3c 14  |)+.0+.0+.0+.0.<.|
00008800  06 20 cb 0d 3c 1e 18 20  f2 72 6f 75 6e 64 28 66  |. ..<.. .round(f|
00008810  6e 61 6d 65 6c 65 6e 25  2c 34 29 0d 3c 28 11 20  |namelen%,4).<(. |
00008820  66 6e 61 6d 65 6c 65 6e  25 2b 3d 34 0d 3c 32 15  |fnamelen%+=4.<2.|
00008830  20 64 75 6d 6d 79 25 3d  66 69 6c 65 73 69 7a 65  | dummy%=filesize|
00008840  25 0d 3c 3c 15 20 f2 72  6f 75 6e 64 28 64 75 6d  |%.<<. .round(dum|
00008850  6d 79 25 2c 34 29 0d 3c  46 16 20 21 6d 62 25 3d  |my%,4).<F. !mb%=|
00008860  34 34 2b 66 6e 61 6d 65  6c 65 6e 25 0d 3c 50 0d  |44+fnamelen%.<P.|
00008870  20 6d 62 25 21 31 32 3d  30 0d 3c 5a 0d 20 6d 62  | mb%!12=0.<Z. mb|
00008880  25 21 31 36 3d 31 0d 3c  64 0f 20 6d 62 25 21 32  |%!16=1.<d. mb%!2|
00008890  30 3d 64 77 25 0d 3c 6e  0f 20 6d 62 25 21 32 34  |0=dw%.<n. mb%!24|
000088a0  3d 64 69 25 0d 3c 78 0f  20 6d 62 25 21 32 38 3d  |=di%.<x. mb%!28=|
000088b0  64 78 25 0d 3c 82 0f 20  6d 62 25 21 33 32 3d 64  |dx%.<.. mb%!32=d|
000088c0  79 25 0d 3c 8c 17 20 6d  62 25 21 33 36 3d 64 75  |y%.<.. mb%!36=du|
000088d0  6d 6d 79 25 2b 31 30 32  34 0d 3c 96 15 20 6d 62  |mmy%+1024.<.. mb|
000088e0  25 21 34 30 3d 66 69 6c  65 74 79 70 65 25 0d 3c  |%!40=filetype%.<|
000088f0  a0 29 20 c8 99 20 22 57  69 6d 70 5f 53 65 6e 64  |.) .. "Wimp_Send|
00008900  4d 65 73 73 61 67 65 22  2c 31 37 2c 6d 62 25 2c  |Message",17,mb%,|
00008910  64 77 25 2c 64 69 25 0d  3c aa 11 20 6d 79 72 65  |dw%,di%.<.. myre|
00008920  66 25 3d 6d 62 25 21 38  0d 3c b4 11 20 64 72 61  |f%=mb%!8.<.. dra|
00008930  67 74 79 70 65 25 3d 2d  31 0d 3c be 05 cb 0d 3c  |gtype%=-1.<....<|
00008940  c8 05 e1 0d 3c d2 04 0d  3c dc 12 dd 20 f2 64 61  |....<...<... .da|
00008950  74 61 73 61 76 65 61 63  6b 0d 3c e6 15 e7 20 70  |tasaveack.<... p|
00008960  62 25 21 31 32 3d 6d 79  72 65 66 25 20 8c 0d 3c  |b%!12=myref% ..<|
00008970  f0 16 20 73 61 76 65 24  3d a4 7a 74 28 70 62 25  |.. save$=.zt(pb%|
00008980  2b 34 34 29 0d 3c fa 13  20 c8 8e 20 66 69 6c 65  |+44).<.. .. file|
00008990  74 79 70 65 25 20 ca 0d  3d 04 0b 20 c9 20 26 46  |type% ..=.. . &F|
000089a0  46 39 0d 3d 0e 2b 20 20  c8 99 20 22 4f 53 5f 53  |F9.=.+  .. "OS_S|
000089b0  70 72 69 74 65 4f 70 22  2c 26 31 30 43 2c 67 72  |priteOp",&10C,gr|
000089c0  61 62 61 72 65 61 25 2c  73 61 76 65 24 0d 3d 18  |abarea%,save$.=.|
000089d0  14 20 20 e7 20 70 62 25  21 33 36 3c 3e 2d 31 20  |.  . pb%!36<>-1 |
000089e0  8c 0d 3d 22 32 20 20 20  e7 20 63 66 73 69 64 25  |..="2   . cfsid%|
000089f0  20 73 75 66 66 69 78 24  3d 22 20 43 46 53 49 22  | suffix$=" CFSI"|
00008a00  20 8b 20 73 75 66 66 69  78 24 3d 22 20 38 20 62  | . suffix$=" 8 b|
00008a10  69 74 22 0d 3d 2c 10 20  20 20 73 61 76 65 64 38  |it".=,.   saved8|
00008a20  25 3d b9 0d 3d 36 23 20  20 20 24 67 72 61 62 77  |%=..=6#   $grabw|
00008a30  74 69 74 6c 65 61 64 25  3d 73 61 76 65 24 2b 73  |titlead%=save$+s|
00008a40  75 66 66 69 78 24 0d 3d  40 13 20 20 20 f2 75 70  |uffix$.=@.   .up|
00008a50  64 61 74 65 74 69 74 6c  65 0d 3d 4a 07 20 20 cd  |datetitle.=J.  .|
00008a60  0d 3d 54 0b 20 c9 20 26  46 46 44 0d 3d 5e 16 20  |.=T. . &FFD.=^. |
00008a70  20 72 61 77 6f 75 74 25  3d ae 28 73 61 76 65 24  | rawout%=.(save$|
00008a80  29 0d 3d 68 10 20 20 e7  20 73 6c 61 76 65 25 20  |).=h.  . slave% |
00008a90  8c 0d 3d 72 35 20 20 20  72 61 77 69 6e 25 3d 8e  |..=r5   rawin%=.|
00008aa0  28 22 3c 46 61 73 74 47  72 61 62 24 44 69 72 3e  |("<FastGrab$Dir>|
00008ab0  2e 52 65 73 6f 75 72 63  65 73 2e 54 77 65 6c 76  |.Resources.Twelv|
00008ac0  65 42 69 74 22 29 0d 3d  7c 34 20 20 20 e7 20 72  |eBit").=|4   . r|
00008ad0  61 77 69 6e 25 3d 30 20  85 20 32 31 34 2c 22 43  |awin%=0 . 214,"C|
00008ae0  61 63 68 65 20 66 69 6c  65 20 63 61 6e 6e 6f 74  |ache file cannot|
00008af0  20 62 65 20 66 6f 75 6e  64 22 0d 3d 86 31 20 20  | be found".=.1  |
00008b00  20 c8 99 20 22 4f 53 5f  47 42 50 42 22 2c 34 2c  | .. "OS_GBPB",4,|
00008b10  72 61 77 69 6e 25 2c 6c  69 76 65 61 72 65 61 25  |rawin%,livearea%|
00008b20  2b 31 30 30 2c 31 30 30  30 30 30 0d 3d 90 32 20  |+100,100000.=.2 |
00008b30  20 20 c8 99 20 22 4f 53  5f 47 42 50 42 22 2c 32  |  .. "OS_GBPB",2|
00008b40  2c 72 61 77 6f 75 74 25  2c 6c 69 76 65 61 72 65  |,rawout%,liveare|
00008b50  61 25 2b 31 30 30 2c 31  30 30 30 30 30 0d 3d 9a  |a%+100,100000.=.|
00008b60  30 20 20 20 c8 99 20 22  4f 53 5f 47 42 50 42 22  |0   .. "OS_GBPB"|
00008b70  2c 34 2c 72 61 77 69 6e  25 2c 6c 69 76 65 61 72  |,4,rawin%,livear|
00008b80  65 61 25 2b 31 30 30 2c  39 36 36 32 38 0d 3d a4  |ea%+100,96628.=.|
00008b90  31 20 20 20 c8 99 20 22  4f 53 5f 47 42 50 42 22  |1   .. "OS_GBPB"|
00008ba0  2c 32 2c 72 61 77 6f 75  74 25 2c 6c 69 76 65 61  |,2,rawout%,livea|
00008bb0  72 65 61 25 2b 31 30 30  2c 39 36 36 32 38 0d 3d  |rea%+100,96628.=|
00008bc0  ae 0f 20 20 20 d9 23 72  61 77 69 6e 25 0d 3d b8  |..   .#rawin%.=.|
00008bd0  07 20 20 cc 0d 3d c2 2f  20 20 20 c8 99 20 22 4f  |.  ..=./   .. "O|
00008be0  53 5f 47 42 50 42 22 2c  32 2c 72 61 77 6f 75 74  |S_GBPB",2,rawout|
00008bf0  25 2c 72 61 77 61 72 65  61 25 2c 72 61 77 73 69  |%,rawarea%,rawsi|
00008c00  7a 65 25 0d 3d cc 07 20  20 cd 0d 3d d6 0f 20 20  |ze%.=..  ..=..  |
00008c10  d9 23 72 61 77 6f 75 74  25 0d 3d e0 14 20 20 e7  |.#rawout%.=..  .|
00008c20  20 70 62 25 21 33 36 3c  3e 2d 31 20 8c 0d 3d ea  | pb%!36<>-1 ..=.|
00008c30  11 20 20 20 73 61 76 65  64 31 32 25 3d b9 0d 3d  |.   saved12%=..=|
00008c40  f4 59 20 20 20 e7 20 62  6f 61 72 64 5f 69 73 5f  |.Y   . board_is_|
00008c50  31 36 5f 62 69 74 25 20  24 67 72 61 62 77 74 69  |16_bit% $grabwti|
00008c60  74 6c 65 61 64 25 3d 73  61 76 65 24 2b 22 20 31  |tlead%=save$+" 1|
00008c70  36 20 62 69 74 22 20 8b  20 24 67 72 61 62 77 74  |6 bit" . $grabwt|
00008c80  69 74 6c 65 61 64 25 3d  73 61 76 65 24 2b 22 20  |itlead%=save$+" |
00008c90  31 32 20 62 69 74 22 0d  3d fe 13 20 20 20 f2 75  |12 bit".=..   .u|
00008ca0  70 64 61 74 65 74 69 74  6c 65 0d 3e 08 07 20 20  |pdatetitle.>..  |
00008cb0  cd 0d 3e 12 06 20 cb 0d  3e 1c 11 20 70 62 25 21  |..>.. ..>.. pb%!|
00008cc0  31 32 3d 70 62 25 21 38  0d 3e 26 0d 20 70 62 25  |12=pb%!8.>&. pb%|
00008cd0  21 31 36 3d 33 0d 3e 30  27 20 c8 99 20 22 57 69  |!16=3.>0' .. "Wi|
00008ce0  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
00008cf0  31 38 2c 70 62 25 2c 70  62 25 21 34 0d 3e 3a 1d  |18,pb%,pb%!4.>:.|
00008d00  20 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  | .. "Wimp_Create|
00008d10  4d 65 6e 75 22 2c 2c 2d  31 0d 3e 44 05 cd 0d 3e  |Menu",,-1.>D...>|
00008d20  4e 05 e1 0d 3e 58 04 0d  3e 62 13 dd 20 a4 7a 74  |N...>X..>b.. .zt|
00008d30  28 61 64 64 72 65 73 73  25 29 0d 3e 6c 0a ea 20  |(address%).>l.. |
00008d40  70 6f 73 25 0d 3e 76 0a  70 6f 73 25 3d 30 0d 3e  |pos%.>v.pos%=0.>|
00008d50  80 0e 73 74 72 69 6e 67  24 3d 22 22 0d 3e 8a 05  |..string$="".>..|
00008d60  f5 0d 3e 94 1c 20 73 74  72 69 6e 67 24 2b 3d bd  |..>.. string$+=.|
00008d70  61 64 64 72 65 73 73 25  3f 70 6f 73 25 0d 3e 9e  |address%?pos%.>.|
00008d80  0c 20 70 6f 73 25 2b 3d  31 0d 3e a8 16 fd 20 61  |. pos%+=1.>... a|
00008d90  64 64 72 65 73 73 25 3f  70 6f 73 25 3c 33 32 0d  |ddress%?pos%<32.|
00008da0  3e b2 0c 3d 73 74 72 69  6e 67 24 0d 3e bc 04 0d  |>..=string$.>...|
00008db0  3e c6 1d dd 20 f2 70 75  74 77 6f 72 64 28 68 61  |>... .putword(ha|
00008dc0  6e 64 6c 65 25 2c 77 6f  72 64 25 29 0d 3e d0 19  |ndle%,word%).>..|
00008dd0  d5 23 68 61 6e 64 6c 65  25 2c 77 6f 72 64 25 20  |.#handle%,word% |
00008de0  80 20 26 46 46 0d 3e da  20 d5 23 68 61 6e 64 6c  |. &FF.>. .#handl|
00008df0  65 25 2c 28 77 6f 72 64  25 20 80 20 26 46 46 30  |e%,(word% . &FF0|
00008e00  30 29 3e 3e 38 0d 3e e4  23 d5 23 68 61 6e 64 6c  |0)>>8.>.#.#handl|
00008e10  65 25 2c 28 77 6f 72 64  25 20 80 20 26 46 46 30  |e%,(word% . &FF0|
00008e20  30 30 30 29 3e 3e 31 36  0d 3e ee 25 d5 23 68 61  |000)>>16.>.%.#ha|
00008e30  6e 64 6c 65 25 2c 28 77  6f 72 64 25 20 80 20 26  |ndle%,(word% . &|
00008e40  46 46 30 30 30 30 30 30  29 3e 3e 32 34 0d 3e f8  |FF000000)>>24.>.|
00008e50  05 e1 0d 3f 02 04 0d 3f  0c 17 dd 20 a4 67 65 74  |...?...?... .get|
00008e60  77 6f 72 64 28 68 61 6e  64 6c 65 25 29 0d 3f 16  |word(handle%).?.|
00008e70  14 62 79 74 65 30 25 3d  9a 23 68 61 6e 64 6c 65  |.byte0%=.#handle|
00008e80  25 0d 3f 20 14 62 79 74  65 31 25 3d 9a 23 68 61  |%.? .byte1%=.#ha|
00008e90  6e 64 6c 65 25 0d 3f 2a  14 62 79 74 65 32 25 3d  |ndle%.?*.byte2%=|
00008ea0  9a 23 68 61 6e 64 6c 65  25 0d 3f 34 14 62 79 74  |.#handle%.?4.byt|
00008eb0  65 33 25 3d 9a 23 68 61  6e 64 6c 65 25 0d 3f 3e  |e3%=.#handle%.?>|
00008ec0  37 3d 28 62 79 74 65 33  25 3c 3c 32 34 29 20 84  |7=(byte3%<<24) .|
00008ed0  20 28 62 79 74 65 32 25  3c 3c 31 36 29 20 84 20  | (byte2%<<16) . |
00008ee0  28 62 79 74 65 31 25 3c  3c 38 29 20 84 20 62 79  |(byte1%<<8) . by|
00008ef0  74 65 30 25 0d 3f 48 04  0d 3f 52 10 dd 20 f2 68  |te0%.?H..?R.. .h|
00008f00  61 6e 64 6c 65 6b 65 79  0d 3f 5c 0b 6d 69 6e 65  |andlekey.?\.mine|
00008f10  25 3d a3 0d 3f 66 0d c8  8e 20 21 70 62 25 20 ca  |%=..?f... !pb% .|
00008f20  0d 3f 70 04 0d 3f 7a 0d  c9 20 77 25 28 31 2c 30  |.?p..?z.. w%(1,0|
00008f30  29 0d 3f 84 10 20 c8 8e  20 70 62 25 21 32 34 20  |).?.. .. pb%!24 |
00008f40  ca 0d 3f 8e 09 20 c9 20  31 33 0d 3f 98 0d 20 20  |..?.. . 13.?..  |
00008f50  6d 69 6e 65 25 3d b9 0d  3f a2 10 20 20 c8 8e 20  |mine%=..?..  .. |
00008f60  70 62 25 21 34 20 ca 0d  3f ac 0f 20 20 c9 20 30  |pb%!4 ..?..  . 0|
00008f70  2c 31 2c 32 2c 33 0d 3f  b6 4d 20 20 20 c8 99 20  |,1,2,3.?.M   .. |
00008f80  22 57 69 6d 70 5f 53 65  74 43 61 72 65 74 50 6f  |"Wimp_SetCaretPo|
00008f90  73 69 74 69 6f 6e 22 2c  77 25 28 31 2c 30 29 2c  |sition",w%(1,0),|
00008fa0  70 62 25 21 34 2b 31 2c  2c 2c 2d 31 2c a9 28 24  |pb%!4+1,,,-1,.($|
00008fb0  a4 69 63 6f 6e 61 64 28  31 2c 70 62 25 21 34 2b  |.iconad(1,pb%!4+|
00008fc0  31 29 29 0d 3f c0 09 20  20 c9 20 34 0d 3f ca 40  |1)).?..  . 4.?.@|
00008fd0  20 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 43  |   .. "Wimp_SetC|
00008fe0  61 72 65 74 50 6f 73 69  74 69 6f 6e 22 2c 77 25  |aretPosition",w%|
00008ff0  28 31 2c 30 29 2c 32 32  2c 2c 2c 2d 31 2c a9 28  |(1,0),22,,,-1,.(|
00009000  24 73 68 61 72 70 65 6e  61 64 25 29 0d 3f d4 0a  |$sharpenad%).?..|
00009010  20 20 c9 20 32 32 0d 3f  de 3e 20 20 20 c8 99 20  |  . 22.?.>   .. |
00009020  22 57 69 6d 70 5f 53 65  74 43 61 72 65 74 50 6f  |"Wimp_SetCaretPo|
00009030  73 69 74 69 6f 6e 22 2c  77 25 28 31 2c 30 29 2c  |sition",w%(1,0),|
00009040  33 30 2c 2c 2c 2d 31 2c  a9 28 24 62 6c 61 63 6b  |30,,,-1,.($black|
00009050  61 64 25 29 0d 3f e8 0a  20 20 c9 20 33 30 0d 3f  |ad%).?..  . 30.?|
00009060  f2 3e 20 20 20 c8 99 20  22 57 69 6d 70 5f 53 65  |.>   .. "Wimp_Se|
00009070  74 43 61 72 65 74 50 6f  73 69 74 69 6f 6e 22 2c  |tCaretPosition",|
00009080  77 25 28 31 2c 30 29 2c  33 31 2c 2c 2c 2d 31 2c  |w%(1,0),31,,,-1,|
00009090  a9 28 24 67 61 6d 6d 61  61 64 25 29 0d 3f fc 0a  |.($gammaad%).?..|
000090a0  20 20 c9 20 33 31 0d 40  06 1f 20 20 20 c8 99 20  |  . 31.@..   .. |
000090b0  22 57 69 6d 70 5f 43 72  65 61 74 65 4d 65 6e 75  |"Wimp_CreateMenu|
000090c0  22 2c 2c 2d 31 0d 40 10  0e 20 20 20 f2 67 6f 63  |",,-1.@..   .goc|
000090d0  66 73 69 0d 40 1a 08 20  20 20 e1 0d 40 24 07 20  |fsi.@..   ..@$. |
000090e0  20 cb 0d 40 2e 0b 20 c9  20 26 31 38 45 0d 40 38  | ..@.. . &18E.@8|
000090f0  0d 20 20 6d 69 6e 65 25  3d b9 0d 40 42 10 20 20  |.  mine%=..@B.  |
00009100  c8 8e 20 70 62 25 21 34  20 ca 0d 40 4c 0f 20 20  |.. pb%!4 ..@L.  |
00009110  c9 20 30 2c 31 2c 32 2c  33 0d 40 56 4d 20 20 20  |. 0,1,2,3.@VM   |
00009120  c8 99 20 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |.. "Wimp_SetCare|
00009130  74 50 6f 73 69 74 69 6f  6e 22 2c 77 25 28 31 2c  |tPosition",w%(1,|
00009140  30 29 2c 70 62 25 21 34  2b 31 2c 2c 2c 2d 31 2c  |0),pb%!4+1,,,-1,|
00009150  a9 28 24 a4 69 63 6f 6e  61 64 28 31 2c 70 62 25  |.($.iconad(1,pb%|
00009160  21 34 2b 31 29 29 0d 40  60 09 20 20 c9 20 34 0d  |!4+1)).@`.  . 4.|
00009170  40 6a 40 20 20 20 c8 99  20 22 57 69 6d 70 5f 53  |@j@   .. "Wimp_S|
00009180  65 74 43 61 72 65 74 50  6f 73 69 74 69 6f 6e 22  |etCaretPosition"|
00009190  2c 77 25 28 31 2c 30 29  2c 32 32 2c 2c 2c 2d 31  |,w%(1,0),22,,,-1|
000091a0  2c a9 28 24 73 68 61 72  70 65 6e 61 64 25 29 0d  |,.($sharpenad%).|
000091b0  40 74 0a 20 20 c9 20 32  32 0d 40 7e 3e 20 20 20  |@t.  . 22.@~>   |
000091c0  c8 99 20 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |.. "Wimp_SetCare|
000091d0  74 50 6f 73 69 74 69 6f  6e 22 2c 77 25 28 31 2c  |tPosition",w%(1,|
000091e0  30 29 2c 33 30 2c 2c 2c  2d 31 2c a9 24 28 62 6c  |0),30,,,-1,.$(bl|
000091f0  61 63 6b 61 64 25 29 0d  40 88 0a 20 20 c9 20 33  |ackad%).@..  . 3|
00009200  30 0d 40 92 3e 20 20 20  c8 99 20 22 57 69 6d 70  |0.@.>   .. "Wimp|
00009210  5f 53 65 74 43 61 72 65  74 50 6f 73 69 74 69 6f  |_SetCaretPositio|
00009220  6e 22 2c 77 25 28 31 2c  30 29 2c 33 31 2c 2c 2c  |n",w%(1,0),31,,,|
00009230  2d 31 2c a9 24 28 67 61  6d 6d 61 61 64 25 29 0d  |-1,.$(gammaad%).|
00009240  40 9c 0a 20 20 c9 20 33  31 0d 40 a6 3c 20 20 20  |@..  . 31.@.<   |
00009250  c8 99 20 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |.. "Wimp_SetCare|
00009260  74 50 6f 73 69 74 69 6f  6e 22 2c 77 25 28 31 2c  |tPosition",w%(1,|
00009270  30 29 2c 30 2c 2c 2c 2d  31 2c a9 24 28 6d 6f 64  |0),0,,,-1,.$(mod|
00009280  65 61 64 25 29 0d 40 b0  07 20 20 cb 0d 40 ba 0b  |ead%).@..  ..@..|
00009290  20 c9 20 26 31 38 46 0d  40 c4 0d 20 20 6d 69 6e  | . &18F.@..  min|
000092a0  65 25 3d b9 0d 40 ce 10  20 20 c8 8e 20 70 62 25  |e%=..@..  .. pb%|
000092b0  21 34 20 ca 0d 40 d8 09  20 20 c9 20 30 0d 40 e2  |!4 ..@..  . 0.@.|
000092c0  3e 20 20 20 c8 99 20 22  57 69 6d 70 5f 53 65 74  |>   .. "Wimp_Set|
000092d0  43 61 72 65 74 50 6f 73  69 74 69 6f 6e 22 2c 77  |CaretPosition",w|
000092e0  25 28 31 2c 30 29 2c 33  31 2c 2c 2c 2d 31 2c a9  |%(1,0),31,,,-1,.|
000092f0  28 24 67 61 6d 6d 61 61  64 25 29 0d 40 ec 09 20  |($gammaad%).@.. |
00009300  20 c9 20 31 0d 40 f6 3c  20 20 20 c8 99 20 22 57  | . 1.@.<   .. "W|
00009310  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
00009320  74 69 6f 6e 22 2c 77 25  28 31 2c 30 29 2c 30 2c  |tion",w%(1,0),0,|
00009330  2c 2c 2d 31 2c a9 24 28  6d 6f 64 65 61 64 25 29  |,,-1,.$(modead%)|
00009340  0d 41 00 0d 20 20 c9 20  32 2c 33 2c 34 0d 41 0a  |.A..  . 2,3,4.A.|
00009350  4d 20 20 20 c8 99 20 22  57 69 6d 70 5f 53 65 74  |M   .. "Wimp_Set|
00009360  43 61 72 65 74 50 6f 73  69 74 69 6f 6e 22 2c 77  |CaretPosition",w|
00009370  25 28 31 2c 30 29 2c 70  62 25 21 34 2d 31 2c 2c  |%(1,0),pb%!4-1,,|
00009380  2c 2d 31 2c a9 28 24 a4  69 63 6f 6e 61 64 28 31  |,-1,.($.iconad(1|
00009390  2c 70 62 25 21 34 2d 31  29 29 0d 41 14 0a 20 20  |,pb%!4-1)).A..  |
000093a0  c9 20 32 32 0d 41 1e 41  20 20 20 c8 99 20 22 57  |. 22.A.A   .. "W|
000093b0  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
000093c0  74 69 6f 6e 22 2c 77 25  28 31 2c 30 29 2c 34 2c  |tion",w%(1,0),4,|
000093d0  2c 2c 2d 31 2c a9 28 24  a4 69 63 6f 6e 61 64 28  |,,-1,.($.iconad(|
000093e0  31 2c 34 29 29 0d 41 28  0a 20 20 c9 20 33 30 0d  |1,4)).A(.  . 30.|
000093f0  41 32 40 20 20 20 c8 99  20 22 57 69 6d 70 5f 53  |A2@   .. "Wimp_S|
00009400  65 74 43 61 72 65 74 50  6f 73 69 74 69 6f 6e 22  |etCaretPosition"|
00009410  2c 77 25 28 31 2c 30 29  2c 32 32 2c 2c 2c 2d 31  |,w%(1,0),22,,,-1|
00009420  2c a9 28 24 73 68 61 72  70 65 6e 61 64 25 29 0d  |,.($sharpenad%).|
00009430  41 3c 0a 20 20 c9 20 33  31 0d 41 46 3e 20 20 20  |A<.  . 31.AF>   |
00009440  c8 99 20 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |.. "Wimp_SetCare|
00009450  74 50 6f 73 69 74 69 6f  6e 22 2c 77 25 28 31 2c  |tPosition",w%(1,|
00009460  30 29 2c 33 30 2c 2c 2c  2d 31 2c a9 28 24 62 6c  |0),30,,,-1,.($bl|
00009470  61 63 6b 61 64 25 29 0d  41 50 07 20 20 cb 0d 41  |ackad%).AP.  ..A|
00009480  5a 06 20 cb 0d 41 64 04  0d 41 6e 0d c9 20 77 25  |Z. ..Ad..An.. w%|
00009490  28 39 2c 30 29 0d 41 78  10 20 c8 8e 20 70 62 25  |(9,0).Ax. .. pb%|
000094a0  21 32 34 20 ca 0d 41 82  10 20 c9 20 26 31 38 45  |!24 ..A.. . &18E|
000094b0  2c 26 31 38 46 0d 41 8c  0d 20 20 6d 69 6e 65 25  |,&18F.A..  mine%|
000094c0  3d b9 0d 41 96 10 20 20  c8 8e 20 70 62 25 21 34  |=..A..  .. pb%!4|
000094d0  20 ca 0d 41 a0 09 20 20  c9 20 30 0d 41 aa 3c 20  | ..A..  . 0.A.< |
000094e0  20 20 c8 99 20 22 57 69  6d 70 5f 53 65 74 43 61  |  .. "Wimp_SetCa|
000094f0  72 65 74 50 6f 73 69 74  69 6f 6e 22 2c 77 25 28  |retPosition",w%(|
00009500  39 2c 30 29 2c 31 2c 2c  2c 2d 31 2c a9 28 24 6d  |9,0),1,,,-1,.($m|
00009510  61 67 32 61 64 25 29 0d  41 b4 09 20 20 c9 20 31  |ag2ad%).A..  . 1|
00009520  0d 41 be 3c 20 20 20 c8  99 20 22 57 69 6d 70 5f  |.A.<   .. "Wimp_|
00009530  53 65 74 43 61 72 65 74  50 6f 73 69 74 69 6f 6e  |SetCaretPosition|
00009540  22 2c 77 25 28 39 2c 30  29 2c 30 2c 2c 2c 2d 31  |",w%(9,0),0,,,-1|
00009550  2c a9 28 24 6d 61 67 31  61 64 25 29 0d 41 c8 07  |,.($mag1ad%).A..|
00009560  20 20 cb 0d 41 d2 09 20  c9 20 31 33 0d 41 dc 0d  |  ..A.. . 13.A..|
00009570  20 20 6d 69 6e 65 25 3d  b9 0d 41 e6 10 20 20 c8  |  mine%=..A..  .|
00009580  8e 20 70 62 25 21 34 20  ca 0d 41 f0 09 20 20 c9  |. pb%!4 ..A..  .|
00009590  20 30 0d 41 fa 3c 20 20  20 c8 99 20 22 57 69 6d  | 0.A.<   .. "Wim|
000095a0  70 5f 53 65 74 43 61 72  65 74 50 6f 73 69 74 69  |p_SetCaretPositi|
000095b0  6f 6e 22 2c 77 25 28 39  2c 30 29 2c 31 2c 2c 2c  |on",w%(9,0),1,,,|
000095c0  2d 31 2c a9 28 24 6d 61  67 32 61 64 25 29 0d 42  |-1,.($mag2ad%).B|
000095d0  04 09 20 20 c9 20 31 0d  42 0e 3c 20 20 20 c8 99  |..  . 1.B.<   ..|
000095e0  20 22 57 69 6d 70 5f 53  65 74 43 61 72 65 74 50  | "Wimp_SetCaretP|
000095f0  6f 73 69 74 69 6f 6e 22  2c 77 25 28 39 2c 30 29  |osition",w%(9,0)|
00009600  2c 30 2c 2c 2c 2d 31 2c  a9 28 24 6d 61 67 31 61  |,0,,,-1,.($mag1a|
00009610  64 25 29 0d 42 18 07 20  20 cb 0d 42 22 06 20 cb  |d%).B..  ..B". .|
00009620  0d 42 2c 1c 20 e7 20 6d  69 6e 65 25 20 f2 6d 61  |.B,. . mine% .ma|
00009630  67 73 74 72 69 6e 67 28  30 2c 30 29 0d 42 36 04  |gstring(0,0).B6.|
00009640  0d 42 40 0d c9 20 77 25  28 37 2c 30 29 0d 42 4a  |.B@.. w%(7,0).BJ|
00009650  10 20 c8 8e 20 70 62 25  21 32 34 20 ca 0d 42 54  |. .. pb%!24 ..BT|
00009660  09 20 c9 20 31 33 0d 42  5e 0d 20 20 6d 69 6e 65  |. . 13.B^.  mine|
00009670  25 3d b9 0d 42 68 11 20  20 f2 73 61 76 65 73 70  |%=..Bh.  .savesp|
00009680  72 69 74 65 0d 42 72 1e  20 20 c8 99 20 22 57 69  |rite.Br.  .. "Wi|
00009690  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
000096a0  2d 31 0d 42 7c 06 20 cb  0d 42 86 04 0d 42 90 0d  |-1.B|. ..B...B..|
000096b0  c9 20 77 25 28 38 2c 30  29 0d 42 9a 10 20 c8 8e  |. w%(8,0).B.. ..|
000096c0  20 70 62 25 21 32 34 20  ca 0d 42 a4 09 20 c9 20  | pb%!24 ..B.. . |
000096d0  31 33 0d 42 ae 0d 20 20  6d 69 6e 65 25 3d b9 0d  |13.B..  mine%=..|
000096e0  42 b8 0e 20 20 f2 73 61  76 65 72 61 77 0d 42 c2  |B..  .saveraw.B.|
000096f0  1e 20 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |.  .. "Wimp_Crea|
00009700  74 65 4d 65 6e 75 22 2c  2c 2d 31 0d 42 cc 06 20  |teMenu",,-1.B.. |
00009710  cb 0d 42 d6 04 0d 42 e0  0d c9 20 77 25 28 32 2c  |..B...B... w%(2,|
00009720  30 29 0d 42 ea 10 20 c8  8e 20 70 62 25 21 32 34  |0).B.. .. pb%!24|
00009730  20 ca 0d 42 f4 09 20 c9  20 31 33 0d 42 fe 0d 20  | ..B.. . 13.B.. |
00009740  20 6d 69 6e 65 25 3d b9  0d 43 08 10 20 20 c8 8e  | mine%=..C..  ..|
00009750  20 70 62 25 21 34 20 ca  0d 43 12 09 20 20 c9 20  | pb%!4 ..C..  . |
00009760  33 0d 43 1c 3c 20 20 20  c8 99 20 22 57 69 6d 70  |3.C.<   .. "Wimp|
00009770  5f 53 65 74 43 61 72 65  74 50 6f 73 69 74 69 6f  |_SetCaretPositio|
00009780  6e 22 2c 77 25 28 32 2c  30 29 2c 38 2c 2c 2c 2d  |n",w%(2,0),8,,,-|
00009790  31 2c a9 28 24 63 6f 6e  74 61 64 25 29 0d 43 26  |1,.($contad%).C&|
000097a0  1a 20 20 20 f2 63 68 6b  62 6e 64 73 28 62 72 69  |.   .chkbnds(bri|
000097b0  67 68 74 61 64 25 29 0d  43 30 1e 20 20 20 62 72  |ghtad%).C0.   br|
000097c0  69 67 68 74 6e 65 73 73  25 3d bb 24 62 72 69 67  |ightness%=.$brig|
000097d0  68 74 61 64 25 0d 43 3a  1f 20 20 20 f2 75 64 70  |htad%.C:.   .udp|
000097e0  62 61 72 28 2d 33 36 2c  62 72 69 67 68 74 6e 65  |bar(-36,brightne|
000097f0  73 73 25 29 0d 43 44 09  20 20 c9 20 38 0d 43 4e  |ss%).CD.  . 8.CN|
00009800  3c 20 20 20 c8 99 20 22  57 69 6d 70 5f 53 65 74  |<   .. "Wimp_Set|
00009810  43 61 72 65 74 50 6f 73  69 74 69 6f 6e 22 2c 77  |CaretPosition",w|
00009820  25 28 32 2c 30 29 2c 31  33 2c 2c 2c 2d 31 2c a9  |%(2,0),13,,,-1,.|
00009830  28 24 73 61 74 61 64 25  29 0d 43 58 18 20 20 20  |($satad%).CX.   |
00009840  f2 63 68 6b 62 6e 64 73  28 63 6f 6e 74 61 64 25  |.chkbnds(contad%|
00009850  29 0d 43 62 1a 20 20 20  63 6f 6e 74 72 61 73 74  |).Cb.   contrast|
00009860  25 3d bb 24 63 6f 6e 74  61 64 25 0d 43 6c 1d 20  |%=.$contad%.Cl. |
00009870  20 20 f2 75 64 70 62 61  72 28 2d 38 30 2c 63 6f  |  .udpbar(-80,co|
00009880  6e 74 72 61 73 74 25 29  0d 43 76 0a 20 20 c9 20  |ntrast%).Cv.  . |
00009890  31 33 0d 43 80 1f 20 20  20 c8 99 20 22 57 69 6d  |13.C..   .. "Wim|
000098a0  70 5f 43 72 65 61 74 65  4d 65 6e 75 22 2c 2c 2d  |p_CreateMenu",,-|
000098b0  31 0d 43 8a 17 20 20 20  f2 63 68 6b 62 6e 64 73  |1.C..   .chkbnds|
000098c0  28 73 61 74 61 64 25 29  0d 43 94 1b 20 20 20 73  |(satad%).C..   s|
000098d0  61 74 75 72 61 74 69 6f  6e 25 3d bb 24 73 61 74  |aturation%=.$sat|
000098e0  61 64 25 0d 43 9e 07 20  20 cb 0d 43 a8 0b 20 c9  |ad%.C..  ..C.. .|
000098f0  20 26 31 38 45 0d 43 b2  0d 20 20 6d 69 6e 65 25  | &18E.C..  mine%|
00009900  3d b9 0d 43 bc 10 20 20  c8 8e 20 70 62 25 21 34  |=..C..  .. pb%!4|
00009910  20 ca 0d 43 c6 09 20 20  c9 20 33 0d 43 d0 3c 20  | ..C..  . 3.C.< |
00009920  20 20 c8 99 20 22 57 69  6d 70 5f 53 65 74 43 61  |  .. "Wimp_SetCa|
00009930  72 65 74 50 6f 73 69 74  69 6f 6e 22 2c 77 25 28  |retPosition",w%(|
00009940  32 2c 30 29 2c 38 2c 2c  2c 2d 31 2c a9 28 24 63  |2,0),8,,,-1,.($c|
00009950  6f 6e 74 61 64 25 29 0d  43 da 1a 20 20 20 f2 63  |ontad%).C..   .c|
00009960  68 6b 62 6e 64 73 28 62  72 69 67 68 74 61 64 25  |hkbnds(brightad%|
00009970  29 0d 43 e4 1e 20 20 20  62 72 69 67 68 74 6e 65  |).C..   brightne|
00009980  73 73 25 3d bb 24 62 72  69 67 68 74 61 64 25 0d  |ss%=.$brightad%.|
00009990  43 ee 1f 20 20 20 f2 75  64 70 62 61 72 28 2d 33  |C..   .udpbar(-3|
000099a0  36 2c 62 72 69 67 68 74  6e 65 73 73 25 29 0d 43  |6,brightness%).C|
000099b0  f8 09 20 20 c9 20 38 0d  44 02 3c 20 20 20 c8 99  |..  . 8.D.<   ..|
000099c0  20 22 57 69 6d 70 5f 53  65 74 43 61 72 65 74 50  | "Wimp_SetCaretP|
000099d0  6f 73 69 74 69 6f 6e 22  2c 77 25 28 32 2c 30 29  |osition",w%(2,0)|
000099e0  2c 31 33 2c 2c 2c 2d 31  2c a9 28 24 73 61 74 61  |,13,,,-1,.($sata|
000099f0  64 25 29 0d 44 0c 18 20  20 20 f2 63 68 6b 62 6e  |d%).D..   .chkbn|
00009a00  64 73 28 63 6f 6e 74 61  64 25 29 0d 44 16 1a 20  |ds(contad%).D.. |
00009a10  20 20 63 6f 6e 74 72 61  73 74 25 3d bb 24 63 6f  |  contrast%=.$co|
00009a20  6e 74 61 64 25 0d 44 20  1d 20 20 20 f2 75 64 70  |ntad%.D .   .udp|
00009a30  62 61 72 28 2d 38 30 2c  63 6f 6e 74 72 61 73 74  |bar(-80,contrast|
00009a40  25 29 0d 44 2a 0a 20 20  c9 20 31 33 0d 44 34 3e  |%).D*.  . 13.D4>|
00009a50  20 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 43  |   .. "Wimp_SetC|
00009a60  61 72 65 74 50 6f 73 69  74 69 6f 6e 22 2c 77 25  |aretPosition",w%|
00009a70  28 32 2c 30 29 2c 33 2c  2c 2c 2d 31 2c a9 28 24  |(2,0),3,,,-1,.($|
00009a80  62 72 69 67 68 74 61 64  25 29 0d 44 3e 17 20 20  |brightad%).D>.  |
00009a90  20 f2 63 68 6b 62 6e 64  73 28 73 61 74 61 64 25  | .chkbnds(satad%|
00009aa0  29 0d 44 48 1b 20 20 20  73 61 74 75 72 61 74 69  |).DH.   saturati|
00009ab0  6f 6e 25 3d bb 24 73 61  74 61 64 25 0d 44 52 20  |on%=.$satad%.DR |
00009ac0  20 20 20 f2 75 64 70 62  61 72 28 2d 31 32 34 2c  |   .udpbar(-124,|
00009ad0  73 61 74 75 72 61 74 69  6f 6e 25 29 0d 44 5c 07  |saturation%).D\.|
00009ae0  20 20 cb 0d 44 66 0b 20  c9 20 26 31 38 46 0d 44  |  ..Df. . &18F.D|
00009af0  70 0d 20 20 6d 69 6e 65  25 3d b9 0d 44 7a 10 20  |p.  mine%=..Dz. |
00009b00  20 c8 8e 20 70 62 25 21  34 20 ca 0d 44 84 09 20  | .. pb%!4 ..D.. |
00009b10  20 c9 20 33 0d 44 8e 3c  20 20 20 c8 99 20 22 57  | . 3.D.<   .. "W|
00009b20  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
00009b30  74 69 6f 6e 22 2c 77 25  28 32 2c 30 29 2c 31 33  |tion",w%(2,0),13|
00009b40  2c 2c 2c 2d 31 2c a9 28  24 73 61 74 61 64 25 29  |,,,-1,.($satad%)|
00009b50  0d 44 98 1a 20 20 20 f2  63 68 6b 62 6e 64 73 28  |.D..   .chkbnds(|
00009b60  62 72 69 67 68 74 61 64  25 29 0d 44 a2 1e 20 20  |brightad%).D..  |
00009b70  20 62 72 69 67 68 74 6e  65 73 73 25 3d bb 24 62  | brightness%=.$b|
00009b80  72 69 67 68 74 61 64 25  0d 44 ac 1f 20 20 20 f2  |rightad%.D..   .|
00009b90  75 64 70 62 61 72 28 2d  33 36 2c 62 72 69 67 68  |udpbar(-36,brigh|
00009ba0  74 6e 65 73 73 25 29 0d  44 b6 09 20 20 c9 20 38  |tness%).D..  . 8|
00009bb0  0d 44 c0 3e 20 20 20 c8  99 20 22 57 69 6d 70 5f  |.D.>   .. "Wimp_|
00009bc0  53 65 74 43 61 72 65 74  50 6f 73 69 74 69 6f 6e  |SetCaretPosition|
00009bd0  22 2c 77 25 28 32 2c 30  29 2c 33 2c 2c 2c 2d 31  |",w%(2,0),3,,,-1|
00009be0  2c a9 28 24 62 72 69 67  68 74 61 64 25 29 0d 44  |,.($brightad%).D|
00009bf0  ca 18 20 20 20 f2 63 68  6b 62 6e 64 73 28 63 6f  |..   .chkbnds(co|
00009c00  6e 74 61 64 25 29 0d 44  d4 1a 20 20 20 63 6f 6e  |ntad%).D..   con|
00009c10  74 72 61 73 74 25 3d bb  24 63 6f 6e 74 61 64 25  |trast%=.$contad%|
00009c20  0d 44 de 1d 20 20 20 f2  75 64 70 62 61 72 28 2d  |.D..   .udpbar(-|
00009c30  38 30 2c 63 6f 6e 74 72  61 73 74 25 29 0d 44 e8  |80,contrast%).D.|
00009c40  0a 20 20 c9 20 31 33 0d  44 f2 3c 20 20 20 c8 99  |.  . 13.D.<   ..|
00009c50  20 22 57 69 6d 70 5f 53  65 74 43 61 72 65 74 50  | "Wimp_SetCaretP|
00009c60  6f 73 69 74 69 6f 6e 22  2c 77 25 28 32 2c 30 29  |osition",w%(2,0)|
00009c70  2c 38 2c 2c 2c 2d 31 2c  a9 28 24 63 6f 6e 74 61  |,8,,,-1,.($conta|
00009c80  64 25 29 0d 44 fc 17 20  20 20 f2 63 68 6b 62 6e  |d%).D..   .chkbn|
00009c90  64 73 28 73 61 74 61 64  25 29 0d 45 06 1b 20 20  |ds(satad%).E..  |
00009ca0  20 73 61 74 75 72 61 74  69 6f 6e 25 3d bb 24 73  | saturation%=.$s|
00009cb0  61 74 61 64 25 0d 45 10  20 20 20 20 f2 75 64 70  |atad%.E.    .udp|
00009cc0  62 61 72 28 2d 31 32 34  2c 73 61 74 75 72 61 74  |bar(-124,saturat|
00009cd0  69 6f 6e 25 29 0d 45 1a  07 20 20 cb 0d 45 24 06  |ion%).E..  ..E$.|
00009ce0  20 cb 0d 45 2e 04 0d 45  38 0e c9 20 77 25 28 31  | ..E...E8.. w%(1|
00009cf0  37 2c 30 29 0d 45 42 10  20 c8 8e 20 70 62 25 21  |7,0).EB. .. pb%!|
00009d00  32 34 20 ca 0d 45 4c 09  20 c9 20 31 33 0d 45 56  |24 ..EL. . 13.EV|
00009d10  0d 20 20 6d 69 6e 65 25  3d b9 0d 45 60 17 20 20  |.  mine%=..E`.  |
00009d20  73 70 65 65 64 25 3d bb  24 73 70 65 65 64 61 64  |speed%=.$speedad|
00009d30  25 0d 45 6a 0c 20 20 f2  73 70 65 65 64 0d 45 74  |%.Ej.  .speed.Et|
00009d40  1e 20 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |.  .. "Wimp_Crea|
00009d50  74 65 4d 65 6e 75 22 2c  2c 2d 31 0d 45 7e 06 20  |teMenu",,-1.E~. |
00009d60  cb 0d 45 88 06 20 7f 0d  45 92 21 20 20 c8 99 20  |..E.. ..E.!  .. |
00009d70  22 57 69 6d 70 5f 50 72  6f 63 65 73 73 4b 65 79  |"Wimp_ProcessKey|
00009d80  22 2c 70 62 25 21 32 34  0d 45 9c 05 cb 0d 45 a6  |",pb%!24.E....E.|
00009d90  04 0d 45 b0 29 e7 20 ac  20 6d 69 6e 65 25 20 c8  |..E.). . mine% .|
00009da0  99 20 22 57 69 6d 70 5f  50 72 6f 63 65 73 73 4b  |. "Wimp_ProcessK|
00009db0  65 79 22 2c 70 62 25 21  32 34 0d 45 ba 04 0d 45  |ey",pb%!24.E...E|
00009dc0  c4 05 e1 0d 45 ce 04 0d  45 d8 0e dd 20 f2 6d 65  |....E...E... .me|
00009dd0  73 73 61 67 65 0d 45 e2  0f c8 8e 20 70 62 25 21  |ssage.E.... pb%!|
00009de0  31 36 20 ca 0d 45 ec 07  c9 20 30 0d 45 f6 11 20  |16 ..E... 0.E.. |
00009df0  f2 73 68 75 74 64 6f 77  6e 28 30 29 0d 46 00 07  |.shutdown(0).F..|
00009e00  c9 20 31 0d 46 0a 0e 20  f2 64 61 74 61 73 61 76  |. 1.F.. .datasav|
00009e10  65 0d 46 14 07 c9 20 32  0d 46 1e 11 20 f2 64 61  |e.F... 2.F.. .da|
00009e20  74 61 73 61 76 65 61 63  6b 0d 46 28 07 c9 20 33  |tasaveack.F(.. 3|
00009e30  0d 46 32 10 20 f2 66 69  6c 65 63 6f 6d 69 6e 67  |.F2. .filecoming|
00009e40  0d 46 3c 07 c9 20 38 0d  46 46 11 20 70 62 25 21  |.F<.. 8.FF. pb%!|
00009e50  31 32 3d 70 62 25 21 38  0d 46 50 21 20 c8 99 20  |12=pb%!8.FP! .. |
00009e60  22 57 69 6d 70 5f 53 65  6e 64 4d 65 73 73 61 67  |"Wimp_SendMessag|
00009e70  65 22 2c 31 39 2c 70 62  25 0d 46 5a 10 20 71 75  |e",19,pb%.FZ. qu|
00009e80  69 74 74 69 6e 67 25 3d  b9 0d 46 64 14 20 71 75  |itting%=..Fd. qu|
00009e90  69 74 68 61 6e 64 25 3d  70 62 25 21 34 0d 46 6e  |ithand%=pb%!4.Fn|
00009ea0  12 20 f2 73 68 75 74 64  6f 77 6e 28 2d 31 29 0d  |. .shutdown(-1).|
00009eb0  46 78 07 c9 20 39 0d 46  82 11 20 f2 6d 6f 64 65  |Fx.. 9.F.. .mode|
00009ec0  63 68 61 6e 67 65 64 0d  46 8c 12 20 f2 75 70 64  |changed.F.. .upd|
00009ed0  61 74 65 73 70 72 69 74  65 0d 46 96 0a c9 20 26  |atesprite.F... &|
00009ee0  35 30 32 0d 46 a0 0e 20  f2 73 65 6e 64 68 65 6c  |502.F.. .sendhel|
00009ef0  70 0d 46 aa 0c c9 20 26  34 30 30 43 30 0d 46 b4  |p.F... &400C0.F.|
00009f00  11 20 f2 6d 65 6e 75 77  61 72 6e 69 6e 67 0d 46  |. .menuwarning.F|
00009f10  be 0c c9 20 26 34 30 30  43 31 0d 46 c8 11 20 f2  |... &400C1.F.. .|
00009f20  6d 6f 64 65 63 68 61 6e  67 65 64 0d 46 d2 05 cb  |modechanged.F...|
00009f30  0d 46 dc 05 e1 0d 46 e6  04 0d 46 f0 11 dd 20 f2  |.F....F...F... .|
00009f40  66 69 6c 65 63 6f 6d 69  6e 67 0d 46 fa 11 e7 20  |filecoming.F... |
00009f50  70 62 25 21 32 30 3d 2d  32 20 8c 0d 47 04 47 20  |pb%!20=-2 ..G.G |
00009f60  e7 20 70 62 25 21 34 30  3c 3e 26 46 46 44 20 85  |. pb%!40<>&FFD .|
00009f70  20 34 32 2c 22 46 61 73  74 47 72 61 62 20 63 61  | 42,"FastGrab ca|
00009f80  6e 20 6f 6e 6c 79 20 70  72 6f 63 65 73 73 20 66  |n only process f|
00009f90  69 6c 65 73 20 6f 66 20  74 79 70 65 20 44 61 74  |iles of type Dat|
00009fa0  61 22 0d 47 0e 1b 20 6c  68 25 3d 8e 28 a4 7a 74  |a".G.. lh%=.(.zt|
00009fb0  28 70 62 25 2b 34 34 29  2b bd 31 33 29 0d 47 18  |(pb%+44)+.13).G.|
00009fc0  23 20 e7 20 6c 68 25 3d  30 20 85 20 32 31 34 2c  |# . lh%=0 . 214,|
00009fd0  22 46 69 6c 65 20 6e 6f  74 20 66 6f 75 6e 64 22  |"File not found"|
00009fe0  0d 47 22 7b 20 e7 20 a4  67 65 74 77 6f 72 64 28  |.G"{ . .getword(|
00009ff0  6c 68 25 29 3c 3e 26 36  33 37 32 36 35 34 44 20  |lh%)<>&6372654D |
0000a000  d9 23 6c 68 25 3a 85 20  34 32 2c 22 46 61 73 74  |.#lh%:. 42,"Fast|
0000a010  67 72 61 62 20 63 61 6e  20 6f 6e 6c 79 20 70 72  |grab can only pr|
0000a020  6f 63 65 73 73 20 76 69  64 65 6f 20 69 6d 61 67  |ocess video imag|
0000a030  65 20 66 69 6c 65 73 20  66 72 6f 6d 20 74 68 65  |e files from the|
0000a040  20 48 61 77 6b 20 56 39  20 61 6e 64 20 48 61 77  | Hawk V9 and Haw|
0000a050  6b 20 56 39 20 4d 6b 20  49 49 22 0d 47 2c 17 20  |k V9 Mk II".G,. |
0000a060  c8 8e 20 a4 67 65 74 77  6f 72 64 28 6c 68 25 29  |.. .getword(lh%)|
0000a070  20 ca 0d 47 36 10 20 c9  20 26 37 34 36 36 36 46  | ..G6. . &74666F|
0000a080  35 33 0d 47 40 16 20 20  69 6e 5f 66 69 6c 65 5f  |53.G@.  in_file_|
0000a090  62 69 74 73 25 3d 31 32  0d 47 4a 10 20 c9 20 26  |bits%=12.GJ. . &|
0000a0a0  33 31 36 36 36 46 35 33  0d 47 54 16 20 20 69 6e  |31666F53.GT.  in|
0000a0b0  5f 66 69 6c 65 5f 62 69  74 73 25 3d 31 36 0d 47  |_file_bits%=16.G|
0000a0c0  5e 06 20 7f 0d 47 68 0b  20 20 d9 23 6c 68 25 0d  |^. ..Gh.  .#lh%.|
0000a0d0  47 72 5b 20 20 85 20 34  32 2c 22 46 61 73 74 47  |Gr[  . 42,"FastG|
0000a0e0  72 61 62 20 63 61 6e 20  6f 6e 6c 79 20 70 72 6f  |rab can only pro|
0000a0f0  63 65 73 73 20 76 69 64  65 6f 20 69 6d 61 67 65  |cess video image|
0000a100  20 66 69 6c 65 73 20 66  72 6f 6d 20 74 68 65 20  | files from the |
0000a110  48 61 77 6b 20 56 39 20  61 6e 64 20 48 61 77 6b  |Hawk V9 and Hawk|
0000a120  20 56 39 20 4d 6b 20 49  49 22 0d 47 7c 06 20 cb  | V9 Mk II".G|. .|
0000a130  0d 47 86 27 20 c8 99 20  22 57 69 6d 70 5f 53 65  |.G.' .. "Wimp_Se|
0000a140  6e 64 4d 65 73 73 61 67  65 22 2c 31 39 2c 70 62  |ndMessage",19,pb|
0000a150  25 2c 70 62 25 21 34 0d  47 90 28 20 c8 99 20 22  |%,pb%!4.G.( .. "|
0000a160  57 69 6d 70 5f 53 6c 6f  74 53 69 7a 65 22 2c 6f  |Wimp_SlotSize",o|
0000a170  72 69 67 69 6e 61 6c 73  6c 6f 74 25 2c 2d 31 0d  |riginalslot%,-1.|
0000a180  47 9a 14 20 6e 65 78 74  6c 6f 63 61 74 69 6f 6e  |G.. nextlocation|
0000a190  25 3d 93 0d 47 a4 12 20  73 70 72 69 74 65 73 69  |%=..G.. spritesi|
0000a1a0  7a 65 25 3d 30 0d 47 ae  17 20 69 6e 78 25 3d a4  |ze%=0.G.. inx%=.|
0000a1b0  67 65 74 77 6f 72 64 28  6c 68 25 29 0d 47 b8 0e  |getword(lh%).G..|
0000a1c0  20 67 70 78 25 3d 69 6e  78 25 0d 47 c2 17 20 69  | gpx%=inx%.G.. i|
0000a1d0  6e 79 25 3d a4 67 65 74  77 6f 72 64 28 6c 68 25  |ny%=.getword(lh%|
0000a1e0  29 0d 47 cc 0e 20 67 70  79 25 3d 69 6e 79 25 0d  |).G.. gpy%=iny%.|
0000a1f0  47 d6 17 20 c8 8e 20 69  6e 5f 66 69 6c 65 5f 62  |G.. .. in_file_b|
0000a200  69 74 73 25 20 ca 0d 47  e0 09 20 c9 20 31 32 0d  |its% ..G.. . 12.|
0000a210  47 ea 1e 20 72 61 77 73  69 7a 65 25 3d 69 6e 78  |G.. rawsize%=inx|
0000a220  25 2a 69 6e 79 25 2a 33  2f 32 2b 32 30 0d 47 f4  |%*iny%*3/2+20.G.|
0000a230  27 20 24 67 72 61 62 77  74 69 74 6c 65 61 64 25  |' $grabwtitlead%|
0000a240  3d 24 28 70 62 25 2b 34  34 29 2b 22 20 31 32 20  |=$(pb%+44)+" 12 |
0000a250  62 69 74 22 0d 47 fe 09  20 c9 20 31 36 0d 48 08  |bit".G.. . 16.H.|
0000a260  1c 20 72 61 77 73 69 7a  65 25 3d 69 6e 78 25 2a  |. rawsize%=inx%*|
0000a270  69 6e 79 25 2a 32 2b 32  30 0d 48 12 27 20 24 67  |iny%*2+20.H.' $g|
0000a280  72 61 62 77 74 69 74 6c  65 61 64 25 3d 24 28 70  |rabwtitlead%=$(p|
0000a290  62 25 2b 34 34 29 2b 22  20 31 36 20 62 69 74 22  |b%+44)+" 16 bit"|
0000a2a0  0d 48 1c 06 20 cb 0d 48  26 11 20 f2 75 70 64 61  |.H.. ..H&. .upda|
0000a2b0  74 65 74 69 74 6c 65 0d  48 30 0e 20 67 72 61 62  |tetitle.H0. grab|
0000a2c0  31 32 25 3d b9 0d 48 3a  0e 20 67 72 61 62 65 78  |12%=..H:. grabex|
0000a2d0  25 3d b9 0d 48 44 16 20  f2 67 72 61 62 6d 65 6d  |%=..HD. .grabmem|
0000a2e0  6f 72 79 28 32 30 2c 30  29 0d 48 4e 2b 20 c8 99  |ory(20,0).HN+ ..|
0000a2f0  20 22 4f 53 5f 47 42 50  42 22 2c 33 2c 6c 68 25  | "OS_GBPB",3,lh%|
0000a300  2c 72 61 77 61 72 65 61  25 2c 72 61 77 73 69 7a  |,rawarea%,rawsiz|
0000a310  65 25 2c 30 0d 48 58 0a  20 d9 23 6c 68 25 0d 48  |e%,0.HX. .#lh%.H|
0000a320  62 11 20 e7 20 73 63 72  61 70 70 79 25 20 8c 0d  |b. . scrappy% ..|
0000a330  48 6c 10 20 20 73 63 72  61 70 70 79 25 3d a3 0d  |Hl.  scrappy%=..|
0000a340  48 76 1a 20 20 2a 52 65  6d 6f 76 65 20 3c 57 69  |Hv.  *Remove <Wi|
0000a350  6d 70 24 53 63 72 61 70  3e 0d 48 80 06 20 cd 0d  |mp$Scrap>.H.. ..|
0000a360  48 8a 53 20 f2 73 65 74  75 70 72 61 77 28 72 61  |H.S .setupraw(ra|
0000a370  77 73 69 7a 65 25 2c 72  61 77 61 72 65 61 25 21  |wsize%,rawarea%!|
0000a380  38 2c 72 61 77 61 72 65  61 25 21 31 32 2c 72 61  |8,rawarea%!12,ra|
0000a390  77 61 72 65 61 25 3f 31  37 2c 72 61 77 61 72 65  |warea%?17,raware|
0000a3a0  61 25 3f 31 38 2c 72 61  77 61 72 65 61 25 3f 31  |a%?18,rawarea%?1|
0000a3b0  39 29 0d 48 94 57 20 64  6f 6e 65 25 3d a4 43 68  |9).H.W done%=.Ch|
0000a3c0  61 6e 67 65 46 53 49 28  22 43 68 61 6e 67 65 46  |angeFSI("ChangeF|
0000a3d0  53 49 20 6e 75 6c 6c 20  6e 75 6c 6c 20 31 35 20  |SI null null 15 |
0000a3e0  31 3a 31 22 2c 2d 31 2c  2d 31 2c 67 72 61 62 61  |1:1",-1,-1,graba|
0000a3f0  72 65 61 25 2c 30 2c 30  2c 72 61 6d 25 2c 30 2c  |rea%,0,0,ram%,0,|
0000a400  72 61 77 61 72 65 61 25  29 0d 48 9e 0d 20 63 66  |rawarea%).H.. cf|
0000a410  73 69 64 25 3d b9 0d 48  a8 13 20 67 72 61 62 61  |sid%=..H.. graba|
0000a420  72 65 61 25 3d 72 61 6d  25 0d 48 b2 0d 20 73 70  |rea%=ram%.H.. sp|
0000a430  72 65 78 25 3d b9 0d 48  bc 0e 20 73 61 76 65 64  |rex%=..H.. saved|
0000a440  38 25 3d b9 0d 48 c6 0f  20 73 61 76 65 64 31 32  |8%=..H.. saved12|
0000a450  25 3d b9 0d 48 d0 11 20  f2 73 65 74 75 70 73 70  |%=..H.. .setupsp|
0000a460  72 69 74 65 0d 48 da 12  20 e7 20 ac 20 77 25 28  |rite.H.. . . w%(|
0000a470  35 2c 32 29 20 8c 0d 48  e4 0e 20 20 f2 63 77 69  |5,2) ..H..  .cwi|
0000a480  6e 28 35 29 0d 48 ee 15  20 20 21 67 72 61 62 77  |n(5).H..  !grabw|
0000a490  62 3d 77 25 28 35 2c 30  29 0d 48 f8 06 20 cd 0d  |b=w%(5,0).H.. ..|
0000a4a0  49 02 19 20 e7 20 ac 20  77 25 28 36 2c 32 29 20  |I.. . . w%(6,2) |
0000a4b0  f2 63 77 69 6e 28 36 29  0d 49 0c 17 20 67 72 61  |.cwin(6).I.. gra|
0000a4c0  62 77 62 21 34 3d 67 72  61 62 61 72 65 61 25 0d  |bwb!4=grabarea%.|
0000a4d0  49 16 1a 20 67 72 61 62  77 62 21 38 3d 67 72 61  |I.. grabwb!8=gra|
0000a4e0  62 61 72 65 61 25 2b 31  36 0d 49 20 54 20 c8 99  |barea%+16.I T ..|
0000a4f0  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 26  | "OS_SpriteOp",&|
0000a500  32 32 38 2c 67 72 61 62  61 72 65 61 25 2c 67 72  |228,grabarea%,gr|
0000a510  61 62 61 72 65 61 25 2b  31 36 20 b8 20 2c 2c 2c  |abarea%+16 . ,,,|
0000a520  67 72 61 62 77 78 25 2c  67 72 61 62 77 79 25 2c  |grabwx%,grabwy%,|
0000a530  73 70 6d 61 73 6b 25 2c  73 70 6d 64 25 0d 49 2a  |spmask%,spmd%.I*|
0000a540  2e 20 c8 99 20 22 4f 53  5f 52 65 61 64 4d 6f 64  |. .. "OS_ReadMod|
0000a550  65 56 61 72 69 61 62 6c  65 22 2c 2d 31 2c 34 20  |eVariable",-1,4 |
0000a560  b8 20 2c 2c 78 73 68 69  66 74 25 0d 49 34 2e 20  |. ,,xshift%.I4. |
0000a570  c8 99 20 22 4f 53 5f 52  65 61 64 4d 6f 64 65 56  |.. "OS_ReadModeV|
0000a580  61 72 69 61 62 6c 65 22  2c 2d 31 2c 35 20 b8 20  |ariable",-1,5 . |
0000a590  2c 2c 79 73 68 69 66 74  25 0d 49 3e 1d 20 67 72  |,,yshift%.I>. gr|
0000a5a0  61 62 77 78 25 3d 67 72  61 62 77 78 25 3c 3c 78  |abwx%=grabwx%<<x|
0000a5b0  73 68 69 66 74 25 0d 49  48 1d 20 67 72 61 62 77  |shift%.IH. grabw|
0000a5c0  79 25 3d 67 72 61 62 77  79 25 3c 3c 79 73 68 69  |y%=grabwy%<<yshi|
0000a5d0  66 74 25 0d 49 52 10 20  f2 61 64 6a 75 73 74 67  |ft%.IR. .adjustg|
0000a5e0  72 61 62 0d 49 5c 14 20  f2 6d 61 67 73 74 72 69  |rab.I\. .magstri|
0000a5f0  6e 67 28 30 2c 30 29 0d  49 66 05 cd 0d 49 70 05  |ng(0,0).If...Ip.|
0000a600  e1 0d 49 7a 04 0d 49 84  0f dd 20 f2 64 61 74 61  |..Iz..I... .data|
0000a610  73 61 76 65 0d 49 8e 23  e7 20 70 62 25 21 32 30  |save.I.#. pb%!20|
0000a620  3d 2d 32 20 80 20 70 62  25 21 32 34 3d 69 63 6f  |=-2 . pb%!24=ico|
0000a630  6e 62 61 72 25 20 8c 0d  49 98 0c 20 21 70 62 25  |nbar% ..I.. !pb%|
0000a640  3d 36 30 0d 49 a2 11 20  70 62 25 21 31 32 3d 70  |=60.I.. pb%!12=p|
0000a650  62 25 21 38 0d 49 ac 0d  20 70 62 25 21 31 36 3d  |b%!8.I.. pb%!16=|
0000a660  32 0d 49 b6 0e 20 70 62  25 21 33 36 3d 2d 31 0d  |2.I.. pb%!36=-1.|
0000a670  49 c0 1d 20 24 28 70 62  25 2b 34 34 29 3d 22 3c  |I.. $(pb%+44)="<|
0000a680  57 69 6d 70 24 53 63 72  61 70 3e 22 0d 49 ca 0d  |Wimp$Scrap>".I..|
0000a690  20 70 62 25 3f 35 36 3d  30 0d 49 d4 27 20 c8 99  | pb%?56=0.I.' ..|
0000a6a0  20 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  | "Wimp_SendMessa|
0000a6b0  67 65 22 2c 31 37 2c 70  62 25 2c 70 62 25 21 34  |ge",17,pb%,pb%!4|
0000a6c0  0d 49 de 0f 20 73 63 72  61 70 70 79 25 3d b9 0d  |.I.. scrappy%=..|
0000a6d0  49 e8 05 cd 0d 49 f2 05  e1 0d 49 fc 04 0d 4a 06  |I....I....I...J.|
0000a6e0  0d dd 20 f2 67 6f 63 66  73 69 0d 4a 10 0a ea 20  |.. .gocfsi.J... |
0000a6f0  66 73 69 24 0d 4a 1a 1c  e7 20 24 6d 6f 64 65 61  |fsi$.J... $modea|
0000a700  64 25 3d 22 22 20 6d 6f  64 65 24 3d 22 31 35 22  |d%="" mode$="15"|
0000a710  0d 4a 24 12 6d 6f 64 65  24 3d 24 6d 6f 64 65 61  |.J$.mode$=$modea|
0000a720  64 25 0d 4a 2e 11 c8 8e  20 bb 28 6d 6f 64 65 24  |d%.J.... .(mode$|
0000a730  29 20 ca 0d 4a 38 0e c9  20 32 2c 34 2c 35 2c 31  |) ..J8.. 2,4,5,1|
0000a740  30 0d 4a 42 0f 20 6d 6f  64 65 24 3d 22 31 35 22  |0.JB. mode$="15"|
0000a750  0d 4a 4c 05 7f 0d 4a 56  3f 20 c8 99 20 22 4f 53  |.JL...JV? .. "OS|
0000a760  5f 52 65 61 64 4d 6f 64  65 56 61 72 69 61 62 6c  |_ReadModeVariabl|
0000a770  65 22 2c bb 6d 6f 64 65  24 2c 30 20 b8 20 2c 2c  |e",.mode$,0 . ,,|
0000a780  6d 6f 64 65 66 6c 61 67  73 25 3b 61 72 6d 66 6c  |modeflags%;armfl|
0000a790  61 67 73 25 0d 4a 60 1c  20 e7 20 28 61 72 6d 66  |ags%.J`. . (armf|
0000a7a0  6c 61 67 73 25 20 80 20  31 3c 3c 32 39 29 20 8c  |lags% . 1<<29) .|
0000a7b0  0d 4a 6a 11 20 20 6d 6f  64 65 24 3d 22 31 35 20  |.Jj.  mode$="15 |
0000a7c0  22 0d 4a 74 06 20 cc 0d  4a 7e 23 20 20 e7 20 28  |".Jt. ..J~#  . (|
0000a7d0  6d 6f 64 65 66 6c 61 67  73 25 20 80 20 31 29 20  |modeflags% . 1) |
0000a7e0  6d 6f 64 65 24 3d 22 31  35 22 0d 4a 88 34 20 20  |mode$="15".J.4  |
0000a7f0  c8 99 20 22 4f 53 5f 52  65 61 64 4d 6f 64 65 56  |.. "OS_ReadModeV|
0000a800  61 72 69 61 62 6c 65 22  2c bb 6d 6f 64 65 24 2c  |ariable",.mode$,|
0000a810  33 20 b8 20 2c 2c 6e 63  6f 6c 6f 75 72 25 0d 4a  |3 . ,,ncolour%.J|
0000a820  92 2f 20 20 e7 20 6e 63  6f 6c 6f 75 72 25 3c 31  |./  . ncolour%<1|
0000a830  35 20 80 20 6f 75 74 6d  6f 64 65 24 3d 22 54 22  |5 . outmode$="T"|
0000a840  20 6f 75 74 6d 6f 64 65  24 3d 22 20 22 0d 4a 9c  | outmode$=" ".J.|
0000a850  06 20 cd 0d 4a a6 05 cb  0d 4a b0 12 24 6d 6f 64  |. ..J....J..$mod|
0000a860  65 61 64 25 3d 6d 6f 64  65 24 0d 4a ba 1a e7 20  |ead%=mode$.J... |
0000a870  bb 24 78 31 61 64 25 3c  31 20 24 78 31 61 64 25  |.$x1ad%<1 $x1ad%|
0000a880  3d 22 31 22 0d 4a c4 1a  e7 20 bb 24 78 32 61 64  |="1".J... .$x2ad|
0000a890  25 3c 31 20 24 78 32 61  64 25 3d 22 31 22 0d 4a  |%<1 $x2ad%="1".J|
0000a8a0  ce 1a e7 20 bb 24 79 31  61 64 25 3c 31 20 24 79  |... .$y1ad%<1 $y|
0000a8b0  31 61 64 25 3d 22 31 22  0d 4a d8 1a e7 20 bb 24  |1ad%="1".J... .$|
0000a8c0  79 32 61 64 25 3c 31 20  24 79 32 61 64 25 3d 22  |y2ad%<1 $y2ad%="|
0000a8d0  31 22 0d 4a e2 14 e7 20  a4 73 65 6c 65 63 74 65  |1".J... .selecte|
0000a8e0  64 28 35 29 20 8c 0d 4a  ec 11 20 73 63 61 6c 65  |d(5) ..J.. scale|
0000a8f0  24 3d 22 20 3d 20 22 0d  4a f6 05 cc 0d 4b 00 37  |$=" = ".J....K.7|
0000a900  20 73 63 61 6c 65 24 3d  22 20 22 2b 24 78 31 61  | scale$=" "+$x1a|
0000a910  64 25 2b 22 3a 22 2b 24  78 32 61 64 25 2b 22 20  |d%+":"+$x2ad%+" |
0000a920  22 2b 24 79 31 61 64 25  2b 22 3a 22 2b 24 79 32  |"+$y1ad%+":"+$y2|
0000a930  61 64 25 0d 4b 0a 05 cd  0d 4b 14 0f 6f 70 74 69  |ad%.K....K..opti|
0000a940  6f 6e 24 3d 22 20 22 0d  4b 1e 26 e7 20 a4 73 65  |on$=" ".K.&. .se|
0000a950  6c 65 63 74 65 64 28 31  31 29 20 6f 70 74 69 6f  |lected(11) optio|
0000a960  6e 24 2b 3d 22 2d 72 61  6e 67 65 20 22 0d 4b 28  |n$+="-range ".K(|
0000a970  26 e7 20 a4 73 65 6c 65  63 74 65 64 28 31 32 29  |&. .selected(12)|
0000a980  20 6f 70 74 69 6f 6e 24  2b 3d 22 2d 65 71 75 61  | option$+="-equa|
0000a990  6c 20 22 0d 4b 32 27 e7  20 a4 73 65 6c 65 63 74  |l ".K2'. .select|
0000a9a0  65 64 28 31 34 29 20 6f  70 74 69 6f 6e 24 2b 3d  |ed(14) option$+=|
0000a9b0  22 2d 69 6e 76 65 72 74  20 22 0d 4b 3c 35 e7 20  |"-invert ".K<5. |
0000a9c0  a4 73 65 6c 65 63 74 65  64 28 31 35 29 20 6f 70  |.selected(15) op|
0000a9d0  74 69 6f 6e 24 2b 3d 22  2d 73 68 61 72 70 65 6e  |tion$+="-sharpen|
0000a9e0  22 2b 24 28 73 68 61 72  70 65 6e 61 64 25 29 0d  |"+$(sharpenad%).|
0000a9f0  4b 46 26 e7 20 a4 73 65  6c 65 63 74 65 64 28 32  |KF&. .selected(2|
0000aa00  33 29 20 6f 70 74 69 6f  6e 24 2b 3d 22 2d 68 66  |3) option$+="-hf|
0000aa10  6c 69 70 20 22 0d 4b 50  26 e7 20 a4 73 65 6c 65  |lip ".KP&. .sele|
0000aa20  63 74 65 64 28 32 34 29  20 6f 70 74 69 6f 6e 24  |cted(24) option$|
0000aa30  2b 3d 22 2d 76 66 6c 69  70 20 22 0d 4b 5a 28 e7  |+="-vflip ".KZ(.|
0000aa40  20 a4 73 65 6c 65 63 74  65 64 28 31 36 29 20 6f  | .selected(16) o|
0000aa50  70 74 69 6f 6e 24 2b 3d  22 2d 6e 6f 73 63 61 6c  |ption$+="-noscal|
0000aa60  65 20 22 0d 4b 64 29 e7  20 a4 73 65 6c 65 63 74  |e ".Kd). .select|
0000aa70  65 64 28 32 36 29 20 6f  70 74 69 6f 6e 24 2b 3d  |ed(26) option$+=|
0000aa80  22 2d 6e 6f 64 69 74 68  65 72 20 22 0d 4b 6e 29  |"-nodither ".Kn)|
0000aa90  e7 20 a4 73 65 6c 65 63  74 65 64 28 32 37 29 20  |. .selected(27) |
0000aaa0  6f 70 74 69 6f 6e 24 2b  3d 22 2d 62 72 69 67 68  |option$+="-brigh|
0000aab0  74 65 6e 20 22 0d 4b 78  31 e7 20 a4 73 65 6c 65  |ten ".Kx1. .sele|
0000aac0  63 74 65 64 28 32 38 29  20 6f 70 74 69 6f 6e 24  |cted(28) option$|
0000aad0  2b 3d 22 2d 62 6c 61 63  6b 22 2b 24 28 62 6c 61  |+="-black"+$(bla|
0000aae0  63 6b 61 64 25 29 0d 4b  82 21 e7 20 24 67 61 6d  |ckad%).K.!. $gam|
0000aaf0  6d 61 61 64 25 3d 22 22  20 24 67 61 6d 6d 61 64  |maad%="" $gammad|
0000ab00  25 3d 22 32 2e 32 22 0d  4b 8c 31 e7 20 a4 73 65  |%="2.2".K.1. .se|
0000ab10  6c 65 63 74 65 64 28 32  39 29 20 6f 70 74 69 6f  |lected(29) optio|
0000ab20  6e 24 2b 3d 22 2d 67 61  6d 6d 61 22 2b 24 28 67  |n$+="-gamma"+$(g|
0000ab30  61 6d 6d 61 61 64 25 29  0d 4b 96 3f 66 73 69 24  |ammaad%).K.?fsi$|
0000ab40  3d 22 43 68 61 6e 67 65  46 53 49 20 6e 75 6c 6c  |="ChangeFSI null|
0000ab50  20 50 69 63 63 79 31 20  22 2b 6d 6f 64 65 24 2b  | Piccy1 "+mode$+|
0000ab60  6f 75 74 6d 6f 64 65 24  2b 73 63 61 6c 65 24 2b  |outmode$+scale$+|
0000ab70  6f 70 74 69 6f 6e 24 0d  4b a0 27 e7 20 a4 73 65  |option$.K.'. .se|
0000ab80  6c 65 63 74 65 64 28 31  33 29 20 c8 99 20 22 57  |lected(13) .. "W|
0000ab90  69 6d 70 5f 53 65 74 4d  6f 64 65 22 2c 30 0d 4b  |imp_SetMode",0.K|
0000aba0  aa 26 c8 99 20 22 57 69  6d 70 5f 53 6c 6f 74 53  |.&.. "Wimp_SlotS|
0000abb0  69 7a 65 22 2c 70 72 65  63 66 73 69 73 6c 6f 74  |ize",precfsislot|
0000abc0  25 2c 2d 31 0d 4b b4 3c  e7 20 62 6f 61 72 64 5f  |%,-1.K.<. board_|
0000abd0  69 73 5f 31 36 5f 62 69  74 25 20 8c 20 69 6e 5f  |is_16_bit% . in_|
0000abe0  66 69 6c 65 5f 62 69 74  73 25 3d 31 36 20 8b 20  |file_bits%=16 . |
0000abf0  69 6e 5f 66 69 6c 65 5f  62 69 74 73 25 3d 31 32  |in_file_bits%=12|
0000ac00  0d 4b be 3e 64 6f 6e 65  25 3d a4 43 68 61 6e 67  |.K.>done%=.Chang|
0000ac10  65 46 53 49 28 66 73 69  24 2c 2d 31 2c 2d 31 2c  |eFSI(fsi$,-1,-1,|
0000ac20  67 72 61 62 61 72 65 61  25 2c 30 2c 30 2c 72 61  |grabarea%,0,0,ra|
0000ac30  6d 25 2c 30 2c 72 61 77  61 72 65 61 25 29 0d 4b  |m%,0,rawarea%).K|
0000ac40  c8 0c 63 66 73 69 64 25  3d b9 0d 4b d2 12 67 72  |..cfsid%=..K..gr|
0000ac50  61 62 61 72 65 61 25 3d  72 61 6d 25 0d 4b dc 43  |abarea%=ram%.K.C|
0000ac60  e7 20 64 6f 6e 65 25 3d  31 30 30 20 85 20 34 32  |. done%=100 . 42|
0000ac70  2c 22 48 69 73 74 6f 67  72 61 6d 20 65 71 75 61  |,"Histogram equa|
0000ac80  6c 69 7a 61 74 69 6f 6e  20 6f 66 20 69 6d 61 67  |lization of imag|
0000ac90  65 20 6e 6f 74 20 70 6f  73 73 69 62 6c 65 22 0d  |e not possible".|
0000aca0  4b e6 0c 73 70 72 65 78  25 3d b9 0d 4b f0 0d 73  |K..sprex%=..K..s|
0000acb0  61 76 65 64 38 25 3d a3  0d 4b fa 26 24 67 72 61  |aved8%=..K.&$gra|
0000acc0  62 77 74 69 74 6c 65 61  64 25 3d 22 3c 75 6e 74  |bwtitlead%="<unt|
0000acd0  69 74 6c 65 64 3e 20 2a  20 43 46 53 49 22 0d 4c  |itled> * CFSI".L|
0000ace0  04 12 e7 20 eb 3d 6f 6c  64 6d 6f 64 65 25 20 8c  |... .=oldmode% .|
0000acf0  0d 4c 0e 10 f2 6d 6f 64  65 63 68 61 6e 67 65 64  |.L...modechanged|
0000ad00  0d 4c 18 10 f2 75 70 64  61 74 65 74 69 74 6c 65  |.L...updatetitle|
0000ad10  0d 4c 22 05 cc 0d 4c 2c  1e c8 99 20 22 57 69 6d  |.L"...L,... "Wim|
0000ad20  70 5f 53 65 74 4d 6f 64  65 22 2c 6f 6c 64 6d 6f  |p_SetMode",oldmo|
0000ad30  64 65 25 0d 4c 36 05 cd  0d 4c 40 10 f2 73 65 74  |de%.L6...L@..set|
0000ad40  75 70 73 70 72 69 74 65  0d 4c 4a 16 67 72 61 62  |upsprite.LJ.grab|
0000ad50  77 62 21 34 3d 67 72 61  62 61 72 65 61 25 0d 4c  |wb!4=grabarea%.L|
0000ad60  54 19 67 72 61 62 77 62  21 38 3d 67 72 61 62 61  |T.grabwb!8=graba|
0000ad70  72 65 61 25 2b 31 36 0d  4c 5e 53 c8 99 20 22 4f  |rea%+16.L^S.. "O|
0000ad80  53 5f 53 70 72 69 74 65  4f 70 22 2c 26 32 32 38  |S_SpriteOp",&228|
0000ad90  2c 67 72 61 62 61 72 65  61 25 2c 67 72 61 62 61  |,grabarea%,graba|
0000ada0  72 65 61 25 2b 31 36 20  b8 20 2c 2c 2c 67 72 61  |rea%+16 . ,,,gra|
0000adb0  62 77 78 25 2c 67 72 61  62 77 79 25 2c 73 70 6d  |bwx%,grabwy%,spm|
0000adc0  61 73 6b 25 2c 73 70 6d  64 25 0d 4c 68 2d c8 99  |ask%,spmd%.Lh-..|
0000add0  20 22 4f 53 5f 52 65 61  64 4d 6f 64 65 56 61 72  | "OS_ReadModeVar|
0000ade0  69 61 62 6c 65 22 2c 2d  31 2c 34 20 b8 20 2c 2c  |iable",-1,4 . ,,|
0000adf0  78 73 68 69 66 74 25 0d  4c 72 2d c8 99 20 22 4f  |xshift%.Lr-.. "O|
0000ae00  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
0000ae10  6c 65 22 2c 2d 31 2c 35  20 b8 20 2c 2c 79 73 68  |le",-1,5 . ,,ysh|
0000ae20  69 66 74 25 0d 4c 7c 1c  67 72 61 62 77 78 25 3d  |ift%.L|.grabwx%=|
0000ae30  67 72 61 62 77 78 25 3c  3c 78 73 68 69 66 74 25  |grabwx%<<xshift%|
0000ae40  0d 4c 86 1c 67 72 61 62  77 79 25 3d 67 72 61 62  |.L..grabwy%=grab|
0000ae50  77 79 25 3c 3c 79 73 68  69 66 74 25 0d 4c 90 0f  |wy%<<yshift%.L..|
0000ae60  f2 61 64 6a 75 73 74 67  72 61 62 0d 4c 9a 13 f2  |.adjustgrab.L...|
0000ae70  6d 61 67 73 74 72 69 6e  67 28 30 2c 30 29 0d 4c  |magstring(0,0).L|
0000ae80  a4 05 e1 0d 4c ae 04 0d  4c b8 12 dd 20 f2 73 65  |....L...L... .se|
0000ae90  74 75 70 73 70 72 69 74  65 0d 4c c2 13 ea 20 73  |tupsprite.L... s|
0000aea0  78 25 2c 73 79 25 2c 73  70 6d 64 25 0d 4c cc 4b  |x%,sy%,spmd%.L.K|
0000aeb0  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
0000aec0  2c 26 32 32 38 2c 67 72  61 62 61 72 65 61 25 2c  |,&228,grabarea%,|
0000aed0  67 72 61 62 61 72 65 61  25 2b 31 36 20 b8 20 2c  |grabarea%+16 . ,|
0000aee0  2c 2c 73 78 25 2c 73 79  25 2c 73 70 6d 61 73 6b  |,,sx%,sy%,spmask|
0000aef0  25 2c 73 70 6d 64 25 0d  4c d6 17 24 67 72 61 62  |%,spmd%.L..$grab|
0000af00  6e 61 6d 65 61 64 25 3d  6f 6e 61 6d 65 24 0d 4c  |namead%=oname$.L|
0000af10  e0 17 24 67 72 61 62 6d  6f 64 65 61 64 25 3d c3  |..$grabmodead%=.|
0000af20  73 70 6d 64 25 0d 4c ea  10 c8 8e 20 73 70 6d 61  |spmd%.L.... spma|
0000af30  73 6b 25 20 ca 0d 4c f4  19 c9 20 30 3a 24 67 72  |sk% ..L... 0:$gr|
0000af40  61 62 6d 61 73 6b 61 64  25 3d 22 4e 6f 22 0d 4c  |abmaskad%="No".L|
0000af50  fe 1a c9 20 31 3a 24 67  72 61 62 6d 61 73 6b 61  |... 1:$grabmaska|
0000af60  64 25 3d 22 59 65 73 22  0d 4d 08 05 cb 0d 4d 12  |d%="Yes".M....M.|
0000af70  15 24 67 72 61 62 77 69  64 74 61 64 25 3d c3 73  |.$grabwidtad%=.s|
0000af80  78 25 0d 4d 1c 16 73 70  74 72 25 3d 67 72 61 62  |x%.M..sptr%=grab|
0000af90  61 72 65 61 25 2b 31 36  0d 4d 26 13 e7 20 73 70  |area%+16.M&.. sp|
0000afa0  74 72 25 21 33 32 3d 34  34 20 8c 0d 4d 30 14 24  |tr%!32=44 ..M0.$|
0000afb0  67 72 61 62 70 61 6c 61  64 25 3d 22 4e 6f 22 0d  |grabpalad%="No".|
0000afc0  4d 3a 05 cc 0d 4d 44 15  24 67 72 61 62 70 61 6c  |M:...MD.$grabpal|
0000afd0  61 64 25 3d 22 59 65 73  22 0d 4d 4e 05 cd 0d 4d  |ad%="Yes".MN...M|
0000afe0  58 1a 24 67 72 61 62 62  79 74 65 61 64 25 3d c3  |X.$grabbytead%=.|
0000aff0  28 21 73 70 74 72 25 29  0d 4d 62 15 24 67 72 61  |(!sptr%).Mb.$gra|
0000b000  62 68 65 69 67 61 64 25  3d c3 73 79 25 0d 4d 6c  |bheigad%=.sy%.Ml|
0000b010  05 e1 0d 4d 76 2d dd 20  f2 73 65 74 75 70 72 61  |...Mv-. .setupra|
0000b020  77 28 73 69 7a 65 25 2c  78 73 69 7a 65 25 2c 79  |w(size%,xsize%,y|
0000b030  73 69 7a 65 25 2c 62 25  2c 63 25 2c 73 25 29 0d  |size%,b%,c%,s%).|
0000b040  4d 80 17 24 72 61 77 62  79 74 65 73 61 64 25 3d  |M..$rawbytesad%=|
0000b050  c3 73 69 7a 65 25 0d 4d  8a 1a 24 72 61 77 77 69  |.size%.M..$rawwi|
0000b060  64 74 68 61 64 25 3d c3  78 73 69 7a 65 25 20 3a  |dthad%=.xsize% :|
0000b070  0d 4d 94 19 24 72 61 77  68 65 69 67 68 74 61 64  |.M..$rawheightad|
0000b080  25 3d c3 79 73 69 7a 65  25 0d 4d 9e 15 24 72 61  |%=.ysize%.M..$ra|
0000b090  77 62 72 69 67 68 74 61  64 25 3d c3 62 25 0d 4d  |wbrightad%=.b%.M|
0000b0a0  a8 13 24 72 61 77 63 6f  6e 74 61 64 25 3d c3 63  |..$rawcontad%=.c|
0000b0b0  25 0d 4d b2 12 24 72 61  77 73 61 74 61 64 25 3d  |%.M..$rawsatad%=|
0000b0c0  c3 73 25 0d 4d bc 05 e1  0d 4d c6 04 0d 4d d0 16  |.s%.M....M...M..|
0000b0d0  dd 20 a4 73 65 6c 65 63  74 65 64 28 69 63 6f 6e  |. .selected(icon|
0000b0e0  25 29 0d 4d da 0f e7 20  77 25 28 31 2c 32 29 20  |%).M... w%(1,2) |
0000b0f0  8c 0d 4d e4 10 21 6d 62  25 3d 77 25 28 31 2c 30  |..M..!mb%=w%(1,0|
0000b100  29 0d 4d ee 0f 6d 62 25  21 34 3d 69 63 6f 6e 25  |).M..mb%!4=icon%|
0000b110  0d 4d f8 1f c8 99 20 22  57 69 6d 70 5f 47 65 74  |.M.... "Wimp_Get|
0000b120  49 63 6f 6e 53 74 61 74  65 22 2c 2c 6d 62 25 0d  |IconState",,mb%.|
0000b130  4e 02 1e e7 20 6d 62 25  21 32 34 20 80 20 31 3c  |N... mb%!24 . 1<|
0000b140  3c 32 31 20 8c 20 3d 31  20 8b 20 3d 30 0d 4e 0c  |<21 . =1 . =0.N.|
0000b150  05 cc 0d 4e 16 2b e7 20  21 28 77 25 28 31 2c 31  |...N.+. !(w%(1,1|
0000b160  29 2b 31 30 38 2b 28 33  32 2a 69 63 6f 6e 25 29  |)+108+(32*icon%)|
0000b170  29 20 80 20 28 31 3c 3c  32 31 29 20 8c 0d 4e 20  |) . (1<<21) ..N |
0000b180  06 3d 31 0d 4e 2a 05 cc  0d 4e 34 06 3d 30 0d 4e  |.=1.N*...N4.=0.N|
0000b190  3e 05 cd 0d 4e 48 05 cd  0d 4e 52 04 0d 4e 5c 29  |>...NH...NR..N\)|
0000b1a0  dd 20 f2 69 63 6f 6e 73  65 74 28 77 69 6e 64 6f  |. .iconset(windo|
0000b1b0  77 25 2c 69 63 6f 6e 25  2c 63 6c 65 61 72 25 2c  |w%,icon%,clear%,|
0000b1c0  65 6f 72 25 29 0d 4e 66  15 e7 20 77 25 28 77 69  |eor%).Nf.. w%(wi|
0000b1d0  6e 64 6f 77 25 2c 32 29  20 8c 0d 4e 70 16 21 6d  |ndow%,2) ..Np.!m|
0000b1e0  62 25 3d 77 25 28 77 69  6e 64 6f 77 25 2c 30 29  |b%=w%(window%,0)|
0000b1f0  0d 4e 7a 0f 6d 62 25 21  34 3d 69 63 6f 6e 25 0d  |.Nz.mb%!4=icon%.|
0000b200  4e 84 0e 6d 62 25 21 38  3d 65 6f 72 25 0d 4e 8e  |N..mb%!8=eor%.N.|
0000b210  11 6d 62 25 21 31 32 3d  63 6c 65 61 72 25 0d 4e  |.mb%!12=clear%.N|
0000b220  98 1f c8 99 20 22 57 69  6d 70 5f 53 65 74 49 63  |.... "Wimp_SetIc|
0000b230  6f 6e 53 74 61 74 65 22  2c 2c 6d 62 25 0d 4e a2  |onState",,mb%.N.|
0000b240  05 cc 0d 4e ac 51 77 25  28 77 69 6e 64 6f 77 25  |...N.Qw%(window%|
0000b250  2c 31 29 21 28 31 30 38  2b 33 32 2a 69 63 6f 6e  |,1)!(108+32*icon|
0000b260  25 29 3d 28 77 25 28 77  69 6e 64 6f 77 25 2c 31  |%)=(w%(window%,1|
0000b270  29 21 28 31 30 38 2b 33  32 2a 69 63 6f 6e 25 29  |)!(108+32*icon%)|
0000b280  20 80 20 ac 20 63 6c 65  61 72 25 29 20 82 20 65  | . . clear%) . e|
0000b290  6f 72 25 0d 4e b6 05 cd  0d 4e c0 05 e1 0d 4e ca  |or%.N....N....N.|
0000b2a0  04 0d 4e d4 11 dd 20 f2  61 64 6a 75 73 74 6c 69  |..N... .adjustli|
0000b2b0  76 65 0d 4e de 0d f2 63  61 6c 63 6c 69 76 65 0d  |ve.N...calclive.|
0000b2c0  4e e8 10 21 6d 62 25 3d  77 25 28 33 2c 30 29 0d  |N..!mb%=w%(3,0).|
0000b2d0  4e f2 21 c8 99 20 22 57  69 6d 70 5f 47 65 74 57  |N.!.. "Wimp_GetW|
0000b2e0  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 6d 62 25  |indowState",,mb%|
0000b2f0  0d 4e fc 17 6d 62 25 21  38 3d 6d 62 25 21 31 36  |.N..mb%!8=mb%!16|
0000b300  2d 6c 69 76 65 79 25 0d  4f 06 17 6d 62 25 21 31  |-livey%.O..mb%!1|
0000b310  32 3d 6d 62 25 21 34 2b  6c 69 76 65 78 25 0d 4f  |2=mb%!4+livex%.O|
0000b320  10 15 e7 20 6d 62 25 21  34 3c 30 20 6d 62 25 21  |... mb%!4<0 mb%!|
0000b330  34 3d 30 0d 4f 1a 25 e7  20 6d 62 25 21 38 3e 72  |4=0.O.%. mb%!8>r|
0000b340  69 67 68 74 73 63 72 25  20 6d 62 25 21 38 3d 72  |ightscr% mb%!8=r|
0000b350  69 67 68 74 73 63 72 25  0d 4f 24 1d c8 99 20 22  |ightscr%.O$... "|
0000b360  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
0000b370  2c 2c 6d 62 25 0d 4f 2e  12 e7 20 6c 74 6f 6f 6c  |,,mb%.O... ltool|
0000b380  24 3d 22 3e 22 20 8c 0d  4f 38 10 21 6d 62 25 3d  |$=">" ..O8.!mb%=|
0000b390  77 25 28 34 2c 30 29 0d  4f 42 12 6d 62 25 21 31  |w%(4,0).OB.mb%!1|
0000b3a0  32 3d 6d 62 25 21 34 2d  34 0d 4f 4c 0d 6d 62 25  |2=mb%!4-4.OL.mb%|
0000b3b0  21 34 2d 3d 38 38 0d 4f  56 1d c8 99 20 22 57 69  |!4-=88.OV... "Wi|
0000b3c0  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
0000b3d0  6d 62 25 0d 4f 60 05 cd  0d 4f 6a 05 e1 0d 4f 74  |mb%.O`...Oj...Ot|
0000b3e0  04 0d 4f 7e 0f dd 20 f2  63 61 6c 63 6c 69 76 65  |..O~.. .calclive|
0000b3f0  0d 4f 88 1a 6c 70 78 25  3d 35 31 32 2f 28 32 5e  |.O..lpx%=512/(2^|
0000b400  6c 69 76 65 73 69 7a 65  25 29 0d 4f 92 21 21 6c  |livesize%).O.!!l|
0000b410  69 76 65 70 61 67 65 73  74 65 70 3d 38 2a 28 32  |ivepagestep=8*(2|
0000b420  5e 6c 69 76 65 73 69 7a  65 25 29 0d 4f 9c 22 21  |^livesize%).O."!|
0000b430  6c 69 76 65 70 69 78 65  6c 73 74 65 70 3d 32 5e  |livepixelstep=2^|
0000b440  28 6c 69 76 65 73 69 7a  65 25 2b 32 29 0d 4f a6  |(livesize%+2).O.|
0000b450  0f 6c 70 79 25 3d 6c 70  78 25 2f 32 0d 4f b0 1d  |.lpy%=lpx%/2.O..|
0000b460  6c 69 76 65 61 72 65 61  25 21 31 32 3d 6c 70 78  |livearea%!12=lpx|
0000b470  25 2a 6c 70 79 25 2b 36  30 0d 4f ba 20 6c 69 76  |%*lpy%+60.O. liv|
0000b480  65 61 72 65 61 25 21 31  36 3d 6c 69 76 65 61 72  |earea%!16=livear|
0000b490  65 61 25 21 31 32 2d 31  36 0d 4f c4 1b 6c 69 76  |ea%!12-16.O..liv|
0000b4a0  65 61 72 65 61 25 21 33  32 3d 28 6c 70 78 25 2f  |earea%!32=(lpx%/|
0000b4b0  34 29 2d 31 0d 4f ce 17  6c 69 76 65 61 72 65 61  |4)-1.O..livearea|
0000b4c0  25 21 33 36 3d 6c 70 79  25 2d 31 0d 4f d8 2d c8  |%!36=lpy%-1.O.-.|
0000b4d0  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
0000b4e0  72 69 61 62 6c 65 22 2c  31 35 2c 34 20 b8 20 2c  |riable",15,4 . ,|
0000b4f0  2c 78 73 68 69 66 74 25  0d 4f e2 2d c8 99 20 22  |,xshift%.O.-.. "|
0000b500  4f 53 5f 52 65 61 64 4d  6f 64 65 56 61 72 69 61  |OS_ReadModeVaria|
0000b510  62 6c 65 22 2c 31 35 2c  35 20 b8 20 2c 2c 79 73  |ble",15,5 . ,,ys|
0000b520  68 69 66 74 25 0d 4f ec  18 6c 69 76 65 78 25 3d  |hift%.O..livex%=|
0000b530  6c 70 78 25 3c 3c 78 73  68 69 66 74 25 0d 4f f6  |lpx%<<xshift%.O.|
0000b540  18 6c 69 76 65 79 25 3d  6c 70 79 25 3c 3c 79 73  |.livey%=lpy%<<ys|
0000b550  68 69 66 74 25 0d 50 00  13 21 6c 69 76 65 77 62  |hift%.P..!livewb|
0000b560  3d 77 25 28 33 2c 30 29  0d 50 0a 16 6c 69 76 65  |=w%(3,0).P..live|
0000b570  77 62 21 34 3d 6c 69 76  65 61 72 65 61 25 0d 50  |wb!4=livearea%.P|
0000b580  14 19 6c 69 76 65 77 62  21 38 3d 6c 69 76 65 61  |..livewb!8=livea|
0000b590  72 65 61 25 2b 31 36 0d  50 1e 0f 6c 69 76 65 77  |rea%+16.P..livew|
0000b5a0  62 21 31 32 3d 30 0d 50  28 15 6c 69 76 65 77 62  |b!12=0.P(.livewb|
0000b5b0  21 31 36 3d 2d 6c 69 76  65 79 25 0d 50 32 15 21  |!16=-livey%.P2.!|
0000b5c0  6c 69 76 65 78 73 69 7a  65 3d 6c 69 76 65 78 25  |livexsize=livex%|
0000b5d0  0d 50 3c 16 21 6c 69 76  65 79 73 69 7a 65 3d 2d  |.P<.!liveysize=-|
0000b5e0  6c 69 76 65 79 25 0d 50  46 0a 21 6d 62 25 3d 30  |livey%.PF.!mb%=0|
0000b5f0  0d 50 50 11 6d 62 25 21  34 3d 2d 6c 69 76 65 79  |.PP.mb%!4=-livey|
0000b600  25 0d 50 5a 10 6d 62 25  21 38 3d 6c 69 76 65 78  |%.PZ.mb%!8=livex|
0000b610  25 0d 50 64 0c 6d 62 25  21 31 32 3d 30 0d 50 6e  |%.Pd.mb%!12=0.Pn|
0000b620  23 c8 99 20 22 57 69 6d  70 5f 53 65 74 45 78 74  |#.. "Wimp_SetExt|
0000b630  65 6e 74 22 2c 77 25 28  33 2c 30 29 2c 6d 62 25  |ent",w%(3,0),mb%|
0000b640  0d 50 78 10 77 25 28 33  2c 31 29 21 34 34 3d 30  |.Px.w%(3,1)!44=0|
0000b650  0d 50 82 16 77 25 28 33  2c 31 29 21 34 38 3d 2d  |.P..w%(3,1)!48=-|
0000b660  6c 69 76 65 79 25 0d 50  8c 15 77 25 28 33 2c 31  |livey%.P..w%(3,1|
0000b670  29 21 35 32 3d 6c 69 76  65 78 25 0d 50 96 10 77  |)!52=livex%.P..w|
0000b680  25 28 33 2c 31 29 21 35  36 3d 30 0d 50 a0 05 e1  |%(3,1)!56=0.P...|
0000b690  0d 50 aa 04 0d 50 b4 11  dd 20 f2 61 64 6a 75 73  |.P...P... .adjus|
0000b6a0  74 67 72 61 62 0d 50 be  27 ea 20 73 68 65 69 67  |tgrab.P.'. sheig|
0000b6b0  68 74 25 2c 73 77 69 64  74 68 25 2c 73 6d 6f 64  |ht%,swidth%,smod|
0000b6c0  65 25 2c 73 63 68 25 2c  73 63 77 25 0d 50 c8 4e  |e%,sch%,scw%.P.N|
0000b6d0  c8 99 20 22 4f 53 5f 53  70 72 69 74 65 4f 70 22  |.. "OS_SpriteOp"|
0000b6e0  2c 26 32 32 38 2c 67 72  61 62 61 72 65 61 25 2c  |,&228,grabarea%,|
0000b6f0  67 72 61 62 61 72 65 61  25 2b 31 36 20 b8 20 2c  |grabarea%+16 . ,|
0000b700  2c 2c 73 77 69 64 74 68  25 2c 73 68 65 69 67 68  |,,swidth%,sheigh|
0000b710  74 25 2c 2c 73 6d 6f 64  65 25 0d 50 d2 31 c8 99  |t%,,smode%.P.1..|
0000b720  20 22 4f 53 5f 52 65 61  64 4d 6f 64 65 56 61 72  | "OS_ReadModeVar|
0000b730  69 61 62 6c 65 22 2c 73  6d 6f 64 65 25 2c 34 20  |iable",smode%,4 |
0000b740  b8 20 2c 2c 78 73 68 69  66 74 25 0d 50 dc 31 c8  |. ,,xshift%.P.1.|
0000b750  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
0000b760  72 69 61 62 6c 65 22 2c  73 6d 6f 64 65 25 2c 35  |riable",smode%,5|
0000b770  20 b8 20 2c 2c 79 73 68  69 66 74 25 0d 50 e6 33  | . ,,yshift%.P.3|
0000b780  73 63 77 25 3d 28 73 77  69 64 74 68 25 3c 3c 78  |scw%=(swidth%<<x|
0000b790  73 68 69 66 74 25 29 2a  bb 28 24 6d 61 67 31 61  |shift%)*.($mag1a|
0000b7a0  64 25 29 2f bb 28 24 6d  61 67 32 61 64 25 29 0d  |d%)/.($mag2ad%).|
0000b7b0  50 f0 34 73 63 68 25 3d  28 73 68 65 69 67 68 74  |P.4sch%=(sheight|
0000b7c0  25 3c 3c 79 73 68 69 66  74 25 29 2a bb 28 24 6d  |%<<yshift%)*.($m|
0000b7d0  61 67 31 61 64 25 29 2f  bb 28 24 6d 61 67 32 61  |ag1ad%)/.($mag2a|
0000b7e0  64 25 29 0d 50 fa 15 73  63 77 25 3d 28 73 63 77  |d%).P..scw%=(scw|
0000b7f0  25 20 81 20 34 29 2a 34  0d 51 04 15 73 63 68 25  |% . 4)*4.Q..sch%|
0000b800  3d 28 73 63 68 25 20 81  20 34 29 2a 34 0d 51 0e  |=(sch% . 4)*4.Q.|
0000b810  0f 67 72 61 62 77 62 21  31 32 3d 30 0d 51 18 13  |.grabwb!12=0.Q..|
0000b820  67 72 61 62 77 62 21 31  36 3d 2d 73 63 68 25 0d  |grabwb!16=-sch%.|
0000b830  51 22 1d e7 20 73 63 77  25 3c 3d 31 30 38 20 84  |Q".. scw%<=108 .|
0000b840  20 73 63 68 25 3c 3d 31  30 38 20 8c 0d 51 2c 17  | sch%<=108 ..Q,.|
0000b850  20 e7 20 77 25 28 35 2c  31 29 3f 33 39 3d 26 46  | . w%(5,1)?39=&F|
0000b860  46 20 8c 0d 51 36 0e 20  20 f2 64 77 69 6e 28 35  |F ..Q6.  .dwin(5|
0000b870  29 0d 51 40 12 20 20 77  25 28 35 2c 31 29 3f 33  |).Q@.  w%(5,1)?3|
0000b880  39 3d 30 0d 51 4a 0e 20  20 f2 63 77 69 6e 28 35  |9=0.QJ.  .cwin(5|
0000b890  29 0d 51 54 23 20 20 c8  99 20 22 57 69 6d 70 5f  |).QT#  .. "Wimp_|
0000b8a0  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 77 25 28  |OpenWindow",,w%(|
0000b8b0  35 2c 31 29 0d 51 5e 06  20 cd 0d 51 68 2e c8 99  |5,1).Q^. ..Qh...|
0000b8c0  20 22 57 69 6d 70 5f 46  6f 72 63 65 52 65 64 72  | "Wimp_ForceRedr|
0000b8d0  61 77 22 2c 77 25 28 35  2c 30 29 2c 30 2c 2d 32  |aw",w%(5,0),0,-2|
0000b8e0  35 36 2c 31 32 38 2c 30  0d 51 72 05 cc 0d 51 7c  |56,128,0.Qr...Q||
0000b8f0  15 20 e7 20 77 25 28 35  2c 31 29 3f 33 39 3d 30  |. . w%(5,1)?39=0|
0000b900  20 8c 0d 51 86 0e 20 20  f2 64 77 69 6e 28 35 29  | ..Q..  .dwin(5)|
0000b910  0d 51 90 14 20 20 77 25  28 35 2c 31 29 3f 33 39  |.Q..  w%(5,1)?39|
0000b920  3d 26 46 46 0d 51 9a 0e  20 20 f2 63 77 69 6e 28  |=&FF.Q..  .cwin(|
0000b930  35 29 0d 51 a4 23 20 20  c8 99 20 22 57 69 6d 70  |5).Q.#  .. "Wimp|
0000b940  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 77 25  |_OpenWindow",,w%|
0000b950  28 35 2c 31 29 0d 51 ae  06 20 cd 0d 51 b8 05 cd  |(5,1).Q.. ..Q...|
0000b960  0d 51 c2 0f e7 20 77 25  28 35 2c 32 29 20 8c 0d  |.Q... w%(5,2) ..|
0000b970  51 cc 0b 20 21 6d 62 25  3d 30 0d 51 d6 10 20 6d  |Q.. !mb%=0.Q.. m|
0000b980  62 25 21 34 3d 2d 73 63  68 25 0d 51 e0 0f 20 6d  |b%!4=-sch%.Q.. m|
0000b990  62 25 21 38 3d 73 63 77  25 0d 51 ea 0d 20 6d 62  |b%!8=scw%.Q.. mb|
0000b9a0  25 21 31 32 3d 30 0d 51  f4 24 20 c8 99 20 22 57  |%!12=0.Q.$ .. "W|
0000b9b0  69 6d 70 5f 53 65 74 45  78 74 65 6e 74 22 2c 77  |imp_SetExtent",w|
0000b9c0  25 28 35 2c 30 29 2c 6d  62 25 0d 51 fe 05 cc 0d  |%(5,0),mb%.Q....|
0000b9d0  52 08 14 20 77 25 28 35  2c 31 29 21 34 34 3d 21  |R.. w%(5,1)!44=!|
0000b9e0  6d 62 25 0d 52 12 15 20  77 25 28 35 2c 31 29 21  |mb%.R.. w%(5,1)!|
0000b9f0  34 38 3d 6d 62 25 21 34  0d 52 1c 15 20 77 25 28  |48=mb%!4.R.. w%(|
0000ba00  35 2c 31 29 21 35 32 3d  6d 62 25 21 38 0d 52 26  |5,1)!52=mb%!8.R&|
0000ba10  16 20 77 25 28 35 2c 31  29 21 35 36 3d 6d 62 25  |. w%(5,1)!56=mb%|
0000ba20  21 31 32 0d 52 30 05 cd  0d 52 3a 25 c8 99 20 22  |!12.R0...R:%.. "|
0000ba30  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
0000ba40  61 74 65 22 2c 2c 77 25  28 35 2c 31 29 0d 52 44  |ate",,w%(5,1).RD|
0000ba50  30 c8 99 20 22 57 69 6d  70 5f 46 6f 72 63 65 52  |0.. "Wimp_ForceR|
0000ba60  65 64 72 61 77 22 2c 77  25 28 35 2c 30 29 2c 30  |edraw",w%(5,0),0|
0000ba70  2c 2d 73 63 68 25 2c 73  63 77 25 2c 30 0d 52 4e  |,-sch%,scw%,0.RN|
0000ba80  1d 77 25 28 35 2c 31 29  21 38 3d 77 25 28 35 2c  |.w%(5,1)!8=w%(5,|
0000ba90  31 29 21 31 36 2d 73 63  68 25 0d 52 58 1d 77 25  |1)!16-sch%.RX.w%|
0000baa0  28 35 2c 31 29 21 31 32  3d 77 25 28 35 2c 31 29  |(5,1)!12=w%(5,1)|
0000bab0  21 34 2b 73 63 77 25 0d  52 62 21 c8 99 20 22 57  |!4+scw%.Rb!.. "W|
0000bac0  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
0000bad0  2c 77 25 28 35 2c 31 29  0d 52 6c 12 e7 20 67 74  |,w%(5,1).Rl.. gt|
0000bae0  6f 6f 6c 24 3d 22 3e 22  20 8c 0d 52 76 11 20 21  |ool$=">" ..Rv. !|
0000baf0  6d 62 25 3d 77 25 28 36  2c 30 29 0d 52 80 17 20  |mb%=w%(6,0).R.. |
0000bb00  6d 62 25 21 34 3d 77 25  28 35 2c 31 29 21 34 2d  |mb%!4=w%(5,1)!4-|
0000bb10  38 38 0d 52 8a 14 20 6d  62 25 21 38 3d 77 25 28  |88.R.. mb%!8=w%(|
0000bb20  35 2c 31 29 21 38 0d 52  94 17 20 6d 62 25 21 31  |5,1)!8.R.. mb%!1|
0000bb30  32 3d 77 25 28 35 2c 31  29 21 34 2d 34 0d 52 9e  |2=w%(5,1)!4-4.R.|
0000bb40  16 20 6d 62 25 21 31 36  3d 77 25 28 35 2c 31 29  |. mb%!16=w%(5,1)|
0000bb50  21 31 36 0d 52 a8 16 20  6d 62 25 21 32 38 3d 77  |!16.R.. mb%!28=w|
0000bb60  25 28 35 2c 31 29 21 32  38 0d 52 b2 1e 20 c8 99  |%(5,1)!28.R.. ..|
0000bb70  20 22 57 69 6d 70 5f 4f  70 65 6e 57 69 6e 64 6f  | "Wimp_OpenWindo|
0000bb80  77 22 2c 2c 6d 62 25 0d  52 bc 05 cd 0d 52 c6 38  |w",,mb%.R....R.8|
0000bb90  f2 70 61 6c 65 74 74 65  5f 66 6f 72 5f 73 70 72  |.palette_for_spr|
0000bba0  69 74 65 28 67 72 61 62  61 72 65 61 25 2c 67 72  |ite(grabarea%,gr|
0000bbb0  61 62 61 72 65 61 25 2b  31 36 2c 67 72 61 62 70  |abarea%+16,grabp|
0000bbc0  61 6c 25 29 0d 52 d0 05  e1 0d 52 da 04 0d 52 e4  |al%).R....R...R.|
0000bbd0  1b dd 20 f2 6d 61 67 73  74 72 69 6e 67 28 6f 6e  |.. .magstring(on|
0000bbe0  65 25 2c 74 77 6f 25 29  0d 52 ee 46 c8 99 20 22  |e%,two%).R.F.. "|
0000bbf0  57 69 6d 70 5f 52 65 61  64 50 69 78 54 72 61 6e  |Wimp_ReadPixTran|
0000bc00  73 22 2c 26 32 30 30 2c  67 72 61 62 61 72 65 61  |s",&200,grabarea|
0000bc10  25 2c 67 72 61 62 61 72  65 61 25 2b 31 36 2c 2c  |%,grabarea%+16,,|
0000bc20  2c 2c 6d 61 67 74 25 2b  31 36 2c 6d 62 25 0d 52  |,,magt%+16,mb%.R|
0000bc30  f8 2a e7 20 6f 6e 65 25  3c 3e 30 20 24 6d 61 67  |.*. one%<>0 $mag|
0000bc40  31 61 64 25 3d c3 28 bb  28 24 6d 61 67 31 61 64  |1ad%=.(.($mag1ad|
0000bc50  25 29 2b 6f 6e 65 25 29  0d 53 02 2a e7 20 74 77  |%)+one%).S.*. tw|
0000bc60  6f 25 3c 3e 30 20 24 6d  61 67 32 61 64 25 3d c3  |o%<>0 $mag2ad%=.|
0000bc70  28 bb 28 24 6d 61 67 32  61 64 25 29 2b 74 77 6f  |(.($mag2ad%)+two|
0000bc80  25 29 0d 53 0c 22 e7 20  bb 28 24 6d 61 67 31 61  |%).S.". .($mag1a|
0000bc90  64 25 29 3c 31 20 24 6d  61 67 31 61 64 25 3d 22  |d%)<1 $mag1ad%="|
0000bca0  31 22 3a e1 0d 53 16 26  e7 20 bb 28 24 6d 61 67  |1":..S.&. .($mag|
0000bcb0  31 61 64 25 29 3e 39 39  39 20 24 6d 61 67 31 61  |1ad%)>999 $mag1a|
0000bcc0  64 25 3d 22 39 39 39 22  3a e1 0d 53 20 22 e7 20  |d%="999":..S ". |
0000bcd0  bb 28 24 6d 61 67 32 61  64 25 29 3c 31 20 24 6d  |.($mag2ad%)<1 $m|
0000bce0  61 67 32 61 64 25 3d 22  31 22 3a e1 0d 53 2a 26  |ag2ad%="1":..S*&|
0000bcf0  e7 20 bb 28 24 6d 61 67  32 61 64 25 29 3e 39 39  |. .($mag2ad%)>99|
0000bd00  39 20 24 6d 61 67 32 61  64 25 3d 22 39 39 39 22  |9 $mag2ad%="999"|
0000bd10  3a e1 0d 53 34 38 e7 20  77 25 28 39 2c 32 29 20  |:..S48. w%(9,2) |
0000bd20  c8 99 20 22 57 69 6d 70  5f 46 6f 72 63 65 52 65  |.. "Wimp_ForceRe|
0000bd30  64 72 61 77 22 2c 77 25  28 39 2c 30 29 2c 37 32  |draw",w%(9,0),72|
0000bd40  2c 30 2c 32 30 30 2c 32  39 30 0d 53 3e 1f 21 6d  |,0,200,290.S>.!m|
0000bd50  61 67 74 25 3d 6d 61 67  74 25 21 31 36 2a bb 28  |agt%=magt%!16*.(|
0000bd60  24 6d 61 67 31 61 64 25  29 0d 53 48 20 6d 61 67  |$mag1ad%).SH mag|
0000bd70  74 25 21 34 3d 6d 61 67  74 25 21 32 30 2a bb 28  |t%!4=magt%!20*.(|
0000bd80  24 6d 61 67 31 61 64 25  29 0d 53 52 20 6d 61 67  |$mag1ad%).SR mag|
0000bd90  74 25 21 38 3d 6d 61 67  74 25 21 32 34 2a bb 28  |t%!8=magt%!24*.(|
0000bda0  24 6d 61 67 32 61 64 25  29 0d 53 5c 21 6d 61 67  |$mag2ad%).S\!mag|
0000bdb0  74 25 21 31 32 3d 6d 61  67 74 25 21 32 38 2a bb  |t%!12=magt%!28*.|
0000bdc0  28 24 6d 61 67 32 61 64  25 29 0d 53 66 0f f2 61  |($mag2ad%).Sf..a|
0000bdd0  64 6a 75 73 74 67 72 61  62 0d 53 70 05 e1 0d 53  |djustgrab.Sp...S|
0000bde0  7a 0b dd 20 f2 67 72 61  62 0d 53 84 12 f2 64 65  |z.. .grab.S...de|
0000bdf0  6c 65 74 65 67 72 61 62  62 65 64 0d 53 8e 0e 73  |letegrabbed.S..s|
0000be00  61 76 65 64 31 32 25 3d  a3 0d 53 98 0d 73 61 76  |aved12%=..S..sav|
0000be10  65 64 38 25 3d a3 0d 53  a2 27 24 67 72 61 62 77  |ed8%=..S.'$grabw|
0000be20  74 69 74 6c 65 61 64 25  3d 22 3c 75 6e 74 69 74  |titlead%="<untit|
0000be30  6c 65 64 3e 20 2a 20 38  20 62 69 74 22 0d 53 ac  |led> * 8 bit".S.|
0000be40  10 f2 75 70 64 61 74 65  74 69 74 6c 65 0d 53 b6  |..updatetitle.S.|
0000be50  1a 67 70 78 25 3d 35 31  32 2f 28 32 5e 67 72 61  |.gpx%=512/(2^gra|
0000be60  62 73 69 7a 65 25 29 0d  53 c0 1d 21 70 61 67 65  |bsize%).S..!page|
0000be70  73 74 65 70 3d 38 2a 28  32 5e 67 72 61 62 73 69  |step=8*(2^grabsi|
0000be80  7a 65 25 29 0d 53 ca 1e  21 70 69 78 65 6c 73 74  |ze%).S..!pixelst|
0000be90  65 70 3d 32 5e 28 67 72  61 62 73 69 7a 65 25 2b  |ep=2^(grabsize%+|
0000bea0  32 29 0d 53 d4 0f 67 70  79 25 3d 67 70 78 25 2f  |2).S..gpy%=gpx%/|
0000beb0  32 0d 53 de 1c 73 70 72  69 74 65 73 69 7a 65 25  |2.S..spritesize%|
0000bec0  3d 67 70 78 25 2a 67 70  79 25 2b 35 36 0d 53 e8  |=gpx%*gpy%+56.S.|
0000bed0  38 e7 20 62 6f 61 72 64  5f 69 73 5f 31 36 5f 62  |8. board_is_16_b|
0000bee0  69 74 25 20 72 61 77 73  69 7a 65 25 3d 32 36 32  |it% rawsize%=262|
0000bef0  31 36 34 20 8b 20 72 61  77 73 69 7a 65 25 3d 31  |164 . rawsize%=1|
0000bf00  39 39 36 32 38 0d 53 f2  13 6e 65 78 74 6c 6f 63  |99628.S..nextloc|
0000bf10  61 74 69 6f 6e 25 3d 93  0d 53 fc 35 c8 99 20 22  |ation%=..S.5.. "|
0000bf20  4f 53 5f 52 65 61 64 4d  6f 64 65 56 61 72 69 61  |OS_ReadModeVaria|
0000bf30  62 6c 65 22 2c bb 28 24  6d 6f 64 65 62 25 29 2c  |ble",.($modeb%),|
0000bf40  34 20 b8 20 2c 2c 78 73  68 69 66 74 25 0d 54 06  |4 . ,,xshift%.T.|
0000bf50  35 c8 99 20 22 4f 53 5f  52 65 61 64 4d 6f 64 65  |5.. "OS_ReadMode|
0000bf60  56 61 72 69 61 62 6c 65  22 2c bb 28 24 6d 6f 64  |Variable",.($mod|
0000bf70  65 62 25 29 2c 35 20 b8  20 2c 2c 79 73 68 69 66  |eb%),5 . ,,yshif|
0000bf80  74 25 0d 54 10 19 67 72  61 62 77 78 25 3d 67 70  |t%.T..grabwx%=gp|
0000bf90  78 25 3c 3c 78 73 68 69  66 74 25 0d 54 1a 19 67  |x%<<xshift%.T..g|
0000bfa0  72 61 62 77 79 25 3d 67  70 79 25 3c 3c 79 73 68  |rabwy%=gpy%<<ysh|
0000bfb0  69 66 74 25 0d 54 24 11  e7 20 ac 20 77 25 28 35  |ift%.T$.. . w%(5|
0000bfc0  2c 32 29 20 8c 0d 54 2e  0d 20 f2 63 77 69 6e 28  |,2) ..T.. .cwin(|
0000bfd0  35 29 0d 54 38 14 20 21  67 72 61 62 77 62 3d 77  |5).T8. !grabwb=w|
0000bfe0  25 28 35 2c 30 29 0d 54  42 05 cd 0d 54 4c 18 e7  |%(5,0).TB...TL..|
0000bff0  20 ac 20 77 25 28 36 2c  32 29 20 f2 63 77 69 6e  | . w%(6,2) .cwin|
0000c000  28 36 29 0d 54 56 11 e7  20 6d 6f 6e 6f 24 3d 22  |(6).TV.. mono$="|
0000c010  3e 22 20 8c 0d 54 60 16  20 f2 67 72 61 62 6d 65  |>" ..T`. .grabme|
0000c020  6d 6f 72 79 28 38 2c 2d  31 29 0d 54 6a 17 20 67  |mory(8,-1).Tj. g|
0000c030  72 61 62 77 62 21 34 3d  67 72 61 62 61 72 65 61  |rabwb!4=grabarea|
0000c040  25 0d 54 74 1a 20 67 72  61 62 77 62 21 38 3d 67  |%.Tt. grabwb!8=g|
0000c050  72 61 62 61 72 65 61 25  2b 31 36 0d 54 7e 0d 20  |rabarea%+16.T~. |
0000c060  f2 72 65 61 64 56 39 38  0d 54 88 0e 20 67 72 61  |.readV98.T.. gra|
0000c070  62 31 32 25 3d a3 0d 54  92 1e 20 f2 69 63 6f 6e  |b12%=..T.. .icon|
0000c080  73 65 74 28 36 2c 30 2c  31 3c 3c 32 32 2c 31 3c  |set(6,0,1<<22,1<|
0000c090  3c 32 32 29 0d 54 9c 1e  20 f2 69 63 6f 6e 73 65  |<22).T.. .iconse|
0000c0a0  74 28 36 2c 33 2c 31 3c  3c 32 32 2c 31 3c 3c 32  |t(6,3,1<<22,1<<2|
0000c0b0  32 29 0d 54 a6 05 cc 0d  54 b0 10 20 e7 20 62 69  |2).T....T.. . bi|
0000c0c0  74 25 3d 31 32 20 8c 0d  54 ba 18 20 20 f2 67 72  |t%=12 ..T..  .gr|
0000c0d0  61 62 6d 65 6d 6f 72 79  28 32 30 2c 2d 31 29 0d  |abmemory(20,-1).|
0000c0e0  54 c4 0f 20 20 f2 72 65  61 64 56 39 31 32 0d 54  |T..  .readV912.T|
0000c0f0  ce 0f 20 20 d6 73 65 74  5f 38 62 69 74 0d 54 d8  |..  .set_8bit.T.|
0000c100  1c 20 20 21 67 72 61 62  61 72 65 61 25 3d 73 70  |.  !grabarea%=sp|
0000c110  72 69 74 65 73 69 7a 65  25 0d 54 e2 13 20 20 67  |ritesize%.T..  g|
0000c120  72 61 62 61 72 65 61 25  21 34 3d 31 0d 54 ec 14  |rabarea%!4=1.T..|
0000c130  20 20 67 72 61 62 61 72  65 61 25 21 38 3d 31 36  |  grabarea%!8=16|
0000c140  0d 54 f6 1e 20 20 67 72  61 62 61 72 65 61 25 21  |.T..  grabarea%!|
0000c150  31 32 3d 73 70 72 69 74  65 73 69 7a 65 25 0d 55  |12=spritesize%.U|
0000c160  00 18 20 20 67 72 61 62  77 62 21 34 3d 67 72 61  |..  grabwb!4=gra|
0000c170  62 61 72 65 61 25 0d 55  0a 1b 20 20 67 72 61 62  |barea%.U..  grab|
0000c180  77 62 21 38 3d 67 72 61  62 61 72 65 61 25 2b 31  |wb!8=grabarea%+1|
0000c190  36 0d 55 14 0e 20 20 f2  72 65 61 64 56 39 38 0d  |6.U..  .readV98.|
0000c1a0  55 1e 0f 20 20 67 72 61  62 31 32 25 3d b9 0d 55  |U..  grab12%=..U|
0000c1b0  28 1b 20 20 f2 69 63 6f  6e 73 65 74 28 36 2c 30  |(.  .iconset(6,0|
0000c1c0  2c 31 3c 3c 32 32 2c 30  29 0d 55 32 1b 20 20 f2  |,1<<22,0).U2.  .|
0000c1d0  69 63 6f 6e 73 65 74 28  36 2c 33 2c 31 3c 3c 32  |iconset(6,3,1<<2|
0000c1e0  32 2c 30 29 0d 55 3c 45  20 20 f2 73 65 74 75 70  |2,0).U<E  .setup|
0000c1f0  72 61 77 28 72 61 77 73  69 7a 65 25 2c 67 70 78  |raw(rawsize%,gpx|
0000c200  25 2c 67 70 79 25 2c 62  72 69 67 68 74 6e 65 73  |%,gpy%,brightnes|
0000c210  73 25 2c 63 6f 6e 74 72  61 73 74 25 2c 73 61 74  |s%,contrast%,sat|
0000c220  75 72 61 74 69 6f 6e 25  29 0d 55 46 06 20 cc 0d  |uration%).UF. ..|
0000c230  55 50 17 20 20 f2 67 72  61 62 6d 65 6d 6f 72 79  |UP.  .grabmemory|
0000c240  28 38 2c 2d 31 29 0d 55  5a 18 20 20 67 72 61 62  |(8,-1).UZ.  grab|
0000c250  77 62 21 34 3d 67 72 61  62 61 72 65 61 25 0d 55  |wb!4=grabarea%.U|
0000c260  64 1b 20 20 67 72 61 62  77 62 21 38 3d 67 72 61  |d.  grabwb!8=gra|
0000c270  62 61 72 65 61 25 2b 31  36 0d 55 6e 0e 20 20 f2  |barea%+16.Un.  .|
0000c280  72 65 61 64 56 39 38 0d  55 78 0f 20 20 67 72 61  |readV98.Ux.  gra|
0000c290  62 31 32 25 3d a3 0d 55  82 1f 20 20 f2 69 63 6f  |b12%=..U..  .ico|
0000c2a0  6e 73 65 74 28 36 2c 30  2c 31 3c 3c 32 32 2c 31  |nset(6,0,1<<22,1|
0000c2b0  3c 3c 32 32 29 0d 55 8c  1f 20 20 f2 69 63 6f 6e  |<<22).U..  .icon|
0000c2c0  73 65 74 28 36 2c 33 2c  31 3c 3c 32 32 2c 31 3c  |set(6,3,1<<22,1<|
0000c2d0  3c 32 32 29 0d 55 96 06  20 cd 0d 55 a0 05 cd 0d  |<22).U.. ..U....|
0000c2e0  55 aa 07 ea 20 85 0d 55  b4 2a ee 20 85 20 ee 20  |U... ..U.*. . . |
0000c2f0  85 20 87 3a 24 6d 6f 64  65 62 25 3d 22 31 35 22  |. .:$modeb%="15"|
0000c300  3a 67 72 61 62 61 72 65  61 25 21 35 36 3d 31 35  |:grabarea%!56=15|
0000c310  0d 55 be 3e c8 99 20 22  57 69 6d 70 5f 52 65 61  |.U.>.. "Wimp_Rea|
0000c320  64 50 69 78 54 72 61 6e  73 22 2c 26 32 30 30 2c  |dPixTrans",&200,|
0000c330  67 72 61 62 77 62 21 34  2c 67 72 61 62 77 62 21  |grabwb!4,grabwb!|
0000c340  38 2c 2c 2c 2c 6d 61 67  74 25 2c 6d 62 25 0d 55  |8,,,,magt%,mb%.U|
0000c350  c8 07 f7 20 85 0d 55 d2  19 f2 69 63 6f 6e 73 65  |... ..U...iconse|
0000c360  74 28 34 2c 31 2c 31 3c  3c 32 32 2c 30 29 0d 55  |t(4,1,1<<22,0).U|
0000c370  dc 1a 24 67 72 61 62 6e  61 6d 65 61 64 25 3d 22  |..$grabnamead%="|
0000c380  67 72 61 62 62 65 64 22  0d 55 e6 18 24 67 72 61  |grabbed".U..$gra|
0000c390  62 6d 6f 64 65 61 64 25  3d 24 6d 6f 64 65 62 25  |bmodead%=$modeb%|
0000c3a0  0d 55 f0 15 24 67 72 61  62 6d 61 73 6b 61 64 25  |.U..$grabmaskad%|
0000c3b0  3d 22 4e 6f 22 0d 55 fa  16 24 67 72 61 62 77 69  |="No".U..$grabwi|
0000c3c0  64 74 61 64 25 3d c3 67  70 78 25 0d 56 04 37 e7  |dtad%=.gpx%.V.7.|
0000c3d0  20 6d 6f 6e 6f 24 3c 3e  22 3e 22 20 8c 20 24 67  | mono$<>">" . $g|
0000c3e0  72 61 62 70 61 6c 61 64  25 3d 22 4e 6f 22 20 8b  |rabpalad%="No" .|
0000c3f0  20 24 67 72 61 62 70 61  6c 61 64 25 3d 22 59 65  | $grabpalad%="Ye|
0000c400  73 22 0d 56 0e 3a c8 99  20 22 4f 53 5f 53 70 72  |s".V.:.. "OS_Spr|
0000c410  69 74 65 4f 70 22 2c 26  32 31 38 2c 67 72 61 62  |iteOp",&218,grab|
0000c420  61 72 65 61 25 2c 67 72  61 62 61 72 65 61 25 2b  |area%,grabarea%+|
0000c430  31 36 20 b8 20 2c 2c 73  70 74 72 25 0d 56 18 1a  |16 . ,,sptr%.V..|
0000c440  24 67 72 61 62 62 79 74  65 61 64 25 3d c3 28 21  |$grabbytead%=.(!|
0000c450  73 70 74 72 25 29 0d 56  22 16 24 67 72 61 62 68  |sptr%).V".$grabh|
0000c460  65 69 67 61 64 25 3d c3  67 70 79 25 0d 56 2c 16  |eigad%=.gpy%.V,.|
0000c470  24 67 72 61 62 77 69 64  74 61 64 25 3d c3 67 70  |$grabwidtad%=.gp|
0000c480  78 25 0d 56 36 13 67 72  61 62 77 62 21 32 30 3d  |x%.V6.grabwb!20=|
0000c490  6d 61 67 74 25 0d 56 40  0d 67 72 61 62 65 78 25  |magt%.V@.grabex%|
0000c4a0  3d b9 0d 56 4a 0d 67 72  61 62 63 68 25 3d b9 0d  |=..VJ.grabch%=..|
0000c4b0  56 54 0d 67 72 61 62 63  68 25 3d a3 0d 56 5e 0f  |VT.grabch%=..V^.|
0000c4c0  f2 61 64 6a 75 73 74 67  72 61 62 0d 56 68 13 f2  |.adjustgrab.Vh..|
0000c4d0  6d 61 67 73 74 72 69 6e  67 28 30 2c 30 29 0d 56  |magstring(0,0).V|
0000c4e0  72 05 e1 0d 56 7c 04 0d  56 86 1d dd 20 f2 67 72  |r...V|..V... .gr|
0000c4f0  61 62 6d 65 6d 6f 72 79  28 61 72 67 25 2c 61 72  |abmemory(arg%,ar|
0000c500  67 31 25 29 0d 56 90 36  c8 99 20 22 57 69 6d 70  |g1%).V.6.. "Wimp|
0000c510  5f 53 6c 6f 74 53 69 7a  65 22 2c 2d 31 2c 2d 31  |_SlotSize",-1,-1|
0000c520  20 b8 20 63 75 72 72 65  6e 74 73 6c 6f 74 25 2c  | . currentslot%,|
0000c530  2c 66 72 65 65 73 6c 6f  74 25 0d 56 9a 4c e7 20  |,freeslot%.V.L. |
0000c540  66 72 65 65 73 6c 6f 74  25 3c 3d 73 70 72 69 74  |freeslot%<=sprit|
0000c550  65 73 69 7a 65 25 20 85  20 34 32 2c 22 43 61 6e  |esize% . 42,"Can|
0000c560  6e 6f 74 20 63 6c 61 69  6d 20 65 6e 6f 75 67 68  |not claim enough|
0000c570  20 6d 65 6d 6f 72 79 20  74 6f 20 67 72 61 62 20  | memory to grab |
0000c580  69 6d 61 67 65 22 0d 56  a4 0d c8 8e 20 61 72 67  |image".V.... arg|
0000c590  25 20 ca 0d 56 ae 07 c9  20 38 0d 56 b8 33 20 c8  |% ..V... 8.V.3 .|
0000c5a0  99 20 22 57 69 6d 70 5f  53 6c 6f 74 53 69 7a 65  |. "Wimp_SlotSize|
0000c5b0  22 2c 63 75 72 72 65 6e  74 73 6c 6f 74 25 2b 73  |",currentslot%+s|
0000c5c0  70 72 69 74 65 73 69 7a  65 25 2c 2d 31 0d 56 c2  |pritesize%,-1.V.|
0000c5d0  1c 20 67 72 61 62 61 72  65 61 25 3d 6e 65 78 74  |. grabarea%=next|
0000c5e0  6c 6f 63 61 74 69 6f 6e  25 0d 56 cc 1f 20 6e 65  |location%.V.. ne|
0000c5f0  78 74 6c 6f 63 61 74 69  6f 6e 25 2b 3d 73 70 72  |xtlocation%+=spr|
0000c600  69 74 65 73 69 7a 65 25  0d 56 d6 1b 20 21 67 72  |itesize%.V.. !gr|
0000c610  61 62 61 72 65 61 25 3d  73 70 72 69 74 65 73 69  |abarea%=spritesi|
0000c620  7a 65 25 0d 56 e0 12 20  67 72 61 62 61 72 65 61  |ze%.V.. grabarea|
0000c630  25 21 34 3d 31 0d 56 ea  13 20 67 72 61 62 61 72  |%!4=1.V.. grabar|
0000c640  65 61 25 21 38 3d 31 36  0d 56 f4 1d 20 67 72 61  |ea%!8=16.V.. gra|
0000c650  62 61 72 65 61 25 21 31  32 3d 73 70 72 69 74 65  |barea%!12=sprite|
0000c660  73 69 7a 65 25 0d 56 fe  17 20 67 72 61 62 77 62  |size%.V.. grabwb|
0000c670  21 34 3d 67 72 61 62 61  72 65 61 25 0d 57 08 1a  |!4=grabarea%.W..|
0000c680  20 67 72 61 62 77 62 21  38 3d 67 72 61 62 61 72  | grabwb!8=grabar|
0000c690  65 61 25 2b 31 36 0d 57  12 08 c9 20 32 30 0d 57  |ea%+16.W... 20.W|
0000c6a0  1c 3d 20 e7 20 66 72 65  65 73 6c 6f 74 25 3c 3d  |.= . freeslot%<=|
0000c6b0  73 70 72 69 74 65 73 69  7a 65 25 2b 72 61 77 73  |spritesize%+raws|
0000c6c0  69 7a 65 25 20 84 20 63  61 63 68 65 24 3d 22 3e  |ize% . cache$=">|
0000c6d0  22 20 80 20 61 72 67 31  25 20 8c 0d 57 26 34 20  |" . arg1% ..W&4 |
0000c6e0  20 c8 99 20 22 57 69 6d  70 5f 53 6c 6f 74 53 69  | .. "Wimp_SlotSi|
0000c6f0  7a 65 22 2c 63 75 72 72  65 6e 74 73 6c 6f 74 25  |ze",currentslot%|
0000c700  2b 73 70 72 69 74 65 73  69 7a 65 25 2c 2d 31 0d  |+spritesize%,-1.|
0000c710  57 30 1f 20 20 70 72 65  63 66 73 69 73 6c 6f 74  |W0.  precfsislot|
0000c720  25 3d 63 75 72 72 65 6e  74 73 6c 6f 74 25 0d 57  |%=currentslot%.W|
0000c730  3a 1d 20 20 67 72 61 62  61 72 65 61 25 3d 6e 65  |:.  grabarea%=ne|
0000c740  78 74 6c 6f 63 61 74 69  6f 6e 25 0d 57 44 20 20  |xtlocation%.WD  |
0000c750  20 6e 65 78 74 6c 6f 63  61 74 69 6f 6e 25 2b 3d  | nextlocation%+=|
0000c760  73 70 72 69 74 65 73 69  7a 65 25 0d 57 4e 0e 20  |spritesize%.WN. |
0000c770  20 73 6c 61 76 65 25 3d  b9 0d 57 58 3b 20 20 74  | slave%=..WX;  t|
0000c780  77 65 6c 76 65 68 61 6e  64 6c 65 25 3d ae 28 22  |welvehandle%=.("|
0000c790  3c 46 61 73 74 47 72 61  62 24 44 69 72 3e 2e 52  |<FastGrab$Dir>.R|
0000c7a0  65 73 6f 75 72 63 65 73  2e 54 77 65 6c 76 65 42  |esources.TwelveB|
0000c7b0  69 74 22 29 0d 57 62 27  20 20 f2 70 75 74 77 6f  |it").Wb'  .putwo|
0000c7c0  72 64 28 74 77 65 6c 76  65 68 61 6e 64 6c 65 25  |rd(twelvehandle%|
0000c7d0  2c 26 36 33 37 32 36 35  34 44 29 0d 57 6c 27 20  |,&6372654D).Wl' |
0000c7e0  20 f2 70 75 74 77 6f 72  64 28 74 77 65 6c 76 65  | .putword(twelve|
0000c7f0  68 61 6e 64 6c 65 25 2c  26 37 34 36 36 36 46 35  |handle%,&74666F5|
0000c800  33 29 0d 57 76 21 20 20  f2 70 75 74 77 6f 72 64  |3).Wv!  .putword|
0000c810  28 74 77 65 6c 76 65 68  61 6e 64 6c 65 25 2c 35  |(twelvehandle%,5|
0000c820  31 32 29 0d 57 80 21 20  20 f2 70 75 74 77 6f 72  |12).W.!  .putwor|
0000c830  64 28 74 77 65 6c 76 65  68 61 6e 64 6c 65 25 2c  |d(twelvehandle%,|
0000c840  32 35 36 29 0d 57 8a 17  20 20 d5 23 74 77 65 6c  |256).W..  .#twel|
0000c850  76 65 68 61 6e 64 6c 65  25 2c 30 0d 57 94 10 20  |vehandle%,0.W.. |
0000c860  20 72 61 77 61 72 65 61  25 3d 30 0d 57 9e 06 20  | rawarea%=0.W.. |
0000c870  cc 0d 57 a8 0e 20 20 73  6c 61 76 65 25 3d a3 0d  |..W..  slave%=..|
0000c880  57 b2 3d 20 20 c8 99 20  22 57 69 6d 70 5f 53 6c  |W.=  .. "Wimp_Sl|
0000c890  6f 74 53 69 7a 65 22 2c  63 75 72 72 65 6e 74 73  |otSize",currents|
0000c8a0  6c 6f 74 25 2b 72 61 77  73 69 7a 65 25 2b 73 70  |lot%+rawsize%+sp|
0000c8b0  72 69 74 65 73 69 7a 65  25 2c 2d 31 0d 57 bc 28  |ritesize%,-1.W.(|
0000c8c0  20 20 70 72 65 63 66 73  69 73 6c 6f 74 25 3d 63  |  precfsislot%=c|
0000c8d0  75 72 72 65 6e 74 73 6c  6f 74 25 2b 72 61 77 73  |urrentslot%+raws|
0000c8e0  69 7a 65 25 0d 57 c6 1c  20 20 72 61 77 61 72 65  |ize%.W..  raware|
0000c8f0  61 25 3d 6e 65 78 74 6c  6f 63 61 74 69 6f 6e 25  |a%=nextlocation%|
0000c900  0d 57 d0 26 20 20 67 72  61 62 61 72 65 61 25 3d  |.W.&  grabarea%=|
0000c910  6e 65 78 74 6c 6f 63 61  74 69 6f 6e 25 2b 72 61  |nextlocation%+ra|
0000c920  77 73 69 7a 65 25 0d 57  da 29 20 20 6e 65 78 74  |wsize%.W.)  next|
0000c930  6c 6f 63 61 74 69 6f 6e  25 2b 3d 72 61 77 73 69  |location%+=rawsi|
0000c940  7a 65 25 2b 73 70 72 69  74 65 73 69 7a 65 25 0d  |ze%+spritesize%.|
0000c950  57 e4 06 20 cd 0d 57 ee  05 cb 0d 57 f8 05 e1 0d  |W.. ..W....W....|
0000c960  58 02 04 0d 58 0c 0e dd  20 f2 72 65 61 64 56 39  |X...X... .readV9|
0000c970  38 0d 58 16 1f 67 72 61  62 61 72 65 61 25 21 31  |8.X..grabarea%!1|
0000c980  36 3d 73 70 72 69 74 65  73 69 7a 65 25 2b 34 34  |6=spritesize%+44|
0000c990  0d 58 20 2c 24 28 67 72  61 62 61 72 65 61 25 2b  |.X ,$(grabarea%+|
0000c9a0  32 30 29 3d 22 67 72 61  62 62 65 64 22 2b bd 30  |20)="grabbed"+.0|
0000c9b0  2b bd 30 2b bd 30 2b bd  30 2b bd 30 0d 58 2a 1b  |+.0+.0+.0+.0.X*.|
0000c9c0  67 72 61 62 61 72 65 61  25 21 33 32 3d 28 67 70  |grabarea%!32=(gp|
0000c9d0  78 25 2f 34 29 2d 31 0d  58 34 17 67 72 61 62 61  |x%/4)-1.X4.graba|
0000c9e0  72 65 61 25 21 33 36 3d  67 70 79 25 2d 31 0d 58  |rea%!36=gpy%-1.X|
0000c9f0  3e 14 67 72 61 62 61 72  65 61 25 21 34 30 3d 26  |>.grabarea%!40=&|
0000ca00  30 30 0d 58 48 14 67 72  61 62 61 72 65 61 25 21  |00.XH.grabarea%!|
0000ca10  34 34 3d 26 31 46 0d 58  52 14 67 72 61 62 61 72  |44=&1F.XR.grabar|
0000ca20  65 61 25 21 34 38 3d 26  32 43 0d 58 5c 14 67 72  |ea%!48=&2C.X\.gr|
0000ca30  61 62 61 72 65 61 25 21  35 32 3d 26 32 43 0d 58  |abarea%!52=&2C.X|
0000ca40  66 1b 67 72 61 62 61 72  65 61 25 21 35 36 3d bb  |f.grabarea%!56=.|
0000ca50  28 24 6d 6f 64 65 62 25  29 0d 58 70 11 e7 20 6d  |($modeb%).Xp.. m|
0000ca60  6f 6e 6f 24 3d 22 3e 22  20 8c 0d 58 7a 3c 20 f2  |ono$=">" ..Xz< .|
0000ca70  61 64 64 5f 70 61 6c 65  74 74 65 5f 74 6f 5f 73  |add_palette_to_s|
0000ca80  70 72 69 74 65 28 67 72  61 62 61 72 65 61 25 2c  |prite(grabarea%,|
0000ca90  67 72 61 62 61 72 65 61  25 2b 31 36 2c 67 72 61  |grabarea%+16,gra|
0000caa0  62 70 61 6c 25 29 0d 58  84 19 20 46 25 3d 67 72  |bpal%).X.. F%=gr|
0000cab0  61 62 61 72 65 61 25 2b  36 30 2b 32 30 34 38 0d  |abarea%+60+2048.|
0000cac0  58 8e 10 20 d6 20 56 52  41 4d 5f 47 72 61 62 0d  |X.. . VRAM_Grab.|
0000cad0  58 98 05 cc 0d 58 a2 14  20 46 25 3d 67 72 61 62  |X....X.. F%=grab|
0000cae0  61 72 65 61 25 2b 36 30  0d 58 ac 0f 20 d6 20 73  |area%+60.X.. . s|
0000caf0  65 74 5f 38 62 69 74 0d  58 b6 10 20 d6 20 56 52  |et_8bit.X.. . VR|
0000cb00  41 4d 5f 47 72 61 62 0d  58 c0 05 cd 0d 58 ca 10  |AM_Grab.X....X..|
0000cb10  f2 6d 6f 64 65 63 68 61  6e 67 65 64 0d 58 d4 05  |.modechanged.X..|
0000cb20  e1 0d 58 de 04 0d 58 e8  0f dd 20 f2 72 65 61 64  |..X...X... .read|
0000cb30  56 39 31 32 0d 58 f2 0d  c8 99 20 26 34 30 36 43  |V912.X.... &406C|
0000cb40  30 0d 58 fc 04 0d 59 06  18 e7 20 62 6f 61 72 64  |0.X...Y... board|
0000cb50  5f 69 73 5f 31 36 5f 62  69 74 25 20 8c 0d 59 10  |_is_16_bit% ..Y.|
0000cb60  14 20 d6 20 52 65 66 72  65 73 68 5f 46 72 61 6d  |. . Refresh_Fram|
0000cb70  65 0d 59 1a 17 20 c8 99  20 22 57 56 43 47 72 61  |e.Y.. .. "WVCGra|
0000cb80  62 5f 4c 43 41 22 2c 32  0d 59 24 14 20 d6 20 52  |b_LCA",2.Y$. . R|
0000cb90  65 66 72 65 73 68 5f 46  72 61 6d 65 0d 59 2e 05  |efresh_Frame.Y..|
0000cba0  cd 0d 59 38 04 0d 59 42  0f d6 20 73 65 74 5f 31  |..Y8..YB.. set_1|
0000cbb0  32 62 69 74 0d 59 4c 04  0d 59 56 0e e7 20 73 6c  |2bit.YL..YV.. sl|
0000cbc0  61 76 65 25 20 8c 0d 59  60 1b 20 c8 99 20 22 57  |ave% ..Y`. .. "W|
0000cbd0  56 43 47 72 61 62 5f 52  65 66 72 65 73 68 22 2c  |VCGrab_Refresh",|
0000cbe0  31 0d 59 6a 20 20 d5 23  74 77 65 6c 76 65 68 61  |1.Yj  .#twelveha|
0000cbf0  6e 64 6c 65 25 2c 62 72  69 67 68 74 6e 65 73 73  |ndle%,brightness|
0000cc00  25 0d 59 74 1e 20 d5 23  74 77 65 6c 76 65 68 61  |%.Yt. .#twelveha|
0000cc10  6e 64 6c 65 25 2c 63 6f  6e 74 72 61 73 74 25 0d  |ndle%,contrast%.|
0000cc20  59 7e 20 20 d5 23 74 77  65 6c 76 65 68 61 6e 64  |Y~  .#twelvehand|
0000cc30  6c 65 25 2c 73 61 74 75  72 61 74 69 6f 6e 25 0d  |le%,saturation%.|
0000cc40  59 88 0b 20 41 25 3d 6d  62 25 0d 59 92 11 20 e3  |Y.. A%=mb%.Y.. .|
0000cc50  20 42 25 3d 30 20 b8 20  32 35 35 0d 59 9c 1a 20  | B%=0 . 255.Y.. |
0000cc60  20 e7 20 62 6f 61 72 64  5f 69 73 5f 31 36 5f 62  | . board_is_16_b|
0000cc70  69 74 25 20 8c 0d 59 a6  12 20 20 20 d6 20 72 65  |it% ..Y..   . re|
0000cc80  61 64 31 36 62 69 74 0d  59 b0 2c 20 20 20 c8 99  |ad16bit.Y.,   ..|
0000cc90  20 22 4f 53 5f 47 42 50  42 22 2c 32 2c 74 77 65  | "OS_GBPB",2,twe|
0000cca0  6c 76 65 68 61 6e 64 6c  65 25 2c 6d 62 25 2c 31  |lvehandle%,mb%,1|
0000ccb0  30 32 34 0d 59 ba 07 20  20 cc 0d 59 c4 11 20 20  |024.Y..  ..Y..  |
0000ccc0  20 d6 20 70 61 63 6b 6c  69 6e 65 0d 59 ce 2b 20  | . packline.Y.+ |
0000ccd0  20 20 c8 99 20 22 4f 53  5f 47 42 50 42 22 2c 32  |  .. "OS_GBPB",2|
0000cce0  2c 74 77 65 6c 76 65 68  61 6e 64 6c 65 25 2c 6d  |,twelvehandle%,m|
0000ccf0  62 25 2c 37 36 38 0d 59  d8 07 20 20 cd 0d 59 e2  |b%,768.Y..  ..Y.|
0000cd00  1c 20 20 c8 99 20 26 34  30 36 43 34 2c 28 42 25  |.  .. &406C4,(B%|
0000cd10  2f 32 35 35 29 2a 31 30  30 0d 59 ec 06 20 ed 0d  |/255)*100.Y.. ..|
0000cd20  59 f6 14 20 d9 23 74 77  65 6c 76 65 68 61 6e 64  |Y.. .#twelvehand|
0000cd30  6c 65 25 0d 5a 00 1b 20  c8 99 20 22 57 56 43 47  |le%.Z.. .. "WVCG|
0000cd40  72 61 62 5f 52 65 66 72  65 73 68 22 2c 30 0d 5a  |rab_Refresh",0.Z|
0000cd50  0a 05 cc 0d 5a 14 11 20  e3 20 42 25 3d 30 20 b8  |....Z.. . B%=0 .|
0000cd60  20 32 35 35 0d 5a 1e 1c  20 20 c8 99 20 26 34 30  | 255.Z..  .. &40|
0000cd70  36 43 34 2c 28 42 25 2f  32 35 35 29 2a 31 30 30  |6C4,(B%/255)*100|
0000cd80  0d 5a 28 1a 20 20 e7 20  62 6f 61 72 64 5f 69 73  |.Z(.  . board_is|
0000cd90  5f 31 36 5f 62 69 74 25  20 8c 0d 5a 32 1f 20 20  |_16_bit% ..Z2.  |
0000cda0  20 41 25 3d 72 61 77 61  72 65 61 25 2b 32 30 2b  | A%=rawarea%+20+|
0000cdb0  28 42 25 2a 31 30 32 34  29 0d 5a 3c 12 20 20 20  |(B%*1024).Z<.   |
0000cdc0  d6 20 72 65 61 64 31 36  62 69 74 0d 5a 46 07 20  |. read16bit.ZF. |
0000cdd0  20 cc 0d 5a 50 1e 20 20  20 41 25 3d 72 61 77 61  | ..ZP.   A%=rawa|
0000cde0  72 65 61 25 2b 32 30 2b  28 42 25 2a 37 36 38 29  |rea%+20+(B%*768)|
0000cdf0  0d 5a 5a 11 20 20 20 d6  20 70 61 63 6b 6c 69 6e  |.ZZ.   . packlin|
0000ce00  65 0d 5a 64 07 20 20 cd  0d 5a 6e 06 20 ed 0d 5a  |e.Zd.  ..Zn. ..Z|
0000ce10  78 05 cd 0d 5a 82 04 0d  5a 8c 1a f2 63 68 61 6e  |x...Z...Z...chan|
0000ce20  67 65 5f 4c 43 41 28 64  69 74 68 65 72 65 64 25  |ge_LCA(dithered%|
0000ce30  29 0d 5a 96 04 0d 5a a0  0d c8 99 20 26 34 30 36  |).Z...Z.... &406|
0000ce40  43 31 0d 5a aa 10 e7 20  72 61 77 61 72 65 61 25  |C1.Z... rawarea%|
0000ce50  20 8c 0d 5a b4 24 20 21  72 61 77 61 72 65 61 25  | ..Z.$ !rawarea%|
0000ce60  3d 26 36 33 37 32 36 35  34 44 20 20 3a 20 f4 20  |=&6372654D  : . |
0000ce70  22 4d 65 72 63 22 0d 5a  be 19 20 e7 20 62 6f 61  |"Merc".Z.. . boa|
0000ce80  72 64 5f 69 73 5f 31 36  5f 62 69 74 25 20 8c 0d  |rd_is_16_bit% ..|
0000ce90  5a c8 25 20 20 72 61 77  61 72 65 61 25 21 34 3d  |Z.%  rawarea%!4=|
0000cea0  26 33 31 36 36 36 46 35  33 20 3a 20 f4 20 22 53  |&31666F53 : . "S|
0000ceb0  6f 66 31 22 0d 5a d2 06  20 cc 0d 5a dc 25 20 20  |of1".Z.. ..Z.%  |
0000cec0  72 61 77 61 72 65 61 25  21 34 3d 26 37 34 36 36  |rawarea%!4=&7466|
0000ced0  36 46 35 33 20 3a 20 f4  20 22 53 6f 66 74 22 0d  |6F53 : . "Soft".|
0000cee0  5a e6 06 20 cd 0d 5a f0  14 20 72 61 77 61 72 65  |Z.. ..Z.. raware|
0000cef0  61 25 21 38 3d 67 70 78  25 0d 5a fa 15 20 72 61  |a%!8=gpx%.Z.. ra|
0000cf00  77 61 72 65 61 25 21 31  32 3d 67 70 79 25 0d 5b  |warea%!12=gpy%.[|
0000cf10  04 12 20 72 61 77 61 72  65 61 25 3f 31 36 3d 30  |.. rawarea%?16=0|
0000cf20  0d 5b 0e 1c 20 72 61 77  61 72 65 61 25 3f 31 37  |.[.. rawarea%?17|
0000cf30  3d 62 72 69 67 68 74 6e  65 73 73 25 0d 5b 18 1a  |=brightness%.[..|
0000cf40  20 72 61 77 61 72 65 61  25 3f 31 38 3d 63 6f 6e  | rawarea%?18=con|
0000cf50  74 72 61 73 74 25 0d 5b  22 1c 20 72 61 77 61 72  |trast%.[". rawar|
0000cf60  65 61 25 3f 31 39 3d 73  61 74 75 72 61 74 69 6f  |ea%?19=saturatio|
0000cf70  6e 25 0d 5b 2c 05 cd 0d  5b 36 04 0d 5b 40 0e d6  |n%.[,...[6..[@..|
0000cf80  20 73 65 74 5f 38 62 69  74 0d 5b 4a 04 0d 5b 54  | set_8bit.[J..[T|
0000cf90  05 e1 0d 5b 5e 04 0d 5b  68 0f dd 20 f2 73 68 6f  |...[^..[h.. .sho|
0000cfa0  77 67 72 61 62 0d 5b 72  28 e7 20 ac 20 77 25 28  |wgrab.[r(. . w%(|
0000cfb0  35 2c 32 29 20 f2 63 77  69 6e 28 35 29 3a 21 67  |5,2) .cwin(5):!g|
0000cfc0  72 61 62 77 62 3d 77 25  28 35 2c 30 29 0d 5b 7c  |rabwb=w%(5,0).[||
0000cfd0  25 e7 20 ac 20 77 25 28  36 2c 32 29 20 80 20 67  |%. . w%(6,2) . g|
0000cfe0  74 6f 6f 6c 24 3d 22 3e  22 20 f2 63 77 69 6e 28  |tool$=">" .cwin(|
0000cff0  36 29 0d 5b 86 10 21 6d  62 25 3d 77 25 28 35 2c  |6).[..!mb%=w%(5,|
0000d000  30 29 0d 5b 90 11 e7 20  ac 20 67 72 61 62 63 68  |0).[... . grabch|
0000d010  25 20 8c 0d 5b 9a 22 20  c8 99 20 22 57 69 6d 70  |% ..[." .. "Wimp|
0000d020  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
0000d030  2c 2c 6d 62 25 0d 5b a4  0e 20 6d 62 25 21 32 38  |,,mb%.[.. mb%!28|
0000d040  3d 2d 31 0d 5b ae 1e 20  c8 99 20 22 57 69 6d 70  |=-1.[.. .. "Wimp|
0000d050  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 6d 62  |_OpenWindow",,mb|
0000d060  25 0d 5b b8 05 cc 0d 5b  c2 20 20 6d 62 25 21 34  |%.[....[.  mb%!4|
0000d070  3d 72 69 67 68 74 73 63  72 25 2f 32 2d 67 72 61  |=rightscr%/2-gra|
0000d080  62 77 78 25 2f 32 0d 5b  cc 1e 20 6d 62 25 21 38  |bwx%/2.[.. mb%!8|
0000d090  3d 74 6f 70 73 63 72 25  2f 32 2d 67 72 61 62 77  |=topscr%/2-grabw|
0000d0a0  79 25 2f 32 0d 5b d6 21  20 6d 62 25 21 31 32 3d  |y%/2.[.! mb%!12=|
0000d0b0  72 69 67 68 74 73 63 72  25 2f 32 2b 67 72 61 62  |rightscr%/2+grab|
0000d0c0  77 78 25 2f 32 0d 5b e0  1f 20 6d 62 25 21 31 36  |wx%/2.[.. mb%!16|
0000d0d0  3d 74 6f 70 73 63 72 25  2f 32 2b 67 72 61 62 77  |=topscr%/2+grabw|
0000d0e0  79 25 2f 32 0d 5b ea 17  20 e7 20 6d 62 25 21 38  |y%/2.[.. . mb%!8|
0000d0f0  3c 30 20 6d 62 25 21 38  3d 38 34 0d 5b f4 0d 20  |<0 mb%!8=84.[.. |
0000d100  6d 62 25 21 32 30 3d 30  0d 5b fe 0d 20 6d 62 25  |mb%!20=0.[.. mb%|
0000d110  21 32 34 3d 30 0d 5c 08  0e 20 6d 62 25 21 32 38  |!24=0.\.. mb%!28|
0000d120  3d 2d 31 0d 5c 12 1e 20  c8 99 20 22 57 69 6d 70  |=-1.\.. .. "Wimp|
0000d130  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 6d 62  |_OpenWindow",,mb|
0000d140  25 0d 5c 1c 37 20 c8 99  20 22 57 69 6d 70 5f 46  |%.\.7 .. "Wimp_F|
0000d150  6f 72 63 65 52 65 64 72  61 77 22 2c 77 25 28 35  |orceRedraw",w%(5|
0000d160  2c 30 29 2c 30 2c 2d 67  72 61 62 77 79 25 2c 67  |,0),0,-grabwy%,g|
0000d170  72 61 62 77 78 25 2c 30  0d 5c 26 05 cd 0d 5c 30  |rabwx%,0.\&...\0|
0000d180  12 e7 20 67 74 6f 6f 6c  24 3d 22 3e 22 20 8c 0d  |.. gtool$=">" ..|
0000d190  5c 3a 11 20 21 6d 62 25  3d 77 25 28 36 2c 30 29  |\:. !mb%=w%(6,0)|
0000d1a0  0d 5c 44 0e 20 6d 62 25  21 34 2d 3d 38 38 0d 5c  |.\D. mb%!4-=88.\|
0000d1b0  4e 14 20 6d 62 25 21 31  32 3d 6d 62 25 21 34 2b  |N. mb%!12=mb%!4+|
0000d1c0  38 34 0d 5c 58 1e 20 c8  99 20 22 57 69 6d 70 5f  |84.\X. .. "Wimp_|
0000d1d0  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 6d 62 25  |OpenWindow",,mb%|
0000d1e0  0d 5c 62 05 cd 0d 5c 6c  05 e1 0d 5c 76 04 0d 5c  |.\b...\l...\v..\|
0000d1f0  80 14 dd 20 f2 64 65 6c  65 74 65 67 72 61 62 62  |... .deletegrabb|
0000d200  65 64 0d 5c 8a 11 e7 20  ac 20 67 72 61 62 65 78  |ed.\... . grabex|
0000d210  25 20 e1 0d 5c 94 0d 73  61 76 65 64 38 25 3d b9  |% ..\..saved8%=.|
0000d220  0d 5c 9e 0e 73 61 76 65  64 31 32 25 3d b9 0d 5c  |.\..saved12%=..\|
0000d230  a8 0c 63 66 73 69 64 25  3d a3 0d 5c b2 0c f2 64  |..cfsid%=..\...d|
0000d240  77 69 6e 28 35 29 0d 5c  bc 0d 21 67 72 61 62 77  |win(5).\..!grabw|
0000d250  62 3d 30 0d 5c c6 0c f2  64 77 69 6e 28 36 29 0d  |b=0.\...dwin(6).|
0000d260  5c d0 27 c8 99 20 22 57  69 6d 70 5f 53 6c 6f 74  |\.'.. "Wimp_Slot|
0000d270  53 69 7a 65 22 2c 6f 72  69 67 69 6e 61 6c 73 6c  |Size",originalsl|
0000d280  6f 74 25 2c 2d 31 0d 5c  da 0d 67 72 61 62 65 78  |ot%,-1.\..grabex|
0000d290  25 3d a3 0d 5c e4 1d f2  69 63 6f 6e 73 65 74 28  |%=..\...iconset(|
0000d2a0  34 2c 31 2c 31 3c 3c 32  32 2c 31 3c 3c 32 32 29  |4,1,1<<22,1<<22)|
0000d2b0  0d 5c ee 0e e7 20 73 6c  61 76 65 25 20 8c 0d 5c  |.\... slave% ..\|
0000d2c0  f8 2e 20 24 6d 62 25 3d  22 3c 46 61 73 74 47 72  |.. $mb%="<FastGr|
0000d2d0  61 62 24 44 69 72 3e 2e  52 65 73 6f 75 72 63 65  |ab$Dir>.Resource|
0000d2e0  73 2e 54 77 65 6c 76 65  42 69 74 22 0d 5d 02 20  |s.TwelveBit".]. |
0000d2f0  20 c8 99 20 22 4f 53 5f  46 53 43 6f 6e 74 72 6f  | .. "OS_FSContro|
0000d300  6c 22 2c 32 37 2c 6d 62  25 2c 2c 30 0d 5d 0c 0d  |l",27,mb%,,0.]..|
0000d310  20 73 6c 61 76 65 25 3d  a3 0d 5d 16 05 cd 0d 5d  | slave%=..]....]|
0000d320  20 05 e1 0d 5d 2a 04 0d  5d 34 3a dd 20 f2 70 61  | ...]*..]4:. .pa|
0000d330  6c 65 74 74 65 5f 66 6f  72 5f 73 70 72 69 74 65  |lette_for_sprite|
0000d340  28 73 70 72 69 74 65 5f  61 72 65 61 25 2c 73 70  |(sprite_area%,sp|
0000d350  72 69 74 65 5f 61 64 25  2c 70 61 6c 5f 61 64 25  |rite_ad%,pal_ad%|
0000d360  29 0d 5d 3e 0e ea 20 70  61 6c 74 65 6d 70 25 0d  |).]>.. paltemp%.|
0000d370  5d 48 13 de 20 70 61 6c  74 65 6d 70 25 20 32 30  |]H.. paltemp% 20|
0000d380  34 38 0d 5d 52 04 0d 5d  5c 64 c8 99 20 22 4f 53  |48.]R..]\d.. "OS|
0000d390  5f 53 70 72 69 74 65 4f  70 22 2c 26 32 32 38 2c  |_SpriteOp",&228,|
0000d3a0  73 70 72 69 74 65 5f 61  72 65 61 25 2c 73 70 72  |sprite_area%,spr|
0000d3b0  69 74 65 5f 61 64 25 20  b8 20 2c 2c 2c 73 70 72  |ite_ad% . ,,,spr|
0000d3c0  69 74 65 5f 78 25 2c 73  70 72 69 74 65 5f 79 25  |ite_x%,sprite_y%|
0000d3d0  2c 73 70 72 69 74 65 5f  6d 61 73 6b 25 2c 73 70  |,sprite_mask%,sp|
0000d3e0  72 69 74 65 5f 6d 6f 64  65 25 0d 5d 66 04 0d 5d  |rite_mode%.]f..]|
0000d3f0  70 16 c8 8e 20 73 70 72  69 74 65 5f 61 64 25 21  |p... sprite_ad%!|
0000d400  33 32 20 ca 0d 5d 7a 08  c9 20 34 34 0d 5d 84 2e  |32 ..]z.. 44.]..|
0000d410  20 f4 20 55 73 65 20 64  65 66 61 75 6c 74 20 70  | . Use default p|
0000d420  61 6c 65 74 74 65 20 66  6f 72 20 74 68 65 20 73  |alette for the s|
0000d430  63 72 65 65 6e 20 6d 6f  64 65 0d 5d 8e 3e 20 c8  |creen mode.].> .|
0000d440  99 20 22 43 6f 6c 6f 75  72 54 72 61 6e 73 5f 53  |. "ColourTrans_S|
0000d450  65 6c 65 63 74 54 61 62  6c 65 22 2c 73 70 72 69  |electTable",spri|
0000d460  74 65 5f 6d 6f 64 65 25  2c 30 2c 2d 31 2c 2d 31  |te_mode%,0,-1,-1|
0000d470  2c 70 61 6c 5f 61 64 25  0d 5d 98 0d c9 20 32 30  |,pal_ad%.]... 20|
0000d480  34 38 2b 34 34 0d 5d a2  21 20 f4 20 55 73 65 20  |48+44.].! . Use |
0000d490  32 35 36 20 67 72 65 79  20 6c 65 76 65 6c 20 70  |256 grey level p|
0000d4a0  61 6c 65 74 74 65 0d 5d  ac 1b 20 e3 20 67 72 61  |alette.].. . gra|
0000d4b0  62 25 3d 30 20 b8 20 32  30 34 38 2d 38 20 88 20  |b%=0 . 2048-8 . |
0000d4c0  38 0d 5d b6 2f 20 20 70  61 6c 74 65 6d 70 25 21  |8.]./  paltemp%!|
0000d4d0  28 67 72 61 62 25 3e 3e  31 29 3d 73 70 72 69 74  |(grab%>>1)=sprit|
0000d4e0  65 5f 61 64 25 21 28 67  72 61 62 25 2b 34 34 29  |e_ad%!(grab%+44)|
0000d4f0  0d 5d c0 06 20 ed 0d 5d  ca 11 20 e3 20 51 25 3d  |.].. ..].. . Q%=|
0000d500  30 20 b8 20 32 35 35 0d  5d d4 47 20 20 c8 99 20  |0 . 255.].G  .. |
0000d510  22 43 6f 6c 6f 75 72 54  72 61 6e 73 5f 52 65 74  |"ColourTrans_Ret|
0000d520  75 72 6e 43 6f 6c 6f 75  72 4e 75 6d 62 65 72 22  |urnColourNumber"|
0000d530  2c 70 61 6c 74 65 6d 70  25 21 28 51 25 3c 3c 32  |,paltemp%!(Q%<<2|
0000d540  29 20 b8 20 70 61 6c 5f  61 64 25 3f 51 25 0d 5d  |) . pal_ad%?Q%.]|
0000d550  de 06 20 ed 0d 5d e8 05  7f 0d 5d f2 1f 20 f4 20  |.. ..]....].. . |
0000d560  55 73 65 20 74 68 65 20  73 70 72 69 74 65 27 73  |Use the sprite's|
0000d570  20 70 61 6c 65 74 74 65  0d 5d fc 18 20 e3 20 67  | palette.].. . g|
0000d580  72 61 62 25 3d 30 20 b8  20 31 36 34 20 88 20 38  |rab%=0 . 164 . 8|
0000d590  0d 5e 06 2e 20 20 70 61  6c 74 65 6d 70 25 21 28  |.^..  paltemp%!(|
0000d5a0  67 72 61 62 25 2f 32 29  3d 73 70 72 69 74 65 5f  |grab%/2)=sprite_|
0000d5b0  61 64 25 21 28 67 72 61  62 25 2b 34 34 29 0d 5e  |ad%!(grab%+44).^|
0000d5c0  10 06 20 ed 0d 5e 1a 45  20 c8 99 20 22 43 6f 6c  |.. ..^.E .. "Col|
0000d5d0  6f 75 72 54 72 61 6e 73  5f 53 65 6c 65 63 74 54  |ourTrans_SelectT|
0000d5e0  61 62 6c 65 22 2c 73 70  72 69 74 65 5f 6d 6f 64  |able",sprite_mod|
0000d5f0  65 25 2c 70 61 6c 74 65  6d 70 25 2c 2d 31 2c 2d  |e%,paltemp%,-1,-|
0000d600  31 2c 70 61 6c 5f 61 64  25 0d 5e 24 05 cb 0d 5e  |1,pal_ad%.^$...^|
0000d610  2e 05 e1 0d 5e 38 04 0d  5e 42 18 dd 20 f2 6f 70  |....^8..^B.. .op|
0000d620  74 69 6d 69 73 65 5f 6c  69 76 65 70 6c 6f 74 0d  |timise_liveplot.|
0000d630  5e 4c 10 6c 69 76 65 70  6c 6f 74 25 3d 2d 31 0d  |^L.liveplot%=-1.|
0000d640  5e 56 10 e3 20 51 25 3d  30 20 b8 20 32 35 35 0d  |^V.. Q%=0 . 255.|
0000d650  5e 60 29 20 e7 20 6c 69  76 65 70 61 6c 25 3f 51  |^`) . livepal%?Q|
0000d660  25 3c 3e 51 25 20 6c 69  76 65 70 6c 6f 74 25 3d  |%<>Q% liveplot%=|
0000d670  6c 69 76 65 70 61 6c 25  0d 5e 6a 05 ed 0d 5e 74  |livepal%.^j...^t|
0000d680  17 6c 69 76 65 77 62 21  32 34 3d 6c 69 76 65 70  |.livewb!24=livep|
0000d690  6c 6f 74 25 0d 5e 7e 15  21 63 6f 6c 6d 61 70 3d  |lot%.^~.!colmap=|
0000d6a0  6c 69 76 65 70 6c 6f 74  25 0d 5e 88 05 e1 0d 5e  |liveplot%.^....^|
0000d6b0  92 04 0d 5e 9c 12 dd 20  f2 6d 6f 64 65 63 68 61  |...^... .modecha|
0000d6c0  6e 67 65 64 0d 5e a6 2f  ea 20 78 73 68 69 66 74  |nged.^./. xshift|
0000d6d0  25 2c 79 73 68 69 66 74  25 2c 73 70 74 72 25 2c  |%,yshift%,sptr%,|
0000d6e0  73 70 6d 64 25 2c 67 72  61 62 25 2c 70 61 6c 70  |spmd%,grab%,palp|
0000d6f0  74 72 25 0d 5e b0 0e 6f  6c 64 6d 6f 64 65 25 3d  |tr%.^..oldmode%=|
0000d700  eb 0d 5e ba 2d c8 99 20  22 4f 53 5f 52 65 61 64  |..^.-.. "OS_Read|
0000d710  4d 6f 64 65 56 61 72 69  61 62 6c 65 22 2c 2d 31  |ModeVariable",-1|
0000d720  2c 34 20 b8 20 2c 2c 78  73 68 69 66 74 25 0d 5e  |,4 . ,,xshift%.^|
0000d730  c4 2d c8 99 20 22 4f 53  5f 52 65 61 64 4d 6f 64  |.-.. "OS_ReadMod|
0000d740  65 56 61 72 69 61 62 6c  65 22 2c 2d 31 2c 35 20  |eVariable",-1,5 |
0000d750  b8 20 2c 2c 79 73 68 69  66 74 25 0d 5e ce 30 c8  |. ,,yshift%.^.0.|
0000d760  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
0000d770  72 69 61 62 6c 65 22 2c  2d 31 2c 31 31 20 b8 20  |riable",-1,11 . |
0000d780  2c 2c 72 69 67 68 74 73  63 72 25 0d 5e d8 2e c8  |,,rightscr%.^...|
0000d790  99 20 22 4f 53 5f 52 65  61 64 4d 6f 64 65 56 61  |. "OS_ReadModeVa|
0000d7a0  72 69 61 62 6c 65 22 2c  2d 31 2c 31 32 20 b8 20  |riable",-1,12 . |
0000d7b0  2c 2c 74 6f 70 73 63 72  25 0d 5e e2 20 72 69 67  |,,topscr%.^. rig|
0000d7c0  68 74 73 63 72 25 3d 72  69 67 68 74 73 63 72 25  |htscr%=rightscr%|
0000d7d0  3c 3c 78 73 68 69 66 74  25 0d 5e ec 1c 74 6f 70  |<<xshift%.^..top|
0000d7e0  73 63 72 25 3d 74 6f 70  73 63 72 25 3c 3c 79 73  |scr%=topscr%<<ys|
0000d7f0  68 69 66 74 25 0d 5e f6  45 c8 99 20 22 57 69 6d  |hift%.^.E.. "Wim|
0000d800  70 5f 52 65 61 64 50 69  78 54 72 61 6e 73 22 2c  |p_ReadPixTrans",|
0000d810  26 32 30 30 2c 6c 69 76  65 61 72 65 61 25 2c 6c  |&200,livearea%,l|
0000d820  69 76 65 61 72 65 61 25  2b 31 36 2c 2c 2c 2c 6c  |ivearea%+16,,,,l|
0000d830  69 76 65 6d 61 67 2c 6d  62 25 0d 5f 00 0f e7 20  |ivemag,mb%._... |
0000d840  77 25 28 35 2c 32 29 20  8c 0d 5f 0a 3a 20 20 f2  |w%(5,2) .._.:  .|
0000d850  70 61 6c 65 74 74 65 5f  66 6f 72 5f 73 70 72 69  |palette_for_spri|
0000d860  74 65 28 67 72 61 62 61  72 65 61 25 2c 67 72 61  |te(grabarea%,gra|
0000d870  62 61 72 65 61 25 2b 31  36 2c 67 72 61 62 70 61  |barea%+16,grabpa|
0000d880  6c 25 29 0d 5f 14 11 20  21 6d 62 25 3d 77 25 28  |l%)._.. !mb%=w%(|
0000d890  35 2c 30 29 0d 5f 1e 22  20 c8 99 20 22 57 69 6d  |5,0)._." .. "Wim|
0000d8a0  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
0000d8b0  22 2c 2c 6d 62 25 0d 5f  28 17 20 e7 20 6d 62 25  |",,mb%._(. . mb%|
0000d8c0  21 33 32 20 80 20 31 3c  3c 31 36 20 8c 0d 5f 32  |!32 . 1<<16 .._2|
0000d8d0  1b 20 20 67 72 61 62 77  78 25 3d 67 70 78 25 3c  |.  grabwx%=gpx%<|
0000d8e0  3c 78 73 68 69 66 74 25  0d 5f 3c 1b 20 20 67 72  |<xshift%._<.  gr|
0000d8f0  61 62 77 79 25 3d 67 70  79 25 3c 3c 79 73 68 69  |abwy%=gpy%<<yshi|
0000d900  66 74 25 0d 5f 46 15 20  20 f2 6d 61 67 73 74 72  |ft%._F.  .magstr|
0000d910  69 6e 67 28 30 2c 30 29  0d 5f 50 06 20 cd 0d 5f  |ing(0,0)._P. .._|
0000d920  5a 05 cd 0d 5f 64 38 f2  70 61 6c 65 74 74 65 5f  |Z..._d8.palette_|
0000d930  66 6f 72 5f 73 70 72 69  74 65 28 6c 69 76 65 61  |for_sprite(livea|
0000d940  72 65 61 25 2c 6c 69 76  65 61 72 65 61 25 2b 31  |rea%,livearea%+1|
0000d950  36 2c 6c 69 76 65 70 61  6c 25 29 0d 5f 6e 16 f2  |6,livepal%)._n..|
0000d960  6f 70 74 69 6d 69 73 65  5f 6c 69 76 65 70 6c 6f  |optimise_liveplo|
0000d970  74 0d 5f 78 05 e1 0d 5f  82 04 0d 5f 8c 13 dd 20  |t._x..._..._... |
0000d980  f2 75 70 64 61 74 65 73  70 72 69 74 65 0d 5f 96  |.updatesprite._.|
0000d990  0f e7 20 77 25 28 33 2c  32 29 20 8c 0d 5f a0 11  |.. w%(3,2) .._..|
0000d9a0  20 21 6d 62 25 3d 77 25  28 33 2c 30 29 0d 5f aa  | !mb%=w%(3,0)._.|
0000d9b0  28 20 c8 99 20 22 57 69  6d 70 5f 55 70 64 61 74  |( .. "Wimp_Updat|
0000d9c0  65 57 69 6e 64 6f 77 22  2c 2c 6d 62 25 20 b8 20  |eWindow",,mb% . |
0000d9d0  6d 6f 72 65 25 0d 5f b4  15 20 78 30 25 3d 6d 62  |more%._.. x0%=mb|
0000d9e0  25 21 34 2d 6d 62 25 21  32 30 0d 5f be 16 20 79  |%!4-mb%!20._.. y|
0000d9f0  30 25 3d 6d 62 25 21 31  36 2d 6d 62 25 21 32 34  |0%=mb%!16-mb%!24|
0000da00  0d 5f c8 0d 20 c8 95 20  6d 6f 72 65 25 0d 5f d2  |._.. .. more%._.|
0000da10  4b 20 20 c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |K  .. "OS_Sprite|
0000da20  4f 70 22 2c 26 31 33 34  2c 6c 69 76 65 61 72 65  |Op",&134,liveare|
0000da30  61 25 2c 6c 69 76 65 6e  61 6d 65 24 2c 78 30 25  |a%,livename$,x0%|
0000da40  2c 79 30 25 2d 6c 69 76  65 79 25 2c 38 2c 30 2c  |,y0%-livey%,8,0,|
0000da50  6c 69 76 65 70 61 6c 25  0d 5f dc 29 20 20 c8 99  |livepal%._.)  ..|
0000da60  20 22 57 69 6d 70 5f 47  65 74 52 65 63 74 61 6e  | "Wimp_GetRectan|
0000da70  67 6c 65 22 2c 2c 6d 62  25 20 b8 20 6d 6f 72 65  |gle",,mb% . more|
0000da80  25 0d 5f e6 06 20 ce 0d  5f f0 05 cd 0d 5f fa 05  |%._.. .._...._..|
0000da90  e1 0d 60 04 04 0d 60 0e  0f dd 20 f2 73 65 6e 64  |..`...`... .send|
0000daa0  68 65 6c 70 0d 60 18 2c  68 24 3d 22 54 68 69 73  |help.`.,h$="This|
0000dab0  20 77 69 6e 64 6f 77 20  62 65 6c 6f 6e 67 73 20  | window belongs |
0000dac0  74 6f 20 46 61 73 74 47  72 61 62 2e 22 2b bd 30  |to FastGrab."+.0|
0000dad0  0d 60 22 0f c8 8e 20 70  62 25 21 33 32 20 ca 0d  |.`"... pb%!32 ..|
0000dae0  60 2c 08 c9 20 2d 32 0d  60 36 b8 68 24 3d 22 54  |`,.. -2.`6.h$="T|
0000daf0  68 69 73 20 69 73 20 74  68 65 20 46 61 73 74 47  |his is the FastG|
0000db00  72 61 62 20 69 63 6f 6e  2e 7c 4d 43 6c 69 63 6b  |rab icon.|MClick|
0000db10  20 53 45 4c 45 43 54 20  74 6f 20 73 65 65 20 74  | SELECT to see t|
0000db20  68 65 20 6c 69 76 65 20  6f 75 74 70 75 74 20 66  |he live output f|
0000db30  72 6f 6d 20 74 68 65 20  48 61 77 6b 20 56 39 20  |rom the Hawk V9 |
0000db40  43 6f 6c 6f 75 72 20 64  69 67 69 74 69 73 65 72  |Colour digitiser|
0000db50  2e 7c 4d 44 72 61 67 20  61 20 74 77 65 6c 76 65  |.|MDrag a twelve|
0000db60  20 62 69 74 20 69 6d 61  67 65 20 66 69 6c 65 20  | bit image file |
0000db70  6f 6e 74 6f 20 69 74 20  74 6f 20 70 72 6f 63 65  |onto it to proce|
0000db80  73 73 20 74 68 65 20 69  6d 61 67 65 20 61 6e 64  |ss the image and|
0000db90  20 64 69 73 70 6c 61 79  20 69 74 2e 7c 4d 22 0d  | display it.|M".|
0000dba0  60 40 0f e7 20 77 25 28  33 2c 32 29 20 8c 0d 60  |`@.. w%(3,2) ..`|
0000dbb0  4a 64 e7 20 21 73 69 67  6e 61 6c 70 72 65 73 65  |Jd. !signalprese|
0000dbc0  6e 74 20 68 24 2b 3d 22  54 68 65 20 6c 69 76 65  |nt h$+="The live|
0000dbd0  20 64 69 73 70 6c 61 79  20 69 73 20 77 6f 72 6b  | display is work|
0000dbe0  69 6e 67 2e 22 20 8b 20  68 24 2b 3d 22 54 68 65  |ing." . h$+="The|
0000dbf0  72 65 20 69 73 20 6e 6f  20 76 69 64 65 6f 20 73  |re is no video s|
0000dc00  69 67 6e 61 6c 20 61 74  20 70 72 65 73 65 6e 74  |ignal at present|
0000dc10  2e 22 0d 60 54 05 cc 0d  60 5e 2a 68 24 2b 3d 22  |.".`T...`^*h$+="|
0000dc20  54 68 65 20 6c 69 76 65  20 64 69 73 70 6c 61 79  |The live display|
0000dc30  20 69 73 20 6e 6f 77 20  64 6f 72 6d 61 6e 74 2e  | is now dormant.|
0000dc40  22 0d 60 68 05 cd 0d 60  72 0d c9 20 77 25 28 32  |".`h...`r.. w%(2|
0000dc50  2c 30 29 0d 60 7c 0f c8  8e 20 70 62 25 21 33 36  |,0).`|... pb%!36|
0000dc60  20 ca 0d 60 86 55 c9 20  34 3a 68 24 3d 22 54 68  | ..`.U. 4:h$="Th|
0000dc70  69 73 20 73 6c 69 64 65  72 20 62 61 72 20 63 6f  |is slider bar co|
0000dc80  6e 74 72 6f 6c 73 20 74  68 65 20 62 72 69 67 68  |ntrols the brigh|
0000dc90  74 6e 65 73 73 20 6f 66  20 74 68 65 20 70 69 63  |tness of the pic|
0000dca0  74 75 72 65 20 66 72 6f  6d 20 74 68 65 20 48 61  |ture from the Ha|
0000dcb0  77 6b 20 56 39 2e 22 0d  60 90 53 c9 20 39 3a 68  |wk V9.".`.S. 9:h|
0000dcc0  24 3d 22 54 68 69 73 20  73 6c 69 64 65 72 20 62  |$="This slider b|
0000dcd0  61 72 20 63 6f 6e 74 72  6f 6c 73 20 74 68 65 20  |ar controls the |
0000dce0  63 6f 6e 74 72 61 73 74  20 6f 66 20 74 68 65 20  |contrast of the |
0000dcf0  70 69 63 74 75 72 65 20  66 72 6f 6d 20 74 68 65  |picture from the|
0000dd00  20 48 61 77 6b 20 56 39  2e 22 0d 60 9a 56 c9 20  | Hawk V9.".`.V. |
0000dd10  31 34 3a 68 24 3d 22 54  68 69 73 20 73 6c 69 64  |14:h$="This slid|
0000dd20  65 72 20 62 61 72 20 63  6f 6e 74 72 6f 6c 73 20  |er bar controls |
0000dd30  74 68 65 20 73 61 74 75  72 61 74 69 6f 6e 20 6f  |the saturation o|
0000dd40  66 20 74 68 65 20 70 69  63 74 75 72 65 20 66 72  |f the picture fr|
0000dd50  6f 6d 20 74 68 65 20 48  61 77 6b 20 56 39 2e 22  |om the Hawk V9."|
0000dd60  0d 60 a4 13 c9 20 31 2c  32 2c 36 2c 37 2c 31 31  |.`... 1,2,6,7,11|
0000dd70  2c 31 32 0d 60 ae 0f c8  8e 20 70 62 25 21 33 36  |,12.`.... pb%!36|
0000dd80  20 ca 0d 60 b8 29 c9 20  31 3a 62 61 72 24 3d 22  | ..`.). 1:bar$="|
0000dd90  62 72 69 67 68 74 6e 65  73 73 22 3a 61 63 74 24  |brightness":act$|
0000dda0  3d 22 69 6e 63 72 65 61  73 65 22 0d 60 c2 29 c9  |="increase".`.).|
0000ddb0  20 32 3a 62 61 72 24 3d  22 62 72 69 67 68 74 6e  | 2:bar$="brightn|
0000ddc0  65 73 73 22 3a 61 63 74  24 3d 22 64 65 63 72 65  |ess":act$="decre|
0000ddd0  61 73 65 22 0d 60 cc 27  c9 20 36 3a 62 61 72 24  |ase".`.'. 6:bar$|
0000dde0  3d 22 63 6f 6e 74 72 61  73 74 22 3a 61 63 74 24  |="contrast":act$|
0000ddf0  3d 22 69 6e 63 72 65 61  73 65 22 0d 60 d6 27 c9  |="increase".`.'.|
0000de00  20 37 3a 62 61 72 24 3d  22 63 6f 6e 74 72 61 73  | 7:bar$="contras|
0000de10  74 22 3a 61 63 74 24 3d  22 64 65 63 72 65 61 73  |t":act$="decreas|
0000de20  65 22 0d 60 e0 2a c9 20  31 31 3a 62 61 72 24 3d  |e".`.*. 11:bar$=|
0000de30  22 73 61 74 75 72 61 74  69 6f 6e 22 3a 61 63 74  |"saturation":act|
0000de40  24 3d 22 69 6e 63 72 65  61 73 65 22 0d 60 ea 2a  |$="increase".`.*|
0000de50  c9 20 31 32 3a 62 61 72  24 3d 22 73 61 74 75 72  |. 12:bar$="satur|
0000de60  61 74 69 6f 6e 22 3a 61  63 74 24 3d 22 64 65 63  |ation":act$="dec|
0000de70  72 65 61 73 65 22 0d 60  f4 05 cb 0d 60 fe 90 68  |rease".`....`..h|
0000de80  24 3d 22 43 6c 69 63 6b  20 6f 6e 20 74 68 69 73  |$="Click on this|
0000de90  20 69 63 6f 6e 20 74 6f  20 22 2b 61 63 74 24 2b  | icon to "+act$+|
0000dea0  22 20 74 68 65 20 22 2b  62 61 72 24 2b 22 20 6f  |" the "+bar$+" o|
0000deb0  66 20 74 68 65 20 70 69  63 74 75 72 65 20 66 72  |f the picture fr|
0000dec0  6f 6d 20 74 68 65 20 48  61 77 6b 20 56 39 2e 7c  |om the Hawk V9.||
0000ded0  4d 43 6c 69 63 6b 69 6e  67 20 6f 6e 20 69 74 20  |MClicking on it |
0000dee0  77 69 74 68 20 61 64 6a  75 73 74 20 77 69 6c 6c  |with adjust will|
0000def0  20 68 61 76 65 20 74 68  65 20 6f 70 70 6f 73 69  | have the opposi|
0000df00  74 65 20 65 66 66 65 63  74 2e 22 0d 61 08 51 c9  |te effect.".a.Q.|
0000df10  20 30 3a 68 24 3d 22 43  6c 69 63 6b 20 6f 6e 20  | 0:h$="Click on |
0000df20  74 68 69 73 20 69 63 6f  6e 20 74 6f 20 72 65 73  |this icon to res|
0000df30  65 74 20 74 68 65 20 50  41 4c 20 64 65 63 6f 64  |et the PAL decod|
0000df40  65 72 20 74 6f 20 69 74  73 20 64 65 66 61 75 6c  |er to its defaul|
0000df50  74 20 73 65 74 74 69 6e  67 73 2e 22 0d 61 12 58  |t settings.".a.X|
0000df60  c9 20 31 36 3a 68 24 3d  22 43 6c 69 63 6b 20 6f  |. 16:h$="Click o|
0000df70  6e 20 74 68 69 73 20 69  63 6f 6e 20 74 6f 20 72  |n this icon to r|
0000df80  65 73 65 74 20 74 68 65  20 50 41 4c 20 64 65 63  |eset the PAL dec|
0000df90  6f 64 65 72 20 74 6f 20  74 68 65 20 73 65 74 74  |oder to the sett|
0000dfa0  69 6e 67 73 20 73 61 76  65 64 20 6f 6e 20 64 69  |ings saved on di|
0000dfb0  73 63 2e 22 0d 61 1c 6f  7f 20 68 24 3d 22 54 68  |sc.".a.o. h$="Th|
0000dfc0  69 73 20 77 69 6e 64 6f  77 20 63 6f 6e 74 72 6f  |is window contro|
0000dfd0  6c 73 20 74 68 65 20 50  41 4c 20 64 65 63 6f 64  |ls the PAL decod|
0000dfe0  65 72 2c 20 77 68 69 63  68 20 61 64 6a 75 73 74  |er, which adjust|
0000dff0  73 20 74 68 65 20 76 69  64 65 6f 20 69 6d 61 67  |s the video imag|
0000e000  65 20 72 65 63 65 69 76  65 64 20 66 72 6f 6d 20  |e received from |
0000e010  74 68 65 20 48 61 77 6b  20 56 39 20 62 6f 61 72  |the Hawk V9 boar|
0000e020  64 2e 22 0d 61 26 05 cb  0d 61 30 0d c9 20 77 25  |d.".a&...a0.. w%|
0000e030  28 33 2c 30 29 0d 61 3a  4e 68 24 3d 22 54 68 69  |(3,0).a:Nh$="Thi|
0000e040  73 20 77 69 6e 64 6f 77  20 73 68 6f 77 73 20 74  |s window shows t|
0000e050  68 65 20 6c 69 76 65 20  64 69 73 70 6c 61 79 20  |he live display |
0000e060  66 72 6f 6d 20 74 68 65  20 48 61 77 6b 20 56 39  |from the Hawk V9|
0000e070  20 43 6f 6c 6f 75 72 20  44 69 67 69 74 69 73 65  | Colour Digitise|
0000e080  72 2e 22 0d 61 44 5e e7  20 21 73 69 67 6e 61 6c  |r.".aD^. !signal|
0000e090  70 72 65 73 65 6e 74 3d  30 20 68 24 2b 3d 22 7c  |present=0 h$+="||
0000e0a0  4d 41 74 20 74 68 65 20  6d 6f 6d 65 6e 74 20 74  |MAt the moment t|
0000e0b0  68 65 72 65 20 69 73 20  6e 6f 20 76 69 64 65 6f  |here is no video|
0000e0c0  20 73 69 67 6e 61 6c 2c  20 73 6f 20 74 68 65 20  | signal, so the |
0000e0d0  69 6d 61 67 65 20 69 73  20 73 74 61 74 69 63 2e  |image is static.|
0000e0e0  22 0d 61 4e 0d c9 20 77  25 28 34 2c 30 29 0d 61  |".aN.. w%(4,0).a|
0000e0f0  58 0f c8 8e 20 70 62 25  21 33 36 20 ca 0d 61 62  |X... pb%!36 ..ab|
0000e100  58 c9 20 30 3a 68 24 3d  22 43 6c 69 63 6b 20 6f  |X. 0:h$="Click o|
0000e110  6e 20 74 68 65 20 63 61  6d 65 72 61 20 69 63 6f  |n the camera ico|
0000e120  6e 20 74 6f 20 67 72 61  62 20 61 20 66 72 61 6d  |n to grab a fram|
0000e130  65 20 66 72 6f 6d 20 74  68 65 20 48 61 77 6b 20  |e from the Hawk |
0000e140  56 39 20 43 6f 6c 6f 75  72 20 44 69 67 69 74 69  |V9 Colour Digiti|
0000e150  73 65 72 2e 22 0d 61 6c  3b c9 20 31 3a 68 24 3d  |ser.".al;. 1:h$=|
0000e160  22 43 6c 69 63 6b 20 6f  6e 20 74 68 65 20 65 79  |"Click on the ey|
0000e170  65 2d 63 6f 6e 20 74 6f  20 76 69 65 77 20 74 68  |e-con to view th|
0000e180  65 20 73 74 6f 72 65 64  20 66 72 61 6d 65 2e 22  |e stored frame."|
0000e190  0d 61 76 3a c9 20 32 3a  68 24 3d 22 43 6c 69 63  |.av:. 2:h$="Clic|
0000e1a0  6b 20 6f 6e 20 74 68 69  73 20 69 63 6f 6e 20 74  |k on this icon t|
0000e1b0  6f 20 61 64 6a 75 73 74  20 74 68 65 20 50 41 4c  |o adjust the PAL|
0000e1c0  20 64 65 63 6f 64 65 72  2e 22 0d 61 80 07 c9 20  | decoder.".a... |
0000e1d0  33 0d 61 8a 19 20 e7 20  62 6f 61 72 64 5f 69 73  |3.a.. . board_is|
0000e1e0  5f 31 36 5f 62 69 74 25  20 8c 0d 61 94 6f 20 20  |_16_bit% ..a.o  |
0000e1f0  68 24 3d 22 43 6c 69 63  6b 20 6f 6e 20 74 68 69  |h$="Click on thi|
0000e200  73 20 69 63 6f 6e 20 74  6f 20 74 6f 67 67 6c 65  |s icon to toggle|
0000e210  20 62 65 74 77 65 65 6e  20 73 74 6f 72 69 6e 67  | between storing|
0000e220  20 62 6f 74 68 20 31 36  20 62 69 74 20 64 61 74  | both 16 bit dat|
0000e230  61 20 61 6e 64 20 38 20  62 69 74 20 64 61 74 61  |a and 8 bit data|
0000e240  20 6f 72 20 6a 75 73 74  20 65 69 67 68 74 20 62  | or just eight b|
0000e250  69 74 20 64 61 74 61 2e  22 0d 61 9e 06 20 cc 0d  |it data.".a.. ..|
0000e260  61 a8 6f 20 20 68 24 3d  22 43 6c 69 63 6b 20 6f  |a.o  h$="Click o|
0000e270  6e 20 74 68 69 73 20 69  63 6f 6e 20 74 6f 20 74  |n this icon to t|
0000e280  6f 67 67 6c 65 20 62 65  74 77 65 65 6e 20 73 74  |oggle between st|
0000e290  6f 72 69 6e 67 20 62 6f  74 68 20 31 32 20 62 69  |oring both 12 bi|
0000e2a0  74 20 64 61 74 61 20 61  6e 64 20 38 20 62 69 74  |t data and 8 bit|
0000e2b0  20 64 61 74 61 20 6f 72  20 6a 75 73 74 20 65 69  | data or just ei|
0000e2c0  67 68 74 20 62 69 74 20  64 61 74 61 2e 22 0d 61  |ght bit data.".a|
0000e2d0  b2 06 20 cd 0d 61 bc 53  c9 20 34 3a 68 24 3d 22  |.. ..a.S. 4:h$="|
0000e2e0  43 6c 69 63 6b 20 6f 6e  20 74 68 69 73 20 69 63  |Click on this ic|
0000e2f0  6f 6e 20 74 6f 20 74 6f  67 67 6c 65 20 62 65 74  |on to toggle bet|
0000e300  77 65 65 6e 20 64 69 74  68 65 72 65 64 20 61 6e  |ween dithered an|
0000e310  64 20 6e 6f 6e 2d 64 69  74 68 65 72 65 64 20 69  |d non-dithered i|
0000e320  6d 61 67 65 73 2e 22 0d  61 c6 05 cb 0d 61 d0 0d  |mages.".a....a..|
0000e330  c9 20 77 25 28 35 2c 30  29 0d 61 da 5b 68 24 3d  |. w%(5,0).a.[h$=|
0000e340  22 54 68 69 73 20 77 69  6e 64 6f 77 20 73 68 6f  |"This window sho|
0000e350  77 73 20 61 20 66 72 61  6d 65 20 77 68 69 63 68  |ws a frame which|
0000e360  20 68 61 73 20 62 65 65  6e 20 63 61 70 74 75 72  | has been captur|
0000e370  65 64 20 62 79 20 74 68  65 20 48 61 77 6b 20 56  |ed by the Hawk V|
0000e380  39 20 43 6f 6c 6f 75 72  20 44 69 67 69 74 69 73  |9 Colour Digitis|
0000e390  65 72 2e 22 0d 61 e4 0d  c9 20 77 25 28 36 2c 30  |er.".a... w%(6,0|
0000e3a0  29 0d 61 ee 0f c8 8e 20  70 62 25 21 33 36 20 ca  |).a.... pb%!36 .|
0000e3b0  0d 61 f8 ac c9 20 30 3a  68 24 3d 22 43 6c 69 63  |.a... 0:h$="Clic|
0000e3c0  6b 20 6f 6e 20 74 68 69  73 20 69 63 6f 6e 20 74  |k on this icon t|
0000e3d0  6f 20 70 72 6f 63 65 73  73 20 74 68 65 20 69 6d  |o process the im|
0000e3e0  61 67 65 20 75 73 69 6e  67 20 74 68 65 20 43 68  |age using the Ch|
0000e3f0  61 6e 67 65 46 53 49 20  72 6f 75 74 69 6e 65 2e  |angeFSI routine.|
0000e400  7c 4d 43 68 61 6e 67 65  46 53 49 20 69 73 20 69  ||MChangeFSI is i|
0000e410  6e 63 6c 75 64 65 64 20  62 79 20 63 6f 75 72 74  |ncluded by court|
0000e420  65 73 79 20 6f 66 20 69  74 73 20 61 75 74 68 6f  |esy of its autho|
0000e430  72 2c 20 52 6f 67 65 72  20 57 69 6c 73 6f 6e 20  |r, Roger Wilson |
0000e440  6f 66 20 41 63 6f 72 6e  20 43 6f 6d 70 75 74 65  |of Acorn Compute|
0000e450  72 73 20 4c 69 6d 69 74  65 64 2e 22 0d 62 02 dc  |rs Limited.".b..|
0000e460  c9 20 31 3a 68 24 3d 22  43 6c 69 63 6b 20 6f 6e  |. 1:h$="Click on|
0000e470  20 74 68 69 73 20 69 63  6f 6e 20 74 6f 20 61 64  | this icon to ad|
0000e480  6a 75 73 74 20 74 68 65  20 73 63 61 6c 65 20 66  |just the scale f|
0000e490  61 63 74 6f 72 73 20 66  6f 72 20 74 68 65 20 69  |actors for the i|
0000e4a0  6d 61 67 65 2e 7c 4d 54  68 69 73 20 73 68 6f 77  |mage.|MThis show|
0000e4b0  73 20 77 68 61 74 20 77  69 6c 6c 20 68 61 70 70  |s what will happ|
0000e4c0  65 6e 20 69 66 20 53 70  72 69 74 65 45 78 74 65  |en if SpriteExte|
0000e4d0  6e 64 20 69 73 20 75 73  65 64 20 66 6f 72 20 73  |nd is used for s|
0000e4e0  63 61 6c 69 6e 67 2e 7c  4d 54 68 65 20 43 68 61  |caling.|MThe Cha|
0000e4f0  6e 67 65 46 53 49 20 72  6f 75 74 69 6e 65 20 70  |ngeFSI routine p|
0000e500  72 6f 64 75 63 65 73 20  6d 75 63 68 20 62 65 74  |roduces much bet|
0000e510  74 65 72 20 73 63 61 6c  69 6e 67 2c 20 62 75 74  |ter scaling, but|
0000e520  20 69 74 20 69 73 20 61  20 6c 69 74 74 6c 65 20  | it is a little |
0000e530  73 6c 6f 77 65 72 2e 22  0d 62 0c 43 c9 20 32 3a  |slower.".b.C. 2:|
0000e540  68 24 3d 22 43 6c 69 63  6b 20 6f 6e 20 74 68 69  |h$="Click on thi|
0000e550  73 20 69 63 6f 6e 20 74  6f 20 73 61 76 65 20 74  |s icon to save t|
0000e560  68 65 20 69 6d 61 67 65  20 61 73 20 61 20 53 70  |he image as a Sp|
0000e570  72 69 74 65 20 66 69 6c  65 2e 22 0d 62 16 07 c9  |rite file.".b...|
0000e580  20 33 0d 62 20 19 20 e7  20 62 6f 61 72 64 5f 69  | 3.b . . board_i|
0000e590  73 5f 31 36 5f 62 69 74  25 20 8c 0d 62 2a 57 20  |s_16_bit% ..b*W |
0000e5a0  20 68 24 3d 22 43 6c 69  63 6b 20 6f 6e 20 74 68  | h$="Click on th|
0000e5b0  69 73 20 69 63 6f 6e 20  74 6f 20 73 61 76 65 20  |is icon to save |
0000e5c0  74 68 65 20 69 6d 61 67  65 20 61 73 20 61 20 44  |the image as a D|
0000e5d0  61 74 61 20 66 69 6c 65  2c 20 69 6e 20 31 36 2d  |ata file, in 16-|
0000e5e0  62 69 74 20 76 69 64 65  6f 20 66 6f 72 6d 61 74  |bit video format|
0000e5f0  2e 22 0d 62 34 06 20 cc  0d 62 3e 57 20 20 68 24  |.".b4. ..b>W  h$|
0000e600  3d 22 43 6c 69 63 6b 20  6f 6e 20 74 68 69 73 20  |="Click on this |
0000e610  69 63 6f 6e 20 74 6f 20  73 61 76 65 20 74 68 65  |icon to save the|
0000e620  20 69 6d 61 67 65 20 61  73 20 61 20 44 61 74 61  | image as a Data|
0000e630  20 66 69 6c 65 2c 20 69  6e 20 31 32 2d 62 69 74  | file, in 12-bit|
0000e640  20 76 69 64 65 6f 20 66  6f 72 6d 61 74 2e 22 0d  | video format.".|
0000e650  62 48 06 20 cd 0d 62 52  05 cb 0d 62 5c 0d c9 20  |bH. ..bR...b\.. |
0000e660  77 25 28 39 2c 30 29 0d  62 66 0f c8 8e 20 70 62  |w%(9,0).bf... pb|
0000e670  25 21 33 36 20 ca 0d 62  70 c1 c9 20 2d 31 3a 68  |%!36 ..bp.. -1:h|
0000e680  24 3d 22 54 68 69 73 20  69 73 20 74 68 65 20 5a  |$="This is the Z|
0000e690  6f 6f 6d 20 77 69 6e 64  6f 77 2e 7c 4d 49 74 20  |oom window.|MIt |
0000e6a0  61 6c 6c 6f 77 73 20 79  6f 75 20 74 6f 20 61 64  |allows you to ad|
0000e6b0  6a 75 73 74 20 74 68 65  20 73 69 7a 65 20 6f 66  |just the size of|
0000e6c0  20 74 68 65 20 64 69 73  70 6c 61 79 20 75 73 69  | the display usi|
0000e6d0  6e 67 20 74 68 65 20 53  70 72 69 74 65 45 78 74  |ng the SpriteExt|
0000e6e0  65 6e 64 20 73 63 61 6c  69 6e 67 20 72 6f 75 74  |end scaling rout|
0000e6f0  69 6e 65 73 2e 7c 4d 55  73 69 6e 67 20 43 68 61  |ines.|MUsing Cha|
0000e700  6e 67 65 46 53 49 20 67  69 76 65 73 20 62 65 74  |ngeFSI gives bet|
0000e710  74 65 72 20 72 65 73 75  6c 74 73 20 62 75 74 20  |ter results but |
0000e720  69 74 20 69 73 20 61 20  6c 69 74 74 6c 65 20 73  |it is a little s|
0000e730  6c 6f 77 65 72 2e 22 0d  62 7a 7c c9 20 30 3a 68  |lower.".bz|. 0:h|
0000e740  24 3d 22 54 68 69 73 20  6e 75 6d 62 65 72 20 69  |$="This number i|
0000e750  73 20 74 68 65 20 73 63  61 6c 69 6e 67 20 6d 75  |s the scaling mu|
0000e760  6c 74 69 70 6c 69 65 72  2e 7c 4d 59 6f 75 20 63  |ltiplier.|MYou c|
0000e770  61 6e 20 65 69 74 68 65  72 20 74 79 70 65 20 61  |an either type a|
0000e780  20 6e 75 6d 62 65 72 20  69 6e 2c 20 6f 72 20 75  | number in, or u|
0000e790  73 65 20 74 68 65 20 61  72 72 6f 77 20 69 63 6f  |se the arrow ico|
0000e7a0  6e 73 20 74 6f 20 61 64  6a 75 73 74 20 69 74 2e  |ns to adjust it.|
0000e7b0  7c 4d 22 0d 62 84 77 c9  20 31 3a 68 24 3d 22 54  ||M".b.w. 1:h$="T|
0000e7c0  68 69 73 20 6e 75 6d 62  65 72 20 69 73 20 74 68  |his number is th|
0000e7d0  65 20 73 63 61 6c 69 6e  67 20 64 69 76 69 73 6f  |e scaling diviso|
0000e7e0  72 2e 7c 4d 59 6f 75 20  63 61 6e 20 65 69 74 68  |r.|MYou can eith|
0000e7f0  65 72 20 74 79 70 65 20  61 20 6e 75 6d 62 65 72  |er type a number|
0000e800  20 69 6e 2c 20 6f 72 20  75 73 65 20 74 68 65 20  | in, or use the |
0000e810  61 72 72 6f 77 20 69 63  6f 6e 73 20 74 6f 20 61  |arrow icons to a|
0000e820  64 6a 75 73 74 20 69 74  2e 22 0d 62 8e 6f c9 20  |djust it.".b.o. |
0000e830  32 3a 68 24 3d 22 43 6c  69 63 6b 20 6f 6e 20 74  |2:h$="Click on t|
0000e840  68 69 73 20 69 63 6f 6e  20 74 6f 20 69 6e 63 72  |his icon to incr|
0000e850  65 61 73 65 20 74 68 65  20 73 63 61 6c 69 6e 67  |ease the scaling|
0000e860  20 6d 75 6c 74 69 70 6c  69 65 72 2e 7c 4d 41 64  | multiplier.|MAd|
0000e870  6a 75 73 74 2d 63 6c 69  63 6b 20 6f 6e 20 69 74  |just-click on it|
0000e880  20 74 68 65 20 64 65 63  72 65 61 73 65 20 74 68  | the decrease th|
0000e890  65 20 76 61 6c 75 65 2e  22 0d 62 98 6e c9 20 33  |e value.".b.n. 3|
0000e8a0  3a 68 24 3d 22 43 6c 69  63 6b 20 6f 6e 20 74 68  |:h$="Click on th|
0000e8b0  69 73 20 69 63 6f 6e 20  74 6f 20 64 65 63 72 65  |is icon to decre|
0000e8c0  61 73 65 20 74 68 65 20  73 63 61 6c 69 6e 67 20  |ase the scaling |
0000e8d0  6d 75 6c 74 69 70 6c 69  65 72 2e 7c 4d 41 64 6a  |multiplier.|MAdj|
0000e8e0  75 73 74 2d 63 6c 69 63  6b 20 6f 6e 20 69 74 20  |ust-click on it |
0000e8f0  74 6f 20 69 6e 63 72 65  61 73 65 20 74 68 65 20  |to increase the |
0000e900  76 61 6c 75 65 2e 22 0d  62 a2 6b c9 20 34 3a 68  |value.".b.k. 4:h|
0000e910  24 3d 22 43 6c 69 63 6b  20 6f 6e 20 74 68 69 73  |$="Click on this|
0000e920  20 69 63 6f 6e 20 74 6f  20 69 6e 63 72 65 61 73  | icon to increas|
0000e930  65 20 74 68 65 20 73 63  61 6c 69 6e 67 20 64 69  |e the scaling di|
0000e940  76 69 73 6f 72 2e 7c 4d  41 64 6a 75 73 74 2d 63  |visor.|MAdjust-c|
0000e950  6c 69 63 6b 20 6f 6e 20  69 74 20 74 6f 20 64 65  |lick on it to de|
0000e960  63 72 65 61 73 65 20 74  68 65 20 76 61 6c 75 65  |crease the value|
0000e970  2e 22 0d 62 ac 6b c9 20  35 3a 68 24 3d 22 43 6c  |.".b.k. 5:h$="Cl|
0000e980  69 63 6b 20 6f 6e 20 74  68 69 73 20 69 63 6f 6e  |ick on this icon|
0000e990  20 74 6f 20 64 65 63 72  65 61 73 65 20 74 68 65  | to decrease the|
0000e9a0  20 73 63 61 6c 69 6e 67  20 64 69 76 69 73 6f 72  | scaling divisor|
0000e9b0  2e 7c 4d 41 64 6a 75 73  74 2d 63 6c 69 63 6b 20  |.|MAdjust-click |
0000e9c0  6f 6e 20 69 74 20 74 6f  20 69 6e 63 72 65 61 73  |on it to increas|
0000e9d0  65 20 74 68 65 20 76 61  6c 75 65 2e 22 0d 62 b6  |e the value.".b.|
0000e9e0  05 cb 0d 62 c0 0e c9 20  77 25 28 31 30 2c 30 29  |...b... w%(10,0)|
0000e9f0  0d 62 ca 9f 68 24 3d 22  54 68 69 73 20 77 69 6e  |.b..h$="This win|
0000ea00  64 6f 77 20 64 69 73 70  6c 61 79 73 20 69 6e 66  |dow displays inf|
0000ea10  6f 72 6d 61 74 69 6f 6e  20 61 62 6f 75 74 20 74  |ormation about t|
0000ea20  68 65 20 63 75 72 72 65  6e 74 20 73 70 72 69 74  |he current sprit|
0000ea30  65 20 69 6d 61 67 65 2e  7c 4d 49 74 20 6d 61 79  |e image.|MIt may|
0000ea40  20 68 61 76 65 20 6c 65  73 73 20 74 68 61 6e 20  | have less than |
0000ea50  65 69 67 68 74 20 62 69  74 73 20 70 65 72 20 70  |eight bits per p|
0000ea60  69 78 65 6c 20 69 66 20  69 74 20 68 61 73 20 62  |ixel if it has b|
0000ea70  65 65 6e 20 70 72 6f 63  65 73 73 65 64 20 75 73  |een processed us|
0000ea80  69 6e 67 20 43 68 61 6e  67 65 46 53 49 2e 22 0d  |ing ChangeFSI.".|
0000ea90  62 d4 0f c8 8e 20 70 62  25 21 33 36 20 ca 0d 62  |b.... pb%!36 ..b|
0000eaa0  de 2c c9 20 30 3a 68 24  3d 22 54 68 69 73 20 69  |.,. 0:h$="This i|
0000eab0  73 20 74 68 65 20 6e 61  6d 65 20 6f 66 20 74 68  |s the name of th|
0000eac0  65 20 73 70 72 69 74 65  2e 22 0d 62 e8 46 c9 20  |e sprite.".b.F. |
0000ead0  31 3a 68 24 3d 22 54 68  69 73 20 69 73 20 74 68  |1:h$="This is th|
0000eae0  65 20 73 63 72 65 65 6e  20 6d 6f 64 65 20 69 6e  |e screen mode in|
0000eaf0  20 77 68 69 63 68 20 74  68 65 20 73 70 72 69 74  | which the sprit|
0000eb00  65 20 77 61 73 20 70 72  6f 64 75 63 65 64 2e 22  |e was produced."|
0000eb10  0d 62 f2 4e c9 20 32 3a  68 24 3d 22 54 68 69 73  |.b.N. 2:h$="This|
0000eb20  20 74 65 6c 6c 73 20 79  6f 75 20 77 68 65 74 68  | tells you wheth|
0000eb30  65 72 20 6f 72 20 6e 6f  74 20 74 68 65 20 73 70  |er or not the sp|
0000eb40  72 69 74 65 20 68 61 73  20 61 20 74 72 61 6e 73  |rite has a trans|
0000eb50  70 61 72 65 6e 63 79 20  6d 61 73 6b 2e 22 0d 62  |parency mask.".b|
0000eb60  fc 38 c9 20 33 3a 68 24  3d 22 54 68 69 73 20 69  |.8. 3:h$="This i|
0000eb70  73 20 74 68 65 20 77 69  64 74 68 20 6f 66 20 74  |s the width of t|
0000eb80  68 65 20 73 70 72 69 74  65 2c 20 69 6e 20 70 69  |he sprite, in pi|
0000eb90  78 65 6c 73 2e 22 0d 63  06 36 c9 20 34 3a 68 24  |xels.".c.6. 4:h$|
0000eba0  3d 22 54 68 69 73 20 69  73 20 74 68 65 20 73 69  |="This is the si|
0000ebb0  7a 65 20 6f 66 20 74 68  65 20 73 70 72 69 74 65  |ze of the sprite|
0000ebc0  2c 20 69 6e 20 62 79 74  65 73 2e 22 0d 63 10 4a  |, in bytes.".c.J|
0000ebd0  c9 20 35 3a 68 24 3d 22  54 68 69 73 20 74 65 6c  |. 5:h$="This tel|
0000ebe0  6c 73 20 79 6f 75 20 77  68 65 74 68 65 72 20 6f  |ls you whether o|
0000ebf0  72 20 6e 6f 74 20 74 68  65 20 73 70 72 69 74 65  |r not the sprite|
0000ec00  20 68 61 73 20 69 74 73  20 6f 77 6e 20 70 61 6c  | has its own pal|
0000ec10  65 74 74 65 2e 22 0d 63  1a 39 c9 20 36 3a 68 24  |ette.".c.9. 6:h$|
0000ec20  3d 22 54 68 69 73 20 69  73 20 74 68 65 20 68 65  |="This is the he|
0000ec30  69 67 68 74 20 6f 66 20  74 68 65 20 73 70 72 69  |ight of the spri|
0000ec40  74 65 2c 20 69 6e 20 70  69 78 65 6c 73 2e 22 0d  |te, in pixels.".|
0000ec50  63 24 05 cb 0d 63 2e 0e  c9 20 77 25 28 31 31 2c  |c$...c... w%(11,|
0000ec60  30 29 0d 63 38 4a 68 24  3d 22 54 68 69 73 20 77  |0).c8Jh$="This w|
0000ec70  69 6e 64 6f 77 20 64 69  73 70 6c 61 79 73 20 69  |indow displays i|
0000ec80  6e 66 6f 72 6d 61 74 69  6f 6e 20 61 62 6f 75 74  |nformation about|
0000ec90  20 74 68 65 20 74 77 65  6c 76 65 20 62 69 74 20  | the twelve bit |
0000eca0  27 72 61 77 27 20 64 61  74 61 2e 22 0d 63 42 0f  |'raw' data.".cB.|
0000ecb0  c8 8e 20 70 62 25 21 33  36 20 ca 0d 63 4c 34 c9  |.. pb%!36 ..cL4.|
0000ecc0  20 31 3a 68 24 3d 22 54  68 69 73 20 69 73 20 74  | 1:h$="This is t|
0000ecd0  68 65 20 73 69 7a 65 20  6f 66 20 74 68 65 20 64  |he size of the d|
0000ece0  61 74 61 2c 20 69 6e 20  62 79 74 65 73 2e 22 0d  |ata, in bytes.".|
0000ecf0  63 56 37 c9 20 33 3a 68  24 3d 22 54 68 69 73 20  |cV7. 3:h$="This |
0000ed00  69 73 20 74 68 65 20 77  69 64 74 68 20 6f 66 20  |is the width of |
0000ed10  74 68 65 20 69 6d 61 67  65 2c 20 69 6e 20 70 69  |the image, in pi|
0000ed20  78 65 6c 73 2e 22 0d 63  60 38 c9 20 35 3a 68 24  |xels.".c`8. 5:h$|
0000ed30  3d 22 54 68 69 73 20 69  73 20 74 68 65 20 68 65  |="This is the he|
0000ed40  69 67 68 74 20 6f 66 20  74 68 65 20 69 6d 61 67  |ight of the imag|
0000ed50  65 2c 20 69 6e 20 70 69  78 65 6c 73 2e 22 0d 63  |e, in pixels.".c|
0000ed60  6a 43 c9 20 39 3a 68 24  3d 22 54 68 65 20 69 6d  |jC. 9:h$="The im|
0000ed70  61 67 65 20 77 61 73 20  67 72 61 62 62 65 64 20  |age was grabbed |
0000ed80  61 74 20 74 68 65 20 62  72 69 67 68 74 6e 65 73  |at the brightnes|
0000ed90  73 20 73 65 74 74 69 6e  67 20 73 68 6f 77 6e 2e  |s setting shown.|
0000eda0  22 0d 63 74 44 c9 20 31  30 3a 68 24 3d 22 54 68  |".ctD. 10:h$="Th|
0000edb0  65 20 69 6d 61 67 65 20  77 61 73 20 67 72 61 62  |e image was grab|
0000edc0  62 65 64 20 61 74 20 74  68 65 20 73 61 74 75 72  |bed at the satur|
0000edd0  61 74 69 6f 6e 20 73 65  74 74 69 6e 67 20 73 68  |ation setting sh|
0000ede0  6f 77 6e 2e 22 0d 63 7e  42 c9 20 31 31 3a 68 24  |own.".c~B. 11:h$|
0000edf0  3d 22 54 68 65 20 69 6d  61 67 65 20 77 61 73 20  |="The image was |
0000ee00  67 72 61 62 62 65 64 20  61 74 20 74 68 65 20 63  |grabbed at the c|
0000ee10  6f 6e 74 72 61 73 74 20  73 65 74 74 69 6e 67 20  |ontrast setting |
0000ee20  73 68 6f 77 6e 2e 22 0d  63 88 05 cb 0d 63 92 0e  |shown.".c....c..|
0000ee30  c9 20 77 25 28 31 33 2c  30 29 0d 63 9c 44 68 24  |. w%(13,0).c.Dh$|
0000ee40  3d 22 54 68 69 73 20 77  69 6e 64 6f 77 20 63 6f  |="This window co|
0000ee50  6e 74 61 69 6e 73 20 69  6e 66 6f 72 6d 61 74 69  |ntains informati|
0000ee60  6f 6e 20 6f 6e 20 46 61  73 74 47 72 61 62 27 73  |on on FastGrab's|
0000ee70  20 64 65 76 65 6c 6f 70  6d 65 6e 74 2e 22 0d 63  | development.".c|
0000ee80  a6 0f c8 8e 20 70 62 25  21 33 36 20 ca 0d 63 b0  |.... pb%!36 ..c.|
0000ee90  ac c9 20 31 2c 32 3a 68  24 3d 22 46 61 73 74 47  |.. 1,2:h$="FastG|
0000eea0  72 61 62 20 69 73 20 61  20 72 65 61 6c 20 74 69  |rab is a real ti|
0000eeb0  6d 65 20 76 69 64 65 6f  20 67 72 61 62 62 69 6e  |me video grabbin|
0000eec0  67 20 73 79 73 74 65 6d  20 66 6f 72 20 75 73 65  |g system for use|
0000eed0  20 77 69 74 68 20 52 49  53 43 20 4f 53 20 63 6f  | with RISC OS co|
0000eee0  6d 70 75 74 65 72 73 2e  20 49 74 20 69 73 20 64  |mputers. It is d|
0000eef0  65 73 69 67 6e 65 64 20  74 6f 20 77 6f 72 6b 20  |esigned to work |
0000ef00  77 69 74 68 20 74 68 65  20 57 69 6c 64 20 56 69  |with the Wild Vi|
0000ef10  73 69 6f 6e 20 48 61 77  6b 20 56 39 20 52 65 61  |sion Hawk V9 Rea|
0000ef20  6c 20 54 69 6d 65 20 43  6f 6c 6f 75 72 20 44 69  |l Time Colour Di|
0000ef30  67 69 74 69 73 65 72 2e  22 0d 63 ba 57 c9 20 33  |gitiser.".c.W. 3|
0000ef40  2c 34 3a 68 24 3d 22 41  6c 6c 20 6f 72 69 67 69  |,4:h$="All origi|
0000ef50  6e 61 6c 20 46 61 73 74  47 72 61 62 20 63 6f 64  |nal FastGrab cod|
0000ef60  65 20 69 73 20 62 79 20  52 6f 62 65 72 74 20 57  |e is by Robert W|
0000ef70  20 48 61 6d 69 6c 74 6f  6e 20 40 20 4d 65 72 63  | Hamilton @ Merc|
0000ef80  65 6e 61 72 79 20 53 6f  66 74 77 61 72 65 2e 22  |enary Software."|
0000ef90  0d 63 c4 2a c9 20 35 3a  68 24 3d 22 54 68 69 73  |.c.*. 5:h$="This|
0000efa0  20 69 73 20 74 68 65 20  57 69 6c 64 20 56 69 73  | is the Wild Vis|
0000efb0  69 6f 6e 20 6c 6f 67 6f  2e 22 0d 63 ce 32 c9 20  |ion logo.".c.2. |
0000efc0  36 3a 68 24 3d 22 46 61  73 74 47 72 61 62 20 77  |6:h$="FastGrab w|
0000efd0  61 73 20 77 72 69 74 74  65 6e 20 66 6f 72 20 57  |as written for W|
0000efe0  69 6c 64 20 56 69 73 69  6f 6e 2e 22 0d 63 d8 07  |ild Vision.".c..|
0000eff0  c9 20 37 0d 63 e2 16 64  73 25 3d a7 76 65 72 73  |. 7.c..ds%=.vers|
0000f000  69 6f 6e 24 2c 22 28 22  29 0d 63 ec 16 64 65 25  |ion$,"(").c..de%|
0000f010  3d a7 76 65 72 73 69 6f  6e 24 2c 22 29 22 29 0d  |=.version$,")").|
0000f020  63 f6 6c 68 24 3d 22 54  68 69 73 20 69 73 20 22  |c.lh$="This is "|
0000f030  2b c0 76 65 72 73 69 6f  6e 24 2c 64 73 25 2d 32  |+.version$,ds%-2|
0000f040  29 2b 22 20 6f 66 20 46  61 73 74 47 72 61 62 20  |)+" of FastGrab |
0000f050  61 6e 64 20 69 74 20 77  61 73 20 6c 61 73 74 20  |and it was last |
0000f060  75 70 64 61 74 65 64 20  6f 6e 20 22 2b c1 76 65  |updated on "+.ve|
0000f070  72 73 69 6f 6e 24 2c 64  73 25 2b 31 2c 64 65 25  |rsion$,ds%+1,de%|
0000f080  2d 64 73 25 2d 31 29 2b  22 2e 22 0d 64 00 05 cb  |-ds%-1)+".".d...|
0000f090  0d 64 0a 0e c9 20 77 25  28 31 34 2c 30 29 0d 64  |.d... w%(14,0).d|
0000f0a0  14 51 68 24 3d 22 54 68  69 73 20 77 69 6e 64 6f  |.Qh$="This windo|
0000f0b0  77 20 67 69 76 65 73 20  73 6f 6d 65 20 64 65 76  |w gives some dev|
0000f0c0  65 6c 6f 70 6d 65 6e 74  20 69 6e 66 6f 72 6d 61  |elopment informa|
0000f0d0  74 69 6f 6e 20 6f 6e 20  74 68 65 20 43 68 61 6e  |tion on the Chan|
0000f0e0  67 65 46 53 49 20 70 72  6f 67 72 61 6d 2e 22 0d  |geFSI program.".|
0000f0f0  64 1e 0f c8 8e 20 70 62  25 21 33 36 20 ca 0d 64  |d.... pb%!36 ..d|
0000f100  28 c8 c9 20 31 3a 68 24  3d 22 43 68 61 6e 67 65  |(.. 1:h$="Change|
0000f110  46 53 49 20 74 61 6b 65  73 20 69 74 73 20 6e 61  |FSI takes its na|
0000f120  6d 65 20 66 72 6f 6d 20  52 20 57 20 46 6c 6f 79  |me from R W Floy|
0000f130  64 20 61 6e 64 20 4c 20  53 74 65 69 6e 62 65 72  |d and L Steinber|
0000f140  67 2c 20 77 68 6f 73 65  20 27 65 72 72 6f 72 20  |g, whose 'error |
0000f150  64 69 66 66 75 73 69 6f  6e 27 20 74 65 63 68 6e  |diffusion' techn|
0000f160  69 71 75 65 20 69 73 20  75 73 65 64 20 74 6f 20  |ique is used to |
0000f170  69 6d 70 72 6f 76 65 20  6f 75 74 70 75 74 2e 7c  |improve output.||
0000f180  4d 54 68 65 20 27 49 27  20 69 73 20 66 6f 72 20  |MThe 'I' is for |
0000f190  69 6e 74 65 67 65 72 2c  20 61 73 20 74 68 65 20  |integer, as the |
0000f1a0  70 72 6f 67 72 61 6d 20  75 73 65 73 20 74 68 69  |program uses thi|
0000f1b0  73 20 66 6f 72 6d 20 6f  66 20 61 72 69 74 68 6d  |s form of arithm|
0000f1c0  65 74 69 63 2e 22 0d 64  32 9e c9 20 32 3a 68 24  |etic.".d2.. 2:h$|
0000f1d0  3d 22 4d 65 72 63 65 6e  61 72 79 20 53 6f 66 74  |="Mercenary Soft|
0000f1e0  77 61 72 65 20 61 6e 64  20 57 69 6c 64 20 56 69  |ware and Wild Vi|
0000f1f0  73 69 6f 6e 20 77 6f 75  6c 64 20 6c 69 6b 65 20  |sion would like |
0000f200  74 6f 20 74 68 61 6e 6b  20 52 6f 67 65 72 20 57  |to thank Roger W|
0000f210  69 6c 73 6f 6e 2c 20 6f  66 20 41 63 6f 72 6e 20  |ilson, of Acorn |
0000f220  43 6f 6d 70 75 74 65 72  73 20 4c 69 6d 69 74 65  |Computers Limite|
0000f230  64 2c 20 66 6f 72 20 68  69 73 20 70 65 72 6d 69  |d, for his permi|
0000f240  73 73 69 6f 6e 20 74 6f  20 75 73 65 20 43 68 61  |ssion to use Cha|
0000f250  6e 67 65 46 53 49 20 69  6e 20 46 61 73 74 47 72  |ngeFSI in FastGr|
0000f260  61 62 2e 22 0d 64 3c 05  cb 0d 64 46 0d c9 20 77  |ab.".d<...dF.. w|
0000f270  25 28 31 2c 30 29 0d 64  50 0f c8 8e 20 70 62 25  |%(1,0).dP... pb%|
0000f280  21 33 36 20 ca 0d 64 5a  66 c9 20 2d 31 3a 68 24  |!36 ..dZf. -1:h$|
0000f290  3d 22 54 68 69 73 20 70  61 72 61 6d 65 74 65 72  |="This parameter|
0000f2a0  73 20 69 6e 20 74 68 69  73 20 77 69 6e 64 6f 77  |s in this window|
0000f2b0  20 61 72 65 20 74 68 6f  73 65 20 75 73 65 64 20  | are those used |
0000f2c0  62 79 20 74 68 65 20 43  68 61 6e 67 65 46 53 49  |by the ChangeFSI|
0000f2d0  20 69 6d 61 67 65 20 70  72 6f 63 65 73 73 69 6e  | image processin|
0000f2e0  67 20 72 6f 75 74 69 6e  65 2e 22 0d 64 64 c7 c9  |g routine.".dd..|
0000f2f0  20 30 3a 68 24 3d 22 45  6e 74 65 72 20 74 68 65  | 0:h$="Enter the|
0000f300  20 6f 75 74 70 75 74 20  6d 6f 64 65 20 74 6f 20  | output mode to |
0000f310  62 65 20 75 73 65 64 20  68 65 72 65 2e 20 49 74  |be used here. It|
0000f320  20 73 68 6f 75 6c 64 20  62 65 20 61 20 67 72 61  | should be a gra|
0000f330  70 68 69 63 73 20 6d 6f  64 65 20 2d 20 6e 6f 74  |phics mode - not|
0000f340  65 20 74 68 61 74 20 6d  6f 64 65 73 20 32 2c 34  |e that modes 2,4|
0000f350  2c 35 20 61 6e 64 20 31  30 20 61 72 65 20 6e 6f  |,5 and 10 are no|
0000f360  74 20 73 75 70 70 6f 72  74 65 64 2e 20 49 66 20  |t supported. If |
0000f370  79 6f 75 20 61 74 74 65  6d 70 74 20 74 6f 20 75  |you attempt to u|
0000f380  73 65 20 61 6e 20 69 6e  76 61 6c 69 64 20 6d 6f  |se an invalid mo|
0000f390  64 65 2c 20 6d 6f 64 65  20 31 35 20 77 69 6c 6c  |de, mode 15 will|
0000f3a0  20 62 65 20 75 73 65 64  20 69 6e 73 74 65 61 64  | be used instead|
0000f3b0  2e 22 0d 64 6e 0d c9 20  31 2c 32 2c 33 2c 34 0d  |.".dn.. 1,2,3,4.|
0000f3c0  64 78 0f c8 8e 20 70 62  25 21 33 36 20 ca 0d 64  |dx... pb%!36 ..d|
0000f3d0  82 28 c9 20 31 3a 68 24  3d 22 54 68 69 73 20 69  |.(. 1:h$="This i|
0000f3e0  73 20 74 68 65 20 78 20  6f 75 74 70 75 74 20 72  |s the x output r|
0000f3f0  61 74 69 6f 2e 22 0d 64  8c 27 c9 20 32 3a 68 24  |atio.".d.'. 2:h$|
0000f400  3d 22 54 68 69 73 20 69  73 20 74 68 65 20 78 20  |="This is the x |
0000f410  69 6e 70 75 74 20 72 61  74 69 6f 2e 22 0d 64 96  |input ratio.".d.|
0000f420  28 c9 20 33 3a 68 24 3d  22 54 68 69 73 20 69 73  |(. 3:h$="This is|
0000f430  20 74 68 65 20 79 20 6f  75 74 70 75 74 20 72 61  | the y output ra|
0000f440  74 69 6f 2e 22 0d 64 a0  27 c9 20 34 3a 68 24 3d  |tio.".d.'. 4:h$=|
0000f450  22 54 68 69 73 20 69 73  20 74 68 65 20 79 20 69  |"This is the y i|
0000f460  6e 70 75 74 20 72 61 74  69 6f 2e 22 0d 64 aa 05  |nput ratio.".d..|
0000f470  cb 0d 64 b4 3f 68 24 2b  3d 22 7c 4d 53 65 74 20  |..d.?h$+="|MSet |
0000f480  74 68 65 20 73 63 61 6c  69 6e 67 20 72 61 74 69  |the scaling rati|
0000f490  6f 73 20 61 73 20 79 6f  75 20 64 6f 20 69 6e 20  |os as you do in |
0000f4a0  50 61 69 6e 74 20 61 6e  64 20 44 72 61 77 2e 22  |Paint and Draw."|
0000f4b0  0d 64 be 49 c9 20 35 3a  68 24 3d 22 53 65 6c 65  |.d.I. 5:h$="Sele|
0000f4c0  63 74 20 74 68 69 73 20  69 63 6f 6e 20 74 6f 20  |ct this icon to |
0000f4d0  73 63 61 6c 65 20 74 68  65 20 6f 75 74 70 75 74  |scale the output|
0000f4e0  20 74 6f 20 66 69 74 20  74 68 65 20 6f 75 74 70  | to fit the outp|
0000f4f0  75 74 20 6d 6f 64 65 2e  22 0d 64 c8 43 c9 20 36  |ut mode.".d.C. 6|
0000f500  3a 68 24 3d 22 53 65 6c  65 63 74 20 74 68 69 73  |:h$="Select this|
0000f510  20 69 63 6f 6e 20 74 6f  20 75 73 65 20 74 68 65  | icon to use the|
0000f520  20 73 63 61 6c 65 20 72  61 74 69 6f 73 20 69 6e  | scale ratios in|
0000f530  20 74 68 65 20 62 6f 78  65 73 2e 22 0d 64 d2 32  | the boxes.".d.2|
0000f540  c9 20 37 3a 68 24 3d 22  53 65 6c 65 63 74 20 74  |. 7:h$="Select t|
0000f550  68 69 73 20 69 63 6f 6e  20 66 6f 72 20 73 74 61  |his icon for sta|
0000f560  6e 64 61 72 64 20 6f 75  74 70 75 74 2e 22 0d 64  |ndard output.".d|
0000f570  dc 6b c9 20 38 3a 68 24  3d 22 53 65 6c 65 63 74  |.k. 8:h$="Select|
0000f580  20 74 68 69 73 20 69 63  6f 6e 20 66 6f 72 20 32  | this icon for 2|
0000f590  20 6f 72 20 34 20 62 69  74 20 63 6f 6c 6f 75 72  | or 4 bit colour|
0000f5a0  2c 20 6f 72 20 66 6f 72  20 63 6c 75 73 74 65 72  |, or for cluster|
0000f5b0  65 64 20 64 69 74 68 65  72 69 6e 67 20 69 6e 20  |ed dithering in |
0000f5c0  6f 6e 65 20 62 69 74 20  70 65 72 20 70 69 78 65  |one bit per pixe|
0000f5d0  6c 20 6d 6f 64 65 73 2e  22 0d 64 e6 35 c9 20 39  |l modes.".d.5. 9|
0000f5e0  3a 68 24 3d 22 53 65 6c  65 63 74 20 74 68 69 73  |:h$="Select this|
0000f5f0  20 69 63 6f 6e 20 66 6f  72 20 64 69 67 69 74 61  | icon for digita|
0000f600  6c 20 52 47 42 20 6f 75  74 70 75 74 2e 22 0d 64  |l RGB output.".d|
0000f610  f0 6d c9 20 31 30 3a 68  24 3d 22 53 65 6c 65 63  |.m. 10:h$="Selec|
0000f620  74 20 74 68 69 73 20 69  63 6f 6e 20 66 6f 72 20  |t this icon for |
0000f630  6e 6f 20 74 69 6e 74 69  6e 67 20 69 6e 20 32 35  |no tinting in 25|
0000f640  36 20 63 6f 6c 6f 75 72  20 6d 6f 64 65 73 2c 20  |6 colour modes, |
0000f650  6f 72 20 73 69 78 74 65  65 6e 20 67 72 65 79 20  |or sixteen grey |
0000f660  6c 65 76 65 6c 73 20 69  6e 20 31 36 20 63 6f 6c  |levels in 16 col|
0000f670  6f 75 72 20 6d 6f 64 65  73 2e 22 0d 64 fa 8d c9  |our modes.".d...|
0000f680  20 31 31 3a 68 24 3d 22  53 65 6c 65 63 74 20 74  | 11:h$="Select t|
0000f690  68 69 73 20 69 63 6f 6e  20 74 6f 20 65 78 70 61  |his icon to expa|
0000f6a0  6e 64 20 74 68 65 20 64  79 6e 61 6d 69 63 20 72  |nd the dynamic r|
0000f6b0  61 6e 67 65 20 6f 66 20  74 68 65 20 73 6f 75 72  |ange of the sour|
0000f6c0  63 65 2e 7c 4d 41 64 6a  75 73 74 2d 63 6c 69 63  |ce.|MAdjust-clic|
0000f6d0  6b 69 6e 67 20 6f 6e 20  74 68 69 73 20 69 63 6f  |king on this ico|
0000f6e0  6e 20 77 68 65 6e 20 69  74 20 69 73 20 73 65 6c  |n when it is sel|
0000f6f0  65 63 74 65 64 20 77 69  6c 6c 20 75 6e 73 65 6c  |ected will unsel|
0000f700  65 63 74 20 69 74 2e 22  0d 65 04 91 c9 20 31 32  |ect it.".e... 12|
0000f710  3a 68 24 3d 22 53 65 6c  65 63 74 20 74 68 69 73  |:h$="Select this|
0000f720  20 69 63 6f 6e 20 74 6f  20 61 70 70 6c 79 20 68  | icon to apply h|
0000f730  69 73 74 6f 67 72 61 6d  20 65 71 75 61 6c 69 73  |istogram equalis|
0000f740  61 74 69 6f 6e 20 74 6f  20 74 68 65 20 73 6f 75  |ation to the sou|
0000f750  72 63 65 2e 7c 4d 41 64  6a 75 73 74 2d 63 6c 69  |rce.|MAdjust-cli|
0000f760  63 6b 69 6e 67 20 6f 6e  20 74 68 69 73 20 69 63  |cking on this ic|
0000f770  6f 6e 20 77 68 65 6e 20  69 74 20 69 73 20 73 65  |on when it is se|
0000f780  6c 65 63 74 65 64 20 77  69 6c 6c 20 75 6e 73 65  |lected will unse|
0000f790  6c 65 63 74 20 69 74 2e  22 0d 65 0e 98 c9 20 31  |lect it.".e... 1|
0000f7a0  33 3a 68 24 3d 22 53 65  6c 65 63 74 20 74 68 69  |3:h$="Select thi|
0000f7b0  73 20 69 63 6f 6e 20 74  6f 20 70 72 6f 63 65 73  |s icon to proces|
0000f7c0  73 20 69 6e 20 4d 6f 64  65 20 30 2e 7c 4d 54 68  |s in Mode 0.|MTh|
0000f7d0  69 73 20 77 69 6c 6c 20  73 70 65 65 64 20 74 68  |is will speed th|
0000f7e0  69 6e 67 73 20 75 70 2c  20 65 73 70 65 63 69 61  |ings up, especia|
0000f7f0  6c 6c 79 20 69 66 20 79  6f 75 20 61 72 65 20 69  |lly if you are i|
0000f800  6e 20 61 20 68 69 67 68  2d 72 65 73 6f 6c 75 74  |n a high-resolut|
0000f810  69 6f 6e 20 6d 6f 64 65  20 66 6f 72 20 76 69 65  |ion mode for vie|
0000f820  77 69 6e 67 20 74 68 65  20 6f 75 74 70 75 74 2e  |wing the output.|
0000f830  22 0d 65 18 46 c9 20 31  34 3a 68 24 3d 22 53 65  |".e.F. 14:h$="Se|
0000f840  6c 65 63 74 20 74 68 69  73 20 69 63 6f 6e 20 74  |lect this icon t|
0000f850  6f 20 69 6e 76 65 72 74  20 74 68 65 20 73 6f 75  |o invert the sou|
0000f860  72 63 65 20 62 65 66 6f  72 65 20 70 72 6f 63 65  |rce before proce|
0000f870  73 73 69 6e 67 2e 22 0d  65 22 39 c9 20 31 35 3a  |ssing.".e"9. 15:|
0000f880  68 24 3d 22 53 65 6c 65  63 74 20 74 68 69 73 20  |h$="Select this |
0000f890  69 63 6f 6e 20 74 6f 20  70 72 65 2d 73 68 61 72  |icon to pre-shar|
0000f8a0  70 65 6e 20 74 68 65 20  73 6f 75 72 63 65 2e 22  |pen the source."|
0000f8b0  0d 65 2c 98 c9 20 31 36  3a 68 24 3d 22 53 65 6c  |.e,.. 16:h$="Sel|
0000f8c0  65 63 74 20 74 68 69 73  20 69 63 6f 6e 20 74 6f  |ect this icon to|
0000f8d0  20 6f 6d 69 74 20 43 68  61 6e 67 65 46 53 49 27  | omit ChangeFSI'|
0000f8e0  73 20 70 69 78 65 6c 20  63 6f 72 72 65 63 74 69  |s pixel correcti|
0000f8f0  6f 6e 20 72 6f 75 74 69  6e 65 73 2e 20 54 68 69  |on routines. Thi|
0000f900  73 20 6d 65 61 6e 73 20  74 68 61 74 20 74 68 65  |s means that the|
0000f910  20 73 69 7a 65 20 6f 66  20 74 68 65 20 70 69 78  | size of the pix|
0000f920  65 6c 73 20 69 73 20 69  67 6e 6f 72 65 64 20 77  |els is ignored w|
0000f930  68 65 6e 20 74 72 61 6e  73 6c 61 74 69 6e 67 20  |hen translating |
0000f940  69 6d 61 67 65 73 2e 22  0d 65 36 58 c9 20 32 32  |images.".e6X. 22|
0000f950  3a 68 24 3d 22 45 6e 74  65 72 20 74 68 65 20 76  |:h$="Enter the v|
0000f960  61 6c 75 65 20 66 6f 72  20 73 68 61 72 70 65 6e  |alue for sharpen|
0000f970  69 6e 67 20 68 65 72 65  2c 20 69 6e 20 74 68 65  |ing here, in the|
0000f980  20 72 61 6e 67 65 20 38  2d 33 31 20 28 33 31 3d  | range 8-31 (31=|
0000f990  73 6f 66 74 2c 20 38 3d  68 61 72 73 68 29 2e 22  |soft, 8=harsh)."|
0000f9a0  0d 65 40 3e c9 20 32 33  3a 68 24 3d 22 53 65 6c  |.e@>. 23:h$="Sel|
0000f9b0  65 63 74 20 74 68 69 73  20 69 63 6f 6e 20 74 6f  |ect this icon to|
0000f9c0  20 66 6c 69 70 20 74 68  65 20 69 6d 61 67 65 20  | flip the image |
0000f9d0  68 6f 72 69 7a 6f 6e 74  61 6c 6c 79 2e 22 0d 65  |horizontally.".e|
0000f9e0  4a 3c c9 20 32 34 3a 68  24 3d 22 53 65 6c 65 63  |J<. 24:h$="Selec|
0000f9f0  74 20 74 68 69 73 20 69  63 6f 6e 20 74 6f 20 66  |t this icon to f|
0000fa00  6c 69 70 20 74 68 65 20  69 6d 61 67 65 20 76 65  |lip the image ve|
0000fa10  72 74 69 63 61 6c 6c 79  2e 22 0d 65 54 52 c9 20  |rtically.".eTR. |
0000fa20  32 35 3a 68 24 3d 22 43  6c 69 63 6b 20 6f 6e 20  |25:h$="Click on |
0000fa30  74 68 69 73 20 69 63 6f  6e 20 74 6f 20 70 72 6f  |this icon to pro|
0000fa40  63 65 73 73 20 74 68 65  20 69 6d 61 67 65 20 77  |cess the image w|
0000fa50  69 74 68 20 74 68 65 20  63 75 72 72 65 6e 74 20  |ith the current |
0000fa60  70 61 72 61 6d 65 74 65  72 73 2e 22 0d 65 5e 48  |parameters.".e^H|
0000fa70  c9 20 32 36 3a 68 24 3d  22 53 65 6c 65 63 74 20  |. 26:h$="Select |
0000fa80  74 68 69 73 20 69 63 6f  6e 20 74 6f 20 64 69 73  |this icon to dis|
0000fa90  61 62 6c 65 20 64 69 74  68 65 72 69 6e 67 20 6f  |able dithering o|
0000faa0  66 20 74 68 65 20 6f 75  74 70 75 74 20 69 6d 61  |f the output ima|
0000fab0  67 65 2e 22 0d 65 68 49  c9 20 32 37 3a 68 24 3d  |ge.".ehI. 27:h$=|
0000fac0  22 53 65 6c 65 63 74 20  74 68 69 73 20 69 63 6f  |"Select this ico|
0000fad0  6e 20 74 6f 20 61 72 74  69 66 69 63 69 61 6c 6c  |n to artificiall|
0000fae0  79 20 62 72 69 67 68 74  65 6e 20 74 68 65 20 6f  |y brighten the o|
0000faf0  75 74 70 75 74 20 69 6d  61 67 65 2e 22 0d 65 72  |utput image.".er|
0000fb00  98 c9 20 32 38 3a 68 24  3d 22 53 65 6c 65 63 74  |.. 28:h$="Select|
0000fb10  20 74 68 69 73 20 69 63  6f 6e 20 74 6f 20 61 70  | this icon to ap|
0000fb20  70 6c 79 20 62 6c 61 63  6b 20 63 6f 72 72 65 63  |ply black correc|
0000fb30  74 69 6f 6e 20 74 6f 20  74 68 65 20 69 6d 61 67  |tion to the imag|
0000fb40  65 20 62 65 66 6f 72 65  20 70 72 6f 63 65 73 73  |e before process|
0000fb50  69 6e 67 2e 20 54 68 69  73 20 63 6f 72 72 65 63  |ing. This correc|
0000fb60  74 73 20 66 6f 72 20 74  68 65 20 73 69 7a 65 20  |ts for the size |
0000fb70  6f 66 20 62 6c 61 63 6b  20 69 6e 6b 20 73 70 6f  |of black ink spo|
0000fb80  74 73 20 28 65 67 20 6f  6e 20 70 72 69 6e 74 65  |ts (eg on printe|
0000fb90  72 73 29 2e 22 0d 65 7c  59 c9 20 32 39 3a 68 24  |rs).".e|Y. 29:h$|
0000fba0  3d 22 53 65 6c 65 63 74  20 74 68 69 73 20 69 63  |="Select this ic|
0000fbb0  6f 6e 20 74 6f 20 61 70  70 6c 79 20 67 61 6d 6d  |on to apply gamm|
0000fbc0  61 20 63 6f 72 72 65 63  74 69 6f 6e 20 74 6f 20  |a correction to |
0000fbd0  74 68 65 20 69 6d 61 67  65 20 62 65 66 6f 72 65  |the image before|
0000fbe0  20 70 72 6f 63 65 73 73  69 6e 67 2e 20 22 0d 65  | processing. ".e|
0000fbf0  86 66 c9 20 33 30 3a 68  24 3d 22 45 6e 74 65 72  |.f. 30:h$="Enter|
0000fc00  20 74 68 65 20 76 61 6c  75 65 20 66 6f 72 20 62  | the value for b|
0000fc10  6c 61 63 6b 20 63 6f 72  72 65 63 74 69 6f 6e 20  |lack correction |
0000fc20  68 65 72 65 2c 20 69 6e  20 74 68 65 20 72 61 6e  |here, in the ran|
0000fc30  67 65 20 30 2d 31 32 38  20 28 30 3d 6e 6f 74 20  |ge 0-128 (0=not |
0000fc40  61 74 20 61 6c 6c 2c 20  31 32 38 3d 68 61 72 73  |at all, 128=hars|
0000fc50  68 29 2e 22 0d 65 90 52  c9 20 33 31 3a 68 24 3d  |h).".e.R. 31:h$=|
0000fc60  22 45 6e 74 65 72 20 74  68 65 20 76 61 6c 75 65  |"Enter the value|
0000fc70  20 66 6f 72 20 67 61 6d  6d 61 20 63 6f 72 72 65  | for gamma corre|
0000fc80  63 74 69 6f 6e 20 68 65  72 65 2e 20 54 68 65 20  |ction here. The |
0000fc90  64 65 66 61 75 6c 74 20  76 61 6c 75 65 20 69 73  |default value is|
0000fca0  20 32 2e 32 2e 22 0d 65  9a 05 cb 0d 65 a4 0e c9  | 2.2.".e....e...|
0000fcb0  20 77 25 28 31 37 2c 30  29 0d 65 ae 0f c8 8e 20  | w%(17,0).e.... |
0000fcc0  70 62 25 21 33 36 20 ca  0d 65 b8 54 c9 20 2d 31  |pb%!36 ..e.T. -1|
0000fcd0  3a 68 24 3d 22 54 68 69  73 20 77 69 6e 64 6f 77  |:h$="This window|
0000fce0  20 61 6c 6c 6f 77 73 20  79 6f 75 20 74 6f 20 61  | allows you to a|
0000fcf0  64 6a 75 73 74 20 74 68  65 20 73 70 65 65 64 20  |djust the speed |
0000fd00  6f 66 20 46 61 73 74 47  72 61 62 27 73 20 6c 69  |of FastGrab's li|
0000fd10  76 65 20 64 69 73 70 6c  61 79 2e 22 0d 65 c2 77  |ve display.".e.w|
0000fd20  c9 20 30 3a 68 24 3d 22  54 68 69 73 20 73 6c 69  |. 0:h$="This sli|
0000fd30  64 65 72 20 62 61 72 20  63 6f 6e 74 72 6f 6c 73  |der bar controls|
0000fd40  20 74 68 65 20 73 70 65  65 64 20 6f 66 20 46 61  | the speed of Fa|
0000fd50  73 74 47 72 61 62 27 73  20 6c 69 76 65 20 64 69  |stGrab's live di|
0000fd60  73 70 6c 61 79 2e 20 30  20 69 73 20 74 68 65 20  |splay. 0 is the |
0000fd70  73 6c 6f 77 65 73 74 20  73 70 65 65 64 2c 20 61  |slowest speed, a|
0000fd80  6e 64 20 39 39 20 74 68  65 20 66 61 73 74 65 73  |nd 99 the fastes|
0000fd90  74 2e 22 0d 65 cc 7f c9  20 31 3a 68 24 3d 22 43  |t.".e... 1:h$="C|
0000fda0  6c 69 63 6b 20 6f 6e 20  74 68 69 73 20 69 63 6f  |lick on this ico|
0000fdb0  6e 20 74 6f 20 69 6e 63  72 65 61 73 65 20 74 68  |n to increase th|
0000fdc0  65 20 73 70 65 65 64 20  6f 66 20 46 61 73 74 47  |e speed of FastG|
0000fdd0  72 61 62 27 73 20 6c 69  76 65 20 64 69 73 70 6c  |rab's live displ|
0000fde0  61 79 2e 7c 4d 41 64 6a  75 73 74 20 63 6c 69 63  |ay.|MAdjust clic|
0000fdf0  6b 20 6f 6e 20 69 74 20  74 6f 20 73 6c 6f 77 20  |k on it to slow |
0000fe00  74 68 65 20 64 69 73 70  6c 61 79 20 64 6f 77 6e  |the display down|
0000fe10  2e 22 0d 65 d6 7f c9 20  32 3a 68 24 3d 22 43 6c  |.".e... 2:h$="Cl|
0000fe20  69 63 6b 20 6f 6e 20 74  68 69 73 20 69 63 6f 6e  |ick on this icon|
0000fe30  20 74 6f 20 73 6c 6f 77  20 64 6f 77 6e 20 46 61  | to slow down Fa|
0000fe40  73 74 47 72 61 62 27 73  20 6c 69 76 65 20 64 69  |stGrab's live di|
0000fe50  73 70 6c 61 79 2e 7c 4d  41 64 6a 75 73 74 20 63  |splay.|MAdjust c|
0000fe60  6c 69 63 6b 20 6f 6e 20  69 74 20 74 6f 20 69 6e  |lick on it to in|
0000fe70  63 72 65 61 73 65 20 74  68 65 20 73 70 65 65 64  |crease the speed|
0000fe80  20 6f 66 20 74 68 65 20  64 69 73 70 6c 61 79 2e  | of the display.|
0000fe90  22 0d 65 e0 42 c9 20 33  3a 68 24 3d 22 54 68 69  |".e.B. 3:h$="Thi|
0000fea0  73 20 66 69 65 6c 64 20  73 65 74 73 20 74 68 65  |s field sets the|
0000feb0  20 73 70 65 65 64 20 6f  66 20 46 61 73 74 47 72  | speed of FastGr|
0000fec0  61 62 27 73 20 6c 69 76  65 20 64 69 73 70 6c 61  |ab's live displa|
0000fed0  79 2e 22 0d 65 ea 05 cb  0d 65 f4 05 cb 0d 65 fe  |y.".e....e....e.|
0000fee0  0a 68 24 2b 3d bd 30 0d  66 08 13 66 6e 61 6d 65  |.h$+=.0.f..fname|
0000fef0  6c 65 6e 25 3d a9 28 68  24 29 0d 66 12 17 f2 72  |len%=.(h$).f...r|
0000ff00  6f 75 6e 64 28 66 6e 61  6d 65 6c 65 6e 25 2c 34  |ound(fnamelen%,4|
0000ff10  29 0d 66 1c 15 21 6d 62  25 3d 32 30 2b 66 6e 61  |).f..!mb%=20+fna|
0000ff20  6d 65 6c 65 6e 25 0d 66  26 0c 6d 62 25 21 38 3d  |melen%.f&.mb%!8=|
0000ff30  2d 31 0d 66 30 10 6d 62  25 21 31 32 3d 70 62 25  |-1.f0.mb%!12=pb%|
0000ff40  21 38 0d 66 3a 0f 6d 62  25 21 31 36 3d 26 35 30  |!8.f:.mb%!16=&50|
0000ff50  33 0d 66 44 10 24 28 6d  62 25 2b 32 30 29 3d 68  |3.fD.$(mb%+20)=h|
0000ff60  24 0d 66 4e 22 c8 99 20  22 57 69 6d 70 5f 53 65  |$.fN".. "Wimp_Se|
0000ff70  6e 64 4d 65 73 73 61 67  65 22 2c 31 37 2c 6d 62  |ndMessage",17,mb|
0000ff80  25 2c 30 0d 66 58 05 e1  0d 66 62 11 dd 20 f2 73  |%,0.fX...fb.. .s|
0000ff90  61 76 65 73 70 72 69 74  65 0d 66 6c 4d e7 20 a7  |avesprite.flM. .|
0000ffa0  24 6f 75 74 73 70 72 61  64 25 2c 22 2e 22 29 3d  |$outsprad%,".")=|
0000ffb0  30 20 85 20 34 32 2c 22  54 6f 20 73 61 76 65 2c  |0 . 42,"To save,|
0000ffc0  20 64 72 61 67 20 74 68  65 20 69 63 6f 6e 20 74  | drag the icon t|
0000ffd0  6f 20 61 20 64 69 72 65  63 74 6f 72 79 20 76 69  |o a directory vi|
0000ffe0  65 77 65 72 2e 22 0d 66  76 2e c8 99 20 22 4f 53  |ewer.".fv... "OS|
0000fff0  5f 53 70 72 69 74 65 4f  70 22 2c 26 31 30 43 2c  |_SpriteOp",&10C,|
00010000  67 72 61 62 61 72 65 61  25 2c 24 6f 75 74 73 70  |grabarea%,$outsp|
00010010  72 61 64 25 0d 66 80 0d  73 61 76 65 64 38 25 3d  |rad%.f..saved8%=|
00010020  b9 0d 66 8a 54 e7 20 63  66 73 69 64 25 20 8c 20  |..f.T. cfsid% . |
00010030  24 67 72 61 62 77 74 69  74 6c 65 61 64 25 3d 24  |$grabwtitlead%=$|
00010040  6f 75 74 73 70 72 61 64  25 2b 22 20 43 46 53 49  |outsprad%+" CFSI|
00010050  22 20 8b 20 24 67 72 61  62 77 74 69 74 6c 65 61  |" . $grabwtitlea|
00010060  64 25 3d 24 6f 75 74 73  70 72 61 64 25 2b 22 38  |d%=$outsprad%+"8|
00010070  20 62 69 74 22 0d 66 94  10 f2 75 70 64 61 74 65  | bit".f...update|
00010080  74 69 74 6c 65 0d 66 9e  05 e1 0d 66 a8 0e dd 20  |title.f....f... |
00010090  f2 73 61 76 65 72 61 77  0d 66 b2 4d e7 20 a7 24  |.saveraw.f.M. .$|
000100a0  6f 75 74 72 61 77 61 64  25 2c 22 2e 22 29 3d 30  |outrawad%,".")=0|
000100b0  20 85 20 34 32 2c 22 54  6f 20 73 61 76 65 2c 20  | . 42,"To save, |
000100c0  64 72 61 67 20 74 68 65  20 69 63 6f 6e 20 74 6f  |drag the icon to|
000100d0  20 61 20 64 69 72 65 63  74 6f 72 79 20 76 69 65  | a directory vie|
000100e0  77 65 72 2e 22 0d 66 bc  19 72 61 77 6f 75 74 25  |wer.".f..rawout%|
000100f0  3d ae 28 24 6f 75 74 72  61 77 61 64 25 29 0d 66  |=.($outrawad%).f|
00010100  c6 0e e7 20 73 6c 61 76  65 25 20 8c 0d 66 d0 32  |... slave% ..f.2|
00010110  72 61 77 69 6e 25 3d 8e  28 22 3c 46 61 73 74 47  |rawin%=.("<FastG|
00010120  72 61 62 24 44 69 72 3e  2e 52 65 73 6f 75 72 63  |rab$Dir>.Resourc|
00010130  65 73 2e 54 77 65 6c 76  65 42 69 74 22 29 0d 66  |es.TwelveBit").f|
00010140  da 35 e7 20 72 61 77 69  6e 25 3d 30 20 d9 23 72  |.5. rawin%=0 .#r|
00010150  61 77 6f 75 74 25 3a 85  20 32 31 34 2c 22 43 61  |awout%:. 214,"Ca|
00010160  63 68 65 20 66 69 6c 65  20 6e 6f 74 20 66 6f 75  |che file not fou|
00010170  6e 64 22 0d 66 e4 2e c8  99 20 22 4f 53 5f 47 42  |nd".f.... "OS_GB|
00010180  50 42 22 2c 34 2c 72 61  77 69 6e 25 2c 6c 69 76  |PB",4,rawin%,liv|
00010190  65 61 72 65 61 25 2b 31  30 30 2c 31 30 30 30 30  |earea%+100,10000|
000101a0  30 0d 66 ee 2f c8 99 20  22 4f 53 5f 47 42 50 42  |0.f./.. "OS_GBPB|
000101b0  22 2c 32 2c 72 61 77 6f  75 74 25 2c 6c 69 76 65  |",2,rawout%,live|
000101c0  61 72 65 61 25 2b 31 30  30 2c 31 30 30 30 30 30  |area%+100,100000|
000101d0  0d 66 f8 2d c8 99 20 22  4f 53 5f 47 42 50 42 22  |.f.-.. "OS_GBPB"|
000101e0  2c 34 2c 72 61 77 69 6e  25 2c 6c 69 76 65 61 72  |,4,rawin%,livear|
000101f0  65 61 25 2b 31 30 30 2c  39 36 36 32 38 0d 67 02  |ea%+100,96628.g.|
00010200  2e c8 99 20 22 4f 53 5f  47 42 50 42 22 2c 32 2c  |... "OS_GBPB",2,|
00010210  72 61 77 6f 75 74 25 2c  6c 69 76 65 61 72 65 61  |rawout%,livearea|
00010220  25 2b 31 30 30 2c 39 36  36 32 38 0d 67 0c 05 cc  |%+100,96628.g...|
00010230  0d 67 16 2c c8 99 20 22  4f 53 5f 47 42 50 42 22  |.g.,.. "OS_GBPB"|
00010240  2c 32 2c 72 61 77 6f 75  74 25 2c 72 61 77 61 72  |,2,rawout%,rawar|
00010250  65 61 25 2c 72 61 77 73  69 7a 65 25 0d 67 20 05  |ea%,rawsize%.g .|
00010260  cd 0d 67 2a 0d d9 23 72  61 77 6f 75 74 25 0d 67  |..g*..#rawout%.g|
00010270  34 0e 73 61 76 65 64 31  32 25 3d b9 0d 67 3e 60  |4.saved12%=..g>`|
00010280  e7 20 62 6f 61 72 64 5f  69 73 5f 31 36 5f 62 69  |. board_is_16_bi|
00010290  74 25 20 24 67 72 61 62  77 74 69 74 6c 65 61 64  |t% $grabwtitlead|
000102a0  25 3d 24 6f 75 74 72 61  77 61 64 25 2b 22 20 31  |%=$outrawad%+" 1|
000102b0  36 20 62 69 74 22 20 8b  20 24 67 72 61 62 77 74  |6 bit" . $grabwt|
000102c0  69 74 6c 65 61 64 25 3d  24 6f 75 74 72 61 77 61  |itlead%=$outrawa|
000102d0  64 25 2b 22 20 31 32 20  62 69 74 22 0d 67 48 10  |d%+" 12 bit".gH.|
000102e0  f2 75 70 64 61 74 65 74  69 74 6c 65 0d 67 52 05  |.updatetitle.gR.|
000102f0  e1 0d 67 5c 12 dd 20 f2  75 70 64 61 74 65 74 69  |..g\.. .updateti|
00010300  74 6c 65 0d 67 66 0f e7  20 77 25 28 35 2c 32 29  |tle.gf.. w%(5,2)|
00010310  20 8c 0d 67 70 10 21 6d  62 25 3d 77 25 28 35 2c  | ..gp.!mb%=w%(5,|
00010320  30 29 0d 67 7a 23 c8 99  20 22 57 69 6d 70 5f 47  |0).gz#.. "Wimp_G|
00010330  65 74 57 69 6e 64 6f 77  4f 75 74 6c 69 6e 65 22  |etWindowOutline"|
00010340  2c 2c 6d 62 25 0d 67 84  3a c8 99 20 22 57 69 6d  |,,mb%.g.:.. "Wim|
00010350  70 5f 46 6f 72 63 65 52  65 64 72 61 77 22 2c 2d  |p_ForceRedraw",-|
00010360  31 2c 6d 62 25 21 34 2c  6d 62 25 21 31 36 2d 34  |1,mb%!4,mb%!16-4|
00010370  38 2c 6d 62 25 21 31 32  2c 6d 62 25 21 31 36 0d  |8,mb%!12,mb%!16.|
00010380  67 8e 05 cd 0d 67 98 05  e1 0d 67 a2 13 dd 20 f2  |g....g....g... .|
00010390  69 6e 73 74 61 6c 6c 6f  6e 62 61 72 0d 67 ac 0b  |installonbar.g..|
000103a0  21 70 62 25 3d 2d 31 0d  67 b6 0b 70 62 25 21 34  |!pb%=-1.g..pb%!4|
000103b0  3d 30 0d 67 c0 0b 70 62  25 21 38 3d 30 0d 67 ca  |=0.g..pb%!8=0.g.|
000103c0  0d 70 62 25 21 31 32 3d  36 38 0d 67 d4 0d 70 62  |.pb%!12=68.g..pb|
000103d0  25 21 31 36 3d 36 38 0d  67 de 1f 70 62 25 21 32  |%!16=68.g..pb%!2|
000103e0  30 3d 25 31 30 30 30 30  30 30 31 30 20 84 20 25  |0=%100000010 . %|
000103f0  31 30 3c 3c 31 32 0d 67  e8 13 70 62 25 21 32 34  |10<<12.g..pb%!24|
00010400  3d 62 61 72 73 70 61 63  65 0d 67 f2 13 70 62 25  |=barspace.g..pb%|
00010410  21 32 38 3d 73 70 72 69  74 65 73 25 0d 67 fc 0d  |!28=sprites%.g..|
00010420  70 62 25 21 33 32 3d 31  31 0d 68 06 28 c8 99 20  |pb%!32=11.h.(.. |
00010430  22 57 69 6d 70 5f 43 72  65 61 74 65 49 63 6f 6e  |"Wimp_CreateIcon|
00010440  22 2c 2c 70 62 25 20 b8  20 69 63 6f 6e 62 61 72  |",,pb% . iconbar|
00010450  25 0d 68 10 0d 21 69 63  6f 6e 62 3d 2d 31 0d 68  |%.h..!iconb=-1.h|
00010460  1a 14 69 63 6f 6e 62 21  34 3d 69 63 6f 6e 62 61  |..iconb!4=iconba|
00010470  72 25 0d 68 24 05 e1 0d  68 2e 1a dd 20 f2 67 73  |r%.h$...h... .gs|
00010480  74 28 62 6c 6f 63 6b 25  2c 68 61 6e 64 6c 65 25  |t(block%,handle%|
00010490  29 0d 68 38 13 21 62 6c  6f 63 6b 25 3d 68 61 6e  |).h8.!block%=han|
000104a0  64 6c 65 25 0d 68 42 24  c8 99 20 22 57 69 6d 70  |dle%.hB$.. "Wimp|
000104b0  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
000104c0  2c 2c 62 6c 6f 63 6b 25  0d 68 4c 05 e1 0d 68 56  |,,block%.hL...hV|
000104d0  1b dd 20 a4 6f 70 65 6e  28 62 6c 6f 63 6b 25 2c  |.. .open(block%,|
000104e0  68 61 6e 64 6c 65 25 29  0d 68 60 18 f2 67 73 74  |handle%).h`..gst|
000104f0  28 62 6c 6f 63 6b 25 2c  68 61 6e 64 6c 65 25 29  |(block%,handle%)|
00010500  0d 68 6a 16 3d 62 6c 6f  63 6b 25 21 33 32 20 80  |.hj.=block%!32 .|
00010510  20 31 3c 3c 31 36 0d 68  74 04 0d 68 7e 21 dd 20  | 1<<16.ht..h~!. |
00010520  a4 63 6d 65 6e 75 28 6c  65 76 65 6c 25 2c 74 65  |.cmenu(level%,te|
00010530  78 74 24 2c 77 69 64 74  68 25 29 0d 68 88 53 ea  |xt$,width%).h.S.|
00010540  20 6e 65 77 74 65 78 74  24 2c 74 69 74 6c 65 24  | newtext$,title$|
00010550  2c 70 74 72 25 2c 73 68  61 64 65 25 2c 74 69 63  |,ptr%,shade%,tic|
00010560  6b 25 2c 64 6f 74 74 65  64 25 2c 73 75 62 6d 65  |k%,dotted%,subme|
00010570  6e 75 25 2c 77 72 69 74  61 62 6c 65 25 2c 72 6a  |nu%,writable%,rj|
00010580  75 73 74 25 2c 77 61 72  6e 6d 65 6e 75 25 0d 68  |ust%,warnmenu%.h|
00010590  92 10 e7 20 6c 65 76 65  6c 25 3d 30 20 8c 0d 68  |... level%=0 ..h|
000105a0  9c 1b 6c 6f 6e 67 70 6f  69 6e 74 65 72 25 3d 6c  |..longpointer%=l|
000105b0  6f 6e 67 69 74 65 6d 73  25 0d 68 a6 0f 6d 6e 62  |ongitems%.h..mnb|
000105c0  25 3d 6d 65 6e 75 62 25  0d 68 b0 05 cc 0d 68 ba  |%=menub%.h....h.|
000105d0  16 6d 6e 62 25 2b 3d 6d  61 78 6d 65 6e 75 73 69  |.mnb%+=maxmenusi|
000105e0  7a 65 25 0d 68 c4 05 cd  0d 68 ce 20 74 69 74 6c  |ze%.h....h. titl|
000105f0  65 24 3d c0 74 65 78 74  24 2c a7 74 65 78 74 24  |e$=.text$,.text$|
00010600  2c 22 7c 22 29 2d 31 29  0d 68 d8 1f 74 65 78 74  |,"|")-1).h..text|
00010610  24 3d c1 74 65 78 74 24  2c a7 74 65 78 74 24 2c  |$=.text$,.text$,|
00010620  22 7c 22 29 2b 31 29 0d  68 e2 15 24 6d 6e 62 25  |"|")+1).h..$mnb%|
00010630  3d c0 74 69 74 6c 65 24  2c 31 31 29 0d 68 ec 0d  |=.title$,11).h..|
00010640  6d 6e 62 25 3f 31 32 3d  37 0d 68 f6 0d 6d 6e 62  |mnb%?12=7.h..mnb|
00010650  25 3f 31 33 3d 32 0d 69  00 0d 6d 6e 62 25 3f 31  |%?13=2.i..mnb%?1|
00010660  34 3d 37 0d 69 0a 0d 6d  6e 62 25 3f 31 35 3d 30  |4=7.i..mnb%?15=0|
00010670  0d 69 14 12 6d 6e 62 25  21 31 36 3d 77 69 64 74  |.i..mnb%!16=widt|
00010680  68 25 0d 69 1e 0e 6d 6e  62 25 21 32 30 3d 34 34  |h%.i..mnb%!20=44|
00010690  0d 69 28 0d 6d 6e 62 25  21 32 34 3d 30 0d 69 32  |.i(.mnb%!24=0.i2|
000106a0  1f e7 20 c2 74 65 78 74  24 2c 31 29 3c 3e 22 7c  |.. .text$,1)<>"||
000106b0  22 20 74 65 78 74 24 2b  3d 22 7c 22 0d 69 3c 10  |" text$+="|".i<.|
000106c0  70 74 72 25 3d 6d 6e 62  25 2b 32 38 0d 69 46 05  |ptr%=mnb%+28.iF.|
000106d0  f5 0d 69 50 14 73 68 61  64 65 25 3d 30 3a 74 69  |..iP.shade%=0:ti|
000106e0  63 6b 25 3d 30 0d 69 5a  19 64 6f 74 74 65 64 25  |ck%=0.iZ.dotted%|
000106f0  3d 30 3a 77 72 69 74 61  62 6c 65 25 3d 30 0d 69  |=0:writable%=0.i|
00010700  64 18 72 6a 75 73 74 25  3d 30 3a 73 75 62 6d 65  |d.rjust%=0:subme|
00010710  6e 75 25 3d 2d 31 0d 69  6e 0f 77 61 72 6e 6d 65  |nu%=-1.in.warnme|
00010720  6e 75 25 3d 30 0d 69 78  1d c8 95 20 a7 22 3c 3e  |nu%=0.ix... ."<>|
00010730  3a 2a 27 a4 23 40 22 2c  c0 74 65 78 74 24 2c 31  |:*'.#@",.text$,1|
00010740  29 29 0d 69 82 12 c8 8e  20 c0 74 65 78 74 24 2c  |)).i.... .text$,|
00010750  31 29 20 ca 0d 69 8c 09  c9 20 22 3c 22 0d 69 96  |1) ..i... "<".i.|
00010760  12 73 68 61 64 65 25 3d  26 34 30 30 30 30 30 0d  |.shade%=&400000.|
00010770  69 a0 13 74 65 78 74 24  3d c1 74 65 78 74 24 2c  |i..text$=.text$,|
00010780  32 29 0d 69 aa 09 c9 20  22 3e 22 0d 69 b4 0b 74  |2).i... ">".i..t|
00010790  69 63 6b 25 3d 31 0d 69  be 13 74 65 78 74 24 3d  |ick%=1.i..text$=|
000107a0  c1 74 65 78 74 24 2c 32  29 0d 69 c8 09 c9 20 22  |.text$,2).i... "|
000107b0  3a 22 0d 69 d2 0d 64 6f  74 74 65 64 25 3d 32 0d  |:".i..dotted%=2.|
000107c0  69 dc 13 74 65 78 74 24  3d c1 74 65 78 74 24 2c  |i..text$=.text$,|
000107d0  32 29 0d 69 e6 09 c9 20  22 2a 22 0d 69 f0 0f 77  |2).i... "*".i..w|
000107e0  72 69 74 61 62 6c 65 25  3d 34 0d 69 fa 13 74 65  |ritable%=4.i..te|
000107f0  78 74 24 3d c1 74 65 78  74 24 2c 32 29 0d 6a 04  |xt$=.text$,2).j.|
00010800  09 c9 20 22 27 22 0d 6a  0e 13 74 65 78 74 24 3d  |.. "'".j..text$=|
00010810  c1 74 65 78 74 24 2c 32  29 0d 6a 18 29 6e 65 77  |.text$,2).j.)new|
00010820  74 65 78 74 24 3d a0 28  c0 c1 74 65 78 74 24 2c  |text$=.(..text$,|
00010830  35 29 2c a7 74 65 78 74  24 2c 22 27 22 29 2d 31  |5),.text$,"'")-1|
00010840  29 29 0d 6a 22 17 77 69  64 74 68 25 3d bb 28 c0  |)).j".width%=.(.|
00010850  74 65 78 74 24 2c 34 29  29 0d 6a 2c 1f 74 65 78  |text$,4)).j,.tex|
00010860  74 24 3d c1 74 65 78 74  24 2c a7 74 65 78 74 24  |t$=.text$,.text$|
00010870  2c 22 27 22 29 2b 31 29  0d 6a 36 2d 73 75 62 6d  |,"'")+1).j6-subm|
00010880  65 6e 75 25 3d a4 63 6d  65 6e 75 28 6c 65 76 65  |enu%=.cmenu(leve|
00010890  6c 25 2b 31 2c 6e 65 77  74 65 78 74 24 2c 77 69  |l%+1,newtext$,wi|
000108a0  64 74 68 25 29 0d 6a 40  09 c9 20 22 a4 22 0d 6a  |dth%).j@.. ".".j|
000108b0  4a 1b 73 75 62 6d 65 6e  75 25 3d bb 28 c1 74 65  |J.submenu%=.(.te|
000108c0  78 74 24 2c 32 2c 34 29  29 0d 6a 54 1c 74 65 78  |xt$,2,4)).jT.tex|
000108d0  74 24 3d c2 74 65 78 74  24 2c a9 28 74 65 78 74  |t$=.text$,.(text|
000108e0  24 29 2d 35 29 0d 6a 5e  09 c9 20 22 23 22 0d 6a  |$)-5).j^.. "#".j|
000108f0  68 0c 72 6a 75 73 74 25  3d 31 0d 6a 72 13 74 65  |h.rjust%=1.jr.te|
00010900  78 74 24 3d c1 74 65 78  74 24 2c 32 29 0d 6a 7c  |xt$=.text$,2).j||
00010910  09 c9 20 22 40 22 0d 6a  86 13 74 65 78 74 24 3d  |.. "@".j..text$=|
00010920  c1 74 65 78 74 24 2c 32  29 0d 6a 90 0f 77 61 72  |.text$,2).j..war|
00010930  6e 6d 65 6e 75 25 3d 38  0d 6a 9a 23 73 75 62 6d  |nmenu%=8.j.#subm|
00010940  65 6e 75 25 3d bb 28 c0  74 65 78 74 24 2c a7 74  |enu%=.(.text$,.t|
00010950  65 78 74 24 2c 22 27 22  29 29 29 0d 6a a4 1c e7  |ext$,"'"))).j...|
00010960  20 73 75 62 6d 65 6e 75  25 3d 30 20 73 75 62 6d  | submenu%=0 subm|
00010970  65 6e 75 25 3d 2d 31 0d  6a ae 1f 74 65 78 74 24  |enu%=-1.j..text$|
00010980  3d c1 74 65 78 74 24 2c  a7 74 65 78 74 24 2c 22  |=.text$,.text$,"|
00010990  27 22 29 2b 31 29 0d 6a  b8 05 cb 0d 6a c2 05 ce  |'")+1).j....j...|
000109a0  0d 6a cc 11 e7 20 77 72  69 74 61 62 6c 65 25 20  |.j... writable% |
000109b0  8c 0d 6a d6 12 69 25 3d  a7 74 65 78 74 24 2c 22  |..j..i%=.text$,"|
000109c0  2c 22 29 0d 6a e0 1b 70  74 72 25 21 31 32 3d a0  |,").j..ptr%!12=.|
000109d0  28 c0 74 65 78 74 24 2c  69 25 2d 31 29 29 0d 6a  |(.text$,i%-1)).j|
000109e0  ea 16 74 65 78 74 24 3d  c1 74 65 78 74 24 2c 69  |..text$=.text$,i|
000109f0  25 2b 31 29 0d 6a f4 12  69 25 3d a7 74 65 78 74  |%+1).j..i%=.text|
00010a00  24 2c 22 2c 22 29 0d 6a  fe 1b 70 74 72 25 21 31  |$,",").j..ptr%!1|
00010a10  36 3d a0 28 c0 74 65 78  74 24 2c 69 25 2d 31 29  |6=.(.text$,i%-1)|
00010a20  29 0d 6b 08 16 74 65 78  74 24 3d c1 74 65 78 74  |).k..text$=.text|
00010a30  24 2c 69 25 2b 31 29 0d  6b 12 22 70 74 72 25 21  |$,i%+1).k."ptr%!|
00010a40  32 30 3d a0 28 c0 74 65  78 74 24 2c a7 74 65 78  |20=.(.text$,.tex|
00010a50  74 24 2c 22 7c 22 29 29  29 0d 6b 1c 05 cc 0d 6b  |t$,"|"))).k....k|
00010a60  26 23 e7 20 a9 28 c0 74  65 78 74 24 2c a7 74 65  |&#. .(.text$,.te|
00010a70  78 74 24 2c 22 7c 22 29  2d 31 29 29 3e 31 31 20  |xt$,"|")-1))>11 |
00010a80  8c 0d 6b 30 0b 6c 6f 6e  67 25 3d 31 0d 6b 3a 2b  |..k0.long%=1.k:+|
00010a90  24 6c 6f 6e 67 70 6f 69  6e 74 65 72 25 3d c0 74  |$longpointer%=.t|
00010aa0  65 78 74 24 2c a7 74 65  78 74 24 2c 22 7c 22 29  |ext$,.text$,"|")|
00010ab0  2d 31 29 2b bd 31 33 0d  6b 44 18 70 74 72 25 21  |-1)+.13.kD.ptr%!|
00010ac0  31 32 3d 6c 6f 6e 67 70  6f 69 6e 74 65 72 25 0d  |12=longpointer%.|
00010ad0  6b 4e 15 70 74 72 25 21  31 36 3d 26 46 46 46 46  |kN.ptr%!16=&FFFF|
00010ae0  46 46 46 46 0d 6b 58 28  70 74 72 25 21 32 30 3d  |FFFF.kX(ptr%!20=|
00010af0  a9 28 c0 74 65 78 74 24  2c a7 74 65 78 74 24 2c  |.(.text$,.text$,|
00010b00  22 7c 22 29 2d 31 29 2b  bd 31 33 29 0d 6b 62 2e  |"|")-1)+.13).kb.|
00010b10  6c 6f 6e 67 70 6f 69 6e  74 65 72 25 2b 3d a9 28  |longpointer%+=.(|
00010b20  c0 74 65 78 74 24 2c a7  74 65 78 74 24 2c 22 7c  |.text$,.text$,"||
00010b30  22 29 2d 31 29 2b bd 31  33 29 0d 6b 6c 43 e7 20  |")-1)+.13).klC. |
00010b40  6c 6f 6e 67 70 6f 69 6e  74 65 72 25 3e 6c 6f 6e  |longpointer%>lon|
00010b50  67 69 74 65 6d 73 25 2b  6c 6f 6e 67 73 70 25 20  |gitems%+longsp% |
00010b60  85 20 30 2c 22 4d 65 6e  75 20 77 6f 72 6b 73 70  |. 0,"Menu worksp|
00010b70  61 63 65 20 65 78 63 65  65 64 65 64 22 0d 6b 76  |ace exceeded".kv|
00010b80  05 cc 0d 6b 80 0b 6c 6f  6e 67 25 3d 30 0d 6b 8a  |...k..long%=0.k.|
00010b90  29 24 28 70 74 72 25 2b  31 32 29 3d c0 c0 74 65  |)$(ptr%+12)=..te|
00010ba0  78 74 24 2c a7 74 65 78  74 24 2c 22 7c 22 29 2d  |xt$,.text$,"|")-|
00010bb0  31 29 2c 31 31 29 0d 6b  94 05 cd 0d 6b 9e 05 cd  |1),11).k....k...|
00010bc0  0d 6b a8 1f 74 65 78 74  24 3d c1 74 65 78 74 24  |.k..text$=.text$|
00010bd0  2c a7 74 65 78 74 24 2c  22 7c 22 29 2b 31 29 0d  |,.text$,"|")+1).|
00010be0  6b b2 46 21 70 74 72 25  3d 74 69 63 6b 25 20 84  |k.F!ptr%=tick% .|
00010bf0  20 64 6f 74 74 65 64 25  20 84 20 77 72 69 74 61  | dotted% . writa|
00010c00  62 6c 65 25 20 84 20 28  26 38 30 20 80 20 28 74  |ble% . (&80 . (t|
00010c10  65 78 74 24 3d 22 22 29  29 20 84 20 77 61 72 6e  |ext$="")) . warn|
00010c20  6d 65 6e 75 25 0d 6b bc  13 70 74 72 25 21 34 3d  |menu%.k..ptr%!4=|
00010c30  73 75 62 6d 65 6e 75 25  0d 6b c6 49 70 74 72 25  |submenu%.k.Iptr%|
00010c40  21 38 3d 73 68 61 64 65  25 20 84 20 77 72 69 74  |!8=shade% . writ|
00010c50  61 62 6c 65 25 3c 3c 36  20 84 20 6c 6f 6e 67 25  |able%<<6 . long%|
00010c60  3c 3c 38 20 84 20 26 30  31 30 30 32 31 20 84 20  |<<8 . &010021 . |
00010c70  72 6a 75 73 74 25 3c 3c  39 20 84 20 37 3c 3c 32  |rjust%<<9 . 7<<2|
00010c80  34 0d 6b d0 0c 70 74 72  25 2b 3d 32 34 0d 6b da  |4.k..ptr%+=24.k.|
00010c90  0e fd 20 74 65 78 74 24  3d 22 22 0d 6b e4 3f e7  |.. text$="".k.?.|
00010ca0  20 6c 65 76 65 6c 25 3d  30 20 c8 99 20 22 57 69  | level%=0 .. "Wi|
00010cb0  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 30  |mp_CreateMenu",0|
00010cc0  2c 6d 65 6e 75 62 25 2c  6d 6f 75 73 65 78 25 2d  |,menub%,mousex%-|
00010cd0  36 34 2c 6d 6f 75 73 65  79 25 0d 6b ee 09 3d 6d  |64,mousey%.k..=m|
00010ce0  6e 62 25 0d 6b f8 04 0d  6c 02 1f dd 20 f2 6d 65  |nb%.k...l... .me|
00010cf0  6e 75 28 77 69 6e 64 6f  77 25 2c 78 25 2c 79 25  |nu(window%,x%,y%|
00010d00  2c 73 75 62 25 29 0d 6c  0c 36 e7 20 6f 6c 64 6d  |,sub%).l.6. oldm|
00010d10  65 6e 75 25 3c 3e 2d 31  20 80 20 6f 6c 64 6d 65  |enu%<>-1 . oldme|
00010d20  6e 75 25 3c 3e 77 69 6e  64 6f 77 25 20 f2 64 77  |nu%<>window% .dw|
00010d30  69 6e 28 6f 6c 64 6d 65  6e 75 25 29 0d 6c 16 12  |in(oldmenu%).l..|
00010d40  f2 63 77 69 6e 28 77 69  6e 64 6f 77 25 29 0d 6c  |.cwin(window%).l|
00010d50  20 0c e7 20 73 75 62 25  20 8c 0d 6c 2a 30 c8 99  | .. sub% ..l*0..|
00010d60  20 22 57 69 6d 70 5f 43  72 65 61 74 65 53 75 62  | "Wimp_CreateSub|
00010d70  4d 65 6e 75 22 2c 2c 77  25 28 77 69 6e 64 6f 77  |Menu",,w%(window|
00010d80  25 2c 30 29 2c 78 25 2c  79 25 0d 6c 34 05 cc 0d  |%,0),x%,y%.l4...|
00010d90  6c 3e 2d c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |l>-.. "Wimp_Crea|
00010da0  74 65 4d 65 6e 75 22 2c  2c 77 25 28 77 69 6e 64  |teMenu",,w%(wind|
00010db0  6f 77 25 2c 30 29 2c 78  25 2c 79 25 0d 6c 48 05  |ow%,0),x%,y%.lH.|
00010dc0  cd 0d 6c 52 14 6f 6c 64  6d 65 6e 75 25 3d 77 69  |..lR.oldmenu%=wi|
00010dd0  6e 64 6f 77 25 0d 6c 5c  05 e1 0d 6c 66 04 0d 6c  |ndow%.l\...lf..l|
00010de0  70 11 dd 20 f2 6d 65 6e  75 73 65 6c 65 63 74 0d  |p.. .menuselect.|
00010df0  6c 7a 0d ea 20 61 64 6a  75 73 74 25 0d 6c 84 25  |lz.. adjust%.l.%|
00010e00  c8 99 20 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |.. "Wimp_GetPoin|
00010e10  74 65 72 49 6e 66 6f 22  2c 2c 6d 6f 75 73 65 62  |terInfo",,mouseb|
00010e20  25 0d 6c 8e 19 61 64 6a  75 73 74 25 3d 6d 6f 75  |%.l..adjust%=mou|
00010e30  73 65 62 25 21 38 20 80  20 31 0d 6c 98 11 c8 8e  |seb%!8 . 1.l....|
00010e40  20 6d 65 6e 74 79 70 65  25 20 ca 0d 6c a2 07 c9  | mentype% ..l...|
00010e50  20 30 0d 6c ac 0e 20 c8  8e 20 21 70 62 25 20 ca  | 0.l.. .. !pb% .|
00010e60  0d 6c b6 08 20 c9 20 30  0d 6c c0 0f 20 20 61 64  |.l.. . 0.l..  ad|
00010e70  6a 75 73 74 25 3d a3 0d  6c ca 1e 20 20 c8 99 20  |just%=..l..  .. |
00010e80  22 57 69 6d 70 5f 43 72  65 61 74 65 4d 65 6e 75  |"Wimp_CreateMenu|
00010e90  22 2c 2c 2d 31 0d 6c d4  27 20 20 f2 6d 65 6e 75  |",,-1.l.'  .menu|
00010ea0  28 31 33 2c 21 6d 6f 75  73 65 62 25 2d 36 34 2c  |(13,!mouseb%-64,|
00010eb0  6d 6f 75 73 65 62 25 21  34 2c 30 29 0d 6c de 08  |mouseb%!4,0).l..|
00010ec0  20 c9 20 31 0d 6c e8 13  20 20 f2 73 68 75 74 64  | . 1.l..  .shutd|
00010ed0  6f 77 6e 28 2d 31 29 0d  6c f2 06 20 cb 0d 6c fc  |own(-1).l.. ..l.|
00010ee0  07 c9 20 31 0d 6d 06 0e  20 c8 8e 20 21 70 62 25  |.. 1.m.. .. !pb%|
00010ef0  20 ca 0d 6d 10 08 20 c9  20 30 0d 6d 1a 0b 20 20  | ..m.. . 0.m..  |
00010f00  f2 67 72 61 62 0d 6d 24  08 20 c9 20 31 0d 6d 2e  |.grab.m$. . 1.m.|
00010f10  12 20 20 e7 20 70 62 25  21 34 3e 3d 30 20 8c 0d  |.  . pb%!4>=0 ..|
00010f20  6d 38 16 20 20 20 67 72  61 62 73 69 7a 65 25 3d  |m8.   grabsize%=|
00010f30  70 62 25 21 34 0d 6d 42  28 20 20 20 67 72 61 62  |pb%!4.mB(   grab|
00010f40  73 69 7a 65 24 3d a4 73  65 74 73 69 7a 65 6d 65  |size$=.setsizeme|
00010f50  6e 75 28 67 72 61 62 73  69 7a 65 25 29 0d 6d 4c  |nu(grabsize%).mL|
00010f60  07 20 20 cd 0d 6d 56 08  20 c9 20 32 0d 6d 60 12  |.  ..mV. . 2.m`.|
00010f70  20 20 e7 20 70 62 25 21  34 3e 3d 30 20 8c 0d 6d  |  . pb%!4>=0 ..m|
00010f80  6a 1a 20 20 20 e7 20 6c  69 76 65 73 69 7a 65 25  |j.   . livesize%|
00010f90  3e 70 62 25 21 34 20 8c  0d 6d 74 18 20 20 20 20  |>pb%!4 ..mt.    |
00010fa0  20 41 25 3d 6c 69 76 65  61 72 65 61 25 2b 36 30  | A%=livearea%+60|
00010fb0  0d 6d 7e 12 20 20 20 20  20 42 25 3d 26 32 30 31  |.m~.     B%=&201|
00010fc0  30 30 0d 6d 88 0f 20 20  20 20 20 d6 62 6c 61 6e  |00.m..     .blan|
00010fd0  6b 0d 6d 92 08 20 20 20  cd 0d 6d 9c 16 20 20 20  |k.m..   ..m..   |
00010fe0  6c 69 76 65 73 69 7a 65  25 3d 70 62 25 21 34 0d  |livesize%=pb%!4.|
00010ff0  6d a6 12 20 20 20 f2 61  64 6a 75 73 74 6c 69 76  |m..   .adjustliv|
00011000  65 0d 6d b0 28 20 20 20  6c 69 76 65 73 69 7a 65  |e.m.(   livesize|
00011010  24 3d a4 73 65 74 73 69  7a 65 6d 65 6e 75 28 6c  |$=.setsizemenu(l|
00011020  69 76 65 73 69 7a 65 25  29 0d 6d ba 07 20 20 cd  |ivesize%).m..  .|
00011030  0d 6d c4 08 20 c9 20 33  0d 6d ce 11 20 20 e7 20  |.m.. . 3.m..  . |
00011040  62 69 74 25 3d 31 32 20  8c 0d 6d d8 0d 20 20 20  |bit%=12 ..m..   |
00011050  62 69 74 25 3d 38 0d 6d  e2 20 20 20 20 f2 69 63  |bit%=8.m.    .ic|
00011060  6f 6e 73 65 74 28 34 2c  33 2c 31 3c 3c 32 31 2c  |onset(4,3,1<<21,|
00011070  31 3c 3c 32 31 29 0d 6d  ec 07 20 20 cc 0d 6d f6  |1<<21).m..  ..m.|
00011080  0e 20 20 20 62 69 74 25  3d 31 32 0d 6e 00 1c 20  |.   bit%=12.n.. |
00011090  20 20 f2 69 63 6f 6e 73  65 74 28 34 2c 33 2c 31  |  .iconset(4,3,1|
000110a0  3c 3c 32 31 2c 30 29 0d  6e 0a 07 20 20 cd 0d 6e  |<<21,0).n..  ..n|
000110b0  14 08 20 c9 20 34 0d 6e  1e 1d 20 20 64 69 74 68  |.. . 4.n..  dith|
000110c0  65 72 65 64 25 3d 64 69  74 68 65 72 65 64 25 20  |ered%=dithered% |
000110d0  82 20 31 0d 6e 28 16 20  20 f2 74 6f 67 67 6c 65  |. 1.n(.  .toggle|
000110e0  28 64 69 74 68 65 72 24  29 0d 6e 32 1c 20 20 f2  |(dither$).n2.  .|
000110f0  63 68 61 6e 67 65 5f 4c  43 41 28 64 69 74 68 65  |change_LCA(dithe|
00011100  72 65 64 25 29 0d 6e 3c  08 20 c9 20 35 0d 6e 46  |red%).n<. . 5.nF|
00011110  14 20 20 f2 74 6f 67 67  6c 65 28 6d 6f 6e 6f 24  |.  .toggle(mono$|
00011120  29 0d 6e 50 13 20 20 e7  20 6d 6f 6e 6f 24 3d 22  |).nP.  . mono$="|
00011130  3e 22 20 8c 0d 6e 5a 11  20 20 20 f2 6c 69 76 65  |>" ..nZ.   .live|
00011140  5f 67 72 65 79 0d 6e 64  20 20 20 20 f2 69 63 6f  |_grey.nd    .ico|
00011150  6e 73 65 74 28 34 2c 33  2c 31 3c 3c 32 32 2c 31  |nset(4,3,1<<22,1|
00011160  3c 3c 32 32 29 0d 6e 6e  20 20 20 20 f2 69 63 6f  |<<22).nn    .ico|
00011170  6e 73 65 74 28 34 2c 34  2c 31 3c 3c 32 32 2c 31  |nset(4,4,1<<22,1|
00011180  3c 3c 32 32 29 0d 6e 78  07 20 20 cc 0d 6e 82 13  |<<22).nx.  ..n..|
00011190  20 20 20 f2 6c 69 76 65  5f 63 6f 6c 6f 75 72 0d  |   .live_colour.|
000111a0  6e 8c 1c 20 20 20 f2 69  63 6f 6e 73 65 74 28 34  |n..   .iconset(4|
000111b0  2c 33 2c 31 3c 3c 32 32  2c 30 29 0d 6e 96 1c 20  |,3,1<<22,0).n.. |
000111c0  20 20 f2 69 63 6f 6e 73  65 74 28 34 2c 34 2c 31  |  .iconset(4,4,1|
000111d0  3c 3c 32 32 2c 30 29 0d  6e a0 07 20 20 cd 0d 6e  |<<22,0).n..  ..n|
000111e0  aa 1c 20 20 f2 63 68 61  6e 67 65 5f 4c 43 41 28  |..  .change_LCA(|
000111f0  64 69 74 68 65 72 65 64  25 29 0d 6e b4 08 20 c9  |dithered%).n.. .|
00011200  20 36 0d 6e be 10 20 20  c8 8e 20 70 62 25 21 34  | 6.n..  .. pb%!4|
00011210  20 ca 0d 6e c8 0a 20 20  c9 20 2d 31 0d 6e d2 14  | ..n..  . -1.n..|
00011220  20 20 20 e7 20 66 69 65  6c 64 24 3d 22 22 20 8c  |   . field$="" .|
00011230  0d 6e dc 12 20 20 20 20  66 69 65 6c 64 24 3d 22  |.n..    field$="|
00011240  3e 22 0d 6e e6 13 20 20  20 20 21 66 69 65 6c 64  |>".n..    !field|
00011250  69 6e 67 3d 31 0d 6e f0  08 20 20 20 cc 0d 6e fa  |ing=1.n..   ..n.|
00011260  11 20 20 20 20 66 69 65  6c 64 24 3d 22 22 0d 6f  |.    field$="".o|
00011270  04 13 20 20 20 20 21 66  69 65 6c 64 69 6e 67 3d  |..    !fielding=|
00011280  30 0d 6f 0e 08 20 20 20  cd 0d 6f 18 09 20 20 c9  |0.o..   ..o..  .|
00011290  20 30 0d 6f 22 1f 20 20  20 e7 20 66 69 65 6c 64  | 0.o".   . field|
000112a0  24 3d 22 22 20 8c 20 66  69 65 6c 64 24 3d 22 3e  |$="" . field$=">|
000112b0  22 0d 6f 2c 13 20 20 20  20 21 66 69 65 6c 64 69  |".o,.    !fieldi|
000112c0  6e 67 3d 31 0d 6f 36 14  20 20 20 20 21 65 76 65  |ng=1.o6.    !eve|
000112d0  6e 66 69 65 6c 64 3d 30  0d 6f 40 08 20 20 20 cc  |nfield=0.o@.   .|
000112e0  0d 6f 4a 13 20 20 20 20  21 66 69 65 6c 64 69 6e  |.oJ.    !fieldin|
000112f0  67 3d 30 0d 6f 54 08 20  20 20 cd 0d 6f 5e 09 20  |g=0.oT.   ..o^. |
00011300  20 c9 20 31 0d 6f 68 1f  20 20 20 e7 20 66 69 65  | . 1.oh.   . fie|
00011310  6c 64 24 3d 22 22 20 8c  20 66 69 65 6c 64 24 3d  |ld$="" . field$=|
00011320  22 3e 22 0d 6f 72 13 20  20 20 20 21 66 69 65 6c  |">".or.    !fiel|
00011330  64 69 6e 67 3d 31 0d 6f  7c 14 20 20 20 20 21 65  |ding=1.o|.    !e|
00011340  76 65 6e 66 69 65 6c 64  3d 31 0d 6f 86 08 20 20  |venfield=1.o..  |
00011350  20 cc 0d 6f 90 13 20 20  20 20 21 66 69 65 6c 64  | ..o..    !field|
00011360  69 6e 67 3d 30 0d 6f 9a  08 20 20 20 cd 0d 6f a4  |ing=0.o..   ..o.|
00011370  07 20 20 cb 0d 6f ae 10  20 20 f2 66 69 65 6c 64  |.  ..o..  .field|
00011380  6d 65 6e 75 0d 6f b8 08  20 c9 20 37 0d 6f c2 15  |menu.o.. . 7.o..|
00011390  20 20 f2 74 6f 67 67 6c  65 28 63 61 63 68 65 24  |  .toggle(cache$|
000113a0  29 0d 6f cc 08 20 c9 20  38 0d 6f d6 0f 20 20 f2  |).o.. . 8.o..  .|
000113b0  73 68 6f 77 67 72 61 62  0d 6f e0 09 20 c9 20 31  |showgrab.o.. . 1|
000113c0  30 0d 6f ea 13 20 20 e7  20 70 62 25 21 34 3c 3e  |0.o..  . pb%!4<>|
000113d0  2d 31 20 8c 0d 6f f4 36  20 20 20 c8 99 20 22 4f  |-1 ..o.6   .. "O|
000113e0  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
000113f0  6c 65 22 2c bb 28 24 6d  6f 64 65 62 25 29 2c 33  |le",.($modeb%),3|
00011400  20 b8 20 2c 2c 6e 63 6f  6c 25 0d 6f fe 14 20 20  | . ,,ncol%.o..  |
00011410  20 e7 20 6e 63 6f 6c 25  3c 3e 36 33 20 8c 0d 70  | . ncol%<>63 ..p|
00011420  08 16 20 20 20 20 24 28  6d 6f 64 65 62 25 29 3d  |..    $(modeb%)=|
00011430  22 31 35 22 0d 70 12 24  20 20 20 20 85 20 34 32  |"15".p.$    . 42|
00011440  2c 22 4e 6f 74 20 61 20  32 35 36 20 63 6f 6c 6f  |,"Not a 256 colo|
00011450  75 72 20 6d 6f 64 65 22  0d 70 1c 08 20 20 20 cd  |ur mode".p..   .|
00011460  0d 70 26 07 20 20 cd 0d  70 30 09 20 c9 20 31 32  |.p&.  ..p0. . 12|
00011470  0d 70 3a 12 20 20 f2 73  61 76 65 63 68 6f 69 63  |.p:.  .savechoic|
00011480  65 73 0d 70 44 09 20 c9  20 31 33 0d 70 4e 13 20  |es.pD. . 13.pN. |
00011490  20 e7 20 6c 74 6f 6f 6c  24 3d 22 22 20 8c 0d 70  | . ltool$="" ..p|
000114a0  58 11 20 20 20 6c 74 6f  6f 6c 24 3d 22 3e 22 0d  |X.   ltool$=">".|
000114b0  70 62 13 20 20 20 21 6d  62 25 3d 77 25 28 33 2c  |pb.   !mb%=w%(3,|
000114c0  30 29 0d 70 6c 24 20 20  20 c8 99 20 22 57 69 6d  |0).pl$   .. "Wim|
000114d0  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
000114e0  22 2c 2c 6d 62 25 0d 70  76 0f 20 20 20 f2 63 77  |",,mb%.pv.   .cw|
000114f0  69 6e 28 34 29 0d 70 80  13 20 20 20 21 6d 62 25  |in(4).p..   !mb%|
00011500  3d 77 25 28 34 2c 30 29  0d 70 8a 10 20 20 20 6d  |=w%(4,0).p..   m|
00011510  62 25 21 34 2d 3d 38 38  0d 70 94 16 20 20 20 6d  |b%!4-=88.p..   m|
00011520  62 25 21 31 32 3d 6d 62  25 21 34 2b 38 34 0d 70  |b%!12=mb%!4+84.p|
00011530  9e 0f 20 20 20 6d 62 25  21 32 30 3d 30 0d 70 a8  |..   mb%!20=0.p.|
00011540  0f 20 20 20 6d 62 25 21  32 34 3d 30 0d 70 b2 20  |.   mb%!24=0.p. |
00011550  20 20 20 c8 99 20 22 57  69 6d 70 5f 4f 70 65 6e  |   .. "Wimp_Open|
00011560  57 69 6e 64 6f 77 22 2c  2c 6d 62 25 0d 70 bc 07  |Window",,mb%.p..|
00011570  20 20 cc 0d 70 c6 10 20  20 20 6c 74 6f 6f 6c 24  |  ..p..   ltool$|
00011580  3d 22 22 0d 70 d0 0f 20  20 20 f2 64 77 69 6e 28  |="".p..   .dwin(|
00011590  34 29 0d 70 da 07 20 20  cd 0d 70 e4 06 20 cb 0d  |4).p..  ..p.. ..|
000115a0  70 ee 07 c9 20 32 0d 70  f8 0e 20 c8 8e 20 21 70  |p... 2.p.. .. !p|
000115b0  62 25 20 ca 0d 71 02 08  20 c9 20 37 0d 71 0c 0f  |b% ..q.. . 7.q..|
000115c0  20 20 61 64 6a 75 73 74  25 3d a3 0d 71 16 11 20  |  adjust%=..q.. |
000115d0  20 e7 20 67 72 61 62 31  32 25 20 8c 0d 71 20 15  | . grab12% ..q .|
000115e0  20 20 20 e7 20 ac 20 73  61 76 65 64 31 32 25 20  |   . . saved12% |
000115f0  8c 0d 71 2a 35 20 20 20  20 f2 71 75 65 72 79 28  |..q*5    .query(|
00011600  31 2c 22 44 6f 20 79 6f  75 20 77 61 6e 74 20 74  |1,"Do you want t|
00011610  6f 20 73 61 76 65 20 74  68 65 20 72 61 77 20 64  |o save the raw d|
00011620  61 74 61 3f 22 29 0d 71  34 08 20 20 20 cc 0d 71  |ata?").q4.   ..q|
00011630  3e 16 20 20 20 20 f2 64  65 6c 65 74 65 67 72 61  |>.    .deletegra|
00011640  62 62 65 64 0d 71 48 08  20 20 20 cd 0d 71 52 07  |bbed.qH.   ..qR.|
00011650  20 20 cc 0d 71 5c 14 20  20 20 e7 20 ac 20 73 61  |  ..q\.   . . sa|
00011660  76 65 64 38 25 20 8c 0d  71 66 33 20 20 20 20 f2  |ved8% ..qf3    .|
00011670  71 75 65 72 79 28 33 2c  22 44 6f 20 79 6f 75 20  |query(3,"Do you |
00011680  77 61 6e 74 20 74 6f 20  73 61 76 65 20 74 68 65  |want to save the|
00011690  20 73 70 72 69 74 65 3f  22 29 0d 71 70 08 20 20  | sprite?").qp.  |
000116a0  20 cc 0d 71 7a 16 20 20  20 20 f2 64 65 6c 65 74  | ..qz.    .delet|
000116b0  65 67 72 61 62 62 65 64  0d 71 84 08 20 20 20 cd  |egrabbed.q..   .|
000116c0  0d 71 8e 07 20 20 cd 0d  71 98 08 20 c9 20 38 0d  |.q..  ..q.. . 8.|
000116d0  71 a2 13 20 20 e7 20 67  74 6f 6f 6c 24 3d 22 22  |q..  . gtool$=""|
000116e0  20 8c 0d 71 ac 11 20 20  20 67 74 6f 6f 6c 24 3d  | ..q..   gtool$=|
000116f0  22 3e 22 0d 71 b6 13 20  20 20 21 6d 62 25 3d 77  |">".q..   !mb%=w|
00011700  25 28 35 2c 30 29 0d 71  c0 24 20 20 20 c8 99 20  |%(5,0).q.$   .. |
00011710  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
00011720  74 61 74 65 22 2c 2c 6d  62 25 0d 71 ca 0f 20 20  |tate",,mb%.q..  |
00011730  20 f2 63 77 69 6e 28 36  29 0d 71 d4 13 20 20 20  | .cwin(6).q..   |
00011740  21 6d 62 25 3d 77 25 28  36 2c 30 29 0d 71 de 10  |!mb%=w%(6,0).q..|
00011750  20 20 20 6d 62 25 21 34  2d 3d 38 38 0d 71 e8 16  |   mb%!4-=88.q..|
00011760  20 20 20 6d 62 25 21 31  32 3d 6d 62 25 21 34 2b  |   mb%!12=mb%!4+|
00011770  38 34 0d 71 f2 0f 20 20  20 6d 62 25 21 32 30 3d  |84.q..   mb%!20=|
00011780  30 0d 71 fc 0f 20 20 20  6d 62 25 21 32 34 3d 30  |0.q..   mb%!24=0|
00011790  0d 72 06 20 20 20 20 c8  99 20 22 57 69 6d 70 5f  |.r.    .. "Wimp_|
000117a0  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 6d 62 25  |OpenWindow",,mb%|
000117b0  0d 72 10 07 20 20 cc 0d  72 1a 10 20 20 20 67 74  |.r..  ..r..   gt|
000117c0  6f 6f 6c 24 3d 22 22 0d  72 24 0f 20 20 20 f2 64  |ool$="".r$.   .d|
000117d0  77 69 6e 28 36 29 0d 72  2e 07 20 20 cd 0d 72 38  |win(6).r..  ..r8|
000117e0  06 20 cb 0d 72 42 05 cb  0d 72 4c 1c e7 20 61 64  |. ..rB...rL.. ad|
000117f0  6a 75 73 74 25 20 80 20  28 ac 20 63 6c 6f 73 65  |just% . (. close|
00011800  25 29 20 8c 0d 72 56 12  20 c8 8e 20 6d 65 6e 74  |%) ..rV. .. ment|
00011810  79 70 65 25 20 ca 0d 72  60 08 20 c9 20 30 0d 72  |ype% ..r`. . 0.r|
00011820  6a 32 20 20 6d 65 6e 75  25 3d a4 63 6d 65 6e 75  |j2  menu%=.cmenu|
00011830  28 30 2c 22 46 61 73 74  47 72 61 62 7c 40 31 33  |(0,"FastGrab|@13|
00011840  27 49 6e 66 6f 7c 51 75  69 74 7c 22 2c 39 36 29  |'Info|Quit|",96)|
00011850  0d 72 74 08 20 c9 20 31  0d 72 7e 11 20 20 e7 20  |.rt. . 1.r~.  . |
00011860  62 69 74 25 3d 31 32 20  8c 0d 72 88 11 20 20 74  |bit%=12 ..r..  t|
00011870  69 63 6b 31 32 24 3d 22  3e 22 0d 72 92 14 20 20  |ick12$=">".r..  |
00011880  63 61 63 68 65 6d 24 3d  63 61 63 68 65 24 0d 72  |cachem$=cache$.r|
00011890  9c 07 20 20 cc 0d 72 a6  11 20 20 20 74 69 63 6b  |..  ..r..   tick|
000118a0  31 32 24 3d 22 22 0d 72  b0 12 20 20 20 63 61 63  |12$="".r..   cac|
000118b0  68 65 6d 24 3d 22 3c 22  0d 72 ba 07 20 20 cd 0d  |hem$="<".r..  ..|
000118c0  72 c4 26 20 20 e7 20 67  72 61 62 65 78 25 20 73  |r.&  . grabex% s|
000118d0  68 61 64 65 24 3d 22 22  20 8b 20 73 68 61 64 65  |hade$="" . shade|
000118e0  24 3d 22 3c 22 0d 72 ce  56 20 20 74 65 6d 70 30  |$="<".r.V  temp0|
000118f0  24 3d 22 46 61 73 74 47  72 61 62 7c 47 72 61 62  |$="FastGrab|Grab|
00011900  20 66 72 61 6d 65 7c 27  30 31 35 36 67 72 61 62  | frame|'0156grab|
00011910  73 69 7a 65 24 27 46 72  61 6d 65 20 73 69 7a 65  |size$'Frame size|
00011920  7c 27 30 31 35 36 6c 69  76 65 73 69 7a 65 24 27  ||'0156livesize$'|
00011930  4c 69 76 65 20 73 69 7a  65 7c 22 0d 72 d8 24 20  |Live size|".r.$ |
00011940  20 e7 20 6d 6f 6e 6f 24  3d 22 3e 22 20 8c 20 6d  | . mono$=">" . m|
00011950  73 24 3d 22 3c 22 20 8b  20 6d 73 24 3d 22 22 0d  |s$="<" . ms$="".|
00011960  72 e2 1a 20 20 e7 20 62  6f 61 72 64 5f 69 73 5f  |r..  . board_is_|
00011970  31 36 5f 62 69 74 25 20  8c 0d 72 ec fd 20 20 20  |16_bit% ..r..   |
00011980  74 65 6d 70 31 24 3d 6d  73 24 2b 74 69 63 6b 31  |temp1$=ms$+tick1|
00011990  32 24 2b 22 31 36 20 62  69 74 20 64 61 74 61 7c  |2$+"16 bit data||
000119a0  22 2b 6d 73 24 2b 64 69  74 68 65 72 24 2b 22 44  |"+ms$+dither$+"D|
000119b0  69 74 68 65 72 69 6e 67  7c 22 2b 6d 6f 6e 6f 24  |ithering|"+mono$|
000119c0  2b 22 4d 6f 6e 6f 63 68  72 6f 6d 65 7c 22 2b 66  |+"Monochrome|"+f|
000119d0  69 65 6c 64 24 2b 22 27  30 30 37 36 73 75 62 66  |ield$+"'0076subf|
000119e0  69 65 6c 64 24 27 53 69  6e 67 6c 65 20 66 69 65  |ield$'Single fie|
000119f0  6c 64 7c 22 2b 63 61 63  68 65 6d 24 2b 22 46 6f  |ld|"+cachem$+"Fo|
00011a00  72 63 65 20 63 61 63 68  65 69 6e 67 7c 22 2b 73  |rce cacheing|"+s|
00011a10  68 61 64 65 24 2b 22 53  68 6f 77 20 66 72 61 6d  |hade$+"Show fram|
00011a20  65 7c 40 32 27 50 41 4c  20 64 65 63 6f 64 65 72  |e|@2'PAL decoder|
00011a30  7c 27 30 30 36 30 73 75  62 6d 6f 64 65 24 27 47  ||'0060submode$'G|
00011a40  72 61 62 20 6d 6f 64 65  7c 40 31 37 27 56 39 20  |rab mode|@17'V9 |
00011a50  73 70 65 65 64 7c 53 61  76 65 20 63 68 6f 69 63  |speed|Save choic|
00011a60  65 73 7c 22 2b 6c 74 6f  6f 6c 24 2b 22 54 6f 6f  |es|"+ltool$+"Too|
00011a70  6c 62 6f 78 7c 22 0d 72  f6 07 20 20 cc 0d 73 00  |lbox|".r..  ..s.|
00011a80  f5 20 20 20 74 65 6d 70  31 24 3d 74 69 63 6b 31  |.   temp1$=tick1|
00011a90  32 24 2b 22 31 32 20 62  69 74 20 64 61 74 61 7c  |2$+"12 bit data||
00011aa0  22 2b 64 69 74 68 65 72  24 2b 22 44 69 74 68 65  |"+dither$+"Dithe|
00011ab0  72 69 6e 67 7c 22 2b 6d  6f 6e 6f 24 2b 22 4d 6f  |ring|"+mono$+"Mo|
00011ac0  6e 6f 63 68 72 6f 6d 65  7c 22 2b 66 69 65 6c 64  |nochrome|"+field|
00011ad0  24 2b 22 27 30 30 37 36  73 75 62 66 69 65 6c 64  |$+"'0076subfield|
00011ae0  24 27 53 69 6e 67 6c 65  20 66 69 65 6c 64 7c 22  |$'Single field|"|
00011af0  2b 63 61 63 68 65 6d 24  2b 22 46 6f 72 63 65 20  |+cachem$+"Force |
00011b00  63 61 63 68 65 69 6e 67  7c 22 2b 73 68 61 64 65  |cacheing|"+shade|
00011b10  24 2b 22 53 68 6f 77 20  66 72 61 6d 65 7c 40 32  |$+"Show frame|@2|
00011b20  27 50 41 4c 20 64 65 63  6f 64 65 72 7c 27 30 30  |'PAL decoder|'00|
00011b30  36 30 73 75 62 6d 6f 64  65 24 27 47 72 61 62 20  |60submode$'Grab |
00011b40  6d 6f 64 65 7c 40 31 37  27 56 39 20 73 70 65 65  |mode|@17'V9 spee|
00011b50  64 7c 53 61 76 65 20 63  68 6f 69 63 65 73 7c 22  |d|Save choices|"|
00011b60  2b 6c 74 6f 6f 6c 24 2b  22 54 6f 6f 6c 62 6f 78  |+ltool$+"Toolbox|
00011b70  7c 22 0d 73 0a 07 20 20  cd 0d 73 14 27 20 20 6d  ||".s..  ..s.'  m|
00011b80  65 6e 75 25 3d a4 63 6d  65 6e 75 28 30 2c 74 65  |enu%=.cmenu(0,te|
00011b90  6d 70 30 24 2b 74 65 6d  70 31 24 2c 32 33 36 29  |mp0$+temp1$,236)|
00011ba0  0d 73 1e 08 20 c9 20 32  0d 73 28 22 20 20 e7 20  |.s.. . 2.s("  . |
00011bb0  67 72 61 62 31 32 25 20  72 61 77 24 3d 22 22 20  |grab12% raw$="" |
00011bc0  8b 20 72 61 77 24 3d 22  3c 22 0d 73 32 60 20 20  |. raw$="<".s2`  |
00011bd0  74 65 6d 70 30 24 3d 22  46 61 73 74 47 72 61 62  |temp0$="FastGrab|
00011be0  7c 40 31 30 27 53 70 72  69 74 65 20 69 6e 66 6f  ||@10'Sprite info|
00011bf0  7c 40 39 27 5a 6f 6f 6d  7c 40 36 27 53 61 76 65  ||@9'Zoom|@6'Save|
00011c00  20 73 70 72 69 74 65 7c  40 31 27 22 2b 72 61 77  | sprite|@1'"+raw|
00011c10  24 2b 22 43 68 61 6e 67  65 46 53 49 7c 40 31 34  |$+"ChangeFSI|@14|
00011c20  27 43 72 65 64 69 74 73  7c 22 0d 73 3c 1a 20 20  |'Credits|".s<.  |
00011c30  e7 20 62 6f 61 72 64 5f  69 73 5f 31 36 5f 62 69  |. board_is_16_bi|
00011c40  74 25 20 8c 0d 73 46 60  20 20 20 74 65 6d 70 31  |t% ..sF`   temp1|
00011c50  24 3d 22 40 31 31 27 22  2b 72 61 77 24 2b 22 31  |$="@11'"+raw$+"1|
00011c60  36 20 62 69 74 20 69 6e  66 6f 7c 40 38 27 22 2b  |6 bit info|@8'"+|
00011c70  72 61 77 24 2b 22 53 61  76 65 20 72 61 77 20 64  |raw$+"Save raw d|
00011c80  61 74 61 7c 44 65 6c 65  74 65 20 69 6d 61 67 65  |ata|Delete image|
00011c90  7c 22 2b 67 74 6f 6f 6c  24 2b 22 54 6f 6f 6c 62  ||"+gtool$+"Toolb|
00011ca0  6f 78 7c 22 0d 73 50 07  20 20 cc 0d 73 5a 60 20  |ox|".sP.  ..sZ` |
00011cb0  20 20 74 65 6d 70 31 24  3d 22 40 31 31 27 22 2b  |  temp1$="@11'"+|
00011cc0  72 61 77 24 2b 22 31 32  20 62 69 74 20 69 6e 66  |raw$+"12 bit inf|
00011cd0  6f 7c 40 38 27 22 2b 72  61 77 24 2b 22 53 61 76  |o|@8'"+raw$+"Sav|
00011ce0  65 20 72 61 77 20 64 61  74 61 7c 44 65 6c 65 74  |e raw data|Delet|
00011cf0  65 20 69 6d 61 67 65 7c  22 2b 67 74 6f 6f 6c 24  |e image|"+gtool$|
00011d00  2b 22 54 6f 6f 6c 62 6f  78 7c 22 0d 73 64 07 20  |+"Toolbox|".sd. |
00011d10  20 cd 0d 73 6e 27 20 20  6d 65 6e 75 25 3d a4 63  | ..sn'  menu%=.c|
00011d20  6d 65 6e 75 28 30 2c 74  65 6d 70 30 24 2b 74 65  |menu(0,temp0$+te|
00011d30  6d 70 31 24 2c 32 32 30  29 0d 73 78 06 20 cb 0d  |mp1$,220).sx. ..|
00011d40  73 82 05 cd 0d 73 8c 05  e1 0d 73 96 04 0d 73 a0  |s....s....s...s.|
00011d50  16 dd 20 f2 74 6f 67 67  6c 65 28 f8 20 73 77 61  |.. .toggle(. swa|
00011d60  70 24 29 0d 73 aa 26 e7  20 73 77 61 70 24 3d 22  |p$).s.&. swap$="|
00011d70  3e 22 20 8c 20 73 77 61  70 24 3d 22 22 20 8b 20  |>" . swap$="" . |
00011d80  73 77 61 70 24 3d 22 3e  22 0d 73 b4 05 e1 0d 73  |swap$=">".s....s|
00011d90  be 04 0d 73 c8 14 dd 20  f2 63 77 69 6e 28 6e 75  |...s... .cwin(nu|
00011da0  6d 62 65 72 25 29 0d 73  d2 17 e7 20 ac 20 77 25  |mber%).s... . w%|
00011db0  28 6e 75 6d 62 65 72 25  2c 32 29 20 8c 0d 73 dc  |(number%,2) ..s.|
00011dc0  3c 20 c8 99 20 22 57 69  6d 70 5f 43 72 65 61 74  |< .. "Wimp_Creat|
00011dd0  65 57 69 6e 64 6f 77 22  2c 2c 77 25 28 6e 75 6d  |eWindow",,w%(num|
00011de0  62 65 72 25 2c 31 29 2b  34 20 b8 20 77 25 28 6e  |ber%,1)+4 . w%(n|
00011df0  75 6d 62 65 72 25 2c 30  29 0d 73 e6 21 20 21 77  |umber%,0).s.! !w|
00011e00  25 28 6e 75 6d 62 65 72  25 2c 31 29 3d 77 25 28  |%(number%,1)=w%(|
00011e10  6e 75 6d 62 65 72 25 2c  30 29 0d 73 f0 14 20 77  |number%,0).s.. w|
00011e20  25 28 6e 75 6d 62 65 72  25 2c 32 29 3d b9 0d 73  |%(number%,2)=..s|
00011e30  fa 05 cd 0d 74 04 05 e1  0d 74 0e 04 0d 74 18 14  |....t....t...t..|
00011e40  dd 20 f2 64 77 69 6e 28  6e 75 6d 62 65 72 25 29  |. .dwin(number%)|
00011e50  0d 74 22 15 e7 20 77 25  28 6e 75 6d 62 65 72 25  |.t".. w%(number%|
00011e60  2c 32 29 20 8c 0d 74 2c  2b 20 c8 99 20 22 57 69  |,2) ..t,+ .. "Wi|
00011e70  6d 70 5f 47 65 74 57 69  6e 64 6f 77 49 6e 66 6f  |mp_GetWindowInfo|
00011e80  22 2c 2c 77 25 28 6e 75  6d 62 65 72 25 2c 31 29  |",,w%(number%,1)|
00011e90  0d 74 36 2a 20 c8 99 20  22 57 69 6d 70 5f 44 65  |.t6* .. "Wimp_De|
00011ea0  6c 65 74 65 57 69 6e 64  6f 77 22 2c 2c 77 25 28  |leteWindow",,w%(|
00011eb0  6e 75 6d 62 65 72 25 2c  31 29 0d 74 40 14 20 77  |number%,1).t@. w|
00011ec0  25 28 6e 75 6d 62 65 72  25 2c 32 29 3d a3 0d 74  |%(number%,2)=..t|
00011ed0  4a 15 20 77 25 28 6e 75  6d 62 65 72 25 2c 30 29  |J. w%(number%,0)|
00011ee0  3d 2d 31 0d 74 54 05 cd  0d 74 5e 05 e1 0d 74 68  |=-1.tT...t^...th|
00011ef0  04 0d 74 72 15 dd 20 f2  63 6c 77 69 6e 28 6e 75  |..tr.. .clwin(nu|
00011f00  6d 62 65 72 25 29 0d 74  7c 15 e7 20 77 25 28 6e  |mber%).t|.. w%(n|
00011f10  75 6d 62 65 72 25 2c 32  29 20 8c 0d 74 86 2b 20  |umber%,2) ..t.+ |
00011f20  c8 99 20 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |.. "Wimp_GetWind|
00011f30  6f 77 49 6e 66 6f 22 2c  2c 77 25 28 6e 75 6d 62  |owInfo",,w%(numb|
00011f40  65 72 25 2c 31 29 0d 74  90 29 20 c8 99 20 22 57  |er%,1).t.) .. "W|
00011f50  69 6d 70 5f 43 6c 6f 73  65 57 69 6e 64 6f 77 22  |imp_CloseWindow"|
00011f60  2c 2c 77 25 28 6e 75 6d  62 65 72 25 2c 31 29 0d  |,,w%(number%,1).|
00011f70  74 9a 05 cd 0d 74 a4 05  e1 0d 74 ae 04 0d 74 b8  |t....t....t...t.|
00011f80  10 dd 20 f2 66 69 65 6c  64 6d 65 6e 75 0d 74 c2  |.. .fieldmenu.t.|
00011f90  16 73 75 62 66 69 65 6c  64 24 3d 22 46 69 65 6c  |.subfield$="Fiel|
00011fa0  64 7c 22 0d 74 cc 13 e7  20 21 66 69 65 6c 64 69  |d|".t... !fieldi|
00011fb0  6e 67 3d 30 20 8c 0d 74  d6 1b 20 73 75 62 66 69  |ng=0 ..t.. subfi|
00011fc0  65 6c 64 24 2b 3d 22 45  76 65 6e 7c 4f 64 64 7c  |eld$+="Even|Odd||
00011fd0  22 0d 74 e0 05 cc 0d 74  ea 13 20 e7 20 21 65 76  |".t....t.. . !ev|
00011fe0  65 6e 66 69 65 6c 64 20  8c 0d 74 f4 1d 20 20 73  |enfield ..t..  s|
00011ff0  75 62 66 69 65 6c 64 24  2b 3d 22 45 76 65 6e 7c  |ubfield$+="Even||
00012000  3e 4f 64 64 7c 22 0d 74  fe 06 20 cc 0d 75 08 1d  |>Odd|".t.. ..u..|
00012010  20 20 73 75 62 66 69 65  6c 64 24 2b 3d 22 3e 45  |  subfield$+=">E|
00012020  76 65 6e 7c 4f 64 64 7c  22 0d 75 12 06 20 cd 0d  |ven|Odd|".u.. ..|
00012030  75 1c 05 cd 0d 75 26 05  e1 0d 75 30 04 0d 75 3a  |u....u&...u0..u:|
00012040  1a dd 20 a4 73 65 74 73  69 7a 65 6d 65 6e 75 28  |.. .setsizemenu(|
00012050  76 61 6c 75 65 25 29 0d  75 44 0b ea 20 73 69 7a  |value%).uD.. siz|
00012060  65 24 0d 75 4e 0f c8 8e  20 76 61 6c 75 65 25 20  |e$.uN... value% |
00012070  ca 0d 75 58 07 c9 20 30  0d 75 62 2c 20 73 69 7a  |..uX.. 0.ub, siz|
00012080  65 24 3d 22 3e 35 31 32  20 d7 20 32 35 36 7c 32  |e$=">512 . 256|2|
00012090  35 36 20 d7 20 31 32 38  7c 31 32 38 20 d7 20 20  |56 . 128|128 .  |
000120a0  36 34 7c 22 0d 75 6c 07  c9 20 31 0d 75 76 2c 20  |64|".ul.. 1.uv, |
000120b0  73 69 7a 65 24 3d 22 35  31 32 20 d7 20 32 35 36  |size$="512 . 256|
000120c0  7c 3e 32 35 36 20 d7 20  31 32 38 7c 31 32 38 20  ||>256 . 128|128 |
000120d0  d7 20 20 36 34 7c 22 0d  75 80 07 c9 20 32 0d 75  |.  64|".u... 2.u|
000120e0  8a 2c 20 73 69 7a 65 24  3d 22 35 31 32 20 d7 20  |., size$="512 . |
000120f0  32 35 36 7c 32 35 36 20  d7 20 31 32 38 7c 3e 31  |256|256 . 128|>1|
00012100  32 38 20 d7 20 20 36 34  7c 22 0d 75 94 07 c9 20  |28 .  64|".u... |
00012110  33 0d 75 9e 2c 20 73 69  7a 65 24 3d 22 35 31 32  |3.u., size$="512|
00012120  20 d7 20 32 35 36 7c 32  35 36 20 d7 20 31 32 38  | . 256|256 . 128|
00012130  7c 31 32 38 20 d7 20 20  36 34 7c 3e 22 0d 75 a8  ||128 .  64|>".u.|
00012140  05 7f 0d 75 b2 1d 20 85  20 30 2c 22 49 6e 76 61  |...u.. . 0,"Inva|
00012150  6c 69 64 20 66 72 61 6d  65 20 73 69 7a 65 22 0d  |lid frame size".|
00012160  75 bc 05 cb 0d 75 c6 1e  3d 22 53 69 7a 65 7c 22  |u....u..="Size|"|
00012170  2b 73 69 7a 65 24 2b 22  20 36 34 20 d7 20 20 33  |+size$+" 64 .  3|
00012180  32 22 0d 75 d0 04 0d 75  da 12 dd 20 f2 6d 65 6e  |2".u...u... .men|
00012190  75 77 61 72 6e 69 6e 67  0d 75 e4 22 f2 6d 65 6e  |uwarning.u.".men|
000121a0  75 28 70 62 25 21 32 30  2c 70 62 25 21 32 34 2c  |u(pb%!20,pb%!24,|
000121b0  70 62 25 21 32 38 2c 2d  31 29 0d 75 ee 05 e1 0d  |pb%!28,-1).u....|
000121c0  75 f8 04 0d 76 02 12 dd  20 f2 73 61 76 65 63 68  |u...v... .savech|
000121d0  6f 69 63 65 73 0d 76 0c  2f 6f 75 74 63 25 3d ae  |oices.v./outc%=.|
000121e0  28 22 3c 46 61 73 74 47  72 61 62 24 44 69 72 3e  |("<FastGrab$Dir>|
000121f0  2e 52 65 73 6f 75 72 63  65 73 2e 43 68 6f 69 63  |.Resources.Choic|
00012200  65 73 22 29 0d 76 16 15  d5 23 6f 75 74 63 25 2c  |es").v...#outc%,|
00012210  bb 24 6d 6f 64 65 61 64  25 0d 76 20 12 f1 23 6f  |.$modead%.v ..#o|
00012220  75 74 63 25 2c 24 78 31  61 64 25 0d 76 2a 12 f1  |utc%,$x1ad%.v*..|
00012230  23 6f 75 74 63 25 2c 24  79 31 61 64 25 0d 76 34  |#outc%,$y1ad%.v4|
00012240  12 f1 23 6f 75 74 63 25  2c 24 78 32 61 64 25 0d  |..#outc%,$x2ad%.|
00012250  76 3e 12 f1 23 6f 75 74  63 25 2c 24 79 32 61 64  |v>..#outc%,$y2ad|
00012260  25 0d 76 48 11 c8 8e 20  6f 75 74 6d 6f 64 65 24  |%.vH... outmode$|
00012270  20 ca 0d 76 52 09 c9 20  22 20 22 0d 76 5c 0e 20  | ..vR.. " ".v\. |
00012280  6f 75 74 73 65 74 25 3d  30 0d 76 66 09 c9 20 22  |outset%=0.vf.. "|
00012290  43 22 0d 76 70 0e 20 6f  75 74 73 65 74 25 3d 31  |C".vp. outset%=1|
000122a0  0d 76 7a 09 c9 20 22 44  22 0d 76 84 0e 20 6f 75  |.vz.. "D".v.. ou|
000122b0  74 73 65 74 25 3d 32 0d  76 8e 09 c9 20 22 54 22  |tset%=2.v... "T"|
000122c0  0d 76 98 0e 20 6f 75 74  73 65 74 25 3d 33 0d 76  |.v.. outset%=3.v|
000122d0  a2 09 c9 20 22 50 22 0d  76 ac 25 20 6f 75 74 73  |... "P".v.% outs|
000122e0  65 74 25 3d 30 3a f4 20  43 61 6e 6e 6f 74 20 62  |et%=0:. Cannot b|
000122f0  65 20 75 73 65 64 20 68  65 72 65 21 0d 76 b6 05  |e used here!.v..|
00012300  cb 0d 76 c0 85 d5 23 6f  75 74 63 25 2c 6f 75 74  |..v...#outc%,out|
00012310  73 65 74 25 20 84 20 a4  73 65 6c 65 63 74 65 64  |set% . .selected|
00012320  28 31 31 29 3c 3c 32 20  84 20 a4 73 65 6c 65 63  |(11)<<2 . .selec|
00012330  74 65 64 28 31 32 29 3c  3c 33 20 84 20 a4 73 65  |ted(12)<<3 . .se|
00012340  6c 65 63 74 65 64 28 31  33 29 3c 3c 34 20 84 20  |lected(13)<<4 . |
00012350  a4 73 65 6c 65 63 74 65  64 28 31 34 29 3c 3c 35  |.selected(14)<<5|
00012360  20 84 20 a4 73 65 6c 65  63 74 65 64 28 31 35 29  | . .selected(15)|
00012370  3c 3c 36 20 84 20 a4 73  65 6c 65 63 74 65 64 28  |<<6 . .selected(|
00012380  31 36 29 3c 3c 37 0d 76  ca 64 d5 23 6f 75 74 63  |16)<<7.v.d.#outc|
00012390  25 2c a4 73 65 6c 65 63  74 65 64 28 35 29 20 84  |%,.selected(5) .|
000123a0  20 a4 73 65 6c 65 63 74  65 64 28 32 33 29 3c 3c  | .selected(23)<<|
000123b0  31 20 84 20 a4 73 65 6c  65 63 74 65 64 28 32 34  |1 . .selected(24|
000123c0  29 3c 3c 32 20 84 20 a4  73 65 6c 65 63 74 65 64  |)<<2 . .selected|
000123d0  28 32 35 29 3c 3c 33 20  84 20 a4 73 65 6c 65 63  |(25)<<3 . .selec|
000123e0  74 65 64 28 32 37 29 3c  3c 34 0d 76 d4 1a d5 23  |ted(27)<<4.v...#|
000123f0  6f 75 74 63 25 2c bb 28  24 73 68 61 72 70 65 6e  |outc%,.($sharpen|
00012400  61 64 25 29 0d 76 de 17  d5 23 6f 75 74 63 25 2c  |ad%).v...#outc%,|
00012410  62 72 69 67 68 74 6e 65  73 73 25 0d 76 e8 1c 73  |brightness%.v..s|
00012420  61 76 65 64 62 72 69 67  68 74 25 3d 62 72 69 67  |avedbright%=brig|
00012430  68 74 6e 65 73 73 25 0d  76 f2 15 d5 23 6f 75 74  |htness%.v...#out|
00012440  63 25 2c 63 6f 6e 74 72  61 73 74 25 0d 76 fc 18  |c%,contrast%.v..|
00012450  73 61 76 65 64 63 6f 6e  74 25 3d 63 6f 6e 74 72  |savedcont%=contr|
00012460  61 73 74 25 0d 77 06 11  e7 20 6d 6f 6e 6f 24 3d  |ast%.w... mono$=|
00012470  22 3e 22 20 8c 0d 77 10  15 20 d5 23 6f 75 74 63  |">" ..w.. .#outc|
00012480  25 2c 6f 6c 64 5f 73 61  74 25 0d 77 1a 05 cc 0d  |%,old_sat%.w....|
00012490  77 24 18 20 d5 23 6f 75  74 63 25 2c 73 61 74 75  |w$. .#outc%,satu|
000124a0  72 61 74 69 6f 6e 25 0d  77 2e 05 cd 0d 77 38 19  |ration%.w....w8.|
000124b0  73 61 76 65 64 73 61 74  25 3d 73 61 74 75 72 61  |savedsat%=satura|
000124c0  74 69 6f 6e 25 0d 77 42  93 d5 23 6f 75 74 63 25  |tion%.wB..#outc%|
000124d0  2c 94 28 62 69 74 25 3d  31 32 29 20 84 20 94 28  |,.(bit%=12) . .(|
000124e0  6c 74 6f 6f 6c 24 3d 22  3e 22 29 3c 3c 31 20 84  |ltool$=">")<<1 .|
000124f0  20 94 28 67 74 6f 6f 6c  24 3d 22 3e 22 29 3c 3c  | .(gtool$=">")<<|
00012500  32 20 84 20 94 28 63 61  63 68 65 24 3d 22 3e 22  |2 . .(cache$=">"|
00012510  29 3c 3c 33 20 84 20 94  28 66 69 65 6c 64 24 3d  |)<<3 . .(field$=|
00012520  22 3e 22 29 3c 3c 34 20  84 20 21 65 76 65 6e 66  |">")<<4 . !evenf|
00012530  69 65 6c 64 3c 3c 35 20  84 20 64 69 74 68 65 72  |ield<<5 . dither|
00012540  65 64 25 3c 3c 36 20 84  20 94 28 6d 6f 6e 6f 24  |ed%<<6 . .(mono$|
00012550  3d 22 3e 22 29 3c 3c 37  0d 77 4c 12 d5 23 6f 75  |=">")<<7.wL..#ou|
00012560  74 63 25 2c 73 70 65 65  64 25 0d 77 56 16 d5 23  |tc%,speed%.wV..#|
00012570  6f 75 74 63 25 2c bb 28  24 6d 6f 64 65 62 25 29  |outc%,.($modeb%)|
00012580  0d 77 60 15 d5 23 6f 75  74 63 25 2c 67 72 61 62  |.w`..#outc%,grab|
00012590  73 69 7a 65 25 0d 77 6a  15 d5 23 6f 75 74 63 25  |size%.wj..#outc%|
000125a0  2c 6c 69 76 65 73 69 7a  65 25 0d 77 74 19 d5 23  |,livesize%.wt..#|
000125b0  6f 75 74 63 25 2c a4 73  65 6c 65 63 74 65 64 28  |outc%,.selected(|
000125c0  32 36 29 0d 77 7e 19 d5  23 6f 75 74 63 25 2c a4  |26).w~..#outc%,.|
000125d0  73 65 6c 65 63 74 65 64  28 32 37 29 0d 77 88 19  |selected(27).w..|
000125e0  d5 23 6f 75 74 63 25 2c  a4 73 65 6c 65 63 74 65  |.#outc%,.selecte|
000125f0  64 28 32 38 29 0d 77 92  16 d5 23 6f 75 74 63 25  |d(28).w...#outc%|
00012600  2c bb 24 62 6c 61 63 6b  61 64 25 0d 77 9c 19 d5  |,.$blackad%.w...|
00012610  23 6f 75 74 63 25 2c a4  73 65 6c 65 63 74 65 64  |#outc%,.selected|
00012620  28 32 39 29 0d 77 a6 15  f1 23 6f 75 74 63 25 2c  |(29).w...#outc%,|
00012630  24 67 61 6d 6d 61 61 64  25 0d 77 b0 19 d5 23 6f  |$gammaad%.w...#o|
00012640  75 74 63 25 2c a4 73 65  6c 65 63 74 65 64 28 33  |utc%,.selected(3|
00012650  32 29 0d 77 ba 0b d9 23  6f 75 74 63 25 0d 77 c4  |2).w...#outc%.w.|
00012660  05 e1 0d 77 ce 04 0d 77  d8 12 dd 20 f2 65 72 72  |...w...w... .err|
00012670  6f 72 28 61 72 67 25 29  0d 77 e2 0c e7 20 61 72  |or(arg%).w... ar|
00012680  67 25 20 8c 0d 77 ec 13  20 f2 63 6c 6f 73 65 6f  |g% ..w.. .closeo|
00012690  70 65 6e 28 63 25 29 0d  77 f6 2d 20 e7 20 eb 3c  |pen(c%).w.- . .<|
000126a0  3e 6f 6c 64 6d 6f 64 65  25 20 c8 99 20 22 57 69  |>oldmode% .. "Wi|
000126b0  6d 70 5f 53 65 74 4d 6f  64 65 22 2c 6f 6c 64 6d  |mp_SetMode",oldm|
000126c0  6f 64 65 25 0d 78 00 0b  20 21 6d 62 25 3d 30 0d  |ode%.x.. !mb%=0.|
000126d0  78 0a 05 cd 0d 78 14 0a  c8 8e 20 9f 20 ca 0d 78  |x....x.... . ..x|
000126e0  1e 0a c9 20 26 31 45 36  0d 78 28 0d 20 66 6c 61  |... &1E6.x(. fla|
000126f0  67 73 25 3d 31 0d 78 32  57 20 24 28 6d 62 25 2b  |gs%=1.x2W $(mb%+|
00012700  34 29 3d 22 46 61 73 74  47 72 61 62 20 72 65 71  |4)="FastGrab req|
00012710  75 69 72 65 73 20 74 68  65 20 57 69 6c 64 20 56  |uires the Wild V|
00012720  69 73 69 6f 6e 20 48 61  77 6b 20 56 39 20 61 6e  |ision Hawk V9 an|
00012730  64 20 69 74 73 20 6d 6f  64 75 6c 65 20 74 6f 20  |d its module to |
00012740  62 65 20 70 72 65 73 65  6e 74 2e 22 0d 78 3c 08  |be present.".x<.|
00012750  c9 20 31 31 0d 78 46 0f  20 e7 20 64 65 62 75 67  |. 11.xF. . debug|
00012760  25 20 8c 0d 78 50 0d 20  66 6c 61 67 73 25 3d 32  |% ..xP. flags%=2|
00012770  0d 78 5a 35 20 24 28 6d  62 25 2b 34 29 3d 22 49  |.xZ5 $(mb%+4)="I|
00012780  74 27 73 20 66 61 6c 6c  65 6e 20 6f 76 65 72 20  |t's fallen over |
00012790  61 74 20 6c 69 6e 65 20  22 2b c3 28 9e 29 2b 22  |at line "+.(.)+"|
000127a0  20 22 2b f6 24 0d 78 64  05 cc 0d 78 6e 0d 20 66  | "+.$.xd...xn. f|
000127b0  6c 61 67 73 25 3d 31 0d  78 78 3b 20 24 28 6d 62  |lags%=1.xx; $(mb|
000127c0  25 2b 34 29 3d 22 43 61  6e 6e 6f 74 20 63 6c 61  |%+4)="Cannot cla|
000127d0  69 6d 20 65 6e 6f 75 67  68 20 6d 65 6d 6f 72 79  |im enough memory|
000127e0  20 74 6f 20 70 72 6f 63  65 73 73 20 69 6d 61 67  | to process imag|
000127f0  65 22 0d 78 82 05 cd 0d  78 8c 08 c9 20 34 32 0d  |e".x....x... 42.|
00012800  78 96 0d 20 66 6c 61 67  73 25 3d 31 0d 78 a0 10  |x.. flags%=1.x..|
00012810  20 24 28 6d 62 25 2b 34  29 3d f6 24 0d 78 aa 09  | $(mb%+4)=.$.x..|
00012820  c9 20 32 31 34 0d 78 b4  0d 20 66 6c 61 67 73 25  |. 214.x.. flags%|
00012830  3d 31 0d 78 be 10 20 24  28 6d 62 25 2b 34 29 3d  |=1.x.. $(mb%+4)=|
00012840  f6 24 0d 78 c8 0d c9 20  32 32 33 2c 31 38 33 0d  |.$.x... 223,183.|
00012850  78 d2 0d 20 66 6c 61 67  73 25 3d 31 0d 78 dc 26  |x.. flags%=1.x.&|
00012860  20 24 28 6d 62 25 2b 34  29 3d 22 55 6e 65 78 70  | $(mb%+4)="Unexp|
00012870  65 63 74 65 64 20 65 6e  64 20 6f 66 20 66 69 6c  |ected end of fil|
00012880  65 22 0d 78 e6 09 c9 20  36 34 33 0d 78 f0 0d 20  |e".x... 643.x.. |
00012890  66 6c 61 67 73 25 3d 31  0d 78 fa 32 20 24 28 6d  |flags%=1.x.2 $(m|
000128a0  62 25 2b 34 29 3d 22 54  6f 6f 20 6d 61 6e 79 20  |b%+4)="Too many |
000128b0  77 69 6e 64 6f 77 73 20  68 61 76 65 20 62 65 65  |windows have bee|
000128c0  6e 20 63 72 65 61 74 65  64 22 0d 79 04 0a c9 20  |n created".y... |
000128d0  31 38 30 30 0d 79 0e 0d  20 66 6c 61 67 73 25 3d  |1800.y.. flags%=|
000128e0  31 0d 79 18 40 20 24 28  6d 62 25 2b 34 29 3d 22  |1.y.@ $(mb%+4)="|
000128f0  43 61 6e 6e 6f 74 20 67  72 61 62 20 69 6e 20 74  |Cannot grab in t|
00012900  68 69 73 20 6d 6f 64 65  20 2d 20 75 73 69 6e 67  |his mode - using|
00012910  20 6d 6f 64 65 20 31 35  20 69 6e 73 74 65 61 64  | mode 15 instead|
00012920  22 0d 79 22 14 20 67 72  61 62 61 72 65 61 25 21  |".y". grabarea%!|
00012930  35 36 3d 31 35 0d 79 2c  0c c9 20 26 31 30 38 43  |56=15.y,.. &108C|
00012940  32 0d 79 36 2f 20 24 28  6d 62 25 2b 34 29 3d 22  |2.y6/ $(mb%+4)="|
00012950  46 69 6c 65 20 6f 70 65  6e 20 2d 20 63 6f 75 6c  |File open - coul|
00012960  64 20 6e 6f 74 20 73 61  76 65 20 66 69 6c 65 22  |d not save file"|
00012970  0d 79 40 0d 20 66 6c 61  67 73 25 3d 31 0d 79 4a  |.y@. flags%=1.yJ|
00012980  0c c9 20 26 31 30 43 38  35 0d 79 54 21 20 24 28  |.. &10C85.yT! $(|
00012990  6d 62 25 2b 34 29 3d 22  54 79 70 65 73 20 64 6f  |mb%+4)="Types do|
000129a0  6e 27 74 20 6d 61 74 63  68 22 0d 79 5e 0d 20 66  |n't match".y^. f|
000129b0  6c 61 67 73 25 3d 31 0d  79 68 0c c9 20 26 31 30  |lags%=1.yh.. &10|
000129c0  38 43 36 0d 79 72 2f 20  24 28 6d 62 25 2b 34 29  |8C6.yr/ $(mb%+4)|
000129d0  3d 22 44 69 73 63 20 66  75 6c 6c 20 2d 20 63 6f  |="Disc full - co|
000129e0  75 6c 64 20 6e 6f 74 20  73 61 76 65 20 66 69 6c  |uld not save fil|
000129f0  65 22 0d 79 7c 0d 20 66  6c 61 67 73 25 3d 31 0d  |e".y|. flags%=1.|
00012a00  79 86 0c c9 20 26 31 30  38 43 43 0d 79 90 2e 20  |y... &108CC.y.. |
00012a10  24 28 6d 62 25 2b 34 29  3d 22 42 61 64 20 6e 61  |$(mb%+4)="Bad na|
00012a20  6d 65 20 2d 20 63 6f 75  6c 64 20 6e 6f 74 20 73  |me - could not s|
00012a30  61 76 65 20 66 69 6c 65  22 0d 79 9a 0d 20 66 6c  |ave file".y.. fl|
00012a40  61 67 73 25 3d 31 0d 79  a4 0c c9 20 26 31 30 38  |ags%=1.y... &108|
00012a50  44 36 0d 79 ae 39 20 24  28 6d 62 25 2b 34 29 3d  |D6.y.9 $(mb%+4)=|
00012a60  22 44 69 72 65 63 74 6f  72 79 20 6e 6f 74 20 66  |"Directory not f|
00012a70  6f 75 6e 64 20 2d 20 63  6f 75 6c 64 20 6e 6f 74  |ound - could not|
00012a80  20 73 61 76 65 20 66 69  6c 65 22 0d 79 b8 0d 20  | save file".y.. |
00012a90  66 6c 61 67 73 25 3d 31  0d 79 c2 05 7f 0d 79 cc  |flags%=1.y....y.|
00012aa0  35 20 24 28 6d 62 25 2b  34 29 3d f6 24 2b 22 20  |5 $(mb%+4)=.$+" |
00012ab0  28 49 6e 74 65 72 6e 61  6c 20 65 72 72 6f 72 20  |(Internal error |
00012ac0  3a 4d 53 45 23 35 22 2b  c3 9e 2b 22 29 20 22 2b  |:MSE#5"+..+") "+|
00012ad0  c3 9f 0d 79 d6 0d 20 66  6c 61 67 73 25 3d 32 0d  |...y.. flags%=2.|
00012ae0  79 e0 0b 20 61 72 67 25  3d 30 0d 79 ea 05 cb 0d  |y.. arg%=0.y....|
00012af0  79 f4 0e e7 20 66 6c 61  67 73 25 20 8c 0d 79 fe  |y... flags% ..y.|
00012b00  3d 20 c8 99 20 22 57 69  6d 70 5f 52 65 70 6f 72  |= .. "Wimp_Repor|
00012b10  74 45 72 72 6f 72 22 2c  6d 62 25 2c 66 6c 61 67  |tError",mb%,flag|
00012b20  73 25 2c 22 46 61 73 74  47 72 61 62 22 20 b8 20  |s%,"FastGrab" . |
00012b30  2c 72 65 73 70 6f 6e 73  65 25 0d 7a 08 1a 20 e7  |,response%.z.. .|
00012b40  20 61 72 67 25 3d 30 20  f2 73 68 75 74 64 6f 77  | arg%=0 .shutdow|
00012b50  6e 28 30 29 0d 7a 12 20  20 e7 20 72 65 73 70 6f  |n(0).z.  . respo|
00012b60  6e 73 65 25 3d 32 20 f2  73 68 75 74 64 6f 77 6e  |nse%=2 .shutdown|
00012b70  28 2d 31 29 0d 7a 1c 05  cd 0d 7a 26 05 e1 0d 7a  |(-1).z....z&...z|
00012b80  30 04 0d 7a 3a 1b dd 20  f2 63 6c 6f 73 65 6f 70  |0..z:.. .closeop|
00012b90  65 6e 28 f8 20 68 61 6e  64 6c 65 25 29 0d 7a 44  |en(. handle%).zD|
00012ba0  17 e7 20 68 61 6e 64 6c  65 25 20 d9 23 68 61 6e  |.. handle% .#han|
00012bb0  64 6c 65 25 0d 7a 4e 0d  68 61 6e 64 6c 65 25 3d  |dle%.zN.handle%=|
00012bc0  30 0d 7a 58 05 e1 0d 7a  62 04 0d 7a 6c 0f dd 20  |0.zX...zb..zl.. |
00012bd0  f2 61 73 73 65 6d 62 6c  65 0d 7a 76 15 de 20 63  |.assemble.zv.. c|
00012be0  6f 64 65 25 20 34 30 39  36 2c 4c 25 20 30 0d 7a  |ode% 4096,L% 0.z|
00012bf0  80 15 e3 20 6f 70 74 25  3d 38 20 b8 20 31 30 20  |... opt%=8 . 10 |
00012c00  88 20 32 0d 7a 8a 0c 50  25 3d 63 6f 64 65 25 0d  |. 2.z..P%=code%.|
00012c10  7a 94 05 5b 0d 7a 9e 0c  4f 50 54 20 6f 70 74 25  |z..[.z..OPT opt%|
00012c20  0d 7a a8 0d 2e 70 6f 6c  6c 63 6f 64 65 0d 7a b2  |.z...pollcode.z.|
00012c30  0f 4d 4f 56 20 52 31 32  2c 52 31 34 0d 7a bc 0d  |.MOV R12,R14.z..|
00012c40  2e 66 61 73 74 6c 6f 6f  70 0d 7a c6 1e 53 57 49  |.fastloop.z..SWI|
00012c50  20 22 4f 53 5f 52 65 61  64 4d 6f 6e 6f 74 6f 6e  | "OS_ReadMonoton|
00012c60  69 63 54 69 6d 65 22 0d  7a d0 13 4c 44 52 20 52  |icTime".z..LDR R|
00012c70  31 2c 73 70 65 65 64 76  61 6c 0d 7a da 10 41 44  |1,speedval.z..AD|
00012c80  44 20 52 32 2c 52 30 2c  52 31 0d 7a e4 0e 4d 4f  |D R2,R0,R1.z..MO|
00012c90  56 20 52 31 31 2c 23 31  0d 7a ee 14 4c 44 52 20  |V R11,#1.z..LDR |
00012ca0  52 33 2c 64 72 61 67 67  69 6e 67 25 0d 7a f8 0d  |R3,dragging%.z..|
00012cb0  43 4d 50 20 52 33 2c 23  30 0d 7b 02 15 4c 44 52  |CMP R3,#0.{..LDR|
00012cc0  45 51 20 52 31 2c 73 70  65 65 64 76 61 6c 0d 7b  |EQ R1,speedval.{|
00012cd0  0c 12 41 44 44 45 51 20  52 32 2c 52 30 2c 52 31  |..ADDEQ R2,R0,R1|
00012ce0  0d 7b 16 11 4c 44 52 20  52 30 2c 6d 61 73 6b 61  |.{..LDR R0,maska|
00012cf0  64 0d 7b 20 11 4c 44 52  20 52 31 2c 70 6f 6c 6c  |d.{ .LDR R1,poll|
00012d00  61 64 0d 7b 2a 19 53 57  49 45 51 20 22 57 69 6d  |ad.{*.SWIEQ "Wim|
00012d10  70 5f 50 6f 6c 6c 49 64  6c 65 22 0d 7b 34 15 53  |p_PollIdle".{4.S|
00012d20  57 49 4e 45 20 22 57 69  6d 70 5f 50 6f 6c 6c 22  |WINE "Wimp_Poll"|
00012d30  0d 7b 3e 0d 43 4d 50 20  52 30 2c 23 30 0d 7b 48  |.{>.CMP R0,#0.{H|
00012d40  0d ec 51 20 52 31 31 2c  23 30 0d 7b 52 13 42 4c  |..Q R11,#0.{R.BL|
00012d50  45 51 20 75 70 64 61 74  65 63 6f 64 65 0d 7b 5c  |EQ updatecode.{\|
00012d60  0d 43 4d 50 20 52 30 2c  23 31 0d 7b 66 0d ec 51  |.CMP R0,#1.{f..Q|
00012d70  20 52 31 31 2c 23 30 0d  7b 70 16 42 4c 45 51 20  | R11,#0.{p.BLEQ |
00012d80  72 65 64 72 61 77 68 61  6e 64 6c 65 72 0d 7b 7a  |redrawhandler.{z|
00012d90  0e 43 4d 50 20 52 31 31  2c 23 31 0d 7b 84 10 42  |.CMP R11,#1.{..B|
00012da0  4e 45 20 66 61 73 74 6c  6f 6f 70 0d 7b 8e 0f 4d  |NE fastloop.{..M|
00012db0  4f 56 53 20 50 43 2c 52  31 32 0d 7b 98 0b 2e 70  |OVS PC,R12.{...p|
00012dc0  6f 6c 6c 61 64 0d 7b a2  0a 45 51 55 44 20 30 0d  |ollad.{..EQUD 0.|
00012dd0  7b ac 0d 2e 73 70 65 65  64 76 61 6c 0d 7b b6 0a  |{...speedval.{..|
00012de0  45 51 55 44 20 30 0d 7b  c0 12 2e 72 65 64 72 61  |EQUD 0.{...redra|
00012df0  77 68 61 6e 64 6c 65 72  0d 7b ca 0f 4c 44 52 20  |whandler.{..LDR |
00012e00  52 33 2c 5b 52 31 5d 0d  7b d4 0e 53 54 52 20 52  |R3,[R1].{..STR R|
00012e10  33 2c 72 64 62 0d 7b de  16 41 44 52 20 52 31 30  |3,rdb.{..ADR R10|
00012e20  2c 77 69 6e 64 6f 77 6c  69 73 74 0d 7b e8 0b 2e  |,windowlist.{...|
00012e30  6c 6f 6f 6b 75 70 0d 7b  f2 10 4c 44 52 20 52 34  |lookup.{..LDR R4|
00012e40  2c 5b 52 31 30 5d 0d 7b  fc 0d 43 4d 50 20 52 33  |,[R10].{..CMP R3|
00012e50  2c 52 34 0d 7c 06 0c 42  45 51 20 73 6b 69 70 0d  |,R4.|..BEQ skip.|
00012e60  7c 10 0f 43 4d 50 20 52  34 2c 23 26 32 30 0d 7c  ||..CMP R4,#&20.||
00012e70  1a 0e ec 51 53 20 50 43  2c 52 31 32 0d 7c 24 13  |...QS PC,R12.|$.|
00012e80  41 44 44 20 52 31 30 2c  52 31 30 2c 23 32 38 0d  |ADD R10,R10,#28.|
00012e90  7c 2e 0c 42 20 6c 6f 6f  6b 75 70 0d 7c 38 09 2e  ||..B lookup.|8..|
00012ea0  73 6b 69 70 0d 7c 42 0e  41 44 52 20 52 31 2c 72  |skip.|B.ADR R1,r|
00012eb0  64 62 0d 7c 4c 1b 53 57  49 20 22 57 69 6d 70 5f  |db.|L.SWI "Wimp_|
00012ec0  52 65 64 72 61 77 57 69  6e 64 6f 77 22 0d 7c 56  |RedrawWindow".|V|
00012ed0  14 4c 44 4d 49 41 20 52  31 2c 7b 52 32 2d 52 38  |.LDMIA R1,{R2-R8|
00012ee0  7d 0d 7c 60 10 53 55 42  20 52 39 2c 52 36 2c 52  |}.|`.SUB R9,R6,R|
00012ef0  38 0d 7c 6a 10 53 55 42  20 52 38 2c 52 33 2c 52  |8.|j.SUB R8,R3,R|
00012f00  37 0d 7c 74 0f 2e 72 65  64 72 61 77 6c 6f 6f 70  |7.|t..redrawloop|
00012f10  0d 7c 7e 0d 43 4d 50 20  52 30 2c 23 30 0d 7c 88  |.|~.CMP R0,#0.|.|
00012f20  0e ec 51 53 20 50 43 2c  52 31 34 0d 7c 92 10 4d  |..QS PC,R14.|..M|
00012f30  4f 56 20 52 30 2c 23 26  32 33 34 0d 7c 9c 1b 4c  |OV R0,#&234.|..L|
00012f40  44 4d 49 42 20 52 31 30  2c 7b 52 31 2d 52 34 2c  |DMIB R10,{R1-R4,|
00012f50  52 36 2c 52 37 7d 0d 7c  a6 10 41 44 44 20 52 33  |R6,R7}.|..ADD R3|
00012f60  2c 52 33 2c 52 38 0d 7c  b0 10 41 44 44 20 52 34  |,R3,R8.|..ADD R4|
00012f70  2c 52 34 2c 52 39 0d 7c  ba 0d 4d 4f 56 20 52 35  |,R4,R9.|..MOV R5|
00012f80  2c 23 30 0d 7c c4 15 53  57 49 20 22 4f 53 5f 53  |,#0.|..SWI "OS_S|
00012f90  70 72 69 74 65 4f 70 22  0d 7c ce 0e 41 44 52 20  |priteOp".|..ADR |
00012fa0  52 31 2c 72 64 62 0d 7c  d8 1b 53 57 49 20 22 57  |R1,rdb.|..SWI "W|
00012fb0  69 6d 70 5f 47 65 74 52  65 63 74 61 6e 67 6c 65  |imp_GetRectangle|
00012fc0  22 0d 7c e2 10 42 20 72  65 64 72 61 77 6c 6f 6f  |".|..B redrawloo|
00012fd0  70 0d 7c ec 0f 4d 4f 56  53 20 50 43 2c 52 31 34  |p.|..MOVS PC,R14|
00012fe0  0d 7c f6 0f 2e 75 70 64  61 74 65 63 6f 64 65 0d  |.|...updatecode.|
00012ff0  7d 00 10 41 44 52 20 52  30 2c 73 74 61 63 6b 0d  |}..ADR R0,stack.|
00013000  7d 0a 16 3b 53 54 4d 49  41 20 52 30 2c 7b 52 32  |}..;STMIA R0,{R2|
00013010  2d 52 31 34 7d 0d 7d 14  16 53 54 4d 49 41 20 52  |-R14}.}..STMIA R|
00013020  30 2c 7b 52 31 32 2c 52  31 34 7d 0d 7d 1e 10 42  |0,{R12,R14}.}..B|
00013030  4c 20 6c 69 76 65 5f 67  72 61 62 0d 7d 28 10 41  |L live_grab.}(.A|
00013040  44 52 20 52 30 2c 73 74  61 63 6b 0d 7d 32 16 4c  |DR R0,stack.}2.L|
00013050  44 4d 49 41 20 52 30 2c  7b 52 31 32 2c 52 31 34  |DMIA R0,{R12,R14|
00013060  7d 0d 7d 3c 16 3b 4c 44  4d 49 41 20 52 30 2c 7b  |}.}<.;LDMIA R0,{|
00013070  52 32 2d 52 31 34 7d 0d  7d 46 0d 4d 4f 56 20 52  |R2-R14}.}F.MOV R|
00013080  30 2c 23 30 0d 7d 50 10  53 54 52 20 52 30 2c 75  |0,#0.}P.STR R0,u|
00013090  64 62 2b 34 0d 7d 5a 11  53 54 52 20 52 30 2c 75  |db+4.}Z.STR R0,u|
000130a0  64 62 2b 31 36 0d 7d 64  14 4c 44 52 20 52 30 2c  |db+16.}d.LDR R0,|
000130b0  6c 69 76 65 78 73 69 7a  65 0d 7d 6e 11 53 54 52  |livexsize.}n.STR|
000130c0  20 52 30 2c 75 64 62 2b  31 32 0d 7d 78 14 4c 44  | R0,udb+12.}x.LD|
000130d0  52 20 52 30 2c 6c 69 76  65 79 73 69 7a 65 0d 7d  |R R0,liveysize.}|
000130e0  82 10 53 54 52 20 52 30  2c 75 64 62 2b 38 0d 7d  |..STR R0,udb+8.}|
000130f0  8c 0e 41 44 52 20 52 31  2c 75 64 62 0d 7d 96 1b  |..ADR R1,udb.}..|
00013100  53 57 49 20 22 57 69 6d  70 5f 55 70 64 61 74 65  |SWI "Wimp_Update|
00013110  57 69 6e 64 6f 77 22 0d  7d a0 14 4c 44 4d 49 41  |Window".}..LDMIA|
00013120  20 52 31 2c 7b 52 32 2d  52 38 7d 0d 7d aa 10 53  | R1,{R2-R8}.}..S|
00013130  55 42 20 52 39 2c 52 36  2c 52 38 0d 7d b4 10 53  |UB R9,R6,R8.}..S|
00013140  55 42 20 52 38 2c 52 33  2c 52 37 0d 7d be 0f 2e  |UB R8,R3,R7.}...|
00013150  75 70 64 61 74 65 6c 6f  6f 70 0d 7d c8 0d 43 4d  |updateloop.}..CM|
00013160  50 20 52 30 2c 23 30 0d  7d d2 12 42 45 51 20 73  |P R0,#0.}..BEQ s|
00013170  6b 69 70 75 70 64 61 74  65 0d 7d dc 10 4d 4f 56  |kipupdate.}..MOV|
00013180  20 52 30 2c 23 26 32 33  34 0d 7d e6 15 4c 44 52  | R0,#&234.}..LDR|
00013190  20 52 31 2c 73 70 72 69  74 65 61 72 65 61 0d 7d  | R1,spritearea.}|
000131a0  f0 13 4c 44 52 20 52 32  2c 73 70 72 69 74 65 61  |..LDR R2,spritea|
000131b0  64 0d 7d fa 0d 4d 4f 56  20 52 33 2c 23 30 0d 7e  |d.}..MOV R3,#0.~|
000131c0  04 14 4c 44 52 20 52 34  2c 6c 69 76 65 77 62 2b  |..LDR R4,livewb+|
000131d0  31 36 0d 7e 0e 10 41 44  44 20 52 33 2c 52 33 2c  |16.~..ADD R3,R3,|
000131e0  52 38 0d 7e 18 10 41 44  44 20 52 34 2c 52 34 2c  |R8.~..ADD R4,R4,|
000131f0  52 39 0d 7e 22 0d 4d 4f  56 20 52 35 2c 23 30 0d  |R9.~".MOV R5,#0.|
00013200  7e 2c 12 41 44 52 20 52  36 2c 6c 69 76 65 6d 61  |~,.ADR R6,livema|
00013210  67 0d 7e 36 11 4c 44 52  20 52 37 2c 63 6f 6c 6d  |g.~6.LDR R7,colm|
00013220  61 70 0d 7e 40 15 53 57  49 20 22 4f 53 5f 53 70  |ap.~@.SWI "OS_Sp|
00013230  72 69 74 65 4f 70 22 0d  7e 4a 0e 41 44 52 20 52  |riteOp".~J.ADR R|
00013240  31 2c 75 64 62 0d 7e 54  1b 53 57 49 20 22 57 69  |1,udb.~T.SWI "Wi|
00013250  6d 70 5f 47 65 74 52 65  63 74 61 6e 67 6c 65 22  |mp_GetRectangle"|
00013260  0d 7e 5e 10 42 20 75 70  64 61 74 65 6c 6f 6f 70  |.~^.B updateloop|
00013270  0d 7e 68 0f 2e 73 6b 69  70 75 70 64 61 74 65 0d  |.~h..skipupdate.|
00013280  7e 72 14 4c 44 52 20 52  31 2c 64 72 61 67 67 69  |~r.LDR R1,draggi|
00013290  6e 67 25 0d 7e 7c 0d 43  4d 50 20 52 31 2c 23 30  |ng%.~|.CMP R1,#0|
000132a0  0d 7e 86 10 4d 4f 56 4e  45 20 50 43 2c 52 31 32  |.~..MOVNE PC,R12|
000132b0  0d 7e 90 0e 4d 4f 56 20  50 43 2c 52 31 34 0d 7e  |.~..MOV PC,R14.~|
000132c0  9a 0c 2e 6c 69 76 65 6d  61 67 0d 7e a4 0a 45 51  |...livemag.~..EQ|
000132d0  55 44 20 31 0d 7e ae 0a  45 51 55 44 20 31 0d 7e  |UD 1.~..EQUD 1.~|
000132e0  b8 0a 45 51 55 44 20 31  0d 7e c2 0a 45 51 55 44  |..EQUD 1.~..EQUD|
000132f0  20 31 0d 7e cc 08 2e 72  64 62 0d 7e d6 3b 45 51  | 1.~...rdb.~.;EQ|
00013300  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
00013310  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
00013320  3a 45 51 55 44 20 30 3a  45 51 55 44 20 30 3a 45  |:EQUD 0:EQUD 0:E|
00013330  51 55 44 20 30 0d 7e e0  34 45 51 55 44 20 30 3a  |QUD 0.~.4EQUD 0:|
00013340  45 51 55 44 20 30 3a 45  51 55 44 20 30 3a 45 51  |EQUD 0:EQUD 0:EQ|
00013350  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
00013360  20 30 3a 45 51 55 44 20  30 0d 7e ea 0a 2e 73 74  | 0:EQUD 0.~...st|
00013370  61 63 6b 0d 7e f4 42 45  51 55 44 20 30 3a 45 51  |ack.~.BEQUD 0:EQ|
00013380  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
00013390  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
000133a0  3a 45 51 55 44 20 30 3a  45 51 55 44 20 30 3a 45  |:EQUD 0:EQUD 0:E|
000133b0  51 55 44 20 30 0d 7e fe  42 45 51 55 44 20 30 3a  |QUD 0.~.BEQUD 0:|
000133c0  45 51 55 44 20 30 3a 45  51 55 44 20 30 3a 45 51  |EQUD 0:EQUD 0:EQ|
000133d0  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
000133e0  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
000133f0  3a 45 51 55 44 20 30 0d  7f 08 42 45 51 55 44 20  |:EQUD 0...BEQUD |
00013400  30 3a 45 51 55 44 20 30  3a 45 51 55 44 20 30 3a  |0:EQUD 0:EQUD 0:|
00013410  45 51 55 44 20 30 3a 45  51 55 44 20 30 3a 45 51  |EQUD 0:EQUD 0:EQ|
00013420  55 44 20 30 3a 45 51 55  44 20 30 3a 45 51 55 44  |UD 0:EQUD 0:EQUD|
00013430  20 30 3a 45 51 55 44 20  30 0d 7f 12 0b 2e 6d 61  | 0:EQUD 0.....ma|
00013440  73 6b 61 64 0d 7f 1c 0a  45 51 55 44 20 30 0d 7f  |skad....EQUD 0..|
00013450  26 0f 2e 77 69 6e 64 6f  77 6c 69 73 74 0d 7f 30  |&..windowlist..0|
00013460  0b 2e 6c 69 76 65 77 62  0d 7f 3a 10 45 51 55 44  |..livewb..:.EQUD|
00013470  20 77 25 28 33 2c 30 29  0d 7f 44 12 45 51 55 44  | w%(3,0)..D.EQUD|
00013480  20 6c 69 76 65 61 72 65  61 25 0d 7f 4e 15 45 51  | livearea%..N.EQ|
00013490  55 44 20 6c 69 76 65 61  72 65 61 25 2b 31 36 0d  |UD livearea%+16.|
000134a0  7f 58 0a 45 51 55 44 20  30 0d 7f 62 0d 45 51 55  |.X.EQUD 0..b.EQU|
000134b0  44 20 2d 35 31 32 0d 7f  6c 0a 45 51 55 44 20 30  |D -512..l.EQUD 0|
000134c0  0d 7f 76 0a 45 51 55 44  20 30 0d 7f 80 0b 2e 67  |..v.EQUD 0.....g|
000134d0  72 61 62 77 62 0d 7f 8a  10 45 51 55 44 20 77 25  |rabwb....EQUD w%|
000134e0  28 35 2c 30 29 0d 7f 94  0a 45 51 55 44 20 30 0d  |(5,0)....EQUD 0.|
000134f0  7f 9e 0a 45 51 55 44 20  30 0d 7f a8 0a 45 51 55  |...EQUD 0....EQU|
00013500  44 20 30 0d 7f b2 0e 45  51 55 44 20 2d 31 30 32  |D 0....EQUD -102|
00013510  34 0d 7f bc 0a 45 51 55  44 20 30 0d 7f c6 0a 45  |4....EQUD 0....E|
00013520  51 55 44 20 30 0d 7f d0  0c 45 51 55 44 20 26 32  |QUD 0....EQUD &2|
00013530  30 0d 7f da 0e 2e 6c 69  76 65 78 73 69 7a 65 0d  |0.....livexsize.|
00013540  7f e4 0a 45 51 55 44 20  30 0d 7f ee 0e 2e 6c 69  |...EQUD 0.....li|
00013550  76 65 79 73 69 7a 65 0d  7f f8 0a 45 51 55 44 20  |veysize....EQUD |
00013560  30 0d 80 02 08 2e 75 64  62 0d 80 0c 42 45 51 55  |0.....udb...BEQU|
00013570  44 20 30 3a 45 51 55 44  20 30 3a 45 51 55 44 20  |D 0:EQUD 0:EQUD |
00013580  30 3a 45 51 55 44 20 30  3a 45 51 55 44 20 30 3a  |0:EQUD 0:EQUD 0:|
00013590  45 51 55 44 20 30 3a 45  51 55 44 20 30 3a 45 51  |EQUD 0:EQUD 0:EQ|
000135a0  55 44 20 30 3a 45 51 55  44 20 30 0d 80 16 2d 45  |UD 0:EQUD 0...-E|
000135b0  51 55 44 20 30 3a 45 51  55 44 20 30 3a 45 51 55  |QUD 0:EQUD 0:EQU|
000135c0  44 20 30 3a 45 51 55 44  20 30 3a 45 51 55 44 20  |D 0:EQUD 0:EQUD |
000135d0  30 3a 45 51 55 44 20 30  0d 80 20 0f 2e 73 70 72  |0:EQUD 0.. ..spr|
000135e0  69 74 65 61 72 65 61 0d  80 2a 0a 45 51 55 44 20  |itearea..*.EQUD |
000135f0  30 0d 80 34 0d 2e 73 70  72 69 74 65 61 64 0d 80  |0..4..spritead..|
00013600  3e 0a 45 51 55 44 20 30  0d 80 48 0b 2e 63 6f 6c  |>.EQUD 0..H..col|
00013610  6d 61 70 0d 80 52 0a 45  51 55 44 20 30 0d 80 5c  |map..R.EQUD 0..\|
00013620  0e 2e 64 72 61 67 67 69  6e 67 25 0d 80 66 0a 45  |..dragging%..f.E|
00013630  51 55 44 20 30 0d 80 70  0b 2e 75 6e 70 61 63 6b  |QUD 0..p..unpack|
00013640  0d 80 7a 12 41 44 44 20  52 32 2c 52 30 2c 23 37  |..z.ADD R2,R0,#7|
00013650  36 38 0d 80 84 0e 4d 4f  56 20 52 34 2c 23 26 46  |68....MOV R4,#&F|
00013660  0d 80 8e 0f 2e 75 6e 70  61 63 6b 6c 6f 6f 70 0d  |.....unpackloop.|
00013670  80 98 12 4c 44 52 20 52  33 2c 5b 52 30 5d 2c 23  |...LDR R3,[R0],#|
00013680  34 0d 80 a2 0d 4d 4f 56  20 52 35 2c 23 30 0d 80  |4....MOV R5,#0..|
00013690  ac 0c 2e 62 69 74 6c 6f  6f 70 0d 80 b6 15 80 20  |...bitloop..... |
000136a0  52 36 2c 52 33 2c 52 34  2c 4c 53 4c 20 52 35 0d  |R6,R3,R4,LSL R5.|
000136b0  80 c0 14 4d 4f 56 20 52  36 2c 52 36 2c 4c 53 52  |...MOV R6,R6,LSR|
000136c0  20 52 35 0d 80 ca 10 41  44 44 20 52 35 2c 52 35  | R5....ADD R5,R5|
000136d0  2c 23 34 0d 80 d4 15 80  20 52 37 2c 52 33 2c 52  |,#4..... R7,R3,R|
000136e0  34 2c 4c 53 4c 20 52 35  0d 80 de 14 4d 4f 56 20  |4,LSL R5....MOV |
000136f0  52 37 2c 52 37 2c 4c 53  52 20 52 35 0d 80 e8 10  |R7,R7,LSR R5....|
00013700  41 44 44 20 52 35 2c 52  35 2c 23 34 0d 80 f2 13  |ADD R5,R5,#4....|
00013710  53 54 52 42 20 52 37 2c  5b 52 31 5d 2c 23 31 0d  |STRB R7,[R1],#1.|
00013720  80 fc 13 53 54 52 42 20  52 36 2c 5b 52 31 5d 2c  |...STRB R6,[R1],|
00013730  23 31 0d 81 06 0e 43 4d  50 20 52 35 2c 23 33 32  |#1....CMP R5,#32|
00013740  0d 81 10 0f 42 4e 45 20  62 69 74 6c 6f 6f 70 0d  |....BNE bitloop.|
00013750  81 1a 0d 43 4d 50 20 52  32 2c 52 30 0d 81 24 12  |...CMP R2,R0..$.|
00013760  42 4e 45 20 75 6e 70 61  63 6b 6c 6f 6f 70 0d 81  |BNE unpackloop..|
00013770  2e 0f 4d 4f 56 53 20 50  43 2c 52 31 34 0d 81 38  |..MOVS PC,R14..8|
00013780  0a 2e 62 6c 61 6e 6b 0d  81 42 0d 4d 4f 56 20 52  |..blank..B.MOV R|
00013790  32 2c 23 30 0d 81 4c 10  41 44 44 20 52 31 2c 52  |2,#0..L.ADD R1,R|
000137a0  30 2c 52 31 0d 81 56 0e  2e 62 6c 61 6e 6b 6c 6f  |0,R1..V..blanklo|
000137b0  6f 70 0d 81 60 12 53 54  52 20 52 32 2c 5b 52 30  |op..`.STR R2,[R0|
000137c0  5d 2c 23 34 0d 81 6a 0d  43 4d 50 20 52 30 2c 52  |],#4..j.CMP R0,R|
000137d0  31 0d 81 74 11 42 4c 54  20 62 6c 61 6e 6b 6c 6f  |1..t.BLT blanklo|
000137e0  6f 70 0d 81 7e 0f 4d 4f  56 53 20 50 43 2c 52 31  |op..~.MOVS PC,R1|
000137f0  34 0d 81 88 05 5d 0d 81  92 05 ed 0d 81 9c 16 67  |4....].........g|
00013800  72 61 62 77 62 21 32 34  3d 67 72 61 62 70 61 6c  |rabwb!24=grabpal|
00013810  25 0d 81 a6 05 e1 0d 81  b0 04 0d 81 ba 29 dd 20  |%............). |
00013820  a4 43 68 61 6e 67 65 46  53 49 56 65 72 73 69 6f  |.ChangeFSIVersio|
00013830  6e 3d 22 30 2e 38 32 20  28 35 20 46 65 62 20 39  |n="0.82 (5 Feb 9|
00013840  31 29 22 0d 81 c4 04 0d  81 ce 5b dd 20 a4 43 68  |1)".......[. .Ch|
00013850  61 6e 67 65 46 53 49 28  41 24 2c 73 70 72 69 74  |angeFSI(A$,sprit|
00013860  65 61 72 65 61 25 2c 77  6f 72 6b 73 70 61 63 65  |earea%,workspace|
00013870  25 2c 77 6f 72 6b 6c 69  6d 69 74 25 2c 6f 6b 73  |%,worklimit%,oks|
00013880  61 76 65 25 2c 6f 6b 69  6e 66 6f 25 2c f8 20 72  |ave%,okinfo%,. r|
00013890  61 6d 25 2c 66 61 73 74  25 2c 56 39 41 72 65 61  |am%,fast%,V9Area|
000138a0  25 29 0d 81 d8 4d ea 20  41 24 28 29 2c 72 25 28  |%)...M. A$(),r%(|
000138b0  29 2c 67 25 28 29 2c 62  25 28 29 2c 72 70 61 6c  |),g%(),b%(),rpal|
000138c0  25 28 29 2c 67 70 61 6c  25 28 29 2c 62 70 61 6c  |%(),gpal%(),bpal|
000138d0  25 28 29 2c 74 61 62 6c  65 25 28 29 2c 63 6c 25  |%(),table%(),cl%|
000138e0  28 29 2c 78 6c 25 28 29  2c 78 6c 32 25 28 29 0d  |(),xl%(),xl2%().|
000138f0  81 e2 44 ea 20 78 70 25  28 29 2c 72 6d 25 28 29  |..D. xp%(),rm%()|
00013900  2c 72 6d 31 25 28 29 2c  72 6d 32 25 28 29 2c 76  |,rm1%(),rm2%(),v|
00013910  61 6c 73 25 28 29 2c 6e  6c 25 28 29 2c 41 25 28  |als%(),nl%(),A%(|
00013920  29 2c 42 25 28 29 2c 6e  65 77 25 28 29 2c 73 74  |),B%(),new%(),st|
00013930  25 28 29 0d 81 ec 24 c8  95 c0 41 24 2c 31 29 3c  |%()...$...A$,1)<|
00013940  3e 22 20 22 80 a9 41 24  3c 3e 30 20 41 24 3d c1  |>" "..A$<>0 A$=.|
00013950  41 24 2c 32 29 3a ce 0d  81 f6 1c c8 95 c0 41 24  |A$,2):........A$|
00013960  2c 31 29 3d 22 20 22 20  41 24 3d c1 41 24 2c 32  |,1)=" " A$=.A$,2|
00013970  29 3a ce 0d 82 00 1a c8  95 c2 41 24 2c 31 29 3d  |):........A$,1)=|
00013980  22 20 22 20 41 24 3d c0  41 24 29 3a ce 0d 82 0a  |" " A$=.A$):....|
00013990  1a e7 a4 75 63 28 c0 41  24 2c 35 29 29 3d 22 2d  |...uc(.A$,5))="-|
000139a0  51 55 49 54 22 20 8c 0d  82 14 2e 41 24 3d c1 41  |QUIT" .....A$=.A|
000139b0  24 2c 37 29 3a c8 95 c0  41 24 2c 31 29 3c 3e 22  |$,7):...A$,1)<>"|
000139c0  20 22 80 a9 41 24 3c 3e  30 20 41 24 3d c1 41 24  | "..A$<>0 A$=.A$|
000139d0  2c 32 29 3a ce 0d 82 1e  1c c8 95 c0 41 24 2c 31  |,2):........A$,1|
000139e0  29 3d 22 20 22 20 41 24  3d c1 41 24 2c 32 29 3a  |)=" " A$=.A$,2):|
000139f0  ce 0d 82 28 05 cd 0d 82  32 20 de 20 41 24 28 31  |...(....2 . A$(1|
00013a00  30 30 29 3a 41 52 47 25  3d 30 3a 42 25 3d a7 41  |00):ARG%=0:B%=.A|
00013a10  24 2c 22 20 22 29 0d 82  3c 0c c8 95 20 42 25 3c  |$," ")..<... B%<|
00013a20  3e 30 0d 82 46 2b 41 52  47 25 2b 3d 31 3a 41 24  |>0..F+ARG%+=1:A$|
00013a30  28 41 52 47 25 29 3d c0  41 24 2c 42 25 2d 31 29  |(ARG%)=.A$,B%-1)|
00013a40  3a 41 24 3d c1 41 24 2c  42 25 2b 31 29 0d 82 50  |:A$=.A$,B%+1)..P|
00013a50  1d c8 95 20 c0 41 24 2c  31 29 3d 22 20 22 3a 41  |... .A$,1)=" ":A|
00013a60  24 3d c1 41 24 2c 32 29  3a ce 0d 82 5a 0f 42 25  |$=.A$,2):...Z.B%|
00013a70  3d a7 41 24 2c 22 20 22  29 0d 82 64 05 ce 0d 82  |=.A$," ")..d....|
00013a80  6e 1f e7 41 24 3c 3e 22  22 20 41 52 47 25 2b 3d  |n..A$<>"" ARG%+=|
00013a90  31 3a 41 24 28 41 52 47  25 29 3d 41 24 0d 82 78  |1:A$(ARG%)=A$..x|
00013aa0  04 0d 82 82 3c 69 6e 76  65 72 74 25 3d a3 3a 72  |....<invert%=.:r|
00013ab0  61 6e 67 65 25 3d a3 3a  73 68 61 72 70 65 6e 25  |ange%=.:sharpen%|
00013ac0  3d a3 3a 69 6e 66 6f 25  3d a3 3a 64 69 74 68 65  |=.:info%=.:dithe|
00013ad0  72 25 3d b9 3a 62 6c 61  63 6b 25 3d a3 0d 82 8c  |r%=.:black%=....|
00013ae0  39 68 69 73 74 25 3d a3  3a 65 71 75 61 6c 25 3d  |9hist%=.:equal%=|
00013af0  a3 3a 76 66 6c 69 70 25  3d a3 3a 68 66 6c 69 70  |.:vflip%=.:hflip|
00013b00  25 3d a3 3a 73 63 61 6c  65 25 3d b9 3a 73 63 61  |%=.:scale%=.:sca|
00013b10  6c 65 6f 25 3d b9 0d 82  96 2e 67 61 6d 6d 61 3d  |leo%=.....gamma=|
00013b20  31 3a 72 6f 74 61 74 65  25 3d a3 3a 6d 61 78 25  |1:rotate%=.:max%|
00013b30  3d 32 30 30 30 30 30 30  30 3a 62 72 69 67 68 74  |=20000000:bright|
00013b40  25 3d 31 35 0d 82 a0 1b  72 77 74 3d 2e 33 30 3a  |%=15....rwt=.30:|
00013b50  67 77 74 3d 2e 35 39 3a  62 77 74 3d 2e 31 31 0d  |gwt=.59:bwt=.11.|
00013b60  82 aa 0d e7 41 52 47 25  3c 33 20 8c 0d 82 b4 4b  |....ARG%<3 ....K|
00013b70  f1 22 43 68 61 6e 67 65  46 53 49 20 69 6e 74 65  |."ChangeFSI inte|
00013b80  72 61 63 74 69 76 65 20  69 6e 70 75 74 20 5b 74  |ractive input [t|
00013b90  72 79 20 27 43 68 61 6e  67 65 46 53 49 20 2d 68  |ry 'ChangeFSI -h|
00013ba0  65 6c 70 27 20 66 6f 72  20 63 6f 6d 6d 61 6e 64  |elp' for command|
00013bb0  20 6c 69 6e 65 5d 22 0d  82 be 3f e8 22 53 6f 75  | line]"...?."Sou|
00013bc0  72 63 65 20 66 69 6c 65  3a 20 22 73 24 2c 22 44  |rce file: "s$,"D|
00013bd0  65 73 74 69 6e 61 74 69  6f 6e 20 66 69 6c 65 3a  |estination file:|
00013be0  20 22 66 24 2c 22 4f 75  74 70 75 74 20 6d 6f 64  | "f$,"Output mod|
00013bf0  65 3a 20 22 6d 24 0d 82  c8 2f e8 22 28 58 29 53  |e: "m$.../."(X)S|
00013c00  63 61 6c 65 20 28 65 2e  67 2e 20 32 3a 31 29 3a  |cale (e.g. 2:1):|
00013c10  20 22 78 73 24 3a e8 22  59 20 53 63 61 6c 65 3a  | "xs$:."Y Scale:|
00013c20  20 22 79 73 24 0d 82 d2  38 e8 22 49 6e 66 6f 20  | "ys$...8."Info |
00013c30  6f 6e 20 69 6e 70 75 74  20 70 69 63 74 75 72 65  |on input picture|
00013c40  3f 22 61 24 3a e7 a4 75  63 28 c0 61 24 2c 31 29  |?"a$:..uc(.a$,1)|
00013c50  29 3d 22 59 22 20 69 6e  66 6f 25 3d b9 0d 82 dc  |)="Y" info%=....|
00013c60  3b e8 22 49 6e 76 65 72  74 20 70 69 63 74 75 72  |;."Invert pictur|
00013c70  65 20 63 6f 6c 6f 75 72  73 3f 22 61 24 3a e7 a4  |e colours?"a$:..|
00013c80  75 63 28 c0 61 24 2c 31  29 29 3d 22 59 22 20 69  |uc(.a$,1))="Y" i|
00013c90  6e 76 65 72 74 25 3d b9  0d 82 e6 3d e8 22 43 6f  |nvert%=....=."Co|
00013ca0  6d 70 75 74 65 20 68 69  73 74 6f 67 72 61 6d 20  |mpute histogram |
00013cb0  6f 66 20 69 6e 70 75 74  3f 22 61 24 3a e7 a4 75  |of input?"a$:..u|
00013cc0  63 28 c0 61 24 2c 31 29  29 3d 22 59 22 20 68 69  |c(.a$,1))="Y" hi|
00013cd0  73 74 25 3d b9 0d 82 f0  40 e8 22 41 70 70 6c 79  |st%=....@."Apply|
00013ce0  20 68 69 73 74 6f 67 72  61 6d 20 65 71 75 61 6c  | histogram equal|
00013cf0  69 73 61 74 69 6f 6e 3f  22 61 24 3a e7 a4 75 63  |isation?"a$:..uc|
00013d00  28 c0 61 24 2c 31 29 29  3d 22 59 22 20 65 71 75  |(.a$,1))="Y" equ|
00013d10  61 6c 25 3d b9 0d 82 fa  47 e8 22 45 78 70 61 6e  |al%=....G."Expan|
00013d20  64 20 69 6e 70 75 74 20  64 79 6e 61 6d 69 63 20  |d input dynamic |
00013d30  72 61 6e 67 65 3f 22 61  24 3a e7 a4 75 63 28 c0  |range?"a$:..uc(.|
00013d40  61 24 2c 31 29 29 3d 22  59 22 20 72 61 6e 67 65  |a$,1))="Y" range|
00013d50  25 3d b9 3a 65 71 75 61  6c 25 3d a3 0d 83 04 3d  |%=.:equal%=....=|
00013d60  e8 22 53 68 61 72 70 65  6e 20 70 69 63 74 75 72  |."Sharpen pictur|
00013d70  65 20 62 79 20 28 65 2e  67 2e 20 31 32 20 66 6f  |e by (e.g. 12 fo|
00013d80  72 20 68 61 72 73 68 2c  20 32 34 20 66 6f 72 20  |r harsh, 24 for |
00013d90  73 6f 66 74 29 20 22 61  24 0d 83 0e 18 e7 61 24  |soft) "a$.....a$|
00013da0  3c 3e 22 22 20 73 68 61  72 70 65 6e 25 3d bb 61  |<>"" sharpen%=.a|
00013db0  24 0d 83 18 2b e8 22 52  6f 74 61 74 65 3f 22 61  |$...+."Rotate?"a|
00013dc0  24 3a e7 a4 75 63 28 c0  61 24 2c 31 29 29 3d 22  |$:..uc(.a$,1))="|
00013dd0  59 22 20 72 6f 74 61 74  65 25 3d b9 0d 83 22 05  |Y" rotate%=...".|
00013de0  cc 0d 83 2c 0d f5 20 41  25 3d 41 52 47 25 0d 83  |...,.. A%=ARG%..|
00013df0  36 36 e7 a4 75 63 28 41  24 28 41 52 47 25 29 29  |66..uc(A$(ARG%))|
00013e00  3d 22 2d 49 4e 46 4f 22  20 69 6e 66 6f 25 3d b9  |="-INFO" info%=.|
00013e10  3a 41 24 28 41 52 47 25  29 3d 22 22 3a 41 52 47  |:A$(ARG%)="":ARG|
00013e20  25 2d 3d 31 0d 83 40 36  e7 a4 75 63 28 41 24 28  |%-=1..@6..uc(A$(|
00013e30  41 52 47 25 29 29 3d 22  2d 48 49 53 54 22 20 68  |ARG%))="-HIST" h|
00013e40  69 73 74 25 3d b9 3a 41  24 28 41 52 47 25 29 3d  |ist%=.:A$(ARG%)=|
00013e50  22 22 3a 41 52 47 25 2d  3d 31 0d 83 4a 41 e7 a4  |"":ARG%-=1..JA..|
00013e60  75 63 28 41 24 28 41 52  47 25 29 29 3d 22 2d 45  |uc(A$(ARG%))="-E|
00013e70  51 55 41 4c 22 20 65 71  75 61 6c 25 3d b9 3a 72  |QUAL" equal%=.:r|
00013e80  61 6e 67 65 25 3d a3 3a  41 24 28 41 52 47 25 29  |ange%=.:A$(ARG%)|
00013e90  3d 22 22 3a 41 52 47 25  2d 3d 31 0d 83 54 41 e7  |="":ARG%-=1..TA.|
00013ea0  a4 75 63 28 41 24 28 41  52 47 25 29 29 3d 22 2d  |.uc(A$(ARG%))="-|
00013eb0  52 41 4e 47 45 22 20 72  61 6e 67 65 25 3d b9 3a  |RANGE" range%=.:|
00013ec0  65 71 75 61 6c 25 3d a3  3a 41 24 28 41 52 47 25  |equal%=.:A$(ARG%|
00013ed0  29 3d 22 22 3a 41 52 47  25 2d 3d 31 0d 83 5e 3a  |)="":ARG%-=1..^:|
00013ee0  e7 a4 75 63 28 41 24 28  41 52 47 25 29 29 3d 22  |..uc(A$(ARG%))="|
00013ef0  2d 49 4e 56 45 52 54 22  20 69 6e 76 65 72 74 25  |-INVERT" invert%|
00013f00  3d b9 3a 41 24 28 41 52  47 25 29 3d 22 22 3a 41  |=.:A$(ARG%)="":A|
00013f10  52 47 25 2d 3d 31 0d 83  68 44 e7 a4 75 63 28 41  |RG%-=1..hD..uc(A|
00013f20  24 28 41 52 47 25 29 29  3d 22 2d 4e 4f 53 43 41  |$(ARG%))="-NOSCA|
00013f30  4c 45 22 20 73 63 61 6c  65 25 3d a3 3a 73 63 61  |LE" scale%=.:sca|
00013f40  6c 65 6f 25 3d a3 3a 41  24 28 41 52 47 25 29 3d  |leo%=.:A$(ARG%)=|
00013f50  22 22 3a 41 52 47 25 2d  3d 31 0d 83 72 39 e7 a4  |"":ARG%-=1..r9..|
00013f60  75 63 28 41 24 28 41 52  47 25 29 29 3d 22 2d 4e  |uc(A$(ARG%))="-N|
00013f70  4f 53 49 5a 45 22 20 73  63 61 6c 65 25 3d a3 3a  |OSIZE" scale%=.:|
00013f80  41 24 28 41 52 47 25 29  3d 22 22 3a 41 52 47 25  |A$(ARG%)="":ARG%|
00013f90  2d 3d 31 0d 83 7c 3c e7  a4 75 63 28 41 24 28 41  |-=1..|<..uc(A$(A|
00013fa0  52 47 25 29 29 3d 22 2d  4e 4f 44 49 54 48 45 52  |RG%))="-NODITHER|
00013fb0  22 20 64 69 74 68 65 72  25 3d a3 3a 41 24 28 41  |" dither%=.:A$(A|
00013fc0  52 47 25 29 3d 22 22 3a  41 52 47 25 2d 3d 31 0d  |RG%)="":ARG%-=1.|
00013fd0  83 86 3d e7 a4 75 63 28  41 24 28 41 52 47 25 29  |..=..uc(A$(ARG%)|
00013fe0  29 3d 22 2d 42 52 49 47  48 54 45 4e 22 20 62 72  |)="-BRIGHTEN" br|
00013ff0  69 67 68 74 25 3d 31 36  3a 41 24 28 41 52 47 25  |ight%=16:A$(ARG%|
00014000  29 3d 22 22 3a 41 52 47  25 2d 3d 31 0d 83 90 3a  |)="":ARG%-=1...:|
00014010  e7 a4 75 63 28 41 24 28  41 52 47 25 29 29 3d 22  |..uc(A$(ARG%))="|
00014020  2d 52 4f 54 41 54 45 22  20 72 6f 74 61 74 65 25  |-ROTATE" rotate%|
00014030  3d b9 3a 41 24 28 41 52  47 25 29 3d 22 22 3a 41  |=.:A$(ARG%)="":A|
00014040  52 47 25 2d 3d 31 0d 83  9a 38 e7 a4 75 63 28 41  |RG%-=1...8..uc(A|
00014050  24 28 41 52 47 25 29 29  3d 22 2d 56 46 4c 49 50  |$(ARG%))="-VFLIP|
00014060  22 20 76 66 6c 69 70 25  3d b9 3a 41 24 28 41 52  |" vflip%=.:A$(AR|
00014070  47 25 29 3d 22 22 3a 41  52 47 25 2d 3d 31 0d 83  |G%)="":ARG%-=1..|
00014080  a4 38 e7 a4 75 63 28 41  24 28 41 52 47 25 29 29  |.8..uc(A$(ARG%))|
00014090  3d 22 2d 48 46 4c 49 50  22 20 68 66 6c 69 70 25  |="-HFLIP" hflip%|
000140a0  3d b9 3a 41 24 28 41 52  47 25 29 3d 22 22 3a 41  |=.:A$(ARG%)="":A|
000140b0  52 47 25 2d 3d 31 0d 83  ae 38 e7 a4 75 63 28 41  |RG%-=1...8..uc(A|
000140c0  24 28 41 52 47 25 29 29  3d 22 2d 4e 4f 4d 4f 44  |$(ARG%))="-NOMOD|
000140d0  45 22 20 66 61 73 74 25  3d a3 3a 41 24 28 41 52  |E" fast%=.:A$(AR|
000140e0  47 25 29 3d 22 22 3a 41  52 47 25 2d 3d 31 0d 83  |G%)="":ARG%-=1..|
000140f0  b8 21 e7 a4 75 63 28 c0  41 24 28 41 52 47 25 29  |.!..uc(.A$(ARG%)|
00014100  2c 36 29 29 3d 22 2d 42  4c 41 43 4b 22 20 8c 0d  |,6))="-BLACK" ..|
00014110  83 c2 46 62 6c 61 63 6b  25 3d 33 32 3a e7 a9 41  |..Fblack%=32:..A|
00014120  24 28 41 52 47 25 29 3e  36 20 62 6c 61 63 6b 25  |$(ARG%)>6 black%|
00014130  3d bb c1 41 24 28 41 52  47 25 29 2c 37 29 3a e7  |=..A$(ARG%),7):.|
00014140  62 6c 61 63 6b 25 3e 31  32 38 20 62 6c 61 63 6b  |black%>128 black|
00014150  25 3d 31 32 38 0d 83 cc  17 41 24 28 41 52 47 25  |%=128....A$(ARG%|
00014160  29 3d 22 22 3a 41 52 47  25 2d 3d 31 0d 83 d6 05  |)="":ARG%-=1....|
00014170  cd 0d 83 e0 21 e7 a4 75  63 28 c0 41 24 28 41 52  |....!..uc(.A$(AR|
00014180  47 25 29 2c 36 29 29 3d  22 2d 47 41 4d 4d 41 22  |G%),6))="-GAMMA"|
00014190  20 8c 0d 83 ea 2e 67 61  6d 6d 61 3d 32 2e 32 3a  | .....gamma=2.2:|
000141a0  e7 a9 41 24 28 41 52 47  25 29 3e 36 20 67 61 6d  |..A$(ARG%)>6 gam|
000141b0  6d 61 3d bb c1 41 24 28  41 52 47 25 29 2c 37 29  |ma=..A$(ARG%),7)|
000141c0  0d 83 f4 17 41 24 28 41  52 47 25 29 3d 22 22 3a  |....A$(ARG%)="":|
000141d0  41 52 47 25 2d 3d 31 0d  83 fe 05 cd 0d 84 08 23  |ARG%-=1........#|
000141e0  e7 a4 75 63 28 c0 41 24  28 41 52 47 25 29 2c 38  |..uc(.A$(ARG%),8|
000141f0  29 29 3d 22 2d 53 48 41  52 50 45 4e 22 20 8c 0d  |))="-SHARPEN" ..|
00014200  84 12 32 73 68 61 72 70  65 6e 25 3d b9 3a e7 a9  |..2sharpen%=.:..|
00014210  41 24 28 41 52 47 25 29  3e 38 20 73 68 61 72 70  |A$(ARG%)>8 sharp|
00014220  65 6e 25 3d bb c1 41 24  28 41 52 47 25 29 2c 39  |en%=..A$(ARG%),9|
00014230  29 0d 84 1c 17 41 24 28  41 52 47 25 29 3d 22 22  |)....A$(ARG%)=""|
00014240  3a 41 52 47 25 2d 3d 31  0d 84 26 05 cd 0d 84 30  |:ARG%-=1..&....0|
00014250  43 e7 a4 75 63 28 c0 41  24 28 41 52 47 25 29 2c  |C..uc(.A$(ARG%),|
00014260  34 29 29 3d 22 2d 52 45  44 22 20 72 77 74 3d bb  |4))="-RED" rwt=.|
00014270  c1 41 24 28 41 52 47 25  29 2c 35 29 3a 41 24 28  |.A$(ARG%),5):A$(|
00014280  41 52 47 25 29 3d 22 22  3a 41 52 47 25 2d 3d 31  |ARG%)="":ARG%-=1|
00014290  0d 84 3a 45 e7 a4 75 63  28 c0 41 24 28 41 52 47  |..:E..uc(.A$(ARG|
000142a0  25 29 2c 36 29 29 3d 22  2d 47 52 45 45 4e 22 20  |%),6))="-GREEN" |
000142b0  67 77 74 3d bb c1 41 24  28 41 52 47 25 29 2c 37  |gwt=..A$(ARG%),7|
000142c0  29 3a 41 24 28 41 52 47  25 29 3d 22 22 3a 41 52  |):A$(ARG%)="":AR|
000142d0  47 25 2d 3d 31 0d 84 44  44 e7 a4 75 63 28 c0 41  |G%-=1..DD..uc(.A|
000142e0  24 28 41 52 47 25 29 2c  35 29 29 3d 22 2d 42 4c  |$(ARG%),5))="-BL|
000142f0  55 45 22 20 62 77 74 3d  bb c1 41 24 28 41 52 47  |UE" bwt=..A$(ARG|
00014300  25 29 2c 36 29 3a 41 24  28 41 52 47 25 29 3d 22  |%),6):A$(ARG%)="|
00014310  22 3a 41 52 47 25 2d 3d  31 0d 84 4e 1f e7 a4 75  |":ARG%-=1..N...u|
00014320  63 28 c0 41 24 28 41 52  47 25 29 2c 34 29 29 3d  |c(.A$(ARG%),4))=|
00014330  22 2d 4d 41 58 22 20 8c  0d 84 58 44 6d 61 78 25  |"-MAX" ...XDmax%|
00014340  3d bb c1 41 24 28 41 52  47 25 29 2c 35 29 3a e7  |=..A$(ARG%),5):.|
00014350  a7 41 24 28 41 52 47 25  29 2c 22 4b 22 29 84 a7  |.A$(ARG%),"K")..|
00014360  41 24 28 41 52 47 25 29  2c 22 6b 22 29 20 6d 61  |A$(ARG%),"k") ma|
00014370  78 25 3d 6d 61 78 25 2a  31 30 32 34 0d 84 62 17  |x%=max%*1024..b.|
00014380  41 24 28 41 52 47 25 29  3d 22 22 3a 41 52 47 25  |A$(ARG%)="":ARG%|
00014390  2d 3d 31 0d 84 6c 05 cd  0d 84 76 0c fd 41 25 3d  |-=1..l....v..A%=|
000143a0  41 52 47 25 0d 84 80 32  73 24 3d 41 24 28 31 29  |ARG%...2s$=A$(1)|
000143b0  3a 66 24 3d 41 24 28 32  29 3a 6d 24 3d 41 24 28  |:f$=A$(2):m$=A$(|
000143c0  33 29 3a 78 73 24 3d 41  24 28 34 29 3a 79 73 24  |3):xs$=A$(4):ys$|
000143d0  3d 41 24 28 35 29 0d 84  8a 05 cd 0d 84 94 15 e7  |=A$(5)..........|
000143e0  6f 6b 69 6e 66 6f 25 20  8b 69 6e 66 6f 25 3d a3  |okinfo% .info%=.|
000143f0  0d 84 9e 14 e7 77 6f 72  6b 73 70 61 63 65 25 3e  |.....workspace%>|
00014400  3d 30 20 8c 0d 84 a8 0b  66 6c 65 78 25 3d a3 0d  |=0 .....flex%=..|
00014410  84 b2 05 cc 0d 84 bc 3c  e7 77 6f 72 6b 6c 69 6d  |.......<.worklim|
00014420  69 74 25 3d 30 20 8c 66  6c 65 78 25 3d a3 20 8b  |it%=0 .flex%=. .|
00014430  66 6c 65 78 25 3d b9 3a  6e 65 78 74 6c 6f 63 61  |flex%=.:nextloca|
00014440  74 69 6f 6e 25 3d 77 6f  72 6b 6c 69 6d 69 74 25  |tion%=worklimit%|
00014450  0d 84 c6 05 cd 0d 84 d0  1a 70 6e 6d 24 3d a4 75  |.........pnm$=.u|
00014460  63 28 6d 24 29 3a c8 8e  20 70 6e 6d 24 20 ca 0d  |c(m$):.. pnm$ ..|
00014470  84 da 15 c9 22 41 49 4d  22 3a 6d 3d 2d 31 3a 6d  |...."AIM":m=-1:m|
00014480  24 3d 22 22 0d 84 e4 1b  c9 22 50 31 22 3a 6d 3d  |$=""....."P1":m=|
00014490  2d 32 3a 6d 24 3d 22 22  3a 73 70 6d 3d 31 38 0d  |-2:m$="":spm=18.|
000144a0  84 ee 1b c9 22 50 34 22  3a 6d 3d 2d 32 3a 6d 24  |...."P4":m=-2:m$|
000144b0  3d 22 22 3a 73 70 6d 3d  31 38 0d 84 f8 1c c9 22  |="":spm=18....."|
000144c0  50 32 22 3a 6d 3d 2d 32  3a 6d 24 3d 22 54 22 3a  |P2":m=-2:m$="T":|
000144d0  73 70 6d 3d 32 30 0d 85  02 1c c9 22 50 35 22 3a  |spm=20....."P5":|
000144e0  6d 3d 2d 32 3a 6d 24 3d  22 54 22 3a 73 70 6d 3d  |m=-2:m$="T":spm=|
000144f0  32 30 0d 85 0c 35 7f 3a  6d 3d bb 6d 24 3a 73 70  |20...5.:m=.m$:sp|
00014500  6d 3d 6d 3a 6d 24 3d a4  75 63 28 c2 6d 24 2c 31  |m=m:m$=.uc(.m$,1|
00014510  29 29 3a e7 a7 22 43 44  54 50 22 2c 6d 24 29 3d  |)):.."CDTP",m$)=|
00014520  30 20 6d 24 3d 22 22 0d  85 16 05 cb 0d 85 20 1b  |0 m$=""....... .|
00014530  e7 78 73 24 3d 22 22 20  84 20 c0 78 73 24 2c 31  |.xs$="" . .xs$,1|
00014540  29 3d 22 2d 22 20 8c 0d  85 2a 23 78 6d 75 6c 25  |)="-" ...*#xmul%|
00014550  3d 31 3a 78 64 69 76 25  3d 31 3a 79 6d 75 6c 25  |=1:xdiv%=1:ymul%|
00014560  3d 31 3a 79 64 69 76 25  3d 31 0d 85 34 05 cc 0d  |=1:ydiv%=1..4...|
00014570  85 3e 13 e7 79 73 24 3d  22 22 20 79 73 24 3d 78  |.>..ys$="" ys$=x|
00014580  73 24 0d 85 48 27 78 6d  75 6c 25 3d bb 78 73 24  |s$..H'xmul%=.xs$|
00014590  3a 78 64 69 76 25 3d bb  c1 78 73 24 2c a7 78 73  |:xdiv%=..xs$,.xs|
000145a0  24 2c 22 3a 22 29 2b 31  29 0d 85 52 27 79 6d 75  |$,":")+1)..R'ymu|
000145b0  6c 25 3d bb 79 73 24 3a  79 64 69 76 25 3d bb c1  |l%=.ys$:ydiv%=..|
000145c0  79 73 24 2c a7 79 73 24  2c 22 3a 22 29 2b 31 29  |ys$,.ys$,":")+1)|
000145d0  0d 85 5c 05 cd 0d 85 66  09 64 69 72 3d a3 0d 85  |..\....f.dir=...|
000145e0  70 2a f4 20 66 6c 61 67  3d 2d 31 3a 53 59 53 38  |p*. flag=-1:SYS8|
000145f0  2c 35 2c 73 24 20 54 4f  20 72 30 2c 2c 72 32 3a  |,5,s$ TO r0,,r2:|
00014600  64 69 72 3d 72 30 3d 32  0d 85 7a 0a e7 64 69 72  |dir=r0=2..z..dir|
00014610  20 8c 0d 85 84 43 70 61  6e 69 63 3d b9 3a c8 99  | ....Cpanic=.:..|
00014620  38 2c 35 2c 73 24 2b 22  2e 72 61 77 22 20 b8 20  |8,5,s$+".raw" . |
00014630  72 30 2c 2c 72 32 3a e7  72 30 3d 31 20 73 24 2b  |r0,,r2:.r0=1 s$+|
00014640  3d 22 2e 72 61 77 22 3a  64 69 72 3d a3 3a 70 61  |=".raw":dir=.:pa|
00014650  6e 69 63 3d a3 0d 85 8e  31 e7 70 61 6e 69 63 20  |nic=....1.panic |
00014660  c8 99 38 2c 35 2c 73 24  2b 22 2e 72 65 64 22 20  |..8,5,s$+".red" |
00014670  b8 20 72 30 2c 2c 72 32  3a e7 72 30 3d 31 20 70  |. r0,,r2:.r0=1 p|
00014680  61 6e 69 63 3d a3 0d 85  98 21 e7 70 61 6e 69 63  |anic=....!.panic|
00014690  20 85 20 34 32 2c 22 44  69 72 65 63 74 6f 72 79  | . 42,"Directory|
000146a0  20 67 69 76 65 6e 22 0d  85 a2 05 cd 0d 85 ac 3e  | given"........>|
000146b0  66 74 79 70 65 3d 72 32  3e 3e 38 20 80 20 26 46  |ftype=r2>>8 . &F|
000146c0  46 46 3a 62 69 74 73 3d  32 38 3a 46 3d 32 5e 62  |FF:bits=28:F=2^b|
000146d0  69 74 73 3a 63 25 3d 30  3a 63 63 25 3d 30 3a 63  |its:c%=0:cc%=0:c|
000146e0  63 63 25 3d 30 3a 6f 25  3d 30 0d 85 b6 0a e7 64  |cc%=0:o%=0.....d|
000146f0  69 72 20 8c 0d 85 c0 3e  63 25 3d 8e 28 73 24 2b  |ir ....>c%=.(s$+|
00014700  22 2e 72 65 64 22 29 3a  e7 63 25 3d 30 20 85 20  |".red"):.c%=0 . |
00014710  34 32 2c 22 52 65 64 20  66 69 6c 65 20 22 2b 73  |42,"Red file "+s|
00014720  24 2b 22 2e 72 65 64 20  6e 6f 74 20 66 6f 75 6e  |$+".red not foun|
00014730  64 22 0d 85 ca 45 63 63  25 3d 8e 28 73 24 2b 22  |d"...Ecc%=.(s$+"|
00014740  2e 67 72 65 65 6e 22 29  3a e7 63 63 25 3d 30 20  |.green"):.cc%=0 |
00014750  85 34 32 2c 22 47 72 65  65 6e 20 66 69 6c 65 20  |.42,"Green file |
00014760  22 2b 73 24 2b 22 2e 67  72 65 65 6e 20 6e 6f 74  |"+s$+".green not|
00014770  20 66 6f 75 6e 64 22 0d  85 d4 44 63 63 63 25 3d  | found"...Dccc%=|
00014780  8e 28 73 24 2b 22 2e 62  6c 75 65 22 29 3a e7 63  |.(s$+".blue"):.c|
00014790  63 63 25 3d 30 20 85 34  32 2c 22 42 6c 75 65 20  |cc%=0 .42,"Blue |
000147a0  66 69 6c 65 20 22 2b 73  24 2b 22 2e 62 6c 75 65  |file "+s$+".blue|
000147b0  20 6e 6f 74 20 66 6f 75  6e 64 22 0d 85 de 05 cc  | not found".....|
000147c0  0d 85 e8 39 f4 20 63 25  3d 4f 50 45 4e 49 4e 73  |...9. c%=OPENINs|
000147d0  24 3a 49 46 63 25 3d 30  20 45 52 52 4f 52 20 34  |$:IFc%=0 ERROR 4|
000147e0  32 2c 22 46 69 6c 65 20  22 2b 73 24 2b 22 20 6e  |2,"File "+s$+" n|
000147f0  6f 74 20 66 6f 75 6e 64  22 0d 85 f2 05 cd 0d 85  |ot found".......|
00014800  fc 0d de 20 72 25 28 32  35 35 29 0d 86 06 15 de  |... r%(255).....|
00014810  20 67 25 28 32 35 35 29  2c 62 25 28 32 35 35 29  | g%(255),b%(255)|
00014820  0d 86 10 0e c8 8e 20 66  74 79 70 65 20 ca 0d 86  |...... ftype ...|
00014830  1a 11 c9 20 26 46 46 39  3a 66 6c 61 67 3d 30 0d  |... &FF9:flag=0.|
00014840  86 24 05 7f 0d 86 2e 34  f4 20 50 54 52 23 63 25  |.$.....4. PTR#c%|
00014850  3d 30 3a 53 24 3d 22 22  3a 46 4f 52 49 25 3d 31  |=0:S$="":FORI%=1|
00014860  54 4f 38 3a 53 24 2b 3d  43 48 52 24 42 47 45 54  |TO8:S$+=CHR$BGET|
00014870  23 63 25 3a 4e 45 58 54  0d 86 38 28 f4 20 49 46  |#c%:NEXT..8(. IF|
00014880  66 6c 61 67 3d 2d 31 20  49 46 53 24 3d 22 4d 65  |flag=-1 IFS$="Me|
00014890  72 63 53 6f 66 74 22 20  66 6c 61 67 3d 39 30 32  |rcSoft" flag=902|
000148a0  0d 86 42 34 f4 20 66 6c  61 67 3d 39 30 32 3a 52  |..B4. flag=902:R|
000148b0  45 4d 20 4d 79 20 66 6f  72 6d 61 74 20 6f 72 20  |EM My format or |
000148c0  65 6c 73 65 21 20 21 21  20 66 49 58 20 54 48 49  |else! !! fIX THI|
000148d0  53 20 21 21 0d 86 4c 2c  e7 20 69 6e 5f 66 69 6c  |S !!..L,. in_fil|
000148e0  65 5f 62 69 74 73 25 3d  31 36 20 8c 20 66 6c 61  |e_bits%=16 . fla|
000148f0  67 3d 39 30 33 20 8b 20  66 6c 61 67 3d 39 30 32  |g=903 . flag=902|
00014900  0d 86 56 05 cb 0d 86 60  5c e7 66 6c 61 67 3d 2d  |..V....`\.flag=-|
00014910  31 3a 85 20 34 32 2c 22  53 6f 72 72 79 3a 20 66  |1:. 42,"Sorry: f|
00014920  6f 72 6d 61 74 20 6e 6f  74 20 72 65 63 6f 67 6e  |ormat not recogn|
00014930  69 73 65 64 20 2d 20 70  6c 65 61 73 65 20 74 72  |ised - please tr|
00014940  79 20 61 67 61 69 6e 20  6f 72 20 63 6f 6e 74 61  |y again or conta|
00014950  63 74 20 79 6f 75 72 20  73 75 70 70 6c 69 65 72  |ct your supplier|
00014960  22 0d 86 6a 34 73 74 65  70 32 34 3d 31 3a 69 6e  |"..j4step24=1:in|
00014970  70 75 74 3d 38 3a 68 61  6d 3d 30 3a 70 6c 61 6e  |put=8:ham=0:plan|
00014980  61 72 25 3d 30 3a 62 69  67 65 6e 64 69 61 6e 62  |ar%=0:bigendianb|
00014990  69 74 73 3d a3 0d 86 74  41 63 6f 6d 70 72 65 73  |its=...tAcompres|
000149a0  73 69 6f 6e 3d 30 3a 72  66 6c 61 67 3d 66 6c 61  |sion=0:rflag=fla|
000149b0  67 3a 63 61 63 68 65 25  3d a3 3a 73 74 72 69 70  |g:cache%=.:strip|
000149c0  72 6f 77 73 25 3d 2d 31  3a 63 61 63 68 65 62 79  |rows%=-1:cacheby|
000149d0  74 65 73 25 3d a3 0d 86  7e 0d c8 8e 20 66 6c 61  |tes%=...~... fla|
000149e0  67 20 ca 0d 86 88 07 c9  20 30 0d 86 92 3d 71 75  |g ...... 0...=qu|
000149f0  61 6e 74 25 3d 34 3a cf  23 63 25 3d 34 3a 46 25  |ant%=4:.#c%=4:F%|
00014a00  3d a4 57 2b 26 31 43 3a  cf 23 63 25 3d 46 25 3a  |=.W+&1C:.#c%=F%:|
00014a10  73 74 25 3d a4 57 2b 46  25 2d 26 32 30 3a cf 23  |st%=.W+F%-&20:.#|
00014a20  63 25 3d 46 25 2b 38 0d  86 9c 1a 73 6d 3d a4 57  |c%=F%+8....sm=.W|
00014a30  3a c8 99 35 33 2c 73 6d  2c 33 20 b8 20 2c 2c 49  |:..53,sm,3 . ,,I|
00014a40  25 0d 86 a6 0b c8 8e 20  49 25 20 ca 0d 86 b0 25  |%...... I% ....%|
00014a50  c9 20 31 3a e7 73 74 25  3d 46 25 2b 31 32 20 f2  |. 1:.st%=F%+12 .|
00014a60  64 65 66 70 61 6c 32 20  8b f2 69 70 61 6c 28 32  |defpal2 ..ipal(2|
00014a70  29 0d 86 ba 35 cf 23 63  25 3d 46 25 2d 31 36 3a  |)...5.#c%=F%-16:|
00014a80  73 78 25 3d 28 a4 57 2b  31 29 2a 33 32 3a 72 6f  |sx%=(.W+1)*32:ro|
00014a90  77 62 79 74 65 73 25 3d  73 78 25 3e 3e 33 3a 69  |wbytes%=sx%>>3:i|
00014aa0  6e 70 75 74 3d 31 0d 86  c4 25 c9 20 33 3a e7 73  |nput=1...%. 3:.s|
00014ab0  74 25 3d 46 25 2b 31 32  20 f2 64 65 66 70 61 6c  |t%=F%+12 .defpal|
00014ac0  34 20 8b f2 69 70 61 6c  28 34 29 0d 86 ce 35 cf  |4 ..ipal(4)...5.|
00014ad0  23 63 25 3d 46 25 2d 31  36 3a 73 78 25 3d 28 a4  |#c%=F%-16:sx%=(.|
00014ae0  57 2b 31 29 2a 31 36 3a  72 6f 77 62 79 74 65 73  |W+1)*16:rowbytes|
00014af0  25 3d 73 78 25 3e 3e 32  3a 69 6e 70 75 74 3d 32  |%=sx%>>2:input=2|
00014b00  0d 86 d8 28 c9 20 31 35  3a e7 73 74 25 3d 46 25  |...(. 15:.st%=F%|
00014b10  2b 31 32 20 f2 64 65 66  70 61 6c 31 36 20 8b f2  |+12 .defpal16 ..|
00014b20  69 70 61 6c 28 31 36 29  0d 86 e2 34 cf 23 63 25  |ipal(16)...4.#c%|
00014b30  3d 46 25 2d 31 36 3a 73  78 25 3d 28 a4 57 2b 31  |=F%-16:sx%=(.W+1|
00014b40  29 2a 38 3a 72 6f 77 62  79 74 65 73 25 3d 73 78  |)*8:rowbytes%=sx|
00014b50  25 3e 3e 31 3a 69 6e 70  75 74 3d 34 0d 86 ec 24  |%>>1:input=4...$|
00014b60  c9 20 36 33 3a e7 73 74  25 3d 46 25 2b 31 32 20  |. 63:.st%=F%+12 |
00014b70  f2 64 65 66 70 61 6c 20  8b f2 69 70 61 6c 36 33  |.defpal ..ipal63|
00014b80  0d 86 f6 29 cf 23 63 25  3d 46 25 2d 31 36 3a 73  |...).#c%=F%-16:s|
00014b90  78 25 3d 28 a4 57 2b 31  29 2a 34 3a 72 6f 77 62  |x%=(.W+1)*4:rowb|
00014ba0  79 74 65 73 25 3d 73 78  25 0d 87 00 29 7f 20 85  |ytes%=sx%...). .|
00014bb0  34 32 2c 22 4e 6f 74 20  75 6e 64 65 72 73 74 6f  |42,"Not understo|
00014bc0  6f 64 20 52 49 53 43 20  4f 53 20 73 70 72 69 74  |od RISC OS sprit|
00014bd0  65 22 0d 87 0a 05 cb 0d  87 14 1e 73 79 25 3d a4  |e".........sy%=.|
00014be0  57 2b 31 3a cf 23 63 25  3d 73 74 25 3a 63 61 63  |W+1:.#c%=st%:cac|
00014bf0  68 65 25 3d b9 0d 87 1e  37 c8 99 35 33 2c 73 6d  |he%=....7..53,sm|
00014c00  2c 34 20 b8 20 2c 2c 6e  78 3a c8 99 35 33 2c 73  |,4 . ,,nx:..53,s|
00014c10  6d 2c 35 20 b8 20 2c 2c  6e 79 3a 6e 78 3d 31 3c  |m,5 . ,,ny:nx=1<|
00014c20  3c 6e 78 3a 6e 79 3d 31  3c 3c 6e 79 0d 87 28 2d  |<nx:ny=1<<ny..(-|
00014c30  e7 73 63 61 6c 65 25 20  78 6d 75 6c 25 3d 78 6d  |.scale% xmul%=xm|
00014c40  75 6c 25 2a 6e 78 2f 32  3a 79 6d 75 6c 25 3d 79  |ul%*nx/2:ymul%=y|
00014c50  6d 75 6c 25 2a 6e 79 2f  32 0d 87 32 0d 6f 66 66  |mul%*ny/2..2.off|
00014c60  73 65 74 25 3d 30 0d 87  3c 53 69 6e 66 6f 24 3d  |set%=0..<Sinfo$=|
00014c70  22 52 49 53 43 20 4f 53  20 73 70 72 69 74 65 2c  |"RISC OS sprite,|
00014c80  20 6d 6f 64 65 20 22 2b  c3 73 6d 2b 22 20 22 2b  | mode "+.sm+" "+|
00014c90  c3 73 78 25 2b 22 20 62  79 20 22 2b c3 73 79 25  |.sx%+" by "+.sy%|
00014ca0  2b 22 20 70 69 78 65 6c  73 2c 20 22 2b a4 62 69  |+" pixels, "+.bi|
00014cb0  74 73 28 69 6e 70 75 74  29 0d 87 46 04 0d 87 50  |ts(input)..F...P|
00014cc0  09 c9 20 39 30 30 0d 87  5a 4d 71 75 61 6e 74 25  |.. 900..ZMquant%|
00014cd0  3d 38 3a 73 78 25 3d 32  35 36 3a 73 79 25 3d 32  |=8:sx%=256:sy%=2|
00014ce0  35 36 3a 73 74 25 3d 30  3a cf 23 63 25 3d 30 3a  |56:st%=0:.#c%=0:|
00014cf0  e7 73 63 61 6c 65 25 20  79 6d 75 6c 25 3d 79 6d  |.scale% ymul%=ym|
00014d00  75 6c 25 2a 32 3a 78 6d  75 6c 25 3d 78 6d 75 6c  |ul%*2:xmul%=xmul|
00014d10  25 2a 32 0d 87 64 52 e3  43 25 3d 30 b8 32 35 35  |%*2..dR.C%=0.255|
00014d20  3a 72 25 28 43 25 29 3d  43 25 2f 32 35 35 2a 46  |:r%(C%)=C%/255*F|
00014d30  3a ed 3a 67 25 28 29 3d  72 25 28 29 3a 62 25 28  |:.:g%()=r%():b%(|
00014d40  29 3d 72 25 28 29 3a 72  6f 77 62 79 74 65 73 25  |)=r%():rowbytes%|
00014d50  3d 73 78 25 3a 72 66 6c  61 67 3d 30 3a 63 61 63  |=sx%:rflag=0:cac|
00014d60  68 65 25 3d b9 0d 87 6e  3f 69 6e 66 6f 24 3d 22  |he%=...n?info$="|
00014d70  41 49 4d 20 2e 72 61 77  20 69 6d 61 67 65 2c 20  |AIM .raw image, |
00014d80  32 35 36 20 62 79 20 32  35 36 20 70 69 78 65 6c  |256 by 256 pixel|
00014d90  73 2c 20 38 20 62 69 74  73 20 70 65 72 20 70 69  |s, 8 bits per pi|
00014da0  78 65 6c 22 0d 87 78 04  0d 87 82 09 c9 20 39 30  |xel"..x...... 90|
00014db0  31 0d 87 8c 40 71 75 61  6e 74 25 3d 34 3a 73 78  |1...@quant%=4:sx|
00014dc0  25 3d 32 35 36 3a 73 79  25 3d 32 35 36 3a e7 73  |%=256:sy%=256:.s|
00014dd0  63 61 6c 65 25 20 79 6d  75 6c 25 3d 79 6d 75 6c  |cale% ymul%=ymul|
00014de0  25 2a 32 3a 78 6d 75 6c  25 3d 78 6d 75 6c 25 2a  |%*2:xmul%=xmul%*|
00014df0  32 0d 87 96 3d 62 75 66  66 25 3d a4 64 69 6d 28  |2...=buff%=.dim(|
00014e00  73 78 25 2a 33 29 3a 72  62 25 3d 62 75 66 66 25  |sx%*3):rb%=buff%|
00014e10  3a 67 62 25 3d 62 75 66  66 25 2b 73 78 25 3a 62  |:gb%=buff%+sx%:b|
00014e20  62 25 3d 62 75 66 66 25  2b 73 78 25 2a 32 0d 87  |b%=buff%+sx%*2..|
00014e30  a0 39 e3 43 25 3d 30 b8  32 35 35 3a 72 25 28 43  |.9.C%=0.255:r%(C|
00014e40  25 29 3d 28 43 25 80 26  46 30 29 2f 26 46 30 2a  |%)=(C%.&F0)/&F0*|
00014e50  46 3a ed 3a 67 25 28 29  3d 72 25 28 29 3a 62 25  |F:.:g%()=r%():b%|
00014e60  28 29 3d 72 25 28 29 0d  87 aa 4f 69 6e 70 75 74  |()=r%()...Oinput|
00014e70  3d 32 34 3a 69 6e 66 6f  24 3d 22 48 61 77 6b 20  |=24:info$="Hawk |
00014e80  56 39 20 54 72 69 70 6c  65 20 69 6d 61 67 65 2c  |V9 Triple image,|
00014e90  20 32 35 36 20 62 79 20  32 35 36 20 70 69 78 65  | 256 by 256 pixe|
00014ea0  6c 73 2c 20 31 32 20 62  69 74 73 20 70 65 72 20  |ls, 12 bits per |
00014eb0  70 69 78 65 6c 22 0d 87  b4 04 0d 87 be 09 c9 20  |pixel"......... |
00014ec0  39 30 32 0d 87 c8 0f 20  6f 66 66 73 65 74 25 3d  |902.... offset%=|
00014ed0  32 30 0d 87 d2 0f 20 e7  20 73 6c 61 76 65 25 20  |20.... . slave% |
00014ee0  8c 0d 87 dc 30 20 20 63  25 3d 8e 28 22 3c 46 61  |....0  c%=.("<Fa|
00014ef0  73 74 47 72 61 62 24 44  69 72 3e 2e 52 65 73 6f  |stGrab$Dir>.Reso|
00014f00  75 72 63 65 73 2e 54 77  65 6c 76 65 42 69 74 22  |urces.TwelveBit"|
00014f10  29 0d 87 e6 2f 20 20 e7  20 63 25 3d 30 20 85 20  |).../  . c%=0 . |
00014f20  32 31 34 2c 22 43 61 63  68 65 20 66 69 6c 65 20  |214,"Cache file |
00014f30  63 61 6e 6e 6f 74 20 62  65 20 66 6f 75 6e 64 22  |cannot be found"|
00014f40  0d 87 f0 10 20 20 6f 66  66 73 65 74 25 3d 32 30  |....  offset%=20|
00014f50  0d 87 fa 0d 20 20 cf 23  63 25 3d 32 30 0d 88 04  |....  .#c%=20...|
00014f60  14 20 20 de 20 74 73 70  61 63 65 25 20 31 30 32  |.  . tspace% 102|
00014f70  34 0d 88 0e 06 20 cd 0d  88 18 0c 71 75 61 6e 74  |4.... .....quant|
00014f80  25 3d 34 0d 88 22 0b 73  78 25 3d 35 31 32 0d 88  |%=4..".sx%=512..|
00014f90  2c 15 72 6f 77 62 79 74  65 73 25 3d 73 78 25 2a  |,.rowbytes%=sx%*|
00014fa0  33 2f 32 0d 88 36 0b 73  79 25 3d 32 35 36 0d 88  |3/2..6.sy%=256..|
00014fb0  40 0a 73 74 25 3d 32 30  0d 88 4a 09 f2 73 69 7a  |@.st%=20..J..siz|
00014fc0  65 0d 88 54 15 62 75 66  66 25 3d a4 64 69 6d 28  |e..T.buff%=.dim(|
00014fd0  73 78 25 2a 33 29 0d 88  5e 41 72 62 25 3d 62 75  |sx%*3)..^Arb%=bu|
00014fe0  66 66 25 3a 67 62 25 3d  62 75 66 66 25 2b 73 78  |ff%:gb%=buff%+sx|
00014ff0  25 3a 62 62 25 3d 62 75  66 66 25 2b 73 78 25 2a  |%:bb%=buff%+sx%*|
00015000  32 3a 72 61 74 73 25 3d  a4 64 69 6d 28 72 6f 77  |2:rats%=.dim(row|
00015010  62 79 74 65 73 25 29 0d  88 68 37 e3 43 25 3d 30  |bytes%)..h7.C%=0|
00015020  b8 32 35 35 3a 72 25 28  43 25 29 3d 28 43 25 80  |.255:r%(C%)=(C%.|
00015030  26 46 29 2f 26 46 2a 46  3a ed 3a 67 25 28 29 3d  |&F)/&F*F:.:g%()=|
00015040  72 25 28 29 3a 62 25 28  29 3d 72 25 28 29 0d 88  |r%():b%()=r%()..|
00015050  72 59 69 6e 70 75 74 3d  32 34 3a 69 6e 66 6f 24  |rYinput=24:info$|
00015060  3d 22 48 61 77 6b 20 56  39 20 43 6f 6c 6f 75 72  |="Hawk V9 Colour|
00015070  20 69 6d 61 67 65 2c 20  22 2b c3 73 78 25 2b 22  | image, "+.sx%+"|
00015080  20 62 79 20 22 2b c3 73  79 25 2b 22 20 70 69 78  | by "+.sy%+" pix|
00015090  65 6c 73 2c 20 31 32 20  62 69 74 73 20 70 65 72  |els, 12 bits per|
000150a0  20 70 69 78 65 6c 22 0d  88 7c 04 0d 88 86 09 c9  | pixel"..|......|
000150b0  20 39 30 33 0d 88 90 0f  20 6f 66 66 73 65 74 25  | 903.... offset%|
000150c0  3d 32 30 0d 88 9a 0f 20  e7 20 73 6c 61 76 65 25  |=20.... . slave%|
000150d0  20 8c 0d 88 a4 32 20 20  20 20 63 25 3d 8e 28 22  | ....2    c%=.("|
000150e0  3c 46 61 73 74 47 72 61  62 24 44 69 72 3e 2e 52  |<FastGrab$Dir>.R|
000150f0  65 73 6f 75 72 63 65 73  2e 54 77 65 6c 76 65 42  |esources.TwelveB|
00015100  69 74 22 29 0d 88 ae 2f  20 20 e7 20 63 25 3d 30  |it").../  . c%=0|
00015110  20 85 20 32 31 34 2c 22  43 61 63 68 65 20 66 69  | . 214,"Cache fi|
00015120  6c 65 20 63 61 6e 6e 6f  74 20 62 65 20 66 6f 75  |le cannot be fou|
00015130  6e 64 22 0d 88 b8 10 20  20 6f 66 66 73 65 74 25  |nd"....  offset%|
00015140  3d 32 30 0d 88 c2 0d 20  20 cf 23 63 25 3d 32 30  |=20....  .#c%=20|
00015150  0d 88 cc 14 20 20 de 20  74 73 70 61 63 65 25 20  |....  . tspace% |
00015160  31 30 32 34 0d 88 d6 06  20 cd 0d 88 e0 0c 71 75  |1024.... .....qu|
00015170  61 6e 74 25 3d 35 0d 88  ea 0b 73 78 25 3d 35 31  |ant%=5....sx%=51|
00015180  32 0d 88 f4 13 72 6f 77  62 79 74 65 73 25 3d 73  |2....rowbytes%=s|
00015190  78 25 2a 32 0d 88 fe 0b  73 79 25 3d 32 35 36 0d  |x%*2....sy%=256.|
000151a0  89 08 0a 73 74 25 3d 32  30 0d 89 12 09 f2 73 69  |...st%=20.....si|
000151b0  7a 65 0d 89 1c 15 62 75  66 66 25 3d a4 64 69 6d  |ze....buff%=.dim|
000151c0  28 73 78 25 2a 33 29 0d  89 26 41 72 62 25 3d 62  |(sx%*3)..&Arb%=b|
000151d0  75 66 66 25 3a 67 62 25  3d 62 75 66 66 25 2b 73  |uff%:gb%=buff%+s|
000151e0  78 25 3a 62 62 25 3d 62  75 66 66 25 2b 73 78 25  |x%:bb%=buff%+sx%|
000151f0  2a 32 3a 72 61 74 73 25  3d a4 64 69 6d 28 72 6f  |*2:rats%=.dim(ro|
00015200  77 62 79 74 65 73 25 29  0d 89 30 40 e3 20 43 25  |wbytes%)..0@. C%|
00015210  3d 30 20 b8 20 32 35 35  3a 72 25 28 43 25 29 3d  |=0 . 255:r%(C%)=|
00015220  28 43 25 80 26 31 46 29  2f 26 31 46 2a 46 3a ed  |(C%.&1F)/&1F*F:.|
00015230  3a 67 25 28 29 3d 72 25  28 29 2a 31 2e 36 3a 62  |:g%()=r%()*1.6:b|
00015240  25 28 29 3d 72 25 28 29  0d 89 3a 5f 69 6e 70 75  |%()=r%()..:_inpu|
00015250  74 3d 32 34 3a 69 6e 66  6f 24 3d 22 48 61 77 6b  |t=24:info$="Hawk|
00015260  20 56 39 20 4d 6b 20 49  49 20 43 6f 6c 6f 75 72  | V9 Mk II Colour|
00015270  20 69 6d 61 67 65 2c 20  22 2b c3 73 78 25 2b 22  | image, "+.sx%+"|
00015280  20 62 79 20 22 2b c3 73  79 25 2b 22 20 70 69 78  | by "+.sy%+" pix|
00015290  65 6c 73 2c 20 31 36 20  62 69 74 73 20 70 65 72  |els, 16 bits per|
000152a0  20 70 69 78 65 6c 22 0d  89 44 04 0d 89 4e 05 cb  | pixel"..D...N..|
000152b0  0d 89 58 11 e7 69 6e 66  6f 25 20 f1 69 6e 66 6f  |..X..info% .info|
000152c0  24 0d 89 62 23 c8 99 22  48 6f 75 72 67 6c 61 73  |$..b#.."Hourglas|
000152d0  73 5f 4f 6e 22 2c 31 3a  68 6f 75 72 25 3d 26 34  |s_On",1:hour%=&4|
000152e0  30 36 63 34 0d 89 6c 30  e7 69 6e 76 65 72 74 25  |06c4..l0.invert%|
000152f0  20 72 25 28 29 3d 46 2d  72 25 28 29 3a 67 25 28  | r%()=F-r%():g%(|
00015300  29 3d 46 2d 67 25 28 29  3a 62 25 28 29 3d 46 2d  |)=F-g%():b%()=F-|
00015310  62 25 28 29 0d 89 76 0a  c8 8e 20 6d 20 ca 0d 89  |b%()..v... m ...|
00015320  80 44 c9 20 2d 31 3a 78  25 3d 32 35 36 3a 79 25  |.D. -1:x%=256:y%|
00015330  3d 32 35 36 3a 6e 63 6f  6c 3d 32 35 35 3a e7 73  |=256:ncol=255:.s|
00015340  63 61 6c 65 6f 25 20 78  64 69 76 25 3d 78 64 69  |caleo% xdiv%=xdi|
00015350  76 25 2a 32 3a 79 64 69  76 25 3d 79 64 69 76 25  |v%*2:ydiv%=ydiv%|
00015360  2a 32 0d 89 8a 2e c9 20  2d 32 3a 78 25 3d 73 78  |*2..... -2:x%=sx|
00015370  25 3a 79 25 3d 73 79 25  3a e7 73 70 6d 3d 31 38  |%:y%=sy%:.spm=18|
00015380  20 6e 63 6f 6c 3d 31 20  8b 6e 63 6f 6c 3d 31 35  | ncol=1 .ncol=15|
00015390  0d 89 94 05 7f 0d 89 9e  35 c8 99 35 33 2c 6d 2c  |........5..53,m,|
000153a0  34 20 b8 20 2c 2c 6e 78  3a c8 99 35 33 2c 6d 2c  |4 . ,,nx:..53,m,|
000153b0  35 20 b8 20 2c 2c 6e 79  3a 6e 78 3d 31 3c 3c 6e  |5 . ,,ny:nx=1<<n|
000153c0  78 3a 6e 79 3d 31 3c 3c  6e 79 0d 89 a8 31 c8 99  |x:ny=1<<ny...1..|
000153d0  35 33 2c 6d 2c 31 31 20  b8 20 2c 2c 78 25 3a c8  |53,m,11 . ,,x%:.|
000153e0  99 35 33 2c 6d 2c 31 32  20 b8 20 2c 2c 79 25 3a  |.53,m,12 . ,,y%:|
000153f0  78 25 2b 3d 31 3a 79 25  2b 3d 31 0d 89 b2 20 c8  |x%+=1:y%+=1... .|
00015400  99 35 33 2c 6d 2c 33 20  b8 20 2c 2c 6e 63 6f 6c  |.53,m,3 . ,,ncol|
00015410  3a e7 73 63 61 6c 65 6f  25 20 8c 0d 89 bc 0e e7  |:.scaleo% ......|
00015420  72 6f 74 61 74 65 25 20  8c 0d 89 c6 25 78 64 69  |rotate% ....%xdi|
00015430  76 25 3d 78 64 69 76 25  2a 6e 79 2f 32 3a 79 64  |v%=xdiv%*ny/2:yd|
00015440  69 76 25 3d 79 64 69 76  25 2a 6e 78 2f 32 0d 89  |iv%=ydiv%*nx/2..|
00015450  d0 05 cc 0d 89 da 25 78  64 69 76 25 3d 78 64 69  |......%xdiv%=xdi|
00015460  76 25 2a 6e 78 2f 32 3a  79 64 69 76 25 3d 79 64  |v%*nx/2:ydiv%=yd|
00015470  69 76 25 2a 6e 79 2f 32  0d 89 e4 05 cd 0d 89 ee  |iv%*ny/2........|
00015480  05 cd 0d 89 f8 05 cb 0d  8a 02 0d e7 6d 24 3d 22  |............m$="|
00015490  50 22 20 8c 0d 8a 0c 23  4a 25 3d 34 30 39 36 3a  |P" ....#J%=4096:|
000154a0  e7 6e 63 6f 6c 3c 36 33  20 4a 25 2b 3d 28 6e 63  |.ncol<63 J%+=(nc|
000154b0  6f 6c 2b 31 29 2a 34 0d  8a 16 2a 6c 6f 6f 6b 75  |ol+1)*4...*looku|
000154c0  70 25 3d a4 64 69 6d 28  4a 25 29 3a 70 61 6c 65  |p%=.dim(J%):pale|
000154d0  74 74 65 25 3d 6c 6f 6f  6b 75 70 25 2b 34 30 39  |tte%=lookup%+409|
000154e0  36 0d 8a 20 32 49 25 3d  8e 28 22 3c 46 61 73 74  |6.. 2I%=.("<Fast|
000154f0  47 72 61 62 24 44 69 72  3e 2e 52 65 73 6f 75 72  |Grab$Dir>.Resour|
00015500  63 65 73 2e 43 46 53 49  69 63 74 22 2b c3 6e 63  |ces.CFSIict"+.nc|
00015510  6f 6c 29 0d 8a 2a 09 e7  49 25 20 8c 0d 8a 34 45  |ol)..*..I% ...4E|
00015520  d9 23 49 25 3a ff 22 6c  6f 61 64 20 3c 46 61 73  |.#I%:."load <Fas|
00015530  74 47 72 61 62 24 44 69  72 3e 2e 52 65 73 6f 75  |tGrab$Dir>.Resou|
00015540  72 63 65 73 2e 43 46 53  49 69 63 74 22 2b c3 6e  |rces.CFSIict"+.n|
00015550  63 6f 6c 2b 22 20 22 2b  c3 7e 6c 6f 6f 6b 75 70  |col+" "+.~lookup|
00015560  25 0d 8a 3e 05 cc 0d 8a  48 28 49 25 3d 26 34 30  |%..>....H(I%=&40|
00015570  37 34 34 3a e3 42 25 3d  30 b8 31 35 3a c8 99 68  |744:.B%=0.15:..h|
00015580  6f 75 72 25 2c 42 25 2a  31 30 30 81 31 36 0d 8a  |our%,B%*100.16..|
00015590  52 27 e3 47 25 3d 30 b8  31 35 3a 4c 25 3d 28 42  |R'.G%=0.15:L%=(B|
000155a0  25 3c 3c 38 20 84 20 47  25 3c 3c 34 29 2b 6c 6f  |%<<8 . G%<<4)+lo|
000155b0  6f 6b 75 70 25 0d 8a 5c  24 43 25 3d 42 25 3c 3c  |okup%..\$C%=B%<<|
000155c0  32 38 84 42 25 3c 3c 32  34 20 84 20 47 25 3c 3c  |28.B%<<24 . G%<<|
000155d0  32 30 84 47 25 3c 3c 31  36 0d 8a 66 2c e3 52 25  |20.G%<<16..f,.R%|
000155e0  3d 30 b8 31 35 3a c8 99  49 25 2c 43 25 84 20 52  |=0.15:..I%,C%. R|
000155f0  25 3c 3c 31 32 84 52 25  3c 3c 38 20 b8 20 4c 25  |%<<12.R%<<8 . L%|
00015600  3f 52 25 3a ed 0d 8a 70  07 ed 3a ed 0d 8a 7a 0e  |?R%:...p..:...z.|
00015610  e7 6e 63 6f 6c 3c 36 33  20 8c 0d 8a 84 3e e3 49  |.ncol<63 ....>.I|
00015620  25 3d 30 b8 6e 63 6f 6c  3a c8 99 22 4f 53 5f 52  |%=0.ncol:.."OS_R|
00015630  65 61 64 50 61 6c 65 74  74 65 22 2c 49 25 2c 31  |eadPalette",I%,1|
00015640  36 20 b8 20 2c 2c 70 61  6c 65 74 74 65 25 21 28  |6 . ,,palette%!(|
00015650  49 25 3c 3c 32 29 3a ed  0d 8a 8e 05 cd 0d 8a 98  |I%<<2):.........|
00015660  32 49 25 3d ae 28 22 3c  46 61 73 74 47 72 61 62  |2I%=.("<FastGrab|
00015670  24 44 69 72 3e 2e 52 65  73 6f 75 72 63 65 73 2e  |$Dir>.Resources.|
00015680  43 46 53 49 69 63 74 22  2b c3 6e 63 6f 6c 29 0d  |CFSIict"+.ncol).|
00015690  8a a2 20 e3 42 25 3d 30  b8 4a 25 2d 31 3a d5 23  |.. .B%=0.J%-1:.#|
000156a0  49 25 2c 6c 6f 6f 6b 75  70 25 3f 42 25 3a ed 0d  |I%,lookup%?B%:..|
000156b0  8a ac 08 d9 23 49 25 0d  8a b6 05 cd 0d 8a c0 05  |....#I%.........|
000156c0  cd 0d 8a ca 13 e7 66 61  73 74 25 20 e7 eb 3c 3e  |......fast% ..<>|
000156d0  30 20 eb 30 0d 8a d4 24  e7 72 6f 74 61 74 65 25  |0 .0...$.rotate%|
000156e0  20 c8 94 20 78 25 2c 79  25 3a c8 94 20 78 6d 75  | .. x%,y%:.. xmu|
000156f0  6c 25 2c 79 6d 75 6c 25  0d 8a de 16 e7 78 64 69  |l%,ymul%.....xdi|
00015700  76 25 3d 30 20 78 64 69  76 25 3d 73 78 25 0d 8a  |v%=0 xdiv%=sx%..|
00015710  e8 16 e7 79 64 69 76 25  3d 30 20 79 64 69 76 25  |...ydiv%=0 ydiv%|
00015720  3d 73 79 25 0d 8a f2 1f  e7 78 73 24 3d 22 3d 22  |=sy%.....xs$="="|
00015730  20 78 6d 75 6c 25 3d 78  25 3a 78 64 69 76 25 3d  | xmul%=x%:xdiv%=|
00015740  73 78 25 0d 8a fc 1f e7  79 73 24 3d 22 3d 22 20  |sx%.....ys$="=" |
00015750  79 6d 75 6c 25 3d 79 25  3a 79 64 69 76 25 3d 73  |ymul%=y%:ydiv%=s|
00015760  79 25 0d 8b 06 0d e7 6e  63 6f 6c 3d 31 20 8c 0d  |y%.....ncol=1 ..|
00015770  8b 10 0b c8 8e 20 6d 24  20 ca 0d 8b 1a 24 c9 22  |..... m$ ....$."|
00015780  43 22 3a 78 64 69 76 25  3d 78 64 69 76 25 2a 34  |C":xdiv%=xdiv%*4|
00015790  3a 79 64 69 76 25 3d 79  64 69 76 25 2a 34 0d 8b  |:ydiv%=ydiv%*4..|
000157a0  24 13 de 20 41 25 28 31  36 29 2c 42 25 28 31 36  |$.. A%(16),B%(16|
000157b0  29 0d 8b 2e aa 41 25 28  29 3d 30 2c 26 30 30 30  |)....A%()=0,&000|
000157c0  30 30 30 30 31 2c 26 30  38 30 30 30 30 30 31 2c  |00001,&08000001,|
000157d0  26 30 38 30 30 30 31 30  31 2c 26 30 38 30 38 30  |&08000101,&08080|
000157e0  31 30 31 2c 26 30 38 30  38 30 31 30 33 2c 26 30  |101,&08080103,&0|
000157f0  43 30 38 30 31 30 33 2c  26 30 43 30 38 30 33 30  |C080103,&0C08030|
00015800  33 2c 26 30 43 30 43 30  33 30 33 2c 26 30 43 30  |3,&0C0C0303,&0C0|
00015810  45 30 33 30 33 2c 26 30  43 30 45 30 37 30 33 2c  |E0303,&0C0E0703,|
00015820  26 30 45 30 45 30 37 30  33 2c 26 30 45 30 45 30  |&0E0E0703,&0E0E0|
00015830  37 30 37 2c 26 30 45 30  46 30 37 30 37 2c 26 30  |707,&0E0F0707,&0|
00015840  45 30 46 30 46 30 37 2c  26 30 46 30 46 30 46 30  |E0F0F07,&0F0F0F0|
00015850  37 2c 26 30 46 30 46 30  46 30 46 0d 8b 38 aa 42  |7,&0F0F0F0F..8.B|
00015860  25 28 29 3d 30 2c 26 30  30 30 30 30 30 30 38 2c  |%()=0,&00000008,|
00015870  26 30 31 30 30 30 30 30  38 2c 26 30 31 30 30 30  |&01000008,&01000|
00015880  38 30 38 2c 26 30 31 30  31 30 38 30 38 2c 26 30  |808,&01010808,&0|
00015890  31 30 31 30 38 30 43 2c  26 30 33 30 31 30 38 30  |101080C,&0301080|
000158a0  43 2c 26 30 33 30 31 30  43 30 43 2c 26 30 33 30  |C,&03010C0C,&030|
000158b0  33 30 43 30 43 2c 26 30  33 30 37 30 43 30 43 2c  |30C0C,&03070C0C,|
000158c0  26 30 33 30 37 30 45 30  43 2c 26 30 37 30 37 30  |&03070E0C,&07070|
000158d0  45 30 43 2c 26 30 37 30  37 30 45 30 45 2c 26 30  |E0C,&07070E0E,&0|
000158e0  37 30 46 30 45 30 45 2c  26 30 37 30 46 30 46 30  |70F0E0E,&070F0F0|
000158f0  45 2c 26 30 46 30 46 30  46 30 45 2c 26 30 46 30  |E,&0F0F0F0E,&0F0|
00015900  46 30 46 30 46 0d 8b 42  32 65 76 65 6e 5f 67 61  |F0F0F..B2even_ga|
00015910  72 64 3d a4 64 69 6d 28  31 37 2a 33 32 2a 34 29  |rd=.dim(17*32*4)|
00015920  3a 6f 64 64 5f 67 61 72  64 3d a4 64 69 6d 28 31  |:odd_gard=.dim(1|
00015930  37 2a 33 32 2a 34 29 0d  8b 4c 43 e3 49 25 3d 30  |7*32*4)..LC.I%=0|
00015940  b8 31 36 3a e3 4a 25 3d  30 b8 31 36 3a 65 76 65  |.16:.J%=0.16:eve|
00015950  6e 5f 67 61 72 64 21 28  4a 25 2a 33 32 2a 34 2b  |n_gard!(J%*32*4+|
00015960  49 25 2a 34 29 3d 41 25  28 49 25 29 84 42 25 28  |I%*4)=A%(I%).B%(|
00015970  4a 25 29 3c 3c 34 3a ed  3a ed 0d 8b 56 42 e3 49  |J%)<<4:.:...VB.I|
00015980  25 3d 30 b8 31 36 3a e3  4a 25 3d 30 b8 31 36 3a  |%=0.16:.J%=0.16:|
00015990  6f 64 64 5f 67 61 72 64  21 28 49 25 2a 33 32 2a  |odd_gard!(I%*32*|
000159a0  34 2b 4a 25 2a 34 29 3d  42 25 28 49 25 29 84 41  |4+J%*4)=B%(I%).A|
000159b0  25 28 4a 25 29 3c 3c 34  3a ed 3a ed 0d 8b 60 24  |%(J%)<<4:.:...`$|
000159c0  c9 22 54 22 3a 78 64 69  76 25 3d 78 64 69 76 25  |."T":xdiv%=xdiv%|
000159d0  2a 33 3a 79 64 69 76 25  3d 79 64 69 76 25 2a 33  |*3:ydiv%=ydiv%*3|
000159e0  0d 8b 6a 11 de 20 41 25  28 39 29 2c 42 25 28 39  |..j.. A%(9),B%(9|
000159f0  29 0d 8b 74 40 41 25 28  29 3d 30 2c 26 30 30 30  |)..t@A%()=0,&000|
00015a00  31 2c 26 34 30 30 31 2c  26 34 30 34 31 2c 26 34  |1,&4001,&4041,&4|
00015a10  30 34 33 2c 26 34 30 43  33 2c 26 36 30 43 33 2c  |043,&40C3,&60C3,|
00015a20  26 36 31 43 33 2c 26 37  31 43 33 2c 26 37 31 43  |&61C3,&71C3,&71C|
00015a30  37 0d 8b 7e 40 42 25 28  29 3d 30 2c 26 30 30 30  |7..~@B%()=0,&000|
00015a40  34 2c 26 31 30 30 34 2c  26 31 31 30 34 2c 26 31  |4,&1004,&1104,&1|
00015a50  31 30 36 2c 26 31 31 38  36 2c 26 33 31 38 36 2c  |106,&1186,&3186,|
00015a60  26 33 31 43 36 2c 26 37  31 43 36 2c 26 37 31 43  |&31C6,&71C6,&71C|
00015a70  37 0d 8b 88 32 65 76 65  6e 5f 67 61 72 64 3d a4  |7...2even_gard=.|
00015a80  64 69 6d 28 31 30 2a 31  36 2a 34 29 3a 6f 64 64  |dim(10*16*4):odd|
00015a90  5f 67 61 72 64 3d a4 64  69 6d 28 31 30 2a 31 36  |_gard=.dim(10*16|
00015aa0  2a 34 29 0d 8b 92 41 e3  49 25 3d 30 b8 39 3a e3  |*4)...A.I%=0.9:.|
00015ab0  4a 25 3d 30 b8 39 3a 65  76 65 6e 5f 67 61 72 64  |J%=0.9:even_gard|
00015ac0  21 28 4a 25 2a 31 36 2a  34 2b 49 25 2a 34 29 3d  |!(J%*16*4+I%*4)=|
00015ad0  41 25 28 49 25 29 84 42  25 28 4a 25 29 3c 3c 33  |A%(I%).B%(J%)<<3|
00015ae0  3a ed 3a ed 0d 8b 9c 40  e3 49 25 3d 30 b8 39 3a  |:.:....@.I%=0.9:|
00015af0  e3 4a 25 3d 30 b8 39 3a  6f 64 64 5f 67 61 72 64  |.J%=0.9:odd_gard|
00015b00  21 28 49 25 2a 31 36 2a  34 2b 4a 25 2a 34 29 3d  |!(I%*16*4+J%*4)=|
00015b10  42 25 28 49 25 29 84 41  25 28 4a 25 29 3c 3c 33  |B%(I%).A%(J%)<<3|
00015b20  3a ed 3a ed 0d 8b a6 24  c9 22 44 22 3a 78 64 69  |:.:....$."D":xdi|
00015b30  76 25 3d 78 64 69 76 25  2a 32 3a 79 64 69 76 25  |v%=xdiv%*2:ydiv%|
00015b40  3d 79 64 69 76 25 2a 32  0d 8b b0 11 de 20 41 25  |=ydiv%*2..... A%|
00015b50  28 34 29 2c 42 25 28 34  29 0d 8b ba 19 41 25 28  |(4),B%(4)....A%(|
00015b60  29 3d 30 2c 26 31 2c 26  32 31 2c 26 33 31 2c 26  |)=0,&1,&21,&31,&|
00015b70  33 33 0d 8b c4 19 42 25  28 29 3d 30 2c 26 32 2c  |33....B%()=0,&2,|
00015b80  26 31 32 2c 26 33 32 2c  26 33 33 0d 8b ce 2a 65  |&12,&32,&33...*e|
00015b90  76 65 6e 5f 67 61 72 64  3d a4 64 69 6d 28 35 2a  |ven_gard=.dim(5*|
00015ba0  38 29 3a 6f 64 64 5f 67  61 72 64 3d a4 64 69 6d  |8):odd_gard=.dim|
00015bb0  28 35 2a 38 29 0d 8b d8  3c e3 49 25 3d 30 b8 34  |(5*8)...<.I%=0.4|
00015bc0  3a e3 4a 25 3d 30 b8 34  3a 65 76 65 6e 5f 67 61  |:.J%=0.4:even_ga|
00015bd0  72 64 3f 28 4a 25 2a 38  2b 49 25 29 3d 41 25 28  |rd?(J%*8+I%)=A%(|
00015be0  49 25 29 84 42 25 28 4a  25 29 3c 3c 32 3a ed 3a  |I%).B%(J%)<<2:.:|
00015bf0  ed 0d 8b e2 3b e3 49 25  3d 30 b8 34 3a e3 4a 25  |....;.I%=0.4:.J%|
00015c00  3d 30 b8 34 3a 6f 64 64  5f 67 61 72 64 3f 28 49  |=0.4:odd_gard?(I|
00015c10  25 2a 38 2b 4a 25 29 3d  42 25 28 49 25 29 84 41  |%*8+J%)=B%(I%).A|
00015c20  25 28 4a 25 29 3c 3c 32  3a ed 3a ed 0d 8b ec 05  |%(J%)<<2:.:.....|
00015c30  cb 0d 8b f6 05 cd 0d 8c  00 2d f2 72 65 64 75 63  |.........-.reduc|
00015c40  65 28 78 6d 75 6c 25 2c  78 64 69 76 25 29 3a f2  |e(xmul%,xdiv%):.|
00015c50  72 65 64 75 63 65 28 79  6d 75 6c 25 2c 79 64 69  |reduce(ymul%,ydi|
00015c60  76 25 29 0d 8c 0a 40 e7  69 6e 66 6f 25 20 f1 22  |v%)...@.info% ."|
00015c70  53 69 7a 65 20 72 61 74  69 6f 73 20 61 72 65 20  |Size ratios are |
00015c80  78 20 22 3b 78 6d 75 6c  25 22 3a 22 78 64 69 76  |x ";xmul%":"xdiv|
00015c90  25 22 20 79 20 22 79 6d  75 6c 25 22 3a 22 79 64  |%" y "ymul%":"yd|
00015ca0  69 76 25 0d 8c 14 3f 78  25 3d 73 78 25 2a 78 6d  |iv%...?x%=sx%*xm|
00015cb0  75 6c 25 2f 78 64 69 76  25 2b 2e 39 39 39 39 3a  |ul%/xdiv%+.9999:|
00015cc0  79 25 3d 73 79 25 2a 79  6d 75 6c 25 2f 79 64 69  |y%=sy%*ymul%/ydi|
00015cd0  76 25 2b 2e 39 39 39 39  3a 72 6f 77 73 25 3d 73  |v%+.9999:rows%=s|
00015ce0  79 25 0d 8c 1e 18 6f 72  64 65 72 25 3d 78 25 2a  |y%....order%=x%*|
00015cf0  79 25 3e 73 78 25 2a 73  79 25 0d 8c 28 0a c8 8e  |y%>sx%*sy%..(...|
00015d00  20 6d 20 ca 0d 8c 32 0e  c9 20 2d 31 3a 63 6f 6c  | m ...2.. -1:col|
00015d10  3d 30 0d 8c 3c 05 7f 0d  8c 46 24 e7 6d 24 3d 22  |=0..<....F$.m$="|
00015d20  44 22 20 e7 6e 63 6f 6c  3c 3e 31 35 20 80 6e 63  |D" .ncol<>15 .nc|
00015d30  6f 6c 3c 3e 31 20 6d 24  3d 22 22 0d 8c 50 33 63  |ol<>1 m$=""..P3c|
00015d40  6f 6c 3d 30 3a e7 6e 63  6f 6c 3e 31 35 20 84 20  |ol=0:.ncol>15 . |
00015d50  6d 24 3d 22 43 22 20 84  20 6d 24 3d 22 44 22 20  |m$="C" . m$="D" |
00015d60  84 20 6d 24 3d 22 50 22  20 63 6f 6c 3d 32 0d 8c  |. m$="P" col=2..|
00015d70  5a 05 cb 0d 8c 64 0d e7  6e 63 6f 6c 3d 31 20 8c  |Z....d..ncol=1 .|
00015d80  0d 8c 6e 0b c8 8e 20 6d  24 20 ca 0d 8c 78 19 c9  |..n... m$ ...x..|
00015d90  22 43 22 3a 63 6f 6c 3d  30 3a 78 25 3d 78 25 2b  |"C":col=0:x%=x%+|
00015da0  31 80 ac 31 0d 8c 82 19  c9 22 44 22 3a 63 6f 6c  |1..1....."D":col|
00015db0  3d 30 3a 78 25 3d 78 25  2b 33 80 ac 33 0d 8c 8c  |=0:x%=x%+3..3...|
00015dc0  19 c9 22 54 22 3a 63 6f  6c 3d 30 3a 78 25 3d 78  |.."T":col=0:x%=x|
00015dd0  25 2b 31 80 ac 31 0d 8c  96 05 cb 0d 8c a0 05 cd  |%+1..1..........|
00015de0  0d 8c aa 1b e7 73 68 61  72 70 65 6e 25 3d b9 20  |.....sharpen%=. |
00015df0  73 68 61 72 70 65 6e 25  3d 32 34 0d 8c b4 13 de  |sharpen%=24.....|
00015e00  20 63 6c 25 28 78 25 2b  37 2c 63 6f 6c 29 0d 8c  | cl%(x%+7,col)..|
00015e10  be 22 de 20 78 6c 25 28  78 25 2b 37 2c 63 6f 6c  |.". xl%(x%+7,col|
00015e20  29 2c 78 70 25 28 73 78  25 2b 37 2c 63 6f 6c 29  |),xp%(sx%+7,col)|
00015e30  0d 8c c8 14 de 20 78 6c  32 25 28 78 25 2b 37 2c  |..... xl2%(x%+7,|
00015e40  63 6f 6c 29 0d 8c d2 0f  e7 73 68 61 72 70 65 6e  |col).....sharpen|
00015e50  25 20 8c 0d 8c dc 0d e7  6f 72 64 65 72 25 20 8c  |% ......order% .|
00015e60  0d 8c e6 34 de 20 72 6d  25 28 73 78 25 2b 37 2c  |...4. rm%(sx%+7,|
00015e70  63 6f 6c 29 2c 72 6d 31  25 28 73 78 25 2b 37 2c  |col),rm1%(sx%+7,|
00015e80  63 6f 6c 29 2c 72 6d 32  25 28 73 78 25 2b 37 2c  |col),rm2%(sx%+7,|
00015e90  63 6f 6c 29 0d 8c f0 05  cc 0d 8c fa 31 de 20 72  |col)........1. r|
00015ea0  6d 25 28 78 25 2b 37 2c  63 6f 6c 29 2c 72 6d 31  |m%(x%+7,col),rm1|
00015eb0  25 28 78 25 2b 37 2c 63  6f 6c 29 2c 72 6d 32 25  |%(x%+7,col),rm2%|
00015ec0  28 78 25 2b 37 2c 63 6f  6c 29 0d 8d 04 05 cd 0d  |(x%+7,col)......|
00015ed0  8d 0e 05 cd 0d 8d 18 22  e7 68 69 73 74 25 84 65  |.......".hist%.e|
00015ee0  71 75 61 6c 25 20 de 20  76 61 6c 73 25 28 32 35  |qual% . vals%(25|
00015ef0  36 2c 63 6f 6c 29 0d 8d  22 13 de 20 6e 6c 25 28  |6,col)..".. nl%(|
00015f00  78 25 2b 37 2c 63 6f 6c  29 0d 8d 2c 17 74 6f 74  |x%+7,col)..,.tot|
00015f10  76 61 6c 73 25 3d 78 25  2a 28 63 6f 6c 2b 31 29  |vals%=x%*(col+1)|
00015f20  0d 8d 36 19 74 6f 74 76  61 6c 73 32 25 3d 73 78  |..6.totvals2%=sx|
00015f30  25 2a 28 63 6f 6c 2b 31  29 0d 8d 40 1a 63 6f 64  |%*(col+1)..@.cod|
00015f40  65 25 3d a4 64 69 6d 28  38 31 39 32 29 3a 53 50  |e%=.dim(8192):SP|
00015f50  3d 31 33 0d 8d 4a 0d e7  63 61 63 68 65 25 20 8c  |=13..J..cache% .|
00015f60  0d 8d 54 2c c8 99 26 32  30 30 32 33 2c 22 43 68  |..T,..&20023,"Ch|
00015f70  61 6e 67 65 46 53 49 24  43 61 63 68 65 22 2c 63  |angeFSI$Cache",c|
00015f80  6f 64 65 25 2c 2d 31 20  b8 2c 2c 5a 0d 8d 5e 0b  |ode%,-1 .,,Z..^.|
00015f90  e7 5a 3c 3e 30 20 8c 0d  8d 68 42 c8 99 33 35 2c  |.Z<>0 ...hB..35,|
00015fa0  22 43 68 61 6e 67 65 46  53 49 24 43 61 63 68 65  |"ChangeFSI$Cache|
00015fb0  22 2c 63 6f 64 65 25 2c  32 30 20 b8 2c 2c 5a 3a  |",code%,20 .,,Z:|
00015fc0  63 6f 64 65 25 3f 5a 3d  31 33 3a 63 61 63 68 65  |code%?Z=13:cache|
00015fd0  25 3d bb 24 63 6f 64 65  25 0d 8d 72 31 e7 a7 24  |%=.$code%..r1..$|
00015fe0  63 6f 64 65 25 2c 22 4b  22 29 84 a7 24 63 6f 64  |code%,"K")..$cod|
00015ff0  65 25 2c 22 6b 22 29 20  63 61 63 68 65 25 3d 63  |e%,"k") cache%=c|
00016000  61 63 68 65 25 2a 31 30  32 34 0d 8d 7c 05 cc 0d  |ache%*1024..|...|
00016010  8d 86 0f 63 61 63 68 65  25 3d 38 31 39 32 0d 8d  |...cache%=8192..|
00016020  90 05 cd 0d 8d 9a 12 e7  63 61 63 68 65 62 79 74  |........cachebyt|
00016030  65 73 25 20 8c 0d 8d a4  3a 66 69 6c 65 73 69 7a  |es% ....:filesiz|
00016040  65 25 3d a2 23 63 25 2d  8f 23 63 25 3a e7 63 61  |e%=.#c%-.#c%:.ca|
00016050  63 68 65 25 3e 66 69 6c  65 73 69 7a 65 25 20 63  |che%>filesize% c|
00016060  61 63 68 65 25 3d 66 69  6c 65 73 69 7a 65 25 0d  |ache%=filesize%.|
00016070  8d ae 15 63 61 63 68 65  72 6f 77 73 25 3d 63 61  |...cacherows%=ca|
00016080  63 68 65 25 0d 8d b8 05  cc 0d 8d c2 3e 66 69 6c  |che%........>fil|
00016090  65 73 69 7a 65 25 3d 73  79 25 2a 72 6f 77 62 79  |esize%=sy%*rowby|
000160a0  74 65 73 25 3a e7 63 61  63 68 65 25 3c 72 6f 77  |tes%:.cache%<row|
000160b0  62 79 74 65 73 25 20 63  61 63 68 65 25 3d 72 6f  |bytes% cache%=ro|
000160c0  77 62 79 74 65 73 25 0d  8d cc 26 e7 63 61 63 68  |wbytes%...&.cach|
000160d0  65 25 3e 66 69 6c 65 73  69 7a 65 25 20 63 61 63  |e%>filesize% cac|
000160e0  68 65 25 3d 66 69 6c 65  73 69 7a 65 25 0d 8d d6  |he%=filesize%...|
000160f0  43 63 61 63 68 65 72 6f  77 73 25 3d 73 74 72 69  |Ccacherows%=stri|
00016100  70 72 6f 77 73 25 3a e7  63 61 63 68 65 72 6f 77  |prows%:.cacherow|
00016110  73 25 3c 31 20 63 61 63  68 65 72 6f 77 73 25 3d  |s%<1 cacherows%=|
00016120  63 61 63 68 65 25 81 72  6f 77 62 79 74 65 73 25  |cache%.rowbytes%|
00016130  0d 8d e0 1f 63 61 63 68  65 25 3d 63 61 63 68 65  |....cache%=cache|
00016140  72 6f 77 73 25 2a 72 6f  77 62 79 74 65 73 25 0d  |rows%*rowbytes%.|
00016150  8d ea 05 cd 0d 8d f4 43  64 61 74 61 63 61 63 68  |.......Cdatacach|
00016160  65 25 3d a4 64 69 6d 28  63 61 63 68 65 25 29 3a  |e%=.dim(cache%):|
00016170  f2 72 65 66 69 6c 6c 3a  e7 63 61 63 68 65 25 3e  |.refill:.cache%>|
00016180  3d 66 69 6c 65 73 69 7a  65 25 20 72 6f 77 73 74  |=filesize% rowst|
00016190  6f 67 6f 25 3d 2d 31 0d  8d fe 05 cd 0d 8e 08 15  |ogo%=-1.........|
000161a0  e3 5a 3d 30 b8 32 88 32  3a 50 25 3d 63 6f 64 65  |.Z=0.2.2:P%=code|
000161b0  25 0d 8e 12 0d c8 8e 20  6e 63 6f 6c 20 ca 0d 8e  |%...... ncol ...|
000161c0  1c 09 c9 20 32 35 35 0d  8e 26 0a 5b 4f 50 54 20  |... 255..&.[OPT |
000161d0  5a 0d 8e 30 08 2e 66 73  25 0d 8e 3a 14 53 54 4d  |Z..0..fs%..:.STM|
000161e0  46 44 20 53 50 20 21 2c  7b 52 31 34 7d 0d 8e 44  |FD SP !,{R14}..D|
000161f0  20 4c 44 52 20 52 31 2c  5b 52 39 2c 23 35 2a 38  | LDR R1,[R9,#5*8|
00016200  5d 3a 4c 44 52 20 52 31  2c 5b 52 31 5d 0d 8e 4e  |]:LDR R1,[R1]..N|
00016210  15 4c 44 52 20 52 31 30  2c 5b 52 39 2c 23 34 2a  |.LDR R10,[R9,#4*|
00016220  38 5d 0d 8e 58 15 4c 44  52 20 52 31 31 2c 5b 52  |8]..X.LDR R11,[R|
00016230  39 2c 23 33 2a 38 5d 0d  8e 62 23 4c 44 52 20 52  |9,#3*8]..b#LDR R|
00016240  31 32 2c 5b 52 39 2c 23  32 2a 38 5d 3a 4c 44 52  |12,[R9,#2*8]:LDR|
00016250  20 52 31 32 2c 5b 52 31  32 5d 0d 8e 6c 1e 4c 44  | R12,[R12]..l.LD|
00016260  52 20 52 38 2c 5b 52 39  2c 23 38 5d 3a 4c 44 52  |R R8,[R9,#8]:LDR|
00016270  20 52 38 2c 5b 52 38 5d  0d 8e 76 1b 4c 44 52 20  | R8,[R8]..v.LDR |
00016280  52 39 2c 5b 52 39 5d 3a  4c 44 52 20 52 39 2c 5b  |R9,[R9]:LDR R9,[|
00016290  52 39 5d 0d 8e 80 13 4c  44 52 20 52 34 2c 5b 52  |R9]....LDR R4,[R|
000162a0  31 30 5d 2c 52 38 0d 8e  8a 0b 2e 66 73 6c 6f 6f  |10],R8.....fsloo|
000162b0  70 0d 8e 94 2f 54 45 51  20 52 34 2c 23 30 3a 4d  |p.../TEQ R4,#0:M|
000162c0  4f 56 4d 49 20 52 34 2c  23 30 3a 43 4d 50 20 52  |OVMI R4,#0:CMP R|
000162d0  34 2c 23 46 3a 4d 4f 56  43 53 20 52 34 2c 23 46  |4,#F:MOVCS R4,#F|
000162e0  0d 8e 9e 28 41 44 44 20  52 30 2c 52 34 2c 23 32  |...(ADD R0,R4,#2|
000162f0  35 36 3a 4d 4f 56 20 52  30 2c 52 30 2c 4c 53 52  |56:MOV R0,R0,LSR|
00016300  20 23 62 69 74 73 2d 38  0d 8e a8 2e 43 4d 50 20  | #bits-8....CMP |
00016310  52 30 2c 23 32 35 36 3a  4d 4f 56 43 53 20 52 30  |R0,#256:MOVCS R0|
00016320  2c 23 32 35 35 3a 53 54  52 42 20 52 30 2c 5b 52  |,#255:STRB R0,[R|
00016330  31 32 5d 2c 52 31 0d 8e  b2 19 4d 4f 56 20 52 32  |12],R1....MOV R2|
00016340  2c 52 30 2c 4c 53 4c 20  23 62 69 74 73 2d 38 0d  |,R0,LSL #bits-8.|
00016350  8e bc 05 5d 0d 8e c6 0e  e7 64 69 74 68 65 72 25  |...].....dither%|
00016360  20 8c 0d 8e d0 0a 5b 4f  50 54 20 5a 0d 8e da 10  | .....[OPT Z....|
00016370  53 55 42 20 52 34 2c 52  34 2c 52 32 0d 8e e4 0f  |SUB R4,R4,R2....|
00016380  4d 4f 56 43 53 20 52 34  2c 23 30 0d 8e ee 17 41  |MOVCS R4,#0....A|
00016390  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
000163a0  23 31 0d 8e f8 28 4c 44  52 20 52 33 2c 5b 52 31  |#1...(LDR R3,[R1|
000163b0  31 2c 2d 52 38 5d 3a 41  44 44 20 52 33 2c 52 33  |1,-R8]:ADD R3,R3|
000163c0  2c 52 32 2c 41 53 52 20  23 34 0d 8f 02 14 53 54  |,R2,ASR #4....ST|
000163d0  52 20 52 33 2c 5b 52 31  31 2c 2d 52 38 5d 0d 8f  |R R3,[R11,-R8]..|
000163e0  0c 17 41 44 44 20 52 32  2c 52 34 2c 52 34 2c 4c  |..ADD R2,R4,R4,L|
000163f0  53 4c 20 23 32 0d 8f 16  24 4c 44 52 20 52 33 2c  |SL #2...$LDR R3,|
00016400  5b 52 31 31 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |[R11]:ADD R3,R3,|
00016410  52 32 2c 41 53 52 20 23  34 0d 8f 20 10 53 54 52  |R2,ASR #4.. .STR|
00016420  20 52 33 2c 5b 52 31 31  5d 0d 8f 2a 14 4d 4f 56  | R3,[R11]..*.MOV|
00016430  20 52 33 2c 52 34 2c 41  53 52 20 23 34 0d 8f 34  | R3,R4,ASR #4..4|
00016440  14 53 54 52 20 52 33 2c  5b 52 31 31 2c 52 38 5d  |.STR R3,[R11,R8]|
00016450  21 0d 8f 3e 17 52 53 42  20 52 32 2c 52 34 2c 52  |!..>.RSB R2,R4,R|
00016460  34 2c 4c 53 4c 20 23 33  0d 8f 48 13 4c 44 52 20  |4,LSL #3..H.LDR |
00016470  52 34 2c 5b 52 31 30 5d  2c 52 38 0d 8f 52 17 41  |R4,[R10],R8..R.A|
00016480  44 44 20 52 34 2c 52 34  2c 52 32 2c 41 53 52 20  |DD R4,R4,R2,ASR |
00016490  23 34 0d 8f 5c 05 5d 0d  8f 66 05 cc 0d 8f 70 0a  |#4..\.]..f....p.|
000164a0  5b 4f 50 54 20 5a 0d 8f  7a 13 4c 44 52 20 52 34  |[OPT Z..z.LDR R4|
000164b0  2c 5b 52 31 30 5d 2c 52  38 0d 8f 84 05 5d 0d 8f  |,[R10],R8....]..|
000164c0  8e 05 cd 0d 8f 98 0a 5b  4f 50 54 20 5a 0d 8f a2  |.......[OPT Z...|
000164d0  1c 53 55 42 53 20 52 39  2c 52 39 2c 23 31 3a 42  |.SUBS R9,R9,#1:B|
000164e0  4e 45 20 66 73 6c 6f 6f  70 0d 8f ac 14 4c 44 4d  |NE fsloop....LDM|
000164f0  46 44 20 53 50 20 21 2c  7b 50 43 7d 5e 0d 8f b6  |FD SP !,{PC}^...|
00016500  05 5d 0d 8f c0 08 c9 20  36 33 0d 8f ca 0d e7 6d  |.]..... 63.....m|
00016510  24 3d 22 50 22 20 8c 0d  8f d4 0a 5b 4f 50 54 20  |$="P" .....[OPT |
00016520  5a 0d 8f de 0a 2e 64 69  76 31 35 0d 8f e8 05 5d  |Z.....div15....]|
00016530  0d 8f f2 0d e3 49 25 3d  30 b8 32 35 35 0d 8f fc  |.....I%=0.255...|
00016540  0a 5b 4f 50 54 20 5a 0d  90 06 26 45 51 55 44 20  |.[OPT Z...&EQUD |
00016550  28 49 25 80 37 20 84 20  28 49 25 80 31 36 29 3e  |(I%.7 . (I%.16)>|
00016560  3e 31 29 2f 62 72 69 67  68 74 25 2a 46 0d 90 10  |>1)/bright%*F...|
00016570  27 45 51 55 44 20 28 49  25 80 33 20 84 20 28 49  |'EQUD (I%.3 . (I|
00016580  25 80 26 36 30 29 3e 3e  33 29 2f 62 72 69 67 68  |%.&60)>>3)/brigh|
00016590  74 25 2a 46 0d 90 1a 33  45 51 55 44 20 28 49 25  |t%*F...3EQUD (I%|
000165a0  80 33 20 84 20 28 49 25  80 38 29 3e 3e 31 20 84  |.3 . (I%.8)>>1 .|
000165b0  20 28 49 25 80 31 32 38  29 3e 3e 34 29 2f 62 72  | (I%.128)>>4)/br|
000165c0  69 67 68 74 25 2a 46 0d  90 24 05 5d 0d 90 2e 05  |ight%*F..$.]....|
000165d0  ed 0d 90 38 0a 5b 4f 50  54 20 5a 0d 90 42 1d 2e  |...8.[OPT Z..B..|
000165e0  63 6f 6c 6d 61 74 63 68  6c 6f 63 20 45 51 55 44  |colmatchloc EQUD|
000165f0  20 6c 6f 6f 6b 75 70 25  0d 90 4c 0e 45 51 55 44  | lookup%..L.EQUD|
00016600  20 64 69 76 31 35 0d 90  56 05 5d 0d 90 60 05 cc  | div15..V.]..`..|
00016610  0d 90 6a 0a 5b 4f 50 54  20 5a 0d 90 74 11 2e 64  |..j.[OPT Z..t..d|
00016620  69 76 31 35 20 45 51 55  44 20 30 0d 90 7e 14 45  |iv15 EQUD 0..~.E|
00016630  51 55 44 20 34 2f 62 72  69 67 68 74 25 2a 46 0d  |QUD 4/bright%*F.|
00016640  90 88 14 45 51 55 44 20  38 2f 62 72 69 67 68 74  |...EQUD 8/bright|
00016650  25 2a 46 0d 90 92 15 45  51 55 44 20 31 32 2f 62  |%*F....EQUD 12/b|
00016660  72 69 67 68 74 25 2a 46  0d 90 9c 05 5d 0d 90 a6  |right%*F....]...|
00016670  05 cd 0d 90 b0 0a 5b 4f  50 54 20 5a 0d 90 ba 08  |......[OPT Z....|
00016680  2e 66 73 25 0d 90 c4 14  53 54 4d 46 44 20 53 50  |.fs%....STMFD SP|
00016690  20 21 2c 7b 52 31 34 7d  0d 90 ce 20 4c 44 52 20  | !,{R14}... LDR |
000166a0  52 31 2c 5b 52 39 2c 23  35 2a 38 5d 3a 4c 44 52  |R1,[R9,#5*8]:LDR|
000166b0  20 52 31 2c 5b 52 31 5d  0d 90 d8 15 4c 44 52 20  | R1,[R1]....LDR |
000166c0  52 31 30 2c 5b 52 39 2c  23 34 2a 38 5d 0d 90 e2  |R10,[R9,#4*8]...|
000166d0  15 4c 44 52 20 52 31 31  2c 5b 52 39 2c 23 33 2a  |.LDR R11,[R9,#3*|
000166e0  38 5d 0d 90 ec 23 4c 44  52 20 52 31 32 2c 5b 52  |8]...#LDR R12,[R|
000166f0  39 2c 23 32 2a 38 5d 3a  4c 44 52 20 52 31 32 2c  |9,#2*8]:LDR R12,|
00016700  5b 52 31 32 5d 0d 90 f6  1e 4c 44 52 20 52 38 2c  |[R12]....LDR R8,|
00016710  5b 52 39 2c 23 38 5d 3a  4c 44 52 20 52 38 2c 5b  |[R9,#8]:LDR R8,[|
00016720  52 38 5d 0d 91 00 1b 4c  44 52 20 52 39 2c 5b 52  |R8]....LDR R9,[R|
00016730  39 5d 3a 4c 44 52 20 52  39 2c 5b 52 39 5d 0d 91  |9]:LDR R9,[R9]..|
00016740  0a 10 4c 44 52 20 52 34  2c 5b 52 31 30 5d 0d 91  |..LDR R4,[R10]..|
00016750  14 13 4c 44 52 20 52 35  2c 5b 52 31 30 2c 23 34  |..LDR R5,[R10,#4|
00016760  5d 0d 91 1e 13 4c 44 52  20 52 36 2c 5b 52 31 30  |]....LDR R6,[R10|
00016770  2c 23 38 5d 0d 91 28 05  5d 0d 91 32 0d e7 6d 24  |,#8]..(.]..2..m$|
00016780  3d 22 50 22 20 8c 0d 91  3c 0a 5b 4f 50 54 20 5a  |="P" ...<.[OPT Z|
00016790  0d 91 46 18 4c 44 52 20  52 37 2c 63 6f 6c 6d 61  |..F.LDR R7,colma|
000167a0  74 63 68 6c 6f 63 2b 34  0d 91 50 05 5d 0d 91 5a  |tchloc+4..P.]..Z|
000167b0  05 cc 0d 91 64 0a 5b 4f  50 54 20 5a 0d 91 6e 10  |....d.[OPT Z..n.|
000167c0  41 44 52 20 52 37 2c 64  69 76 31 35 0d 91 78 05  |ADR R7,div15..x.|
000167d0  5d 0d 91 82 05 cd 0d 91  8c 0a 5b 4f 50 54 20 5a  |].........[OPT Z|
000167e0  0d 91 96 0b 2e 66 73 6c  6f 6f 70 0d 91 a0 12 41  |.....fsloop....A|
000167f0  44 44 20 52 31 30 2c 52  31 30 2c 52 38 0d 91 aa  |DD R10,R10,R8...|
00016800  05 5d 0d 91 b4 0d e7 6d  24 3d 22 50 22 20 8c 0d  |.].....m$="P" ..|
00016810  91 be 0a 5b 4f 50 54 20  5a 0d 91 c8 2f 54 45 51  |...[OPT Z.../TEQ|
00016820  20 52 34 2c 23 30 3a 4d  4f 56 4d 49 20 52 34 2c  | R4,#0:MOVMI R4,|
00016830  23 30 3a 43 4d 50 20 52  34 2c 23 46 3a 4d 4f 56  |#0:CMP R4,#F:MOV|
00016840  43 53 20 52 34 2c 23 46  0d 91 d2 33 4d 4f 56 20  |CS R4,#F...3MOV |
00016850  52 30 2c 52 34 2c 4c 53  52 20 23 28 62 69 74 73  |R0,R4,LSR #(bits|
00016860  2d 34 29 3a 43 4d 50 20  52 30 2c 23 31 35 3a 4d  |-4):CMP R0,#15:M|
00016870  4f 56 43 53 20 52 30 2c  23 31 35 0d 91 dc 2f 54  |OVCS R0,#15.../T|
00016880  45 51 20 52 35 2c 23 30  3a 4d 4f 56 4d 49 20 52  |EQ R5,#0:MOVMI R|
00016890  35 2c 23 30 3a 43 4d 50  20 52 35 2c 23 46 3a 4d  |5,#0:CMP R5,#F:M|
000168a0  4f 56 43 53 20 52 35 2c  23 46 0d 91 e6 46 4d 4f  |OVCS R5,#F...FMO|
000168b0  56 20 52 33 2c 52 35 2c  4c 53 52 20 23 28 62 69  |V R3,R5,LSR #(bi|
000168c0  74 73 2d 34 29 3a 43 4d  50 20 52 33 2c 23 31 35  |ts-4):CMP R3,#15|
000168d0  3a 4d 4f 56 43 53 20 52  33 2c 23 31 35 3a 84 52  |:MOVCS R3,#15:.R|
000168e0  20 52 30 2c 52 30 2c 52  33 2c 4c 53 4c 20 23 34  | R0,R0,R3,LSL #4|
000168f0  0d 91 f0 2f 54 45 51 20  52 36 2c 23 30 3a 4d 4f  |.../TEQ R6,#0:MO|
00016900  56 4d 49 20 52 36 2c 23  30 3a 43 4d 50 20 52 36  |VMI R6,#0:CMP R6|
00016910  2c 23 46 3a 4d 4f 56 43  53 20 52 36 2c 23 46 0d  |,#F:MOVCS R6,#F.|
00016920  91 fa 46 4d 4f 56 20 52  33 2c 52 36 2c 4c 53 52  |..FMOV R3,R6,LSR|
00016930  20 23 28 62 69 74 73 2d  34 29 3a 43 4d 50 20 52  | #(bits-4):CMP R|
00016940  33 2c 23 31 35 3a 4d 4f  56 43 53 20 52 33 2c 23  |3,#15:MOVCS R3,#|
00016950  31 35 3a 84 52 20 52 30  2c 52 30 2c 52 33 2c 4c  |15:.R R0,R0,R3,L|
00016960  53 4c 20 23 38 0d 92 04  16 4c 44 52 20 52 33 2c  |SL #8....LDR R3,|
00016970  63 6f 6c 6d 61 74 63 68  6c 6f 63 0d 92 0e 13 4c  |colmatchloc....L|
00016980  44 52 42 20 52 30 2c 5b  52 33 2c 52 30 5d 0d 92  |DRB R0,[R3,R0]..|
00016990  18 2b 41 44 44 20 52 33  2c 52 30 2c 52 30 2c 4c  |.+ADD R3,R0,R0,L|
000169a0  53 4c 20 23 31 3a 41 44  44 20 52 33 2c 52 37 2c  |SL #1:ADD R3,R7,|
000169b0  52 33 2c 4c 53 4c 20 23  32 0d 92 22 1f 4c 44 52  |R3,LSL #2..".LDR|
000169c0  20 52 32 2c 5b 52 33 5d  2c 23 34 3a 53 55 42 20  | R2,[R3],#4:SUB |
000169d0  52 34 2c 52 34 2c 52 32  0d 92 2c 2e 4c 44 4d 49  |R4,R4,R2..,.LDMI|
000169e0  41 20 52 33 2c 7b 52 32  2c 52 33 7d 3a 53 55 42  |A R3,{R2,R3}:SUB|
000169f0  20 52 35 2c 52 35 2c 52  32 3a 53 55 42 20 52 36  | R5,R5,R2:SUB R6|
00016a00  2c 52 36 2c 52 33 0d 92  36 05 5d 0d 92 40 05 cc  |,R6,R3..6.]..@..|
00016a10  0d 92 4a 0a 5b 4f 50 54  20 5a 0d 92 54 2f 54 45  |..J.[OPT Z..T/TE|
00016a20  51 20 52 34 2c 23 30 3a  4d 4f 56 4d 49 20 52 34  |Q R4,#0:MOVMI R4|
00016a30  2c 23 30 3a 43 4d 50 20  52 34 2c 23 46 3a 4d 4f  |,#0:CMP R4,#F:MO|
00016a40  56 43 53 20 52 34 2c 23  46 0d 92 5e 19 4d 4f 56  |VCS R4,#F..^.MOV|
00016a50  20 52 33 2c 52 34 2c 4c  53 52 20 23 62 69 74 73  | R3,R4,LSR #bits|
00016a60  2d 32 0d 92 68 19 43 4d  50 20 52 33 2c 23 34 3a  |-2..h.CMP R3,#4:|
00016a70  4d 4f 56 43 53 20 52 33  2c 23 33 0d 92 72 1d 53  |MOVCS R3,#3..r.S|
00016a80  55 42 20 52 31 34 2c 52  34 2c 52 33 2c 4c 53 4c  |UB R14,R4,R3,LSL|
00016a90  20 23 62 69 74 73 2d 32  0d 92 7c 19 4c 44 52 20  | #bits-2..|.LDR |
00016aa0  52 32 2c 5b 52 37 2c 52  33 2c 4c 53 4c 20 23 32  |R2,[R7,R3,LSL #2|
00016ab0  5d 0d 92 86 10 53 55 42  20 52 34 2c 52 34 2c 52  |]....SUB R4,R4,R|
00016ac0  32 0d 92 90 1f 80 20 52  32 2c 52 33 2c 23 31 3a  |2..... R2,R3,#1:|
00016ad0  4d 4f 56 20 52 30 2c 52  32 2c 4c 53 4c 20 23 32  |MOV R0,R2,LSL #2|
00016ae0  0d 92 9a 21 80 20 52 32  2c 52 33 2c 23 32 3a 84  |...!. R2,R3,#2:.|
00016af0  52 20 52 30 2c 52 30 2c  52 32 2c 4c 53 4c 20 23  |R R0,R0,R2,LSL #|
00016b00  33 0d 92 a4 2f 54 45 51  20 52 35 2c 23 30 3a 4d  |3.../TEQ R5,#0:M|
00016b10  4f 56 4d 49 20 52 35 2c  23 30 3a 43 4d 50 20 52  |OVMI R5,#0:CMP R|
00016b20  35 2c 23 46 3a 4d 4f 56  43 53 20 52 35 2c 23 46  |5,#F:MOVCS R5,#F|
00016b30  0d 92 ae 19 4d 4f 56 20  52 33 2c 52 35 2c 4c 53  |....MOV R3,R5,LS|
00016b40  52 20 23 62 69 74 73 2d  32 0d 92 b8 19 43 4d 50  |R #bits-2....CMP|
00016b50  20 52 33 2c 23 34 3a 4d  4f 56 43 53 20 52 33 2c  | R3,#4:MOVCS R3,|
00016b60  23 33 0d 92 c2 1c 53 55  42 20 52 32 2c 52 35 2c  |#3....SUB R2,R5,|
00016b70  52 33 2c 4c 53 4c 20 23  62 69 74 73 2d 32 0d 92  |R3,LSL #bits-2..|
00016b80  cc 12 41 44 44 20 52 31  34 2c 52 31 34 2c 52 32  |..ADD R14,R14,R2|
00016b90  0d 92 d6 19 4c 44 52 20  52 32 2c 5b 52 37 2c 52  |....LDR R2,[R7,R|
00016ba0  33 2c 4c 53 4c 20 23 32  5d 0d 92 e0 10 53 55 42  |3,LSL #2]....SUB|
00016bb0  20 52 35 2c 52 35 2c 52  32 0d 92 ea 16 84 52 20  | R5,R5,R2.....R |
00016bc0  52 30 2c 52 30 2c 52 33  2c 4c 53 4c 20 23 35 0d  |R0,R0,R3,LSL #5.|
00016bd0  92 f4 2f 54 45 51 20 52  36 2c 23 30 3a 4d 4f 56  |../TEQ R6,#0:MOV|
00016be0  4d 49 20 52 36 2c 23 30  3a 43 4d 50 20 52 36 2c  |MI R6,#0:CMP R6,|
00016bf0  23 46 3a 4d 4f 56 43 53  20 52 36 2c 23 46 0d 92  |#F:MOVCS R6,#F..|
00016c00  fe 19 4d 4f 56 20 52 33  2c 52 36 2c 4c 53 52 20  |..MOV R3,R6,LSR |
00016c10  23 62 69 74 73 2d 32 0d  93 08 19 43 4d 50 20 52  |#bits-2....CMP R|
00016c20  33 2c 23 34 3a 4d 4f 56  43 53 20 52 33 2c 23 33  |3,#4:MOVCS R3,#3|
00016c30  0d 93 12 1c 53 55 42 20  52 32 2c 52 36 2c 52 33  |....SUB R2,R6,R3|
00016c40  2c 4c 53 4c 20 23 62 69  74 73 2d 32 0d 93 1c 12  |,LSL #bits-2....|
00016c50  41 44 44 20 52 31 34 2c  52 31 34 2c 52 32 0d 93  |ADD R14,R14,R2..|
00016c60  26 19 4c 44 52 20 52 32  2c 5b 52 37 2c 52 33 2c  |&.LDR R2,[R7,R3,|
00016c70  4c 53 4c 20 23 32 5d 0d  93 30 10 53 55 42 20 52  |LSL #2]..0.SUB R|
00016c80  36 2c 52 36 2c 52 32 0d  93 3a 21 80 20 52 32 2c  |6,R6,R2..:!. R2,|
00016c90  52 33 2c 23 31 3a 84 52  20 52 30 2c 52 30 2c 52  |R3,#1:.R R0,R0,R|
00016ca0  32 2c 4c 53 4c 20 23 33  0d 93 44 21 80 20 52 32  |2,LSL #3..D!. R2|
00016cb0  2c 52 33 2c 23 32 3a 84  52 20 52 30 2c 52 30 2c  |,R3,#2:.R R0,R0,|
00016cc0  52 32 2c 4c 53 4c 20 23  36 0d 93 4e 05 5d 0d 93  |R2,LSL #6..N.]..|
00016cd0  58 0e e7 6d 24 3c 3e 22  54 22 20 8c 0d 93 62 0a  |X..m$<>"T" ...b.|
00016ce0  5b 4f 50 54 20 5a 0d 93  6c 19 41 44 44 20 52 32  |[OPT Z..l.ADD R2|
00016cf0  2c 52 31 34 2c 52 31 34  2c 4c 53 4c 20 23 32 0d  |,R14,R14,LSL #2.|
00016d00  93 76 17 4d 4f 56 20 52  32 2c 52 32 2c 4c 53 52  |.v.MOV R2,R2,LSR|
00016d10  20 23 62 69 74 73 0d 93  80 19 43 4d 50 20 52 32  | #bits....CMP R2|
00016d20  2c 23 33 3a 4d 4f 56 43  53 20 52 32 2c 23 33 0d  |,#3:MOVCS R2,#3.|
00016d30  93 8a 0f 84 52 20 52 30  2c 52 30 2c 52 32 0d 93  |....R R0,R0,R2..|
00016d40  94 19 4c 44 52 20 52 32  2c 5b 52 37 2c 52 32 2c  |..LDR R2,[R7,R2,|
00016d50  4c 53 4c 20 23 32 5d 0d  93 9e 17 53 55 42 20 52  |LSL #2]....SUB R|
00016d60  34 2c 52 34 2c 52 32 2c  4c 53 52 20 23 32 0d 93  |4,R4,R2,LSR #2..|
00016d70  a8 17 53 55 42 20 52 35  2c 52 35 2c 52 32 2c 4c  |..SUB R5,R5,R2,L|
00016d80  53 52 20 23 32 0d 93 b2  17 53 55 42 20 52 36 2c  |SR #2....SUB R6,|
00016d90  52 36 2c 52 32 2c 4c 53  52 20 23 32 0d 93 bc 05  |R6,R2,LSR #2....|
00016da0  5d 0d 93 c6 05 cd 0d 93  d0 05 cd 0d 93 da 0a 5b  |]..............[|
00016db0  4f 50 54 20 5a 0d 93 e4  14 53 54 52 42 20 52 30  |OPT Z....STRB R0|
00016dc0  2c 5b 52 31 32 5d 2c 52  31 0d 93 ee 05 5d 0d 93  |,[R12],R1....]..|
00016dd0  f8 0e e7 64 69 74 68 65  72 25 20 8c 0d 94 02 0a  |...dither% .....|
00016de0  5b 4f 50 54 20 5a 0d 94  0c 11 41 44 44 20 52 30  |[OPT Z....ADD R0|
00016df0  2c 52 31 31 2c 23 34 0d  94 16 17 41 44 44 20 52  |,R11,#4....ADD R|
00016e00  32 2c 52 34 2c 52 34 2c  4c 53 4c 20 23 31 0d 94  |2,R4,R4,LSL #1..|
00016e10  20 28 4c 44 52 20 52 33  2c 5b 52 31 31 2c 2d 52  | (LDR R3,[R11,-R|
00016e20  38 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |8]:ADD R3,R3,R2,|
00016e30  41 53 52 20 23 34 0d 94  2a 14 53 54 52 20 52 33  |ASR #4..*.STR R3|
00016e40  2c 5b 52 31 31 2c 2d 52  38 5d 0d 94 34 17 41 44  |,[R11,-R8]..4.AD|
00016e50  44 20 52 32 2c 52 34 2c  52 34 2c 4c 53 4c 20 23  |D R2,R4,R4,LSL #|
00016e60  32 0d 94 3e 24 4c 44 52  20 52 33 2c 5b 52 31 31  |2..>$LDR R3,[R11|
00016e70  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 32 2c 41  |]:ADD R3,R3,R2,A|
00016e80  53 52 20 23 34 0d 94 48  10 53 54 52 20 52 33 2c  |SR #4..H.STR R3,|
00016e90  5b 52 31 31 5d 0d 94 52  14 4d 4f 56 20 52 33 2c  |[R11]..R.MOV R3,|
00016ea0  52 34 2c 41 53 52 20 23  34 0d 94 5c 14 53 54 52  |R4,ASR #4..\.STR|
00016eb0  20 52 33 2c 5b 52 31 31  2c 52 38 5d 21 0d 94 66  | R3,[R11,R8]!..f|
00016ec0  17 52 53 42 20 52 32 2c  52 34 2c 52 34 2c 4c 53  |.RSB R2,R4,R4,LS|
00016ed0  4c 20 23 33 0d 94 70 10  4c 44 52 20 52 34 2c 5b  |L #3..p.LDR R4,[|
00016ee0  52 31 30 5d 0d 94 7a 17  41 44 44 20 52 34 2c 52  |R10]..z.ADD R4,R|
00016ef0  34 2c 52 32 2c 41 53 52  20 23 34 0d 94 84 17 41  |4,R2,ASR #4....A|
00016f00  44 44 20 52 32 2c 52 35  2c 52 35 2c 4c 53 4c 20  |DD R2,R5,R5,LSL |
00016f10  23 31 0d 94 8e 27 4c 44  52 20 52 33 2c 5b 52 30  |#1...'LDR R3,[R0|
00016f20  2c 2d 52 38 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |,-R8]:ADD R3,R3,|
00016f30  52 32 2c 41 53 52 20 23  34 0d 94 98 13 53 54 52  |R2,ASR #4....STR|
00016f40  20 52 33 2c 5b 52 30 2c  2d 52 38 5d 0d 94 a2 14  | R3,[R0,-R8]....|
00016f50  4d 4f 56 20 52 33 2c 52  35 2c 41 53 52 20 23 34  |MOV R3,R5,ASR #4|
00016f60  0d 94 ac 12 53 54 52 20  52 33 2c 5b 52 30 2c 52  |....STR R3,[R0,R|
00016f70  38 5d 0d 94 b6 17 41 44  44 20 52 32 2c 52 35 2c  |8]....ADD R2,R5,|
00016f80  52 35 2c 4c 53 4c 20 23  32 0d 94 c0 23 4c 44 52  |R5,LSL #2...#LDR|
00016f90  20 52 33 2c 5b 52 30 5d  3a 41 44 44 20 52 33 2c  | R3,[R0]:ADD R3,|
00016fa0  52 33 2c 52 32 2c 41 53  52 20 23 34 0d 94 ca 12  |R3,R2,ASR #4....|
00016fb0  53 54 52 20 52 33 2c 5b  52 30 5d 2c 23 34 0d 94  |STR R3,[R0],#4..|
00016fc0  d4 17 52 53 42 20 52 32  2c 52 35 2c 52 35 2c 4c  |..RSB R2,R5,R5,L|
00016fd0  53 4c 20 23 33 0d 94 de  13 4c 44 52 20 52 35 2c  |SL #3....LDR R5,|
00016fe0  5b 52 31 30 2c 23 34 5d  0d 94 e8 17 41 44 44 20  |[R10,#4]....ADD |
00016ff0  52 35 2c 52 35 2c 52 32  2c 41 53 52 20 23 34 0d  |R5,R5,R2,ASR #4.|
00017000  94 f2 17 41 44 44 20 52  32 2c 52 36 2c 52 36 2c  |...ADD R2,R6,R6,|
00017010  4c 53 4c 20 23 31 0d 94  fc 27 4c 44 52 20 52 33  |LSL #1...'LDR R3|
00017020  2c 5b 52 30 2c 2d 52 38  5d 3a 41 44 44 20 52 33  |,[R0,-R8]:ADD R3|
00017030  2c 52 33 2c 52 32 2c 41  53 52 20 23 34 0d 95 06  |,R3,R2,ASR #4...|
00017040  13 53 54 52 20 52 33 2c  5b 52 30 2c 2d 52 38 5d  |.STR R3,[R0,-R8]|
00017050  0d 95 10 17 41 44 44 20  52 32 2c 52 36 2c 52 36  |....ADD R2,R6,R6|
00017060  2c 4c 53 4c 20 23 32 0d  95 1a 23 4c 44 52 20 52  |,LSL #2...#LDR R|
00017070  33 2c 5b 52 30 5d 3a 41  44 44 20 52 33 2c 52 33  |3,[R0]:ADD R3,R3|
00017080  2c 52 32 2c 41 53 52 20  23 34 0d 95 24 0f 53 54  |,R2,ASR #4..$.ST|
00017090  52 20 52 33 2c 5b 52 30  5d 0d 95 2e 14 4d 4f 56  |R R3,[R0]....MOV|
000170a0  20 52 33 2c 52 36 2c 41  53 52 20 23 34 0d 95 38  | R3,R6,ASR #4..8|
000170b0  12 53 54 52 20 52 33 2c  5b 52 30 2c 52 38 5d 0d  |.STR R3,[R0,R8].|
000170c0  95 42 17 52 53 42 20 52  32 2c 52 36 2c 52 36 2c  |.B.RSB R2,R6,R6,|
000170d0  4c 53 4c 20 23 33 0d 95  4c 13 4c 44 52 20 52 36  |LSL #3..L.LDR R6|
000170e0  2c 5b 52 31 30 2c 23 38  5d 0d 95 56 17 41 44 44  |,[R10,#8]..V.ADD|
000170f0  20 52 36 2c 52 36 2c 52  32 2c 41 53 52 20 23 34  | R6,R6,R2,ASR #4|
00017100  0d 95 60 05 5d 0d 95 6a  05 cc 0d 95 74 0a 5b 4f  |..`.]..j....t.[O|
00017110  50 54 20 5a 0d 95 7e 18  4c 44 4d 49 41 20 52 31  |PT Z..~.LDMIA R1|
00017120  30 2c 7b 52 34 2c 52 35  2c 52 36 7d 0d 95 88 05  |0,{R4,R5,R6}....|
00017130  5d 0d 95 92 05 cd 0d 95  9c 0a 5b 4f 50 54 20 5a  |].........[OPT Z|
00017140  0d 95 a6 1c 53 55 42 53  20 52 39 2c 52 39 2c 23  |....SUBS R9,R9,#|
00017150  31 3a 42 4e 45 20 66 73  6c 6f 6f 70 0d 95 b0 14  |1:BNE fsloop....|
00017160  4c 44 4d 46 44 20 53 50  20 21 2c 7b 50 43 7d 5e  |LDMFD SP !,{PC}^|
00017170  0d 95 ba 05 5d 0d 95 c4  08 c9 20 31 35 0d 95 ce  |....]..... 15...|
00017180  17 64 69 76 74 61 62 6c  65 3d 50 25 3a c8 8e 20  |.divtable=P%:.. |
00017190  6d 24 20 ca 0d 95 d8 09  c9 20 22 44 22 0d 95 e2  |m$ ...... "D"...|
000171a0  09 c9 20 22 50 22 0d 95  ec 10 e3 49 25 3d 30 b8  |.. "P".....I%=0.|
000171b0  31 35 2a 34 88 34 0d 95  f6 0a 5b 4f 50 54 20 5a  |15*4.4....[OPT Z|
000171c0  0d 96 00 27 45 51 55 44  20 28 70 61 6c 65 74 74  |...'EQUD (palett|
000171d0  65 25 21 49 25 3e 3e 31  32 80 26 46 29 2f 62 72  |e%!I%>>12.&F)/br|
000171e0  69 67 68 74 25 2a 46 0d  96 0a 27 45 51 55 44 20  |ight%*F...'EQUD |
000171f0  28 70 61 6c 65 74 74 65  25 21 49 25 3e 3e 32 30  |(palette%!I%>>20|
00017200  80 26 46 29 2f 62 72 69  67 68 74 25 2a 46 0d 96  |.&F)/bright%*F..|
00017210  14 27 45 51 55 44 20 28  70 61 6c 65 74 74 65 25  |.'EQUD (palette%|
00017220  21 49 25 3e 3e 32 38 80  26 46 29 2f 62 72 69 67  |!I%>>28.&F)/brig|
00017230  68 74 25 2a 46 0d 96 1e  05 5d 0d 96 28 05 ed 0d  |ht%*F....]..(...|
00017240  96 32 0a 5b 4f 50 54 20  5a 0d 96 3c 1d 2e 63 6f  |.2.[OPT Z..<..co|
00017250  6c 6d 61 74 63 68 6c 6f  63 20 45 51 55 44 20 6c  |lmatchloc EQUD l|
00017260  6f 6f 6b 75 70 25 0d 96  46 05 5d 0d 96 50 09 c9  |ookup%..F.]..P..|
00017270  20 22 43 22 0d 96 5a 0b  e3 49 25 3d 30 b8 33 0d  | "C"..Z..I%=0.3.|
00017280  96 64 0a 5b 4f 50 54 20  5a 0d 96 6e 19 45 51 55  |.d.[OPT Z..n.EQU|
00017290  44 20 49 25 2f 28 62 72  69 67 68 74 25 81 34 29  |D I%/(bright%.4)|
000172a0  2a 46 0d 96 78 05 5d 0d  96 82 05 ed 0d 96 8c 09  |*F..x.].........|
000172b0  c9 20 22 54 22 0d 96 96  0c e3 49 25 3d 30 b8 31  |. "T".....I%=0.1|
000172c0  35 0d 96 a0 0a 5b 4f 50  54 20 5a 0d 96 aa 15 45  |5....[OPT Z....E|
000172d0  51 55 44 20 49 25 2f 62  72 69 67 68 74 25 2a 46  |QUD I%/bright%*F|
000172e0  0d 96 b4 05 5d 0d 96 be  05 ed 0d 96 c8 08 c9 20  |....].......... |
000172f0  22 22 0d 96 d2 0b e3 49  25 3d 30 b8 37 0d 96 dc  |"".....I%=0.7...|
00017300  0a 5b 4f 50 54 20 5a 0d  96 e6 19 45 51 55 44 20  |.[OPT Z....EQUD |
00017310  49 25 2f 28 62 72 69 67  68 74 25 81 32 29 2a 46  |I%/(bright%.2)*F|
00017320  0d 96 f0 05 5d 0d 96 fa  05 ed 0d 97 04 05 cb 0d  |....]...........|
00017330  97 0e 0a 5b 4f 50 54 20  5a 0d 97 18 08 2e 66 73  |...[OPT Z.....fs|
00017340  25 0d 97 22 14 53 54 4d  46 44 20 53 50 20 21 2c  |%..".STMFD SP !,|
00017350  7b 52 31 34 7d 0d 97 2c  20 4c 44 52 20 52 31 2c  |{R14}.., LDR R1,|
00017360  5b 52 39 2c 23 35 2a 38  5d 3a 4c 44 52 20 52 31  |[R9,#5*8]:LDR R1|
00017370  2c 5b 52 31 5d 0d 97 36  15 4c 44 52 20 52 31 30  |,[R1]..6.LDR R10|
00017380  2c 5b 52 39 2c 23 34 2a  38 5d 0d 97 40 15 4c 44  |,[R9,#4*8]..@.LD|
00017390  52 20 52 31 31 2c 5b 52  39 2c 23 33 2a 38 5d 0d  |R R11,[R9,#3*8].|
000173a0  97 4a 23 4c 44 52 20 52  31 32 2c 5b 52 39 2c 23  |.J#LDR R12,[R9,#|
000173b0  32 2a 38 5d 3a 4c 44 52  20 52 31 32 2c 5b 52 31  |2*8]:LDR R12,[R1|
000173c0  32 5d 0d 97 54 1e 4c 44  52 20 52 38 2c 5b 52 39  |2]..T.LDR R8,[R9|
000173d0  2c 23 38 5d 3a 4c 44 52  20 52 38 2c 5b 52 38 5d  |,#8]:LDR R8,[R8]|
000173e0  0d 97 5e 1b 4c 44 52 20  52 39 2c 5b 52 39 5d 3a  |..^.LDR R9,[R9]:|
000173f0  4c 44 52 20 52 39 2c 5b  52 39 5d 0d 97 68 05 5d  |LDR R9,[R9]..h.]|
00017400  0d 97 72 1f e7 6d 24 3d  22 43 22 20 84 20 6d 24  |..r..m$="C" . m$|
00017410  3d 22 44 22 20 84 20 6d  24 3d 22 50 22 20 8c 0d  |="D" . m$="P" ..|
00017420  97 7c 0a 5b 4f 50 54 20  5a 0d 97 86 10 4c 44 52  |.|.[OPT Z....LDR|
00017430  20 52 34 2c 5b 52 31 30  5d 0d 97 90 13 4c 44 52  | R4,[R10]....LDR|
00017440  20 52 35 2c 5b 52 31 30  2c 23 34 5d 0d 97 9a 13  | R5,[R10,#4]....|
00017450  4c 44 52 20 52 36 2c 5b  52 31 30 2c 23 38 5d 0d  |LDR R6,[R10,#8].|
00017460  97 a4 05 5d 0d 97 ae 05  cc 0d 97 b8 0a 5b 4f 50  |...].........[OP|
00017470  54 20 5a 0d 97 c2 13 4c  44 52 20 52 34 2c 5b 52  |T Z....LDR R4,[R|
00017480  31 30 5d 2c 52 38 0d 97  cc 05 5d 0d 97 d6 05 cd  |10],R8....].....|
00017490  0d 97 e0 21 e7 6d 24 3d  22 43 22 84 6d 24 3d 22  |...!.m$="C".m$="|
000174a0  54 22 84 6d 24 3d 22 22  84 6d 24 3d 22 50 22 20  |T".m$="".m$="P" |
000174b0  8c 0d 97 ea 0a 5b 4f 50  54 20 5a 0d 97 f4 13 41  |.....[OPT Z....A|
000174c0  44 52 20 52 37 2c 64 69  76 74 61 62 6c 65 0d 97  |DR R7,divtable..|
000174d0  fe 05 5d 0d 98 08 05 cd  0d 98 12 0a 5b 4f 50 54  |..].........[OPT|
000174e0  20 5a 0d 98 1c 0b 2e 66  73 6c 6f 6f 70 0d 98 26  | Z.....fsloop..&|
000174f0  05 5d 0d 98 30 0b c8 8e  20 6d 24 20 ca 0d 98 3a  |.]..0... m$ ...:|
00017500  09 c9 20 22 50 22 0d 98  44 0a 5b 4f 50 54 20 5a  |.. "P"..D.[OPT Z|
00017510  0d 98 4e 12 41 44 44 20  52 31 30 2c 52 31 30 2c  |..N.ADD R10,R10,|
00017520  52 38 0d 98 58 2f 54 45  51 20 52 34 2c 23 30 3a  |R8..X/TEQ R4,#0:|
00017530  4d 4f 56 4d 49 20 52 34  2c 23 30 3a 43 4d 50 20  |MOVMI R4,#0:CMP |
00017540  52 34 2c 23 46 3a 4d 4f  56 43 53 20 52 34 2c 23  |R4,#F:MOVCS R4,#|
00017550  46 0d 98 62 33 4d 4f 56  20 52 30 2c 52 34 2c 4c  |F..b3MOV R0,R4,L|
00017560  53 52 20 23 28 62 69 74  73 2d 34 29 3a 43 4d 50  |SR #(bits-4):CMP|
00017570  20 52 30 2c 23 31 35 3a  4d 4f 56 43 53 20 52 30  | R0,#15:MOVCS R0|
00017580  2c 23 31 35 0d 98 6c 2f  54 45 51 20 52 35 2c 23  |,#15..l/TEQ R5,#|
00017590  30 3a 4d 4f 56 4d 49 20  52 35 2c 23 30 3a 43 4d  |0:MOVMI R5,#0:CM|
000175a0  50 20 52 35 2c 23 46 3a  4d 4f 56 43 53 20 52 35  |P R5,#F:MOVCS R5|
000175b0  2c 23 46 0d 98 76 46 4d  4f 56 20 52 33 2c 52 35  |,#F..vFMOV R3,R5|
000175c0  2c 4c 53 52 20 23 28 62  69 74 73 2d 34 29 3a 43  |,LSR #(bits-4):C|
000175d0  4d 50 20 52 33 2c 23 31  35 3a 4d 4f 56 43 53 20  |MP R3,#15:MOVCS |
000175e0  52 33 2c 23 31 35 3a 84  52 20 52 30 2c 52 30 2c  |R3,#15:.R R0,R0,|
000175f0  52 33 2c 4c 53 4c 20 23  34 0d 98 80 2f 54 45 51  |R3,LSL #4.../TEQ|
00017600  20 52 36 2c 23 30 3a 4d  4f 56 4d 49 20 52 36 2c  | R6,#0:MOVMI R6,|
00017610  23 30 3a 43 4d 50 20 52  36 2c 23 46 3a 4d 4f 56  |#0:CMP R6,#F:MOV|
00017620  43 53 20 52 36 2c 23 46  0d 98 8a 46 4d 4f 56 20  |CS R6,#F...FMOV |
00017630  52 33 2c 52 36 2c 4c 53  52 20 23 28 62 69 74 73  |R3,R6,LSR #(bits|
00017640  2d 34 29 3a 43 4d 50 20  52 33 2c 23 31 35 3a 4d  |-4):CMP R3,#15:M|
00017650  4f 56 43 53 20 52 33 2c  23 31 35 3a 84 52 20 52  |OVCS R3,#15:.R R|
00017660  30 2c 52 30 2c 52 33 2c  4c 53 4c 20 23 38 0d 98  |0,R0,R3,LSL #8..|
00017670  94 16 4c 44 52 20 52 33  2c 63 6f 6c 6d 61 74 63  |..LDR R3,colmatc|
00017680  68 6c 6f 63 0d 98 9e 13  4c 44 52 42 20 52 30 2c  |hloc....LDRB R0,|
00017690  5b 52 33 2c 52 30 5d 0d  98 a8 2b 41 44 44 20 52  |[R3,R0]...+ADD R|
000176a0  33 2c 52 30 2c 52 30 2c  4c 53 4c 20 23 31 3a 41  |3,R0,R0,LSL #1:A|
000176b0  44 44 20 52 33 2c 52 37  2c 52 33 2c 4c 53 4c 20  |DD R3,R7,R3,LSL |
000176c0  23 32 0d 98 b2 1f 4c 44  52 20 52 32 2c 5b 52 33  |#2....LDR R2,[R3|
000176d0  5d 2c 23 34 3a 53 55 42  20 52 34 2c 52 34 2c 52  |],#4:SUB R4,R4,R|
000176e0  32 0d 98 bc 2e 4c 44 4d  49 41 20 52 33 2c 7b 52  |2....LDMIA R3,{R|
000176f0  32 2c 52 33 7d 3a 53 55  42 20 52 35 2c 52 35 2c  |2,R3}:SUB R5,R5,|
00017700  52 32 3a 53 55 42 20 52  36 2c 52 36 2c 52 33 0d  |R2:SUB R6,R6,R3.|
00017710  98 c6 0d 4d 4f 56 20 52  33 2c 52 30 0d 98 d0 05  |...MOV R3,R0....|
00017720  5d 0d 98 da 09 c9 20 22  44 22 0d 98 e4 0a 5b 4f  |]..... "D"....[O|
00017730  50 54 20 5a 0d 98 ee 12  41 44 44 20 52 31 30 2c  |PT Z....ADD R10,|
00017740  52 31 30 2c 52 38 0d 98  f8 0d 4d 4f 56 20 52 33  |R10,R8....MOV R3|
00017750  2c 23 30 0d 99 02 2f 54  45 51 20 52 34 2c 23 30  |,#0.../TEQ R4,#0|
00017760  3a 4d 4f 56 4d 49 20 52  34 2c 23 30 3a 43 4d 50  |:MOVMI R4,#0:CMP|
00017770  20 52 34 2c 23 46 3a 4d  4f 56 43 53 20 52 34 2c  | R4,#F:MOVCS R4,|
00017780  23 46 0d 99 0c 10 43 4d  50 20 52 34 2c 23 46 3e  |#F....CMP R4,#F>|
00017790  3e 31 0d 99 16 20 53 55  42 43 53 20 52 34 2c 52  |>1... SUBCS R4,R|
000177a0  34 2c 23 46 3a 84 52 43  53 20 52 33 2c 52 33 2c  |4,#F:.RCS R3,R3,|
000177b0  23 31 0d 99 20 2f 54 45  51 20 52 35 2c 23 30 3a  |#1.. /TEQ R5,#0:|
000177c0  4d 4f 56 4d 49 20 52 35  2c 23 30 3a 43 4d 50 20  |MOVMI R5,#0:CMP |
000177d0  52 35 2c 23 46 3a 4d 4f  56 43 53 20 52 35 2c 23  |R5,#F:MOVCS R5,#|
000177e0  46 0d 99 2a 10 43 4d 50  20 52 35 2c 23 46 3e 3e  |F..*.CMP R5,#F>>|
000177f0  31 0d 99 34 20 53 55 42  43 53 20 52 35 2c 52 35  |1..4 SUBCS R5,R5|
00017800  2c 23 46 3a 84 52 43 53  20 52 33 2c 52 33 2c 23  |,#F:.RCS R3,R3,#|
00017810  32 0d 99 3e 2f 54 45 51  20 52 36 2c 23 30 3a 4d  |2..>/TEQ R6,#0:M|
00017820  4f 56 4d 49 20 52 36 2c  23 30 3a 43 4d 50 20 52  |OVMI R6,#0:CMP R|
00017830  36 2c 23 46 3a 4d 4f 56  43 53 20 52 36 2c 23 46  |6,#F:MOVCS R6,#F|
00017840  0d 99 48 10 43 4d 50 20  52 36 2c 23 46 3e 3e 31  |..H.CMP R6,#F>>1|
00017850  0d 99 52 20 53 55 42 43  53 20 52 36 2c 52 36 2c  |..R SUBCS R6,R6,|
00017860  23 46 3a 84 52 43 53 20  52 33 2c 52 33 2c 23 34  |#F:.RCS R3,R3,#4|
00017870  0d 99 5c 05 5d 0d 99 66  09 c9 20 22 43 22 0d 99  |..\.]..f.. "C"..|
00017880  70 0a 5b 4f 50 54 20 5a  0d 99 7a 12 41 44 44 20  |p.[OPT Z..z.ADD |
00017890  52 31 30 2c 52 31 30 2c  52 38 0d 99 84 2f 54 45  |R10,R10,R8.../TE|
000178a0  51 20 52 35 2c 23 30 3a  4d 4f 56 4d 49 20 52 35  |Q R5,#0:MOVMI R5|
000178b0  2c 23 30 3a 43 4d 50 20  52 35 2c 23 46 3a 4d 4f  |,#0:CMP R5,#F:MO|
000178c0  56 43 53 20 52 35 2c 23  46 0d 99 8e 2f 4d 4f 56  |VCS R5,#F.../MOV|
000178d0  20 52 33 2c 52 35 2c 4c  53 52 20 23 62 69 74 73  | R3,R5,LSR #bits|
000178e0  2d 32 3a 43 4d 50 20 52  33 2c 23 33 3a 4d 4f 56  |-2:CMP R3,#3:MOV|
000178f0  43 53 20 52 33 2c 23 33  0d 99 98 19 4c 44 52 20  |CS R3,#3....LDR |
00017900  52 32 2c 5b 52 37 2c 52  33 2c 4c 53 4c 20 23 32  |R2,[R7,R3,LSL #2|
00017910  5d 0d 99 a2 10 53 55 42  20 52 35 2c 52 35 2c 52  |]....SUB R5,R5,R|
00017920  32 0d 99 ac 2f 54 45 51  20 52 34 2c 23 30 3a 4d  |2.../TEQ R4,#0:M|
00017930  4f 56 4d 49 20 52 34 2c  23 30 3a 43 4d 50 20 52  |OVMI R4,#0:CMP R|
00017940  34 2c 23 46 3a 4d 4f 56  43 53 20 52 34 2c 23 46  |4,#F:MOVCS R4,#F|
00017950  0d 99 b6 10 43 4d 50 20  52 34 2c 23 46 3e 3e 31  |....CMP R4,#F>>1|
00017960  0d 99 c0 20 53 55 42 43  53 20 52 34 2c 52 34 2c  |... SUBCS R4,R4,|
00017970  23 46 3a 84 52 43 53 20  52 33 2c 52 33 2c 23 34  |#F:.RCS R3,R3,#4|
00017980  0d 99 ca 2f 54 45 51 20  52 36 2c 23 30 3a 4d 4f  |.../TEQ R6,#0:MO|
00017990  56 4d 49 20 52 36 2c 23  30 3a 43 4d 50 20 52 36  |VMI R6,#0:CMP R6|
000179a0  2c 23 46 3a 4d 4f 56 43  53 20 52 36 2c 23 46 0d  |,#F:MOVCS R6,#F.|
000179b0  99 d4 10 43 4d 50 20 52  36 2c 23 46 3e 3e 31 0d  |...CMP R6,#F>>1.|
000179c0  99 de 20 53 55 42 43 53  20 52 36 2c 52 36 2c 23  |.. SUBCS R6,R6,#|
000179d0  46 3a 84 52 43 53 20 52  33 2c 52 33 2c 23 38 0d  |F:.RCS R3,R3,#8.|
000179e0  99 e8 05 5d 0d 99 f2 09  c9 20 22 54 22 0d 99 fc  |...]..... "T"...|
000179f0  0a 5b 4f 50 54 20 5a 0d  9a 06 2f 54 45 51 20 52  |.[OPT Z.../TEQ R|
00017a00  34 2c 23 30 3a 4d 4f 56  4d 49 20 52 34 2c 23 30  |4,#0:MOVMI R4,#0|
00017a10  3a 43 4d 50 20 52 34 2c  23 46 3a 4d 4f 56 43 53  |:CMP R4,#F:MOVCS|
00017a20  20 52 34 2c 23 46 0d 9a  10 31 4d 4f 56 20 52 33  | R4,#F...1MOV R3|
00017a30  2c 52 34 2c 4c 53 52 20  23 62 69 74 73 2d 34 3a  |,R4,LSR #bits-4:|
00017a40  43 4d 50 20 52 33 2c 23  31 35 3a 4d 4f 56 43 53  |CMP R3,#15:MOVCS|
00017a50  20 52 33 2c 23 31 35 0d  9a 1a 19 4c 44 52 20 52  | R3,#15....LDR R|
00017a60  32 2c 5b 52 37 2c 52 33  2c 4c 53 4c 20 23 32 5d  |2,[R7,R3,LSL #2]|
00017a70  0d 9a 24 10 53 55 42 20  52 34 2c 52 34 2c 52 32  |..$.SUB R4,R4,R2|
00017a80  0d 9a 2e 05 5d 0d 9a 38  08 c9 20 22 22 0d 9a 42  |....]..8.. ""..B|
00017a90  0a 5b 4f 50 54 20 5a 0d  9a 4c 2f 54 45 51 20 52  |.[OPT Z..L/TEQ R|
00017aa0  34 2c 23 30 3a 4d 4f 56  4d 49 20 52 34 2c 23 30  |4,#0:MOVMI R4,#0|
00017ab0  3a 43 4d 50 20 52 34 2c  23 46 3a 4d 4f 56 43 53  |:CMP R4,#F:MOVCS|
00017ac0  20 52 34 2c 23 46 0d 9a  56 2f 4d 4f 56 20 52 33  | R4,#F..V/MOV R3|
00017ad0  2c 52 34 2c 4c 53 52 20  23 62 69 74 73 2d 33 3a  |,R4,LSR #bits-3:|
00017ae0  43 4d 50 20 52 33 2c 23  37 3a 4d 4f 56 43 53 20  |CMP R3,#7:MOVCS |
00017af0  52 33 2c 23 37 0d 9a 60  19 4c 44 52 20 52 32 2c  |R3,#7..`.LDR R2,|
00017b00  5b 52 37 2c 52 33 2c 4c  53 4c 20 23 32 5d 0d 9a  |[R7,R3,LSL #2]..|
00017b10  6a 10 53 55 42 20 52 34  2c 52 34 2c 52 32 0d 9a  |j.SUB R4,R4,R2..|
00017b20  74 05 5d 0d 9a 7e 05 cb  0d 9a 88 0a 5b 4f 50 54  |t.]..~......[OPT|
00017b30  20 5a 0d 9a 92 15 4d 4f  56 20 52 32 2c 52 31 32  | Z....MOV R2,R12|
00017b40  2c 4c 53 52 20 23 31 0d  9a 9c 0e 54 53 54 20 52  |,LSR #1....TST R|
00017b50  31 32 2c 23 31 0d 9a a6  10 4c 44 52 42 20 52 30  |12,#1....LDRB R0|
00017b60  2c 5b 52 32 5d 0d 9a b0  20 80 45 51 20 52 30 2c  |,[R2]... .EQ R0,|
00017b70  52 30 2c 23 26 46 30 3a  84 52 45 51 20 52 30 2c  |R0,#&F0:.REQ R0,|
00017b80  52 30 2c 52 33 0d 9a ba  27 80 4e 45 20 52 30 2c  |R0,R3...'.NE R0,|
00017b90  52 30 2c 23 26 30 46 3a  84 52 4e 45 20 52 30 2c  |R0,#&0F:.RNE R0,|
00017ba0  52 30 2c 52 33 2c 4c 53  4c 20 23 34 0d 9a c4 10  |R0,R3,LSL #4....|
00017bb0  53 54 52 42 20 52 30 2c  5b 52 32 5d 0d 9a ce 12  |STRB R0,[R2]....|
00017bc0  41 44 44 20 52 31 32 2c  52 31 32 2c 52 31 0d 9a  |ADD R12,R12,R1..|
00017bd0  d8 05 5d 0d 9a e2 1f e7  6d 24 3d 22 43 22 20 84  |..].....m$="C" .|
00017be0  20 6d 24 3d 22 44 22 20  84 20 6d 24 3d 22 50 22  | m$="D" . m$="P"|
00017bf0  20 8c 0d 9a ec 0e e7 64  69 74 68 65 72 25 20 8c  | ......dither% .|
00017c00  0d 9a f6 0a 5b 4f 50 54  20 5a 0d 9b 00 11 41 44  |....[OPT Z....AD|
00017c10  44 20 52 30 2c 52 31 31  2c 23 34 0d 9b 0a 17 41  |D R0,R11,#4....A|
00017c20  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
00017c30  23 31 0d 9b 14 28 4c 44  52 20 52 33 2c 5b 52 31  |#1...(LDR R3,[R1|
00017c40  31 2c 2d 52 38 5d 3a 41  44 44 20 52 33 2c 52 33  |1,-R8]:ADD R3,R3|
00017c50  2c 52 32 2c 41 53 52 20  23 34 0d 9b 1e 14 53 54  |,R2,ASR #4....ST|
00017c60  52 20 52 33 2c 5b 52 31  31 2c 2d 52 38 5d 0d 9b  |R R3,[R11,-R8]..|
00017c70  28 17 41 44 44 20 52 32  2c 52 34 2c 52 34 2c 4c  |(.ADD R2,R4,R4,L|
00017c80  53 4c 20 23 32 0d 9b 32  24 4c 44 52 20 52 33 2c  |SL #2..2$LDR R3,|
00017c90  5b 52 31 31 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |[R11]:ADD R3,R3,|
00017ca0  52 32 2c 41 53 52 20 23  34 0d 9b 3c 10 53 54 52  |R2,ASR #4..<.STR|
00017cb0  20 52 33 2c 5b 52 31 31  5d 0d 9b 46 14 4d 4f 56  | R3,[R11]..F.MOV|
00017cc0  20 52 33 2c 52 34 2c 41  53 52 20 23 34 0d 9b 50  | R3,R4,ASR #4..P|
00017cd0  14 53 54 52 20 52 33 2c  5b 52 31 31 2c 52 38 5d  |.STR R3,[R11,R8]|
00017ce0  21 0d 9b 5a 17 52 53 42  20 52 32 2c 52 34 2c 52  |!..Z.RSB R2,R4,R|
00017cf0  34 2c 4c 53 4c 20 23 33  0d 9b 64 10 4c 44 52 20  |4,LSL #3..d.LDR |
00017d00  52 34 2c 5b 52 31 30 5d  0d 9b 6e 17 41 44 44 20  |R4,[R10]..n.ADD |
00017d10  52 34 2c 52 34 2c 52 32  2c 41 53 52 20 23 34 0d  |R4,R4,R2,ASR #4.|
00017d20  9b 78 17 41 44 44 20 52  32 2c 52 35 2c 52 35 2c  |.x.ADD R2,R5,R5,|
00017d30  4c 53 4c 20 23 31 0d 9b  82 27 4c 44 52 20 52 33  |LSL #1...'LDR R3|
00017d40  2c 5b 52 30 2c 2d 52 38  5d 3a 41 44 44 20 52 33  |,[R0,-R8]:ADD R3|
00017d50  2c 52 33 2c 52 32 2c 41  53 52 20 23 34 0d 9b 8c  |,R3,R2,ASR #4...|
00017d60  13 53 54 52 20 52 33 2c  5b 52 30 2c 2d 52 38 5d  |.STR R3,[R0,-R8]|
00017d70  0d 9b 96 14 4d 4f 56 20  52 33 2c 52 35 2c 41 53  |....MOV R3,R5,AS|
00017d80  52 20 23 34 0d 9b a0 12  53 54 52 20 52 33 2c 5b  |R #4....STR R3,[|
00017d90  52 30 2c 52 38 5d 0d 9b  aa 17 41 44 44 20 52 32  |R0,R8]....ADD R2|
00017da0  2c 52 35 2c 52 35 2c 4c  53 4c 20 23 32 0d 9b b4  |,R5,R5,LSL #2...|
00017db0  23 4c 44 52 20 52 33 2c  5b 52 30 5d 3a 41 44 44  |#LDR R3,[R0]:ADD|
00017dc0  20 52 33 2c 52 33 2c 52  32 2c 41 53 52 20 23 34  | R3,R3,R2,ASR #4|
00017dd0  0d 9b be 12 53 54 52 20  52 33 2c 5b 52 30 5d 2c  |....STR R3,[R0],|
00017de0  23 34 0d 9b c8 17 52 53  42 20 52 32 2c 52 35 2c  |#4....RSB R2,R5,|
00017df0  52 35 2c 4c 53 4c 20 23  33 0d 9b d2 13 4c 44 52  |R5,LSL #3....LDR|
00017e00  20 52 35 2c 5b 52 31 30  2c 23 34 5d 0d 9b dc 17  | R5,[R10,#4]....|
00017e10  41 44 44 20 52 35 2c 52  35 2c 52 32 2c 41 53 52  |ADD R5,R5,R2,ASR|
00017e20  20 23 34 0d 9b e6 17 41  44 44 20 52 32 2c 52 36  | #4....ADD R2,R6|
00017e30  2c 52 36 2c 4c 53 4c 20  23 31 0d 9b f0 27 4c 44  |,R6,LSL #1...'LD|
00017e40  52 20 52 33 2c 5b 52 30  2c 2d 52 38 5d 3a 41 44  |R R3,[R0,-R8]:AD|
00017e50  44 20 52 33 2c 52 33 2c  52 32 2c 41 53 52 20 23  |D R3,R3,R2,ASR #|
00017e60  34 0d 9b fa 13 53 54 52  20 52 33 2c 5b 52 30 2c  |4....STR R3,[R0,|
00017e70  2d 52 38 5d 0d 9c 04 17  41 44 44 20 52 32 2c 52  |-R8]....ADD R2,R|
00017e80  36 2c 52 36 2c 4c 53 4c  20 23 32 0d 9c 0e 23 4c  |6,R6,LSL #2...#L|
00017e90  44 52 20 52 33 2c 5b 52  30 5d 3a 41 44 44 20 52  |DR R3,[R0]:ADD R|
00017ea0  33 2c 52 33 2c 52 32 2c  41 53 52 20 23 34 0d 9c  |3,R3,R2,ASR #4..|
00017eb0  18 0f 53 54 52 20 52 33  2c 5b 52 30 5d 0d 9c 22  |..STR R3,[R0].."|
00017ec0  14 4d 4f 56 20 52 33 2c  52 36 2c 41 53 52 20 23  |.MOV R3,R6,ASR #|
00017ed0  34 0d 9c 2c 12 53 54 52  20 52 33 2c 5b 52 30 2c  |4..,.STR R3,[R0,|
00017ee0  52 38 5d 0d 9c 36 17 52  53 42 20 52 32 2c 52 36  |R8]..6.RSB R2,R6|
00017ef0  2c 52 36 2c 4c 53 4c 20  23 33 0d 9c 40 13 4c 44  |,R6,LSL #3..@.LD|
00017f00  52 20 52 36 2c 5b 52 31  30 2c 23 38 5d 0d 9c 4a  |R R6,[R10,#8]..J|
00017f10  17 41 44 44 20 52 36 2c  52 36 2c 52 32 2c 41 53  |.ADD R6,R6,R2,AS|
00017f20  52 20 23 34 0d 9c 54 05  5d 0d 9c 5e 05 cc 0d 9c  |R #4..T.]..^....|
00017f30  68 0a 5b 4f 50 54 20 5a  0d 9c 72 18 4c 44 4d 49  |h.[OPT Z..r.LDMI|
00017f40  41 20 52 31 30 2c 7b 52  34 2c 52 35 2c 52 36 7d  |A R10,{R4,R5,R6}|
00017f50  0d 9c 7c 05 5d 0d 9c 86  05 cd 0d 9c 90 05 cc 0d  |..|.]...........|
00017f60  9c 9a 0e e7 64 69 74 68  65 72 25 20 8c 0d 9c a4  |....dither% ....|
00017f70  0a 5b 4f 50 54 20 5a 0d  9c ae 17 41 44 44 20 52  |.[OPT Z....ADD R|
00017f80  32 2c 52 34 2c 52 34 2c  4c 53 4c 20 23 31 0d 9c  |2,R4,R4,LSL #1..|
00017f90  b8 28 4c 44 52 20 52 33  2c 5b 52 31 31 2c 2d 52  |.(LDR R3,[R11,-R|
00017fa0  38 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |8]:ADD R3,R3,R2,|
00017fb0  41 53 52 20 23 34 0d 9c  c2 14 53 54 52 20 52 33  |ASR #4....STR R3|
00017fc0  2c 5b 52 31 31 2c 2d 52  38 5d 0d 9c cc 17 41 44  |,[R11,-R8]....AD|
00017fd0  44 20 52 32 2c 52 34 2c  52 34 2c 4c 53 4c 20 23  |D R2,R4,R4,LSL #|
00017fe0  32 0d 9c d6 24 4c 44 52  20 52 33 2c 5b 52 31 31  |2...$LDR R3,[R11|
00017ff0  5d 3a 41 44 44 20 52 33  2c 52 33 2c 52 32 2c 41  |]:ADD R3,R3,R2,A|
00018000  53 52 20 23 34 0d 9c e0  10 53 54 52 20 52 33 2c  |SR #4....STR R3,|
00018010  5b 52 31 31 5d 0d 9c ea  14 4d 4f 56 20 52 33 2c  |[R11]....MOV R3,|
00018020  52 34 2c 41 53 52 20 23  34 0d 9c f4 14 53 54 52  |R4,ASR #4....STR|
00018030  20 52 33 2c 5b 52 31 31  2c 52 38 5d 21 0d 9c fe  | R3,[R11,R8]!...|
00018040  17 52 53 42 20 52 32 2c  52 34 2c 52 34 2c 4c 53  |.RSB R2,R4,R4,LS|
00018050  4c 20 23 33 0d 9d 08 13  4c 44 52 20 52 34 2c 5b  |L #3....LDR R4,[|
00018060  52 31 30 5d 2c 52 38 0d  9d 12 17 41 44 44 20 52  |R10],R8....ADD R|
00018070  34 2c 52 34 2c 52 32 2c  41 53 52 20 23 34 0d 9d  |4,R4,R2,ASR #4..|
00018080  1c 05 5d 0d 9d 26 05 cc  0d 9d 30 0a 5b 4f 50 54  |..]..&....0.[OPT|
00018090  20 5a 0d 9d 3a 13 4c 44  52 20 52 34 2c 5b 52 31  | Z..:.LDR R4,[R1|
000180a0  30 5d 2c 52 38 0d 9d 44  05 5d 0d 9d 4e 05 cd 0d  |0],R8..D.]..N...|
000180b0  9d 58 05 cd 0d 9d 62 0a  5b 4f 50 54 20 5a 0d 9d  |.X....b.[OPT Z..|
000180c0  6c 1c 53 55 42 53 20 52  39 2c 52 39 2c 23 31 3a  |l.SUBS R9,R9,#1:|
000180d0  42 4e 45 20 66 73 6c 6f  6f 70 0d 9d 76 14 4c 44  |BNE fsloop..v.LD|
000180e0  4d 46 44 20 53 50 20 21  2c 7b 50 43 7d 5e 0d 9d  |MFD SP !,{PC}^..|
000180f0  80 05 5d 0d 9d 8a 07 c9  20 33 0d 9d 94 0e e7 6d  |..]..... 3.....m|
00018100  24 3c 3e 22 43 22 20 8c  0d 9d 9e 0a 5b 4f 50 54  |$<>"C" .....[OPT|
00018110  20 5a 0d 9d a8 10 2e 64  69 76 33 20 45 51 55 44  | Z.....div3 EQUD|
00018120  20 30 0d 9d b2 18 45 51  55 44 20 31 2f 28 62 72  | 0....EQUD 1/(br|
00018130  69 67 68 74 25 81 34 29  2a 46 0d 9d bc 18 45 51  |ight%.4)*F....EQ|
00018140  55 44 20 32 2f 28 62 72  69 67 68 74 25 81 34 29  |UD 2/(bright%.4)|
00018150  2a 46 0d 9d c6 0a 45 51  55 44 20 46 0d 9d d0 05  |*F....EQUD F....|
00018160  5d 0d 9d da 05 cd 0d 9d  e4 0a 5b 4f 50 54 20 5a  |].........[OPT Z|
00018170  0d 9d ee 08 2e 66 73 25  0d 9d f8 14 53 54 4d 46  |.....fs%....STMF|
00018180  44 20 53 50 20 21 2c 7b  52 31 34 7d 0d 9e 02 20  |D SP !,{R14}... |
00018190  4c 44 52 20 52 31 2c 5b  52 39 2c 23 35 2a 38 5d  |LDR R1,[R9,#5*8]|
000181a0  3a 4c 44 52 20 52 31 2c  5b 52 31 5d 0d 9e 0c 15  |:LDR R1,[R1]....|
000181b0  4c 44 52 20 52 31 30 2c  5b 52 39 2c 23 34 2a 38  |LDR R10,[R9,#4*8|
000181c0  5d 0d 9e 16 15 4c 44 52  20 52 31 31 2c 5b 52 39  |]....LDR R11,[R9|
000181d0  2c 23 33 2a 38 5d 0d 9e  20 15 4c 44 52 20 52 31  |,#3*8].. .LDR R1|
000181e0  32 2c 5b 52 39 2c 23 32  2a 38 5d 0d 9e 2a 11 4c  |2,[R9,#2*8]..*.L|
000181f0  44 52 20 52 31 32 2c 5b  52 31 32 5d 0d 9e 34 12  |DR R12,[R12]..4.|
00018200  4c 44 52 20 52 38 2c 5b  52 39 2c 23 38 5d 0d 9e  |LDR R8,[R9,#8]..|
00018210  3e 0f 4c 44 52 20 52 38  2c 5b 52 38 5d 0d 9e 48  |>.LDR R8,[R8]..H|
00018220  0f 4c 44 52 20 52 39 2c  5b 52 39 5d 0d 9e 52 0f  |.LDR R9,[R9]..R.|
00018230  4c 44 52 20 52 39 2c 5b  52 39 5d 0d 9e 5c 05 5d  |LDR R9,[R9]..\.]|
00018240  0d 9e 66 0d e7 6d 24 3d  22 43 22 20 8c 0d 9e 70  |..f..m$="C" ...p|
00018250  0a 5b 4f 50 54 20 5a 0d  9e 7a 10 4c 44 52 20 52  |.[OPT Z..z.LDR R|
00018260  34 2c 5b 52 31 30 5d 0d  9e 84 13 4c 44 52 20 52  |4,[R10]....LDR R|
00018270  35 2c 5b 52 31 30 2c 23  34 5d 0d 9e 8e 13 4c 44  |5,[R10,#4]....LD|
00018280  52 20 52 36 2c 5b 52 31  30 2c 23 38 5d 0d 9e 98  |R R6,[R10,#8]...|
00018290  05 5d 0d 9e a2 05 cc 0d  9e ac 0a 5b 4f 50 54 20  |.].........[OPT |
000182a0  5a 0d 9e b6 13 4c 44 52  20 52 34 2c 5b 52 31 30  |Z....LDR R4,[R10|
000182b0  5d 2c 52 38 0d 9e c0 0f  41 44 52 20 52 37 2c 64  |],R8....ADR R7,d|
000182c0  69 76 33 0d 9e ca 05 5d  0d 9e d4 05 cd 0d 9e de  |iv3....]........|
000182d0  0a 5b 4f 50 54 20 5a 0d  9e e8 0b 2e 66 73 6c 6f  |.[OPT Z.....fslo|
000182e0  6f 70 0d 9e f2 05 5d 0d  9e fc 0d e7 6d 24 3d 22  |op....].....m$="|
000182f0  43 22 20 8c 0d 9f 06 0a  5b 4f 50 54 20 5a 0d 9f  |C" .....[OPT Z..|
00018300  10 12 41 44 44 20 52 31  30 2c 52 31 30 2c 52 38  |..ADD R10,R10,R8|
00018310  0d 9f 1a 2f 54 45 51 20  52 34 2c 23 30 3a 4d 4f  |.../TEQ R4,#0:MO|
00018320  56 4d 49 20 52 34 2c 23  30 3a 43 4d 50 20 52 34  |VMI R4,#0:CMP R4|
00018330  2c 23 46 3a 4d 4f 56 43  53 20 52 34 2c 23 46 0d  |,#F:MOVCS R4,#F.|
00018340  9f 24 2f 54 45 51 20 52  35 2c 23 30 3a 4d 4f 56  |.$/TEQ R5,#0:MOV|
00018350  4d 49 20 52 35 2c 23 30  3a 43 4d 50 20 52 35 2c  |MI R5,#0:CMP R5,|
00018360  23 46 3a 4d 4f 56 43 53  20 52 35 2c 23 46 0d 9f  |#F:MOVCS R5,#F..|
00018370  2e 2f 54 45 51 20 52 36  2c 23 30 3a 4d 4f 56 4d  |./TEQ R6,#0:MOVM|
00018380  49 20 52 36 2c 23 30 3a  43 4d 50 20 52 36 2c 23  |I R6,#0:CMP R6,#|
00018390  46 3a 4d 4f 56 43 53 20  52 36 2c 23 46 0d 9f 38  |F:MOVCS R6,#F..8|
000183a0  0d 4d 4f 56 20 52 33 2c  23 30 0d 9f 42 1e 43 4d  |.MOV R3,#0..B.CM|
000183b0  50 20 52 34 2c 23 46 3e  3e 31 3a 84 52 43 53 20  |P R4,#F>>1:.RCS |
000183c0  52 33 2c 52 33 2c 23 31  0d 9f 4c 1e 43 4d 50 20  |R3,R3,#1..L.CMP |
000183d0  52 35 2c 23 46 3e 3e 31  3a 84 52 43 53 20 52 33  |R5,#F>>1:.RCS R3|
000183e0  2c 52 33 2c 23 32 0d 9f  56 1e 43 4d 50 20 52 36  |,R3,#2..V.CMP R6|
000183f0  2c 23 46 3e 3e 31 3a 84  52 43 53 20 52 33 2c 52  |,#F>>1:.RCS R3,R|
00018400  33 2c 23 34 0d 9f 60 22  43 4d 50 20 52 33 2c 23  |3,#4..`"CMP R3,#|
00018410  36 3a ec 51 20 52 33 2c  23 31 3a 42 45 51 20 6f  |6:.Q R3,#1:BEQ o|
00018420  63 74 63 79 61 6e 0d 9f  6a 10 42 43 53 20 6f 63  |ctcyan..j.BCS oc|
00018430  74 77 68 69 74 65 0d 9f  74 19 43 4d 50 20 52 33  |twhite..t.CMP R3|
00018440  2c 23 34 3a 42 45 51 20  6f 63 74 62 6c 75 65 0d  |,#4:BEQ octblue.|
00018450  9f 7e 1e 4d 4f 56 43 53  20 52 33 2c 23 32 3a 42  |.~.MOVCS R3,#2:B|
00018460  43 53 20 6f 63 74 6d 61  67 65 6e 74 61 0d 9f 88  |CS octmagenta...|
00018470  1a 43 4d 50 20 52 33 2c  23 32 3a 42 45 51 20 6f  |.CMP R3,#2:BEQ o|
00018480  63 74 67 72 65 65 6e 0d  9f 92 11 42 43 53 20 6f  |ctgreen....BCS o|
00018490  63 74 79 65 6c 6c 6f 77  0d 9f 9c 1a 43 4d 50 20  |ctyellow....CMP |
000184a0  52 33 2c 23 30 3a 42 45  51 20 6f 63 74 62 6c 61  |R3,#0:BEQ octbla|
000184b0  63 6b 0d 9f a6 0b 2e 6f  63 74 72 65 64 0d 9f b0  |ck.....octred...|
000184c0  10 52 53 42 20 52 30 2c  52 34 2c 23 46 0d 9f ba  |.RSB R0,R4,#F...|
000184d0  0d 43 4d 50 20 52 35 2c  52 30 0d 9f c4 0f 42 4c  |.CMP R5,R0....BL|
000184e0  54 20 6f 63 74 72 65 64  31 0d 9f ce 0d 43 4d 50  |T octred1....CMP|
000184f0  20 52 35 2c 52 36 0d 9f  d8 0f 4d 4f 56 47 45 20  | R5,R6....MOVGE |
00018500  52 33 2c 23 33 0d 9f e2  0f 4d 4f 56 4c 54 20 52  |R3,#3....MOVLT R|
00018510  33 2c 23 32 0d 9f ec 10  42 20 6f 63 74 63 6f 6e  |3,#2....B octcon|
00018520  76 65 72 74 0d 9f f6 0c  2e 6f 63 74 72 65 64 31  |vert.....octred1|
00018530  0d a0 00 0d 43 4d 50 20  52 30 2c 52 36 0d a0 0a  |....CMP R0,R6...|
00018540  0f 4d 4f 56 47 45 20 52  33 2c 23 30 0d a0 14 0f  |.MOVGE R3,#0....|
00018550  4d 4f 56 4c 54 20 52 33  2c 23 32 0d a0 1e 10 42  |MOVLT R3,#2....B|
00018560  20 6f 63 74 63 6f 6e 76  65 72 74 0d a0 28 0d 2e  | octconvert..(..|
00018570  6f 63 74 67 72 65 65 6e  0d a0 32 10 52 53 42 20  |octgreen..2.RSB |
00018580  52 30 2c 52 35 2c 23 46  0d a0 3c 0d 43 4d 50 20  |R0,R5,#F..<.CMP |
00018590  52 30 2c 52 34 0d a0 46  11 42 4c 54 20 6f 63 74  |R0,R4..F.BLT oct|
000185a0  67 72 65 65 6e 31 0d a0  50 0d 43 4d 50 20 52 30  |green1..P.CMP R0|
000185b0  2c 52 36 0d a0 5a 0f 4d  4f 56 47 45 20 52 33 2c  |,R6..Z.MOVGE R3,|
000185c0  23 30 0d a0 64 0f 4d 4f  56 4c 54 20 52 33 2c 23  |#0..d.MOVLT R3,#|
000185d0  31 0d a0 6e 10 42 20 6f  63 74 63 6f 6e 76 65 72  |1..n.B octconver|
000185e0  74 0d a0 78 0e 2e 6f 63  74 67 72 65 65 6e 31 0d  |t..x..octgreen1.|
000185f0  a0 82 0d 43 4d 50 20 52  34 2c 52 36 0d a0 8c 0f  |...CMP R4,R6....|
00018600  4d 4f 56 47 45 20 52 33  2c 23 33 0d a0 96 0f 4d  |MOVGE R3,#3....M|
00018610  4f 56 4c 54 20 52 33 2c  23 31 0d a0 a0 10 42 20  |OVLT R3,#1....B |
00018620  6f 63 74 63 6f 6e 76 65  72 74 0d a0 aa 0c 2e 6f  |octconvert.....o|
00018630  63 74 62 6c 75 65 0d a0  b4 10 52 53 42 20 52 30  |ctblue....RSB R0|
00018640  2c 52 36 2c 23 46 0d a0  be 0d 43 4d 50 20 52 30  |,R6,#F....CMP R0|
00018650  2c 52 34 0d a0 c8 10 42  4c 54 20 6f 63 74 62 6c  |,R4....BLT octbl|
00018660  75 65 31 0d a0 d2 0d 43  4d 50 20 52 30 2c 52 35  |ue1....CMP R0,R5|
00018670  0d a0 dc 0f 4d 4f 56 47  45 20 52 33 2c 23 30 0d  |....MOVGE R3,#0.|
00018680  a0 e6 0f 4d 4f 56 4c 54  20 52 33 2c 23 31 0d a0  |...MOVLT R3,#1..|
00018690  f0 10 42 20 6f 63 74 63  6f 6e 76 65 72 74 0d a0  |..B octconvert..|
000186a0  fa 0d 2e 6f 63 74 62 6c  75 65 31 0d a1 04 0d 43  |...octblue1....C|
000186b0  4d 50 20 52 34 2c 52 35  0d a1 0e 0f 4d 4f 56 47  |MP R4,R5....MOVG|
000186c0  45 20 52 33 2c 23 32 0d  a1 18 0f 4d 4f 56 4c 54  |E R3,#2....MOVLT|
000186d0  20 52 33 2c 23 31 0d a1  22 10 42 20 6f 63 74 63  | R3,#1..".B octc|
000186e0  6f 6e 76 65 72 74 0d a1  2c 0d 2e 6f 63 74 77 68  |onvert..,..octwh|
000186f0  69 74 65 0d a1 36 0d 43  4d 50 20 52 34 2c 52 35  |ite..6.CMP R4,R5|
00018700  0d a1 40 11 42 4c 54 20  6f 63 74 77 68 69 74 65  |..@.BLT octwhite|
00018710  31 0d a1 4a 0d 43 4d 50  20 52 35 2c 52 36 0d a1  |1..J.CMP R5,R6..|
00018720  54 0f 4d 4f 56 47 45 20  52 33 2c 23 33 0d a1 5e  |T.MOVGE R3,#3..^|
00018730  0f 4d 4f 56 4c 54 20 52  33 2c 23 32 0d a1 68 10  |.MOVLT R3,#2..h.|
00018740  42 20 6f 63 74 63 6f 6e  76 65 72 74 0d a1 72 0e  |B octconvert..r.|
00018750  2e 6f 63 74 77 68 69 74  65 31 0d a1 7c 0d 43 4d  |.octwhite1..|.CM|
00018760  50 20 52 34 2c 52 36 0d  a1 86 0f 4d 4f 56 47 45  |P R4,R6....MOVGE|
00018770  20 52 33 2c 23 33 0d a1  90 0f 4d 4f 56 4c 54 20  | R3,#3....MOVLT |
00018780  52 33 2c 23 31 0d a1 9a  0f 2e 6f 63 74 63 6f 6e  |R3,#1.....octcon|
00018790  76 65 72 74 0d a1 a4 0d  43 4d 50 20 52 33 2c 23  |vert....CMP R3,#|
000187a0  31 0d a1 ae 0c 2e 6f 63  74 63 79 61 6e 0d a1 b8  |1.....octcyan...|
000187b0  12 53 55 42 45 51 20 52  35 2c 52 35 2c 23 46 0d  |.SUBEQ R5,R5,#F.|
000187c0  a1 c2 12 53 55 42 45 51  20 52 36 2c 52 36 2c 23  |...SUBEQ R6,R6,#|
000187d0  46 0d a1 cc 0f 2e 6f 63  74 6d 61 67 65 6e 74 61  |F.....octmagenta|
000187e0  0d a1 d6 0d 43 4d 50 20  52 33 2c 23 32 0d a1 e0  |....CMP R3,#2...|
000187f0  12 53 55 42 45 51 20 52  34 2c 52 34 2c 23 46 0d  |.SUBEQ R4,R4,#F.|
00018800  a1 ea 12 53 55 42 45 51  20 52 36 2c 52 36 2c 23  |...SUBEQ R6,R6,#|
00018810  46 0d a1 f4 0e 2e 6f 63  74 79 65 6c 6c 6f 77 0d  |F.....octyellow.|
00018820  a1 fe 0d 43 4d 50 20 52  33 2c 23 33 0d a2 08 12  |...CMP R3,#3....|
00018830  53 55 42 45 51 20 52 34  2c 52 34 2c 23 46 0d a2  |SUBEQ R4,R4,#F..|
00018840  12 12 53 55 42 45 51 20  52 35 2c 52 35 2c 23 46  |..SUBEQ R5,R5,#F|
00018850  0d a2 1c 0d 2e 6f 63 74  62 6c 61 63 6b 0d a2 26  |.....octblack..&|
00018860  15 4d 4f 56 20 52 32 2c  52 31 32 2c 4c 53 52 20  |.MOV R2,R12,LSR |
00018870  23 32 0d a2 30 20 80 20  52 37 2c 52 31 32 2c 23  |#2..0 . R7,R12,#|
00018880  33 3a 4d 4f 56 20 52 37  2c 52 37 2c 4c 53 4c 20  |3:MOV R7,R7,LSL |
00018890  23 31 0d a2 3a 0e 4d 4f  56 20 52 31 34 2c 23 33  |#1..:.MOV R14,#3|
000188a0  0d a2 44 16 4d 4f 56 20  52 31 34 2c 52 31 34 2c  |..D.MOV R14,R14,|
000188b0  4c 53 4c 20 52 37 0d a2  4e 3e 4c 44 52 42 20 52  |LSL R7..N>LDRB R|
000188c0  30 2c 5b 52 32 5d 3a 42  49 43 20 52 30 2c 52 30  |0,[R2]:BIC R0,R0|
000188d0  2c 52 31 34 3a 84 52 20  52 30 2c 52 30 2c 52 33  |,R14:.R R0,R0,R3|
000188e0  2c 4c 53 4c 20 52 37 3a  53 54 52 42 20 52 30 2c  |,LSL R7:STRB R0,|
000188f0  5b 52 32 5d 0d a2 58 12  41 44 44 20 52 31 32 2c  |[R2]..X.ADD R12,|
00018900  52 31 32 2c 52 31 0d a2  62 05 5d 0d a2 6c 0e e7  |R12,R1..b.]..l..|
00018910  64 69 74 68 65 72 25 20  8c 0d a2 76 0a 5b 4f 50  |dither% ...v.[OP|
00018920  54 20 5a 0d a2 80 11 41  44 44 20 52 30 2c 52 31  |T Z....ADD R0,R1|
00018930  31 2c 23 34 0d a2 8a 17  41 44 44 20 52 32 2c 52  |1,#4....ADD R2,R|
00018940  34 2c 52 34 2c 4c 53 4c  20 23 31 0d a2 94 28 4c  |4,R4,LSL #1...(L|
00018950  44 52 20 52 33 2c 5b 52  31 31 2c 2d 52 38 5d 3a  |DR R3,[R11,-R8]:|
00018960  41 44 44 20 52 33 2c 52  33 2c 52 32 2c 41 53 52  |ADD R3,R3,R2,ASR|
00018970  20 23 34 0d a2 9e 14 53  54 52 20 52 33 2c 5b 52  | #4....STR R3,[R|
00018980  31 31 2c 2d 52 38 5d 0d  a2 a8 17 41 44 44 20 52  |11,-R8]....ADD R|
00018990  32 2c 52 34 2c 52 34 2c  4c 53 4c 20 23 32 0d a2  |2,R4,R4,LSL #2..|
000189a0  b2 24 4c 44 52 20 52 33  2c 5b 52 31 31 5d 3a 41  |.$LDR R3,[R11]:A|
000189b0  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
000189c0  23 34 0d a2 bc 10 53 54  52 20 52 33 2c 5b 52 31  |#4....STR R3,[R1|
000189d0  31 5d 0d a2 c6 14 4d 4f  56 20 52 33 2c 52 34 2c  |1]....MOV R3,R4,|
000189e0  41 53 52 20 23 34 0d a2  d0 14 53 54 52 20 52 33  |ASR #4....STR R3|
000189f0  2c 5b 52 31 31 2c 52 38  5d 21 0d a2 da 17 52 53  |,[R11,R8]!....RS|
00018a00  42 20 52 32 2c 52 34 2c  52 34 2c 4c 53 4c 20 23  |B R2,R4,R4,LSL #|
00018a10  33 0d a2 e4 10 4c 44 52  20 52 34 2c 5b 52 31 30  |3....LDR R4,[R10|
00018a20  5d 0d a2 ee 17 41 44 44  20 52 34 2c 52 34 2c 52  |]....ADD R4,R4,R|
00018a30  32 2c 41 53 52 20 23 34  0d a2 f8 17 41 44 44 20  |2,ASR #4....ADD |
00018a40  52 32 2c 52 35 2c 52 35  2c 4c 53 4c 20 23 31 0d  |R2,R5,R5,LSL #1.|
00018a50  a3 02 27 4c 44 52 20 52  33 2c 5b 52 30 2c 2d 52  |..'LDR R3,[R0,-R|
00018a60  38 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |8]:ADD R3,R3,R2,|
00018a70  41 53 52 20 23 34 0d a3  0c 13 53 54 52 20 52 33  |ASR #4....STR R3|
00018a80  2c 5b 52 30 2c 2d 52 38  5d 0d a3 16 14 4d 4f 56  |,[R0,-R8]....MOV|
00018a90  20 52 33 2c 52 35 2c 41  53 52 20 23 34 0d a3 20  | R3,R5,ASR #4.. |
00018aa0  12 53 54 52 20 52 33 2c  5b 52 30 2c 52 38 5d 0d  |.STR R3,[R0,R8].|
00018ab0  a3 2a 17 41 44 44 20 52  32 2c 52 35 2c 52 35 2c  |.*.ADD R2,R5,R5,|
00018ac0  4c 53 4c 20 23 32 0d a3  34 23 4c 44 52 20 52 33  |LSL #2..4#LDR R3|
00018ad0  2c 5b 52 30 5d 3a 41 44  44 20 52 33 2c 52 33 2c  |,[R0]:ADD R3,R3,|
00018ae0  52 32 2c 41 53 52 20 23  34 0d a3 3e 12 53 54 52  |R2,ASR #4..>.STR|
00018af0  20 52 33 2c 5b 52 30 5d  2c 23 34 0d a3 48 17 52  | R3,[R0],#4..H.R|
00018b00  53 42 20 52 32 2c 52 35  2c 52 35 2c 4c 53 4c 20  |SB R2,R5,R5,LSL |
00018b10  23 33 0d a3 52 13 4c 44  52 20 52 35 2c 5b 52 31  |#3..R.LDR R5,[R1|
00018b20  30 2c 23 34 5d 0d a3 5c  17 41 44 44 20 52 35 2c  |0,#4]..\.ADD R5,|
00018b30  52 35 2c 52 32 2c 41 53  52 20 23 34 0d a3 66 17  |R5,R2,ASR #4..f.|
00018b40  41 44 44 20 52 32 2c 52  36 2c 52 36 2c 4c 53 4c  |ADD R2,R6,R6,LSL|
00018b50  20 23 31 0d a3 70 27 4c  44 52 20 52 33 2c 5b 52  | #1..p'LDR R3,[R|
00018b60  30 2c 2d 52 38 5d 3a 41  44 44 20 52 33 2c 52 33  |0,-R8]:ADD R3,R3|
00018b70  2c 52 32 2c 41 53 52 20  23 34 0d a3 7a 13 53 54  |,R2,ASR #4..z.ST|
00018b80  52 20 52 33 2c 5b 52 30  2c 2d 52 38 5d 0d a3 84  |R R3,[R0,-R8]...|
00018b90  17 41 44 44 20 52 32 2c  52 36 2c 52 36 2c 4c 53  |.ADD R2,R6,R6,LS|
00018ba0  4c 20 23 32 0d a3 8e 23  4c 44 52 20 52 33 2c 5b  |L #2...#LDR R3,[|
00018bb0  52 30 5d 3a 41 44 44 20  52 33 2c 52 33 2c 52 32  |R0]:ADD R3,R3,R2|
00018bc0  2c 41 53 52 20 23 34 0d  a3 98 0f 53 54 52 20 52  |,ASR #4....STR R|
00018bd0  33 2c 5b 52 30 5d 0d a3  a2 14 4d 4f 56 20 52 33  |3,[R0]....MOV R3|
00018be0  2c 52 36 2c 41 53 52 20  23 34 0d a3 ac 12 53 54  |,R6,ASR #4....ST|
00018bf0  52 20 52 33 2c 5b 52 30  2c 52 38 5d 0d a3 b6 17  |R R3,[R0,R8]....|
00018c00  52 53 42 20 52 32 2c 52  36 2c 52 36 2c 4c 53 4c  |RSB R2,R6,R6,LSL|
00018c10  20 23 33 0d a3 c0 13 4c  44 52 20 52 36 2c 5b 52  | #3....LDR R6,[R|
00018c20  31 30 2c 23 38 5d 0d a3  ca 17 41 44 44 20 52 36  |10,#8]....ADD R6|
00018c30  2c 52 36 2c 52 32 2c 41  53 52 20 23 34 0d a3 d4  |,R6,R2,ASR #4...|
00018c40  05 5d 0d a3 de 05 cc 0d  a3 e8 0a 5b 4f 50 54 20  |.].........[OPT |
00018c50  5a 0d a3 f2 18 4c 44 4d  49 41 20 52 31 30 2c 7b  |Z....LDMIA R10,{|
00018c60  52 34 2c 52 35 2c 52 36  7d 0d a3 fc 05 5d 0d a4  |R4,R5,R6}....]..|
00018c70  06 05 cd 0d a4 10 05 cc  0d a4 1a 0a 5b 4f 50 54  |............[OPT|
00018c80  20 5a 0d a4 24 2f 54 45  51 20 52 34 2c 23 30 3a  | Z..$/TEQ R4,#0:|
00018c90  4d 4f 56 4d 49 20 52 34  2c 23 30 3a 43 4d 50 20  |MOVMI R4,#0:CMP |
00018ca0  52 34 2c 23 46 3a 4d 4f  56 43 53 20 52 34 2c 23  |R4,#F:MOVCS R4,#|
00018cb0  46 0d a4 2e 2f 4d 4f 56  20 52 33 2c 52 34 2c 4c  |F.../MOV R3,R4,L|
00018cc0  53 52 20 23 62 69 74 73  2d 32 3a 43 4d 50 20 52  |SR #bits-2:CMP R|
00018cd0  33 2c 23 33 3a 4d 4f 56  43 53 20 52 33 2c 23 33  |3,#3:MOVCS R3,#3|
00018ce0  0d a4 38 19 4c 44 52 20  52 32 2c 5b 52 37 2c 52  |..8.LDR R2,[R7,R|
00018cf0  33 2c 4c 53 4c 20 23 32  5d 0d a4 42 10 53 55 42  |3,LSL #2]..B.SUB|
00018d00  20 52 34 2c 52 34 2c 52  32 0d a4 4c 15 4d 4f 56  | R4,R4,R2..L.MOV|
00018d10  20 52 32 2c 52 31 32 2c  4c 53 52 20 23 32 0d a4  | R2,R12,LSR #2..|
00018d20  56 20 80 20 52 35 2c 52  31 32 2c 23 33 3a 4d 4f  |V . R5,R12,#3:MO|
00018d30  56 20 52 35 2c 52 35 2c  4c 53 4c 20 23 31 0d a4  |V R5,R5,LSL #1..|
00018d40  60 1e 4d 4f 56 20 52 36  2c 23 33 3a 4d 4f 56 20  |`.MOV R6,#3:MOV |
00018d50  52 36 2c 52 36 2c 4c 53  4c 20 52 35 0d a4 6a 3d  |R6,R6,LSL R5..j=|
00018d60  4c 44 52 42 20 52 30 2c  5b 52 32 5d 3a 42 49 43  |LDRB R0,[R2]:BIC|
00018d70  20 52 30 2c 52 30 2c 52  36 3a 84 52 20 52 30 2c  | R0,R0,R6:.R R0,|
00018d80  52 30 2c 52 33 2c 4c 53  4c 20 52 35 3a 53 54 52  |R0,R3,LSL R5:STR|
00018d90  42 20 52 30 2c 5b 52 32  5d 0d a4 74 12 41 44 44  |B R0,[R2]..t.ADD|
00018da0  20 52 31 32 2c 52 31 32  2c 52 31 0d a4 7e 05 5d  | R12,R12,R1..~.]|
00018db0  0d a4 88 0e e7 64 69 74  68 65 72 25 20 8c 0d a4  |.....dither% ...|
00018dc0  92 0a 5b 4f 50 54 20 5a  0d a4 9c 17 41 44 44 20  |..[OPT Z....ADD |
00018dd0  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 31 0d  |R2,R4,R4,LSL #1.|
00018de0  a4 a6 28 4c 44 52 20 52  33 2c 5b 52 31 31 2c 2d  |..(LDR R3,[R11,-|
00018df0  52 38 5d 3a 41 44 44 20  52 33 2c 52 33 2c 52 32  |R8]:ADD R3,R3,R2|
00018e00  2c 41 53 52 20 23 34 0d  a4 b0 14 53 54 52 20 52  |,ASR #4....STR R|
00018e10  33 2c 5b 52 31 31 2c 2d  52 38 5d 0d a4 ba 17 41  |3,[R11,-R8]....A|
00018e20  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
00018e30  23 32 0d a4 c4 24 4c 44  52 20 52 33 2c 5b 52 31  |#2...$LDR R3,[R1|
00018e40  31 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |1]:ADD R3,R3,R2,|
00018e50  41 53 52 20 23 34 0d a4  ce 10 53 54 52 20 52 33  |ASR #4....STR R3|
00018e60  2c 5b 52 31 31 5d 0d a4  d8 14 4d 4f 56 20 52 33  |,[R11]....MOV R3|
00018e70  2c 52 34 2c 41 53 52 20  23 34 0d a4 e2 14 53 54  |,R4,ASR #4....ST|
00018e80  52 20 52 33 2c 5b 52 31  31 2c 52 38 5d 21 0d a4  |R R3,[R11,R8]!..|
00018e90  ec 17 52 53 42 20 52 32  2c 52 34 2c 52 34 2c 4c  |..RSB R2,R4,R4,L|
00018ea0  53 4c 20 23 33 0d a4 f6  13 4c 44 52 20 52 34 2c  |SL #3....LDR R4,|
00018eb0  5b 52 31 30 5d 2c 52 38  0d a5 00 17 41 44 44 20  |[R10],R8....ADD |
00018ec0  52 34 2c 52 34 2c 52 32  2c 41 53 52 20 23 34 0d  |R4,R4,R2,ASR #4.|
00018ed0  a5 0a 05 5d 0d a5 14 05  cc 0d a5 1e 0a 5b 4f 50  |...].........[OP|
00018ee0  54 20 5a 0d a5 28 13 4c  44 52 20 52 34 2c 5b 52  |T Z..(.LDR R4,[R|
00018ef0  31 30 5d 2c 52 38 0d a5  32 05 5d 0d a5 3c 05 cd  |10],R8..2.]..<..|
00018f00  0d a5 46 05 cd 0d a5 50  0a 5b 4f 50 54 20 5a 0d  |..F....P.[OPT Z.|
00018f10  a5 5a 1c 53 55 42 53 20  52 39 2c 52 39 2c 23 31  |.Z.SUBS R9,R9,#1|
00018f20  3a 42 4e 45 20 66 73 6c  6f 6f 70 0d a5 64 14 4c  |:BNE fsloop..d.L|
00018f30  44 4d 46 44 20 53 50 20  21 2c 7b 50 43 7d 5e 0d  |DMFD SP !,{PC}^.|
00018f40  a5 6e 05 5d 0d a5 78 07  c9 20 31 0d a5 82 0b c8  |.n.]..x.. 1.....|
00018f50  8e 20 6d 24 20 ca 0d a5  8c 08 c9 22 43 22 0d a5  |. m$ ......"C"..|
00018f60  96 0a 5b 4f 50 54 20 5a  0d a5 a0 14 2e 64 69 76  |..[OPT Z.....div|
00018f70  74 61 62 6c 65 20 45 51  55 44 20 30 0d a5 aa 1e  |table EQUD 0....|
00018f80  45 51 55 44 20 28 31 2d  62 6c 61 63 6b 25 2f 32  |EQUD (1-black%/2|
00018f90  35 36 2a 32 29 2f 31 36  2a 46 0d a5 b4 1e 45 51  |56*2)/16*F....EQ|
00018fa0  55 44 20 28 32 2d 62 6c  61 63 6b 25 2f 32 35 36  |UD (2-black%/256|
00018fb0  2a 34 29 2f 31 36 2a 46  0d a5 be 1e 45 51 55 44  |*4)/16*F....EQUD|
00018fc0  20 28 33 2d 62 6c 61 63  6b 25 2f 32 35 36 2a 35  | (3-black%/256*5|
00018fd0  29 2f 31 36 2a 46 0d a5  c8 1e 45 51 55 44 20 28  |)/16*F....EQUD (|
00018fe0  34 2d 62 6c 61 63 6b 25  2f 32 35 36 2a 36 29 2f  |4-black%/256*6)/|
00018ff0  31 36 2a 46 0d a5 d2 1e  45 51 55 44 20 28 35 2d  |16*F....EQUD (5-|
00019000  62 6c 61 63 6b 25 2f 32  35 36 2a 37 29 2f 31 36  |black%/256*7)/16|
00019010  2a 46 0d a5 dc 1e 45 51  55 44 20 28 36 2d 62 6c  |*F....EQUD (6-bl|
00019020  61 63 6b 25 2f 32 35 36  2a 38 29 2f 31 36 2a 46  |ack%/256*8)/16*F|
00019030  0d a5 e6 1e 45 51 55 44  20 28 37 2d 62 6c 61 63  |....EQUD (7-blac|
00019040  6b 25 2f 32 35 36 2a 38  29 2f 31 36 2a 46 0d a5  |k%/256*8)/16*F..|
00019050  f0 1e 45 51 55 44 20 28  38 2d 62 6c 61 63 6b 25  |..EQUD (8-black%|
00019060  2f 32 35 36 2a 38 29 2f  31 36 2a 46 0d a5 fa 1e  |/256*8)/16*F....|
00019070  45 51 55 44 20 28 39 2d  62 6c 61 63 6b 25 2f 32  |EQUD (9-black%/2|
00019080  35 36 2a 38 29 2f 31 36  2a 46 0d a6 04 1f 45 51  |56*8)/16*F....EQ|
00019090  55 44 20 28 31 30 2d 62  6c 61 63 6b 25 2f 32 35  |UD (10-black%/25|
000190a0  36 2a 38 29 2f 31 36 2a  46 0d a6 0e 1f 45 51 55  |6*8)/16*F....EQU|
000190b0  44 20 28 31 31 2d 62 6c  61 63 6b 25 2f 32 35 36  |D (11-black%/256|
000190c0  2a 37 29 2f 31 36 2a 46  0d a6 18 1f 45 51 55 44  |*7)/16*F....EQUD|
000190d0  20 28 31 32 2d 62 6c 61  63 6b 25 2f 32 35 36 2a  | (12-black%/256*|
000190e0  36 29 2f 31 36 2a 46 0d  a6 22 1f 45 51 55 44 20  |6)/16*F..".EQUD |
000190f0  28 31 33 2d 62 6c 61 63  6b 25 2f 32 35 36 2a 35  |(13-black%/256*5|
00019100  29 2f 31 36 2a 46 0d a6  2c 1f 45 51 55 44 20 28  |)/16*F..,.EQUD (|
00019110  31 34 2d 62 6c 61 63 6b  25 2f 32 35 36 2a 34 29  |14-black%/256*4)|
00019120  2f 31 36 2a 46 0d a6 36  1f 45 51 55 44 20 28 31  |/16*F..6.EQUD (1|
00019130  35 2d 62 6c 61 63 6b 25  2f 32 35 36 2a 32 29 2f  |5-black%/256*2)/|
00019140  31 36 2a 46 0d a6 40 0a  45 51 55 44 20 46 0d a6  |16*F..@.EQUD F..|
00019150  4a 1f 2e 65 76 65 6e 72  6f 77 5f 67 61 72 64 20  |J..evenrow_gard |
00019160  44 43 44 20 65 76 65 6e  5f 67 61 72 64 0d a6 54  |DCD even_gard..T|
00019170  1d 2e 6f 64 64 72 6f 77  5f 67 61 72 64 20 44 43  |..oddrow_gard DC|
00019180  44 20 6f 64 64 5f 67 61  72 64 0d a6 5e 11 2e 72  |D odd_gard..^..r|
00019190  6f 77 69 6e 63 20 44 43  44 20 30 0d a6 68 08 2e  |owinc DCD 0..h..|
000191a0  66 73 25 0d a6 72 14 53  54 4d 46 44 20 53 50 20  |fs%..r.STMFD SP |
000191b0  21 2c 7b 52 31 34 7d 0d  a6 7c 20 4c 44 52 20 52  |!,{R14}..| LDR R|
000191c0  31 2c 5b 52 39 2c 23 35  2a 38 5d 3a 4c 44 52 20  |1,[R9,#5*8]:LDR |
000191d0  52 31 2c 5b 52 31 5d 0d  a6 86 15 4c 44 52 20 52  |R1,[R1]....LDR R|
000191e0  31 30 2c 5b 52 39 2c 23  34 2a 38 5d 0d a6 90 15  |10,[R9,#4*8]....|
000191f0  4c 44 52 20 52 31 31 2c  5b 52 39 2c 23 33 2a 38  |LDR R11,[R9,#3*8|
00019200  5d 0d a6 9a 15 4c 44 52  20 52 31 32 2c 5b 52 39  |]....LDR R12,[R9|
00019210  2c 23 32 2a 38 5d 0d a6  a4 11 4c 44 52 20 52 31  |,#2*8]....LDR R1|
00019220  32 2c 5b 52 31 32 5d 0d  a6 ae 12 4c 44 52 20 52  |2,[R12]....LDR R|
00019230  38 2c 5b 52 39 2c 23 38  5d 0d a6 b8 0f 4c 44 52  |8,[R9,#8]....LDR|
00019240  20 52 38 2c 5b 52 38 5d  0d a6 c2 0f 4c 44 52 20  | R8,[R8]....LDR |
00019250  52 39 2c 5b 52 39 5d 0d  a6 cc 0f 4c 44 52 20 52  |R9,[R9]....LDR R|
00019260  39 2c 5b 52 39 5d 0d a6  d6 13 4c 44 52 20 52 34  |9,[R9]....LDR R4|
00019270  2c 5b 52 31 30 5d 2c 52  38 0d a6 e0 0d 54 45 51  |,[R10],R8....TEQ|
00019280  20 52 38 2c 23 30 0d a6  ea 19 4c 44 52 50 4c 20  | R8,#0....LDRPL |
00019290  52 36 2c 65 76 65 6e 72  6f 77 5f 67 61 72 64 0d  |R6,evenrow_gard.|
000192a0  a6 f4 18 4c 44 52 4d 49  20 52 36 2c 6f 64 64 72  |...LDRMI R6,oddr|
000192b0  6f 77 5f 67 61 72 64 0d  a6 fe 14 4d 4f 56 20 52  |ow_gard....MOV R|
000192c0  31 2c 52 31 2c 4c 53 4c  20 23 31 0d a7 08 11 4c  |1,R1,LSL #1....L|
000192d0  44 52 20 52 37 2c 72 6f  77 69 6e 63 0d a7 12 14  |DR R7,rowinc....|
000192e0  41 44 52 20 52 31 34 2c  64 69 76 74 61 62 6c 65  |ADR R14,divtable|
000192f0  0d a7 1c 0b 2e 66 73 6c  6f 6f 70 0d a7 26 2f 54  |.....fsloop..&/T|
00019300  45 51 20 52 34 2c 23 30  3a 4d 4f 56 4d 49 20 52  |EQ R4,#0:MOVMI R|
00019310  34 2c 23 30 3a 43 4d 50  20 52 34 2c 23 46 3a 4d  |4,#0:CMP R4,#F:M|
00019320  4f 56 43 53 20 52 34 2c  23 46 0d a7 30 13 41 44  |OVCS R4,#F..0.AD|
00019330  44 20 52 35 2c 52 34 2c  23 46 3e 3e 35 0d a7 3a  |D R5,R4,#F>>5..:|
00019340  1a 4d 4f 56 53 20 52 35  2c 52 35 2c 4c 53 52 20  |.MOVS R5,R5,LSR |
00019350  23 62 69 74 73 2d 34 0d  a7 44 1c 4c 44 52 4e 45  |#bits-4..D.LDRNE|
00019360  20 52 30 2c 5b 52 31 34  2c 52 35 2c 4c 53 4c 20  | R0,[R14,R5,LSL |
00019370  23 32 5d 0d a7 4e 12 53  55 42 4e 45 20 52 34 2c  |#2]..N.SUBNE R4,|
00019380  52 34 2c 52 30 0d a7 58  05 5d 0d a7 62 0e e7 64  |R4,R0..X.]..b..d|
00019390  69 74 68 65 72 25 20 8c  0d a7 6c 0a 5b 4f 50 54  |ither% ...l.[OPT|
000193a0  20 5a 0d a7 76 17 41 44  44 20 52 32 2c 52 34 2c  | Z..v.ADD R2,R4,|
000193b0  52 34 2c 4c 53 4c 20 23  31 0d a7 80 28 4c 44 52  |R4,LSL #1...(LDR|
000193c0  20 52 33 2c 5b 52 31 31  2c 2d 52 38 5d 3a 41 44  | R3,[R11,-R8]:AD|
000193d0  44 20 52 33 2c 52 33 2c  52 32 2c 41 53 52 20 23  |D R3,R3,R2,ASR #|
000193e0  34 0d a7 8a 14 53 54 52  20 52 33 2c 5b 52 31 31  |4....STR R3,[R11|
000193f0  2c 2d 52 38 5d 0d a7 94  17 41 44 44 20 52 32 2c  |,-R8]....ADD R2,|
00019400  52 34 2c 52 34 2c 4c 53  4c 20 23 32 0d a7 9e 24  |R4,R4,LSL #2...$|
00019410  4c 44 52 20 52 33 2c 5b  52 31 31 5d 3a 41 44 44  |LDR R3,[R11]:ADD|
00019420  20 52 33 2c 52 33 2c 52  32 2c 41 53 52 20 23 34  | R3,R3,R2,ASR #4|
00019430  0d a7 a8 10 53 54 52 20  52 33 2c 5b 52 31 31 5d  |....STR R3,[R11]|
00019440  0d a7 b2 14 4d 4f 56 20  52 33 2c 52 34 2c 41 53  |....MOV R3,R4,AS|
00019450  52 20 23 34 0d a7 bc 14  53 54 52 20 52 33 2c 5b  |R #4....STR R3,[|
00019460  52 31 31 2c 52 38 5d 21  0d a7 c6 17 52 53 42 20  |R11,R8]!....RSB |
00019470  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 33 0d  |R2,R4,R4,LSL #3.|
00019480  a7 d0 13 4c 44 52 20 52  34 2c 5b 52 31 30 5d 2c  |...LDR R4,[R10],|
00019490  52 38 0d a7 da 18 41 44  44 53 20 52 34 2c 52 34  |R8....ADDS R4,R4|
000194a0  2c 52 32 2c 41 53 52 20  23 34 0d a7 e4 05 5d 0d  |,R2,ASR #4....].|
000194b0  a7 ee 05 cc 0d a7 f8 0a  5b 4f 50 54 20 5a 0d a8  |........[OPT Z..|
000194c0  02 13 4c 44 52 20 52 34  2c 5b 52 31 30 5d 2c 52  |..LDR R4,[R10],R|
000194d0  38 0d a8 0c 05 5d 0d a8  16 05 cd 0d a8 20 0a 5b  |8....]....... .[|
000194e0  4f 50 54 20 5a 0d a8 2a  25 4d 4f 56 4d 49 20 52  |OPT Z..*%MOVMI R|
000194f0  34 2c 23 30 3a 43 4d 50  20 52 34 2c 23 46 3a 4d  |4,#0:CMP R4,#F:M|
00019500  4f 56 43 53 20 52 34 2c  23 46 0d a8 34 13 41 44  |OVCS R4,#F..4.AD|
00019510  44 20 52 33 2c 52 34 2c  23 46 3e 3e 35 0d a8 3e  |D R3,R4,#F>>5..>|
00019520  1a 4d 4f 56 53 20 52 33  2c 52 33 2c 4c 53 52 20  |.MOVS R3,R3,LSR |
00019530  23 62 69 74 73 2d 34 0d  a8 48 1c 4c 44 52 4e 45  |#bits-4..H.LDRNE|
00019540  20 52 30 2c 5b 52 31 34  2c 52 33 2c 4c 53 4c 20  | R0,[R14,R3,LSL |
00019550  23 32 5d 0d a8 52 12 53  55 42 4e 45 20 52 34 2c  |#2]..R.SUBNE R4,|
00019560  52 34 2c 52 30 0d a8 5c  2c 84 52 20 52 35 2c 52  |R4,R0..\,.R R5,R|
00019570  35 2c 52 33 2c 4c 53 4c  20 23 35 3a 4c 44 52 20  |5,R3,LSL #5:LDR |
00019580  52 33 2c 5b 52 36 2c 52  35 2c 4c 53 4c 20 23 32  |R3,[R6,R5,LSL #2|
00019590  5d 0d a8 66 46 4d 4f 56  20 52 32 2c 52 31 32 2c  |]..fFMOV R2,R12,|
000195a0  4c 53 52 20 23 31 3a 53  54 52 42 20 52 33 2c 5b  |LSR #1:STRB R3,[|
000195b0  52 32 5d 2c 52 37 3a 4d  4f 56 20 52 33 2c 52 33  |R2],R7:MOV R3,R3|
000195c0  2c 4c 53 52 20 23 38 3a  53 54 52 42 20 52 33 2c  |,LSR #8:STRB R3,|
000195d0  5b 52 32 5d 2c 52 37 0d  a8 70 42 4d 4f 56 20 52  |[R2],R7..pBMOV R|
000195e0  33 2c 52 33 2c 4c 53 52  20 23 38 3a 53 54 52 42  |3,R3,LSR #8:STRB|
000195f0  20 52 33 2c 5b 52 32 5d  2c 52 37 3a 4d 4f 56 20  | R3,[R2],R7:MOV |
00019600  52 33 2c 52 33 2c 4c 53  52 20 23 38 3a 53 54 52  |R3,R3,LSR #8:STR|
00019610  42 20 52 33 2c 5b 52 32  5d 0d a8 7a 12 41 44 44  |B R3,[R2]..z.ADD|
00019620  20 52 31 32 2c 52 31 32  2c 52 31 0d a8 84 05 5d  | R12,R12,R1....]|
00019630  0d a8 8e 0e e7 64 69 74  68 65 72 25 20 8c 0d a8  |.....dither% ...|
00019640  98 0a 5b 4f 50 54 20 5a  0d a8 a2 17 41 44 44 20  |..[OPT Z....ADD |
00019650  52 32 2c 52 34 2c 52 34  2c 4c 53 4c 20 23 31 0d  |R2,R4,R4,LSL #1.|
00019660  a8 ac 28 4c 44 52 20 52  33 2c 5b 52 31 31 2c 2d  |..(LDR R3,[R11,-|
00019670  52 38 5d 3a 41 44 44 20  52 33 2c 52 33 2c 52 32  |R8]:ADD R3,R3,R2|
00019680  2c 41 53 52 20 23 34 0d  a8 b6 14 53 54 52 20 52  |,ASR #4....STR R|
00019690  33 2c 5b 52 31 31 2c 2d  52 38 5d 0d a8 c0 17 41  |3,[R11,-R8]....A|
000196a0  44 44 20 52 32 2c 52 34  2c 52 34 2c 4c 53 4c 20  |DD R2,R4,R4,LSL |
000196b0  23 32 0d a8 ca 24 4c 44  52 20 52 33 2c 5b 52 31  |#2...$LDR R3,[R1|
000196c0  31 5d 3a 41 44 44 20 52  33 2c 52 33 2c 52 32 2c  |1]:ADD R3,R3,R2,|
000196d0  41 53 52 20 23 34 0d a8  d4 10 53 54 52 20 52 33  |ASR #4....STR R3|
000196e0  2c 5b 52 31 31 5d 0d a8  de 14 4d 4f 56 20 52 33  |,[R11]....MOV R3|
000196f0  2c 52 34 2c 41 53 52 20  23 34 0d a8 e8 14 53 54  |,R4,ASR #4....ST|
00019700  52 20 52 33 2c 5b 52 31  31 2c 52 38 5d 21 0d a8  |R R3,[R11,R8]!..|
00019710  f2 17 52 53 42 20 52 32  2c 52 34 2c 52 34 2c 4c  |..RSB R2,R4,R4,L|
00019720  53 4c 20 23 33 0d a8 fc  13 4c 44 52 20 52 34 2c  |SL #3....LDR R4,|
00019730  5b 52 31 30 5d 2c 52 38  0d a9 06 17 41 44 44 20  |[R10],R8....ADD |
00019740  52 34 2c 52 34 2c 52 32  2c 41 53 52 20 23 34 0d  |R4,R4,R2,ASR #4.|
00019750  a9 10 05 5d 0d a9 1a 05  cc 0d a9 24 0a 5b 4f 50  |...].......$.[OP|
00019760  54 20 5a 0d a9 2e 13 4c  44 52 20 52 34 2c 5b 52  |T Z....LDR R4,[R|
00019770  31 30 5d 2c 52 38 0d a9  38 05 5d 0d a9 42 05 cd  |10],R8..8.]..B..|
00019780  0d a9 4c 0a 5b 4f 50 54  20 5a 0d a9 56 1c 53 55  |..L.[OPT Z..V.SU|
00019790  42 53 20 52 39 2c 52 39  2c 23 32 3a 42 4e 45 20  |BS R9,R9,#2:BNE |
000197a0  66 73 6c 6f 6f 70 0d a9  60 14 4c 44 4d 46 44 20  |fsloop..`.LDMFD |
000197b0  53 50 20 21 2c 7b 50 43  7d 5e 0d a9 6a 05 5d 0d  |SP !,{PC}^..j.].|
000197c0  a9 74 08 c9 22 54 22 0d  a9 7e 0a 5b 4f 50 54 20  |.t.."T"..~.[OPT |
000197d0  5a 0d a9 88 14 2e 64 69  76 74 61 62 6c 65 20 45  |Z.....divtable E|
000197e0  51 55 44 20 30 0d a9 92  1d 45 51 55 44 20 28 31  |QUD 0....EQUD (1|
000197f0  2d 62 6c 61 63 6b 25 2f  32 35 36 2a 32 29 2f 39  |-black%/256*2)/9|
00019800  2a 46 0d a9 9c 1d 45 51  55 44 20 28 32 2d 62 6c  |*F....EQUD (2-bl|
00019810  61 63 6b 25 2f 32 35 36  2a 34 29 2f 39 2a 46 0d  |ack%/256*4)/9*F.|
00019820  a9 a6 1d 45 51 55 44 20  28 33 2d 62 6c 61 63 6b  |...EQUD (3-black|
00019830  25 2f 32 35 36 2a 35 29  2f 39 2a 46 0d a9 b0 1d  |%/256*5)/9*F....|
00019840  45 51 55 44 20 28 34 2d  62 6c 61 63 6b 25 2f 32  |EQUD (4-black%/2|
00019850  35 36 2a 36 29 2f 39 2a  46 0d a9 ba 1d 45 51 55  |56*6)/9*F....EQU|
00019860  44 20 28 35 2d 62 6c 61  63 6b 25 2f 32 35 36 2a  |D (5-black%/256*|
00019870  36 29 2f 39 2a 46 0d a9  c4 1d 45 51 55 44 20 28  |6)/9*F....EQUD (|
00019880  36 2d 62 6c 61 63 6b 25  2f 32 35 36 2a 35 29 2f  |6-black%/256*5)/|
00019890  39 2a 46 0d a9 ce 1d 45  51 55 44 20 28 37 2d 62  |9*F....EQUD (7-b|
000198a0  6c 61 63 6b 25 2f 32 35  36 2a 34 29 2f 39 2a 46  |lack%/256*4)/9*F|
000198b0  0d a9 d8 1d 45 51 55 44  20 28 38 2d 62 6c 61 63  |....EQUD (8-blac|
000198c0  6b 25 2f 32 35 36 2a 32  29 2f 39 2a 46 0d a9 e2  |k%/256*2)/9*F...|
000198d0  0a 45 51 55 44 20 46 0d  a9 ec 1f 2e 65 76 65 6e  |.EQUD F.....even|
000198e0  72 6f 77 5f 67 61 72 64  20 44 43 44 20 65 76 65  |row_gard DCD eve|
000198f0  6e 5f 67 61 72 64 0d a9  f6 1d 2e 6f 64 64 72 6f  |n_gard.....oddro|
00019900  77 5f 67 61 72 64 20 44  43 44 20 6f 64 64 5f 67  |w_gard DCD odd_g|
00019910  61 72 64 0d aa 00 11 2e  72 6f 77 69 6e 63 20 44  |ard.....rowinc D|
00019920  43 44 20 30 0d aa 0a 08  2e 66 73 25 0d aa 14 14  |CD 0.....fs%....|
00019930  53 54 4d 46 44 20 53 50  20 21 2c 7b 52 31 34 7d  |STMFD SP !,{R14}|
00019940  0d aa 1e 20 4c 44 52 20  52 31 2c 5b 52 39 2c 23  |... LDR R1,[R9,#|
00019950  35 2a 38 5d 3a 4c 44 52  20 52 31 2c 5b 52 31 5d  |5*8]:LDR R1,[R1]|
00019960  0d aa 28 15 4c 44 52 20  52 31 30 2c 5b 52 39 2c  |..(.LDR R10,[R9,|
00019970  23 34 2a 38 5d 0d aa 32  15 4c 44 52 20 52 31 31  |#4*8]..2.LDR R11|
00019980  2c 5b 52 39 2c 23 33 2a  38 5d 0d aa 3c 15 4c 44  |,[R9,#3*8]..<.LD|
00019990  52 20 52 31 32 2c 5b 52  39 2c 23 32 2a 38 5d 0d  |R R12,[R9,#2*8].|
000199a0  aa 46 11 4c 44 52 20 52  31 32 2c 5b 52 31 32 5d  |.F.LDR R12,[R12]|
000199b0  0d aa 50 12 4c 44 52 20  52 38 2c 5b 52 39 2c 23  |..P.LDR R8,[R9,#|
000199c0  38 5d 0d aa 5a 0f 4c 44  52 20 52 38 2c 5b 52 38  |8]..Z.LDR R8,[R8|
000199d0  5d 0d aa 64 0f 4c 44 52  20 52 39 2c 5b 52 39 5d  |]..d.LDR R9,[R9]|
000199e0  0d aa 6e 0f 4c 44 52 20  52 39 2c 5b 52 39 5d 0d  |..n.LDR R9,[R9].|
000199f0  aa 78 13 4c 44 52 20 52  34 2c 5b 52 31 30 5d 2c  |.x.LDR R4,[R10],|
00019a00  52 38 0d aa 82 0d 54 45  51 20 52 38 2c 23 30 0d  |R8....TEQ R8,#0.|
00019a10  aa 8c 19 4c 44 52 50 4c  20 52 36 2c 65 76 65 6e  |...LDRPL R6,even|
00019a20  72 6f 77 5f 67 61 72 64  0d aa 96 18 4c 44 52 4d  |row_gard....LDRM|
00019a30  49 20 52 36 2c 6f 64 64  72 6f 77 5f 67 61 72 64  |I R6,oddrow_gard|
00019a40  0d aa a0 14 4d 4f 56 20  52 31 2c 52 31 2c 4c 53  |....MOV R1,R1,LS|
00019a50  4c 20 23 31 0d aa aa 11  4c 44 52 20 52 37 2c 72  |L #1....LDR R7,r|
00019a60  6f 77 69 6e 63 0d aa b4  14 41 44 52 20 52 31 34  |owinc....ADR R14|
00019a70  2c 64 69 76 74 61 62 6c  65 0d aa be 0b 2e 66 73  |,divtable.....fs|
00019a80  6c 6f 6f 70 0d aa c8 2f  54 45 51 20 52 34 2c 23  |loop.../TEQ R4,#|
00019a90  30 3a 4d 4f 56 4d 49 20  52 34 2c 23 30 3a 43 4d  |0:MOVMI R4,#0:CM|
00019aa0  50 20 52 34 2c 23 46 3a  4d 4f 56 43 53 20 52 34  |P R4,#F:MOVCS R4|
00019ab0  2c 23 46 0d aa d2 13 41  44 44 20 52 35 2c 52 34  |,#F....ADD R5,R4|
00019ac0  2c 23 46 3e 3e 34 0d aa  dc 17 41 44 44 20 52 35  |,#F>>4....ADD R5|
00019ad0  2c 52 35 2c 52 35 2c 4c  53 4c 20 23 33 0d aa e6  |,R5,R5,LSL #3...|
00019ae0  18 4d 4f 56 53 20 52 35  2c 52 35 2c 4c 53 52 20  |.MOVS R5,R5,LSR |
00019af0  23 62 69 74 73 0d aa f0  1c 4c 44 52 4e 45 20 52  |#bits....LDRNE R|
00019b00  30 2c 5b 52 31 34 2c 52  35 2c 4c 53 4c 20 23 32  |0,[R14,R5,LSL #2|
00019b10  5d 0d aa fa 12 53 55 42  4e 45 20 52 34 2c 52 34  |]....SUBNE R4,R4|
00019b20  2c 52 30 0d ab 04 05 5d  0d ab 0e 0e e7 64 69 74  |,R0....].....dit|
00019b30  68 65 72 25 20 8c 0d ab  18 0a 5b 4f 50 54 20 5a  |her% .....[OPT Z|
00019b40  0d ab 22 17 41 44 44 20  52 32 2c 52 34 2c 52 34  |..".ADD R2,R4,R4|
00019b50  2c 4c 53 4c 20 23 31 0d  ab 2c 28 4c 44 52 20 52  |,LSL #1..,(LDR R|
00019b60  33 2c 5b 52 31 31 2c 2d  52 38 5d 3a 41 44 44 20  |3,[R11,-R8]:ADD |
00019b70  52 33 2c 52 33 2c 52 32  2c 41 53 52 20 23 34 0d  |R3,R3,R2,ASR #4.|
00019b80  ab 36 14 53 54 52 20 52  33 2c 5b 52 31 31 2c 2d  |.6.STR R3,[R11,-|
00019b90  52 38 5d 0d ab 40 17 41  44 44 20 52 32 2c 52 34  |R8]..@.ADD R2,R4|
00019ba0  2c 52 34 2c 4c 53 4c 20  23 32 0d ab 4a 24 4c 44  |,R4,LSL #2..J$LD|
00019bb0  52 20 52 33 2c 5b 52 31  31 5d 3a 41 44 44 20 52  |R R3,[R11]:ADD R|
00019bc0  33 2c 52 33 2c 52 32 2c  41 53 52 20 23 34 0d ab  |3,R3,R2,ASR #4..|
00019bd0  54 10 53 54 52 20 52 33  2c 5b 52 31 31 5d 0d ab  |T.STR R3,[R11]..|
00019be0  5e 14 4d 4f 56 20 52 33  2c 52 34 2c 41 53 52 20  |^.MOV R3,R4,ASR |
00019bf0  23 34 0d ab 68 14 53 54  52 20 52 33 2c 5b 52 31  |#4..h.STR R3,[R1|
00019c00  31 2c 52 38 5d 21 0d ab  72 17 52 53 42 20 52 32  |1,R8]!..r.RSB R2|
00019c10  2c 52 34 2c 52 34 2c 4c  53 4c 20 23 33 0d ab 7c  |,R4,R4,LSL #3..||
00019c20  13 4c 44 52 20 52 34 2c  5b 52 31 30 5d 2c 52 38  |.LDR R4,[R10],R8|
00019c30  0d ab 86 18 41 44 44 53  20 52 34 2c 52 34 2c 52  |....ADDS R4,R4,R|
00019c40  32 2c 41 53 52 20 23 34  0d ab 90 05 5d 0d ab 9a  |2,ASR #4....]...|
00019c50  05 cc 0d ab a4 0a 5b 4f  50 54 20 5a 0d ab ae 13  |......[OPT Z....|
00019c60  4c 44 52 20 52 34 2c 5b  52 31 30 5d 2c 52 38 0d  |LDR R4,[R10],R8.|
00019c70  ab b8 05 5d 0d ab c2 05  cd 0d ab cc 0a 5b 4f 50  |...].........[OP|
00019c80  54 20 5a 0d ab d6 25 4d  4f 56 4d 49 20 52 34 2c  |T Z...%MOVMI R4,|
00019c90  23 30 3a 43 4d 50 20 52  34 2c 23 46 3a 4d 4f 56  |#0:CMP R4,#F:MOV|
00019ca0  43 53 20 52 34 2c 23 46  0d ab e0 13 41 44 44 20  |CS R4,#F....ADD |
00019cb0  52 33 2c 52 34 2c 23 46  3e 3e 34 0d ab ea 17 41  |R3,R4,#F>>4....A|
00019cc0  44 44 20 52 33 2c 52 33  2c 52 33 2c 4c 53 4c 20  |DD R3,R3,R3,LSL |
00019cd0  23 33 0d ab f4 18 4d 4f  56 53 20 52 33 2c 52 33  |#3....MOVS R3,R3|
00019ce0  2c 4c 53 52 20 23 62 69  74 73 0d ab fe 1c 4c 44  |,LSR #bits....LD|
00019cf0  52 4e 45 20 52 30 2c 5b  52 31 34 2c 52 33 2c 4c  |RNE R0,[R14,R3,L|
00019d00  53 4c 20 23 32 5d 0d ac  08 12 53 55 42 4e 45 20  |SL #2]....SUBNE |
00019d10  52 34 2c 52 34 2c 52 30  0d ac 12 2c 84 52 20 52  |R4,R4,R0...,.R R|
00019d20  35 2c 52 35 2c 52 33 2c  4c 53 4c 20 23 34 3a 4c  |5,R5,R3,LSL #4:L|
00019d30  44 52 20 52 35 2c 5b 52  36 2c 52 35 2c 4c 53 4c  |DR R5,[R6,R5,LSL|
00019d40  20 23 32 5d 0d ac 1c 15  4d 4f 56 20 52 32 2c 52  | #2]....MOV R2,R|
00019d50  31 32 2c 4c 53 52 20 23  31 0d ac 26 10 80 20 52  |12,LSR #1..&.. R|
00019d60  33 2c 52 35 2c 23 26 33  46 0d ac 30 13 53 54 52  |3,R5,#&3F..0.STR|
00019d70  42 20 52 33 2c 5b 52 32  5d 2c 52 37 0d ac 3a 21  |B R3,[R2],R7..:!|
00019d80  4d 4f 56 20 52 33 2c 52  35 2c 4c 53 52 20 23 36  |MOV R3,R5,LSR #6|
00019d90  3a 80 20 52 33 2c 52 33  2c 23 26 33 46 0d ac 44  |:. R3,R3,#&3F..D|
00019da0  13 53 54 52 42 20 52 33  2c 5b 52 32 5d 2c 52 37  |.STRB R3,[R2],R7|
00019db0  0d ac 4e 22 4d 4f 56 20  52 33 2c 52 35 2c 4c 53  |..N"MOV R3,R5,LS|
00019dc0  52 20 23 31 32 3a 53 54  52 42 20 52 33 2c 5b 52  |R #12:STRB R3,[R|
00019dd0  32 5d 0d ac 58 12 41 44  44 20 52 31 32 2c 52 31  |2]..X.ADD R12,R1|
00019de0  32 2c 52 31 0d ac 62 05  5d 0d ac 6c 0e e7 64 69  |2,R1..b.]..l..di|
00019df0  74 68 65 72 25 20 8c 0d  ac 76 0a 5b 4f 50 54 20  |ther% ...v.[OPT |
00019e00  5a 0d ac 80 17 41 44 44  20 52 32 2c 52 34 2c 52  |Z....ADD R2,R4,R|
00019e10  34 2c 4c 53 4c 20 23 31  0d ac 8a 28 4c 44 52 20  |4,LSL #1...(LDR |
00019e20  52 33 2c 5b 52 31 31 2c  2d 52 38 5d 3a 41 44 44  |R3,[R11,-R8]:ADD|
00019e30  20 52 33 2c 52 33 2c 52  32 2c 41 53 52 20 23 34  | R3,R3,R2,ASR #4|
00019e40  0d ac 94 14 53 54 52 20  52 33 2c 5b 52 31 31 2c  |....STR R3,[R11,|
00019e50  2d 52 38 5d 0d ac 9e 17  41 44 44 20 52 32 2c 52  |-R8]....ADD R2,R|
00019e60  34 2c 52 34 2c 4c 53 4c  20 23 32 0d ac a8 24 4c  |4,R4,LSL #2...$L|
00019e70  44 52 20 52 33 2c 5b 52  31 31 5d 3a 41 44 44 20  |DR R3,[R11]:ADD |
00019e80  52 33 2c 52 33 2c 52 32  2c 41 53 52 20 23 34 0d  |R3,R3,R2,ASR #4.|
00019e90  ac b2 10 53 54 52 20 52  33 2c 5b 52 31 31 5d 0d  |...STR R3,[R11].|
00019ea0  ac bc 14 4d 4f 56 20 52  33 2c 52 34 2c 41 53 52  |...MOV R3,R4,ASR|
00019eb0  20 23 34 0d ac c6 14 53  54 52 20 52 33 2c 5b 52  | #4....STR R3,[R|
00019ec0  31 31 2c 52 38 5d 21 0d  ac d0 17 52 53 42 20 52  |11,R8]!....RSB R|
00019ed0  32 2c 52 34 2c 52 34 2c  4c 53 4c 20 23 33 0d ac  |2,R4,R4,LSL #3..|
00019ee0  da 13 4c 44 52 20 52 34  2c 5b 52 31 30 5d 2c 52  |..LDR R4,[R10],R|
00019ef0  38 0d ac e4 17 41 44 44  20 52 34 2c 52 34 2c 52  |8....ADD R4,R4,R|
00019f00  32 2c 41 53 52 20 23 34  0d ac ee 05 5d 0d ac f8  |2,ASR #4....]...|
00019f10  05 cc 0d ad 02 0a 5b 4f  50 54 20 5a 0d ad 0c 13  |......[OPT Z....|
00019f20  4c 44 52 20 52 34 2c 5b  52 31 30 5d 2c 52 38 0d  |LDR R4,[R10],R8.|
00019f30  ad 16 05 5d 0d ad 20 05  cd 0d ad 2a 0a 5b 4f 50  |...].. ....*.[OP|
00019f40  54 20 5a 0d ad 34 1c 53  55 42 53 20 52 39 2c 52  |T Z..4.SUBS R9,R|
00019f50  39 2c 23 32 3a 42 4e 45  20 66 73 6c 6f 6f 70 0d  |9,#2:BNE fsloop.|
00019f60  ad 3e 14 4c 44 4d 46 44  20 53 50 20 21 2c 7b 50  |.>.LDMFD SP !,{P|
00019f70  43 7d 5e 0d ad 48 05 5d  0d ad 52 08 c9 22 44 22  |C}^..H.]..R.."D"|
00019f80  0d ad 5c 0a 5b 4f 50 54  20 5a 0d ad 66 14 2e 64  |..\.[OPT Z..f..d|
00019f90  69 76 74 61 62 6c 65 20  45 51 55 44 20 30 0d ad  |ivtable EQUD 0..|
00019fa0  70 1d 45 51 55 44 20 28  31 2d 62 6c 61 63 6b 25  |p.EQUD (1-black%|
00019fb0  2f 32 35 36 2a 32 29 2f  34 2a 46 0d ad 7a 1d 45  |/256*2)/4*F..z.E|
00019fc0  51 55 44 20 28 32 2d 62  6c 61 63 6b 25 2f 32 35  |QUD (2-black%/25|
00019fd0  36 2a 34 29 2f 34 2a 46  0d ad 84 1d 45 51 55 44  |6*4)/4*F....EQUD|
00019fe0  20 28 33 2d 62 6c 61 63  6b 25 2f 32 35 36 2a 32  | (3-black%/256*2|
00019ff0  29 2f 34 2a 46 0d ad 8e  0a 45 51 55 44 20 46 0d  |)/4*F....EQUD F.|
0001a000  ad 98 1f 2e 65 76 65 6e  72 6f 77 5f 67 61 72 64  |....evenrow_gard|
0001a010  20 44 43 44 20 65 76 65  6e 5f 67 61 72 64 0d ad  | DCD even_gard..|
0001a020  a2 1d 2e 6f 64 64 72 6f  77 5f 67 61 72 64 20 44  |...oddrow_gard D|
0001a030  43 44 20 6f 64 64 5f 67  61 72 64 0d ad ac 11 2e  |CD odd_gard.....|
0001a040  72 6f 77 69 6e 63 20 44  43 44 20 30 0d ad b6 08  |rowinc DCD 0....|
0001a050  2e 66 73 25 0d ad c0 14  53 54 4d 46 44 20 53 50  |.fs%....STMFD SP|
0001a060  20 21 2c 7b 52 31 34 7d  0d ad ca 20 4c 44 52 20  | !,{R14}... LDR |
0001a070  52 31 2c 5b 52 39 2c 23  35 2a 38 5d 3a 4c 44 52  |R1,[R9,#5*8]:LDR|
0001a080  20 52 31 2c 5b 52 31 5d  0d ad d4 15 4c 44 52 20  | R1,[R1]....LDR |
0001a090  52 31 30 2c 5b 52 39 2c  23 34 2a 38 5d 0d ad de  |R10,[R9,#4*8]...|
0001a0a0  15 4c 44 52 20 52 31 31  2c 5b 52 39 2c 23 33 2a  |.LDR R11,[R9,#3*|
0001a0b0  38 5d 0d ad e8 15 4c 44  52 20 52 31 32 2c 5b 52  |8]....LDR R12,[R|
0001a0c0  39 2c 23 32 2a 38 5d 0d  ad f2 11 4c 44 52 20 52  |9,#2*8]....LDR R|
0001a0d0  31 32 2c 5b 52 31 32 5d  0d ad fc 12 4c 44 52 20  |12,[R12]....LDR |
0001a0e0  52 38 2c 5b 52 39 2c 23  38 5d 0d ae 06 0f 4c 44  |R8,[R9,#8]....LD|
0001a0f0  52 20 52 38 2c 5b 52 38  5d 0d ae 10 0f 4c 44 52  |R R8,[R8]....LDR|
0001a100  20 52 39 2c 5b 52 39 5d  0d ae 1a 0f 4c 44 52 20  | R9,[R9]....LDR |
0001a110  52 39 2c 5b 52 39 5d 0d  ae 24 13 4c 44 52 20 52  |R9,[R9]..$.LDR R|
0001a120  34 2c 5b 52 31 30 5d 2c  52 38 0d ae 2e 0d 54 45  |4,[R10],R8....TE|
0001a130  51 20 52 38 2c 23 30 0d  ae 38 19 4c 44 52 50 4c  |Q R8,#0..8.LDRPL|
0001a140  20 52 36 2c 65 76 65 6e  72 6f 77 5f 67 61 72 64  | R6,evenrow_gard|
0001a150  0d ae 42 18 4c 44 52 4d  49 20 52 36 2c 6f 64 64  |..B.LDRMI R6,odd|
0001a160  72 6f 77 5f 67 61 72 64  0d ae 4c 14 4d 4f 56 20  |row_gard..L.MOV |
0001a170  52 31 2c 52 31 2c 4c 53  4c 20 23 31 0d ae 56 11  |R1,R1,LSL #1..V.|
0001a180  4c 44 52 20 52 37 2c 72  6f 77 69 6e 63 0d ae 60  |LDR R7,rowinc..`|
0001a190  14 41 44 52 20 52 31 34  2c 64 69 76 74 61 62 6c  |.ADR R14,divtabl|
0001a1a0  65 0d ae 6a 0b 2e 66 73  6c 6f 6f 70 0d ae 74 2f  |e..j..fsloop..t/|
0001a1b0  54 45 51 20 52 34 2c 23  30 3a 4d 4f 56 4d 49 20  |TEQ R4,#0:MOVMI |
0001a1c0  52 34 2c 23 30 3a 43 4d  50 20 52 34 2c 23 46 3a  |R4,#0:CMP R4,#F:|
0001a1d0  4d 4f 56 43 53 20 52 34  2c 23 46 0d ae 7e 13 41  |MOVCS R4,#F..~.A|
0001a1e0  44 44 20 52 35 2c 52 34  2c 23 46 3e 3e 33 0d ae  |DD R5,R4,#F>>3..|
0001a1f0  88 1a 4d 4f 56 53 20 52  35 2c 52 35 2c 4c 53 52  |..MOVS R5,R5,LSR|
0001a200  20 23 62 69 74 73 2d 32  0d ae 92 1c 4c 44 52 4e  | #bits-2....LDRN|
0001a210  45 20 52 30 2c 5b 52 31  34 2c 52 35 2c 4c 53 4c  |E R0,[R14,R5,LSL|
0001a220  20 23 32 5d 0d ae 9c 12  53 55 42 4e 45 20 52 34  | #2]....SUBNE R4|
0001a230  2c 52 34 2c 52 30 0d ae  a6 05 5d 0d ae b0 0e e7  |,R4,R0....].....|
0001a240  64 69 74 68 65 72 25 20  8c 0d ae ba 0a 5b 4f 50  |dither% .....[OP|
0001a250  54 20 5a 0d ae c4 17 41  44 44 20 52 32 2c 52 34  |T Z....ADD R2,R4|
0001a260  2c 52 34 2c 4c 53 4c 20  23 31 0d ae ce 28 4c 44  |,R4,LSL #1...(LD|
0001a270  52 20 52 33 2c 5b 52 31  31 2c 2d 52 38 5d 3a 41  |R R3,[R11,-R8]:A|
0001a280  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
0001a290  23 34 0d ae d8 14 53 54  52 20 52 33 2c 5b 52 31  |#4....STR R3,[R1|
0001a2a0  31 2c 2d 52 38 5d 0d ae  e2 17 41 44 44 20 52 32  |1,-R8]....ADD R2|
0001a2b0  2c 52 34 2c 52 34 2c 4c  53 4c 20 23 32 0d ae ec  |,R4,R4,LSL #2...|
0001a2c0  24 4c 44 52 20 52 33 2c  5b 52 31 31 5d 3a 41 44  |$LDR R3,[R11]:AD|
0001a2d0  44 20 52 33 2c 52 33 2c  52 32 2c 41 53 52 20 23  |D R3,R3,R2,ASR #|
0001a2e0  34 0d ae f6 10 53 54 52  20 52 33 2c 5b 52 31 31  |4....STR R3,[R11|
0001a2f0  5d 0d af 00 14 4d 4f 56  20 52 33 2c 52 34 2c 41  |]....MOV R3,R4,A|
0001a300  53 52 20 23 34 0d af 0a  14 53 54 52 20 52 33 2c  |SR #4....STR R3,|
0001a310  5b 52 31 31 2c 52 38 5d  21 0d af 14 17 52 53 42  |[R11,R8]!....RSB|
0001a320  20 52 32 2c 52 34 2c 52  34 2c 4c 53 4c 20 23 33  | R2,R4,R4,LSL #3|
0001a330  0d af 1e 13 4c 44 52 20  52 34 2c 5b 52 31 30 5d  |....LDR R4,[R10]|
0001a340  2c 52 38 0d af 28 18 41  44 44 53 20 52 34 2c 52  |,R8..(.ADDS R4,R|
0001a350  34 2c 52 32 2c 41 53 52  20 23 34 0d af 32 05 5d  |4,R2,ASR #4..2.]|
0001a360  0d af 3c 05 cc 0d af 46  0a 5b 4f 50 54 20 5a 0d  |..<....F.[OPT Z.|
0001a370  af 50 13 4c 44 52 20 52  34 2c 5b 52 31 30 5d 2c  |.P.LDR R4,[R10],|
0001a380  52 38 0d af 5a 05 5d 0d  af 64 05 cd 0d af 6e 0a  |R8..Z.]..d....n.|
0001a390  5b 4f 50 54 20 5a 0d af  78 25 4d 4f 56 4d 49 20  |[OPT Z..x%MOVMI |
0001a3a0  52 34 2c 23 30 3a 43 4d  50 20 52 34 2c 23 46 3a  |R4,#0:CMP R4,#F:|
0001a3b0  4d 4f 56 43 53 20 52 34  2c 23 46 0d af 82 13 41  |MOVCS R4,#F....A|
0001a3c0  44 44 20 52 33 2c 52 34  2c 23 46 3e 3e 33 0d af  |DD R3,R4,#F>>3..|
0001a3d0  8c 1a 4d 4f 56 53 20 52  33 2c 52 33 2c 4c 53 52  |..MOVS R3,R3,LSR|
0001a3e0  20 23 62 69 74 73 2d 32  0d af 96 1c 4c 44 52 4e  | #bits-2....LDRN|
0001a3f0  45 20 52 30 2c 5b 52 31  34 2c 52 33 2c 4c 53 4c  |E R0,[R14,R3,LSL|
0001a400  20 23 32 5d 0d af a0 12  53 55 42 4e 45 20 52 34  | #2]....SUBNE R4|
0001a410  2c 52 34 2c 52 30 0d af  aa 26 84 52 20 52 35 2c  |,R4,R0...&.R R5,|
0001a420  52 35 2c 52 33 2c 4c 53  4c 20 23 33 3a 4c 44 52  |R5,R3,LSL #3:LDR|
0001a430  42 20 52 35 2c 5b 52 36  2c 52 35 5d 0d af b4 15  |B R5,[R6,R5]....|
0001a440  4d 4f 56 20 52 32 2c 52  31 32 2c 4c 53 52 20 23  |MOV R2,R12,LSR #|
0001a450  32 0d af be 0e 54 53 54  20 52 31 32 2c 23 32 0d  |2....TST R12,#2.|
0001a460  af c8 1c 80 20 52 33 2c  52 35 2c 23 26 46 3a 4c  |.... R3,R5,#&F:L|
0001a470  44 52 42 20 52 30 2c 5b  52 32 5d 0d af d2 20 80  |DRB R0,[R2]... .|
0001a480  45 51 20 52 30 2c 52 30  2c 23 26 46 30 3a 84 52  |EQ R0,R0,#&F0:.R|
0001a490  45 51 20 52 30 2c 52 30  2c 52 33 0d af dc 27 80  |EQ R0,R0,R3...'.|
0001a4a0  4e 45 20 52 30 2c 52 30  2c 23 26 30 46 3a 84 52  |NE R0,R0,#&0F:.R|
0001a4b0  4e 45 20 52 30 2c 52 30  2c 52 33 2c 4c 53 4c 20  |NE R0,R0,R3,LSL |
0001a4c0  23 34 0d af e6 13 53 54  52 42 20 52 30 2c 5b 52  |#4....STRB R0,[R|
0001a4d0  32 5d 2c 52 37 0d af f0  21 4d 4f 56 20 52 33 2c  |2],R7...!MOV R3,|
0001a4e0  52 35 2c 4c 53 52 20 23  34 3a 4c 44 52 42 20 52  |R5,LSR #4:LDRB R|
0001a4f0  30 2c 5b 52 32 5d 0d af  fa 20 80 45 51 20 52 30  |0,[R2]... .EQ R0|
0001a500  2c 52 30 2c 23 26 46 30  3a 84 52 45 51 20 52 30  |,R0,#&F0:.REQ R0|
0001a510  2c 52 30 2c 52 33 0d b0  04 27 80 4e 45 20 52 30  |,R0,R3...'.NE R0|
0001a520  2c 52 30 2c 23 26 30 46  3a 84 52 4e 45 20 52 30  |,R0,#&0F:.RNE R0|
0001a530  2c 52 30 2c 52 33 2c 4c  53 4c 20 23 34 0d b0 0e  |,R0,R3,LSL #4...|
0001a540  10 53 54 52 42 20 52 30  2c 5b 52 32 5d 0d b0 18  |.STRB R0,[R2]...|
0001a550  12 41 44 44 20 52 31 32  2c 52 31 32 2c 52 31 0d  |.ADD R12,R12,R1.|
0001a560  b0 22 05 5d 0d b0 2c 0e  e7 64 69 74 68 65 72 25  |.".]..,..dither%|
0001a570  20 8c 0d b0 36 0a 5b 4f  50 54 20 5a 0d b0 40 17  | ...6.[OPT Z..@.|
0001a580  41 44 44 20 52 32 2c 52  34 2c 52 34 2c 4c 53 4c  |ADD R2,R4,R4,LSL|
0001a590  20 23 31 0d b0 4a 28 4c  44 52 20 52 33 2c 5b 52  | #1..J(LDR R3,[R|
0001a5a0  31 31 2c 2d 52 38 5d 3a  41 44 44 20 52 33 2c 52  |11,-R8]:ADD R3,R|
0001a5b0  33 2c 52 32 2c 41 53 52  20 23 34 0d b0 54 14 53  |3,R2,ASR #4..T.S|
0001a5c0  54 52 20 52 33 2c 5b 52  31 31 2c 2d 52 38 5d 0d  |TR R3,[R11,-R8].|
0001a5d0  b0 5e 17 41 44 44 20 52  32 2c 52 34 2c 52 34 2c  |.^.ADD R2,R4,R4,|
0001a5e0  4c 53 4c 20 23 32 0d b0  68 24 4c 44 52 20 52 33  |LSL #2..h$LDR R3|
0001a5f0  2c 5b 52 31 31 5d 3a 41  44 44 20 52 33 2c 52 33  |,[R11]:ADD R3,R3|
0001a600  2c 52 32 2c 41 53 52 20  23 34 0d b0 72 10 53 54  |,R2,ASR #4..r.ST|
0001a610  52 20 52 33 2c 5b 52 31  31 5d 0d b0 7c 14 4d 4f  |R R3,[R11]..|.MO|
0001a620  56 20 52 33 2c 52 34 2c  41 53 52 20 23 34 0d b0  |V R3,R4,ASR #4..|
0001a630  86 14 53 54 52 20 52 33  2c 5b 52 31 31 2c 52 38  |..STR R3,[R11,R8|
0001a640  5d 21 0d b0 90 17 52 53  42 20 52 32 2c 52 34 2c  |]!....RSB R2,R4,|
0001a650  52 34 2c 4c 53 4c 20 23  33 0d b0 9a 13 4c 44 52  |R4,LSL #3....LDR|
0001a660  20 52 34 2c 5b 52 31 30  5d 2c 52 38 0d b0 a4 17  | R4,[R10],R8....|
0001a670  41 44 44 20 52 34 2c 52  34 2c 52 32 2c 41 53 52  |ADD R4,R4,R2,ASR|
0001a680  20 23 34 0d b0 ae 05 5d  0d b0 b8 05 cc 0d b0 c2  | #4....]........|
0001a690  0a 5b 4f 50 54 20 5a 0d  b0 cc 13 4c 44 52 20 52  |.[OPT Z....LDR R|
0001a6a0  34 2c 5b 52 31 30 5d 2c  52 38 0d b0 d6 05 5d 0d  |4,[R10],R8....].|
0001a6b0  b0 e0 05 cd 0d b0 ea 0a  5b 4f 50 54 20 5a 0d b0  |........[OPT Z..|
0001a6c0  f4 1c 53 55 42 53 20 52  39 2c 52 39 2c 23 32 3a  |..SUBS R9,R9,#2:|
0001a6d0  42 4e 45 20 66 73 6c 6f  6f 70 0d b0 fe 14 4c 44  |BNE fsloop....LD|
0001a6e0  4d 46 44 20 53 50 20 21  2c 7b 50 43 7d 5e 0d b1  |MFD SP !,{PC}^..|
0001a6f0  08 05 5d 0d b1 12 05 7f  0d b1 1c 0a 5b 4f 50 54  |..].........[OPT|
0001a700  20 5a 0d b1 26 08 2e 66  73 25 0d b1 30 14 53 54  | Z..&..fs%..0.ST|
0001a710  4d 46 44 20 53 50 20 21  2c 7b 52 31 34 7d 0d b1  |MFD SP !,{R14}..|
0001a720  3a 20 4c 44 52 20 52 31  2c 5b 52 39 2c 23 35 2a  |: LDR R1,[R9,#5*|
0001a730  38 5d 3a 4c 44 52 20 52  31 2c 5b 52 31 5d 0d b1  |8]:LDR R1,[R1]..|
0001a740  44 15 4c 44 52 20 52 31  30 2c 5b 52 39 2c 23 34  |D.LDR R10,[R9,#4|
0001a750  2a 38 5d 0d b1 4e 15 4c  44 52 20 52 31 31 2c 5b  |*8]..N.LDR R11,[|
0001a760  52 39 2c 23 33 2a 38 5d  0d b1 58 15 4c 44 52 20  |R9,#3*8]..X.LDR |
0001a770  52 31 32 2c 5b 52 39 2c  23 32 2a 38 5d 0d b1 62  |R12,[R9,#2*8]..b|
0001a780  11 4c 44 52 20 52 31 32  2c 5b 52 31 32 5d 0d b1  |.LDR R12,[R12]..|
0001a790  6c 12 4c 44 52 20 52 38  2c 5b 52 39 2c 23 38 5d  |l.LDR R8,[R9,#8]|
0001a7a0  0d b1 76 0f 4c 44 52 20  52 38 2c 5b 52 38 5d 0d  |..v.LDR R8,[R8].|
0001a7b0  b1 80 0f 4c 44 52 20 52  39 2c 5b 52 39 5d 0d b1  |...LDR R9,[R9]..|
0001a7c0  8a 0f 4c 44 52 20 52 39  2c 5b 52 39 5d 0d b1 94  |..LDR R9,[R9]...|
0001a7d0  13 4c 44 52 20 52 34 2c  5b 52 31 30 5d 2c 52 38  |.LDR R4,[R10],R8|
0001a7e0  0d b1 9e 0d 4d 4f 56 20  52 37 2c 23 31 0d b1 a8  |....MOV R7,#1...|
0001a7f0  0b 2e 66 73 6c 6f 6f 70  0d b1 b2 2f 54 45 51 20  |..fsloop.../TEQ |
0001a800  52 34 2c 23 30 3a 4d 4f  56 4d 49 20 52 34 2c 23  |R4,#0:MOVMI R4,#|
0001a810  30 3a 43 4d 50 20 52 34  2c 23 46 3a 4d 4f 56 43  |0:CMP R4,#F:MOVC|
0001a820  53 20 52 34 2c 23 46 0d  b1 bc 05 5d 0d b1 c6 0d  |S R4,#F....]....|
0001a830  e7 62 6c 61 63 6b 25 20  8c 0d b1 d0 0a 5b 4f 50  |.black% .....[OP|
0001a840  54 20 5a 0d b1 da 15 4d  4f 56 20 52 32 2c 52 31  |T Z....MOV R2,R1|
0001a850  32 2c 4c 53 52 20 23 33  0d b1 e4 2a 80 20 52 35  |2,LSR #3...*. R5|
0001a860  2c 52 31 32 2c 23 37 3a  4d 4f 56 20 52 36 2c 23  |,R12,#7:MOV R6,#|
0001a870  31 3a 4d 4f 56 20 52 36  2c 52 36 2c 4c 53 4c 20  |1:MOV R6,R6,LSL |
0001a880  52 35 0d b1 ee 1c 4c 44  52 42 20 52 30 2c 5b 52  |R5....LDRB R0,[R|
0001a890  32 2c 23 2d 28 78 25 2b  37 3e 3e 33 29 5d 0d b1  |2,#-(x%+7>>3)]..|
0001a8a0  f8 10 53 55 42 20 52 33  2c 52 34 2c 23 46 0d b2  |..SUB R3,R4,#F..|
0001a8b0  02 0d 43 4d 50 20 52 37  2c 23 30 0d b2 0c 21 41  |..CMP R7,#0...!A|
0001a8c0  44 44 4e 45 20 52 34 2c  52 34 2c 23 62 6c 61 63  |DDNE R4,R4,#blac|
0001a8d0  6b 25 3c 3c 28 62 69 74  73 2d 38 29 0d b2 16 21  |k%<<(bits-8)...!|
0001a8e0  41 44 44 45 51 20 52 33  2c 52 33 2c 23 62 6c 61  |ADDEQ R3,R3,#bla|
0001a8f0  63 6b 25 3c 3c 28 62 69  74 73 2d 38 29 0d b2 20  |ck%<<(bits-8).. |
0001a900  0d 54 53 54 20 52 30 2c  52 36 0d b2 2a 21 41 44  |.TST R0,R6..*!AD|
0001a910  44 4e 45 20 52 34 2c 52  34 2c 23 62 6c 61 63 6b  |DNE R4,R4,#black|
0001a920  25 3c 3c 28 62 69 74 73  2d 38 29 0d b2 34 21 41  |%<<(bits-8)..4!A|
0001a930  44 44 45 51 20 52 33 2c  52 33 2c 23 62 6c 61 63  |DDEQ R3,R3,#blac|
0001a940  6b 25 3c 3c 28 62 69 74  73 2d 38 29 0d b2 3e 1d  |k%<<(bits-8)..>.|
0001a950  4d 4f 56 53 20 52 30 2c  52 33 3a 52 53 42 4d 49  |MOVS R0,R3:RSBMI|
0001a960  20 52 30 2c 52 33 2c 23  30 0d b2 48 0d 43 4d 50  | R0,R3,#0..H.CMP|
0001a970  20 52 34 2c 52 30 0d b2  52 0f 4d 4f 56 43 43 20  | R4,R0..R.MOVCC |
0001a980  52 33 2c 23 30 0d b2 5c  1b 4d 4f 56 43 53 20 52  |R3,#0..\.MOVCS R|
0001a990  34 2c 52 33 3a 4d 4f 56  43 53 20 52 33 2c 23 31  |4,R3:MOVCS R3,#1|
0001a9a0  0d b2 66 0d 4d 4f 56 20  52 37 2c 52 33 0d b2 70  |..f.MOV R7,R3..p|
0001a9b0  05 5d 0d b2 7a 05 cc 0d  b2 84 0a 5b 4f 50 54 20  |.]..z......[OPT |
0001a9c0  5a 0d b2 8e 27 41 44 44  20 52 33 2c 52 34 2c 23  |Z...'ADD R3,R4,#|
0001a9d0  46 3e 3e 31 3a 4d 4f 56  20 52 33 2c 52 33 2c 4c  |F>>1:MOV R3,R3,L|
0001a9e0  53 52 20 23 62 69 74 73  0d b2 98 1a 53 55 42 20  |SR #bits....SUB |
0001a9f0  52 34 2c 52 34 2c 52 33  2c 4c 53 4c 20 23 62 69  |R4,R4,R3,LSL #bi|
0001aa00  74 73 0d b2 a2 15 4d 4f  56 20 52 32 2c 52 31 32  |ts....MOV R2,R12|
0001aa10  2c 4c 53 52 20 23 33 0d  b2 ac 2a 80 20 52 35 2c  |,LSR #3...*. R5,|
0001aa20  52 31 32 2c 23 37 3a 4d  4f 56 20 52 36 2c 23 31  |R12,#7:MOV R6,#1|
0001aa30  3a 4d 4f 56 20 52 36 2c  52 36 2c 4c 53 4c 20 52  |:MOV R6,R6,LSL R|
0001aa40  35 0d b2 b6 05 5d 0d b2  c0 05 cd 0d b2 ca 0a 5b  |5....].........[|
0001aa50  4f 50 54 20 5a 0d b2 d4  30 4c 44 52 42 20 52 30  |OPT Z...0LDRB R0|
0001aa60  2c 5b 52 32 5d 3a 42 49  43 20 52 30 2c 52 30 2c  |,[R2]:BIC R0,R0,|
0001aa70  52 36 3a 84 52 20 52 30  2c 52 30 2c 52 33 2c 4c  |R6:.R R0,R0,R3,L|
0001aa80  53 4c 20 52 35 0d b2 de  10 53 54 52 42 20 52 30  |SL R5....STRB R0|
0001aa90  2c 5b 52 32 5d 0d b2 e8  12 41 44 44 20 52 31 32  |,[R2]....ADD R12|
0001aaa0  2c 52 31 32 2c 52 31 0d  b2 f2 05 5d 0d b2 fc 0e  |,R12,R1....]....|
0001aab0  e7 64 69 74 68 65 72 25  20 8c 0d b3 06 0a 5b 4f  |.dither% .....[O|
0001aac0  50 54 20 5a 0d b3 10 17  41 44 44 20 52 32 2c 52  |PT Z....ADD R2,R|
0001aad0  34 2c 52 34 2c 4c 53 4c  20 23 31 0d b3 1a 28 4c  |4,R4,LSL #1...(L|
0001aae0  44 52 20 52 33 2c 5b 52  31 31 2c 2d 52 38 5d 3a  |DR R3,[R11,-R8]:|
0001aaf0  41 44 44 20 52 33 2c 52  33 2c 52 32 2c 41 53 52  |ADD R3,R3,R2,ASR|
0001ab00  20 23 34 0d b3 24 14 53  54 52 20 52 33 2c 5b 52  | #4..$.STR R3,[R|
0001ab10  31 31 2c 2d 52 38 5d 0d  b3 2e 17 41 44 44 20 52  |11,-R8]....ADD R|
0001ab20  32 2c 52 34 2c 52 34 2c  4c 53 4c 20 23 32 0d b3  |2,R4,R4,LSL #2..|
0001ab30  38 24 4c 44 52 20 52 33  2c 5b 52 31 31 5d 3a 41  |8$LDR R3,[R11]:A|
0001ab40  44 44 20 52 33 2c 52 33  2c 52 32 2c 41 53 52 20  |DD R3,R3,R2,ASR |
0001ab50  23 34 0d b3 42 10 53 54  52 20 52 33 2c 5b 52 31  |#4..B.STR R3,[R1|
0001ab60  31 5d 0d b3 4c 14 4d 4f  56 20 52 33 2c 52 34 2c  |1]..L.MOV R3,R4,|
0001ab70  41 53 52 20 23 34 0d b3  56 14 53 54 52 20 52 33  |ASR #4..V.STR R3|
0001ab80  2c 5b 52 31 31 2c 52 38  5d 21 0d b3 60 17 52 53  |,[R11,R8]!..`.RS|
0001ab90  42 20 52 32 2c 52 34 2c  52 34 2c 4c 53 4c 20 23  |B R2,R4,R4,LSL #|
0001aba0  33 0d b3 6a 13 4c 44 52  20 52 34 2c 5b 52 31 30  |3..j.LDR R4,[R10|
0001abb0  5d 2c 52 38 0d b3 74 17  41 44 44 20 52 34 2c 52  |],R8..t.ADD R4,R|
0001abc0  34 2c 52 32 2c 41 53 52  20 23 34 0d b3 7e 05 5d  |4,R2,ASR #4..~.]|
0001abd0  0d b3 88 05 cc 0d b3 92  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
0001abe0  b3 9c 13 4c 44 52 20 52  34 2c 5b 52 31 30 5d 2c  |...LDR R4,[R10],|
0001abf0  52 38 0d b3 a6 05 5d 0d  b3 b0 05 cd 0d b3 ba 0a  |R8....].........|
0001ac00  5b 4f 50 54 20 5a 0d b3  c4 1c 53 55 42 53 20 52  |[OPT Z....SUBS R|
0001ac10  39 2c 52 39 2c 23 31 3a  42 4e 45 20 66 73 6c 6f  |9,R9,#1:BNE fslo|
0001ac20  6f 70 0d b3 ce 14 4c 44  4d 46 44 20 53 50 20 21  |op....LDMFD SP !|
0001ac30  2c 7b 50 43 7d 5e 0d b3  d8 05 5d 0d b3 e2 05 cb  |,{PC}^....].....|
0001ac40  0d b3 ec 05 cb 0d b3 f6  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
0001ac50  b4 00 12 2e 73 78 6c 6f  63 20 44 43 44 20 73 78  |....sxloc DCD sx|
0001ac60  25 0d b4 0a 05 5d 0d b4  14 0c c8 8e 20 63 6f 6c  |%....]...... col|
0001ac70  20 ca 0d b4 1e 07 c9 20  30 0d b4 28 0f e7 69 6e  | ...... 0..(..in|
0001ac80  70 75 74 3c 3d 38 20 8c  0d b4 32 0a 5b 4f 50 54  |put<=8 ...2.[OPT|
0001ac90  20 5a 0d b4 3c 0c 2e 6d  61 70 70 69 78 25 0d b4  | Z..<..mappix%..|
0001aca0  46 10 4c 44 52 20 52 30  2c 73 78 6c 6f 63 0d b4  |F.LDR R0,sxloc..|
0001acb0  50 1b 4c 44 52 20 52 31  2c 5b 52 39 5d 3a 4c 44  |P.LDR R1,[R9]:LD|
0001acc0  52 20 52 31 2c 5b 52 31  5d 0d b4 5a 14 4c 44 52  |R R1,[R1]..Z.LDR|
0001acd0  20 52 32 2c 5b 52 39 2c  23 33 2a 38 5d 0d b4 64  | R2,[R9,#3*8]..d|
0001ace0  14 4c 44 52 20 52 35 2c  5b 52 39 2c 23 34 2a 38  |.LDR R5,[R9,#4*8|
0001acf0  5d 0d b4 6e 0d 2e 6d 61  70 70 69 78 6c 70 0d b4  |]..n..mappixlp..|
0001ad00  78 18 4c 44 52 42 20 52  36 2c 5b 52 31 5d 2c 23  |x.LDRB R6,[R1],#|
0001ad10  73 74 65 70 32 34 0d b4  82 05 5d 0d b4 8c 05 cd  |step24....].....|
0001ad20  0d b4 96 0e c8 8e 20 69  6e 70 75 74 20 ca 0d b4  |...... input ...|
0001ad30  a0 07 c9 20 38 0d b4 aa  0a 5b 4f 50 54 20 5a 0d  |... 8....[OPT Z.|
0001ad40  b4 b4 28 4c 44 52 20 52  37 2c 5b 52 32 2c 52 36  |..(LDR R7,[R2,R6|
0001ad50  2c 4c 53 4c 20 23 32 5d  3a 53 54 52 20 52 37 2c  |,LSL #2]:STR R7,|
0001ad60  5b 52 35 5d 2c 23 34 0d  b4 be 1e 53 55 42 53 20  |[R5],#4....SUBS |
0001ad70  52 30 2c 52 30 2c 23 31  3a 42 4e 45 20 6d 61 70  |R0,R0,#1:BNE map|
0001ad80  70 69 78 6c 70 0d b4 c8  0f 4d 4f 56 53 20 50 43  |pixlp....MOVS PC|
0001ad90  2c 52 31 34 0d b4 d2 05  5d 0d b4 dc 07 c9 20 34  |,R14....]..... 4|
0001ada0  0d b4 e6 14 e7 62 69 67  65 6e 64 69 61 6e 62 69  |.....bigendianbi|
0001adb0  74 73 20 8c 0d b4 f0 0a  5b 4f 50 54 20 5a 0d b4  |ts .....[OPT Z..|
0001adc0  fa 15 4d 4f 56 20 52 31  30 2c 52 36 2c 4c 53 52  |..MOV R10,R6,LSR|
0001add0  20 23 34 0d b5 04 1a 4c  44 52 20 52 37 2c 5b 52  | #4....LDR R7,[R|
0001ade0  32 2c 52 31 30 2c 4c 53  4c 20 23 32 5d 0d b5 0e  |2,R10,LSL #2]...|
0001adf0  10 80 20 52 31 30 2c 52  36 2c 23 26 46 0d b5 18  |.. R10,R6,#&F...|
0001ae00  05 5d 0d b5 22 05 cc 0d  b5 2c 0a 5b 4f 50 54 20  |.].."....,.[OPT |
0001ae10  5a 0d b5 36 10 80 20 52  31 30 2c 52 36 2c 23 26  |Z..6.. R10,R6,#&|
0001ae20  46 0d b5 40 1a 4c 44 52  20 52 37 2c 5b 52 32 2c  |F..@.LDR R7,[R2,|
0001ae30  52 31 30 2c 4c 53 4c 20  23 32 5d 0d b5 4a 15 4d  |R10,LSL #2]..J.M|
0001ae40  4f 56 20 52 31 30 2c 52  36 2c 4c 53 52 20 23 34  |OV R10,R6,LSR #4|
0001ae50  0d b5 54 05 5d 0d b5 5e  05 cd 0d b5 68 0a 5b 4f  |..T.]..^....h.[O|
0001ae60  50 54 20 5a 0d b5 72 2c  4c 44 52 20 52 38 2c 5b  |PT Z..r,LDR R8,[|
0001ae70  52 32 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 3a 53  |R2,R10,LSL #2]:S|
0001ae80  54 4d 49 41 20 52 35 21  2c 7b 52 37 2c 52 38 7d  |TMIA R5!,{R7,R8}|
0001ae90  0d b5 7c 1e 53 55 42 53  20 52 30 2c 52 30 2c 23  |..|.SUBS R0,R0,#|
0001aea0  32 3a 42 48 49 20 6d 61  70 70 69 78 6c 70 0d b5  |2:BHI mappixlp..|
0001aeb0  86 0f 4d 4f 56 53 20 50  43 2c 52 31 34 0d b5 90  |..MOVS PC,R14...|
0001aec0  05 5d 0d b5 9a 07 c9 20  32 0d b5 a4 14 e7 62 69  |.]..... 2.....bi|
0001aed0  67 65 6e 64 69 61 6e 62  69 74 73 20 8c 0d b5 ae  |gendianbits ....|
0001aee0  0a 5b 4f 50 54 20 5a 0d  b5 b8 15 4d 4f 56 20 52  |.[OPT Z....MOV R|
0001aef0  31 30 2c 52 36 2c 4c 53  52 20 23 36 0d b5 c2 1a  |10,R6,LSR #6....|
0001af00  4c 44 52 20 52 37 2c 5b  52 32 2c 52 31 30 2c 4c  |LDR R7,[R2,R10,L|
0001af10  53 4c 20 23 32 5d 0d b5  cc 11 80 20 52 31 30 2c  |SL #2]..... R10,|
0001af20  52 36 2c 23 26 33 30 0d  b5 d6 1a 4c 44 52 20 52  |R6,#&30....LDR R|
0001af30  38 2c 5b 52 32 2c 52 31  30 2c 4c 53 52 20 23 32  |8,[R2,R10,LSR #2|
0001af40  5d 0d b5 e0 10 80 20 52  31 30 2c 52 36 2c 23 26  |]..... R10,R6,#&|
0001af50  43 0d b5 ea 13 4c 44 52  20 52 39 2c 5b 52 32 2c  |C....LDR R9,[R2,|
0001af60  52 31 30 5d 0d b5 f4 10  80 20 52 31 30 2c 52 36  |R10]..... R10,R6|
0001af70  2c 23 26 33 0d b5 fe 05  5d 0d b6 08 05 cc 0d b6  |,#&3....].......|
0001af80  12 0a 5b 4f 50 54 20 5a  0d b6 1c 10 80 20 52 31  |..[OPT Z..... R1|
0001af90  30 2c 52 36 2c 23 26 33  0d b6 26 1a 4c 44 52 20  |0,R6,#&3..&.LDR |
0001afa0  52 37 2c 5b 52 32 2c 52  31 30 2c 4c 53 4c 20 23  |R7,[R2,R10,LSL #|
0001afb0  32 5d 0d b6 30 10 80 20  52 31 30 2c 52 36 2c 23  |2]..0.. R10,R6,#|
0001afc0  26 43 0d b6 3a 13 4c 44  52 20 52 38 2c 5b 52 32  |&C..:.LDR R8,[R2|
0001afd0  2c 52 31 30 5d 0d b6 44  11 80 20 52 31 30 2c 52  |,R10]..D.. R10,R|
0001afe0  36 2c 23 26 33 30 0d b6  4e 1a 4c 44 52 20 52 39  |6,#&30..N.LDR R9|
0001aff0  2c 5b 52 32 2c 52 31 30  2c 4c 53 52 20 23 32 5d  |,[R2,R10,LSR #2]|
0001b000  0d b6 58 15 4d 4f 56 20  52 31 30 2c 52 36 2c 4c  |..X.MOV R10,R6,L|
0001b010  53 52 20 23 36 0d b6 62  05 5d 0d b6 6c 05 cd 0d  |SR #6..b.]..l...|
0001b020  b6 76 0a 5b 4f 50 54 20  5a 0d b6 80 34 4c 44 52  |.v.[OPT Z...4LDR|
0001b030  20 52 31 30 2c 5b 52 32  2c 52 31 30 2c 4c 53 4c  | R10,[R2,R10,LSL|
0001b040  20 23 32 5d 3a 53 54 4d  49 41 20 52 35 21 2c 7b  | #2]:STMIA R5!,{|
0001b050  52 37 2c 52 38 2c 52 39  2c 52 31 30 7d 0d b6 8a  |R7,R8,R9,R10}...|
0001b060  1e 53 55 42 53 20 52 30  2c 52 30 2c 23 34 3a 42  |.SUBS R0,R0,#4:B|
0001b070  48 49 20 6d 61 70 70 69  78 6c 70 0d b6 94 0f 4d  |HI mappixlp....M|
0001b080  4f 56 53 20 50 43 2c 52  31 34 0d b6 9e 05 5d 0d  |OVS PC,R14....].|
0001b090  b6 a8 07 c9 20 31 0d b6  b2 14 e7 62 69 67 65 6e  |.... 1.....bigen|
0001b0a0  64 69 61 6e 62 69 74 73  20 8c 0d b6 bc 0a 5b 4f  |dianbits .....[O|
0001b0b0  50 54 20 5a 0d b6 c6 11  80 20 52 31 30 2c 52 36  |PT Z..... R10,R6|
0001b0c0  2c 23 26 38 30 0d b6 d0  1a 4c 44 52 20 52 37 2c  |,#&80....LDR R7,|
0001b0d0  5b 52 32 2c 52 31 30 2c  4c 53 52 20 23 35 5d 0d  |[R2,R10,LSR #5].|
0001b0e0  b6 da 11 80 20 52 31 30  2c 52 36 2c 23 26 34 30  |.... R10,R6,#&40|
0001b0f0  0d b6 e4 1a 4c 44 52 20  52 38 2c 5b 52 32 2c 52  |....LDR R8,[R2,R|
0001b100  31 30 2c 4c 53 52 20 23  34 5d 0d b6 ee 11 80 20  |10,LSR #4]..... |
0001b110  52 31 30 2c 52 36 2c 23  26 32 30 0d b6 f8 1a 4c  |R10,R6,#&20....L|
0001b120  44 52 20 52 39 2c 5b 52  32 2c 52 31 30 2c 4c 53  |DR R9,[R2,R10,LS|
0001b130  52 20 23 33 5d 0d b7 02  11 80 20 52 31 30 2c 52  |R #3]..... R10,R|
0001b140  36 2c 23 26 31 30 0d b7  0c 34 4c 44 52 20 52 31  |6,#&10...4LDR R1|
0001b150  30 2c 5b 52 32 2c 52 31  30 2c 4c 53 52 20 23 32  |0,[R2,R10,LSR #2|
0001b160  5d 3a 53 54 4d 49 41 20  52 35 21 2c 7b 52 37 2c  |]:STMIA R5!,{R7,|
0001b170  52 38 2c 52 39 2c 52 31  30 7d 0d b7 16 10 80 20  |R8,R9,R10}..... |
0001b180  52 31 30 2c 52 36 2c 23  26 38 0d b7 20 1a 4c 44  |R10,R6,#&8.. .LD|
0001b190  52 20 52 37 2c 5b 52 32  2c 52 31 30 2c 4c 53 52  |R R7,[R2,R10,LSR|
0001b1a0  20 23 31 5d 0d b7 2a 10  80 20 52 31 30 2c 52 36  | #1]..*.. R10,R6|
0001b1b0  2c 23 26 34 0d b7 34 13  4c 44 52 20 52 38 2c 5b  |,#&4..4.LDR R8,[|
0001b1c0  52 32 2c 52 31 30 5d 0d  b7 3e 10 80 20 52 31 30  |R2,R10]..>.. R10|
0001b1d0  2c 52 36 2c 23 26 32 0d  b7 48 1a 4c 44 52 20 52  |,R6,#&2..H.LDR R|
0001b1e0  39 2c 5b 52 32 2c 52 31  30 2c 4c 53 4c 20 23 31  |9,[R2,R10,LSL #1|
0001b1f0  5d 0d b7 52 10 80 20 52  31 30 2c 52 36 2c 23 26  |]..R.. R10,R6,#&|
0001b200  31 0d b7 5c 05 5d 0d b7  66 05 cc 0d b7 70 0a 5b  |1..\.]..f....p.[|
0001b210  4f 50 54 20 5a 0d b7 7a  10 80 20 52 31 30 2c 52  |OPT Z..z.. R10,R|
0001b220  36 2c 23 26 31 0d b7 84  1a 4c 44 52 20 52 37 2c  |6,#&1....LDR R7,|
0001b230  5b 52 32 2c 52 31 30 2c  4c 53 4c 20 23 32 5d 0d  |[R2,R10,LSL #2].|
0001b240  b7 8e 10 80 20 52 31 30  2c 52 36 2c 23 26 32 0d  |.... R10,R6,#&2.|
0001b250  b7 98 1a 4c 44 52 20 52  38 2c 5b 52 32 2c 52 31  |...LDR R8,[R2,R1|
0001b260  30 2c 4c 53 4c 20 23 31  5d 0d b7 a2 10 80 20 52  |0,LSL #1]..... R|
0001b270  31 30 2c 52 36 2c 23 26  34 0d b7 ac 13 4c 44 52  |10,R6,#&4....LDR|
0001b280  20 52 39 2c 5b 52 32 2c  52 31 30 5d 0d b7 b6 10  | R9,[R2,R10]....|
0001b290  80 20 52 31 30 2c 52 36  2c 23 26 38 0d b7 c0 34  |. R10,R6,#&8...4|
0001b2a0  4c 44 52 20 52 31 30 2c  5b 52 32 2c 52 31 30 2c  |LDR R10,[R2,R10,|
0001b2b0  4c 53 52 20 23 31 5d 3a  53 54 4d 49 41 20 52 35  |LSR #1]:STMIA R5|
0001b2c0  21 2c 7b 52 37 2c 52 38  2c 52 39 2c 52 31 30 7d  |!,{R7,R8,R9,R10}|
0001b2d0  0d b7 ca 11 80 20 52 31  30 2c 52 36 2c 23 26 31  |..... R10,R6,#&1|
0001b2e0  30 0d b7 d4 1a 4c 44 52  20 52 37 2c 5b 52 32 2c  |0....LDR R7,[R2,|
0001b2f0  52 31 30 2c 4c 53 52 20  23 32 5d 0d b7 de 11 80  |R10,LSR #2].....|
0001b300  20 52 31 30 2c 52 36 2c  23 26 32 30 0d b7 e8 1a  | R10,R6,#&20....|
0001b310  4c 44 52 20 52 38 2c 5b  52 32 2c 52 31 30 2c 4c  |LDR R8,[R2,R10,L|
0001b320  53 52 20 23 33 5d 0d b7  f2 11 80 20 52 31 30 2c  |SR #3]..... R10,|
0001b330  52 36 2c 23 26 34 30 0d  b7 fc 1a 4c 44 52 20 52  |R6,#&40....LDR R|
0001b340  39 2c 5b 52 32 2c 52 31  30 2c 4c 53 52 20 23 34  |9,[R2,R10,LSR #4|
0001b350  5d 0d b8 06 15 4d 4f 56  20 52 31 30 2c 52 36 2c  |]....MOV R10,R6,|
0001b360  4c 53 52 20 23 37 0d b8  10 05 5d 0d b8 1a 05 cd  |LSR #7....].....|
0001b370  0d b8 24 0a 5b 4f 50 54  20 5a 0d b8 2e 34 4c 44  |..$.[OPT Z...4LD|
0001b380  52 20 52 31 30 2c 5b 52  32 2c 52 31 30 2c 4c 53  |R R10,[R2,R10,LS|
0001b390  4c 20 23 32 5d 3a 53 54  4d 49 41 20 52 35 21 2c  |L #2]:STMIA R5!,|
0001b3a0  7b 52 37 2c 52 38 2c 52  39 2c 52 31 30 7d 0d b8  |{R7,R8,R9,R10}..|
0001b3b0  38 1e 53 55 42 53 20 52  30 2c 52 30 2c 23 38 3a  |8.SUBS R0,R0,#8:|
0001b3c0  42 48 49 20 6d 61 70 70  69 78 6c 70 0d b8 42 0f  |BHI mappixlp..B.|
0001b3d0  4d 4f 56 53 20 50 43 2c  52 31 34 0d b8 4c 05 5d  |MOVS PC,R14..L.]|
0001b3e0  0d b8 56 08 c9 20 31 36  0d b8 60 0a 5b 4f 50 54  |..V.. 16..`.[OPT|
0001b3f0  20 5a 0d b8 6a 0c 2e 6d  61 70 70 69 78 25 0d b8  | Z..j..mappix%..|
0001b400  74 10 4c 44 52 20 52 30  2c 73 78 6c 6f 63 0d b8  |t.LDR R0,sxloc..|
0001b410  7e 1b 4c 44 52 20 52 31  2c 5b 52 39 5d 3a 4c 44  |~.LDR R1,[R9]:LD|
0001b420  52 20 52 31 2c 5b 52 31  5d 0d b8 88 1e 4c 44 52  |R R1,[R1]....LDR|
0001b430  20 52 32 2c 5b 52 39 2c  23 38 5d 3a 4c 44 52 20  | R2,[R9,#8]:LDR |
0001b440  52 32 2c 5b 52 32 5d 0d  b8 92 14 4c 44 52 20 52  |R2,[R2]....LDR R|
0001b450  33 2c 5b 52 39 2c 23 34  2a 38 5d 0d b8 9c 14 4c  |3,[R9,#4*8]....L|
0001b460  44 52 20 52 34 2c 5b 52  39 2c 23 33 2a 38 5d 0d  |DR R4,[R9,#3*8].|
0001b470  b8 a6 14 4c 44 52 20 52  35 2c 5b 52 39 2c 23 32  |...LDR R5,[R9,#2|
0001b480  2a 38 5d 0d b8 b0 14 4c  44 52 20 52 36 2c 5b 52  |*8]....LDR R6,[R|
0001b490  39 2c 23 35 2a 38 5d 0d  b8 ba 14 4c 44 52 20 52  |9,#5*8]....LDR R|
0001b4a0  37 2c 5b 52 39 2c 23 36  2a 38 5d 0d b8 c4 14 4c  |7,[R9,#6*8]....L|
0001b4b0  44 52 20 52 38 2c 5b 52  39 2c 23 37 2a 38 5d 0d  |DR R8,[R9,#7*8].|
0001b4c0  b8 ce 0d 43 4d 50 20 52  31 2c 52 32 0d b8 d8 12  |...CMP R1,R2....|
0001b4d0  41 44 44 45 51 20 52 32  2c 52 32 2c 23 31 0d b8  |ADDEQ R2,R2,#1..|
0001b4e0  e2 0d 2e 6d 61 70 70 69  78 6c 70 0d b8 ec 2e 4c  |...mappixlp....L|
0001b4f0  44 52 42 20 52 39 2c 5b  52 31 5d 2c 23 73 74 65  |DRB R9,[R1],#ste|
0001b500  70 32 34 3a 4c 44 52 42  20 52 31 30 2c 5b 52 32  |p24:LDRB R10,[R2|
0001b510  5d 2c 23 73 74 65 70 32  34 0d b8 f6 3e 4c 44 52  |],#step24...>LDR|
0001b520  20 52 39 2c 5b 52 36 2c  52 39 2c 4c 53 4c 20 23  | R9,[R6,R9,LSL #|
0001b530  32 5d 3a 4c 44 52 20 52  31 30 2c 5b 52 37 2c 52  |2]:LDR R10,[R7,R|
0001b540  31 30 2c 4c 53 4c 20 23  32 5d 3a 84 52 20 52 39  |10,LSL #2]:.R R9|
0001b550  2c 52 39 2c 52 31 30 0d  b9 00 29 80 20 52 31 30  |,R9,R10...). R10|
0001b560  2c 52 39 2c 23 32 35 35  3a 4c 44 52 20 52 31 30  |,R9,#255:LDR R10|
0001b570  2c 5b 52 33 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R3,R10,LSL #2]|
0001b580  0d b9 0a 3c 4d 4f 56 20  52 31 31 2c 52 39 2c 4c  |...<MOV R11,R9,L|
0001b590  53 52 20 23 38 3a 80 20  52 31 31 2c 52 31 31 2c  |SR #8:. R11,R11,|
0001b5a0  23 32 35 35 3a 4c 44 52  20 52 31 31 2c 5b 52 34  |#255:LDR R11,[R4|
0001b5b0  2c 52 31 31 2c 4c 53 4c  20 23 32 5d 0d b9 14 2e  |,R11,LSL #2]....|
0001b5c0  4d 4f 56 20 52 31 32 2c  52 39 2c 4c 53 52 20 23  |MOV R12,R9,LSR #|
0001b5d0  31 36 3a 4c 44 52 20 52  31 32 2c 5b 52 35 2c 52  |16:LDR R12,[R5,R|
0001b5e0  31 32 2c 4c 53 4c 20 23  32 5d 0d b9 1e 33 41 44  |12,LSL #2]...3AD|
0001b5f0  44 20 52 31 30 2c 52 31  30 2c 52 31 31 3a 41 44  |D R10,R10,R11:AD|
0001b600  44 20 52 31 30 2c 52 31  30 2c 52 31 32 3a 53 54  |D R10,R10,R12:ST|
0001b610  4d 49 41 20 52 38 21 2c  7b 52 31 30 7d 0d b9 28  |MIA R8!,{R10}..(|
0001b620  1e 53 55 42 53 20 52 30  2c 52 30 2c 23 31 3a 42  |.SUBS R0,R0,#1:B|
0001b630  4e 45 20 6d 61 70 70 69  78 6c 70 0d b9 32 0f 4d  |NE mappixlp..2.M|
0001b640  4f 56 53 20 50 43 2c 52  31 34 0d b9 3c 05 5d 0d  |OVS PC,R14..<.].|
0001b650  b9 46 08 c9 20 32 34 0d  b9 50 0a 5b 4f 50 54 20  |.F.. 24..P.[OPT |
0001b660  5a 0d b9 5a 0c 2e 6d 61  70 70 69 78 25 0d b9 64  |Z..Z..mappix%..d|
0001b670  10 4c 44 52 20 52 30 2c  73 78 6c 6f 63 0d b9 6e  |.LDR R0,sxloc..n|
0001b680  20 4c 44 52 20 52 31 2c  5b 52 39 2c 23 32 2a 38  | LDR R1,[R9,#2*8|
0001b690  5d 3a 4c 44 52 20 52 31  2c 5b 52 31 5d 0d b9 78  |]:LDR R1,[R1]..x|
0001b6a0  1e 4c 44 52 20 52 32 2c  5b 52 39 2c 23 38 5d 3a  |.LDR R2,[R9,#8]:|
0001b6b0  4c 44 52 20 52 32 2c 5b  52 32 5d 0d b9 82 1b 4c  |LDR R2,[R2]....L|
0001b6c0  44 52 20 52 33 2c 5b 52  39 5d 3a 4c 44 52 20 52  |DR R3,[R9]:LDR R|
0001b6d0  33 2c 5b 52 33 5d 0d b9  8c 14 4c 44 52 20 52 34  |3,[R3]....LDR R4|
0001b6e0  2c 5b 52 39 2c 23 35 2a  38 5d 0d b9 96 14 4c 44  |,[R9,#5*8]....LD|
0001b6f0  52 20 52 35 2c 5b 52 39  2c 23 34 2a 38 5d 0d b9  |R R5,[R9,#4*8]..|
0001b700  a0 14 4c 44 52 20 52 36  2c 5b 52 39 2c 23 33 2a  |..LDR R6,[R9,#3*|
0001b710  38 5d 0d b9 aa 14 4c 44  52 20 52 37 2c 5b 52 39  |8]....LDR R7,[R9|
0001b720  2c 23 36 2a 38 5d 0d b9  b4 0d 2e 6d 61 70 70 69  |,#6*8].....mappi|
0001b730  78 6c 70 0d b9 be 2e 4c  44 52 42 20 52 38 2c 5b  |xlp....LDRB R8,[|
0001b740  52 31 5d 2c 23 73 74 65  70 32 34 3a 4c 44 52 20  |R1],#step24:LDR |
0001b750  52 38 2c 5b 52 34 2c 52  38 2c 4c 53 4c 20 23 32  |R8,[R4,R8,LSL #2|
0001b760  5d 0d b9 c8 3b 4c 44 52  42 20 52 39 2c 5b 52 32  |]...;LDRB R9,[R2|
0001b770  5d 2c 23 73 74 65 70 32  34 3a 4c 44 52 20 52 39  |],#step24:LDR R9|
0001b780  2c 5b 52 35 2c 52 39 2c  4c 53 4c 20 23 32 5d 3a  |,[R5,R9,LSL #2]:|
0001b790  41 44 44 20 52 38 2c 52  38 2c 52 39 0d b9 d2 4a  |ADD R8,R8,R9...J|
0001b7a0  4c 44 52 42 20 52 39 2c  5b 52 33 5d 2c 23 73 74  |LDRB R9,[R3],#st|
0001b7b0  65 70 32 34 3a 4c 44 52  20 52 39 2c 5b 52 36 2c  |ep24:LDR R9,[R6,|
0001b7c0  52 39 2c 4c 53 4c 20 23  32 5d 3a 41 44 44 20 52  |R9,LSL #2]:ADD R|
0001b7d0  38 2c 52 38 2c 52 39 3a  53 54 52 20 52 38 2c 5b  |8,R8,R9:STR R8,[|
0001b7e0  52 37 5d 2c 23 34 0d b9  dc 1e 53 55 42 53 20 52  |R7],#4....SUBS R|
0001b7f0  30 2c 52 30 2c 23 31 3a  42 4e 45 20 6d 61 70 70  |0,R0,#1:BNE mapp|
0001b800  69 78 6c 70 0d b9 e6 0f  4d 4f 56 53 20 50 43 2c  |ixlp....MOVS PC,|
0001b810  52 31 34 0d b9 f0 05 5d  0d b9 fa 09 c9 20 34 32  |R14....]..... 42|
0001b820  32 0d ba 04 0a 5b 4f 50  54 20 5a 0d ba 0e 0c 2e  |2....[OPT Z.....|
0001b830  6d 61 70 70 69 78 25 0d  ba 18 10 4c 44 52 20 52  |mappix%....LDR R|
0001b840  30 2c 73 78 6c 6f 63 0d  ba 22 1b 4c 44 52 20 52  |0,sxloc..".LDR R|
0001b850  31 2c 5b 52 39 5d 3a 4c  44 52 20 52 31 2c 5b 52  |1,[R9]:LDR R1,[R|
0001b860  31 5d 0d ba 2c 10 41 44  44 20 52 31 2c 52 31 2c  |1]..,.ADD R1,R1,|
0001b870  23 31 0d ba 36 14 4c 44  52 20 52 34 2c 5b 52 39  |#1..6.LDR R4,[R9|
0001b880  2c 23 31 2a 38 5d 0d ba  40 14 4c 44 52 20 52 37  |,#1*8]..@.LDR R7|
0001b890  2c 5b 52 39 2c 23 38 2a  38 5d 0d ba 4a 0d 2e 6d  |,[R9,#8*8]..J..m|
0001b8a0  61 70 70 69 78 6c 70 0d  ba 54 13 4c 44 52 42 20  |appixlp..T.LDRB |
0001b8b0  52 38 2c 5b 52 31 5d 2c  23 32 0d ba 5e 3e 4c 44  |R8,[R1],#2..^>LD|
0001b8c0  52 20 52 38 2c 5b 52 34  2c 52 38 2c 4c 53 4c 20  |R R8,[R4,R8,LSL |
0001b8d0  23 32 5d 3a 43 4d 50 20  52 38 2c 23 46 3a 4d 4f  |#2]:CMP R8,#F:MO|
0001b8e0  56 43 53 20 52 38 2c 23  46 3a 53 54 52 20 52 38  |VCS R8,#F:STR R8|
0001b8f0  2c 5b 52 37 5d 2c 23 34  0d ba 68 1e 53 55 42 53  |,[R7],#4..h.SUBS|
0001b900  20 52 30 2c 52 30 2c 23  31 3a 42 4e 45 20 6d 61  | R0,R0,#1:BNE ma|
0001b910  70 70 69 78 6c 70 0d ba  72 0f 4d 4f 56 53 20 50  |ppixlp..r.MOVS P|
0001b920  43 2c 52 31 34 0d ba 7c  05 5d 0d ba 86 05 cb 0d  |C,R14..|.]......|
0001b930  ba 90 0a 5b 4f 50 54 20  5a 0d ba 9a 0d 2e 78 73  |...[OPT Z.....xs|
0001b940  61 6d 70 6c 65 25 0d ba  a4 1b 4c 44 52 20 52 30  |ample%....LDR R0|
0001b950  2c 5b 52 39 5d 3a 4c 44  52 20 52 30 2c 5b 52 30  |,[R9]:LDR R0,[R0|
0001b960  5d 0d ba ae 12 4c 44 52  20 52 31 2c 5b 52 39 2c  |]....LDR R1,[R9,|
0001b970  23 38 5d 0d ba b8 14 4c  44 52 20 52 32 2c 5b 52  |#8]....LDR R2,[R|
0001b980  39 2c 23 32 2a 38 5d 0d  ba c2 20 4c 44 52 20 52  |9,#2*8]... LDR R|
0001b990  33 2c 5b 52 39 2c 23 33  2a 38 5d 3a 4c 44 52 20  |3,[R9,#3*8]:LDR |
0001b9a0  52 33 2c 5b 52 33 5d 0d  ba cc 20 4c 44 52 20 52  |R3,[R3]... LDR R|
0001b9b0  34 2c 5b 52 39 2c 23 34  2a 38 5d 3a 4c 44 52 20  |4,[R9,#4*8]:LDR |
0001b9c0  52 34 2c 5b 52 34 5d 0d  ba d6 0e 4d 4f 56 20 52  |R4,[R4]....MOV R|
0001b9d0  31 31 2c 52 34 0d ba e0  0e 2e 78 73 61 6d 70 6c  |11,R4.....xsampl|
0001b9e0  65 6c 70 0d ba ea 11 4c  44 4d 49 41 20 52 31 2c  |elp....LDMIA R1,|
0001b9f0  7b 52 35 7d 0d ba f4 2c  53 55 42 53 20 52 31 31  |{R5}...,SUBS R11|
0001ba00  2c 52 31 31 2c 23 31 3a  ec 51 20 52 31 31 2c 52  |,R11,#1:.Q R11,R|
0001ba10  34 3a 41 44 44 45 51 20  52 31 2c 52 31 2c 23 34  |4:ADDEQ R1,R1,#4|
0001ba20  0d ba fe 12 53 55 42 53  20 52 31 32 2c 52 33 2c  |....SUBS R12,R3,|
0001ba30  23 31 0d bb 08 10 42 45  51 20 78 64 6f 6e 65 64  |#1....BEQ xdoned|
0001ba40  69 76 0d bb 12 0b 2e 78  64 69 76 6c 70 0d bb 1c  |iv.....xdivlp...|
0001ba50  0f 43 4d 50 20 52 31 32  2c 52 31 31 0d bb 26 0f  |.CMP R12,R11..&.|
0001ba60  42 43 43 20 78 64 69 76  6c 70 32 0d bb 30 23 4c  |BCC xdivlp2..0#L|
0001ba70  44 4d 49 41 20 52 31 21  2c 7b 52 38 7d 3a 4d 4c  |DMIA R1!,{R8}:ML|
0001ba80  41 20 52 35 2c 52 38 2c  52 31 31 2c 52 35 0d bb  |A R5,R8,R11,R5..|
0001ba90  3a 1f 53 55 42 53 20 52  31 32 2c 52 31 32 2c 52  |:.SUBS R12,R12,R|
0001baa0  31 31 3a 4d 4f 56 20 52  31 31 2c 52 34 0d bb 44  |11:MOV R11,R4..D|
0001bab0  0e 42 4e 45 20 78 64 69  76 6c 70 0d bb 4e 0e 42  |.BNE xdivlp..N.B|
0001bac0  20 78 64 6f 6e 65 64 69  76 0d bb 58 0c 2e 78 64  | xdonediv..X..xd|
0001bad0  69 76 6c 70 32 0d bb 62  11 4c 44 4d 49 41 20 52  |ivlp2..b.LDMIA R|
0001bae0  31 2c 7b 52 38 7d 0d bb  6c 2c 53 55 42 53 20 52  |1,{R8}..l,SUBS R|
0001baf0  31 31 2c 52 31 31 2c 23  31 3a ec 51 20 52 31 31  |11,R11,#1:.Q R11|
0001bb00  2c 52 34 3a 41 44 44 45  51 20 52 31 2c 52 31 2c  |,R4:ADDEQ R1,R1,|
0001bb10  23 34 0d bb 76 10 41 44  44 20 52 35 2c 52 35 2c  |#4..v.ADD R5,R5,|
0001bb20  52 38 0d bb 80 1e 53 55  42 53 20 52 31 32 2c 52  |R8....SUBS R12,R|
0001bb30  31 32 2c 23 31 3a 42 4e  45 20 78 64 69 76 6c 70  |12,#1:BNE xdivlp|
0001bb40  0d bb 8a 0d 2e 78 64 6f  6e 65 64 69 76 0d bb 94  |.....xdonediv...|
0001bb50  12 53 54 4d 49 41 20 52  32 21 2c 7b 52 35 7d 0d  |.STMIA R2!,{R5}.|
0001bb60  bb 9e 1f 53 55 42 53 20  52 30 2c 52 30 2c 23 31  |...SUBS R0,R0,#1|
0001bb70  3a 42 50 4c 20 78 73 61  6d 70 6c 65 6c 70 0d bb  |:BPL xsamplelp..|
0001bb80  a8 0f 4d 4f 56 53 20 50  43 2c 52 31 34 0d bb b2  |..MOVS PC,R14...|
0001bb90  05 5d 0d bb bc 07 c9 20  32 0d bb c6 0f e7 69 6e  |.]..... 2.....in|
0001bba0  70 75 74 3c 3d 38 20 8c  0d bb d0 0a 5b 4f 50 54  |put<=8 .....[OPT|
0001bbb0  20 5a 0d bb da 0c 2e 6d  61 70 70 69 78 25 0d bb  | Z.....mappix%..|
0001bbc0  e4 10 4c 44 52 20 52 30  2c 73 78 6c 6f 63 0d bb  |..LDR R0,sxloc..|
0001bbd0  ee 1b 4c 44 52 20 52 31  2c 5b 52 39 5d 3a 4c 44  |..LDR R1,[R9]:LD|
0001bbe0  52 20 52 31 2c 5b 52 31  5d 0d bb f8 14 4c 44 52  |R R1,[R1]....LDR|
0001bbf0  20 52 32 2c 5b 52 39 2c  23 33 2a 38 5d 0d bc 02  | R2,[R9,#3*8]...|
0001bc00  14 4c 44 52 20 52 33 2c  5b 52 39 2c 23 32 2a 38  |.LDR R3,[R9,#2*8|
0001bc10  5d 0d bc 0c 12 4c 44 52  20 52 34 2c 5b 52 39 2c  |]....LDR R4,[R9,|
0001bc20  23 38 5d 0d bc 16 14 4c  44 52 20 52 35 2c 5b 52  |#8]....LDR R5,[R|
0001bc30  39 2c 23 34 2a 38 5d 0d  bc 20 0d 2e 6d 61 70 70  |9,#4*8].. ..mapp|
0001bc40  69 78 6c 70 0d bc 2a 18  4c 44 52 42 20 52 36 2c  |ixlp..*.LDRB R6,|
0001bc50  5b 52 31 5d 2c 23 73 74  65 70 32 34 0d bc 34 05  |[R1],#step24..4.|
0001bc60  5d 0d bc 3e 05 cd 0d bc  48 0e c8 8e 20 69 6e 70  |]..>....H... inp|
0001bc70  75 74 20 ca 0d bc 52 07  c9 20 38 0d bc 5c 0a e7  |ut ...R.. 8..\..|
0001bc80  68 61 6d 20 8c 0d bc 66  0a 5b 4f 50 54 20 5a 0d  |ham ...f.[OPT Z.|
0001bc90  bc 70 11 41 44 52 20 52  39 2c 6c 74 61 62 6c 65  |.p.ADR R9,ltable|
0001bca0  0d bc 7a 21 4d 4f 56 53  20 52 37 2c 52 36 2c 4c  |..z!MOVS R7,R6,L|
0001bcb0  53 52 20 23 34 3a 80 20  52 36 2c 52 36 2c 23 31  |SR #4:. R6,R6,#1|
0001bcc0  35 0d bc 84 4e 4c 44 52  45 51 20 52 31 30 2c 5b  |5...NLDREQ R10,[|
0001bcd0  52 32 2c 52 36 2c 4c 53  4c 20 23 32 5d 3a 4c 44  |R2,R6,LSL #2]:LD|
0001bce0  52 45 51 20 52 31 31 2c  5b 52 33 2c 52 36 2c 4c  |REQ R11,[R3,R6,L|
0001bcf0  53 4c 20 23 32 5d 3a 4c  44 52 45 51 20 52 31 32  |SL #2]:LDREQ R12|
0001bd00  2c 5b 52 34 2c 52 36 2c  4c 53 4c 20 23 32 5d 0d  |,[R4,R6,LSL #2].|
0001bd10  bc 8e 26 43 4d 50 20 52  37 2c 23 31 3a 4c 44 52  |..&CMP R7,#1:LDR|
0001bd20  45 51 20 52 31 32 2c 5b  52 39 2c 52 36 2c 4c 53  |EQ R12,[R9,R6,LS|
0001bd30  4c 20 23 32 5d 0d bc 98  26 43 4d 50 20 52 37 2c  |L #2]...&CMP R7,|
0001bd40  23 32 3a 4c 44 52 45 51  20 52 31 30 2c 5b 52 39  |#2:LDREQ R10,[R9|
0001bd50  2c 52 36 2c 4c 53 4c 20  23 32 5d 0d bc a2 26 43  |,R6,LSL #2]...&C|
0001bd60  4d 50 20 52 37 2c 23 33  3a 4c 44 52 45 51 20 52  |MP R7,#3:LDREQ R|
0001bd70  31 31 2c 5b 52 39 2c 52  36 2c 4c 53 4c 20 23 32  |11,[R9,R6,LSL #2|
0001bd80  5d 0d bc ac 1b 53 54 4d  49 41 20 52 35 21 2c 7b  |]....STMIA R5!,{|
0001bd90  52 31 30 2c 52 31 31 2c  52 31 32 7d 0d bc b6 1e  |R10,R11,R12}....|
0001bda0  53 55 42 53 20 52 30 2c  52 30 2c 23 31 3a 42 4e  |SUBS R0,R0,#1:BN|
0001bdb0  45 20 6d 61 70 70 69 78  6c 70 0d bc c0 0f 4d 4f  |E mappixlp....MO|
0001bdc0  56 53 20 50 43 2c 52 31  34 0d bc ca 0b 2e 6c 74  |VS PC,R14.....lt|
0001bdd0  61 62 6c 65 0d bc d4 05  5d 0d bc de 0c e3 49 25  |able....].....I%|
0001bde0  3d 30 b8 31 35 0d bc e8  0a 5b 4f 50 54 20 5a 0d  |=0.15....[OPT Z.|
0001bdf0  bc f2 10 45 51 55 44 20  49 25 2f 31 35 2a 46 0d  |...EQUD I%/15*F.|
0001be00  bc fc 05 5d 0d bd 06 05  ed 0d bd 10 05 cc 0d bd  |...]............|
0001be10  1a 0a 5b 4f 50 54 20 5a  0d bd 24 45 4c 44 52 20  |..[OPT Z..$ELDR |
0001be20  52 37 2c 5b 52 32 2c 52  36 2c 4c 53 4c 20 23 32  |R7,[R2,R6,LSL #2|
0001be30  5d 3a 4c 44 52 20 52 38  2c 5b 52 33 2c 52 36 2c  |]:LDR R8,[R3,R6,|
0001be40  4c 53 4c 20 23 32 5d 3a  4c 44 52 20 52 39 2c 5b  |LSL #2]:LDR R9,[|
0001be50  52 34 2c 52 36 2c 4c 53  4c 20 23 32 5d 0d bd 2e  |R4,R6,LSL #2]...|
0001be60  18 53 54 4d 49 41 20 52  35 21 2c 7b 52 37 2c 52  |.STMIA R5!,{R7,R|
0001be70  38 2c 52 39 7d 0d bd 38  1e 53 55 42 53 20 52 30  |8,R9}..8.SUBS R0|
0001be80  2c 52 30 2c 23 31 3a 42  4e 45 20 6d 61 70 70 69  |,R0,#1:BNE mappi|
0001be90  78 6c 70 0d bd 42 0f 4d  4f 56 53 20 50 43 2c 52  |xlp..B.MOVS PC,R|
0001bea0  31 34 0d bd 4c 05 5d 0d  bd 56 05 cd 0d bd 60 07  |14..L.]..V....`.|
0001beb0  c9 20 34 0d bd 6a 14 e7  62 69 67 65 6e 64 69 61  |. 4..j..bigendia|
0001bec0  6e 62 69 74 73 20 8c 0d  bd 74 0a 5b 4f 50 54 20  |nbits ...t.[OPT |
0001bed0  5a 0d bd 7e 15 4d 4f 56  20 52 31 30 2c 52 36 2c  |Z..~.MOV R10,R6,|
0001bee0  4c 53 52 20 23 34 0d bd  88 48 4c 44 52 20 52 37  |LSR #4...HLDR R7|
0001bef0  2c 5b 52 32 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R2,R10,LSL #2]|
0001bf00  3a 4c 44 52 20 52 38 2c  5b 52 33 2c 52 31 30 2c  |:LDR R8,[R3,R10,|
0001bf10  4c 53 4c 20 23 32 5d 3a  4c 44 52 20 52 39 2c 5b  |LSL #2]:LDR R9,[|
0001bf20  52 34 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 0d bd  |R4,R10,LSL #2]..|
0001bf30  92 18 53 54 4d 49 41 20  52 35 21 2c 7b 52 37 2c  |..STMIA R5!,{R7,|
0001bf40  52 38 2c 52 39 7d 0d bd  9c 10 80 20 52 31 30 2c  |R8,R9}..... R10,|
0001bf50  52 36 2c 23 26 46 0d bd  a6 05 5d 0d bd b0 05 cc  |R6,#&F....].....|
0001bf60  0d bd ba 0a 5b 4f 50 54  20 5a 0d bd c4 10 80 20  |....[OPT Z..... |
0001bf70  52 31 30 2c 52 36 2c 23  26 46 0d bd ce 48 4c 44  |R10,R6,#&F...HLD|
0001bf80  52 20 52 37 2c 5b 52 32  2c 52 31 30 2c 4c 53 4c  |R R7,[R2,R10,LSL|
0001bf90  20 23 32 5d 3a 4c 44 52  20 52 38 2c 5b 52 33 2c  | #2]:LDR R8,[R3,|
0001bfa0  52 31 30 2c 4c 53 4c 20  23 32 5d 3a 4c 44 52 20  |R10,LSL #2]:LDR |
0001bfb0  52 39 2c 5b 52 34 2c 52  31 30 2c 4c 53 4c 20 23  |R9,[R4,R10,LSL #|
0001bfc0  32 5d 0d bd d8 18 53 54  4d 49 41 20 52 35 21 2c  |2]....STMIA R5!,|
0001bfd0  7b 52 37 2c 52 38 2c 52  39 7d 0d bd e2 15 4d 4f  |{R7,R8,R9}....MO|
0001bfe0  56 20 52 31 30 2c 52 36  2c 4c 53 52 20 23 34 0d  |V R10,R6,LSR #4.|
0001bff0  bd ec 05 5d 0d bd f6 05  cd 0d be 00 0a 5b 4f 50  |...].........[OP|
0001c000  54 20 5a 0d be 0a 48 4c  44 52 20 52 37 2c 5b 52  |T Z...HLDR R7,[R|
0001c010  32 2c 52 31 30 2c 4c 53  4c 20 23 32 5d 3a 4c 44  |2,R10,LSL #2]:LD|
0001c020  52 20 52 38 2c 5b 52 33  2c 52 31 30 2c 4c 53 4c  |R R8,[R3,R10,LSL|
0001c030  20 23 32 5d 3a 4c 44 52  20 52 39 2c 5b 52 34 2c  | #2]:LDR R9,[R4,|
0001c040  52 31 30 2c 4c 53 4c 20  23 32 5d 0d be 14 18 53  |R10,LSL #2]....S|
0001c050  54 4d 49 41 20 52 35 21  2c 7b 52 37 2c 52 38 2c  |TMIA R5!,{R7,R8,|
0001c060  52 39 7d 0d be 1e 1e 53  55 42 53 20 52 30 2c 52  |R9}....SUBS R0,R|
0001c070  30 2c 23 32 3a 42 48 49  20 6d 61 70 70 69 78 6c  |0,#2:BHI mappixl|
0001c080  70 0d be 28 0f 4d 4f 56  53 20 50 43 2c 52 31 34  |p..(.MOVS PC,R14|
0001c090  0d be 32 05 5d 0d be 3c  07 c9 20 32 0d be 46 14  |..2.]..<.. 2..F.|
0001c0a0  e7 62 69 67 65 6e 64 69  61 6e 62 69 74 73 20 8c  |.bigendianbits .|
0001c0b0  0d be 50 0a 5b 4f 50 54  20 5a 0d be 5a 15 4d 4f  |..P.[OPT Z..Z.MO|
0001c0c0  56 20 52 31 30 2c 52 36  2c 4c 53 52 20 23 36 0d  |V R10,R6,LSR #6.|
0001c0d0  be 64 48 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |.dHLDR R7,[R2,R1|
0001c0e0  30 2c 4c 53 4c 20 23 32  5d 3a 4c 44 52 20 52 38  |0,LSL #2]:LDR R8|
0001c0f0  2c 5b 52 33 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R3,R10,LSL #2]|
0001c100  3a 4c 44 52 20 52 39 2c  5b 52 34 2c 52 31 30 2c  |:LDR R9,[R4,R10,|
0001c110  4c 53 4c 20 23 32 5d 0d  be 6e 18 53 54 4d 49 41  |LSL #2]..n.STMIA|
0001c120  20 52 35 21 2c 7b 52 37  2c 52 38 2c 52 39 7d 0d  | R5!,{R7,R8,R9}.|
0001c130  be 78 11 80 20 52 31 30  2c 52 36 2c 23 26 33 30  |.x.. R10,R6,#&30|
0001c140  0d be 82 48 4c 44 52 20  52 37 2c 5b 52 32 2c 52  |...HLDR R7,[R2,R|
0001c150  31 30 2c 4c 53 52 20 23  32 5d 3a 4c 44 52 20 52  |10,LSR #2]:LDR R|
0001c160  38 2c 5b 52 33 2c 52 31  30 2c 4c 53 52 20 23 32  |8,[R3,R10,LSR #2|
0001c170  5d 3a 4c 44 52 20 52 39  2c 5b 52 34 2c 52 31 30  |]:LDR R9,[R4,R10|
0001c180  2c 4c 53 52 20 23 32 5d  0d be 8c 18 53 54 4d 49  |,LSR #2]....STMI|
0001c190  41 20 52 35 21 2c 7b 52  37 2c 52 38 2c 52 39 7d  |A R5!,{R7,R8,R9}|
0001c1a0  0d be 96 10 80 20 52 31  30 2c 52 36 2c 23 26 43  |..... R10,R6,#&C|
0001c1b0  0d be a0 33 4c 44 52 20  52 37 2c 5b 52 32 2c 52  |...3LDR R7,[R2,R|
0001c1c0  31 30 5d 3a 4c 44 52 20  52 38 2c 5b 52 33 2c 52  |10]:LDR R8,[R3,R|
0001c1d0  31 30 5d 3a 4c 44 52 20  52 39 2c 5b 52 34 2c 52  |10]:LDR R9,[R4,R|
0001c1e0  31 30 5d 0d be aa 18 53  54 4d 49 41 20 52 35 21  |10]....STMIA R5!|
0001c1f0  2c 7b 52 37 2c 52 38 2c  52 39 7d 0d be b4 10 80  |,{R7,R8,R9}.....|
0001c200  20 52 31 30 2c 52 36 2c  23 26 33 0d be be 05 5d  | R10,R6,#&3....]|
0001c210  0d be c8 05 cc 0d be d2  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
0001c220  be dc 10 80 20 52 31 30  2c 52 36 2c 23 26 33 0d  |.... R10,R6,#&3.|
0001c230  be e6 48 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |..HLDR R7,[R2,R1|
0001c240  30 2c 4c 53 4c 20 23 32  5d 3a 4c 44 52 20 52 38  |0,LSL #2]:LDR R8|
0001c250  2c 5b 52 33 2c 52 31 30  2c 4c 53 4c 20 23 32 5d  |,[R3,R10,LSL #2]|
0001c260  3a 4c 44 52 20 52 39 2c  5b 52 34 2c 52 31 30 2c  |:LDR R9,[R4,R10,|
0001c270  4c 53 4c 20 23 32 5d 0d  be f0 18 53 54 4d 49 41  |LSL #2]....STMIA|
0001c280  20 52 35 21 2c 7b 52 37  2c 52 38 2c 52 39 7d 0d  | R5!,{R7,R8,R9}.|
0001c290  be fa 10 80 20 52 31 30  2c 52 36 2c 23 26 43 0d  |.... R10,R6,#&C.|
0001c2a0  bf 04 33 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |..3LDR R7,[R2,R1|
0001c2b0  30 5d 3a 4c 44 52 20 52  38 2c 5b 52 33 2c 52 31  |0]:LDR R8,[R3,R1|
0001c2c0  30 5d 3a 4c 44 52 20 52  39 2c 5b 52 34 2c 52 31  |0]:LDR R9,[R4,R1|
0001c2d0  30 5d 0d bf 0e 18 53 54  4d 49 41 20 52 35 21 2c  |0]....STMIA R5!,|
0001c2e0  7b 52 37 2c 52 38 2c 52  39 7d 0d bf 18 11 80 20  |{R7,R8,R9}..... |
0001c2f0  52 31 30 2c 52 36 2c 23  26 33 30 0d bf 22 48 4c  |R10,R6,#&30.."HL|
0001c300  44 52 20 52 37 2c 5b 52  32 2c 52 31 30 2c 4c 53  |DR R7,[R2,R10,LS|
0001c310  52 20 23 32 5d 3a 4c 44  52 20 52 38 2c 5b 52 33  |R #2]:LDR R8,[R3|
0001c320  2c 52 31 30 2c 4c 53 52  20 23 32 5d 3a 4c 44 52  |,R10,LSR #2]:LDR|
0001c330  20 52 39 2c 5b 52 34 2c  52 31 30 2c 4c 53 52 20  | R9,[R4,R10,LSR |
0001c340  23 32 5d 0d bf 2c 18 53  54 4d 49 41 20 52 35 21  |#2]..,.STMIA R5!|
0001c350  2c 7b 52 37 2c 52 38 2c  52 39 7d 0d bf 36 15 4d  |,{R7,R8,R9}..6.M|
0001c360  4f 56 20 52 31 30 2c 52  36 2c 4c 53 52 20 23 36  |OV R10,R6,LSR #6|
0001c370  0d bf 40 05 5d 0d bf 4a  05 cd 0d bf 54 0a 5b 4f  |..@.]..J....T.[O|
0001c380  50 54 20 5a 0d bf 5e 48  4c 44 52 20 52 37 2c 5b  |PT Z..^HLDR R7,[|
0001c390  52 32 2c 52 31 30 2c 4c  53 4c 20 23 32 5d 3a 4c  |R2,R10,LSL #2]:L|
0001c3a0  44 52 20 52 38 2c 5b 52  33 2c 52 31 30 2c 4c 53  |DR R8,[R3,R10,LS|
0001c3b0  4c 20 23 32 5d 3a 4c 44  52 20 52 39 2c 5b 52 34  |L #2]:LDR R9,[R4|
0001c3c0  2c 52 31 30 2c 4c 53 4c  20 23 32 5d 0d bf 68 18  |,R10,LSL #2]..h.|
0001c3d0  53 54 4d 49 41 20 52 35  21 2c 7b 52 37 2c 52 38  |STMIA R5!,{R7,R8|
0001c3e0  2c 52 39 7d 0d bf 72 1e  53 55 42 53 20 52 30 2c  |,R9}..r.SUBS R0,|
0001c3f0  52 30 2c 23 34 3a 42 48  49 20 6d 61 70 70 69 78  |R0,#4:BHI mappix|
0001c400  6c 70 0d bf 7c 0f 4d 4f  56 53 20 50 43 2c 52 31  |lp..|.MOVS PC,R1|
0001c410  34 0d bf 86 05 5d 0d bf  90 07 c9 20 31 0d bf 9a  |4....]..... 1...|
0001c420  14 e7 62 69 67 65 6e 64  69 61 6e 62 69 74 73 20  |..bigendianbits |
0001c430  8c 0d bf a4 0a 5b 4f 50  54 20 5a 0d bf ae 11 80  |.....[OPT Z.....|
0001c440  20 52 31 30 2c 52 36 2c  23 26 38 30 0d bf b8 48  | R10,R6,#&80...H|
0001c450  4c 44 52 20 52 37 2c 5b  52 32 2c 52 31 30 2c 4c  |LDR R7,[R2,R10,L|
0001c460  53 52 20 23 35 5d 3a 4c  44 52 20 52 38 2c 5b 52  |SR #5]:LDR R8,[R|
0001c470  33 2c 52 31 30 2c 4c 53  52 20 23 35 5d 3a 4c 44  |3,R10,LSR #5]:LD|
0001c480  52 20 52 39 2c 5b 52 34  2c 52 31 30 2c 4c 53 52  |R R9,[R4,R10,LSR|
0001c490  20 23 35 5d 0d bf c2 18  53 54 4d 49 41 20 52 35  | #5]....STMIA R5|
0001c4a0  21 2c 7b 52 37 2c 52 38  2c 52 39 7d 0d bf cc 11  |!,{R7,R8,R9}....|
0001c4b0  80 20 52 31 30 2c 52 36  2c 23 26 34 30 0d bf d6  |. R10,R6,#&40...|
0001c4c0  48 4c 44 52 20 52 37 2c  5b 52 32 2c 52 31 30 2c  |HLDR R7,[R2,R10,|
0001c4d0  4c 53 52 20 23 34 5d 3a  4c 44 52 20 52 38 2c 5b  |LSR #4]:LDR R8,[|
0001c4e0  52 33 2c 52 31 30 2c 4c  53 52 20 23 34 5d 3a 4c  |R3,R10,LSR #4]:L|
0001c4f0  44 52 20 52 39 2c 5b 52  34 2c 52 31 30 2c 4c 53  |DR R9,[R4,R10,LS|
0001c500  52 20 23 34 5d 0d bf e0  18 53 54 4d 49 41 20 52  |R #4]....STMIA R|
0001c510  35 21 2c 7b 52 37 2c 52  38 2c 52 39 7d 0d bf ea  |5!,{R7,R8,R9}...|
0001c520  11 80 20 52 31 30 2c 52  36 2c 23 26 32 30 0d bf  |.. R10,R6,#&20..|
0001c530  f4 48 4c 44 52 20 52 37  2c 5b 52 32 2c 52 31 30  |.HLDR R7,[R2,R10|
0001c540  2c 4c 53 52 20 23 33 5d  3a 4c 44 52 20 52 38 2c  |,LSR #3]:LDR R8,|
0001c550  5b 52 33 2c 52 31 30 2c  4c 53 52 20 23 33 5d 3a  |[R3,R10,LSR #3]:|
0001c560  4c 44 52 20 52 39 2c 5b  52 34 2c 52 31 30 2c 4c  |LDR R9,[R4,R10,L|
0001c570  53 52 20 23 33 5d 0d bf  fe 18 53 54 4d 49 41 20  |SR #3]....STMIA |
0001c580  52 35 21 2c 7b 52 37 2c  52 38 2c 52 39 7d 0d c0  |R5!,{R7,R8,R9}..|
0001c590  08 11 80 20 52 31 30 2c  52 36 2c 23 26 31 30 0d  |... R10,R6,#&10.|
0001c5a0  c0 12 48 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |..HLDR R7,[R2,R1|
0001c5b0  30 2c 4c 53 52 20 23 32  5d 3a 4c 44 52 20 52 38  |0,LSR #2]:LDR R8|
0001c5c0  2c 5b 52 33 2c 52 31 30  2c 4c 53 52 20 23 32 5d  |,[R3,R10,LSR #2]|
0001c5d0  3a 4c 44 52 20 52 39 2c  5b 52 34 2c 52 31 30 2c  |:LDR R9,[R4,R10,|
0001c5e0  4c 53 52 20 23 32 5d 0d  c0 1c 18 53 54 4d 49 41  |LSR #2]....STMIA|
0001c5f0  20 52 35 21 2c 7b 52 37  2c 52 38 2c 52 39 7d 0d  | R5!,{R7,R8,R9}.|
0001c600  c0 26 10 80 20 52 31 30  2c 52 36 2c 23 26 38 0d  |.&.. R10,R6,#&8.|
0001c610  c0 30 48 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |.0HLDR R7,[R2,R1|
0001c620  30 2c 4c 53 52 20 23 31  5d 3a 4c 44 52 20 52 38  |0,LSR #1]:LDR R8|
0001c630  2c 5b 52 33 2c 52 31 30  2c 4c 53 52 20 23 31 5d  |,[R3,R10,LSR #1]|
0001c640  3a 4c 44 52 20 52 39 2c  5b 52 34 2c 52 31 30 2c  |:LDR R9,[R4,R10,|
0001c650  4c 53 52 20 23 31 5d 0d  c0 3a 18 53 54 4d 49 41  |LSR #1]..:.STMIA|
0001c660  20 52 35 21 2c 7b 52 37  2c 52 38 2c 52 39 7d 0d  | R5!,{R7,R8,R9}.|
0001c670  c0 44 10 80 20 52 31 30  2c 52 36 2c 23 26 34 0d  |.D.. R10,R6,#&4.|
0001c680  c0 4e 33 4c 44 52 20 52  37 2c 5b 52 32 2c 52 31  |.N3LDR R7,[R2,R1|
0001c690  30 5d 3a 4c 44 52 20 52  38 2c 5b 52 33 2c 52 31  |0]:LDR R8,[R3,R1|
0001c6a0  30 5d 3a 4c 44 52 20 52  39 2c 5b 52 34 2c 52 31  |0]:LDR R9,[R4,R1|
0001c6b0  30 5d 0d c0 58 18 53 54  4d 49 41 20 52 35 21 2c  |0]..X.STMIA R5!,|
0001c6c0  7b 52 37 2c 52 38 2c 52  39 7d 0d c0 62 10 80 20  |{R7,R8,R9}..b.. |
0001c6d0  52 31 30 2c 52 36 2c 23  26 32 0d c0 6c 48 4c 44  |R10,R6,#&2..lHLD|
0001c6e0  52 20 52 37 2c 5b 52 32  2c 52 31 30 2c 4c 53 4c  |R R7,[R2,R10,LSL|
0001c6f0  20 23 31 5d 3a 4c 44 52  20 52 38 2c 5b 52 33 2c  | #1]:LDR R8,[R3,|
0001c700  52 31 30 2c 4c 53 4c 20  23 31 5d 3a 4c 44 52 20  |R10,LSL #1]:LDR |
0001c710  52 39 2c 5b 52 34 2c 52  31 30 2c 4c 53 4c 20 23  |R9,[R4,R10,LSL #|
0001c720  31 5d 0d c0 76 18 53 54  4d 49 41 20 52 35 21 2c  |1]..v.STMIA R5!,|
0001c730  7b 52 37 2c 52 38 2c 52  39 7d 0d c0 80 10 80 20  |{R7,R8,R9}..... |
0001c740  52 31 30 2c 52 36 2c 23  26 31 0d c0 8a 05 5d 0d  |R10,R6,#&1....].|
0001c750  c0 94 05 cc 0d c0 9e 0a  5b 4f 50 54 20 5a 0d c0  |........[OPT Z..|
0001c760  a8 10 80 20 52 31 30 2c  52 36 2c 23 26 31 0d c0  |... R10,R6,#&1..|
0001c770  b2 48 4c 44 52 20 52 37  2c 5b 52 32 2c 52 31 30  |.HLDR R7,[R2,R10|
0001c780  2c 4c 53 4c 20 23 32 5d  3a 4c 44 52 20 52 38 2c  |,LSL #2]:LDR R8,|
0001c790  5b 52 33 2c 52 31 30 2c  4c 53 4c 20 23 32 5d 3a  |[R3,R10,LSL #2]:|
0001c7a0  4c 44 52 20 52 39 2c 5b  52 34 2c 52 31 30 2c 4c  |LDR R9,[R4,R10,L|
0001c7b0  53 4c 20 23 32 5d 0d c0  bc 18 53 54 4d 49 41 20  |SL #2]....STMIA |
0001c7c0  52 35 21 2c 7b 52 37 2c  52 38 2c 52 39 7d 0d c0  |R5!,{R7,R8,R9}..|
0001c7d0  c6 10 80 20 52 31 30 2c  52 36 2c 23 26 32 0d c0  |... R10,R6,#&2..|
0001c7e0  d0 48 4c 44 52 20 52 37  2c 5b 52 32 2c 52 31 30  |.HLDR R7,[R2,R10|
0001c7f0  2c 4c 53 4c 20 23 31 5d  3a 4c 44 52 20 52 38 2c  |,LSL #1]:LDR R8,|
0001c800  5b 52 33 2c 52 31 30 2c  4c 53 4c 20 23 31 5d 3a  |[R3,R10,LSL #1]:|
0001c810  4c 44 52 20 52 39 2c 5b  52 34 2c 52 31 30 2c 4c  |LDR R9,[R4,R10,L|
0001c820  53 4c 20 23 31 5d 0d c0  da 18 53 54 4d 49 41 20  |SL #1]....STMIA |
0001c830  52 35 21 2c 7b 52 37 2c  52 38 2c 52 39 7d 0d c0  |R5!,{R7,R8,R9}..|
0001c840  e4 10 80 20 52 31 30 2c  52 36 2c 23 26 34 0d c0  |... R10,R6,#&4..|
0001c850  ee 33 4c 44 52 20 52 37  2c 5b 52 32 2c 52 31 30  |.3LDR R7,[R2,R10|
0001c860  5d 3a 4c 44 52 20 52 38  2c 5b 52 33 2c 52 31 30  |]:LDR R8,[R3,R10|
0001c870  5d 3a 4c 44 52 20 52 39  2c 5b 52 34 2c 52 31 30  |]:LDR R9,[R4,R10|
0001c880  5d 0d c0 f8 18 53 54 4d  49 41 20 52 35 21 2c 7b  |]....STMIA R5!,{|
0001c890  52 37 2c 52 38 2c 52 39  7d 0d c1 02 10 80 20 52  |R7,R8,R9}..... R|
0001c8a0  31 30 2c 52 36 2c 23 26  38 0d c1 0c 48 4c 44 52  |10,R6,#&8...HLDR|
0001c8b0  20 52 37 2c 5b 52 32 2c  52 31 30 2c 4c 53 52 20  | R7,[R2,R10,LSR |
0001c8c0  23 31 5d 3a 4c 44 52 20  52 38 2c 5b 52 33 2c 52  |#1]:LDR R8,[R3,R|
0001c8d0  31 30 2c 4c 53 52 20 23  31 5d 3a 4c 44 52 20 52  |10,LSR #1]:LDR R|
0001c8e0  39 2c 5b 52 34 2c 52 31  30 2c 4c 53 52 20 23 31  |9,[R4,R10,LSR #1|
0001c8f0  5d 0d c1 16 18 53 54 4d  49 41 20 52 35 21 2c 7b  |]....STMIA R5!,{|
0001c900  52 37 2c 52 38 2c 52 39  7d 0d c1 20 11 80 20 52  |R7,R8,R9}.. .. R|
0001c910  31 30 2c 52 36 2c 23 26  31 30 0d c1 2a 48 4c 44  |10,R6,#&10..*HLD|
0001c920  52 20 52 37 2c 5b 52 32  2c 52 31 30 2c 4c 53 52  |R R7,[R2,R10,LSR|
0001c930  20 23 32 5d 3a 4c 44 52  20 52 38 2c 5b 52 33 2c  | #2]:LDR R8,[R3,|
0001c940  52 31 30 2c 4c 53 52 20  23 32 5d 3a 4c 44 52 20  |R10,LSR #2]:LDR |
0001c950  52 39 2c 5b 52 34 2c 52  31 30 2c 4c 53 52 20 23  |R9,[R4,R10,LSR #|
0001c960  32 5d 0d c1 34 18 53 54  4d 49 41 20 52 35 21 2c  |2]..4.STMIA R5!,|
0001c970  7b 52 37 2c 52 38 2c 52  39 7d 0d c1 3e 11 80 20  |{R7,R8,R9}..>.. |
0001c980  52 31 30 2c 52 36 2c 23  26 32 30 0d c1 48 48 4c  |R10,R6,#&20..HHL|
0001c990  44 52 20 52 37 2c 5b 52  32 2c 52 31 30 2c 4c 53  |DR R7,[R2,R10,LS|
0001c9a0  52 20 23 33 5d 3a 4c 44  52 20 52 38 2c 5b 52 33  |R #3]:LDR R8,[R3|
0001c9b0  2c 52 31 30 2c 4c 53 52  20 23 33 5d 3a 4c 44 52  |,R10,LSR #3]:LDR|
0001c9c0  20 52 39 2c 5b 52 34 2c  52 31 30 2c 4c 53 52 20  | R9,[R4,R10,LSR |
0001c9d0  23 33 5d 0d c1 52 18 53  54 4d 49 41 20 52 35 21  |#3]..R.STMIA R5!|
0001c9e0  2c 7b 52 37 2c 52 38 2c  52 39 7d 0d c1 5c 11 80  |,{R7,R8,R9}..\..|
0001c9f0  20 52 31 30 2c 52 36 2c  23 26 34 30 0d c1 66 48  | R10,R6,#&40..fH|
0001ca00  4c 44 52 20 52 37 2c 5b  52 32 2c 52 31 30 2c 4c  |LDR R7,[R2,R10,L|
0001ca10  53 52 20 23 34 5d 3a 4c  44 52 20 52 38 2c 5b 52  |SR #4]:LDR R8,[R|
0001ca20  33 2c 52 31 30 2c 4c 53  52 20 23 34 5d 3a 4c 44  |3,R10,LSR #4]:LD|
0001ca30  52 20 52 39 2c 5b 52 34  2c 52 31 30 2c 4c 53 52  |R R9,[R4,R10,LSR|
0001ca40  20 23 34 5d 0d c1 70 18  53 54 4d 49 41 20 52 35  | #4]..p.STMIA R5|
0001ca50  21 2c 7b 52 37 2c 52 38  2c 52 39 7d 0d c1 7a 15  |!,{R7,R8,R9}..z.|
0001ca60  4d 4f 56 20 52 31 30 2c  52 36 2c 4c 53 52 20 23  |MOV R10,R6,LSR #|
0001ca70  37 0d c1 84 05 5d 0d c1  8e 05 cd 0d c1 98 0a 5b  |7....].........[|
0001ca80  4f 50 54 20 5a 0d c1 a2  48 4c 44 52 20 52 37 2c  |OPT Z...HLDR R7,|
0001ca90  5b 52 32 2c 52 31 30 2c  4c 53 4c 20 23 32 5d 3a  |[R2,R10,LSL #2]:|
0001caa0  4c 44 52 20 52 38 2c 5b  52 33 2c 52 31 30 2c 4c  |LDR R8,[R3,R10,L|
0001cab0  53 4c 20 23 32 5d 3a 4c  44 52 20 52 39 2c 5b 52  |SL #2]:LDR R9,[R|
0001cac0  34 2c 52 31 30 2c 4c 53  4c 20 23 32 5d 0d c1 ac  |4,R10,LSL #2]...|
0001cad0  18 53 54 4d 49 41 20 52  35 21 2c 7b 52 37 2c 52  |.STMIA R5!,{R7,R|
0001cae0  38 2c 52 39 7d 0d c1 b6  1e 53 55 42 53 20 52 30  |8,R9}....SUBS R0|
0001caf0  2c 52 30 2c 23 38 3a 42  48 49 20 6d 61 70 70 69  |,R0,#8:BHI mappi|
0001cb00  78 6c 70 0d c1 c0 0f 4d  4f 56 53 20 50 43 2c 52  |xlp....MOVS PC,R|
0001cb10  31 34 0d c1 ca 05 5d 0d  c1 d4 08 c9 20 31 36 0d  |14....]..... 16.|
0001cb20  c1 de 0a 5b 4f 50 54 20  5a 0d c1 e8 0c 2e 6d 61  |...[OPT Z.....ma|
0001cb30  70 70 69 78 25 0d c1 f2  10 4c 44 52 20 52 30 2c  |ppix%....LDR R0,|
0001cb40  73 78 6c 6f 63 0d c1 fc  1b 4c 44 52 20 52 31 2c  |sxloc....LDR R1,|
0001cb50  5b 52 39 5d 3a 4c 44 52  20 52 31 2c 5b 52 31 5d  |[R9]:LDR R1,[R1]|
0001cb60  0d c2 06 1e 4c 44 52 20  52 32 2c 5b 52 39 2c 23  |....LDR R2,[R9,#|
0001cb70  38 5d 3a 4c 44 52 20 52  32 2c 5b 52 32 5d 0d c2  |8]:LDR R2,[R2]..|
0001cb80  10 14 4c 44 52 20 52 33  2c 5b 52 39 2c 23 34 2a  |..LDR R3,[R9,#4*|
0001cb90  38 5d 0d c2 1a 14 4c 44  52 20 52 34 2c 5b 52 39  |8]....LDR R4,[R9|
0001cba0  2c 23 33 2a 38 5d 0d c2  24 14 4c 44 52 20 52 35  |,#3*8]..$.LDR R5|
0001cbb0  2c 5b 52 39 2c 23 32 2a  38 5d 0d c2 2e 14 4c 44  |,[R9,#2*8]....LD|
0001cbc0  52 20 52 36 2c 5b 52 39  2c 23 35 2a 38 5d 0d c2  |R R6,[R9,#5*8]..|
0001cbd0  38 14 4c 44 52 20 52 37  2c 5b 52 39 2c 23 36 2a  |8.LDR R7,[R9,#6*|
0001cbe0  38 5d 0d c2 42 14 4c 44  52 20 52 38 2c 5b 52 39  |8]..B.LDR R8,[R9|
0001cbf0  2c 23 37 2a 38 5d 0d c2  4c 0d 43 4d 50 20 52 31  |,#7*8]..L.CMP R1|
0001cc00  2c 52 32 0d c2 56 12 41  44 44 45 51 20 52 32 2c  |,R2..V.ADDEQ R2,|
0001cc10  52 32 2c 23 31 0d c2 60  0d 2e 6d 61 70 70 69 78  |R2,#1..`..mappix|
0001cc20  6c 70 0d c2 6a 2e 4c 44  52 42 20 52 39 2c 5b 52  |lp..j.LDRB R9,[R|
0001cc30  31 5d 2c 23 73 74 65 70  32 34 3a 4c 44 52 42 20  |1],#step24:LDRB |
0001cc40  52 31 30 2c 5b 52 32 5d  2c 23 73 74 65 70 32 34  |R10,[R2],#step24|
0001cc50  0d c2 74 3e 4c 44 52 20  52 39 2c 5b 52 36 2c 52  |..t>LDR R9,[R6,R|
0001cc60  39 2c 4c 53 4c 20 23 32  5d 3a 4c 44 52 20 52 31  |9,LSL #2]:LDR R1|
0001cc70  30 2c 5b 52 37 2c 52 31  30 2c 4c 53 4c 20 23 32  |0,[R7,R10,LSL #2|
0001cc80  5d 3a 84 52 20 52 39 2c  52 39 2c 52 31 30 0d c2  |]:.R R9,R9,R10..|
0001cc90  7e 29 80 20 52 31 30 2c  52 39 2c 23 32 35 35 3a  |~). R10,R9,#255:|
0001cca0  4c 44 52 20 52 31 30 2c  5b 52 33 2c 52 31 30 2c  |LDR R10,[R3,R10,|
0001ccb0  4c 53 4c 20 23 32 5d 0d  c2 88 3c 4d 4f 56 20 52  |LSL #2]...<MOV R|
0001ccc0  31 31 2c 52 39 2c 4c 53  52 20 23 38 3a 80 20 52  |11,R9,LSR #8:. R|
0001ccd0  31 31 2c 52 31 31 2c 23  32 35 35 3a 4c 44 52 20  |11,R11,#255:LDR |
0001cce0  52 31 31 2c 5b 52 34 2c  52 31 31 2c 4c 53 4c 20  |R11,[R4,R11,LSL |
0001ccf0  23 32 5d 0d c2 92 2e 4d  4f 56 20 52 31 32 2c 52  |#2]....MOV R12,R|
0001cd00  39 2c 4c 53 52 20 23 31  36 3a 4c 44 52 20 52 31  |9,LSR #16:LDR R1|
0001cd10  32 2c 5b 52 35 2c 52 31  32 2c 4c 53 4c 20 23 32  |2,[R5,R12,LSL #2|
0001cd20  5d 0d c2 9c 1b 53 54 4d  49 41 20 52 38 21 2c 7b  |]....STMIA R8!,{|
0001cd30  52 31 30 2c 52 31 31 2c  52 31 32 7d 0d c2 a6 1e  |R10,R11,R12}....|
0001cd40  53 55 42 53 20 52 30 2c  52 30 2c 23 31 3a 42 4e  |SUBS R0,R0,#1:BN|
0001cd50  45 20 6d 61 70 70 69 78  6c 70 0d c2 b0 0f 4d 4f  |E mappixlp....MO|
0001cd60  56 53 20 50 43 2c 52 31  34 0d c2 ba 05 5d 0d c2  |VS PC,R14....]..|
0001cd70  c4 08 c9 20 32 34 0d c2  ce 0a 5b 4f 50 54 20 5a  |... 24....[OPT Z|
0001cd80  0d c2 d8 0c 2e 6d 61 70  70 69 78 25 0d c2 e2 10  |.....mappix%....|
0001cd90  4c 44 52 20 52 30 2c 73  78 6c 6f 63 0d c2 ec 20  |LDR R0,sxloc... |
0001cda0  4c 44 52 20 52 31 2c 5b  52 39 2c 23 32 2a 38 5d  |LDR R1,[R9,#2*8]|
0001cdb0  3a 4c 44 52 20 52 31 2c  5b 52 31 5d 0d c2 f6 1e  |:LDR R1,[R1]....|
0001cdc0  4c 44 52 20 52 32 2c 5b  52 39 2c 23 38 5d 3a 4c  |LDR R2,[R9,#8]:L|
0001cdd0  44 52 20 52 32 2c 5b 52  32 5d 0d c3 00 1b 4c 44  |DR R2,[R2]....LD|
0001cde0  52 20 52 33 2c 5b 52 39  5d 3a 4c 44 52 20 52 33  |R R3,[R9]:LDR R3|
0001cdf0  2c 5b 52 33 5d 0d c3 0a  14 4c 44 52 20 52 34 2c  |,[R3]....LDR R4,|
0001ce00  5b 52 39 2c 23 35 2a 38  5d 0d c3 14 14 4c 44 52  |[R9,#5*8]....LDR|
0001ce10  20 52 35 2c 5b 52 39 2c  23 34 2a 38 5d 0d c3 1e  | R5,[R9,#4*8]...|
0001ce20  14 4c 44 52 20 52 36 2c  5b 52 39 2c 23 33 2a 38  |.LDR R6,[R9,#3*8|
0001ce30  5d 0d c3 28 14 4c 44 52  20 52 37 2c 5b 52 39 2c  |]..(.LDR R7,[R9,|
0001ce40  23 36 2a 38 5d 0d c3 32  0d 2e 6d 61 70 70 69 78  |#6*8]..2..mappix|
0001ce50  6c 70 0d c3 3c 2e 4c 44  52 42 20 52 38 2c 5b 52  |lp..<.LDRB R8,[R|
0001ce60  31 5d 2c 23 73 74 65 70  32 34 3a 4c 44 52 20 52  |1],#step24:LDR R|
0001ce70  39 2c 5b 52 34 2c 52 38  2c 4c 53 4c 20 23 32 5d  |9,[R4,R8,LSL #2]|
0001ce80  0d c3 46 2f 4c 44 52 42  20 52 38 2c 5b 52 32 5d  |..F/LDRB R8,[R2]|
0001ce90  2c 23 73 74 65 70 32 34  3a 4c 44 52 20 52 31 30  |,#step24:LDR R10|
0001cea0  2c 5b 52 35 2c 52 38 2c  4c 53 4c 20 23 32 5d 0d  |,[R5,R8,LSL #2].|
0001ceb0  c3 50 2f 4c 44 52 42 20  52 38 2c 5b 52 33 5d 2c  |.P/LDRB R8,[R3],|
0001cec0  23 73 74 65 70 32 34 3a  4c 44 52 20 52 31 31 2c  |#step24:LDR R11,|
0001ced0  5b 52 36 2c 52 38 2c 4c  53 4c 20 23 32 5d 0d c3  |[R6,R8,LSL #2]..|
0001cee0  5a 1a 53 54 4d 49 41 20  52 37 21 2c 7b 52 39 2c  |Z.STMIA R7!,{R9,|
0001cef0  52 31 30 2c 52 31 31 7d  0d c3 64 1e 53 55 42 53  |R10,R11}..d.SUBS|
0001cf00  20 52 30 2c 52 30 2c 23  31 3a 42 4e 45 20 6d 61  | R0,R0,#1:BNE ma|
0001cf10  70 70 69 78 6c 70 0d c3  6e 0f 4d 4f 56 53 20 50  |ppixlp..n.MOVS P|
0001cf20  43 2c 52 31 34 0d c3 78  05 5d 0d c3 82 09 c9 20  |C,R14..x.]..... |
0001cf30  34 32 33 0d c3 8c 0a 5b  4f 50 54 20 5a 0d c3 96  |423....[OPT Z...|
0001cf40  0c 2e 6d 61 70 70 69 78  25 0d c3 a0 10 4c 44 52  |..mappix%....LDR|
0001cf50  20 52 30 2c 73 78 6c 6f  63 0d c3 aa 1b 4c 44 52  | R0,sxloc....LDR|
0001cf60  20 52 31 2c 5b 52 39 5d  3a 4c 44 52 20 52 31 2c  | R1,[R9]:LDR R1,|
0001cf70  5b 52 31 5d 0d c3 b4 14  4c 44 52 20 52 32 2c 5b  |[R1]....LDR R2,[|
0001cf80  52 39 2c 23 31 2a 38 5d  0d c3 be 14 4c 44 52 20  |R9,#1*8]....LDR |
0001cf90  52 33 2c 5b 52 39 2c 23  32 2a 38 5d 0d c3 c8 14  |R3,[R9,#2*8]....|
0001cfa0  4c 44 52 20 52 34 2c 5b  52 39 2c 23 33 2a 38 5d  |LDR R4,[R9,#3*8]|
0001cfb0  0d c3 d2 14 4c 44 52 20  52 35 2c 5b 52 39 2c 23  |....LDR R5,[R9,#|
0001cfc0  34 2a 38 5d 0d c3 dc 14  4c 44 52 20 52 36 2c 5b  |4*8]....LDR R6,[|
0001cfd0  52 39 2c 23 35 2a 38 5d  0d c3 e6 14 4c 44 52 20  |R9,#5*8]....LDR |
0001cfe0  52 37 2c 5b 52 39 2c 23  36 2a 38 5d 0d c3 f0 14  |R7,[R9,#6*8]....|
0001cff0  4c 44 52 20 52 38 2c 5b  52 39 2c 23 37 2a 38 5d  |LDR R8,[R9,#7*8]|
0001d000  0d c3 fa 14 4c 44 52 20  52 39 2c 5b 52 39 2c 23  |....LDR R9,[R9,#|
0001d010  38 2a 38 5d 0d c4 04 14  53 54 4d 46 44 20 53 50  |8*8]....STMFD SP|
0001d020  20 21 2c 7b 52 31 34 7d  0d c4 0e 0d 2e 6d 61 70  | !,{R14}.....map|
0001d030  70 69 78 6c 70 0d c4 18  13 4c 44 52 20 52 31 30  |pixlp....LDR R10|
0001d040  2c 5b 52 31 5d 2c 23 34  0d c4 22 14 80 20 52 31  |,[R1],#4..".. R1|
0001d050  31 2c 52 31 30 2c 23 26  46 46 30 30 0d c4 2c 1b  |1,R10,#&FF00..,.|
0001d060  4c 44 52 20 52 31 31 2c  5b 52 32 2c 52 31 31 2c  |LDR R11,[R2,R11,|
0001d070  4c 53 52 20 23 36 5d 0d  c4 36 3a 80 20 52 31 32  |LSR #6]..6:. R12|
0001d080  2c 52 31 30 2c 23 26 46  46 3a 4c 44 52 20 52 31  |,R10,#&FF:LDR R1|
0001d090  32 2c 5b 52 37 2c 52 31  32 2c 4c 53 4c 20 23 32  |2,[R7,R12,LSL #2|
0001d0a0  5d 3a 41 44 44 20 52 31  34 2c 52 31 32 2c 52 31  |]:ADD R14,R12,R1|
0001d0b0  31 0d c4 40 40 80 20 52  31 32 2c 52 31 30 2c 23  |1..@@. R12,R10,#|
0001d0c0  26 46 46 30 30 30 30 3a  4c 44 52 20 52 31 32 2c  |&FF0000:LDR R12,|
0001d0d0  5b 52 38 2c 52 31 32 2c  4c 53 52 20 23 31 34 5d  |[R8,R12,LSR #14]|
0001d0e0  3a 41 44 44 53 20 52 31  34 2c 52 31 34 2c 52 31  |:ADDS R14,R14,R1|
0001d0f0  32 0d c4 4a 38 4d 4f 56  4d 49 20 52 31 34 2c 23  |2..J8MOVMI R14,#|
0001d100  30 3a 43 4d 50 20 52 31  34 2c 23 46 3a 4d 4f 56  |0:CMP R14,#F:MOV|
0001d110  43 53 20 52 31 34 2c 23  46 3a 53 54 52 20 52 31  |CS R14,#F:STR R1|
0001d120  34 2c 5b 52 39 5d 2c 23  34 0d c4 54 3a 80 20 52  |4,[R9],#4..T:. R|
0001d130  31 32 2c 52 31 30 2c 23  26 46 46 3a 4c 44 52 20  |12,R10,#&FF:LDR |
0001d140  52 31 32 2c 5b 52 35 2c  52 31 32 2c 4c 53 4c 20  |R12,[R5,R12,LSL |
0001d150  23 32 5d 3a 41 44 44 20  52 31 34 2c 52 31 32 2c  |#2]:ADD R14,R12,|
0001d160  52 31 31 0d c4 5e 40 80  20 52 31 32 2c 52 31 30  |R11..^@. R12,R10|
0001d170  2c 23 26 46 46 30 30 30  30 3a 4c 44 52 20 52 31  |,#&FF0000:LDR R1|
0001d180  32 2c 5b 52 36 2c 52 31  32 2c 4c 53 52 20 23 31  |2,[R6,R12,LSR #1|
0001d190  34 5d 3a 41 44 44 53 20  52 31 34 2c 52 31 34 2c  |4]:ADDS R14,R14,|
0001d1a0  52 31 32 0d c4 68 38 4d  4f 56 4d 49 20 52 31 34  |R12..h8MOVMI R14|
0001d1b0  2c 23 30 3a 43 4d 50 20  52 31 34 2c 23 46 3a 4d  |,#0:CMP R14,#F:M|
0001d1c0  4f 56 43 53 20 52 31 34  2c 23 46 3a 53 54 52 20  |OVCS R14,#F:STR |
0001d1d0  52 31 34 2c 5b 52 39 5d  2c 23 34 0d c4 72 3a 80  |R14,[R9],#4..r:.|
0001d1e0  20 52 31 32 2c 52 31 30  2c 23 26 46 46 3a 4c 44  | R12,R10,#&FF:LD|
0001d1f0  52 20 52 31 32 2c 5b 52  33 2c 52 31 32 2c 4c 53  |R R12,[R3,R12,LS|
0001d200  4c 20 23 32 5d 3a 41 44  44 20 52 31 34 2c 52 31  |L #2]:ADD R14,R1|
0001d210  32 2c 52 31 31 0d c4 7c  40 80 20 52 31 32 2c 52  |2,R11..|@. R12,R|
0001d220  31 30 2c 23 26 46 46 30  30 30 30 3a 4c 44 52 20  |10,#&FF0000:LDR |
0001d230  52 31 32 2c 5b 52 34 2c  52 31 32 2c 4c 53 52 20  |R12,[R4,R12,LSR |
0001d240  23 31 34 5d 3a 41 44 44  53 20 52 31 34 2c 52 31  |#14]:ADDS R14,R1|
0001d250  34 2c 52 31 32 0d c4 86  38 4d 4f 56 4d 49 20 52  |4,R12...8MOVMI R|
0001d260  31 34 2c 23 30 3a 43 4d  50 20 52 31 34 2c 23 46  |14,#0:CMP R14,#F|
0001d270  3a 4d 4f 56 43 53 20 52  31 34 2c 23 46 3a 53 54  |:MOVCS R14,#F:ST|
0001d280  52 20 52 31 34 2c 5b 52  39 5d 2c 23 34 0d c4 90  |R R14,[R9],#4...|
0001d290  18 80 20 52 31 31 2c 52  31 30 2c 23 26 46 46 30  |.. R11,R10,#&FF0|
0001d2a0  30 30 30 30 30 0d c4 9a  1c 4c 44 52 20 52 31 31  |00000....LDR R11|
0001d2b0  2c 5b 52 32 2c 52 31 31  2c 4c 53 52 20 23 32 32  |,[R2,R11,LSR #22|
0001d2c0  5d 0d c4 a4 3a 80 20 52  31 32 2c 52 31 30 2c 23  |]...:. R12,R10,#|
0001d2d0  26 46 46 3a 4c 44 52 20  52 31 32 2c 5b 52 37 2c  |&FF:LDR R12,[R7,|
0001d2e0  52 31 32 2c 4c 53 4c 20  23 32 5d 3a 41 44 44 20  |R12,LSL #2]:ADD |
0001d2f0  52 31 34 2c 52 31 32 2c  52 31 31 0d c4 ae 40 80  |R14,R12,R11...@.|
0001d300  20 52 31 32 2c 52 31 30  2c 23 26 46 46 30 30 30  | R12,R10,#&FF000|
0001d310  30 3a 4c 44 52 20 52 31  32 2c 5b 52 38 2c 52 31  |0:LDR R12,[R8,R1|
0001d320  32 2c 4c 53 52 20 23 31  34 5d 3a 41 44 44 53 20  |2,LSR #14]:ADDS |
0001d330  52 31 34 2c 52 31 34 2c  52 31 32 0d c4 b8 38 4d  |R14,R14,R12...8M|
0001d340  4f 56 4d 49 20 52 31 34  2c 23 30 3a 43 4d 50 20  |OVMI R14,#0:CMP |
0001d350  52 31 34 2c 23 46 3a 4d  4f 56 43 53 20 52 31 34  |R14,#F:MOVCS R14|
0001d360  2c 23 46 3a 53 54 52 20  52 31 34 2c 5b 52 39 5d  |,#F:STR R14,[R9]|
0001d370  2c 23 34 0d c4 c2 3a 80  20 52 31 32 2c 52 31 30  |,#4...:. R12,R10|
0001d380  2c 23 26 46 46 3a 4c 44  52 20 52 31 32 2c 5b 52  |,#&FF:LDR R12,[R|
0001d390  35 2c 52 31 32 2c 4c 53  4c 20 23 32 5d 3a 41 44  |5,R12,LSL #2]:AD|
0001d3a0  44 20 52 31 34 2c 52 31  32 2c 52 31 31 0d c4 cc  |D R14,R12,R11...|
0001d3b0  40 80 20 52 31 32 2c 52  31 30 2c 23 26 46 46 30  |@. R12,R10,#&FF0|
0001d3c0  30 30 30 3a 4c 44 52 20  52 31 32 2c 5b 52 36 2c  |000:LDR R12,[R6,|
0001d3d0  52 31 32 2c 4c 53 52 20  23 31 34 5d 3a 41 44 44  |R12,LSR #14]:ADD|
0001d3e0  53 20 52 31 34 2c 52 31  34 2c 52 31 32 0d c4 d6  |S R14,R14,R12...|
0001d3f0  38 4d 4f 56 4d 49 20 52  31 34 2c 23 30 3a 43 4d  |8MOVMI R14,#0:CM|
0001d400  50 20 52 31 34 2c 23 46  3a 4d 4f 56 43 53 20 52  |P R14,#F:MOVCS R|
0001d410  31 34 2c 23 46 3a 53 54  52 20 52 31 34 2c 5b 52  |14,#F:STR R14,[R|
0001d420  39 5d 2c 23 34 0d c4 e0  3a 80 20 52 31 32 2c 52  |9],#4...:. R12,R|
0001d430  31 30 2c 23 26 46 46 3a  4c 44 52 20 52 31 32 2c  |10,#&FF:LDR R12,|
0001d440  5b 52 33 2c 52 31 32 2c  4c 53 4c 20 23 32 5d 3a  |[R3,R12,LSL #2]:|
0001d450  41 44 44 20 52 31 34 2c  52 31 32 2c 52 31 31 0d  |ADD R14,R12,R11.|
0001d460  c4 ea 40 80 20 52 31 32  2c 52 31 30 2c 23 26 46  |..@. R12,R10,#&F|
0001d470  46 30 30 30 30 3a 4c 44  52 20 52 31 32 2c 5b 52  |F0000:LDR R12,[R|
0001d480  34 2c 52 31 32 2c 4c 53  52 20 23 31 34 5d 3a 41  |4,R12,LSR #14]:A|
0001d490  44 44 53 20 52 31 34 2c  52 31 34 2c 52 31 32 0d  |DDS R14,R14,R12.|
0001d4a0  c4 f4 38 4d 4f 56 4d 49  20 52 31 34 2c 23 30 3a  |..8MOVMI R14,#0:|
0001d4b0  43 4d 50 20 52 31 34 2c  23 46 3a 4d 4f 56 43 53  |CMP R14,#F:MOVCS|
0001d4c0  20 52 31 34 2c 23 46 3a  53 54 52 20 52 31 34 2c  | R14,#F:STR R14,|
0001d4d0  5b 52 39 5d 2c 23 34 0d  c4 fe 1e 53 55 42 53 20  |[R9],#4....SUBS |
0001d4e0  52 30 2c 52 30 2c 23 32  3a 42 4e 45 20 6d 61 70  |R0,R0,#2:BNE map|
0001d4f0  70 69 78 6c 70 0d c5 08  14 4c 44 4d 46 44 20 53  |pixlp....LDMFD S|
0001d500  50 20 21 2c 7b 50 43 7d  5e 0d c5 12 05 5d 0d c5  |P !,{PC}^....]..|
0001d510  1c 09 c9 20 34 32 32 0d  c5 26 0a 5b 4f 50 54 20  |... 422..&.[OPT |
0001d520  5a 0d c5 30 0c 2e 6d 61  70 70 69 78 25 0d c5 3a  |Z..0..mappix%..:|
0001d530  10 4c 44 52 20 52 30 2c  73 78 6c 6f 63 0d c5 44  |.LDR R0,sxloc..D|
0001d540  1b 4c 44 52 20 52 31 2c  5b 52 39 5d 3a 4c 44 52  |.LDR R1,[R9]:LDR|
0001d550  20 52 31 2c 5b 52 31 5d  0d c5 4e 14 4c 44 52 20  | R1,[R1]..N.LDR |
0001d560  52 32 2c 5b 52 39 2c 23  31 2a 38 5d 0d c5 58 14  |R2,[R9,#1*8]..X.|
0001d570  4c 44 52 20 52 33 2c 5b  52 39 2c 23 32 2a 38 5d  |LDR R3,[R9,#2*8]|
0001d580  0d c5 62 14 4c 44 52 20  52 35 2c 5b 52 39 2c 23  |..b.LDR R5,[R9,#|
0001d590  34 2a 38 5d 0d c5 6c 14  4c 44 52 20 52 36 2c 5b  |4*8]..l.LDR R6,[|
0001d5a0  52 39 2c 23 35 2a 38 5d  0d c5 76 14 4c 44 52 20  |R9,#5*8]..v.LDR |
0001d5b0  52 37 2c 5b 52 39 2c 23  36 2a 38 5d 0d c5 80 14  |R7,[R9,#6*8]....|
0001d5c0  4c 44 52 20 52 39 2c 5b  52 39 2c 23 38 2a 38 5d  |LDR R9,[R9,#8*8]|
0001d5d0  0d c5 8a 14 53 54 4d 46  44 20 53 50 20 21 2c 7b  |....STMFD SP !,{|
0001d5e0  52 31 34 7d 0d c5 94 0d  2e 6d 61 70 70 69 78 6c  |R14}.....mappixl|
0001d5f0  70 0d c5 9e 13 4c 44 52  20 52 31 30 2c 5b 52 31  |p....LDR R10,[R1|
0001d600  5d 2c 23 34 0d c5 a8 14  80 20 52 31 31 2c 52 31  |],#4..... R11,R1|
0001d610  30 2c 23 26 46 46 30 30  0d c5 b2 1b 4c 44 52 20  |0,#&FF00....LDR |
0001d620  52 31 31 2c 5b 52 32 2c  52 31 31 2c 4c 53 52 20  |R11,[R2,R11,LSR |
0001d630  23 36 5d 0d c5 bc 40 80  20 52 31 32 2c 52 31 30  |#6]...@. R12,R10|
0001d640  2c 23 26 46 46 30 30 30  30 3a 4c 44 52 20 52 31  |,#&FF0000:LDR R1|
0001d650  32 2c 5b 52 37 2c 52 31  32 2c 4c 53 52 20 23 31  |2,[R7,R12,LSR #1|
0001d660  34 5d 3a 41 44 44 53 20  52 31 34 2c 52 31 32 2c  |4]:ADDS R14,R12,|
0001d670  52 31 31 0d c5 c6 38 4d  4f 56 4d 49 20 52 31 34  |R11...8MOVMI R14|
0001d680  2c 23 30 3a 43 4d 50 20  52 31 34 2c 23 46 3a 4d  |,#0:CMP R14,#F:M|
0001d690  4f 56 43 53 20 52 31 34  2c 23 46 3a 53 54 52 20  |OVCS R14,#F:STR |
0001d6a0  52 31 34 2c 5b 52 39 5d  2c 23 34 0d c5 d0 3a 80  |R14,[R9],#4...:.|
0001d6b0  20 52 31 32 2c 52 31 30  2c 23 26 46 46 3a 4c 44  | R12,R10,#&FF:LD|
0001d6c0  52 20 52 31 32 2c 5b 52  35 2c 52 31 32 2c 4c 53  |R R12,[R5,R12,LS|
0001d6d0  4c 20 23 32 5d 3a 41 44  44 20 52 31 34 2c 52 31  |L #2]:ADD R14,R1|
0001d6e0  32 2c 52 31 31 0d c5 da  40 80 20 52 31 32 2c 52  |2,R11...@. R12,R|
0001d6f0  31 30 2c 23 26 46 46 30  30 30 30 3a 4c 44 52 20  |10,#&FF0000:LDR |
0001d700  52 31 32 2c 5b 52 36 2c  52 31 32 2c 4c 53 52 20  |R12,[R6,R12,LSR |
0001d710  23 31 34 5d 3a 41 44 44  53 20 52 31 34 2c 52 31  |#14]:ADDS R14,R1|
0001d720  34 2c 52 31 32 0d c5 e4  38 4d 4f 56 4d 49 20 52  |4,R12...8MOVMI R|
0001d730  31 34 2c 23 30 3a 43 4d  50 20 52 31 34 2c 23 46  |14,#0:CMP R14,#F|
0001d740  3a 4d 4f 56 43 53 20 52  31 34 2c 23 46 3a 53 54  |:MOVCS R14,#F:ST|
0001d750  52 20 52 31 34 2c 5b 52  39 5d 2c 23 34 0d c5 ee  |R R14,[R9],#4...|
0001d760  3b 80 20 52 31 32 2c 52  31 30 2c 23 26 46 46 3a  |;. R12,R10,#&FF:|
0001d770  4c 44 52 20 52 31 32 2c  5b 52 33 2c 52 31 32 2c  |LDR R12,[R3,R12,|
0001d780  4c 53 4c 20 23 32 5d 3a  41 44 44 53 20 52 31 34  |LSL #2]:ADDS R14|
0001d790  2c 52 31 32 2c 52 31 31  0d c5 f8 38 4d 4f 56 4d  |,R12,R11...8MOVM|
0001d7a0  49 20 52 31 34 2c 23 30  3a 43 4d 50 20 52 31 34  |I R14,#0:CMP R14|
0001d7b0  2c 23 46 3a 4d 4f 56 43  53 20 52 31 34 2c 23 46  |,#F:MOVCS R14,#F|
0001d7c0  3a 53 54 52 20 52 31 34  2c 5b 52 39 5d 2c 23 34  |:STR R14,[R9],#4|
0001d7d0  0d c6 02 18 80 20 52 31  31 2c 52 31 30 2c 23 26  |..... R11,R10,#&|
0001d7e0  46 46 30 30 30 30 30 30  0d c6 0c 1c 4c 44 52 20  |FF000000....LDR |
0001d7f0  52 31 31 2c 5b 52 32 2c  52 31 31 2c 4c 53 52 20  |R11,[R2,R11,LSR |
0001d800  23 32 32 5d 0d c6 16 40  80 20 52 31 32 2c 52 31  |#22]...@. R12,R1|
0001d810  30 2c 23 26 46 46 30 30  30 30 3a 4c 44 52 20 52  |0,#&FF0000:LDR R|
0001d820  31 32 2c 5b 52 37 2c 52  31 32 2c 4c 53 52 20 23  |12,[R7,R12,LSR #|
0001d830  31 34 5d 3a 41 44 44 53  20 52 31 34 2c 52 31 32  |14]:ADDS R14,R12|
0001d840  2c 52 31 31 0d c6 20 38  4d 4f 56 4d 49 20 52 31  |,R11.. 8MOVMI R1|
0001d850  34 2c 23 30 3a 43 4d 50  20 52 31 34 2c 23 46 3a  |4,#0:CMP R14,#F:|
0001d860  4d 4f 56 43 53 20 52 31  34 2c 23 46 3a 53 54 52  |MOVCS R14,#F:STR|
0001d870  20 52 31 34 2c 5b 52 39  5d 2c 23 34 0d c6 2a 3a  | R14,[R9],#4..*:|
0001d880  80 20 52 31 32 2c 52 31  30 2c 23 26 46 46 3a 4c  |. R12,R10,#&FF:L|
0001d890  44 52 20 52 31 32 2c 5b  52 35 2c 52 31 32 2c 4c  |DR R12,[R5,R12,L|
0001d8a0  53 4c 20 23 32 5d 3a 41  44 44 20 52 31 34 2c 52  |SL #2]:ADD R14,R|
0001d8b0  31 32 2c 52 31 31 0d c6  34 40 80 20 52 31 32 2c  |12,R11..4@. R12,|
0001d8c0  52 31 30 2c 23 26 46 46  30 30 30 30 3a 4c 44 52  |R10,#&FF0000:LDR|
0001d8d0  20 52 31 32 2c 5b 52 36  2c 52 31 32 2c 4c 53 52  | R12,[R6,R12,LSR|
0001d8e0  20 23 31 34 5d 3a 41 44  44 53 20 52 31 34 2c 52  | #14]:ADDS R14,R|
0001d8f0  31 34 2c 52 31 32 0d c6  3e 38 4d 4f 56 4d 49 20  |14,R12..>8MOVMI |
0001d900  52 31 34 2c 23 30 3a 43  4d 50 20 52 31 34 2c 23  |R14,#0:CMP R14,#|
0001d910  46 3a 4d 4f 56 43 53 20  52 31 34 2c 23 46 3a 53  |F:MOVCS R14,#F:S|
0001d920  54 52 20 52 31 34 2c 5b  52 39 5d 2c 23 34 0d c6  |TR R14,[R9],#4..|
0001d930  48 3b 80 20 52 31 32 2c  52 31 30 2c 23 26 46 46  |H;. R12,R10,#&FF|
0001d940  3a 4c 44 52 20 52 31 32  2c 5b 52 33 2c 52 31 32  |:LDR R12,[R3,R12|
0001d950  2c 4c 53 4c 20 23 32 5d  3a 41 44 44 53 20 52 31  |,LSL #2]:ADDS R1|
0001d960  34 2c 52 31 32 2c 52 31  31 0d c6 52 38 4d 4f 56  |4,R12,R11..R8MOV|
0001d970  4d 49 20 52 31 34 2c 23  30 3a 43 4d 50 20 52 31  |MI R14,#0:CMP R1|
0001d980  34 2c 23 46 3a 4d 4f 56  43 53 20 52 31 34 2c 23  |4,#F:MOVCS R14,#|
0001d990  46 3a 53 54 52 20 52 31  34 2c 5b 52 39 5d 2c 23  |F:STR R14,[R9],#|
0001d9a0  34 0d c6 5c 1e 53 55 42  53 20 52 30 2c 52 30 2c  |4..\.SUBS R0,R0,|
0001d9b0  23 32 3a 42 4e 45 20 6d  61 70 70 69 78 6c 70 0d  |#2:BNE mappixlp.|
0001d9c0  c6 66 14 4c 44 4d 46 44  20 53 50 20 21 2c 7b 50  |.f.LDMFD SP !,{P|
0001d9d0  43 7d 5e 0d c6 70 05 5d  0d c6 7a 05 cb 0d c6 84  |C}^..p.]..z.....|
0001d9e0  0a 5b 4f 50 54 20 5a 0d  c6 8e 0d 2e 78 73 61 6d  |.[OPT Z.....xsam|
0001d9f0  70 6c 65 25 0d c6 98 1b  4c 44 52 20 52 30 2c 5b  |ple%....LDR R0,[|
0001da00  52 39 5d 3a 4c 44 52 20  52 30 2c 5b 52 30 5d 0d  |R9]:LDR R0,[R0].|
0001da10  c6 a2 12 4c 44 52 20 52  31 2c 5b 52 39 2c 23 38  |...LDR R1,[R9,#8|
0001da20  5d 0d c6 ac 14 4c 44 52  20 52 32 2c 5b 52 39 2c  |]....LDR R2,[R9,|
0001da30  23 32 2a 38 5d 0d c6 b6  20 4c 44 52 20 52 33 2c  |#2*8]... LDR R3,|
0001da40  5b 52 39 2c 23 33 2a 38  5d 3a 4c 44 52 20 52 33  |[R9,#3*8]:LDR R3|
0001da50  2c 5b 52 33 5d 0d c6 c0  20 4c 44 52 20 52 34 2c  |,[R3]... LDR R4,|
0001da60  5b 52 39 2c 23 34 2a 38  5d 3a 4c 44 52 20 52 34  |[R9,#4*8]:LDR R4|
0001da70  2c 5b 52 34 5d 0d c6 ca  0e 4d 4f 56 20 52 31 31  |,[R4]....MOV R11|
0001da80  2c 52 34 0d c6 d4 0e 2e  78 73 61 6d 70 6c 65 6c  |,R4.....xsamplel|
0001da90  70 0d c6 de 17 4c 44 4d  49 41 20 52 31 2c 7b 52  |p....LDMIA R1,{R|
0001daa0  35 2c 52 36 2c 52 37 7d  0d c6 e8 2d 53 55 42 53  |5,R6,R7}...-SUBS|
0001dab0  20 52 31 31 2c 52 31 31  2c 23 31 3a ec 51 20 52  | R11,R11,#1:.Q R|
0001dac0  31 31 2c 52 34 3a 41 44  44 45 51 20 52 31 2c 52  |11,R4:ADDEQ R1,R|
0001dad0  31 2c 23 31 32 0d c6 f2  12 53 55 42 53 20 52 31  |1,#12....SUBS R1|
0001dae0  32 2c 52 33 2c 23 31 0d  c6 fc 10 42 45 51 20 78  |2,R3,#1....BEQ x|
0001daf0  64 6f 6e 65 64 69 76 0d  c7 06 0b 2e 78 64 69 76  |donediv.....xdiv|
0001db00  6c 70 0d c7 10 0f 43 4d  50 20 52 31 32 2c 52 31  |lp....CMP R12,R1|
0001db10  31 0d c7 1a 0f 42 43 43  20 78 64 69 76 6c 70 32  |1....BCC xdivlp2|
0001db20  0d c7 24 4d 4c 44 4d 49  41 20 52 31 21 2c 7b 52  |..$MLDMIA R1!,{R|
0001db30  38 2c 52 39 2c 52 31 30  7d 3a 4d 4c 41 20 52 35  |8,R9,R10}:MLA R5|
0001db40  2c 52 38 2c 52 31 31 2c  52 35 3a 4d 4c 41 20 52  |,R8,R11,R5:MLA R|
0001db50  36 2c 52 39 2c 52 31 31  2c 52 36 3a 4d 4c 41 20  |6,R9,R11,R6:MLA |
0001db60  52 37 2c 52 31 30 2c 52  31 31 2c 52 37 0d c7 2e  |R7,R10,R11,R7...|
0001db70  1f 53 55 42 53 20 52 31  32 2c 52 31 32 2c 52 31  |.SUBS R12,R12,R1|
0001db80  31 3a 4d 4f 56 20 52 31  31 2c 52 34 0d c7 38 0e  |1:MOV R11,R4..8.|
0001db90  42 4e 45 20 78 64 69 76  6c 70 0d c7 42 0e 42 20  |BNE xdivlp..B.B |
0001dba0  78 64 6f 6e 65 64 69 76  0d c7 4c 0c 2e 78 64 69  |xdonediv..L..xdi|
0001dbb0  76 6c 70 32 0d c7 56 18  4c 44 4d 49 41 20 52 31  |vlp2..V.LDMIA R1|
0001dbc0  2c 7b 52 38 2c 52 39 2c  52 31 30 7d 0d c7 60 2d  |,{R8,R9,R10}..`-|
0001dbd0  53 55 42 53 20 52 31 31  2c 52 31 31 2c 23 31 3a  |SUBS R11,R11,#1:|
0001dbe0  ec 51 20 52 31 31 2c 52  34 3a 41 44 44 45 51 20  |.Q R11,R4:ADDEQ |
0001dbf0  52 31 2c 52 31 2c 23 31  32 0d c7 6a 2b 41 44 44  |R1,R1,#12..j+ADD|
0001dc00  20 52 35 2c 52 35 2c 52  38 3a 41 44 44 20 52 36  | R5,R5,R8:ADD R6|
0001dc10  2c 52 36 2c 52 39 3a 41  44 44 20 52 37 2c 52 37  |,R6,R9:ADD R7,R7|
0001dc20  2c 52 31 30 0d c7 74 1e  53 55 42 53 20 52 31 32  |,R10..t.SUBS R12|
0001dc30  2c 52 31 32 2c 23 31 3a  42 4e 45 20 78 64 69 76  |,R12,#1:BNE xdiv|
0001dc40  6c 70 0d c7 7e 0d 2e 78  64 6f 6e 65 64 69 76 0d  |lp..~..xdonediv.|
0001dc50  c7 88 18 53 54 4d 49 41  20 52 32 21 2c 7b 52 35  |...STMIA R2!,{R5|
0001dc60  2c 52 36 2c 52 37 7d 0d  c7 92 1f 53 55 42 53 20  |,R6,R7}....SUBS |
0001dc70  52 30 2c 52 30 2c 23 31  3a 42 50 4c 20 78 73 61  |R0,R0,#1:BPL xsa|
0001dc80  6d 70 6c 65 6c 70 0d c7  9c 0f 4d 4f 56 53 20 50  |mplelp....MOVS P|
0001dc90  43 2c 52 31 34 0d c7 a6  05 5d 0d c7 b0 05 cb 0d  |C,R14....]......|
0001dca0  c7 ba 14 e7 63 6f 6d 70  72 65 73 73 69 6f 6e 3d  |....compression=|
0001dcb0  35 20 8c 0d c7 c4 0a 5b  4f 50 54 20 5a 0d c7 ce  |5 .....[OPT Z...|
0001dcc0  14 2e 66 69 72 73 74 63  6f 64 65 20 44 43 44 20  |..firstcode DCD |
0001dcd0  30 0d c7 d8 12 2e 6f 6c  64 63 6f 64 65 20 44 43  |0.....oldcode DC|
0001dce0  44 20 30 0d c7 e2 1d 2e  63 6f 64 65 73 69 7a 65  |D 0.....codesize|
0001dcf0  20 44 43 44 20 73 65 74  63 6f 64 65 73 25 2b 31  | DCD setcodes%+1|
0001dd00  0d c7 ec 13 2e 73 74 61  63 6b 20 44 43 44 20 73  |.....stack DCD s|
0001dd10  74 6b 25 0d c7 f6 10 2e  73 70 20 44 43 44 20 73  |tk%.....sp DCD s|
0001dd20  74 6b 25 0d c8 00 1d 2e  6d 61 78 63 6f 64 65 20  |tk%.....maxcode |
0001dd30  44 43 44 20 63 6c 65 61  72 63 6f 64 65 25 2b 32  |DCD clearcode%+2|
0001dd40  0d c8 0a 21 2e 6d 61 78  63 6f 64 65 73 69 7a 65  |...!.maxcodesize|
0001dd50  20 44 43 44 20 32 2a 63  6c 65 61 72 63 6f 64 65  | DCD 2*clearcode|
0001dd60  25 0d c8 14 0f 2e 4c 5a  57 64 65 63 6f 64 65 25  |%.....LZWdecode%|
0001dd70  0d c8 1e 40 4c 44 52 20  52 32 2c 66 69 72 73 74  |...@LDR R2,first|
0001dd80  63 6f 64 65 3a 4c 44 52  20 52 33 2c 6f 6c 64 63  |code:LDR R3,oldc|
0001dd90  6f 64 65 3a 4c 44 52 20  52 34 2c 73 74 61 63 6b  |ode:LDR R4,stack|
0001dda0  3a 4c 44 52 20 52 35 2c  63 6f 64 65 73 69 7a 65  |:LDR R5,codesize|
0001ddb0  0d c8 28 2f 4c 44 52 20  52 36 2c 73 70 3a 4c 44  |..(/LDR R6,sp:LD|
0001ddc0  52 20 52 37 2c 6d 61 78  63 6f 64 65 3a 4c 44 52  |R R7,maxcode:LDR|
0001ddd0  20 52 38 2c 6d 61 78 63  6f 64 65 73 69 7a 65 0d  | R8,maxcodesize.|
0001dde0  c8 32 1e 4c 44 52 20 52  31 30 2c 5b 52 39 5d 3a  |.2.LDR R10,[R9]:|
0001ddf0  4c 44 52 20 52 31 30 2c  5b 52 31 30 5d 0d c8 3c  |LDR R10,[R10]..<|
0001de00  21 4c 44 52 20 52 31 31  2c 5b 52 39 2c 23 38 5d  |!LDR R11,[R9,#8]|
0001de10  3a 4c 44 52 20 52 31 31  2c 5b 52 31 31 5d 0d c8  |:LDR R11,[R11]..|
0001de20  46 14 4c 44 52 20 52 31  32 2c 5b 52 39 2c 23 32  |F.LDR R12,[R9,#2|
0001de30  34 5d 0d c8 50 14 53 54  4d 46 44 20 53 50 20 21  |4]..P.STMFD SP !|
0001de40  2c 7b 52 31 34 7d 0d c8  5a 0c 2e 6c 7a 77 6c 6f  |,{R14}..Z..lzwlo|
0001de50  6f 70 0d c8 64 0d 43 4d  50 20 52 36 2c 52 34 0d  |op..d.CMP R6,R4.|
0001de60  c8 6e 12 42 48 49 20 6c  7a 77 75 6e 73 74 61 63  |.n.BHI lzwunstac|
0001de70  6b 0d c8 78 0e 2e 6c 7a  77 65 6e 67 69 6e 65 0d  |k..x..lzwengine.|
0001de80  c8 82 0e 42 4c 20 67 65  74 63 6f 64 65 0d c8 8c  |...BL getcode...|
0001de90  16 43 4d 50 20 52 30 2c  23 63 6c 65 61 72 63 6f  |.CMP R0,#clearco|
0001dea0  64 65 25 0d c8 96 10 42  45 51 20 6c 7a 77 63 6c  |de%....BEQ lzwcl|
0001deb0  65 61 72 0d c8 a0 0d 4d  4f 56 20 52 31 2c 52 30  |ear....MOV R1,R0|
0001dec0  0d c8 aa 0d 43 4d 50 20  52 30 2c 52 37 0d c8 b4  |....CMP R0,R7...|
0001ded0  15 53 54 52 43 53 42 20  52 32 2c 5b 52 36 5d 2c  |.STRCSB R2,[R6],|
0001dee0  23 31 0d c8 be 0f 4d 4f  56 43 53 20 52 30 2c 52  |#1....MOVCS R0,R|
0001def0  33 0d c8 c8 16 43 4d 50  20 52 30 2c 23 63 6c 65  |3....CMP R0,#cle|
0001df00  61 72 63 6f 64 65 25 0d  c8 d2 13 42 43 43 20 6c  |arcode%....BCC l|
0001df10  7a 77 64 6f 6e 65 70 75  73 68 0d c8 dc 11 2e 6c  |zwdonepush.....l|
0001df20  7a 77 70 75 73 68 74 61  62 6c 65 0d c8 e6 1b 4c  |zwpushtable....L|
0001df30  44 52 20 52 31 34 2c 5b  52 31 32 2c 52 30 2c 4c  |DR R14,[R12,R0,L|
0001df40  53 4c 20 23 32 5d 0d c8  f0 14 53 54 52 42 20 52  |SL #2]....STRB R|
0001df50  31 34 2c 5b 52 36 5d 2c  23 31 0d c8 fa 16 4d 4f  |14,[R6],#1....MO|
0001df60  56 20 52 30 2c 52 31 34  2c 4c 53 52 20 23 31 36  |V R0,R14,LSR #16|
0001df70  0d c9 04 16 43 4d 50 20  52 30 2c 23 63 6c 65 61  |....CMP R0,#clea|
0001df80  72 63 6f 64 65 25 0d c9  0e 14 42 43 53 20 6c 7a  |rcode%....BCS lz|
0001df90  77 70 75 73 68 74 61 62  6c 65 0d c9 18 10 2e 6c  |wpushtable.....l|
0001dfa0  7a 77 64 6f 6e 65 70 75  73 68 0d c9 22 1a 4c 44  |zwdonepush..".LD|
0001dfb0  52 20 52 32 2c 5b 52 31  32 2c 52 30 2c 4c 53 4c  |R R2,[R12,R0,LSL|
0001dfc0  20 23 32 5d 0d c9 2c 16  42 49 43 20 52 32 2c 52  | #2]..,.BIC R2,R|
0001dfd0  32 2c 23 26 46 46 30 30  30 30 0d c9 36 18 42 49  |2,#&FF0000..6.BI|
0001dfe0  43 20 52 32 2c 52 32 2c  23 26 46 46 30 30 30 30  |C R2,R2,#&FF0000|
0001dff0  30 30 0d c9 40 13 53 54  52 42 20 52 32 2c 5b 52  |00..@.STRB R2,[R|
0001e000  36 5d 2c 23 31 0d c9 4a  10 43 4d 50 20 52 37 2c  |6],#1..J.CMP R7,|
0001e010  23 34 30 39 36 0d c9 54  11 42 43 53 20 6c 7a 77  |#4096..T.BCS lzw|
0001e020  6e 6f 63 6f 64 65 0d c9  5e 17 84 52 20 52 30 2c  |nocode..^..R R0,|
0001e030  52 32 2c 52 33 2c 4c 53  4c 20 23 31 36 0d c9 68  |R2,R3,LSL #16..h|
0001e040  1a 53 54 52 20 52 30 2c  5b 52 31 32 2c 52 37 2c  |.STR R0,[R12,R7,|
0001e050  4c 53 4c 20 23 32 5d 0d  c9 72 10 41 44 44 20 52  |LSL #2]..r.ADD R|
0001e060  37 2c 52 37 2c 23 31 0d  c9 7c 0d 43 4d 50 20 52  |7,R7,#1..|.CMP R|
0001e070  37 2c 52 38 0d c9 86 11  42 43 43 20 6c 7a 77 6e  |7,R8....BCC lzwn|
0001e080  6f 63 6f 64 65 0d c9 90  10 43 4d 50 20 52 38 2c  |ocode....CMP R8,|
0001e090  23 34 30 39 36 0d c9 9a  12 41 44 44 43 43 20 52  |#4096....ADDCC R|
0001e0a0  35 2c 52 35 2c 23 31 0d  c9 a4 16 4d 4f 56 43 43  |5,R5,#1....MOVCC|
0001e0b0  20 52 38 2c 52 38 2c 4c  53 4c 20 23 31 0d c9 ae  | R8,R8,LSL #1...|
0001e0c0  05 5d 0d c9 b8 10 e7 66  6c 61 67 3d 31 35 30 30  |.].....flag=1500|
0001e0d0  20 8c 0d c9 c2 0a 5b 4f  50 54 20 5a 0d c9 cc 11  | .....[OPT Z....|
0001e0e0  84 52 43 43 20 52 38 2c  52 38 2c 23 31 0d c9 d6  |.RCC R8,R8,#1...|
0001e0f0  05 5d 0d c9 e0 05 cd 0d  c9 ea 0a 5b 4f 50 54 20  |.].........[OPT |
0001e100  5a 0d c9 f4 0e 2e 6c 7a  77 6e 6f 63 6f 64 65 0d  |Z.....lzwnocode.|
0001e110  c9 fe 0d 4d 4f 56 20 52  33 2c 52 31 0d ca 08 0d  |...MOV R3,R1....|
0001e120  43 4d 50 20 52 36 2c 52  34 0d ca 12 11 42 4c 53  |CMP R6,R4....BLS|
0001e130  20 6c 7a 77 65 6e 67 69  6e 65 0d ca 1c 0f 2e 6c  | lzwengine.....l|
0001e140  7a 77 75 6e 73 74 61 63  6b 0d ca 26 15 4c 44 52  |zwunstack..&.LDR|
0001e150  42 20 52 30 2c 5b 52 36  2c 23 2d 31 5d 21 0d ca  |B R0,[R6,#-1]!..|
0001e160  30 0f 2e 6c 7a 77 6c 6f  6f 70 65 6e 64 0d ca 3a  |0..lzwloopend..:|
0001e170  14 53 54 52 42 20 52 30  2c 5b 52 31 31 5d 2c 23  |.STRB R0,[R11],#|
0001e180  31 0d ca 44 13 53 55 42  53 20 52 31 30 2c 52 31  |1..D.SUBS R10,R1|
0001e190  30 2c 23 31 0d ca 4e 0f  42 4e 45 20 6c 7a 77 6c  |0,#1..N.BNE lzwl|
0001e1a0  6f 6f 70 0d ca 58 33 53  54 52 20 52 32 2c 66 69  |oop..X3STR R2,fi|
0001e1b0  72 73 74 63 6f 64 65 3a  53 54 52 20 52 33 2c 6f  |rstcode:STR R3,o|
0001e1c0  6c 64 63 6f 64 65 3a 53  54 52 20 52 35 2c 63 6f  |ldcode:STR R5,co|
0001e1d0  64 65 73 69 7a 65 0d ca  62 2f 53 54 52 20 52 36  |desize..b/STR R6|
0001e1e0  2c 73 70 3a 53 54 52 20  52 37 2c 6d 61 78 63 6f  |,sp:STR R7,maxco|
0001e1f0  64 65 3a 53 54 52 20 52  38 2c 6d 61 78 63 6f 64  |de:STR R8,maxcod|
0001e200  65 73 69 7a 65 0d ca 6c  14 4c 44 4d 46 44 20 53  |esize..l.LDMFD S|
0001e210  50 20 21 2c 7b 50 43 7d  5e 0d ca 76 0d 2e 6c 7a  |P !,{PC}^..v..lz|
0001e220  77 63 6c 65 61 72 0d ca  80 0d 4d 4f 56 20 52 30  |wclear....MOV R0|
0001e230  2c 23 30 0d ca 8a 0e 4d  4f 56 20 52 33 2c 52 31  |,#0....MOV R3,R1|
0001e240  32 0d ca 94 14 2e 6c 7a  77 64 65 66 61 75 6c 74  |2.....lzwdefault|
0001e250  74 61 62 6c 65 0d ca 9e  12 53 54 52 20 52 30 2c  |table....STR R0,|
0001e260  5b 52 33 5d 2c 23 34 0d  ca a8 23 41 44 44 20 52  |[R3],#4...#ADD R|
0001e270  30 2c 52 30 2c 23 31 3a  43 4d 50 20 52 30 2c 23  |0,R0,#1:CMP R0,#|
0001e280  63 6c 65 61 72 63 6f 64  65 25 0d ca b2 17 42 43  |clearcode%....BC|
0001e290  43 20 6c 7a 77 64 65 66  61 75 6c 74 74 61 62 6c  |C lzwdefaulttabl|
0001e2a0  65 0d ca bc 17 4d 4f 56  20 52 35 2c 23 73 65 74  |e....MOV R5,#set|
0001e2b0  63 6f 64 65 73 25 2b 31  0d ca c6 16 4d 4f 56 20  |codes%+1....MOV |
0001e2c0  52 37 2c 23 63 6c 65 61  72 63 6f 64 65 25 0d ca  |R7,#clearcode%..|
0001e2d0  d0 14 4d 4f 56 20 52 38  2c 52 37 2c 4c 53 4c 20  |..MOV R8,R7,LSL |
0001e2e0  23 31 0d ca da 05 5d 0d  ca e4 10 e7 66 6c 61 67  |#1....].....flag|
0001e2f0  3d 31 35 30 30 20 8c 0d  ca ee 0a 5b 4f 50 54 20  |=1500 .....[OPT |
0001e300  5a 0d ca f8 10 53 55 42  20 52 38 2c 52 38 2c 23  |Z....SUB R8,R8,#|
0001e310  31 0d cb 02 05 5d 0d cb  0c 05 cd 0d cb 16 0a 5b  |1....].........[|
0001e320  4f 50 54 20 5a 0d cb 20  10 41 44 44 20 52 37 2c  |OPT Z.. .ADD R7,|
0001e330  52 37 2c 23 32 0d cb 2a  0e 42 4c 20 67 65 74 63  |R7,#2..*.BL getc|
0001e340  6f 64 65 0d cb 34 0d 4d  4f 56 20 52 32 2c 52 30  |ode..4.MOV R2,R0|
0001e350  0d cb 3e 0d 4d 4f 56 20  52 33 2c 52 30 0d cb 48  |..>.MOV R3,R0..H|
0001e360  0d 4d 4f 56 20 52 36 2c  52 34 0d cb 52 10 42 20  |.MOV R6,R4..R.B |
0001e370  6c 7a 77 6c 6f 6f 70 65  6e 64 0d cb 5c 11 2e 63  |lzwloopend..\..c|
0001e380  75 72 62 69 74 20 44 43  44 20 30 0d cb 66 12 2e  |urbit DCD 0..f..|
0001e390  6c 61 73 74 62 69 74 20  44 43 44 20 30 0d cb 70  |lastbit DCD 0..p|
0001e3a0  11 2e 62 75 66 20 44 43  44 20 62 75 66 25 0d cb  |..buf DCD buf%..|
0001e3b0  7a 0c 2e 67 65 74 63 6f  64 65 0d cb 84 19 53 54  |z..getcode....ST|
0001e3c0  4d 46 44 20 53 50 20 21  2c 7b 52 36 2c 52 37 2c  |MFD SP !,{R6,R7,|
0001e3d0  52 38 7d 0d cb 8e 11 41  44 52 20 52 36 2c 63 75  |R8}....ADR R6,cu|
0001e3e0  72 62 69 74 0d cb 98 17  4c 44 4d 49 41 20 52 36  |rbit....LDMIA R6|
0001e3f0  2c 7b 52 36 2c 52 37 2c  52 38 7d 0d cb a2 10 41  |,{R6,R7,R8}....A|
0001e400  44 44 20 52 31 2c 52 35  2c 52 36 0d cb ac 0d 43  |DD R1,R5,R6....C|
0001e410  4d 50 20 52 31 2c 52 37  0d cb b6 14 42 43 53 20  |MP R1,R7....BCS |
0001e420  6e 65 65 64 6d 6f 72 65  64 61 74 61 0d cb c0 0f  |needmoredata....|
0001e430  2e 73 69 6d 70 6c 65 63  6f 64 65 0d cb ca 17 41  |.simplecode....A|
0001e440  44 44 20 52 37 2c 52 38  2c 52 36 2c 4c 53 52 20  |DD R7,R8,R6,LSR |
0001e450  23 33 0d cb d4 10 42 49  43 20 52 37 2c 52 37 2c  |#3....BIC R7,R7,|
0001e460  23 33 0d cb de 14 4c 44  4d 49 41 20 52 37 2c 7b  |#3....LDMIA R7,{|
0001e470  52 30 2c 52 37 7d 0d cb  e8 05 5d 0d cb f2 10 e7  |R0,R7}....].....|
0001e480  66 6c 61 67 3d 31 35 30  30 20 8c 0d cb fc 0a 5b  |flag=1500 .....[|
0001e490  4f 50 54 20 5a 0d cc 06  16 82 20 52 31 2c 52 30  |OPT Z..... R1,R0|
0001e4a0  2c 52 30 2c 52 4f 52 20  23 31 36 0d cc 10 16 42  |,R0,ROR #16....B|
0001e4b0  49 43 20 52 31 2c 52 31  2c 23 26 46 46 30 30 30  |IC R1,R1,#&FF000|
0001e4c0  30 0d cc 1a 14 4d 4f 56  20 52 30 2c 52 30 2c 52  |0....MOV R0,R0,R|
0001e4d0  4f 52 20 23 38 0d cc 24  15 82 20 52 30 2c 52 30  |OR #8..$.. R0,R0|
0001e4e0  2c 52 31 2c 4c 53 52 20  23 38 0d cc 2e 16 82 20  |,R1,LSR #8..... |
0001e4f0  52 31 2c 52 37 2c 52 37  2c 52 4f 52 20 23 31 36  |R1,R7,R7,ROR #16|
0001e500  0d cc 38 16 42 49 43 20  52 31 2c 52 31 2c 23 26  |..8.BIC R1,R1,#&|
0001e510  46 46 30 30 30 30 0d cc  42 14 4d 4f 56 20 52 37  |FF0000..B.MOV R7|
0001e520  2c 52 37 2c 52 4f 52 20  23 38 0d cc 4c 15 82 20  |,R7,ROR #8..L.. |
0001e530  52 37 2c 52 37 2c 52 31  2c 4c 53 52 20 23 38 0d  |R7,R7,R1,LSR #8.|
0001e540  cc 56 48 80 53 20 52 31  2c 52 36 2c 23 33 31 3a  |.VH.S R1,R6,#31:|
0001e550  4d 4f 56 4e 45 20 52 30  2c 52 30 2c 4c 53 4c 20  |MOVNE R0,R0,LSL |
0001e560  52 31 3a 52 53 42 4e 45  20 52 31 2c 52 31 2c 23  |R1:RSBNE R1,R1,#|
0001e570  33 32 3a 84 52 4e 45 20  52 30 2c 52 30 2c 52 37  |32:.RNE R0,R0,R7|
0001e580  2c 4c 53 52 20 52 31 0d  cc 60 11 52 53 42 20 52  |,LSR R1..`.RSB R|
0001e590  31 2c 52 35 2c 23 33 32  0d cc 6a 14 4d 4f 56 20  |1,R5,#32..j.MOV |
0001e5a0  52 30 2c 52 30 2c 4c 53  52 20 52 31 0d cc 74 05  |R0,R0,LSR R1..t.|
0001e5b0  5d 0d cc 7e 05 cc 0d cc  88 0a 5b 4f 50 54 20 5a  |]..~......[OPT Z|
0001e5c0  0d cc 92 48 80 53 20 52  31 2c 52 36 2c 23 33 31  |...H.S R1,R6,#31|
0001e5d0  3a 4d 4f 56 4e 45 20 52  30 2c 52 30 2c 4c 53 52  |:MOVNE R0,R0,LSR|
0001e5e0  20 52 31 3a 52 53 42 4e  45 20 52 31 2c 52 31 2c  | R1:RSBNE R1,R1,|
0001e5f0  23 33 32 3a 84 52 4e 45  20 52 30 2c 52 30 2c 52  |#32:.RNE R0,R0,R|
0001e600  37 2c 4c 53 4c 20 52 31  0d cc 9c 21 4d 56 4e 20  |7,LSL R1...!MVN |
0001e610  52 31 2c 23 30 3a 42 49  43 20 52 30 2c 52 30 2c  |R1,#0:BIC R0,R0,|
0001e620  52 31 2c 4c 53 4c 20 52  35 0d cc a6 05 5d 0d cc  |R1,LSL R5....]..|
0001e630  b0 05 cd 0d cc ba 0a 5b  4f 50 54 20 5a 0d cc c4  |.......[OPT Z...|
0001e640  10 41 44 44 20 52 36 2c  52 36 2c 52 35 0d cc ce  |.ADD R6,R6,R5...|
0001e650  11 53 54 52 20 52 36 2c  63 75 72 62 69 74 0d cc  |.STR R6,curbit..|
0001e660  d8 19 4c 44 4d 46 44 20  53 50 20 21 2c 7b 52 36  |..LDMFD SP !,{R6|
0001e670  2c 52 37 2c 52 38 7d 0d  cc e2 0e 4d 4f 56 20 50  |,R7,R8}....MOV P|
0001e680  43 2c 52 31 34 0d cc ec  11 2e 6e 65 65 64 6d 6f  |C,R14.....needmo|
0001e690  72 65 64 61 74 61 0d cc  f6 19 53 54 4d 46 44 20  |redata....STMFD |
0001e6a0  53 50 20 21 2c 7b 52 32  2c 52 33 2c 52 34 7d 0d  |SP !,{R2,R3,R4}.|
0001e6b0  cd 00 14 4d 4f 56 20 52  33 2c 52 37 2c 4c 53 52  |...MOV R3,R7,LSR|
0001e6c0  20 23 33 0d cd 0a 10 53  55 42 20 52 30 2c 52 33  | #3....SUB R0,R3|
0001e6d0  2c 23 32 0d cd 14 13 4c  44 52 42 20 52 30 2c 5b  |,#2....LDRB R0,[|
0001e6e0  52 38 2c 52 30 5d 0d cd  1e 10 53 54 52 42 20 52  |R8,R0]....STRB R|
0001e6f0  30 2c 5b 52 38 5d 0d cd  28 10 53 55 42 20 52 30  |0,[R8]..(.SUB R0|
0001e700  2c 52 33 2c 23 31 0d cd  32 13 4c 44 52 42 20 52  |,R3,#1..2.LDRB R|
0001e710  30 2c 5b 52 38 2c 52 30  5d 0d cd 3c 13 53 54 52  |0,[R8,R0]..<.STR|
0001e720  42 20 52 30 2c 5b 52 38  2c 23 31 5d 0d cd 46 13  |B R0,[R8,#1]..F.|
0001e730  4c 44 52 20 52 31 2c 5b  52 39 2c 23 31 36 5d 0d  |LDR R1,[R9,#16].|
0001e740  cd 50 0f 4c 44 52 20 52  31 2c 5b 52 31 5d 0d cd  |.P.LDR R1,[R1]..|
0001e750  5a 05 5d 0d cd 64 10 e7  66 6c 61 67 3d 31 35 30  |Z.]..d..flag=150|
0001e760  30 20 8c 0d cd 6e 0a 5b  4f 50 54 20 5a 0d cd 78  |0 ...n.[OPT Z..x|
0001e770  0f 4d 4f 56 20 52 30 2c  23 32 35 36 0d cd 82 0f  |.MOV R0,#256....|
0001e780  4d 4f 56 20 52 33 2c 23  32 35 36 0d cd 8c 05 5d  |MOV R3,#256....]|
0001e790  0d cd 96 05 cc 0d cd a0  0a 5b 4f 50 54 20 5a 0d  |.........[OPT Z.|
0001e7a0  cd aa 11 53 57 49 20 22  4f 53 5f 42 47 65 74 22  |...SWI "OS_BGet"|
0001e7b0  0d cd b4 0e 4d 4f 56 53  20 52 33 2c 52 30 0d cd  |....MOVS R3,R0..|
0001e7c0  be 13 42 45 51 20 73 69  6d 70 6c 65 63 6f 64 65  |..BEQ simplecode|
0001e7d0  31 0d cd c8 05 5d 0d cd  d2 05 cd 0d cd dc 0a 5b  |1....].........[|
0001e7e0  4f 50 54 20 5a 0d cd e6  10 53 55 42 20 52 36 2c  |OPT Z....SUB R6,|
0001e7f0  52 36 2c 52 37 0d cd f0  11 41 44 44 20 52 36 2c  |R6,R7....ADD R6,|
0001e800  52 36 2c 23 31 36 0d cd  fa 10 41 44 44 20 52 30  |R6,#16....ADD R0|
0001e810  2c 52 30 2c 23 32 0d ce  04 14 4d 4f 56 20 52 37  |,R0,#2....MOV R7|
0001e820  2c 52 30 2c 4c 53 4c 20  23 33 0d ce 0e 12 53 54  |,R0,LSL #3....ST|
0001e830  52 20 52 37 2c 6c 61 73  74 62 69 74 0d ce 18 0d  |R R7,lastbit....|
0001e840  4d 4f 56 20 52 30 2c 23  34 0d ce 22 10 41 44 44  |MOV R0,#4..".ADD|
0001e850  20 52 32 2c 52 38 2c 23  32 0d ce 2c 11 53 57 49  | R2,R8,#2..,.SWI|
0001e860  20 22 4f 53 5f 47 42 50  42 22 0d ce 36 10 2e 73  | "OS_GBPB"..6..s|
0001e870  69 6d 70 6c 65 63 6f 64  65 31 0d ce 40 19 4c 44  |implecode1..@.LD|
0001e880  4d 46 44 20 53 50 20 21  2c 7b 52 32 2c 52 33 2c  |MFD SP !,{R2,R3,|
0001e890  52 34 7d 0d ce 4a 10 42  20 73 69 6d 70 6c 65 63  |R4}..J.B simplec|
0001e8a0  6f 64 65 0d ce 54 05 5d  0d ce 5e 05 cd 0d ce 68  |ode..T.]..^....h|
0001e8b0  0d e7 72 61 6e 67 65 25  20 8c 0d ce 72 0a 5b 4f  |..range% ...r.[O|
0001e8c0  50 54 20 5a 0d ce 7c 0c  2e 6d 61 78 6d 69 6e 25  |PT Z..|..maxmin%|
0001e8d0  0d ce 86 1b 4c 44 52 20  52 30 2c 5b 52 39 5d 3a  |....LDR R0,[R9]:|
0001e8e0  4c 44 52 20 52 30 2c 5b  52 30 5d 0d ce 90 12 4c  |LDR R0,[R0]....L|
0001e8f0  44 52 20 52 31 2c 5b 52  39 2c 23 38 5d 0d ce 9a  |DR R1,[R9,#8]...|
0001e900  0e 4c 44 52 20 52 32 2c  6d 69 6e 0d ce a4 0e 4c  |.LDR R2,min....L|
0001e910  44 52 20 52 33 2c 6d 61  78 0d ce ae 0d 2e 6d 61  |DR R3,max.....ma|
0001e920  78 6d 69 6e 6c 70 0d ce  b8 12 4c 44 52 20 52 34  |xminlp....LDR R4|
0001e930  2c 5b 52 31 5d 2c 23 34  0d ce c2 19 43 4d 50 20  |,[R1],#4....CMP |
0001e940  52 34 2c 52 33 3a 4d 4f  56 43 53 20 52 33 2c 52  |R4,R3:MOVCS R3,R|
0001e950  34 0d ce cc 19 43 4d 50  20 52 34 2c 52 32 3a 4d  |4....CMP R4,R2:M|
0001e960  4f 56 43 43 20 52 32 2c  52 34 0d ce d6 1e 53 55  |OVCC R2,R4....SU|
0001e970  42 53 20 52 30 2c 52 30  2c 23 31 3a 42 4e 45 20  |BS R0,R0,#1:BNE |
0001e980  6d 61 78 6d 69 6e 6c 70  0d ce e0 0e 53 54 52 20  |maxminlp....STR |
0001e990  52 32 2c 6d 69 6e 0d ce  ea 0e 53 54 52 20 52 33  |R2,min....STR R3|
0001e9a0  2c 6d 61 78 0d ce f4 0f  4d 4f 56 53 20 50 43 2c  |,max....MOVS PC,|
0001e9b0  52 31 34 0d ce fe 0e 2e  6d 69 6e 20 44 43 44 20  |R14.....min DCD |
0001e9c0  46 0d cf 08 0e 2e 6d 61  78 20 44 43 44 20 30 0d  |F.....max DCD 0.|
0001e9d0  cf 12 05 5d 0d cf 1c 05  cd 0d cf 26 0f e7 73 68  |...].......&..sh|
0001e9e0  61 72 70 65 6e 25 20 8c  0d cf 30 39 73 68 61 72  |arpen% ...09shar|
0001e9f0  70 3d 28 63 6f 6c 2b 31  29 2a 34 3a e7 73 68 61  |p=(col+1)*4:.sha|
0001ea00  72 70 65 6e 25 3c 3e 38  20 73 68 61 72 70 6d 75  |rpen%<>8 sharpmu|
0001ea10  6c 25 3d 46 2f 28 73 68  61 72 70 65 6e 25 2d 38  |l%=F/(sharpen%-8|
0001ea20  29 0d cf 3a 0a 5b 4f 50  54 20 5a 0d cf 44 0b 2e  |)..:.[OPT Z..D..|
0001ea30  73 68 61 72 70 25 0d cf  4e 1b 4c 44 52 20 52 30  |sharp%..N.LDR R0|
0001ea40  2c 5b 52 39 5d 3a 4c 44  52 20 52 30 2c 5b 52 30  |,[R9]:LDR R0,[R0|
0001ea50  5d 0d cf 58 12 4c 44 52  20 52 31 2c 5b 52 39 2c  |]..X.LDR R1,[R9,|
0001ea60  23 38 5d 0d cf 62 13 4c  44 52 20 52 32 2c 5b 52  |#8]..b.LDR R2,[R|
0001ea70  39 2c 23 31 36 5d 0d cf  6c 13 4c 44 52 20 52 33  |9,#16]..l.LDR R3|
0001ea80  2c 5b 52 39 2c 23 32 34  5d 0d cf 76 13 4c 44 52  |,[R9,#24]..v.LDR|
0001ea90  20 52 34 2c 5b 52 39 2c  23 33 32 5d 0d cf 80 05  | R4,[R9,#32]....|
0001eaa0  5d 0d cf 8a 11 c8 8e 20  73 68 61 72 70 65 6e 25  |]...... sharpen%|
0001eab0  20 ca 0d cf 94 12 c9 20  38 2c 39 2c 31 32 2c 31  | ...... 8,9,12,1|
0001eac0  36 2c 32 34 0d cf 9e 05  7f 0d cf a8 0a 5b 4f 50  |6,24.........[OP|
0001ead0  54 20 5a 0d cf b2 1b 4d  4f 56 20 52 38 2c 23 73  |T Z....MOV R8,#s|
0001eae0  68 61 72 70 6d 75 6c 25  20 80 20 26 46 46 0d cf  |harpmul% . &FF..|
0001eaf0  bc 1f 84 52 20 52 38 2c  52 38 2c 23 73 68 61 72  |...R R8,R8,#shar|
0001eb00  70 6d 75 6c 25 20 80 20  26 46 46 30 30 0d cf c6  |pmul% . &FF00...|
0001eb10  23 4d 4f 56 20 52 39 2c  23 28 73 68 61 72 70 6d  |#MOV R9,#(sharpm|
0001eb20  75 6c 25 20 3e 3e 20 31  36 29 20 80 20 26 46 46  |ul% >> 16) . &FF|
0001eb30  0d cf d0 27 84 52 20 52  39 2c 52 39 2c 23 28 73  |...'.R R9,R9,#(s|
0001eb40  68 61 72 70 6d 75 6c 25  20 3e 3e 20 31 36 29 20  |harpmul% >> 16) |
0001eb50  80 20 26 46 46 30 30 0d  cf da 05 5d 0d cf e4 05  |. &FF00....]....|
0001eb60  cb 0d cf ee 0a 5b 4f 50  54 20 5a 0d cf f8 0c 2e  |.....[OPT Z.....|
0001eb70  73 68 61 72 70 6c 70 0d  d0 02 17 4c 44 52 20 52  |sharplp....LDR R|
0001eb80  35 2c 5b 52 31 2c 23 2d  73 68 61 72 70 5d 0d d0  |5,[R1,#-sharp]..|
0001eb90  0c 23 4c 44 52 20 52 36  2c 5b 52 31 2c 23 73 68  |.#LDR R6,[R1,#sh|
0001eba0  61 72 70 5d 3a 41 44 44  20 52 35 2c 52 35 2c 52  |arp]:ADD R5,R5,R|
0001ebb0  36 0d d0 16 1f 4c 44 52  20 52 36 2c 5b 52 31 5d  |6....LDR R6,[R1]|
0001ebc0  2c 23 34 3a 41 44 44 20  52 35 2c 52 35 2c 52 36  |,#4:ADD R5,R5,R6|
0001ebd0  0d d0 20 24 4c 44 52 20  52 36 2c 5b 52 33 2c 23  |.. $LDR R6,[R3,#|
0001ebe0  2d 73 68 61 72 70 5d 3a  41 44 44 20 52 35 2c 52  |-sharp]:ADD R5,R|
0001ebf0  35 2c 52 36 0d d0 2a 23  4c 44 52 20 52 36 2c 5b  |5,R6..*#LDR R6,[|
0001ec00  52 33 2c 23 73 68 61 72  70 5d 3a 41 44 44 20 52  |R3,#sharp]:ADD R|
0001ec10  35 2c 52 35 2c 52 36 0d  d0 34 1f 4c 44 52 20 52  |5,R5,R6..4.LDR R|
0001ec20  36 2c 5b 52 33 5d 2c 23  34 3a 41 44 44 20 52 35  |6,[R3],#4:ADD R5|
0001ec30  2c 52 35 2c 52 36 0d d0  3e 24 4c 44 52 20 52 36  |,R5,R6..>$LDR R6|
0001ec40  2c 5b 52 32 2c 23 2d 73  68 61 72 70 5d 3a 41 44  |,[R2,#-sharp]:AD|
0001ec50  44 20 52 35 2c 52 35 2c  52 36 0d d0 48 23 4c 44  |D R5,R5,R6..H#LD|
0001ec60  52 20 52 36 2c 5b 52 32  2c 23 73 68 61 72 70 5d  |R R6,[R2,#sharp]|
0001ec70  3a 41 44 44 20 52 35 2c  52 35 2c 52 36 0d d0 52  |:ADD R5,R5,R6..R|
0001ec80  12 4c 44 52 20 52 36 2c  5b 52 32 5d 2c 23 34 0d  |.LDR R6,[R2],#4.|
0001ec90  d0 5c 14 4d 4f 56 20 52  36 2c 52 36 2c 4c 53 52  |.\.MOV R6,R6,LSR|
0001eca0  20 23 31 0d d0 66 14 4d  4f 56 20 52 37 2c 23 73  | #1..f.MOV R7,#s|
0001ecb0  68 61 72 70 65 6e 25 0d  d0 70 10 4d 55 4c 20 52  |harpen%..p.MUL R|
0001ecc0  37 2c 52 36 2c 52 37 0d  d0 7a 18 53 55 42 53 20  |7,R6,R7..z.SUBS |
0001ecd0  52 35 2c 52 37 2c 52 35  2c 4c 53 52 20 23 31 0d  |R5,R7,R5,LSR #1.|
0001ece0  d0 84 0f 4d 4f 56 43 43  20 52 35 2c 23 30 0d d0  |...MOVCC R5,#0..|
0001ecf0  8e 05 5d 0d d0 98 11 c8  8e 20 73 68 61 72 70 65  |..]...... sharpe|
0001ed00  6e 25 20 ca 0d d0 a2 09  c9 20 38 2c 39 0d d0 ac  |n% ...... 8,9...|
0001ed10  0a 5b 4f 50 54 20 5a 0d  d0 b6 14 4d 4f 56 20 52  |.[OPT Z....MOV R|
0001ed20  36 2c 52 35 2c 4c 53 4c  20 23 31 0d d0 c0 05 5d  |6,R5,LSL #1....]|
0001ed30  0d d0 ca 08 c9 20 31 30  0d d0 d4 0a 5b 4f 50 54  |..... 10....[OPT|
0001ed40  20 5a 0d d0 de 0d 4d 4f  56 20 52 36 2c 52 35 0d  | Z....MOV R6,R5.|
0001ed50  d0 e8 05 5d 0d d0 f2 08  c9 20 31 32 0d d0 fc 0a  |...]..... 12....|
0001ed60  5b 4f 50 54 20 5a 0d d1  06 14 4d 4f 56 20 52 36  |[OPT Z....MOV R6|
0001ed70  2c 52 35 2c 4c 53 52 20  23 31 0d d1 10 05 5d 0d  |,R5,LSR #1....].|
0001ed80  d1 1a 08 c9 20 31 36 0d  d1 24 0a 5b 4f 50 54 20  |.... 16..$.[OPT |
0001ed90  5a 0d d1 2e 14 4d 4f 56  20 52 36 2c 52 35 2c 4c  |Z....MOV R6,R5,L|
0001eda0  53 52 20 23 32 0d d1 38  05 5d 0d d1 42 08 c9 20  |SR #2..8.]..B.. |
0001edb0  32 34 0d d1 4c 0a 5b 4f  50 54 20 5a 0d d1 56 14  |24..L.[OPT Z..V.|
0001edc0  4d 4f 56 20 52 36 2c 52  35 2c 4c 53 52 20 23 33  |MOV R6,R5,LSR #3|
0001edd0  0d d1 60 05 5d 0d d1 6a  05 7f 0d d1 74 0a 5b 4f  |..`.]..j....t.[O|
0001ede0  50 54 20 5a 0d d1 7e 15  4d 4f 56 20 52 36 2c 52  |PT Z..~.MOV R6,R|
0001edf0  35 2c 4c 53 52 20 23 31  36 0d d1 88 16 82 20 52  |5,LSR #16..... R|
0001ee00  35 2c 52 35 2c 52 36 2c  4c 53 4c 20 23 31 36 0d  |5,R5,R6,LSL #16.|
0001ee10  d1 92 10 4d 55 4c 20 52  37 2c 52 38 2c 52 35 0d  |...MUL R7,R8,R5.|
0001ee20  d1 9c 10 4d 55 4c 20 52  35 2c 52 39 2c 52 35 0d  |...MUL R5,R9,R5.|
0001ee30  d1 a6 11 4d 55 4c 20 52  31 30 2c 52 36 2c 52 38  |...MUL R10,R6,R8|
0001ee40  0d d1 b0 10 4d 55 4c 20  52 36 2c 52 39 2c 52 36  |....MUL R6,R9,R6|
0001ee50  0d d1 ba 13 41 44 44 53  20 52 31 30 2c 52 35 2c  |....ADDS R10,R5,|
0001ee60  52 31 30 0d d1 c4 17 41  44 44 43 53 20 52 36 2c  |R10....ADDCS R6,|
0001ee70  52 36 2c 23 26 31 30 30  30 30 0d d1 ce 1a 41 44  |R6,#&10000....AD|
0001ee80  44 53 20 52 37 2c 52 37  2c 52 31 30 2c 4c 53 4c  |DS R7,R7,R10,LSL|
0001ee90  20 23 31 36 0d d1 d8 19  41 44 43 20 52 36 2c 52  | #16....ADC R6,R|
0001eea0  36 2c 52 31 30 2c 4c 53  52 20 23 31 36 0d d1 e2  |6,R10,LSR #16...|
0001eeb0  1a 4d 4f 56 20 52 36 2c  52 36 2c 4c 53 4c 20 23  |.MOV R6,R6,LSL #|
0001eec0  28 33 32 2d 32 37 29 0d  d1 ec 18 84 52 53 20 52  |(32-27).....RS R|
0001eed0  36 2c 52 36 2c 52 37 2c  4c 53 52 20 23 32 37 0d  |6,R6,R7,LSR #27.|
0001eee0  d1 f6 12 41 44 44 43 53  20 52 36 2c 52 36 2c 23  |...ADDCS R6,R6,#|
0001eef0  31 0d d2 00 05 5d 0d d2  0a 05 cb 0d d2 14 0a 5b  |1....].........[|
0001ef00  4f 50 54 20 5a 0d d2 1e  19 43 4d 50 20 52 36 2c  |OPT Z....CMP R6,|
0001ef10  23 46 3a 4d 4f 56 43 53  20 52 36 2c 23 46 0d d2  |#F:MOVCS R6,#F..|
0001ef20  28 12 53 54 52 20 52 36  2c 5b 52 34 5d 2c 23 34  |(.STR R6,[R4],#4|
0001ef30  0d d2 32 11 53 55 42 53  20 52 30 2c 52 30 2c 23  |..2.SUBS R0,R0,#|
0001ef40  31 0d d2 3c 0f 42 4e 45  20 73 68 61 72 70 6c 70  |1..<.BNE sharplp|
0001ef50  0d d2 46 0f 4d 4f 56 53  20 50 43 2c 52 31 34 0d  |..F.MOVS PC,R14.|
0001ef60  d2 50 05 5d 0d d2 5a 05  cd 0d d2 64 13 e7 68 69  |.P.]..Z....d..hi|
0001ef70  73 74 25 84 65 71 75 61  6c 25 20 8c 0d d2 6e 0a  |st%.equal% ...n.|
0001ef80  5b 4f 50 54 20 5a 0d d2  78 0b 2e 68 69 73 74 6f  |[OPT Z..x..histo|
0001ef90  25 0d d2 82 1b 4c 44 52  20 52 30 2c 5b 52 39 5d  |%....LDR R0,[R9]|
0001efa0  3a 4c 44 52 20 52 30 2c  5b 52 30 5d 0d d2 8c 12  |:LDR R0,[R0]....|
0001efb0  4c 44 52 20 52 31 2c 5b  52 39 2c 23 38 5d 0d d2  |LDR R1,[R9,#8]..|
0001efc0  96 13 4c 44 52 20 52 32  2c 5b 52 39 2c 23 31 36  |..LDR R2,[R9,#16|
0001efd0  5d 0d d2 a0 0b 2e 68 69  73 74 6c 70 0d d2 aa 28  |].....histlp...(|
0001efe0  4c 44 52 20 52 33 2c 5b  52 32 5d 2c 23 34 3a 43  |LDR R3,[R2],#4:C|
0001eff0  4d 50 20 52 33 2c 23 46  3a 4d 4f 56 43 53 20 52  |MP R3,#F:MOVCS R|
0001f000  33 2c 23 46 0d d2 b4 19  4d 4f 56 20 52 33 2c 52  |3,#F....MOV R3,R|
0001f010  33 2c 4c 53 52 20 23 62  69 74 73 2d 38 0d d2 be  |3,LSR #bits-8...|
0001f020  05 5d 0d d2 c8 0c e7 63  6f 6c 3d 32 20 8c 0d d2  |.].....col=2 ...|
0001f030  d2 0a 5b 4f 50 54 20 5a  0d d2 dc 17 41 44 44 20  |..[OPT Z....ADD |
0001f040  52 33 2c 52 33 2c 52 33  2c 4c 53 4c 20 23 31 0d  |R3,R3,R3,LSL #1.|
0001f050  d2 e6 3c 4c 44 52 20 52  34 2c 5b 52 31 2c 52 33  |..<LDR R4,[R1,R3|
0001f060  2c 4c 53 4c 20 23 32 5d  3a 41 44 44 20 52 34 2c  |,LSL #2]:ADD R4,|
0001f070  52 34 2c 23 31 3a 53 54  52 20 52 34 2c 5b 52 31  |R4,#1:STR R4,[R1|
0001f080  2c 52 33 2c 4c 53 4c 20  23 32 5d 0d d2 f0 28 4c  |,R3,LSL #2]...(L|
0001f090  44 52 20 52 33 2c 5b 52  32 5d 2c 23 34 3a 43 4d  |DR R3,[R2],#4:CM|
0001f0a0  50 20 52 33 2c 23 46 3a  4d 4f 56 43 53 20 52 33  |P R3,#F:MOVCS R3|
0001f0b0  2c 23 46 0d d2 fa 19 4d  4f 56 20 52 33 2c 52 33  |,#F....MOV R3,R3|
0001f0c0  2c 4c 53 52 20 23 62 69  74 73 2d 38 0d d3 04 24  |,LSR #bits-8...$|
0001f0d0  41 44 44 20 52 33 2c 52  33 2c 52 33 2c 4c 53 4c  |ADD R3,R3,R3,LSL|
0001f0e0  20 23 31 3a 41 44 44 20  52 33 2c 52 33 2c 23 31  | #1:ADD R3,R3,#1|
0001f0f0  0d d3 0e 3c 4c 44 52 20  52 34 2c 5b 52 31 2c 52  |...<LDR R4,[R1,R|
0001f100  33 2c 4c 53 4c 20 23 32  5d 3a 41 44 44 20 52 34  |3,LSL #2]:ADD R4|
0001f110  2c 52 34 2c 23 31 3a 53  54 52 20 52 34 2c 5b 52  |,R4,#1:STR R4,[R|
0001f120  31 2c 52 33 2c 4c 53 4c  20 23 32 5d 0d d3 18 28  |1,R3,LSL #2]...(|
0001f130  4c 44 52 20 52 33 2c 5b  52 32 5d 2c 23 34 3a 43  |LDR R3,[R2],#4:C|
0001f140  4d 50 20 52 33 2c 23 46  3a 4d 4f 56 43 53 20 52  |MP R3,#F:MOVCS R|
0001f150  33 2c 23 46 0d d3 22 19  4d 4f 56 20 52 33 2c 52  |3,#F..".MOV R3,R|
0001f160  33 2c 4c 53 52 20 23 62  69 74 73 2d 38 0d d3 2c  |3,LSR #bits-8..,|
0001f170  24 41 44 44 20 52 33 2c  52 33 2c 52 33 2c 4c 53  |$ADD R3,R3,R3,LS|
0001f180  4c 20 23 31 3a 41 44 44  20 52 33 2c 52 33 2c 23  |L #1:ADD R3,R3,#|
0001f190  32 0d d3 36 05 5d 0d d3  40 05 cd 0d d3 4a 0a 5b  |2..6.]..@....J.[|
0001f1a0  4f 50 54 20 5a 0d d3 54  3c 4c 44 52 20 52 34 2c  |OPT Z..T<LDR R4,|
0001f1b0  5b 52 31 2c 52 33 2c 4c  53 4c 20 23 32 5d 3a 41  |[R1,R3,LSL #2]:A|
0001f1c0  44 44 20 52 34 2c 52 34  2c 23 31 3a 53 54 52 20  |DD R4,R4,#1:STR |
0001f1d0  52 34 2c 5b 52 31 2c 52  33 2c 4c 53 4c 20 23 32  |R4,[R1,R3,LSL #2|
0001f1e0  5d 0d d3 5e 11 53 55 42  53 20 52 30 2c 52 30 2c  |]..^.SUBS R0,R0,|
0001f1f0  23 31 0d d3 68 0e 42 4e  45 20 68 69 73 74 6c 70  |#1..h.BNE histlp|
0001f200  0d d3 72 0f 4d 4f 56 53  20 50 43 2c 52 31 34 0d  |..r.MOVS PC,R14.|
0001f210  d3 7c 05 5d 0d d3 86 05  cd 0d d3 90 0d e7 65 71  |.|.]..........eq|
0001f220  75 61 6c 25 20 8c 0d d3  9a 0a 5b 4f 50 54 20 5a  |ual% .....[OPT Z|
0001f230  0d d3 a4 0f 2e 68 69 73  74 65 71 75 61 6c 25 0d  |.....histequal%.|
0001f240  d3 ae 1b 4c 44 52 20 52  30 2c 5b 52 39 5d 3a 4c  |...LDR R0,[R9]:L|
0001f250  44 52 20 52 30 2c 5b 52  30 5d 0d d3 b8 12 4c 44  |DR R0,[R0]....LD|
0001f260  52 20 52 31 2c 5b 52 39  2c 23 38 5d 0d d3 c2 13  |R R1,[R9,#8]....|
0001f270  4c 44 52 20 52 32 2c 5b  52 39 2c 23 31 36 5d 0d  |LDR R2,[R9,#16].|
0001f280  d3 cc 0c 2e 65 71 75 61  6c 6c 70 0d d3 d6 25 4c  |....equallp...%L|
0001f290  44 52 20 52 33 2c 5b 52  32 5d 3a 43 4d 50 20 52  |DR R3,[R2]:CMP R|
0001f2a0  33 2c 23 46 3a 4d 4f 56  43 53 20 52 33 2c 23 46  |3,#F:MOVCS R3,#F|
0001f2b0  0d d3 e0 19 4d 4f 56 20  52 33 2c 52 33 2c 4c 53  |....MOV R3,R3,LS|
0001f2c0  52 20 23 62 69 74 73 2d  38 0d d3 ea 05 5d 0d d3  |R #bits-8....]..|
0001f2d0  f4 0c e7 63 6f 6c 3d 32  20 8c 0d d3 fe 0a 5b 4f  |...col=2 .....[O|
0001f2e0  50 54 20 5a 0d d4 08 25  4c 44 52 20 52 33 2c 5b  |PT Z...%LDR R3,[|
0001f2f0  52 32 5d 3a 43 4d 50 20  52 33 2c 23 46 3a 4d 4f  |R2]:CMP R3,#F:MO|
0001f300  56 43 53 20 52 33 2c 23  46 0d d4 12 19 4d 4f 56  |VCS R3,#F....MOV|
0001f310  20 52 33 2c 52 33 2c 4c  53 52 20 23 62 69 74 73  | R3,R3,LSR #bits|
0001f320  2d 38 0d d4 1c 17 41 44  44 20 52 33 2c 52 33 2c  |-8....ADD R3,R3,|
0001f330  52 33 2c 4c 53 4c 20 23  31 0d d4 26 28 4c 44 52  |R3,LSL #1..&(LDR|
0001f340  20 52 34 2c 5b 52 31 2c  52 33 2c 4c 53 4c 20 23  | R4,[R1,R3,LSL #|
0001f350  32 5d 3a 53 54 52 20 52  34 2c 5b 52 32 5d 2c 23  |2]:STR R4,[R2],#|
0001f360  34 0d d4 30 25 4c 44 52  20 52 33 2c 5b 52 32 5d  |4..0%LDR R3,[R2]|
0001f370  3a 43 4d 50 20 52 33 2c  23 46 3a 4d 4f 56 43 53  |:CMP R3,#F:MOVCS|
0001f380  20 52 33 2c 23 46 0d d4  3a 19 4d 4f 56 20 52 33  | R3,#F..:.MOV R3|
0001f390  2c 52 33 2c 4c 53 52 20  23 62 69 74 73 2d 38 0d  |,R3,LSR #bits-8.|
0001f3a0  d4 44 24 41 44 44 20 52  33 2c 52 33 2c 52 33 2c  |.D$ADD R3,R3,R3,|
0001f3b0  4c 53 4c 20 23 31 3a 41  44 44 20 52 33 2c 52 33  |LSL #1:ADD R3,R3|
0001f3c0  2c 23 31 0d d4 4e 28 4c  44 52 20 52 34 2c 5b 52  |,#1..N(LDR R4,[R|
0001f3d0  31 2c 52 33 2c 4c 53 4c  20 23 32 5d 3a 53 54 52  |1,R3,LSL #2]:STR|
0001f3e0  20 52 34 2c 5b 52 32 5d  2c 23 34 0d d4 58 25 4c  | R4,[R2],#4..X%L|
0001f3f0  44 52 20 52 33 2c 5b 52  32 5d 3a 43 4d 50 20 52  |DR R3,[R2]:CMP R|
0001f400  33 2c 23 46 3a 4d 4f 56  43 53 20 52 33 2c 23 46  |3,#F:MOVCS R3,#F|
0001f410  0d d4 62 19 4d 4f 56 20  52 33 2c 52 33 2c 4c 53  |..b.MOV R3,R3,LS|
0001f420  52 20 23 62 69 74 73 2d  38 0d d4 6c 24 41 44 44  |R #bits-8..l$ADD|
0001f430  20 52 33 2c 52 33 2c 52  33 2c 4c 53 4c 20 23 31  | R3,R3,R3,LSL #1|
0001f440  3a 41 44 44 20 52 33 2c  52 33 2c 23 32 0d d4 76  |:ADD R3,R3,#2..v|
0001f450  05 5d 0d d4 80 05 cd 0d  d4 8a 0a 5b 4f 50 54 20  |.].........[OPT |
0001f460  5a 0d d4 94 28 4c 44 52  20 52 34 2c 5b 52 31 2c  |Z...(LDR R4,[R1,|
0001f470  52 33 2c 4c 53 4c 20 23  32 5d 3a 53 54 52 20 52  |R3,LSL #2]:STR R|
0001f480  34 2c 5b 52 32 5d 2c 23  34 0d d4 9e 11 53 55 42  |4,[R2],#4....SUB|
0001f490  53 20 52 30 2c 52 30 2c  23 31 0d d4 a8 0f 42 4e  |S R0,R0,#1....BN|
0001f4a0  45 20 65 71 75 61 6c 6c  70 0d d4 b2 0f 4d 4f 56  |E equallp....MOV|
0001f4b0  53 20 50 43 2c 52 31 34  0d d4 bc 05 5d 0d d4 c6  |S PC,R14....]...|
0001f4c0  05 cd 0d d4 d0 0e c8 8e  20 72 66 6c 61 67 20 ca  |........ rflag .|
0001f4d0  0d d4 da 1b c9 20 32 30  31 2c 38 30 30 2c 38 30  |..... 201,800,80|
0001f4e0  31 2c 31 30 30 30 2c 31  30 30 31 0d d4 e4 0a 5b  |1,1000,1001....[|
0001f4f0  4f 50 54 20 5a 0d d4 ee  0e 2e 72 6c 65 78 70 61  |OPT Z.....rlexpa|
0001f500  6e 64 25 0d d4 f8 0f 4c  44 52 20 52 30 2c 5b 52  |nd%....LDR R0,[R|
0001f510  39 5d 0d d5 02 0f 4c 44  52 20 52 31 2c 5b 52 30  |9]....LDR R1,[R0|
0001f520  5d 0d d5 0c 1e 4c 44 52  20 52 32 2c 5b 52 39 2c  |]....LDR R2,[R9,|
0001f530  23 38 5d 3a 4c 44 52 20  52 32 2c 5b 52 32 5d 0d  |#8]:LDR R2,[R2].|
0001f540  d5 16 13 4c 44 52 20 52  33 2c 5b 52 39 2c 23 31  |...LDR R3,[R9,#1|
0001f550  36 5d 0d d5 20 0f 4c 44  52 20 52 34 2c 5b 52 33  |6].. .LDR R4,[R3|
0001f560  5d 0d d5 2a 1b 43 4d 50  20 52 34 2c 23 31 3a 4d  |]..*.CMP R4,#1:M|
0001f570  4f 56 4c 54 53 20 50 43  2c 52 31 34 0d d5 34 1f  |OVLTS PC,R14..4.|
0001f580  4c 44 52 20 52 35 2c 5b  52 39 2c 23 32 34 5d 3a  |LDR R5,[R9,#24]:|
0001f590  4c 44 52 20 52 35 2c 5b  52 35 5d 0d d5 3e 08 2e  |LDR R5,[R5]..>..|
0001f5a0  72 6c 65 0d d5 48 13 53  54 52 42 20 52 32 2c 5b  |rle..H.STRB R2,[|
0001f5b0  52 31 5d 2c 23 31 0d d5  52 10 53 55 42 20 52 34  |R1],#1..R.SUB R4|
0001f5c0  2c 52 34 2c 23 31 0d d5  5c 0d 43 4d 50 20 52 31  |,R4,#1..\.CMP R1|
0001f5d0  2c 52 35 0d d5 66 0f 54  45 51 4e 45 20 52 34 2c  |,R5..f.TEQNE R4,|
0001f5e0  23 30 0d d5 70 0b 42 4e  45 20 72 6c 65 0d d5 7a  |#0..p.BNE rle..z|
0001f5f0  0b 2e 72 6c 65 78 69 74  0d d5 84 0f 53 54 52 20  |..rlexit....STR |
0001f600  52 31 2c 5b 52 30 5d 0d  d5 8e 0f 53 54 52 20 52  |R1,[R0]....STR R|
0001f610  34 2c 5b 52 33 5d 0d d5  98 0f 4d 4f 56 53 20 50  |4,[R3]....MOVS P|
0001f620  43 2c 52 31 34 0d d5 a2  05 5d 0d d5 ac 09 c9 20  |C,R14....]..... |
0001f630  39 30 32 0d d5 b6 09 c9  20 39 30 33 0d d5 c0 0a  |902..... 903....|
0001f640  5b 4f 50 54 20 5a 0d d5  ca 0d 2e 75 6e 70 61 63  |[OPT Z.....unpac|
0001f650  6b 31 36 0d d5 d4 2d 4d  4f 56 20 20 20 20 20 72  |k16...-MOV     r|
0001f660  34 2c 23 33 31 20 20 20  20 20 20 20 20 20 20 3b  |4,#31          ;|
0001f670  20 35 20 62 69 74 73 20  73 65 74 20 6d 61 73 6b  | 5 bits set mask|
0001f680  0d d5 de 2b 4d 4f 56 20  20 20 20 20 72 35 2c 23  |...+MOV     r5,#|
0001f690  35 31 32 20 20 20 20 20  20 20 20 20 3b 20 50 69  |512         ; Pi|
0001f6a0  78 65 6c 20 63 6f 75 6e  74 65 72 0d d5 e8 11 2e  |xel counter.....|
0001f6b0  75 6e 70 61 63 6b 31 36  6c 6f 6f 70 0d d5 f2 3e  |unpack16loop...>|
0001f6c0  4c 44 52 42 20 20 20 20  72 33 2c 5b 72 30 5d 2c  |LDRB    r3,[r0],|
0001f6d0  23 31 20 20 20 20 20 20  3b 20 47 65 74 20 68 61  |#1      ; Get ha|
0001f6e0  6c 66 20 61 20 70 69 78  65 6c 20 66 72 6f 6d 20  |lf a pixel from |
0001f6f0  74 68 65 20 73 70 72 69  74 65 0d d5 fc 3a 4c 44  |the sprite...:LD|
0001f700  52 42 20 20 20 20 72 32  2c 5b 72 30 5d 2c 23 31  |RB    r2,[r0],#1|
0001f710  20 20 20 20 20 20 3b 20  47 65 74 20 73 65 63 6f  |      ; Get seco|
0001f720  6e 64 20 68 61 6c 66 20  6f 66 20 74 68 65 20 70  |nd half of the p|
0001f730  69 78 65 6c 0d d6 06 38  84 52 20 20 20 20 20 72  |ixel...8.R     r|
0001f740  32 2c 72 33 2c 72 32 2c  4c 53 4c 23 38 20 20 3b  |2,r3,r2,LSL#8  ;|
0001f750  20 43 6f 6d 62 69 6e 65  20 64 61 74 61 20 69 6e  | Combine data in|
0001f760  74 6f 20 6f 6e 65 20 70  69 78 65 6c 0d d6 10 29  |to one pixel...)|
0001f770  80 20 20 20 20 20 72 33  2c 72 32 2c 23 33 31 20  |.     r3,r2,#31 |
0001f780  20 20 20 20 20 20 3b 20  47 65 74 20 72 65 64 20  |      ; Get red |
0001f790  70 69 78 65 6c 0d d6 1a  04 0d d6 24 2d 53 54 52  |pixel......$-STR|
0001f7a0  42 20 20 20 20 72 33 2c  5b 72 31 2c 23 30 5d 20  |B    r3,[r1,#0] |
0001f7b0  20 20 20 20 20 3b 20 53  74 6f 72 65 20 69 6e 20  |     ; Store in |
0001f7c0  62 75 66 66 65 72 0d d6  2e 2b 80 20 20 20 20 20  |buffer...+.     |
0001f7d0  72 33 2c 72 32 2c 72 34  2c 4c 53 4c 23 35 20 20  |r3,r2,r4,LSL#5  |
0001f7e0  3b 20 47 65 74 20 67 72  65 65 6e 20 70 69 78 65  |; Get green pixe|
0001f7f0  6c 0d d6 38 17 4d 4f 56  20 20 20 20 20 72 33 2c  |l..8.MOV     r3,|
0001f800  72 33 2c 4c 53 52 23 35  0d d6 42 04 0d d6 4c 2d  |r3,LSR#5..B...L-|
0001f810  53 54 52 42 20 20 20 20  72 33 2c 5b 72 31 2c 23  |STRB    r3,[r1,#|
0001f820  35 31 32 5d 20 20 20 20  3b 20 53 74 6f 72 65 20  |512]    ; Store |
0001f830  69 6e 20 62 75 66 66 65  72 0d d6 56 2a 80 20 20  |in buffer..V*.  |
0001f840  20 20 20 72 33 2c 72 32  2c 72 34 2c 4c 53 4c 23  |   r3,r2,r4,LSL#|
0001f850  31 30 20 3b 20 47 65 74  20 62 6c 75 65 20 70 69  |10 ; Get blue pi|
0001f860  78 65 6c 0d d6 60 18 4d  4f 56 20 20 20 20 20 72  |xel..`.MOV     r|
0001f870  33 2c 72 33 2c 4c 53 52  23 31 30 0d d6 6a 04 0d  |3,r3,LSR#10..j..|
0001f880  d6 74 19 53 54 52 42 20  20 20 20 72 33 2c 5b 72  |.t.STRB    r3,[r|
0001f890  31 2c 23 31 30 32 34 5d  0d d6 7e 14 41 44 44 20  |1,#1024]..~.ADD |
0001f8a0  20 20 20 20 72 31 2c 72  31 2c 23 31 0d d6 88 14  |    r1,r1,#1....|
0001f8b0  53 55 42 53 20 20 20 20  72 35 2c 72 35 2c 23 31  |SUBS    r5,r5,#1|
0001f8c0  0d d6 92 18 42 4e 45 20  20 20 20 20 75 6e 70 61  |....BNE     unpa|
0001f8d0  63 6b 31 36 6c 6f 6f 70  0d d6 9c 13 4d 4f 56 53  |ck16loop....MOVS|
0001f8e0  20 20 20 20 72 31 35 2c  72 31 34 0d d6 a6 04 0d  |    r15,r14.....|
0001f8f0  d6 b0 0b 2e 75 6e 70 61  63 6b 0d d6 ba 12 41 44  |....unpack....AD|
0001f900  44 20 52 32 2c 52 30 2c  23 37 36 38 0d d6 c4 0e  |D R2,R0,#768....|
0001f910  4d 4f 56 20 52 34 2c 23  26 46 0d d6 ce 0f 2e 75  |MOV R4,#&F.....u|
0001f920  6e 70 61 63 6b 6c 6f 6f  70 0d d6 d8 12 4c 44 52  |npackloop....LDR|
0001f930  20 52 33 2c 5b 52 30 5d  2c 23 34 0d d6 e2 0d 4d  | R3,[R0],#4....M|
0001f940  4f 56 20 52 35 2c 23 30  0d d6 ec 0c 2e 62 69 74  |OV R5,#0.....bit|
0001f950  6c 6f 6f 70 0d d6 f6 15  80 20 52 36 2c 52 33 2c  |loop..... R6,R3,|
0001f960  52 34 2c 4c 53 4c 20 52  35 0d d7 00 14 4d 4f 56  |R4,LSL R5....MOV|
0001f970  20 52 36 2c 52 36 2c 4c  53 52 20 52 35 0d d7 0a  | R6,R6,LSR R5...|
0001f980  10 41 44 44 20 52 35 2c  52 35 2c 23 34 0d d7 14  |.ADD R5,R5,#4...|
0001f990  15 80 20 52 37 2c 52 33  2c 52 34 2c 4c 53 4c 20  |.. R7,R3,R4,LSL |
0001f9a0  52 35 0d d7 1e 14 4d 4f  56 20 52 37 2c 52 37 2c  |R5....MOV R7,R7,|
0001f9b0  4c 53 52 20 52 35 0d d7  28 10 41 44 44 20 52 35  |LSR R5..(.ADD R5|
0001f9c0  2c 52 35 2c 23 34 0d d7  32 13 53 54 52 42 20 52  |,R5,#4..2.STRB R|
0001f9d0  37 2c 5b 52 31 5d 2c 23  31 0d d7 3c 13 53 54 52  |7,[R1],#1..<.STR|
0001f9e0  42 20 52 36 2c 5b 52 31  5d 2c 23 31 0d d7 46 0e  |B R6,[R1],#1..F.|
0001f9f0  43 4d 50 20 52 35 2c 23  33 32 0d d7 50 0f 42 4e  |CMP R5,#32..P.BN|
0001fa00  45 20 62 69 74 6c 6f 6f  70 0d d7 5a 0d 43 4d 50  |E bitloop..Z.CMP|
0001fa10  20 52 32 2c 52 30 0d d7  64 12 42 4e 45 20 75 6e  | R2,R0..d.BNE un|
0001fa20  70 61 63 6b 6c 6f 6f 70  0d d7 6e 0f 4d 4f 56 53  |packloop..n.MOVS|
0001fa30  20 50 43 2c 52 31 34 0d  d7 78 05 5d 0d d7 82 05  | PC,R14..x.]....|
0001fa40  cb 0d d7 8c 04 0d d7 96  10 e7 70 6c 61 6e 61 72  |..........planar|
0001fa50  25 3c 30 20 8c 0d d7 a0  19 43 25 3d 37 3a e7 66  |%<0 .....C%=7:.f|
0001fa60  6c 61 67 3d 32 36 30 30  20 43 25 3d 31 35 0d d7  |lag=2600 C%=15..|
0001fa70  aa 0a 5b 4f 50 54 20 5a  0d d7 b4 0d 2e 70 6c 61  |..[OPT Z.....pla|
0001fa80  6e 63 6e 76 25 0d d7 be  10 4c 44 52 20 52 30 2c  |ncnv%....LDR R0,|
0001fa90  73 78 6c 6f 63 0d d7 c8  1b 4c 44 52 20 52 31 2c  |sxloc....LDR R1,|
0001faa0  5b 52 39 5d 3a 4c 44 52  20 52 31 2c 5b 52 31 5d  |[R9]:LDR R1,[R1]|
0001fab0  0d d7 d2 1e 4c 44 52 20  52 33 2c 5b 52 39 2c 23  |....LDR R3,[R9,#|
0001fac0  38 5d 3a 4c 44 52 20 52  33 2c 5b 52 33 5d 0d d7  |8]:LDR R3,[R3]..|
0001fad0  dc 1f 4c 44 52 20 52 34  2c 5b 52 39 2c 23 31 36  |..LDR R4,[R9,#16|
0001fae0  5d 3a 4c 44 52 20 52 34  2c 5b 52 34 5d 0d d7 e6  |]:LDR R4,[R4]...|
0001faf0  0e 4d 4f 56 20 52 39 2c  23 43 25 0d d7 f0 0c 2e  |.MOV R9,#C%.....|
0001fb00  70 6c 61 6e 65 6c 70 0d  d7 fa 0d 4d 4f 56 20 52  |planelp....MOV R|
0001fb10  37 2c 23 30 0d d8 04 0d  4d 4f 56 20 52 35 2c 52  |7,#0....MOV R5,R|
0001fb20  33 0d d8 0e 05 5d 0d d8  18 11 e3 4e 25 3d 31 b8  |3....].....N%=1.|
0001fb30  70 6c 61 6e 65 73 25 0d  d8 22 0a 5b 4f 50 54 20  |planes%..".[OPT |
0001fb40  5a 0d d8 2c 12 4c 44 52  20 52 36 2c 5b 52 35 5d  |Z..,.LDR R6,[R5]|
0001fb50  2c 52 34 0d d8 36 05 5d  0d d8 40 10 e7 66 6c 61  |,R4..6.]..@..fla|
0001fb60  67 3d 32 36 30 30 20 8c  0d d8 4a 0a 5b 4f 50 54  |g=2600 ...J.[OPT|
0001fb70  20 5a 0d d8 54 14 4d 4f  56 20 52 36 2c 52 36 2c  | Z..T.MOV R6,R6,|
0001fb80  4c 53 4c 20 23 38 0d d8  5e 18 42 49 43 20 52 36  |LSL #8..^.BIC R6|
0001fb90  2c 52 36 2c 23 26 46 46  30 30 30 30 30 30 0d d8  |,R6,#&FF000000..|
0001fba0  68 17 84 52 20 52 36 2c  52 36 2c 52 36 2c 4c 53  |h..R R6,R6,R6,LS|
0001fbb0  52 20 23 31 36 0d d8 72  05 5d 0d d8 7c 05 cd 0d  |R #16..r.]..|...|
0001fbc0  d8 86 0a 5b 4f 50 54 20  5a 0d d8 90 14 4d 4f 56  |...[OPT Z....MOV|
0001fbd0  20 52 36 2c 52 36 2c 4c  53 52 20 52 39 0d d8 9a  | R6,R6,LSR R9...|
0001fbe0  0e 80 20 52 36 2c 52 36  2c 23 31 0d d8 a4 1b 84  |.. R6,R6,#1.....|
0001fbf0  52 20 52 37 2c 52 37 2c  52 36 2c 4c 53 4c 20 23  |R R7,R7,R6,LSL #|
0001fc00  28 4e 25 2d 31 29 0d d8  ae 05 5d 0d d8 b8 05 ed  |(N%-1)....].....|
0001fc10  0d d8 c2 0a 5b 4f 50 54  20 5a 0d d8 cc 13 53 54  |....[OPT Z....ST|
0001fc20  52 42 20 52 37 2c 5b 52  31 5d 2c 23 31 0d d8 d6  |RB R7,[R1],#1...|
0001fc30  1e 53 55 42 53 20 52 39  2c 52 39 2c 23 31 3a 4d  |.SUBS R9,R9,#1:M|
0001fc40  4f 56 4d 49 20 52 39 2c  23 43 25 0d d8 e0 05 5d  |OVMI R9,#C%....]|
0001fc50  0d d8 ea 10 e7 66 6c 61  67 3d 32 36 30 30 20 8c  |.....flag=2600 .|
0001fc60  0d d8 f4 0a 5b 4f 50 54  20 5a 0d d8 fe 0f 4d 4f  |....[OPT Z....MO|
0001fc70  56 4d 49 20 52 33 2c 52  35 0d d9 08 05 5d 0d d9  |VMI R3,R5....]..|
0001fc80  12 05 cc 0d d9 1c 0a 5b  4f 50 54 20 5a 0d d9 26  |.......[OPT Z..&|
0001fc90  12 41 44 44 4d 49 20 52  33 2c 52 33 2c 23 31 0d  |.ADDMI R3,R3,#1.|
0001fca0  d9 30 05 5d 0d d9 3a 05  cd 0d d9 44 0a 5b 4f 50  |.0.]..:....D.[OP|
0001fcb0  54 20 5a 0d d9 4e 1d 53  55 42 53 20 52 30 2c 52  |T Z..N.SUBS R0,R|
0001fcc0  30 2c 23 31 3a 42 4e 45  20 70 6c 61 6e 65 6c 70  |0,#1:BNE planelp|
0001fcd0  0d d9 58 0f 4d 4f 56 53  20 50 43 2c 52 31 34 0d  |..X.MOVS PC,R14.|
0001fce0  d9 62 05 5d 0d d9 6c 05  cd 0d d9 76 05 ed 0d d9  |.b.]..l....v....|
0001fcf0  80 0d c8 8e 20 6e 63 6f  6c 20 ca 0d d9 8a 11 c9  |.... ncol ......|
0001fd00  20 32 35 35 3a 73 69 7a  65 25 3d 31 0d d9 94 10  | 255:size%=1....|
0001fd10  c9 20 36 33 3a 73 69 7a  65 25 3d 31 0d d9 9e 10  |. 63:size%=1....|
0001fd20  c9 20 31 35 3a 73 69 7a  65 25 3d 32 0d d9 a8 0f  |. 15:size%=2....|
0001fd30  c9 20 33 3a 73 69 7a 65  25 3d 34 0d d9 b2 1f c9  |. 3:size%=4.....|
0001fd40  20 31 3a 73 69 7a 65 25  3d 38 3a e7 6d 24 3d 22  | 1:size%=8:.m$="|
0001fd50  43 22 20 73 69 7a 65 25  3d 32 0d d9 bc 13 e7 6d  |C" size%=2.....m|
0001fd60  24 3d 22 44 22 20 73 69  7a 65 25 3d 34 0d d9 c6  |$="D" size%=4...|
0001fd70  13 e7 6d 24 3d 22 54 22  20 73 69 7a 65 25 3d 32  |..m$="T" size%=2|
0001fd80  0d d9 d0 05 cb 0d d9 da  0d c8 8e 20 66 6c 61 67  |........... flag|
0001fd90  20 ca 0d d9 e4 2a c9 20  35 30 31 3a e7 69 6e 66  | ....*. 501:.inf|
0001fda0  6f 25 20 f1 22 52 65 61  64 69 6e 67 20 69 6e 74  |o% ."Reading int|
0001fdb0  65 72 6c 61 63 65 64 20  47 49 46 22 0d d9 ee 54  |erlaced GIF"...T|
0001fdc0  73 7a 25 3d 73 78 25 2a  73 79 25 3a 64 61 74 61  |sz%=sx%*sy%:data|
0001fdd0  63 61 63 68 65 25 3d a4  64 69 6d 28 73 7a 25 2b  |cache%=.dim(sz%+|
0001fde0  31 30 30 29 3a 62 75 66  66 25 3d 64 61 74 61 63  |100):buff%=datac|
0001fdf0  61 63 68 65 25 3a 72 6f  77 62 79 74 65 73 25 3d  |ache%:rowbytes%=|
0001fe00  73 78 25 3a 72 6f 77 73  74 6f 67 6f 25 3d 2d 31  |sx%:rowstogo%=-1|
0001fe10  0d d9 f8 44 e3 59 25 3d  30 b8 73 79 25 2d 31 88  |...D.Y%=0.sy%-1.|
0001fe20  38 3a 58 25 3d 62 75 66  66 25 2b 59 25 2a 73 78  |8:X%=buff%+Y%*sx|
0001fe30  25 3a d6 20 4c 5a 57 64  65 63 6f 64 65 25 2c 74  |%:. LZWdecode%,t|
0001fe40  61 62 6c 65 25 28 30 29  2c 63 25 2c 58 25 2c 73  |able%(0),c%,X%,s|
0001fe50  78 25 3a ed 0d da 02 44  e3 59 25 3d 34 b8 73 79  |x%:....D.Y%=4.sy|
0001fe60  25 2d 31 88 38 3a 58 25  3d 62 75 66 66 25 2b 59  |%-1.8:X%=buff%+Y|
0001fe70  25 2a 73 78 25 3a d6 20  4c 5a 57 64 65 63 6f 64  |%*sx%:. LZWdecod|
0001fe80  65 25 2c 74 61 62 6c 65  25 28 30 29 2c 63 25 2c  |e%,table%(0),c%,|
0001fe90  58 25 2c 73 78 25 3a ed  0d da 0c 44 e3 59 25 3d  |X%,sx%:....D.Y%=|
0001fea0  32 b8 73 79 25 2d 31 88  34 3a 58 25 3d 62 75 66  |2.sy%-1.4:X%=buf|
0001feb0  66 25 2b 59 25 2a 73 78  25 3a d6 20 4c 5a 57 64  |f%+Y%*sx%:. LZWd|
0001fec0  65 63 6f 64 65 25 2c 74  61 62 6c 65 25 28 30 29  |ecode%,table%(0)|
0001fed0  2c 63 25 2c 58 25 2c 73  78 25 3a ed 0d da 16 44  |,c%,X%,sx%:....D|
0001fee0  e3 59 25 3d 31 b8 73 79  25 2d 31 88 32 3a 58 25  |.Y%=1.sy%-1.2:X%|
0001fef0  3d 62 75 66 66 25 2b 59  25 2a 73 78 25 3a d6 20  |=buff%+Y%*sx%:. |
0001ff00  4c 5a 57 64 65 63 6f 64  65 25 2c 74 61 62 6c 65  |LZWdecode%,table|
0001ff10  25 28 30 29 2c 63 25 2c  58 25 2c 73 78 25 3a ed  |%(0),c%,X%,sx%:.|
0001ff20  0d da 20 05 cb 0d da 2a  0f e7 67 61 6d 6d 61 3c  |.. ....*..gamma<|
0001ff30  3e 31 20 8c 0d da 34 17  6b 3d 31 2f 67 61 6d 6d  |>1 ...4.k=1/gamm|
0001ff40  61 3a e3 43 25 3d 30 b8  32 35 35 0d da 3e 23 e7  |a:.C%=0.255..>#.|
0001ff50  72 25 28 43 25 29 20 72  25 28 43 25 29 3d 28 28  |r%(C%) r%(C%)=((|
0001ff60  72 25 28 43 25 29 2f 46  29 5e 6b 29 2a 46 0d da  |r%(C%)/F)^k)*F..|
0001ff70  48 23 e7 67 25 28 43 25  29 20 67 25 28 43 25 29  |H#.g%(C%) g%(C%)|
0001ff80  3d 28 28 67 25 28 43 25  29 2f 46 29 5e 6b 29 2a  |=((g%(C%)/F)^k)*|
0001ff90  46 0d da 52 23 e7 62 25  28 43 25 29 20 62 25 28  |F..R#.b%(C%) b%(|
0001ffa0  43 25 29 3d 28 28 62 25  28 43 25 29 2f 46 29 5e  |C%)=((b%(C%)/F)^|
0001ffb0  6b 29 2a 46 0d da 5c 05  ed 0d da 66 05 cd 0d da  |k)*F..\....f....|
0001ffc0  70 18 72 6d 61 78 3d 46  3a 67 6d 61 78 3d 46 3a  |p.rmax=F:gmax=F:|
0001ffd0  62 6d 61 78 3d 46 0d da  7a 0c e7 63 6f 6c 3d 30  |bmax=F..z..col=0|
0001ffe0  20 8c 0d da 84 0e e7 69  6e 70 75 74 3c 39 20 8c  | ......input<9 .|
0001fff0  0d da 8e 37 e3 43 25 3d  30 b8 32 35 35 3a 72 25  |...7.C%=0.255:r%|
00020000  28 43 25 29 3d 72 25 28  43 25 29 2a 72 77 74 2b  |(C%)=r%(C%)*rwt+|
00020010  67 25 28 43 25 29 2a 67  77 74 2b 62 25 28 43 25  |g%(C%)*gwt+b%(C%|
00020020  29 2a 62 77 74 3a ed 0d  da 98 05 cc 0d da a2 11  |)*bwt:..........|
00020030  e7 69 6e 70 75 74 3c 3e  34 32 32 20 8c 0d da ac  |.input<>422 ....|
00020040  24 72 6d 61 78 3d 46 2a  72 77 74 3a 67 6d 61 78  |$rmax=F*rwt:gmax|
00020050  3d 46 2a 67 77 74 3a 62  6d 61 78 3d 46 2a 62 77  |=F*gwt:bmax=F*bw|
00020060  74 0d da b6 45 e3 43 25  3d 30 b8 32 35 35 3a 72  |t...E.C%=0.255:r|
00020070  25 28 43 25 29 3d 72 25  28 43 25 29 2a 72 77 74  |%(C%)=r%(C%)*rwt|
00020080  3a 67 25 28 43 25 29 3d  67 25 28 43 25 29 2a 67  |:g%(C%)=g%(C%)*g|
00020090  77 74 3a 62 25 28 43 25  29 3d 62 25 28 43 25 29  |wt:b%(C%)=b%(C%)|
000200a0  2a 62 77 74 3a ed 0d da  c0 05 cd 0d da ca 05 cd  |*bwt:...........|
000200b0  0d da d4 05 cd 0d da de  2c e7 ac 6f 72 64 65 72  |........,..order|
000200c0  25 20 f2 61 64 6a 75 73  74 70 61 6c 65 74 74 65  |% .adjustpalette|
000200d0  28 31 2f 79 64 69 76 25  2f 78 64 69 76 25 2c 30  |(1/ydiv%/xdiv%,0|
000200e0  29 0d da e8 0d e7 72 61  6e 67 65 25 20 8c 0d da  |).....range% ...|
000200f0  f2 3e e7 69 6e 66 6f 25  20 f1 22 53 63 61 6e 6e  |.>.info% ."Scann|
00020100  69 6e 67 20 64 61 74 61  20 74 6f 20 63 6f 6d 70  |ing data to comp|
00020110  75 74 65 20 70 61 72 61  6d 65 74 65 72 73 20 66  |ute parameters f|
00020120  6f 72 20 27 2d 72 61 6e  67 65 27 22 0d da fc 0d  |or '-range'"....|
00020130  e7 6f 72 64 65 72 25 20  8c 0d db 06 1d 59 25 3d  |.order% .....Y%=|
00020140  30 3a f5 20 c8 99 68 6f  75 72 25 2c 59 25 2a 31  |0:. ..hour%,Y%*1|
00020150  30 30 81 73 79 25 0d db  10 33 f2 69 70 72 6f 77  |00.sy%...3.iprow|
00020160  28 78 70 25 28 29 29 3a  d6 6d 61 78 6d 69 6e 25  |(xp%()):.maxmin%|
00020170  2c 78 70 25 28 31 2c 30  29 2c 74 6f 74 76 61 6c  |,xp%(1,0),totval|
00020180  73 32 25 3a 59 25 2b 3d  31 0d db 1a 22 fd 59 25  |s2%:Y%+=1...".Y%|
00020190  3d 73 79 25 20 84 21 6d  69 6e 3c 32 35 35 20 80  |=sy% .!min<255 .|
000201a0  21 6d 61 78 2b 32 35 35  3e 3d 46 0d db 24 05 cc  |!max+255>=F..$..|
000201b0  0d db 2e 25 59 25 3d 30  3a 79 73 61 6d 70 25 3d  |...%Y%=0:ysamp%=|
000201c0  31 3a f5 20 c8 99 68 6f  75 72 25 2c 59 25 2a 31  |1:. ..hour%,Y%*1|
000201d0  30 30 81 79 25 0d db 38  3b f2 73 63 61 6c 65 64  |00.y%..8;.scaled|
000201e0  70 69 78 65 6c 72 6f 77  28 63 6c 25 28 29 29 3a  |pixelrow(cl%()):|
000201f0  d6 6d 61 78 6d 69 6e 25  2c 63 6c 25 28 31 2c 30  |.maxmin%,cl%(1,0|
00020200  29 2c 74 6f 74 76 61 6c  73 25 3a 59 25 2b 3d 31  |),totvals%:Y%+=1|
00020210  0d db 42 23 fd 59 25 3d  79 25 20 84 20 21 6d 69  |..B#.Y%=y% . !mi|
00020220  6e 3c 32 35 35 20 80 20  21 6d 61 78 2b 32 35 35  |n<255 . !max+255|
00020230  3e 3d 46 0d db 4c 05 cd  0d db 56 4f e7 21 6d 61  |>=F..L....VO.!ma|
00020240  78 2b 32 35 35 3e 3d 46  20 80 21 6d 69 6e 3c 32  |x+255>=F .!min<2|
00020250  35 35 20 72 61 6e 67 65  25 3d a3 3a 72 61 6e 67  |55 range%=.:rang|
00020260  65 24 3d 22 4e 6f 20 70  6f 69 6e 74 20 69 6e 20  |e$="No point in |
00020270  27 2d 72 61 6e 67 65 27  20 6f 6e 20 74 68 69 73  |'-range' on this|
00020280  20 69 6d 61 67 65 22 0d  db 60 85 e7 72 61 6e 67  | image"..`..rang|
00020290  65 25 20 f2 61 64 6a 75  73 74 70 61 6c 65 74 74  |e% .adjustpalett|
000202a0  65 28 46 2f 28 21 6d 61  78 2d 21 6d 69 6e 29 2c  |e(F/(!max-!min),|
000202b0  21 6d 69 6e 2f 79 64 69  76 25 2f 78 64 69 76 25  |!min/ydiv%/xdiv%|
000202c0  29 3a 72 61 6e 67 65 24  3d 22 49 6e 70 75 74 20  |):range$="Input |
000202d0  69 6d 61 67 65 20 6d 61  78 69 6d 75 6d 20 22 2b  |image maximum "+|
000202e0  c3 28 21 6d 61 78 2f 46  2a 31 30 30 29 2b 22 25  |.(!max/F*100)+"%|
000202f0  20 6d 69 6e 69 6d 75 6d  20 22 2b c3 28 21 6d 69  | minimum "+.(!mi|
00020300  6e 2f 46 2a 31 30 30 29  2b 22 25 22 0d db 6a 1a  |n/F*100)+"%"..j.|
00020310  f2 72 65 77 69 6e 64 3a  e7 69 6e 66 6f 25 20 f1  |.rewind:.info% .|
00020320  72 61 6e 67 65 24 0d db  74 05 cd 0d db 7e 14 e7  |range$..t....~..|
00020330  68 69 73 74 25 20 84 65  71 75 61 6c 25 20 8c 0d  |hist% .equal% ..|
00020340  db 88 46 e7 65 71 75 61  6c 25 20 e7 69 6e 66 6f  |..F.equal% .info|
00020350  25 20 f1 22 53 63 61 6e  6e 69 6e 67 20 64 61 74  |% ."Scanning dat|
00020360  61 20 74 6f 20 63 6f 6d  70 75 74 65 20 70 61 72  |a to compute par|
00020370  61 6d 65 74 65 72 73 20  66 6f 72 20 27 2d 65 71  |ameters for '-eq|
00020380  75 61 6c 27 22 0d db 92  0d e7 6f 72 64 65 72 25  |ual'".....order%|
00020390  20 8c 0d db 9c 24 e3 79  72 25 3d 30 b8 73 79 25  | ....$.yr%=0.sy%|
000203a0  2d 31 3a c8 99 68 6f 75  72 25 2c 79 72 25 2a 31  |-1:..hour%,yr%*1|
000203b0  30 30 81 73 79 25 0d db  a6 31 f2 69 70 72 6f 77  |00.sy%...1.iprow|
000203c0  28 78 70 25 28 29 29 3a  d6 68 69 73 74 6f 25 2c  |(xp%()):.histo%,|
000203d0  78 70 25 28 31 2c 30 29  2c 76 61 6c 73 25 28 30  |xp%(1,0),vals%(0|
000203e0  2c 30 29 2c 73 78 25 0d  db b0 05 ed 0d db ba 05  |,0),sx%.........|
000203f0  cc 0d db c4 2b 79 73 61  6d 70 25 3d 31 3a e3 79  |....+ysamp%=1:.y|
00020400  72 25 3d 30 b8 79 25 2d  31 3a c8 99 68 6f 75 72  |r%=0.y%-1:..hour|
00020410  25 2c 79 72 25 2a 31 30  30 81 79 25 0d db ce 39  |%,yr%*100.y%...9|
00020420  f2 73 63 61 6c 65 64 70  69 78 65 6c 72 6f 77 28  |.scaledpixelrow(|
00020430  63 6c 25 28 29 29 3a d6  68 69 73 74 6f 25 2c 63  |cl%()):.histo%,c|
00020440  6c 25 28 31 2c 30 29 2c  76 61 6c 73 25 28 30 2c  |l%(1,0),vals%(0,|
00020450  30 29 2c 78 25 0d db d8  05 ed 0d db e2 05 cd 0d  |0),x%...........|
00020460  db ec 2e e7 69 6e 66 6f  25 20 f1 22 44 6f 6e 65  |....info% ."Done|
00020470  2e 20 4e 6f 77 20 70 72  6f 63 65 73 73 69 6e 67  |. Now processing|
00020480  20 74 68 65 20 70 69 63  74 75 72 65 22 0d db f6  | the picture"...|
00020490  05 cd 0d dc 00 11 e7 69  6e 70 75 74 3c 3e 34 32  |.......input<>42|
000204a0  32 20 8c 0d dc 0a 0d e3  43 25 3d 30 b8 32 35 35  |2 ......C%=0.255|
000204b0  0d dc 14 16 e7 72 25 28  43 25 29 3c 30 20 72 25  |.....r%(C%)<0 r%|
000204c0  28 43 25 29 3d 30 0d dc  1e 16 e7 67 25 28 43 25  |(C%)=0.....g%(C%|
000204d0  29 3c 30 20 67 25 28 43  25 29 3d 30 0d dc 28 16  |)<0 g%(C%)=0..(.|
000204e0  e7 62 25 28 43 25 29 3c  30 20 62 25 28 43 25 29  |.b%(C%)<0 b%(C%)|
000204f0  3d 30 0d dc 32 1c e7 72  25 28 43 25 29 3e 72 6d  |=0..2..r%(C%)>rm|
00020500  61 78 20 72 25 28 43 25  29 3d 72 6d 61 78 0d dc  |ax r%(C%)=rmax..|
00020510  3c 1c e7 67 25 28 43 25  29 3e 67 6d 61 78 20 67  |<..g%(C%)>gmax g|
00020520  25 28 43 25 29 3d 67 6d  61 78 0d dc 46 1c e7 62  |%(C%)=gmax..F..b|
00020530  25 28 43 25 29 3e 62 6d  61 78 20 62 25 28 43 25  |%(C%)>bmax b%(C%|
00020540  29 3d 62 6d 61 78 0d dc  50 05 ed 0d dc 5a 05 cd  |)=bmax..P....Z..|
00020550  0d dc 64 0c e7 68 69 73  74 25 20 8c 0d dc 6e 19  |..d..hist% ...n.|
00020560  4d 25 3d 30 3a 5a 4d 25  3d 2d 31 3a e3 43 25 3d  |M%=0:ZM%=-1:.C%=|
00020570  30 b8 63 6f 6c 0d dc 78  35 e3 5a 25 3d 30 b8 32  |0.col..x5.Z%=0.2|
00020580  35 36 3a e7 76 61 6c 73  25 28 5a 25 2c 43 25 29  |56:.vals%(Z%,C%)|
00020590  3e 4d 25 20 4d 25 3d 76  61 6c 73 25 28 5a 25 2c  |>M% M%=vals%(Z%,|
000205a0  43 25 29 3a 5a 4d 25 3d  5a 25 0d dc 82 07 ed 3a  |C%):ZM%=Z%.....:|
000205b0  ed 0d dc 8c 1d e7 5a 4d  25 3d 2d 31 20 84 20 6f  |......ZM%=-1 . o|
000205c0  6b 69 6e 66 6f 25 3d 30  20 8c 3d 31 30 30 0d dc  |kinfo%=0 .=100..|
000205d0  96 0d e7 20 63 6f 6c 3e  30 20 8c 0d dc a0 0e eb  |... col>0 ......|
000205e0  36 36 3a 68 74 3d 35 30  30 0d dc aa 15 e7 eb 3c  |66:ht=500......<|
000205f0  3e 36 36 20 eb 31 36 3a  68 74 3d 34 30 30 0d dc  |>66 .16:ht=400..|
00020600  b4 0f 86 30 2c 36 2c 32  30 30 30 2c 36 0d dc be  |...0,6,2000,6...|
00020610  05 cc 0d dc c8 1a eb 31  38 3a 68 74 3d 34 30 30  |.......18:ht=400|
00020620  3a 86 30 2c 36 2c 31 30  32 34 2c 36 0d dc d2 05  |:.0,6,1024,6....|
00020630  cd 0d dc dc 23 4d 3d 4d  25 2f 28 68 74 2a 32 2d  |....#M=M%/(ht*2-|
00020640  38 29 3a e3 43 25 3d 30  b8 63 6f 6c 3a c8 8e 20  |8):.C%=0.col:.. |
00020650  43 25 20 ca 0d dc e6 0a  c9 20 30 3a e6 31 0d dc  |C% ...... 0:.1..|
00020660  f0 0a c9 20 31 3a e6 32  0d dc fa 0a c9 20 32 3a  |... 1:.2..... 2:|
00020670  e6 34 0d dd 04 05 cb 0d  dd 0e 0d e7 20 63 6f 6c  |.4.......... col|
00020680  3e 30 20 8c 0d dd 18 43  e3 5a 25 3d 30 b8 32 35  |>0 ....C.Z%=0.25|
00020690  36 3a e7 76 61 6c 73 25  28 5a 25 2c 43 25 29 20  |6:.vals%(Z%,C%) |
000206a0  58 25 3d 5a 25 2a 33 2b  43 25 3c 3c 31 3a 86 58  |X%=Z%*3+C%<<1:.X|
000206b0  25 2c 38 2c 58 25 2c 76  61 6c 73 25 28 5a 25 2c  |%,8,X%,vals%(Z%,|
000206c0  43 25 29 2f 4d 2b 38 0d  dd 22 05 ed 0d dd 2c 05  |C%)/M+8.."....,.|
000206d0  cc 0d dd 36 3f e3 5a 25  3d 30 b8 32 35 36 3a e7  |...6?.Z%=0.256:.|
000206e0  76 61 6c 73 25 28 5a 25  2c 43 25 29 20 58 25 3d  |vals%(Z%,C%) X%=|
000206f0  5a 25 3c 3c 32 3a c8 93  20 c8 90 58 25 2c 38 2c  |Z%<<2:.. ..X%,8,|
00020700  32 2c 76 61 6c 73 25 28  5a 25 2c 43 25 29 2f 4d  |2,vals%(Z%,C%)/M|
00020710  0d dd 40 05 ed 0d dd 4a  05 cd 0d dd 54 05 ed 0d  |..@....J....T...|
00020720  dd 5e 11 e7 63 25 20 d9  23 63 25 3a 63 25 3d 30  |.^..c% .#c%:c%=0|
00020730  0d dd 68 14 e7 63 63 25  20 d9 23 63 63 25 3a 63  |..h..cc% .#cc%:c|
00020740  63 25 3d 30 0d dd 72 17  e7 63 63 63 25 20 d9 23  |c%=0..r..ccc% .#|
00020750  63 63 63 25 3a 63 63 63  25 3d 30 0d dd 7c 15 c8  |ccc%:ccc%=0..|..|
00020760  99 22 48 6f 75 72 67 6c  61 73 73 5f 4f 66 66 22  |."Hourglass_Off"|
00020770  0d dd 86 08 3d 31 30 30  0d dd 90 05 cd 0d dd 9a  |....=100........|
00020780  28 6f 6e 61 6d 65 24 3d  22 70 22 2b c3 6d 2b 6d  |(oname$="p"+.m+m|
00020790  24 3a e7 72 61 6e 67 65  25 20 6f 6e 61 6d 65 24  |$:.range% oname$|
000207a0  2b 3d 22 72 22 0d dd a4  17 e7 65 71 75 61 6c 25  |+="r".....equal%|
000207b0  20 6f 6e 61 6d 65 24 2b  3d 22 65 22 0d dd ae 23  | oname$+="e"...#|
000207c0  e7 73 68 61 72 70 65 6e  25 20 6f 6e 61 6d 65 24  |.sharpen% oname$|
000207d0  2b 3d 22 73 22 2b c3 73  68 61 72 70 65 6e 25 0d  |+="s"+.sharpen%.|
000207e0  dd b8 1f e7 62 6c 61 63  6b 25 20 6f 6e 61 6d 65  |....black% oname|
000207f0  24 2b 3d 22 62 22 2b c3  62 6c 61 63 6b 25 0d dd  |$+="b"+.black%..|
00020800  c2 38 e7 67 61 6d 6d 61  3c 3e 31 20 41 25 3d 40  |.8.gamma<>1 A%=@|
00020810  25 3a 40 25 3d 26 31 30  32 30 31 30 30 3a 6f 6e  |%:@%=&1020100:on|
00020820  61 6d 65 24 2b 3d 22 67  22 2b c3 67 61 6d 6d 61  |ame$+="g"+.gamma|
00020830  3a 40 25 3d 41 25 0d dd  cc 1b e7 62 72 69 67 68  |:@%=A%.....brigh|
00020840  74 25 3d 31 36 20 6f 6e  61 6d 65 24 2b 3d 22 62  |t%=16 oname$+="b|
00020850  22 0d dd d6 29 78 73 70  25 3d 78 25 3a 79 73 70  |"...)xsp%=x%:ysp|
00020860  25 3d 79 25 3a e7 72 6f  74 61 74 65 25 20 c8 94  |%=y%:.rotate% ..|
00020870  20 78 73 70 25 2c 79 73  70 25 0d dd e0 0a c8 8e  | xsp%,ysp%......|
00020880  20 6d 20 ca 0d dd ea 4b  c9 20 2d 31 3a 78 77 6f  | m ....K. -1:xwo|
00020890  72 64 73 25 3d 78 73 70  25 3a 73 7a 25 3d 78 77  |rds%=xsp%:sz%=xw|
000208a0  6f 72 64 73 25 2a 79 73  70 25 3a 59 25 3d 79 73  |ords%*ysp%:Y%=ys|
000208b0  70 25 3a f2 67 65 74 6f  75 74 70 75 74 28 73 7a  |p%:.getoutput(sz|
000208c0  25 2c 30 2c 78 77 6f 72  64 73 25 2c 59 25 29 0d  |%,0,xwords%,Y%).|
000208d0  dd f4 0e 62 61 73 65 25  3d 72 61 6d 25 0d dd fe  |...base%=ram%...|
000208e0  43 7f 3a 78 77 6f 72 64  73 25 3d 78 73 70 25 2f  |C.:xwords%=xsp%/|
000208f0  73 69 7a 65 25 2b 33 2e  39 39 39 39 80 ac 33 3a  |size%+3.9999..3:|
00020900  73 7a 25 3d 78 77 6f 72  64 73 25 2a 79 73 70 25  |sz%=xwords%*ysp%|
00020910  3a 58 25 3d 78 73 70 25  3a 59 25 3d 79 73 70 25  |:X%=xsp%:Y%=ysp%|
00020920  0d de 08 0d e7 6e 63 6f  6c 3d 31 20 8c 0d de 12  |.....ncol=1 ....|
00020930  0b c8 8e 20 6d 24 20 ca  0d de 1c 4f c9 22 43 22  |... m$ ....O."C"|
00020940  3a 21 72 6f 77 69 6e 63  3d 78 77 6f 72 64 73 25  |:!rowinc=xwords%|
00020950  3a 78 77 6f 72 64 73 25  3d 78 77 6f 72 64 73 25  |:xwords%=xwords%|
00020960  2a 34 3a 73 7a 25 3d 78  77 6f 72 64 73 25 2a 79  |*4:sz%=xwords%*y|
00020970  73 70 25 3a 58 25 3d 78  73 70 25 2a 34 3a 59 25  |sp%:X%=xsp%*4:Y%|
00020980  3d 79 73 70 25 2a 34 0d  de 26 4f c9 22 54 22 3a  |=ysp%*4..&O."T":|
00020990  21 72 6f 77 69 6e 63 3d  78 77 6f 72 64 73 25 3a  |!rowinc=xwords%:|
000209a0  78 77 6f 72 64 73 25 3d  78 77 6f 72 64 73 25 2a  |xwords%=xwords%*|
000209b0  33 3a 73 7a 25 3d 78 77  6f 72 64 73 25 2a 79 73  |3:sz%=xwords%*ys|
000209c0  70 25 3a 58 25 3d 78 73  70 25 2a 34 3a 59 25 3d  |p%:X%=xsp%*4:Y%=|
000209d0  79 73 70 25 2a 33 0d de  30 4f c9 22 44 22 3a 21  |ysp%*3..0O."D":!|
000209e0  72 6f 77 69 6e 63 3d 78  77 6f 72 64 73 25 3a 78  |rowinc=xwords%:x|
000209f0  77 6f 72 64 73 25 3d 78  77 6f 72 64 73 25 2a 32  |words%=xwords%*2|
00020a00  3a 73 7a 25 3d 78 77 6f  72 64 73 25 2a 79 73 70  |:sz%=xwords%*ysp|
00020a10  25 3a 58 25 3d 78 73 70  25 2a 32 3a 59 25 3d 79  |%:X%=xsp%*2:Y%=y|
00020a20  73 70 25 2a 32 0d de 3a  05 cb 0d de 44 05 cd 0d  |sp%*2..:....D...|
00020a30  de 4e 29 41 25 3d 59 25  3a f2 67 65 74 6f 75 74  |.N)A%=Y%:.getout|
00020a40  70 75 74 28 73 7a 25 2c  31 30 32 34 2c 78 77 6f  |put(sz%,1024,xwo|
00020a50  72 64 73 25 2c 59 25 29  0d de 58 31 72 61 6d 25  |rds%,Y%)..X1ram%|
00020a60  21 34 3d 30 3a 72 61 6d  25 21 38 3d 31 36 3a 72  |!4=0:ram%!8=16:r|
00020a70  61 6d 25 21 31 32 3d 31  36 3a c8 99 26 32 65 2c  |am%!12=16:..&2e,|
00020a80  26 31 30 39 2c 72 61 6d  25 0d de 62 30 c8 99 26  |&109,ram%..b0..&|
00020a90  32 65 2c 26 31 30 66 2c  72 61 6d 25 2c 6f 6e 61  |2e,&10f,ram%,ona|
00020aa0  6d 65 24 2c 28 6e 63 6f  6c 3c 36 33 29 80 31 2c  |me$,(ncol<63).1,|
00020ab0  58 25 2c 59 25 2c 73 70  6d 0d de 6c 4a 62 61 73  |X%,Y%,spm..lJbas|
00020ac0  65 25 3d 72 61 6d 25 2b  72 61 6d 25 21 38 3a 62  |e%=ram%+ram%!8:b|
00020ad0  61 73 65 25 21 28 35 2a  34 29 3d 41 25 2d 31 3a  |ase%!(5*4)=A%-1:|
00020ae0  21 62 61 73 65 25 3d 21  62 61 73 65 25 2d 59 25  |!base%=!base%-Y%|
00020af0  2a 78 77 6f 72 64 73 25  2b 41 25 2a 78 77 6f 72  |*xwords%+A%*xwor|
00020b00  64 73 25 0d de 76 29 72  61 6d 25 21 31 32 3d 72  |ds%..v)ram%!12=r|
00020b10  61 6d 25 21 31 32 2d 59  25 2a 78 77 6f 72 64 73  |am%!12-Y%*xwords|
00020b20  25 2b 41 25 2a 78 77 6f  72 64 73 25 0d de 80 26  |%+A%*xwords%...&|
00020b30  70 61 6c 25 3d 62 61 73  65 25 2b 31 31 2a 34 3a  |pal%=base%+11*4:|
00020b40  62 61 73 65 25 2b 3d 62  61 73 65 25 21 28 38 2a  |base%+=base%!(8*|
00020b50  34 29 0d de 8a 0d c8 8e  20 6e 63 6f 6c 20 ca 0d  |4)...... ncol ..|
00020b60  de 94 08 c9 20 31 35 0d  de 9e 0b c8 8e 20 6d 24  |.... 15...... m$|
00020b70  20 ca 0d de a8 09 c9 20  22 50 22 0d de b2 35 e3  | ...... "P"...5.|
00020b80  5a 25 3d 30 b8 31 35 3a  f2 63 6f 6c 28 5a 25 2c  |Z%=0.15:.col(Z%,|
00020b90  28 70 61 6c 65 74 74 65  25 21 28 5a 25 3c 3c 32  |(palette%!(Z%<<2|
00020ba0  29 3e 3e 38 29 80 26 46  30 46 30 46 30 29 3a ed  |)>>8).&F0F0F0):.|
00020bb0  0d de bc 09 c9 20 22 44  22 0d de c6 1e e3 5a 25  |..... "D".....Z%|
00020bc0  3d 30 b8 37 3a 41 25 3d  30 3a e7 5a 25 80 31 20  |=0.7:A%=0:.Z%.1 |
00020bd0  41 25 2b 3d 26 46 30 0d  de d0 13 e7 5a 25 80 32  |A%+=&F0.....Z%.2|
00020be0  20 41 25 2b 3d 26 46 30  30 30 0d de da 15 e7 5a  | A%+=&F000.....Z|
00020bf0  25 80 34 20 41 25 2b 3d  26 46 30 30 30 30 30 0d  |%.4 A%+=&F00000.|
00020c00  de e4 11 f2 63 6f 6c 28  5a 25 2c 41 25 29 3a ed  |....col(Z%,A%):.|
00020c10  0d de ee 09 c9 20 22 43  22 0d de f8 1f e3 5a 25  |..... "C".....Z%|
00020c20  3d 30 b8 31 35 3a 41 25  3d 30 3a e7 5a 25 80 34  |=0.15:A%=0:.Z%.4|
00020c30  20 41 25 2b 3d 26 46 30  0d df 02 2e e7 5a 25 80  | A%+=&F0.....Z%.|
00020c40  33 20 41 25 2b 3d 28 5a  25 80 33 29 2a 35 3c 3c  |3 A%+=(Z%.3)*5<<|
00020c50  31 32 3a e7 28 5a 25 80  33 29 3d 31 20 41 25 2b  |12:.(Z%.3)=1 A%+|
00020c60  3d 26 31 30 30 30 0d df  0c 15 e7 5a 25 80 38 20  |=&1000.....Z%.8 |
00020c70  41 25 2b 3d 26 46 30 30  30 30 30 0d df 16 11 f2  |A%+=&F00000.....|
00020c80  63 6f 6c 28 5a 25 2c 41  25 29 3a ed 0d df 20 09  |col(Z%,A%):... .|
00020c90  c9 20 22 54 22 0d df 2a  30 e3 5a 25 3d 30 b8 31  |. "T"..*0.Z%=0.1|
00020ca0  35 3a 41 25 3d 5a 25 3c  3c 34 3a f2 63 6f 6c 28  |5:A%=Z%<<4:.col(|
00020cb0  5a 25 2c 41 25 84 41 25  3c 3c 38 84 41 25 3c 3c  |Z%,A%.A%<<8.A%<<|
00020cc0  31 36 29 3a ed 0d df 34  08 c9 20 22 22 0d df 3e  |16):...4.. ""..>|
00020cd0  3c e3 5a 25 3d 30 b8 31  35 3a 41 25 3d 28 5a 25  |<.Z%=0.15:A%=(Z%|
00020ce0  80 37 29 2f 37 2a 31 35  2b 2e 32 3c 3c 34 3a f2  |.7)/7*15+.2<<4:.|
00020cf0  63 6f 6c 28 5a 25 2c 41  25 84 41 25 3c 3c 38 84  |col(Z%,A%.A%<<8.|
00020d00  41 25 3c 3c 31 36 29 3a  ed 0d df 48 05 cb 0d df  |A%<<16):...H....|
00020d10  52 07 c9 20 33 0d df 5c  0d e7 6d 24 3d 22 43 22  |R.. 3..\..m$="C"|
00020d20  20 8c 0d df 66 3b f2 63  6f 6c 28 30 2c 30 29 3a  | ...f;.col(0,0):|
00020d30  f2 63 6f 6c 28 31 2c 26  46 30 46 30 30 30 29 3a  |.col(1,&F0F000):|
00020d40  f2 63 6f 6c 28 32 2c 26  46 30 30 30 46 30 29 3a  |.col(2,&F000F0):|
00020d50  f2 63 6f 6c 28 33 2c 26  46 30 46 30 29 0d df 70  |.col(3,&F0F0)..p|
00020d60  05 cc 0d df 7a 31 e3 5a  25 3d 30 b8 33 3a 41 25  |....z1.Z%=0.3:A%|
00020d70  3d 5a 25 2a 35 3c 3c 34  3a f2 63 6f 6c 28 5a 25  |=Z%*5<<4:.col(Z%|
00020d80  2c 41 25 84 41 25 3c 3c  38 84 41 25 3c 3c 31 36  |,A%.A%<<8.A%<<16|
00020d90  29 3a ed 0d df 84 05 cd  0d df 8e 21 c9 20 31 3a  |):.........!. 1:|
00020da0  f2 63 6f 6c 28 30 2c 30  29 3a f2 63 6f 6c 28 31  |.col(0,0):.col(1|
00020db0  2c 26 46 30 46 30 46 30  29 0d df 98 05 cb 0d df  |,&F0F0F0).......|
00020dc0  a2 05 cb 0d df ac 07 ea  20 85 0d df b6 2f ee 20  |........ ..../. |
00020dd0  85 20 ea 3a f7 20 85 3a  f2 53 61 76 65 3a 85 20  |. .:. .:.Save:. |
00020de0  9f 2c f6 24 2b 22 20 69  6e 74 65 72 6e 61 6c 20  |.,.$+" internal |
00020df0  28 22 2b c3 9e 2b 22 29  22 0d df c0 18 c8 99 22  |("+..+")"......"|
00020e00  48 6f 75 72 67 6c 61 73  73 5f 4c 45 44 73 22 2c  |Hourglass_LEDs",|
00020e10  33 0d df ca 24 79 73 61  6d 70 25 3d 31 3a 6e 6c  |3...$ysamp%=1:nl|
00020e20  25 28 29 3d 30 3a 73 74  65 70 25 3d 34 2a 28 63  |%()=0:step%=4*(c|
00020e30  6f 6c 2b 31 29 0d df d4  44 61 64 64 72 25 3d 62  |ol+1)...Daddr%=b|
00020e40  61 73 65 25 2a 73 69 7a  65 25 3a 72 6f 77 73 74  |ase%*size%:rowst|
00020e50  65 70 25 3d 78 77 6f 72  64 73 25 2a 73 69 7a 65  |ep%=xwords%*size|
00020e60  25 3a 63 6f 6c 73 74 65  70 25 3d 31 3a 64 69 73  |%:colstep%=1:dis|
00020e70  74 25 3d 78 73 70 25 2d  31 0d df de 0e e7 72 6f  |t%=xsp%-1.....ro|
00020e80  74 61 74 65 25 20 8c 0d  df e8 18 c8 94 20 63 6f  |tate% ....... co|
00020e90  6c 73 74 65 70 25 2c 72  6f 77 73 74 65 70 25 0d  |lstep%,rowstep%.|
00020ea0  df f2 47 61 64 64 72 25  2b 3d 28 79 73 70 25 2d  |..Gaddr%+=(ysp%-|
00020eb0  31 29 2a 63 6f 6c 73 74  65 70 25 3a 63 6f 6c 73  |1)*colstep%:cols|
00020ec0  74 65 70 25 3d 2d 63 6f  6c 73 74 65 70 25 3a 64  |tep%=-colstep%:d|
00020ed0  69 73 74 25 3d 28 79 73  70 25 2d 31 29 2a 63 6f  |ist%=(ysp%-1)*co|
00020ee0  6c 73 74 65 70 25 0d df  fc 05 cd 0d e0 06 4c 6f  |lstep%........Lo|
00020ef0  75 74 6c 69 6d 25 3d 28  62 61 73 65 25 2b 78 77  |utlim%=(base%+xw|
00020f00  6f 72 64 73 25 2a 59 25  29 2a 73 69 7a 65 25 2d  |ords%*Y%)*size%-|
00020f10  31 3a 6f 64 64 63 6f 6c  73 74 65 70 25 3d 2d 63  |1:oddcolstep%=-c|
00020f20  6f 6c 73 74 65 70 25 3a  6f 64 64 73 74 65 70 25  |olstep%:oddstep%|
00020f30  3d 2d 73 74 65 70 25 0d  e0 10 2b e7 6f 72 64 65  |=-step%...+.orde|
00020f40  72 25 20 f2 61 64 6a 75  73 74 70 61 6c 65 74 74  |r% .adjustpalett|
00020f50  65 28 31 2f 79 64 69 76  25 2f 78 64 69 76 25 2c  |e(1/ydiv%/xdiv%,|
00020f60  30 29 0d e0 1a 39 e7 73  79 25 3d 79 25 20 80 20  |0)...9.sy%=y% . |
00020f70  73 78 25 3d 78 25 20 80  20 72 61 6e 67 65 25 3d  |sx%=x% . range%=|
00020f80  a3 20 80 20 73 68 61 72  70 65 6e 25 3d a3 20 80  |. . sharpen%=. .|
00020f90  20 65 71 75 61 6c 25 3d  a3 20 8c 0d e0 24 0e e7  | equal%=. ...$..|
00020fa0  64 69 74 68 65 72 25 20  8c 0d e0 2e 40 e3 79 72  |dither% ....@.yr|
00020fb0  25 3d 30 20 b8 20 79 25  2d 31 3a c8 99 68 6f 75  |%=0 . y%-1:..hou|
00020fc0  72 25 2c 79 72 25 2a 31  30 30 81 79 25 3a e7 61  |r%,yr%*100.y%:.a|
00020fd0  64 64 72 25 3e 6f 75 74  6c 69 6d 25 20 f2 66 6c  |ddr%>outlim% .fl|
00020fe0  75 73 68 6f 75 74 70 75  74 0d e0 38 4a f2 69 70  |ushoutput..8J.ip|
00020ff0  72 6f 77 28 63 6c 25 28  29 29 3a 63 6c 25 28 29  |row(cl%()):cl%()|
00021000  3d 63 6c 25 28 29 2b 6e  6c 25 28 29 3a 6e 6c 25  |=cl%()+nl%():nl%|
00021010  28 29 3d 30 3a 42 25 3d  78 25 3a 41 25 3d 61 64  |()=0:B%=x%:A%=ad|
00021020  64 72 25 3a 61 64 64 72  25 2b 3d 72 6f 77 73 74  |dr%:addr%+=rowst|
00021030  65 70 25 0d e0 42 0c e7  79 72 25 80 31 20 8c 0d  |ep%..B..yr%.1 ..|
00021040  e0 4c 2f d6 66 73 25 2c  63 6f 6c 73 74 65 70 25  |.L/.fs%,colstep%|
00021050  2c 63 6c 25 28 31 2c 30  29 2c 6e 6c 25 28 31 2c  |,cl%(1,0),nl%(1,|
00021060  30 29 2c 41 25 2c 73 74  65 70 25 2c 42 25 0d e0  |0),A%,step%,B%..|
00021070  56 05 cc 0d e0 60 41 41  25 2b 3d 64 69 73 74 25  |V....`AA%+=dist%|
00021080  3a d6 66 73 25 2c 6f 64  64 63 6f 6c 73 74 65 70  |:.fs%,oddcolstep|
00021090  25 2c 63 6c 25 28 78 25  2c 30 29 2c 6e 6c 25 28  |%,cl%(x%,0),nl%(|
000210a0  78 25 2c 30 29 2c 41 25  2c 6f 64 64 73 74 65 70  |x%,0),A%,oddstep|
000210b0  25 2c 42 25 0d e0 6a 05  cd 0d e0 74 05 ed 0d e0  |%,B%..j....t....|
000210c0  7e 05 cc 0d e0 88 47 49  25 3d 73 74 65 70 25 3a  |~.....GI%=step%:|
000210d0  e3 79 72 25 3d 30 b8 79  25 2d 31 3a c8 99 68 6f  |.yr%=0.y%-1:..ho|
000210e0  75 72 25 2c 79 72 25 2a  31 30 30 81 79 25 3a e7  |ur%,yr%*100.y%:.|
000210f0  61 64 64 72 25 3e 6f 75  74 6c 69 6d 25 20 f2 66  |addr%>outlim% .f|
00021100  6c 75 73 68 6f 75 74 70  75 74 0d e0 92 53 f2 69  |lushoutput...S.i|
00021110  70 72 6f 77 28 63 6c 25  28 29 29 3a 42 25 3d 78  |prow(cl%()):B%=x|
00021120  25 3a 41 25 3d 61 64 64  72 25 3a 61 64 64 72 25  |%:A%=addr%:addr%|
00021130  2b 3d 72 6f 77 73 74 65  70 25 3a d6 66 73 25 2c  |+=rowstep%:.fs%,|
00021140  63 6f 6c 73 74 65 70 25  2c 63 6c 25 28 31 2c 30  |colstep%,cl%(1,0|
00021150  29 2c 49 25 2c 41 25 2c  49 25 2c 42 25 0d e0 9c  |),I%,A%,I%,B%...|
00021160  05 ed 0d e0 a6 05 cd 0d  e0 b0 05 cc 0d e0 ba 0d  |................|
00021170  e7 65 71 75 61 6c 25 20  8c 0d e0 c4 39 f2 72 65  |.equal% ....9.re|
00021180  77 69 6e 64 3a 48 61 76  67 25 3d c6 8e 28 76 61  |wind:Havg%=..(va|
00021190  6c 73 25 28 29 29 2f 32  35 36 2f 28 63 6f 6c 2b  |ls%())/256/(col+|
000211a0  31 29 3a de 20 6e 65 77  25 28 32 35 36 2c 63 6f  |1):. new%(256,co|
000211b0  6c 29 0d e0 ce 3e e3 42  25 3d 30 b8 63 6f 6c 3a  |l)...>.B%=0.col:|
000211c0  52 25 3d 30 3a 48 69 6e  74 25 3d 30 3a e3 5a 25  |R%=0:Hint%=0:.Z%|
000211d0  3d 30 b8 32 35 36 3a 4c  25 3d 52 25 3a 48 69 6e  |=0.256:L%=R%:Hin|
000211e0  74 25 2b 3d 76 61 6c 73  25 28 5a 25 2c 42 25 29  |t%+=vals%(Z%,B%)|
000211f0  0d e0 d8 26 c8 95 48 69  6e 74 25 3e 48 61 76 67  |...&..Hint%>Havg|
00021200  25 3a 48 69 6e 74 25 2d  3d 48 61 76 67 25 3a 52  |%:Hint%-=Havg%:R|
00021210  25 2b 3d 31 3a ce 0d e0  e2 1f 6e 65 77 25 28 5a  |%+=1:.....new%(Z|
00021220  25 2c 42 25 29 3d 28 4c  25 2b 52 25 29 2f 32 2a  |%,B%)=(L%+R%)/2*|
00021230  46 2f 32 35 36 0d e0 ec  07 ed 3a ed 0d e0 f6 05  |F/256.....:.....|
00021240  cd 0d e1 00 0f e7 73 68  61 72 70 65 6e 25 20 8c  |......sharpen% .|
00021250  0d e1 0a 0d e7 6f 72 64  65 72 25 20 8c 0d e1 14  |.....order% ....|
00021260  35 79 72 65 61 64 25 3d  73 79 25 2d 31 3a f2 69  |5yread%=sy%-1:.i|
00021270  70 72 6f 77 28 72 6d 31  25 28 29 29 3a e7 65 71  |prow(rm1%()):.eq|
00021280  75 61 6c 25 20 f2 66 69  74 32 28 72 6d 31 25 28  |ual% .fit2(rm1%(|
00021290  29 29 0d e1 1e 41 e3 42  25 3d 30 b8 63 6f 6c 3a  |))...A.B%=0.col:|
000212a0  72 6d 31 25 28 30 2c 42  25 29 3d 72 6d 31 25 28  |rm1%(0,B%)=rm1%(|
000212b0  31 2c 42 25 29 3a 72 6d  31 25 28 73 78 25 2b 31  |1,B%):rm1%(sx%+1|
000212c0  2c 42 25 29 3d 72 6d 31  25 28 73 78 25 2c 42 25  |,B%)=rm1%(sx%,B%|
000212d0  29 3a ed 0d e1 28 05 cc  0d e1 32 3c 79 72 65 61  |):...(....2<yrea|
000212e0  64 25 3d 79 25 2d 31 3a  f2 73 63 61 6c 65 64 70  |d%=y%-1:.scaledp|
000212f0  69 78 65 6c 72 6f 77 28  72 6d 31 25 28 29 29 3a  |ixelrow(rm1%()):|
00021300  e7 65 71 75 61 6c 25 20  f2 66 69 74 28 72 6d 31  |.equal% .fit(rm1|
00021310  25 28 29 29 0d e1 3c 3f  e3 42 25 3d 30 b8 63 6f  |%())..<?.B%=0.co|
00021320  6c 3a 72 6d 31 25 28 30  2c 42 25 29 3d 72 6d 31  |l:rm1%(0,B%)=rm1|
00021330  25 28 31 2c 42 25 29 3a  72 6d 31 25 28 78 25 2b  |%(1,B%):rm1%(x%+|
00021340  31 2c 42 25 29 3d 72 6d  31 25 28 78 25 2c 42 25  |1,B%)=rm1%(x%,B%|
00021350  29 3a ed 0d e1 46 05 cd  0d e1 50 11 72 6d 32 25  |):...F....P.rm2%|
00021360  28 29 3d 72 6d 31 25 28  29 0d e1 5a 05 cd 0d e1  |()=rm1%()..Z....|
00021370  64 0d e7 6f 72 64 65 72  25 20 8c 0d e1 6e 11 e3  |d..order% ...n..|
00021380  79 72 25 3d 30 20 b8 20  79 25 2d 31 0d e1 78 32  |yr%=0 . y%-1..x2|
00021390  c8 99 68 6f 75 72 25 2c  79 72 25 2a 31 30 30 81  |..hour%,yr%*100.|
000213a0  79 25 3a e7 61 64 64 72  25 3e 6f 75 74 6c 69 6d  |y%:.addr%>outlim|
000213b0  25 20 f2 66 6c 75 73 68  6f 75 74 70 75 74 0d e1  |% .flushoutput..|
000213c0  82 0d e7 73 79 25 3d 79  25 20 8c 0d e1 8c 19 f2  |...sy%=y% ......|
000213d0  73 68 61 72 70 70 69 78  65 6c 72 6f 77 28 63 6c  |sharppixelrow(cl|
000213e0  25 28 29 29 0d e1 96 05  cc 0d e1 a0 3a 79 73 61  |%())........:ysa|
000213f0  6d 70 25 2d 3d 31 3a e7  79 73 61 6d 70 25 3d 30  |mp%-=1:.ysamp%=0|
00021400  20 f2 73 68 61 72 70 70  69 78 65 6c 72 6f 77 28  | .sharppixelrow(|
00021410  78 6c 25 28 29 29 3a 79  73 61 6d 70 25 3d 79 6d  |xl%()):ysamp%=ym|
00021420  75 6c 25 0d e1 aa 0e e7  79 64 69 76 25 3d 31 20  |ul%.....ydiv%=1 |
00021430  8c 0d e1 b4 0f 63 6c 25  28 29 3d 78 6c 25 28 29  |.....cl%()=xl%()|
00021440  0d e1 be 05 cc 0d e1 c8  14 e7 79 73 61 6d 70 25  |..........ysamp%|
00021450  3e 3d 79 64 69 76 25 20  8c 0d e1 d2 23 79 73 61  |>=ydiv% ....#ysa|
00021460  6d 70 25 2d 3d 79 64 69  76 25 3a 63 6c 25 28 29  |mp%-=ydiv%:cl%()|
00021470  3d 78 6c 25 28 29 2a 79  64 69 76 25 0d e1 dc 05  |=xl%()*ydiv%....|
00021480  cc 0d e1 e6 2f 63 6c 25  28 29 3d 78 6c 25 28 29  |..../cl%()=xl%()|
00021490  2a 79 73 61 6d 70 25 3a  59 25 3d 79 64 69 76 25  |*ysamp%:Y%=ydiv%|
000214a0  2d 79 73 61 6d 70 25 3a  79 73 61 6d 70 25 3d 30  |-ysamp%:ysamp%=0|
000214b0  0d e1 f0 05 f5 0d e1 fa  30 e7 79 73 61 6d 70 25  |........0.ysamp%|
000214c0  3d 30 20 f2 73 68 61 72  70 70 69 78 65 6c 72 6f  |=0 .sharppixelro|
000214d0  77 28 78 6c 25 28 29 29  3a 79 73 61 6d 70 25 3d  |w(xl%()):ysamp%=|
000214e0  79 6d 75 6c 25 0d e2 04  10 e7 79 73 61 6d 70 25  |ymul%.....ysamp%|
000214f0  3e 59 25 20 8c 0d e2 0e  36 79 73 61 6d 70 25 2d  |>Y% ....6ysamp%-|
00021500  3d 59 25 3a 78 6c 32 25  28 29 3d 78 6c 25 28 29  |=Y%:xl2%()=xl%()|
00021510  2a 59 25 3a 63 6c 25 28  29 3d 63 6c 25 28 29 2b  |*Y%:cl%()=cl%()+|
00021520  78 6c 32 25 28 29 3a 59  25 3d 30 0d e2 18 05 cc  |xl2%():Y%=0.....|
00021530  0d e2 22 3e 59 25 2d 3d  79 73 61 6d 70 25 3a 78  |..">Y%-=ysamp%:x|
00021540  6c 32 25 28 29 3d 78 6c  25 28 29 2a 79 73 61 6d  |l2%()=xl%()*ysam|
00021550  70 25 3a 63 6c 25 28 29  3d 63 6c 25 28 29 2b 78  |p%:cl%()=cl%()+x|
00021560  6c 32 25 28 29 3a 79 73  61 6d 70 25 3d 30 0d e2  |l2%():ysamp%=0..|
00021570  2c 05 cd 0d e2 36 0a fd  20 59 25 3d 30 0d e2 40  |,....6.. Y%=0..@|
00021580  05 cd 0d e2 4a 0d 79 73  61 6d 70 25 2b 3d 31 0d  |....J.ysamp%+=1.|
00021590  e2 54 05 cd 0d e2 5e 05  cd 0d e2 68 3c 63 6c 25  |.T....^....h<cl%|
000215a0  28 29 3d 63 6c 25 28 29  2b 6e 6c 25 28 29 3a 6e  |()=cl%()+nl%():n|
000215b0  6c 25 28 29 3d 30 3a 42  25 3d 78 25 3a 41 25 3d  |l%()=0:B%=x%:A%=|
000215c0  61 64 64 72 25 3a 61 64  64 72 25 2b 3d 72 6f 77  |addr%:addr%+=row|
000215d0  73 74 65 70 25 0d e2 72  0c e7 79 72 25 80 31 20  |step%..r..yr%.1 |
000215e0  8c 0d e2 7c 2f d6 66 73  25 2c 63 6f 6c 73 74 65  |...|/.fs%,colste|
000215f0  70 25 2c 63 6c 25 28 31  2c 30 29 2c 6e 6c 25 28  |p%,cl%(1,0),nl%(|
00021600  31 2c 30 29 2c 41 25 2c  73 74 65 70 25 2c 42 25  |1,0),A%,step%,B%|
00021610  0d e2 86 05 cc 0d e2 90  41 41 25 2b 3d 64 69 73  |........AA%+=dis|
00021620  74 25 3a d6 66 73 25 2c  6f 64 64 63 6f 6c 73 74  |t%:.fs%,oddcolst|
00021630  65 70 25 2c 63 6c 25 28  78 25 2c 30 29 2c 6e 6c  |ep%,cl%(x%,0),nl|
00021640  25 28 78 25 2c 30 29 2c  41 25 2c 6f 64 64 73 74  |%(x%,0),A%,oddst|
00021650  65 70 25 2c 42 25 0d e2  9a 05 cd 0d e2 a4 05 ed  |ep%,B%..........|
00021660  0d e2 ae 05 cc 0d e2 b8  11 e3 79 72 25 3d 30 20  |..........yr%=0 |
00021670  b8 20 79 25 2d 31 0d e2  c2 32 c8 99 68 6f 75 72  |. y%-1...2..hour|
00021680  25 2c 79 72 25 2a 31 30  30 81 79 25 3a e7 61 64  |%,yr%*100.y%:.ad|
00021690  64 72 25 3e 6f 75 74 6c  69 6d 25 20 f2 66 6c 75  |dr%>outlim% .flu|
000216a0  73 68 6f 75 74 70 75 74  0d e2 cc 0f e7 73 68 61  |shoutput.....sha|
000216b0  72 70 65 6e 25 20 8c 0d  e2 d6 40 e7 79 72 65 61  |rpen% ....@.yrea|
000216c0  64 25 20 79 72 65 61 64  25 2d 3d 31 3a f2 73 63  |d% yread%-=1:.sc|
000216d0  61 6c 65 64 70 69 78 65  6c 72 6f 77 28 72 6d 25  |aledpixelrow(rm%|
000216e0  28 29 29 3a e7 65 71 75  61 6c 25 20 f2 66 69 74  |()):.equal% .fit|
000216f0  28 72 6d 25 28 29 29 0d  e2 e0 3b e3 42 25 3d 30  |(rm%())...;.B%=0|
00021700  b8 63 6f 6c 3a 72 6d 25  28 30 2c 42 25 29 3d 72  |.col:rm%(0,B%)=r|
00021710  6d 25 28 31 2c 42 25 29  3a 72 6d 25 28 78 25 2b  |m%(1,B%):rm%(x%+|
00021720  31 2c 42 25 29 3d 72 6d  25 28 78 25 2c 42 25 29  |1,B%)=rm%(x%,B%)|
00021730  3a ed 0d e2 ea 3b d6 20  73 68 61 72 70 25 2c 63  |:....;. sharp%,c|
00021740  6c 25 28 31 2c 30 29 2c  72 6d 25 28 31 2c 30 29  |l%(1,0),rm%(1,0)|
00021750  2c 72 6d 31 25 28 31 2c  30 29 2c 72 6d 32 25 28  |,rm1%(1,0),rm2%(|
00021760  31 2c 30 29 2c 74 6f 74  76 61 6c 73 25 0d e2 f4  |1,0),totvals%...|
00021770  21 c8 94 20 72 6d 32 25  28 29 2c 72 6d 31 25 28  |!.. rm2%(),rm1%(|
00021780  29 3a 72 6d 31 25 28 29  3d 72 6d 25 28 29 0d e2  |):rm1%()=rm%()..|
00021790  fe 05 cc 0d e3 08 2e f2  73 63 61 6c 65 64 70 69  |........scaledpi|
000217a0  78 65 6c 72 6f 77 28 63  6c 25 28 29 29 3a e7 65  |xelrow(cl%()):.e|
000217b0  71 75 61 6c 25 20 f2 66  69 74 28 63 6c 25 28 29  |qual% .fit(cl%()|
000217c0  29 0d e3 12 05 cd 0d e3  1c 3c 63 6c 25 28 29 3d  |)........<cl%()=|
000217d0  63 6c 25 28 29 2b 6e 6c  25 28 29 3a 6e 6c 25 28  |cl%()+nl%():nl%(|
000217e0  29 3d 30 3a 42 25 3d 78  25 3a 41 25 3d 61 64 64  |)=0:B%=x%:A%=add|
000217f0  72 25 3a 61 64 64 72 25  2b 3d 72 6f 77 73 74 65  |r%:addr%+=rowste|
00021800  70 25 0d e3 26 0c e7 79  72 25 80 31 20 8c 0d e3  |p%..&..yr%.1 ...|
00021810  30 2f d6 66 73 25 2c 63  6f 6c 73 74 65 70 25 2c  |0/.fs%,colstep%,|
00021820  63 6c 25 28 31 2c 30 29  2c 6e 6c 25 28 31 2c 30  |cl%(1,0),nl%(1,0|
00021830  29 2c 41 25 2c 73 74 65  70 25 2c 42 25 0d e3 3a  |),A%,step%,B%..:|
00021840  05 cc 0d e3 44 41 41 25  2b 3d 64 69 73 74 25 3a  |....DAA%+=dist%:|
00021850  d6 66 73 25 2c 6f 64 64  63 6f 6c 73 74 65 70 25  |.fs%,oddcolstep%|
00021860  2c 63 6c 25 28 78 25 2c  30 29 2c 6e 6c 25 28 78  |,cl%(x%,0),nl%(x|
00021870  25 2c 30 29 2c 41 25 2c  6f 64 64 73 74 65 70 25  |%,0),A%,oddstep%|
00021880  2c 42 25 0d e3 4e 05 cd  0d e3 58 05 ed 0d e3 62  |,B%..N....X....b|
00021890  05 cd 0d e3 6c 05 cd 0d  e3 76 09 f2 53 61 76 65  |....l....v..Save|
000218a0  0d e3 80 06 3d 30 0d e3  8a 1f dd 20 f2 67 65 74  |....=0..... .get|
000218b0  6f 75 74 70 75 74 28 41  25 2c 45 25 2c 42 25 2c  |output(A%,E%,B%,|
000218c0  f8 20 43 25 29 0d e3 94  1a e7 41 25 3e 6d 61 78  |. C%).....A%>max|
000218d0  25 20 80 20 72 6f 74 61  74 65 25 3d a3 20 8c 0d  |% . rotate%=. ..|
000218e0  e3 9e 31 43 25 3d 6d 61  78 25 81 42 25 2b 31 3a  |..1C%=max%.B%+1:|
000218f0  41 25 3d 78 77 6f 72 64  73 25 2a 43 25 2b 45 25  |A%=xwords%*C%+E%|
00021900  3a 66 69 72 73 74 25 3d  b9 3a 6f 25 3d ae 66 24  |:first%=.:o%=.f$|
00021910  0d e3 a8 05 cc 0d e3 b2  0a 41 25 2b 3d 45 25 0d  |.........A%+=E%.|
00021920  e3 bc 05 cd 0d e3 c6 33  e7 73 70 72 69 74 65 61  |.......3.spritea|
00021930  72 65 61 25 3c 30 20 8c  72 61 6d 25 3d a4 64 69  |rea%<0 .ram%=.di|
00021940  6d 28 41 25 29 20 8b 72  61 6d 25 3d 73 70 72 69  |m(A%) .ram%=spri|
00021950  74 65 61 72 65 61 25 0d  e3 d0 0c 21 72 61 6d 25  |tearea%....!ram%|
00021960  3d 41 25 0d e3 da 05 e1  0d e3 e4 12 dd 20 f2 66  |=A%.......... .f|
00021970  6c 75 73 68 6f 75 74 70  75 74 0d e3 ee 1d e7 73  |lushoutput.....s|
00021980  70 72 69 74 65 61 72 65  61 25 3c 30 20 80 6f 6b  |pritearea%<0 .ok|
00021990  73 61 76 65 25 20 8c 0d  e3 f8 24 e7 68 66 6c 69  |save% ....$.hfli|
000219a0  70 25 20 c8 99 26 32 65  2c 32 35 36 2b 34 37 2c  |p% ..&2e,256+47,|
000219b0  72 61 6d 25 2c 6f 6e 61  6d 65 24 0d e4 02 27 41  |ram%,oname$...'A|
000219c0  25 3d 62 61 73 65 25 3a  e7 66 69 72 73 74 25 20  |%=base%:.first% |
000219d0  41 25 3d 72 61 6d 25 2b  34 3a 66 69 72 73 74 25  |A%=ram%+4:first%|
000219e0  3d a3 0d e4 0c 1f c8 99  31 32 2c 32 2c 6f 25 2c  |=.......12,2,o%,|
000219f0  41 25 2c 61 64 64 72 25  81 73 69 7a 65 25 2d 41  |A%,addr%.size%-A|
00021a00  25 0d e4 16 05 cd 0d e4  20 15 61 64 64 72 25 3d  |%....... .addr%=|
00021a10  62 61 73 65 25 2a 73 69  7a 65 25 0d e4 2a 05 e1  |base%*size%..*..|
00021a20  0d e4 34 0b dd 20 f2 53  61 76 65 0d e4 3e 11 e7  |..4.. .Save..>..|
00021a30  63 25 20 d9 23 63 25 3a  63 25 3d 30 0d e4 48 14  |c% .#c%:c%=0..H.|
00021a40  e7 63 63 25 20 d9 23 63  63 25 3a 63 63 25 3d 30  |.cc% .#cc%:cc%=0|
00021a50  0d e4 52 17 e7 63 63 63  25 20 d9 23 63 63 63 25  |..R..ccc% .#ccc%|
00021a60  3a 63 63 63 25 3d 30 0d  e4 5c 0a c8 8e 20 6d 20  |:ccc%=0..\... m |
00021a70  ca 0d e4 66 22 c9 20 2d  31 3a e7 73 70 72 69 74  |...f". -1:.sprit|
00021a80  65 61 72 65 61 25 3c 30  20 80 6f 6b 73 61 76 65  |earea%<0 .oksave|
00021a90  25 20 8c 0d e4 70 3b e7  6f 25 20 f2 66 6c 75 73  |% ...p;.o% .flus|
00021aa0  68 6f 75 74 70 75 74 20  8b c8 99 22 4f 53 5f 46  |houtput ..."OS_F|
00021ab0  69 6c 65 22 2c 31 30 2c  66 24 2c 26 30 30 34 2c  |ile",10,f$,&004,|
00021ac0  2c 72 61 6d 25 2c 72 61  6d 25 2b 73 7a 25 0d e4  |,ram%,ram%+sz%..|
00021ad0  7a 05 cd 0d e4 84 19 c9  20 2d 32 3a 6f 25 3d ae  |z....... -2:o%=.|
00021ae0  66 24 3a d5 23 6f 25 2c  70 6e 6d 24 0d e4 8e 24  |f$:.#o%,pnm$...$|
00021af0  e7 76 66 6c 69 70 25 20  c8 99 26 32 65 2c 32 35  |.vflip% ..&2e,25|
00021b00  36 2b 33 33 2c 72 61 6d  25 2c 6f 6e 61 6d 65 24  |6+33,ram%,oname$|
00021b10  0d e4 98 24 e7 68 66 6c  69 70 25 20 c8 99 26 32  |...$.hflip% ..&2|
00021b20  65 2c 32 35 36 2b 34 37  2c 72 61 6d 25 2c 6f 6e  |e,256+47,ram%,on|
00021b30  61 6d 65 24 0d e4 a2 0d  c8 8e 20 70 6e 6d 24 20  |ame$...... pnm$ |
00021b40  ca 0d e4 ac 0a c9 20 22  50 31 22 0d e4 b6 2c d5  |...... "P1"...,.|
00021b50  23 6f 25 2c 22 23 20 22  2b 66 24 2b 22 2e 70 62  |#o%,"# "+f$+".pb|
00021b60  6d 20 28 6f 70 74 69 6f  6e 73 20 22 2b 6f 6e 61  |m (options "+ona|
00021b70  6d 65 24 2b 22 29 22 0d  e4 c0 18 d5 23 6f 25 2c  |me$+")".....#o%,|
00021b80  c3 78 73 70 25 2b 22 20  22 2b c3 79 73 70 25 0d  |.xsp%+" "+.ysp%.|
00021b90  e4 ca 24 e3 59 25 3d 30  b8 79 73 70 25 2d 31 3a  |..$.Y%=0.ysp%-1:|
00021ba0  42 25 3d 62 61 73 65 25  2b 59 25 2a 78 77 6f 72  |B%=base%+Y%*xwor|
00021bb0  64 73 25 0d e4 d4 3d e3  58 25 3d 30 b8 78 73 70  |ds%...=.X%=0.xsp|
00021bc0  25 2d 31 3a e7 42 25 3f  28 58 25 3e 3e 33 29 80  |%-1:.B%?(X%>>3).|
00021bd0  28 31 3c 3c 28 58 25 80  37 29 29 20 d5 23 6f 25  |(1<<(X%.7)) .#o%|
00021be0  2c 22 31 22 3b 20 8b d5  23 6f 25 2c 22 30 22 3b  |,"1"; ..#o%,"0";|
00021bf0  0d e4 de 05 ed 0d e4 e8  0b d5 23 6f 25 2c 22 22  |..........#o%,""|
00021c00  0d e4 f2 05 ed 0d e4 fc  0a c9 20 22 50 34 22 0d  |.......... "P4".|
00021c10  e5 06 3b d5 23 6f 25 2c  22 23 20 22 2b 66 24 2b  |..;.#o%,"# "+f$+|
00021c20  22 2e 70 62 6d 20 28 6f  70 74 69 6f 6e 73 20 22  |".pbm (options "|
00021c30  2b 6f 6e 61 6d 65 24 2b  22 29 20 62 69 6e 61 72  |+oname$+") binar|
00021c40  79 20 65 6e 63 6f 64 65  64 22 0d e5 10 18 d5 23  |y encoded".....#|
00021c50  6f 25 2c c3 78 73 70 25  2b 22 20 22 2b c3 79 73  |o%,.xsp%+" "+.ys|
00021c60  70 25 0d e5 1a 66 e3 58  25 3d 30 b8 32 35 35 3a  |p%...f.X%=0.255:|
00021c70  63 6f 64 65 25 3f 58 25  3d 58 25 3c 3c 37 20 84  |code%?X%=X%<<7 .|
00021c80  20 58 25 3c 3c 35 80 26  34 30 20 84 20 58 25 3c  | X%<<5.&40 . X%<|
00021c90  3c 33 80 26 32 30 20 84  20 58 25 3c 3c 31 80 26  |<3.&20 . X%<<1.&|
00021ca0  31 30 20 84 20 58 25 3e  3e 31 80 38 20 84 20 58  |10 . X%>>1.8 . X|
00021cb0  25 3e 3e 33 80 34 20 84  58 25 3e 3e 35 80 32 20  |%>>3.4 .X%>>5.2 |
00021cc0  84 58 25 3e 3e 37 3a ed  0d e5 24 24 e3 59 25 3d  |.X%>>7:...$$.Y%=|
00021cd0  30 b8 79 73 70 25 2d 31  3a 42 25 3d 62 61 73 65  |0.ysp%-1:B%=base|
00021ce0  25 2b 59 25 2a 78 77 6f  72 64 73 25 0d e5 2e 2c  |%+Y%*xwords%...,|
00021cf0  e3 58 25 3d 30 b8 78 73  70 25 2d 31 88 38 3a d5  |.X%=0.xsp%-1.8:.|
00021d00  23 6f 25 2c 63 6f 64 65  25 3f 28 42 25 3f 28 58  |#o%,code%?(B%?(X|
00021d10  25 3e 3e 33 29 29 3a ed  0d e5 38 05 ed 0d e5 42  |%>>3)):...8....B|
00021d20  0a c9 20 22 50 32 22 0d  e5 4c 2c d5 23 6f 25 2c  |.. "P2"..L,.#o%,|
00021d30  22 23 20 22 2b 66 24 2b  22 2e 70 67 6d 20 28 6f  |"# "+f$+".pgm (o|
00021d40  70 74 69 6f 6e 73 20 22  2b 6f 6e 61 6d 65 24 2b  |ptions "+oname$+|
00021d50  22 29 22 0d e5 56 18 d5  23 6f 25 2c c3 78 73 70  |")"..V..#o%,.xsp|
00021d60  25 2b 22 20 22 2b c3 79  73 70 25 0d e5 60 0d d5  |%+" "+.ysp%..`..|
00021d70  23 6f 25 2c 22 31 35 22  0d e5 6a 24 e3 59 25 3d  |#o%,"15"..j$.Y%=|
00021d80  30 b8 79 73 70 25 2d 31  3a 42 25 3d 62 61 73 65  |0.ysp%-1:B%=base|
00021d90  25 2b 59 25 2a 78 77 6f  72 64 73 25 0d e5 74 37  |%+Y%*xwords%..t7|
00021da0  e3 58 25 3d 30 b8 78 73  70 25 2d 31 3a 43 25 3d  |.X%=0.xsp%-1:C%=|
00021db0  42 25 3f 28 58 25 3e 3e  31 29 3a e7 58 25 80 31  |B%?(X%>>1):.X%.1|
00021dc0  20 43 25 3d 43 25 3e 3e  34 20 8b 43 25 3d 43 25  | C%=C%>>4 .C%=C%|
00021dd0  80 31 35 0d e5 7e 11 d5  23 6f 25 2c 22 20 22 2b  |.15..~..#o%," "+|
00021de0  c3 43 25 3b 0d e5 88 05  ed 0d e5 92 0b d5 23 6f  |.C%;..........#o|
00021df0  25 2c 22 22 0d e5 9c 05  ed 0d e5 a6 0a c9 20 22  |%,"".......... "|
00021e00  50 35 22 0d e5 b0 3b d5  23 6f 25 2c 22 23 20 22  |P5"...;.#o%,"# "|
00021e10  2b 66 24 2b 22 2e 70 67  6d 20 28 6f 70 74 69 6f  |+f$+".pgm (optio|
00021e20  6e 73 20 22 2b 6f 6e 61  6d 65 24 2b 22 29 20 62  |ns "+oname$+") b|
00021e30  69 6e 61 72 79 20 65 6e  63 6f 64 65 64 22 0d e5  |inary encoded"..|
00021e40  ba 18 d5 23 6f 25 2c c3  78 73 70 25 2b 22 20 22  |...#o%,.xsp%+" "|
00021e50  2b c3 79 73 70 25 0d e5  c4 0d d5 23 6f 25 2c 22  |+.ysp%.....#o%,"|
00021e60  31 35 22 0d e5 ce 24 e3  59 25 3d 30 b8 79 73 70  |15"...$.Y%=0.ysp|
00021e70  25 2d 31 3a 42 25 3d 62  61 73 65 25 2b 59 25 2a  |%-1:B%=base%+Y%*|
00021e80  78 77 6f 72 64 73 25 0d  e5 d8 37 e3 58 25 3d 30  |xwords%...7.X%=0|
00021e90  b8 78 73 70 25 2d 31 3a  43 25 3d 42 25 3f 28 58  |.xsp%-1:C%=B%?(X|
00021ea0  25 3e 3e 31 29 3a e7 58  25 80 31 20 43 25 3d 43  |%>>1):.X%.1 C%=C|
00021eb0  25 3e 3e 34 20 8b 43 25  3d 43 25 80 31 35 0d e5  |%>>4 .C%=C%.15..|
00021ec0  e2 0b d5 23 6f 25 2c 43  25 0d e5 ec 05 ed 0d e5  |...#o%,C%.......|
00021ed0  f6 05 ed 0d e6 00 05 cb  0d e6 0a 0d d9 23 6f 25  |.............#o%|
00021ee0  3a 6f 25 3d 30 0d e6 14  05 7f 0d e6 1e 24 e7 76  |:o%=0........$.v|
00021ef0  66 6c 69 70 25 20 c8 99  26 32 65 2c 32 35 36 2b  |flip% ..&2e,256+|
00021f00  33 33 2c 72 61 6d 25 2c  6f 6e 61 6d 65 24 0d e6  |33,ram%,oname$..|
00021f10  28 24 e7 68 66 6c 69 70  25 20 c8 99 26 32 65 2c  |($.hflip% ..&2e,|
00021f20  32 35 36 2b 34 37 2c 72  61 6d 25 2c 6f 6e 61 6d  |256+47,ram%,onam|
00021f30  65 24 0d e6 32 14 e7 6e  63 6f 6c 3d 31 80 6d 24  |e$..2..ncol=1.m$|
00021f40  3d 22 54 22 20 8c 0d e6  3c 1d e3 58 25 3d 28 78  |="T" ...<..X%=(x|
00021f50  73 70 25 2a 34 2d 31 29  81 38 2a 38 2b 36 b8 36  |sp%*4-1).8*8+6.6|
00021f60  88 2d 38 0d e6 46 1d c8  99 26 32 65 2c 26 31 32  |.-8..F...&2e,&12|
00021f70  65 2c 72 61 6d 25 2c 6f  6e 61 6d 65 24 2c 58 25  |e,ram%,oname$,X%|
00021f80  0d e6 50 1d c8 99 26 32  65 2c 26 31 32 65 2c 72  |..P...&2e,&12e,r|
00021f90  61 6d 25 2c 6f 6e 61 6d  65 24 2c 58 25 0d e6 5a  |am%,oname$,X%..Z|
00021fa0  05 ed 0d e6 64 05 cd 0d  e6 6e 1d e7 73 70 72 69  |....d....n..spri|
00021fb0  74 65 61 72 65 61 25 3c  30 20 80 6f 6b 73 61 76  |tearea%<0 .oksav|
00021fc0  65 25 20 8c 0d e6 78 28  e7 6f 25 20 f2 66 6c 75  |e% ...x(.o% .flu|
00021fd0  73 68 6f 75 74 70 75 74  20 8b c8 99 26 32 65 2c  |shoutput ...&2e,|
00021fe0  26 31 30 63 2c 72 61 6d  25 2c 66 24 0d e6 82 05  |&10c,ram%,f$....|
00021ff0  cd 0d e6 8c 05 cb 0d e6  96 27 e7 6f 25 20 d9 23  |.........'.o% .#|
00022000  6f 25 3a 6f 25 3d 30 3a  ff 22 73 65 74 74 79 70  |o%:o%=0:."settyp|
00022010  65 20 22 2b 66 24 2b 22  20 66 66 39 22 0d e6 a0  |e "+f$+" ff9"...|
00022020  15 c8 99 22 48 6f 75 72  67 6c 61 73 73 5f 4f 66  |..."Hourglass_Of|
00022030  66 22 0d e6 aa 05 e1 0d  e6 b4 0c dd f2 64 65 66  |f"...........def|
00022040  70 61 6c 0d e6 be 0d e3  43 25 3d 30 b8 32 35 35  |pal.....C%=0.255|
00022050  0d e6 c8 23 72 25 28 43  25 29 3d 28 43 25 80 37  |...#r%(C%)=(C%.7|
00022060  20 84 20 28 43 25 80 31  36 29 3e 3e 31 29 2f 31  | . (C%.16)>>1)/1|
00022070  35 2a 46 0d e6 d2 24 67  25 28 43 25 29 3d 28 43  |5*F...$g%(C%)=(C|
00022080  25 80 33 20 84 20 28 43  25 80 26 36 30 29 3e 3e  |%.3 . (C%.&60)>>|
00022090  33 29 2f 31 35 2a 46 0d  e6 dc 30 62 25 28 43 25  |3)/15*F...0b%(C%|
000220a0  29 3d 28 43 25 80 33 20  84 20 28 43 25 80 38 29  |)=(C%.3 . (C%.8)|
000220b0  3e 3e 31 20 84 20 28 43  25 80 31 32 38 29 3e 3e  |>>1 . (C%.128)>>|
000220c0  34 29 2f 31 35 2a 46 0d  e6 e6 05 ed 0d e6 f0 05  |4)/15*F.........|
000220d0  e1 0d e6 fa 0d dd f2 64  65 66 70 61 6c 32 0d e7  |.......defpal2..|
000220e0  04 1b 72 25 28 30 29 3d  46 3a 67 25 28 30 29 3d  |..r%(0)=F:g%(0)=|
000220f0  46 3a 62 25 28 30 29 3d  46 0d e7 0e 05 e1 0d e7  |F:b%(0)=F.......|
00022100  18 0d dd f2 64 65 66 70  61 6c 34 0d e7 22 2f 72  |....defpal4.."/r|
00022110  25 28 29 3d 31 35 2c 31  30 2c 35 2c 30 3a e3 43  |%()=15,10,5,0:.C|
00022120  25 3d 30 b8 33 3a 72 25  28 43 25 29 3d 72 25 28  |%=0.3:r%(C%)=r%(|
00022130  43 25 29 2f 31 35 2a 46  3a ed 0d e7 2c 17 67 25  |C%)/15*F:...,.g%|
00022140  28 29 3d 72 25 28 29 3a  62 25 28 29 3d 72 25 28  |()=r%():b%()=r%(|
00022150  29 0d e7 36 05 e1 0d e7  40 0e dd f2 64 65 66 70  |)..6....@...defp|
00022160  61 6c 31 36 0d e7 4a 31  72 25 28 29 3d 31 35 2c  |al16..J1r%()=15,|
00022170  31 33 2c 31 31 2c 39 2c  37 2c 35 2c 33 2c 30 2c  |13,11,9,7,5,3,0,|
00022180  30 2c 31 34 2c 20 30 2c  31 33 2c 31 34 2c 35 2c  |0,14, 0,13,14,5,|
00022190  31 35 2c 20 30 0d e7 54  31 67 25 28 29 3d 31 35  |15, 0..T1g%()=15|
000221a0  2c 31 33 2c 31 31 2c 39  2c 37 2c 35 2c 33 2c 30  |,13,11,9,7,5,3,0|
000221b0  2c 34 2c 31 34 2c 31 32  2c 20 30 2c 31 34 2c 38  |,4,14,12, 0,14,8|
000221c0  2c 31 31 2c 31 30 0d e7  5e 31 62 25 28 29 3d 31  |,11,10..^1b%()=1|
000221d0  35 2c 31 33 2c 31 31 2c  39 2c 37 2c 35 2c 33 2c  |5,13,11,9,7,5,3,|
000221e0  30 2c 39 2c 20 30 2c 20  30 2c 20 30 2c 31 31 2c  |0,9, 0, 0, 0,11,|
000221f0  30 2c 20 30 2c 31 35 0d  e7 68 47 e3 43 25 3d 30  |0, 0,15..hG.C%=0|
00022200  b8 31 35 3a 72 25 28 43  25 29 3d 72 25 28 43 25  |.15:r%(C%)=r%(C%|
00022210  29 2f 31 35 2a 46 3a 67  25 28 43 25 29 3d 67 25  |)/15*F:g%(C%)=g%|
00022220  28 43 25 29 2f 31 35 2a  46 3a 62 25 28 43 25 29  |(C%)/15*F:b%(C%)|
00022230  3d 62 25 28 43 25 29 2f  31 35 2a 46 3a ed 0d e7  |=b%(C%)/15*F:...|
00022240  72 05 e1 0d e7 7c 0c dd  f2 69 70 61 6c 36 33 0d  |r....|...ipal63.|
00022250  e7 86 2c cf 23 63 25 3d  26 33 38 3a de 20 72 70  |..,.#c%=&38:. rp|
00022260  61 6c 25 28 31 35 29 2c  67 70 61 6c 25 28 31 35  |al%(15),gpal%(15|
00022270  29 2c 62 70 61 6c 25 28  31 35 29 0d e7 90 14 e3  |),bpal%(15).....|
00022280  43 25 3d 30 b8 31 35 3a  44 25 3d 9a 23 63 25 0d  |C%=0.15:D%=.#c%.|
00022290  e7 9a 19 72 70 61 6c 25  28 43 25 29 3d 9a 23 63  |...rpal%(C%)=.#c|
000222a0  25 3e 3e 34 20 80 20 37  0d e7 a4 19 67 70 61 6c  |%>>4 . 7....gpal|
000222b0  25 28 43 25 29 3d 9a 23  63 25 3e 3e 34 20 80 20  |%(C%)=.#c%>>4 . |
000222c0  33 0d e7 ae 19 62 70 61  6c 25 28 43 25 29 3d 9a  |3....bpal%(C%)=.|
000222d0  23 63 25 3e 3e 34 20 80  20 37 0d e7 b8 0b 44 25  |#c%>>4 . 7....D%|
000222e0  3d a4 57 3a ed 0d e7 c2  0d e3 43 25 3d 30 b8 32  |=.W:......C%=0.2|
000222f0  35 35 0d e7 cc 29 72 25  28 43 25 29 3d 28 72 70  |55...)r%(C%)=(rp|
00022300  61 6c 25 28 43 25 80 31  35 29 84 28 43 25 80 31  |al%(C%.15).(C%.1|
00022310  36 29 3e 3e 31 29 2f 31  35 2a 46 0d e7 d6 2a 67  |6)>>1)/15*F...*g|
00022320  25 28 43 25 29 3d 28 67  70 61 6c 25 28 43 25 80  |%(C%)=(gpal%(C%.|
00022330  31 35 29 84 28 43 25 80  26 36 30 29 3e 3e 33 29  |15).(C%.&60)>>3)|
00022340  2f 31 35 2a 46 0d e7 e0  2a 62 25 28 43 25 29 3d  |/15*F...*b%(C%)=|
00022350  28 62 70 61 6c 25 28 43  25 80 31 35 29 84 28 43  |(bpal%(C%.15).(C|
00022360  25 80 31 32 38 29 3e 3e  34 29 2f 31 35 2a 46 0d  |%.128)>>4)/15*F.|
00022370  e7 ea 05 ed 0d e7 f4 05  e1 0d e7 fe 0e dd f2 69  |...............i|
00022380  70 61 6c 28 44 25 29 0d  e8 08 0c cf 23 63 25 3d  |pal(D%).....#c%=|
00022390  26 33 38 0d e8 12 16 e3  43 25 3d 30 b8 44 25 2d  |&38.....C%=0.D%-|
000223a0  31 3a 44 25 3d 9a 23 63  25 0d e8 1c 19 72 25 28  |1:D%=.#c%....r%(|
000223b0  43 25 29 3d 28 9a 23 63  25 3e 3e 34 29 2f 31 35  |C%)=(.#c%>>4)/15|
000223c0  2a 46 0d e8 26 19 67 25  28 43 25 29 3d 28 9a 23  |*F..&.g%(C%)=(.#|
000223d0  63 25 3e 3e 34 29 2f 31  35 2a 46 0d e8 30 19 62  |c%>>4)/15*F..0.b|
000223e0  25 28 43 25 29 3d 28 9a  23 63 25 3e 3e 34 29 2f  |%(C%)=(.#c%>>4)/|
000223f0  31 35 2a 46 0d e8 3a 0b  44 25 3d a4 57 3a ed 0d  |15*F..:.D%=.W:..|
00022400  e8 44 05 e1 0d e8 4e 0c  dd 20 f2 6e 6f 70 61 6c  |.D....N.. .nopal|
00022410  0d e8 58 33 e3 43 25 3d  30 b8 32 35 35 3a 72 25  |..X3.C%=0.255:r%|
00022420  28 43 25 29 3d 43 25 2f  32 35 35 2a 46 3a ed 3a  |(C%)=C%/255*F:.:|
00022430  67 25 28 29 3d 72 25 28  29 3a 62 25 28 29 3d 72  |g%()=r%():b%()=r|
00022440  25 28 29 0d e8 62 05 e1  0d e8 6c 11 dd 20 f2 63  |%()..b....l.. .c|
00022450  6f 6c 28 41 25 2c 42 25  29 0d e8 76 36 42 25 3d  |ol(A%,B%)..v6B%=|
00022460  42 25 3c 3c 38 84 42 25  3c 3c 34 84 26 31 30 3a  |B%<<8.B%<<4.&10:|
00022470  70 61 6c 25 21 28 41 25  2a 38 29 3d 42 25 3a 70  |pal%!(A%*8)=B%:p|
00022480  61 6c 25 21 28 41 25 2a  38 2b 34 29 3d 42 25 0d  |al%!(A%*8+4)=B%.|
00022490  e8 80 05 e1 0d e8 8a 0f  dd 20 a4 62 69 74 73 28  |......... .bits(|
000224a0  41 25 29 0d e8 94 35 e7  41 25 3d 31 20 8c 3d 22  |A%)...5.A%=1 .="|
000224b0  31 20 62 69 74 20 70 65  72 20 70 69 78 65 6c 22  |1 bit per pixel"|
000224c0  20 8b 3d c3 41 25 2b 22  20 62 69 74 73 20 70 65  | .=.A%+" bits pe|
000224d0  72 20 70 69 78 65 6c 22  0d e8 9e 0b dd 20 a4 66  |r pixel"..... .f|
000224e0  69 74 73 0d e8 a8 0a ea  5a 25 2c 73 24 0d e8 b2  |its.....Z%,s$...|
000224f0  18 e3 5a 25 3d 31 b8 38  30 3a 73 24 2b 3d bd 9a  |..Z%=1.80:s$+=..|
00022500  23 63 25 3a ed 0d e8 bc  07 3d 73 24 0d e8 c6 0d  |#c%:.....=s$....|
00022510  dd 20 a4 75 63 28 61 24  29 0d e8 d0 0d ea 5a 25  |. .uc(a$).....Z%|
00022520  2c 7a 24 2c 62 24 0d e8  da 0d e3 5a 25 3d 31 b8  |,z$,b$.....Z%=1.|
00022530  a9 61 24 0d e8 e4 10 7a  24 3d c1 61 24 2c 5a 25  |.a$....z$=.a$,Z%|
00022540  2c 31 29 0d e8 ee 21 e7  7a 24 3e 3d 22 61 22 e7  |,1)...!.z$>="a".|
00022550  7a 24 3c 3d 22 7a 22 20  7a 24 3d bd 28 97 7a 24  |z$<="z" z$=.(.z$|
00022560  2d 33 32 29 0d e8 f8 0c  62 24 2b 3d 7a 24 3a ed  |-32)....b$+=z$:.|
00022570  0d e9 02 07 3d 62 24 0d  e9 0c 0e dd 20 a4 64 69  |....=b$..... .di|
00022580  6d 28 41 25 29 0d e9 16  08 ea 20 42 25 0d e9 20  |m(A%)..... B%.. |
00022590  0c e7 66 6c 65 78 25 20  8c 0d e9 2a 31 42 25 3d  |..flex% ...*1B%=|
000225a0  6e 65 78 74 6c 6f 63 61  74 69 6f 6e 25 3a 41 25  |nextlocation%:A%|
000225b0  3d 41 25 2b 33 80 ac 33  3a 6e 65 78 74 6c 6f 63  |=A%+3..3:nextloc|
000225c0  61 74 69 6f 6e 25 2b 3d  41 25 0d e9 34 2a c8 99  |ation%+=A%..4*..|
000225d0  22 57 69 6d 70 5f 53 6c  6f 74 53 69 7a 65 22 2c  |"Wimp_SlotSize",|
000225e0  2d 31 2c 2d 31 20 b8 20  63 75 72 72 65 6e 74 73  |-1,-1 . currents|
000225f0  6c 6f 74 25 0d e9 3e 27  e7 63 75 72 72 65 6e 74  |lot%..>'.current|
00022600  73 6c 6f 74 25 2b 26 38  30 30 30 3c 6e 65 78 74  |slot%+&8000<next|
00022610  6c 6f 63 61 74 69 6f 6e  25 20 8c 0d e9 48 3c c8  |location% ...H<.|
00022620  99 20 22 57 69 6d 70 5f  53 6c 6f 74 53 69 7a 65  |. "Wimp_SlotSize|
00022630  22 2c 6e 65 78 74 6c 6f  63 61 74 69 6f 6e 25 2d  |",nextlocation%-|
00022640  26 38 30 30 30 2c 2d 31  20 b8 20 63 75 72 72 65  |&8000,-1 . curre|
00022650  6e 74 73 6c 6f 74 25 0d  e9 52 55 e7 63 75 72 72  |ntslot%..RU.curr|
00022660  65 6e 74 73 6c 6f 74 25  2b 26 38 30 30 30 3c 6e  |entslot%+&8000<n|
00022670  65 78 74 6c 6f 63 61 74  69 6f 6e 25 20 85 20 34  |extlocation% . 4|
00022680  32 2c 22 43 61 6e 27 74  20 67 65 74 20 65 6e 6f  |2,"Can't get eno|
00022690  75 67 68 20 6d 65 6d 6f  72 79 20 74 6f 20 70 72  |ugh memory to pr|
000226a0  6f 63 65 73 73 20 69 6d  61 67 65 22 0d e9 5c 05  |ocess image"..\.|
000226b0  cd 0d e9 66 05 cc 0d e9  70 13 e7 77 6f 72 6b 73  |...f....p..works|
000226c0  70 61 63 65 25 3c 30 20  8c 0d e9 7a 0b de 20 42  |pace%<0 ...z.. B|
000226d0  25 20 41 25 0d e9 84 05  cc 0d e9 8e 57 42 25 3d  |% A%........WB%=|
000226e0  77 6f 72 6b 73 70 61 63  65 25 3a 77 6f 72 6b 73  |workspace%:works|
000226f0  70 61 63 65 25 2b 3d 41  25 2b 33 80 ac 33 3a e7  |pace%+=A%+3..3:.|
00022700  77 6f 72 6b 73 70 61 63  65 25 3e 77 6f 72 6b 6c  |workspace%>workl|
00022710  69 6d 69 74 25 20 85 34  32 2c 22 4e 6f 74 20 65  |imit% .42,"Not e|
00022720  6e 6f 75 67 68 20 77 6f  72 6b 73 70 61 63 65 22  |nough workspace"|
00022730  0d e9 98 05 cd 0d e9 a2  05 cd 0d e9 ac 07 3d 42  |..............=B|
00022740  25 0d e9 b6 10 dd 20 a4  57 3d a4 57 31 28 63 25  |%..... .W=.W1(c%|
00022750  29 0d e9 c0 32 dd 20 a4  57 31 28 63 25 29 3d 9a  |)...2. .W1(c%)=.|
00022760  23 63 25 20 84 20 9a 23  63 25 3c 3c 38 20 84 20  |#c% . .#c%<<8 . |
00022770  9a 23 63 25 3c 3c 31 36  20 84 20 9a 23 63 25 3c  |.#c%<<16 . .#c%<|
00022780  3c 32 34 0d e9 ca 18 dd  20 a4 48 57 3d 9a 23 63  |<24..... .HW=.#c|
00022790  25 20 84 20 9a 23 63 25  3c 3c 38 0d e9 d4 1a dd  |% . .#c%<<8.....|
000227a0  20 a4 62 65 48 57 3d 9a  23 63 25 3c 3c 38 20 84  | .beHW=.#c%<<8 .|
000227b0  20 9a 23 63 25 0d e9 de  2f dd 20 a4 62 65 57 3d  | .#c%.../. .beW=|
000227c0  9a 23 63 25 3c 3c 32 34  20 84 20 9a 23 63 25 3c  |.#c%<<24 . .#c%<|
000227d0  3c 31 36 20 84 20 9a 23  63 25 3c 3c 38 20 84 20  |<16 . .#c%<<8 . |
000227e0  9a 23 63 25 0d e9 e8 0f  dd 20 a4 74 69 66 66 28  |.#c%..... .tiff(|
000227f0  54 25 29 0d e9 f2 0b c8  8e 20 54 25 20 ca 0d e9  |T%)...... T% ...|
00022800  fc 0d c9 20 31 3a 3d 9a  23 63 25 0d ea 06 2a c9  |... 1:=.#c%...*.|
00022810  20 32 3a ea 73 24 2c 74  24 3a f5 73 24 2b 3d 74  | 2:.s$,t$:.s$+=t|
00022820  24 3a 74 24 3d bd 9a 23  63 25 3a fd 74 24 3d bd  |$:t$=..#c%:.t$=.|
00022830  30 3a 3d 73 24 0d ea 10  34 c9 20 33 3a e7 62 69  |0:=s$...4. 3:.bi|
00022840  67 65 6e 64 69 61 6e 20  8c 3d 9a 23 63 25 3c 3c  |gendian .=.#c%<<|
00022850  38 20 84 20 9a 23 63 25  20 8b 3d 9a 23 63 25 20  |8 . .#c% .=.#c% |
00022860  84 20 9a 23 63 25 3c 3c  38 0d ea 1a 23 c9 20 34  |. .#c%<<8...#. 4|
00022870  3a e7 62 69 67 65 6e 64  69 61 6e 20 8c 3d a4 62  |:.bigendian .=.b|
00022880  65 57 20 8b 3d a4 57 31  28 63 25 29 0d ea 24 05  |eW .=.W1(c%)..$.|
00022890  cb 0d ea 2e 1e 85 20 34  32 2c 22 53 69 6c 6c 79  |...... 42,"Silly|
000228a0  20 54 49 46 46 20 74 61  67 3a 22 2b c3 54 25 0d  | TIFF tag:"+.T%.|
000228b0  ea 38 10 dd 20 f2 6e 65  78 74 73 74 72 69 70 0d  |.8.. .nextstrip.|
000228c0  ea 42 18 72 6f 77 73 74  6f 67 6f 25 3d 73 74 72  |.B.rowstogo%=str|
000228d0  69 70 72 6f 77 73 25 0d  ea 4c 22 73 74 72 69 70  |iprows%..L"strip|
000228e0  70 74 72 2b 3d 31 3a cf  23 63 25 3d 73 74 25 28  |ptr+=1:.#c%=st%(|
000228f0  73 74 72 69 70 70 74 72  29 0d ea 56 14 e7 63 6f  |stripptr)..V..co|
00022900  6d 70 72 65 73 73 69 6f  6e 3d 35 20 8c 0d ea 60  |mpression=5 ...`|
00022910  46 21 66 69 72 73 74 63  6f 64 65 3d 30 3a 21 6f  |F!firstcode=0:!o|
00022920  6c 64 63 6f 64 65 3d 30  3a 21 63 6f 64 65 73 69  |ldcode=0:!codesi|
00022930  7a 65 3d 73 65 74 63 6f  64 65 73 25 2b 31 3a 21  |ze=setcodes%+1:!|
00022940  73 74 61 63 6b 3d 73 74  6b 25 3a 21 73 70 3d 73  |stack=stk%:!sp=s|
00022950  74 6b 25 0d ea 6a 48 21  6d 61 78 63 6f 64 65 3d  |tk%..jH!maxcode=|
00022960  63 6c 65 61 72 63 6f 64  65 25 2b 32 3a 21 6d 61  |clearcode%+2:!ma|
00022970  78 63 6f 64 65 73 69 7a  65 3d 32 2a 63 6c 65 61  |xcodesize=2*clea|
00022980  72 63 6f 64 65 25 3a 21  63 75 72 62 69 74 3d 30  |rcode%:!curbit=0|
00022990  3a 21 6c 61 73 74 62 69  74 3d 30 0d ea 74 05 cd  |:!lastbit=0..t..|
000229a0  0d ea 7e 05 e1 0d ea 88  28 dd 20 f2 77 61 74 66  |..~.....(. .watf|
000229b0  6f 72 64 28 77 74 73 78  25 2c f8 20 72 65 70 25  |ord(wtsx%,. rep%|
000229c0  2c f8 20 77 74 25 2c 58  25 2c 63 25 29 0d ea 92  |,. wt%,X%,c%)...|
000229d0  20 d6 72 6c 65 78 70 61  6e 64 25 2c 77 74 73 78  | .rlexpand%,wtsx|
000229e0  25 2c 72 65 70 25 2c 77  74 25 2c 58 25 0d ea 9c  |%,rep%,wt%,X%...|
000229f0  18 f5 20 43 25 3d 9a 23  63 25 3a c8 8e 20 43 25  |.. C%=.#c%:.. C%|
00022a00  3e 3e 36 20 ca 0d ea a6  1b c9 20 30 3a 3f 58 25  |>>6 ...... 0:?X%|
00022a10  3d 43 25 3a 58 25 2b 3d  31 3a 77 74 25 3d 43 25  |=C%:X%+=1:wt%=C%|
00022a20  0d ea b0 36 c9 20 31 3a  77 74 25 2d 3d 31 3a 72  |...6. 1:wt%-=1:r|
00022a30  65 70 25 3d 43 25 80 36  33 3a d6 72 6c 65 78 70  |ep%=C%.63:.rlexp|
00022a40  61 6e 64 25 2c 77 74 73  78 25 2c 72 65 70 25 2c  |and%,wtsx%,rep%,|
00022a50  77 74 25 2c 58 25 0d ea  ba 2f c9 20 32 3a 72 65  |wt%,X%.../. 2:re|
00022a60  70 25 3d 43 25 80 36 33  3a d6 72 6c 65 78 70 61  |p%=C%.63:.rlexpa|
00022a70  6e 64 25 2c 77 74 73 78  25 2c 72 65 70 25 2c 77  |nd%,wtsx%,rep%,w|
00022a80  74 25 2c 58 25 0d ea c4  36 c9 20 33 3a 77 74 25  |t%,X%...6. 3:wt%|
00022a90  2b 3d 31 3a 72 65 70 25  3d 43 25 80 36 33 3a d6  |+=1:rep%=C%.63:.|
00022aa0  72 6c 65 78 70 61 6e 64  25 2c 77 74 73 78 25 2c  |rlexpand%,wtsx%,|
00022ab0  72 65 70 25 2c 77 74 25  2c 58 25 0d ea ce 05 cb  |rep%,wt%,X%.....|
00022ac0  0d ea d8 0d fd 58 25 3d  77 74 73 78 25 0d ea e2  |.....X%=wtsx%...|
00022ad0  05 e1 0d ea ec 0b dd 20  f2 73 69 7a 65 0d ea f6  |....... .size...|
00022ae0  0d e7 73 63 61 6c 65 25  20 8c 0d eb 00 33 e7 73  |..scale% ....3.s|
00022af0  78 25 3c 3d 33 32 30 20  e7 73 79 25 3c 3d 32 35  |x%<=320 .sy%<=25|
00022b00  36 20 78 6d 75 6c 25 3d  78 6d 75 6c 25 2a 32 3a  |6 xmul%=xmul%*2:|
00022b10  79 6d 75 6c 25 3d 79 6d  75 6c 25 2a 32 0d eb 0a  |ymul%=ymul%*2...|
00022b20  1d e7 73 79 25 3c 3d 73  78 25 2f 32 20 79 6d 75  |..sy%<=sx%/2 ymu|
00022b30  6c 25 3d 79 6d 75 6c 25  2a 32 0d eb 14 05 cd 0d  |l%=ymul%*2......|
00022b40  eb 1e 05 e1 0d eb 28 18  dd 20 f2 72 65 64 75 63  |......(.. .reduc|
00022b50  65 28 f8 20 41 25 2c f8  20 42 25 29 0d eb 32 17  |e(. A%,. B%)..2.|
00022b60  ea 20 43 25 2c 44 25 3a  43 25 3d 41 25 3a 44 25  |. C%,D%:C%=A%:D%|
00022b70  3d 42 25 0d eb 3c 15 f5  20 e7 43 25 3c 44 25 20  |=B%..<.. .C%<D% |
00022b80  c8 94 20 43 25 2c 44 25  0d eb 46 0c 43 25 3d 43  |.. C%,D%..F.C%=C|
00022b90  25 83 44 25 0d eb 50 09  fd 43 25 3d 30 0d eb 5a  |%.D%..P..C%=0..Z|
00022ba0  15 41 25 3d 41 25 81 44  25 3a 42 25 3d 42 25 81  |.A%=A%.D%:B%=B%.|
00022bb0  44 25 0d eb 64 05 e1 0d  eb 6e 19 dd 20 f2 72 65  |D%..d....n.. .re|
00022bc0  61 64 70 69 78 65 6c 72  6f 77 28 7a 25 28 29 29  |adpixelrow(z%())|
00022bd0  0d eb 78 0c e7 72 6f 77  73 25 20 8c 0d eb 82 16  |..x..rows% .....|
00022be0  72 6f 77 73 25 2d 3d 31  3a e7 73 78 25 3d 78 25  |rows%-=1:.sx%=x%|
00022bf0  20 8c 0d eb 8c 10 f2 69  70 72 6f 77 28 7a 25 28  | ......iprow(z%(|
00022c00  29 29 0d eb 96 05 cc 0d  eb a0 3b f2 69 70 72 6f  |))........;.ipro|
00022c10  77 28 78 70 25 28 29 29  3a d6 78 73 61 6d 70 6c  |w(xp%()):.xsampl|
00022c20  65 25 2c 78 6d 75 6c 25  2c 78 64 69 76 25 2c 7a  |e%,xmul%,xdiv%,z|
00022c30  25 28 31 2c 30 29 2c 78  70 25 28 31 2c 30 29 2c  |%(1,0),xp%(1,0),|
00022c40  78 25 0d eb aa 05 cd 0d  eb b4 05 cc 0d eb be 0a  |x%..............|
00022c50  7a 25 28 29 3d 30 0d eb  c8 05 cd 0d eb d2 05 e1  |z%()=0..........|
00022c60  0d eb dc 1a dd 20 f2 73  68 61 72 70 70 69 78 65  |..... .sharppixe|
00022c70  6c 72 6f 77 28 7a 25 28  29 29 0d eb e6 0c e7 72  |lrow(z%()).....r|
00022c80  6f 77 73 25 20 8c 0d eb  f0 16 72 6f 77 73 25 2d  |ows% .....rows%-|
00022c90  3d 31 3a e7 73 78 25 3d  78 25 20 8c 0d eb fa 3c  |=1:.sx%=x% ....<|
00022ca0  e7 73 68 61 72 70 65 6e  25 20 f2 73 68 61 72 70  |.sharpen% .sharp|
00022cb0  28 7a 25 28 29 29 20 8b  f2 69 70 72 6f 77 28 7a  |(z%()) ..iprow(z|
00022cc0  25 28 29 29 3a e7 65 71  75 61 6c 25 20 f2 66 69  |%()):.equal% .fi|
00022cd0  74 32 28 7a 25 28 29 29  0d ec 04 05 cc 0d ec 0e  |t2(z%())........|
00022ce0  3f e7 73 68 61 72 70 65  6e 25 20 f2 73 68 61 72  |?.sharpen% .shar|
00022cf0  70 28 78 70 25 28 29 29  20 8b f2 69 70 72 6f 77  |p(xp%()) ..iprow|
00022d00  28 78 70 25 28 29 29 3a  e7 65 71 75 61 6c 25 20  |(xp%()):.equal% |
00022d10  f2 66 69 74 32 28 78 70  25 28 29 29 0d ec 18 2d  |.fit2(xp%())...-|
00022d20  d6 78 73 61 6d 70 6c 65  25 2c 78 6d 75 6c 25 2c  |.xsample%,xmul%,|
00022d30  78 64 69 76 25 2c 7a 25  28 31 2c 30 29 2c 78 70  |xdiv%,z%(1,0),xp|
00022d40  25 28 31 2c 30 29 2c 78  25 0d ec 22 05 cd 0d ec  |%(1,0),x%.."....|
00022d50  2c 05 cc 0d ec 36 0a 7a  25 28 29 3d 30 0d ec 40  |,....6.z%()=0..@|
00022d60  05 cd 0d ec 4a 05 e1 0d  ec 54 12 dd 20 f2 73 68  |....J....T.. .sh|
00022d70  61 72 70 28 7a 25 28 29  29 0d ec 5e 38 79 72 65  |arp(z%())..^8yre|
00022d80  61 64 25 2d 3d 31 3a e7  79 72 65 61 64 25 20 f2  |ad%-=1:.yread% .|
00022d90  69 70 72 6f 77 28 72 6d  25 28 29 29 3a e7 65 71  |iprow(rm%()):.eq|
00022da0  75 61 6c 25 20 f2 66 69  74 32 28 72 6d 25 28 29  |ual% .fit2(rm%()|
00022db0  29 0d ec 68 3d e3 42 25  3d 30 b8 63 6f 6c 3a 72  |)..h=.B%=0.col:r|
00022dc0  6d 25 28 30 2c 42 25 29  3d 72 6d 25 28 31 2c 42  |m%(0,B%)=rm%(1,B|
00022dd0  25 29 3a 72 6d 25 28 73  78 25 2b 31 2c 42 25 29  |%):rm%(sx%+1,B%)|
00022de0  3d 72 6d 25 28 73 78 25  2c 42 25 29 3a ed 0d ec  |=rm%(sx%,B%):...|
00022df0  72 3b d6 20 73 68 61 72  70 25 2c 7a 25 28 31 2c  |r;. sharp%,z%(1,|
00022e00  30 29 2c 72 6d 25 28 31  2c 30 29 2c 72 6d 31 25  |0),rm%(1,0),rm1%|
00022e10  28 31 2c 30 29 2c 72 6d  32 25 28 31 2c 30 29 2c  |(1,0),rm2%(1,0),|
00022e20  74 6f 74 76 61 6c 73 32  25 0d ec 7c 21 c8 94 20  |totvals2%..|!.. |
00022e30  72 6d 32 25 28 29 2c 72  6d 31 25 28 29 3a 72 6d  |rm2%(),rm1%():rm|
00022e40  31 25 28 29 3d 72 6d 25  28 29 0d ec 86 05 e1 0d  |1%()=rm%()......|
00022e50  ec 90 1b dd 20 f2 73 63  61 6c 65 64 70 69 78 65  |.... .scaledpixe|
00022e60  6c 72 6f 77 28 7a 25 28  29 29 0d ec 9a 0d e7 73  |lrow(z%()).....s|
00022e70  79 25 3d 79 25 20 8c 0d  ec a4 17 f2 72 65 61 64  |y%=y% ......read|
00022e80  70 69 78 65 6c 72 6f 77  28 7a 25 28 29 29 0d ec  |pixelrow(z%())..|
00022e90  ae 05 cc 0d ec b8 39 79  73 61 6d 70 25 2d 3d 31  |......9ysamp%-=1|
00022ea0  3a e7 79 73 61 6d 70 25  3d 30 20 f2 72 65 61 64  |:.ysamp%=0 .read|
00022eb0  70 69 78 65 6c 72 6f 77  28 78 6c 25 28 29 29 3a  |pixelrow(xl%()):|
00022ec0  79 73 61 6d 70 25 3d 79  6d 75 6c 25 0d ec c2 0e  |ysamp%=ymul%....|
00022ed0  e7 79 64 69 76 25 3d 31  20 8c 0d ec cc 0e 7a 25  |.ydiv%=1 .....z%|
00022ee0  28 29 3d 78 6c 25 28 29  0d ec d6 05 cc 0d ec e0  |()=xl%()........|
00022ef0  14 e7 79 73 61 6d 70 25  3e 3d 79 64 69 76 25 20  |..ysamp%>=ydiv% |
00022f00  8c 0d ec ea 22 79 73 61  6d 70 25 2d 3d 79 64 69  |...."ysamp%-=ydi|
00022f10  76 25 3a 7a 25 28 29 3d  78 6c 25 28 29 2a 79 64  |v%:z%()=xl%()*yd|
00022f20  69 76 25 0d ec f4 05 cc  0d ec fe 32 ea 59 25 3a  |iv%........2.Y%:|
00022f30  7a 25 28 29 3d 78 6c 25  28 29 2a 79 73 61 6d 70  |z%()=xl%()*ysamp|
00022f40  25 3a 59 25 3d 79 64 69  76 25 2d 79 73 61 6d 70  |%:Y%=ydiv%-ysamp|
00022f50  25 3a 79 73 61 6d 70 25  3d 30 0d ed 08 05 f5 0d  |%:ysamp%=0......|
00022f60  ed 12 2f e7 79 73 61 6d  70 25 3d 30 20 f2 72 65  |../.ysamp%=0 .re|
00022f70  61 64 70 69 78 65 6c 72  6f 77 28 78 6c 25 28 29  |adpixelrow(xl%()|
00022f80  29 3a 79 73 61 6d 70 25  3d 79 6d 75 6c 25 0d ed  |):ysamp%=ymul%..|
00022f90  1c 10 e7 79 73 61 6d 70  25 3e 59 25 20 8c 0d ed  |...ysamp%>Y% ...|
00022fa0  26 34 79 73 61 6d 70 25  2d 3d 59 25 3a 78 6c 32  |&4ysamp%-=Y%:xl2|
00022fb0  25 28 29 3d 78 6c 25 28  29 2a 59 25 3a 7a 25 28  |%()=xl%()*Y%:z%(|
00022fc0  29 3d 7a 25 28 29 2b 78  6c 32 25 28 29 3a 59 25  |)=z%()+xl2%():Y%|
00022fd0  3d 30 0d ed 30 05 cc 0d  ed 3a 3c 59 25 2d 3d 79  |=0..0....:<Y%-=y|
00022fe0  73 61 6d 70 25 3a 78 6c  32 25 28 29 3d 78 6c 25  |samp%:xl2%()=xl%|
00022ff0  28 29 2a 79 73 61 6d 70  25 3a 7a 25 28 29 3d 7a  |()*ysamp%:z%()=z|
00023000  25 28 29 2b 78 6c 32 25  28 29 3a 79 73 61 6d 70  |%()+xl2%():ysamp|
00023010  25 3d 30 0d ed 44 05 cd  0d ed 4e 0a fd 20 59 25  |%=0..D....N.. Y%|
00023020  3d 30 0d ed 58 05 cd 0d  ed 62 0d 79 73 61 6d 70  |=0..X....b.ysamp|
00023030  25 2b 3d 31 0d ed 6c 05  cd 0d ed 76 05 cd 0d ed  |%+=1..l....v....|
00023040  80 05 e1 0d ed 8a 10 dd  20 f2 66 69 74 28 7a 25  |........ .fit(z%|
00023050  28 29 29 0d ed 94 24 d6  68 69 73 74 65 71 75 61  |())...$.histequa|
00023060  6c 25 2c 7a 25 28 31 2c  30 29 2c 6e 65 77 25 28  |l%,z%(1,0),new%(|
00023070  30 2c 30 29 2c 78 25 0d  ed 9e 05 e1 0d ed a8 11  |0,0),x%.........|
00023080  dd 20 f2 66 69 74 32 28  7a 25 28 29 29 0d ed b2  |. .fit2(z%())...|
00023090  25 d6 68 69 73 74 65 71  75 61 6c 25 2c 7a 25 28  |%.histequal%,z%(|
000230a0  31 2c 30 29 2c 6e 65 77  25 28 30 2c 30 29 2c 73  |1,0),new%(0,0),s|
000230b0  78 25 0d ed bc 05 e1 0d  ed c6 1d dd 20 f2 61 64  |x%.......... .ad|
000230c0  6a 75 73 74 70 61 6c 65  74 74 65 28 6d 75 6c 2c  |justpalette(mul,|
000230d0  73 75 62 29 0d ed d0 14  e7 6d 75 6c 3d 31 20 80  |sub).....mul=1 .|
000230e0  20 73 75 62 3d 30 20 e1  0d ed da 0d e3 43 25 3d  | sub=0 ......C%=|
000230f0  30 b8 32 35 35 0d ed e4  51 72 25 28 43 25 29 3d  |0.255...Qr%(C%)=|
00023100  28 72 25 28 43 25 29 2d  73 75 62 29 2a 6d 75 6c  |(r%(C%)-sub)*mul|
00023110  2b 31 3a 67 25 28 43 25  29 3d 28 67 25 28 43 25  |+1:g%(C%)=(g%(C%|
00023120  29 2d 73 75 62 29 2a 6d  75 6c 2b 31 3a 62 25 28  |)-sub)*mul+1:b%(|
00023130  43 25 29 3d 28 62 25 28  43 25 29 2d 73 75 62 29  |C%)=(b%(C%)-sub)|
00023140  2a 6d 75 6c 2b 31 0d ed  ee 05 ed 0d ed f8 0b e7  |*mul+1..........|
00023150  20 68 61 6d 20 8c 0d ee  02 33 20 e3 43 25 3d 30  | ham ....3 .C%=0|
00023160  b8 31 35 2a 34 88 34 3a  6c 74 61 62 6c 65 21 43  |.15*4.4:ltable!C|
00023170  25 3d 28 6c 74 61 62 6c  65 21 43 25 2d 73 75 62  |%=(ltable!C%-sub|
00023180  29 2a 6d 75 6c 2b 31 3a  ed 0d ee 0c 05 cd 0d ee  |)*mul+1:........|
00023190  16 11 e7 20 69 6e 70 75  74 3d 34 32 32 20 8c 0d  |... input=422 ..|
000231a0  ee 20 0d e3 43 25 3d 30  b8 32 35 35 0d ee 2a 43  |. ..C%=0.255..*C|
000231b0  72 70 61 6c 25 28 43 25  29 3d 28 72 70 61 6c 25  |rpal%(C%)=(rpal%|
000231c0  28 43 25 29 2d 73 75 62  29 2a 6d 75 6c 2b 31 3a  |(C%)-sub)*mul+1:|
000231d0  67 70 61 6c 25 28 43 25  29 3d 28 67 70 61 6c 25  |gpal%(C%)=(gpal%|
000231e0  28 43 25 29 2d 73 75 62  29 2a 6d 75 6c 2b 31 0d  |(C%)-sub)*mul+1.|
000231f0  ee 34 45 62 70 61 6c 25  28 43 25 29 3d 28 62 70  |.4Ebpal%(C%)=(bp|
00023200  61 6c 25 28 43 25 29 2d  73 75 62 29 2a 6d 75 6c  |al%(C%)-sub)*mul|
00023210  2b 31 3a 74 61 62 6c 65  25 28 43 25 29 3d 28 74  |+1:table%(C%)=(t|
00023220  61 62 6c 65 25 28 43 25  29 2d 73 75 62 29 2a 6d  |able%(C%)-sub)*m|
00023230  75 6c 2b 31 0d ee 3e 05  ed 0d ee 48 05 cd 0d ee  |ul+1..>....H....|
00023240  52 05 e1 0d ee 5c 04 0d  ee 66 0d dd 20 f2 72 65  |R....\...f.. .re|
00023250  66 69 6c 6c 0d ee 70 1c  e7 73 74 72 69 70 72 6f  |fill..p..stripro|
00023260  77 73 25 3e 30 20 f2 6e  65 78 74 73 74 72 69 70  |ws%>0 .nextstrip|
00023270  0d ee 7a 45 c8 99 31 32  2c 34 2c 63 25 2c 64 61  |..zE..12,4,c%,da|
00023280  74 61 63 61 63 68 65 25  2c 63 61 63 68 65 25 3a  |tacache%,cache%:|
00023290  72 6f 77 73 74 6f 67 6f  25 3d 63 61 63 68 65 72  |rowstogo%=cacher|
000232a0  6f 77 73 25 3a 62 75 66  66 25 3d 64 61 74 61 63  |ows%:buff%=datac|
000232b0  61 63 68 65 25 0d ee 84  3a e7 69 6e 70 75 74 3d  |ache%...:.input=|
000232c0  32 34 20 72 62 25 3d 62  75 66 66 25 2b 72 62 6f  |24 rb%=buff%+rbo|
000232d0  25 3a 67 62 25 3d 62 75  66 66 25 2b 67 62 6f 25  |%:gb%=buff%+gbo%|
000232e0  3a 62 62 25 3d 62 75 66  66 25 2b 62 62 6f 25 0d  |:bb%=buff%+bbo%.|
000232f0  ee 8e 05 e1 0d ee 98 04  0d ee a2 12 dd 20 f2 69  |............. .i|
00023300  70 72 6f 77 28 7a 25 28  29 29 0d ee ac 0e c8 8e  |prow(z%())......|
00023310  20 72 66 6c 61 67 20 ca  0d ee b6 63 c9 20 30 3a  | rflag ....c. 0:|
00023320  d6 6d 61 70 70 69 78 25  2c 7a 25 28 31 2c 30 29  |.mappix%,z%(1,0)|
00023330  2c 72 25 28 30 29 2c 67  25 28 30 29 2c 62 25 28  |,r%(0),g%(0),b%(|
00023340  30 29 2c 62 75 66 66 25  3a 62 75 66 66 25 2b 3d  |0),buff%:buff%+=|
00023350  72 6f 77 62 79 74 65 73  25 3a 72 6f 77 73 74 6f  |rowbytes%:rowsto|
00023360  67 6f 25 2d 3d 31 3a e7  72 6f 77 73 74 6f 67 6f  |go%-=1:.rowstogo|
00023370  25 3d 30 20 f2 72 65 66  69 6c 6c 0d ee c0 05 e1  |%=0 .refill.....|
00023380  0d ee ca 04 0d ee d4 42  c9 20 39 30 31 3a c8 99  |.......B. 901:..|
00023390  31 32 2c 34 2c 63 25 2c  72 62 25 2c 73 78 25 3a  |12,4,c%,rb%,sx%:|
000233a0  c8 99 31 32 2c 34 2c 63  63 25 2c 67 62 25 2c 73  |..12,4,cc%,gb%,s|
000233b0  78 25 3a c8 99 31 32 2c  34 2c 63 63 63 25 2c 62  |x%:..12,4,ccc%,b|
000233c0  62 25 2c 73 78 25 0d ee  de 34 d6 6d 61 70 70 69  |b%,sx%...4.mappi|
000233d0  78 25 2c 7a 25 28 31 2c  30 29 2c 72 25 28 30 29  |x%,z%(1,0),r%(0)|
000233e0  2c 67 25 28 30 29 2c 62  25 28 30 29 2c 72 62 25  |,g%(0),b%(0),rb%|
000233f0  2c 67 62 25 2c 62 62 25  3a e1 0d ee e8 09 c9 20  |,gb%,bb%:...... |
00023400  39 30 32 0d ee f2 0f 20  e7 20 73 6c 61 76 65 25  |902.... . slave%|
00023410  20 8c 0d ee fc 1c 20 20  c8 99 20 31 32 2c 34 2c  | .....  .. 12,4,|
00023420  63 25 2c 74 73 70 61 63  65 25 2c 37 36 38 0d ef  |c%,tspace%,768..|
00023430  06 10 20 20 41 25 3d 74  73 70 61 63 65 25 0d ef  |..  A%=tspace%..|
00023440  10 06 20 cc 0d ef 1a 18  20 20 41 25 3d 56 39 41  |.. .....  A%=V9A|
00023450  72 65 61 25 2b 6f 66 66  73 65 74 25 0d ef 24 06  |rea%+offset%..$.|
00023460  20 cd 0d ef 2e 0b 20 42  25 3d 72 62 25 0d ef 38  | ..... B%=rb%..8|
00023470  0d 20 d6 20 75 6e 70 61  63 6b 0d ef 42 11 20 6f  |. . unpack..B. o|
00023480  66 66 73 65 74 25 2b 3d  37 36 38 0d ef 4c 2d 20  |ffset%+=768..L- |
00023490  f4 20 53 59 53 31 32 2c  34 2c 63 25 2c 72 61 74  |. SYS12,4,c%,rat|
000234a0  73 25 2c 72 6f 77 62 79  74 65 73 25 3a 43 41 4c  |s%,rowbytes%:CAL|
000234b0  4c 75 6e 70 61 63 6b 25  0d ef 56 34 d6 6d 61 70  |Lunpack%..V4.map|
000234c0  70 69 78 25 2c 7a 25 28  31 2c 30 29 2c 72 25 28  |pix%,z%(1,0),r%(|
000234d0  30 29 2c 67 25 28 30 29  2c 62 25 28 30 29 2c 72  |0),g%(0),b%(0),r|
000234e0  62 25 2c 67 62 25 2c 62  62 25 3a e1 0d ef 60 04  |b%,gb%,bb%:...`.|
000234f0  0d ef 6a 09 c9 20 39 30  33 0d ef 74 0f 20 e7 20  |..j.. 903..t. . |
00023500  73 6c 61 76 65 25 20 8c  0d ef 7e 1d 20 20 c8 99  |slave% ...~.  ..|
00023510  20 31 32 2c 34 2c 63 25  2c 74 73 70 61 63 65 25  | 12,4,c%,tspace%|
00023520  2c 31 30 32 34 0d ef 88  10 20 20 41 25 3d 74 73  |,1024....  A%=ts|
00023530  70 61 63 65 25 0d ef 92  06 20 cc 0d ef 9c 18 20  |pace%.... ..... |
00023540  20 41 25 3d 56 39 41 72  65 61 25 2b 6f 66 66 73  | A%=V9Area%+offs|
00023550  65 74 25 0d ef a6 06 20  cd 0d ef b0 0b 20 42 25  |et%.... ..... B%|
00023560  3d 72 62 25 0d ef ba 0f  20 d6 20 75 6e 70 61 63  |=rb%.... . unpac|
00023570  6b 31 36 0d ef c4 12 20  6f 66 66 73 65 74 25 2b  |k16.... offset%+|
00023580  3d 31 30 32 34 0d ef ce  2d 20 f4 20 53 59 53 31  |=1024...- . SYS1|
00023590  32 2c 34 2c 63 25 2c 72  61 74 73 25 2c 72 6f 77  |2,4,c%,rats%,row|
000235a0  62 79 74 65 73 25 3a 43  41 4c 4c 75 6e 70 61 63  |bytes%:CALLunpac|
000235b0  6b 25 0d ef d8 34 d6 6d  61 70 70 69 78 25 2c 7a  |k%...4.mappix%,z|
000235c0  25 28 31 2c 30 29 2c 72  25 28 30 29 2c 67 25 28  |%(1,0),r%(0),g%(|
000235d0  30 29 2c 62 25 28 30 29  2c 72 62 25 2c 67 62 25  |0),b%(0),rb%,gb%|
000235e0  2c 62 62 25 3a e1 0d ef  e2 04 0d ef ec 05 cb 0d  |,bb%:...........|
000235f0  ef f6 05 e1 0d f0 00 04  0d f0 0a 0d dd 20 f2 72  |............. .r|
00023600  65 77 69 6e 64 0d f0 14  17 72 6f 77 73 25 3d 73  |ewind....rows%=s|
00023610  79 25 3a c8 8e 20 66 6c  61 67 20 ca 0d f0 1e 10  |y%:.. flag .....|
00023620  c9 20 30 3a cf 23 63 25  3d 73 74 25 0d f0 28 04  |. 0:.#c%=st%..(.|
00023630  0d f0 32 10 c9 20 39 30  30 3a cf 23 63 25 3d 30  |..2.. 900:.#c%=0|
00023640  0d f0 3c 21 c9 20 39 30  31 3a cf 23 63 25 3d 30  |..<!. 901:.#c%=0|
00023650  3a cf 23 63 63 25 3d 30  3a cf 23 63 63 63 25 3d  |:.#cc%=0:.#ccc%=|
00023660  30 0d f0 46 09 c9 20 39  30 32 0d f0 50 0f 20 e7  |0..F.. 902..P. .|
00023670  20 73 6c 61 76 65 25 20  8c 0d f0 5a 0e 20 20 cf  | slave% ...Z.  .|
00023680  23 63 25 3d 73 74 25 0d  f0 64 06 20 cc 0d f0 6e  |#c%=st%..d. ...n|
00023690  10 20 20 6f 66 66 73 65  74 25 3d 32 30 0d f0 78  |.  offset%=20..x|
000236a0  06 20 cd 0d f0 82 09 c9  20 39 30 33 0d f0 8c 0f  |. ...... 903....|
000236b0  20 e7 20 73 6c 61 76 65  25 20 8c 0d f0 96 0e 20  | . slave% ..... |
000236c0  20 cf 23 63 25 3d 73 74  25 0d f0 a0 06 20 cc 0d  | .#c%=st%.... ..|
000236d0  f0 aa 10 20 20 6f 66 66  73 65 74 25 3d 32 30 0d  |...  offset%=20.|
000236e0  f0 b4 06 20 cd 0d f0 be  05 cb 0d f0 c8 04 0d f0  |... ............|
000236f0  d2 0d e7 63 61 63 68 65  25 20 8c 0d f0 dc 46 e7  |...cache% ....F.|
00023700  63 61 63 68 65 25 3c 66  69 6c 65 73 69 7a 65 25  |cache%<filesize%|
00023710  20 c8 99 31 32 2c 34 2c  63 25 2c 64 61 74 61 63  | ..12,4,c%,datac|
00023720  61 63 68 65 25 2c 63 61  63 68 65 25 3a 72 6f 77  |ache%,cache%:row|
00023730  73 74 6f 67 6f 25 3d 63  61 63 68 65 72 6f 77 73  |stogo%=cacherows|
00023740  25 0d f0 e6 14 62 75 66  66 25 3d 64 61 74 61 63  |%....buff%=datac|
00023750  61 63 68 65 25 0d f0 f0  3a e7 69 6e 70 75 74 3d  |ache%...:.input=|
00023760  32 34 20 72 62 25 3d 62  75 66 66 25 2b 72 62 6f  |24 rb%=buff%+rbo|
00023770  25 3a 67 62 25 3d 62 75  66 66 25 2b 67 62 6f 25  |%:gb%=buff%+gbo%|
00023780  3a 62 62 25 3d 62 75 66  66 25 2b 62 62 6f 25 0d  |:bb%=buff%+bbo%.|
00023790  f0 fa 05 cd 0d f1 04 05  e1 0d f1 0e 04 0d f1 18  |................|
000237a0  17 dd 20 f2 63 68 61 6e  67 65 5f 4c 43 41 28 6e  |.. .change_LCA(n|
000237b0  65 77 25 29 0d f1 22 26  e7 20 6d 6f 6e 6f 24 3d  |ew%).."&. mono$=|
000237c0  22 3e 22 20 8c 20 c8 99  20 22 57 56 43 47 72 61  |">" . .. "WVCGra|
000237d0  62 5f 4c 43 41 22 2c 33  3a e1 0d f1 2c 2b e7 20  |b_LCA",3:...,+. |
000237e0  62 6f 61 72 64 5f 69 73  5f 31 36 5f 62 69 74 25  |board_is_16_bit%|
000237f0  20 84 20 61 6c 6c 6f 77  5f 64 69 74 68 65 72 69  | . allow_ditheri|
00023800  6e 67 25 20 8c 0d f1 36  1a 20 c8 99 20 22 57 56  |ng% ...6. .. "WV|
00023810  43 47 72 61 62 5f 4c 43  41 22 2c 6e 65 77 25 0d  |CGrab_LCA",new%.|
00023820  f1 40 0f 20 d6 20 73 65  74 5f 38 62 69 74 0d f1  |.@. . set_8bit..|
00023830  4a 14 20 e7 20 64 69 74  68 65 72 65 64 25 3d 31  |J. . dithered%=1|
00023840  20 8c 0d f1 54 1f 20 20  f2 69 63 6f 6e 73 65 74  | ...T.  .iconset|
00023850  28 34 2c 34 2c 31 3c 3c  32 31 2c 31 3c 3c 32 31  |(4,4,1<<21,1<<21|
00023860  29 0d f1 5e 06 20 cc 0d  f1 68 1b 20 20 f2 69 63  |)..^. ...h.  .ic|
00023870  6f 6e 73 65 74 28 34 2c  34 2c 31 3c 3c 32 31 2c  |onset(4,4,1<<21,|
00023880  30 29 0d f1 72 06 20 cd  0d f1 7c 05 cd 0d f1 86  |0)..r. ...|.....|
00023890  05 e1 0d f1 90 04 0d f1  9a 17 dd 20 a4 66 69 6e  |........... .fin|
000238a0  64 5f 73 6c 6f 74 5f 66  6f 72 5f 56 39 0d f1 a4  |d_slot_for_V9...|
000238b0  10 de 20 73 6c 6f 74 5f  62 25 20 31 36 0d f1 ae  |.. slot_b% 16...|
000238c0  0f 56 39 5f 73 6c 6f 74  25 3d 2d 31 0d f1 b8 0e  |.V9_slot%=-1....|
000238d0  e3 20 73 25 3d 30 20 b8  20 33 0d f1 c2 0f 20 21  |. s%=0 . 3.... !|
000238e0  73 6c 6f 74 5f 62 25 3d  30 0d f1 cc 10 20 73 6c  |slot_b%=0.... sl|
000238f0  6f 74 5f 62 25 21 34 3d  30 0d f1 d6 29 20 c8 99  |ot_b%!4=0...) ..|
00023900  20 22 58 50 6f 64 75 6c  65 5f 52 65 61 64 48 65  | "XPodule_ReadHe|
00023910  61 64 65 72 22 2c 2c 2c  73 6c 6f 74 5f 62 25 2c  |ader",,,slot_b%,|
00023920  73 25 0d f1 e0 26 20 6d  61 6e 75 66 25 3d 73 6c  |s%...& manuf%=sl|
00023930  6f 74 5f 62 25 3f 35 20  84 20 28 73 6c 6f 74 5f  |ot_b%?5 . (slot_|
00023940  62 25 3f 36 3c 3c 38 29  0d f1 ea 25 20 70 72 6f  |b%?6<<8)...% pro|
00023950  64 25 3d 73 6c 6f 74 5f  62 25 3f 33 20 84 20 28  |d%=slot_b%?3 . (|
00023960  73 6c 6f 74 5f 62 25 3f  34 3c 3c 38 29 0d f1 f4  |slot_b%?4<<8)...|
00023970  28 20 e7 20 6d 61 6e 75  66 25 3d 39 20 80 20 70  |( . manuf%=9 . p|
00023980  72 6f 64 25 3d 38 32 20  8c 20 56 39 5f 73 6c 6f  |rod%=82 . V9_slo|
00023990  74 25 3d 73 25 0d f1 fe  05 ed 0d f2 08 0d 3d 56  |t%=s%.........=V|
000239a0  39 5f 73 6c 6f 74 25 0d  f2 12 04 0d f2 1c 18 dd  |9_slot%.........|
000239b0  20 f2 67 65 74 5f 62 6f  61 72 64 5f 76 65 72 73  | .get_board_vers|
000239c0  69 6f 6e 0d f2 26 1b 73  6c 6f 74 25 3d a4 66 69  |ion..&.slot%=.fi|
000239d0  6e 64 5f 73 6c 6f 74 5f  66 6f 72 5f 56 39 0d f2  |nd_slot_for_V9..|
000239e0  30 2b e7 20 73 6c 6f 74  25 3d 2d 31 20 85 20 34  |0+. slot%=-1 . 4|
000239f0  32 2c 22 48 61 77 6b 20  56 39 20 6e 6f 74 20 70  |2,"Hawk V9 not p|
00023a00  72 65 73 65 6e 74 22 3a  e0 0d f2 3a 08 72 30 3d  |resent":...:.r0=|
00023a10  30 0d f2 44 0f 6d 6f 64  73 74 61 74 25 3d 2d 31  |0..D.modstat%=-1|
00023a20  0d f2 4e 05 f5 0d f2 58  35 c8 99 20 22 50 6f 64  |..N....X5.. "Pod|
00023a30  75 6c 65 5f 45 6e 75 6d  65 72 61 74 65 43 68 75  |ule_EnumerateChu|
00023a40  6e 6b 73 22 2c 72 30 2c  2c 2c 73 6c 6f 74 25 20  |nks",r0,,,slot% |
00023a50  b8 20 72 30 2c 72 31 2c  72 32 0d f2 62 14 e7 20  |. r0,r1,r2..b.. |
00023a60  72 32 3d 25 31 31 31 31  30 30 31 31 20 8c 0d f2  |r2=%11110011 ...|
00023a70  6c 12 20 6d 6f 64 73 74  61 74 25 3d 72 30 2d 31  |l. modstat%=r0-1|
00023a80  0d f2 76 0d 20 73 69 7a  65 25 3d 72 31 0d f2 80  |..v. size%=r1...|
00023a90  05 cd 0d f2 8a 19 fd 20  6d 6f 64 73 74 61 74 25  |....... modstat%|
00023aa0  3c 3e 2d 31 20 84 20 72  30 3d 30 0d f2 94 04 0d  |<>-1 . r0=0.....|
00023ab0  f2 9e 11 de 20 62 75 66  66 25 20 73 69 7a 65 25  |.... buff% size%|
00023ac0  0d f2 a8 2f c8 99 20 22  50 6f 64 75 6c 65 5f 52  |.../.. "Podule_R|
00023ad0  65 61 64 43 68 75 6e 6b  22 2c 6d 6f 64 73 74 61  |eadChunk",modsta|
00023ae0  74 25 2c 2c 62 75 66 66  25 2c 73 6c 6f 74 25 0d  |t%,,buff%,slot%.|
00023af0  f2 b2 09 6d 24 3d 22 22  0d f2 bc 14 e3 20 6c 25  |...m$=""..... l%|
00023b00  3d 30 20 b8 20 73 69 7a  65 25 2d 31 0d f2 c6 14  |=0 . size%-1....|
00023b10  20 6d 24 2b 3d bd 28 62  75 66 66 25 3f 6c 25 29  | m$+=.(buff%?l%)|
00023b20  0d f2 d0 05 ed 0d f2 da  04 0d f2 e4 0f c8 8e 20  |............... |
00023b30  c0 6d 24 2c 31 29 20 ca  0d f2 ee 0a 20 c9 20 22  |.m$,1) ..... . "|
00023b40  53 22 0d f2 f8 19 20 20  20 62 6f 61 72 64 5f 69  |S"....   board_i|
00023b50  73 5f 31 36 5f 62 69 74  25 3d a3 0d f3 02 19 20  |s_16_bit%=..... |
00023b60  20 20 61 6c 6c 6f 77 5f  64 69 74 68 65 72 69 6e  |  allow_ditherin|
00023b70  67 25 3d a3 0d f3 0c 14  20 20 20 61 6c 6c 6f 77  |g%=.....   allow|
00023b80  5f 6d 6f 6e 6f 25 3d a3  0d f3 16 0a 20 c9 20 22  |_mono%=..... . "|
00023b90  44 22 0d f3 20 18 20 20  61 6c 6c 6f 77 5f 64 69  |D".. .  allow_di|
00023ba0  74 68 65 72 69 6e 67 25  3d b9 0d f3 2a 18 20 20  |thering%=...*.  |
00023bb0  62 6f 61 72 64 5f 69 73  5f 31 36 5f 62 69 74 25  |board_is_16_bit%|
00023bc0  3d b9 0d f3 34 13 20 20  61 6c 6c 6f 77 5f 6d 6f  |=...4.  allow_mo|
00023bd0  6e 6f 25 3d b9 0d f3 3e  06 20 7f 0d f3 48 18 20  |no%=...>. ...H. |
00023be0  20 61 6c 6c 6f 77 5f 64  69 74 68 65 72 69 6e 67  | allow_dithering|
00023bf0  25 3d a3 0d f3 52 18 20  20 62 6f 61 72 64 5f 69  |%=...R.  board_i|
00023c00  73 5f 31 36 5f 62 69 74  25 3d a3 0d f3 5c 13 20  |s_16_bit%=...\. |
00023c10  20 61 6c 6c 6f 77 5f 6d  6f 6e 6f 25 3d a3 0d f3  | allow_mono%=...|
00023c20  66 05 cb 0d f3 70 05 e1  0d ff                    |f....p....|
00023c2a