PDA

View Full Version : AT&T 3B2 Emulator - Still working on it!



Twylo
February 21st, 2016, 12:26 PM
Hi folks,

Just a general update, I'm still working on my AT&T 3B2 emulator based on the SIMH platform. It lay dormant for almost a year while I was dealing with life matters, but I've recently dived back in with a vengeance.

I'm still desperately seeking any documentation or schematics that anyone might have related to the 3B2. I've scoured the Internet pretty well, so anything that's online I probably already have. I'm hoping that my pleading for docs will eventually uncover some printed documents that aren't yet online. I'm ESPECIALLY interested in the documents "AT&T 3B2 and 3B5 Computer Driver Design Guide" and "AT&T 3B2 Computer Feature Card Interface Design Manual", neither of which appear to be online anywhere. If you have either of them, let's talk -- I just want to scan them, not keep them.

For reference, I'm keeping notes about 3B2 internals here: http://www.loomcom.com/3b2/

Best Wishes,

-Twylo

shattered
February 23rd, 2016, 12:37 PM
Nice! Could you rebase your source tree to head of SIMH? I hope to restart my work on dmd5620 sim soon, too.

Twylo
February 24th, 2016, 10:47 AM
Well, I very badly screwed up my rebase. I'm not surprised, given I was about 14 months out of sync with upstream. The real problem is that I tried to use the GitHub desktop client for the first time, and ended up pushing a terrible state to my repository. Rather than try to undo that mess, I basically restarted from scratch by forking simh/simh again, dropping my 3B2 directory into it, and starting a new fork.

Shattered, that means if you were based off of my fork, you'll have to do some manual work to sync up your changes to the new repository. I'm so sorry about that :(

The good news is that no work has been lost.

From now on, I will keep my fork in sync with upstream to prevent any rebasing problems in the future.

-Twylo

shattered
February 24th, 2016, 12:56 PM
Shattered, that means if you were based off of my fork, you'll have to do some manual work to sync up your changes to the new repository. I'm so sorry about that :(

-Twylo

No big deal -- I've synced my changes.

By the way -- commits from the old fork are still there: https://github.com/sethm/simh/commit/46b9d4342719b843d5cd52081ded239a9021da5c etc.

Twylo
March 6th, 2016, 09:07 PM
Just a quick note to say that I'm getting really, really close to booting UNIX in the emulator. I've implemented just enough of the MMU to support virtual space for the kernel. It's dying during boot because the free page table is corrupted somehow, but I'm working actively on it.

We're getting there!

29994

ScutBoy
March 8th, 2016, 12:21 PM
Good on you! Watching with interest!

madcrow
March 11th, 2016, 12:53 PM
Somehow, the idea of being able to use an emulated 3B2 from a simulated BLIT terminal makes very happy. I'll be watching this space with interest.

shattered
March 14th, 2016, 02:15 AM
5620 actually is not the original BLIT, but if anyone can share ROM images for the BLIT and a technical manual, it should be much easier to emulate -- since it uses m68k, not we32k cpu.

Twylo
March 20th, 2016, 12:06 PM
Still more progress, but it feels like one step forward, two steps back. Floppy commands are timing out, and I'm not entirely sure why. Sure wish I had better documentation!

30216

bear
March 20th, 2016, 09:34 PM
That trap looks a lot like the error I got on my old /300 (with the WE32000) when I had the wrong ROMs (for the newer WE32100-based /310 and /400) in it. The standalone utilities disk would work and I was able to format a new drive with the machine in that state, but I couldn't boot any version of UNIX until I got the correct ROMs installed.

...wish I'd saved the console log from those sessions so I could say for sure that was the trap I got.

ClassicHasClass
March 21st, 2016, 06:45 AM
This looks awesome. Can't wait to port your fork to PowerPC. :)

Twylo
March 21st, 2016, 10:35 AM
That trap looks a lot like the error I got on my old /300 (with the WE32000) when I had the wrong ROMs...

I figured out the TRAP, luckily. A bug in the CPU code was setting the Z flag incorrectly, so it was jumping to the wrong location and loading garbage data as an instruction. I'm shocked I didn't find it earlier.

Current status: It's now made it past initing process 0, and it's sitting in a sleep() loop waiting for interrupts. I'm honestly not sure what interrupts it expects. I sure wish I had documentation, but alas, it's unobtanium. I'm still just reverse-engineering everything and applying copious amounts of Trial-and-Error.

bear
March 21st, 2016, 10:54 AM
A timer interrupt, perhaps?

Twylo
March 21st, 2016, 11:51 AM
A timer interrupt, perhaps?

From my reverse engineering so far, there seem to be three sources of timer interrupts:


The realtime clock, which interrupts at priority level 11 every 100 Hz.
The 2861 DUART timer, which issues priority level 9 interrupts based on UART timer settings.
The 8253 interval timer, which may issue priority level 8 and 9 interrupts (I think?) based on 8253 timer settings.


I've been using the SVR3 source code to reverse engineer what these interrupts drive. There are precious few comments in the code, so the source of interrupts has been a combination of guesswork and assumption.

I'm very certain that the 100Hz RTC is generating the right interrupts at the right time, now. I can watch the RTC clock interrupt handler running and doing its thing. I'm also fairly confident that the UART timer is working correctly. But, I'm much less confident in the 8253 timer. That one remains total guesswork, and is probably the source of my woes. Maybe. Potentially :)

Twylo
March 22nd, 2016, 09:17 AM
From my reverse engineering so far, there seem to be three sources of timer interrupts

Aha!! I was wrong. I'm just replying here to keep track of what I've discovered.

So, there really are only TWO sources of timer interrupts, as I confirmed by more careful study of the SVR3 source code (and some basic reasoning I should have done earlier).

The only two timer clock sources on the 3B2 are:


The 2861 DUART timer.
The 8253, which has three separate timers.


The 100Hz RTC is provided by Timer B on the 8253. Timer A provides a sanity timer. Timer C appears not to be used.

tingo
March 22nd, 2016, 02:34 PM
Nice progress - I'm following this with interest.

shattered
May 11th, 2016, 02:52 PM
Nice! Could you rebase your source tree to head of SIMH? I hope to restart my work on dmd5620 sim soon, too.

Progress: (Note to self: SIMH's terminal multiplexer abstraction runs at unlimited speed which breaks emulation. it has to be capped at 19200 bps or slower. -- https://github.com/simh/simh/issues/246)

https://img-fotki.yandex.ru/get/59977/264743.3/0_b412f_efca86ec_XL.png (https://fotki.yandex.ru/next/users/shattered/album/137130/view/737583)
DMD 5620: connected to TELEHACK

shattered
May 16th, 2016, 04:17 PM
simulation is mostly working, I guess now it's time to find out how to actually use this device as intended (with 'layers')...

https://img-fotki.yandex.ru/get/135639/264743.3/0_b4222_898951a9_orig.png (https://fotki.yandex.ru/next/users/shattered/album/137130/view/737826)
Emulated DMD 5620 connected to BSD machine, dvidmd man page displayed

shattered
May 25th, 2016, 02:13 PM
More progress. This is layers running 'jim' text editor and 'crabs' "malware":
https://img-fotki.yandex.ru/get/58454/264743.4/0_b4386_363cb63e_orig.png (https://fotki.yandex.ru/next/users/shattered/album/137130/view/738182)
DMD 5620: jim infested by crabs

shattered
May 28th, 2016, 04:27 AM
I've compiled a partial list of interesting AT&T documentation (from "The AT&T Documentation Guide"s and other sources) -- most of it is not online, though.

The list -- https://gist.github.com/shattered/0da820cf7031c8a3ff93d663852da83e

shattered
May 31st, 2016, 01:54 PM
aaaaand this is what this emulation effort was about:

https://img-fotki.yandex.ru/get/29408/264743.4/0_b441f_6af1abcd_orig.png (https://fotki.yandex.ru/next/users/shattered/album/119824/view/738335)
DMD 5620: Getting Back At Corporate America (GEBACA)

ClassicHasClass
June 1st, 2016, 03:36 PM
Well, that's very serious businesses. :)