**** COMMODORE 64 BASIC V2 **** (c64basicv2) Visual Studio Code ExtensionIntroductionThis extension helps you to write Commodore 64 basic v2 programs (.prg or .bas extension). It provides you: syntax highlighting, snippets, file icons, a theme, tasks, rulers, commands, different views in the Primary Sidebar, and a simple preview. Rules for snippets come from the following pages of C64-Wiki: You might follow this process to develop your program:
You can create the folder structure using Yeoman:
FeaturesThe provided features are:
Syntax highlightingAn example of syntax highlighting is: SnippetsSnippets suggest to you the syntax of the commands: Snippets for Control charactersControl characters in c64 basic are special characters like this: Books and old magazines represent special characters using a symbolic syntax: {ctrl character name}. For example, the previous character is written with this syntax: {clr}. If you use this control character in a print statement (print "{clr}"), C64 clears the screen. You can find the list of control characters on this page: Control character. Snippets for Control character suggest a symbolic character or the corresponding chr$(xxx). In our example: chr$(147). If you use the chr$ mode, pay attention: Inside a print statement, you have to remove the double apex, print "{clr}" become print {clr} and then print chr$(147). The best option is using the symbolic representation, petcat will convert the symbol for you. petcat recognize the following symbols:
Other details: petcat src Command - Automatic Proofreader (Keyboard Shortcut: ctrl+shift+p ctrl+shift+r)Automatic Proofreader is an error-checking command that helps you to type program listings without mistakes. This command emulates (I hope) the original "The Automatic Proofreader" program published on COMPUTE!'s Gazette. An example: Hit "F1", search "Automatic Proofreader" and press "enter": a popup shows the checksum for the current line. Since version 0.5.0, "Automatic Proofreader" is displayed on each row after the 80th column. For others info on "The Automatic Proofreader" original program see Wikipedia. Command - Convert (Keyboard Shortcut: ctrl+shift+b)Use this command to convert the current program to tokenized BASIC using the Vice petcat command. Needed settings:
Hit "F1", search "Convert" and press "enter". Command - Convert and Run (Keyboard Shortcut: f5)Convert and run the current program using the Vice x64sc command. Needed settings:
Hit F1, search "Convert and Run" then hit enter. CHARACTER view on the Primary SidebarUsing the Control characters view, you can visually add a control character: Click on the character to add the corresponding symbol in the code, or click on the number to add the chr$ command. The font is "Pet Me 64", released by Kreative Korporation. SID view (address, ADSR calculator and notes) in the Primary SidebarUsing this view, you can
Code PreviewUsing the preview button on the editor Toolbar, you can show a panel containing your code formatted like the C64 screen. This view is good for checking control characters. The preview uses the "Pet Me 64" font, released by Kreative Korporation. DiagnosticCheck lines for errors and warnings. Checks implemented:
Settings
Task SettingsCommands "Convert" and "Convert and Run" replace task settings. Configure
Other usefull info and scriptFolder structure
convertAll.sh: to convert all the programs (src folder) between ASCII, PETSCII, and tokenized BASIC.
created64.sh: to create a d64 image disk containing all the converted prg
To extract a prg from a d64 image disk and convert it to a text file:
Install vice to use petcat, x64sc and c1541. IMPORTANT If you use vice on Ubuntu remenber to install bin files (kernal, basic, etc.):
Release Notes |