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

Various namco 2d drivers cleanups, updates #12962

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Conversation

cam900
Copy link
Contributor

@cam900 cam900 commented Nov 11, 2024

  • Various drivers:
    • Make some variables constant
    • Fix spacing
    • Use BIT macro for bit flags
    • Suppress side effects in debugger read
    • Reduce literal tag usages
    • Reduce unnecessary lines
  • namco/namco_c123tmap.cpp:
    • Use generic gfx layout
    • Use reference in delegate
    • Fix notes
  • namco/namco_c169roz.cpp:
    • Use generic gfx layout
    • Use reference in delegate
  • namco/namcofl.cpp:
    • Fix maincpu ROM region size match to memory map
    • Fix notes
  • namco/namconb1.cpp:
    • Split namco NB2 hardware and Point Blank/Gun Bullet driver state
    • Reduce preprocessor defines
    • Fix typename values
  • namco/namcos1.cpp:
    • Split quester driver state for reduce optional finders
    • Fix typename value for save states
  • namco/namcos2.cpp:
    • Fix typename consistency
    • Simplify gfx decode layout
  • namco/namcos2_roz.cpp:
    • Use generic gfx layout
  • namco/namcos2_sprite.cpp:
    • Use device_gfx_interface for gfx decode
  • shared/namco_c355spr.cpp:
    • Use generic gfx layouts
    • Fix notes

- Various drivers:
 - Make some variables constant
 - Fix spacing
 - Use BIT macro for bit flags
 - Suppress side effects in debugger read
 - Reduce literal tag usages
 - Reduce unnecessary lines
- namco/namco_c123tmap.cpp:
 - Use generic gfx layout
 - Use reference in delegate
 - Fix notes
- namco/namco_c169roz.cpp:
 - Use generic gfx layout
 - Use reference in delegate
- namco/namcofl.cpp:
 - Fix maincpu ROM region size match to memory map
 - Fix notes
- namco/namconb1.cpp:
 - Split namco NB2 hardware and Point Blank/Gun Bullet driver state
 - Reduce preprocessor defines
 - Fix typename values
- namco/namcos1.cpp:
 - Split quester driver state for reduce optional finders
 - Fix typename value for save states
- namco/namcos2.cpp:
 - Fix typename consistency
 - Simplify gfx decode layout
- namco/namcos2_roz.cpp:
 - Use generic gfx layout
- namco/namcos2_sprite.cpp:
 - Use device_gfx_interface for gfx decode
- shared/namco_c355spr.cpp:
 - Use generic gfx layouts
 - Fix notes
src/mame/namco/namconb1.h Outdated Show resolved Hide resolved
src/mame/namco/namcos1_m.cpp Outdated Show resolved Hide resolved
src/mame/namco/namcos1_m.cpp Outdated Show resolved Hide resolved
src/mame/namco/namcos2_m.cpp Outdated Show resolved Hide resolved
src/mame/namco/namcos2_m.cpp Outdated Show resolved Hide resolved
namco/namcos1.cpp: Fix input value for debugger read case
namco/namcos2.cpp: Fix boolean testing
Comment on lines 1005 to 1050
switch (m_input_count)
switch (input_count)
{
case 0:
m_stored_input[0] = m_io_in[0]->read() & 0x1f;
m_stored_input[1] = (m_io_in[3]->read() & 0x07) << 3;
stored_input[0] = m_io_in[0]->read() & 0x1f;
stored_input[1] = (m_io_in[3]->read() & 0x07) << 3;
break;

case 3:
m_stored_input[0] = m_io_in[2]->read() & 0x1f;
stored_input[0] = m_io_in[2]->read() & 0x1f;
break;

case 4:
m_stored_input[0] = m_io_in[1]->read() & 0x1f;
m_stored_input[1] = m_io_in[3]->read() & 0x18;
stored_input[0] = m_io_in[1]->read() & 0x1f;
stored_input[1] = m_io_in[3]->read() & 0x18;
break;

default:
m_stored_input[0] = 0x1f;
m_stored_input[1] = 0x1f;
stored_input[0] = 0x1f;
stored_input[1] = 0x1f;
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

You don’t need the local stored_input – you can skip this switch statement entirely if side effects are disabled since the values of the stored inputs aren’t used for calculating the res value in this path of the if (strobe_count > 8).

@cuavas cuavas merged commit 74efa6e into mamedev:master Nov 14, 2024
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.

2 participants