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

Custom RAM/ROM Sizes #57

Merged
merged 4 commits into from
Jul 18, 2024
Merged

Conversation

DerelictDrone
Copy link
Member

Adds support to the ZCPU tool for setting an arbitrary(clamped) number of pages for RAM and ROM separately

Technically possible beforehand, as dupe info saved the ram and rom size, not the memory model, so altering it would allow you to have an arbitrary number of bytes for both, this just provides a UI for sanely setting them in a way that respects the paging system.

Capped at 1024 pages(128kb, same as the largest default memory model)

Sliders are shown for ram/rom when the custom ram/rom option is picked and hidden when custom ram/rom
Custom ram/rom is picked, displaying two new sliders and a label telling the user that the sliders measure in pages, so the number they pick is multiplied by 128 for the ram and rom sliders

CPU Reporting 3072 bytes of ram (24 pages, same as the slider depicts)
gmod_vfcqzeP3zN

Leaves a small gap when custom ram/rom isn't selected
Custom ram/rom option is not picked, and there is a gap the exact same size as where the options once were

CPU Reporting 128 bytes of ram(1 page)
Screenshot of a CPU reporting internal ram size as 128 bytes

@DerelictDrone
Copy link
Member Author

DerelictDrone commented Jul 15, 2024

Got it to not leave a gap anymore, and now it won't show on first open of the cpu tool cpanel unless your selection started on custom ram/rom.
cpanelgapless

Have tested to make sure it closes the gap when you change to and from custom ram/rom and it seems to work a-okay, not dropping frames or lagging from the layout change so all should be good on that front

@DerelictDrone DerelictDrone requested a review from thegrb93 July 15, 2024 23:07
@WallopingEwe
Copy link
Contributor

WallopingEwe commented Jul 15, 2024

You should make it specifically say in pages rather than size to not confuse people who refuse to read the prompt.

I.E
RAM pages -----o----
ROM pages --o-------

Or maybe find a way to display it in bytes instead of pages where the slider increments in the page size (128 bytes) also considering the previous presets are in bytes and not pages

@DerelictDrone
Copy link
Member Author

Or maybe find a way to display it in bytes instead of pages where the slider increments in the page size (128 bytes) also considering the previous presets are in bytes and not pages

Couldn't append it without the KB/B shaking violently because the font isn't monospaced, so I just had to opt for prepending it(which is a bit uglier imo but what can you do..)
cpanel prepend b slash kb no paren

@DerelictDrone DerelictDrone merged commit 4d59913 into wiremod:master Jul 18, 2024
1 check failed
@DerelictDrone DerelictDrone deleted the flexible-ram-rom branch July 22, 2024 20:31
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.

3 participants