PDP11 Co Pro Client ROM

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
hoglet
Posts: 6479
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

PDP11 Co Pro Client ROM

Postby hoglet » Tue Jul 18, 2017 1:44 pm

(continued from here)

jgharston wrote:I think I've fixed the Soft-Break-re-entry problem in the PDP11 Client. It seems to be two different bugs interacting with each other. Test build at:
http://mdfs.net/Software/Tube/PDP11/updates.htm

As the PDP11 Client is configured as ROM I haven't been able to test it in my Matchbox, and it's difficult to test with the emulator as that doesn't use the NMI system for data transfers.

I've re-built the Matchbox firmware with:
- PDP-11 Client ROM v0.26a
- 6809 Client ROM 1.02c

I'm happy to do some testing of this.

What would be very helpful is if you could put together an .ssd disk image for each Co Pro that contains what ever test programs you think are useful.

Dave

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Tue Jul 18, 2017 8:23 pm

hoglet wrote:What would be very helpful is if you could put together an .ssd disk image for each Co Pro that contains what ever test programs you think are useful.

TubeUtil.ssd at mdfs.net/Tube/
Basic09 - Microsoft BASIC for 6809
Basic11 - BBC BASIC for PDP11
Basic80 - BBC BASIC for Z80
ARMBas - BBC BASIC for ARM, executable
M.ARMBas - BBC BASIC for ARM, module
TUBEOFF - disable Tube
TUBEON - enable Tube
TEST11 - Test PDP11 Tube client - prints various test data
TEST65 - Test 6502 Tube client - prints various test data, tests if extended MOS entries present
TEST09 - Test 6809 Tube client - prints various test data
ROMS - list ROMs
MDUMP - dump memory
GO - execute code
Environ - Print BASIC environment
ClockSp - Test BASIC clock speed.

I'm currently in an interregnum in my attempt to enter Ireland caused by RyanAir's stupidity. Had to explain over the telephone to Irish Immigration why I wasn't present to vouch for my nephews arriving at Dublin from Hong Kong.

Code: Select all

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

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Tue Jul 18, 2017 8:33 pm

Results from the tests should include:
TestXX: MEMTOP and MEMBOT should look sensible. 0100-F800 on 6809 and PDP11, 800-F800 on 6502.
The various calls TestXX makes should give results that make sense on context of what it says its testing
When TestXX is paused, pressing Break should re-enter the caller (the supervisor if you haven't run anything else)
When BasicXX is paused, pressing Break should re-enter BasicXX. Pressing Break again should re-enter again. And again.
With BasicXX loaded into a sideways ROM:
*BASIC should select it
Ctrl-Break should select it
Break should re-enter it
Attempting to enter a 6502 language should give Not XXX code or Not a language
(eg if PDP11 BASIC is in ROM, and PDP11 CoPro is selected, *WORD should give an error)
If all the BasicXX ROMs are loaded, the one relevant to the selected CoPro should be the one selected with *BASIC/Ctrl-Break, and all others should give an error if you try to enter then with *Fx142,romnumber

Edit: I think I've not put the *BASIC selection code in the 6809 Microsoft Basic, so you'll have to select it with *FX142,romnumber.

Code: Select all

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

User avatar
hoglet
Posts: 6479
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: PDP11 Co Pro Client ROM

Postby hoglet » Wed Jul 19, 2017 11:06 am

Hi Jonatham,

Some results from testing 0.26a on a Master with an updated Matchbox.

*RUN TEST11

IMG_0990.JPG

jgharston wrote:TestXX: MEMTOP and MEMBOT should look sensible. 0100-F800 on PDP11.

MEMBOT is F500 not F800.

The only other possible bug is that the CMD string is slightly different, depending on how the program is invoked.
jgharston wrote:The various calls TestXX makes should give results that make sense on context of what it says its testing

There seems to be less to this test than the 6809 one.
jgharston wrote:When TestXX is paused, pressing Break should re-enter the caller (the supervisor if you haven't run anything else)

This test doesn't seem to pause.

*RUN R.BASIC11

IMG_0991.JPG

jgharston wrote:When BasicXX is paused, pressing Break should re-enter BasicXX. Pressing Break again should re-enter again. And again.

It does.

Basic09 loaded into a sideways ROM

jgharston wrote:*BASIC should select it,

It does.
jgharston wrote:*FX142,romnumber should select it,

It does.
jgharston wrote:Ctrl-Break should select it

It does.
jgharston wrote:Break should re-enter it

It does.
jgharston wrote:Attempting to enter a 6502 language should give Not XXX code or Not a language

I've tested with *FX 142,14 and *WORD and both seem to give the same results:

- From the Supervisor prompt you get "Not PDP11 code".

- From BASIC11 (*RUN R.BASIC11) you get "Not PDP11 code" and then the * supervisor prompt. At this point if you hit break, sometimes it returns to BASIC11, and sometimes it returns to the * supervisor prompt.

- From BASIC11 in ROM (*BASIC or *FX 142,4) you get "This is not a language" and you stay in BASIC11. At this point if you hit break you always return to BASIC11.

jgharston wrote:If all the BasicXX ROMs are loaded, the one relevant to the selected CoPro should be the one selected with *BASIC/Ctrl-Break, and all others should give an error if you try to enter then with *Fx142,romnumber

This seems to be working correctly·

Regardless of the seeting of *CONF. LANG you end up in BASIC11 on Ctrl-Break, and *BASIC selects BASIC11 not 6502 Basic.

(Unlike with the 6809 Co Pro, where it will only enter BASIC09 if *CONF. LANG points to that ROM.)

Dave

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Mon Jul 24, 2017 8:33 am

Ok, I've got all these scribbled down (plus the 6809 ones). I will probably have a look at them when havign lunch somewhere high above Cork. :)

Edit: and I've just thought, I think all the clients parse the command line incorrectly when given this:
*/ testXX with a space after the slash

displaying the same bug as the PDP11 client with *RUN.

Code: Select all

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

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Tue Jul 25, 2017 10:09 pm

PDP11 Tube Client version 0.26 build Blarney Castle
Data transfers don't mess with ADDRHI variable, rationalised ADDRHI/ADDR/TRANS/PROG variables.
See http://mdfs.net/Software/Tube/PDP11/updates.htm

I can't see from the code how the 'Not PDP11 code' error is returning to BASIC, the first thing that error does it connect the error handler to the Supervisor. I've only tested it with the emulator, when I get home I can do some hardware testing.

Code: Select all

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

User avatar
hoglet
Posts: 6479
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: PDP11 Co Pro Client ROM

Postby hoglet » Thu Jul 27, 2017 10:14 am

Hi Jonathan,

I've done a bit of testing with 0.26b

The issue with failing to re-enter BASIC after a second break is sill present:
- Ctri Break - Language transfer successful and BASIC is loaded
- 1st Normal Break - BASIC is re-entered
- 2nd Normal Break - back at supervisor prompt

There are still variations in the value of CMD >< in TEST11, depending on how it's invoked. Were you expecting any differences in behaviour there?

Dave

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Sun Jul 30, 2017 6:11 pm

hoglet wrote:There are still variations in the value of CMD >< in TEST11, depending on how it's invoked. Were you expecting any differences in behaviour there?

No, I haven't attempted to fix the *RUN bug yet. What I expect you will be getting is:
>*Test11 this is the command line
CMD=>this is the command line<
>*/Test11 this is the command line
CMD=>this is the command line<
>*RUN Test11 this is the command line
CMD=>Test11 this is the command line<
>*/ Test11 this is the command line
CMD=>Test11 this is the command line<

I'm back at home with my hardware and have caught up on other things (pictures!), so can do some better tests.

Code: Select all

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

User avatar
hoglet
Posts: 6479
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: PDP11 Co Pro Client ROM

Postby hoglet » Tue Aug 01, 2017 3:40 pm

jgharston wrote:I'm back at home with my hardware and have caught up on other things (pictures!), so can do some better tests.


hoglet wrote:The issue with failing to re-enter BASIC after a second break is sill present:
- Ctri Break - Language transfer successful and BASIC is loaded
- 1st Normal Break - BASIC is re-entered
- 2nd Normal Break - back at supervisor prompt

Here's a dump of the relevant state after the Ctrl and 1st normal break.

Code: Select all

                After   After
                Ctrl    1st Normal
                Break   Break
&F5F4 (MEMBOT)  0100    0100
&F5F6 (MEMTOP)  F500    F500
&F5F8 (  ADDR)  B000    0100
&F5FA ( TRANS)  0100    F83E
&F5FC (  PROG)  0100    F83E

(I'm dumping the state by running a small BASIC program)

I don't fully understand the need for three different program address variables: ADDR, TRANS and PROG, but it seems this isn't working properly.

Dave

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Sat Aug 05, 2017 6:40 pm

Had a d'oh! moment earlier today.

When code without a ROM header is entered, it sets TRANS as the last-entered code, so that code can become the current application and be re-entered on Soft-Break. When code without a ROM header is entered, it doesn't set TRANS, as as it doesn't have a header it's just a piece of raw code rather than an application.

However, when BASIC is entered, it has a Unix header and is moved down to the bottom of memory to run. Which means the entered code - in low memory - does not have a ROM header. So on the next Soft-Break it is treated as raw code, and TRANS wasn't being set, so when BASIC claimed the environment, PROG was being set to 'no current program'.

Version 0.26 Build C fixes this, TRANS is set the the entry address of the entered code, so when BASIC claimes the evironment, PROG (the current program) is correctly set, and testing on the emulator shows it being correctly re-entered on Soft-Break.

If this works on hardware, I'll roll on the version, and work on fixing the *RUN LPTR bug.

Code: Select all

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

User avatar
hoglet
Posts: 6479
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: PDP11 Co Pro Client ROM

Postby hoglet » Sun Aug 06, 2017 1:13 pm

Jonathan,

It looks like 0.26c resolves the issue - I can do several normal breaks and get back to Basic each time.

Dave

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

Re: PDP11 Co Pro Client ROM

Postby jgharston » Fri Aug 11, 2017 8:22 pm

hoglet wrote:It looks like 0.26c resolves the issue - I can do several normal breaks and get back to Basic each time.

Wonderful.
Version 0.27 build A fixes the *RUN bug:
* '*RUN filename params' and '*/ filename params' skips filename to set LPTR

I'm now down to about 16 bytes free. Having fixed 16-bit instruction lengths certainly bulks up the code to do a task compared to variable multiples of 8 bits.

Code: Select all

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


Return to “software: other”

Who is online

Users browsing this forum: No registered users and 4 guests