You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

editor.3 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. .PAG 'KEYBOARD TABLES'
  2. KEYCOD ;KEYBOARD MODE 'DISPATCH'
  3. .WORD MODE1
  4. .WORD MODE2
  5. .WORD MODE3
  6. .WORD CONTRL ;CONTROL KEYS
  7. ;
  8. ; COTTACONNA MODE
  9. ;
  10. ;.WORD MODE1 ;PET MODE1
  11. ;.WORD MODE2 ;PET MODE2
  12. ;.WORD CCTTA3 ;DUMMY WORD
  13. ;.WORD CONTRL
  14. ;
  15. ; EXTENDED KATAKANA MODE
  16. ;
  17. ;.WORD CCTTA2 ;KATAKANA CHARACTERS
  18. ;.WORD CCTTA3 ;LIMITED GRAPHICS
  19. ;.WORD CCTTA3 ;DUMMY
  20. ;.WORD CONTRL
  21. .SKI 5
  22. .PAG 'EDITOR.3'
  23. MODE1
  24. ;DEL,3,5,7,9,+,YEN SIGN,1
  25. .BYT $14,$0D,$1D,$88,$85,$86,$87,$11
  26. ;RETURN,W,R,Y,I,P,*,LEFT ARROW
  27. .BYT $33,$57,$41,$34,$5A,$53,$45,$01
  28. ;RT CRSR,A,D,G,J,L,;,CTRL
  29. .BYT $35,$52,$44,$36,$43,$46,$54,$58
  30. ;F4,4,6,8,0,-,HOME,2
  31. .BYT $37,$59,$47,$38,$42,$48,$55,$56
  32. ;F1,Z,C,B,M,.,R.SHIFTT,SPACE
  33. .BYT $39,$49,$4A,$30,$4D,$4B,$4F,$4E
  34. ;F2,S,F,H,K,:,=,COM.KEY
  35. .BYT $2B,$50,$4C,$2D,$2E,$3A,$40,$2C
  36. ;F3,E,T,U,O,@,EXP,Q
  37. .BYT $5C,$2A,$3B,$13,$01,$3D,$5E,$2F
  38. ;CRSR DWN,L.SHIFT,X,V,N,,,/,STOP
  39. .BYT $31,$5F,$04,$32,$20,$02,$51,$03
  40. .BYT $FF ;END OF TABLE NULL
  41. .SKI3
  42. MODE2 ;SHIFT
  43. ;INS,%,',),+,YEN,!
  44. .BYT $94,$8D,$9D,$8C,$89,$8A,$8B,$91
  45. ;SRETURN,W,R,Y,I,P,*,SLEFT ARROW
  46. .BYT $23,$D7,$C1,$24,$DA,$D3,$C5,$01
  47. ;LF.CRSR,A,D,G,J,L,;,CTRL
  48. .BYT $25,$D2,$C4,$26,$C3,$C6,$D4,$D8
  49. ;,$,&,(, ,"
  50. .BYT $27,$D9,$C7,$28,$C2,$C8,$D5,$D6
  51. ;F5,Z,C,B,M,.,R.SHIFT,SSPACE
  52. .BYT $29,$C9,$CA,$30,$CD,$CB,$CF,$CE
  53. ;F6,S,F,H,K,:,=,SCOM.KEY
  54. .BYT $DB,$D0,$CC,$DD,$3E,$5B,$BA,$3C
  55. ;F7,E,T,U,O,@,PI,G
  56. .BYT $A9,$C0,$5D,$93,$01,$3D,$DE,$3F
  57. ;CRSR DWN,L.SHIFT,X,V,N,,,/,RUN
  58. .BYT $21,$5F,$04,$22,$A0,$02,$D1,$83
  59. .BYT $FF ;END OF TABLE NULL
  60. ;
  61. MODE3 ;LEFT WINDOW GRAHPICS
  62. ;INS,C10,C12,C14,9,+,POUND SIGN,C8
  63. .BYT $94,$8D,$9D,$8C,$89,$8A,$8B,$91
  64. ;RETURN,W,R,Y,I,P,*,LFT.ARROW
  65. .BYT $96,$B3,$B0,$97,$AD,$AE,$B1,$01
  66. ;LF.CRSR,A,D,G,J,L,;,CTRL
  67. .BYT $98,$B2,$AC,$99,$BC,$BB,$A3,$BD
  68. ;F8,C11,C13,C15,0,-,HOME,C9
  69. .BYT $9A,$B7,$A5,$9B,$BF,$B4,$B8,$BE
  70. ;F2,Z,C,B,M,.,R.SHIFT,SPACE
  71. .BYT $29,$A2,$B5,$30,$A7,$A1,$B9,$AA
  72. ;F4,S,F,H,K,:,=,COM.KEY
  73. .BYT $A6,$AF,$B6,$DC,$3E,$5B,$A4,$3C
  74. ;F6,E,T,U,O,@,PI,Q
  75. .BYT $A8,$DF,$5D,$93,$01,$3D,$DE,$3F
  76. ;CRSR.UP,L.SHIFT,X,V,N,,,/,STOP
  77. .BYT $81,$5F,$04,$95,$A0,$02,$AB,$83
  78. .BYT $FF ;END OF TABLE NULL
  79. ;CCTTA2 ;WAS CCTTA2 IN JAPANESE VERSION
  80. LOWER
  81. CMP #$0E ;DOES HE WANT LOWER CASE?
  82. BNE UPPER ;BRANCH IF NOT
  83. LDA VICREG+24 ;ELSE SET VIC TO POINT TO LOWER CASE
  84. ORA #$02
  85. BNE ULSET ;JMP
  86. .SKI
  87. UPPER
  88. CMP #$8E ;DOES HE WANT UPPER CASE
  89. BNE LOCK ;BRANCH IF NOT
  90. LDA VICREG+24 ;MAKE SURE VIC POINT TO UPPER/PET SET
  91. AND #$FF-$02
  92. ULSET STA VICREG+24
  93. OUTHRE JMP LOOP2
  94. .SKI
  95. LOCK
  96. CMP #8 ;DOES HE WANT TO LOCK IN THIS MODE?
  97. BNE UNLOCK ;BRANCH IF NOT
  98. LDA #$80 ;ELSE SET LOCK SWITCH ON
  99. ORA MODE ;DON'T HURT ANYTHING - JUST IN CASE
  100. BMI LEXIT
  101. .SKI
  102. UNLOCK
  103. CMP #9 ;DOES HE WANT TO UNLOCK THE KEYBOARD?
  104. BNE OUTHRE ;BRANCH IF NOT
  105. LDA #$7F ;CLEAR THE LOCK SWITCH
  106. AND MODE ;DONT HURT ANYTHING
  107. LEXIT STA MODE
  108. JMP LOOP2 ;GET OUT
  109. ;CCTTA3
  110. ;.BYT $04,$FF,$FF,$FF,$FF,$FF,$E2,$9D
  111. ;RUN-K24-K31
  112. ;.BYT $83,$01,$FF,$FF,$FF,$FF,$FF,$91
  113. ;K32-K39.F5
  114. ;.BYT $A0,$FF,$FF,$FF,$FF,$EE,$01,$89
  115. ;CO.KEY,K40-K47.F6
  116. ;.BYT $02,$FF,$FF,$FF,$FF,$E1,$FD,$8A
  117. ;K48-K55
  118. ;.BYT $FF,$FF,$FF,$FF,$FF,$B0,$E0,$8B
  119. ;K56-K63
  120. ;.BYT $F2,$F4,$F6,$FF,$F0,$ED,$93,$8C
  121. ;.BYT $FF ;END OF TABLE NULL
  122. .SKI3
  123. CONTRL
  124. ;NULL,RED,PURPLE,BLUE,RVS ,NULL,NULL,BLACK
  125. .BYT $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
  126. ;NULL, W ,REVERSE, Y , I , P ,NULL,MUSIC
  127. .BYT $1C,$17,$01,$9F,$1A,$13,$05,$FF
  128. .BYT $9C,$12,$04,$1E,$03,$06,$14,$18
  129. ;NULL,CYAN,GREEN,YELLOW,RVS OFF,NULL,NULL,WHITE
  130. .BYT $1F,$19,$07,$9E,$02,$08,$15,$16
  131. .BYT $12,$09,$0A,$92,$0D,$0B,$0F,$0E
  132. .BYT $FF,$10,$0C,$FF,$FF,$1B,$00,$FF
  133. .BYT $1C,$FF,$1D,$FF,$FF,$1F,$1E,$FF
  134. .BYT $90,$06,$FF,$05,$FF,$FF,$11,$FF
  135. .BYT $FF ;END OF TABLE NULL
  136. TVIC
  137. .BYT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;SPRITES (0-16)
  138. .BYT $9B,55,0,0,0,$08,0,$14,$0f,0,0,0,0,0,0 ;DATA (17-31)
  139. .BYT 14,6,1,2,3,4,0,1,2,3,4,5,6,7 ;32-46
  140. ;
  141. RUNTB .BYT 'LOAD',$D,'RUN',$D
  142. ;
  143. LINZ0 = VICSCN
  144. LINZ1 = LINZ0+LLEN
  145. LINZ2 = LINZ1+LLEN
  146. LINZ3 = LINZ2+LLEN
  147. LINZ4 = LINZ3+LLEN
  148. LINZ5 = LINZ4+LLEN
  149. LINZ6 = LINZ5+LLEN
  150. LINZ7 = LINZ6+LLEN
  151. LINZ8 = LINZ7+LLEN
  152. LINZ9 = LINZ8+LLEN
  153. LINZ10 = LINZ9+LLEN
  154. LINZ11 = LINZ10+LLEN
  155. LINZ12 = LINZ11+LLEN
  156. LINZ13 = LINZ12+LLEN
  157. LINZ14 = LINZ13+LLEN
  158. LINZ15 = LINZ14+LLEN
  159. LINZ16 = LINZ15+LLEN
  160. LINZ17 = LINZ16+LLEN
  161. LINZ18 = LINZ17+LLEN
  162. LINZ19 = LINZ18+LLEN
  163. LINZ20 = LINZ19+LLEN
  164. LINZ21 = LINZ20+LLEN
  165. LINZ22 = LINZ21+LLEN
  166. LINZ23 = LINZ22+LLEN
  167. LINZ24 = LINZ23+LLEN
  168. .SKIP 3
  169. ;****** SCREEN LINES LO BYTE TABLE ******
  170. ;
  171. LDTB2
  172. .BYTE <LINZ0
  173. .BYTE <LINZ1
  174. .BYTE <LINZ2
  175. .BYTE <LINZ3
  176. .BYTE <LINZ4
  177. .BYTE <LINZ5
  178. .BYTE <LINZ6
  179. .BYTE <LINZ7
  180. .BYTE <LINZ8
  181. .BYTE <LINZ9
  182. .BYTE <LINZ10
  183. .BYTE <LINZ11
  184. .BYTE <LINZ12
  185. .BYTE <LINZ13
  186. .BYTE <LINZ14
  187. .BYTE <LINZ15
  188. .BYTE <LINZ16
  189. .BYTE <LINZ17
  190. .BYTE <LINZ18
  191. .BYTE <LINZ19
  192. .BYTE <LINZ20
  193. .BYTE <LINZ21
  194. .BYTE <LINZ22
  195. .BYTE <LINZ23
  196. .BYTE <LINZ24
  197. .END
  198. ; RSR 12/08/81 MODIFY FOR VIC-40 KEYSCAN
  199. ; RSR 2/17/81 MODIFY FOR THE STINKING 6526R2 CHIP
  200. ; RSR 3/11/82 MODIFY FOR COMMODORE 64
  201. ; RSR 3/28/82 MODIFY FOR NEW PLA