Oldbitcollector

Setting up Raspbian Geany as C64 Editor

Feb 4th, 2022 (edited)
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.13 KB | None | 0 0
  1. --> Raspberry Pi/Pi400 as a C64 Development Station <--
  2. --> Setting up the Geany editor to look/feel like Turbo Macro Pro. <--
  3.  
  4. Raspbian comes with Geany, a programming IDE intended for the use
  5. of Python/C on the Raspberry Pi. With a little work, it can be
  6. "adjusted" to the look/feel of running Turbo Macro Pro on a real C64.
  7. The advantages are the ability to look up information via web/pdf
  8. while you are programming and copy/paste information straight into
  9. your code. (ie: spritemate.com)
  10.  
  11. Geany on requires tweaking it's configuration files to make this happen.
  12. I have a preference to a black background with large PETSCII characters,
  13. so this information is geared in that direction.
  14.  
  15. Make the following adjustments to: filetypes.conf
  16. MENU: Tools-->Configuration Files-->filetypes.conf
  17.  
  18. .--. .-'. .--. .--. .--. .--. .`-. .--.
  19. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  20. ' `--' `.-' `--' `--' `--' `-.' `--' `
  21.  
  22. current_line=0x000000;0xffffff;true;false
  23.  
  24. caret=caret;;true
  25.  
  26. caret_width=3
  27.  
  28. .--. .-'. .--. .--. .--. .--. .`-. .--.
  29. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  30. ' `--' `.-' `--' `--' `--' `-.' `--' `
  31.  
  32. These lines already exist, and just need some adjustment.
  33. The first sets the "current line" to black background.
  34. The second two adjust the cursor to present as a block.
  35.  
  36.  
  37. Next, you'll need to make some changes to filetypes.asm.
  38. You could copy/paste the entirety of the following
  39. over the sections [styling] & [keywords].
  40. This is a work in progress, but it's pretty close as
  41. of this posting.
  42. MENU: Tools-->Configuration Files-->Filetype Configuration-->Programming Languages-->filetypes.asm
  43.  
  44. .--. .-'. .--. .--. .--. .--. .`-. .--.
  45. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  46. ' `--' `.-' `--' `--' `--' `-.' `--' `
  47.  
  48. [styling]
  49. default=0xffffff;0x000000;false;false
  50. number=0x867ADE;0x000000;false;false
  51. string=0xC18178;0x000000;false;false
  52. operator=0xffffff;0x000000;false;false
  53. identifier=0xB3B3B3;0x000000;false;false
  54. cpuinstruction=0x00901e;0x000000;true;false
  55. mathinstruction=0x483AAA;0x000000;true;false
  56. register=0xffffff;0x000000;true;false
  57. directive=0xB3EC91;0x000000;true;false
  58. directiveoperand=0xff901e;0x000000;false;false
  59. comment=0xD5DF7C;0x000000;false;false
  60. character=0x483AAA;0x000000;false;false
  61. extinstruction=0x007f7f;0x000000;false;false
  62. current_line=0x000000;0xffffff;true;false
  63.  
  64. [keywords]
  65. # all items must be in one line
  66. instructions=adc and asl bcc bcs beq bit bmi bne bpl brk bvc bvs clc cld cli clv cmp cpx cpy dec dex dey eor inc inx iny jmp jsr lda ldx ldy lsr nop ora pha php pla plp rol ror rti rts sbc sec sei sta stx sty tax tay tsx txa txs tya
  67. registers=pc ac x y sr sp
  68. directives=org list nolist page equivalent word text equ section global extern %macro %endmacro db movsb stosb resb byte %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
  69.  
  70. .--. .-'. .--. .--. .--. .--. .`-. .--.
  71. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  72. ' `--' `.-' `--' `--' `--' `-.' `--' `
  73.  
  74. This will provide the proper assembly Syntax highlighting. I've set
  75. most of these to Commodore colors on an 8bit background.
  76.  
  77. This same file also contains the Compiler/Run commands. These are
  78. mine, but your pathnames may vary. Use these as a starting point.
  79.  
  80. .--. .-'. .--. .--. .--. .--. .`-. .--.
  81. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  82. ' `--' `.-' `--' `--' `--' `-.' `--' `
  83.  
  84. compiler=/bin/bash -c "acme --cpu 6510 --format cbm --outfile %e.prg %f"
  85.  
  86. [build-menu]
  87. FT_00_LB=_Compile
  88. FT_00_CM=/bin/bash -c "acme --cpu 6510 --format cbm --outfile %e.prg %f"
  89. FT_00_WD=
  90. EX_00_LB=_Run with Vice
  91. EX_00_CM=~/vice-3.5/bin/x64 %e.prg && exit
  92. EX_00_WD=
  93.  
  94. .--. .-'. .--. .--. .--. .--. .`-. .--.
  95. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  96. ' `--' `.-' `--' `--' `--' `-.' `--' `
  97.  
  98. Next, you'll want the PETSCII font. I dug mine out of VICE and put it
  99. into the .fonts folder of my Raspberry Pi's user folders.
  100. You can change to it in MENU: Edit-->Preferences-->Interface
  101.  
  102. Under MENU: View-->Change Color Scheme I use a scheme called "Delt Dark"
  103. with several adjustments made to it.
  104. It's a simple text file that needs to be located in:
  105. /home/pi/.config/geany/colorschemes
  106.  
  107. Here's my "delt-dark.conf" file:
  108.  
  109. .--. .-'. .--. .--. .--. .--. .`-. .--.
  110. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  111. ' `--' `.-' `--' `--' `--' `-.' `--' `
  112.  
  113. #
  114. # Copyright Éric "delt" Tremblay
  115. #
  116. # Ported from a previous theme i made for kate/kwrite.
  117. # Licensed under GPL version 2, same as geany itself.
  118. #
  119.  
  120. [theme_info]
  121. name=Delt Dark
  122. description=A dark-blueish theme, good for many programming languages
  123. # incremented automatically, do not change manually
  124. version=1
  125. author=Éric Tremblay
  126. url=https://github.com/geany/geany-themes/
  127. # list of each compatible Geany release version
  128. compat=1.22;1.23;1.23.1;1.24
  129.  
  130. [named_styles]
  131.  
  132. default=#c1c1c1;#000000;false;false
  133. error=#fff;#f00
  134.  
  135. # Editor styles
  136. #-------------------------------------------------------------------------------
  137.  
  138. selection=#000;#424d71;false;true
  139. current_line=#fff;#000000;true;false
  140. brace_good=#fff;#848;true;false
  141. brace_bad=#fff;#f00;true;false
  142. margin_line_number=#55a;#000
  143. margin_folding=#338;#113
  144. fold_symbol_highlight=#113
  145. indent_guide=#121d20
  146. caret=#fbff00;#fbff00;false
  147. marker_line=#000;#ff0
  148. marker_search=#000;#0000f0
  149. marker_mark=#000;#b8f4b8
  150. call_tips=#c0c0c0;#fff;false;false
  151. white_space=#111a25;;true
  152.  
  153. # Programming languages
  154. #-------------------------------------------------------------------------------
  155.  
  156. comment=#638aff;;false;false
  157. comment_doc=comment
  158. comment_line=comment
  159. comment_line_doc=comment_doc
  160. comment_doc_keyword=comment_doc,bold
  161. comment_doc_keyword_error=comment_doc,italic
  162.  
  163. number=#ff54ff;;false;false
  164. number_1=number
  165. number_2=number_1
  166.  
  167. type=#75ffd6;;true;false
  168. class=#00ff5c;;false;false
  169. function=default
  170. parameter=default
  171.  
  172. keyword=#fff;;true;false
  173. keyword_1=#fff;;true;false;
  174. keyword_2=#0ff;;true;false;
  175. keyword_3=#0f0
  176. keyword_4=keyword_1
  177.  
  178. identifier=#fff
  179. identifier_1=default
  180. identifier_2=#f0f
  181. identifier_3=#ff0
  182. identifier_4=#f00
  183.  
  184. string=#d04eff;;true;false
  185. string_1=string
  186. string_2=string_1
  187. string_3=default
  188. string_4=default
  189. string_eol=string_1,italic
  190. character=string_1
  191. backticks=string_2
  192. here_doc=string_2
  193.  
  194. scalar=string_2
  195. label=default,bold
  196. preprocessor=#00ff5c;;true;false
  197. regex=number_1
  198. operator=#b0c1ff;;true;false
  199. decorator=string_1,bold
  200. other=default
  201.  
  202. # Markup-type languages
  203. #-------------------------------------------------------------------------------
  204.  
  205. tag=#fff;;true;false
  206. tag_unknown=#ff4
  207. tag_end=#ff0;;true;false
  208. attribute=#0ff;;false;false
  209. attribute_unknown=attribute
  210. value=string_1
  211. entity=default
  212.  
  213. # Diff
  214. #-------------------------------------------------------------------------------
  215.  
  216. line_added=#008b8b
  217. line_removed=#6a5acd
  218. line_changed=preprocessor
  219.  
  220. .--. .-'. .--. .--. .--. .--. .`-. .--.
  221. :::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\::::::::.\
  222. ' `--' `.-' `--' `--' `--' `-.' `--' `
  223.  
  224. Finally, under MENU: View, I turn off most everything execpt line numbers, the status window, and the toolbar.
  225.  
  226. Resources for installing VICE and ACME into Raspbian:
  227.  
  228. --> Installing VICE <--
  229. https://krystof.io/installing-the-vice-commodore-emulator-for-console-mode-on-a-fresh-raspberry-pi-4/
  230.  
  231. --> Installing ACME <--
  232. sudo apt-get install acme
  233.  
  234.  
  235. Keywords: Commodore, C64, Assembly 6510, Raspbian, Turbo Macro Pro.
  236.  
  237.  
  238.  
  239.  
  240.  
Add Comment
Please, Sign In to add comment