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

jpmsru: Sort out remaining games, add new ones #9830

Merged
merged 3 commits into from
May 28, 2022

Conversation

SomeRandomGuyIdk
Copy link
Contributor

  • Support for remaining games from the previous SRU skeleton driver
  • New games & clones
  • Some cleanups (per-game mconfigs replaced with a macro, is that OK?)

Comment on lines 65 to 75
#include "j_ndu.lh"
#include "j_dud.lh"
#include "j_lan.lh"
#include "j_super2.lh"
#include "j_ews.lh"
#include "j_ewsdlx.lh"
#include "j_ssh.lh"
#include "j_lt.lh"
#include "j_plus2.lh"
#include "j_sup2p.lh"
#include "j_la.lh"
Copy link
Member

Choose a reason for hiding this comment

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

It’s better to sort these so people can see what’s here at a glance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment on lines +310 to +328
void jpmsru_state::outputs_ews(address_map &map)
{
jpmsru_io(map);

map(0x38, 0x39).w(FUNC(jpmsru_state::out_meter_w<0>));
map(0x3a, 0x3b).w(FUNC(jpmsru_state::out_meter_w<1>));
map(0x3c, 0x3d).w(FUNC(jpmsru_state::out_meter_w<2>));
map(0x3e, 0x3f).w(FUNC(jpmsru_state::out_meter_w<3>));
map(0x40, 0x41).w(FUNC(jpmsru_state::out_meter_w<4>));
map(0x42, 0x4d).w(FUNC(jpmsru_state::out_disp_w));
map(0x4e, 0x4f).w(FUNC(jpmsru_state::out_meter_w<5>));
map(0x50, 0x51).w(FUNC(jpmsru_state::out_meter_w<6>));
map(0x54, 0x55).w(FUNC(jpmsru_state::out_50p_lockout_w));
map(0x6a, 0x6b).w(FUNC(jpmsru_state::out_payout_cash_w));
map(0x6c, 0x6d).w(FUNC(jpmsru_state::out_payout_token_w));
map(0x6e, 0x6f).w(FUNC(jpmsru_state::out_coin_lockout_w));
// Mini Logic Extension outputs, used for extra lamps
map(0x80, 0x9f).w(FUNC(jpmsru_state::out_lamp_ext_w));
}
Copy link
Member

Choose a reason for hiding this comment

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

There’s too much repetition/duplication here. Now you’re stuck comparing functions to work out when games have the same I/O map.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got rid of some of the redundant maps.

Comment on lines 455 to 462
void jpmsru_state::out_50p_lockout_w(offs_t offset, uint8_t data)
{
// 50p is always coin 4
if(!m_coin_lockout)
machine().bookkeeping().coin_lockout_w(3, !data);
else
machine().bookkeeping().coin_lockout_w(3, 1);
}
Copy link
Member

Choose a reason for hiding this comment

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

This seems weird – is this output really interlocked so it can only be driven low when the other coin lockout port is all high?

Copy link
Contributor Author

@SomeRandomGuyIdk SomeRandomGuyIdk May 27, 2022

Choose a reason for hiding this comment

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

Seemed like it, but now that I've tested things a bit more, looks like I was fixing a BTANB here. On j_ews you can go over the credit limit with 50p coins without the check, that's the only game where it happens though and it got fixed on later revisions. No idea how this looks like in hardware, no schematics for those parts. Removed the check.

Comment on lines 1063 to 1078
// Game configs
#define SRU_MCONFIG(GAME, CONFIG) void jpmsru_state::GAME(machine_config &config)\
{\
CONFIG(config);\
m_maincpu->set_addrmap(AS_IO, &jpmsru_state::outputs_##GAME);\
}

SRU_MCONFIG( ewn, jpmsru_3k_busext )
SRU_MCONFIG( ewn2, jpmsru_3k )
SRU_MCONFIG( ndu, jpmsru_3k_busext )
SRU_MCONFIG( dud, jpmsru_3k )
SRU_MCONFIG( lan, jpmsru_3k )
SRU_MCONFIG( ews, jpmsru_3k )
SRU_MCONFIG( lt, jpmsru_4k )
SRU_MCONFIG( sup2p, jpmsru_3k )
SRU_MCONFIG( la, jpmsru_3k )
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 less clear than just having the functions written out for minimal reduction in lines. Also, GAME is a macro already, so using it as a parameter name may lead to confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

ROM_END

#define GAME_FLAGS MACHINE_NOT_WORKING|MACHINE_MECHANICAL|MACHINE_REQUIRES_ARTWORK|MACHINE_IMPERFECT_SOUND|MACHINE_SUPPORTS_SAVE

GAMEL( 1979?, j_ewn, 0, ewn, j_ewn, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (revision 20, 5p Stake, £1 Jackpot)", GAME_FLAGS, layout_j_ewn )
GAMEL( 1981?, j_ewna, j_ewn, ewn2, j_ewn2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (revision 26A, £2 Jackpot)", GAME_FLAGS, layout_j_ewn )
GAMEL( 1981?, j_ewnb, j_ewn, ewn2, j_ewn2, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (£2 Jackpot)", GAME_FLAGS, layout_j_ewn )
GAMEL( 1979?, j_ewnc, j_ewn, ewn, j_ewn, jpmsru_state, init_jpmsru, ROT0, "JPM", "Each Way Nudger (JPM) (SRU) (5p Stake, £1 Jackpot", GAME_FLAGS, layout_j_ewn ) // Earlier revision
Copy link
Member

Choose a reason for hiding this comment

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

The description of this one seems to be missing a closing parenthesis.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@cuavas cuavas merged commit 7f967b0 into mamedev:master May 28, 2022
@SomeRandomGuyIdk SomeRandomGuyIdk deleted the jpmsru2 branch May 30, 2022 15:16
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