Non-EAE support in U/W FOCAL. A mostly not yet working prototype.

105 views
Skip to first unread message

William Cattey

unread,
Sep 12, 2025, 12:03:37 AMSep 12
to PiDP-8
I've decided to attempt to get a non-EAE version of U/W focal going. I don't have the chops to take the 8XFPP.PA and 8XFIO.PA modules and rewrite them to be non-EAE, but I have started writing a one-pager that substitutes for the EAE calls in those two modules. It currently mostly doesn't work.

I've got the MUY and DVI emulations passing basic smoke tests.

Check it out in the uwf branch of the PiDP-8/i repo at tangentsoft.com:
https://tangentsoft.com/pidp8i/timeline?r=uwf

I've got my module integrated into U/W FOCAL, building and walking, if not running:

```
RU RKA1:UWFNOE
*t 3
4.095864011E+03*T PI
3.141721908E+00*T 3
?22.65
*T 3
?22.65
*T PI
3.141721908E+00*
*T 3.1
?22.65
*^C
.$.[A^U
.RU RKA1:UWFNOE
*T 3 + 4
8.190766548E+03*^C
.R RKA1:UWFNOE
RKA1.SV NOT FOUND
.RU RKA1:UWFNOE
*T 2
4.098286172E+03*T 2
?22.65
*^C
```

Additional eyes on the code and helpful comments are most welcome.

-Bill

William Cattey

unread,
Sep 24, 2025, 10:31:23 AMSep 24
to PiDP-8
I found and fixed several issues.  It's much closer to working.

I added a test mode in the U/W FOCAL integration where the EAE computation is compared against the emulated one, and it halts if there's a difference.  This saved me a lot of single-instruction stepping to find the next bug. But then it started blowing out on known good test cases. The current code seems to corrupt the emulated values in a way I've not been able to see.  When I turn off the test mode, I get basic operation (but I have not tested the division emulation at all.)

Attached is the current code.  You rebuild U/W FOCAL with 8NFIO.PA and 8NFOO.PA instead of 8XFIO.PA and 8XFPP.PA.

Note that the uwf branch of the tangentsoft repository has this code checked in, and if you build from that source everything is ready to go to create UWFNOE.SV in the bin/uwfocal.rk05 build image.


I'd be SUPER grateful for another pair of eyes on this.  What HAVE I done wrong???

-Bill
8NFPP.PA
8NFIO.PA

William Cattey

unread,
Oct 2, 2025, 12:17:32 AMOct 2
to PiDP-8
Carefully choosing what research, and grunt work I assigned to chatgpt, I have got a version of 8NFIO that passes basic smoke tests! It's checked into tangentsoft and attached below.

I think this is a reasonable basis for getting UWF16K running on hardware without EAE!

-Bill


8NFIO.PA

Vincent Slyngstad

unread,
Oct 2, 2025, 2:06:32 PMOct 2
to PiDP-8
I built a non-EAE focal using your sources, and my pdp8.ini contains:
sh cpu
set cpu noeae
sh cpu
load noeae.bin
reset
go 0200

I get a HLT:
HALT instruction, PC: 13435 (TAD 3462)

(This doesn't happen if I leave the EAE enabled.)

William Cattey

unread,
Oct 2, 2025, 5:57:27 PMOct 2
to PiDP-8
Sorry for the inconvenience.  There is self-test code that is currently enabled by default.
Look for the line, "EMTEST=1" in 8NFIO.PA and remove the line.  Then the "repeat emulation with EAE and halt on difference" test system will be disabled.

-Bill

Vincent Slyngstad

unread,
Oct 2, 2025, 9:22:46 PMOct 2
to PiDP-8
I also had to tweak the treatment of TESTME. I had to make it undefined, and then the tests in 8nfio.pa around CMPEAE needed to be IFDEF instead of IFNDEF.

Hopefully that got me the intended result.  (It does run now.)

William Cattey

unread,
Oct 2, 2025, 10:42:53 PMOct 2
to PiDP-8
Yes. I was doing a cleanup pass today and saw that I wrapped the calls to CMPEAE with the wrong conditional. They should be "IFDEF EMTEST" not "IFNDEF TESTME".

-Bill

William Cattey

unread,
Oct 3, 2025, 2:48:03 PMOct 3
to PiDP-8
There's still at least one bug in the division emulation. Certain even divisions aren't succeeding.
With testing enabled:

RU RKA1:UWFNOE
*T 9 / 3

HALT instruction, PC: 13442 (MQA)

sim> e 13456-13464
13456: 6000
13457: 0000
13460: 2200
13461: 2000
13462: 0000
13463: 0000
13464: 0000
sim> e mq
MQ: 3000
sim> e 10010
10010: 3525

This says, "22000000 / 6000 should return AC=0, SAVMQ=3000, but instead is returning AC=2000, SAVMQ=3525."
I've added this stand-alone test, and will be debugging over the weekend.

I also want to verify that a zero dividend properly returns just zero.

"Math is hard. Let's go shopping!" -- Barbie

William Cattey

unread,
Oct 5, 2025, 11:36:23 PM (13 days ago) Oct 5
to PiDP-8
Ok, I found that bug.  
Like the guy who spells "banana" as "bananananananananana" because he doesn't know when to stop, I needed to add code to notice that the remainder was zero and the DVLOOP needed to stop subtracting.  I've just checked in that code. It's sub optimal, but passes all known tests.
Vince Slyngstaad pointed me at DECUS 8-436 as an EAE emulator. I'll check that out.
-Bill

William Cattey

unread,
Oct 6, 2025, 11:10:22 PM (12 days ago) Oct 6
to PiDP-8
The code in DECUS 8-436 was most helpful.  Their DVI emulation was smaller than mine and mostly compatible.
I integrated it, and found another optimization that shrankd the code a further two precious words.
Then I re-implemented the test harness simplification that I tried to make last week.  This time it seems correct.
Finally the smaller footprint meant that I could move the SWPEM emulation into the page with MUL and DVI.

Ok. Everybody, beat on this one! It's all checked into tangentsoft.

-Bill
Reply all
Reply to author
Forward
0 new messages