Posts for DrD2k9


DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
I haven't been able to find when v6 gets set and when it gets changed. If someone has time, could you find out what causes v6 to become 0?
Ok, I did a quick search of rooms up through the skimmer sequence for places where v6 is directly written. The only thing I can find is in LOGIC.024 which is Orat's cave.
if (isset(f30)) {
  reset(f30);
  set(f43);
  print("\"What have we here?\"");
  v6 = 0;
  stop.motion(o0);
  program.control();
  v64 = 5;
  cycle.time(o1,v64);
  set.view(o1,128);
  set.cel(o1,0);
  erase(o0);
  end.of.loop(o1,f31);
  v30 = 2;
}
"What have we here?" is displayed when Orat catches Roger. So unless there is another place where v6 gets a value of 0, it appears that a death is necessary to accomplish this. That also assumes that nothing else changes v6 between Orat killing you and reaching the skimmer sequence. I did not search for situations where v6 may be written as part of a function like a random(min,max,v) command.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
Wow.. I have even more respect for your run now, DrD2k9. That skimmer sequence is a real pain! I've made it through a couple times, but sometimes get stuck in situations where, no matter what I do, I get hit by a rock. One thing I noticed was that in your run, you were able to do small movements and stop in the middle. How did you do that? I'm finding I can only go all the way over to one side or all the way over to the other. I can't stop in the middle or do short adjustments.
Movement control at 'Fastest' speed is generally insane in this game. The key is using the number pad for directional inputs. Normally Roger will take 3 steps (frames) in a given direction before changing directions regardless of which of the 3 frames the new direction key is pressed. This includes pressing the same directional button to stop moving. HOWEVER, pressing '5' on the number pad halts Roger's movement on the frame pressed and doesn't wait for the 3 frame cycle to end. Thankfully this trick also works in the skimmer sequence, allowing you to stop motion at any desired frame. Without this stop-movement input it would be impossible to complete the game at 'fastest' speed because the 3 frame cycle would force Roger to jump off cliffs constantly.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Radiant wrote:
DrD2k9 wrote:
I'll see what I can do tonight about looking through the path of rooms up to the skimmer and see which ones call the random function.
It strikes me you don't have a lot of choice in your route, though. In the Arcada, you start in logic 2, which calls random() once but doesn't act on it if it's the first time in the room. West to logic 1, which has no randomness. The scientist is on a timer. West to logic 4, which calls random() again upon entry. As long as you're on the top floor, you're safe. There's a 21% chance of a patrol appearing on the bottom; it may be fun to manipulate this happening, because many players don't know that this can occur. West to logic 3. No randomness. Grab keycard, return to 4. Logic 4 again. Turns out that if you come from the west on the top floor, no encounters can happen. East to logic 2 again. By the current pathing, a guard appears but you make it to the elevator before he does. This has a 50% chance of happening. Elevator to logic 5, which also calls random() upon entry. By the current pathing, you have to wait for the guard to leave. He has a 50% chance of showing up, so this could easily be manipulated away. It is notably the first point where randomness matters. East to logic 6, which has no randomness. East to logic 7, which again has a 50% chance for the guard to show up. And after that, you're clear. Now let me check on the spider droid. It strikes me that on Kerona you don't really have a choice of paths either.
This is what I meant when I said I'd trace the path. Thanks for doing it for me. No there isn't much choice of paths anywhere in the game. Bummer it appears that we can't avoid the spider. Do you think we could we delay it's arrival until we get to the east portion of the mesa? If so, I wonder if the dialogue would show up if we made it underground before the spider lands and sprouts legs.
Radiant wrote:
A thought. Would it be interesting to make a 100% run of this game, by which I mean full score? In this particular game it doesn't require a lot of detours. I think you just need to grab the cartridge in the second room, use it in the alien nest, drop the rock on the spider, and talk to a few Sariens while in disguise, and you'd be at max score. This also gives you the good ending, i.e. your planet doesn't die at the end.
I don't know that it would be much more interesting than an 'any%', but I can see it being a valid run for vault purposes. Another option for 100% could be killing the spider droid and orat at the same time. If the spider droid is led into orat's cave, it kills him instead of you. I believe that the point values are equal. So if the minimum time to spawn the spider is short enough to spawn him before entering the cave, it could be done this way. It would come down to comparing time necessary to lead the spider to the cave, vs. the time necessary for the spider to walk to the kill point via boulder.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Well look at that!...I'll learn to read someday.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
Okay, I think we can work with this. Initially I thought this was bad because the rock countdowns are random, meaning when the next random call is made is random. However, that second part saves us because we can control whether or not random gets called for the shadow, simply by choosing to move or not move. I'll try another POC with the skimmer to see if it's possible to target ending at an exact seed value.
I'll see what I can do tonight about looking through the path of rooms up to the skimmer and see which ones call the random function. If we could somehow get the run to avoid all guards on the Arcada, movement would not need delayed as it currently is for one guard. Also if it's possible, preventing the spider droid from appearing on Kerona, would also save time as a dialogue box would be eliminated. On another note, how do we change the initial time for JPC-rr?
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Radiant wrote:
So from 47 seconds to about 1.5? Awesome!
With a poked seed value. We'll still have to work out the best approach with either the current save or a new run using a new Initial RTC Time setting.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
So an Initial Seed of 2. Yields some promising return values around the 586th seed through the roughly 820th seed. This assumes that the 586 random calls doesn't change much. with a new RTC time and initial seed.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
What's the minimum cash you need to be able to buy the ship and the droid?
250 36 for droid (with coupon) and 214 for the ship
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Radiant wrote:
DrD2k9 wrote:
214 for the ship. 36 for the droid.
Is that including the coupon?
I believe so. I think it's like 44 or 45 without the coupon.
c-square wrote:
Okay, I've got my first proof of concept done.
SUCCESS!
c-square wrote:
The big trick now is, how can you do the run to ensure you get to the slot machine with the right seed value loaded up?
I don't think it's worth trying to manipulate initial seed to land on a good number when entering the slots. Isolating an initial seed that will yield a list of return values with a high percentage in the 3-16 range (actual wins with monetary increase) may be beneficial.
c-square wrote:
In the end, this route costs 70 frames in RNG manipulation:
That's a whole lot less time lost than in my original!
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
With the judgement of 'delayed' for the BIOS situation; I'm going to cancel this submission and re-submit with a new run using the new BIOS settings (Text is legible). We're also making pretty good progress on determining the RNG for the slot machine, so I anticipate improvements there as well. Keep your eyes open for the new submission over the next couple weeks!
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Also, Have we confirmed that the return values in my spreadsheet are correct for the slots when determining v64 for a spin? I haven't had a chance. EDIT: I'm thinking my math on the return value is incorrect. I'm not getting the spins I expect based on the seed value. Could either of you write a better return value formula for the spreadsheet (or figure out why I'm not matching up, if the math is correct)?
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
DrD2k9 wrote:
$250 214 for the ship. 36 for the droid.
Great, and we start with $30 to play with. Looks like there's a nice set of values close together starting around seed value 4319. That means if we can start the game off with a seed of one of the following values, we should be able to cut down the slot section significantly: 63832 - 10 rng numbers for manipulation 40825 37734 48559 53668 32341 11154 53995 17584 59633 - 0 rng numbers for manipulation
I'm not sure I completely understand this... If we choose a given initial seed and then guards need manipulated, won't changing it to a different initial seed also change whether or not guards may need manipulated? Guards aren't hard to avoid at the speeds we're running. So if there's a tradeoff between being able to manipulate guards and getting the best initial seed for the slots; I'm leaning toward slots.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
$250 214 for the ship. 36 for the droid. EDIT: If I remember correctly, if your last win on the slots would give you more than 250 the game sets your total buckazoids to 250.
Post subject: Re: Space Quest 1
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
This is a thread to help DrD2k9 figure out the slot machine, and any other time savings in her/his (?) SQ1 run.
His
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
OK...more concrete info. Use this savestate and do the following using a memory search program (Cheat Engine is what I used). Let Roger enter the slot machine. Enter 'Y' 6 times search value 63453 enter 'Y' 1 more time search value 39290 This should yield the agi_rand_seed memory address of the emulator...not the internal memory address. You LUA smarter people may be able to use that info to find the internal memory address (which I'm guessing will be static internally).
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Radiant wrote:
...this is certainly when you enter the first playable room
I can confirm the address is written to once in this room, at least when restarting a game after death.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
OK, I've successfully found a memory address for the random seed that follows the expected pattern (0x7C4D * agi_rand_seed + 1) of change when using the 'Y' or 'N' input. Unfortunately the random seed memory address isn't always the same distance from the variable memory address. :( Now I'm going to try and see if the return values follow as expected (because I'm dense and didn't check that at the same time as checking the basic sequence).
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Radiant wrote:
Due to random encounters, this is certainly when you enter the first playable room (logic 2); I haven't checked the title sequence to see if it does anything random.
This should drastically reduce the potential range of frames where the initial is set. Possibly within 3-7 frames.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
dokurokun wrote:
So to avoid upsetting any TAS authors, if you don't want your TAS to get uploaded or used by me, please reply your name here, I'll avoid using your TAS.
If you're profiting from these videos (which you shouldn't be)...don't upload mine. Otherwise, I don't mind if you're uploading them somewhere other than YouTube, as long as you're appropriately acknowledging the authorship according to the redistribution guidelines. EDIT:On further thought....just don't re-upload mine at all. :END EDIT As Spikestuff already stated: there's no reason to re-upload these videos to YouTube...when they're already there. I expect that you'll be upsetting a significant group of people involved with this site if you do start re-uploading to YouTube (and possibly by just re-uploading in general).
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Radiant wrote:
Finally, and most importantly, JPC-RR has a parameter "Initial RTC time". Since the random seed is initialized as the amount of milliseconds since midnight, altering this parameter is an easy way to get a different pattern. I believe this is legit by the site rules, but we should probably check that.
If we can figure out when the game first sets the seed, this may be beneficial to change. Radiant, do you know how quickly this is set? If we can even narrow down the frame region to even as many as 20 frames it may make it easier to find the starting 'ms from midnight' seed.
Radiant wrote:
Please upload it somewhere so we can all use the same one. I'm guessing it's in Excel?
Here The initial seed is probably not correct for when the game sets it; it's based off 1:46:00.00am Also, I'm not 100% sure the math is correct, but I believe it is.
c-square wrote:
Since the game initializes the seed only once on startup, wouldn't this only be useful then? Changing this mid-game would have no effect on the seed.
If we can figure it out when it's set, I'll redo the run from the beginning. It'd be worth it, if it makes RNG manipulation easier.
Radiant wrote:
So how to approach this?... The easy way to advance the seed, which can be done at any time, is typing N + enter or Y + enter. These are the shortest inputs that give a randomized message (all other one-letter inputs are either not recognized, which give a non-random message, or are ignored).
Could we use this information to isolate the random_seed? I don't have time to test it right now, but here's a testing possibility using a memory searching program : Stand in one spot in a room without any room based RNG. Search unknown value Use the Y or N text input to change the seed search changed value use 1 letter text input to NOT change the seed search equal value alternate these, or create a custom sequence of change/no-change searching appropriately to isolate the memory location. Once we have that, we have the seed number. Then we should be able to compare it to known variable memory locations and be able to find the seed value at any point in a game. Even if we don't know the initial seed to plug in the spreadsheet, if we can find any random seed with this method, we can plug it into the spreadsheet. If we could somehow find the pointer to the random memory address we could watch the memory frame by frame from emulator startup until the initial seed is set. Though this may become a moot point if we can obtain the seed value at any point using the above.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
c-square wrote:
v64 is the amount won:
    -- Big win, all diamonds (LOGIC.114)
    if (v64 == 4) {
      v125 = 2;
      v127 = 2;
      v128 = 2;
      v129 = 7;
    }

    -- Payout depends on bet (LOGIC.115)
    if (v129 == 7) {
      if (v123 == 1) {
        v64 = 20;
      }
      else {
        if (v123 == 2) {
          v64 = 40;
        }
        else {
          v64 = 60;
        }
      }
    }
Yea it appears so in Logic.115. In Logic.114 though it's set randomly...and the outcome determines v129 (win/lose result?). It must be used for multiple things. EDIT: Confirmed with cheat engine. v64 is visible as random number during spin, then changes to $ won when the last symbol locks. :END EDIT Anyway...I've done some memory searching using Cheat Engine and the v(n) variables line up in memory. i.e. v125 = 0A71B3D2 v124 = 0A71B3D1 v64 = 0A71B395 These memory addresses change when a save-state is loaded. I could not find pointer addresses.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Based on
if (isset(f231)) { 
  if ((v129 == 7 || 
      v129 == 6 || 
      v129 == 5 || 
      v129 == 1)) { 
    reset(f126); 
    set.view(o1,99); 
    set.view(o2,99); 
    set.view(o3,99); 
    set.loop.v(o1,v125); 
    set.loop.v(o2,v127); 
    set.loop.v(o3,v128); 
    set.cel(o1,0); 
    set.cel(o2,1); 
    set.cel(o3,0); 
    start.cycling(o1); 
    start.cycling(o2); 
    start.cycling(o3); 
    set(f134); 
from above, I'm confident v129 is the result. As a value of 1, 5, 6, or 7 results in cycling graphics objects (winning slot symbols).
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Ok Last one of these. I think this relates to entering the slot machine. Here's Logic.113
if (isset(f5)) {
  load.view(91);
  load.view(93);
  load.view(99);
  load.sound(25);
  load.sound(26);
  load.sound(27);
  animate.obj(o1);
  set.view(o1,91);
  set.cel(o1,0);
  position(o1,43,83);
  stop.cycling(o1);
  animate.obj(o2);
  set.view(o2,91);
  set.cel(o2,0);
  position(o2,74,83);
  stop.cycling(o2);
  animate.obj(o3);
  set.view(o3,91);
  set.cel(o3,0);
  position(o3,105,83);
  stop.cycling(o3);
  animate.obj(o4);
  set.view(o4,93);
  set.cel(o4,0);
  position(o4,49,39);
  stop.cycling(o4);
  animate.obj(o5);
  set.view(o5,93);
  set.cel(o5,0);
  position(o5,80,39);
  stop.cycling(o5);
  animate.obj(o6);
  set.view(o6,93);
  set.cel(o6,0);
  position(o6,111,39);
  stop.cycling(o6);
  draw(o1);
  draw(o2);
  draw(o3);
  draw(o4);
  draw(o5);
  draw(o6);
  v54 = 3;
  v131 = 18;
  v132 = 13;
  return();
}
if (isset(f126) &&
    isset(f162)) {
  sound(25,f162);
}
if (isset(f124)) {
  reset(f231);
  if (v124 > 0) {
    reset(f124);
    v124 -= v123;
    if (v26 == 2 &&
        v20 == 0) {
      display(18,13,"               ");
      display(19,13,"               ");
      display(20,13,"               ");
      display(21,13,"               ");
      display(18,13," You Bet  $%v123");
      display(20,13," You Have $%v124");
    }
    else {
      display(16,13,"               ");
      display(17,13,"               ");
      display(18,13,"               ");
      display(19,13,"               ");
      display(16,13," You Bet  $%v123");
      display(18,13," You Have $%v124");
    }
    set.view(o1,91);
    set.view(o2,91);
    set.view(o3,91);
    start.cycling(o4);
    start.cycling(o5);
    start.cycling(o6);
    start.cycling(o1);
    start.cycling(o2);
    start.cycling(o3);
    random(10,23,v230);
    random(26,38,v231);
    random(42,53,v232);
    sound(25,f162);
  }
  else {
    if (v124 <= 0) {
      reset(f124);
      print("You're broke!  Hit the road, freeloader!");
      new.room(70);
    }
  }
}
v230--;
v231--;
v232--;
if (v230 == 1) {
  set.cel.v(o1,v125);
  stop.cycling(o1);
  stop.cycling(o4);
  set.cel(o4,0);
}
if (v231 == 1) {
  set.cel.v(o2,v127);
  stop.cycling(o2);
  stop.cycling(o5);
  set.cel(o5,0);
}
if (v232 == 1) {
  set(f230);
}
if (isset(f230)) {
  current.cel(o3,v233);
  if (v233 == v128) {
    reset(f230);
    set.cel.v(o3,v128);
    stop.cycling(o3);
    stop.cycling(o6);
    set.cel(o6,0);
    set(f231);
    stop.sound();
  }
}
if (isset(f231)) {
  if ((v129 == 7 ||
      v129 == 6 ||
      v129 == 5 ||
      v129 == 1)) {
    reset(f126);
    set.view(o1,99);
    set.view(o2,99);
    set.view(o3,99);
    set.loop.v(o1,v125);
    set.loop.v(o2,v127);
    set.loop.v(o3,v128);
    set.cel(o1,0);
    set.cel(o2,1);
    set.cel(o3,0);
    start.cycling(o1);
    start.cycling(o2);
    start.cycling(o3);
    set(f134);
  }
  else {
    if (v129 == 4) {
      reset(f126);
      set.view(o1,99);
      set.view(o2,99);
      set.loop.v(o1,v125);
      set.loop.v(o2,v127);
      set.cel(o1,0);
      set.cel(o2,1);
      start.cycling(o1);
      start.cycling(o2);
      set(f134);
    }
    else {
      if (v129 == 3) {
        reset(f126);
        set.view(o1,99);
        set.loop.v(o1,v125);
        set.cel(o1,0);
        start.cycling(o1);
        set(f134);
      }
      else {
        if (v129 == 1) {
          reset(f126);
          set.view(o1,99);
          set.view(o2,99);
          set.view(o3,99);
          set.loop.v(o1,v125);
          set.loop.v(o2,v127);
          set.loop.v(o3,v128);
          set.cel(o1,0);
          set.cel(o2,1);
          set.cel(o3,0);
          start.cycling(o1);
          start.cycling(o2);
          start.cycling(o3);
          set(f134);
        }
        else {
          reset(f126);
          set(f134);
        }
      }
    }
  }
  if (v129 != 2 &&
      v129 != 1) {
    sound(26,f162);
  }
  else {
    sound(27,f162);
  }
}
return();
I'm confident v123 is bet amount based on this logic tree.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
I'm my assumption of v129 as result is corrent, it appears that v64 is set to a specific number after each spin depending on the v129 result. From Logic.115
if (v26 == 2 &&
    v20 == 0) {
  v245 = 18;
}
else {
  v245 = 16;
}
v246 = 13;
if (v129 == 1) {
  set(f123);
  set(f233);
  v64 = 0;
}
else {
  if (v129 == 2) {
    v64 = 0;
  }
  else {
    if (v129 == 7) {
      if (v123 == 1) {
        v64 = 20;
      }
      else {
        if (v123 == 2) {
          v64 = 40;
        }
        else {
          v64 = 60;
        }
      }
    }
    else {
      if (v129 == 6) {
        if (v123 == 1) {
          v64 = 10;
        }
        else {
          if (v123 == 2) {
            v64 = 20;
          }
          else {
            v64 = 30;
          }
        }
      }
      else {
        if (v129 == 5) {
          if (v123 == 1) {
            v64 = 5;
          }
          else {
            if (v123 == 2) {
              v64 = 10;
            }
            else {
              v64 = 15;
            }
          }
        }
        else {
          if (v129 == 4) {
            if (v123 == 1) {
              v64 = 3;
            }
            else {
              if (v123 == 2) {
                v64 = 6;
              }
              else {
                v64 = 9;
              }
            }
          }
          else {
            if (v129 == 3) {
              if (v123 == 1) {
                v64 = 1;
              }
              else {
                if (v123 == 2) {
                  v64 = 2;
                }
                else {
                  v64 = 3;
                }
              }
            }
          }
        }
      }
    }
  }
}
if (v26 == 2 &&
    v20 == 0) {
  display(18,13,"               ");
}
else {
  display(16,13,"               ");
}
if (v129 != 2 &&
    v129 != 1) {
  if (v26 == 2 &&
      v20 == 0) {
    display(18,13," You Win  $%v64 ");
  }
  else {
    display(16,13," You Win  $%v64 ");
  }
}
else {
  random(6,12,v247);
  display.v(v245,v246,v247);
}
v123 = 0;
v126 = 250;
v126 -= v124;
if (v124 <= 0) {
  drop("buckazoid(s)");
}
if (v126 <v64> 0 &&
    !has("buckazoid(s)")) {
  get("buckazoid(s)");
}
if (v26 == 2 &&
    v20 == 0) {
  display(20,13," You Have $%v124");
}
else {
  display(18,13," You Have $%v124");
}
reset(f134);
v129 = 8;
if (!isset(f123)) {
  accept.input();
}
reset(f95);
return();
return();
Also, v123 may be the variable for amount bet
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2081)
Joined: 8/21/2016
Posts: 1017
Location: US
Here's Logic.114 from AGI Studio. I think this is the logic for the spinning symbols. I know v124 is the variable for Buckazoids. (confirmed with ALT-D)(also not in this particular logic tree) I believe v64 is the random number; v125, v127, and v128 are the slot symbols; and v129 is the result. But I can't confirm those.
if (v134 > 0) {
  v134--;
  if (v134 == 0) {
    v129 = 1;
  }
  if (v134 == 1) {
    v129 = 5;
  }
  if (v134 == 2) {
    v129 = 7;
  }
  if (v134 > 2) {
    v134 = 3;
    v129 = 6;
  }
  v125 = v134;
  v127 = v134;
  v128 = v134;
}
else {
  random(1,100,v64);
  if (v64 < 3) {
    v125 = 0;
    v127 = 0;
    v128 = 0;
    v129 = 1;
  }
  else {
    if (v64 == 4) {
      v125 = 2;
      v127 = 2;
      v128 = 2;
      v129 = 7;
    }
    else {
      if (v64 < 6) {
        v125 = 3;
        v127 = 3;
        v128 = 3;
        v129 = 6;
      }
      else {
        if (v64 < 10) {
          v125 = 1;
          v127 = 1;
          v128 = 1;
          v129 = 5;
        }
        else {
          if (v64 < 17) {
            v125 = 1;
            v127 = 1;
Label1:
            random(0,3,v128);
            if ((v128 == v127 ||
                v128 == v125)) {
              goto(Label1);
            }
            v129 = 4;
          }
          else {
            if (v64 < 33) {
              v125 = 1;
Label2:
              random(0,3,v127);
              if (v127 == 1) {
                goto(Label2);
              }
              random(0,3,v128);
              v129 = 3;
            }
            else {
Label3:
              random(0,3,v125);
              if (v125 == 1) {
                goto(Label3);
              }
              random(0,3,v127);
Label4:
              random(0,3,v128);
              if (v127 == v125 &&
                  v128 == v127) {
                if (v128 == v127) {
                  goto(Label4);
                }
              }
              v129 = 2;
            }
          }
        }
      }
    }
  }
}
if (v129 != 8) {
  set(f126);
  v134 = 0;
  return();
}
return();

// Messages