-
Notifications
You must be signed in to change notification settings - Fork 2.2k
model2.cpp: Hooked some outputs (lamps, wheel) #14617
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
Conversation
src/mame/sega/model2.cpp
Outdated
| output().set_value("Lamp_Race_Leader", BIT(data, 7)); | ||
| } | ||
|
|
||
| if (strncmp(name, "indy500", 7) == 0) |
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.
Absolutely no at this. Just generate a function depending on what's the machine_config caller. So for example:
void model2a_state::srallyc(machine_config &config)
{
[...]
io.out_pf_callback().set(FUNC(model2a_state::srallyc_outputs_w));
}
void model2_state::srallyc_outputs_w(u8 data)
{
m_output[1] = data;
output().set_value("Lamp_Start", BIT(data, 2));
output().set_value("Lampe_View", BIT(data, 5)); // Lampe?
output().set_value("Lamp_Race_Leader", BIT(data, 7));
}Beyond being ugly and prone to breakage, there are two extra reasons about why calling the base system name is a bad juju:
- you are iterating for every single string compare;
- the clones won't hookup anything (iirc);
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.
Clones do hook. Thanks for the feedback.
|
@angelosa I hope these changes will make the integration of the code possible. Thank you again. |
|
Afaik set_value is deprecated and should be removed in favour of output_finder when encountered. Adding even more shouldn't be the way to go |
|
Better use 6 generic lamps, like How is the wheel motor shared with m_driveio_comm_data? |
|
Uff. Okay I'm tired for today. I did this exactly to avoid generic lamps and define them. I didn't do the wheel hooks but they work. |
|
But defined outputs are not wanted? Will tell people straight what which output does. |
|
Personal preference: generic output tags in most cases. |
|
@happppp changed to generic lamp output. if this works for you I will also fix the outputs for model2o. |
|
Lamps are on bit 2-7, right? So it's i+2, not i. And you only need one function. And I'm not a fan of "contact MAMEdev" popmessage. To be honest if it was me, I'd use logerror instead of obscuring the game screen. (note, my opinion here may differ from model2 driver authors) |
|
Contact mame Dev is not from me. Will fix the rest. I appreciate the time and patience. |
|
At bare minimum a Also, this goes beyond the scope of this PR. |
|
okay I think I got this. |
5f229b7 to
305affe
Compare
|
great now my changes conflict suddenly? |
|
It means you rebased on an earlier revision and not HEAD of master git branch. |
305affe to
880fda3
Compare
|
Again about m_wheel_motor, I don't believe it's at the right place. |
|
Comparing to model1 the same method is used to grab the force feedback values but I understand the problem now. Do you see a way however to output from the drive_board without calling it wheel and getting it accepted? Maybe making driveio_comm_data an output as it already exists? |
|
I don't think it should send intermediate data to output. |
|
Please correct me if I'm wrong but isn't that exactly what model 1 is doing? |
|
I'll take your word for it (didn't look). But just because another driver has a workaround/hack doesn't mean it's ok. |
|
as requested, removed wheel. hope that at least the lamps can now be merged. |
|
indy500, sgt24h, overrev: Do those games have the drive I/O board? If so, it's undumped/unemulated in MAME, drive_board_w does nothing for these games. |
|
Over Rev and sgt24h are multi compatible. See service menu. All games give output here so I'm not sure what you mean. |
|
Jaleco games should be conversion kits, forgot of which off the bat (can't find an operator manual at current time). |
|
indy500 has the one with EPR-18261 according to the manual (which is already in MAME's stcc romset). |
|
Abc indeed. Lamps work on all 3 iirc. FFB is either 2 in one or based on the io boards. |
hooked some outputs for model 2 based on SailorSats work. Added definitions to output names for Lamps and wheel.