Skip to content

Improve docs and public API for trapezoid Cpu standalone usage #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 10, 2025

Conversation

Amjad50
Copy link
Owner

@Amjad50 Amjad50 commented Mar 4, 2025

Improving documentations for trapezoid-core

  • Add debugger feature tag showing which items are under it.
  • Improved the API and exposed a lot of different things for it including:
    • creating Cpu instance.
    • BusLine and CpuBusProvider for creating custom memory for Cpu.
  • Added example trapezoid_cpu on how to use these new APIs to create and interact with the Cpu.

Note: Currently, there is an issue with the latest nightly and thus it crashes in docs.rs rust-lang/rust#137662, Will wait until its fixed.

@Amjad50 Amjad50 changed the base branch from master to gpu_improvements March 4, 2025 05:17
@Amjad50 Amjad50 changed the base branch from gpu_improvements to master March 4, 2025 05:17
Amjad50 added 4 commits March 6, 2025 01:10
Instead of returning this, the caller can ask if we have reached the
shell or not.

This way, when we want to implement a program that uses the CPU, it
shouldn't care about the `shell` which is a PSX thing only.

Signed-off-by: Amjad Alsharafi <[email protected]>
This is so that other programs that want to use the `CPU` as standalone
can do that

Signed-off-by: Amjad Alsharafi <[email protected]>
Signed-off-by: Amjad Alsharafi <[email protected]>
@Amjad50 Amjad50 changed the title Improve docs Improve docs and public API for trapezoid Cpu standalone usage Mar 5, 2025
@Amjad50
Copy link
Owner Author

Amjad50 commented Mar 5, 2025

Hello @omarandlorraine, you can take a look at this. check the example trapezoid_cpu on how it can be used.

@omarandlorraine
Copy link
Contributor

you can take a look at this. check the example trapezoid_cpu on how it can be used.

Thank you so much for this.

I've taken a quick look and it all looks excellent. Except one thing I know of: I could make use of the Cpu::registers_mut method. Are you comfortable making this pub instead of pub(crate)?

@Amjad50
Copy link
Owner Author

Amjad50 commented Mar 6, 2025

Ah yes indeed. Good to make it public.

@Amjad50
Copy link
Owner Author

Amjad50 commented Mar 6, 2025

Wait, it is already pub, maybe you are referring to older docs, (since last version hasn't been built, issue with docs.rs)

@Amjad50 Amjad50 merged commit b2411af into master Mar 10, 2025
1 check passed
@Amjad50 Amjad50 deleted the improve_docs branch March 10, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants