6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 12:34 pm

All times are UTC




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: ehBasic on 65816
PostPosted: Wed May 08, 2019 2:13 pm 
Offline

Joined: Thu Apr 11, 2019 12:31 pm
Posts: 33
The link at http://sbc.rictor.org/download/EhBASIC.zip seems to be suffering from bit rot.

Does anyone have a copy of EhBASIC modified for 65816 native mode?

Cheers,
Derek


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Thu May 09, 2019 11:39 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
Hi Derek,

Give me a day or two, and I'll dig up my latest copy and post it here for you.

thanks!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Thu May 09, 2019 1:27 pm 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
Someone has made a reconstructed web site here: http://retro.hansotten.nl/lee-davison-web-site/


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Thu May 09, 2019 7:59 pm 
Offline

Joined: Thu Apr 11, 2019 12:31 pm
Posts: 33
Thanks kakemoms but the code from 8BIT has modifications for the 65816 in native mode and that is of interest. I do have EhBASIC running at the moment but in 6502 emulation mode.


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Fri May 10, 2019 3:37 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
This is the most recent copy of the source I could find. It was written for my SBC-3. The included change log will help you with the mods I made for native mode.

Be sure to apply these to your existing source vs using mine - I added a "SYS" command to exit back to my Monitor and have my own links to LOAD and SAVE routines. Adding commands can make binary copies of BASIC programs incompatible across builds, as the command TOKENS get changed.

Good luck!

Daryl


Attachments:
basic222.zip [63 KiB]
Downloaded 169 times

_________________
Please visit my website -> https://sbc.rictor.org/
Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Sun May 12, 2019 1:53 am 
Offline

Joined: Thu Apr 11, 2019 12:31 pm
Posts: 33
Thanks Daryl, that looks great. The ChangeLog is just what I needed to understand the differences. I didn't think it would be an issue at all and then the stack initialization was mentioned and it made me wonder what else is lurking.

Cheers,
Derek


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Sun Aug 04, 2019 11:02 am 
Offline

Joined: Mon Sep 14, 2015 8:50 pm
Posts: 110
Location: Virginia USA
I looked over the EhBasic source and I don't see any explicit switch to native mode in the source code.
This isn't necessarily a problem for a 65816 as the fix for stack initialization works in native or emulation
mode. There doesn't seem to be any switches to 16 bit accumulator or index registers just 8 bit registers.

I saw some places where:

LDA #0
STA ...

could be replaced with:

STZ ...

Cheers,
Andy


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Sun Aug 04, 2019 3:08 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
Hi Andy,

On my system, it was put into native mode right after power up and stayed there. As for other optimizations, I did not do any. I only made the changes necessary for it to run in native mode. There are certainly many changes that can be made to improve performance on a 65816. Lee had written this for an NMOS 6502, so there won't be any STZ commands present, but they could be replaced for 65c02 and 65816 operation.

thanks!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Sun Aug 04, 2019 5:22 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1926
Location: Sacramento, CA, USA
I think floobydust (Kevin M.) has already successfully implemented many 65c02 improvements to ehBASIC, but I'm link-challenged at the moment.

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Mon Aug 05, 2019 5:28 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
barrym95838 wrote:
I think floobydust (Kevin M.) has already successfully implemented many 65c02 improvements to ehBASIC, but I'm link-challenged at the moment.

True... I made quite a few changes to the code. It only runs on a CMOS processor now as a result. One link for download is here:

viewtopic.php?f=5&t=5346&start=15#p63899

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Tue Jul 28, 2020 12:17 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
floobydust wrote:
barrym95838 wrote:
I think floobydust (Kevin M.) has already successfully implemented many 65c02 improvements to ehBASIC, but I'm link-challenged at the moment.

True... I made quite a few changes to the code. It only runs on a CMOS processor now as a result. One link for download is here:

viewtopic.php?f=5&t=5346&start=15#p63899



Hi. I'd like to know what exactly should I do to compile this 65816 compliant EhBASIC version, to run it in my W65C265SXB clone.

I've read that there are several changes made, and at one point it was available for download, but now it's only the source code linked above, and I don't know if the changes are already applied, or if I should apply the changes listeed in changelog.log.

Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Tue Jul 28, 2020 8:02 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
tokafondo wrote:
floobydust wrote:
barrym95838 wrote:
I think floobydust (Kevin M.) has already successfully implemented many 65c02 improvements to ehBASIC, but I'm link-challenged at the moment.

True... I made quite a few changes to the code. It only runs on a CMOS processor now as a result. One link for download is here:

viewtopic.php?f=5&t=5346&start=15#p63899



Hi. I'd like to know what exactly should I do to compile this 65816 compliant EhBASIC version, to run it in my W65C265SXB clone.

I've read that there are several changes made, and at one point it was available for download, but now it's only the source code linked above, and I don't know if the changes are already applied, or if I should apply the changes listeed in changelog.log.

Thanks.


Just assemble it for the '816 - mostly to make sure it's not using the few instructions that are in the C02 that are not in the '816. (that tripped me up initially with some of my own code when I moved the the '816).

It won't take advantage of any '816 extra op-codes though, but it will work in Bank 0.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Tue Jul 28, 2020 11:56 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
drogon wrote:
Just assemble it for the '816 - mostly to make sure it's not using the few instructions that are in the C02 that are not in the '816. (that tripped me up initially with some of my own code when I moved the the '816).

It won't take advantage of any '816 extra op-codes though, but it will work in Bank 0.

-Gordon


Thanks. I'm trying several TASS versions and my results are that I could only compile the source "as is" with 64tass1.46-r38, and leaving out basldsv.asm, because of errors:

WITH .include basldsv.asm
Code:
S:\Proyecto Ordenador\EhBASIC>..\64tass-1.46-r38\64tass_1.46_r38.exe -x -W basic222.asm -o ehbasic.out
6502/65C02 Turbo Assembler Version 1.3  Copyright (c) 1997 Taboo Productions
6502/65C02 Turbo Assembler Version 1.35 ANSI C port by [BiGFooT/BReeZe^2000]
6502/65C02/65816/CPU64/DTV TASM Version 1.46 r38 Fixing by Soci/Singular 2001-2010
64TASS comes with ABSOLUTELY NO WARRANTY; This is free software, and you
are welcome to redistribute it under certain conditions; See LICENSE!

Assembling file:   basic222.asm
basldsv.asm:13: (basic222.asm:22) Not defined print2byte "jsr print2byte"
basldsv.asm:17592186044430: (basic222.asm:17592186044438) Not defined print_cr "jsr print_cr"
basldsv.asm:17592186044437: (basic222.asm:17592186044438) Not defined print2byte "jsr print2byte"
basldsv.asm:17592186044438: (basic222.asm:17592186044438) Not defined print_cr "jsr print_cr"
Error messages:    4
Warning messages:  None
Passes:            2
Range:             $000000-$00001c


WITHOUT .include basldsv.asm
Code:
S:\Proyecto Ordenador\EhBASIC>..\64tass-1.46-r38\64tass_1.46_r38.exe -x -W basic222.asm -o ehbasic.out
6502/65C02 Turbo Assembler Version 1.3  Copyright (c) 1997 Taboo Productions
6502/65C02 Turbo Assembler Version 1.35 ANSI C port by [BiGFooT/BReeZe^2000]
6502/65C02/65816/CPU64/DTV TASM Version 1.46 r38 Fixing by Soci/Singular 2001-2010
64TASS comes with ABSOLUTELY NO WARRANTY; This is free software, and you
are welcome to redistribute it under certain conditions; See LICENSE!

Assembling file:   basic222.asm
Error messages:    None
Warning messages:  None
Passes:            2
Range:             $009000-$00b840


As this version of TASS only output one format (that I can't figure which is), I used utils from s-record.com, to convert the output binary file to a "s-record" that I will be able to push through internal Mensch monitor:

Code:
S:\Proyecto Ordenador\EhBASIC>..\bin2srec.exe ehbasic.out > ehbasic.s28

BIN2SREC 1.51 - Convert binary to Motorola S-Record file.
Copyright (c) 2000-2019 Ant Goffart - http://www.s-record.com/

Input binary file: ehbasic.out
Begin address   = 0h
End address     = 2842h
Address offset  = 0h
Maximum address = 2842h
Address bytes   = 2
Processing complete


I'm not actually sure if the ehbasic.out that I got earlier is the right one to be converted to "s-record" type. Also, the addresses mentioned in both TASS output and the previous output don't seem right to me. Should I add -b 0300 like this?? :

Code:
S:\Proyecto Ordenador\EhBASIC>..\bin2srec.exe -b 0300 ehbasic.out > ehbasic.s28

BIN2SREC 1.51 - Convert binary to Motorola S-Record file.
Copyright (c) 2000-2019 Ant Goffart - http://www.s-record.com/

Input binary file: ehbasic.out
Begin address   = 300h
End address     = 2842h
Address offset  = 300h
Maximum address = 2842h
Address bytes   = 2
Processing complete


Thanks for your help.


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Tue Jul 28, 2020 3:52 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
I had some free time this afternoon:
https://github.com/andrew-jacobs/w65c265sxb-ehbasic

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Tue Jul 28, 2020 5:02 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
BitWise wrote:
I had some free time this afternoon:
https://github.com/andrew-jacobs/w65c265sxb-ehbasic


Thank you very, very much!!!

I'm having a problem that is, that the XMODEM transfer is VERY slow.

Attachment:
Portapapeles01.png
Portapapeles01.png [ 9.94 KiB | Viewed 12223 times ]


The garbage you see in the first line is that this COM port was using 9600 and then changed it to 19200.

Tinkering with the '265 hacker does actually works, but the XMODEM transfer stays like the picture for a while and then gets interrupted...

I'm using another FTDI chip for the second UART. Maybe changing to a prolific 2303...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: