RNG Value (0-99)
A/B/R Buttons Frames (0-255)
Race Frames (0-4294967295)
Last Selected Item (0-99)
Current Place (1-8)

Item RNG Assembly Code & Comments by bitalive

Formula: (RNGValue + ABRFrames + RaceFrames + LastItem) % 100

RNG Value: Returned value of random number call giving a random number from 0 to 99
A/B/R Buttons: Counter goes up each frame (29.97fps) that one of these buttons is pressed. Can go up by 1, 2, or 3 depending on how many of them are pressed at once (or more if using more than 1 controller).
Race Frames: Counter that goes up each frame (59.94fps) during a race (including startup with Lakitu and points screens)
Last Selected Item: Last item table number that was produced from the formula above