Skip to content

Commit 8c44da6

Browse files
committed
Documentation additions
1 parent b5850f1 commit 8c44da6

File tree

5 files changed

+86
-17
lines changed

5 files changed

+86
-17
lines changed

zdocs/developers/awacs.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ All registers are 32-bit here.
2626
| Codec Status | 0x20 |
2727
| Clipping Count | 0x30 |
2828
| Byte Swapping | 0x40 |
29+
| Frame Count | 0x50 |
30+
31+
##Sound Control Register bits
32+
33+
| Register | Bit Mask |
34+
|:-------------------------:|:--------:|
35+
| Input Subframe Select | 0x000F |
36+
| Output Subframe Select | 0x00F0 |
37+
| Sound Rate | 0x0700 |
38+
| Error | 0x0800 |
2939

3040

3141
Separate volume controls exist for the CD drive and the microphone.

zdocs/developers/bebox.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ It also has a unique 37-pin connector dubbed the Geekport to allow hobbyists to
1010

1111
* MPC105 PCI Bridge (Codename: Eagle) - Predecessor to the MPC106 (Grackle); Used for bridging between the motherboard and PCI slots
1212
* Intel 82378ZB - Used for bridging between the motherboard and ISA slots
13+
* SYM53C810A - SCSI I/O Processor
1314
* bq3285 - Used for the Real-Time Clock
1415

1516
### Motherboard registers

zdocs/developers/powerpc.md renamed to zdocs/developers/cpu/powerpc/powerpc.md

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
The PowerPC is the main processor behind Power Macs. Currently, DingusPPC only implements the 32-bit variant.
1+
The PowerPC is the main processor used for Power Macs. Currently, DingusPPC only implements the 32-bit variant.
22

33
# General Notes
44

55
All instructions are 32 bits wide, regardless of whether the PowerPC is in 32-bit or 64-bit mode.
66

7-
Code execution generally begins at 0xFFF00100, which the reset exception vector.
8-
97
# BATs
108

119
The 601 BATs are emulated by the Open Firmware.
@@ -27,17 +25,17 @@ Up to 128 instruction entries and 128 data entries can be stored at a time.
2725

2826
# Registers
2927

30-
| Register Type | Number | Purpose |
31-
| :-------------------------------- | :--------------------- | :---------------------------------------------------- |
32-
| General Purpose (GPR) | 32 | Calculate, Store, and Load 32-bit fixed-point numbers |
33-
| Floating Point (FPR) | 32 | Calculate, Store, and Load 32-bit or 64-bit floating-point numbers |
34-
| Special Purpose (SPR) | Up to 1024 (in theory) | Store and load specialized 32-bit fixed-point numbers |
35-
| Segment (SR) | 16 | Calculate, Store, and Load 32-bit fixed-point numbers |
36-
| Time Base Facility (TBR) | 2 | Calculate, Store, and Load 32-bit fixed-point numbers |
37-
| Condition Register | 1 | Stores conditions based on the results of fixed-point operations |
38-
| Floating Point Condition Register | 1 | Stores conditions based on the results of floating-point operations |
39-
| Vector Status and Control Register (VSCR) | 1 | Stores conditions based on the results of vector operations |
40-
| Machine State Register | 1 | |
28+
| Register Type | Number | Purpose |
29+
| :----------------------------------------- | :--------------------- | :------------------------------------------------------------------ |
30+
| General Purpose (GPR) | 32 | Calculate, Store, and Load 32-bit fixed-point numbers |
31+
| Floating Point (FPR) | 32 | Calculate, Store, and Load 32-bit or 64-bit floating-point numbers |
32+
| Special Purpose (SPR) | Up to 1024 (in theory) | Store and load specialized 32-bit fixed-point numbers |
33+
| Segment (SR) | 16 | Calculate, Store, and Load 32-bit fixed-point numbers |
34+
| Time Base Facility (TBR) | 2 | Calculate, Store, and Load 32-bit fixed-point numbers |
35+
| Condition Register | 1 | Stores conditions based on the results of fixed-point operations |
36+
| Floating Point Condition Register | 1 | Stores conditions based on the results of floating-point operations |
37+
| Vector Status and Control Register (VSCR) | 1 | Stores conditions based on the results of vector operations |
38+
| Machine State Register (MSR) | 1 | Stores the state of the processor |
4139

4240

4341
# Special Registers
@@ -50,6 +48,9 @@ Up to 128 instruction entries and 128 data entries can be stored at a time.
5048
| RTC Lower Register (RTCL) | 5 | (601 only) |
5149
| Link Register (LR) | 8 | |
5250
| Counter Quotient Register (CTR) | 9 | |
51+
| Search Description Register (SDR1)| 25 | Specifies starting address of the page table |
52+
| Save and Restore Register 0 (SRR0)| 26 | |
53+
| Save and Restore Register 1 (SRR1)| 27 | |
5354
| Vector Save/Restore | 256 | (G4+) |
5455
| Time Base Lower (TBL) | 268 | (603+) |
5556
| Time Base Upper (TBU) | 269 | (603+) |
@@ -58,7 +59,7 @@ Up to 128 instruction entries and 128 data entries can be stored at a time.
5859
| Hardware Implementation 0 (HID0) | 1008 | |
5960
| Hardware Implementation 1 (HID1) | 1009 | |
6061

61-
# HID 0
62+
## HID 0
6263

6364
| Model | Bits Enabled |
6465
| :------------ | :------------------ |
@@ -70,6 +71,34 @@ Up to 128 instruction entries and 128 data entries can be stored at a time.
7071
| 604E | NHR |
7172
| 750 (G3) | NHR, DOZE/NAP/SLEEP |
7273

74+
# Exceptions
75+
76+
nnn is either 0x000 or 0xFFF, depending on the 25th bit (0x40) set in the MSR. Usually, the 25th bit is set when booting up a system and unset after it is set.
77+
78+
| Exception | Address |
79+
| :------------------------------------ | :--------- |
80+
| System Reset | 0xnnn00100 |
81+
| Machine Check | 0xnnn00200 |
82+
| DSI | 0xnnn00300 |
83+
| ISI | 0xnnn00400 |
84+
| External Interrupt | 0xnnn00500 |
85+
| Alignment | 0xnnn00600 |
86+
| Program | 0xnnn00700 |
87+
| Floating Point Unavailable | 0xnnn00800 |
88+
| Decrementer | 0xnnn00900 |
89+
| System Call | 0xnnn00C00 |
90+
| Trace | 0xnnn00D00 |
91+
| Performance Monitor (G3+) | 0xnnn00F00 |
92+
| AltiVec Unavailable (G4+) | 0xnnn00F20 |
93+
| Instruction Address Breakpoint (G3+) | 0xnnn01300 |
94+
| System Management Interrupt (G3+) | 0xnnn01400 |
95+
| AltiVec Assist (G4+) | 0xnnn01600 |
96+
| Thermal Management Interrupt (G3+) | 0xnnn01700 |
97+
98+
# Endianness
99+
100+
PowerPC supports both big-endian and little-endian modes. Mac OS largely operates in big-endian mode, due to its 68k heritage.
101+
73102
# Eccentricities
74103

75104
* The HW Init routine used in the ROMs uses the DEC (decrement; SPR 22) register to measure CPU speed. With a PowerPC 601, the DEC register operates on the same frequency as RTC - 7.8125 MHz but uses only 25 most significant bits. In other words, it decrements by 128 at 1/7.8125 MHz.

zdocs/developers/dbdma.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Description-Based Direct Memory Access (DBDMA) relies on memory-based descri
1414
| AUDIO IN | 0x9 |
1515
| SCSI1 | 0xA |
1616

17-
What's notable about the registers is that they are in little-endian format.
17+
What's notable about the registers is that they are in little-endian format, thus Mac OS uses the stwbrx and lwbrx instructions to store values.
1818

1919
| Register | Offset |
2020
|:-----------------:|:------:|
@@ -52,7 +52,20 @@ What's notable about the registers is that they are in little-endian format.
5252
| KEY_SYSTEM | 0x6 |
5353
| KEY_DEVICE | 0x7 |
5454

55-
# References
55+
## Control Register
56+
57+
| Value | Offset |
58+
|:-----------:|:------:|
59+
| Branch | 0x100 |
60+
| Active | 0x400 |
61+
| Dead | 0x800 |
62+
| Wake | 0x1000 |
63+
| Flush | 0x2000 |
64+
| Pause | 0x4000 |
65+
| Run | 0x8000 |
66+
67+
68+
## References
5669

5770
* https://stuff.mit.edu/afs/sipb/contrib/doc/specs/protocol/chrp/chrp_io.pdf
5871
* https://stuff.mit.edu/afs/sipb/contrib/doc/specs/protocol/chrp/chrp_hrpa.pdf

zdocs/developers/valkyrie.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
The Valkyrie video chip is included in some Quadras and Performas. The Marathon games (2 and Infinity, at least) use this chip to blit 16-bit video.
2+
3+
| Register Name | Offset |
4+
|:-------------------------:|:------:|
5+
| CLUT Address | 0x4000 |
6+
| CLUT Graphic | 0x4004 |
7+
| CLUT Video Data | 0x4008 |
8+
| CLUT Color Key | 0x400C |
9+
| Subsystem Config | 0xA00C |
10+
| Video In Control | 0xA020 |
11+
| Window X Start | 0xA060 |
12+
| Window Y Start | 0xA064 |
13+
| Window Width | 0xA070 |
14+
| Window Height | 0xA074 |
15+
| Video Field X Start | 0xA080 |
16+
| Video Field Y Start | 0xA084 |

0 commit comments

Comments
 (0)