From ecd6f794f459ab5f72feb88d46df8d23b3c413e0 Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Fri, 17 May 2024 01:02:07 +0200 Subject: [PATCH 1/2] Fix all broken links and mkdocs warnings --- docs/aboutcredits.md | 310 ++----------------- docs/cdromfileformats.md | 129 ++++---- docs/cheatdevices.md | 12 +- docs/controllersandmemorycards.md | 37 ++- docs/cpuspecifications.md | 6 +- docs/dmachannels.md | 11 +- docs/expansionportpio.md | 2 +- docs/graphicsprocessingunitgpu.md | 2 +- docs/index.md | 3 + docs/kernelbios.md | 12 +- docs/konamisystem573.md | 481 +++++++++++++++--------------- docs/memorycontrol.md | 20 +- docs/pocketstation.md | 3 +- docs/serialinterfacessio.md | 2 +- docs/soundprocessingunitspu.md | 6 +- 15 files changed, 403 insertions(+), 633 deletions(-) diff --git a/docs/aboutcredits.md b/docs/aboutcredits.md index a78d193..c4c3043 100644 --- a/docs/aboutcredits.md +++ b/docs/aboutcredits.md @@ -1,294 +1,30 @@ # About & Credits #### Credits -GPU.TXT by doomed/padua; based on info from K-communications & -Nagra/Blackbag
-GTE.TXT by doomed@c64.org / psx.rules.org
-SPU.TXT by doomed@c64.org / psx.rules.org
-CDINFO.TXT by doomed with big thanks to Barubary, who rewrote a large part
-SYSTEM.TXT by doomed with thanx to Herozero for breakpoint info
-PS\_ENG.TXT PlayStation PAD/Memory Interface Protocol by HFB03536
-IDT79R3041 Hardware User's Manual by Integrated Device Technology, Inc.
-IDTR3051, R3052 RISController User's Manual by Integrated Device Technology
-PSX.\* by Joshua Walker (additional details in various distorted file formats)
-LIBMIRAGE by Rok; info/source code for various cdrom-image formats
-psxdev.ru; cdrom sub-cpu decapping
-All the contributors to the [psx-spx.github.io](https://github.com/psx-spx/psx-spx.github.io/) repo who've helped update, correct and expand this information. +Contributors to Martin Korth's original documentation: +``` +GPU.TXT by doomed/padua; based on info from K-communications & Nagra/Blackbag +GTE.TXT by doomed@c64.org / psx.rules.org +SPU.TXT by doomed@c64.org / psx.rules.org +CDINFO.TXT by doomed with big thanks to Barubary, who rewrote a large part +SYSTEM.TXT by doomed with thanx to Herozero for breakpoint info +PS_ENG.TXT PlayStation PAD/Memory Interface Protocol by HFB03536 +IDT79R3041 Hardware User's Manual by Integrated Device Technology, Inc. +IDTR3051, R3052 RISController User's Manual by Integrated Device Technology +PSX.* by Joshua Walker (additional details in various distorted file formats) +LIBMIRAGE by Rok; info/source code for various cdrom-image formats +psxdev.ru; cdrom sub-cpu decapping +``` + +All the contributors to the [psx-spx.github.io](https://github.com/psx-spx/psx-spx.github.io) +repo who've helped update, correct and expand this information. #### PSXSPX homepage -http://problemkaputt.de/psx.htm no$psx emulator/debugger
-http://problemkaputt.de/psx-spx.htm psx specs in html formal
-http://problemkaputt.de/psx-spx.txt psx specs in text formal
+- [no$psx emulator/debugger](http://problemkaputt.de/psx.htm) +- [psx specs in html format](http://problemkaputt.de/psx-spx.htm) +- [psx specs in text format](http://problemkaputt.de/psx-spx.txt) #### Contact -http://problemkaputt.de/email.htm (spam-shielded)
- - - - -## Index -[Contents](index.md)
-[Memory Map](memorymap.md)
-[I/O Map](iomap.md)
-[Graphics Processing Unit (GPU)](graphicsprocessingunitgpu.md)
-[GPU I/O Ports, DMA Channels, Commands, VRAM](graphicsprocessingunitgpu.md#gpu-io-ports-dma-channels-commands-vram)
-[GPU Render Polygon Commands](graphicsprocessingunitgpu.md#gpu-render-polygon-commands)
-[GPU Render Line Commands](graphicsprocessingunitgpu.md#gpu-render-line-commands)
-[GPU Render Rectangle Commands](graphicsprocessingunitgpu.md#gpu-render-rectangle-commands)
-[GPU Rendering Attributes](graphicsprocessingunitgpu.md#gpu-rendering-attributes)
-[GPU Memory Transfer Commands](graphicsprocessingunitgpu.md#gpu-memory-transfer-commands)
-[GPU Other Commands](graphicsprocessingunitgpu.md#gpu-other-commands)
-[GPU Display Control Commands (GP1)](graphicsprocessingunitgpu.md#gpu-display-control-commands-gp1)
-[GPU Status Register](graphicsprocessingunitgpu.md#gpu-status-register)
-[GPU Versions](graphicsprocessingunitgpu.md#gpu-versions)
-[GPU Depth Ordering](graphicsprocessingunitgpu.md#gpu-depth-ordering)
-[GPU Video Memory (VRAM)](graphicsprocessingunitgpu.md#gpu-video-memory-vram)
-[GPU Texture Caching](graphicsprocessingunitgpu.md#gpu-texture-caching)
-[GPU Timings](graphicsprocessingunitgpu.md#gpu-timings)
-[GPU (MISC)](graphicsprocessingunitgpu.md#gpu-misc)
-[Geometry Transformation Engine (GTE)](geometrytransformationenginegte.md)
-[GTE Overview](geometrytransformationenginegte.md#gte-overview)
-[GTE Registers](geometrytransformationenginegte.md#gte-registers)
-[GTE Saturation](geometrytransformationenginegte.md#gte-saturation)
-[GTE Opcode Summary](geometrytransformationenginegte.md#gte-opcode-summary)
-[GTE Coordinate Calculation Commands](geometrytransformationenginegte.md#gte-coordinate-calculation-commands)
-[GTE General Purpose Calculation Commands](geometrytransformationenginegte.md#gte-general-purpose-calculation-commands)
-[GTE Color Calculation Commands](geometrytransformationenginegte.md#gte-color-calculation-commands)
-[GTE Division Inaccuracy](geometrytransformationenginegte.md#gte-division-inaccuracy)
-[Macroblock Decoder (MDEC)](macroblockdecodermdec.md)
-[MDEC I/O Ports](macroblockdecodermdec.md#mdec-io-ports)
-[MDEC Commands](macroblockdecodermdec.md#mdec-commands)
-[MDEC Decompression](macroblockdecodermdec.md#mdec-decompression)
-[MDEC Data Format](macroblockdecodermdec.md#mdec-data-format)
-[Sound Processing Unit (SPU)](soundprocessingunitspu.md)
-[SPU Overview](soundprocessingunitspu.md#spu-overview)
-[SPU ADPCM Samples](soundprocessingunitspu.md#spu-adpcm-samples)
-[SPU ADPCM Pitch](soundprocessingunitspu.md#spu-adpcm-pitch)
-[SPU Volume and ADSR Generator](soundprocessingunitspu.md#spu-volume-and-adsr-generator)
-[SPU Voice Flags](soundprocessingunitspu.md#spu-voice-flags)
-[SPU Noise Generator](soundprocessingunitspu.md#spu-noise-generator)
-[SPU Control and Status Register](soundprocessingunitspu.md#spu-control-and-status-register)
-[SPU Memory Access](soundprocessingunitspu.md#spu-memory-access)
-[SPU Interrupt](soundprocessingunitspu.md#spu-interrupt)
-[SPU Reverb Registers](soundprocessingunitspu.md#spu-reverb-registers)
-[SPU Reverb Formula](soundprocessingunitspu.md#spu-reverb-formula)
-[SPU Reverb Examples](soundprocessingunitspu.md#spu-reverb-examples)
-[SPU Unknown Registers](soundprocessingunitspu.md#spu-unknown-registers)
-[Interrupts](interrupts.md)
-[DMA Channels](dmachannels.md)
-[Timers](timers.md)
-[CDROM Drive](cdromdrive.md)
-[CDROM Controller I/O Ports](cdromdrive.md#cdrom-controller-io-ports)
-[CDROM Controller Command Summary](cdromdrive.md#cdrom-controller-command-summary)
-[CDROM - Control Commands](cdromdrive.md#cdrom-control-commands)
-[CDROM - Seek Commands](cdromdrive.md#cdrom-seek-commands)
-[CDROM - Read Commands](cdromdrive.md#cdrom-read-commands)
-[CDROM - Status Commands](cdromdrive.md#cdrom-status-commands)
-[CDROM - CD Audio Commands](cdromdrive.md#cdrom-cd-audio-commands)
-[CDROM - Test Commands](cdromdrive.md#cdrom-test-commands)
-[CDROM - Test Commands - Version, Switches, Region, Chipset, SCEx](cdromdrive.md#cdrom-test-commands-version-switches-region-chipset-scex)
-[CDROM - Test Commands - Test Drive Mechanics](cdromdrive.md#cdrom-test-commands-test-drive-mechanics)
-[CDROM - Test Commands - Prototype Debug Transmission](cdromdrive.md#cdrom-test-commands-prototype-debug-transmission)
-[CDROM - Test Commands - Read/Write Decoder RAM and I/O Ports](cdromdrive.md#cdrom-test-commands-readwrite-decoder-ram-and-io-ports)
-[CDROM - Test Commands - Read HC05 SUB-CPU RAM and I/O Ports](cdromdrive.md#cdrom-test-commands-read-hc05-sub-cpu-ram-and-io-ports)
-[CDROM - Secret Unlock Commands](cdromdrive.md#cdrom-secret-unlock-commands)
-[CDROM - Video CD Commands](cdromdrive.md#cdrom-video-cd-commands)
-[CDROM - Mainloop/Responses](cdromdrive.md#cdrom-mainloopresponses)
-[CDROM - Response Timings](cdromdrive.md#cdrom-response-timings)
-[CDROM - Response/Data Queueing](cdromdrive.md#cdrom-responsedata-queueing)
-[CDROM Disk Format](cdromdrive.md#cdrom-disk-format)
-[CDROM Subchannels](cdromdrive.md#cdrom-subchannels)
-[CDROM Sector Encoding](cdromdrive.md#cdrom-sector-encoding)
-[CDROM XA Subheader, File, Channel, Interleave](cdromdrive.md#cdrom-xa-subheader-file-channel-interleave)
-[CDROM XA Audio ADPCM Compression](cdromdrive.md#cdrom-xa-audio-adpcm-compression)
-[CDROM ISO Volume Descriptors](cdromdrive.md#cdrom-iso-volume-descriptors)
-[CDROM ISO File and Directory Descriptors](cdromdrive.md#cdrom-iso-file-and-directory-descriptors)
-[CDROM ISO Misc](cdromdrive.md#cdrom-iso-misc)
-[CDROM File Formats](cdromdrive.md#cdrom-file-formats)
-[CDROM Protection - SCEx Strings](cdromdrive.md#cdrom-protection-scex-strings)
-[CDROM Protection - Bypassing it](cdromdrive.md#cdrom-protection-bypassing-it)
-[CDROM Protection - Modchips](cdromdrive.md#cdrom-protection-modchips)
-[CDROM Protection - Chipless Modchips](cdromdrive.md#cdrom-protection-chipless-modchips)
-[CDROM Protection - LibCrypt](cdromdrive.md#cdrom-protection-libcrypt)
-[CDROM Disk Images CCD/IMG/SUB (CloneCD)](cdromdrive.md#cdrom-disk-images-ccdimgsub-clonecd)
-[CDROM Disk Images CDI (DiscJuggler)](cdromdrive.md#cdrom-disk-images-cdi-discjuggler)
-[CDROM Disk Images CUE/BIN/CDT (Cdrwin)](cdromdrive.md#cdrom-disk-images-cuebincdt-cdrwin)
-[CDROM Disk Images MDS/MDF (Alcohol 120%)](cdromdrive.md#cdrom-disk-images-mdsmdf-alcohol-120)
-[CDROM Disk Images NRG (Nero)](cdromdrive.md#cdrom-disk-images-nrg-nero)
-[CDROM Disk Image/Containers CDZ](cdromdrive.md#cdrom-disk-imagecontainers-cdz)
-[CDROM Disk Image/Containers ECM](cdromdrive.md#cdrom-disk-imagecontainers-ecm)
-[CDROM Subchannel Images](cdromdrive.md#cdrom-subchannel-images)
-[CDROM Disk Images Other Formats](cdromdrive.md#cdrom-disk-images-other-formats)
-[CDROM Internal Info on PSX CDROM Controller](cdrominternalinfoonpsxcdromcontroller.md)
-[CDROM Internal HC05 Instruction Set](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-instruction-set)
-[CDROM Internal HC05 On-Chip I/O Ports](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-on-chip-io-ports)
-[CDROM Internal HC05 On-Chip I/O Ports - Extras](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-on-chip-io-ports-extras)
-[CDROM Internal HC05 I/O Port Usage in PSX](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-io-port-usage-in-psx)
-[CDROM Internal HC05 Motorola Selftest Mode](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-motorola-selftest-mode)
-[CDROM Internal HC05 Motorola Selftest Mode (52pin chips)](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-motorola-selftest-mode-52pin-chips)
-[CDROM Internal HC05 Motorola Selftest Mode (80pin chips)](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-hc05-motorola-selftest-mode-80pin-chips)
-[CDROM Internal CXD1815Q Sub-CPU Configuration Registers](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-cxd1815q-sub-cpu-configuration-registers)
-[CDROM Internal CXD1815Q Sub-CPU Sector Status Registers](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-cxd1815q-sub-cpu-sector-status-registers)
-[CDROM Internal CXD1815Q Sub-CPU Address Registers](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-cxd1815q-sub-cpu-address-registers)
-[CDROM Internal CXD1815Q Sub-CPU Misc Registers](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-cxd1815q-sub-cpu-misc-registers)
-[CDROM Internal Commands CX(0x..3x) - CXA1782BR Servo Amplifier](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-commands-cx0x3x-cxa1782br-servo-amplifier)
-[CDROM Internal Commands CX(4x..Ex) - CXD2510Q Signal Processor](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-commands-cx4xex-cxd2510q-signal-processor)
-[CDROM Internal Commands CX(0x..Ex) - CXD2545Q Servo/Signal Combo](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-commands-cx0xex-cxd2545q-servosignal-combo)
-[CDROM Internal Commands CX(0x..Ex) - CXD2938Q Servo/Signal/SPU Combo](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-commands-cx0xex-cxd2938q-servosignalspu-combo)
-[CDROM Internal Commands CX(xx) - Notes](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-commands-cxxx-notes)
-[CDROM Internal Commands CX(xx) - Summary of Used CX(xx) Commands](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-commands-cxxx-summary-of-used-cxxx-commands)
-[CDROM Internal Coefficients (for CXD2545Q)](cdrominternalinfoonpsxcdromcontroller.md#cdrom-internal-coefficients-for-cxd2545q)
-[CDROM Video CDs (VCD)](cdromvideocdsvcd.md)
-[VCD ISO Basic Files (INFO, ENTRIES, AVSEQnn, ISO Filesystem)](cdromvideocdsvcd.md#vcd-iso-basic-files-info-entries-avseqnn-iso-filesystem)
-[VCD ISO Playback Control PBC Files (PSD, LOT, ITEMnnnn)](cdromvideocdsvcd.md#vcd-iso-playback-control-pbc-files-psd-lot-itemnnnn)
-[VCD ISO Search Files (SCANDATA, SEARCH, TRACKS, SPICONTX)](cdromvideocdsvcd.md#vcd-iso-search-files-scandata-search-tracks-spicontx)
-[VCD ISO Misc files (CAPTnn, AUDIOnn, KARINFO, PICTURES, CDI)](cdromvideocdsvcd.md#vcd-iso-misc-files-captnn-audionn-karinfo-pictures-cdi)
-[VCD MPEG-1 Multiplex Stream](cdromvideocdsvcd.md#vcd-mpeg-1-multiplex-stream)
-[VCD MPEG-1 Video Stream](cdromvideocdsvcd.md#vcd-mpeg-1-video-stream)
-[VCD MP2 Audio Stream](cdromvideocdsvcd.md#vcd-mp2-audio-stream)
-[Inflate](cdromvideocdsvcd.md#inflate)
-[Inflate - Core Functions](cdromvideocdsvcd.md#inflate-core-functions)
-[Inflate - Initialization & Tree Creation](cdromvideocdsvcd.md#inflate-initialization--tree-creation)
-[Inflate - Headers and Checksums](cdromvideocdsvcd.md#inflate-headers-and-checksums)
-[Controllers and Memory Cards](controllersandmemorycards.md)
-[Controller and Memory Card I/O Ports](controllersandmemorycards.md#controller-and-memory-card-io-ports)
-[Controller and Memory Card Misc](controllersandmemorycards.md#controller-and-memory-card-misc)
-[Controller and Memory Card Signals](controllersandmemorycards.md#controller-and-memory-card-signals)
-[Controller and Memory Card Multitap Adaptor](controllersandmemorycards.md#controller-and-memory-card-multitap-adaptor)
-[Controllers - Communication Sequence](controllersandmemorycards.md#controllers-communication-sequence)
-[Controllers - Standard Digital/Analog Controllers](controllersandmemorycards.md#controllers-standard-digitalanalog-controllers)
-[Controllers - Mouse](controllersandmemorycards.md#controllers-mouse)
-[Controllers - Racing Controllers](controllersandmemorycards.md#controllers-racing-controllers)
-[Controllers - Lightguns](controllersandmemorycards.md#controllers-lightguns)
-[Controllers - Lightguns - Namco (GunCon)](controllersandmemorycards.md#controllers-lightguns-namco-guncon)
-[Controllers - Lightguns - Konami Justifier/Hyperblaster (IRQ10)](controllersandmemorycards.md#controllers-lightguns-konami-justifierhyperblaster-irq10)
-[Controllers - Lightguns - PSX Lightgun Games](controllersandmemorycards.md#controllers-lightguns-psx-lightgun-games)
-[Controllers - Rumble Configuration](controllersandmemorycards.md#controllers-rumble-configuration)
-[Controllers - Dance Mats](controllersandmemorycards.md#controllers-dance-mats)
-[Controllers - Fishing Controllers](controllersandmemorycards.md#controllers-fishing-controllers)
-[Controllers - I-Mode Adaptor (Mobile Internet)](controllersandmemorycards.md#controllers-i-mode-adaptor-mobile-internet)
-[Controllers - Additional Inputs](controllersandmemorycards.md#controllers-additional-inputs)
-[Controllers - Misc](controllersandmemorycards.md#controllers-misc)
-[Memory Card Read/Write Commands](controllersandmemorycards.md#memory-card-readwrite-commands)
-[Memory Card Data Format](controllersandmemorycards.md#memory-card-data-format)
-[Memory Card Images](controllersandmemorycards.md#memory-card-images)
-[Memory Card Notes](controllersandmemorycards.md#memory-card-notes)
-[Pocketstation](pocketstation.md)
-[Pocketstation Overview](pocketstation.md#pocketstation-overview)
-[Pocketstation I/O Map](pocketstation.md#pocketstation-io-map)
-[Pocketstation Memory Map](pocketstation.md#pocketstation-memory-map)
-[Pocketstation IO Video and Audio](pocketstation.md#pocketstation-io-video-and-audio)
-[Pocketstation IO Interrupts and Buttons](pocketstation.md#pocketstation-io-interrupts-and-buttons)
-[Pocketstation IO Timers and Real-Time Clock](pocketstation.md#pocketstation-io-timers-and-real-time-clock)
-[Pocketstation IO Infrared](pocketstation.md#pocketstation-io-infrared)
-[Pocketstation IO Memory-Control](pocketstation.md#pocketstation-io-memory-control)
-[Pocketstation IO Communication Ports](pocketstation.md#pocketstation-io-communication-ports)
-[Pocketstation IO Power Control](pocketstation.md#pocketstation-io-power-control)
-[Pocketstation SWI Function Summary](pocketstation.md#pocketstation-swi-function-summary)
-[Pocketstation SWI Misc Functions](pocketstation.md#pocketstation-swi-misc-functions)
-[Pocketstation SWI Communication Functions](pocketstation.md#pocketstation-swi-communication-functions)
-[Pocketstation SWI Execute Functions](pocketstation.md#pocketstation-swi-execute-functions)
-[Pocketstation SWI Date/Time/Alarm Functions](pocketstation.md#pocketstation-swi-datetimealarm-functions)
-[Pocketstation SWI Flash Functions](pocketstation.md#pocketstation-swi-flash-functions)
-[Pocketstation SWI Useless Functions](pocketstation.md#pocketstation-swi-useless-functions)
-[Pocketstation BU Command Summary](pocketstation.md#pocketstation-bu-command-summary)
-[Pocketstation BU Standard Memory Card Commands](pocketstation.md#pocketstation-bu-standard-memory-card-commands)
-[Pocketstation BU Basic Pocketstation Commands](pocketstation.md#pocketstation-bu-basic-pocketstation-commands)
-[Pocketstation BU Custom Pocketstation Commands](pocketstation.md#pocketstation-bu-custom-pocketstation-commands)
-[Pocketstation File Header/Icons](pocketstation.md#pocketstation-file-headericons)
-[Pocketstation File Images](pocketstation.md#pocketstation-file-images)
-[Pocketstation XBOO Cable](pocketstation.md#pocketstation-xboo-cable)
-[Serial Interfaces (SIO)](serialinterfacessio.md)
-[Expansion Port (PIO)](expansionportpio.md)
-[EXP1 Expansion ROM Header](expansionportpio.md#exp1-expansion-rom-header)
-[EXP2 Dual Serial Port (for TTY Debug Terminal)](expansionportpio.md#exp2-dual-serial-port-for-tty-debug-terminal)
-[EXP2 DTL-H2000 I/O Ports](expansionportpio.md#exp2-dtl-h2000-io-ports)
-[EXP2 Post Registers](expansionportpio.md#exp2-post-registers)
-[EXP2 Nocash Emulation Expansion](expansionportpio.md#exp2-nocash-emulation-expansion)
-[Memory Control](memorycontrol.md)
-[Unpredictable Things](unpredictablethings.md)
-[CPU Specifications](cpuspecifications.md)
-[CPU Registers](cpuspecifications.md#cpu-registers)
-[CPU Opcode Encoding](cpuspecifications.md#cpu-opcode-encoding)
-[CPU Load/Store Opcodes](cpuspecifications.md#cpu-loadstore-opcodes)
-[CPU ALU Opcodes](cpuspecifications.md#cpu-alu-opcodes)
-[CPU Jump Opcodes](cpuspecifications.md#cpu-jump-opcodes)
-[CPU Coprocessor Opcodes](cpuspecifications.md#cpu-coprocessor-opcodes)
-[CPU Pseudo Opcodes](cpuspecifications.md#cpu-pseudo-opcodes)
-[COP0 - Register Summary](cpuspecifications.md#cop0-register-summary)
-[COP0 - Exception Handling](cpuspecifications.md#cop0-exception-handling)
-[COP0 - Misc](cpuspecifications.md#cop0-misc)
-[COP0 - Debug Registers](cpuspecifications.md#cop0-debug-registers)
-[Kernel (BIOS)](kernelbios.md)
-[BIOS Overview](kernelbios.md#bios-overview)
-[BIOS Memory Map](kernelbios.md#bios-memory-map)
-[BIOS Function Summary](kernelbios.md#bios-function-summary)
-[BIOS File Functions](kernelbios.md#bios-file-functions)
-[BIOS File Execute and Flush Cache](kernelbios.md#bios-file-execute-and-flush-cache)
-[BIOS CDROM Functions](kernelbios.md#bios-cdrom-functions)
-[BIOS Memory Card Functions](kernelbios.md#bios-memory-card-functions)
-[BIOS Interrupt/Exception Handling](kernelbios.md#bios-interruptexception-handling)
-[BIOS Event Functions](kernelbios.md#bios-event-functions)
-[BIOS Event Summary](kernelbios.md#bios-event-summary)
-[BIOS Thread Functions](kernelbios.md#bios-thread-functions)
-[BIOS Timer Functions](kernelbios.md#bios-timer-functions)
-[BIOS Joypad Functions](kernelbios.md#bios-joypad-functions)
-[BIOS GPU Functions](kernelbios.md#bios-gpu-functions)
-[BIOS Memory Allocation](kernelbios.md#bios-memory-allocation)
-[BIOS Memory Fill/Copy/Compare (SLOW)](kernelbios.md#bios-memory-fillcopycompare-slow)
-[BIOS String Functions](kernelbios.md#bios-string-functions)
-[BIOS Number/String/Character Conversion](kernelbios.md#bios-numberstringcharacter-conversion)
-[BIOS Misc Functions](kernelbios.md#bios-misc-functions)
-[BIOS Internal Boot Functions](kernelbios.md#bios-internal-boot-functions)
-[BIOS More Internal Functions](kernelbios.md#bios-more-internal-functions)
-[BIOS PC File Server](kernelbios.md#bios-pc-file-server)
-[BIOS TTY Console (std_io)](kernelbios.md#bios-tty-console-stdio)
-[BIOS Character Sets](kernelbios.md#bios-character-sets)
-[BIOS Control Blocks](kernelbios.md#bios-control-blocks)
-[BIOS Versions](kernelbios.md#bios-versions)
-[BIOS Patches](kernelbios.md#bios-patches)
-[Arcade Cabinets](arcadecabinets.md)
-[Cheat Devices](cheatdevices.md)
-[Cheat Devices - Datel I/O](cheatdevices.md#cheat-devices-datel-io)
-[Cheat Devices - Datel DB25 Comms Link Protocol](cheatdevices.md#cheat-devices-datel-db25-comms-link-protocol)
-[Cheat Devices - Datel Chipset Pinouts](cheatdevices.md#cheat-devices-datel-chipset-pinouts)
-[Cheat Devices - Datel Cheat Code Format](cheatdevices.md#cheat-devices-datel-cheat-code-format)
-[Cheat Devices - Xplorer Memory and I/O Map](cheatdevices.md#cheat-devices-xplorer-memory-and-io-map)
-[Cheat Devices - Xplorer DB25 Parallel Port Function Summary](cheatdevices.md#cheat-devices-xplorer-db25-parallel-port-function-summary)
-[Cheat Devices - Xplorer DB25 Parallel Port Command Handler](cheatdevices.md#cheat-devices-xplorer-db25-parallel-port-command-handler)
-[Cheat Devices - Xplorer DB25 Parallel Port Low Level Transfer Protocol](cheatdevices.md#cheat-devices-xplorer-db25-parallel-port-low-level-transfer-protocol)
-[Cheat Devices - Xplorer Versions](cheatdevices.md#cheat-devices-xplorer-versions)
-[Cheat Devices - Xplorer Chipset Pinouts](cheatdevices.md#cheat-devices-xplorer-chipset-pinouts)
-[Cheat Devices - Xplorer Cheat Code Format](cheatdevices.md#cheat-devices-xplorer-cheat-code-format)
-[Cheat Devices - Xplorer Cheat Code and ROM-Image Decryption](cheatdevices.md#cheat-devices-xplorer-cheat-code-and-rom-image-decryption)
-[Cheat Devices - FLASH/EEPROMs](cheatdevices.md#cheat-devices-flasheeproms)
-[PSX Dev-Board Chipsets](psxdevboardchipsets.md)
-[Hardware Numbers](hardwarenumbers.md)
-[Pinouts](pinouts.md)
-[Pinouts - Controller Ports and Memory-Card Ports](pinouts.md#pinouts-controller-ports-and-memory-card-ports)
-[Pinouts - Audio, Video, Power, Expansion Ports](pinouts.md#pinouts-audio-video-power-expansion-ports)
-[Pinouts - SIO Pinouts](pinouts.md#pinouts-sio-pinouts)
-[Pinouts - Chipset Summary](pinouts.md#pinouts-chipset-summary)
-[Pinouts - CPU Pinouts](pinouts.md#pinouts-cpu-pinouts)
-[Pinouts - GPU Pinouts (for old 160-pin GPU)](pinouts.md#pinouts-gpu-pinouts-for-old-160-pin-gpu)
-[Pinouts - GPU Pinouts (for new 208-pin GPU)](pinouts.md#pinouts-gpu-pinouts-for-new-208-pin-gpu)
-[Pinouts - SPU Pinouts](pinouts.md#pinouts-spu-pinouts)
-[Pinouts - DRV Pinouts](pinouts.md#pinouts-drv-pinouts)
-[Pinouts - VCD Pinouts](pinouts.md#pinouts-vcd-pinouts)
-[Pinouts - HC05 Pinouts](pinouts.md#pinouts-hc05-pinouts)
-[Pinouts - MEM Pinouts](pinouts.md#pinouts-mem-pinouts)
-[Pinouts - CLK Pinouts](pinouts.md#pinouts-clk-pinouts)
-[Pinouts - PWR Pinouts](pinouts.md#pinouts-pwr-pinouts)
-[Pinouts - Component List and Chipset Pin-Outs for Digital Joypad, SCPH-1080](pinouts.md#pinouts-component-list-and-chipset-pin-outs-for-digital-joypad-scph-1080)
-[Pinouts - Component List and Chipset Pin-Outs for Analog Joypad, SCPH-1150](pinouts.md#pinouts-component-list-and-chipset-pin-outs-for-analog-joypad-scph-1150)
-[Pinouts - Component List and Chipset Pin-Outs for Analog Joypad, SCPH-1200](pinouts.md#pinouts-component-list-and-chipset-pin-outs-for-analog-joypad-scph-1200)
-[Pinouts - Component List and Chipset Pin-Outs for Analog Joypad, SCPH-110](pinouts.md#pinouts-component-list-and-chipset-pin-outs-for-analog-joypad-scph-110)
-[Pinouts - Component List and Chipset Pin-Outs for Namco Lightgun, NPC-103](pinouts.md#pinouts-component-list-and-chipset-pin-outs-for-namco-lightgun-npc-103)
-[Pinouts - Component List and Chipset Pin-Outs for Multitap, SCPH-1070](pinouts.md#pinouts-component-list-and-chipset-pin-outs-for-multitap-scph-1070)
-[Pinouts - Memory Cards](pinouts.md#pinouts-memory-cards)
-[Mods - Nocash PSX-XBOO Upload](pinouts.md#mods-nocash-psx-xboo-upload)
-[Mods - PAL/NTSC Color Mods](pinouts.md#mods-palntsc-color-mods)
-[About & Credits](aboutcredits.md)
- -[extracted from no$psx v2.0 documentation]
- +- [Martin Korth's email](http://problemkaputt.de/email.htm) +- [psx-spx issue tracker](https://github.com/psx-spx/psx-spx.github.io/issues) +- [PSX.Dev Discord server](https://discord.gg/QByKPpH) diff --git a/docs/cdromfileformats.md b/docs/cdromfileformats.md index dae36d2..50683bc 100644 --- a/docs/cdromfileformats.md +++ b/docs/cdromfileformats.md @@ -85,7 +85,7 @@ MagDemoNN is short for "Official U.S. Playstation Magazine Demo Disc NN"
## CDROM File Official Sony File Formats #### Official Sony File Formats -[https://psx.arthus.net/sdk/Psy-Q/DOCS/Devrefs/Filefrmt.pdf] - Sony 1998
+ - Sony 1998
``` File Formats (c) 1998 Sony Computer Entertainment Inc. @@ -837,7 +837,7 @@ doesn't contain any bitmap/palette data for such blank regions.
#### BMR Bitmaps These are 16bpp bitmaps, stored either in uncompressed .BMR files, or in compressed .RLE files:
-[CDROM File Compression RLE_16](cdromfileformats.md#cdrom-file-compression-rle16)
+[CDROM File Compression RLE_16](cdromfileformats.md#cdrom-file-compression-rle_16)
``` Apocalypse (MagDemo16: APOC\CD.HED\*.RLE and *.BMR) Spider-Man 1 older version (MagDemo31: SPIDEY\CD.HED\*.RLE) @@ -1040,7 +1040,7 @@ The whole .PSH file or the bitmap chunks can be compressed:
[CDROM File Compression EA Methods](cdromfileformats.md#cdrom-file-compression-ea-methods)
Variants of the .PSH format are also used on PC, PS2, PSP, XBOX (with other Chunk Types for other texture/palette formats, and for optional extra data). -For details, see: [http://wiki.xentax.com/index.php/EA\_SSH\_FSH\_Image] +For details, see: #### Destruction Derby Raw (MagDemo35: DDRAW\\*.PCK,\*.FNT,\*.SPR) @@ -1421,7 +1421,7 @@ offsets (for saving space when the file list contains fewer entries).
The PCX filesize is next-curr offset (or total-curr for last file).
#### References -[https://www.fileformat.info/format/pcx/egff.htm] + @@ -1908,7 +1908,7 @@ pictures:
#### Credits Thanks to Michael Sabin for info on various STR and BS variants:
-[https://github.com/m35/jpsxdec/] + @@ -3281,7 +3281,7 @@ color depth (although that may fit in with the game engine).
#### MPEG1 (on VCD Video CDs) MPEG1 uses I/P/B-Frames, the I-Frames may reach similar compression as BS files. However, P-Frames and B-Frames do compress much better than BS files.
-[CDROM Video CDs (VCD)](cdromfileformats.md#cdrom-video-cds-vcd)
+[CDROM Video CDs (VCD)](cdromvideocdsvcd.md)
MPEG1 isn't used in any PSX games, but VCDs can be viewed on SCPH-5903 consoles (or via software decoder in nocash PSX kernel clone).
@@ -4172,8 +4172,8 @@ file).
``` #### See also -[http://github.com/vgmstream/vgmstream/blob/master/src/meta/vag.c] ;very detailed
-[http://wiki.xentax.com/index.php/VAG_Audio] ;rather incomplete and perhaps wrong
+ ;very detailed
+ ;rather incomplete and perhaps wrong
@@ -4416,7 +4416,7 @@ Alone in the Dark IV has MIDB and DSND chunks (which contain sound files).
#### See also The page below does mention several PSX sound formats, plus some open source & closed source tools for handling those files.
-[https://github.com/loveemu/vgmdocs/blob/master/Conversion_Tools_for_Video_Game_Music.md]
+
@@ -5539,11 +5539,11 @@ This is reportedly also used for various other Electronic Arts games for PC, PSX, and PS2 (often with extension \*.BIG, \*.VIV).
Reportedly also "BIGH" and "BIG4" exist:
-[http://wiki.xentax.com/index.php/EA_BIG_BIGF_Archive] + Other Electronic Arts file formats (used inside or alongside big archives):
-[https://wiki.multimedia.cx/index.php/Electronic_Arts_Formats_(2)] - BNK etc + - BNK etc ##### Electronic Arts 24bit C0FB archives @@ -7389,7 +7389,7 @@ including valid offsets for 0-byte files like F\_START, F\_END, ENDOFWAD).
The game engine may insist on some files to be compressed or uncompressed (so compression may be required even if the uncompressed data would be smaller).
-More info: [http://doomwiki.org/wiki/WAD] +More info: @@ -8038,7 +8038,7 @@ The file header, the first some Folder headers (those in first quarter or so), and (all?) File Data is unencrypted (aka XORed with 0000h).
The Folder headers at higher offsets are encrypted with a 16bit XOR value. That XOR value is derived from Subchannel Q via LibCrypt:
-[CDROM Protection - LibCrypt](cdromfileformats.md#cdrom-protection-libcrypt)
+[CDROM Protection - LibCrypt](cdromdrive.md#cdrom-protection-libcrypt)
When not having the Subchannel data (or when not knowing which Folders are encrypted or unencrypted), one can simply obtain the encryption key from one of these entries (which will be key=0000h when unencrypted):
@@ -8177,9 +8177,9 @@ FF8 does reportedly also use GZIP (unknown in which files).
``` #### See also -[https://github.com/myst6re/deling/blob/master/FF8DiscArchive.cpp] + -[https://ff7-mods.github.io/ff7-flat-wiki/FF8/PlaystationMedia.html] + @@ -8271,9 +8271,9 @@ deep:
``` #### See also -[https://ninjatoes.blogspot.com/2020/07/] + -[https://wiki.ffrtt.ru/index.php?title=Main_Page] + @@ -9234,9 +9234,9 @@ corresponding with the Types (although extension V,D are used for two different types each).
##### See also: -[https://gist.github.com/ughman/3170834] + -[https://dl.dropbox.com/s/fu29g6xn97sa4pl/crash2fileformat.html] + ##### Weird Note @@ -9984,7 +9984,7 @@ replaced by pointers after loading (the initial values seem to have no purpose; they are aften set to constants with value 002xxxxxh which could be useful for file type detection, but they vary in different game versions).
See also:
-[https://github.com/vs49688/CrocUtils/] (for PC version, PSX support in progress)
+ (for PC version, PSX support in progress)
@@ -10078,7 +10078,7 @@ Additional DEM files (always 1774h bytes) (if any, not all .WAD's have .DEM's):< 004h N*8 Whatever entries... maybe data for demonstration mode? ``` See also:
-[http://wiki.xentax.com/index.php/Argonaut\_WAD] + @@ -10142,7 +10142,7 @@ nonzero values; though not always, eg. raw ADPCM or raw bitmaps).
[CDROM File Compression BZZ](cdromfileformats.md#cdrom-file-compression-bzz)
[CDROM File Compression RESOURCE (Star Wars Rebel Assault 2)](cdromfileformats.md#cdrom-file-compression-resource-star-wars-rebel-assault-2)
[CDROM File Compression TIM-RLE4/RLE8](cdromfileformats.md#cdrom-file-compression-tim-rle4rle8)
-[CDROM File Compression RLE_16](cdromfileformats.md#cdrom-file-compression-rle16)
+[CDROM File Compression RLE_16](cdromfileformats.md#cdrom-file-compression-rle_16)
[CDROM File Compression PIM/PRS (Legend of Mana)](cdromfileformats.md#cdrom-file-compression-pimprs-legend-of-mana)
[CDROM File Compression BPE (Byte Pair Encoding)](cdromfileformats.md#cdrom-file-compression-bpe-byte-pair-encoding)
[CDROM File Compression RNC (Rob Northen Compression)](cdromfileformats.md#cdrom-file-compression-rnc-rob-northen-compression)
@@ -10794,9 +10794,9 @@ apart from that, it does mainly use GZIP compressed files.
## CDROM File Compression GT20 and PreGT20 #### GT20 Compressed Files -Used by Rollcage (MagDemo19: ROLLCAGE\SPEED.IMG\\*)
-Used by Rollcage Stage II (MagDemo31: ROLLCAGE\SPEED.IDX\\*)
-Used by Sydney 2000 (MagDemo37: OLY2000\DEMO.IDX\\* and OLY2000\GTO\\*.GTO)
+Used by Rollcage (MagDemo19: ROLLCAGE\SPEED.IMG\\\*)
+Used by Rollcage Stage II (MagDemo31: ROLLCAGE\SPEED.IDX\\\*)
+Used by Sydney 2000 (MagDemo37: OLY2000\DEMO.IDX\\\* and OLY2000\GTO\\\*.GTO)
Reportedly also Chill (PS1) (\*.GTO)
Reportedly also Ducati World: Racing Challenge
Reportedly also Martian Gothic: Unification (PS1) (\*.GT20)
@@ -10843,8 +10843,8 @@ to load it to the end of the decompression buffer).
Note: Uncompressed files can reportedly contain "NOGT" in the header, however, Rollcage does have compressed files (with GT20 header), and raw uncompressed files (without any NOGT header).
-[https://zenhax.com/viewtopic.php?t=13175] (specs)
-See also: [http://wiki.xentax.com/index.php/GT20\_Archive] (blurp)
+ (specs)
+See also: (blurp)
#### Pre-GT20 Compressed Files Used by Bloody Roar 1 (MagDemo06: BL\\*.DAT\\*)
@@ -11400,8 +11400,8 @@ decompressed data is max 3000h bytes per chunk. Unknown if the next chunk may copy data from previous chunk.
#### Links -[http://aminet.net/package/util/pack/RNC_ProPack] - official tool & source code
-[https://segaretro.org/Rob_Northen_compression] - description (contains bugs)
+ - official tool & source code
+ - description (contains bugs)
RNC is used in a number of games by UK developers (notably Bullfrog and @@ -11705,7 +11705,7 @@ filesizes for PGA Tour 96, 97, 98 COURSES\\*\\*.VIV\\*.mis are compressed=58h, uncompressed=50h).
#### See also -[http://wiki.niotso.org/RefPack] - LZ method
+ - LZ method
@@ -12356,9 +12356,7 @@ is including a MacBinary header in the compressed files).
#### See also The site below has useful links with info about headers (see LHA Notes), source code, and test archives:
-``` - http://fileformats.archiveteam.org/wiki/LHA -``` + @@ -12443,9 +12441,7 @@ decompression (one must either decompress the whole file to detect the size, or one could try to find the Footer at end of file; which requires weird heuristics because the LZIP manual is explicitely stating that it's valid to append extra data after the Footer).
-``` - http://www.nongnu.org/lzip/manual/lzip_manual.html#File-format -``` + #### .chd (MAME compressed CDROM and HDD images) The CHD format has its own headers and supports several compression methods @@ -12468,7 +12464,7 @@ filters.
The 7z format defines many compression methods. The ones normally used are LZMA2 (default for 7-Zip 9.30 alpha +), LZMA (default for 7-Zip prior to 9.30 alpha), PPMd, and bzip2.
-[http://fileformats.archiveteam.org/wiki/7z] + #### LZMA2 (used in .7z and .xz files) @@ -12521,7 +12517,7 @@ Apart from the chunks, LZMA2 does usually contain a Dictionary Size byte:
#### LZMA Source code Compact LZMA decompression ASM code can be found here:
-[https://github.com/ilyakurdyukov/micro-lzmadec] + Above code is for self-decompressing executables (for plain LZMA, ignore the stuff about EXE/ELF headers). The two "static" versions are size-optimized @@ -12739,13 +12735,13 @@ error about missing MSVCRT.DLL:\_\_\_mb\_cur\_max\_func). XZ Utils for DOS does on Win98.
Official XZ file format specs for can be found at:
-[https://tukaani.org/xz/format.html] + The BCJ filters aren't documented in XZ specs, but are defined in XZ source code, see src\liblzma\simple\\*.c). There's also this mail thread about semi-official ARM64 filters:
-[https://www.mail-archive.com/xz-devel@tukaani.org/msg00537.html] + @@ -12796,13 +12792,12 @@ Metadata Block Types:
#### More info The FLAC file format is documented here:
-``` - https://xiph.org/flac/format.html -``` + + + Source code for a compact FLAC decoder can be found here:
-``` - https://www.nayuki.io/page/simple-flac-implementation -``` + + @@ -13176,7 +13171,7 @@ cannot compress repeating 90h-bytes).
return empty_tree dw FEFFh,FEFFh ;upen empty tree, ARC defines two 1bit END codes ``` -[http://fileformats.archiveteam.org/wiki/Squeeze] + #### Randomized LZW @@ -13259,17 +13254,17 @@ additional information from third-party tools:
``` #### See also -[http://fileformats.archiveteam.org/wiki/ARC_(compression_format)] + -[https://www.fileformat.info/format/arc/corion.htm] + -[http://cd.textfiles.com/pcmedic/utils/compress/arc520s.zip] - source code
+ - source code
-[https://github.com/ani6al/arc] - source code, upgraded with method 9 and 4
+ - source code, upgraded with method 9 and 4
-[https://entropymine.wordpress.com/2021/05/11/arcs-trimmed-compression-scheme/]
+
-[http://www.textfiles.com/programming/FORMATS/arc-lbr.pro] - benchmarks
+ - benchmarks
@@ -13698,7 +13693,7 @@ look as so (with "." meaning 00h end-byte):
" 123 . " <-- extra weird, leading/trailing spaces, mis-placed end-byte " 123 " <-- extra weird, leading/trailing spaces, without end-byte ``` -See also: [https://www.gnu.org/software/tar/manual/html_node/Standard.html] +See also: #### CPIO Format (1977) (and MAC .PAX files) @@ -13774,7 +13769,7 @@ Ascii/hex CPIO Chunk format:
``` CPIO numeric values are weird octal ASCII strings (eg. 6-byte "000123"), but, unlike TAR, without extra oddities like spaces or end-bytes.
-[https://www.systutorials.com/docs/linux/man/5-cpio/] + #### RPM Format (1997) (BIG-ENDIAN) @@ -13905,7 +13900,7 @@ compressed files (eg. LZH archives created with LHA MAC version).
... .. Padding to 80h-byte boundary ... .. Get Info comment (if any, usually none) ``` -CRC16-XMODEM: [http://www.sunshine2k.de/coding/javascript/crc/crc_js.html] +CRC16-XMODEM: #### BinHex 4.0 (.hqx) (ASCII, RLE90, big-endian) @@ -14046,7 +14041,7 @@ MAC File Type,Creator IDs = "PIT ","UPIT" \<-- other (=compressed?)
[tree+index*4+1*2] = GetTreeEntry ;-recursive call for node1 return index ``` -[http://www.network172.com/early-mac-software/packit-source-code/] - official
+ - official
#### StuffIt (.sit) (Macintosh) (old format) (1987) (big-endian) MAC File Type,Creator IDs = "SIT!","SIT!" (version=01h).
@@ -14229,7 +14224,7 @@ descriptions of the algorithms.
``` The StuffIt X headers are somehow compressed/compacted (there are very few 00h bytes even when filesize entries should have zeroes in MSBs).
-[https://github.com/incbee/Unarchiver/blob/master/XADMaster/XADStuffItXParser.m] + #### Compact Pro aka Compactor (.cpt) (Macintosh) (1990s) (big-endian) @@ -14374,8 +14369,8 @@ End of Last Block
2000h leading bytes to avoid page faults (not just the 3 initialized bytes). ``` See also:
-[https://github.com/dgilman/macutils/blob/master/macunpack/cpt.c] - source code
-[https://github.com/MacPaw/XADMaster/wiki/CompactProSpecs] - confused anti-specs
+ - source code
+ - confused anti-specs
#### Self-Extracting Archives (SEA) The abbreviation SEA (and extension .sea) is used for several self-extracting @@ -14481,11 +14476,11 @@ Compressed Resources (when Attributes.bit0=1)
00Eh 4 For Type9: decompressor_specific_parameters_with_io ;/ 012h .. Compressed Resource Data ``` -[http://formats.kaitai.io/compressed_resource/] + Owned Resources (with Resource ID=C000h..FFFFh):
-[https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format] + The upper 5bit (mask F800h) indicate the resource type of the owner, the middle 6bit (mask 07E0h) indicate the resource id of the owner, and the lower 5bit @@ -16154,19 +16149,19 @@ renamed to CHDMAN (V3/V4/V5).
##### References CHD source code (see files cdrom.\*, chd\*.\*, etc):
-[https://github.com/mamedev/mame/tree/master/src/lib/util] + CHDMAN commandline tool for generating chd files:
-[https://github.com/mamedev/mame/blob/master/src/tools/chdman.cpp] + CHD decompression clone with useful comments:
-[https://github.com/SnowflakePowered/chd-rs/tree/master/chd-rs/src] + CHD format reverse-engineering thread:
-[http://www.psxdev.net/forum/viewtopic.php?f=70&t=3980] + @@ -16194,7 +16189,7 @@ Some info on (uncompressed) .C2D files can be found in libmirage source code.
-[http://www.ezbsystems.com/isz/iszspec.txt] + The format might be suitable for PC CDROMs, but it's useless for PSX CDROMs.
diff --git a/docs/cheatdevices.md b/docs/cheatdevices.md index 69385ba..48a97a9 100644 --- a/docs/cheatdevices.md +++ b/docs/cheatdevices.md @@ -26,10 +26,10 @@ DB25 connector can be directly connected to a PC parallel port.
#### FLASH Chips (for both Xplorer and Datel) [Cheat Devices - FLASH/EEPROMs](cheatdevices.md#cheat-devices-flasheeproms)
-http://gamehacking.org/faqs/hackv500c.html - cheat code formats
-http://doc.kodewerx.org/hacking\_psx.html - cheat code formats
-http://xianaix.net/museum.htm - around 64 bios versions
-http://www.murraymoffatt.com/playstation-xplorer.html - xplorer bioses
+ - cheat code formats
+ - cheat code formats
+ - around 64 bios versions
+ - xplorer bioses
#### Separating between Gameshark and Xplorer Codes ``` @@ -129,9 +129,9 @@ Command Handler at Pre-Boot time can also upload EXE code, but doesn't have Kernel installed).
Original Datel commands for Menu/Game mode are unknown. The Caetla commands are documented in japanese, and there are also two english translations:
-http://www.psxdev.net/forum/viewtopic.php?f=49&t=370 - good (though + - good (though incomplete)
-http://www.psxdev.net/forum/viewtopic.php?f=53&t=462#p6849 - very bad + - very bad (beware)
diff --git a/docs/controllersandmemorycards.md b/docs/controllersandmemorycards.md index 614fec1..2b045b6 100644 --- a/docs/controllersandmemorycards.md +++ b/docs/controllersandmemorycards.md @@ -350,7 +350,8 @@ The TAP byte should be usually zero, unless one wants to activate Multitap The two MOT bytes are meant to control the rumble motors (for normal non-rumble controllers, that bytes should be 00h), however, the MOT bytes have no effect unless rumble is enabled via config commands, for details, see
-[Controllers - Rumble Configuration](controllersandmemorycards.md#controllers-rumble-configuration)
+[Controllers - Configuration Commands](controllersandmemorycards.md#controllers-configuration-commands)
+[Controllers - Vibration/Rumble Control](controllersandmemorycards.md#controllers-vibrationrumble-control)
#### Controller ID (Halfword Number 0) ``` @@ -624,7 +625,7 @@ Cable:
Some keyboard adaptors are also including a mouse adaptor feature (either by simulating normal Sony Mouse controller data, or via more uncommon ways like using the PSX expansion port).
-[Controllers - Keyboards](controllersandmemorycards.md#controllers---keyboards)
+[Controllers - Keyboards](controllersandmemorycards.md#controllers-keyboards)
#### RS232 Mice Below is some info on RS232 serial mice. That info isn't directly PSX related @@ -1703,6 +1704,38 @@ on it. Stay Away!
+## Controllers - Pop'n Controllers +Controllers used for Konami's Pop'n Music series. At least a few different +versions of the controller (Pop'n Controller, Pop'n Controller 2, larger +arcade-size version, possibly others and in different color variations) have +been released for the PS1 and PS2. Unknown if the controllers released in the +PS2 era have any additional commands not present in the original Pop'n +Controller, but they are supposedly fully compatible with PS1 Pop'n Music games. + +Pop'n Controllers report as digital controllers (ID byte 41h), but the left, +right, and down d-pad controls are not connected to any physical buttons and are +always reported as pressed (in the first transferred button byte, bits 5-7 are +always 0). Pop'n Music games check these bits to determine if a Pop'n Controller +is connected and will change the in-game controls accordingly if so. + + + +## Controllers - Densha de Go! / Jet de Go! Controllers +Controllers used for Taito's Densha de Go! and Jet de Go! series. Unknown what +method is being used by Densha de Go! and Jet de Go! games for detecting these +controllers. + +- The workings of Densha de Go! PSX controllers have been extensively researched + in the [ddgo-controller-docs](https://github.com/MarcRiera/ddgo-controller-docs) + repo. +- The Jet de Go! PSX controller comes in gray and black color. It seems to work + the same as an analog controller and supports vibration. The steering wheel is + mapped to the left stick (wheel rotation as horizontal, wheel raise/lower as + vertical axis). The thrust throttle seems mapped to the right stick Y-axis + full range (so half throttle matches vertically centered right stick). + + + ## Controllers - Fishing Controllers The fishing rods are (next to lightguns) some of the more openly martial playstation controllers - using the credo that "as long as you aren't using diff --git a/docs/cpuspecifications.md b/docs/cpuspecifications.md index 3c0a1b4..44b94bb 100644 --- a/docs/cpuspecifications.md +++ b/docs/cpuspecifications.md @@ -666,10 +666,10 @@ using the BIOS).
Of course, the above exeption handling won't work in branch delays (where BD gets set to indicate that EPC was modified) (best workaround is not to use GTE commands in branch delays).
-Several games are known to rely on this, notably including the Crash Bandicoot trilogy, +Several games are known to rely on this, notably including the Crash Bandicoot trilogy, Jinx and Spyro the Dragon, all of which will render broken geometry -if running on an emulator which doesn't emulate this, -or if the installed interrupt service routine doesn't account for it. +if running on an emulator which doesn't emulate this, +or if the installed interrupt service routine doesn't account for it. #### cop0cmd=10h - RFE opcode - Prepare Return from Exception The RFE opcode moves some bits in cop0r12 (SR): bit2-3 are copied to bit0-1, diff --git a/docs/dmachannels.md b/docs/dmachannels.md index ce14118..4101702 100755 --- a/docs/dmachannels.md +++ b/docs/dmachannels.md @@ -213,10 +213,13 @@ cycles). This is making DMA much faster than CPU memory accesses (CPU DRAM access takes 1 opcode cycle plus 6 waitstates, ie. 7 cycles in total)
#### CPU Operation during DMA -CPU is running during DMA within very strict rules. It can be kept running when accessing only cache, scratchpad, COP0 and GTE.
-It can also make use of the 4 entry Write queue for both RAM and I/O registers, see:
-[Write queue](memorymap.md#Write-queue)
-Any read access from RAM or I/O registers or filling more than 4 entries into the write queue will stall the CPU until the DMA is finished.
+CPU is running during DMA within very strict rules. It can be kept running when +accessing only cache, scratchpad, COP0 and GTE.
+It can also make use of the 4 entry Write queue for both RAM and I/O registers, +see:
+[Write queue](memorymap.md#write-queue)
+Any read access from RAM or I/O registers or filling more than 4 entries into +the write queue will stall the CPU until the DMA is finished.
Additionally, the CPU operation resumes during periods when DMA gets interrupted (ie. after SyncMode 1 blocks, after SyncMode 2 list entries) (or in SyncMode 0 with Chopping enabled).
diff --git a/docs/expansionportpio.md b/docs/expansionportpio.md index bb37a0f..279cd24 100644 --- a/docs/expansionportpio.md +++ b/docs/expansionportpio.md @@ -336,7 +336,7 @@ Unknown if the Interrupt signal is connected to the PSX... there seems to be no spare IRQ for it, though it \ share an IRQ with whatever other hardware...?
The BIOS seems to use only one of the two channels; for the std\_io functions:
-[BIOS TTY Console (std_io)](kernelbios.md#bios-tty-console-stdio)
+[BIOS TTY Console (std_io)](kernelbios.md#bios-tty-console-std_io)
Aside from the external DUART, the PSX additionally contains an internal UART,
[Serial Interfaces (SIO)](serialinterfacessio.md)
The DTL-H2000 devboard uses a non-serial "ATCONS" channel for TTY stuff,
diff --git a/docs/graphicsprocessingunitgpu.md b/docs/graphicsprocessingunitgpu.md index 5592a2e..5b66cb5 100755 --- a/docs/graphicsprocessingunitgpu.md +++ b/docs/graphicsprocessingunitgpu.md @@ -1420,7 +1420,7 @@ blending and a channel's intensity ends up being < 0, it's clamped to 0.
Modulation is a colour effect that can be applied to textured primitives. For each pixel of the primitive it combines every colour channel of the fetched texel with the corresponding channel of the interpolated vertex colour according -to this formula (Assuming all channels are 8-bit).
+to this formula (Assuming all channels are 8-bit).
```glsl finalChannel.rgb = (texel.rgb * vertexColour.rgb) / vec3(128.0) ``` diff --git a/docs/index.md b/docs/index.md index b67ce84..32d9a15 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,6 @@ + +# Home + ## **IMPORTANT UPDATE** On the 20th of August 2022, Martin surprisingly released a new version of this documentation. While this fork will try to incorporate the changes, one important footnote that got added is the following: diff --git a/docs/kernelbios.md b/docs/kernelbios.md index 9f19613..02145e7 100644 --- a/docs/kernelbios.md +++ b/docs/kernelbios.md @@ -21,7 +21,7 @@ [BIOS Internal Boot Functions](kernelbios.md#bios-internal-boot-functions)
[BIOS More Internal Functions](kernelbios.md#bios-more-internal-functions)
[BIOS PC File Server](kernelbios.md#bios-pc-file-server)
-[BIOS TTY Console (std_io)](kernelbios.md#bios-tty-console-stdio)
+[BIOS TTY Console (std_io)](kernelbios.md#bios-tty-console-std_io)
[BIOS Character Sets](kernelbios.md#bios-character-sets)
[BIOS Control Blocks](kernelbios.md#bios-control-blocks)
[BIOS Versions](kernelbios.md#bios-versions)
@@ -838,7 +838,7 @@ being reserved for loading executables).
#### Note For more info about EXE files and their headers, see
-[CDROM File Formats](cdromdrive.md#cdrom-file-formats)
+[CDROM File Formats](cdromfileformats.md)
@@ -2142,14 +2142,14 @@ That type of buffer can be used with "_ioabort", "longjmp", and also "HookEntryInt(addr)".
The "setjmp" function returns 0 when called directly. However, it may return again - to the same return address, and the same stack pointer - with another return value (which should be usually -non-zero, to indicate that the state has been restored (eg. _ioabort passes 1 as +non-zero, to indicate that the state has been restored (eg. \_ioabort passes 1 as return value).
Also noteworthy from what a compliant setjmp implementation should be doing is the absence of saving the state of cop0 and cop2, thus making this slightly unsuitable for a typical coroutine system implementation.
#### A(14h) - longjmp(buf, param) -Restores the R16-R23,GP,SP,FP,RA registers from a previously recorded +Restores the R16-R23,GP,SP,FP,RA registers from a previously recorded jmp_buf buffer, and "returns" to that new RA address (rather than to the caller of the longjmp function). The "param" value is passed as "return value" to the code at RA, ie. usually to the caller of the original setjmp call. Noteworthy difference @@ -2160,8 +2160,8 @@ call and a rollback. See setjmp for further details.
#### A(53h) - set\_ioabort\_handler(src) ;PS2 only ;PSX: SystemError Normally the _ioabort handler is changed only internally during booting, with -this new function, games can install their own _ioabort handler. src is pointer -to a 30h-byte "savestate" structure, which will be copied to the actual _ioabort +this new function, games can install their own \_ioabort handler. src is pointer +to a 30h-byte "savestate" structure, which will be copied to the actual \_ioabort structure.
#### A(06h) or B(38h) - exit(exitcode) diff --git a/docs/konamisystem573.md b/docs/konamisystem573.md index 5cbb19a..f9a093a 100755 --- a/docs/konamisystem573.md +++ b/docs/konamisystem573.md @@ -763,23 +763,23 @@ sends it, waits for a response to be received and lets the 573 read it. In order to perform a JVS transaction the 573 must: -1. Reset the MCU through register `0x1f400000`, clear `JVSIRDY` by writing to - `0x1f520000` then wait for the status and error codes in register - `0x1f400004` to be set to 0 and 3 respectively. -2. Write the packet two bytes at a time to `0x1f680000`, waiting for `JVSDRDY` - to go low before each write. Words are little endian, so for instance the - first word of a packet with destination address `0x01` would be `0x01e0`. If - the total length of the packet is odd, the last byte shall still be written - as a word (with the upper byte zeroed out). -3. Wait for the status code to become 1. At this point the MCU will send the - packet and wait for a response from a device on the bus. -4. Wait for the status code to become 0, signalling a valid response has been - received and can be read out. A timeout should be implemented here, as the - MCU will wait for a response indefinitely even if no device is present. -5. Read the packet, again two bytes at a time, from `0x1f40000a`, waiting for - `JVSIRDY` to go high before each read and clearing it by writing to - `0x1f520000` after each read. The status code will be set to 2 after the - first word is read and back to 0 once no more data is available to read. +1. Reset the MCU through register `0x1f400000`, clear `JVSIRDY` by writing to + `0x1f520000` then wait for the status and error codes in register + `0x1f400004` to be set to 0 and 3 respectively. +2. Write the packet two bytes at a time to `0x1f680000`, waiting for `JVSDRDY` + to go low before each write. Words are little endian, so for instance the + first word of a packet with destination address `0x01` would be `0x01e0`. If + the total length of the packet is odd, the last byte shall still be written + as a word (with the upper byte zeroed out). +3. Wait for the status code to become 1. At this point the MCU will send the + packet and wait for a response from a device on the bus. +4. Wait for the status code to become 0, signalling a valid response has been + received and can be read out. A timeout should be implemented here, as the + MCU will wait for a response indefinitely even if no device is present. +5. Read the packet, again two bytes at a time, from `0x1f40000a`, waiting for + `JVSIRDY` to go high before each read and clearing it by writing to + `0x1f520000` after each read. The status code will be set to 2 after the + first word is read and back to 0 once no more data is available to read. The MCU does not allow for non-JVS packets to be sent as it validates the sync byte, checksum and uses the length field to determine packet length. Responses @@ -1318,209 +1318,210 @@ password. A ZS01 transaction can be broken down into the following steps: -1. The 573 prepares a 12-byte packet to be sent to the ZS01, containing a - command, address and payload: - - | Bytes | Description | - | ----: | :------------------------------------------------ | - | 0 | Command flags | - | 1 | Address bits 0-7 | - | 2-9 | Payload (data for writes, response key for reads) | - | 10-11 | CRC16 of bytes 0-9, big endian | - - The first byte is a 3-bit bitfield encoding the command and access type: - - | Bits | Description | - | ---: | :--------------------------------------------- | - | 0 | Command (0 = write/erase, 1 = read) | - | 1 | Address bit 8 (unused, should be 0) | - | 2 | Access type (0 = unprivileged, 1 = privileged) | - | 3-7 | Unused? (should be 0) | - - The access type bit specifies whether the command is privileged. Privileged - commands require the ZS01's current password, while unprivileged commands do - not. - - The address must be one of the following values: - - | Address | Length | Privileged | Description | - | :---------- | -------: | :--------- | :----------------------------------------- | - | `0x00-0x03` | 32 bytes | No | Unprivileged data area | - | `0x04-0x0e` | 80 bytes | Yes | Privileged data area | - | `0xfc` | 8 bytes | No | Internal ZS01 serial number | - | `0xfd` | 8 bytes | No | External DS2401 serial number | - | `0xfd` | 8 bytes | Yes | Erases data area when written (write-only) | - | `0xfe` | 8 bytes | Yes | Configuration registers | - | `0xff` | 8 bytes | Yes | New password (write-only) | - - Data is always read or written in aligned 8 byte blocks. Unprivileged areas - can be read using either a privileged or unprivileged read command, but - writing to them still requires a privileged write command. - -2. If the command is a read command, a random 8-byte "response key" is generated - (typically as an MD5 hash of the current time from the RTC) and written to - the payload field; the ZS01 will later use it to encrypt the returned data - as a replay attack prevention measure. For write commands, the payload field - is populated with the 8 bytes to be written. - -3. A CRC16 is calculated over the first 10 bytes of the packet and stored in the - last 2 bytes in big endian format. The CRC is computed as follows: - - ```c - #define ZS01_CRC16_POLYNOMIAL 0x1021 - - uint16_t zs01_crc16(const uint8_t *data, size_t length) { - uint16_t crc = 0xffff; - - for (; length; length--) { - crc ^= *(data++) << 8; - - for (int bit = 8; bit; bit--) { - uint16_t temp = crc; - - crc <<= 1; - if (temp & (1 << 15)) - crc ^= ZS01_CRC16_POLYNOMIAL; - } - } - - return (~crc) & 0xffff; - } - ``` - -4. If the command is privileged, the 573 scrambles the payload field with the - chip's currently set password, using the following algorithm: - - ```c - // Note that this state is preserved across calls to zs01_scramble_payload() - // and must be updated when a response is received (see step 8). - uint8_t zs01_scrambler_state = 0; - - void zs01_scramble_payload( - uint8_t *output, const uint8_t *input, size_t length, - const uint8_t *password - ) { - for (; length; length--) { - int value = *(input++) ^ zs01_scrambler_state; - value = (value + password[0]) & 0xff; - - for (int i = 1; i < 8; i++) { - int add = password[i] & 0x1f; - int shift = password[i] >> 5; - - int shifted = value << shift; - shifted |= value >> (8 - shift); - shifted &= 0xff; - - value = (shifted + add) & 0xff; - } - - zs01_scrambler_state = value; - *(output++) = value; - } - } - ``` - - The CRC16 is *not* updated to reflect the new data. This step is skipped for - unprivileged read commands. - -5. All 12 bytes of the packet are scrambled with a fixed "command key", using - the following algorithm: - - ```c - static const uint8_t ZS01_COMMAND_ADD[] = { 237, 8, 16, 11, 6, 4, 8, 30 }; - static const uint8_t ZS01_COMMAND_SHIFT[] = { 0, 3, 2, 2, 6, 2, 2, 1 }; - - void zs01_scramble_packet( - uint8_t *output, const uint8_t *input, size_t length - ) { - // Unlike zs01_scramble_payload(), this state is *not* preserved across - // calls. - uint8_t state = 0xff; - - output += length; - input += length; - - for (; length; length--) { - int value = *(--input) ^ state; - value = (value + ZS01_COMMAND_ADD[0]) & 0xff; - - for (int i = 1; i < 8; i++) { - int shifted = value << ZS01_COMMAND_SHIFT[i]; - shifted |= value >> (8 - ZS01_COMMAND_SHIFT[i]); - shifted &= 0xff; - - value = (shifted + ZS01_COMMAND_ADD[i]) & 0xff; - } - - state = value; - *(--output) = value; - } - } - ``` - -6. The scrambled packet is sent to the ZS01, which will respond to the first 11 - bytes immediately with an I2C ACK and to the last byte with an ACK after a - short delay. The 573 then proceeds to read 12 bytes from the ZS01, issuing an - I2C ACK for each byte received up until the last one. - -7. The 573 uses the response key generated in step 2 to unscramble the packet - returned by the ZS01. The unscrambling algorithm is the same one used in step - 5, applied in reverse: - - ```c - void zs01_unscramble_packet( - uint8_t *output, const uint8_t *input, size_t length, - const uint8_t *response_key - ) { - uint8_t state = 0xff; - - output += length; - input += length; - - for (; length; length--) { - int value = *(--input); - int last_state = state; - state = value; - - for (int i = 1; i < 8; i++) { - int add = response_key[i] & 0x1f; - int shift = response_key[i] >> 5; - - int subtracted = (value - add) & 0xff; - - value = subtracted >> shift; - value |= subtracted << (8 - shift); - value &= 0xff; - } - - value = (value - response_key[0]) & 0xff; - *(--output) = value ^ last_state; - } - } - ``` - - For write commands, the response key required to unscramble the packet is the - one sent as part of the last read command issued. For read commands, the ZS01 - may either use the key provided in the payload field or the one from the last - read command issued; Konami's code tries unscrambling responses with both. - -8. The unscrambled packet will contain the following fields: - - | Bytes | Description | - | ----: | :----------------------------------------- | - | 0 | Status code (0 = success, 1-5 = error) | - | 1 | New payload scrambler state | - | 2-9 | Payload (empty for writes, data for reads) | - | 10-11 | CRC16 of bytes 0-9, big endian | - - The 573 proceeds to compute the CRC16 of the first 10 bytes. If it does not - match the one in the packet, it will try unscrambling the packet with a - different response key (see step 7) before giving up. Otherwise, the global - `zs01_scrambler_state` variable from step 4 is set to the value of byte 1, - regardless of whether the status code is zero or not. - - The exact meaning of non-zero status codes is currently unknown. +1. The 573 prepares a 12-byte packet to be sent to the ZS01, containing a + command, address and payload: + + | Bytes | Description | + | ----: | :------------------------------------------------ | + | 0 | Command flags | + | 1 | Address bits 0-7 | + | 2-9 | Payload (data for writes, response key for reads) | + | 10-11 | CRC16 of bytes 0-9, big endian | + + The first byte is a 3-bit bitfield encoding the command and access type: + + | Bits | Description | + | ---: | :--------------------------------------------- | + | 0 | Command (0 = write/erase, 1 = read) | + | 1 | Address bit 8 (unused, should be 0) | + | 2 | Access type (0 = unprivileged, 1 = privileged) | + | 3-7 | Unused? (should be 0) | + + The access type bit specifies whether the command is privileged. Privileged + commands require the ZS01's current password, while unprivileged commands do + not. + + The address must be one of the following values: + + | Address | Length | Privileged | Description | + | :---------- | -------: | :--------- | :----------------------------------------- | + | `0x00-0x03` | 32 bytes | No | Unprivileged data area | + | `0x04-0x0e` | 80 bytes | Yes | Privileged data area | + | `0xfc` | 8 bytes | No | Internal ZS01 serial number | + | `0xfd` | 8 bytes | No | External DS2401 serial number | + | `0xfd` | 8 bytes | Yes | Erases data area when written (write-only) | + | `0xfe` | 8 bytes | Yes | Configuration registers | + | `0xff` | 8 bytes | Yes | New password (write-only) | + + Data is always read or written in aligned 8 byte blocks. Unprivileged areas + can be read using either a privileged or unprivileged read command, but + writing to them still requires a privileged write command. + +2. If the command is a read command, a random 8-byte "response key" is + generated (typically as an MD5 hash of the current time from the RTC) and + written to the payload field; the ZS01 will later use it to encrypt the + returned data as a replay attack prevention measure. For write commands, the + payload field is populated with the 8 bytes to be written. + +3. A CRC16 is calculated over the first 10 bytes of the packet and stored in + the last 2 bytes in big endian format. The CRC is computed as follows: + + ```c + #define ZS01_CRC16_POLYNOMIAL 0x1021 + + uint16_t zs01_crc16(const uint8_t *data, size_t length) { + uint16_t crc = 0xffff; + + for (; length; length--) { + crc ^= *(data++) << 8; + + for (int bit = 8; bit; bit--) { + uint16_t temp = crc; + + crc <<= 1; + if (temp & (1 << 15)) + crc ^= ZS01_CRC16_POLYNOMIAL; + } + } + + return (~crc) & 0xffff; + } + ``` + +4. If the command is privileged, the 573 scrambles the payload field with the + chip's currently set password, using the following algorithm: + + ```c + // Note that this state is preserved across calls to zs01_scramble_payload() + // and must be updated when a response is received (see step 8). + uint8_t zs01_scrambler_state = 0; + + void zs01_scramble_payload( + uint8_t *output, const uint8_t *input, size_t length, + const uint8_t *password + ) { + for (; length; length--) { + int value = *(input++) ^ zs01_scrambler_state; + value = (value + password[0]) & 0xff; + + for (int i = 1; i < 8; i++) { + int add = password[i] & 0x1f; + int shift = password[i] >> 5; + + int shifted = value << shift; + shifted |= value >> (8 - shift); + shifted &= 0xff; + + value = (shifted + add) & 0xff; + } + + zs01_scrambler_state = value; + *(output++) = value; + } + } + ``` + + The CRC16 is *not* updated to reflect the new data. This step is skipped for + unprivileged read commands. + +5. All 12 bytes of the packet are scrambled with a fixed "command key", using + the following algorithm: + + ```c + static const uint8_t ZS01_COMMAND_ADD[] = { 237, 8, 16, 11, 6, 4, 8, 30 }; + static const uint8_t ZS01_COMMAND_SHIFT[] = { 0, 3, 2, 2, 6, 2, 2, 1 }; + + void zs01_scramble_packet( + uint8_t *output, const uint8_t *input, size_t length + ) { + // Unlike zs01_scramble_payload(), this state is *not* preserved across + // calls. + uint8_t state = 0xff; + + output += length; + input += length; + + for (; length; length--) { + int value = *(--input) ^ state; + value = (value + ZS01_COMMAND_ADD[0]) & 0xff; + + for (int i = 1; i < 8; i++) { + int shifted = value << ZS01_COMMAND_SHIFT[i]; + shifted |= value >> (8 - ZS01_COMMAND_SHIFT[i]); + shifted &= 0xff; + + value = (shifted + ZS01_COMMAND_ADD[i]) & 0xff; + } + + state = value; + *(--output) = value; + } + } + ``` + +6. The scrambled packet is sent to the ZS01, which will respond to the first 11 + bytes immediately with an I2C ACK and to the last byte with an ACK after a + short delay. The 573 then proceeds to read 12 bytes from the ZS01, issuing + an I2C ACK for each byte received up until the last one. + +7. The 573 uses the response key generated in step 2 to unscramble the packet + returned by the ZS01. The unscrambling algorithm is the same one used in + step 5, applied in reverse: + + ```c + void zs01_unscramble_packet( + uint8_t *output, const uint8_t *input, size_t length, + const uint8_t *response_key + ) { + uint8_t state = 0xff; + + output += length; + input += length; + + for (; length; length--) { + int value = *(--input); + int last_state = state; + state = value; + + for (int i = 1; i < 8; i++) { + int add = response_key[i] & 0x1f; + int shift = response_key[i] >> 5; + + int subtracted = (value - add) & 0xff; + + value = subtracted >> shift; + value |= subtracted << (8 - shift); + value &= 0xff; + } + + value = (value - response_key[0]) & 0xff; + *(--output) = value ^ last_state; + } + } + ``` + + For write commands, the response key required to unscramble the packet is + the one sent as part of the last read command issued. For read commands, the + ZS01 may either use the key provided in the payload field or the one from + the last read command issued; Konami's code tries unscrambling responses + with both. + +8. The unscrambled packet will contain the following fields: + + | Bytes | Description | + | ----: | :----------------------------------------- | + | 0 | Status code (0 = success, 1-5 = error) | + | 1 | New payload scrambler state | + | 2-9 | Payload (empty for writes, data for reads) | + | 10-11 | CRC16 of bytes 0-9, big endian | + + The 573 proceeds to compute the CRC16 of the first 10 bytes. If it does not + match the one in the packet, it will try unscrambling the packet with a + different response key (see step 7) before giving up. Otherwise, the global + `zs01_scrambler_state` variable from step 4 is set to the value of byte 1, + regardless of whether the status code is zero or not. + + The exact meaning of non-zero status codes is currently unknown. ### EEPROM-less cartridge variants @@ -2227,26 +2228,26 @@ status and error codes, the `700B01` self-test sequence performs 35 (!) different checks, each validating the codes returned under different conditions. The following tests are done: -1. Reset MCU, clear `JVSIRDY`, ensure that: - - status code = 0 - - error code = 3 - - `JVSIRDY` = 0 - - `JVSDRDY` = 0 - - incoming JVS data = `0x0000` -2. Reset MCU, write valid dummy packet header (`0x00e0`), ensure that: - - status code = 2 - - error code = 3 -3. Reset MCU, write invalid dummy packet header (`0x001f`), ensure that: - - status code = 2 - - error code = 2 -4. Reset MCU, write 16 dummy packets (`0x1fe0`, `0x0004`, `1 << i`, checksum), - for each packet ensure that: - - status code = 1 - - error code = 3 -5. Reset MCU, write 16 dummy packets (same as above) with an invalid checksum, - for each packet ensure that: - - status code = 1 - - error code = 1 +1. Reset MCU, clear `JVSIRDY`, ensure that: + - status code = 0 + - error code = 3 + - `JVSIRDY` = 0 + - `JVSDRDY` = 0 + - incoming JVS data = `0x0000` +2. Reset MCU, write valid dummy packet header (`0x00e0`), ensure that: + - status code = 2 + - error code = 3 +3. Reset MCU, write invalid dummy packet header (`0x001f`), ensure that: + - status code = 2 + - error code = 2 +4. Reset MCU, write 16 dummy packets (`0x1fe0`, `0x0004`, `1 << i`, checksum), + for each packet ensure that: + - status code = 1 + - error code = 3 +5. Reset MCU, write 16 dummy packets (same as above) with an invalid checksum, + for each packet ensure that: + - status code = 1 + - error code = 1 It is currently unclear if any data is actually sent to the JVS bus during step 4, as the shell may reset the MCU it before it starts sending the packet. diff --git a/docs/memorycontrol.md b/docs/memorycontrol.md index b6af6c7..f35a150 100644 --- a/docs/memorycontrol.md +++ b/docs/memorycontrol.md @@ -75,16 +75,16 @@ timing changes are between all the events inside the data read/write waveform. T whole formula for computing the total access time is fairly complex overall, and difficult to properly describe. - - The pre-strobe period will add delays between the moment the data bus is set, -and the moment !CS goes active. - - The hold period will keep the data in the data bus for some more cycles after -!WR goes inactive, and before !CS goes inactive. The accessed device is supposed -to sample the data bus during this interval. - - The floating period will keep the data bus floating for some more cycles after -!RD goes inactive, and before !CS goes inactive. The accessed device is supposed -to stop driving the data bus during this interval. The CPU will sample the data -bus somewhere before or exactly when !CS goes inactive. - - The recovery period will add delays between two operations. +- The pre-strobe period will add delays between the moment the data bus is set, + and the moment !CS goes active. +- The hold period will keep the data in the data bus for some more cycles after + !WR goes inactive, and before !CS goes inactive. The accessed device is supposed + to sample the data bus during this interval. +- The floating period will keep the data bus floating for some more cycles after + !RD goes inactive, and before !CS goes inactive. The accessed device is supposed + to stop driving the data bus during this interval. The CPU will sample the data + bus somewhere before or exactly when !CS goes inactive. +- The recovery period will add delays between two operations. The data bus width will influence if the CPU does full 16 bits reads, or only 8 bits. When doing 32 bits operations, the CPU will issue 2 16-bits operations, diff --git a/docs/pocketstation.md b/docs/pocketstation.md index dea54a0..79c5114 100644 --- a/docs/pocketstation.md +++ b/docs/pocketstation.md @@ -1,5 +1,4 @@ # Pocketstation -#### Pocketstation [Pocketstation Overview](pocketstation.md#pocketstation-overview)
[Pocketstation I/O Map](pocketstation.md#pocketstation-io-map)
[Pocketstation Memory Map](pocketstation.md#pocketstation-memory-map)
@@ -69,7 +68,7 @@ time inaccuracies.
#### CPU Specs For details on the ARM7TDMI CPUs opcodes and exceptions, check GBATEK at,
-http://problemkaputt.de/gbatek.htm (or .txt)
+ (or .txt)
The GBA uses an ARM7TDMI CPU, too.
Thanks to Exophase, Orion, Fezzik, Dr.Hell for Pocketstation info.
diff --git a/docs/serialinterfacessio.md b/docs/serialinterfacessio.md index 32d1097..3ea20c8 100755 --- a/docs/serialinterfacessio.md +++ b/docs/serialinterfacessio.md @@ -167,7 +167,7 @@ moment; barely enough to allow I\_STAT.8 to sense a edge).
#### Note For more details on how SIO0 is used to communicate with controllers and memory cards, see:
-[Controller and Memory Card Misc](controllersandmemorycards.md#controller-and-memory-card-misc)
+[Controller and Memory Card Overview](controllersandmemorycards.md#controller-and-memory-card-overview)
For serial port pinouts, PSone SIO1 upgrading, and for building RS232 adaptors, see:
[Pinouts - SIO Pinouts](pinouts.md#pinouts-sio-pinouts)
diff --git a/docs/soundprocessingunitspu.md b/docs/soundprocessingunitspu.md index d669bba..7bf9044 100644 --- a/docs/soundprocessingunitspu.md +++ b/docs/soundprocessingunitspu.md @@ -12,7 +12,7 @@ [SPU Reverb Formula](soundprocessingunitspu.md#spu-reverb-formula)
[SPU Reverb Examples](soundprocessingunitspu.md#spu-reverb-examples)
[SPU Unknown Registers](soundprocessingunitspu.md#spu-unknown-registers)
-[SPU Internal Timing](soundprocessingunitspu.md#spu-internal-timing)
+[SPU Internal State Machine from SPU RAM Timing](soundprocessingunitspu.md#spu-internal-state-machine-from-spu-ram-timing)
## SPU Overview @@ -707,7 +707,7 @@ Legend of Mana Hercules: the memory card loading screen's lip sync. Tokimeki Memorial 2 Crash Team Racing: Lip sync, requires capture buffers. -The Misadventures of Tron Bonne: Dialogues. +The Misadventures of Tron Bonne: Dialogues. Need For Speed 3: (somewhat?).
@@ -1050,7 +1050,7 @@ As written earlier, each Voice is 3x RAM access (one unrelated), reverb is 14x R - We also understand how reverb is using 22 Khz because of the lack of bandwidth to do everything in 768 cycles if done at 44.1 Khz. - Even when voices are not active, they always read something. It is possible to guess that the sample is simply ignored at some point in the data path (volume set to zero internally or mux not selecting the value). Interestingly, it may be possible if garbage is introduced in those read, to know how it is cancelled (enabling suddenly the channel and reading the sample out of the channel 1 or 3) -> DSP keeps history of sample for Gaussian Interpolation. -### Reverb Computation Order #### +### Reverb Computation Order ``` [Left Side] [Right Side] READ REVERB dLSame dRSame From 7f6f1b9cb621f5f2890d2a30875b459af2e44edf Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Fri, 17 May 2024 01:59:38 +0200 Subject: [PATCH 2/2] Clean up pinout tables, update config, fix table wrapping --- .markdownlint.json | 15 +++ docs/css/extra.css | 4 + docs/pinouts.md | 298 ++++++++++++++++++++++++--------------------- mkdocs.yml | 5 +- 4 files changed, 180 insertions(+), 142 deletions(-) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..6f7afa3 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,15 @@ +{ + "blanks-around-fences": false, + "blanks-around-headings": false, + "blanks-around-lists": false, + "emphasis-style": false, + "fenced-code-language": false, + "heading-increment": false, + "line-length": false, + "list-marker-space": false, + "no-hard-tabs": true, + "no-inline-html": false, + "no-multiple-blanks": false, + "no-multiple-space-atx": false, + "no-trailing-punctuation": false +} diff --git a/docs/css/extra.css b/docs/css/extra.css index 7f0d014..74ae56e 100644 --- a/docs/css/extra.css +++ b/docs/css/extra.css @@ -8,3 +8,7 @@ font-family: Menlo, Monaco, Consolas, "Courier New", monospace !important; } } + +.md-typeset table { + white-space: nowrap; +} diff --git a/docs/pinouts.md b/docs/pinouts.md index b21f1dd..d4c7dd4 100755 --- a/docs/pinouts.md +++ b/docs/pinouts.md @@ -482,73 +482,81 @@ versions, plus US/JP/PAL-region variants, plus region-free debug variants).
## Pinouts - CPU Pinouts #### CPU Pinouts (IC103) -| PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | -|----- |---------- |-------- |----- |------------ |------------------------- |----- |----------- |------- |----- |---------- |---------- | -| 1 | VDD | +3.3V | 53 | VDD | +3.3V | 105 | VDD | +3.3V | 157 | VDD | +3.3V | -| 2 | VDD | +3.3V | 54 | VDD | +3.3V | 106 | VDD | +3.3V | 158 | VDD | +3.3V | -| 3 | CRYSTALN | N.C | 55 | RAM.A11 | -->A8 | 107 | BIOS.IO0 | | 159 | TCLK1 | HBLANK | -| 4 | CRYSTALP | CPUCLK | 56 | RAM.A10 | N.C | 108 | BIOS.IO1 | | 160 | TCLK0 | DOTCLK | -| 5 | RAM.IO31 | | 57 | RAM.A9 | | 109 | BIOS.IO2 | | 161 | GPU.IO0 | | -| 6 | RAM.IO30 | | 58 | RAM.A8 | N.C | 110 | BIOS.IO3 | | 162 | GPU.IO1 | | -| 7 | RAM.IO29 | | 59 | RAM.A7 | | 111 | BIOS.IO4 | | 163 | GPU.IO2 | | -| 8 | RAM.IO28 | | 60 | RAM.A6 | | 112 | BIOS.IO5 | | 164 | GPU.IO3 | | -| 9 | RAM.IO27 | | 61 | RAM.A5 | | 113 | BIOS.IO6 | | 165 | GPU.IO4 | | -| 10 | RAM.IO26 | | 62 | RAM.A4 | | 114 | BIOS.IO7 | | 166 | GPU.IO5 | | -| 11 | RAM.IO25 | | 63 | RAM.A3 | | 115 | BIOS.IO8 | | 167 | GPU.IO6 | | -| 12 | RAM.IO24 | | 64 | RAM.A2 | | 116 | BIOS.IO9 | | 168 | GPU.IO7 | | -| 13 | RAM.IO23 | | 65 | VSS | GND | 117 | VSS | GND | 169 | GPU.IO8 | | -| 14 | VDD | +3.3V | 66 | VDD | +3.3V | 118 | VDD | +3.3V | 170 | VSS | GND | -| 15 | VSS | GND | 67 | RAM.A1 | | 119 | BIOS.IO10 | | 171 | VDD | +3.3V | -| 16 | RAM.IO22 | | 68 | RAM.A0 | | 120 | BIOS.IO11 | | 172 | GPU.IO9 | | -| 17 | RAM.IO21 | | 69 | /RC_NET | -->VDD | 121 | BIOS.IO12 | | 173 | GPU.IO10 | | -| 18 | RAM.IO20 | | 70 | /RTS1 | | 122 | BIOS.IO13 | | 174 | GPU.IO11 | | -| 19 | RAM.IO19 | | 71 | /CTS1 | | 123 | BIOS.IO14 | | 175 | GPU.IO12 | | -| 20 | RAM.IO18 | | 72 | /DTR1 | | 124 | BIOS.IO15 | | 176 | GPU.IO13 | | -| 21 | RAM.IO17 | | 73 | /DSR1 | | 125 | BIOS.A0 | | 177 | GPU.IO14 | | -| 22 | RAM.IO16 | | 74 | TXD1 | | 126 | BIOS.A1 | | 178 | GPU.IO15 | | -| 23 | RAM.IO15 | | 75 | RXD1 | | 127 | BIOS.A2 | | 179 | GPU.IO16 | | -| 24 | RAM.IO14 | | 76 | /EXT_RESET | | 128 | BIOS.A3 | | 180 | GPU.IO17 | | -| 25 | RAM.IO13 | | 77 | /DTR0B | | 129 | BIOS.A4 | | 181 | GPU.IO18 | | -| 26 | VDD | +3.3V | 78 | VSS | GND | 130 | VSS | GND | 182 | VSS | GND | -| 27 | VSS | GND | 79 | VDD | +3.3V | 131 | VDD | +3.3V | 183 | VDD | +3.3V | -| 28 | RAM.IO12 | | 80 | /DTR0A | | 132 | BIOS.A5 | | 184 | GPU.IO19 | | -| 29 | RAM.IO11 | | 81 | /SCK0 | | 133 | BIOS.A6 | | 185 | GPU.IO20 | | -| 30 | RAM.IO10 | | 82 | /DSR0 | | 134 | BIOS.A7 | | 186 | GPU.IO21 | | -| 31 | RAM.IO9 | | 83 | TXD0 | | 135 | BIOS.A8 | | 187 | GPU.IO22 | | -| 32 | RAM.IO8 | | 84 | RXD0 | | 136 | BIOS.A9 | | 188 | GPU.IO23 | | -| 33 | RAM.IO7 | | 85 | DACK5 | | 137 | BIOS.A10 | | 189 | GPU.IO24 | | -| 34 | RAM.IO6 | | 86 | DREQ5 | | 138 | BIOS.A11 | | 190 | GPU.IO25 | | -| 35 | RAM.IO5 | | 87 | DACK4 | SPUDACK | 139 | BIOS.A12 | | 191 | GPU.IO26 | | -| 36 | RAM.IO4 | | 88 | DREQ4 | SPUDREQ | 140 | BIOS.A13 | | 192 | GPU.IO27 | | -| 37 | RAM.IO3 | | 89 | /IRQ10 | | 141 | BIOS.A14 | | 193 | GPU.IO28 | | -| 38 | VDD | +3.3V | 90 | /IRQ9(SPU) | SPUINT | 142 | BIOS.A15 | | 194 | GPU.IO29 | | -| 39 | VSS | GND | 91 | VSS | GND | 143 | VSS | GND | 195 | VSS | GND | -| 40 | RAM.IO2 | | 92 | VDD | +3.3V | 144 | VDD | +3.3V | 196 | VDD | +3.3V | -| 41 | RAM.IO1 | | 93 | /CSHTST | -->VSS | 145 | BIOS.A16 | | 197 | GPU.IO30 | | -| 42 | RAM.IO0 | | 94 | /IRQ2 | CDRDINT | 146 | BIOS.A17 | | 198 | GPU.IO31 | | -| 43 | /RAM.WE | | 95 | /CS5 | CDRDCS | 147 | BIOS.A18 | | 199 | /IRQ0 | VBLANK | -| 44 | /RAS1 | N.C | 96 | /CS4 | SPUCS | 148 | BIOS.A19 | | 200 | DREQ2 | GPUDREQ | -| 45 | /RAS0 | | 97 | /CS2 | BIOSCS | 149 | BIOS.A20 | | 201 | SYSCK0 | | -| 46 | /CAS3 | | 98 | /CS0 | | 150 | BIOS.A21 | | 202 | DACK2 | GPUDACK | -| 47 | /CAS2 | | 99 | /SWR1 | (BIOS ROM WRITE MAYBE) | 151 | BIOS.A22 | | 203 | /VWR | GPUWR | -| 48 | /CAS1 | | 100 | /SWR0 | (BIOS ROM WRITE MAYBE) | 152 | BIOS.A23 | | 204 | /VRD | GPURD | -| 49 | /CAS0 | | 101 | /BIOS.OE | /OE ON BIOS ROM | 153 | VA2 | GPUA2 | 205 | /CS7 | GPUCS | -| 50 | VDD | +3.3V | 102 | /IRQ1 | GPUINT | 154 | SYSCLK1 | | 206 | DSYSCLK | DBLCLK | -| 51 | VSS | GND | 103 | VSS | GND | 155 | VSS | GND | 207 | VSS | GND | -| 52 | VSS | GND | 104 | VSS | GND | 156 | VSS | GND | 208 | VSS | GND | +| Pin | Name | Pin | Name | Pin | Name | Pin | Name | +| --: | :---------- | --: | :---------------- | --: | :--------- | --: | :----------- | +| 1 | `VDD` | 53 | `VDD` | 105 | `VDD` | 157 | `VDD` | +| 2 | `VDD` | 54 | `VDD` | 106 | `VDD` | 158 | `VDD` | +| 3 | `CRYSTALN` | 55 | `RAM.A11` | 107 | `SBUS.D0` | 159 | `TIMER1.CLK` | +| 4 | `CRYSTALP` | 56 | `RAM.A10` | 108 | `SBUS.D1` | 160 | `TIMER0.CLK` | +| 5 | `RAM.D31` | 57 | `RAM.A9` | 109 | `SBUS.D2` | 161 | `GPU.D0` | +| 6 | `RAM.D30` | 58 | `RAM.A8` | 110 | `SBUS.D3` | 162 | `GPU.D1` | +| 7 | `RAM.D29` | 59 | `RAM.A7` | 111 | `SBUS.D4` | 163 | `GPU.D2` | +| 8 | `RAM.D28` | 60 | `RAM.A6` | 112 | `SBUS.D5` | 164 | `GPU.D3` | +| 9 | `RAM.D27` | 61 | `RAM.A5` | 113 | `SBUS.D6` | 165 | `GPU.D4` | +| 10 | `RAM.D26` | 62 | `RAM.A4` | 114 | `SBUS.D7` | 166 | `GPU.D5` | +| 11 | `RAM.D25` | 63 | `RAM.A3` | 115 | `SBUS.D8` | 167 | `GPU.D6` | +| 12 | `RAM.D24` | 64 | `RAM.A2` | 116 | `SBUS.D9` | 168 | `GPU.D7` | +| 13 | `RAM.D23` | 65 | `GND` | 117 | `GND` | 169 | `GPU.D8` | +| 14 | `VDD` | 66 | `VDD` | 118 | `VDD` | 170 | `GND` | +| 15 | `GND` | 67 | `RAM.A1` | 119 | `SBUS.D10` | 171 | `VDD` | +| 16 | `RAM.D22` | 68 | `RAM.A0` | 120 | `SBUS.D11` | 172 | `GPU.D9` | +| 17 | `RAM.D21` | 69 | `/RC_NET` | 121 | `SBUS.D12` | 173 | `GPU.D10` | +| 18 | `RAM.D20` | 70 | `SIO1./RTS` | 122 | `SBUS.D13` | 174 | `GPU.D11` | +| 19 | `RAM.D19` | 71 | `SIO1./CTS` | 123 | `SBUS.D14` | 175 | `GPU.D12` | +| 20 | `RAM.D18` | 72 | `SIO1./DTR` | 124 | `SBUS.D15` | 176 | `GPU.D13` | +| 21 | `RAM.D17` | 73 | `SIO1./DSR` | 125 | `SBUS.A0` | 177 | `GPU.D14` | +| 22 | `RAM.D16` | 74 | `SIO1.TX` | 126 | `SBUS.A1` | 178 | `GPU.D15` | +| 23 | `RAM.D15` | 75 | `SIO1.RX` | 127 | `SBUS.A2` | 179 | `GPU.D16` | +| 24 | `RAM.D14` | 76 | `/EXT_RESET` | 128 | `SBUS.A3` | 180 | `GPU.D17` | +| 25 | `RAM.D13` | 77 | `SIO0./DTR2` | 129 | `SBUS.A4` | 181 | `GPU.D18` | +| 26 | `VDD` | 78 | `GND` | 130 | `GND` | 182 | `GND` | +| 27 | `GND` | 79 | `VDD` | 131 | `VDD` | 183 | `VDD` | +| 28 | `RAM.D12` | 80 | `SIO0./DTR1` | 132 | `SBUS.A5` | 184 | `GPU.D19` | +| 29 | `RAM.D11` | 81 | `SIO0./SCK` | 133 | `SBUS.A6` | 185 | `GPU.D20` | +| 30 | `RAM.D10` | 82 | `SIO0./DSR` | 134 | `SBUS.A7` | 186 | `GPU.D21` | +| 31 | `RAM.D9` | 83 | `SIO0.TX` | 135 | `SBUS.A8` | 187 | `GPU.D22` | +| 32 | `RAM.D8` | 84 | `SIO0.RX` | 136 | `SBUS.A9` | 188 | `GPU.D23` | +| 33 | `RAM.D7` | 85 | `SBUS.DACK5_PIO` | 137 | `SBUS.A10` | 189 | `GPU.D24` | +| 34 | `RAM.D6` | 86 | `SBUS.DREQ5_PIO` | 138 | `SBUS.A11` | 190 | `GPU.D25` | +| 35 | `RAM.D5` | 87 | `SBUS.DACK4_SPU` | 139 | `SBUS.A12` | 191 | `GPU.D26` | +| 36 | `RAM.D4` | 88 | `SBUS.DREQ4_SPU` | 140 | `SBUS.A13` | 192 | `GPU.D27` | +| 37 | `RAM.D3` | 89 | `/IRQ10_PIO` | 141 | `SBUS.A14` | 193 | `GPU.D28` | +| 38 | `VDD` | 90 | `/IRQ9_SPU` | 142 | `SBUS.A15` | 194 | `GPU.D29` | +| 39 | `GND` | 91 | `GND` | 143 | `GND` | 195 | `GND` | +| 40 | `RAM.D2` | 92 | `VDD` | 144 | `VDD` | 196 | `VDD` | +| 41 | `RAM.D1` | 93 | `/CSHTST` | 145 | `SBUS.A16` | 197 | `GPU.D30` | +| 42 | `RAM.D0` | 94 | `/IRQ2_CDROM` | 146 | `SBUS.A17` | 198 | `GPU.D31` | +| 43 | `RAM./WE` | 95 | `SBUS./CS5_CDROM` | 147 | `SBUS.A18` | 199 | `/IRQ0` | +| 44 | `RAM./RAS1` | 96 | `SBUS./CS4_SPU` | 148 | `SBUS.A19` | 200 | `GPU.DREQ2` | +| 45 | `RAM./RAS0` | 97 | `SBUS./CS2_BIOS` | 149 | `SBUS.A20` | 201 | `SYSCK0` | +| 46 | `RAM./CAS3` | 98 | `SBUS./CS0_EXP1` | 150 | `SBUS.A21` | 202 | `GPU.DACK2` | +| 47 | `RAM./CAS2` | 99 | `SBUS./WR1` | 151 | `SBUS.A22` | 203 | `GPU./WR` | +| 48 | `RAM./CAS1` | 100 | `SBUS./WR0` | 152 | `SBUS.A23` | 204 | `GPU./RD` | +| 49 | `RAM./CAS0` | 101 | `SBUS./RD` | 153 | `GPU.A0` | 205 | `GPU./CS7` | +| 50 | `VDD` | 102 | `/IRQ1_GPU` | 154 | `SYSCK1` | 206 | `DSYSCK0` | +| 51 | `GND` | 103 | `GND` | 155 | `GND` | 207 | `GND` | +| 52 | `GND` | 104 | `GND` | 156 | `GND` | 208 | `GND` | Pin5-68 = Main RAM bus. Pin 95-152 = System bus. Pin 102,153,159-206 = Video bus.
#### CPU Pinout Notes -A8, A10 and /RAS1 are only used on systems with 4 or 8 MB RAM.
-SYSCK0 (33 MHz), DSYSCK0 (67 MHz) and SYSCK1 (33 MHz) are clock outputs derived -from the clock input on XI. XO is unused as the clock crystal is not connected -directly to the CPU.
-/WR1 (upper byte write strobe for 8-bit writes through a 16-bit bus) is only -connected to the expansion port and goes otherwise unused.
-The System Bus address lines are latched outputs and are not affected by Main -RAM and GPU addressing.
+- On (some?) retail consoles, `RAM.A11` is wired to the RAM chips' A8 line, + while `RAM.A8` and `RAM.A10` are left unconnected. +- `RAM./RAS1` is only used on systems with 4 or 8 MB RAM. +- `/RC_NET` is tied to 3.5V, while `/CSHTST` (test pin?) is wired to ground. +- `SYSCK0` (33 MHz), `DSYSCK0` (67 MHz) and `SYSCK1` (33 MHz) are clock outputs + from the CPU to the rest of the system. +- `TIMER0.CLK` is fed from the GPU's `DOTCK` output, while `TIMER1.CLK` is fed + from its `HBLANK` output. +- `CRYSTALP` and `CRYSTALN` are meant to be connected to a crystal, however all + known console models feed `CRYSTALP` with the clock generated by an external + oscillator and leave `CRYSTALN` open. +- `SBUS./WR1` (upper byte write strobe) is routed to the expansion port but + otherwise left unused, as all system bus devices are either 8-bit (CD-ROM, + BIOS ROM) or only support 16-bit writes (SPU). +- `SBUS.A0-SBUS.A23` are latched outputs and are not affected by RAM and GPU + addressing. @@ -661,76 +669,84 @@ PAL or NTSC clock depending on current frame rate, which is resulting in New 206-pin GPU is used LATE-PU-8 boards and up.
#### GPU Pinouts (IC203) -| PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | -|----- |---------- |------------------ |----- |----------- |-------- |----- |---------- |--------------------------------------- |----- |--------- |-------- | -| 1 | /CS | GPUCS | 53 | GPU.IO10 | | 105 | VSS | GND | 157 | NTPL | | -| 2 | A2 | GPUA2 | 54 | GPU.IO9 | | 106 | VDD | +3.3V | 158 | /VSYNC | | -| 3 | /RD | GPURD | 55 | GPU.IO8 | | 107 | VRAM.IO9 | | 159 | /HSYNC | | -| 4 | /WR | GPUWR | 56 | GPU.IO7 | | 108 | VRAM.IO8 | | 160 | BLUE0 | | -| 5 | DACK | GPUDACK | 57 | GPU.IO6 | | 109 | VRAM.IO7 | | 161 | BLUE1 | | -| 6 | /RST | RES3.3G | 58 | GPU.IO5 | | 110 | VRAM.IO6 | | 162 | BLUE2 | | -| 7 | VDD | +3.3V | 59 | GPU.IO4 | | 111 | VRAM.IO5 | | 163 | BLUE3 | | -| 8 | VSS | GND | 60 | VSS | GND | 112 | VRAM.IO4 | | 164 | VSS | GND | -| 9 | /SYSCLK | SYSCLK0 | 61 | VDD | +3.3V | 113 | VSS | GND | 165 | VDD | +3.3V | -| 10 | VDD | +3.3V | 62 | GPU.IO3 | | 114 | VDD | +3.3V | 166 | BLUE4 | | -| 11 | VSS | GND | 63 | GPU.IO2 | | 115 | VRAM.IO3 | | 167 | BLUE5 | | -| 12 | DREQ | GPUDREQ | 64 | GPU.IO1 | | 116 | VRAM.IO2 | | 168 | BLUE6 | | -| 13 | /IREQ | GPUINT | 65 | GPU.IO0 | | 117 | VRAM.IO1 | | 169 | BLUE7 | | -| 14 | HBLNK | HBLANK | 66 | VSS | GND | 118 | VRAM.IO0 | | 170 | GREEN0 | | -| 15 | VSS | GND | 67 | VDD | +3.3V | 119 | VSS | GND | 171 | GREEN1 | | -| 16 | VDD | +3.3V | 68 | PCKSL2 | N.C | 120 | VDD | +3.3V | 172 | GREEN2 | | -| 17 | VBLNK | VBLANK | 69 | PCKSL1 | N.C | 121 | /MCS1 | used on arcade boards with 2 MB VRAM | 173 | GREEN3 | | -| 18 | HVHLD | -->4.7kOhm-->VDD | 70 | PCKSL0 | N.C | 122 | /MCS0 | VRAM CS | 174 | VSS | GND | -| 19 | VSS | GND | 71 | TEST3 | -->VDD | 123 | DSF | VRAM DSF \| "Define Special Function" | 175 | VDD | +3.3V | -| 20 | VSS | GND | 72 | TEST2 | -->VDD | 124 | /RAS | VRAM \| "ROW ADDRESS STROBE" | 176 | GREEN4 | | -| 21 | N.C | | 73 | TEST1 | -->VDD | 125 | /CAS | VRAM \| "COLUMN ADDRESS STROBE" | 177 | GREEN5 | | -| 22 | VDD | +3.3V | 74 | TEST0 | -->VDD | 126 | /WE | VRAM \| WE | 178 | GREEN6 | | -| 23 | VDD | +3.3V | 75 | VDD | +3.3V | 127 | DQMH | -->DQM1 \| DQM3 | 179 | GREEN7 | | -| 24 | GPU.IO31 | | 76 | VSS | GND | 128 | DQML | -->DQM0 \| DQM2 | 180 | RED0 | | -| 25 | GPU.IO30 | | 77 | VRAM.IO31 | | 129 | VSS | GND | 181 | RED1 | | -| 26 | GPU.IO29 | | 78 | VRAM.IO30 | | 130 | VDD | +3.3V | 182 | RED2 | | -| 27 | GPU.IO28 | | 79 | VRAM.IO29 | | 131 | MCLKOUT | -->MCLKIN \| VRAM CLK | 183 | RED3 | | -| 28 | GPU.IO27 | | 80 | VDD | +3.3V | 132 | VSS | GND | 184 | VSS | GND | -| 29 | VDD | +3.3V | 81 | VSS | GND | 133 | VDD | +3.3V | 185 | VDD | +3.3V | -| 30 | VSS | GND | 82 | VRAM.IO28 | | 134 | MCLKIN | | 186 | RED4 | | -| 31 | GPU.IO26 | | 83 | VRAM.IO27 | | 135 | VSS | GND | 187 | RED5 | | -| 32 | GPU.IO25 | | 84 | VRAM.IO26 | | 136 | VDD | +3.3V | 188 | RED6 | | -| 33 | GPU.IO24 | | 85 | VRAM.IO25 | | 137 | VRAM.A9 | | 189 | RED7 | | -| 34 | GPU.IO23 | | 86 | VRAM.IO24 | | 138 | VRAM.A8 | | 190 | VSS | GND | -| 35 | GPU.IO22 | | 87 | VDD | +3.3V | 139 | VRAM.A7 | | 191 | VDD | +3.3V | -| 36 | GPU.IO21 | | 88 | VSS | GND | 140 | VRAM.A6 | | 192 | VCKN-A | | -| 37 | VDD | +3.3V | 89 | VRAM.IO23 | | 141 | VDD | +3.3V | 193 | VDD | +3.3V | -| 38 | VSS | GND | 90 | VRAM.IO22 | | 142 | VSS | GND | 194 | VSS | GND | -| 39 | GPU.IO20 | | 91 | VRAM.IO21 | | 143 | VRAM.A5 | | 195 | VDD | +3.3V | -| 40 | GPU.IO19 | | 92 | VRAM.IO20 | | 144 | VRAM.A4 | | 196 | VCKP-A | | -| 41 | GPU.IO18 | | 93 | VRAM.IO19 | | 145 | VRAM.A3 | | 197 | VDD | +3.3V | -| 42 | GPU.IO17 | | 94 | VRAM.IO18 | | 146 | VSS | GND | 198 | VSS | GND | -| 43 | VDD | +3.3V | 95 | VRAM.IO17 | | 147 | VDD | +3.3V | 199 | PCK | | -| 44 | VSS | GND | 96 | VSS | GND | 148 | VRAM.A2 | | 200 | VSS | GND | -| 45 | GPU.IO16 | | 97 | VDD | +3.3V | 149 | VRAM.A1 | | 201 | VDD | +3.3V | -| 46 | GPU.IO15 | | 98 | VRAM.IO16 | | 150 | VRAM.A0 | | 202 | DMASK | N.C | -| 47 | GPU.IO14 | | 99 | VRAM.IO15 | | 151 | VDD | +3.3V | 203 | ODE2 | N.C | -| 48 | GPU.IO13 | | 100 | VRAM.IO14 | | 152 | VSS | GND | 204 | VSS | GND | -| 49 | GPU.IO12 | | 101 | VRAM.IO13 | | 153 | FSC | | 205 | VDD | +3.3V | -| 50 | GPU.IO11 | | 102 | VRAM.IO12 | | 154 | VDD | +3.3V | 206 | /DSYSCK | DBLCLK | -| 51 | VDD | +3.3V | 103 | VRAM.IO11 | | 155 | VSS | GND | 207 | VSS | GND | -| 52 | VSS | GND | 104 | VRAM.IO10 | | 156 | CSYNC | | 208 | VDD | +3.3V | + +| Pin | Name | Pin | Name | Pin | Name | Pin | Name | +| --: | :---------- | --: | :---------- | --: | :----------- | --: | :---------- | +| 1 | `HOST./CS` | 53 | `HOST.D10` | 105 | `GND` | 157 | `NTSC/PAL` | +| 2 | `HOST.A0` | 54 | `HOST.D9` | 106 | `VDD` | 158 | `/VSYNC` | +| 3 | `HOST./RD` | 55 | `HOST.D8` | 107 | `SGRAM.D9` | 159 | `/HSYNC` | +| 4 | `HOST./WR` | 56 | `HOST.D7` | 108 | `SGRAM.D8` | 160 | `DAC.B0` | +| 5 | `HOST.DACK` | 57 | `HOST.D6` | 109 | `SGRAM.D7` | 161 | `DAC.B1` | +| 6 | `/RESET` | 58 | `HOST.D5` | 110 | `SGRAM.D6` | 162 | `DAC.B2` | +| 7 | `VDD` | 59 | `HOST.D4` | 111 | `SGRAM.D5` | 163 | `DAC.B3` | +| 8 | `GND` | 60 | `GND` | 112 | `SGRAM.D4` | 164 | `GND` | +| 9 | `/SYSCLK` | 61 | `VDD` | 113 | `GND` | 165 | `VDD` | +| 10 | `VDD` | 62 | `HOST.D3` | 114 | `VDD` | 166 | `DAC.B4` | +| 11 | `GND` | 63 | `HOST.D2` | 115 | `SGRAM.D3` | 167 | `DAC.B5` | +| 12 | `HOST.DREQ` | 64 | `HOST.D1` | 116 | `SGRAM.D2` | 168 | `DAC.B6` | +| 13 | `HOST./IRQ` | 65 | `HOST.D0` | 117 | `SGRAM.D1` | 169 | `DAC.B7` | +| 14 | `HBLANK` | 66 | `GND` | 118 | `SGRAM.D0` | 170 | `DAC.G0` | +| 15 | `GND` | 67 | `VDD` | 119 | `GND` | 171 | `DAC.G1` | +| 16 | `VDD` | 68 | `PCKSL2` | 120 | `VDD` | 172 | `DAC.G2` | +| 17 | `VBLANK` | 69 | `PCKSL1` | 121 | `SGRAM./CS1` | 173 | `DAC.G3` | +| 18 | `HVHLD` | 70 | `PCKSL0` | 122 | `SGRAM./CS0` | 174 | `GND` | +| 19 | `GND` | 71 | `TEST3` | 123 | `SGRAM.DSF` | 175 | `VDD` | +| 20 | `GND` | 72 | `TEST2` | 124 | `SGRAM./RAS` | 176 | `DAC.G4` | +| 21 | `NC` | 73 | `TEST1` | 125 | `SGRAM./CAS` | 177 | `DAC.G5` | +| 22 | `VDD` | 74 | `TEST0` | 126 | `SGRAM./WE` | 178 | `DAC.G6` | +| 23 | `VDD` | 75 | `VDD` | 127 | `SGRAM.DQMH` | 179 | `DAC.G7` | +| 24 | `HOST.D31` | 76 | `GND` | 128 | `SGRAM.DQML` | 180 | `DAC.R0` | +| 25 | `HOST.D30` | 77 | `SGRAM.D31` | 129 | `GND` | 181 | `DAC.R1` | +| 26 | `HOST.D29` | 78 | `SGRAM.D30` | 130 | `VDD` | 182 | `DAC.R2` | +| 27 | `HOST.D28` | 79 | `SGRAM.D29` | 131 | `MCLKOUT` | 183 | `DAC.R3` | +| 28 | `HOST.D27` | 80 | `VDD` | 132 | `GND` | 184 | `GND` | +| 29 | `VDD` | 81 | `GND` | 133 | `VDD` | 185 | `VDD` | +| 30 | `GND` | 82 | `SGRAM.D28` | 134 | `MCLKIN` | 186 | `DAC.R4` | +| 31 | `HOST.D26` | 83 | `SGRAM.D27` | 135 | `GND` | 187 | `DAC.R5` | +| 32 | `HOST.D25` | 84 | `SGRAM.D26` | 136 | `VDD` | 188 | `DAC.R6` | +| 33 | `HOST.D24` | 85 | `SGRAM.D25` | 137 | `SGRAM.A9` | 189 | `DAC.R7` | +| 34 | `HOST.D23` | 86 | `SGRAM.D24` | 138 | `SGRAM.A8` | 190 | `GND` | +| 35 | `HOST.D22` | 87 | `VDD` | 139 | `SGRAM.A7` | 191 | `VDD` | +| 36 | `HOST.D21` | 88 | `GND` | 140 | `SGRAM.A6` | 192 | `VCLK_NTSC` | +| 37 | `VDD` | 89 | `SGRAM.D23` | 141 | `VDD` | 193 | `VDD` | +| 38 | `GND` | 90 | `SGRAM.D22` | 142 | `GND` | 194 | `GND` | +| 39 | `HOST.D20` | 91 | `SGRAM.D21` | 143 | `SGRAM.A5` | 195 | `VDD` | +| 40 | `HOST.D19` | 92 | `SGRAM.D20` | 144 | `SGRAM.A4` | 196 | `VCLK_PAL` | +| 41 | `HOST.D18` | 93 | `SGRAM.D19` | 145 | `SGRAM.A3` | 197 | `VDD` | +| 42 | `HOST.D17` | 94 | `SGRAM.D18` | 146 | `GND` | 198 | `GND` | +| 43 | `VDD` | 95 | `SGRAM.D17` | 147 | `VDD` | 199 | `PCK` | +| 44 | `GND` | 96 | `GND` | 148 | `SGRAM.A2` | 200 | `GND` | +| 45 | `HOST.D16` | 97 | `VDD` | 149 | `SGRAM.A1` | 201 | `VDD` | +| 46 | `HOST.D15` | 98 | `SGRAM.D16` | 150 | `SGRAM.A0` | 202 | `DMASK` | +| 47 | `HOST.D14` | 99 | `SGRAM.D15` | 151 | `VDD` | 203 | `ODE2` | +| 48 | `HOST.D13` | 100 | `SGRAM.D14` | 152 | `GND` | 204 | `GND` | +| 49 | `HOST.D12` | 101 | `SGRAM.D13` | 153 | `FSC` | 205 | `VDD` | +| 50 | `HOST.D11` | 102 | `SGRAM.D12` | 154 | `VDD` | 206 | `/DSYSCK` | +| 51 | `VDD` | 103 | `SGRAM.D11` | 155 | `GND` | 207 | `GND` | +| 52 | `GND` | 104 | `SGRAM.D10` | 156 | `CSYNC` | 208 | `VDD` | Pin 77..150 = Video RAM Bus. Pin 156..189 = Video Out Bus. Other = CPU Bus. Pin 153: Sub Carrier (NC on newer boards whick pick color clock from IC204).
#### GPU Pinout Notes -/CS1 is only used on arcade boards with 2 MB VRAM (two 1 MB chips).
-HVHLD has a 4K7 ohm pullup to 3.5V.
-CLKIN and CLKOUT are tied together and wired to the DAC's clock input. CLKIN -could possibly be an external clock input for genlocking purposes.
-On earlier motherboards and on most arcade boards only VCKPAL or VCKNTSC is -wired up, depending on the console's region. On later boards both are tied -together and connected to a programmable clock generator, which is then -preprogrammed to generate the appropriate frequency.
-/VSYNC and /HSYNC are only connected to test points.
-/CSYNC = (/VSYNC AND /HSYNC). BLANK = (VBLANK OR HBLANK).
-DQM0 is wired to both DQM0 and DQM2, DQM1 is wired to both DQM1 and DQM3.
+- `SGRAM./CS1` is only used on arcade boards with 2 MB VRAM (two 1 MB chips). +- `HVHLD` has a 4.7k pullup to 3.5V. +- `TEST0-TEST3` are tied to 3.5V. `PCKSL0-PCKSL2` (outputs possibly related to + the current resolution/pixel clock?) are left unconnected. +- `MCLKIN` and `MCLKOUT` are tied together and wired to the DAC's clock input. + `MCLKIN` could possibly be an external clock input for genlocking purposes. +- On earlier motherboards and on most arcade boards only `VCLK_PAL` or + `VCLK_NTSC` is wired up, depending on the console's region. On later boards + both are tied together and connected to a programmable clock generator, which + is preprogrammed to generate the appropriate frequency. +- `/VSYNC` and `/HSYNC` are only connected to test points. +- `/CSYNC = (/VSYNC AND /HSYNC)`. `BLANK = (VBLANK OR HBLANK)`. +- `SGRAM.DQML` is wired to both `DQM0` and `DQM2` on the SGRAM, while + `SGRAM.DQMH` is wired to both `DQM1` and `DQM3`. +- `DMASK` outputs the mask/"alpha" bit of the current pixel and is used by some + arcade boards to composite the GPU's output on top of an external video + source. `ODE2` indicates which field is currently being output in interlaced + mode. #### IC202 44pin "Philips TDA8771H" Digital to Analog RGB (older boards only) Region Japan+Europe: TDA8771AN
@@ -749,20 +765,20 @@ via 48pin IC502.
#### IC502 48pin "SONY CXA2106R-T4" - 24bit RGB video D/A converter -| PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | PIN | PINOUT | NOTES | -|----- |------------ |------- |----- |-------- |------- |----- |-------- |------- |----- |--------- |------- | -| 1 | BCLAMP | | 13 | NT/PAL | | 25 | GREEN7 | | 37 | BLUE3 | | -| 2 | AGND2 | GND | 14 | SYNCIN | | 26 | GREEN6 | | 38 | BLUE2 | | -| 3 | ROUT | | 15 | SCIN | | 27 | GREEN5 | | 39 | BLUE1 | | -| 4 | GOUT | | 16 | RED7 | | 28 | GREEN4 | | 40 | BLUE0 | | -| 5 | BOUT | | 17 | RED6 | | 29 | GREEN3 | | 41 | VCLK | | -| 6 | YOUT | | 18 | RED5 | | 30 | GREEN2 | | 42 | DGND | GND | -| 7 | COUT | | 19 | RED4 | | 31 | GREEN1 | | 43 | VREFIN | N.C | -| 8 | VOUT | | 20 | DVDD | +5V | 32 | GREEN0 | | 44 | VREFOUT | | -| 9 | AVCC2 | +5V | 21 | RED3 | | 33 | BLUE7 | | 45 | AGND1 | GND | -| 10 | YTRAP | | 22 | RED2 | | 34 | BLUE6 | | 46 | RCRAMP | | -| 11 | N.C | | 23 | RED1 | | 35 | BLUE5 | | 47 | AVCC1 | +5V | -| 12 | POWER_SAVE | N.C | 24 | RED0 | | 36 | BLUE4 | | 48 | GCLAMP | | +| Pin | Name | Pin | Name | Pin | Name | Pin | Name | +| --: | :----------- | --: | :--------- | --: | :--- | --: | :-------- | +| 1 | `BCLAMP` | 13 | `NTSC/PAL` | 25 | `G7` | 37 | `B3` | +| 2 | `AGND2` | 14 | `SYNCIN` | 26 | `G6` | 38 | `B2` | +| 3 | `ROUT` | 15 | `SCIN` | 27 | `G5` | 39 | `B1` | +| 4 | `GOUT` | 16 | `R7` | 28 | `G4` | 40 | `B0` | +| 5 | `BOUT` | 17 | `R6` | 29 | `G3` | 41 | `VCLK` | +| 6 | `YOUT` | 18 | `R5` | 30 | `G2` | 42 | `DGND` | +| 7 | `COUT` | 19 | `R4` | 31 | `G1` | 43 | `VREFIN` | +| 8 | `VOUT` | 20 | `DVDD` | 32 | `G0` | 44 | `VREFOUT` | +| 9 | `AVCC2` | 21 | `R3` | 33 | `B7` | 45 | `AGND1` | +| 10 | `YTRAP` | 22 | `R2` | 34 | `B6` | 46 | `RCRAMP` | +| 11 | `NC` | 23 | `R1` | 35 | `B5` | 47 | `AVCC1` | +| 12 | `POWER_SAVE` | 24 | `R0` | 36 | `B4` | 48 | `GCLAMP` | Pin 3..8 (analogue outputs) are passed via external 75 ohm resistors.
Pin 6,7 additionally via 220uF. Pin 8 additionally via smaller capacitor.
diff --git a/mkdocs.yml b/mkdocs.yml index ea2b2f9..ddd6ef1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,10 +33,13 @@ extra_css: - css/extra.css markdown_extensions: - - pymdownx.critic - pymdownx.caret + - pymdownx.critic + - pymdownx.highlight - pymdownx.keys - pymdownx.mark + - pymdownx.superfences + - pymdownx.tasklist - pymdownx.tilde nav: