Main > Main Forum
720 Real/Joystick/Spinner Test
Paul Olson:
Dave said he still needs to finish the upper housing before he can sell the whole stick. I just bought a controller from someone at KLOV, but it is misssing the pcb. I ordered the premium rebuild kit from Dave, so hopefully I will get both of them soon to test.
Derrick Renaud:
OK, now that it is safe to post again, I will try to answer some of abaraba's troll post by treating it as questions and not the statement of fact that he incorrectly believes they are. Even though he will troll it again in 3 days, I thought others might benefit from the discussion of why I went with the solution I did.
--- Quote from: abaraba on January 21, 2011, 06:26:07 am ---
--- Quote from: Derrick Renaud ---There is a new menu item when Real/Fake controls are found called "Controller Type." There you can select to use 1 of the 3 types.
--- End quote ---
a.) Changing MAME core engine functionality to suit only one game, or very small and specific group of games, is no good.
b.) You have not submitted all the changes, not even complete "atarisy2.c", but more importantly you forgot to mention what other files you modified.
c.) As other similar menu options this should then also be accompanied with a new command line switch, and as anything 'unnecessary' this is also no good.
d.) You have only TWO types of devices there, not three. Arcade spinner can be mapped to "720 spinner" with no problems. No need for "real" and "fake" when we already have "mouse" and "analog", where analog stick maps to analog axes and both 'arcade spinner' and '720 spinner' map to mouse axes.
--- End quote ---
a. without adding the new functionality there is no clean way to add multiple controls. This will be used for other games and can even be used to add back in the fake Battlezone and Defender single joystick hacks, if MAMEdev agrees. This allows all fake handling to be maintained under 1 routine.
c. as stated ad nauseum, no new command line switches. They are not needed. They can be easily controlled in the cfg file when I add that.
d. Try testing the code as I asked, you will see you can not use a mouse if only the real port existed. No center disc data is sent. The player will spin fine when standing still, but will go off in a random direction when kicked. Hence the need for fake "Spinner" handling. If the Real port code worked using only a mouse, then we would not even be discussing this and the current fake joystick would not be in the current MAME code.
--- Quote from: abaraba on January 21, 2011, 06:26:07 am ---
--- Code: ---PORT_MODIFY("LETA0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
PORT_REAL("Rotation", fake_leta_r) PORT_NAME("Center")
PORT_MODIFY("LETA1")
PORT_BIT( 0xff, 0x00, IPT_DIAL_V ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
PORT_FULL_TURN_COUNT(144) PORT_REAL("Rotation", fake_leta_r) PORT_NAME("Rotate")
--- End code ---
Addition of "PORT_REAL", "PORT_FAKE", "PORT_FULL_TURN_COUNT(144)" is unnecessary and involves changes to core MAME engine, like modification of "inptport.c", and who knows what else.
It's nice to see you too named calibration port as "IPT_DIAL_V", but Mouse_Y and Mouse_X data seem to be swapped around in "REAL_FUNCTION", which is one of those things you did not show us.
--- End quote ---
PORT_FULL_TURN_COUNT has been around for a few years. It is to document how many counts in a full turn of a real control. No affect on speed.
PORT_REAL and PORT_FAKE are needed to group different PORTs together to allow for their selection and disconnection of unused ports from being processed by the port update mechanism. Otherwise if you tried to make the current fake joystick and the real port exist at the same time without my new code, both would be updated, conflicting with each other (unless you set the unused controls to NONE) and slowing down the port read by updating unused ports.
You conveniently removed the comments from the code that showed the Center disc connected to X and Rotate disc connected to Y. That is why they are named that way, to more accurately reflect how the hardware works.
Another benefit is that the memory map can now call the LETA ports directly instead of calling the fake handler.
--- Code: ---AM_RANGE(0x1810, 0x1810) AM_MIRROR(0x278c) AM_READ_PORT("LETA0")
AM_RANGE(0x1811, 0x1811) AM_MIRROR(0x278c) AM_READ_PORT("LETA1")
AM_RANGE(0x1812, 0x1812) AM_MIRROR(0x278c) AM_READ_PORT("LETA2")
AM_RANGE(0x1813, 0x1813) AM_MIRROR(0x278c) AM_READ_PORT("LETA3")
--- End code ---
instead of the old code:
--- Code: ---AM_RANGE(0x1810, 0x1813) AM_MIRROR(0x278c) AM_READ(leta_r)
--- End code ---
--- Quote from: abaraba on January 21, 2011, 06:26:07 am ---
--- Code: ---PORT_START("FAKE_SPINNER") /* not direct mapped */
PORT_BIT( 0xffff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10)
PORT_FAKE("Rotation", "Spinner")
--- End code ---
You do not need this, 'arcade spinner' maps to '720 spinner' very well. If you are doing it just to set different sensitivity then you shouldn't as various types of 'arcade spinners' would require different settings anyway, and their full rotation does not need to equal 720's full rotation, so the sensitivity of arcade spinners in this case is more a matter of personal preference, plus it can always be adjusted from the menu. Gameplay with an arcade spinner is much like gameplay with a mouse where you rotate the character by moving the mouse left-right, calibration at "360 degrees" in not necessary or better to say it's inapplicable.
--- End quote ---
As I previously stated, this is false. While the player will spin when standing still, when you press kick the player does not go in the direction he is facing. That is why fake spinner code is needed to send the alignment pulse.
--- Quote from: abaraba on January 21, 2011, 06:26:07 am ---
--- Code: ---static FAKE_INPUT( fake_leta_r )
--- End code ---
You show us "FAKE_INPUT", but not "REAL_INPUT" function, nor where is the branching instruction to decide which one of them to execute. Without you submitting complete, and all the files you have modified no one will able to compile your changes, try to improve, learn from it, play with it, or anything.
--- End quote ---
Sorry, there was no need. Code will be submitted when fully tested. There is no REAL_INPUT function. When "Real" is selected, the ports tagged as PORT_REAL are connected. When a fake controller is selected, the Real port is disconnected and the data is generated through the fake handler using the selected ports specified as PORT_FAKE.
--- Quote from: abaraba on January 21, 2011, 06:26:07 am ---
--- Code: ---else if (!strcmp(current_controller, "Spinner"))
--- End code ---
It makes me puke just to look at the word - "strcmp". Anyway, "else" will do here, you do not need that second comparison until you decide to add keyboard hack too. But, the thing is, you do not need that whole part at all, the real input function can handle 'arcade spinner' as it is, without any hacks, changes or additions - it's still just a "mouse input" in either case.
--- End quote ---
An "else" is needed in case someone incorrectly trys to add a PORT_FAKE without adding it to the handler or incorrectly names a PORT_FAKE. Otherwise it will incorrectly use the "Spinner" code. Which reminds me, I have to add an errorlog to report any controller names received that are not handled.
strcmp is not slow in this case. It bails out at the first difference. "J"oystick and "S"pinner will bail at the first letter. Any fear of a slowdown is also more then compensated for by the fact that unused ports are being disconnected.
Paul Olson:
Thanks for working on this Derrick! And also thanks for taking the time to explain the choices you made.
Derrick Renaud:
The troll moves on. Unbelievable.
http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=244132&page=0&view=expanded&sb=5&o=&fpart=1&vc=1
:banghead:
BadMouth:
:laugh2: Sorry, but I can't help but laugh.
Tell people on mameworld to just google the username and they'll get the idea.
The guy is infamous for annoying the ---steaming pile of meadow muffin--- out of message boards.
http://www.gamedev.net/topic/545989-incoming-hilarity-abaraba-is-back-and-this-time-hes-fixated-on-p2p-networking/
EDIT:OMG just looked at the page 2 results. It goes on and on...ufo forums, astronomy forums...banned in all and his posts deleted in most of them.
(sorry, we now return you to your original topic)
EDIT: This one is classic: http://developer.nvidia.com/forums/index.php?showtopic=2286&start=0&p=6307&#entry6307