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

BizHawkClient: Add command to get size of memory domain #4439

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Zunawe
Copy link
Collaborator

@Zunawe Zunawe commented Jan 6, 2025

What is this fixing or adding?

Adds a command that returns the size of the specified memory domain. If a client tries to read a large address, it's not guaranteed that that domain is at least that size for any arbitrary game on that system. For example, the Mega Man 2 client tries to read memory in Spelunker that doesn't exist while trying to identify the game.

@Silvris for the MM2 changes.

How was this tested?

Checked the size of ROM on an Emerald game. Did not test the MM2 changes.

@Zunawe Zunawe requested a review from Silvris January 6, 2025 07:27
@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Jan 6, 2025
@Zunawe Zunawe added the is: enhancement Issues requesting new features or pull requests implementing new features. label Jan 6, 2025
from . import MM2World

try:
if (await get_memory_size(ctx.bizhawk_ctx, "PRG ROM")) < 0x3FFB0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_memory_size says that it returns str
This would be comparing a str < int

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants