All files belong to Callapple now

This commit is contained in:
Antoine Vignau 2020-06-08 23:08:57 +02:00 committed by GitHub
parent 20feb290ae
commit 8dc649c288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 4539 additions and 0 deletions

BIN
source/twilight/nm/World3 Normal file

Binary file not shown.

BIN
source/twilight/nm/World4 Normal file

Binary file not shown.

BIN
source/twilight/nm/World5 Normal file

Binary file not shown.

View File

@ -0,0 +1,289 @@
MACRO
&lab _GetCtlHandleFromID
&lab ldx #$3010
jsl $E10000
MEND
MACRO
&lab _GetCtlValue
&lab ldx #$1A10
jsl $E10000
MEND
MACRO
&lab _NewControl2
&lab ldx #$3110
jsl $E10000
MEND
MACRO
&lab _SetCtlValue
&lab ldx #$1910
jsl $E10000
MEND
MACRO
&lab _UDivide
&lab ldx #$0B0B
jsl $E10000
MEND
MACRO
&lab _MMStartUp
&lab ldx #$0202
jsl $E10000
MEND
MACRO
&lab _NewHandle
&lab ldx #$0902
jsl $E10000
MEND
MACRO
&lab _ReadAsciiTime
&lab ldx #$0F03
jsl $E10000
MEND
MACRO
&lab _ReadTimeHex
&lab ldx #$0D03
jsl $E10000
MEND
MACRO
&LAB JCC &BP
&LAB BCS *+5
BRL &BP
MEND
MACRO
&LAB JEQ &BP
&LAB BNE *+5
BRL &BP
MEND
MACRO
&LAB LONG &A,&B
LCLB &I
LCLB &M
&A AMID &A,1,1
&M SETB ("&A"="M").OR.("&A"="m")
&I SETB ("&A"="I").OR.("&A"="i")
AIF C:&B=0,.A
&B AMID &B,1,1
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
.A
&LAB REP #&M*32+&I*16
AIF .NOT.&M,.B
LONGA ON
.B
AIF .NOT.&I,.C
LONGI ON
.C
MEND
MACRO
&LAB SHORT &A,&B
LCLB &I
LCLB &M
&A AMID &A,1,1
&M SETB ("&A"="M").OR.("&A"="m")
&I SETB ("&A"="I").OR.("&A"="i")
AIF C:&B=0,.A
&B AMID &B,1,1
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
.A
&LAB SEP #&M*32+&I*16
AIF .NOT.&M,.B
LONGA OFF
.B
AIF .NOT.&I,.C
LONGI OFF
.C
MEND
MACRO
&lab WordResult
&lab pha
MEND
MACRO
&lab LongResult
&lab pha
pha
MEND
MACRO
&lab PushLLcl &Num1
&lab phb
phb
PushWord &Num1
MEND
MACRO
&lab mov &num1,&num2
&lab lda &num1
sta &num2
MEND
MACRO
&Lab MakePdp
&Lab phd
tsc
tcd
ldy #2
lda [3],y
tay
lda [3]
sta <3
sty <3+2
MEND
MACRO
&lab killLdp
&lab pld
pla
pla
MEND
MACRO
&lab _EraseRect
&lab ldx #$5504
jsl $E10000
MEND
MACRO
&lab _Line
&lab ldx #$3D04
jsl $E10000
MEND
MACRO
&lab _LineTo
&lab ldx #$3C04
jsl $E10000
MEND
MACRO
&lab _Move
&lab ldx #$3B04
jsl $E10000
MEND
MACRO
&lab _MoveTo
&lab ldx #$3A04
jsl $E10000
MEND
MACRO
&lab _PaintOval
&lab ldx #$5904
jsl $E10000
MEND
MACRO
&lab _Random
&lab ldx #$8604
jsl $E10000
MEND
MACRO
&lab _SetPenMode
&lab ldx #$2E04
jsl $E10000
MEND
MACRO
&lab _SetPenSize
&lab ldx #$2C04
jsl $E10000
MEND
MACRO
&lab _SetSolidBackPat
&lab ldx #$3804
jsl $E10000
MEND
MACRO
&lab _SetSolidPenPat
&lab ldx #$3704
jsl $E10000
MEND
MACRO
&lab _ShowPen
&lab ldx #$2804
jsl $E10000
MEND
MACRO
&lab pullword &SYSOPR
&lab ANOP
pla
AIF C:&SYSOPR=0,.end
sta &SYSOPR
.end
MEND
MACRO
&lab pushlong &addr,&offset
&lab ANOP
LCLC &C
LCLC &REST
&C AMID &addr,1,1
AIF "&C"="#",.immediate
AIF "&C"="[",.zeropage
AIF C:&offset=0,.nooffset
AIF "&offset"="s",.stack
pushword &addr+2,&offset
pushword &addr,&offset
MEXIT
.nooffset
pushword &addr+2
pushword &addr
MEXIT
.immediate
&REST AMID &addr,2,L:&addr-1
dc I1'$F4',I2'(&REST)|-16'
dc I1'$F4',I2'&REST'
MEXIT
.stack
pushword &addr+2,s
pushword &addr+2,s
MEXIT
.zeropage
ldy #&offset+2
pushword &addr,y
ldy #&offset
pushword &addr,y
MEND
MACRO
&lab pushword &SYSOPR
&lab ANOP
AIF C:&SYSOPR=0,.b
LCLC &C
&C AMID "&SYSOPR",1,1
AIF ("&C"="#").AND.(S:LONGA),.immediate
lda &SYSOPR
pha
MEXIT
.b
pha
MEXIT
.immediate
LCLC &REST
LCLA &BL
&BL ASEARCH "&SYSOPR"," ",1
AIF &BL>0,.a
&BL SETA L:&SYSOPR+1
.a
&REST AMID "&SYSOPR",2,&BL-2
dc I1'$F4',I2'&REST'
MEND
MACRO
&lab str &string
&lab dc i1'L:&string',C'&string'
MEND
MACRO
&lab _AddResource
&lab ldx #$0C1E
jsl $E10000
MEND
MACRO
&lab _GetCurResourceApp
&lab ldx #$141E
jsl $E10000
MEND
MACRO
&lab _GetCurResourceFile
&lab ldx #$121E
jsl $E10000
MEND
MACRO
&lab _MarkResourceChange
&lab ldx #$101E
jsl $E10000
MEND
MACRO
&lab _ReleaseResource
&lab ldx #$171E
jsl $E10000
MEND
MACRO
&lab _SetCurResourceFile
&lab ldx #$111E
jsl $E1

Binary file not shown.

View File

@ -0,0 +1,60 @@
212723FFFF'
FW2D4 anop
dc h'A725E526E426A225A1252023E021A020611F231E241E261E671FA820E8216824FFFF'
FW2D5 anop
dc h'E72625282328E126A0251F23DF21601F211EE31CE51C271E681FA9202923A825FFFF'
FW2D6 anop
dc h'27286529222820289F251E239E201F1EE11CA31BA61BE81C691FEA216A24E926FFFF'
FW2D7 anop
dc h'6729A42A61291F289E251D235E1FDF1CA11B641AA71BE91C6A1FEB21AA252928FFFF'
FW2D8 anop
dc h'A62AE32BA02A1E289C25DC211D1E9F1B621A651A681AEA1CAC202C23EB266929FFFF'
FW2D9 anop
dc h'E62BE22B9F2A1C285B249B20DD1C5F1A22192619691AEC1CAD206D242B28A92AFFFF'
FW2D10 anop
dc h'252D212D9D2A1B281A235B1F9C1B2019E317E7176B1A2D1EEE21ED26AC2A282DFFFF'
FW2D11 anop
dc h'642E5F2E9C2ADA26D9211A1E5D1AE017A416E9176C1A6E1F2F232E28EB2B682EFFFF'
FW2D12 anop
dc h'A22F5E2E9A2A982598209A1BDD17A116A616EA17AE1B701FB0256E292B2DA72FFFFF'
FW2D13 anop
dc h'E1305C2E992A5724571F5A1A9E1662156715EC17AF1BF121F126EE2BAA2FE630FFFF'
FW2D14 anop
dc h'DF305A2E57291623171E1A195E1524146915EE17F11C322371296E2EEA302432FFFF'
FW2D15 anop
dc h'1D32582E1628D521971B9A162014E5126B153019321E7324B12AAE2F68336333FFFF'
FW2D16 anop
dc h'1B32172DD426541F17195B15E112E7126D15711AB420F426312D2D32A734A134FFFF'
FW2D17 anop
dc h'1932D52B5324141ED717DC12A311A9116F15B31BF5217429B12FAC34E5359F34FFFF'
FW2D18 anop
dc h'D730932A1223941B58159E116510AB11B116F51C7624F42B3032EA352337DD35FFFF'
FW2D19 anop
dc h'952F522991201419D9121F0F270FAE11F317761FF726742EAF3469386138DA35FFFF'
FW2D20 anop
dc h'532ED026111E94169A11E10D290FF0123519B8207729F4302E37A7399F39D835FFFF'
FW2D21 anop
dc h'112D4F24901B15141C0FA40C2C0FF312771A3923F82B7333AC39E43A9C399534FFFF'
FW2D22 anop
dc h'CF2BCE2110199611DD0DA60C2E0F7515F91CFA26B82F3237EB3A223C9A395333FFFF'
FW2D23 anop
dc h'4D294D1F9116170F600B690B310FB7167B1F7B293732B139683D5F3D97391132FFFF'
FW2D24 anop
dc h'CC26CD1C1214990C220A6B0B74103919FC213B2DF6352F3CA63E5D3D5438CF30FFFF'
FW2D25 anop
dc h'4B240D1953105B0BE5086E0BB6117B1ABD25BB2F7538AD3EE33F5A3D12374D2EFFFF'
FW3D1 anop
dc h'E52125232423242324232323E321E321E321E321A420A420A420A520E521E521FFFF'
FW3D2 anop
dc h'E6212623652464246424632422232223E221A220A320641F641FA520A620E621FFFF'
FW3D3 anop
dc h'E72127236624A525A425A32562242123E121A120621F631F641F651F661FA720FFFF'
FW3D4 anop
dc h'E8212823A725A625E426E326A1256024E021A020611F221E241E251E671FA820FFFF'
FW3D5 anop
dc h'E9212923A825E72625282328E126A0251F239F20601F211EE31CE51C271E681FFFFF'
FW3D6 anop
dc h'AA202A23A9252828262863292128DF265E24DE215F1FE01CA21BA51BE71C291EFFFF'
FW3D7 anop
dc h'6A1

View File

@ -0,0 +1,130 @@
MACRO
&lab _NewControl2
&lab ldx #$3110
jsl $E10000
MEND
MACRO
&lab _MMStartUp
&lab ldx #$0202
jsl $E10000
MEND
MACRO
&lab _NewHandle
&lab ldx #$0902
jsl $E10000
MEND
MACRO
&LAB JCC &BP
&LAB BCS *+5
BRL &BP
MEND
MACRO
&LAB JEQ &BP
&LAB BNE *+5
BRL &BP
MEND
MACRO
&LAB LONG &A,&B
LCLB &I
LCLB &M
&A AMID &A,1,1
&M SETB ("&A"="M").OR.("&A"="m")
&I SETB ("&A"="I").OR.("&A"="i")
AIF C:&B=0,.A
&B AMID &B,1,1
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
.A
&LAB REP #&M*32+&I*16
AIF .NOT.&M,.B
LONGA ON
.B
AIF .NOT.&I,.C
LONGI ON
.C
MEND
MACRO
&LAB SHORT &A,&B
LCLB &I
LCLB &M
&A AMID &A,1,1
&M SETB ("&A"="M").OR.("&A"="m")
&I SETB ("&A"="I").OR.("&A"="i")
AIF C:&B=0,.A
&B AMID &B,1,1
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
.A
&LAB SEP #&M*32+&I*16
AIF .NOT.&M,.B
LONGA OFF
.B
AIF .NOT.&I,.C
LONGI OFF
.C
MEND
MACRO
&lab WordResult
&lab pha
MEND
MACRO
&lab LongResult
&lab pha
pha
MEND
MACRO
&lab mov &num1,&num2
&lab lda &num1
sta &num2
MEND
MACRO
&Lab MakePdp
&Lab phd
tsc
tcd
ldy #2
lda [3],y
tay
lda [3]
sta <3
sty <3+2
MEND
MACRO
&lab killLdp
&lab pld
pla
pla
MEND
MACRO
&lab _Random
&lab ldx #$8604
jsl $E10000
MEND
MACRO
&lab pullword &SYSOPR
&lab ANOP
pla
AIF C:&SYSOPR=0,.end
sta &SYSOPR
.end
MEND
MACRO
&lab pushlong &addr,&offset
&lab ANOP
LCLC &C
LCLC &REST
&C AMID &addr,1,1
AIF "&C"="#",.immediate
AIF "&C"="[",.zeropage
AIF C:&offset=0,.nooffset
AIF "&offset"="s",.stack
pushword &addr+2,&offset
pushword &addr,&offset
MEXIT
.nooffset
pushword &addr+2
pushword &addr
MEXIT
.immediate
&REST AMID &addr,2,L:&addr-1
dc I1'$F4',I2'(

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,615 @@
SharkXYRts anop
ply ;for getting out in a hurry
plx
rts
NormalMove ldx NumMoves ;x-reg for random #ing
beq SharkXYRts ;if no moves available, do nothing
jsr RandomX
asl a
tax ;offset in Table
lda FreeYPlaces,x
tay
lda FreeXPlaces,x
tax
NewSharkPos lda #Shark
jsr DrawIt ;draw shark in new place
lda SharkData
and #$FF ;breed bits
cmp SharkBreed ;time for shark to breed?
bge BreedShark
inc a
pha
lda SharkData
and #$FF00 ;mask out breed bits
ora 1,s ;and put new ones in
ora #$8000 ;make it a shark
jsr PutInField ;in new place
pla
ply
plx ;original place
lda #0 ;free
jsr PutInFieldC
lda #Water
brl DrawIt ;put water in old place
BreedShark lda SharkData
and #$8F00 ;clean out breed bits
ora #$8001 ;just bred
inc NumSharks
jsr PutInField
ply
plx ;original place
brl PutInFieldC
EvalCenter ds 2
EvalAround stz NumMoves
stz NumFood
phx
phy ;save for safety
jsr GetOffset
stx EvalCenter
lda 3,s ;x
tax
iny
cpy #24
blt CanChkDown
ldy #0 ;wrap to top of screen
jsr ChkPlace
bra DoneChkDown
CanChkDown lda EvalCenter
clc
adc #64 ;one row down
tax
lda 3,s ;x-value
jsr ChkPlace2 ;and faster ops
DoneChkDown lda 1,s
tay ;restore value
lda 3,s
tax ;restore values
dey
bpl CanChkUp
ldy #23 ;wrap to bottom
jsr ChkPlace
bra DoneChkUp
CanChkUp lda EvalCenter
sec
sbc #64
tax
lda 3,s ;x-value
jsr ChkPlace2 ;faster ops
DoneChkUp lda 1,s
tay ;restore value
lda 3,s
tax ;restore values
inx
cpx #32 ;off right?
blt CanChkRight
ldx #0
jsr ChkPlace
bra DoneChkRight
CanChkRight lda EvalCenter
inc a
inc a ;one square to the right
tax
lda 3,s ;x-value
inc a
jsr ChkPlace2
DoneChkRight lda 3,s
tax ;restore value
lda 1,s
tay
dex
bpl CanChkLeft
ldx #31 ;off top.
jsr ChkPlace
bra FishXYRts ;get out of here
CanChkleft lda EvalCenter
dec a
dec a
tax
lda 3,s
dec a ;proper x-value
jsr ChkPlace2
FishXYRts ply ;don't change this area!
plx ;clean up stack
rts
HandleFish phx
phy ;for safety
jsr EvalAround
lda NumMoves ;x-reg for random #ing
beq FishXYRts ;if no moves available, do nothing
jsr GetFromFieldC ;get time till breed
pha
ldx NumMoves ;value to restrict to
jsr RandomX
asl a
tax ;offset in Table
lda FreeYPlaces,x
tay
lda FreeXPlaces,x
tax
lda #Fish
jsr DrawIt ;draw fish in new place
pla
cmp FishBreed ;time for fish to breed?
bge BreedEm
inc a
jsr PutInField ;in new place
ply
plx ;original place
lda #Water
jsr DrawIt ;put water in old place
lda #0 ;free
brl PutInFieldC
BreedEm lda #1 ;just bred
jsr PutInField
ply
plx ;original place
jsr PutInFieldC
inc NumFish
lda #Fish
brl DrawIt
NumMoves ds 2
NumFood ds 2
FreeXPlaces ds 10 ;space for positions
FreeYPlaces ds 10
FoodXPlaces ds 10
FoodYPlaces ds 10
RandomX LongResult
jsr Random
cpx #1 ;modulo 1 (==> 0)?
beq Return0
cpx #2 ;mod 2 ==> 0 or 1
beq Return01
pha
phx
_UDivide
pla
pla ;modulo result
rts
Return0 pla
pla ;clean up stack
lda #0 ;anything mod 1 is 0
rts
Return01 plx
plx ;clean up stack
and #$1 ;real fast mod 2
rts
RandomXY anop
LongResult
WordResult
_Random ;random #
PushWord #32 ;divide by
_UDivide
pla ;leave modulo on stack
LongResult
WordResult
_Random ;random #
PushWord #24 ;divide by
_UDivide
pla ;leave modulo on stack
ply ;0-23
plx ;0-32
jsr GetFromField
cmp #0 ;check a-reg
bne RandomXY ;loop back until empty space
rts
done anop
Bye anop
lda EntryStack
tcs
pld
plx
ply ;return address & bank
pla
pla ;T2data2
pla
pla ;T2data1
pla ;Message
phy
phx
plb
rtl
JustMoved ds 2
Random lda [10]
bne Done
stz JustMoved
lda >$E0C02E
xba ;volatile bits in low byte
cmp LastVCtr
blt NewPals
sta LastVCtr ;store updated position
QuitRandom rts ;return with highly variable results
NewPals inc JustMoved
sta LastVCtr ;keep updating position
dec WaitVBLs
bpl QuitRandom
mov #15,WaitVBLs
phx
lda ScreenBank ;depends on shadowing...
pha
plb
plb
ldx #PalLen
PalRef lda >Pal1,x
sta $9e00,x
dex
dex
bpl PalRef
phk
plb ;back to program bank
lda PalRef+1 ;address of palette
clc
adc #32 ;next palette in program
cmp #Pal4+1 ;past last one?
blt SetNewPal
lda #Pal1 ;if so, go back to 1st
SetNewPal sta PalRef+1
plx ;restore value
lda LastVCtr ;and random #
rts
DrawIt pha
phx
phy ;save values
tya
asl a
asl a
asl a ;*8
clc
adc #256
pha ;max of what to wait for
sec
sbc #30 ;minimum
pha
ChkVblDraw jsr Random ;keep random #s up
lda >$e0c02e
and #$FF
rol a ;make proper counter
cmp 1,s ;min
blt DoDraw
cmp 3,s ;max
blt ChkVblDraw
DoDraw pla
pla
tya ;start plot at y*1280+x*5+$2000
xba
pha ;*256
asl a
asl a ;*1024
clc
adc 1,s
sta 1,s ;keep on stack
lda 5,s ;x posn
asl a
asl a
clc
adc 5,s ;x*5
adc 1,s ;y*1280
adc #$2000 ;start of screen in bank
ply ;temp value
tax ;target location
lda 5,s ;pic to draw
asl a
tay
lda BMGTbl,y
sta SourceLoc1+1 ;now, ready to draw
sta SourceLoc2+1 ;now, ready to draw
sta SourceLoc3+1 ;now, ready to draw
ldy #0
SourceLoc1 lda |0,y
TargetLoc1 sta >$e10000,x
iny
iny
SourceLoc2 lda |0,y
TargetLoc2 sta >$e10002,x
iny
SourceLoc3 lda |0,y
TargetLoc3 sta >$e10003,x ;5 bytes/row to move in
txa
clc
adc #$A0 ;go on to next row
tax
iny
iny
cpy #40
blt SourceLoc1
ply
plx
pla
rts
OutOfRange brk $95
GetOffset pha ;save a-reg
* cpx #32
* bge OutOfRange
* cpy #24
* bge OutOfRange
tya ;offset= 64 * y + 2*x
xba ;*256
lsr a
lsr a ;now * 64
pha ;save on stack
txa
asl a ;double it for word offsets
clc
adc 1,s
tax
pla ;temp value
pla ;orig value
rts
GetFromField phx
jsr GetOffset
lda Moved,x
bne BadLoc
lda TheField,x
clc
plx
rts
BadLoc sec
lda TheField,x
plx
rts
PutInField phx
jsr GetOffset
sta TheField,x
inc Moved,x
plx
rts
GetFromFieldC phx
ldx CenterOffset
lda Moved,x
bne BadLoc
lda TheField,x
clc
plx
rts
PutInFieldC phx
ldx CenterOffset
sta TheField,x
inc Moved,x
plx
rts
LastVCtr ds 2
ScreenBank ds 2
OldBorder ds 2
WaitVBLs ds 2
FishBreed dc i'3'
SharkBreed dc i'4'
Starve dc i'3'
StNumFish dc i'380'
StNumSharks dc i'40'
NumFish ds 2
NumSharks ds 2
EntryStack ds 2
TheField ds 32*24*2+8
Moved ds 32*24*2+8
CenterOffset ds 2
OnColor dc i'StartBlue'
*
*
* Bit-Mapped Graphics
*
*
BMGTbl dc a'H2OBMG,SharkBMG,FishBMG'
H2OBMG anop
dc h'4432114321'
dc h'3321443214'
dc h'2214332143'
dc h'1143221432'
dc h'4432114321'
dc h'3321443214'
dc h'2214332143'
dc h'1143221432'
FishBMG anop
dc h'4662614321'
dc h'6776743214'
dc h'7667632143'
dc h'1773721432'
dc h'4432118828'
dc h'3321489989'
dc h'2214398898'
dc h'1143229939'
SharkBMG anop
dc h'4432114321'
dc h'3321F43214'
dc h'F214CF2143'
dc h'CDDDCCDDD2'
dc h'4CCCCCCCEF'
dc h'3BBBBBBBBB'
dc h'B214332143'
dc h'1143221432'
Pal1 anop
dc i'$000,$007,$009,$00C,$00F,$0FFF' ;water colors 0
dc i'$77F,$009,$009,$88F,$00F' ;fish colors 12
dc i'$00F,$777,$999,$E00,$BBB' ;shark colors 22
PalLen equ *-Pal1-2
Pal2 anop
dc i'$000,$00F,$007,$009,$00C,$0FFF' ;water colors
dc i'$00F,$88F,$00C,$99F,$00F' ;fish colors
dc i'$00C,$787,$9A9,$D00,$BAA' ;shark colors
Pal3 anop
dc i'$000,$00C,$00F,$007,$009,$0FFF' ;water colors
dc i'$00F,$77F,$88F,$007,$00F' ;fish colors
dc i'$787,$9A9,$00F,$00E,$00C' ;shark colors
Pal4 anop
dc i'$000,$009,$00C,$00F,$007,$0FFF' ;water colors
dc i'$88F,$007,$99F,$008,$00F' ;fish colors
dc i'$777,$999,$00F,$00E,$00C' ;shark colors
MaxColor ds 2
Red ds 2
Green ds 2
Blue ds 2
WaitInc ds 2
NewColors anop
jsr PrintStats
lda Prefs
beq NoNewColors
dec WaitInc
bmi CanInc
mov #2,WaitInc
NoNewColors rts
CanInc ldx OnColor
lda Colors,x ;next color
sta MaxColor
inx
inx
cpx #ColorsLen
blt OkColor
ldx #0
OkColor stx OnColor
short M
Wait1u lda >$e0C019 ;wait for start of next refresh
bpl Wait1u ;so no-blink screen color change
Wait2u lda >$e0C019
bmi Wait2u
Long M
lda MaxColor
sta Pal1+20
sta Pal2+20
sta Pal3+20
sta Pal4+20 ;text color at bottom of screen
tax ;save for a while
and #$F ;blue bits
sta Blue
txa
lsr a
lsr a
lsr a
lsr a
and #$F
sta Green
txa
xba
and #$F
sta Red
lda #FullTbl
jsr RestrictColor
sta Pal1+8
sta Pal2+2
sta Pal3+4
sta Pal4+6
sta Pal1+22
sta Pal1+28
sta Pal2+12
sta Pal3+12
sta Pal3+26
sta Pal3+28
sta Pal4+26
sta Pal4+28
ora #$AAA
sta Pal1+12
sta Pal1+18
sta Pal2+14
sta Pal2+18
sta Pal3+14
sta Pal3+16
sta Pal4+12
sta Pal4+16
lda #TQTbl
jsr RestrictColor
sta Pal1+6
sta Pal2+8
sta Pal3+2
sta Pal4+4
sta Pal2+16
sta Pal2+22
sta Pal2+28
sta Pal3+30
sta Pal4+30
lda #HalfTbl
jsr RestrictColor
sta Pal1+4
sta Pal2+6
sta Pal3+8
sta Pal4+2
sta Pal1+14
sta Pal1+16
lda #OneQTbl
jsr RestrictColor
sta Pal1+2
sta Pal2+4
sta Pal3+6
sta Pal4+8
sta Pal3+18
sta Pal4+14
sta Pal4+18
rts
NRed ds 2
NGreen ds 2
NBlue ds 2
RestrictColor sta Restrict1+1
sta Restrict2+1
sta Restrict3+1
lda Red
asl a
tax
Restrict1 lda |0,x
sta NRed
lda Green
asl a
tax
Restrict2 lda |0,x
sta NGreen
lda Blue
asl a
tax
Restrict3 lda |0,x
sta NBlue
lda NRed
asl a
asl a
asl a
asl a
ora NGreen
asl a
asl a
asl a
asl a
ora NBlue
rts
Colors anop
dc i'$F00,$F10,$F20,$F30,$F40,$F50,$F60,$F70,$E70,$E80,$D80,$D90,$C90,$CA0'
dc i'$BA0,$BB0,$AB0,$AC0,$9C0,$9D0,$8D0'
dc i'$8E0,$7F0,$6F0,$5F0,$4F0,$3F0,$2F0,$1F0'
dc i'$0F0,$0F1,$0F2,$0F3,$0F4,$0F5,$0F6,$0F7,$0E7,$0E8,$0D8,$0D9,$0C9,$0CA'
dc i'$0BA,$0BB,$0AB,$0AC,$09C,$09D,$08D'
dc i'$08E,$07F,$06F,$05F,$04F,$03F,$02F,$01F'
StartBlue equ *-Colors
dc i'$00F,$10F,$20F,$30F,$40F,$50F,$60F,$70F,$70E,$80E,$80D,$90D,$90C,$A0C'
dc i'$A0B,$B0B,$B0A,$C0A,$C09,$D09,$D08'
dc i'$E08,$F07,$F06,$F05,$F04,$F03,$F02,$F0

View File

@ -0,0 +1,101 @@
MACRO
&lab _GetTick
&lab ldx #$2503
jsl $E10000
MEND
MACRO
&LAB LONG &A,&B
LCLB &I
LCLB &M
&A AMID &A,1,1
&M SETB ("&A"="M").OR.("&A"="m")
&I SETB ("&A"="I").OR.("&A"="i")
AIF C:&B=0,.A
&B AMID &B,1,1
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
.A
&LAB REP #&M*32+&I*16
AIF .NOT.&M,.B
LONGA ON
.B
AIF .NOT.&I,.C
LONGI ON
.C
MEND
MACRO
&LAB SHORT &A,&B
LCLB &I
LCLB &M
&A AMID &A,1,1
&M SETB ("&A"="M").OR.("&A"="m")
&I SETB ("&A"="I").OR.("&A"="i")
AIF C:&B=0,.A
&B AMID &B,1,1
&M SETB ("&B"="M").OR.("&B"="m").OR.&M
&I SETB ("&B"="I").OR.("&B"="i").OR.&I
.A
&LAB SEP #&M*32+&I*16
AIF .NOT.&M,.B
LONGA OFF
.B
AIF .NOT.&I,.C
LONGI OFF
.C
MEND
MACRO
&lab WordResult
&lab pha
MEND
MACRO
&lab LongResult
&lab pha
pha
MEND
MACRO
&lab mov &num1,&num2
&lab lda &num1
sta &num2
MEND
MACRO
&lab _SetRandSeed
&lab ldx #$8704
jsl $E10000
MEND
MACRO
&lab pullword &SYSOPR
&lab ANOP
pla
AIF C:&SYSOPR=0,.end
sta &SYSOPR
.end
MEND
MACRO
&lab pushword &SYSOPR
&lab ANOP
AIF C:&SYSOPR=0,.b
LCLC &C
&C AMID "&SYSOPR",1,1
AIF ("&C"="#").AND.(S:LONGA),.immediate
lda &SYSOPR
pha
MEXIT
.b
pha
MEXIT
.immediate
LCLC &REST
LCLA &BL
&BL ASEARCH "&SYSOPR"," ",1
AIF &BL>0,.a
&BL SETA L:&SYSOPR+1
.a
&REST AMID "&SYSOPR",2,&BL-2
dc I1'$F4',I2'&REST'
MEND
MACRO
&lab _GetCtlHandleFromID
&lab ldx #$3010
jsl $E10000
MEND
MACRO

Binary file not shown.

View File

@ -0,0 +1,58 @@
DUMP v3.12 - Copyright Peter Watson, 1989-91
/H1/system/cdevs/tw1/tunnelgame
000000 | DB060000 00000000 01070000 00000402 | [
000010 | 00000100 00000000 00000000 00000000 |
000020 | 00000100 00000000 30004500 00000000 | 0 E
000030 | 20202020 20202020 20200A20 20202020 |
000040 | 20202020 20F29103 0000C230 8B0B3B1A | r B0 ;
000050 | 5B4BAB3B 8D990348 48A20325 220000E1 | [K+; HH" %" a
000060 | A2048722 0000E1E2 20AF34C0 01AA290F | " " ab /4@ *)
000070 | 8D91038A 29F08F34 C0014B68 8DCA01C2 | )p 4@ Kh J B
000080 | 30AF9903 001BE220 A9E148AB AD19C010 | 0/ b )aH+- @
000090 | FBAD19C0 30FBC220 A2FE7D9E 0020CACA | {- @0{B "~} JJ
0000A0 | 10F9A000 33A2207B 98EBA89D 32209D34 | y 3" { k( 2 4
0000B0 | 209D3620 9D6E209D 70209D72 208A38E9 | 6 n p r 8i
0000C0 | A000AA10 E3A21E00 BF770400 9D009ECA | * c" ?w J
0000D0 | CA10F54B ABA26400 9E12049E AD03CACA | J uK+"d - JJ
0000E0 | 10F6A94B 008D9703 8D9B039C 95039C9D | v)K
0000F0 | 03A93200 8D9F038D A703A96E 008DA103 | )2 ' )n !
000100 | 8DA903A7 08F01DE2 20AF34C0 0129F00D | ) ' p b /4@ )p
000110 | 91038F34 C001C220 2BFA7A68 68686868 | 4@ B +zzhhhhh
000120 | 5ADAAB6B C2300878 AF70C000 A00000A2 | ZZ+kB0 x/p@ "
000130 | 0300CAD0 FDAF64C0 00298080 F018C980 | JP}/d@ ) p I
000140 | 00300EF0 07C81002 300C80E9 E8300780 | 0 p H 0 ih0
000150 | E4E8C8EA 10DF288E 9303AF61 C0002980 | dhHj _( /a@ )
000160 | 80F01E48 A2048622 0000E168 8DAB03E2 | p H" " ah + b
000170 | 20AF19C0 0030FAAF 19C00010 FAC22080 | / @ 0z/ @ zB
000180 | 07AF2EC0 008DAB03 AD9303C9 5F00901A | /.@ + - I_
000190 | C9A00090 28C9F500 B00BAD95 03490100 | I (Iu 0 - I
0001A0 | 8D9503D0 18EE9703 8013C90A 00900BAD | P n I -
0001B0 | 95034901 008D9503 F003CE97 03AD9703 | I p N -
0001C0 | CDA70390 05CDA903 9021E220 AF19C001 | M' M) !b / @
0001D0 | 10FAAF19 C00130FA C220A21E 00A9FF0F | z/ @ 0zB " )
0001E0 | 9F009EE1 CACA10F8 8294FEAD 97031869 | aJJ x ~- i
0001F0 | 7F2C8DC2 01AD9503 0AAABD97 0418691E | , B - *= i
000200 | 018DBF01 A21000DA A20000A0 0000A912 | ? " Z" )
000210 | 008B54E1 E1ABADC2 0138E9A0 008DC201 | Taa+-B 8i B
000220 | ADBF0138 E912008D BF01FACA 10D9AD97 | -? 8i ? zJ Y-
000230 | 038D9B03 AD95038D 9D03AC9F 03E220AD | - , b -
000240 | 1204F010 1008CE9F 03CE9F03 8006EE9F | p N N n
000250 | 03EE9F03 A20000E2 20A9E148 ABAF1204 | n " b )aH+/
000260 | 00F02810 14A90099 052099A4 20A93399 | p( ) $ )3
000270 | FF1F999E 20888880 12A90099 FF1F99A0 |  ) 
000280 | 20A93399 052099A6 20C8C8C2 20981869 | )3 & HHB i
000290 | 4001A8E2 20E8E063 00B00ABF 1204009F | @ (b h`c 0 ?
0002A0 | 11040080 BC4BABBD 12049D11 048CA303 | <K+= #
0002B0 | ACA103AD AD03F010 1008CEA1 03CEA103 | ,! -- p N! N!
0002C0 | 8006EEA1 03EEA103 A20000E2 20A9E148 | n! n! " b )aH
0002D0 | ABAFAD03 00F02810 14A90099 052099A4 | +/- p( ) $
0002E0 | 20A93399 FF1F999E 20888880 12A90099 | )3  )
0002F0 | FF1F99A0 20A93399 052099A6 20C8C8C2 |  )3 & HHB
000300 | 20981869 4001A8E2 20E8E063 00B00ABF | i@ (b h`c 0 ?
000310 | AD03009F AC030080 BC4BABBD AD039DAC | - , <K+=- ,
000320 | 038CA503 AD9F0318 6906488D A703A200 | % - i H ' "
000330 | 00BD1204 18630183 01CDA703 90038DA7 | = c M' '
000340 | 03E8E007 0090EA68 ADA10338 E9118DA9 | h` jh-!

View File

@ -0,0 +1,28 @@
* This sample code shows how to manipulate a DataField control using two custom
* control messages. DataField supports all other normal control activity. For
* example, you can set the ctlInvis bit in the control flags field, and the
* control will not draw.
* To find out what tag value the first field is set to, use this code:
LongResult
PushLong DataCtlHand
PushWord #GetFieldValue
PushWord #0 ;not used for GetFieldValue
PushWord #34 ;field number - they start at 34
_CallCtlDefProc
pla ;this is the current tag
plx ;always zero
* To change the value of a field, use this code:
LongResult
PushLong DataCtlHand
PushWord #SetFieldValue
PushWord #4 ;new tag value for this field
PushWord #34 ;field number - they start at 34
_CallCtlDefProc
plx ;always zero
plx ;same

View File

@ -0,0 +1,581 @@
keep Clocks
mcopy Clocks.Macs
copy T2Common.equ
copy 18/e16.memory
DigitalClock Start
WaitForVBLd equ 254
WaitForVBLa equ 256+30
DestByte equ 18
phb ;Store old data bank
phk
plb
phd
tsc
inc a
tcd
lda T2Message ;action code?
cmp #2
beq StartBlank
brl Setup
StartBlank anop
_ShowPen ;default state for MY stuff...
PushWord #2 ;mode Xor
_SetPenMode
lda >$00c035
and #8 ;shadowing on?
bne NoShadow
lda #$0101 ;if so, faster draw to bank 01
dc h'cf'
NoShadow lda #$E1E1
sta MvnLoc+1 ;most important-- fast mvn if available
sta MvnLoc2+1 ;most important-- fast mvn if available
lda DClockPrefs
and #$FF
sta ClockType
cmp #3
blt DoDefType
GetClockType WordResult
_Random
pla
and ClockType ;mask to 0-3...
DoDefType dec a
bmi GotoASClock
dec a
bmi GotoAClock
beq DoDClock ;0 now means was 2=DClock
bra GetClockType ;3= still random
GotoAClock brl DoAClock
GotoASClock brl DoASClock
ClockType ds 2
DoDClock mov #$F00,>$e19e02
stz OnColor ;now in current bank
PushWord #1 ;color #
_SetSolidPenPat
PushWord #0
_SetSolidBackPat
NewLoc LongResult
WordResult
_Random ;random #
PushWord #160 ;divide by
_UDivide
pla
pla ;modulo
lsr a
asl a ;make it on an even byte boundary
sta Left ;left edge of stuff to draw
clc
adc #40
sta WipeRect+6 ;for erasing hours
GetNewY LongResult ;for Division
WordResult
_Random
PushWord #171 ;to divide by
_UDivide
pla ;quotient
pla ;modulo result (0-170)
sta Top
clc
adc #29
sta WipeRect+4
jsr GetTimed
jsr Buf2Digs
lda Top
clc
adc #6
sta Circle
clc
adc #4
sta Circle+4
lda Left
clc
adc #46
sta Circle+2
clc
adc #5
sta Circle+6
PushLlcl #Circle
_PaintOval
lda Circle
clc
adc #13
sta Circle
clc
adc #4
sta Circle+4
PushLlcl #Circle
_PaintOval
stz LastDigits
stz LastDigits+2
stz LastDigits+4 ;clean up after last time...
jsr DrawAll
LessThan mov #1,WasAbove
WaitAround lda [T2Data1] ;check done ptr in long mode just in case
bne Done
lda >$E0C02E ;vertical counter, upper 8 bits of it
and #$00FF
rol a
cmp WaitFor
blt LessThan
lda WasAbove ;check position on screen
beq WaitAround ;check if we've already displayed it...
stz WasAbove ;flag below
dec CountTwo
bpl WaitAround
lda DClockPrefs
xba
and #$FF
sta CountTwo
jsr MoveIt
jsr GetTimed
* short M
*Wait1d lda >$e1C019 ;wait for start of next refresh
* bpl Wait1d ;so no-blink screen clear
*Wait2d lda >$E1C019
* bmi Wait2d
* Long M ;force at least 1 full wait
lda Buffer+$F
cmp Digits+4 ;seconds changed yet?
beq WaitAround
ldx OnColor
lda Colors,x ;next color
sta >$e19e02
inx
inx
cpx #ColorsLen
blt OkColor
ldx #0
OkColor stx OnColor
DontJump jsr Buf2Digs
jsr DrawAll
bra WaitAround
done anop
stz <16
stz <18 ;return w/no error
Bye anop
pld
plx
ply ;return address & bank
pla
pla ;T2data2
pla
pla ;T2data1
pla ;Message
phy
phx
plb
rtl
GetTimed PushLlcl #Buffer
_ReadAsciiTime
ldx #18
ToLowAscii lda Buffer,x
and #$7F7F
sta Buffer,x
dex
dex
bpl ToLowAscii
rts
Buf2Digs lda Buffer+9
cmp Digits ;hours changed?
beq Min2Digs
sta Digits ;update in memory
stz LastDigits ;and screen update list
lda Top
clc
adc #29
sta WipeRect+4
lda Left
clc
adc #40
sta WipeRect+6
PushLlcl #WipeRect
_EraseRect
Min2Digs lda Buffer+$C
sta Digits+2
lda Buffer+$F
sta Digits+4
AnRts long I,m
rts
DrawSeconds lda Left
clc
adc #140
sta CharSX
lda Digits+5 ;fall into DrawDigit
ldx #5 ;correct place
DrawDigit and #$FF ;clear a's hob
Short M
cmp #$20 ;space
beq AnRts ;quit if a space
sec
sbc #$30 ;mask into 0-9
bmi AnRts ;in case out of range
cmp #$A
bge AnRts
tay
lda DigitBars,y
eor LastDigits,x ;get real set of bars to change
beq AnRts ;don't draw when nothing to update
sta ToDraw
lda DigitBars,y ;really what's on now
sta LastDigits,x
Long I,m ;long mode for tools
stz TblOffset
ldy #8
DrawStuff phy ;save counter
lsr ToDraw
bcc NextBar ;branch if nothing to draw
ldx TblOffset
PushWord Line3EDX,x
PushWord Line3EDY,x
PushWord Line3SX,x
PushWord Line3SY,x
PushWord Line2EDX,x
PushWord Line2EDY,x
PushWord Line2SX,x
PushWord Line2SY,x
PushWord Line1EDX,x
PushWord Line1EDY,x
PushWord Line1SX,x
PushWord Line1SY,x
jsr ToTL
_Move
_Line ;draw 1st line
jsr ToTl
_Move
_Line ;draw 2nd line
jsr ToTl
_Move
_Line ;draw 3rd line
NextBar inc TblOffset
inc TblOffset
ply
dey
beq AnRts2
brl DrawStuff
ToTl PushWord CharSX
PushWord Top
_MoveTo
AnRts2 rts
DrawAll ldx #0 ;6 digits to put on screen, counting up
mov Left,CharSX
DrawEm phx
lda Digits,x
jsr DrawDigit
plx
txa
asl a
tay
lda CharSX
clc
adc Widths,y ;adjust start of next one
sta CharSX
inx
cpx #6
blt DrawEm
rts
MoveIt anop
Long I,m
lda Left
cmp #2
bge NotTooLeft
mov #1,MoveDirectX
NotTooLeft lda Left
cmp #319-158
blt NotTooRight
mov #-1,MoveDirectX
NotTooRight lda Top
cmp #2
bge NotTooHigh
mov #1,MoveDirectY
NotTooHigh lda Top
cmp #199-29
blt NotTooLow
mov #-1,MoveDirectY
NotTooLow lda Top ;y coord
dec a ;move one blank line above it for safety
xba
lsr a ;now, y* 128
pha
lsr a ;*64
lsr a ;*32
clc
adc 1,s
adc #$2000
sta 1,s
lda Left
lsr a ;320-pixel to byte conv
dec a ;minus one for erase area
clc
adc 1,s
sta TopLeftByte
pla
lda MoveDirectY
bmi MovingUp
lda #160 ;next row is +160 bytes away
dc h'cf' ;skip next 3 bytes
MovingUp lda #-160
clc
adc MoveDirectX ;could be negative, so keep carry ok
sta <DestByte
lda MoveDirectY
bmi SetMovingUp
lda #-160
sta AddPos1+1
lda TopLeftByte
clc
adc #31*160
sta TopLeftByte
bra DoDrawing
SetMovingUp lda #160
sta AddPos1+1
DoDrawing anop
phb
php
sei ;NO interrupts during drawing
mov #32,<16 ;lines to move
lda TopLeftByte
MoveLines anop
pha
tax
clc
adc <DestByte
tay
lda #84 ;# bytes to move
MvnLoc dc h'54e1e1' ;Mvn e1e1
pla
clc
AddPos1 adc #$a0
dec <16 ;row counter on dp
bne MoveLines
plp
plb
lda Top
clc
adc MoveDirectY
sta Top
clc
adc #WaitForVBLd
sta WaitFor
lda Left
clc
adc MoveDirectX
clc ;account for wraps
adc MoveDirectX ;twice for pixel offsets
sta Left
Long I,m
rts
;................................................................
Widths dc i'20,40,20,40,20,20'
RowNum ds 2
OnColor ds 2
Buffer ds 20
Digits ds 6
WipeRect anop ;has top & left as part of it
Circle ds 8 ;circles to draw
CharSX ds 2
ToDraw ds 2
TblOffset ds 2
LastDigits ds 6 ;last set of them-- for eor purposes
OurDp ds 2
DigitBars dc h'77245d6d2e6b7b257f6f' ;bits show which bars are on
Line1SY dc i'0,1,3,12,14,16,24'
Line1SX dc i'2,0,13,3,0,13,4'
Line1EDY dc i'0,11,7,0,11,7,0'
Line1EDX dc i'11,0,0,9,0,0,7'
Line2SY dc i'1,2,2,13,15,15,25'
Line2SX dc i'3,1,14,2,1,14,3'
Line2EDY dc i'0,9,9,0,9,9,0'
Line2EDX dc i'9,0,0,11,0,0,9'
Line3SY dc i'2,3,1,14,16,14,26'
Line3SX dc i'4,2,15,3,2,15,2'
Line3EDY dc i'0,7,11,0,7,11,0'
Line3EDX dc i'7,0,0,9,0,0,11'
Colors anop
dc i'$F00,$F10,$F20,$F30,$F40,$F50,$F60,$F70,$F80,$F90,$FA0,$FB0,$FC0,$FD0,$FE0'
dc i'$FF0,$EF0,$DF0,$CF0,$BF0,$AF0,$9F0,$8F0,$7F0,$6F0,$5F0,$4F0,$3F0,$2F0,$1F0'
dc i'$0F0,$0F1,$0F2,$0F3,$0F4,$0F5,$0F6,$0F7,$0F8,$0F9,$0FA,$0FB,$0FC,$0FD,$0FE'
dc i'$0FF,$0EF,$0DF,$0CF,$0BF,$0AF,$09F,$08F,$07F,$06F,$05F,$04F,$03F,$02F,$01F'
dc i'$00F,$10F,$20F,$30F,$40F,$50F,$60F,$70F,$80F,$90F,$A0F,$B0F,$C0F,$D0F,$E0F'
dc i'$F0F,$F0E,$F0D,$F0C,$F0B,$F0A,$F09,$F08,$F07,$F06,$F05,$F04,$F03,$F02,$F01'
ColorsLen equ *-Colors
*
*
Setup anop
*
* Handle the Setup and all. Entry: Accum=T2Message
*
*
cmp #MakeT2
beq doMake
cmp #HitT2
jeq doHit
* cmp #KillT2
* jeq doKill
cmp #SaveT2
jeq doSave
cmp #LoadSetupT2
jeq doLoadSetup
* cmp #UnloadSetupT2
* jeq doUnloadSetup
brl Done
*=================================================
*
* Create all the buttons in the window
*
doMake anop
lda T2data1+2
sta WindPtr+2
lda T2data1
sta WindPtr
lda T2data2
sta RezFileID
WordResult
_MMStartUp
PullWord MyID
LongResult
PushLong WindPtr
PushWord #9 ;resource 2 resource
PushLong #1 ;resource item ID=1
_NewControl2
plx
plx ;chuck result out
* Make sure we're dealing with the T2pref file.
WordResult
_GetCurResourceFile
PushWord RezFileID
_SetCurResourceFile
jsr load_setup
noShapes1 anop
MoveOn _SetCurResourceFile
lda DClockPrefs
xba
and #$FF
clc
adc #$12B ;first item id #-1 (1=12c)
pha
LongResult
PushLong WindPtr
PushLong #1 ;speed control #
_GetCtlHandleFromID
_SetCtlValue
lda DClockPrefs
and #$FF
clc
adc #$132 ;first item id #
pha
LongResult
PushLong WindPtr
PushLong #2 ;type control #
_GetCtlHandleFromID
_SetCtlValue
lda #4
sta T2Result
brl Bye
*=================================================
temp ds 4
rDClockPrefs str 'Clocks: Prefs'
DClockPrefs ds 2
* Format: Upper byte=clock type (ignored for now)
* 0=DClock; 1= AClock; 2=Random on Entry
* Lower byte=Refreshes between movement...
*=================================================
doLoadSetup anop
jsr load_setup
brl Bye
load_setup anop
* Load the fps/maxzoom/delay resource.
LongResult
Pushword #rT2ModuleWord ;type
PushLong #rDClockPrefs
_RMLoadNamedResource
bcc PrefsThere
plx
plx ;setup not saved yet...
lda #$0203 ;Random Clock Type; Normal Speed
sta DClockPrefs
bra NoPrefs
PrefsThere anop
makePdp
lda [3]
sta DClockPrefs
killLdp
PushWord #3 ;purge levek
PushWord #rT2ModuleWord ;rtype for release
LongResult
PushWord #rT2ModuleWord
PushLong #rDClockPrefs
PushLong #Temp ;don't care about filenum, but toolbox does
_RMFindNamedResource ;get it
_ReleaseResource ;and throw it out. We have a copy now :)
NoPrefs rts
*========

View File

@ -0,0 +1,454 @@
s anop
makePdp
lda DClockPrefs
sta [3]
killLdp
PushWord #TRUE ; changeflag: true
PushWord #rT2ModuleWord ; rtype
LongResult
PushWord #rT2ModuleWord
PushLong #rDClockPrefs
PushLong #Temp ;don't care about filenum, but toolbox does
_RMFindNamedResource ;get it
_MarkResourceChange
created1 anop
PushWord RezFileID
_UpdateResourceFile
_SetCurResourceFile
brl Bye
*=================================================
* Hit
*
* handle item hits
doHit anop
stz T2Result+2
stz T2Result
lda T2data2+2 ;ctlID hi word must be zero
bne nothingHit
lda T2data2 ;get ctlID
cmp #1
beq enable
cmp #2
beq enable
nothingHit brl Bye
enable lda #TRUE
sta T2Result
bra nothingHit
MyID ds 2
WindPtr ds 4
RezFileID ds 2
DoAClock anop
mov #45,XCenter+1
mov #39,YCenter+1
mov #HoursDX,HoursDXRef+1
mov #HoursDy,HoursDYRef+1
mov #6,HrPenSize+1
dec a
dec a ;now 4
sta MinPenSize+1
dec a
dec a ;now 2
sta SecPenSize+1
sta TickSize+1
mov #MinSecDX,MinDXRef+1
mov #MinSecDY,MinDYRef+1
mov #TickEndX,TickEndXRef+1
mov #TickEndY,TickEndYRef+1
mov #TickStartX,TickStXRef+1
mov #TickStartY,TickStYRef+1
mov #85*160,NumLines1+1
sta NumLines2+1
mov #85,Lines2Move+1
mov #$32,Bytes2Move+1
mov #319-98,RMargin+1
mov #199-82,BotMargin+1
bra StartAClock
DoASClock anop
mov #25,XCenter+1
mov #21,YCenter+1
mov #HoursDX2,HoursDXRef+1
mov #HoursDy2,HoursDYRef+1
mov #3,HrPenSize+1
dec a ;now 2
sta MinPenSize+1
dec a ;now 1
sta SecPenSize+1
sta TickSize+1
mov #MinSecDX2,MinDXRef+1
mov #MinSecDY2,MinDYRef+1
mov #TickEndX2,TickEndXRef+1
mov #TickEndY2,TickEndYRef+1
mov #TickStartX2,TickStXRef+1
mov #TickStartY2,TickStYRef+1
mov #52*160,NumLines1+1
sta NumLines2+1
mov #52,Lines2Move+1
mov #$1C,Bytes2Move+1
mov #319-58,RMargin+1
mov #199-52,BotMargin+1
StartAClock ldx #14 ;move our palette into place
nextPal lda MyPal,x
sta >$E19e00,x
dex
dex
bpl NextPal
jsr GetTime
NewLocA WordResult
_Random
pla
and #$7F
clc
adc #96
sta CenterX ;center it on the field
sec
XCenter sbc #45
sta Left
WordResult
_Random
pla
and #$3F
clc
adc #68
sta CenterY
sec
YCenter sbc #39
sta Top
jsr DrawTicks
jsr DrawHrMin
jsr DrawSecond
LessThanA mov #1,WasAbove
WaitAroundA lda [T2Data1] ;check done ptr in long mode just in case
beq ContAClock
brl Done
ContAClock lda >$E0C02E ;vertical counter, upper 8 bits of it
and #$FF ;dump horiz count in upper 8 bits of a
rol a ;insert a 0 or 1, for full 9 bits
cmp WaitFor
blt LessThanA
lda WasAbove ;check position on screen
beq WaitAroundA ;check if we've already displayed it...
stz WasAbove ;flag below
dec CountTwo
bpl WaitAroundA
lda DClockPrefs
xba
and #$FF
sta CountTwo
jsr MoveItA
jsr GetTime
lda LastSeconds
cmp TheTime
beq WaitAroundA
lda LastSeconds ;move back to last second
jsr DrawSecond2 ;erase last second
jsr DrawSecond ;draw new one
lda LastMinHr ;last minute & hour drawn
cmp TheTime+1
beq WaitAroundA
jsr DrawHrMin2
jsr DrawHrMin ;draw update
bra WaitAroundA
GetTime pha
pha
pha
pha
_ReadTimeHex
pla
sta TheTime
pla
sta TheTime+2
pla
sta TheTime+4
pla
sta TheTime+6
rts
DrawHrMin lda TheTime+1
DrawHrMin2 pha ;and save it on stack
sta LastMinHr ;save minute & hour drawn
and #$FF
sta Minutes ;minutes Only
pla
xba ;flip hours into low byte
and #$FF ;mask to hours only
cmp #12
blt HoursOk ;if hours >12, then
sec
sbc #12 ;make 0-11 (like regular clock)
HoursOk tay
lda #0
tyx ;re-set flags
AddupHours beq AddMins ;multiply hours by 60
clc
adc #60
dex
bra AddUpHours ;do all hours
AddMins clc
adc Minutes ;+ minutes=minutes so far today
lsr a
lsr a ;divide by 4 for offsets
ldx CenterX
dex
dex
phx ;end of line
ldx CenterY
dex
dex
phx
tax ;change into offset
HoursDXRef lda HoursDX,x
and #$FF ;1 byte only
pha
HoursDYRef lda HoursDY,x
and #$FF
pha
PushWord Left
PushWord Top
_MoveTo
PushWord #1
_SetSolidPenPat ;blue pen
HrPenSize lda #6
pha
pha ;6*6 pen
_SetPenSize
_Move
_LineTo ;data is sitting on the stack!
lda #2
pha ;red pen
MinPenSize lda #4
pha
pha ;4*4 pen
_SetPenSize ;for minute hand
_SetSolidPenPat
lda CenterX
dec a ;account for 4*4 pen
pha
lda CenterY
dec a
pha ;save it on stack for draw
lda Minutes
ldy #-51 ;offset to drawing: just negative
bra DrawMinSec
DrawSecond lda TheTime
DrawSecond2 sta LastSeconds ;save value plotted
pha ;save thru toolbox calls
SecPenSize lda #2
pha
pha ;2*2 pen
lda #4
pha ;green
_SetSolidPenPat
_SetPenSize ;for minute hand
pla ;restore value
ldy #0 ;no delta in drawing
ldx CenterX
phx ;end of line
ldx CenterY
phx
DrawMinSec and #$FF ;mask to low byte (seconds only)
tax ;use as index
MinDXRef lda MinSecDX,x
and #$FF ;1 byte only
iny
bpl XIsOk
dec a ;-1 for 4*4 pen
XIsOk pha
MinDYRef lda MinSecDY,x
and #$FF ;1 byte only
iny ;test y-reg
bpl YIsOk
dec a ;-1 for 4*4 pen
YIsOk pha
PushWord Left
PushWord Top
_MoveTo
_Move
_LineTo ;already on stack!
rts
DrawTicks PushWord #7 ;white
_SetSolidPenPat
TickSize lda #2
pha
pha
_SetPenSize ;2*2 pen
ldx #22
DrawAllTiks phx
TickEndXRef PushWord TickEndX,x
TickEndYRef PushWord TickEndY,x
TickStXRef PushWord TickStartX,x
TickStYRef PushWord TickStartY,x
lda CenterX
pha
lda CenterY
pha
_MoveTo
_Move
_Line
plx
dex
dex
bpl DrawAllTiks
rts
MoveItA Long I,m
lda Left
cmp #6
bge NotTooLeftA
mov #1,MoveDirectX
NotTooLeftA lda Left
RMargin cmp #319-98
blt NotTooRightA
mov #-1,MoveDirectX
NotTooRightA lda Top
cmp #6
bge NotTooHighA
mov #1,MoveDirectY
NotTooHighA lda Top
BotMargin cmp #199-82
blt NotTooLowA
mov #-1,MoveDirectY
NotTooLowA lda Top ;y coord
dec a ;move one blank line above it for safety
dec a
dec a
xba
lsr a ;now, y* 128
pha
lsr a ;*64
lsr a ;*32
clc
adc 1,s
adc #$2000
sta 1,s
lda Left
lsr a ;320-pixel to byte conv
dec a ;minus two for erase area
dec a
clc
adc 1,s
sta TopLeftByte
pla
lda MoveDirectY
bmi MovingUpA
lda #160 ;next row is +160 bytes away
dc h'cf' ;skip next 3 bytes
MovingUpA lda #-160
clc
adc MoveDirectX ;could be negative, so keep carry ok
clc
adc TopLeftByte
sta <DestByte
lda MoveDirectY
bmi SetMovingUpAA
lda #-160
sta AddPos1a+1
sta AddPos2a+1
lda TopLeftByte
clc
NumLines1 adc #85*160
sta TopLeftByte
lda <DestByte
clc
NumLines2 adc #85*160
sta <DestByte
bra DoDrawingA
SetMovingUpAA lda #160
sta AddPos1a+1
sta AddPos2a+1
DoDrawingA phb
Lines2Move lda #85 ;lines to move
ldx TopLeftByte
ldy <DestByte
MoveLinesA pha
phy
phx
Bytes2Move lda #$32 ;# bytes to move
MvnLoc2 dc h'54e1e1' ;Mvn e1e1
pla
clc
AddPos1a adc #$a0
tax
pla
clc
AddPos2a adc #$a0
tay
pla
dec a
bne MoveLinesA
plb
lda Top
clc
adc MoveDirectY
sta Top
clc
adc #WaitForVBLa
sta WaitFor
lda CenterY
clc
adc MoveDirectY
sta CenterY
lda MoveDirectX
asl a
tax ;save for a minute
clc
adc left
sta Left
txa
clc
adc CenterX
sta CenterX
rts
;................................................................
*BlueMax=C, RedMax=E,GreenMax=D
MyPal dc i'$0000,$000F,$0F00,$0F0F,$00F0,$00FF,$0FF0,$0FFF'
Minutes ds 2
CenterX ds 2
CenterY ds 2
LastSeconds ds 2
LastMinHr ds 2
Top ds 2
Left ds 2
TheTime ds 10
MoveDirectX dc i4'1'
MoveDirectY dc i4'1'
TopLeftByte ds 2
WaitFor ds 2
WasAbove ds 2
CountTwo ds 2
EntryStack ds 2
MinSecDX anop
dc i1'45,50,54,59,63,67,71,75,78,81,84,86,88,89,90,90,90,89,88,86,84,81,78,75,71,68,63,59,54,50,45'
dc i1'40,36,31,27,23,19,15,12,9,6

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,156 @@
*=================================================
* Macros
add MAC
LDA ]1
CLC
ADC ]2
BPL Positive
CLC
ADC #512
BRA Cont_Add
Positive CMP #512
BCC Cont_Add
SEC
SBC #512
Cont_Add STA ]1
EOM
TABLE_SPECIAL MAC
MX %00
LDA ]1 ; Pas Elementaire
LSR
LDX Perspective
BNE Div2_Only
* LSR
LSR ; Divise par 2
; pour recuperer un bit de precision
Div2_Only LDX ]2 ; Signe Pas elementaire
BEQ No_Inversaga
EOR #$FFFF
INC
No_Inversaga = *
STA Buf_VAL ; Valeur
LDA ]4
ASL
CLC
ADC #]3
STA Patch0
LDA ]4
ASL
STA Patch2
LDX #0
LDA #0
]lp STA !$0000,X
Patch0 = *-2
CLC
ADC Buf_VAL
CPX #0
Patch2 = *-2
BEQ Patch1
INX
INX
BRA ]lp
Patch1 DEX
DEX
BMI Here ; Cas ou la dim = 0
LDA #0
]lp SEC
SBC Buf_VAL
STA ]3,X
DEX
DEX
BPL ]lp
Here EOM
TABLE MAC
MX %00
LDA ]1 ; Pas Elementaire
LSR ; Divise par 2
; pour recuperer un bit de precision
LDX ]2 ; Signe Pas elementaire
BEQ No_Inversaga
EOR #$FFFF
INC
No_Inversaga = *
STA Buf_VAL ; Valeur
LDA ]4
ASL
CLC
ADC #]3
STA Patch0
LDA ]4
ASL
STA Patch2
LDX #0
LDA #0
]lp STA !$0000,X
Patch0 = *-2
CLC
ADC Buf_VAL
CPX #0
Patch2 = *-2
BEQ Patch1
INX
INX
BRA ]lp
Patch1 DEX
DEX
BMI Here ; Cas ou la dim = 0
LDA #0
]lp SEC
SBC Buf_VAL
STA ]3,X
DEX
DEX
BPL ]lp
Here EOM
Add MAC
CPY ]1
BEQ Same_Signe0
SEC
SBC ]2
DEY
BEQ First_Negatif0
BCC Inverse_Value0
BRA Cont_Calc0
Inverse_Value0 EOR #$FFFF
INC
INC ]3
BRA Cont_Calc0
First_Negatif0 BCS Cont_Calc0
EOR #$FFFF
INC ; Change le signe
STZ ]3
BRA Cont_Calc0
Same_Signe0 CLC
ADC ]2
Cont_Calc0 STA ]4 ; *
EOM
Plot1 MAC
txa
bmi ]aa
cmp #$7d01
bcs ]aa
LDAL $012000-1,X
HEX 0901F1
STAL $012000-1,X
]aa TXA
ADC #$2000-1
CMP Old
BEQ No_Store
STA Old
cmp #$9d00+1
bcs No_Store
STA [Ptr_Clear]
STA [Ptr_Tsb]
STA [Ptr_Tsb2]
INC Ptr_Clear
INC Ptr_Clear
INC Ptr_Clear
INC Ptr_Tsb
INC Ptr

View File

@ -0,0 +1,446 @@
sta >$E12000,x
rts
PlotError ply
pla
rts
OddPix clc
adc 1,s
cmp #$8000
bge PlotError ;don't plot if off screen
ply
tax ;byte address of pixel
pla ;color
and #$000F ;right pixel
sta Color
lda >$e12000,x
and #$FFF0
ora Color
sta >$E12000,x
rts
Color ds 2
ChkColor phx
pha ;original value
jsr SplitColor
lda Red
sec
sbc Blue
bpl ChkRedBlue
eor #-1
inc a
ChkRedBlue cmp #ColorDiff
blt Bad2
lda Red
sec
sbc Green ;difference between red & green
bpl ChkRedGreen
eor #-1
inc a
ChkRedGreen cmp #ColorDiff
blt Bad2
lda Green
sec
sbc Blue ;diff between blu & green
bpl ChkBlueGrn
eor #-1
inc a
ChkBlueGrn cmp #ColorDiff
blt Bad2 ;good, bright color here!
pla ;original value
plx ;entry value
clc ;good value
rts
Bad2 pla ;orig value
plx ;original color
sec ;return w/error
rts
SplitColor pha
and #$F
sta Blue
lda 1,s
lsr a
lsr a
lsr a
lsr a
and #$F
sta Green
pla ;get original value off stack
xba
and #$F
sta Red
rts
IncColor sta OrigColor
jsr SplitColor
lda Red
cmp #$F
bge BadInc
lda Green
cmp #$F
bge BadInc
lda Blue
cmp #$F
bge BadInc
inc Red
inc Green
inc Blue
MakeColor lda Red
asl a
asl a
asl a
asl a
ora Green
asl a
asl a
asl a
asl a
ora Blue
rts
BadInc lda OrigColor
rts
DecColor sta OrigColor
jsr SplitColor
lda Red
beq BadInc ;if 0, don't go any farther
lda Green
beq BadInc
lda Blue
beq BadInc
dec Red ;ok, none are 0, so can drop
dec Green
dec Blue
DoneDec bra MakeColor ;from Red, Green & blue components
;................................................................
OrigColor ds 2
Red ds 2
Green ds 2
Blue ds 2
EntryStack ds 2
StartX ds 4 ;4 for 32-bit frac adds
StartY ds 4 ;ditto
TargetX ds 2
TargetY ds 2
XDSpeed ds 4
YSpeed ds 4
OldBorder ds 2
ParamOffset ds 2
ColorH ds 2
ColorL ds 2
Erase ds 2
Running ds 2
Block1 ds 50
Block2 ds 50
Blocks dc a'Block1,Block2'
EndFW equ 245
SetColor equ 246
WaitTick equ 247
SetErase equ 248
SetRunBlock equ 249
RunNow equ 250
Brighter equ $FFFF ;-1
Darker equ $FFFE ;-2
FWs dc a'FW1Code,FW2Code,FW3Code,FW4Code,FW5Code,FW6Code,FW7Code'
dc a'FW8Code,FW9Code,FW10Code,FW11Code,FW12Code,FW13Code'
dc a'FW14Code,FW15Code,FW16Code'
Colors dc H'EEEEEEEEEEDDDDDDCCCCCCBBBBBBAAAAAA9999999999999999' ;1-25
DC H'99999999999999999999FF' ;26-36
dc H'EEEEEEEEEEDDDDDDCCCCCCBBBBBBAAAAAA99999999999999FF' ;1-25
dc H'EEEEEEEEEEDDDDDDCCCCCCBBBBBBAAAAAA99999999999999FF' ;1-25
FWDTrans dc a'FW1D1,FW1D2,FW1D3,FW1D4,FW1D5,FW1D6,FW1D7,FW1D8,FW1D9'
DC A'FW1D10,FW1D11,FW1D12,FW1D13,FW1D14,FW1D15,FW1D16'
DC A'FW1D17,FW1D18,FW1D19,FW1D20,FW1D21,FW1D22,FW1D23'
DC A'FW1D24,FW1D25,FW1D26,FW1D27,FW1D28,FW1D29,FW1D30'
DC A'FW1D31,FW1D32,FW1D33,FW1D34,FW1D35,FW1D36'
dc a'FW2D1,FW2D2,FW2D3,FW2D4,FW2D5,FW2D6,FW2D7,FW2D8,FW2D9'
DC A'FW2D10,FW2D11,FW2D12,FW2D13,FW2D14,FW2D15,FW2D16'
DC A'FW2D17,FW2D18,FW2D19,FW2D20,FW2D21,FW2D22,FW2D23'
DC A'FW2D24,FW2D25'
dc a'FW3D1,FW3D2,FW3D3,FW3D4,FW3D5,FW3D6,FW3D7,FW3D8,FW3D9'
DC A'FW3D10,FW3D11,FW3D12,FW3D13,FW3D14,FW3D15,FW3D16'
DC A'FW3D17,FW3D18,FW3D19,FW3D20,FW3D21,FW3D22,FW3D23'
DC A'FW3D24,FW3D25'
FW1P1 EQU 1+15
FW1P2 EQU 2+15
FW1P3 EQU 3+15
FW1P4 EQU 4+15
FW1P5 EQU 5+15
FW1P6 EQU 6+15
FW1P7 EQU 7+15
FW1P8 EQU 8+15
FW1P9 EQU 9+15
FW1P10 EQU 10+15
FW1P11 EQU 11+15
FW1P12 EQU 12+15
FW1P13 EQU 13+15
FW1P14 EQU 14+15
FW1P15 EQU 15+15
FW1P16 EQU 16+15
FW1P17 EQU 17+15
FW1P18 EQU 18+15
FW1P19 EQU 19+15
FW1P20 EQU 20+15
FW1P21 EQU 21+15
FW1P22 EQU 22+15
FW1P23 EQU 23+15
FW1P24 EQU 24+15
FW1P25 EQU 25+15
FW1P26 EQU 26+15
FW1P27 EQU 27+15
FW1P28 EQU 28+15
FW1P29 EQU 29+15
FW1P30 EQU 30+15
FW1P31 EQU 31+15
FW1P32 EQU 32+15
FW1P33 EQU 33+15
FW1P34 EQU 34+15
FW1P35 EQU 35+15
FW1P36 EQU 36+15
FW2P1 EQU 37+15
FW2P2 EQU 38+15
FW2P3 EQU 39+15
FW2P4 EQU 40+15
FW2P5 EQU 41+15
FW2P6 EQU 42+15
FW2P7 EQU 43+15
FW2P8 EQU 44+15
FW2P9 EQU 45+15
FW2P10 EQU 46+15
FW2P11 EQU 47+15
FW2P12 EQU 48+15
FW2P13 EQU 49+15
FW2P14 EQU 50+15
FW2P15 EQU 51+15
FW2P16 EQU 52+15
FW2P17 EQU 53+15
FW2P18 EQU 54+15
FW2P19 EQU 55+15
FW2P20 EQU 56+15
FW2P21 EQU 57+15
FW2P22 EQU 58+15
FW2P23 EQU 59+15
FW2P24 EQU 60+15
FW2P25 EQU 61+15
FW3P1 EQU 62+15
FW3P2 EQU 63+15
FW3P3 EQU 64+15
FW3P4 EQU 65+15
FW3P5 EQU 66+15
FW3P6 EQU 67+15
FW3P7 EQU 68+15
FW3P8 EQU 69+15
FW3P9 EQU 70+15
FW3P10 EQU 71+15
FW3P11 EQU 72+15
FW3P12 EQU 73+15
FW3P13 EQU 74+15
FW3P14 EQU 75+15
FW3P15 EQU 76+15
FW3P16 EQU 77+15
FW3P17 EQU 78+15
FW3P18 EQU 79+15
FW3P19 EQU 80+15
FW3P20 EQU 81+15
FW3P21 EQU 82+15
FW3P22 EQU 83+15
FW3P23 EQU 84+15
FW3P24 EQU 85+15
FW3P25 EQU 86+15
FW1Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P36'
dc i1'RunNow'
dc i1'EndFW'
FW2Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P20'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P21,FW1P36'
dc i1'SetRunBlock,2,FW1P1,FW1P16'
dc i1'RunNow'
dc i1'EndFW'
FW3Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW2P1,FW2P25'
dc i1'RunNow'
dc i1'EndFW'
FW4Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P20'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P21,FW1P36'
dc i1'SetRunBlock,2,FW2P1,FW2P16'
dc i1'RunNow'
dc i1'EndFW'
FW5Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW3P1,FW3P25'
dc i1'RunNow'
dc i1'EndFW'
FW6Code anop
dc i1'SetErase,25'
dc i1'SetRunBlock,1,FW2P1,FW2P25'
dc i1'RunNow'
dc i1'EndFW'
FW7Code anop
dc i1'SetErase,25'
dc i1'SetRunBlock,1,FW3P1,FW3P25'
dc i1'RunNow'
dc i1'EndFW'
FW8Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW2P1,FW2P15'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW2P16,FW2P25'
dc i1'SetRunBlock,2,FW3P1,FW3P10'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW3P11,FW3P25'
dc i1'RunNow'
dc i1'EndFW'
FW9Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P13'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW2P14,FW2P25'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P26,FW1P35'
dc i1'RunNow'
dc i1'EndFW'
FW10Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P13'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW2P14,FW2P25'
dc i1'RunNow'
dc i1'EndFW'
FW11Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW2P1,FW2P25'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P26,FW1P36'
dc i1'RunNow'
dc i1'EndFW'
FW12Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P13'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW3P14,FW3P25'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P26,FW1P35'
dc i1'RunNow'
dc i1'EndFW'
FW13Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P13'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW3P14,FW3P25'
dc i1'RunNow'
dc i1'EndFW'
FW14Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW3P1,FW3P25'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P26,FW1P36'
dc i1'RunNow'
dc i1'EndFW'
FW15Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P20'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P21,FW1P36'
dc i1'SetRunBlock,2,FW3P1,FW3P16'
dc i1'RunNow'
dc i1'EndFW'
FW16Code anop
dc i1'SetErase,5'
dc i1'SetRunBlock,1,FW1P1,FW1P20'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW1P21,FW1P25'
dc i1'SetRunBlock,2,FW3P1,FW3P5'
dc i1'RunNow'
dc i1'SetRunBlock,1,FW3P6,FW3P25'
dc i1'RunNow'
dc i1'EndFW'
FW1D1 anop
dc h'E52125232423242324232323E321E321E321A320A420A420A420A520E521E521FFFF'
FW1D2 anop
dc h'2623252365246424632423232223E221A220A320A320641FA520A520A620E621FFFF'
FW1D3 anop
dc h'27236624A525A425A32562242123E121A120621F631F641F651F661FA720E721FFFF'
FW1D4 anop
dc h'6824A725E626E426E226A1256024E021A020611F221E241E261E671FA820E821FFFF'
FW1D5 anop
dc h'6924A825E6262428E226A0255F24DF219F20201EE21CE41CE61C281EA920E921FFFF'
FW1D6 anop
dc h'6A24E826262864292228E0265E24DE215E1F201EE21CA41BE61C281E6A1FEA21FFFF'
FW1D7 anop
dc h'AA2529286729A42A61291F289E251D235E1FDF1CA11B641AA71BE91C6A1F2B23FFFF'
FW1D8 anop
dc h'AB256A29A72AE42BA12A5E299D251C235D1FDE1C611A641A671AEA1C6B1F2C23FFFF'
FW1D9 anop
dc h'EC266A29E72B242DE12B5E29DC261B235C1F9E1B211924192719AA1B6C1F2D23FFFF'
FW1D10 anop
dc h'ED26AB2A282D642E202D9D2ADB261A231B1E9D1B2019E4172819AB1B2D1E2E23FFFF'
FW1D11 anop
dc h'2E28EC2B682E642E602EDC2B1A2819231A1E5C1AE017A416E8176C1A2E1E2F23FFFF'
FW1D12 anop
dc h'2F28EC2BA92FA42F9F2FDC2B19281823191E1C199F166415A9162C192F1E3023FFFF'
FW1D13 anop
dc h'30282D2DE930E430DF301B2D18281723181E1B195F15641569152D19301E3123FFFF'
FW1D14 anop
dc h'71296E2EE9302432DF305A2E57291623D71CDA175F1524146915EE17F11C3223FFFF'
FW1D15 anop
dc h'72296F2E2A3264331E32592E56291523D61CD9171E14E4122A14EF17F21C3323FFFF'
FW1D16 anop
dc h'B32AAF2F6A33A4345E33992F952A1423D51C9916DE12A411EA12AF16F31C3423FFFF'
FW1D17 anop
dc h'B42AF030AB34E4359D34D830942A1323D41C9816DD126410EB12B016F41C3523FFFF'
FW1D18 anop
dc h'B52A3132EB352437DD351732932A1223931B57159D116410AB117115B51B3623FFFF'
FW1D19 anop
dc h'F62B31322B3764381D371732D22B5124921B57155D10240F6B107115B61B7724FFFF'
FW1D20 anop
dc h'F62B72336C38A4395C385633D22B5024921B16141C0FE40D2C0F3214B61B7824FFFF'
FW1D21 anop
dc h'372DB334AC39E43A9C399534112D4F24911B15141C0FA40C2C0F3314B71B7924FFFF'
FW1D22 anop
dc h'382DB434EC3A243CDC3A9434102D4E24901BD412DC0DA40CEC0DF412B81B7A24FFFF'
FW1D23 anop
dc h'792EF4352D3C643D1B3CD4354F2E4D244F1AD4129B0C640BAD0CF412791A7B24FFFF'
FW1D24 anop
dc h'7A2E35376D3DA43E5B3D13374E2E4C244E1A93119B0C240AAD0CB5117A1A7C24FFFF'
FW1D25 anop
dc h'BB2F76386E3DE43F5A3D52388D2F4B244D1A92115A0BE4086E0BB6117B1A7D24FFFF'
FW1D26 anop
dc h'BC2F7638AE3E24419A3E52388C2F4A244C1A52101A0AE4082E0A76107C1A7E24FFFF'
FW1D27 anop
dc h'FD30B739EE3F6442DA3F9139CB3089250B1951101A0AA4072E0A77103D19BF25FFFF'
FW1D28 anop
dc h'FE30F83A2F41A44319

Binary file not shown.

View File

@ -0,0 +1,95 @@
// itemTitleRef
};
resource rMenuItem (MENUITEM_0000010D, $C018) {
3, // itemID -- DYA
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_0000010D // itemTitleRef
};
resource rMenuItem (3, $C018) {
4, // itemID -- DIAMOND
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
3 // itemTitleRef
};
resource rMenuItem (4, $C018) {
5, // itemID -- PYRAMID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
4 // itemTitleRef
};
resource rMenuItem (MENUITEM_0000010C, $C018) {
6, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_0000010C // itemTitleRef
};
resource rMenuItem (MENUITEM_0000010B, $C018) {
7, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_0000010B // itemTitleRef
};
resource rMenuItem (2, $C018) {
8, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
2 // itemTitleRef
};
resource rMenuItem (MENUITEM_0000010A, $C018) {
9, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_0000010A // itemTitleRef
};
resource rMenuItem (MENUITEM_00000109, $C018) {
10, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_00000109 // itemTitleRef
};
resource rMenuItem (MENUITEM_00000108, $C018) {
11, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_00000108 // itemTitleRef
};
resource rMenuItem (MENUITEM_00000110, $C018) {
12, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_00000110 // itemTitleRef
};
resource rMenuItem (MENUITEM_0000010F, $C018) {
13, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck
$8000, // itemFlag
PSTR_0000010F // itemTitleRef
};
resource rMenuItem (MENUITEM_0000010E, $C018) {
14, // itemID
"","", // itemChar, itemAltChar
NIL, // itemCheck

Binary file not shown.

View File

@ -0,0 +1,50 @@
**************************************************
* FTA/DYA Three-D T2 Module "Impulse" *
* *
* Originally by FTA. *
* Enhanced by Jim Maricondo, DYA. *
**************************************************
lst off
rel
xc
xc
mx %00
TR OFF
USE MACROS
USE MACROS2
put t2common.equ
*=================================================
* Etalon = Zoom, Pnt = Ptr, VIT = SPEED
* BOU = LOOP, Comptuer = Counter, Calculateur =
* Calculator, Moins = Minus
*-------------------------------------------------
FPSCtlID = 1
DelayPopCtlID = 2
ShapePopCtlID = 3
MaxZoomCtlID = 8
CtlLst = 1
resourceToResource = 9
* Bits of ImpulseFlag...
fFPSCounter = 1
fBigShapes = 2
* SendRequest sendHow values
stopAfterOne equ $8000
sendToAll equ 0
sendToName equ 1
sendToUserID equ 2
* NewHandle attributes
attrNoPurge equ $0000 ;Handle Attribute Bits - Not purgeable
attrBank equ $0001 ;Handle Attribute Bits - fixed bank
attrAddr equ $0002 ;Handle Attribute Bits - fixed address
attrPage equ $0004 ;Handle Attribute Bits - page aligned
attrNoSpec equ $0008 ;Handle Attribute Bits - may not use speci
attrNoCross equ $0010 ;Handle Attribute Bits - may not cross ba
attrFixed equ $4000 ;Handle Attribute Bits - not movable
attrLocked equ $

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,42 @@
#include "types.rez"
#include "t2common.rez"
// --- Flags resource
resource rT2ModuleFlags (moduleFlags) {
fFadeOut+fFadeIn+fGrafPort320+fLeavesUsableScreen, // module flags word
$01, // enabled flag (unimplemented)
$0110, // minimum T2 version required
NIL, // reserved
"Perspective" // module name
};
// --- About text resource
resource rTextForLETextBox2 (moduleMessage) {
TBLeftJust
TBBackColor TBColorF
TBForeColor TBColor1
"Perspective"
TBForeColor TBColor0
" generates random patterns, as if looking down a hallway.\n"
TBForeColor TBColor4
"Written by Nathan Mates, dedicated to Ah-Ram Kim."
};
// --- Version resource
resource rVersion (moduleVersion) {
{1,0,0,final,2}, // Version
verUS, // US Version
"T2 Perspective Module", // program's name
"By Nathan Mates.\n"
"Special Thanks to Jim Maricondo." // copyright notice
};
// --- About icon resource
resource rIcon (moduleIcon) {
$8000, // kind
$0014, // height
$0016, // widt

View File

@ -0,0 +1,88 @@
keep SNF
mcopy SNF.Macs
copy T2Common.equ
copy 18/e16.memory
SNF Start
Water equ 0
Shark equ 1
Fish equ 2
WaitHz equ 40
phb ;Store old data bank
phk
plb
phd
tsc
inc a
tcd
tsc
sta EntryStack
lda T2Message ;action code?
cmp #2
beq StartBlank
brl Setup
StartBlank anop
stz 16
stz 18 ;return w/no error
lda >$00c035
and #8 ;shadowing on?
bne NoShadow
lda #$0101 ;if so, faster draw to bank 01
dc h'cf'
NoShadow lda #$E1E1
sta ScreenBank
short M
sta TargetLoc1+3 ;bank to draw to
sta TargetLoc2+3 ;bank to draw to
sta TargetLoc3+3 ;bank to draw to
Long M
jsr Random ;update screen pallettes
NewScreen jsr WipeAllText
lda #CreateTxt
ldx #$7800+48
jsr PrintTxt
ldx #0
MakeNewCol ldy #0
CreateCol lda #0
jsr PutInField
jsr DrawIt
jsr Random ;animate screen
iny
cpy #24
blt CreateCol
inx
cpx #32
blt MakeNewCol ;do whole screen
ldx StNumFish
stx NumFish
MakeFish phx
jsr RandomXY
lda #Fish
jsr DrawIt
phx
phy ;save thru toolbox
ldx FishBreed
inx
jsr RandomX ;get a random #
inc a
ply
plx
jsr PutInField
plx
dex
bne MakeFish
ldx StNumSharks
stx NumSharks
MakeSharks phx
jsr RandomXY
l

View File

@ -0,0 +1,170 @@
string
PushWord #0 ;unsigned integer
_Int2Dec ;and convert to a string
lda TempString
ora #$2020
sta PrintSharks
lda TempString+1
ora #$2020
sta PrintSharks+1
inc Time
PushWord Time
PushLlcl #TempString
PushWord #4 ;len of string
PushWord #0 ;unsigned integer
_Int2Dec ;and convert to a string
lda TempString
ora #$2020
sta PrintTime
lda TempString+2
ora #$2020
sta PrintTime+2
lda #TextOut
ldx #$7800+16 ;centered on 192nd line on screen
PrintTxt dec a
sta Msg
Print0 anop
LoopPrint2 stx XValue
LoopPrint1 inc Msg
lda |$0000
Msg equ *-2
tay
and #$00FF
beq EndPrint
cmp #$0C
beq Change_Color
cmp #$0D
beq NewLine
jsr Print_Char
bra LoopPrint1
Change_Color tya
xba
Short M
sta Color
Long M
inc Msg
bra LoopPrint1
NewLine lda #0
XValue equ *-2
clc
adc #8*$A0
tax
bra LoopPrint2
EndPrint rts
Print_Char sec
sbc #32
asl a
asl a
asl a
clc
adc #Font
sta Font_Adr
lda #8
LoopChar2 pha
phx
lda |$0000
Font_Adr equ *-2
inc Font_Adr
ldy #4
LoopChar phy
pha
ldy #0
bit #%00000010
beq No_Left
ldy #$0F
No_Left bit #%00000001
beq No_Right
tya
ora #$F0
tay
No_Right tya
Short M
and #$AA
Color equ *-1
sta >$E12000,x
Long M
inx
pla
lsr a
lsr a
ply
dey
bne LoopChar
pla
clc
adc #$A0
tax
pla
dec a
bne LoopChar2
txa
sec
sbc #8*$A0-4
tax
rts
WipeAllText ldx #$4FE
lda #0 ;kill text at bottom
WipeText sta >$E19800,x
dex
dex
bpl WipeText
rts
* Police de caracteres...
Font dc h'00000000000000000018181800180000'
dc h'003636360000000000263E263E260000'
dc h'003E1E3E383E0000002638181E260000'
dc h'00182618263800000018181800000000'
dc h'00380C0C0C380000001C3030301C0000'
dc h'0026183E182600000018187E18180000'
dc h'0000000018180C000000007E00000000'
dc h'0000000018180000006030180C060000'
dc h'007E6666667E00000018181818180000'
dc h'007E607E067E0000007E6078607E0000'
dc h'0066667E60600000007E067E607E0000'
dc h'007E067E667E0000007E6030180C0000'
dc h'007E667E667E0000007E667E60600000'
dc h'00001800180000000000180018180C00'
dc h'0030180C1830000000003E003E000000'
dc h'000C1830180C0000003E203800000018'
dc h'3F3F3F3F3F3F3F3F003C667E66660000'
dc h'003E663E663E0000007C0606067C0000'
dc h'003E6666663E0000007E063E067E0000'
dc h'007E063E06060000007C0606663C0000'
dc h'0066667E66660000007E1818187E0000'
dc h'00606060667E00000066361E36660000'
dc h'00060606067E000000667E7E66660000'
dc h'00666E7E76660000003C6666663C0000'
dc h'003E663E06060000003C6666366C0000'
dc h'003E661E36660000007C063C603E0000'
dc h'007E18181818000000666666663C0000'
dc h'006666663C180000006666667E660000'
dc h'00663C183C6600000066663C18180000'
dc h'007E6018067E0000001E0606061E0000'
dc h'0038183E183E0000003C3030303C0000'
dc h'00183E18181800000018063E00000000'
dc h'00000000000000000000000000000000'
*
*
Setup anop
*
* Handle the Setup and all. Entry: Accum=T2Message
*
*
cmp #MakeT2
beq doMake
cmp #HitT2
jeq doHit
* cmp #KillT2
* jeq doKill
cmp #SaveT2
jeq doSave
cmp #LoadSetupT2
jeq doLoadSetup
* cmp #UnloadSetupT

View File

@ -0,0 +1,138 @@
tCurResourceFile
PushWord RezFileID
_SetCurResourceFile
jsr load_setup
noShapes1 anop
MoveOn _SetCurResourceFile
lda FishBreed
clc
adc #299
pha
LongResult
PushLong WindPtr
PushLong #2 ;FishBreed Popup
_GetCtlHandleFromID
_SetCtlValue
lda SharkBreed
clc
adc #299
pha
LongResult
PushLong WindPtr
PushLong #4 ;SharkBreed Popup
_GetCtlHandleFromID
_SetCtlValue
lda Starve
clc
adc #299
pha
LongResult
PushLong WindPtr
PushLong #5 ;Starve Popup
_GetCtlHandleFromID
_SetCtlValue
lda Prefs
pha
LongResult
PushLong WindPtr
PushLong #6 ;Cycle Colors Popup
_GetCtlHandleFromID
_SetCtlValue
LongResult
PushWord StNumFish
PushWord #20 ;divisor
_UDivide ;divide
pla ;Dividend
plx ;modulo result
clc
adc #299
pha
LongResult
PushLong WindPtr
PushLong #1 ;NumFish Popup
_GetCtlHandleFromID
_SetCtlValue
LongResult
PushWord StNumSharks
PushWord #10 ;divisor
_UDivide ;divide
pla ;Dividend
plx ;modulo result
clc
adc #299
pha
LongResult
PushLong WindPtr
PushLong #3 ;NumSharks Popup
_GetCtlHandleFromID
_SetCtlValue
lda #11
sta T2Result
brl Bye
*=================================================
Prefs ds 2
temp ds 4
rSNFStuff str 'SNF Preferences'
* Format: Upper byte=clock type (ignored for now)
* 0=DClock; 1= AClock; 2=Random on Entry
* Lower byte=Refreshes between movement...
*=================================================
doLoadSetup anop
jsr load_setup
brl Bye
load_setup anop
* Load the fps/maxzoom/delay resource.
LongResult
Pushword #$1012 ;type: rByteArray
PushLong #rSNFStuff
_RMLoadNamedResource
bcc HaveFishBreed1
plx
plx ;setup not saved yet...
lda #$3 ;Random Clock Type; Normal Speed
sta FishBreed
lda #380 ;Random Clock Type; Normal Speed
sta StNumFish
lda #30 ;Random Clock Type; Normal Speed
sta StNumSharks
lda #4 ;Random Clock Type; Normal Speed
sta SharkBreed
lda #3 ;Random Clock Type; Normal Speed
sta Starve
lda #1 ;Random Clock Type; Normal Speed
sta Prefs
bra DoFishNum
HaveFishBreed1 anop
jsr makePdp
lda [3]
sta FishBreed
ldy #2
lda [3],y
sta StNumFish
iny
iny
lda [3],y
sta StNumSharks
iny
iny
lda

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,198 @@
eID ds 2
KeyLeft ds 2
KeyRight ds 2
KeyStop ds 2
ControlType ds 2
BeforeGame ds 2
LastCompPos ds 2
LastKey ds 2
CompTime ds 2
BOTTEXT STR 'Press Caps Lock down to start game'
BotText2 str 'Let Caps Lock up to quit'
NewTime ds 2
makePdp anop
TheHandle equ 3
plx ; yank return address
phd
tsc
tcd
ldy #2
lda [TheHandle],y
tay
lda [TheHandle]
sta <TheHandle
sty <TheHandle+2
phx ; push back return address
rts
CapsMode ds 2
ReadControl Short M
LDA >$00C025
Long M
AND #4 ;check caps bit
beq CapsUp ;if up, let the computer at it
lda CapsMode
bne IgnoreCaps
lda MvnLoc+1
pha
plb ;screen bank
ldx #$63e
ClearMessage stz $96c0,x
dex
dex
bpl ClearMessage
plb ;local bank
PUSHWORD #$F
_SETSOLIDPENPAT
PUSHWORD #75
PUSHWORD #197
_MOVETO
PUSHLONG #BOTTEXT2
_DRAWSTRING
mov #1,CapsMode
lda #$787
sta MsgColor
IgnoreCaps brl IsGame
CapsUp lda CapsMode
stz CapsMode
beq ComputerFly
lda MvnLoc+1
pha
plb ;screen bank
ldx #$63e
ClearMessage2 stz $96c0,x
dex
dex
bpl ClearMessage2
plb ;local bank
PUSHWORD #$F
_SETSOLIDPENPAT
PUSHWORD #36
PUSHWORD #197
_MOVETO
PUSHLlcl #BOTTEXT
_DRAWSTRING
mov #$FFF,MsgColor
ComputerFly anop
lda maxLeft
clc
adc MinRight ;get average of 2
lsr a ;cut in half...
sec
sbc XPosn ;compare to where ship is
beq CompCenter
bpl CompRight
bmi CompLeft
CompCenter anop ;can get here from any position
stz LastCompPos
ldx #127 ;no change
rts
CompLeft CMP #-4
BGE COMPCENTER
lda LastCompPos
ldy #-1
sty LastCompPos
dec a
bpl CompCenter ;have to stay still first
ldx #50
rts
CompRight CMP #4
BLT COMPCENTER
lda LastCompPos
ldy #1
sty LastCompPos
tay ;test a-reg
bmi CompCenter ;go center before going right
ldx #200 ;right
rts
Joystick php
sei
lda >$00c070 ;trigger paddles
ldy #0
ldx #3
PRTime dex
bne PRTime ;timing loop for first count
PRead2 lda >$00c064
and #$8080 ;check high bits of each
beq PRXit
cmp #$80 ;see if only x only is active
bmi PRBoth ;> no, do both
beq PRXOnly
PRYOnly iny
bpl PRYMore ;(just for timing)
bmi PRXit
PRYmore bra PRead2 ;go back for more
PRXOnly inx
bmi PRXit
bra PRead2
PRBoth inx
iny
nop ;match timing of others
bpl PRead2
PRXit plp
rts
IsGame anop
lda ControlType
dec a
beq Joystick
dec a
bne ComputerFly ;let the computer fly it...
* WordResult
* PushWord NewTime
* PushWord #$0004 ;1/2 tick
* _WaitUntil
* PullWord NewTime
ldx #500
Short M
lda >$E1c036
tay
and #$80
sta HSFlag
tya ;original value
and #$7F ;force system speed slow, now
sta >$E1C036 ;force system fast now!
KeyWait lda >$e0c000
bmi GetKey2
dex
bpl KeyWait
GetKey2 lda >$E1c036
ora HSFlag
sta >$E1c036
lda >$e0c025
and #%1000
tay
lda >$e0c000
sta >$e0c010 ;clear kbd strobe
Long i,M
cmp #$80
blt KeepAlong ;ignore if no key down
cmp #$61 ;lower case?
blt ChkKey1
and #$5F ;mask to upper case
ChkKey1 cmp KeyLeft
beq DoKeyLeft
cmp KeyStop
beq DoKeyStop
cmp KeyRight
beq DoKeyRight
KeepAlong ldx LastKey
rts
DoKeyLeft tya ;check y-reg.
and #$ff ;only low bits also
beq MedLeft
lda EvenByte ;go space & half on repeat...
eor #1
sta EvenByte
beq HdLeft
dec XPosn
HdLeft ldx #0

View File

@ -0,0 +1,129 @@
Byte ;go space-and-half right
eor #1
sta EvenByte
bne HdRight
inc XPosn
HdRight ldx #255
dc h'cf'
MedRight ldx #220
stx LastKey
rts
MsgColor ds 2
HSFlag ds 2
End
A #0
]lp SEC
SBC Buf_VAL
STA ]3,X
DEX
DEX
BPL ]lp
Here EOM
Add MAC
CPY ]1
BEQ Same_Signe0
SEC
SBC ]2
DEY
BEQ First_Negatif0
BCC Inverse_Value0
BRA Cont_Calc0
Inverse_Value0 EOR #$FFFF
INC
INC ]3
BRA Cont_Calc0
First_Negatif0 BCS Cont_Calc0
EOR #$FFFF
INC ; Change le signe
STZ ]3
BRA Cont_Calc0
Same_Signe0 CLC
ADC1.0.1b4
// v1.6 - 1/28/93 - Revised for _NEW_ rT2ModuleFlags format. - T2 v1.0.1f1
// v1.7 - 2/7/93 - "f" flag word names, $D001 - T2 v1.0.1f2
// v1.7a - 2/16/93 - $1000 -> $D001 - T2 v1.0.1f2
// v1.8 - 03/02/93 - new moduleflagword bits - T2 v1.1f3
// =====================================================
// =====================================================
// Module resource IDs.
// =====================================================
/***** Required *****/
// #define moduleName $00000001
#define moduleMessage $0010DD01
#define moduleIcon $0010DD01
#define moduleVersion $00000001
#define moduleFlags $00000001
/***** Added for you... *****/
#define moduleComment $00000001
#define moduleInfo $00000002
// =====================================================
// --- custom resource type defines
// =====================================================
#define rT2ModuleFlags $D001
#define rT2ExtSetup1 $1001
#define rT2ModuleWord $1002
// =====================================================
// Defined bits of T2ModuleFlags module flag word.
// =====================================================
#define fSetup $0001
#define fFadeOut $0002
#define fFadeIn $0004
#define fGrafPort320 $0008
#define fGrafPort640 $0010
#define fLoadSetupBoot $0020
#define fLoadSetupBlank $0040
#define fOpenRForkWriteEnabled $0080
// #define fNoBlackScreen $0100
#define fReqUsableScreen $0200
#define fLeavesUsableScreen $0400
#define fForeground $0000
#define fBackground $4000
#define fInternal $8000
// =====================================================
// Custom resource type defines.
// =====================================================
type rT2ModuleFlags {
byte = $01; /* module flags version - use 1 */
hex unsigned word; /* module flags word */
byte; /* enabled flag (unimplemented) - use 1 now */
hex unsigned word; /* minimum T2 version required */
hex unsigned word; /* reserved */
pstring[25]; /* module name */
};
type rT2ModuleWord {
unsigned word;
};
// =====================================================
// Current common comments.
// =====================================================
resource rComment (ModuleComment) {
"Twilight II\$AA Module.\n"
"Part of DYA\$D5s Twilight II Project.\n"
"\n"
"Twilight II, the ultimate screen saver for your Apple IIgs! Competition? "
" Ha!\n"
"\n"
"Twilight II: A quality DYA product, from DigiSoft Innovations. "
"Support the II: do not distribute any parts of Twilight II! "
"II Infinitum!"
"\n"
"Dedicated to Ah-Ram Kim"
// "v5a"
};
resource rComment (moduleInfo) {
"This is a Twilight II\$AA screen saver module. "
"Place in the \$D2Twilight\$D3 module folder (located in the same directory "
"as the Twilight II control panel) and access via Twilight II!\n"
"For more information, refer to the Twilight II manual."
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,704 @@
#include "types.rez"
#include "t2common.rez"
// --- Flags resource
resource rT2ModuleFlags (moduleFlags) {
fSetup+fFadeOut+fFadeIn+fGrafPort320, // module flags word
$01, // enabled flag (unimplemented)
$0110, // minimum T2 version required
NIL, // reserved
"Tunnel Game" // module name
};
// --- About text resource
resource rTextForLETextBox2 (moduleMessage) {
TBLeftJust
TBBackColor TBColorF
TBForeColor TBColor1
"Tunnel Game"
TBForeColor TBColor0
". Maneuver through the tunnels without hitting the walls.\n"
TBForeColor TBColor4
"Written by Nathan Mates, dedicated to Ah-Ram Kim."
};
// --- Version resource
resource rVersion (moduleVersion) {
{1,0,0,final,2}, // Version
verUS, // US Version
"T2 Tunnel Game Module", // program's name
"By Nathan Mates.\n"
"Special Thanks to Jim Maricondo." // copyright notice
};
// --- About icon resource
resource rIcon (moduleIcon) {
$8000, // kind
$0014, // height
$0016, // width
$"0000000000000000000000"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0F0000D00003000D0000F0"
$"0F00000D0033300D0000F0"
$"0F00000D00030000D000F0"
$"0F00000D00000000D000F0"
$"0F0000D00000000D0000F0"
$"0F000D00000000D00000F0"
$"0F0000D00000000D0000F0"
$"0F0000D0000000D00000F0"
$"0F000D00000000D00000F0"
$"0F0000D0000000D00000F0"
$"0FFFFFFFFFFFFFFFFAFFF0"
$"0000000000000000000000"
$"F0FFFFFFFFFFFFFFFFFF0F"
$"F0FFFFFFFFFFFFFFFFFF0F"
$"F0FF4AFFFFFFFFFFFFFF0F"
$"F0CCCCCCCCCCCCCCCCCC0F"
$"F0FFFFFFFFFFFFFFFAFF0F"
$"F00000000000000000000F",
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFF"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0"
$"0FFFFFFFFFFFFFFFFFFFF0";
};
resource rControlList (0x00000001) {{
0x00000001, /* control resource id */
0x00000004, /* control resource id */
0x00000003, /* control resource id */
0x00000002, /* control resource id */
0x00000005, /* control resource id */
0x00000006, /* control resource id */
0x00000007, /* control resource id */
0x00000008, /* control resource id */
0x00000009, /* control resource id */
10,
11
};
};
resource rControlTemplate (0x00000001) {
0x00000001, /* control id */
{0x0033,0x005B,0x000,0x000}, /* control rectangle */
PopUpControl{{ /* control type */
0x0000, /* flags */
0x1002+fDrawPopDownIcon, /* more flags */
0, /* ref con */
0, /* title width */
0x00000002, /* menu reference */
0x012C, /* inital value */
0x00000000 /* color table id */
}};
};
resource rMenu (0x00000002) {
0x001E, /* id of menu */
RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
0x00000002, /* id of title string */
{
0x0000000A, /* item reference */
0x0000000B, /* item reference */
0x0000000C, /* item reference */
};};
resource rPString (0x00000002) {
"Control: "};
resource rMenuItem (0x0000000A) {
0x012C, /* item id number */
"","", /* hot key*/
0, /* check character */
RefIsResource*ItemTitleRefShift+fXOR,
0x0000000A, /* title reference */
};
resource rPString (0x0000000A) {
"Joystick"};
resource rMenuItem (0x0000000B) {
0x012D, /* item id number */
"","", /* hot key*/
0, /* check character */
RefIsResource*ItemTitleRefShift+fXOR,
0x0000000B, /* title reference */
};
resource rPString (0x0000000B) {
"Keyboard"};
resource rMenuItem (0x0000000C) {
0x012E, /* item id number */
"","", /* hot key*/
0, /* check character */
RefIsResource*ItemTitleRefShift+fXOR,
0x0000000C, /* title reference */
};
resource rPString (0x0000000C) {
"Computer"};
resource rControlTemplate (0x00000002) {
0x00000002, /* control id */
{0x004B,0x007C,0x005C,0x009C}, /* control rectangle */
editLineControl{{ /* control type */
0x0000, /* flags */
0x7002, /* more flags */
0, /* ref con */
0x0001, /* maximum length */
0x00000003 /* title reference */
}};
};
resource rPString (0x00000003) {
"J"};
resource rControlTemplate (0x00000003) {
0x00000003, /* control id */
{0x004B,0x00CC,0x005C,0x00EC}, /* control rectangle */
editLineControl{{ /* control type */
0x0000, /* flags */
0x7002, /* more flags */
0, /* ref con */
0x0001, /* maximum length */
0x00000004 /* title reference */
}};
};
resource rPString (0x00000004) {
"K"};
resource rControlTemplate (0x00000004) {
0x00000004, /* control id */
{0x004B,0x0112,0x005C,0x0133}, /* control rectangle */
editLineControl{{ /* control type */
0x0000, /* flags */
0x7002, /* more flags */
0, /* ref con */
0x0001, /* maximum length */
0x00000005 /* title reference */
}};
};
resource rPString (0x00000005) {
"L"};
resource rControlTemplate (0x00000005) {
0x00000005, /* control id */
{0x0041,0x007C,0x004D,0x00A6}, /* control rectangle */
statTextControl{{ /* control type */
0x0000, /* flags */
0x1002, /* more flags */
0, /* ref con */
0x00000006, /* text reference */
0x0004, /* text length */
0x0008 /* text justification */
}};
};
resource rTextForLETextBox2 (0x00000006){
"Left"
};
resource rControlTemplate (0x00000006) {
0x00000006, /* control id */
{0x0041,0x00CC,0x004D,0x00F4}, /* control rectangle */
statTextControl{{ /* control type */
0x0000, /* flags */
0x1002, /* more flags */
0, /* ref con */
0x00000007, /* text reference */
0x0004, /* text length */
0x0008 /* text justification */
}};
};
resource rTextForLETextBox2 (0x00000007){
"Stop"
};
resource rControlTemplate (0x00000007) {
0x00000007, /* control id */
{0x0041,0x0112,0x004D,0x0141}, /* control rectangle */
statTextControl{{ /* control type */
0x0000, /* flags */
0x1002, /* more flags */
0, /* ref con */
0x00000008, /* text reference */
0x0005, /* text length */
0x0008 /* text justification */
}};
};
resource rTextForLETextBox2 (0x00000008){
"Right"
};
resource rControlTemplate (0x00000008) {
0x00000008, /* control id */
{0x004B,0x002C,0x0057,0x0059}, /* control rectangle */
statTextControl{{ /* control type */
0x0000, /* flags */
0x1002, /* more flags */
0, /* ref con */
0x00000009, /* text reference */
0x0005, /* text length */
0x0008 /* text justification */
}};
};
resource rTextForLETextBox2 (0x00000009){
"Keys:"
};
resource rControlTemplate (0x00000009) {
0x00000009, /* control id */
{0x005F,0x0004,0x007C,0x015C}, /* control rectangle */
statTextControl{{ /* control type */
0x0000, /* flags */
0x1002, /* more flags */
0, /* ref con */
0x0000000A, /* text reference */
0x0074, /* text length */
0x0008 /* text justification */
}};
};
resource rTextForLETextBox2 (0x0000000A){
"Note: Caps Lock ""Lock"" must be enabled\n"
"to play this game. Hold down option or\n"
"open-apple to slow game down to slow speeds."
};
resource rControlTemplate (10) {
10, // ID
{ 25, 84, 48,130}, // rect
iconButtonControl {{
$000C, // flag
$1020, // moreFlags
$00000000, // refCon
moduleIcon, // iconRef
0, // titleRef
0, // colorTableRef
$0000 // displayMode
}};
};
resource rControlTemplate (11) {
11, // ID
{ 32,142, 42,250}, // rect
statTextControl {{
$0000, // flag
$1002, // moreFlags
$00000000, // refCon
1 //txtref...
}};
};
resource rTextForLETextBox2 (1) {
"Tunnel Game Options"
};
p #$9d00+1
bcs No_Store
STA [Ptr_Clear]
STA [Ptr_Tsb]
STA [Ptr_Tsb2]
INC Ptr_Clear
INC Ptr_Clear
INC Ptr_Clear
INC Ptr_Tsb
INC Ptr_Tsb
INC Ptr_Tsb
INC Ptr_Tsb2
INC Ptr_Tsb2
INC Ptr_Tsb2
No_Store CLC
EOM
EOM
Plot0 MAC
txa
bmi ]bb
cmp #$7d00
bcs ]bb
LDAL $012000,X
HEX 091F10
STAL $012000,X
]bb TXA
ADC #$20
dc h'E96221441111EE66EE11114412269E000000'
dc h'EE221444411EE6006EE114444122EE000000'
dc h'E9214AF7A41E650056E14A7FA4129E000000'
dc h'EF214A7FA41E665566E14AF7A412FE000000'
dc h'E9211444411EE6666EE1144441229E000000'
dc h'EE6EE2441111EE66EE1111441EE6EE000000'
dc h'E9656EE211111E66E111112EE6569E000000'
dc h'EE65056EE22111EE11122EE65056EE000000'
dc h'E60000005EE21E66E12EE50000006E000000'
dc h'6000000006EE2E99E2EE6000000006000000'
dc h'00000000006EE2FF2EE60000000000000000'
dc h'00000000000062EE26000000000000000000'
dc h'000000000000056650000000000000000000'
TableLen equ *-EvenBytes-2
oddBytes anop
dc h'000000000000665995660000000000000000'
dc h'00000000056E22E99E22E650000000000000'
dc h'06000056EE22111EE11122EE650000600000'
dc h'0E606EE2211111E66E1111122EE606E00000'
dc h'0E96221441111EE66EE11114412269E00000'
dc h'0EE2214AA411EE6006EE114AA4122EE00000'
dc h'0E921447F441E650056E144F744129E00000'
dc h'0EF2144F7441E665566E1447F4412FE00000'
dc h'0E92114AA411EE6666EE114AA41229E00000'
dc h'0EE6EE2441111EE66EE1111441EE6EE00000'
dc h'0E9656EE211111E66E111112EE6569E00000'
dc h'0EE65056EE22111EE11122EE65056EE00000'
dc h'0E60000005EE21E66E12EE50000006E00000'
dc h'06000000006EE2E99E2EE600000000600000'
dc h'000000000006EE2FF2EE6000000000000000'
dc h'000000000000062EE2600000000000000000'
dc h'000000000000005665000000000000000000'
*
*
Setup anop
*
* Handle the Setup and all. Entry: Accum=T2Message
*
*
cmp #MakeT2
beq doMake
cmp #HitT2
jeq doHit
* cmp #KillT2
* jeq doKill
cmp #SaveT2
jeq doSave
cmp #LoadSetupT2
jeq doLoadSetup
* cmp #UnloadSetupT2
* jeq doUnloadSetup
brl Done
*=================================================
*
* Create all the buttons in the window
*
doMake anop
lda T2data1+2
sta WindPtr+2
lda T2data1
sta WindPtr
lda T2data2
sta RezFileID
WordResult
_MMStartUp
PullWord MyID
LongResult
PushLong WindPtr
PushWord #9 ;resource 2 resource
PushLong #1 ;resource item ID=1
_NewControl2
plx
plx ;chuck result out
* Make sure we're dealing with the T2pref file.
WordResult
_GetCurResourceFile
PushWord RezFileID
_SetCurResourceFile
jsr load_setup
noShapes1 anop
MoveOn _SetCurResourceFile
lda ControlType
clc
adc #299
pha
LongResult
PushLong WindPtr
PushLong #1 ;Control Popup
_GetCtlHandleFromID
_SetCtlValue
mov KeyLeft,StrChar
PushLong WindPtr
PushLong #2 ;itemId
PushLong #StrXfer
_SetLETextByID
mov KeyStop,StrChar
PushLong WindPtr
PushLong #3 ;itemId
PushLong #StrXfer
_SetLETextByID
mov KeyRight,StrChar
PushLong WindPtr
PushLong #4 ;itunset exit
Set AuxType $4004
Set KeepType $BC
Set A */system/cdevs/twilight
Echo Assembling {1}
if {1} == "Clocks"
compile Clocks.Rez Keep=Clocks
delete {a}/Clocks
copy Clocks {a}
else if {1} == "AClock"
compile AClock.Rez Keep=AClock
delete {a}/Aclock
copy AClock {a}
else if {1} == "SNF"
compile SNF.Rez Keep=SNF
delete {a}/SNF
copy SNF {a}
else if {1} == "Boxes"
derez Modern.Art -o boxes2.rez 13/rinclude/types.rez */orca/twilight/t2common.rez
else if {1} == "Tunnel"
compile TunnelGame.Rez Keep=TunnelGame
delete {a}/TunnelGame
copy TunnelGame {a}
else if {1} == "Persp"
compile Perspective.Rez Keep=Perspective
delete {a}/Perspective
copy Perspective {a}
else if {1} == "Fire"
compile Fireworks.Rez Keep=MiniFireworks
delete {a}/MiniFireworks
copy MiniFireworks {a}
else if {1} == "LedMsg"
compile LedMsg.Rez Keep=Led.Msg
delete {a}/Led.Msg
copy Led.Msg {a}
else
Echo Known programs:
Echo " Aclock - AClock.Asm"
Echo " Boxes - Boxes.Asm"
Echo " Comedy - Comedian.Asm"
Echo " DClock - DClock.Asm"
Echo " Fire - Fireworks.Asm"
Echo " LedMsg - LedMsg.Asm"
Echo " MSlides - MSlides.Asm"
Echo " Persp - Perspective.Asm"
Echo " Plasma - Plasma.Asm"
Echo " SNF - SNF.Asm"
Echo " Tunnel - TunnelGame.Asm"
end
_GetCtlHandleFromID
&lab ldx #$3010
jsl $E10000
MEND
MACRO
&lab _TEGetText
&lab ldx #$0C22
jsl $E10000
MEND
MACRO
&lab _TECompactRecord
&lab ldx #$2822
jsl $E10000
MEND
xxx029.gif_9wwv_9HANGESÐÒ¸žjP6øÚ¸®Œb8;itemId
PushLong #StrXfer
_GetLETextByID
lda StrChar
cmp #$61 ;lower case?
blt OkStop1
and #$5F
OkStop1 sta KeyStop
PushLong WindPtr
PushLong #4 ;itemId
PushLong #StrXfer
_GetLETextByID
lda StrChar
cmp #$61 ;lower case?
blt OkRight1
and #$5F
OkRight1 sta KeyRight
WordResult
LongResult
PushLong WindPtr
PushLong #1 ;ControlType Popup
_GetCtlHandleFromID
_GetCtlValue
pla
sec
sbc #299
sta ControlType
* Now we're ready to save the data...
LongResult
PushWord #$1012
PushLong #rTunnelPrefs
_RMLoadNamedResource
jcc HaveKeyLeft
plx
plx
LongResult
PushLong #8 ;8-byte record
WordResult
_GetCurResourceApp
PushWord #attrNoCross+attrNoSpec
phd
phd
_NewHandle
lda 1,s
sta temp
lda 1+2,s
sta temp+2
jsr StorePrefs
PushLong temp ; handle
PushWord #attrNoSpec+attrNoCross ; attr
PushWord #$1012 ; rtype
LongResult
PushWord #$FFFF
PushWord #$1012
_UniqueResourceID
lda 1,s
sta temp
lda 1+2,s
sta temp+2
_AddResource
PushWord #$1012 ;rType
PushLong temp ;rID
PushLong #rTunnelPrefs ;ptr to name str
_RMSetResourceName
bra createdFB
HaveKeyLeft anop
jsr StorePrefs
PushWord #TRUE ; changeflag: true
PushWord #$1012 ; rtype
LongResult
PushWord #$1012
PushLong #rTunnelPrefs
PushLong #Temp ;don't care about filenum, but toolbox does
_RMFindNamedResource ;get it
_MarkResourceChange
createdFB anop
PushWord RezFileID
_UpdateResourceFile
_SetCurResourceFile
brl Bye
*=================================================
* Hit
*
* handle item hits
doHit anop
stz T2Result+2
stz T2Result
lda T2data2+2 ;ctlID hi word must be zero
bne nothingHit
lda T2data2 ;get ctlID
cmp #5
blt Enable
nothingHit brl Bye
enable lda #TRUE
sta T2Result
bra nothingHit
StorePrefs anop
PullWord Temp2
jsr makePdp
lda KeyLeft
sta [3]
ldy #2
lda KeyStop
sta [3],y
iny
iny ;now 4
lda KeyRight
sta [3],y
iny
iny ;now 6
lda ControlType
sta [3],y
killLdp
PushWord Temp2
rts
Temp2 ds 2
MyID ds 2
WindPtr ds 4
RezFileID ds 2
KeyL¤
·0@ BOXES K« ;[;<3B>뇠¥Éð‚—dd­ë‡´ª)ÿ<00>뇢Šë)<00>뇤Š)€ð,â ¯5À)Щͩá<C2A9>ë‡ã<00>6H«­Àû­À0û ¢þ}ž ÊÊùK«Â0K«¢("áHH¢%"ᢇ"á­ë‡¢ª)Щ>Ï©ž<00>뇨Š)ЩÆÏ©b<00>뇪ZH¢†"áhHÉÌ °)Hâ ¯4Àª)ð<01> hhH)€H¢."áhëHH¢7"áh¨)ª˜JJJJŸžáH¢†"áhHHHH­ë‡¨ "áhh<68>ë<>hëHHH­ë‡¨ JH¢ "áhh<68>뇒†"áhHHHH­ë‡ª "áhh<68>뇔hëHHH­ë‡ª JH¢ "áhh<68>뇖­ë‡¢Ð ­ë‡”<01>뇘‡–<01>뇘<00>­ë<><01>뇘<00>‡’<01>뇘<00> ë‡`×:Ð8­ë‡”<01>뇘‡–<01>뇘<00>© 8íë<><01>뇘<00>8í뇒<01>뇘<00> ë‡`© <><01>뇘<00>‡’<01>뇘<00> ë‡`‚œ:Ð8­ë<><01>뇘<00>‡’<01>뇘<00>©d8í뇔<01>뇘<00>8í뇖<01>뇘 ë‡`©d‡”<01>뇘<00>‡’<01>뇘<00> ë‡`a©d8í뇔<01>뇘<00>8í뇖<01>뇘© 8íë<><01>뇘<00>8í뇒<01>뇘<00> ë‡`©d‡”<01>뇘<00>‡’<01>뇘<00> ë‡`© <><01>뇘<00>‡’<01>뇘<00> ë‡`©d8í뇔<01>뇘<00>8í뇖<01>뇘 ë‡`§
Эë +úzhhhhhZÚ«kH¢"áh-ë¤
:0ñ:0ðêôë˜ ¢T"á`‹‹ô뇘¢Y"á`ñ#ÉðÉÐÝÉÐVÉÐíÿ¥ <EFBFBD>ë±<EFBFBD>¥
<EFBFBD>ë±¥<EFBFBD>ëµ
H¢"áh<C3A1>뇯HH­ë‡±<00>H­ë‡±ôô¢1"áúúH¢"á­ë‡µ"á ë¼¢"á­ë‡´ ë)i<>HHH­ë‡±<00>H­ë‡±ô¢0"á¢"á­ë‡´ )ÿi,HHH­ë‡±<00>H­ë‡±ô¢0"á¢"á­ë´
)**HHH­ë±<EFBFBD>H­ë±ô¢0"á¢"á©­þñ
Boxes: Prefsñ ë¼ þHHôôë§<EFBFBD>ðÿÿÿô맢,"á<EFBFBD>
úú©ƒ<EFBFBD>ë´< ;[ ·¨§§<03>뇴+hhôôHHôô뇧<00>ðÿÿÿô뇧ô뇣<00>ðÿÿÿô뇣¢*"á¢"á`H¢"á­ë‡µ "áHHH­ë‡±<00>H­ë‡±ô¢0"á¢"áh8é,<01>뇴HHH­ë‡±<00>H­ë‡±ô¢0"á¢"áh8é<38>ë
ë´<EFBFBD>ë´HHH­ë±<EFBFBD>H­ë±ô¢0"á¢"á ­ë´ <EFBFBD>ë´HHôôë§<EFBFBD>ðÿÿÿôë§-¢,"á°‚‡úúHHôô"áô ¢ "á£<01>뇣£<03>뇣<00> ;[ ·¨§­ë‡´+hh­ë‡£<00>H­ë‡£ôHHôÿÿô¢"á£<EFBFBD>룣<EFBFBD>ë£<EFBFBD> ¢ "áô­ë‡£<00>H­ë‡£Hô뇧<00>ðÿÿÿô뇧¢-"á< ;[ ·¨§­ë‡´+hhôôHHôô뇧<00>ðÿÿÿô뇧ô뇣<00>ðÿÿÿô뇣¢*"á¢"á­ë‡µ+H¢
"á¢"áºüdd¥Ð¥É<EFBFBD>¨ü©ö ldx #$2A1E
jsl $E10000
MEND
MACRO
&lab _RMLoadNamedResource
&lab ldx #$2C1E
jsl $E10000
MEND
MACRO
&lab _RMSetResourceName
&lab ldx #$2D1E
jsl $E10000
MEND
u üro w üas h ¼ere.HT¨žü©t  L / ©- K  C *ÿNupxCúþ4 f˜@WÈÿôUO©2 Dn¢0<©ð¡F(Hžü/<INIT?<© $_ <¥&H0<H"R0ÙQÈÿü K0<©ð G KÐüŠ Œ KÐü0üB ¸¨ùN mFo space & half on repeat...
eor #1
sta EvenByte
beq HdLeft
dec XPosn
HdLeft ldx #0 ;hard left
dc h'cf'
MedLeft ldx #50
rts
DoKeyStop ldx #127
rts
DoKeyRight tya ;check repeat flag
and #$ff ;only low bits also
beq MedRight
lda EvenByte ;go space-and-half right
eor #1
sta EvenByte
bne HdRight
inc XPosn
HdRight ldx #255
dc h'cf'
MedRight ldx #220
rts
MsgColor ds 2
End

Binary file not shown.

View File

@ -0,0 +1,7 @@
#úù$3ùúõøù4Lúõøù#úù$3ù4CúõøùMeúõøù4LúõøùMeúõøù4BúùCLùMVúùWeúõøùúùALúù)2úõøùúùALúõøù4Lúù)3úõøùúùZeúù)2úõøùúùZeúõøùMeúù)3úõøù#úù$3ùM\úõøù#úù$(ùMQúùReúõßå!%#$#$#$###ã!ã!ã!£ ¤ ¤ ¤ ¥ å!å!ÿÿ&#%#e$d$c$##"#â!¢ £ £ d¥ ¥ ¦ æ!ÿÿ'#f$¥%¤%£%b$!#á!¡ bcdef§ ç!ÿÿh$§%æ&ä&â&¡%`$à!  a"$&g¨ è!ÿÿi$¨%æ&$(â& %_$ß!Ÿ âäæ(© é!ÿÿj$è&&(d)"(à&^$Þ!^ â¤æ(jê!ÿÿª%)(g)¤*a)(ž%#^ßß¡d§éj+#ÿÿ«%j)§*ä+¡*^)<29>%#]Þadgêk,#ÿÿì&j)ç+$-á+^)Ü&#\ž!$'ªl-#ÿÿí&«*(-d. -<2D>*Û&#<1E> ä(«-.#ÿÿ.(ì+h.d.`.Ü+(#\à¤èl./#ÿÿ/(ì+©/¤/Ÿ/Ü+(#Ÿd©,/0#ÿÿ0(--é0ä0ß0-(#_di-01#ÿÿq)n.ßé0$2ß0Z.W)#×Ú_$iîñ2#ÿÿr)o.*2d32Y.V)Ùä*ïò3#ÿÿ³*¯/j3¤4^3™/•*Þ¤ê¯ó4#ÿÿ´*ð0«4ä5<C3A4>4Ø0”*˜Ýdë°ô5#ÿÿµ*12ë5$7Ý52“*#“W<15>d«qµ6#ÿÿö+12+7d872Ò+Q$W]$kqw$ÿÿö+r3l8¤9\8V3Ò+P$äß ,2x$ÿÿ7-³4¬9ä:œ9•4-O$¤ ,3·y$ÿÿ8-´4ì:$<Ü:”4-N$<24>ÔÜ ¤ ì ô¸z$ÿÿy.ô5-<d=<Ô5O.M$OÔ d ­ ôy{$ÿÿz.57m=¤>[=7N.L$N $
­ µz|$ÿÿ»/v8n=ä?Z=R8<52>/K$MZ än {}$ÿÿ¼/v8®>$Aš>R8Œ/J$LR
ä.
v|~$ÿÿý0·9î?dBßÚ?9Ë0‰% Q
¤.
w=¿%ÿÿþ0ø:/A¤CAÐ:Ê0ˆ%
Ùdï8>À%ÿÿ?29<oBäDYB< 2‡% $¯9?Á%ÿÿ@2y=¯C$F™CO=2†%Ï ™$¯ù @Â%ÿÿ<C3BF>3z=ðDdGØDN=G3…%Î Xäpú AÃ%ÿÿ3»>0F¤HF<>>F3„%Í ¤0û B