#emulator #vulkan #psx #rust #games-and-graphics

trapezoid-core

A PSX emulator, backed by vulkano for rendering

3 releases

0.1.2 Jan 29, 2024
0.1.1 Jan 25, 2024
0.1.0 Jan 25, 2024

#324 in Emulators

Download history 8/week @ 2024-01-19 5/week @ 2024-01-26 5/week @ 2024-02-16 24/week @ 2024-02-23 7/week @ 2024-03-01 1/week @ 2024-03-08 1/week @ 2024-03-15 37/week @ 2024-03-29 3/week @ 2024-04-05 14/week @ 2024-04-12

54 downloads per month
Used in trapezoid

MIT license

500KB
12K SLoC

trapezoid-core

Crates.io trapezoid-core docs.rs (with version)

This is the core of a PSX emulator trapezoid. It contains all the components of a working emulator, the rest is a frontend.

You can create your own frontend for this project, or use it as a server.

Components implemented

  • CPU: Mips R3000A
  • GPU: backed by vulkano. i.e. for now, you need a project running vulkano to use this.
  • SPU: produce PCM frames that should be taken out regularly by the frontend.
  • CDROM: can read the contents of a PSX CDROM, and can be used to load games
    • Support XA-ADPCM audio.
  • MDEC: Able to decode MDEC frames and play videos
  • GTE: Geometry Transformation Engine
  • DMA: Direct Memory Access
  • Timers
  • Interrupts
  • Memory: Hosts the whole memory as a Box<[u8]> and provides access to it.
  • Memory card: will save/load memcard to/from disk, it will save to the current folder.
    • TODO: add API to control this
  • Debugging: We have an API to easily create a debugger for this emulator. This is used by the frontend trapezoid.

TODO

  • Multiple tracks in cdrom
  • A better API, currently the API only expose what the frontend needs. and thus doesn't have access to GPU, SPU, etc...
  • Better docs for the API
  • Add support for more CDROM formats
  • Better control over audio channels

Dependencies

~48MB
~1M SLoC