| Main > Main Forum |
| Reading MAME as technical reference and historical document: 720 controller |
| << < (14/17) > >> |
| Paul Olson:
If the controller is moved, the code added to the READ8_HANDLER will detect it and use the input code for the dial instead of the analog stick. |
| abaraba:
--- Quote from: Paul Olson on January 14, 2011, 01:02:52 pm ---If the controller is moved, the code added to the READ8_HANDLER will detect it and use the input code for the dial instead of the analog stick. --- End quote --- That sounds good, but what are you talking about exactly... what do you mean "code added"? Did you make it work like that, or is it just suggestion? Can you copy/paste the code you are talking about? |
| Derrick Renaud:
--- Quote from: abaraba on January 14, 2011, 01:17:49 pm --- --- Quote from: Paul Olson on January 14, 2011, 01:02:52 pm ---If the controller is moved, the code added to the READ8_HANDLER will detect it and use the input code for the dial instead of the analog stick. --- End quote --- That sounds pretty good, but can you please explain it a bit. Does that mean we can initialize it with whatever absolute or relative type of controls and later still obtain data in either format? Does it mean we can know at run time from which device data originated? --- End quote --- Wow, this says it all. You truely want everything given to you when the goal was to actually learn something for yourself. I see no need to reply to your nonsense any more. Though Paul seems to be able to grasp the concept, so there is hope still to be found in all this. |
| Derrick Renaud:
Let walk through the challenge posted here: http://forum.arcadecontrols.com/index.php?topic=108516.msg1152192#msg1152192 Step 1. modify the "INPUT_PORTS_START( 720 )" section to add the relative controls from pre 85u1 back in to exist with the current controls. using the 720 code here: http://mamedev.org/source/src/mame/drivers/atarisy2.c.html How do we accomplish this? We need to know how MAME handles input ports. All input ports are defined inside the INPUT_PORTS_START() macro. Now because games can have similar input ports, one game's definitions can be resused and modified by another game. This is what happens with 720. It uses the definitions from paperboy and modifies them as needed. These are the paperboy ports/code we are interested in at line 818. --- Code: ---PORT_START("LETA0") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("LETA1") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("LETA2") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("LETA3") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) --- End code --- You can see that they are not defined as anything. 720 then modifies them at line 884 as follows: --- Code: ---PORT_MODIFY("LETA0") /* not direct mapped */ PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_MODIFY("LETA1") /* not direct mapped */ PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE --- End code --- Notice "LETA2" and "LETA3" are still left undefined. So to recap, "LETA0" and "LETA1" are defined as the current fake joystick. "LETA2" and "LETA3" are not being used for anything. This brings us back to the original goal of adding the 2 new relative ports needed to use a real 720 control and make them coexist with the current fake control. I've already mentioned in the past that the info was in a link given by someone who refused to read the info provided on said link of http://www.jstookey.com/arcade/720/720-arcadejoy.php . Bonus points to anyone who can tell me why I do not agree with the sensitivity settings given there. So what do we need to do/code for step 1? |
| ErikRuud:
--- Quote from: Derrick Renaud on January 14, 2011, 01:30:10 pm --- Wow, this says it all. You truely want everything given to I see no need to reply to your nonsense any more. Though Paul seems to be able to grasp the concept, so there is hope still to be found in all this. --- End quote --- |
| Navigation |
| Message Index |
| Next page |
| Previous page |