User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
Preparations are starting for decoding the Intel 80286 microcode, which we will hopefully have images of soon.

We can actually start figuring a few things out already, even without the bit extraction.

The 80286 has a 35-bit microcode word. This is straightforward to determine - there are 35 outputs coming out of the microcode ROM.

35 bits is a lot larger than the microcode word of the 286's little brother, the 186. The 80186 has a 21-bit microcode word, which is no bigger than the 8088.

It's much closer to the 80386, which has a 37-bit microcode word. Suspiciously close, in fact.

3
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
Here's the 386's word format.
| Field                        | 386 bits |
| ---------------------------- | -------: |
| Source selector              |        6 |
| Destination selector         |        7 |
| ALU source / branch offset   |        6 |
| ALU operation / branch cond. |        7 |
| Opcode                       |        3 |
| Subcode                      |        2 |
| Bus control                  |        6 |
| Total                        |       37 |
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
It's somewhat easy to see the field delineations on the die, using @infosecdj 's beautiful die images of the NMOS 80286 that, unfortunately, revealed an unreadable implant ROM.

Fields can be ascertained by the way the ROM outputs run off in groups.

Here we can see the first microcode fields are 6, 6 and 6 bits.

omg mark of the beast.
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
here's the other half. it kinda looks like one output goes off on its own, but i think it's just doing a sneak and it's joining up with the 4 lines above.

This makes the 286 have the same microcode field layout, except the Destination and Bus control fields are one bit smaller.
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
If that's true, that would give us this table.
| Field                        | 386 | 286 |
| ---------------------------- | --: | --: |
| Source selector              |   6 |   6 |
| Destination selector         |   7 |   6 |
| ALU source / branch offset   |   6 |   6 |
| ALU operation / branch cond. |   7 |   7 |
| Opcode                       |   3 |   3 |
| Subcode                      |   2 |   2 |
| Bus control                  |   6 |   5 |
| Total                        |  37 |  35 |
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
But does this make sense?

It kinda does. The 386 has more destinations - it added a bunch of debug registers, the FS and GS segments, etc. So it would need a larger destination selector.

As for bus control, the picture is similar. The 286 doesn't need the 386's DWORD-sized transfer codes, nor
SPCR or LPCR. That leaves us with 32 values for bus control. Oh hey, that fits in 5 bits.
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
So if we have the same source selector size, what are the chances that the source values are mapped the same?

I'm betting dollars to donuts that the values 0-7 are AX,CX,DX,BX,SP,BP,SI,DI, just like intel always orders things.
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
I find this very interesting, that the 386 microcode is just sort of a wider 286. GIven how the 286 was sort of a janky piece of shit and the 386 was Intel's killer chip that basically cemented the PC as the dominant home computer, I think that's pretty surprising.
4
1
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
Anyway, we don't have to sit around on arse until we get the get the microcode bits. The 286 has a number of PLAs we can extract in the meantime.

Here's what I think is the instruction match decoder.

Look at how pretty this is.
@infosecdj is a wizard.

see the full shot here:
infosecdj.net/map/intel/80286/infosecdj_nikpa20x/
4
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
ENHANCE

this is some fucking crazy high resolution.

Pairs of horizontal lines are the same input signal, and its complement. This allows matching a 0 (if one side has a transistor) or a 1 (if the other side has a transistor) or acting as a wildcard (if neither side has a transistor).

This gives patterns like

01010???110

which serves as a mask that can be used to match multiple opcodes, so that they can share the same microcode.
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
Here are some wildcards.

I'm not sure of the 'polarity' but for example the middle two rows here are basically

0???????1???
??0?????????

The actual matching is in column-order, though.
1
0
0
0
User avatar
gloriouscow @gloriouscow@oldbytes.space
1mo
How big is this photomosaic?

As a single jpeg it's 389MB. As a photoshop PSB it's 17.9GB.

Opening the PSB makes my computer cry a lot.
2
1
0
0
User avatar
sijmen @sijmen@shrimp.vijf.life
1mo
@gloriouscow this bad boy measures over $250 in ddr5
0
0
1
0