Skip to content
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

Add system to send messages from the ARM7 to the ARM9 #244

Closed
AntonioND opened this issue Dec 22, 2024 · 4 comments
Closed

Add system to send messages from the ARM7 to the ARM9 #244

AntonioND opened this issue Dec 22, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@AntonioND
Copy link
Member

Right now there is no way to send debug print messages from the ARM7 to the ARM9.

The idea is to have a function on the ARM9 like consoleArm7Init(PrintConsole *console, size_t buffer_size) that allocates a shared buffer in main RAM and passes it to the ARM7. Then, the ARM7 can write to it and send a FIFO message to the ARM9 when it finishes writing a line, for example. Or maybe the ARM9 can check the buffer regularly and print it. The idea is that the ARM9 would immediately know that all text obtained from the ARM7 needs to be redirected to a specific PrintConsole.

On the ARM7 side, there would be a bool that is set to true whenever the console is initialized. We would also need a very small printf (there isn't a lot of space on the ARM7). Maybe a custom version that only supports %c, %d, %x and %s.

@AntonioND AntonioND added the enhancement New feature or request label Dec 22, 2024
@AntonioND AntonioND changed the title Add system to send text messages from the ARM7 to the ARM9 Add system to send text messages and asserts from the ARM7 to the ARM9 Dec 22, 2024
@AntonioND
Copy link
Member Author

Also, we need something like this but for asserts.

@AntonioND AntonioND self-assigned this Dec 23, 2024
@AntonioND
Copy link
Member Author

Prototype here:
blocksds/libnds#148
#246

@AntonioND
Copy link
Member Author

So the console part of this is ready (the two PRs have been merged), only the assertions are left.

@AntonioND AntonioND changed the title Add system to send text messages and asserts from the ARM7 to the ARM9 Add system to send asserts from the ARM7 to the ARM9 Dec 25, 2024
@AntonioND AntonioND changed the title Add system to send asserts from the ARM7 to the ARM9 Add system to send messages from the ARM7 to the ARM9 Dec 25, 2024
@AntonioND
Copy link
Member Author

I've created a new task for the asserts because this work will be quite different from the console messages. #247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant