Shop OBEX P1 Docs P2 Docs Learn Events
Prop Z80 Computer — Parallax Forums

Prop Z80 Computer

jaegjaeg Posts: 156
edited 2012-11-13 17:23 in Propeller 1
So I've been trying to think of a way to make a simple computer where the memory map is completely modifiable allowing the system to mimic most computers. So far this is what I have:
PropZ80 computer .jpg


What this is doing is basically mapping the upper half of memory to the top Prop which acts as an SD card driver and RAM while the bottom half of the map goes to a Prop whose job is to provide input and output.
The top Prop also controls the Z80's reset line and clock while intercepting the control bus and passing it to the bottom Prop.

So far this is the best idea I can think of unless there is a way to multiplex the address and data lines bidirectionally to save on pins.

Another option I thought of was having the first Prop solely communicate with the Z80 while communicating to the second Prop serially turning the second Prop into a peripheral handling all of the I/O and file system duties. In this drawing the SD is on the second Prop but it could be brought closer to the Z80. Another possibility is to have the first Prop control an SPI RAM.
PropZ80 computer2.jpg


Opinions?
1024 x 473 - 25K
1024 x 473 - 18K
«1

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2012-11-10 14:50
    We have ZiCog which is a z80 emulator and runs on hardware such as my RamBlade (an overclocked Prop with 512KB SRAM and microSD on a tiny pcb). This runs CPM2.2 fine.
  • cavelambcavelamb Posts: 720
    edited 2012-11-10 17:52
    Cluso99 wrote: »
    We have ZiCog which is a z80 emulator and runs on hardware such as my RamBlade (an overclocked Prop with 512KB SRAM and microSD on a tiny pcb). This runs CPM2.2 fine.

    Cluso,
    You know there are 51 pages in that thread?
    A lot of ideas were hashed out. Many suggestions - many dropped.
    Is there somewhere a place where the end results are posted?


    To the OP,
    There seems to be a few boxes missing from that top drawing.
    Like how to interface the Prop to a Z80.
    That will take some more thought.

    As for performance?
    Due to the serial nature of the Prop (and, it seems, most of the modern
    micro controllers) communicating with the Prop is going to be the
    bottle neck.
  • jaegjaeg Posts: 156
    edited 2012-11-10 18:07
    Actually I was thinking of a direct interfacing from the Prop to the Z80 similar to this project here: http://www.parallax.com/tabid/708/Default.aspx In short the Propeller is the final say in what the Z80 actually does.

    @Cluso I know about the ZCog and other in Prop emulators but I wanted to go for something that was still a true Z80 machine. That and I want to have more of a mixture of a hardware and software solution. It gives me a dash of old and new.

    I just found this chip: https://www.dropbox.com/sh/qwhixzvtlrvp1u1/9lBxjePT6A/Schematics/MCP23017_Datasheet.pdf It's an I2C IO expander. One of these could convert a 16 bit bus into just a handful of pins which could potentially knock out a Prop from the design. Looks promising.
  • Heater.Heater. Posts: 21,230
    edited 2012-11-10 18:49
    cavelamb,

    Sorry, the ZiCog thread grew like topsey. I keep meaning to bring the project to some kind of organized conclusion but time keeps running away from me.

    jaeg,

    You might me interested in the N8VEM project. They have a Z80 computer design and a Propeller based Video and I/O card.
    http://n8vem-sbc.pbworks.com/w/page/4200908/FrontPage
    http://n8vem-sbc.pbworks.com/w/page/22474152/PropIO
    http://n8vem-sbc.pbworks.com/w/browse/#view=ViewFolder&param=ECB%20Prop%20IO
  • jaegjaeg Posts: 156
    edited 2012-11-10 19:11
    I've heard of the PropIO before but this is the first time I've actually taken a good look at what it does. It looks like A0 and A1 addresses it and A2 and A3 are what decide the chip select. Is it safe to assume that one location is a single letter from a keyboard and another location is a single letter being sent from the Z80 to the Propeller for display? The schematic for this is really interesting that's for sure.

    The only problem I have with the N8VEM project (not just the N8VEM) is that I don't have a programmer to program either a EEPROM or EPROM which is a major disability when trying to build a computer from scratch...


    EDIT - Has it ever been determined that a Prop isn't fast enough to use an external ram chip as video ram and instead of displaying the contents of its ram it displays the vram?
  • cavelambcavelamb Posts: 720
    edited 2012-11-10 22:15
    Heater. wrote: »
    cavelamb,

    Sorry, the ZiCog thread grew like topsey. I keep meaning to bring the project to some kind of organized conclusion but time keeps running away from me.
    jaeg,
    Heater,
    Being an old CP/M guy who got dragged kicking and screaming to the IBM XT (what a big step
    backwards that was - back then!) I've always been interested in the ZyCog project.
    Running CP/M on a pocket computer is quite a compelling idea.

    If it's running reliably, how about pull it together for the rest of us?
    I'd love that one!

    And, a question?
    Would Martin's DNA board with WinBond chip and SD card be a workable platform?
    Because that and a touch screen would be seriously sweet.
  • cavelambcavelamb Posts: 720
    edited 2012-11-10 22:31
    jaeg wrote: »
    I've heard of the PropIO before but this is the first time I've actually taken a good look at what it does. It looks like A0 and A1 addresses it and A2 and A3 are what decide the chip select. Is it safe to assume that one location is a single letter from a keyboard and another location is a single letter being sent from the Z80 to the Propeller for display? The schematic for this is really interesting that's for sure.

    The only problem I have with the N8VEM project (not just the N8VEM) is that I don't have a programmer to program either a EEPROM or EPROM which is a major disability when trying to build a computer from scratch...


    EDIT - Has it ever been determined that a Prop isn't fast enough to use an external ram chip as video ram and instead of displaying the contents of its ram it displays the vram?

    You WILL have to have an EPROM programmer for any of the old microprocessors.
    And a scope. And possibly a logic analyzer if you try anything cute in hardware.

    The idea of using a Prop chip for I/O, on the surface seems reasonable.

    But looking at the PropIO schematic, with address, data, and control lines
    attached directly to the Prop, I gotta say - maybe.
    The Prop software will be time critical since it has to read those signals and
    do something with them. Probably one cog monitoring the Z80 signals and
    others doing the dirty work.

    Keyboard and mouse, no problem.
    Same for TEXT VGA.
    But I can't see this working very well for anything like high resolution graphics.
    Pixel manipulation would be very slow. And it takes a LOT of pixels to make a screen.

    Suggestion, dig up the Kaypro schematics. Note that there are two very different boards.
    One is all TTL, the other uses a graphics controller.
    Both allow the Z80 direct access to video RAM.

    Now, how would you do that with a Propeller?

    How much video memory would you want?
    Basically, what screen resolution? Color?


    Here is the TTL version of the Kaypro II:
    http://www.z80.eu/downloads/Kaypro_II_schematics.pdf

    EDIT:
    I see it now. Prop's pin 17 (port12) - hangs on the Z80 /wait pin
    So there is all the time in the world for the Prop to respond.
    But it's gonna hurt performance-wise.
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 03:56
    cavelamb

    ZiCog runs reliably, at least as far as CP/M 2 is concerned. Clusso and/or other managed to get CP/M 3 running on it as well. ZiCog is still missing a handful of Z80 op code though. It has been used to make a graphical game as well. Can't find the link now.

    I'm really out of touch withe the plethora of Prop boards around now and all the new serial memory layouts so no idea about the DNA board. At least you would need to hack the RAM access in ZiCog or it's memory controller COG to support that.

    Don't forget ZiCog has a rival in the qZ80 emulator by PullMoll which is has 100% of Z80 ops working and has been used in ZX81 emulation and such.

    I willl pull ZiCog together, I was actullay kind of sitting on it till the Prop II comes out and we don't need to mess with that external RAM anymore.

    The thought of CP/M with a touch screen is just wonderfull.
  • PliersPliers Posts: 280
    edited 2012-11-11 04:04
    I was introduced to the Z80 micro processor (1981). It was my gateway into learning digital control.
    My first year basic electronics course (1978) had a one year course in vacuum tube circuit design and building.
    Whenever I see the word Z80, I get warm and fuzzy inside.
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 04:21
    jaeg,

    The idea of using a Prop with a Z80 or 8085 is where I started all that time ago.

    You don't need an EPROM. Just use a Prop as a boot EPROM same as you use it to impliment I/O ports.

    My approach would be:

    1) Z80 has a static RAM hooked up as normal to provide 64K minus the 256 bytes of boot ROM space at the top.

    2) Prop responds to addresses in the boot ROM space, decoded externally, just like any other memory or peripheral chip. Prop can drive WAIT or HOLD or whatever it is to slow the Z80 reads at this point if need be.

    3) Prop also responds to Z80 accesses to I/O space. Where it provide "registers" for terminal input and output and disk access. Prop is driving an SD card. Again use WAIT/HOLD to pace the timing if need be.

    4) Prop is also providing a VT100 terminal display on VGA.

    In this scenario disk I/O is software driven, byte at a time, by the Z80. All data travelling through those prop implimented "I/O registers. Some tweaking of the Z80 boot ROM code will be required to support this and also the CP/M BIOS. It may not be so fast but it's the simplest approach.

    Next up, allow the Prop to also supply 256/512 bytes of RAM buffer space at the top of memory to be used for DMA. On I/O commands from the Z80 SD blocks are read/written through that buffer space. Again the boot pPROM and BIOS will need tweaking to support this.

    I'd be using all the resources, CP/M and boot ROM sources from SIMH Z80 project here,
    http://www.schorn.ch/altair.html, as does ZiCog and qz80. It provides a solid working base to start from.

    P.S. One little twist in the above scenario is that the Z80 starts executing at address zero. So that has to contain a jump up to the boot ROM or you have to ensure all RAM reads return zero (NOP) until it runs up into the boot ROM code.
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 04:34
    Pliers,

    Those were great days, the moment the world's geeks got hold of cheap computer powere for the first time. The buzz of enthusiam and creative energy around that was amazing.

    Whenever I hear the words "vacuum tube" I get warm and fuzzy inside, but then I am Heater:)
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-11 05:07
    Heater,

    I'll let you feel warm, but if you get the fuzzy bit then I think you may have gas inside.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-11 05:15
    Heater,

    I'll let you feel warm, but if you get the fuzzy bit then I think you may have gas inside.
    Yes, but Heater's good at letting the gas out! :innocent: .... all warm and fuzzy like.

    EDIT: I couldn't help but respond, it's your fault Toby, you set him up.
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 05:34
    Ha ha, as you know as tubes get older they can get gassy but let's leave discussion of the problems with my tubes out of this:)
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-11 05:45
    Sorry for lowering the tone, I'm british, toilets and sarcasium ...
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-11 05:45
    Heater. wrote: »
    Ha ha, as you know as tubes get older they can get gassy but let's leave discussion of the problems with my tubes out of this:)
    Well then, since we are communicating over a non-gaseous medium we shall continue the discussion of the solid-state kind. Do you know I have various Z80 chips including Z8530 SCC chips etc? Maybe they can find a good home.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-11 05:54
    I still get ideas of getting that Z80 bolted to a Prop, but Heater.'s efforts and then Pullmoll's software on top of Clusso's and DrAcula's hardware sort of got most boxes ticked. Especially with Pullmoll doing a Nascom "skin" for it, probably just me.

    I haven't had as much time for tinkering over the last couple of years but I must get back to learning the Prop, from the ground up, my "brain" still fights multiple processors, and the lack of interupts!!

    ADDIT

    I remember the SCC chip, I had a TNC with one in it.
  • jaegjaeg Posts: 156
    edited 2012-11-11 07:15
    Heater. wrote: »
    jaeg,

    The idea of using a Prop with a Z80 or 8085 is where I started all that time ago.

    You don't need an EPROM. Just use a Prop as a boot EPROM same as you use it to impliment I/O ports.

    My approach would be:

    1) Z80 has a static RAM hooked up as normal to provide 64K minus the 256 bytes of boot ROM space at the top.

    2) Prop responds to addresses in the boot ROM space, decoded externally, just like any other memory or peripheral chip. Prop can drive WAIT or HOLD or whatever it is to slow the Z80 reads at this point if need be.

    3) Prop also responds to Z80 accesses to I/O space. Where it provide "registers" for terminal input and output and disk access. Prop is driving an SD card. Again use WAIT/HOLD to pace the timing if need be.

    4) Prop is also providing a VT100 terminal display on VGA.

    In this scenario disk I/O is software driven, byte at a time, by the Z80. All data travelling through those prop implimented "I/O registers. Some tweaking of the Z80 boot ROM code will be required to support this and also the CP/M BIOS. It may not be so fast but it's the simplest approach.

    Next up, allow the Prop to also supply 256/512 bytes of RAM buffer space at the top of memory to be used for DMA. On I/O commands from the Z80 SD blocks are read/written through that buffer space. Again the boot pPROM and BIOS will need tweaking to support this.

    I'd be using all the resources, CP/M and boot ROM sources from SIMH Z80 project here,
    http://www.schorn.ch/altair.html, as does ZiCog and qz80. It provides a solid working base to start from.

    P.S. One little twist in the above scenario is that the Z80 starts executing at address zero. So that has to contain a jump up to the boot ROM or you have to ensure all RAM reads return zero (NOP) until it runs up into the boot ROM code.
    Thanks for the response Heater! This along the lines of what I was thinking about doing. I've seen several examples of people using a microcontroller to boot a microprocessor or at least fill it's ram with program data. At the moment I'm not planning on having it run CPM but just random Z80 programs. I've been really tempted to switch this over to a 6502 and try to recreate the Apple 1 or Kim-1. Or at least something that can operate similarly.

    For the Z80 is there a difference between using the Wait or bus req lines? I seen one design that used a flip flop so that when the Z80 sent out an IO req it would immediately set the bus req and stop the Z80 until the AVR was finished and reset the flip flop.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-11 07:34
    That was one of the thoughts that I had. Also I wondered about clocking the Z80 from the Prop so that things could be slowed down if required.

    I did have a Prop up at 4.2 Volts for a fair while, I beleive that 5 Volts has been done without problems (un-officially), so that the Z80 was a bit closer to 5 Volts. I have never found out the speed that a 10MHz Z would run at at lower volts but 4MHz + was my hope.

    As I said, when other greater minds laid it all on a plate for me, and I took the easy route.

    There was a "laptop" with a Prop and a 6502, a while back, http://www.parallax.com/tabid/708/Default.aspx
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 07:40
    I don't recall off hand how to get wait states into Z80 memory access but years ago I did that flip-flop thing with the 8085 so guess it's possible with Z80 as well.The problem with using the Prop to fill Z80 RAM with a program prior to starting the Z80 is that you need many address and data lines connected from Prop to RAM. I'd like to keep as many Prop pins free as possible. Hence the idea of the Prop responding to ROM addresses only. Then you only need 8 data lines and 8 address lines and a few chip select / hand shake lines.The boot PROM code supplied by the Prop to the Z80 can fill the RAM at start up.
  • PublisonPublison Posts: 12,366
    edited 2012-11-11 07:40

    There was a "laptop" with a Prop and a 6502, a while back, wasn't there?

    Yes there was!

    http://www.parallax.com/tabid/708/Default.aspx
  • jaegjaeg Posts: 156
    edited 2012-11-11 09:04
    Yep, I mentioned it near the top as well. It's what inspired me to try this.

    I was looking at the Replica-1 schematics which uses the Propeller as a terminal for output and input.
    http://www.brielcomputers.com/wordpress/?cat=13

    In this one the Prop doesn't talk to the 6502 directly but rather through the 6821 which is a PIA.

    I'm thinking about using the Prop to design an EEPROM programmer with potential on the go editing abilities with a keyboard and screen. Also by making the connections to the EEPROM adjustable (physically moveable in this case) it could almost be universal.
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 11:58
    Pliers wrote: »
    I was introduced to the Z80 micro processor (1981). It was my gateway into learning digital control.
    My first year basic electronics course (1978) had a one year course in vacuum tube circuit design and building.
    Whenever I see the word Z80, I get warm and fuzzy inside.

    That goes way back...
    This is the only surviving photo of my first Z-80...
    Wirewrapped no less!
    It also had a hand-powered paper tape reader.
    But no punch. I could punch tapes for it at work.

    CPU1-A.JPG
    800 x 704 - 91K
  • jaegjaeg Posts: 156
    edited 2012-11-11 12:01
    That is a cool looking machine.
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 12:05
    Heater. wrote: »
    cavelamb

    ZiCog runs reliably, at least as far as CP/M 2 is concerned. Clusso and/or other managed to get CP/M 3 running on it as well. ZiCog is still missing a handful of Z80 op code though. It has been used to make a graphical game as well. Can't find the link now.

    I'm really out of touch withe the plethora of Prop boards around now and all the new serial memory layouts so no idea about the DNA board. At least you would need to hack the RAM access in ZiCog or it's memory controller COG to support that.

    Don't forget ZiCog has a rival in the qZ80 emulator by PullMoll which is has 100% of Z80 ops working and has been used in ZX81 emulation and such.

    I willl pull ZiCog together, I was actullay kind of sitting on it till the Prop II comes out and we don't need to mess with that external RAM anymore.

    The thought of CP/M with a touch screen is just wonderfull.

    I always preferred the Z80 op-codes.
    But I can happily live with just 8080 instructions.

    just think, if this became a commercial product,
    what a renaissance! All these Java whiz-kids
    learning 8080 Assembly with sparkles in their
    eyes...


    all the Java whiz-kids
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 12:31
    cavelamb,

    Are you talking about op codes or assembler mnemonics? The Intel 8085 mnemonics were horrible, the mnemonics used in Z80 were much nicer for the same opcodes.

    As far as I can tell not much software strayed away from the basic 8085 instructions except to use the string operations, the EX register bank switcjing for interrupt code and perhaps some bit get/set operations (At least in the CP/M world).

    ZiCog needs a little work to get the last handfull of such op working correctly.
  • jaegjaeg Posts: 156
    edited 2012-11-11 12:52
    @Heater
    I drew out a configuration using your explanation on my whiteboard I used A0-A7 for addressing from the Z80 to the prop, D0-D7, 4 control lines (Reset, Read, Write, IO Req), and two chip selects giving me a 512 byte buffer but with those 22 pins and the 4 required for SD, 8 for VGA, and 3 for keyboard I ended up not having enough pins to use just one Prop. If I switched from VGA to RCA I could do it but VGA would be nicer. I'm thinking about using an I2C IO expander on the Prop to communicate with the address and data lines on the Z80 but I'm worried that will create a significant performance impact.
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 13:22
    I'd be quite happy with less pins for a VGA text terminal. Only the sync signals and one colour is required (Green of course). RCA is no good as I'd want a decent text display for WordStar. Can we find a keyboard that only needs one pin for serial data?

    Perhaps this calls for two Props. One could be the terminal display and keyboard, the other taking care of the ROM emulation, SD card and other Z80 IO/ports.

    The Terminal/Keyboard Prop board by itself would have other uses. For example a VGA text terminal for Rasbery Pi boards. In fact somewhere here there is already a design for such a terminal. PocketTerm, or what was it called?
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 14:02
    Heater. wrote: »
    cavelamb,

    Are you talking about op codes or assembler mnemonics? The Intel 8085 mnemonics were horrible, the mnemonics used in Z80 were much nicer for the same opcodes.

    As far as I can tell not much software strayed away from the basic 8085 instructions except to use the string operations, the EX register bank switcjing for interrupt code and perhaps some bit get/set operations (At least in the CP/M world).

    ZiCog needs a little work to get the last handfull of such op working correctly.

    My bad, Heater... mnemonics

    Sorry to distract you - now, get back to work!
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 14:04
    Heater. wrote: »
    I'd be quite happy with less pins for a VGA text terminal. Only the sync signals and one colour is required (Green of course). RCA is no good as I'd want a decent text display for WordStar. Can we find a keyboard that only needs one pin for serial data?


    Wireless? Mouse and keyboard both on one pin?
Sign In or Register to comment.