6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Jun 26, 2024 1:54 pm

All times are UTC




Post new topic Reply to topic  [ 119 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next
Author Message
PostPosted: Sat Sep 21, 2013 4:08 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 899
If you are going to bother with a Propeller, just stick with the Propeller - it's kind of fun by itself, in spite of its weird GUI thing. And I see there is a gcc toolchain for it now.

The question is - do we want to indoctrinate newbies into 6502-land, or just get them working with anything other then PCs and linux boxes like the Pi.

A small FPGA with a 6502 running on it is probably closer home than a 65C02 with a Propeller.

Most people will not solder up their own board, so the thing we are talking about is really software. There is a satisfaction of writing 6502 code and running it on bare metal. The FPGA is not an emulator. It feels a little like cheating perhaps, but it's pretty real when you assemble some code and run it.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 21, 2013 6:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8230
Location: Midwestern USA
Again, just my two cents worth, but I think everyone who is pushing the FPGA/Propeller/Raspberry PI, etc. approach is completely missing the point of creating a beginner's kit. "Features" of that sort only add opacity and hence decrease the teaching value of such a unit. If it is to maximize its potential as a teaching tool, this device should be:

  1. 65C02-powered, using a genuine WDC MPU, not a core running 65C02 emulation.
  2. Built with discrete logic of the 74AC or 74HC variety, using PDIPs where possible.
  3. Completely devoid of programmable logic, or extraneous devices of the Propeller type.
  4. Fitted with a socketed Ø2 clock generator oscillator.
  5. Equipped with at least 32KB of SRAM.
  6. Equipped with some basic I/O, at least a 65C22. I'd also use a dual ACIA, such as a 26C92 or similar, facilitating connection to external devices via TIA-232.
  7. Equipped with a socketed E(E)PROM containing the following software:

    • basic input/output system (BIOS)
    • basic interrupt system
    • machine language monitor

      The BIOS should be sufficient to drive the I/O hardware in a fashion that is consistent with talking to standard external hardware devices, such as a PC with a serial port.

  8. Fitted with headers that give access to the MPU's data and address buses.
  9. Built to be powered from an inexpensive 9 VDC wall-wart.
  10. Made available in ready-to-run (RtR) or kit form. Schematic, BoM, logic truth tables, ROM source code, etc., would be included.

I think it's important to understand the audience for this sort of thing. It won't be individuals who, as enso asserts, "...will not solder up their own board..." and are merely interested in acquiring yet another gadget (for these folks, I recommend a smart phone). The sort of person who would be interested in this proposed contraption would be motivated to really learn how the basic building blocks of all computers function, and will most likely already have some assembly skills (if not, s/he can get the RtR unit). At the same time, s/he would have something that could actually do something useful over and above blinking a few lights (Just how long would that hold someone's interest?).

As I said earlier, this has been discussed to death in the past, and the same crowd that participated in the last round of "creeping featurism" is again advocating the addition of all sorts of bells and whistles that are contrary to the notion of a teaching device. Go that way if you insist, but I (and I suspect a few others) won't get involved.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 21, 2013 7:00 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8230
Location: Midwestern USA
As an addendum to my previous diatribe, my POC unit almost fulfills the feature list I enumerated. Minus the SCSI host adapter (and corresponding BIOS code) it's merely a souped-up 65C02 contraption. In fact, the Dallas watchdog could be eliminated as a cost-saving measure, and the 26C92 DUART could take over time-keeping, as it has a 16-bit programmable counter/timer with sub-microsecond resolution that can generate jiffy IRQs.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 21, 2013 7:38 pm 
Offline

Joined: Sun Jul 28, 2013 12:59 am
Posts: 235
Dare I suggest advising to get a C64, Vic-20, or Apple ][ (][, ][+, ][e, but not //c or //gs, they ditched the expansion slots) on the used market, with disk drive, plus manuals, to use as a base system, then work in terms of the Commodore USER port or Apple expansion slots for hardware hacking? You get a basic, well-documented system to start with, some measure of graphics capability, mass storage, and I/O options for monkeying about with real hardware.

To go along with this, some sort of sdcard-based disk drive emulator might be a decent peripheral, as new five-and-a-quarter disks might not be easy to find these days.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 21, 2013 8:28 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1378
BDD,

I'm likely more in agreement with you here. This is pretty much what my little system is about. It started back in the late 80's and realized this year (long story). I took a simple approach making a small CPU card that has the CPU, ROM, RAM along with basic clocking, I/O decode and a 30-pin header for I/O boards, all with basic 74HC logic chips. DIPs are used exclusively.

The first I/O board is completed using a 6551 and 6522. A second board will likely contain a 6521 and RTC perhaps. It was intended for learning as well and allows more flexibility by not having any on board I/O, which is just a choice... and personal opinion.

Current software is borrowed (SyMon) but it allowed me to test the hardware quickly and I can now do more with it. Future goal is a standard BIOS and interrupt handler, and integrate a monitor, basic interpreter and some other bits and pieces over time.

A good friend's son (age 9) who is doing some cool stuff with the Lego mindstorms with Dad's help loved it as I showed him some things you can do with it... so you can use a small working system to generate interest with inquisitive kids.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 21, 2013 9:11 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 899
BDD, I agree completely. I am all for minimalism.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 1:25 am 
Offline

Joined: Sun Sep 15, 2002 10:42 pm
Posts: 214
nyef wrote:
Dare I suggest advising to get a C64, Vic-20, or Apple ][ (][, ][+, ][e, but not //c or //gs, they ditched the expansion slots)


This contains incorrect information.

Here's a photo of an Apple //gs motherboard:

http://www.recycledgoods.com/product/32 ... CC8Q9QEwAg

The Apple //gs has eight expansion slots: One for a GS-specific memory card, and seven standard Apple II slots.

It's the Apple //c and the //c+ that do not have expansion slots.

Toshi


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 1:44 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8230
Location: Midwestern USA
nyef wrote:
Dare I suggest advising to get a C64, Vic-20, or Apple ][ (][, ][+, ][e, but not //c or //gs, they ditched the expansion slots) on the used market, with disk drive, plus manuals, to use as a base system, then work in terms of the Commodore USER port or Apple expansion slots for hardware hacking?

That wouldn't do anything for the experimenter in terms of learning how the bare metal works. It's just an alternative to a Raspberry PI.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 5:58 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
BigDumbDinosaur wrote:
That wouldn't do anything for the experimenter in terms of learning how the bare metal works. It's just an alternative to a Raspberry PI


Why is learning this particular piece of bare metal more important than learning about other stuff ? I can look at a block diagram of a computer, and understand that the CPU is connected to the RAM, and what that means, without having to do it myself with a bunch of old DIP ICs on a circuit board. In fact, I've never done such a thing myself. Many people also look at a block diagram of a 6502 CPU and understand what "TAY" does without having to build their own CPU from discrete parts.

The level of "6502 CPU connected with 74 series logic to some EPROM/RAM" is just some arbitrary abstraction level, and probably not very appealing to young kids because it can't do anything interesting. It also doesn't teach much practical skills, because modern designs don't work that way.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 6:01 am 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10834
Location: England
Exactly so. There are many points on this line, and they result in different trade offs and different possible experiments.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 7:39 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
First about getting kids interested in programming at all, which is the challenge I'm faced with my ten-year-old daughter: So far, what has worked is the "parent programming language" as a very first step (http://drtechniko.com/2012/04/09/how-to ... our-robot/ is the official version, ours this year in the garden is here https://plus.google.com/109071687839775 ... hXXHKPuQRC), then switching to Turtle graphics under Python with IDLE -- we used that to explain variables, loops, and the write-test-debug principle. Just be prepared to let them think up silly names, our turtle was named Matschgesicht ("mud face") yesterday. We'll see how this turns out on the long run.

(My six-year-old son has been told he has to learn how to read first. Life is tough when you are small.)

As for the 6502 -- I wonder if it would make sense to start off with software only, a virtual machine with some sort, any sort of graphics, maybe like http://www.6502asm.com/ . Completely leave out the hardware part for a first step. Have some small examples for the very first steps. Then tell them where the RESET jump vector is. The hook would be that this will teach them to understand and control a computer at the very lowest level on a real, famous chip still in production, with god-like powers over every bit. Because, you know, everybody else is just fooling around on the surface. This is the deep magic.

During this first stage, we point out that they can, oh by the way, build a computer like this themselves for comparatively little money. This is taken up again at the end of the software phase with a standardized project to build a small 65c02 system on a breadboard. Yes, a breadboard. It will be flaky and it will be slow, but it will work. Everything else -- wirewrapping, PCB, whatever -- is just too expensive in terms of tools and effort. And even if they give up on the 6502, they will still have a breadboard and a 5 V power source for other experiments.

Of course, you can always skip the first stage.

Which still leaves us with the ROM problem. I wonder if it would be possible to set up a form of "Arduino ROM", where an UNO serves as the source of the kernel and monitor. This would provide greater flexibility, we can provide a framework for a sketch (but not too much more!) and again, if the 6502 project doesn't get finished, they'll have an Arduino in the house. You should be able to get most parents to buy one of those for you. Try that with a logic analyzer. My wife is skeptical about a logic analyzer.

And if you get through all of that, come to the forum and ask us about building it right.

The big picture would be to create a series of steps that start out simple and cheap, with each one leading to a success, and all of them pulling them a bit deeper down the rabbit hole, while providing some value even if they leave the 6502 path.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 8:44 am 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Arlet wrote:
Why is learning this particular piece of bare metal more important than learning about other stuff ? I can look at a block diagram of a computer, and understand that the CPU is connected to the RAM, and what that means, without having to do it myself with a bunch of old DIP ICs on a circuit board. In fact, I've never done such a thing myself. Many people also look at a block diagram of a 6502 CPU and understand what "TAY" does without having to build their own CPU from discrete parts.

The level of "6502 CPU connected with 74 series logic to some EPROM/RAM" is just some arbitrary abstraction level, and probably not very appealing to young kids because it can't do anything interesting. It also doesn't teach much practical skills, because modern designs don't work that way.


I don't think so. Only using the "software" layer, is not an option. Programming a 6502 emulator on a PC or on a raspberry is the same then programming a pc itself, not more. It's just one more abstraction layer. It's the same then comparing a high-level script language with something like C.
The basic thing in my understanding is to get the glue between those chips like CPU, RAM, ROM and I/O. Looking at a block-diagram everyone sees that those chips are connected to the same bus (data and address) but how does it work. how do I take care that writing or reading to or from the bus gets the right data from the right chip. this is point of deeper understanding how things work.

There are two different ways of learning things. The first is to get told what you have to do in a certain situation. If you see this, do this... etc. This is really fast in the fist steps, because you only react on known conditions.
The second way is to understand the basic principles of a problem. this is much harder, but gives you the chance of learning how to solve a complete class of problems. Combining this knowledge of "understanding basic principles" gives you even more power to solve complex problems.

So maybe we a to distinguish between

A) How to programm a 6502 system that has RAM, ROM and I/O to do certain things. How does reset and IRQ vectors work, how do I write my BIOS and some sort of OS (software side)
B) How do I build my own simple system from scratch (hardware side)
Both parts overlap, because you have to know your hardware to program it on a low level and you also need the software part once you build up your own system.

I like the breadboard idea of Scot, because you can provide a good step by step description how to build up such a system. running at 1 MHz should not be a problem on a breadboard. Ok, you get a lots of wires, but can easily check what's going on.
Providing preprogrammed EEPROMS would not be a problem I think. We have here a lot of people in the forum that could do that. We are spread good enough over the world ( north america, europe, etc.) to have short ways an proper shipping costs. Even assembling a small kit with everything that is needed should be possible. Has anybody thought about a kickstarter project for this?

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 9:07 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
mkl0815 wrote:
The basic thing in my understanding is to get the glue between those chips like CPU, RAM, ROM and I/O. Looking at a block-diagram everyone sees that those chips are connected to the same bus (data and address) but how does it work. how do I take care that writing or reading to or from the bus gets the right data from the right chip. this is point of deeper understanding how things work.


What's wrong with simply explaining that every device on the bus reacts to its own address ? The concept is simple enough to grasp, without the need to actually physically build it.

I agree it's nice to have a deeper understanding, but this focus on 80's parallel buses seems rather arbitrary. Why not go even deeper ? How does the RAM work inside ? How does the CPU work inside ? Or, go deeper in another direction. How does PCI Express work inside, or a 3D graphics accelerator ? There are thousands of other things to explore.

I think the key is to identify what the interests are of the young people, and stimulate them to deepen their knowledge in that area. Not try to force them in something that interests us, especially if that is of little practical value in the modern world.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 9:29 am 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10834
Location: England
Whether it's programming, digital circuits, or robotics, I'm sure the important thing is the motivation for each session. I bought an Arduino kit with an experiment book: a dozen or more things you could build. Every Lego kit comes with instructions for at least two models. The great advantage of the turtle graphics idiom is that you get interesting results right away.

This why blinking an LED or making a digital clock is good: there's a motivation.

For coding on a 6502, it's not so clear. Unless you restrict yourself to those kids with an abstract interest in numbers or the like.

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 22, 2013 9:42 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
BigEd wrote:
I bought an Arduino kit with an experiment book: a dozen or more things you could build.


It's a good place to start. And if a kid is interested in knowing more, you can go down to the bare metal on the AVR that's inside the kit. You can download the reference manual, and write peripheral registers in assembly level if you want to. That route has a lot of advantages. It's very easy to get started, with just a simple USB programming cable, and some free tools.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 119 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: