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

SPM_PAGESIZE between platforms #2

Open
johnbaumann opened this issue Feb 7, 2021 · 0 comments
Open

SPM_PAGESIZE between platforms #2

johnbaumann opened this issue Feb 7, 2021 · 0 comments

Comments

@johnbaumann
Copy link
Owner

SPM_PAGESIZE varies between platforms; 328p = 128, 2560 = 256.

Memory is currently read byte per byte, but no such functionality exists for writes, instead writes are per page. On the 328p this is straightforward as page sizes match the PS1 memory card at 128bytes per frame. The 2560 would require a more advanced scheme.

A page buffer could be used, assuming that each sector write would occur in sequential order.
In the event of a timeout or non-sequential write, one part of the buffer is filled with the missing frame, written, and committed, repeat for other frame? Store address for both frames etc.

Read code must also be adapted for address space beyond 64Kb:
far_away
far_far_away
far_far_far_away

Maximum array sizes are 0x7FFF, need to split data between const arrays and align with page sizes.

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

No branches or pull requests

1 participant