ravenslofty / prussia Goto Github PK
View Code? Open in Web Editor NEWPrussia - a Rust PS2 SDK.
License: Other
Prussia - a Rust PS2 SDK.
License: Other
As was highlighted in this comment on #18, there are two big advantages to supporting virtual memory that warrant implementing support for the TLB. To support this, we should add support for the TLB-related registers and instructions.
Definition of Done:
prussia_gs
, reimplement SetGsCrt
for setting screen resolution. (note to self: or do I just have one huge prussia
crate?)prussia_dma
to improve its safety; while it's apparently possible to directly poke the GS registers to draw things, it's more efficient to transfer things through DMA, since once a DMA transfer is started the EE can do other things. This probably means we need to come up with a DMAtag builder.prussia_gif
or prussia_gs
, provide a GIFtag builder, and then we can provide a GS builder that wraps that. (yes, it's abstractions all the way down)DISPFB1
/DISPFB2
(whichever we choose) to point to that field.With the steady progress on the given SVD file, and a newly-created Peripheral Access Crate as discussed in #13, having a place to track progress/completed tasks would be useful for all contributors and owners and allow for better coordination of tasks and what order to prioritise them. It doesn't need to be detailed or formal, even a single issue would help.
Definition of Done
README.md
into this new destination.With #19 merged in, we now have access to the CoP0 exception-related registers, meaning we can create basic exception-handling.
Definition of Done:
EEOut
.Some open questions:
_ExceptionEpilogue
, right?)This would allow buffers that are not 'static
to be safely used.
I read some comments in the code and you seem to want to be able to run it on the stable toolchain. Maybe change that?
To begin work on exception-handling, there would first need to be support for the EE exception registers. These are listed in Chapter 3.2 of the EE Core User's Manual.
Definition of Done:
prussia_rt/src/routines.S
.
Following the discussions in issue #9, there is incentive to remove dependency on the BIOS outright to free up much-needed resources (approximately 1MB of RAM). The only reason so far to hold onto the BIOS is the setGsCrt
syscall, which configures the video mode used by the PS2. This syscall sets a number of registers to enable the correct video output, but these registers are undocumented.
If these registers were documented, and defined in the ps2.xml
SVD file, then we can reverse engineer the syscall to identify what values are set in which registers and cut out the syscall completely. Currently, the only known sources of documentation for these are found in Sony's official PS2 Linux distribution, this unofficial linux driver, and ps2tek.
Definition of Done:
For ABI reasons, linking to PS2SDK from Rust isn't a feasible approach.
So, five years ago, I hatched a plan: if the data in the official manuals could be encoded in System View Definition then a tool like svd2rust could be used to generate a set of register bindings and remove the misery of manually abstracting over all the things in the PS2. It seemed like a good idea at the time.
Unfortunately, I majorly underestimated the effort it would take to encode data into SVD; the manuals are PDF format, and are too irregular to attempt to parse directly - you would be writing almost as many exceptions as you would be writing parsing rules.
The only way I've found that reliably works is to write the SVD by hand, referencing the manuals. Understandably, pretty much everybody who comes across this project and asks how they can help gets cold feet after I explain this to them.
I don't really know how to resolve this problem, and that's why this project hasn't seen activity in five years.
I don't know if anybody will come across this issue and offer assistance in doing mind-numbing work, but perhaps this can offer an explanation for why things are stuck.
What version/flavor of binutils is required use prussia? And how did you install/compile it?
The ps2toolchain project uses binutils 2.14 with this patch: https://github.com/ps2dev/ps2toolchain/blob/master/patches/binutils-2.14-PS2.patch
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.