I don't know commodore 128, but doesn't every pseudorandom number generator require "seeding?" Instead of just calling RANDOM, shouldn't he seed it with the current time in milliseconds or something to get a different result?
At 1:10 he mentions a "SID chip", it seems back then they tuned an unused voice on the sound chip and sampled values from it but without activating audio output. Just sampled the output.
There is a glimpse of code at 1:27 but I got confused on some details... The random output is actually !addr RANDOM = $D41B the same on C128 as on C64. Sorry for the mixup (variable BASOUT is character to print).
The assembly routine is different than C128 RND which outputes a decimal point number.
The code for randomlib.a, it just sets up the sound generator chip and gates it.
It's hard to follow along this closely instead of watching for generalities... But to answer your question, jsr setuprand is the first subroutine called in worm.a. We are used to seeing the word "seed" as an idiom but he uses setup, and there is no entropy except for precise times when called and how the harmonics work out.
4 comments
0 u/a_fucking_dude 04 Feb 2019 20:54
I don't know commodore 128, but doesn't every pseudorandom number generator require "seeding?" Instead of just calling RANDOM, shouldn't he seed it with the current time in milliseconds or something to get a different result?
0 u/justlogin 04 Feb 2019 22:51
At 1:10 he mentions a "SID chip", it seems back then they tuned an unused voice on the sound chip and sampled values from it but without activating audio output. Just sampled the output.
There is a glimpse of code at 1:27 but I got confused on some details... The random output is actually
!addr RANDOM = $D41Bthe same on C128 as on C64. Sorry for the mixup (variable BASOUT is character to print).The assembly routine is different than C128 RND which outputes a decimal point number.
The code for randomlib.a, it just sets up the sound generator chip and gates it.
It's hard to follow along this closely instead of watching for generalities... But to answer your question,
jsr setuprandis the first subroutine called in worm.a. We are used to seeing the word "seed" as an idiom but he uses setup, and there is no entropy except for precise times when called and how the harmonics work out.0 u/23408234092834 08 Feb 2019 11:17
Not neccessarily. Maybe the PRG seeds itself during program start or something, so you don't have to.
0 u/a_fucking_dude 08 Feb 2019 16:32
Sure, "maybe." Also, "maybe monkeys will fly out of my butt" any second now.