mirror of
https://github.com/stella-emu/stella.git
synced 2026-10-11 22:29:55 +00:00
Converted Perl programs in src/tools to Python.
Left the Perl versions there for now, for extensive testing.
This commit is contained in:
@@ -41,6 +41,7 @@ src/**/*.vspx
|
||||
src/**/**.pdb
|
||||
Stella.xcscheme
|
||||
src/tools/fonts/*
|
||||
src/tools/__pycache__
|
||||
*.sym
|
||||
a.out
|
||||
*.json
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
associated UI items that allow to change state file location,
|
||||
including always putting it with the ROM (issue #1086).
|
||||
|
||||
* Converted Perl programs in src/tools to Python, and found/fixed
|
||||
some bugs in the process.
|
||||
|
||||
* Emulation accuracy:
|
||||
- Implemented more accurate RESMP0/RESMP1 behaviour (issue #213)
|
||||
- Implemented proper PA7 behaviour in M6532 (issue #108)
|
||||
|
||||
+10
-10
@@ -24,7 +24,7 @@
|
||||
#include "bspf.hxx"
|
||||
|
||||
/**
|
||||
This code is generated using the 'create_props.pl' script,
|
||||
This code is generated using the 'create_props.py' script,
|
||||
located in the src/tools directory. All properties changes
|
||||
should be made in stella.pro, and then this file should be
|
||||
regenerated and the application recompiled.
|
||||
@@ -839,7 +839,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "38de7b68379770b9bd3f7bf000136eb0", "Imagic, Mark Klein", "EIZ-003-04I", "Subterranea (1983) (Imagic) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "391764720140c432aec454a468f77a40", "Video Game Program", "", "Miss Pack Man (Video Game Program) (PAL)", "AKA Ms. Pac-Man", "", "", "", "", "{\"notes\":\"Vars valid at game over; cherries = var #4\",\"score_addresses\":[\"0xfa\",\"0xf9\",\"0xf8\"],\"score_digits\":6,\"special_bcd\":false,\"special_zero_based\":true,\"variations_address\":\"0xf7\",\"variations_count\":4,\"variations_zero_based\":true}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "Ms. Pac-Man (USA)" },
|
||||
{ "392d34c0498075dd58df0ce7cd491ea2", "Atari, Frank Hausman, Mimi Nyden, Steve Woita", "CX2686", "Quadrun (1983) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "http://www.atariprotos.com/2600/software/quadrun/quadrun.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "392f00fd1a074a3c15bc96b0a57d52a1", "Atari, Rob Fulop - Sears", "CX2633 - 49-75119", "Night Driver (1980) (Atari)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "12", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "392f00fd1a074a3c15bc96b0a57d52a1", "Atari, Rob Fulop - Sears", "CX2633 - 49-75119", "Night Driver (1980) (Atari)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "393948436d1f4cc3192410bb918f9724", "Activision, Carol Shaw", "AX-020, AX-020-04", "River Raid (1982) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "393e41ca8bdd35b52bf6256a968a9b89", "U.S. Games Corporation - Western Technologies, John Hall", "VC1012", "M.A.D. (1983) (U.S. Games)", "AKA Missile Intercept, Mutually Assured Destruction", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "3947eb7305b0c904256cdbc5c5956c0f", "Jone Yuan Telephonic Enterprise Co", "", "Lilly Adventure (Jone Yuan)", "2600 Screen Search Console", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
@@ -1136,7 +1136,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "4dbf47c7f5ac767a3b07843a530d29a5", "Ric Pryor", "", "Breaking News (2002) (Ric Pryor) (Hack)", "Hack of Bump 'n' Jump", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "4dcc7e7c2ec0738e26c817b9383091af", "", "", "Unknown Title (bin00026 (200110)) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "4dd6c7ab9ef77f2b4950d8fc7cd42ee1", "Retroactive", "", "Qb (V2.04) (Stella) (2001) (Retroactive)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "4df6124093ccb4f0b6c26a719f4b7706", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari) [a]", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "12", "12", "01 60", "", "", "", "", "" },
|
||||
{ "4df6124093ccb4f0b6c26a719f4b7706", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari) [a]", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "01 60", "", "", "", "", "" },
|
||||
{ "4df9d7352a56a458abb7961bf10aba4e", "", "", "Racing Car (Unknown)", "", "", "", "", "", "", "", "", "", "", "YES", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "4e01d9072c500331e65bb87c24020d3f", "Atari, Jerome Domurat, Howard Scott Warshaw", "CX26119", "Saboteur (06-15-1983) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "http://www.atariprotos.com/2600/software/saboteur/saboteur.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "4e02880beeb8dbd4da724a3f33f0971f", "Imagic, Michael Greene", "EIZ-002-04I", "Wing War (1983) (Imagic) (PAL)", "AKA Flap!", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
@@ -2239,7 +2239,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "9a01115206f32eb0b539c7e5a47ccafa", "Atari, Jerome Domurat, Steve Woita", "CX2699", "Taz (07-15-1983) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "http://www.atariprotos.com/2600/software/taz/taz.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "9a165c39af3f050fdee6583fdfcdc9be", "Zirok", "", "Mario Bros. (Zirok)", "", "", "", "", "", "{\"score_addresses\":[\"0x89\",\"0x8a\"],\"score_digits\":6,\"score_trailing_zeroes\":2,\"variations_address\":\"0x80\",\"variations_count\":8,\"variations_zero_based\":true}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "9a21fba9ee9794e0fadd7c7eb6be4e12", "Atari - Imagineering, Dan Kitchen", "CX26177", "Ikari Warriors (1991) (Atari)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "9a25b3cfe2bbb847b66a97282200cca2", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari) (4K)", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "12", "12", "01 60", "", "", "", "", "" },
|
||||
{ "9a25b3cfe2bbb847b66a97282200cca2", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari) (4K)", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "01 60", "", "", "", "", "" },
|
||||
{ "9a36d828f413fdd370faee2295cdb07b", "Thomas Jentzsch - AtariAge", "", "VROOM! (2021) (PlusROM) (PAL-60)", "Supports up to 8 players simultaneously", "Homebrew", "", "", "", "", "https://atariage.com/store/index.php?l=product_detail&p=1279", "", "", "", "", "", "PADDLES", "PADDLES", "QUADTARI", "PADDLES", "PADDLES", "", "", "", "", "PAL60", "", "", "", "" },
|
||||
{ "9a4274409216ff09ecde799f2a56ac73", "CCE", "C-801", "Mr. Postman (1983) (CCE) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "9ab72d3fd2cc1a0c9adb504502579037", "Epyx, Steven A. Baker, Peter Engelbrite", "80561-00286", "California Games (1987) (Epyx)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
@@ -2829,7 +2829,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "c6d48c6ae6461e0e82753540a985ac9e", "Ed Federmeyer", "", "Edtris (1994) (Ed Federmeyer)", "", "Extremely Rare", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Edtris 2600 (USA) (Unl)" },
|
||||
{ "c6d7fe7a46dc46f962fe8413c6f53fc9", "Parker Brothers, Mark Lesser", "PB5950", "Lord of the Rings (1983) (Parker Bros) (Prototype) [a]", "Journey to Rivendell (The Lord of the Rings I)", "Prototype", "", "", "", "", "http://www.atariprotos.com/2600/software/lotr/lotr.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Lord of the Rings, The - Journey to Rivendell (USA) (Proto)" },
|
||||
{ "c6db733e0b108c2580a1d65211f06dbf", "Atari, Eric Manghise, Mimi Nyden, Joseph Tung", "CX2640", "RealSports Baseball (07-09-1982) (Atari) (Prototype)", "", "Prototype", "", "", "", "", "http://www.atariprotos.com/2600/software/rsbaseball/rsbaseball.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "c738fc3f5aae1e8f86f7249f6c82ac81", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari) (16K)", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "12", "12", "01 60", "", "", "", "", "" },
|
||||
{ "c738fc3f5aae1e8f86f7249f6c82ac81", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari) (16K)", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "01 60", "", "", "", "", "" },
|
||||
{ "c73ae5ba5a0a3f3ac77f0a9e14770e73", "Starpath Corporation, Stephen H. Landrum", "9 AR-4105", "Official Frogger, The (1983) (Starpath)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "c745487828a1a6a743488ecebc55ad44", "Rainbow Vision - Suntek", "SS-002", "Galactic (1983) (Rainbow Vision) (PAL)", "AKA The Challenge of.... Nexar", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Challenge of.... Nexar, The (USA)" },
|
||||
{ "c74bfd02c7f1877bbe712c1da5c4c194", "Thomas Jentzsch", "", "River Raid Tanks (Thomas Jentzsch) (Hack)", "Hack of River Raid", "Hack", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "River Raid (USA)" },
|
||||
@@ -3051,7 +3051,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "d5f965c159e26a1fb49a22a47fbd1dd0", "Supergame", "", "River Raid II (Supergame)", "AKA River Raid", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "River Raid (USA)" },
|
||||
{ "d605ed12f4eaaaec3dcd5aa909a4bad7", "", "", "Chronocolor Frame Demo (10-01-2003) (Andrew Davie)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "d61629bbbe035f45552e31cef7d591b2", "", "", "Atari Logo Demo (PD) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "d62283aed0f4199adb2333de4c263e9c", "Atari, Alan J. Murphy, Nick 'Sandy Maiwald' Turner", "CX2615", "Demons to Diamonds (1982) (Atari) (PAL)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "12", "12", "10 57", "", "", "", "", "" },
|
||||
{ "d62283aed0f4199adb2333de4c263e9c", "Atari, Alan J. Murphy, Nick 'Sandy Maiwald' Turner", "CX2615", "Demons to Diamonds (1982) (Atari) (PAL)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "", "10 57", "", "", "", "", "" },
|
||||
{ "d62d7d1a974c31c5803f96a8c1552510", "", "", "StarMaster (Unknown) (PAL)", "Use Color/BW switch to change between galactic chart and front views", "", "", "", "", "{\"notes\":\"Score only calculated when game is over\",\"score_addresses\":[\"0xc1\",\"0xc2\"],\"variations_address\":\"0x80\",\"variations_count\":4,\"variations_zero_based\":true}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "d632b74fea533d593af82cf16e7c5e4a", "", "", "Fu Kung! (V0.13) (01-02-2003) (Andrew Davie)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "d65028524761ef52fbbdebab46f79d0f", "CCE", "", "Galaxian (CCE)", "", "", "", "", "", "{\"score_addresses\":[\"0xac\",\"0xad\",\"0xae\"],\"score_digits\":6,\"special_address\":\"0xaf\",\"special_label\":\"Wave\",\"variations_address\":\"0xb3\",\"variations_count\":9}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
@@ -3099,7 +3099,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "d9b49f0678776e04916fa5478685a819", "Activision, John Van Ryzin - Ariola", "EAZ-036-04, EAZ-036-04B, EAZ-036-04I - 711 036-720", "H.E.R.O. (1984) (Activision) (PAL)", "", "", "", "", "", "{\"score_addresses\":[\"0xb7\",\"0xb8\",\"0xb9\"],\"score_digits\":6,\"special_address\":\"0xf5\",\"special_bcd\":false,\"special_label\":\"Level\",\"special_zero_based\":true,\"variations_address\":\"0x80\",\"variations_count\":5,\"variations_zero_based\":true}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "d9bd343533b61389b270c0787210943b", "Atari, Douglas 'Solaris' Neubauer", "CX26134", "Last Starfighter (1984) (Atari) (Prototype) (Genesis)", "Genesis controller (C switches to map mode)", "Hack of Last Starfighter (Solaris prototype)", "", "", "", "{\"score_addresses\":[\"0xde\",\"0xdd\",\"0xdc\"],\"score_digits\":6,\"score_trailing_zeroes\":1,\"variations_count\":1}", "http://www.atariprotos.com/2600/software/tlsf/tlsf.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "d9c9cece2e769c7985494b1403a25721", "SOLID Corp. (D. Scott Williamson)", "CX2655*", "Star Castle 2600 (SolidCorp)", "", "Homebrew", "", "", "", "", "http://starcastle2600.blogspot.com/p/star-castle-2600-story.html", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "d9da2ae7c7894a29b43b3c6b79f3b7a2", "Atari, Rob Fulop", "CX2633, CX2633P", "Night Driver (1980) (Atari) (PAL) (4K)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "12", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "d9da2ae7c7894a29b43b3c6b79f3b7a2", "Atari, Rob Fulop", "CX2633, CX2633P", "Night Driver (1980) (Atari) (PAL) (4K)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "d9fbf1113114fb3a3c97550a0689f10f", "ZiMAG - Emag - Vidco", "713-111 - GN-050", "Pizza Chef (1983) (ZiMAG) (Prototype)", "AKA Pizza Time", "", "", "", "", "", "http://www.atariprotos.com/2600/software/pizzachef/pizzachef.htm", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "da0fb2a484d0d2d8f79d6e063c94063d", "", "", "Air Raiders (1982) (Unknown) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "da4e3396aa2db3bd667f83a1cb9e4a36", "Activision, Steve Cartwright", "AX-027", "Plaque Attack (1983) (Activision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
@@ -3490,7 +3490,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "f33f1d0f7819c74148dacb48cbf1c597", "Retroactive", "", "Qb (2.00) (Retroactive) (Stella)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "f344ac1279152157d63e64aa39479599", "Tigervision", "7-012", "Espial (1984) (Tigervision)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "f34dd3b8156aaf113cb621b2e51d90b8", "Joe Grand", "", "SCSIcide Pre-release 5 (Joe Grand)", "", "New Release", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "SCSIcide (USA) (Unl)" },
|
||||
{ "f34f08e5eb96e500e851a80be3277a56", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari)", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "12", "12", "01 60", "", "", "", "", "" },
|
||||
{ "f34f08e5eb96e500e851a80be3277a56", "Atari, Brad Stewart - Sears", "CX2622 - 6-99813, 49-75107", "Breakout (1978) (Atari)", "Uses the Paddle Controllers", "", "", "", "", "{\"notes\":\"Variations cannot be defined\",\"score_addresses\":[\"0xce\",\"0xcd\"],\"score_digits\":3,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "01 60", "", "", "", "", "" },
|
||||
{ "f367e58667a30e7482175809e3cec4d4", "ZiMAG - Emag - Vidco", "708-111 - GN-040", "Cosmic Corridor (1983) (ZiMAG)", "AKA Space Tunnel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Space Tunnel (Europe)" },
|
||||
{ "f38358cd8f5ecfedffd5aca1aa939f18", "Universal Gamex Corporation, Alan Roberts", "1005", "X-Man (1983) (Universal) [a]", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "f39e4bc99845edd8621b0f3c7b8c4fd9", "John Payson, Zach Matley, Bob Montgomery - AtariAge", "", "Toyshop Trouble (2006)", "F8 Emulator Release", "Homebrew", "", "", "", "", "https://atariage.com/store/index.php?l=product_detail&p=873", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
@@ -3505,7 +3505,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "f45644ff82b533a781a1ee50f2e95f3c", "", "", "Overhead Adventure Demo 6 (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "f457674cef449cfd85f21db2b4f631a7", "U.S. Games Corporation - JWDA, Todd Marshall, Wes Trager, Henry Will IV", "VC1004", "Commando Raid (1982) (U.S. Games)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "f473f99e47d4026a7a571184922ebf04", "Philip R. Frey", "", "Donkey Claus (Philip R. Frey) (Hack)", "Hack of Donkey Kong", "Hack", "", "", "", "{\"score_addresses\":[\"0x87\",\"0x88\"],\"score_digits\":6,\"score_trailing_zeroes\":2,\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "f48022230bb774a7f22184b48a3385af", "Atari, Rob Fulop - Sears", "CX2633 - 49-75119", "Night Driver (1980) (Atari) (4K)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "12", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "f48022230bb774a7f22184b48a3385af", "Atari, Rob Fulop - Sears", "CX2633 - 49-75119", "Night Driver (1980) (Atari) (4K)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "f48735115ec302ba8bb2d2f3a442e814", "", "", "Dancing Plate (Unknown) (PAL)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "f49a34f1fdd7dc147cbf96ce2ce71b76", "", "", "Qb (Special Edition) (PAL) (Retroactive)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "" },
|
||||
{ "f4a09f906cc37be31224433f576d77d3", "Thomas Jentzsch", "", "Challenge of... Nexar, The - Atari Trak-Ball Hack v1.2 (PAL) (Thomas Jentzsch)", "Uses Atari Trak-Ball Controller", "", "", "", "", "", "https://atariage.com/store/index.php?l=product_detail&p=1181", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Challenge of.... Nexar, The (USA)" },
|
||||
@@ -3676,7 +3676,7 @@ static constexpr BSPF::array2D<const char*, 3661, 30> DefProps = {{
|
||||
{ "feba8686fd0376015258d1152923958a", "", "", "Super Circus (Unknown) (PAL)", "AKA Circus Atari", "", "", "", "", "{\"score_addresses\":[\"0xaa\",\"0xab\"],\"variations_address\":\"0xa8\",\"variations_count\":8}", "", "", "", "", "", "JOYSTICK", "", "", "JOYSTICK", "", "", "", "", "", "", "", "", "", "", "Circus Atari (USA)" },
|
||||
{ "fec0c2e2ab0588ed20c750b58cf3baa3", "Activision - Cheshire Engineering, David Rolfe, Larry Zwick", "EAZ-037-04, EAZ-037-04I", "Beamrider (1984) (Activision) (PAL)", "", "Rare", "", "", "", "{\"score_addresses\":[\"0x8b\",\"0x8a\",\"0x89\"],\"score_digits\":6,\"special_address\":\"0x80\",\"special_label\":\"Sect.\",\"variations_count\":1}", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "fece458a8023a809a5006867feca40e8", "", "", "SCSIcide (24-02-2001) (Joe Grand) (PD)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
{ "feec54aac911887940b47fe8c9f80b11", "Atari, Rob Fulop", "CX2633, CX2633P", "Night Driver (1980) (Atari) (PAL)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "12", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "feec54aac911887940b47fe8c9f80b11", "Atari, Rob Fulop", "CX2633, CX2633P", "Night Driver (1980) (Atari) (PAL)", "Uses the Paddle Controllers (left only)", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AUTO 65", "", "", "YES", "", "" },
|
||||
{ "feedcc20bc3ca34851cd5d9e38aa2ca6", "Atari, David Crane - Sears", "CX2607 - 6-99828, 49-75115", "Canyon Bomber (1979) (Atari)", "Uses the Paddle Controllers", "", "", "", "", "", "", "", "", "", "", "PADDLES_IAXDR", "", "", "", "", "", "YES", "", "", "10", "", "", "", "", "" },
|
||||
{ "ff1523783e0e76a3b0d1f7f0d1cb3050", "Thomas Jentzsch", "", "Marble Craze - Atari Trak-Ball Hack v1.0 (PAL) (Thomas Jentzsch)", "Uses Atari Trak-Ball Controllers", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "YES", "", "Marble Craze (USA) (Unl)" },
|
||||
{ "ff3bd0c684f7144aeaa18758d8281a78", "Atari, Bob Whitehead", "CX2651", "Blackjack (1977) (Atari) (PAL)", "Uses the Paddle Controllers", "Rare", "", "", "", "", "", "", "", "", "", "PADDLES_IAXIS", "", "", "", "", "", "", "", "", "", "", "", "", "", "" },
|
||||
|
||||
Executable
+102
@@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Convert a Stella properties file (stella.pro) into the C++ DefProps.hxx header.
|
||||
|
||||
Python replacement for the old 'create_props.pl'. The property names, order
|
||||
and defaults are taken from src/emucore/Props.hxx (see propset.py), so this
|
||||
tool can never drift out of sync with the emulator.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Locate the 'propset' module next to this script (like Perl's FindBin)
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
import propset # noqa: E402
|
||||
|
||||
USAGE = """\
|
||||
create_props.py <INPUT properties file> <OUTPUT C++ header>
|
||||
|
||||
Convert the given properties file into a C++ compatible header file."""
|
||||
|
||||
HEADER = """\
|
||||
//============================================================================
|
||||
//
|
||||
// SSSS tt lll lll
|
||||
// SS SS tt ll ll
|
||||
// SS tttttt eeee ll ll aaaa
|
||||
// SSSS tt ee ee ll ll aa
|
||||
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
||||
// SS SS tt ee ll ll aa aa
|
||||
// SSSS ttt eeeee llll llll aaaaa
|
||||
//
|
||||
// Copyright (c) 1995-2026 by Bradford W. Mott, Stephen Anthony
|
||||
// and the Stella Team
|
||||
//
|
||||
// See the file "License.txt" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#ifndef DEF_PROPS_HXX
|
||||
#define DEF_PROPS_HXX
|
||||
|
||||
// Static analyzer can't tell the following is data
|
||||
// NOLINTBEGIN(modernize-raw-string-literal)
|
||||
|
||||
#include "bspf.hxx"
|
||||
|
||||
/**
|
||||
This code is generated using the 'create_props.py' script,
|
||||
located in the src/tools directory. All properties changes
|
||||
should be made in stella.pro, and then this file should be
|
||||
regenerated and the application recompiled.
|
||||
*/
|
||||
"""
|
||||
|
||||
|
||||
def _default_path(primary, fallback):
|
||||
# Saves having to type these paths every single time
|
||||
return primary if Path(primary).is_file() else fallback
|
||||
|
||||
|
||||
def main(argv):
|
||||
if len(argv) == 1 and argv[0] in ("-help", "--help", "-h"):
|
||||
print(USAGE)
|
||||
return 0
|
||||
|
||||
if len(argv) == 2:
|
||||
infile, outfile = argv[0], argv[1]
|
||||
elif len(argv) == 0:
|
||||
infile = _default_path("src/emucore/stella.pro", "../emucore/stella.pro")
|
||||
outfile = _default_path("src/emucore/DefProps.hxx", "../emucore/DefProps.hxx")
|
||||
else:
|
||||
print(USAGE)
|
||||
return 1
|
||||
|
||||
propset_map = propset.load_prop_set(infile)
|
||||
setsize = len(propset_map)
|
||||
typesize = propset.num_prop_types()
|
||||
|
||||
print(f"Valid properties found: {setsize}")
|
||||
|
||||
# Walk the map in md5sum order and build each row
|
||||
rows = [
|
||||
propset.build_prop_string(propset_map[key])
|
||||
for key in sorted(propset_map)
|
||||
]
|
||||
|
||||
with open(outfile, "w", encoding="utf-8") as out:
|
||||
out.write(HEADER)
|
||||
out.write(
|
||||
f"static constexpr BSPF::array2D<const char*, "
|
||||
f"{setsize}, {typesize}> DefProps = {{{{\n"
|
||||
)
|
||||
out.write(",\n".join(rows))
|
||||
out.write("\n}};\n")
|
||||
out.write("\n// NOLINTEND(modernize-raw-string-literal)\n\n")
|
||||
out.write("#endif // DEF_PROPS_HXX\n")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Merge a user properties file into the system properties file.
|
||||
|
||||
Python replacement for the old 'merge_props.pl'. For every entry that exists
|
||||
in both files, the entry is removed from the user file and overwritten in the
|
||||
system file.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Locate the 'propset' module next to this script (like Perl's FindBin)
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
import propset # noqa: E402
|
||||
|
||||
USAGE = """\
|
||||
merge_props.py <USER properties file> <SYSTEM properties file>
|
||||
|
||||
Scan both properties files, and for every entry found in both files,
|
||||
remove it from the USER file and overwrite it in the SYSTEM file."""
|
||||
|
||||
|
||||
def main(argv):
|
||||
if len(argv) == 1 and argv[0] in ("-help", "--help", "-h"):
|
||||
print(USAGE)
|
||||
return 0
|
||||
|
||||
if len(argv) == 2:
|
||||
usr_file, sys_file = argv[0], argv[1]
|
||||
elif len(argv) == 0:
|
||||
# Saves having to type these paths every single time
|
||||
usr_file = str(Path.home() / ".config" / "stella" / "stella.pro")
|
||||
sys_file = "src/emucore/stella.pro"
|
||||
else:
|
||||
print(USAGE)
|
||||
return 1
|
||||
|
||||
print(usr_file)
|
||||
|
||||
usr_propset = propset.load_prop_set(usr_file)
|
||||
sys_propset = propset.load_prop_set(sys_file)
|
||||
|
||||
print()
|
||||
print(f"Valid properties found in user file: {len(usr_propset)}")
|
||||
print(f"Valid properties found in system file: {len(sys_propset)}")
|
||||
|
||||
# Move every entry present in both files from the user file into the system file
|
||||
for key in list(usr_propset):
|
||||
if key in sys_propset:
|
||||
sys_propset[key] = usr_propset.pop(key)
|
||||
|
||||
print()
|
||||
print(f"Updated properties found in user file: {len(usr_propset)}")
|
||||
print(f"Updated properties found in system file: {len(sys_propset)}")
|
||||
print()
|
||||
|
||||
# Write both files back to disk
|
||||
propset.save_prop_set(usr_file, usr_propset)
|
||||
propset.save_prop_set(sys_file, sys_propset)
|
||||
|
||||
if input("\nRun create_props [yN]: ").strip() == "y":
|
||||
script = Path(__file__).resolve().parent / "create_props.py"
|
||||
os.system(f'"{sys.executable}" "{script}"')
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
@@ -0,0 +1,225 @@
|
||||
"""Property-set helpers for the Stella ROM properties tooling.
|
||||
|
||||
This module is the Python replacement for the old 'PropSet.pm'. It loads,
|
||||
saves and serializes the ROM properties used by 'create_props.py' and
|
||||
'merge_props.py'.
|
||||
|
||||
Single source of truth
|
||||
----------------------
|
||||
The property *names*, their *order* and their *default values* are not
|
||||
duplicated here. Instead they are parsed directly from the canonical C++
|
||||
definition in 'src/emucore/Props.hxx'. That header already has to declare
|
||||
the 'PropType' enum, the 'ourPropertyNames' table and the
|
||||
'ourDefaultProperties' table for the emulator itself, so reusing it means the
|
||||
tooling can never silently drift out of sync with the code (which is exactly
|
||||
what used to happen with the hand-maintained tables in PropSet.pm).
|
||||
|
||||
On import this module also *validates* that the four related structures in
|
||||
Props.hxx agree with each other:
|
||||
|
||||
* 'enum class PropType' - the canonical order
|
||||
* 'ourPropertyNames' - name strings, in PropType order
|
||||
* 'ourDefaultProperties' - default values, in PropType order
|
||||
* 'ourNameToPropType' - the case-insensitively sorted lookup table
|
||||
|
||||
If any of them fall out of alignment, import fails with a clear error rather
|
||||
than producing a subtly wrong DefProps.hxx.
|
||||
"""
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Parsing of src/emucore/Props.hxx (the single source of truth)
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Matches a single C++ string literal, honouring backslash escapes. The
|
||||
# captured group is the raw literal contents (escapes left intact), which is
|
||||
# exactly what we want to compare against / emit verbatim.
|
||||
_STRING_RE = re.compile(r'"((?:[^"\\]|\\.)*)"')
|
||||
|
||||
|
||||
def _find_props_hxx():
|
||||
"""Locate src/emucore/Props.hxx relative to this script's location."""
|
||||
here = Path(__file__).resolve().parent # .../src/tools
|
||||
candidate = here.parent / "emucore" / "Props.hxx" # .../src/emucore/Props.hxx
|
||||
if candidate.is_file():
|
||||
return candidate
|
||||
raise FileNotFoundError(
|
||||
f"Could not locate Props.hxx (looked for {candidate}). "
|
||||
"Run the tool from within the Stella source tree."
|
||||
)
|
||||
|
||||
|
||||
def _extract_array_block(text, marker):
|
||||
"""Return the text between the '{{' and matching '}}' following 'marker'."""
|
||||
start = text.find(marker)
|
||||
if start < 0:
|
||||
raise ValueError(f"'{marker}' not found in Props.hxx")
|
||||
open_pos = text.find("{{", start)
|
||||
if open_pos < 0:
|
||||
raise ValueError(f"opening '{{{{' for '{marker}' not found in Props.hxx")
|
||||
close_pos = text.find("}}", open_pos)
|
||||
if close_pos < 0:
|
||||
raise ValueError(f"closing '}}}}' for '{marker}' not found in Props.hxx")
|
||||
return text[open_pos + 2:close_pos]
|
||||
|
||||
|
||||
def _extract_enum(text):
|
||||
"""Return the PropType enumerators in declaration order, sans 'NumTypes'."""
|
||||
m = re.search(r'enum\s+class\s+PropType\s*:\s*\w+\s*\{(.*?)\}', text, re.DOTALL)
|
||||
if not m:
|
||||
raise ValueError("'enum class PropType' not found in Props.hxx")
|
||||
names = []
|
||||
for token in m.group(1).split(","):
|
||||
# strip trailing line comments and whitespace
|
||||
token = token.split("//", 1)[0].strip()
|
||||
if token:
|
||||
names.append(token)
|
||||
if not names or names[-1] != "NumTypes":
|
||||
raise ValueError("PropType enum did not end with 'NumTypes' as expected")
|
||||
return names[:-1]
|
||||
|
||||
|
||||
def _parse_props_hxx():
|
||||
"""Parse Props.hxx and return (names, defaults) as parallel lists.
|
||||
|
||||
Also cross-validates the enum, name table, default table and lookup table
|
||||
so that an inconsistent edit to Props.hxx is caught immediately.
|
||||
"""
|
||||
path = _find_props_hxx()
|
||||
text = path.read_text(encoding="utf-8")
|
||||
|
||||
enum_names = _extract_enum(text)
|
||||
names = _STRING_RE.findall(_extract_array_block(text, "ourPropertyNames"))
|
||||
defaults = _STRING_RE.findall(_extract_array_block(text, "ourDefaultProperties"))
|
||||
|
||||
n = len(enum_names)
|
||||
if not (len(names) == n and len(defaults) == n):
|
||||
raise ValueError(
|
||||
f"Props.hxx tables disagree in length: enum={n}, "
|
||||
f"ourPropertyNames={len(names)}, ourDefaultProperties={len(defaults)}"
|
||||
)
|
||||
|
||||
# The enumerator 'Cart_MD5' must correspond to the name 'Cart.MD5', etc.
|
||||
for i, (enum_name, prop_name) in enumerate(zip(enum_names, names)):
|
||||
if prop_name.replace(".", "_") != enum_name:
|
||||
raise ValueError(
|
||||
f"Props.hxx entry {i} mismatch: enum '{enum_name}' "
|
||||
f"vs name '{prop_name}'"
|
||||
)
|
||||
|
||||
_validate_name_to_proptype(text, names)
|
||||
|
||||
return names, defaults
|
||||
|
||||
|
||||
def _validate_name_to_proptype(text, names):
|
||||
"""Verify ourNameToPropType covers every name and stays sorted."""
|
||||
block = _extract_array_block(text, "ourNameToPropType")
|
||||
entries = re.findall(r'\{\s*"([^"]+)"\s*,\s*PropType::(\w+)\s*\}', block)
|
||||
|
||||
lookup_names = [name for name, _ in entries]
|
||||
if sorted(lookup_names) != sorted(names):
|
||||
raise ValueError(
|
||||
"ourNameToPropType does not list the same names as ourPropertyNames"
|
||||
)
|
||||
if lookup_names != sorted(lookup_names, key=str.casefold):
|
||||
raise ValueError(
|
||||
"ourNameToPropType is not in case-insensitive sorted order"
|
||||
)
|
||||
for name, proptype in entries:
|
||||
if name.replace(".", "_") != proptype:
|
||||
raise ValueError(
|
||||
f"ourNameToPropType maps '{name}' to 'PropType::{proptype}'"
|
||||
)
|
||||
|
||||
|
||||
# Parsed once at import; these are the canonical, validated tables.
|
||||
_PROP_NAMES, _PROP_DEFAULTS = _parse_props_hxx()
|
||||
_NAME_TO_INDEX = {name: i for i, name in enumerate(_PROP_NAMES)}
|
||||
_MD5_INDEX = _NAME_TO_INDEX["Cart.MD5"]
|
||||
|
||||
# A '"key" "value"' line from a properties file. Keys never contain a quote;
|
||||
# values may contain escaped quotes, so anchor the value at end-of-line.
|
||||
_LINE_RE = re.compile(r'^"([^"]*)"\s+"(.*)"$')
|
||||
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Public API (mirrors the old PropSet.pm subroutines)
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
def prop_names():
|
||||
"""Property names, in PropType order."""
|
||||
return _PROP_NAMES
|
||||
|
||||
|
||||
def prop_defaults():
|
||||
"""Default property values, in PropType order."""
|
||||
return _PROP_DEFAULTS
|
||||
|
||||
|
||||
def num_prop_types():
|
||||
"""Number of property tags in one PropSet element."""
|
||||
return len(_PROP_NAMES)
|
||||
|
||||
|
||||
def load_prop_set(path):
|
||||
"""Load and parse a properties file into a dict keyed by md5sum.
|
||||
|
||||
Each value is a list of property strings in PropType order.
|
||||
"""
|
||||
print(f"Loading properties from file: {path}")
|
||||
|
||||
propset = {}
|
||||
props = [""] * len(_PROP_NAMES)
|
||||
|
||||
with open(path, encoding="utf-8") as infile:
|
||||
for raw in infile:
|
||||
line = raw.rstrip("\r\n")
|
||||
|
||||
# A bare '""' line terminates the current item
|
||||
if line.startswith('""'):
|
||||
key = props[_MD5_INDEX]
|
||||
if key in propset:
|
||||
print(f"Duplicate: {key}")
|
||||
propset[key] = props
|
||||
props = [""] * len(_PROP_NAMES)
|
||||
elif line.strip():
|
||||
m = _LINE_RE.match(line)
|
||||
key = m.group(1) if m else None
|
||||
if key in _NAME_TO_INDEX:
|
||||
props[_NAME_TO_INDEX[key]] = m.group(2)
|
||||
else:
|
||||
print(f"ERROR: {line}")
|
||||
print(f"Invalid key = '{key}' for md5 = "
|
||||
f"'{props[_MD5_INDEX]}', ignoring ...")
|
||||
|
||||
return propset
|
||||
|
||||
|
||||
def save_prop_set(path, propset):
|
||||
"""Write a properties dict back to disk, sorted by md5sum."""
|
||||
print(f"Saving {len(propset)} properties to file: {path}")
|
||||
|
||||
with open(path, "w", encoding="utf-8") as outfile:
|
||||
for md5 in sorted(propset):
|
||||
for i, value in enumerate(propset[md5]):
|
||||
if value != "":
|
||||
outfile.write(f'"{_PROP_NAMES[i]}" "{value}"\n')
|
||||
outfile.write('""\n\n')
|
||||
|
||||
|
||||
def build_prop_string(values):
|
||||
"""Convert a property value list into a C++ array initializer row.
|
||||
|
||||
Values equal to their default are emitted as the empty string, matching
|
||||
how DefProps is consumed (setDefaults() runs first, so unset slots inherit
|
||||
the compiled-in default).
|
||||
"""
|
||||
items = [
|
||||
f'"{value}"' if _PROP_DEFAULTS[i] != value else '""'
|
||||
for i, value in enumerate(values)
|
||||
]
|
||||
return " { " + ", ".join(items) + " }"
|
||||
Reference in New Issue
Block a user