Skip to content

Conversation

@cam900
Copy link
Contributor

@cam900 cam900 commented Oct 17, 2025

  • Fix save state support
  • Reduce literal tag usages and runtime tag lookups
  • Move CPU bank initialize routine into machine_start()
  • Remove unnecessary variable
  • Reduce duplicates
  • Fix filename in comments
  • Make some variables constant
  • Suppress side effects for debugger reads

…iguration, Minor cleanups

- Reduce literal tag usages and runtime tag lookups
- Remove unnecessary variable
- Reduce duplicates
- Fix filename in comments
- Make some variables constant
- Suppress side effects for debugger reads
Comment on lines 41 to 52
{
static const int states[3]={ 0xc7, 0x55, 0x00 };
static const uint8_t states[3]={ 0xc7, 0x55, 0x00 };

m_getstar_status = states[m_getstar_status_state];
if (!machine().side_effects_disabled())
{
m_getstar_status = states[m_getstar_status_state];

m_getstar_status_state++;
if (m_getstar_status_state > 2) m_getstar_status_state = 0;
m_getstar_status_state++;
if (m_getstar_status_state > 2) m_getstar_status_state = 0;
}

return m_getstar_status;
Copy link
Member

Choose a reason for hiding this comment

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

This won’t show the actual value that would be returned in the debugger with this change. You need to do something like:

	static const uint8_t states[3] = { 0xc7, 0x55, 0x00 };

	const uint8_t result = states[m_getstar_status_state];
	if (!machine().side_effects_disabled())
	{
		m_getstar_status = result;

		m_getstar_status_state++;
		if (m_getstar_status_state > 2) m_getstar_status_state = 0;
	}

	return result;

@cuavas cuavas merged commit 659f875 into mamedev:master Oct 18, 2025
7 checks passed
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.

2 participants