psx.wiki

Coprocessor Usable Bits: Difference between revisions

Revision as of 04:48, 23 October 2026
RemmyLee
(Main page: drop the Hardware Tests lede)
Revision as of 05:11, 23 October 2026
RemmyLee
(Hardware tests: 72 more test pages, listed on the main page by area; RUN.toml no longer published)
Line 1:Line 1:
+---
+title: Coprocessor Usable Bits
+type: test
+summary: Checks which coprocessor instructions raise an exception when the coprocessor is disabled in SR.
+category: Hardware tests
+info: Machine = SCPH-5501
+info: Program = cpu/cop (ps1-tests)
+---
+
+## Overview
+
+Each check sets or clears one coprocessor usable bit in the [COP0](/hardware/cpu/cop0/) status register (SR bits 28 to 31), executes one instruction for that coprocessor and records whether an exception was raised. The instructions are written as words: MFC0 r2,r15 for COP0, the COP1 and COP3 opcodes 44000000h and 4C000000h, MFC2 for the GTE, invalid opcodes 43E00000h and 4BE00000h, and SWC0, SWC2 and SWC3 storing to address 0.[^src]
+
+## Results
+
+The SCPH-5501 passed all 17 checks in every run.[^run]
+
+Table: Exceptions by instruction and SR bit
+
+| Instruction | Coprocessor disabled | Coprocessor enabled |
+| --- | --- | --- |
+| MFC0 | no exception | no exception |
+| COP0 invalid opcode 43E00000h | | no exception |
+| SWC0 | exception | no exception |
+| COP1 44000000h | exception | no exception |
+| MFC2 | exception | no exception |
+| COP2 invalid opcode 4BE00000h | | no exception |
+| SWC2 | exception | no exception |
+| COP3 4C000000h | exception | no exception |
+| SWC3 | exception | no exception |
+
+A COP3 instruction with COP3 disabled raised exception code 11 (Coprocessor Unusable).[^run]
+
+## Runs
+
+### 25 September 2026
+
+[04COP.txt](/tests/raw/20260925T0000Z-5501a-card-main/main/04COP.txt)
+
+```
+===== 04 COP CPU COP | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+
+cpu/cop
+pass - testCop0Disabled
+pass - testCop0Enabled
+pass - testCop0InvalidOpcode
+pass - testSwc0Disabled
+pass - testSwc0Enabled
+pass - testCop1Disabled
+pass - testCop1Enabled
+pass - testCop2Disabled
+pass - testCop2Enabled
+pass - testCop2InvalidOpcode
+pass - testSwc2Disabled
+pass - testSwc2Enabled
+pass - testCop3Disabled
+pass - testCop3Enabled
+pass - testSwc3Disabled
+pass - testSwc3Enabled
+pass - testDisabledCoprocessorThrowsCoprocessorUnusable
+Done.
+```
+
+### 27 September 2026
+
+[04COP.txt](/tests/raw/20260927T0000Z-5501a-card-2/main/s024/04COP.txt)
+
+```
+===== 04 COP CPU COP | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+
+cpu/cop
+pass - testCop0Disabled
+pass - testCop0Enabled
+pass - testCop0InvalidOpcode
+pass - testSwc0Disabled
+pass - testSwc0Enabled
+pass - testCop1Disabled
+pass - testCop1Enabled
+pass - testCop2Disabled
+pass - testCop2Enabled
+pass - testCop2InvalidOpcode
+pass - testSwc2Disabled
+pass - testSwc2Enabled
+pass - testCop3Disabled
+pass - testCop3Enabled
+pass - testSwc3Disabled
+pass - testSwc3Enabled
+pass - testDisabledCoprocessorThrowsCoprocessorUnusable
+Done.
+```
+
+### 27 September 2026 run 2
+
+[04COP.txt](/tests/raw/20260927T0000Z-5501a-card-b/main/s034/04COP.txt)
+
+```
+===== 04 COP CPU COP | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+
+cpu/cop
+pass - testCop0Disabled
+pass - testCop0Enabled
+pass - testCop0InvalidOpcode
+pass - testSwc0Disabled
+pass - testSwc0Enabled
+pass - testCop1Disabled
+pass - testCop1Enabled
+pass - testCop2Disabled
+pass - testCop2Enabled
+pass - testCop2InvalidOpcode
+pass - testSwc2Disabled
+pass - testSwc2Enabled
+pass - testCop3Disabled
+pass - testCop3Enabled
+pass - testSwc3Disabled
+pass - testSwc3Enabled
+pass - testDisabledCoprocessorThrowsCoprocessorUnusable
+Done.
+```
+
+### 27 September 2026 run 3
+
+[04COP.txt](/tests/raw/20260927T0000Z-5501a-card-g/main/04COP.txt)
+
+```
+===== 04 COP CPU COP | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+
+cpu/cop
+pass - testCop0Disabled
+pass - testCop0Enabled
+pass - testCop0InvalidOpcode
+pass - testSwc0Disabled
+pass - testSwc0Enabled
+pass - testCop1Disabled
+pass - testCop1Enabled
+pass - testCop2Disabled
+pass - testCop2Enabled
+pass - testCop2InvalidOpcode
+pass - testSwc2Disabled
+pass - testSwc2Enabled
+pass - testCop3Disabled
+pass - testCop3Enabled
+pass - testSwc3Disabled
+pass - testSwc3Enabled
+pass - testDisabledCoprocessorThrowsCoprocessorUnusable
+Done.
+```
+
+### 27 September 2026 run 4
+
+[04COP.txt](/tests/raw/20260927T0000Z-5501a-card-g3/main/04COP.txt)
+
+```
+===== 04 COP CPU COP | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+
+cpu/cop
+pass - testCop0Disabled
+pass - testCop0Enabled
+pass - testCop0InvalidOpcode
+pass - testSwc0Disabled
+pass - testSwc0Enabled
+pass - testCop1Disabled
+pass - testCop1Enabled
+pass - testCop2Disabled
+pass - testCop2Enabled
+pass - testCop2InvalidOpcode
+pass - testSwc2Disabled
+pass - testSwc2Enabled
+pass - testCop3Disabled
+pass - testCop3Enabled
+pass - testSwc3Disabled
+pass - testSwc3Enabled
+pass - testDisabledCoprocessorThrowsCoprocessorUnusable
+Done.
+```
+
+### 28 September 2026
+
+[04COP.txt](/tests/raw/20260928T0000Z-5501a-card-h/main/04COP.txt)
+
+```
+===== 04 COP CPU COP | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+
+cpu/cop
+pass - testCop0Disabled
+pass - testCop0Enabled
+pass - testCop0InvalidOpcode
+pass - testSwc0Disabled
+pass - testSwc0Enabled
+pass - testCop1Disabled
+pass - testCop1Enabled
+pass - testCop2Disabled
+pass - testCop2Enabled
+pass - testCop2InvalidOpcode
+pass - testSwc2Disabled
+pass - testSwc2Enabled
+pass - testCop3Disabled
+pass - testCop3Enabled
+pass - testSwc3Disabled
+pass - testSwc3Enabled
+pass - testDisabledCoprocessorThrowsCoprocessorUnusable
+Done.
+```
+
+## References
+
+[^src]: ps1-tests, cpu/cop. https://github.com/JaCzekanski/ps1-tests.
+[^run]: SCPH-5501 output: [main/04COP.txt](/tests/raw/20260925T0000Z-5501a-card-main/main/04COP.txt) and the files beside it, with the other runs listed under Runs.