6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 10:01 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Nov 01, 2023 3:52 am 
Offline

Joined: Tue Oct 31, 2023 11:57 pm
Posts: 7
Hi All;
I am new to 6502 CPU's, but, I would like to port or implement BCPL on my 6502 based machine..
What I have is Ben Eaters 6502 kit, and I have ordered the Serial kit as well for I/o..
What would be the first steps toward that (I have read and copied Gordon's 816 stuff, in my notebook..)
THANK YOU Marty


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 01, 2023 8:38 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
MartyG wrote:
Hi All;
I am new to 6502 CPU's, but, I would like to port or implement BCPL on my 6502 based machine..
What I have is Ben Eaters 6502 kit, and I have ordered the Serial kit as well for I/o..
What would be the first steps toward that (I have read and copied Gordon's 816 stuff, in my notebook..)
THANK YOU Marty


The easiest way would be to write a little OS that can support Acornsoft ROMS then run the Acornsoft BCPL ROM. You'll need a filing system of some sorts too. I used this environment extensively in the early 80s to develop a system of networked BBC Micros in a factory automation/robotics setting.

That will give you an environment where you can directly edit, compile and debug 16-bit BCPL programs with optional floating (and fixed) point calculations package.

If you want 32-bit numbers, then it will be more of a challenge, but possible on the 6502 - my own BCPL "rom" is pushing 16KB on the '816 though.

You might want to start by fetching and installing Martin Richards compiler and utilities, etc. on a local (Linux) system though to get to grips with it all, however I'm not sure that can generate the old 16-bit code anymore that the Acornsoft/BBC Micro ROM requires. A lot of that has been lost to time.

-Gordon

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 01, 2023 1:07 pm 
Offline

Joined: Tue Oct 31, 2023 11:57 pm
Posts: 7
Hi All;

Thank You, Gordon, for Your Prompt Reply, and help..

I have much of Martin Richards BCPL stuff, and I will take a look later at what I have..

He had a Disk Crash awhile back and I was able to help Him get some of His files Restored, from my back-ups..

I will look into the BBC Micro and other related files when I have the time..

Again, THANK YOU for Your Help and Suggestions.. Marty


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 01, 2023 2:00 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
MartyG wrote:
Hi All;

Thank You, Gordon, for Your Prompt Reply, and help..

I have much of Martin Richards BCPL stuff, and I will take a look later at what I have..

He had a Disk Crash awhile back and I was able to help Him get some of His files Restored, from my back-ups..

I will look into the BBC Micro and other related files when I have the time..

Again, THANK YOU for Your Help and Suggestions.. Marty


I think it's one of those rock/hard places to work with - if you want to start from scratch and make a 16-bit BCPL system and are happy with cross compiling on (e.g. a Linux desktop) then it's probably not that hard. Even a 32-bit system on a 65C02 shouldn't be too difficult to imagine, but again cross compiling.

And there we have another conundrum - the current flashy 6502 projects seem to be designed for just that - compile C on a desktop and drag and drop an entire binary, bootstrap, code, the lot into some smart device incorporating either a real or emulated 6502 and "Ooo - look, I can blink an LED" and it's only taken 100 lines of C compiling to 10K of 6502 ....

What I wanted something that was a bit of a modern take on the thing I used in the 80s which wasn't some big S100 type thing running CP/M...

The current BCPL compiler is pushing 50KB (binary) so running it on a 6502 is not going to happen - hence I went to the 65816. It was not all I expected and the effort of making it look like a 32-bit virtual machine to the underlying BCPL was not as easy as I felt I could have been - and it wasn't as fast as I felt it could have been.

I did manage to get the original Acornsoft ROM going on my original 6502 system, but it won't run on the 816, even in emulation mode - I've not spent too much time, but I think it's because I moved the OS vectors and the BCPL ROM has them encoded in some weird way that my system can't find (I moved the Acorn MOS vectors due to the clash with the hardware vectors in the '816 and I can patch the BBC Basic, COMAL, and a few other ROMs just fine).

I'm interested to know how you're getting on though - maybe you can become the 3rd active BCPL programmer on the planet ;-)

Cheers,

-Gordon

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 01, 2023 5:48 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
(Welcome Marty! Great service you did there, helping recover data for Martin Richards!)


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 02, 2023 3:46 am 
Offline

Joined: Tue Oct 31, 2023 11:57 pm
Posts: 7
Hi All;
Thank You Gordon and Ed for Your prompt reply..
I Found the BBC Code that I have from Martin Richards, and I have the code for 16 bit from R. Nortier (spelling may not be correct.)..
Today has been busy and it looks like tomorrow will be busy as well also..
I am Wire-wrapping my 6800 Board, that way I can add things like Led's and it should hold together better than the Breadboard, that Ben Eater uses in the kits..
I have Martin Richards book, but, I also know that there was a Book for the BBC implementation, that I need to get a PDF of, which should help some.. THANK YOU Marty


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 02, 2023 7:17 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
MartyG wrote:
Hi All;
Thank You Gordon and Ed for Your prompt reply..
I Found the BBC Code that I have from Martin Richards, and I have the code for 16 bit from R. Nortier (spelling may not be correct.)..
Today has been busy and it looks like tomorrow will be busy as well also..
I am Wire-wrapping my 6800 Board, that way I can add things like Led's and it should hold together better than the Breadboard, that Ben Eater uses in the kits..
I have Martin Richards book, but, I also know that there was a Book for the BBC implementation, that I need to get a PDF of, which should help some.. THANK YOU Marty


PDFs of the BBC Micro BCPL Books are online:

https://stardot.org.uk/forums/viewtopic.php?t=21166

-Gordon

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 02, 2023 3:26 pm 
Offline

Joined: Tue Oct 31, 2023 11:57 pm
Posts: 7
Hi All;

Thank You Gordon.. I will take a look at these files later..THANK YOU Marty


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 05, 2023 1:06 am 
Offline

Joined: Tue Oct 31, 2023 11:57 pm
Posts: 7
Hi All;
Ok, what I am looking for next is the following snippets of code that will run with CC65, they are memcpy, realloc, calloc, malloc and getvec and how do I run CC65 on my linux machine,, (Linux Mint)..

THANK YOU Marty


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 07, 2023 1:34 am 
Offline

Joined: Tue Oct 31, 2023 11:57 pm
Posts: 7
Hi All;
Correction, Robert Nordier not Nortier..
https://www.nordier.com/index.html
For His 16 bit stuff..

THANK YOU Marty


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 18, 2023 6:48 pm 
Offline

Joined: Thu Dec 26, 2002 12:29 pm
Posts: 51
Location: Occitanie, France
Hi, have you managed to get cc65 running on your Linux box? I have it running native on my (Mint) machine - I'll have to go and look at how I did it, though. Give a shout if you need help.

_________________
Glenn-in-France


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 18, 2023 9:11 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 745
Location: Germany
installing cc65 on linux is very simple, just do "sudo apt install cc65" in a terminal (assuming apt is the package manager) or use VScode and install the cc65 addon.
actually setting it up with a custom target is more complicated, but not by a lot as there is a small tutorial for it: https://cc65.github.io/doc/customizing.html


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

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