|
Nugget
Bare-metal libraries and examples for the original PlayStation
|
Functions | |
| build (arm) | |
Variables | |
| list | STD |
| dict | RESET_MODE = {'R1': 1, 'R2': 2, 'R3': 3, 'R4': 4} |
| str | JOB_FILE = 'mdec-in.bin' |
| int | ARM_FIELD = 12 |
| int | OUT_BYTES = 16 * 16 * 3 |
| int | MAX_RL_WORDS = 4096 |
| ARMS = frozenset(.split()) | |
| blob = open(sys.argv[2], 'rb').read() | |
| ver | |
| payload | |
| capArm = blob[8:8 + ARM_FIELD].rstrip(b'\0').decode('ascii', 'replace') | |
| emu | |
| mdec | |
| biosSum | |
| jobSum | |
| biosId = blob[24 + ARM_FIELD:56 + ARM_FIELD].decode('ascii', 'replace') | |
| zeroedId = not blob[24 + ARM_FIELD:56 + ARM_FIELD].strip(b'\0') | |
| arm = sys.argv[1] | |
| dict | reset = RESET_MODE.get(arm, 0) |
| upload | |
| st | |
| rl | |
| quant | |
Emit mdec-in.bin, the job file the MDEC roundtrip rig reads over pcdrv. The job used to be baked into the executable as a generated job.h. That started as a workaround for PCopen returning -1 on the farm while PCcreat succeeded, and THAT DIAGNOSIS WAS WRONG: PCDRV is complete and the protocol is fine; the runner-agent had no references to input_fileset, so assets attached with --asset were resolved, digest-pinned, shipped and then dropped. Fixed in the farm's f9d1c4f, and the read half has since been probed from a console. So the bake is gone and the guest binary no longer changes per arm: one build, one job file per arm, and selecting an arm stops dirtying the tree. The layout is documented at the top of mdec-roundtrip.c and the guest validates it. COEFFICIENTS ARE PER BLOCK. The six blocks are Cr, Cb, Y1, Y2, Y3, Y4 in that order; Cr and Cb are one low-resolution 8x8 each covering the whole macroblock, Y1..Y4 are the four 8x8 luma quadrants. So a sweep that wants to compare quadrants against each other must leave BOTH chroma blocks empty - chroma with any AC content lands differently on each quadrant and destroys the comparison. With chroma flat, the four luma quadrants of one capture are four independent readings of one run, which is what turns an 8-second console run into a sweep.
| genjob.build | ( | arm | ) |
| genjob.arm = sys.argv[1] |
| int genjob.ARM_FIELD = 12 |
| genjob.ARMS = frozenset(.split()) |
| genjob.biosSum |
| str genjob.blob = open(sys.argv[2], 'rb').read() |
| genjob.emu |
| str genjob.JOB_FILE = 'mdec-in.bin' |
| genjob.jobSum |
| int genjob.MAX_RL_WORDS = 4096 |
| genjob.mdec |
| int genjob.OUT_BYTES = 16 * 16 * 3 |
| genjob.payload |
| genjob.quant |
| dict genjob.reset = RESET_MODE.get(arm, 0) |
| dict genjob.RESET_MODE = {'R1': 1, 'R2': 2, 'R3': 3, 'R4': 4} |
| genjob.rl |
| genjob.st |
| list genjob.STD |
| genjob.upload | ( | void | ) |
| genjob.ver |