Skip to content

NES: Add cart status for Sunsoft FME-7#180

Open
HeeminTV wants to merge 2 commits into
nesdev-org:masterfrom
HeeminTV:more_mapper_status
Open

NES: Add cart status for Sunsoft FME-7#180
HeeminTV wants to merge 2 commits into
nesdev-org:masterfrom
HeeminTV:more_mapper_status

Conversation

@HeeminTV

Copy link
Copy Markdown

This adds a register viewer menu for FME-7.

image

Comment thread Core/NES/Mappers/Sunsoft/SunsoftFme7.h Outdated
bool _irqEnabled = false;
bool _irqCounterEnabled = false;
uint16_t _irqCounter = 0;
uint8_t _regForStatus[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // only used for status display

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would rename this to just "_regs" (other mappers have a similar pattern) and serialize it to save states in Serialize. If it's not in save states, rewinding or loading save states will display incorrect data in the register viewer.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Personally, I'd rather go straight for a uint8_t _chrPage[8]; and, uint8_t _prgPage[3];. _regs[8] already exists as _workRamValue in a similar fashion.

Comment thread Core/NES/Mappers/Sunsoft/SunsoftFme7.h Outdated
entries.push_back(MapperStateEntry("", "PRG Bank 3", _regForStatus[11] & 0x3F, MapperStateValueType::Number8));

entries.push_back(MapperStateEntry("", "PRG Bank 0 is RAM", (_regForStatus[8] & 0x40) == 0x40, MapperStateValueType::Bool));
entries.push_back(MapperStateEntry("", "RAM enable", (_regForStatus[8] & 0x80) == 0x80, MapperStateValueType::Bool));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should be RAM Enabled (capital E and 'd' at the end) to match e.g IRQ Enabled

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