Giter VIP home page Giter VIP logo

psxcpu's Introduction

PSXCPU

Reverse engineering of the SONY PlayStation CPU (CXD8530CQ).

⚠️ The information was moved from the old wiki in Russian. Information may need to be clarified here and there.

⚠️ A number of sections and repository contents may be redundant because the repository was built from different sources (site, old wiki, forum, etc.). Over time, everything will fall into place as it should.

IC103 Overview

The CPU consists of the following components:

  • Slightly modified LSI CW33300 core
  • System coprocessor 0 (COP0)
  • System coprocessor 2 aka Geometry Transformation Engine (GTE)
  • Motion Decoder aka MDEC (JPEG-like video decoder)
  • DMA controller (DMAC) (7 channels)
  • Interrupt controller (INTC)
  • DRAM controller (DRAMC)
  • Bus controller (interface for ROM BIOS / GPU)
  • SIO controller (RS-232-like serial interface), for two ports (SIO0 and SIO1)
  • PIO controller (expansion port for additional devices)
  • Root counters (3 hardware counters)
  • Built-in instruction cache and data cache (data cache with direct access capability aka "ScratchPad")
  • Dedicated "mini-caches" (R-buffer and W-buffer)

Microphotograph of a chip:

Cpu_overview

As you can see most of the chip is taken up by the "mess" of synthesized HDL logic (see Cells), and at the edges there are various memory and registers (see Custom Blocks).

From the available documents of the mid-90s we know that PSXCPU is most likely based on the LSI Logic framework called CoreWare. The MDE or C-MDE program was most likely used as the EDA.

CPU Revisions

The CPU on all revisions of the motherboard is represented by one large chip with 208 pins, under the designation IC103.

PCB older PU-7(?) PU-7 older PU-8 newer PU-8 PU-18 PU-20 PU-22 PU-23 PM-41 PM-41(2)
IC103 ??? CXD8530BQ_package 8530BQ_PU8_package 8530CQ_package CXD8606AQ_package CXD8606BQ_package 8606BQ_PU22_package 8606BQ_PU23_package 8606BQ_PM41_package CXD8606CQ_package
8530AQ? 8530BQ 8530BQ 8530CQ 8606AQ 8606BQ 8606BQ 8606BQ 8606BQ 8606CQ
??? L9A0025 L9A0025 L9A0048 L9A0082 L9B0082 L9B0082 L9B0082 L9B0082 L9A0182
  • The very first Japanese consoles (SCPH-1000 / PU-7) and old versions of PU-8 came with revision 90025.
  • Then they were quickly replaced by newer consoles (there was some bug in MDEC) which already had the revision 90048 chip.
  • In consoles since SCPH-5500 (PU-18) the 90082 revision of the chips were added. These chips were present in all latest PSX models, also in the first version of PSOne motherboards (PM-41).
  • The latest versions of PSOne with PM-41(2) motherboards contained 90182 revision of the chip.
  • EDIT: Turns out that the oldest revisions of the PU-7 contain some old version of the chip, most likely the one in the pictures from Ken Kutaragi below (3 layers of metal, obvious separation of modules into rectangular regions).

On this site we are examining the 90048 revision (which was in SCPH-1001). It is likely that the new revisions differ significantly in M1/M2 wiring as the new revision chip is "reassembled" from Verilog/VHDL. So, to trace other revisions means to re-trace the whole processor %)

You can find out the revision of the chip from the marking on the cover, removing unnecessary letters (e.g. L9A0048 means revision 90048). There must be some sense in the letters, but most likely it is related to the improvement of the technological process.

There is also a tattoo on the lower right corner of the chip. The revision of the chip is indicated in the first line:

cpurev_90048

This document by Ken Kutaragi (http://www.hotchips.org/wp-content/uploads/hc_archives/hc11/2_Mon/hc99.k1.kutaragi.pdf) shows the old architecture compared to the one we are studying, though the second picture is on the side 😃

old_silicon

From the picture you can conclude roughly the location of the main components (the location of MDEC, GTE and instruction cache are exactly the same).

Also there is information about number of transistors in final revision of CPU - 850K (2 layers Al, 350 nm). The old architecture contains 1000K transistors and 3 layers of metal.

CPU Block Diagram

We will be guided by the picture from the PU-22 (SCPH-7500) service manual when the CPU was most fully connected to the other parts.

Starting with PU-23 (SCPH-9000) the parallel port (PIO) was taken away from it, and in PM-41 (PSOne) the serial port (SIO) was also taken away.

CPU_Block

psxcpu's People

Contributors

ogamespec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psxcpu's Issues

GTE - Сведение векторных данных m2

После трассировки слайдов нужно каким-то образом склеить все векторные данные m2 в общую XML.

Проблема усложняется также тем, что слайды повернуты на 180, поэтому векторные данные тоже нужно будет поворачивать.

GTE - Сколько умножителей

Тепловая карта ячеек показывает что GTE содержит примерно 2 умножителя:

image

(левый нижний кусок)

Нужно точно определить сколько умножителей содержит GTE.

Каждый умножитель должен иметь свою схему контроля (подачи/выдачи результатов)

GTE - Трассировка M2

Провести трассировку левой нижней части процессора (02), чтобы получить векторные данные m2.

Всего примерно 9x12 ~ 100 слайдов.

  • Машина c0010
  • Биобот c0010
  • Машина c0011
  • Биобот c0011
  • Машина c0012
  • Биобот c0012
  • Машина c0013
  • Биобот c0013
  • Машина c0014
  • Биобот c0014
  • Машина c0015
  • Биобот c0015
  • Машина c0016
  • Биобот c0016
  • Машина c0017
  • Биобот c0017

GTE - Сведение векторных данных m1 / m2

Необходимо свести трассировку m1 с трассировкой m2.

Проблему создаёт разный масштаб и локальные искривления между слоями.

Сведение будем проводить по аналогии с Rubber Tool (триангуляция и эластичная трансформация)

Ключевыми точками будут являться виасы, соединяющие m1 и m2 в одинаковых местах.

GTE - Трассировка M1

Провести трассировку m1 левой нижней части процессора (02), где находится GTE.

Custom Blocks Topology

Get datasets for all custom blocks (units).

Constant Table Memory:

  • Unit-00: ScaleTableMatrix 8x8 (32 registers per 26 bits) used as 64 records per 13bits.
  • Unit-01: IDCT intermediate result (13 vertical, 16 horizontal, 16 x 13-bit words, separate IO)
  • Unit-02 (56 vertical, 8 horizontal)
  • Unit-03
  • Unit-04 (32 vertical, 16+32+16 horizontal)
  • Unit-05 (24 vertical, 16+32+16 horizontal)
  • Unit-20 (16 vertical, 16+32+16 horizontal)

Dual port registers:

  • Unit-11 (mdec registers?) 32 32-bit dual port
  • Unit-21 (cpu registers?) 32 32-bit dual port
  • Unit-22 (GTE registers?) 16 16-bit dual port
  • Unit-23 (GTE registers?) 16 16-bit dual port
  • Unit-24 (GTE registers?) 16 16-bit dual port
  • Unit-25 (GTE registers?) 16 16-bit dual port

SRAM:

  • Unit-10 (mdec output RGB macroblock(?) 768 bytes)(24x8 vertical, 32 horizontal)
  • Unit-26 (data ScratchPad 1024 bytes)(32x8 vertical, 32 horizontal)
  • Unit-30 (instruction cache 4096 bytes)(32x8 vertical, 128 horizontal)

GTE - Отделить транзитные провода

Через левый нижний кусок (GTE) проходит куча проводов от контактов.

Так как DEROUTE теперь хранит сущности в древовидной иерархии удобно все транзитные провода выделить в отдельную ветку, чтобы скрывать/показывать.

Terminal topology

You need to collect all variations of the terminal topology and put them on Google Drive.

GTE - Master Mind

Вряд-ли GTE сделан как кусок конвейера основного ядра.

Скорее всего есть пачка управляющих линий, типа "Выполни инструкцию XXX" и управляющая линяя типа "Ты занят?"

Нужно найти входную схему управления всем GTE (Master mind)

GTE - Разделить клоковые домены

Необходимо вычленить из мешанины все клоковые домены (clock domains), которые обычно выглядят как гирлянда DFF (DFF-chain).

Выделив клоковые домены мы примерно оценим "точки входа" в управление GTE и его схемы контроля.

GTE - Верифицировать траверс проводов

После сведения роутинга m1 и m2 необходимо будет верифицировать корректный траверс (DEROUTE - F10), чтобы провода не слипались и траверс производился корректно.

Есть высокая вероятность что после всех работ в некоторых местах траверс проходить не будет. Если это не важно для понимания схемы, будем считать что все равно задача выполнена.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.