Toy computers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Toy computers

David T. Lewis
Hi,

I am a lurker on this list, but a long time Squeak participant. When I
was a child, my parents gave me an interesting toy - a DigiComp I plastic
mechanical computer <http://en.wikipedia.org/wiki/Digi-Comp_I>. I always
remembered that toy, and it makes me wonder if computing machines could
be assembled by children using objects in Etoys.

If I wanted to assemble a simple computer, I would probably start by
connecting some registers and an accumulator, then figure out how to make
the bits move, like cycling the plastic clock lever on my DigiComp I.
So the first thing I might need would be a register object that does
arithmetic and logic operations when I push the lever.

I don't know much about writing morphs and making them work in the Etoys
environment, but I can write Smalltalk so I started by constructing some
basic register building blocks. First I made a BitRegister, which is a
simple one-bit computing element. Then I made a TwosComplementRegister,
which uses a collection of BitRegisters to make a more useful general
purpose register and accumulator of any size. I decided that using
numbers to implement arithmetic would be cheating, so it's all done
with booleans instead.

That's as far as I have gotten this weekend, but you get the idea. If I
could turn these register building blocks into graphical Etoys morphs,
then figure out how to assemble them into an arithmetic-logic unit, and
tie that together with an instruction interpreter, then pretty soon it
might turn into something interesting and fun for learning.

The register objects are on SqueakSource in project "Twos Complement"
at <http://www.squeaksource.com/TwosComplement>.

Collaborators welcome.

Dave

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

dcorking
David T. Lewis wrote at
http://lists.squeakland.org/pipermail/etoys-dev/2011-October/006441.html

> I don't know much about writing morphs and making them work in the Etoys
> environment,

I am not sure if the process to make an Etoys morph is fully documented.

However, one better is an automated tool that Richo made last year:
http://www.squeaksource.com/EtoyMaker.html

(I cc'd the users list, because there are graphical ways that young
Etoys users can use to solve logical problems or build logic machines.
For one approach of many, open an Etoys image, click the Gallery of
Projects bubble, and then "ComputerLogicGame" the third project of the
third row in Etoys 4.1)

> I decided that using
> numbers to implement arithmetic would be cheating, so it's all done
> with booleans instead.

I quite agree!

Have you a target processor in mind?  Last year, a friend lent me a
copy of Donald Knuth's 'Art of Computer Programming' Vol. 1, and ever
since then I have thought that a model of the MIX computer would be an
interesting Etoy. However I think there are simpler learning computers
that could be modelled, though I don't know their names let alone
their specifications.

I guess one approach could be to encourage a learner to experiment
with different architectures.

David
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Karl Ramberg
In reply to this post by David T. Lewis
Cool project.
It would be nice to play with a project like this :-)
I think you should play with Etoys a bit to get to know the
environment and how your electronic component
system could be added.

Etoy reference under development:
http://www.gosargon.com/EtoysReferenceManualV0.8.pdf

A EtoyMorph is is any morph.
You can make scripting additions on the class side that contain the
special additions the morph make.
Note that Etoys have limited number of types!
These additions must be added to Player as well.
So if your morph has a variable called 'adder' that can be read and
written you usually add a getAdder and setAdder: in the class
additions side of the morph. And you also put getAdder and setAdder:
to Player.

Etoys have a little different collection library. It uses holders,
PasteUpMorphs, that can contain quite a big variety of objects. To use
it as a programming collection you must be a little creative.

Feel free to ask if you run into issues on your way

Karl






On Mon, Oct 3, 2011 at 5:01 AM, David T. Lewis <[hidden email]> wrote:

> Hi,
>
> I am a lurker on this list, but a long time Squeak participant. When I
> was a child, my parents gave me an interesting toy - a DigiComp I plastic
> mechanical computer <http://en.wikipedia.org/wiki/Digi-Comp_I>. I always
> remembered that toy, and it makes me wonder if computing machines could
> be assembled by children using objects in Etoys.
>
> If I wanted to assemble a simple computer, I would probably start by
> connecting some registers and an accumulator, then figure out how to make
> the bits move, like cycling the plastic clock lever on my DigiComp I.
> So the first thing I might need would be a register object that does
> arithmetic and logic operations when I push the lever.
>
> I don't know much about writing morphs and making them work in the Etoys
> environment, but I can write Smalltalk so I started by constructing some
> basic register building blocks. First I made a BitRegister, which is a
> simple one-bit computing element. Then I made a TwosComplementRegister,
> which uses a collection of BitRegisters to make a more useful general
> purpose register and accumulator of any size. I decided that using
> numbers to implement arithmetic would be cheating, so it's all done
> with booleans instead.
>
> That's as far as I have gotten this weekend, but you get the idea. If I
> could turn these register building blocks into graphical Etoys morphs,
> then figure out how to assemble them into an arithmetic-logic unit, and
> tie that together with an instruction interpreter, then pretty soon it
> might turn into something interesting and fun for learning.
>
> The register objects are on SqueakSource in project "Twos Complement"
> at <http://www.squeaksource.com/TwosComplement>.
>
> Collaborators welcome.
>
> Dave
>
> _______________________________________________
> etoys-dev mailing list
> [hidden email]
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

David T. Lewis
In reply to this post by dcorking
Thanks to all for the suggestions and Etoys tips. I'm looking forward to
finding a few more free weekends to play around with these ideas. A few
comments below:

On Sun, Oct 02, 2011 at 09:13:08PM -0700, Casey Ransberger wrote:
>
> Have you looked at Chuck Thacker's Tiny Computer? It's in Points of View,
> that book they did for Alan's birthday.
>
On Mon, Oct 03, 2011 at 09:16:24PM +0100, David Corking wrote:
>
> Have you a target processor in mind?  Last year, a friend lent me a
> copy of Donald Knuth's 'Art of Computer Programming' Vol. 1, and ever
> since then I have thought that a model of the MIX computer would be an
> interesting Etoy. However I think there are simpler learning computers
> that could be modelled, though I don't know their names let alone
> their specifications.

Both good ideas, although perhaps a bit ambitious for children to get
started with. I can't help but mention also that Squeak itself has a good
target machine: the Squeak VM. It has a byte coded instruction set and
it comes with an interpreter written in Squeak. The Smalltalk implementation
(which is called the "interpreter simulator" and which nowadays is kept
in the VMMaker package on SqueakSource) is a complete working virtual
machine, and if you changed it around a bit to use Etoys registers rather
than "cheating" and using integers, then it might well become a working
"visual Squeak VM". Of course it would not be very fast, but that's not
the point ;)

On Mon, Oct 03, 2011 at 09:16:24PM +0100, David Corking wrote:
>
> I guess one approach could be to encourage a learner to experiment
> with different architectures.

I like this idea the best, especially if it encourages learners to
try things like "what is the simplest machine I can make that can
add 2 plus 2?" and "how wide do my registers be if I want to multiply
3 times 5?" and "what happens to the result if my register is not
big enough?".

On Tue, Oct 04, 2011 at 08:46:19AM +0200, Markus G??lli wrote:
> And you might want to use connectors as exemplified in
>  http://scg.unibe.ch/download/petitpetri/
> a petri net editor built with Etoys.

That's a great idea, Connectors would be just right for wiring together
the data paths.

Dave

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Jecel Assumpcao Jr
David,

the problem with your plastic logic toy was that it had a single level.
Simple projects were simple and understandable, but more complicated
ones would get out of hand. In the same way, I feel that the solution is
to have a sequence of Etoys projects where what you build in one is a
basic block in another. You can either go bottom up (better for concrete
thinkers) or top down (abstract thinkers like this).

Here is a college level course that does this:

http://www.cs.huji.ac.il/course/2006/nand2tet/

http://www.youtube.com/watch?v=JtXvUoPx4Qs (10 minute video)

http://video.google.com/videoplay?docid=7654043762021156507 (61 minute
video)

Starting with NAND and building everything on that is cute from a
mathematical viewpoint, but it I would start by showing the basic gates
in terms of switches and lamps (there is an Etoys project for this, I
think) or in terms of colored rectangles for CMOS chips (perhaps this
could be done in Kedama in a reasonable way).

Their processor is really pathetic, but they only use it to implement a
Java-like virtual machine and then use that from then on. The Squeak VM
could be used as an alternative, but it is very complicated compared to,
for example, the one in Little Smalltalk.

Chuck Thacker's TinyComputer designs are simply wonderful, but by
implementing it as a very compact Verilog description there is just too
much magic for someone who hasn't seen the logic gates and lower levels.
There is no reason not to implement it as a schematic, however.

I have a very long list of educational processors you can look at, if
you want. Some have been implemented in TTLs, others in FPGAs and still
others just as simulators running on PCs. Here is one of my favorites:

http://www.bradrodriguez.com/papers/piscedu2.htm

-- Jecel

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Karl Ramberg
In reply to this post by David T. Lewis
I have not tested this game, but it seems pretty cool.
Simulates chemistry, but it could just as well be a cpu.
http://spacechemthegame.com/

Karl

On Thu, Oct 6, 2011 at 12:12 AM, Jecel Assumpcao Jr.
<[hidden email]> wrote:

> David,
>
> the problem with your plastic logic toy was that it had a single level.
> Simple projects were simple and understandable, but more complicated
> ones would get out of hand. In the same way, I feel that the solution is
> to have a sequence of Etoys projects where what you build in one is a
> basic block in another. You can either go bottom up (better for concrete
> thinkers) or top down (abstract thinkers like this).
>
> Here is a college level course that does this:
>
> http://www.cs.huji.ac.il/course/2006/nand2tet/
>
> http://www.youtube.com/watch?v=JtXvUoPx4Qs (10 minute video)
>
> http://video.google.com/videoplay?docid=7654043762021156507 (61 minute
> video)
>
> Starting with NAND and building everything on that is cute from a
> mathematical viewpoint, but it I would start by showing the basic gates
> in terms of switches and lamps (there is an Etoys project for this, I
> think) or in terms of colored rectangles for CMOS chips (perhaps this
> could be done in Kedama in a reasonable way).
>
> Their processor is really pathetic, but they only use it to implement a
> Java-like virtual machine and then use that from then on. The Squeak VM
> could be used as an alternative, but it is very complicated compared to,
> for example, the one in Little Smalltalk.
>
> Chuck Thacker's TinyComputer designs are simply wonderful, but by
> implementing it as a very compact Verilog description there is just too
> much magic for someone who hasn't seen the logic gates and lower levels.
> There is no reason not to implement it as a schematic, however.
>
> I have a very long list of educational processors you can look at, if
> you want. Some have been implemented in TTLs, others in FPGAs and still
> others just as simulators running on PCs. Here is one of my favorites:
>
> http://www.bradrodriguez.com/papers/piscedu2.htm
>
> -- Jecel
>
> _______________________________________________
> etoys-dev mailing list
> [hidden email]
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Karl Ramberg
Here is a circuit simulator made in java. More advanced than the one in Etoys

http://www.falstad.com/circuit/

Karl

On Sat, Oct 8, 2011 at 6:27 PM, karl ramberg <[hidden email]> wrote:

> I have not tested this game, but it seems pretty cool.
> Simulates chemistry, but it could just as well be a cpu.
> http://spacechemthegame.com/
>
> Karl
>
> On Thu, Oct 6, 2011 at 12:12 AM, Jecel Assumpcao Jr.
> <[hidden email]> wrote:
>> David,
>>
>> the problem with your plastic logic toy was that it had a single level.
>> Simple projects were simple and understandable, but more complicated
>> ones would get out of hand. In the same way, I feel that the solution is
>> to have a sequence of Etoys projects where what you build in one is a
>> basic block in another. You can either go bottom up (better for concrete
>> thinkers) or top down (abstract thinkers like this).
>>
>> Here is a college level course that does this:
>>
>> http://www.cs.huji.ac.il/course/2006/nand2tet/
>>
>> http://www.youtube.com/watch?v=JtXvUoPx4Qs (10 minute video)
>>
>> http://video.google.com/videoplay?docid=7654043762021156507 (61 minute
>> video)
>>
>> Starting with NAND and building everything on that is cute from a
>> mathematical viewpoint, but it I would start by showing the basic gates
>> in terms of switches and lamps (there is an Etoys project for this, I
>> think) or in terms of colored rectangles for CMOS chips (perhaps this
>> could be done in Kedama in a reasonable way).
>>
>> Their processor is really pathetic, but they only use it to implement a
>> Java-like virtual machine and then use that from then on. The Squeak VM
>> could be used as an alternative, but it is very complicated compared to,
>> for example, the one in Little Smalltalk.
>>
>> Chuck Thacker's TinyComputer designs are simply wonderful, but by
>> implementing it as a very compact Verilog description there is just too
>> much magic for someone who hasn't seen the logic gates and lower levels.
>> There is no reason not to implement it as a schematic, however.
>>
>> I have a very long list of educational processors you can look at, if
>> you want. Some have been implemented in TTLs, others in FPGAs and still
>> others just as simulators running on PCs. Here is one of my favorites:
>>
>> http://www.bradrodriguez.com/papers/piscedu2.htm
>>
>> -- Jecel
>>
>> _______________________________________________
>> etoys-dev mailing list
>> [hidden email]
>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>>
>
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Karl Ramberg
And a bunch of CPU simulators:

http://maven.smith.edu/~thiebaut/classes/364/simulators/


Karl


On Sun, Oct 9, 2011 at 6:09 PM, karl ramberg <[hidden email]> wrote:

> Here is a circuit simulator made in java. More advanced than the one in Etoys
>
> http://www.falstad.com/circuit/
>
> Karl
>
> On Sat, Oct 8, 2011 at 6:27 PM, karl ramberg <[hidden email]> wrote:
>> I have not tested this game, but it seems pretty cool.
>> Simulates chemistry, but it could just as well be a cpu.
>> http://spacechemthegame.com/
>>
>> Karl
>>
>> On Thu, Oct 6, 2011 at 12:12 AM, Jecel Assumpcao Jr.
>> <[hidden email]> wrote:
>>> David,
>>>
>>> the problem with your plastic logic toy was that it had a single level.
>>> Simple projects were simple and understandable, but more complicated
>>> ones would get out of hand. In the same way, I feel that the solution is
>>> to have a sequence of Etoys projects where what you build in one is a
>>> basic block in another. You can either go bottom up (better for concrete
>>> thinkers) or top down (abstract thinkers like this).
>>>
>>> Here is a college level course that does this:
>>>
>>> http://www.cs.huji.ac.il/course/2006/nand2tet/
>>>
>>> http://www.youtube.com/watch?v=JtXvUoPx4Qs (10 minute video)
>>>
>>> http://video.google.com/videoplay?docid=7654043762021156507 (61 minute
>>> video)
>>>
>>> Starting with NAND and building everything on that is cute from a
>>> mathematical viewpoint, but it I would start by showing the basic gates
>>> in terms of switches and lamps (there is an Etoys project for this, I
>>> think) or in terms of colored rectangles for CMOS chips (perhaps this
>>> could be done in Kedama in a reasonable way).
>>>
>>> Their processor is really pathetic, but they only use it to implement a
>>> Java-like virtual machine and then use that from then on. The Squeak VM
>>> could be used as an alternative, but it is very complicated compared to,
>>> for example, the one in Little Smalltalk.
>>>
>>> Chuck Thacker's TinyComputer designs are simply wonderful, but by
>>> implementing it as a very compact Verilog description there is just too
>>> much magic for someone who hasn't seen the logic gates and lower levels.
>>> There is no reason not to implement it as a schematic, however.
>>>
>>> I have a very long list of educational processors you can look at, if
>>> you want. Some have been implemented in TTLs, others in FPGAs and still
>>> others just as simulators running on PCs. Here is one of my favorites:
>>>
>>> http://www.bradrodriguez.com/papers/piscedu2.htm
>>>
>>> -- Jecel
>>>
>>> _______________________________________________
>>> etoys-dev mailing list
>>> [hidden email]
>>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>>>
>>
>
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Jecel Assumpcao Jr
Karl Ramberg wrote on Sun, 9 Oct 2011 18:16:09 +0200
> And a bunch of CPU simulators:
>
> http://maven.smith.edu/~thiebaut/classes/364/simulators/

And on Sun, Oct 9, 2011 at 6:09 PM,:
> > Here is a circuit simulator made in java. More advanced than the one in Etoys
> >
> > http://www.falstad.com/circuit/

And on Sat, Oct 8, 2011 at 6:27 PM:
> >> I have not tested this game, but it seems pretty cool.
> >> Simulates chemistry, but it could just as well be a cpu.
> >> http://spacechemthegame.com/

These are all very good suggestions, thanks! I had seen the Java circuit
simulator and it is a good example of what I said: it will let you
understand the basics in detail but then you move on to one of the other
tools for larger designs. For a computer architecture course I helped
with in the first half of this year, we used the WinMIPS64 simulator,
which is a modification of the WinDLX tool. There is a Java version of
WinMIPS64, but it is less complete.

One tool that is interesting because it is written in Smalltalk
(VisualWorks) is IDaSS

http://averschu.home.xs4all.nl/idass/

Some variation of this integrated with Etoys would be very interesting
for me.

What I have been using the most, however, is TkGate. This tool is
written in Tcl and C and the projects can use a mix of schematics and
Verilog. It is very interactive, which makes it good for both
development and education.

http://www.tkgate.org/

One of the examples is an 8 bit processor running the animal guessing
game on a simulated terminal. There is a tool which helps generate
binaries from assembly and microcode assembly source texts.

-- Jecel

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev
Reply | Threaded
Open this post in threaded view
|

Re: Toy computers

Karl Ramberg
In reply to this post by Karl Ramberg
On Tue, Oct 11, 2011 at 9:22 PM, Jecel Assumpcao Jr.
<[hidden email]> wrote:

> Karl Ramberg wrote on Sun, 9 Oct 2011 18:16:09 +0200
>> And a bunch of CPU simulators:
>>
>> http://maven.smith.edu/~thiebaut/classes/364/simulators/
>
> And on Sun, Oct 9, 2011 at 6:09 PM,:
>> > Here is a circuit simulator made in java. More advanced than the one in Etoys
>> >
>> > http://www.falstad.com/circuit/
>
> And on Sat, Oct 8, 2011 at 6:27 PM:
>> >> I have not tested this game, but it seems pretty cool.
>> >> Simulates chemistry, but it could just as well be a cpu.
>> >> http://spacechemthegame.com/
>
> These are all very good suggestions, thanks! I had seen the Java circuit
> simulator and it is a good example of what I said: it will let you
> understand the basics in detail but then you move on to one of the other
> tools for larger designs.

The Pippin simulator is quite fun.
I have issues with it, it will not save it's state because of some
java security setting.
But it is also part of a bigger site: The Analytical Engine
http://www.brookscole.com/compsci_d/templates/student_resources/0534953654_deckerhirchfield/aeonline/course/index.html

Site is quite old but it looks like a nice place to read up on
different topics in computing for students and interested people.
Karl
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev