Reworked default paddle mode handling. Removed ROM property

'Controller.PaddleNo', replacing it with 'Controller.SwapPaddles' (Yes/No
type argument).  The reasoning being that in combination with
'Console.SwapPorts', paddle 0 can be the default for any ROM as follows:

  ROM uses paddle 0 as default:
    Console.SwapPorts -> No
    Controller.SwapPaddles -> No

  ROM uses paddle 1 as default:
    Console.SwapPorts -> No
    Controller.SwapPaddles -> Yes

  ROM uses paddle 2 as default:
    Console.SwapPorts -> Yes
    Controller.SwapPaddles -> No

  ROM uses paddle 0 as default:
    Console.SwapPorts -> Yes
    Controller.SwapPaddles -> Yes

Updated all ROMs that don't default to paddle 0.  This works for all
paddle input, both analog from mouse and/or joystick and digital from
keyboard, joystick, etc.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1192 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2006-12-09 00:25:20 +00:00
parent 5527e47678
commit e230be7fed
15 changed files with 176 additions and 84 deletions

View File

@ -265,11 +265,9 @@ scalers in TIA mode, such as Scale2x, Scale3x, HQ2x, HQ3x, etc.</li>
<li>Added all sound related commandline options to the UI, so you no
longer have to use the commandline to set those options.</li>
<li>Added new property to ROM properties specifying which paddle the mouse
should emulate. This eliminates the need to manually set the paddle mode
for those ROMs that don't use paddle zero by default. Related to this,
made the '-paddle' option not save to the settings file, and only exist
as long as a ROM is running.</li>
<li>Added new property to ROM properties specifying whether to swap paddles
plugged into a virtual port. This eliminates the need to manually set the
paddle mode for those ROMs that don't use paddle zero by default.</li>
<li>Added a 'Defaults' button to the Game Properties dialog, which resets
the ROM properties to the internal defaults, deleting that ROMs properties

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Console.cxx,v 1.104 2006-12-08 16:49:23 stephena Exp $
// $Id: Console.cxx,v 1.105 2006-12-09 00:25:19 stephena Exp $
//============================================================================
#include <assert.h>
@ -125,6 +125,9 @@ Console::Console(const uInt8* image, uInt32 size, const string& md5,
rightjack = Controller::Left;
}
// Also check if we should swap the paddles plugged into a jack
bool swapPaddles = myProperties.get(Controller_SwapPaddles) == "YES";
// Construct left controller
if(left == "BOOSTER-GRIP")
{
@ -140,7 +143,7 @@ Console::Console(const uInt8* image, uInt32 size, const string& md5,
}
else if(left == "PADDLES")
{
myControllers[0] = new Paddles(leftjack, *myEvent);
myControllers[0] = new Paddles(leftjack, *myEvent, swapPaddles);
}
else
{
@ -166,7 +169,7 @@ Console::Console(const uInt8* image, uInt32 size, const string& md5,
}
else if(right == "PADDLES")
{
myControllers[1] = new Paddles(rightjack, *myEvent);
myControllers[1] = new Paddles(rightjack, *myEvent, swapPaddles);
}
#ifdef ATARIVOX_SUPPORT
else if(right == "ATARIVOX")
@ -179,16 +182,6 @@ Console::Console(const uInt8* image, uInt32 size, const string& md5,
myControllers[1] = new Joystick(rightjack, *myEvent);
}
// Set the paddle number which the mouse will emulate
if(myControllers[0]->type() == Controller::Paddles ||
myControllers[1]->type() == Controller::Paddles)
{
int paddle = myOSystem->settings().getInt("paddle");
if(paddle == -1) // not set on commandline
paddle = atoi(myProperties.get(Controller_PaddleNo).c_str());
myOSystem->eventHandler().setPaddleMode(paddle);
}
// Create switches for the console
mySwitches = new Switches(*myEvent, myProperties);

View File

@ -529,7 +529,7 @@ static const char* DefProps[][23] = {
{ "04014d563b094e79ac8974366f616308", "", "CX2690", "Pengo - 1 Player Only (1984) (Atari)", "", "Extremely Rare", "", "F8", "", "", "", "", "", "", "", "", "8", "144", "", "", "", "", "" },
{ "049626cbfb1a5f7a5dc885a0c4bb758e", "Activision", "AX-017", "Megamania (1982) (Activision) (PAL) [p1][!]", "", "Uncommon", "", "4K", "", "", "", "", "", "", "", "PAL", "8", "144", "58", "190", "", "", "" },
{ "0546f4e6b946f38956799dd00caab3b1", "HES / Thomas Jentzsch", "", "My Golf (1990) (HES) (NTSC by Thomas Jentzsch)", "", "New Release (Video Format Conversion)", "", "", "", "", "", "", "", "", "", "", "8", "144", "41", "196", "", "", "" },
{ "05b45ba09c05befa75ac70476829eda0", "Parker Bros", "PB5000", "Star Wars - Jedi Arena (1983) (Parker Bros) (PAL) [!]", "Uses the Paddle Controllers", "Rare", "", "4K", "", "", "", "", "Paddles", "Paddles", "1", "PAL", "8", "144", "58", "199", "", "", "" },
{ "05b45ba09c05befa75ac70476829eda0", "Parker Bros", "PB5000", "Star Wars - Jedi Arena (1983) (Parker Bros) (PAL) [!]", "Uses the Paddle Controllers", "Rare", "", "4K", "", "", "", "", "Paddles", "Paddles", "Yes", "PAL", "8", "144", "58", "199", "", "", "" },
{ "05ebd183ea854c0a1b56c218246fbbae", "Atari", "CX2656", "SwordQuest - Earthworld (1982) (Atari) [a1][!]", "", "Common", "", "", "", "", "", "", "", "", "", "", "", "", "37", "195", "", "", "" },
{ "06cfd57f0559f38b9293adae9128ff88", "Telegames", "", "Adventures on GX-12 (Telegames) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "8", "152", "64", "193", "", "", "" },
{ "073cb76b006af034fd150be3f5e0e7e6", "", "", "Mobile 48 Sprite Kernel (Bug Fixed) (10-01-2003) (Eric Ball)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -619,7 +619,7 @@ static const char* DefProps[][23] = {
{ "2eda6a49a49fcb2b674ea9e160b6a617", "Kyle Pittman", "", "Rambo in Afghanistan by Kyle Pittman (Riddle of the Sphinx Hack)", "Hack of Riddle of the Sphinx (Imagic)", "New Release (Hack)", "", "", "", "", "", "", "", "", "", "", "", "", "39", "186", "", "", "" },
{ "2f273c423471d125d32d1d54d58f063a", "Parker Bros", "PB5080", "Gyruss (1984) (Parker Bros) [b1]", "", "Rare", "", "", "", "", "", "", "", "", "", "", "", "", "47", "180", "Yes", "", "" },
{ "3025bdc30b5aec9fb40668787f67d24c", "", "", "Demo Image Series #14 - Two Marios (4K Interleaved Chronocolour Vertical Movement) (05-03-2003) (AD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "3051b6071cb26377cd428af155e1bfc4", "", "CX2607 / 6699828 / 4975115", "Canyon Bomber (1978) (Atari) [o1]", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "1", "", "", "", "47", "195", "", "", "" },
{ "3051b6071cb26377cd428af155e1bfc4", "", "CX2607 / 6699828 / 4975115", "Canyon Bomber (1978) (Atari) [o1]", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "Yes", "", "", "", "47", "195", "", "", "" },
{ "30e0ab8be713208ae9a978b34e9e8e8c", "Atari", "CX2630 / 4975122", "Circus Atari (1978) (Atari) (PAL) [!]", "Uses the Paddle Controllers", "Common", "", "4K", "", "", "", "", "Paddles", "", "", "PAL", "", "", "45", "229", "", "", "" },
{ "313243fc41e49ef6bd3aa9ebc0d372dd", "Starsoft", "", "Der Vielfrass (Starsoft) (PAL) [p1][!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "64", "", "", "", "" },
{ "318a9d6dda791268df92d72679914ac3", "Activision", "AX-017", "Megamania (1982) (Activision) [!]", "", "Uncommon", "", "4K", "", "", "", "", "", "", "", "", "8", "144", "43", "192", "", "", "" },
@ -746,7 +746,7 @@ static const char* DefProps[][23] = {
{ "6e59dd52f88c00d5060eac56c1a0b0d3", "Atari", "CX2648 / 4975161", "Video Pinball (1980) (Atari) (PAL) [!]", "", "Uncommon", "", "", "", "", "", "", "", "", "", "PAL", "", "", "56", "217", "", "", "" },
{ "6f2aaffaaf53d23a28bf6677b86ac0e3", "US Games", "VC 1001", "Space Jockey (1982) (US Games) [!]", "", "Common", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "6fbd05b0ad65b2a261fa154b34328a7f", "", "", "Boardgame Demo (20-12-2002) (CT)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "6ff4156d10b357f61f09820d03c0f852", "Atari", "CX2612 / 6699804 / 4975103", "Street Racer - Speedway II (1978) (Atari) [o1]", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "1", "", "", "", "33", "", "", "", "" },
{ "6ff4156d10b357f61f09820d03c0f852", "Atari", "CX2612 / 6699804 / 4975103", "Street Racer - Speedway II (1978) (Atari) [o1]", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "Yes", "", "", "", "33", "", "", "", "" },
{ "706e3cc4931f984447213b92d1417aff", "", "", "Joustpong (06-07-2002) (Kirk Israel) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "713095cd968b1aff45a2562ea4bbcbfe", "", "", "Image - Qb (16-02-2003) (TJ)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "718ee85ea7ec27d5bea60d11f6d40030", "Salu / Thomas Jentzsch", "", "Ghostbusters II (1992) (Salu) (NTSC by Thomas Jentzsch)", "", "New Release (Video Format Conversion)", "", "", "", "", "", "", "", "", "", "", "", "", "20", "242", "Yes", "", "" },
@ -936,7 +936,7 @@ static const char* DefProps[][23] = {
{ "d4942f4b55313ff269488527d84ce35c", "", "", "Ms. Pac-Man (1982) (Atari) (PAL) [a1][!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "64", "200", "", "", "" },
{ "d536a84d4e1f170305e17f7078296a50", "Starpath", "AR-4400", "Dragonstomper (1982) (Starpath) [a2]", "", "Extremely Rare", "", "AR", "", "", "", "", "", "", "", "", "8", "144", "39", "189", "", "", "" },
{ "d5aa7472e7f2cc17e893a1a36f8dadf0", "", "", "Overhead Adventure Demo 5 (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "64", "180", "", "", "" },
{ "d62283aed0f4199adb2333de4c263e9c", "Atari", "CX2615", "Demons to Diamonds (1982) (Atari) (PAL) [!]", "Uses the Paddle Controllers (left only)", "Uncommon", "", "", "", "", "", "", "Paddles", "", "1", "PAL", "", "", "44", "229", "", "", "" },
{ "d62283aed0f4199adb2333de4c263e9c", "Atari", "CX2615", "Demons to Diamonds (1982) (Atari) (PAL) [!]", "Uses the Paddle Controllers (left only)", "Uncommon", "", "", "", "", "", "", "Paddles", "", "Yes", "PAL", "", "", "44", "229", "", "", "" },
{ "d69559f9c9dc6ef528d841bf9d91b275", "Activision", "AX-016", "Starmaster (1982) (Activision) [!]", "Use Color/BW switch to change between galactic chart and front views", "Uncommon", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "d763e3a9cdcdd56c715ec826106fab6a", "Activision", "AG-001", "Dragster (1980) (Activision) [o2]", "", "Uncommon", "", "", "", "", "", "", "", "", "", "", "", "", "27", "", "", "", "" },
{ "d7f5bf138cfc7feab7b8ef1534c8b477", "", "", "Eric Bergstrom's KC-135 (Radar Map) (Aaron Bergstrom)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -1421,7 +1421,7 @@ static const char* DefProps[][23] = {
{ "6041f400b45511aa3a69fab4b8fc8f41", "Apollo", "AP 2010", "Wabbit (1982) (Apollo) [!]", "", "Rare", "", "", "", "", "", "", "", "", "", "", "", "", "37", "194", "", "", "" },
{ "6058e40ce79d7434c7f7477b29abd4a5", "", "", "Rubik's Cube Demo (23-12-2002) (CT)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "60a61da9b2f43dd7e13a5093ec41a53d", "Venture Vision", "VV2001", "Rescue Terra I (1982) (Venture Vision)", "", "Extremely Rare", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "60e0ea3cbe0913d39803477945e9e5ec", "Atari", "CX2621", "Video Olympics (1978) (Atari)", "Uses the Paddle Controllers", "Common", "", "2K", "", "", "", "", "Paddles", "Paddles", "1", "", "", "", "30", "205", "", "", "" },
{ "60e0ea3cbe0913d39803477945e9e5ec", "Atari", "CX2621", "Video Olympics (1978) (Atari)", "Uses the Paddle Controllers", "Common", "", "2K", "", "", "", "", "Paddles", "Paddles", "Yes", "", "", "", "30", "205", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "615a3bf251a38eb6638cdc7ffbde5480", "Atari", "CX2674", "E.T. The Extra-Terrestrial (1982) (Atari) [!]", "", "Common", "", "", "", "", "", "", "", "", "", "", "", "", "", "190", "", "", "" },
{ "61728c6cfb052e62a9ed088c5bf407ba", "", "", "Sprite Demo 4 (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -1515,7 +1515,7 @@ static const char* DefProps[][23] = {
{ "76f66ce3b83d7a104a899b4b3354a2f2", "UA", "", "Cat Trax (1983) (UA)", "", "", "", "4K", "", "", "", "", "", "", "", "", "", "", "33", "200", "Yes", "", "" },
{ "7778ac65d775a079f537e97cbdad541c", "Activision", "AX-021", "Spider Fighter (1983) (Activision) [p1][!]", "", "Uncommon", "", "4K", "", "", "", "", "", "", "", "PAL", "", "", "60", "", "", "", "" },
{ "77887e4192a6b0a781530e6cf9be7199", "Atari", "CX2604", "Space War (1978) (Atari) [b1]", "", "Uncommon", "", "", "", "", "", "", "", "", "", "", "", "", "", "200", "", "", "" },
{ "77d0a577636e1c9212aeccde9d0baa4b", "Atari", "CX2621", "Video Olympics (1978) (Atari) (PAL) [!]", "Uses the Paddle Controllers", "Common", "", "2K", "", "", "", "", "Paddles", "Paddles", "1", "PAL", "", "", "56", "205", "", "", "" },
{ "77d0a577636e1c9212aeccde9d0baa4b", "Atari", "CX2621", "Video Olympics (1978) (Atari) (PAL) [!]", "Uses the Paddle Controllers", "Common", "", "2K", "", "", "", "", "Paddles", "Paddles", "Yes", "PAL", "", "", "56", "205", "", "", "" },
{ "7836794b79e8060c2b8326a2db74eef0", "", "", "RIOT RAM Test (26-11-2002) (Dennis Debro)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "78821ef76ebc3934850d1bc1b9e4f4b0", "", "", "Hot Action Pak - Ghostbusters, Tennis, Plaque Attack (1990) (HES) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "49", "214", "", "", "" },
{ "78c2de58e42cd1faac2ea7df783eaeb3", "", "", "Fu Kung! (V0.07) (25-01-2003) (AD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -1776,7 +1776,7 @@ static const char* DefProps[][23] = {
{ "bf976cf80bcf52c5f164c1d45f2b316b", "Atari", "CX2656", "SwordQuest - Fireworld (1982) (Atari) (PAL) [!]", "", "Common", "", "", "", "", "", "", "", "", "", "PAL", "", "", "64", "195", "", "", "" },
{ "bfb7850e3ca39f417f8e4bd5ae39f24b", "", "", "Excalibur Demo (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "bff8f8f53a8aeb1ee804004ccbb08313", "", "", "Droid Demo 22 (David Conrad Schweinsberg) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "8", "152", "42", "196", "", "", "" },
{ "c00b65d1bae0aef6a1b5652c9c2156a1", "Atari", "CX2621", "Video Olympics (1978) (Atari) [o1]", "Uses the Paddle Controllers", "Common", "", "2K", "", "", "", "", "Paddles", "Paddles", "1", "", "", "", "30", "205", "", "", "" },
{ "c00b65d1bae0aef6a1b5652c9c2156a1", "Atari", "CX2621", "Video Olympics (1978) (Atari) [o1]", "Uses the Paddle Controllers", "Common", "", "2K", "", "", "", "", "Paddles", "Paddles", "Yes", "", "", "", "30", "205", "", "", "" },
{ "c033dc1d7b6fde41b9cadce9638909bb", "", "", "Skeleton (V1.1) (06-09-2002) (Eric Ball)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "c126656df6badfa519cc63e681fb3596", "", "", "Space Invaders (2002) (Ron Corcoran) (Space Invaders Hack)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "c17bdc7d14a36e10837d039f43ee5fa3", "Spectravision", "SA-203", "Cross Force (1982) (Spectravision)", "", "Rare", "", "", "", "", "", "", "", "", "", "", "", "", "27", "", "", "", "" },
@ -1811,7 +1811,7 @@ static const char* DefProps[][23] = {
{ "c866c995c0d2ca7d017fef0fc0c2e268", "Retroactive", "", "Qb (2.00) (Retroactive) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "6", "", "Yes", "", "" },
{ "c8fa5d69d9e555eb16068ef87b1c9c45", "CBS Electronics", "2653", "Donkey Kong Junior (Coleco)", "", "Rare", "", "", "", "", "", "", "", "", "", "", "", "", "35", "", "", "", "" },
{ "c9b7afad3bfd922e006a6bfc1d4f3fe7", "Atari", "CX2628 / 6699842 / 4975117", "Bowling (1978) (Atari) [!]", "", "Common", "", "", "", "", "", "", "", "", "", "", "", "", "37", "220", "", "", "" },
{ "c9f6e521a49a2d15dac56b6ddb3fb4c7", "Parker Bros", "PB5000", "Star Wars - Jedi Arena (1983) (Parker Bros)", "Uses the Paddle Controllers", "Rare", "", "4K", "", "", "", "", "Paddles", "Paddles", "1", "", "8", "144", "31", "199", "", "", "" },
{ "c9f6e521a49a2d15dac56b6ddb3fb4c7", "Parker Bros", "PB5000", "Star Wars - Jedi Arena (1983) (Parker Bros)", "Uses the Paddle Controllers", "Rare", "", "4K", "", "", "", "", "Paddles", "Paddles", "Yes", "", "8", "144", "31", "199", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "ca50cc4b21b0155255e066fcd6396331", "Starsoft", "", "Raumpatrouille (Starsoft) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "61", "220", "Yes", "", "" },
{ "ca7aaebd861a9ef47967d31c5a6c4555", "Atari", "", "Home Run (32-in-1) (Atari) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "8", "152", "61", "220", "", "", "" },
@ -1858,7 +1858,7 @@ static const char* DefProps[][23] = {
{ "d3423d7600879174c038f53e5ebbf9d3", "US Games", "VC 2005", "Piece o' Cake (1982) (US Games) [!]", "Uses the Paddle Controllers", "Extremely Rare", "", "", "", "", "", "", "Paddles", "", "", "", "", "", "", "", "", "", "" },
{ "d34b933660e29c0a0a04004f15d7e160", "", "", "Multi-Color Demo 5 (Bob Colbert) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "d39e29b03af3c28641084dd1528aae05", "Goliath-Funvision", "", "Spider Kong (AKA Karate) (Goliath-Funvision) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "54", "", "", "", "" },
{ "d45ebf130ed9070ea8ebd56176e48a38", "Sega", "001-01", "Tac Scan (1983) (Sega) [!]", "Uses the Paddle Controllers (right only)", "Uncommon", "", "4K", "", "", "", "", "", "Paddles", "3", "", "8", "152", "44", "202", "Yes", "", "" },
{ "d45ebf130ed9070ea8ebd56176e48a38", "Sega", "001-01", "Tac Scan (1983) (Sega) [!]", "Uses the Paddle Controllers (right only)", "Uncommon", "", "4K", "", "", "", "Yes", "", "Paddles", "Yes", "", "8", "152", "44", "202", "Yes", "", "" },
{ "d483f65468d9a265661917bae1a54f3e", "Joe Grand", "", "SCSIcide Pre-release 3 (Joe Grand)", "", "New Release", "", "", "", "", "", "", "Paddles", "Paddles", "", "", "", "", "", "", "", "", "" },
{ "d49aff83f77a1b9041ad7185df3c2277", "", "", "Space Treat (60% complete) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "d4aa89e96d2902692f5c45f36903d336", "", "", "Euchre (NTSC) (Erik Eid) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -2013,7 +2013,7 @@ static const char* DefProps[][23] = {
{ "f825c538481f9a7a46d1e9bc06200aaf", "Atari", "CX2635 / 4975157", "Maze Craze (1978) (Atari)", "", "Uncommon", "", "", "", "", "", "", "", "", "", "", "", "", "52", "175", "", "", "" },
{ "f8648d0c6ad1266434f6c485ff69ec40", "CCE", "", "Oink! (CCE)", "", "", "", "4K", "", "", "", "", "", "", "", "", "8", "144", "41", "194", "", "", "" },
{ "f8c1c4a41303bd40b0d6c81bfaf8573b", "", "", "2 Pak Special Blue - Dungeon Master,Creature Strike (1992) (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "42", "240", "", "", "" },
{ "f91fb8da3223b79f1c9a07b77ebfa0b2", "", "CX2615 / 4975140", "Demons to Diamonds (1982)", "Uses the Paddle Controllers (left only)", "Uncommon", "", "", "", "", "", "", "Paddles", "", "1", "", "", "", "35", "195", "", "", "" },
{ "f91fb8da3223b79f1c9a07b77ebfa0b2", "", "CX2615 / 4975140", "Demons to Diamonds (1982)", "Uses the Paddle Controllers (left only)", "Uncommon", "", "", "", "", "", "", "Paddles", "", "Yes", "", "", "", "35", "195", "", "", "" },
{ "f9655ed51462ecfc690c7b97cec649f9", "Andrew Wallace", "", "Laseresal 2002 (PAL) (PD)", "", "New Release", "", "", "", "", "", "", "", "", "", "PAL", "", "", "47", "218", "", "", "" },
{ "f9677b2ec8728a703eb710274474613d", "Atari", "CX2604", "Space War (1978) (Atari) (PAL) [!]", "", "Uncommon", "", "", "", "", "", "", "", "", "", "PAL", "", "", "60", "202", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -2051,7 +2051,7 @@ static const char* DefProps[][23] = {
{ "fe870018332a0221eb59fb18b0c6bccc", "", "", "Incoming (08-11-2002) (Ben Larson) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "feba8686fd0376015258d1152923958a", "", "", "Super Circus (PAL) [!]", "", "", "", "", "", "", "", "", "", "", "", "PAL", "", "", "63", "192", "", "", "" },
{ "fece458a8023a809a5006867feca40e8", "", "", "SCSIcide (24-02-2001) (Joe Grand) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "feedcc20bc3ca34851cd5d9e38aa2ca6", "", "CX2607 / 6699828 / 4975115", "Canyon Bomber (1978) (Atari) [!]", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "1", "", "", "", "47", "195", "", "", "" },
{ "feedcc20bc3ca34851cd5d9e38aa2ca6", "", "CX2607 / 6699828 / 4975115", "Canyon Bomber (1978) (Atari) [!]", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "Yes", "", "", "", "47", "195", "", "", "" },
{ "ff7627207e8aa03730c35c735a82c26c", "Atari", "", "Blackjack (32-in-1) (Atari) (PAL) [!]", "Uses the Paddle Controllers", "", "", "", "", "", "", "", "Paddles", "", "", "PAL", "", "", "64", "", "", "", "" },
{ "ffb1cd548563158ce33f9d10268187e7", "Erik Eid", "", "Euchre (Beta) (NTSC) (12-09-2002) (Erik Eid)", "", "New Release", "", "4K", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "ffe51989ba6da2c6ae5a12d277862e16", "Atari", "CX2627 / 6699841", "Human Cannonball (AKA Cannon Man) (1978) (Atari) [o1]", "", "Uncommon", "", "", "", "", "", "", "", "", "", "", "8", "152", "", "", "", "", "" },
@ -2533,7 +2533,7 @@ static const char* DefProps[][23] = {
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "392d34c0498075dd58df0ce7cd491ea2", "Atari", "CX2686", "Quadrun (Atari)", "", "Extremely Rare", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "393948436d1f4cc3192410bb918f9724", "Activision", "AX-020", "River Raid (1982) (Activision) [a1][!]", "", "Uncommon", "", "4K", "", "", "", "", "", "", "", "", "8", "152", "", "203", "", "", "" },
{ "396f7bc90ab4fa4975f8c74abe4e81f0", "Atari", "CX2612 / 6699804 / 4975103", "Street Racer - Speedway II (1978) (Atari)", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "1", "", "", "", "33", "211", "", "", "" },
{ "396f7bc90ab4fa4975f8c74abe4e81f0", "Atari", "CX2612 / 6699804 / 4975103", "Street Racer - Speedway II (1978) (Atari)", "Uses the Paddle Controllers", "Uncommon", "", "", "", "", "", "", "Paddles", "Paddles", "Yes", "", "", "", "33", "211", "", "", "" },
{ "39a6a5a2e1f6297cceaa48bb03af02e9", "", "", "Pitfall 2 Plus (Pitfall 2 Hack)", "", "", "", "", "", "", "", "", "", "", "", "", "8", "152", "41", "196", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -3539,7 +3539,7 @@ static const char* DefProps[][23] = {
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "bf5e2079586cb307bf5eb2413e2e61af", "", "", "Star Fire - 1LK Intro (13-11-2002) (TJ)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "bf84f528de44225dd733c0e6a8e400a0", "CCE", "", "Demons to Diamonds (1982) (CCE)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "Paddles", "", "1", "", "", "", "35", "195", "", "", "" },
{ "bf84f528de44225dd733c0e6a8e400a0", "CCE", "", "Demons to Diamonds (1982) (CCE)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "Paddles", "", "Yes", "", "", "", "35", "195", "", "", "" },
{ "bf9ddc5dd9056633d4ac0dac8b871dfe", "", "", "Star Fire - Cockpit View (10-10-2002) (MP)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
@ -3833,7 +3833,7 @@ static const char* DefProps[][23] = {
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "e0eff071f578ecf19edc2ab276644e46", "", "", "Gas Gauge Demo (2001) (Joe Grand) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "e12e32dee68201b6765fcd0ed54d6646", "Atari", "CX2612 / 6699804 / 4975103", "Street Racer - Speedway II (1978) (Atari) (PAL) [!]", "Uses the Paddle Controllers", "", "", "", "", "", "", "", "Paddles", "Paddles", "1", "PAL", "", "", "36", "256", "", "", "" },
{ "e12e32dee68201b6765fcd0ed54d6646", "Atari", "CX2612 / 6699804 / 4975103", "Street Racer - Speedway II (1978) (Atari) (PAL) [!]", "Uses the Paddle Controllers", "", "", "", "", "", "", "", "Paddles", "Paddles", "Yes", "PAL", "", "", "36", "256", "", "", "" },
{ "e13c7627b2e136b9c449d9e8925b4547", "Atari", "CX2624", "Basketball (1978) (Atari) [o1]", "", "Common", "", "", "", "", "", "", "", "", "", "", "8", "152", "42", "193", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: EventHandler.cxx,v 1.181 2006-12-08 20:19:58 stephena Exp $
// $Id: EventHandler.cxx,v 1.182 2006-12-09 00:25:19 stephena Exp $
//============================================================================
#include <sstream>
@ -156,6 +156,7 @@ void EventHandler::initialize()
setActionMappings(kMenuMode);
myGrabMouseFlag = myOSystem->settings().getBool("grabmouse");
setPaddleMode(myOSystem->settings().getInt("paddle"), false);
setPaddleThreshold(myOSystem->settings().getInt("pthresh"));
}
@ -2188,6 +2189,8 @@ void EventHandler::setPaddleMode(int num, bool showmessage)
buf << "Mouse is paddle " << num;
myOSystem->frameBuffer().showMessage(buf.str());
}
myOSystem->settings().setInt("paddle", myPaddleMode);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,18 +13,55 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Paddles.cxx,v 1.5 2006-12-08 16:49:27 stephena Exp $
// $Id: Paddles.cxx,v 1.6 2006-12-09 00:25:19 stephena Exp $
//============================================================================
#include <assert.h>
#include "Event.hxx"
#include "Paddles.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Paddles::Paddles(Jack jack, const Event& event)
: Controller(jack, event)
Paddles::Paddles(Jack jack, const Event& event, bool swap)
: Controller(jack, event)
{
myType = Controller::Paddles;
// Swap the paddle events, from paddle 0 <=> 1 and paddle 2 <=> 3
if(!swap)
{
// Pin Three
myPinEvents[0][0] = Event::PaddleOneFire;
myPinEvents[0][1] = Event::PaddleThreeFire;
// Pin Four
myPinEvents[1][0] = Event::PaddleZeroFire;
myPinEvents[1][1] = Event::PaddleTwoFire;
// Pin Five
myPinEvents[2][0] = Event::PaddleOneResistance;
myPinEvents[2][1] = Event::PaddleThreeResistance;
// Pin Nine
myPinEvents[3][0] = Event::PaddleZeroResistance;
myPinEvents[3][1] = Event::PaddleTwoResistance;
}
else
{
// Pin Three (swapped)
myPinEvents[0][0] = Event::PaddleZeroFire;
myPinEvents[0][1] = Event::PaddleTwoFire;
// Pin Four (swapped)
myPinEvents[1][0] = Event::PaddleOneFire;
myPinEvents[1][1] = Event::PaddleThreeFire;
// Pin Five (swapped)
myPinEvents[2][0] = Event::PaddleZeroResistance;
myPinEvents[2][1] = Event::PaddleTwoResistance;
// Pin Nine (swapped)
myPinEvents[3][0] = Event::PaddleOneResistance;
myPinEvents[3][1] = Event::PaddleThreeResistance;
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -38,12 +75,12 @@ bool Paddles::read(DigitalPin pin)
switch(pin)
{
case Three:
return (myJack == Left) ? (myEvent.get(Event::PaddleOneFire) == 0) :
(myEvent.get(Event::PaddleThreeFire) == 0);
return (myJack == Left) ? (myEvent.get(myPinEvents[0][0]) == 0) :
(myEvent.get(myPinEvents[0][1]) == 0);
case Four:
return (myJack == Left) ? (myEvent.get(Event::PaddleZeroFire) == 0) :
(myEvent.get(Event::PaddleTwoFire) == 0);
return (myJack == Left) ? (myEvent.get(myPinEvents[1][0]) == 0) :
(myEvent.get(myPinEvents[1][1]) == 0);
default:
// Other pins are not connected (floating high)
@ -57,12 +94,12 @@ Int32 Paddles::read(AnalogPin pin)
switch(pin)
{
case Five:
return (myJack == Left) ? myEvent.get(Event::PaddleOneResistance) :
myEvent.get(Event::PaddleThreeResistance);
return (myJack == Left) ? myEvent.get(myPinEvents[2][0]) :
myEvent.get(myPinEvents[2][1]);
case Nine:
return (myJack == Left) ? myEvent.get(Event::PaddleZeroResistance) :
myEvent.get(Event::PaddleTwoResistance);
return (myJack == Left) ? myEvent.get(myPinEvents[3][0]) :
myEvent.get(myPinEvents[3][1]);
default:
return maximumResistance;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Paddles.hxx,v 1.5 2006-12-08 16:49:27 stephena Exp $
// $Id: Paddles.hxx,v 1.6 2006-12-09 00:25:20 stephena Exp $
//============================================================================
#ifndef PADDLES_HXX
@ -26,7 +26,7 @@
The standard Atari 2600 pair of paddle controllers.
@author Bradford W. Mott
@version $Id: Paddles.hxx,v 1.5 2006-12-08 16:49:27 stephena Exp $
@version $Id: Paddles.hxx,v 1.6 2006-12-09 00:25:20 stephena Exp $
*/
class Paddles : public Controller
{
@ -34,10 +34,11 @@ class Paddles : public Controller
/**
Create a new pair of paddle controllers plugged into the specified jack
@param jack The jack the controller is plugged into
@param jack The jack the controller is plugged into
@param event The event object to use for events
@param swap Whether to swap the paddles plugged into this jack
*/
Paddles(Jack jack, const Event& event);
Paddles(Jack jack, const Event& event, bool swap);
/**
Destructor
@ -71,6 +72,11 @@ class Paddles : public Controller
@param value The value to write to the pin
*/
virtual void write(DigitalPin pin, bool value);
private:
// Used to implement paddle swapping efficiently, and eliminate
// testing at runtime
Event::Type myPinEvents[4][2];
};
#endif

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Props.cxx,v 1.16 2006-12-08 16:49:27 stephena Exp $
// $Id: Props.cxx,v 1.17 2006-12-09 00:25:20 stephena Exp $
//============================================================================
#include <cctype>
@ -66,6 +66,7 @@ void Properties::set(PropertyType key, const string& value)
case Console_SwapPorts:
case Controller_Left:
case Controller_Right:
case Controller_SwapPaddles:
case Display_Format:
case Display_Phosphor:
case Emulation_HmoveBlanks:
@ -292,7 +293,7 @@ const char* Properties::ourDefaultProperties[LastPropType] = {
"NO", // Console.SwapPorts
"JOYSTICK", // Controller.Left
"JOYSTICK", // Controller.Right
"0", // Controller.PaddleNo
"NO", // Controller.SwapPaddles
"NTSC", // Display.Format
"0", // Display.XStart
"160", // Display.Width
@ -319,7 +320,7 @@ const char* Properties::ourPropertyNames[LastPropType] = {
"Console.SwapPorts",
"Controller.Left",
"Controller.Right",
"Controller.PaddleNo",
"Controller.SwapPaddles",
"Display.Format",
"Display.XStart",
"Display.Width",

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Props.hxx,v 1.12 2006-12-08 16:49:27 stephena Exp $
// $Id: Props.hxx,v 1.13 2006-12-09 00:25:20 stephena Exp $
//============================================================================
#ifndef PROPERTIES_HXX
@ -36,7 +36,7 @@ enum PropertyType {
Console_SwapPorts,
Controller_Left,
Controller_Right,
Controller_PaddleNo,
Controller_SwapPaddles,
Display_Format,
Display_XStart,
Display_Width,
@ -57,7 +57,7 @@ enum PropertyType {
if the property key is not found in the original property list.
@author Bradford W. Mott
@version $Id: Props.hxx,v 1.12 2006-12-08 16:49:27 stephena Exp $
@version $Id: Props.hxx,v 1.13 2006-12-09 00:25:20 stephena Exp $
*/
class Properties
{

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Settings.cxx,v 1.94 2006-12-08 16:49:28 stephena Exp $
// $Id: Settings.cxx,v 1.95 2006-12-09 00:25:20 stephena Exp $
//============================================================================
#include <cassert>
@ -61,9 +61,9 @@ Settings::Settings(OSystem* osystem)
setInternal("joymap", "");
setInternal("joyaxismap", "");
setInternal("joyhatmap", "");
setInternal("paddle", "0");
setInternal("sa1", "left");
setInternal("sa2", "right");
setInternal("joymouse", "false");
setInternal("p0speed", "50");
setInternal("p1speed", "50");
setInternal("p2speed", "50");
@ -252,6 +252,10 @@ void Settings::validate()
s != "HQ2x" && s != "HQ3x" && s != "HQ4x")
setInternal("scale_tia", "Zoom1x");
i = getInt("paddle");
if(i < 0 || i > 3)
setInternal("paddle", "0");
i = getInt("pthresh");
if(i < 400)
setInternal("pthresh", "400");

View File

@ -515,7 +515,7 @@
"Cartridge.Type" "4K"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Format" "PAL"
"Display.Height" "199"
"Display.Width" "144"
@ -4123,7 +4123,7 @@
"Cartridge.Note" "Uses the Paddle Controllers"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "195"
"Display.YStart" "47"
""
@ -4990,7 +4990,7 @@
"Cartridge.Rarity" "Uncommon"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "211"
"Display.YStart" "33"
""
@ -7960,7 +7960,7 @@
"Cartridge.Type" "2K"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "205"
"Display.YStart" "30"
""
@ -9237,7 +9237,7 @@
"Cartridge.Rarity" "Uncommon"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.YStart" "33"
""
@ -9919,7 +9919,7 @@
"Cartridge.Type" "2K"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Format" "PAL"
"Display.Height" "205"
"Display.YStart" "56"
@ -15276,7 +15276,7 @@
"Cartridge.Manufacturer" "CCE"
"Cartridge.Note" "Uses the Paddle Controllers (left only)"
"Controller.Left" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "195"
"Display.YStart" "35"
""
@ -15390,7 +15390,7 @@
"Cartridge.Type" "2K"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "205"
"Display.YStart" "30"
""
@ -16175,7 +16175,7 @@
"Cartridge.Type" "4K"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "199"
"Display.Width" "144"
"Display.XStart" "8"
@ -17144,8 +17144,9 @@
"Cartridge.Note" "Uses the Paddle Controllers (right only)"
"Cartridge.Rarity" "Uncommon"
"Cartridge.Type" "4K"
"Console.SwapPorts" "Yes"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "3"
"Controller.SwapPaddles" "Yes"
"Display.Height" "202"
"Display.Width" "152"
"Display.XStart" "8"
@ -17297,7 +17298,7 @@
"Cartridge.Note" "Uses the Paddle Controllers (left only)"
"Cartridge.Rarity" "Uncommon"
"Controller.Left" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Format" "PAL"
"Display.Height" "229"
"Display.YStart" "44"
@ -18210,7 +18211,7 @@
"Cartridge.Note" "Uses the Paddle Controllers"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Format" "PAL"
"Display.Height" "256"
"Display.YStart" "36"
@ -20253,7 +20254,7 @@
"Cartridge.Note" "Uses the Paddle Controllers (left only)"
"Cartridge.Rarity" "Uncommon"
"Controller.Left" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "195"
"Display.YStart" "35"
""
@ -20822,7 +20823,7 @@
"Cartridge.Note" "Uses the Paddle Controllers"
"Controller.Left" "Paddles"
"Controller.Right" "Paddles"
"Controller.PaddleNo" "1"
"Controller.SwapPaddles" "Yes"
"Display.Height" "195"
"Display.YStart" "47"
""

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: GameInfoDialog.cxx,v 1.31 2006-12-08 16:49:34 stephena Exp $
// $Id: GameInfoDialog.cxx,v 1.32 2006-12-09 00:25:20 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -138,7 +138,7 @@ GameInfoDialog::GameInfoDialog(
myLeftDiff->appendEntry("A", 2);
wid.push_back(myLeftDiff);
ypos += lineHeight + 3;
ypos += lineHeight + 5;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Right Difficulty:", kTextAlignLeft);
myRightDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
@ -147,7 +147,7 @@ GameInfoDialog::GameInfoDialog(
myRightDiff->appendEntry("A", 2);
wid.push_back(myRightDiff);
ypos += lineHeight + 3;
ypos += lineHeight + 5;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"TV Type:", kTextAlignLeft);
myTVType = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
@ -156,7 +156,7 @@ GameInfoDialog::GameInfoDialog(
myTVType->appendEntry("B & W", 2);
wid.push_back(myTVType);
ypos += lineHeight + 3;
ypos += lineHeight + 5;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Swap ports:", kTextAlignLeft);
mySwapPorts = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
@ -184,7 +184,7 @@ GameInfoDialog::GameInfoDialog(
myLeftController->appendEntry(ourControllerList[i][0], i+1);
wid.push_back(myLeftController);
ypos += lineHeight + 3;
ypos += lineHeight + 5;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Right Controller:", kTextAlignLeft);
myRightController = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
@ -193,6 +193,17 @@ GameInfoDialog::GameInfoDialog(
myRightController->appendEntry(ourControllerList[i][0], i+1);
wid.push_back(myRightController);
ypos += lineHeight + 5;
pwidth = font.getStringWidth("Yes");
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Swap Paddles:", kTextAlignLeft);
mySwapPaddles = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, "", 0, 0);
mySwapPaddles->appendEntry("Yes", 1);
mySwapPaddles->appendEntry("No", 2);
wid.push_back(mySwapPaddles);
// Add items for tab 2
addToFocusList(wid, tabID);
@ -418,6 +429,14 @@ void GameInfoDialog::loadView()
i = (i == 5) ? 0: i + 1;
myRightController->setSelectedTag(i);
s = myGameProperties.get(Controller_SwapPaddles);
if(s == "YES")
mySwapPaddles->setSelectedTag(1);
else if(s == "NO")
mySwapPaddles->setSelectedTag(2);
else
mySwapPaddles->setSelectedTag(0);
// Display properties
s = myGameProperties.get(Display_Format);
if(s == "NTSC")
@ -544,6 +563,10 @@ void GameInfoDialog::saveConfig()
}
}
tag = mySwapPaddles->getSelectedTag();
s = (tag == 1) ? "Yes" : "No";
myGameProperties.set(Controller_SwapPaddles, s);
// Display properties
tag = myFormat->getSelectedTag();
s = (tag == 3) ? "PAL60" : (tag == 2) ? "PAL" : "NTSC";

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: GameInfoDialog.hxx,v 1.19 2006-12-08 16:49:34 stephena Exp $
// $Id: GameInfoDialog.hxx,v 1.20 2006-12-09 00:25:20 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -75,6 +75,7 @@ class GameInfoDialog : public Dialog, public CommandSender
// Controller properties
PopUpWidget* myLeftController;
PopUpWidget* myRightController;
PopUpWidget* mySwapPaddles;
// Display properties
PopUpWidget* myFormat;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: InputDialog.cxx,v 1.18 2006-12-08 16:49:35 stephena Exp $
// $Id: InputDialog.cxx,v 1.19 2006-12-09 00:25:20 stephena Exp $
//============================================================================
// FIXME - this whole dialog should be a dialog of buttons instead of
@ -119,11 +119,21 @@ void InputDialog::addVDeviceTab(const GUI::Font& font)
myRightPort->appendEntry("right virtual port", 2);
wid.push_back(myRightPort);
// Add 'paddle threshhold' setting
// Add 'mouse to paddle' mapping
ypos += 2*lineHeight;
lwidth = font.getStringWidth("Paddle threshold: ");
pwidth = font.getMaxCharWidth() * 5;
xpos = 5; ypos += 2*lineHeight + 3;
myPaddleMode = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
"Mouse is paddle: ", lwidth, kPaddleChanged);
myPaddleMode->setMinValue(0); myPaddleMode->setMaxValue(3);
xpos += myPaddleMode->getWidth() + 5;
myPaddleModeLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft);
myPaddleModeLabel->setFlags(WIDGET_CLEARBG);
wid.push_back(myPaddleMode);
// Add 'paddle threshhold' setting
xpos = 5; ypos += lineHeight + 3;
myPaddleThreshold = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
"Paddle threshold: ",
lwidth, kPaddleThreshChanged);
@ -198,6 +208,10 @@ void InputDialog::loadConfig()
int rport = sa2 == "right" ? 2 : 1;
myRightPort->setSelectedTag(rport);
// Paddle mode
myPaddleMode->setValue(instance()->settings().getInt("paddle"));
myPaddleModeLabel->setLabel(instance()->settings().getString("paddle"));
// Paddle threshold
myPaddleThreshold->setValue(instance()->settings().getInt("pthresh"));
myPaddleThresholdLabel->setLabel(instance()->settings().getString("pthresh"));
@ -223,6 +237,10 @@ void InputDialog::saveConfig()
string sa2 = myRightPort->getSelectedTag() == 2 ? "right" : "left";
instance()->eventHandler().mapStelladaptors(sa1, sa2);
// Paddle mode
int mode = myPaddleMode->getValue();
instance()->eventHandler().setPaddleMode(mode);
// Paddle threshold
int threshold = myPaddleThreshold->getValue();
instance()->eventHandler().setPaddleThreshold(threshold);
@ -296,6 +314,10 @@ void InputDialog::handleCommand(CommandSender* sender, int cmd,
close();
break;
case kPaddleChanged:
myPaddleModeLabel->setValue(myPaddleMode->getValue());
break;
case kPaddleThreshChanged:
myPaddleThresholdLabel->setValue(myPaddleThreshold->getValue());
break;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: InputDialog.hxx,v 1.11 2006-12-08 16:49:35 stephena Exp $
// $Id: InputDialog.hxx,v 1.12 2006-12-09 00:25:20 stephena Exp $
//============================================================================
#ifndef INPUT_DIALOG_HXX
@ -53,6 +53,7 @@ class InputDialog : public Dialog
private:
enum {
kPaddleChanged = 'PDch',
kPaddleThreshChanged = 'PDth',
kP0SpeedID = 100,
kP1SpeedID = 101,
@ -68,6 +69,8 @@ class InputDialog : public Dialog
PopUpWidget* myLeftPort;
PopUpWidget* myRightPort;
SliderWidget* myPaddleMode;
StaticTextWidget* myPaddleModeLabel;
SliderWidget* myPaddleThreshold;
StaticTextWidget* myPaddleThresholdLabel;
SliderWidget* myPaddleSpeed[4];

View File

@ -21,7 +21,7 @@ my %proptype = (
"Console.SwapPorts" => 11,
"Controller.Left" => 12,
"Controller.Right" => 13,
"Controller.PaddleNo" => 14,
"Controller.SwapPaddles" => 14,
"Display.Format" => 15,
"Display.XStart" => 16,
"Display.Width" => 17,
@ -47,7 +47,7 @@ my @prop_defaults = (
"NO",
"JOYSTICK",
"JOYSTICK",
"0",
"NO",
"NTSC",
"0",
"160",