-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
SomeRandomGuyIdk
commented
May 25, 2022
- 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?)
src/mame/drivers/jpmsru.cpp
Outdated
#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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
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)); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/mame/drivers/jpmsru.cpp
Outdated
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); | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
src/mame/drivers/jpmsru.cpp
Outdated
// 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 ) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
src/mame/drivers/jpmsru.cpp
Outdated
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.