6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Sep 29, 2024 2:17 am

All times are UTC




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Wed Oct 30, 2013 8:28 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Could the ehbasic problem be related to an unimplemented decimal mode??

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 11:08 am 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
Ehbasic uses decimal mode only in HEX$(). This should not affect any floating point results.

You actually said it yourself: viewtopic.php?f=8&t=2209#p20153

And a patch was presented by Lee: viewtopic.php?f=8&t=2209#p20278

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 12:07 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Also, I believe Arlet's latest version does have decimal mode working. You're thinking of the 65Org16 Ed! :lol:

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 12:21 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
That could actually be a problem. I don't see a CLD in the coldstart vector of Enso's EhBASIC. Just do a ?HEX$(123) and repeat your math tests. The HEX$ will clear decimal mode for sure.

The use of decimal mode in EhBASIC for the HEX$() function involves invalid BCD and may still fail. So the patch is recommended.

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 4:03 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Yes, the standard 8 bit core has decimal mode support. It initializes itself with D=0.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 30, 2013 7:33 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Yes, sorry, my wild guess does seem pretty weak! Post in haste, repent at leisure...
Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 03, 2013 5:00 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
BigEd wrote:
Mine arrived today too! A bit of messing with minicom and the raspberry pi, and I got the blinky test, the helloworld and the figforth to work... but ehbasic has some funny ideas:
Code:
Ready
PRINT 22/7
 0.34144E+15

Ready
PRINT 4+5
 5.26515E-07

Ready
PRINT 355/113
 5.43216

Cheers
Ed
(I assume sbc.bin will get an update, given Daryl's comments above)
(BTW, I tried running with two stop bits, but that was less successful than running with one)



Hi Ed,

I tried your calculation with EhBASIC from the CHOCHI website and it seems to work correctly for me. Did you ever find anything else wrong?

Code:
?22/7
 3.14286

Ready
?4+5
 9

Ready
?355/113
 3.14159


Daryl

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 03, 2013 5:06 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
enso wrote:
8BIT wrote:
... It appears that earlier versions had the bootloader load at $0000. Does that sound right?

Bah, of course. I changed the mapping a while ago. Thanks!

Daryl, please send me the fixed source file/binary I will put it up on the website.


Hi Enso,

Sorry this is late - it's been a busy week!

Here are the fixed files. The sbc.bin file is ready to load into the CHOCHI E. Load address is $F800-$FBA8. That gives a little more room for additional commands. I also fixed the reset code to point the Interrupt/BRK handler vector to the code in reset.asm. Now, a BRK will dump the registers and return you to the monitor.

Daryl


Attachments:
File comment: Lite version of SBC2OS for the CHOCHI E board.
SBCOS.zip [19.04 KiB]
Downloaded 79 times

_________________
Please visit my website -> https://sbc.rictor.org/
Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 03, 2013 6:59 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Daryl, thank you. I will update the site as soon as I can. I truly appreciate your effort.

EDIT: Posted Daryl's updates to CHOCHI website.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Last edited by enso on Sun Nov 03, 2013 7:13 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 03, 2013 7:13 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
Happy to help!


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2013 6:17 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
Hi Enso,

I am attaching the sources and bin file for my full SBC2OS, minus EhBASIC. The 65C02 opcodes were removed and the bin file loads on the CHOCHI board ($E000-$F743). This code includes the disassembler and mini-assembler. Both support 65C02 opcodes as I forgot to modify the code, but as long as just 6502 opcodes are used, it will work fine. I may refine the sources to remove the CMOS opcodes at a later date.

Feel free to post on your website if you like.

Daryl


Attachments:
File comment: Full SBC2OS for CHOCHI
SBC2OS.zip [73.73 KiB]
Downloaded 79 times

_________________
Please visit my website -> https://sbc.rictor.org/
Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 08, 2013 3:36 am 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
Posted on the CHOCHI site. Thanks again!

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 13, 2013 6:21 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
8BIT wrote:
BigEd wrote:
... ehbasic has some funny ideas:
Code:
Ready
PRINT 22/7
 0.34144E+15

... it seems to work correctly for me.

(I've been away for a couple of weeks...)
enso said, I think, that I have a mixed-up version of the bitstream. So, not a hardware or software problem!
Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 14, 2013 4:18 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 900
My working theory is that BigEd's board somehow got a polluted bitstream (I've been working with SD-specialized bitstream that was perhaps bogus at the time and was rushing to get a bunch of boards out). I will try to get his board re-flashed with the good bitstream, or replace it if it doesn't work out.

I've been running EhBASIC on every board since then to check for the bug before shipping. So far I haven't found any problems.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 14, 2013 8:24 pm 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 284
enso wrote:
My working theory is that BigEd's board somehow got a polluted bitstream (I've been working with SD-specialized bitstream that was perhaps bogus at the time and was rushing to get a bunch of boards out). I will try to get his board re-flashed with the good bitstream, or replace it if it doesn't work out.

I've been running EhBASIC on every board since then to check for the bug before shipping. So far I haven't found any problems.


Could it be that BigEd got hold of a corrupted EhBasic or incompatible binary? I had some strange behavior from the fig forth binary which disappeared when I re-downloaded it.

I just brought the original back from backup and compared it with the working one: the original is 6072 bytes while the new one is 6091 bytes.


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

All times are UTC


Who is online

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