Issue with Ben Eater's latest github release

Building your first 6502-based project? We'll help you get started here.
Post Reply
ACx
Posts: 4
Joined: 09 Apr 2024

Issue with Ben Eater's latest github release

Post by ACx »

Hi, yes, Im another one hooked in by Mr Ben Eater!!! Been playing with this for over a year, and its been brilliant fun. Not just for me, but my youngst son too. Not posted before, but this forum and its resources has been invaluable. Up till now, I've managed to eventually get BE6502 working, and made a few mods, all with a lot of help here. So, before my question, thanks !!

I've just downloaded Ben's latest MS basic from Github, and evereything looks good, except for the LCDPRINT function in MS Basic. When I use it, I get a Syntax Error.

The LCDCMD seems to work, so I hope that shows my hardware is correct. (When things go wrong I always worry there's a loose or incorrect connection somewhere.) The thing is, the code on GitHub is different to what Ben has in his video. It looks like its trying to handle a string rather then a hex number, but Im not good enough to work out whats supposed to be happening in ther code. So, has anyone else seen this? And assuming Ben's code is good, what could be going wrong my end?

Ah, also..... when I first downloaded Ben's MS Basic, I got a version which had a BE6502 splash screen on boot, had LCD and SD Card support, and supermon64 included. But I've never seen it since. Anyone else come across this?

Thanks for reading.
John West
Posts: 383
Joined: 03 Sep 2002

Re: Issue with Ben Eater's latest github release

Post by John West »

The LCD code in question is at https://github.com/beneater/msbasic/blob/master/lcd.s. At the end of his latest video (https://www.youtube.com/watch?v=gOwi2p1pzVM) he does talk about changing LCDPRINT to take a string instead of a number, and it looks like he's done that in this version of the code.

You've got two options: return LCDPRINT to its original state (which expects a number), or use the new string-taking LCDPRINT. I haven't tried it, but it looks very much like it will work the same as the fake example at the end of the video. So

Code: Select all

LCDPRINT "Hello world!"
will print "Hello world!". You should be able to use any string expression, including string variables. So maybe (it has been a very long time since I've used Microsoft BASIC)

Code: Select all

A$ = "Hello"
B$ = "world!"
LCDPRINT A$+" "+B$
ACx
Posts: 4
Joined: 09 Apr 2024

Re: Issue with Ben Eater's latest github release

Post by ACx »

John West wrote:
The LCD code in question is at https://github.com/beneater/msbasic/blob/master/lcd.s. At the end of his latest video (https://www.youtube.com/watch?v=gOwi2p1pzVM) he does talk about changing LCDPRINT to take a string instead of a number, and it looks like he's done that in this version of the code.

You've got two options: return LCDPRINT to its original state (which expects a number), or use the new string-taking LCDPRINT. I haven't tried it, but it looks very much like it will work the same as the fake example at the end of the video. So

Code: Select all

LCDPRINT "Hello world!"
will print "Hello world!". You should be able to use any string expression, including string variables. So maybe (it has been a very long time since I've used Microsoft BASIC)

Code: Select all

A$ = "Hello"
B$ = "world!"
LCDPRINT A$+" "+B$
Hi, thanks for your reply.

I tried both those and both give me the ?Syntax Error.

So, I know what should work, but it appears not to. Seems odd to me that Ben has his video, points to the GH code, but its different and doesnt work. Well, at least for me. I dont know right now if that code should work, or if I've messed something up.

Edit: just noticed that your second example actually displays "W" on the LCD!!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Issue with Ben Eater's latest github release

Post by BigEd »

(Welcome!)
John West
Posts: 383
Joined: 03 Sep 2002

Re: Issue with Ben Eater's latest github release

Post by John West »

Is there a downloadable binary file for this version of BASIC? I can modify my simulator to look enough like Ben's hardware to get BASIC running, but I don't use whatever assembler that is written for, and don't fancy setting up a whole new development environment just for this.
ACx
Posts: 4
Joined: 09 Apr 2024

Re: Issue with Ben Eater's latest github release

Post by ACx »

John West wrote:
Is there a downloadable binary file for this version of BASIC? I can modify my simulator to look enough like Ben's hardware to get BASIC running, but I don't use whatever assembler that is written for, and don't fancy setting up a whole new development environment just for this.
If you mean a compliled bin file of Ben's BASIC, I've not seen one there.

Setting up CC65 to complie it is pretty trivial, hell, I did it!!! :)
But I do get your reluctance.
ACx
Posts: 4
Joined: 09 Apr 2024

Re: Issue with Ben Eater's latest github release

Post by ACx »

BigEd wrote:
(Welcome!)
Thanks :)
jgharston
Posts: 181
Joined: 22 Feb 2004

Re: Issue with Ben Eater's latest github release

Post by jgharston »

I tweeked my 6502 emulator to have a "look like BenEater" option, and it was only a few minutes' work to tweek SerialTube65 to get BBC BASIC working. :)
Post Reply