Thomas Jentzsch Posted June 24, 2017 Share Posted June 24, 2017 (edited) Hi, I had a few hours of spare time and, based on my old disassembly from 2001, created a little hack of Pitfall!. This hack allows you to select one of 16 all new maze variations. Especially for those who have still fun in mapping screens and underground passages. Enjoy! NTSC and PAL-60 (with some small color adjustments) versions included. Update: The x256 version has 256 mazes and additional variety of the existing game elements. See this post for details. Pitfall!x16.zip Pitfall!x256 v1.20 (2017) (Activision, David Crane, Thomas Jentzsch) (NTSC).bin Pitfall!x256 v1.20 (2017) (Activision, David Crane, Thomas Jentzsch) (PAL-60).bin Edited July 5, 2017 by Thomas Jentzsch 39 3 Quote Link to comment Share on other sites More sharing options...
toiletunes Posted June 24, 2017 Share Posted June 24, 2017 Thank you! Pitfall, as good as it was, needed some variety for replay value. A+ 1 Quote Link to comment Share on other sites More sharing options...
MrBeefy Posted June 24, 2017 Share Posted June 24, 2017 Hi, I had a few hours of spare time and, based on my old disassembly from 2001, created a little hack of Pitfall!. This hack allows you to select one of 16 all new maze variations. Especially for those who have still fun in mapping screens and underground passages. Enjoy! NTSC and PAL-60 (with some small color adjustments) versions included. Back in the day my mother had her own map memorized to complete the game. I have never been that good. lol I will try this though Quote Link to comment Share on other sites More sharing options...
Special Teams Posted June 24, 2017 Share Posted June 24, 2017 Thanks! Quote Link to comment Share on other sites More sharing options...
hizzy Posted June 24, 2017 Share Posted June 24, 2017 Amazing! Thank you, Thomas! Quote Link to comment Share on other sites More sharing options...
ultima Posted June 24, 2017 Share Posted June 24, 2017 Cool!! I love pitfall! Can't wait to try this thanks Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 28, 2017 Author Share Posted June 28, 2017 (edited) Why stop at 16? Yesterday I had the idea how to have 256 variations. So here is: Pitfall!x256 The game now contains the 16 variations (1..16) of Pitfall!x16 plus 240 all new ones. And each variation has its own, unique map. This should keep fans busy quite long. With SELECT you can manually select a variation. If you press SELECT + RESET simultaneously the game with select a random variation for you. If you hold the switch(es), the selection is now accelerated. Note: The PAL-50 version is speed adjusted. So it will play at the same speed as the NTSC or PAL-60 version. EDIT: Faulty ROMs deleted. New ROMs will be in the first post. Edited June 29, 2017 by Thomas Jentzsch 9 Quote Link to comment Share on other sites More sharing options...
JDTAY Posted June 28, 2017 Share Posted June 28, 2017 Now ya might be gettin' into overkill territory... 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 28, 2017 Author Share Posted June 28, 2017 Some people continue to claim that there is no variation in Pitfall!. Maybe this silences them. 5 Quote Link to comment Share on other sites More sharing options...
+save2600 Posted June 28, 2017 Share Posted June 28, 2017 Holy cow is that awesome. All new reason to play Pitfall! again. Thanks Thomas! 1 Quote Link to comment Share on other sites More sharing options...
CapitanClassic Posted June 28, 2017 Share Posted June 28, 2017 From my memory, the rooms aren't stored in some sort of data table, instead a PRNG is seeded and then an algorithm generates the next number when going right or previous number going left. (Assuming you didn't have to modify the algorithm) If the PRNG used a 8bit 256 cycle, then wouldn't Pitfall!x256 just give you a different staring location. If it used a 16bit 65535 cycle PRNG, is Pitfall!x256 still solvable in 20 minutes? The original is barely finishable within the limit, and that is with skipping probably 2/3-1/2 of the game using the underground. 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 28, 2017 Author Share Posted June 28, 2017 From my memory, the rooms aren't stored in some sort of data table, instead a PRNG is seeded and then an algorithm generates the next number when going right or previous number going left. Correct. (Assuming you didn't have to modify the algorithm) If the PRNG used a 8bit 256 cycle, then wouldn't Pitfall!x256 just give you a different staring location. If it used a 16bit 65535 cycle PRNG, is Pitfall!x256 still solvable in 20 minutes? The original is barely finishable within the limit, and that is with skipping probably 2/3-1/2 of the game using the underground. Pitfall! uses a 8 bit cycle PRNG which allows for 255 screens before repeating. I changed the a bit convoluted PRNG code into a simpler, standard LFSR. This one uses an XOR-value, which I change depending on the game variation. Each XOR-value creates a completely different sequence of random values. However there exist only 16 XOR-values which generate a 255 values (0 isn't allowed) maximum length sequence (I cannot switch to 16 bit, because then the number of treasures within 255 screens is not determined). This resulted into the 16 variations of Pitfall!x16. To get to 256 variations, I simply repeat the LFSR multiple (1, 3, 5, ..15) times for each screen. This causes different value sequences, which also repeat after 256255 values. And while I was answering your questions (thanks a lot!), I realized that I have made a big mistake here . I always had 256 screens in mind, so I chose those odd values for repeating the LFSR. But there are only 255 screens, and this breaks the code. Fortunately this seems easy to fix. 1, 2, 4, 7, 8, 11, 13 and 14 iterations should do the job. But before I post the new ROMs, I better double check. 2 Quote Link to comment Share on other sites More sharing options...
CapitanClassic Posted June 29, 2017 Share Posted June 29, 2017 Correct. Pitfall! uses a 8 bit cycle PRNG which allows for 255 screens before repeating. I changed the a bit convoluted PRNG code into a simpler, standard LFSR. This one uses an XOR-value, which I change depending on the game variation. Each XOR-value creates a completely different sequence of random values. However there exist only 16 XOR-values which generate a 255 values (0 isn't allowed) maximum length sequence (I cannot switch to 16 bit, because then the number of treasures within 255 screens is not determined). This resulted into the 16 variations of Pitfall!x16. To get to 256 variations, I simply repeat the LFSR multiple (1, 3, 5, ..15) times for each screen. This causes different value sequences, which also repeat after 256255 values. . Makes sense, as in bits shifting and XORing 0000 0000 just gets you 0000 0000 back again. I wonder if this has been discussed before, but could a similar method be used to generate a random rogue-like game, with one algorithm (and register) handling the Y location, and algorithm handling the X location (and current D X location register) You could then use 4 bits to handle the available edits from a room (with doors that close behind you in situations where you can go North, but the room N does not have an exit south) 0000 & 1111 representing all exits NSEW 0001 W 0010 E 0100 N 1000 S ... 1110 NSE 1101 NSW 1011 SWE 0111 NWE Using a different seed to get 255 different dungeon layouts. (Actually 65535, because the UP/Down seed is different than the LEFT/RIGHT seed) The worst situation might be starting location with one exit, and that room you have an exit to only having an exit back to the starting location. Perhaps so algorithm to force the starting location to have all exits open, 0000 or 1111. That leaves a total of 12 other bits to control information like enemies, treasures, weapons etc. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 29, 2017 Author Share Posted June 29, 2017 For sure, you can create whole worlds randomly. This is no rocket science. And one LFSR per direction is a possible solution. But the problems arise when you want to make your world alive and interacting. Then things get quite complicated soon. E.g. there is a certain treasure, which exists only once. The position must be constant per game and not depend in which order you visit the rooms. Now, if you want create this on-the-fly, how can you do that? You could create it at the game start, but that has to be stored somewhere. And the 2600 is very short of RAM. Lookup "The Stacks" (which is still in development) is you want to see an example of a large, randomly generated world for the Atari 2600. 3 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 29, 2017 Author Share Posted June 29, 2017 I have the deleted the faulty ROMs. The fixed ROMs can be found in the first post. These ROMs contain further changes, which add more variety to the game itself. These should make the game itself (even) more entertaining and provide more varying timings. Note: Some changes are there from the beginning and some start when you have collected a certain number of treasures. The latter will also make the game more challenging. To reflect that, I have increased the scores. 2 Quote Link to comment Share on other sites More sharing options...
+Cafeman Posted June 29, 2017 Share Posted June 29, 2017 Omg! I can't wait to try this! Quote Link to comment Share on other sites More sharing options...
CapitanClassic Posted June 30, 2017 Share Posted June 30, 2017 For sure, you can create whole worlds randomly. This is no rocket science. And one LFSR per direction is a possible solution. But the problems arise when you want to make your world alive and interacting. Then things get quite complicated soon. E.g. there is a certain treasure, which exists only once. The position must be constant per game and not depend in which order you visit the rooms. Now, if you want create this on-the-fly, how can you do that? You could create it at the game start, but that has to be stored somewhere. And the 2600 is very short of RAM. Lookup "The Stacks" (which is still in development) is you want to see an example of a large, randomly generated world for the Atari 2600. i see what you mean. According to , Retrogame Archeology: Exploring Old Computer Games, Pitfall! Uses 4 bytes to track all 32 treasures, and its ingenious design to use the PCG (procedural content generation) of maximal length, ensures that all 32 treasures can be found within the 255 screens. If someone wants a pseudo random world where you can actually interact with it by picking up objects such that they are removed from the world when you return to the screen, you start eating up RAM fast. Quote Link to comment Share on other sites More sharing options...
StanJr Posted June 30, 2017 Share Posted June 30, 2017 what treasure only appears once?? Quote Link to comment Share on other sites More sharing options...
CapitanClassic Posted June 30, 2017 Share Posted June 30, 2017 I suppose I wasn't clear. Each treasure only appears once in Pitfall! From glancing over the book above, the PCG generates an 8bit value that represents everything you see on the screen, log count, where the holes are, the tree pattern, rope or not, etc. This includes the specific treasures that need to disappear once you collect them. (I.e. If you leave the screen and return to it, the treasures don't respawn) All treasures appear on a black disappearing pond which is 101x xxxx the remaining 5 bits indicate one of the 4 type of treasure (2-bits, that refer to a specific byte of RAM that contains and the last 3 bits the number of the specific treasure of 8 possible ones. So to track the 32 treasures, you need 32bits or 4 bytes. 2 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 30, 2017 Author Share Posted June 30, 2017 That book you are referring too, does it show source code? I wonder if they used my disassembly or if a different source exists. 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 30, 2017 Author Share Posted June 30, 2017 I have updated the x256 ROMs at the first post to fix some minor issues. Quote Link to comment Share on other sites More sharing options...
CapitanClassic Posted July 1, 2017 Share Posted July 1, 2017 I am not certain. Was using google book preview https://books.google.com/books?id=NasqDAAAQBAJ&printsec=frontcover&dq=Retrogame+Archeology:+Exploring+Old+Computer+Game+preview&hl=en&sa=X&ved=0ahUKEwj_ss-E9ubUAhXMxYMKHS7jDWQQ6AEIHTAA#v=onepage&q=Pitfall&f=false According to the references, it goes to an Edge online a magazine that doesn't exist. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted July 2, 2017 Author Share Posted July 2, 2017 (edited) Added one more variety element and fixed two gameplay issues. ROMs v1.14 in the first post. BTW: When you play the game, please give me some feedback. Edited July 2, 2017 by Thomas Jentzsch 2 Quote Link to comment Share on other sites More sharing options...
Trebor Posted July 2, 2017 Share Posted July 2, 2017 Added one more variety element and fixed two gameplay issues. ROMs v1.14 in the first post. BTW: When you play the game, please give me some feedback. Thomas...The 'pits' open and close too fast now. There's no way to cross it in time. Tried the initial (Start up) "1" variety with the Diamond ring on screen with tar/black pit under Stella 5.0.0-pre9 and MAME 0.187. Same results under both emulators for the NTSC ROM v1.14. 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted July 2, 2017 Author Share Posted July 2, 2017 You can cross them if you jump into the pit when it has opened and then jump again before it opens again. BTW: It's not all pits. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.