OT-ish: Build-it stuff

Don Y dgy at DakotaCom.Net
Wed Jun 14 10:59:10 CDT 2006

Tony Duell wrote:
>> Tony Duell wrote:
>>> Elektor is the best of a dwindling number of electronics magazines 
>>> available in the UK. It's improved in the last 5 years or so as they now 
>>> do make firmware sources available for about 50% of their projects (but 
>>> not the interesting ones, alas). Before that (and for the other 50% now) 
>>> you have to buy the programmed device from them, and it comes copy-protected.
>> "Copy protected" -- implying an MCU implementation?
>> I.e. *small* pieces of code?  (not hundreds of KB)
> Microcontrollers, PALs/GAls, CPLDs. All come with the security fuse 
> blown. Obviously EPROMs are readable :-)

Many (small) PALs/GALs can be reverse engineered "empirically".
Depends on how much buried state they have.  If there is none
*buried* (i.e. if all of the state is visible on pins) I have
a routine I wrote many years ago that will exhaustively apply
test vectors and track state transitions to rebuild a state table
suitable for applying to a logic compiler (which will then
generate the actual logic equations).  IIRC, it is a NS32000
COFF binary, though... I'd have to hunt to see which tape has
the sources (something I probably should do, anyway, since
tape isnt very long-lived)

> In a few cases, they make the object (binary) file available to program 
> your own device, but not the source. Which is not particularly helpful.

Are these "old school" MCU's?  ARMs?  etc.  I have quite a number
of dissasemblers that would make quick work of this.  If the code
was written in a HLL, then it's usually very easy to deduce the
corresponding language constructs used (most compilers for tiny
processors are very literal).  If it's written in ASM, then you'd
have to walk through it to deduce the appropriate commentary to

> Yes, I am well aware there are ways to reverse-engineer some of these 
> devices, but I have to weigh up the effort to do that against the effort 
> to design the whole thing from scratch (and have it just the way I want 
> it). 

Exactly.  Something vendors fail to realize when the produce a
product that they think is so "special"/unique.  But, for other
things, you don't have much choice (I disassembled the code in
my PBX -- about a megabyte -- just to figure out how it *really*
worked since the "help" was written by a nonenglish speaker  :-(

>>> Since I generally build in order to learn, this is a major reason for me 
>>> not to build said project. 
>> Yup.  Or, at least to be able to *build* on their ideas
>> (things they didn't think of or didn't implement well)
> Exactly. Rarely does the published design exactly meet my needs, I want 
> to modify it. And that may mean modifying the firmware too.
>>> Anotehr disadvantage is that their computer-related projects invariably 
>>> have Windows software. The sources of that may not be available, the link 
>>> between the PC and the project (RS232, USB, parallel ports) may not be 
>>> properly documented. 
>> This is true here (US), as well.  Its as if the idea of something
>> *other* than a PC never crosses their mind...
> I don't expect them to support all my old machines, but I wish they'd let 
> _me_ do so by documentign the interface properly. If a device plugs into 
> a serial port and uses the Tx and Rx line conventionally, then I'd like 
> to know what commands I can send the device, and how it responds. Or 
> alternatively, give me the source to the firmware and/or the PC program 
> and I'll work it out.

Exactly.  After all, these publications are intended for people
who *can* do that sort of thing!

>> I wonder if the *apparent* (? unsubstantiated by hard numbers)
>> prevalence of hobbyists on your side of the pond has anything
>> to do with economics?  I recall (when working with a firm in
>> Manchester) that many components that were dirt cheap here
>> were quite "dear", there.  And, the "pounds = dollars"
>> relationship means things are effectively (i.e. from *my*
>> point of view) 60 - 80% more expensive than they would be,
>> here.
> I've heard economic arguments (mostly as a reason for not homebrewing) 
> many times before, and I don't believe it's the whole story... Let me go 
> off at a tangent for a moment.
> All my life I've been interested in clocks, and one day I intend to make 
> a real mechanical clock. I'll have to get a lot better at machining 
> first, but I still want to do it.
> Economically, this makes no sense at all. To make a clock from scratch 
> probably needs \pounds 5000 to \pounds 10000 worth of tools (many of 
> which i have, it's true, but I'd still need to get gear cutters, etc and 
> they're not cheap). The metal to make said clock is around \pounds 100. 
> And the result is a much worse timekeeper than a 5 quid quartz clock from 
> the local household shop.

Of course.  Nor does collecting old computers!  :>

> But I still want to do it, to learn, and to have the enjoyment of making 
> it. And it appears others do likewise. There's at least one magazine 
> which has an article every month on desinging/making a clock (and other 
> articles on making parts as part of antique clock restoration). There are 
> many books and plans for homebuilt clocks. So I can't be alone in wanting 
> to do this.

I share the avocation -- though most of the clocks I build are
electronic and just play with unique ways of displaying the time
(e.g., in Braille, etc. -- think about it!  :> )

> Now lets get back to computers. The difference in performance between a 
> homemade mechanical clock and a quartz clock is probably comparable to 
> the difference in performance between a modern PC and a homebuilt 
> processor. The tools needed to make a homebuilt processor are cheaper 
> than those needed to make a clock, thouygh. And yet, I've not seen one 
> book or magazine article on making a processor from scratch in the last 
> 10 years. 

I think once the 2901 "fell from grace" (?), this became a thing
of the past.  I've designed two processors "from scratch" (TTL
with bipolar ROMs for the microcode store) and found it quite
an interesting exercise.  Not just the "logic design" but
actually thinking about what the instruction set should be
for that particular application domain, etc.

But, nowadays, I think it would be a lot less tedious if you
could do it in a big FPGA using synthesis tools.  You could
get better test vector coverage (and *generation* of those
by the toolchain!) instead of having to design vectors from
scratch and single step the microcode (hint:  fully synchronous
designs really off big, here!)

> If some people think it's worth making a clock from scratch, why not a 
> processor.
> I will end with a wuote from a book entitled 'Every Boy his own 
> Mechanic', published about 90 years ago. It's the start of a chapter on a 
> home-made telephone system
> ' For some years previous to 1914 the constructive instinct and ability 
> inherent in many of us was almost snuffed out because most of the 
> mechanical and electrical things we wished to possess were so cheap that 
> they could be bought ready made. Often the prices quoted were actually 
 > below the cost to us of the raw materials, and so we came to think that

<grin>  I guess things never change!  :>

> constructive hobbies were a bit futile. Lots of those cheap things were 
> amazingly good, but some where exasperatingly bad, and the bulk 
> indifferent. Still, we bought the stuff, learned nothing from it, and 
> clean missed all the solid satisfaction that lives for ever in building 
> and contriving and creating


> And that is exactly how I feel about homebrewing electronic devices now.

So, is it your opinion that the "build it" mentality is
so individualistic that the differences in attitudes towards
it between our sides of the pond are more *cultural* (of
yet, undetermined origins) than anything else?  E.g., the
US "disposable" society, consumerism, materialism, etc.?

More information about the cctech mailing list