# The two CPUs and the Media Engine ## Main CPU `allegrex_python.Allegrex(vfpu=True, model=)`, CPUId 0 (allegrex-python cop0-and-caches.md). Clock set by the kernel's power library: 222 MHz default, 333 MHz on request (pspsdk `psppower.h`, `scePowerSetClockFrequency(pllfreq, cpufreq, busfreq)`, with the header's constraints `cpufreq <= pllfreq` and `busfreq*2 <= pllfreq`: the bus clock is separate, so **the CPU/bus ratio varies with the setting**: U5). ## The Media Engine (YAPSPD 5-6; Copetti, "Media Engine") - **CPU:** a second Allegrex, CPUId 1, without the VFPU (Copetti). Its own COP0 view (YAPSPD 5.3: Config read-only; EBase sets its exception vector). INT 31 on the main CPU is the ME's interrupt (YAPSPD 5.1). - **Memory:** 2 MB internal eDRAM at physical 0 for the ME (YAPSPD 5.2.1), and main memory at 0x08000000; the main CPU's VRAM "appears to be inaccessible" from it (YAPSPD 5.1). Exception vectors in RAM at 0x1FC00000 (5.2.1); the ME's reset code is placed by the main CPU (YAPSPD 7.3.1.1: "ME Resetcode" at 0x88380000; 9.2.1 "ME Reset Handler"). - **AVC decoder:** H.264 hardware, fed by the ME's software (Copetti). Registers: unknown to our sources. - **VME:** "Virtual Mobile Engine", a reconfigurable DSP, 128-bit bus, 166 MHz at 1.2 V, "5 Giga Operations/sec" (YAPSPD 6.1, from Sony's press material); its programming is unknown to our sources. - **Software:** Sony's ME firmware (mebooter, me_wrapper modules: YAPSPD 7.3) runs the ATRAC3/3+, MP3, AAC and AVC paths; games reach it only through the kernel's libraries (Copetti: "the Media Engine is not directly operable from the developer's side"). Homebrew has run its own code on the ME (pspautotests `tests/me/` holds sources `main.c`, `me.S` and `audiofifo`, `vram` subfolders, with 2 `.expected` outputs). ## Under the recommended boundary (hle-vs-lle.md) The ME is **not instantiated**: the libraries that use it are functional models with host decoders. The second Allegrex instance exists in the design (and costs nothing to keep in allegrex-python's API) for homebrew that runs code on the ME and for a future LLE row. A homebrew ME program would need the ME control block (0xBCC00000) and the reset protocol, which our sources do not describe: U6. ## Chip rule The CPU is allegrex-python (CPUs always get their own core). The AVC decoder and the VME exist only in the PSP (and the PS Vita's PSP mode, which is not a family board): they stay in this board, behind a pin-shaped interface, if they are ever modelled.