6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 9:52 am

All times are UTC




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject: Re: ehBasic on 65816
PostPosted: Tue Jul 28, 2020 5:27 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
tokafondo wrote:
I'm having a problem that is, that the XMODEM transfer is VERY slow.


UPDATE:

I was using the original "dual UART" '256SXB hacker option, and then went back to the "single UART" as provided in the download.

Now the XMODEM transfer does work, but stops just before reaching 70%.

Attachment:
Portapapeles01.png
Portapapeles01.png [ 21.32 KiB | Viewed 8725 times ]


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

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
You have to load a binary file into the ROM with XMODEM not an S28.

_________________
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 6:22 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
BitWise wrote:
You have to load a binary file into the ROM with XMODEM not an S28.


Ouch! It's true!! The second test I made it by uploading the .s28 instead of the .bin.

I wonder why the XMODEM didn't work in the second UART but does it (and nothing to do with my wrong upload) with the first.

Well... Anyway, I'm reworking the board because I want it to be selfpowered instead of USB powered.

Thanks again for your help and patience.


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

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
BitWise wrote:
You have to load a binary file into the ROM with XMODEM not an S28.


Now it works!! Thanks!! I have a question for you about the "hacker", but won't go off-topic and will open a different thread.


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

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
Well... I went high with all of this, and took the "Change Log.txt" of the file that Daryl/8BIT posted earlier, and applied the changes to the basic.asm file that Andrew/Bitwise posted today.

Deleted the .65C02 directive, replaced some opcodes (#XBA -> XBA and #TCS -> TCS) and compiled it with the Dev65.jar file and uploaded it to the board.

And it works. But I don't go too high, so... How can I tell if the compiled code is working in native or emulated mode?


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

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
My version does a SEC/XCE at the start to force the emulation mode.

When I browsed the 65C02 source I found a few TXS instructions which will execute differently in the two modes. In emulation mode the high byte of the stack pointer is always $01 but in native mode it gets set from the high byte of the X register which is $00 if X&Y are set to 8-bits. This would leave the stack pointer on zero page and could overwrite the interpreters variables if the code recursed a lot (like in a complex math expression).

So I opted to put the processor in emulation mode for safety.

_________________
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: Fri Jul 31, 2020 1:56 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 344
BitWise wrote:
My version does a SEC/XCE at the start to force the emulation mode.


Thanks. I also removed that, compiled again, and it boots. Now.... Is there any test to be done that would force the error you say?

Only asking as a sort of beta tester or something... anyway. Not something that I would actually need.


Top
 Profile  
Reply with quote  
 Post subject: Re: ehBasic on 65816
PostPosted: Sun Aug 02, 2020 3:42 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
BitWise wrote:
My version does a SEC/XCE at the start to force the emulation mode.

When I browsed the 65C02 source I found a few TXS instructions which will execute differently in the two modes. In emulation mode the high byte of the stack pointer is always $01 but in native mode it gets set from the high byte of the X register which is $00 if X&Y are set to 8-bits. This would leave the stack pointer on zero page and could overwrite the interpreters variables if the code recursed a lot (like in a complex math expression).

So I opted to put the processor in emulation mode for safety.


I just recently noticed that you were kind enough to use my CMOS version of EhBasic for porting to the 65C816 SXB. Just an FYI, I did another update to the CMOS code after Klaus released a p5 patched version. My updated CMOS version 2.22p5C has those updates, plus 100% of the Cold/Warm start code and additional code to implement LOAD and SAVE which links to my C02Monitor for Xmodem-CRC upload and download functions. The only problem porting to the 65C816 related chips would be some usage of the page zero bit manipulation instructions... all are related to the Xmodem LOAD/SAVE... 3 in total. There's also a few more performance enhancements as well... one to the CHRGET/CHRGOT equivalent routine by Mike Barry.

I'm adding the updated source code here for convenience, hope you (and others) find it useful.

Attachment:
basic.asm [334.38 KiB]
Downloaded 171 times

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


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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: