CHOCHI E with USB Power
Re: CHOCHI E with USB Power
Could the ehbasic problem be related to an unimplemented decimal mode??
Cheers
Ed
Cheers
Ed
Re: CHOCHI E with USB Power
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
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
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Re: CHOCHI E with USB Power
Also, I believe Arlet's latest version does have decimal mode working. You're thinking of the 65Org16 Ed! 
Re: CHOCHI E with USB Power
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.
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
Re: CHOCHI E with USB Power
Yes, the standard 8 bit core has decimal mode support. It initializes itself with D=0.
Re: CHOCHI E with USB Power
Yes, sorry, my wild guess does seem pretty weak! Post in haste, repent at leisure...
Cheers
Ed
Cheers
Ed
Re: CHOCHI E with USB Power
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:
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)
Code: Select all
Ready
PRINT 22/7
0.34144E+15
Ready
PRINT 4+5
5.26515E-07
Ready
PRINT 355/113
5.43216
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: Select all
?22/7
3.14286
Ready
?4+5
9
Ready
?355/113
3.14159Please visit my website -> https://sbc.rictor.org/
Re: CHOCHI E with USB Power
enso wrote:
8BIT wrote:
... It appears that earlier versions had the bootloader load at $0000. Does that sound right?
Daryl, please send me the fixed source file/binary I will put it up on the website.
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
-
- SBCOS.zip
- Lite version of SBC2OS for the CHOCHI E board.
- (19.04 KiB) Downloaded 95 times
Please visit my website -> https://sbc.rictor.org/
Re: CHOCHI E with USB Power
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.
EDIT: Posted Daryl's updates to CHOCHI website.
Last edited by enso on Sun Nov 03, 2013 7:13 pm, edited 1 time in total.
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
Re: CHOCHI E with USB Power
Happy to help!
Re: CHOCHI E with USB Power
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
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
-
- SBC2OS.zip
- Full SBC2OS for CHOCHI
- (73.73 KiB) Downloaded 97 times
Please visit my website -> https://sbc.rictor.org/
Re: CHOCHI E with USB Power
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
Re: CHOCHI E with USB Power
8BIT wrote:
BigEd wrote:
... ehbasic has some funny ideas:
... it seems to work correctly for me.
Code: Select all
Ready
PRINT 22/7
0.34144E+15
enso said, I think, that I have a mixed-up version of the bitstream. So, not a hardware or software problem!
Cheers
Ed
Re: CHOCHI E with USB Power
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.
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
Re: CHOCHI E with USB Power
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.
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.
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.