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
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.