Re: Give all devices on a serial IEC bus unique numbers?

From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2006-07-16 17:37:57

Hello,

forwarding a message I got privately, see below.

- Spiro


--- forwarded message: ---

Hello,

my five cents.

[ehrm, Spiro, could you please forward my message again]

Spiro Trikaliotis schrieb:
 >>> What do you think? Is there a better approach then the one proposed
 >>> there?
 >> Since nobody answered this - it seems "no" ;-)
 >
 > Yes, I believe this, too.

Don't know, if this is true, but I believe that 64'er
once presented a prodecure where the numbers were
given by the order in which the drives are switched
on with the user's help .

 >>> Additionally, from where could I get a true random number in the
 >>> floppy?
 >> Hm, a "true random" you rather get nowhere but even a kind of quasi-
 >> random may be tough to get from the floppy. Thinking aloud... maybe
 >> feeding some timers with off-the-(magnetic)head readout?
 >
 > I thought about some things:
 >
 > 1. The rpm variance of the disc might be a good pointer; if there is a
 >    disc inside the drive, I can estimate that value.
 >
 > 2. If there is no disc, the drive will spin up and spin down. In this
 >    time, the timers of different drives will drift significantly away
 >    from each other, thus, even without an attached disc, the timers
 >    should be "good enough" not to give the same values.

Don't know, if this is true, but timer2 in the VIAs
are very limited. In one mode they're running all the
time counting 65536 clocks all the time.
It depends if the desired timer mode is the default
mode after reset. On the other hand, this mode gets
programmed by DOS ROM initialization.

All in all, both timer2s reflect the time, when the
drive was either switched to on or resetted last time.
Both true random's since this only depends on user
interaction. Still these values are limited to a
granularity of 65536 different values.
You _could_ combine both timer2s of both the VIAs,
but this may not be needed.

Then again, reading from the R/W head with no disk
inserted also may produce true random bits with
unknown statistical characteristics.

 > With these two facts, I think I can determine a "good enough" seed for a
 > PRNG, which will help me here.
 >
 > When I find some time, I will implement it and try it out.

Would be cool, I don't have _any_ imagination, how
such an nearest-drive-on-the-bus-gets-lowest-ID
algorithm could work at all.



Womo

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.