Crate psx

source · []
Expand description

This is a crate for developing homebrew for the Sony PlayStation 1.

Crate features

Additional features can be enabled by building with

cargo psx run --cargo-args "features psx/$FEATURE1,psx/$FEATURE2"

Features may also be added in Cargo.toml. All features are disabled by default.

  • NA_region/EU_region/J_region - Sets the region string in the PS-EXE header.
  • min_panic - Minimizes code generated for panic!s by removing error messages. Code is still generated to ensure that the processor hangs.
  • loadable_exe - Allows returning from main to enable loading and unloading executables.
  • custom_oom - Allows creating custom allocation error handlers
  • heap - Enables using heap! managed by linked_list_allocator. This is disabled by default to minimize dependencies for the default build.
  • nightlier - For when nightly rustc isn’t bleeding edge enough. This enables features requiring changes that aren’t in upstream LLVM yet. Using this requires building and patching LLVM as part of the rustc build. Currently this enables Atomic* up to 16-bits and fences.

Modules

Re-exported constants in a module for easy glob importing.

High-level DMA channel operations and types.

GPU types

Direct hardware access.

Interrupt request types

BIOS function wrappers.

Macros

Define a constructor that runs before main.

Print a rust-style format string and args using the &mut TextBox specified by $box.

Print a rust-style format string and args using the &mut TextBox specified by $box.

Define a destructor that runs after main.

Gets a file size in bytes at compile-time.

Defines a region of memory as a heap managed by linked_list_allocator.

Includes the specified file as a &mut [u32; N]. This is exactly like include_bytes, expect that it checks the size is a multiple of 4 bytes at compile-time to allow creating a mutable u32 slice rather than a u8 slice.

Prints as ASCII string containing Rust-style escape codes to stdout.

Prints an ASCII string containing C-style escape codes to stdout.

Prints as ASCII string containing Rust-style escape codes to stdout with a newline.

Define a region of memory as a heap managed by the BIOS.

Structs

A bitmap which TIMs are composed of.

A double-buffered framebuffer configuration

The properties of a TIM file that has been loaded into VRAM.

A reference to a valid TIM file in memory.

Enums

Errors when parsing TIM files.