Unix on the Beeb

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
hoglet
Posts: 6629
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Unix on the Beeb

Postby hoglet » Fri Nov 10, 2017 3:25 pm

RobC wrote:I've been looking at building the PDP11 emulator for the native Pi copro and have now figured out how to build C executables for it and have the stubs library connected up.

Unfortunately, the emulator needs more than the current limit of 2MB as it is complaining that it can't allocate enough memory for its buffers. (I had similar issues on the Matchbox ARM2 core).

How are you determining the current amount of available memory? OS_GetEnv?

It should be pretty easy to make 16MB available, just by changing this line and recompiling:
https://github.com/hoglet67/PiTubeDirec ... ive.c#L195

Would 16MB be enough?

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: Unix on the Beeb

Postby RobC » Fri Nov 10, 2017 4:54 pm

Thanks - 16MB should be more than enough as it runs on the 4MB ARM 2 core.

I'll have a look at recompiling it with 16MB.

EDIT: Thanks to Dave's suggestion, I now have the Pi CoPro reporting 16MB from BAS135. Still can't get the PDP-11 emulator working though as it's now hanging when trying to boot the disk image. I'll try to do some debugging later today rugby watching permitting!

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: Unix on the Beeb

Postby RobC » Wed Nov 15, 2017 4:20 pm

I've now got this working on the native Pi co-pro. It needs the changes implemented in the Diamondback dev release but seems to be running happily on my 1GHz Pi Zero.

As expected, it's much faster than the ARMTDMI and certainly feels comparable to my recollections of using Unix on a mainframe in the early 90s.

I'll do some more testing over the next few days and will post up the binary. I'll also bring it along to ABUG if anyone wants a play...

User avatar
fordp
Posts: 923
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Unix on the Beeb

Postby fordp » Wed Nov 15, 2017 5:39 pm

RobC wrote:I've now got this working on the native Pi co-pro. It needs the changes implemented in the Diamondback dev release but seems to be running happily on my 1GHz Pi Zero.

As expected, it's much faster than the ARMTDMI and certainly feels comparable to my recollections of using Unix on a mainframe in the early 90s.

I'll do some more testing over the next few days and will post up the binary. I'll also bring it along to ABUG if anyone wants a play...

Cool!
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

Coeus
Posts: 474
Joined: Mon Jul 25, 2016 11:05 am

Re: Unix on the Beeb

Postby Coeus » Wed Nov 15, 2017 7:04 pm

So, if I understand correctly we have a PDP emulator running on a real ARM in the form of Pi Tube Direct. In all of that do we have a portable (e.g C) PDP emulator or is it in ARM assembler?

User avatar
jgharston
Posts: 2764
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Unix on the Beeb

Postby jgharston » Wed Nov 15, 2017 7:16 pm

Coeus wrote:So, if I understand correctly we have a PDP emulator running on a real ARM in the form of Pi Tube Direct. In all of that do we have a portable (e.g C) PDP emulator or is it in ARM assembler?

There's a portable PDP Emulator here, written in BBC BASIC. :)

Currently, single memory space, no MMU, but all Unix TRAPs are implemented.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: Unix on the Beeb

Postby RobC » Wed Nov 15, 2017 7:56 pm

Coeus wrote:So, if I understand correctly we have a PDP emulator running on a real ARM in the form of Pi Tube Direct.

Yes.

Coeus wrote:In all of that do we have a portable (e.g C) PDP emulator or is it in ARM assembler?

It's based on the Sanos PDP11 SimH emulator which is in C:
http://www.jbox.dk/sanos/pdp11.htm

It only needed a few minor changes to get it to work on the Arc, RiscPC and matchbox ARM 2 copro using the Norcroft compiler. I had to add some ARM assembler (for startup and newlib stubs) to get it to work under gcc for the ARMTDMI and native Pi copros.


Return to “hardware”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests