{"id":18600731,"url":"https://github.com/velocityra/pctation","last_synced_at":"2025-04-10T18:31:31.033Z","repository":{"id":44728511,"uuid":"177250563","full_name":"VelocityRa/pctation","owner":"VelocityRa","description":"PlayStation emulator \u0026 debugger in C++17","archived":false,"fork":false,"pushed_at":"2022-01-27T15:54:39.000Z","size":290,"stargazers_count":116,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T02:51:36.639Z","etag":null,"topics":["c-plus-plus","cpp","cpp17","emulation","emulator","mips","playstation","ps","ps1","psx","sony"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VelocityRa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-23T05:59:32.000Z","updated_at":"2025-03-22T13:19:06.000Z","dependencies_parsed_at":"2022-09-11T20:11:53.418Z","dependency_job_id":null,"html_url":"https://github.com/VelocityRa/pctation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelocityRa%2Fpctation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelocityRa%2Fpctation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelocityRa%2Fpctation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelocityRa%2Fpctation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VelocityRa","download_url":"https://codeload.github.com/VelocityRa/pctation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248271758,"owners_count":21075800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","cpp","cpp17","emulation","emulator","mips","playstation","ps","ps1","psx","sony"],"created_at":"2024-11-07T02:05:12.474Z","updated_at":"2025-04-10T18:31:30.231Z","avatar_url":"https://github.com/VelocityRa.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pctation\npctation is a PlayStation (PS1/PSX) emulator written in C++17. While quite incomplete, it can run some commercial games.\n\n# Screenshots\n## Games\n#### Crash Bandicoot\n![](https://imgur.com/EfrwXpn.png)\n![](https://imgur.com/WwCTX5p.png)\n##### *graphical bug that makes Crash dark, haven't gotten around to fixing that yet\n\n#### Ridge Racer\n![](https://imgur.com/S9okRNC.png)\n![](https://imgur.com/rvm8dwx.png)\n##### *graphical glitch in the game UI on race start\n\n#### Aeon Flux\n![](https://imgur.com/IKTsKzV.png)\n\n#### Deuce\n![](https://imgur.com/S3Yfsvh.png)\n\n#### Puzzle Bobble\n![](https://imgur.com/OP9Uk6p.png)\n\n#### Batman Forever - The Arcade Game\n![](https://i.imgur.com/m8kEGh5.png)\n\n## Debugger\n#### VRAM view\n![](https://i.imgur.com/8yMo7sT.png)\nThere's the option of displaying the entire GPU (video) memory.\n\nYou can see in the above example (the game is Puzzle Bobble) that on the PS1, everything, including the [framebuffer(s)](https://www.wikiwand.com/en/Framebuffer) reside in VRAM.\n\nIn this case and in most games you can see _two_ framebuffers, because [double-buffering](https://www.wikiwand.com/en/Multiple_buffering) is used.\n\nEverything else shown in the above screenshot is either a [texture](https://www.wikiwand.com/en/Texture_mapping) (image applied to surfaces when rendering), or whatever other arbitrary data the game programmers have placed in VRAM.\n\n#### Debug Windows\n![](https://i.imgur.com/4Cz7IYB.png)\n\nI prioritized the development of debug tools early on in the project and this helped solve various bugs along with Visual Studio's debugger and some good-old logging.\n\nDebug windows implemented:\n- TTY Output\n  Shows any test printed to the TTY console by the BIOS, Shell or app/game.\n- BIOS Function Calls\n  Tracks any call to the BIOS and logs it, along with the arguments passed.\n- RAM Contents\n  - RAM viewer. Editable.\n- GPU Registers\n  - Displays the registers/state of the GPU.\n- CPU Registers\n  - Basic CPU register viwer.\n- Timers\n  - Registers/state of all 3 Timers (window not shown here)\n- GP0 (Drawing) Command Viewer\n  - Shows details for every drawing command of every frame (cleared periodically, to preserve memory usage).\n  - Details include things like draw position, texture coordinates, color, shading type, etc.\n  - When a command is selected, the associated primitive (triangle/quad) pulses on the screen, so it can be determined without any hassle.\n\n## UI\nThe UI elements other than the debugger windows are the initial Game Select screen and the Settings dialog.\n\n## Game Select\n![](https://imgur.com/IOj1Mwc.png)\n\nScans through game dumps or executables in the `data/` directory (see \"Usage\" below).\n\n## Settings Dialog\n![](https://i.imgur.com/8iHaCq5.png)\n\nUser-tweakable settings.\n\n# Motivation\nApart from a basic [Game Boy emulator](https://github.com/VelocityRa/rustboy), most of my experience in emulation development had been working on relatively HLE \u003csup\u003e[1]\u003c/sup\u003e emulators like [Vita3K](http://vita3k.org) and [RPCS3](https://github.com/rpcs3/rpcs3/). This project stems from my curiosity in making an LLE \u003csup\u003e[2]\u003c/sup\u003e emulator from scratch.\n\nIt's also meant to serve as a thesis project for my BSc in Computer Engineering.\n\n##### [1,2] The terms HLE/LLE are explained succinctly in [**this blog post**](https://alexaltea.github.io/blog/posts/2018-04-18-lle-vs-hle).\n\n# Devlogs\n\nI recorded a few short videos as I was making progress, here's the Youtube playlist.\n\n[![](https://img.youtube.com/vi/AW75wmB0lEs/0.jpg)](https://www.youtube.com/watch?v=AW75wmB0lEs\u0026list=PLS_7RZYG7qUwLCF9SrQnoalDnyEIDGLNd)\n\n# Features\n- **Hardware** implemented (some items are incomplete)\n  - CPU, with a fairly accurate [MIPS I](https://www.wikiwand.com/en/MIPS_architecture#/MIPS_I) interpreter\n  - GPU, using a [software rasterizer](https://www.wikiwand.com/en/Software_rendering)\n  - Geometry Transform Engine (GTE)\n  - Memory mapping\n  - CD-ROM\n  - Digital Controller\n  - Timers\n  - Direct Memory Access (DMA) controller\n- **UI**\n  - Immediate mode GUI using the excellent [dear imgui](https://github.com/ocornut/imgui) library\n  - CD-ROM Explorer (file explorer for CDROM images)\n  - PSX-EXE Explorer (file explorer for raw executables like tests, homebrew or demoscene demos)\n  - FPS \u0026 Emulation Speed metrics\n  - Debug UI\n    - TTY Output\n    - BIOS Function Calls\n    - RAM Contents\n    - GPU Registers\n    - CPU Registers\n    - Timers\n    - GP0 (Drawing) Command Viewer\n\n# Unimplemented\n- Audio\n  - Sound processing unit (SPU) emulation is not implemented\n- Video playback\n  - Motion Decoder (MDEC) emulation is not implemented\n- 24bit Direct display mode\n  - Used for video playback and a few games while playing (ie. Heart of Darkness)\n- Cue sheet parsing\n  - Metadata files that describe how the tracks of CD image are laid out.\n- Lots of more minor things\n\n## Usage\nPut your bios in `data/bios`, CD-ROM game dumps (.iso/.bin, etc) in `data/cdrom`. Optionally put executables in `data/exe` or expansion slot binaries (ie. Caetla) in `data/expansion`.\nThen simply run the main executable.\n\nAlternatively, run the following command to quickly start up a CD-ROM game dump without going to the Game Select screen.\n```bash\npctation \u003ccdrom_path\u003e\n```\nwhere `cdrom_path` is a path to the main game binary.\n\n## Building\n### Windows\nRun `setup-windows.bat` in the root directory.\n### Linux\n##### Note: Untested\nRun `setup-linux.sh` in the root directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocityra%2Fpctation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelocityra%2Fpctation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelocityra%2Fpctation/lists"}