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

vsystem/fromanc2.cpp: Cleanups #12407

Merged
merged 3 commits into from
May 25, 2024
Merged

vsystem/fromanc2.cpp: Cleanups #12407

merged 3 commits into from
May 25, 2024

Conversation

cam900
Copy link
Contributor

@cam900 cam900 commented May 25, 2024

  • Split driver state class for reduce optional finders
  • Correct type for variables
  • Use C++ style comments for single line comments
  • Reduce literal tag usage and runtime tag lookups
  • Suppress side effects for debugger read
  • Use generic gfx decode layout
  • Constantize variables
  • Fix spacing

cam900 and others added 2 commits May 25, 2024 20:47
- Split driver state class for reduce optional finders
- Correct type for variables
- Use C++ style comments for single line comments
- Reduce literal tag usage and runtime tag lookups
- Suppress side effects for debugger read
- Use generic gfx decode layout
- Constantize variables
- Fix spacing
Comment on lines 57 to 68
switch (m_portselect)
{
case 0x01: ret = ioport("KEY0")->read(); break;
case 0x02: ret = ioport("KEY1")->read(); break;
case 0x04: ret = ioport("KEY2")->read(); break;
case 0x08: ret = ioport("KEY3")->read(); break;
default: ret = 0xffff;
logerror("PC:%08X unknown %02X\n", m_maincpu->pc(), m_portselect);
case 0x01: ret = m_in_key[0]->read(); break;
case 0x02: ret = m_in_key[1]->read(); break;
case 0x04: ret = m_in_key[2]->read(); break;
case 0x08: ret = m_in_key[3]->read(); break;
default:
ret = 0xffff;
if (!machine().side_effects_disabled())
logerror("PC:%08X unknown %02X\n", m_maincpu->pc(), m_portselect);
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

This is a key matrix that the author failed to recognise. It’s better to emulate them properly.

@cuavas cuavas merged commit 10d40e3 into mamedev:master May 25, 2024
2 of 5 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.

None yet

2 participants