Constant Errors When Trying To Configure The VS64 Extension?
EnglishEccentric opened this issue · comments
I've not coded on a C64 6502/6510 for almost 30+ years, since the Compunet days....and when reading up on this extension coupled with Kick Assembler and Visual Studio I've decided to try and take up coding again.
Problem is, when trying to use the VS Studio extension with Kick Assembler on Visual Studio, I'm getting two different sets of errors when configuring the extension settings - the first two images were what I kept getting when trying to compile/run any project (the first two were on my initial install/attempt) which just keeps me stuck in a loop asking for a debugger - I tried as many options/permutations as I could think of but not joy, and the third image (json error) was after I'd uninstalled and reinstalled everything and configured the extension!
I've been trying to set this up all day (literally) - please forgive my stupidity if there's something obvious I've missed or not doing - I've watched/followed two different youtube videos too though I keep getting different outputs/errors whereas theirs worked fine.
Any help/ideas appreciated.
Thanks in advance :)
Hi. No worries - messing with the setup can be a nightmare... let my try to help.
Here are my initial thoughts:
- can it be that you've installed several 6502 / C64 plugins for vscode? This page here is about VS64, and you should not need any other plugin for coding and debugging
- not sure if there are youtube videos on vs64, but there are others talking about other vscode plugins - maybe you got confused by this
- for KickAss, you just need a Java Runtime and the KickAss distribution. After that is working on a terminal, you should easily get that to work in vs64 by just configuring the KickAss installation path (in the settings)
- Once everything is clean and configured, I'd recommend you to use the vscode vs64 commands to auto-generate a KickAss project for you (with all the tasks, launch and debug configs prepared).
Thanks for your super quick reply, and the main problem(s) I've since worked out were that Visual Studio Code left so many settings/files hidden within Windows after each install, I also found out that it did the same with VS64 too!
Therefore It's taken me around a dozen attempts of uninstalling and reinstalling, then trying lots of different setttings/options to get rid of all these/clear these.
I finally managed to get a fresh/clean install of both Visual Studio Code & VS64, and have only changed the settings as per the startup instructions within VS64.
This is what I followed/did:
Quick and Start (TL;DR)
Getting Started
The quickest start is by opening the command palette and run the "VS64: Getting Started" command.
If you want to do some manual steps or adjustments, these are the individual things to look at:
Install the ACME cross-assembler and/or the CC65 C-compiler and/or the LLVM-MOS C/C++ compiler
Install the VICE emulator
Adjust your VS64 settings
Run "VS64: Create Project" from the command palette
Auto-compile should pick up the newly created project and build everything
Debug configurations should be ready to run on the internal CPU emulator or VICE
Creating Projects Quickly
The "Create Project" commands are a great tool to configure and re-configure a code project. Whenever such a command is issued, the current workspace will be scanned and a fresh project configuration file will be generated based on the existing source files. Afterwards, everything should be ready to build and run.
...with everything installed/setup/cpnfigured exactly as per the above instructions, to start coding, in the Command Palette I then type 'VS64: Create KickAssembler Project' and all .VS64: Create Project', though I'm now getting the following error message 'Cannot create project setup without workspace. Please create or open a workspace or folder.'
....and I can't find any options to do this?!
Now, again, please forgive me, as I've never used Visual Studio before, so is there a quick/straightforward way to do this? (setting up a workspace). I did Google this, etc but nothing seemed to work.
Sorry for the misunderstanding (on my part), and thanks again for your patience!
(And to think 30 years ago I used to boot up my machine code monitor built into my Expert Cartridge on my C64 and coded raster interrupts with smooth scrollers, etc without the need to look at any manuals)
EEK and thanks ;)
To get more details about failing things, please once again go to the VS64 settings and set the debug/verbosity level to "trace" or "debug" -- then you should get plenty of additional information on the console.
About the general workflow with vscode: the "workspace" in the most simplest form is one root folder. In such a simple case, "creating" a workspace is simply opening a folder from vscode. For a new vs64 project, just create an empty folder, then open with vscode, then let vs64 create a template project for you. If that then doesn't compile, then it's likely that your KickAss or Java installation isn't correct (or the path setting for vs64 is not correct).
Thanks again for your answers, time and patience! ;)
I think I'm almost there, as Vice is booting up every time I set up a project, as I can see that as part of the project set-up you have included some example code to check everything is OK/running properly (as per your answer above).
Problem is that whenever I create KickAssembler Project in the command palette, it creates the setup files/example code, though it doesn't 'run' as it constantly tells me 'The system cannot find the file specified.' and what I can decipher from the error log is that it's the file with extension .dbg - in my case I have a new project folder created (HelloWorld) and opened with the auto-generated /initial files in the folder to run the example, though again, when trying to do so, it doesn't seem to be able to create HelloWorld.dbg - is this down to my settings?
The entire log is here "Executing task: build project
[1/1] C:\ProgramFiles(x86)\Java\jre-1.8\bin\java.jar -jar C:\C64Development\KickAssembler\KickAss.jar\KickAss.jar -odir "c:\C64Development\HelloWorld\build" -asminfofile "c:\C64Development\HelloWorld\build\HelloWorld.info" -debugdump -asminfo "files|errors" -debug -libdir c:\C64Development\HelloWorld -libdir c:\C64Development\HelloWorld\build -o c:\C64Development\HelloWorld\build\HelloWorld.prg c:\C64Development\HelloWorld\src\main.asm
FAILED: c:/C64Development/HelloWorld/build/HelloWorld.prg c:/C64Developm
ent/HelloWorld/build/HelloWorld.dbg
C:\ProgramFiles(x86)\Java\jre-1.8\bin\java.jar -jar C:\C64Development\KickAssembler\KickAss.jar\KickAss.jar -odir "c:\C64Development\HelloWorld\build" -asminfofile "c:\C64Development\HelloWorld\build\HelloWorld.info" -debugdump -asminfo "files|errors" -debug -libdir c:\C64Development\HelloWorld -libdir c:\C64Development\HelloWorld\build -o c:\C64Development\HelloWorld\build\HelloWorld.prg c:\C64Development\HelloWorld\src\main.asm
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
failed with exit code 1
- Terminal will be reused by tasks, press any key to close it. "
....and my core settings are set as:
Java - C:\ProgramFiles(x86)\Java\jre-1.8\bin\java.jar
KickAssembler - C:\C64Development\KickAssembler\KickAss.jar
Vice64 - C:\C64Development\Vice64\GTK3VICE-3.8-win64\bin\x64sc.exe
Everything else is set to default.
Again thanks a million for all your help so far.
I think I spotted the typo: "C:\ProgramFiles(x86)\Java\jre-1.8\bin\java.jar" --> This must be "...\bin\java.exe" or so... ?
Did you do "clean" and then "build" ? The project (ninja) build file just gets updated in case you clean/rebuild or you modify the project configuration.
How exactly do your project settings, the tasks file and launch files look like? Maybe there's some invalid parts in it.
If you still don't see the reason, it would probably be best to pack a small test project and share it here. Seems like something's still messed up.
Hello.... First off, I DID IT! YAY! .........it's working!!! PHEW!
Basically, a schoolboy error so to speak, in my VS64 setting I was pointing to the exact file/filename of the Kick Assemberl as opposed to pointing to the directory/folder (which it does say in your settings section).
Well, I learnt a bit about VS Code/VS64 during this 'immense' setting up period.
I just wanted to thank you again for your help/patience - do you have a patreon/buy me a coffee/beer link or similar?
Here's Proof! ;)
Finally, I guess I just clear the code in here now (see below) and start my own code!?
Thank you again,
George 👍
Hi George, I am glad you got it to work! One more passionate contributor to the C64 retro scene...
Cheers!
Roland
PS. Yes, just clear the code and start with your own.
Hello (again)
Just a quick one....I've cleared all the code in the .asm file and just did a simple piece of code to test and saved the file with the same name, code was:
LDA #$06
STA $D020
RTS
.Saved file....but when I press F6 (I think it was) it compiles but the old code example appeared/ran?!
Any ideas!? (I'm sure I'm making a mistake)?
OK, so I'm a little confused here, I deleted you test code and created a totally simple example to make sure I was ready to get started/trying out C64 assemble again but got a host of errors, with Visual Studio Code not even recoginsing LDA #$06 for example - see screenshot below!
I basically clicked on the 'build' button.
Again, sorry to be a pain I just wanna get started/coding! ;)
Hi. I would recommend studying both the Visual Studio Code manuals and the Kick Assembler handbook (http://theweb.dk/KickAssembler/webhelp/content/cpt_BasicAssemblerFunctionality.html) -- that is the quickest way to get started.
-- to your problem: I think you need to be careful with case sensitivity, KickAss assumes lower case mnemonics, if I'm not wrong.