Previous 199869 Revisions Next

r33267 Sunday 2nd November, 2014 at 04:25:30 UTC by Felipe CorrĂȘa da Silva Sanches
Galaxy Force II: Adding gforce_output_cb1 (the values written there seem to select the meaning of some of the PORTC bits related to motor control)
[src/mame/drivers]segaybd.c
[src/mame/includes]segaybd.h

trunk/src/mame/drivers/segaybd.c
r241778r241779
396396//      switches we need to fix
397397
398398//-------------------------------------------------
399//  gforce2_output_cb1 - output #1 handler for
400//  Galaxy Force
401//-------------------------------------------------
402
403void segaybd_state::gforce2_output_cb1(UINT16 data)
404{
405   logerror("gforce2_output_cb1: '%02X'\n", data & 0xFF);
406   //bits 4, 5, and 7 seem to be used to multiplex the PORTC signals
407   //The exact mapping of these signals is yet not perfectly understood.
408   //You can observe how this value changes when switching pages in the
409   //service mode motor test menu
410}
411
412//-------------------------------------------------
399413//  gforce2_output_cb2 - output #2 handler for
400414//  Galaxy Force
401415//-------------------------------------------------
r241778r241779
873887
874888   PORT_MODIFY("PORTC")
875889   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Floor Switch")
876   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Beam Sensor 2 / Down Limit")
877   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Beam Sensor 1 / Up Limit")
890   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Beam Sensor 2 / Down Limit") //The meaning of these portbits seems to be selected
891   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Beam Sensor 1 / Up Limit")   // by the output value written to gforce2_output_cb1
878892   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Left CCW Limit")
879893   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Right CW Limit")
880894
r241778r241779
25242538DRIVER_INIT_MEMBER(segaybd_state,gforce2)
25252539{
25262540   DRIVER_INIT_CALL(generic);
2541   m_output_cb1 = output_delegate(FUNC(segaybd_state::gforce2_output_cb1), this);
25272542   m_output_cb2 = output_delegate(FUNC(segaybd_state::gforce2_output_cb2), this);
25282543}
25292544
trunk/src/mame/includes/segaybd.h
r241778r241779
6464   DECLARE_READ8_MEMBER( link_portc0_r );
6565
6666   // game-specific output handlers
67   void gforce2_output_cb1(UINT16 data);
6768   void gforce2_output_cb2(UINT16 data);
6869   void gloc_output_cb1(UINT16 data);
6970   void gloc_output_cb2(UINT16 data);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team