Shop OBEX P1 Docs P2 Docs Learn Events
My Retro Computing Bug — Parallax Forums

My Retro Computing Bug

Martin_HMartin_H Posts: 4,051
edited 2014-07-22 06:36 in General Discussion
A few weeks ago I mentioned that I was somewhat quiet in the forum because I had been bitten by the retro computing bug. Heater expressed come curiosity about what I was up to, and I'm finally getting around to writing something. I was slow in doing that because work has been pretty crazy too.

My retro computer is a 6502 computer with a video display, 22 GPIO pins, a joystick port, a serial port, and expansion bus. It turns out there are many good designs available on the 6502 forum, which made this project much easier than starting from scratch. You still need to learn the ins and outs of address decoding, memory mapped I/O, and debugging on a bare metal environment. In order to program the computer I built an EEPROM burner which I just documented here:

I've used that to put a machine language monitor and something called ehBasic on the board. So far the programs are pretty simple things like blinking an LED. Here's a code sample:
10 REM Set up common VIA2 constants
20 PB=$7f60
30 DB=$7f62
40 REM Set VIA2.PB0 as output
50 BITSET DB,0
60 FOR X = 0 TO 16
70 BITSET PB,0
80 GOSUB 200
90 BITCLR PB,0
100 GOSUB 200
110 NEXT X
120 END
200 REM Delay loop
210 FOR Y=1 TO 50
220 NEXT Y
230 RETURN

What's next is using the 6522's one shot timer to allow toggling pin in the background and generate servo and stepper motor pulses.

tl;dr I built a Basic Stamp that's about 7" by 5".

Comments

  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 12:38
    Martin,

    Cool, well done with the 6502 and the PROM burner. Any pics of the computer?

    Now I'm curious as to what the young man hiding in the background is up to. He should have a soldering iron in hand at his age:)
  • tritoniumtritonium Posts: 543
    edited 2014-07-20 13:22
    Hi
    Back in the old days I used a rom emulator which was a battery backed cmos ram. It saved a lot of rom blowing and program update turn around, and the program was still there when power was restored. To program we used a pc parallel port and some 374's. The 374's sat on the ram bus, the cpu was sent a busreq, the new code loaded in the ram, the 374's were tristated, the busreq released along with a reset and of you go. Took a few seconds- literaly. These days we only have usb or radio. Not sure how I would go about it now... something to think about...
    Yep a cheap cpu, usb uart and that should do it - enough I/O on the cpu I wonder... if not an 8 bit latch would do it.
    My favourate cpu/microcontroller was the Z8 (not to be confused with the Z80), but it had no rom unlike todays micro's , but did have some I/O, serial, a/d etc. Worked well with the 'romulator'.
    Happy days
    Dave
  • GadgetmanGadgetman Posts: 2,436
    edited 2014-07-20 15:09
    I'd offer to lend you my EPROM burner, except... shipping it across the pond would be rather expensive. Also, the SW for it runs in DOS and needs a parallell port.

    The Battery-backed RAM is an oldie but goodie, and heartily recommended. Save a lot of agony.
    (You're usually halfway through burning an EPROM when you get that sinking feeling and you just KNOW there's a serious bug in there)

    My favorite CPU is the Z80.
    I my have mentioned it once or twice in the Old School Hacker thread...
    http://forums.parallax.com/showthread.php/62327-Old-School-Hackers

    Right now I'm waiting for my Maximite BBX to ship:
    https://www.kickstarter.com/projects/818225433/maximite-bbx-the-modern-day-basic-language-compute
  • jazzedjazzed Posts: 11,803
    edited 2014-07-20 15:52
    Follow your heart. ;-)

    I've had a couple of these 65xx parts on a breadboard for probably 20 years. Wrote a 6502 ASM program long ago and ran some programs written with it. Never got too far with it all as it was a passing fancy. Basic was never really my thing. I used PBasic much more than the Dartmouth line number stuff.

    Why don't you use one or two Propellers for the EEPROM? That would be more Rube-Goldbergy.
  • ercoerco Posts: 20,256
    edited 2014-07-20 16:28
    Most excellent, Martin_H!

    There are plenty of C64 emulators (OK, 6510) available that are also fun to play with...

    http://codeazur.com.br/stuff/fc64_final

    10 FOR A=1 to 100
    20 PRINT A
    30 NEXT
  • Martin_HMartin_H Posts: 4,051
    edited 2014-07-20 18:41
    Here's a video showing the video output and the LED blink sample on one of the GPIO pins.
  • Heater.Heater. Posts: 21,230
    edited 2014-07-20 21:06
    Cool. That is a neat looking board. Yes, wire wrapping things like that is a drag, I did quite a bit of that when developing boards back in the early 1980's. But if you get into "the zone" it can be quite relaxing. Like old ladies knitting or something:)

    I picked up a couple of Motorola 68000 from a local electronics store a few weeks back. They are calling to me for such a board. That might take some time...
  • David BetzDavid Betz Posts: 14,516
    edited 2014-07-21 18:15
    Martin_H wrote: »
    Here's a video showing the video output and the LED blink sample on one of the GPIO pins.
    Very cool! I like the 6502. I've built a number of 6502-based retro-computers using kits from Vince Briel. This one sounds pretty interesting as well. Can you say where you got the PCB?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2014-07-21 19:47
    This is soo cool! (and a very temping squirl to chase) -- Must get current projects done.. Must get current projects done.. Must get.....
  • David BetzDavid Betz Posts: 14,516
    edited 2014-07-21 20:03
    This is soo cool! (and a very temping squirl to chase) -- Must get current projects done.. Must get current projects done.. Must get.....
    I'm pretty good at putting projects together but not so good at doing anything useful with them once they're done. I need to get better at that! However, I like assembling kits. It's sort of like putting together jigsaw puzzles.
  • GadgetmanGadgetman Posts: 2,436
    edited 2014-07-22 00:29
    Yeah, building it is where the real fun lies!

    I really enjoy jigsaw puzzles(have at least 2 dozen 1000piece or larger, stored in the attic. All finished, then carefully split into sections that fit on top of A4 sheets and packed in zip-lock bags... Yeah, I'm weird... A 1000piece puzzle is normally done on a lazy sunday. a 2000piece puzzle is for the entire weekend. )
    Haven't finished the 6000piece puzzle I have, though. Need a LARGE table for it.

    I've spent more time building my RC gliders than flying them.
    (A classic Carl Goldberg Gentle Lady, a Ridge Runt clone and a delta-wing. Only the Delta-wing had foam. The others were all balsa profiles)
    Got the drawings for a ME 263b now.
    (That's a project for the winter. Same with a Horten-inspired design)

    Too many projects... not enough space...
  • Heater.Heater. Posts: 21,230
    edited 2014-07-22 00:42
    David,
    I'm pretty good at putting projects together but not so good at doing anything useful with them once they're done.
    No, no, you don't get the idea. It's the research, experimenting, building, testing and just general learning and doing that is the fun. If the result of any of that is actually useful is beside the point. It would not help if it was useful, you won't have any time to play with it because you will be busy chasing the next idea.

    It was a bit different back in the day of the electronics hobby, things were expensive and hard to get hold of so one would bootstrap oneself, first build a bench power supply, then a signal generator, then a logic probe, a PROM programmer, etc etc, and then get on with some project idea, if you ever got that far...

    Useful stuff is for work. The last useful project I completed at home was probably that digital clock I built around 1973!

    Gadgetman,

    Yes, seems you are weird :)
  • trookstrooks Posts: 228
    edited 2014-07-22 03:10
    David Betz wrote: »
    I'm pretty good at putting projects together but not so good at doing anything useful with them once they're done. I need to get better at that! However, I like assembling kits. It's sort of like putting together jigsaw puzzles.

    If you find a kit for this please let me know.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-07-22 04:16
    trooks wrote: »
    If you find a kit for this please let me know.
    Sometimes buying a bare PCB and sourcing your own parts is fun. Got to be careful that you don't miss any parts in your order though so you don't find yourself having to order a single $.10 resistor with a $5 shipping charge! :-)
  • Heater.Heater. Posts: 21,230
    edited 2014-07-22 04:35
    I do like a good kit. A nice virgin new PCB, all the components, no hunting around for parts, a few relaxing hours "painting by numbers" and best of all it generally works when its built, all development problems sorted out for you!

    Totally the opposite to building your own creation with all it's mysterious problems, mistakes, frustration, head banging. That looks like something the cat disemboweled when it's done.

    Aside: A quick google tells me that the above is the correct spelling of disemboweled. But also that only 354,000 pages were found that use it. Is it really such a rare word? And why does my browser underline it as a spelling error?
  • tritoniumtritonium Posts: 543
    edited 2014-07-22 05:35
    I do like a good kit. A nice virgin new PCB, all the components, no hunting around for parts, a few relaxing hours "painting by numbers" and best of all it generally works when its built, all development problems sorted out for you!

    Totally the opposite to building your own creation with all it's mysterious problems, mistakes, frustration, head banging. That looks like something the cat disemboweled when it's done.
    True - so true - however...
    When its done its done... so soon... those hours and hours of head banging are the reason I (usually) write my own 'routines' rather than look for libraries, design my own hardware, then redesign etc etc until- it works and hey- its all my own work- the satisfaction.
    I don't actually have a REAL use for all the devices I've interfaced and built, it was done for the most part just for the sense of satisfaction of doing it. Of course this is a hobbyist viewpoint, a luxury I expect that those that earn their keep by doing this cant afford-(sadly).
    Still it doesn't stop me lurking around the forum and looking for inspiration and ideas, (and there are plenty), but I do like to go through the struggle bit without admitting defeat, if I can.
    Dave
  • Heater.Heater. Posts: 21,230
    edited 2014-07-22 05:48
    tritonium,

    I know what you mean. There is a great satisfaction in the long hard struggle with reality, beating it into submission, and getting anything to do what you want it to do. You have mastered it, no matter how useless "it" is. (Of course this is reality I'm talking about so actually it's the other way round, "it" has taught you a lesson in how to proceed).

    It's always a bit deflating when you proudly show off your creation to her indoors and get a response like "That's nice, the lawn needs mowing and then come and eat dinner." Her indoors having learned years ago not to bother with questions like: "What is it" and "What does it do?"

    Edit:
    Of course this is a hobbyist viewpoint, a luxury I expect that those that earn their keep by doing this cant afford-(sadly).
    Sort of true. But considering how may projects fail or get cancelled in the places where people earn their keep doing it and give the technical understanding of many of their bosses, the situation is not much different than I describe above:)
  • tritoniumtritonium Posts: 543
    edited 2014-07-22 06:05
    Heater,

    Ah yes her indoors - well I guess it works both ways, my better arf excitedly showed me her latest bit of quilting called 'dresden plate' and I'm afraid I gave her one of those looks she gives me, so...

    Dave
  • Heater.Heater. Posts: 21,230
    edited 2014-07-22 06:12
    tritonium,

    Careful. That kind of mistake could get you sleeping in the dog house for a stretch.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-07-22 06:36
    David Betz wrote: »
    Very cool! I like the 6502. I've built a number of 6502-based retro-computers using kits from Vince Briel. This one sounds pretty interesting as well. Can you say where you got the PCB?

    The 6502 board was originally designed by Daryl Rictor and improved by Rich Cini. Rich had a batch of PCB's made so I jumped on the chance to get one rather than order one myself. Here are the links:

    Daryl Rictor's SBC 2.5: http://sbc.rictor.org/info2.html

    Rich Cini's SBC 2.7: http://www.classiccmp.org/cini/6502proj.htm
    David Betz wrote: »
    Sometimes buying a bare PCB and sourcing your own parts is fun. Got to be careful that you don't miss any parts in your order though so you don't find yourself having to order a single $.10 resistor with a $5 shipping charge! :-)

    I was the first person to build the revised design and the list of materials spread sheet had one part omitted, and the quantity for another shy by one. I had to submit another order for two parts. Rich updated the spreadsheet so the next person won't get bitten.
  • In case anyone is curious, my retro computer now has an SD card reader and case:

  • ercoerco Posts: 20,256
    edited 2015-10-26 04:01
    Beautiful! Love the box and modularity. Keep at it and keep updating!

    BTW, I want to see your whole box to do the Figure 8 challenge.
  • Martin,

    Great work! I'm taking on the retro computer adventure myself. I have already built a Propeller and an Arduino Due based SD card readers that converts files to an audio output compatible with a ZX81. I also have a DE0-Nano running ZX-Gate which is a softcore ZX81 running at 3.3V for interfacing to a Propeller. I'm planning on using the Propeller as an IO interface for sound, PS2 Keyboard and joystick interfacing.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-10-26 14:59
    If any of you that have a great passion for Z80 or 8080 are interested, I have three TINI motherboards from Dallas Semiconductor. One Model 390 and two model 400 boards. I think the Model 400 boards are the one's that have never been used.

    That is the DS80C400 processor with the DS_TINI-1 internet interface (include an RTC, 1-wire, I-Button socket, RS-232, and more).

    Be ready to put Java to use.
  • I've considered scratch building a Z80 board. I assembled an 8085 board back in the early 90s, but never really got it working. I think I still have it, maybe I'll give it another look. Those DS80C390/400 boards are interesting with many features, but don't seem to have much to do with Z80/8080 microprocessors.
  • Heater.Heater. Posts: 21,230
    Z80, Java, do what? Cats and dogs sleeping together?

    The mind boggles.

    If it ain't in a DIP it ain't a Z80.
  • Oddly enough my first programming racket was programming stuff on the Apple series of machines. By the time I had switched to the PC I had quite literally worked my way completely through the way those machines work.

    And remembered enough to assist an intern and an equally capable employee of a computer store here in Queens NY with a difficult problem.

    In fact this past April at the VCF East I found myself being confronted by a crowd of Apples and a table series of Macs. Suffice to say that story came in handy.

    By the way, erco, that robot who traveled by bus to Detroit managed to find himself across the Pond and then the North Sea.....
Sign In or Register to comment.