Posts for DrD2k9


DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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 (2070)
Joined: 8/21/2016
Posts: 1012
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
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2070)
Joined: 8/21/2016
Posts: 1012
Location: US
On a note completely unrelated to TASing (as cheating is not allowed)... After examining some of the game files...The "holy shit" cheat can also be performed with any of the following text inputs (Warning: potentially offensive Language): holy asshole holy cock sucker holy cocksucker holy dick head holy dickhead holy fart holy fuck holy motherfucker holy piss holy shit holy shit head holy shithead
Post subject: Re: #5710: DrD2k9's DOS Space Quest: Chapter 1 - The Sarien Encounter "EGA version 2.2" in 01:12.24
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2070)
Joined: 8/21/2016
Posts: 1012
Location: US
Radiant wrote:
DrD2k9 wrote:
I however can't get the returned value to calculate in Excel; perhaps because the seed^(seed>>8) portion can yield a result too great for excel to calculate.
Also, ^ means xor, not power.
Well hey, that makes writing the formulas a bit more difficult, but actually yields a result!
Post subject: Re: #5710: DrD2k9's DOS Space Quest: Chapter 1 - The Sarien Encounter "EGA version 2.2" in 01:12.24
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2070)
Joined: 8/21/2016
Posts: 1012
Location: US
Radiant wrote:
Suppose it's 3. Then the next value is ((7C4D * 3) + 1) % 65536 = 29928. The third value is ((7C4D * 29928) + 1) % 65536 = 35273. Then 52598. And so on. (edit) wait no, I forgot about the >> in the return formula. Anyway you get the general idea.
The return command portion of the function doesn't change the seed itself, correct? So wouldn't the above arithmetic be correct for the agi_rand_seed? Example sequence for agi_rand_seed: 3 > 29928 > 35273 > 52598 > 62591 > 3636 > 30117 > 20130 > 7867 > 53824 > 15681 > 59534 > 47799 > 52492 > 31901 > etc? I just used excel to find this sequence quickly. I however can't get the returned value to calculate in Excel; perhaps because the seed^(seed>>8) portion can yield a result too great for excel to calculate.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2070)
Joined: 8/21/2016
Posts: 1012
Location: US
c-square wrote:
I'm not a judge, but I'd say if it's not going to take you long then just leave it and replace the file.
Regardless of whether the current one is judged/cancelled; I think a separate submission may be more appropriate as we have no idea how the new graphics settings will affect things. A future submission will hopefully have at least one time improvement, assuming the slot machine RNG can be better overcome. Though I am curious if the longer startup will negate any improvement that can be obtained at the slots.
DrD2k9
He/Him
Editor, Experienced Forum User, Judge, Published Author, Expert player (2070)
Joined: 8/21/2016
Posts: 1012
Location: US
fsvgm777 has discovered that using "VGABIOS-elpin-2.40" instead of the VGABIOS that comes with JPC-rr yields normal text in the AGI games!