All Projects → overdrivenpotato → Rust Psp

overdrivenpotato / Rust Psp

Licence: other
Rust on PSP. Panic and allocation support. Access PSP system libraries.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rust Psp

Texturepanner
This repository hosts a shader for Unity3D whose main goal is to facilitate the creation of neon-like signs, conveyor belts and basically whatever based on scrolling textures
Stars: ✭ 528 (+99.25%)
Mutual labels:  game, game-development, graphics
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (+50.94%)
Mutual labels:  game, game-development, graphics
Destinationsol
Official continuation of Destination Sol, the great fun little arcade space shooter from http://sourceforge.net/projects/destinationsol/ Modules live at https://github.com/DestinationSol/
Stars: ✭ 214 (-19.25%)
Mutual labels:  game, game-development
Awesome Haxe Gamedev
Resources for game development on haxe
Stars: ✭ 213 (-19.62%)
Mutual labels:  game, game-development
Ggez
Rust library to create a Good Game Easily
Stars: ✭ 3,120 (+1077.36%)
Mutual labels:  game, game-development
Godot Kickstarter 2019
Create your Own Games with Godot, the Free Game Engine: sources from the January Kickstarter project from GDQuest
Stars: ✭ 194 (-26.79%)
Mutual labels:  game, game-development
Pydark
PyDark is a 2D and Online Multiplayer video game framework written on-top of Python and PyGame.
Stars: ✭ 201 (-24.15%)
Mutual labels:  game, game-development
Antimine Android
Antimine is an open source minesweeper-like puzzle game.
Stars: ✭ 218 (-17.74%)
Mutual labels:  game, game-development
Expo Voxel
🎮🌳 Voxel Terrain made in React Native. ∛
Stars: ✭ 169 (-36.23%)
Mutual labels:  game, game-development
Awesome Flame
An awesome list that curates the best Flame games, projects, libraries, tools, tutorials, articles and more.
Stars: ✭ 227 (-14.34%)
Mutual labels:  game, game-development
Stealthgameudemy
C++ Stealth Game in Unreal Engine (Udemy Project)
Stars: ✭ 221 (-16.6%)
Mutual labels:  game, game-development
Entitas Cpp
Entitas++ is a fast Entity Component System (ECS) C++11 port of Entitas C#
Stars: ✭ 229 (-13.58%)
Mutual labels:  game, game-development
Epicsurvivalgameseries
Third-person Survival Game for Unreal Engine 4 (Sample Project)
Stars: ✭ 2,389 (+801.51%)
Mutual labels:  game, game-development
Awesome Python Applications
💿 Free software that works great, and also happens to be open-source Python.
Stars: ✭ 13,275 (+4909.43%)
Mutual labels:  game, graphics
Frag
A cross-platform 2D|3D game framework for the Nim programming language
Stars: ✭ 210 (-20.75%)
Mutual labels:  game, game-development
Dinocompose
Chrome's Dino T-Rex game developed in Jetpack Compose
Stars: ✭ 170 (-35.85%)
Mutual labels:  game, game-development
Etlegacy
ET: Legacy is an open source project based on the code of Wolfenstein: Enemy Territory which was released in 2010 under the terms of the GPLv3 license.
Stars: ✭ 212 (-20%)
Mutual labels:  game, game-development
Gdevelop
🎮 GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
Stars: ✭ 3,221 (+1115.47%)
Mutual labels:  game, game-development
Awesome Wgpu
A curated list of wgpu code and resources.
Stars: ✭ 162 (-38.87%)
Mutual labels:  game, game-development
Unity resources
A list of resources and tutorials for those doing programming in Unity.
Stars: ✭ 170 (-35.85%)
Mutual labels:  game, game-development

rust-psp

A library for building full PSP modules, including both PRX plugins and regular homebrew apps.

#![no_std]
#![no_main]

psp::module!("sample_module", 1, 1);

fn psp_main() {
    psp::enable_home_button();
    psp::dprintln!("Hello PSP from rust!");
}

See examples directory for sample programs.

What about PSPSDK?

This project is a completely new SDK, with no dependency on the original C/C++ PSPSDK. It aims to be a complete replacement, with more efficient implementations of graphics functions, and the addition of missing libraries.

Features / Roadmap

  • [x] core support
  • [x] PSP system library support
  • [x] alloc support
  • [x] panic = "unwind" support
  • [x] Macro-based VFPU assembler
  • [x] Full 3D graphics support (faster than PSPSDK in some cases!)
  • [x] No dependency on PSPSDK / PSPToolchain
  • [x] Reach full parity with user mode support in PSPSDK
  • [x] Port definitions to libc crate
  • [ ] Add support for creating kernel mode modules
  • [ ] Add std support
  • [ ] Automatically sign EBOOT.PBP files to run on unmodified PSPs
  • [ ] Implement / reverse undiscovered libraries

Dependencies

To compile for the PSP, you will need a Rust nightly version equal to or later than 2020-06-05 and the rust-src component. Please install Rust using https://rustup.rs/

Use the following if you are new to Rust. (Feel free to set an override manually per-project instead).

$ rustup default nightly && rustup component add rust-src

You also need cargo-psp installed:

$ cargo install cargo-psp

Running Examples

Enter one of the example directories, examples/hello-world for instance, and run cargo psp.

This will create an EBOOT.PBP file under target/mipsel-sony-psp/debug/

Assuming you have a PSP with custom firmware installed, you can simply copy this file into a new directory under PSP/GAME on your memory stick, and it will show up in your XMB menu.

.
└── PSP
    └── GAME
        └── hello-world
            └── EBOOT.PBP

If you do not have a PSP, we recommend using the PPSSPP emulator. Note that graphics code is very sensitive so if you're writing graphics code we recommend developing on real hardware. PPSSPP is more relaxed in some aspects.

Advanced usage: PRXEncrypter

If you don't have a PSP with CFW installed, you can manually sign the PRX using PRXEncrypter, and then re-package it using pack-pbp.

Advanced usage: PSPLink

If you have the PSPSDK installed and have built a working copy PSPLink manually, you can also use psplink and pspsh to run the .prx under target/mipsel-sony-psp/debug/ if you prefer. Refer to the installation and usage guides for those programs.

Debugging

psp-gdb is currently too old to support printing Rust types. rust-lldb may be possible but it has not be experimented with yet.

Usage

To use the psp crate in your own Rust programs, add it to Cargo.toml like any other dependency:

[dependencies]
psp = "x.y.z"

In your main.rs file, you need to setup a basic skeleton like so:

#![no_std]
#![no_main]

// Create a module named "sample_module" with version 1.0
psp::module!("sample_module", 1, 0);

fn psp_main() {
    psp::enable_home_button();
    psp::dprintln!("Hello PSP from rust!");
}

Now you can simply run cargo psp to build your EBOOT.PBP file. You can also invoke cargo psp --release to create a release build.

If you would like to customize your EBOOT with e.g. an icon or new title, you can create a Psp.toml file in the root of your project. Note that all keys are optional:

title = "XMB title"
xmb_icon_png = "path/to/24bit_144x80_image.png"
xmb_background_png = "path/to/24bit_480x272_background.png"
xmb_music_at3 = "path/to/ATRAC3_audio.at3"

More options can be found in the schema defintion here.

Known Bugs

This crate breaks on builds with opt-level=0. Likely due to a bug in EABI interop. cargo-psp patches over this by passing -C opt-level=3.

error[E0460]: found possibly newer version of crate ...

If you get an error like this:

error[E0460]: found possibly newer version of crate `panic_unwind` which `psp` depends on
 --> src/main.rs:4:5
  |
4 | use psp::dprintln;
  |     ^^^
  |
  = note: perhaps that crate needs to be recompiled?

Simply clean your target directory and it will be fixed:

$ cargo clean
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].