remy/vscode-nextbasic

Problem setting up on Windows

SteveSpeccy opened this issue · 18 comments

Sorry, I'm not sure I'm doing this right, just had to create an account so forgive me if I'm backwards.
I posted on your youtube video about setting up nextbasic development. Well, I'm not the sharpest tool in the box and so I'm struggling. I have installed VScode and I have managed to get the next basic 1.5.8 extension installed but the rest I'm struggling with. I copied the cspect folder to my HD and set the path, also copied hdfmonkey to my c:/ drive and set the path but reading the next bit has me stumped. it says to set the 'next image path' but there is no img or image file in my cspect folder. I'm clueless

remy commented

Just a starting question: windows or Mac?

Win 7 64bit (sorry, should have said)

remy commented

I suspected (you mentioned c:/ drive) but didn't want to assume.

Okay, so the "next image" is from here: http://www.zxspectrumnext.online/cspect/

You need to scroll down to "CURRENT DISTRO IMAGES" - I tend to pick the 2gb one (not sure why, but it works for me, though they should all work).

Download the "image" ("image" meaning a copy of a disk drive) and put the contents of the zip file in the same directory you have cspect.exe in.

This is why my nextbasic settings look like on my machine. Ignore the hdfmonkey setting (yours, being on windows will be different), but can you see where I'm pointing to the next image:

Screenshot 2020-10-16 at 11 34 23

My machine it's /Applications/cspect/app/cspect-next-2gb.img - yours will be something like C:\spectrum\cspect\cpset-next-2gb.img (obviously your own path, but I hope you get the idea).

Once you've got that done, hdfmonkey is next - but we'll do that in a moment.

To test that cspect is setup correctly, you can run the following in your command prompt:

c:
cd \spectrum\cspect
cspect.exe -w3 -basickeys -zxnext -nextrom -mmc=cspect-next-2gb.img 

That should launch cpsect - if it doesn't come back, ideally with a screenshot or errors and we'll see what's what. If it works, we'll get your hdfmonkey sorted (remember to download this version of hdfmonkey).

Awesome! thank you. I got it working, it's showing me the next startup screen, the first time I typed that line it ran and said there was no sound but I used the link it showed and installed the AL file and now it's working with sound.

Superb, what's next? and one question. What button do I press to test any code I've typed?

remy commented

Okay, so - quick question, have you got hdfmonkey set up yet or do you need a hand with that too (happy to help).

In VS Code, you can run with a shortcut ctrl+shift+r, or in the command palette (I don't remember off the top of my head how to bring this up on Windows), but once that's open, "NextBASIC" and it'll list all the commands you can (you want "run with cspect").

So worth using the hello world starting point:

10 PRINT "Hello World"
20 GO TO 10

If hdfmonkey is working and cspect is working, then, hit the run command (above) and it should, hopefully, compile your text into NextBASIC, send it to your "next image" and have cspect launch and auto run your code.

Let me know where you get up to.

Thank you. I did download hdfmonkey and set the path to it. (I believe it's correct)
I typed in the two lines but control+shift+r gives me an error "Command 'Nextbasic:run with cspect' resulted in an error (command 'nextbasic.run' not found)"

I'm sorry for being a pain.

remy commented

Can you screenshot the error with as much of the window in view to help me understand what's wrong?

You can then drag and drop the image directly into this comment box and it'll upload it for you.

remy commented

(just to let you know, I'm retiring for the night, but I'll drop you any follow tomorrow morning - I think you're pretty close, just something missing in vscode)

Actually, something else you can try, in vscode, same your file and give it an extension of either .bas or (what I do) .bas.txt - then with that newly saved file open, in vscode, run the keyboard shortcut.

(Any screenshot of errors are worth a 1,000 written words - they're always super useful).

error
this is the error I'm getting.

remy commented

Okay - that's useful (particularly the "plain text" bit in the corner).

Is the file you created open when you do the run shortcut?

When my hello.bas.txt is open, it looks like this:

Screenshot 2020-10-17 at 11 56 15

remy commented

(though I just tried to change the "langauge" to plain text, and I was still able to run the code in cspect, so there might be something else going on here)

I'm sorry for taking up so much of your time with this, perhaps we should call it a day, we tried.

new
okay, I changed it to nextbasic and we have a new error, says the path might be wrong but I'm sure it's not.

remy commented

Okay, this is good progress :)

Can you post a screenshot of your settings for the extension.

What I believe it's telling us is that path to the image is wrong or can't be resolved. We're looking at this setting:

Screenshot 2020-10-17 at 12 33 29

remy commented

Yep, missing a slash in your path - should be c:/Cspect/cspect-net-2gb.img (or c:\Cspect\cspect-next-2gb.img - I'm never quite sure with windows). Try that and let me know.

yes

YES!!! I also added the missing slash to the path for hdfmonkey and it works! Thank you so so much, there's no way I would have got it working without your help. it's much appreciated. Thanks!

remy commented

Yay!

I'm thinking about busting out my windows machine and doing a step by step on how to install the supporting tools (cspect and hdfmonkey) - you're not the first to get stuck on these bits, and if a person isn't familiar with tooling it can be a bit scary.

Good on you for persisting 👍