+ Reply to Thread
Page 5 of 6 FirstFirst 123456 LastLast
Results 81 to 100 of 111

Thread: MoCog - A Motorola 6809 emulator for the Propeller

  1. #81


    I am a member of the Glenside Color Computer Club.

    We would gladly welcome a presentation of a processor upgrade for the Tandy ColorComputer 3.
    The Motorola MC6809is theoriginal microprocessor. The Hitachi HD6309 is a replacement microprocessor that can run MC6809 code, but it can also run additional op-codes that improve the overall performance of the computer if code is compiled to take advantage of the new-opcodes.

    We are sponsoring atwo-day event entitled, “The 19th Annual "Last" Chicago CoCoFEST!”, held at the Holiday Inn in Elgin, Illinois on May 15-16, 2010. You can see how the Tandy Color Computer (the “CoCo”) built inthe 1980’s is still being used today, and see all the products that are still being developed for it. Admission is $10, or you can set up your own booth at the festival (which includes an admission pass) for as low as $45.00. I would expect about 55-75 people to attend; some travel from as far away as Florida and California. We have about 190 members worldwide.
    Several vendors come to the CoCoFEST to sell their products that support the CoCo. New products have been developed that allow for saving CoCo programs to thumb drives (SD cards) and PC-based servers. More new products are expected to be announced this year.
    The CoCoFEST is not just about the CoCo. What makes the CoCoFEST interesting is the people you will meet. We share ideas, display new and old products, and help one another.
    The Tandy (TRS-80) Color Computer is ~30 years old. The technology may not be the greatest, compared to what’s out today, but it’s simple and useful.
    Links that may be of interest to you:
    Glenside Color Computer Club: http://glensideccc.com/
    YouTube 2008 CoCoFEST: http://www.youtube.com/watch?v=ZB5IyO06kR8
    YouTube 2009 CoCoFEST:http://www.youtube.com/watch?v=2WhG-ZNELZI&feature=related
    Thank you forthe work you are doing to preservethe MC6809 microprocessor. This may be the most fun you have in 8-bits. Perhaps you can add a new level of acceleration similar towhat the HD6309 did. You could allow an MC6809 mode, that can be switched to an HD6309 mode, that can then be switched to anew turbomode, or some such thing. Check out theNitrOS9 operating system for the MC6809 and HD6309 microprocessor. Perhaps you could emulate the video circuit as well.
    -John Mark Mobley
    Last edited by ForumTools; 09-30-2010 at 03:42 PM. Reason: Forum Migration

  2. #82


    IMHO, emulating GIME is well within the Propeller capability. It will already do the 256 color artifacting seeing some activity in the CoCo scene right now, and is capable of the core resolutions seen in the GIME. Not sure about the other GIME signals however. Probably doable.

    Thanks for the note. I've been out of the CoCo scene for a while, but recently picked up a CoCo 3, and am awaiting a drive pak :) You guys are doing a great job with that machine, drivewire, etc...

    I got mine for the 256 color work, BTW. First thing was to knock up some video on the Prop that exhibited that same behavior. Would be fun to put a prop on the cart bus too.

    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 5/4/2010 4:30:33 AM GMT
    Last edited by ForumTools; 09-30-2010 at 03:42 PM. Reason: Forum Migration

  3. #83


    Just a suggestion if you hadn't noticed about long 6809 opcodes with prefixes...
    There aren't significantly many and they have a simple pattern, it seems to me,

    $10 - either changes the register of an opcode or the length of the relative branches,
    and only 1 or 2 instructions do something very different such as SUB vs CMP.
    $11 - seems to mostly select another register for the opcode also.
    And, before a SWI, these change which address handles the
    "Software initiated interrupt".

    A 16K CoCo should be very easy to emulate since the I/O at the top is very
    simple stuff that doesn't need to be done electronically outside the Propeller
    at all. A lot of simple parallel ports basically, some going to the mode registers
    of the 6847 and 6883 which are also very simple.
    6847 - One text mode, one font, several graphics modes of either 2 or 4 colors,
    and 2 choices of colors, with the exception of a 2x2 color block graphics mode
    with 9 colors, and a 2x3 with 4 colors (but it is virtually useless on CoCo).
    6883 - Mostly combines dynamic RAM refresh with video data feed to 6847,
    although it creates a few interesting anomalies the way its done. There are
    4 different combos of ram/video refresh, not all useful, but one doubles the
    CPU speed (unintended, more fun than useful); the 6883 emulates the 6847's
    screen buffer size ambiguously, resulting in some peculiar and not very useful
    text modes where characters can be sliced up and mixed together and waste
    RAM (the SG8-SG24 modes); the 6883 has 2 (and only 2) memory map choices,
    one is 64K of RAM, the other allows ROMs to be selected, and there are outputs to
    enable each chip (RAM/ROM/IO) in the memory map. If you don't use Flex or OS/9,
    you will probably be using the BASIC ROMs (in the EEPROM) and for all practical
    purposes only have a 32K CoCo to emulate (in CoCo And HUBRAM) limits anyway.

    This is from my memory since I don't have manuals handy atm but CoCo and 6809
    were machines I really got to know well in the early 1980s; and I am also sure that
    they are very well documented on the WWW.

    Original Femtobasic (fb.spin in Hydra Sources) will certainly fool anyone for a few
    minutes that a Propeller is emulating a CoCo. Same screen, rainbow cursor, and just
    a few BASIC commands. IIRC, the color is either disabled or on the wrong frequency
    though, an easy bug to find in that demo.
    Last edited by ForumTools; 09-30-2010 at 03:42 PM. Reason: Forum Migration

  4. #84


    Hello JohnMark and welcome to the Propeller forums. That's a big world of 6809 activity you are introducing here that I have been unaware of. I'll try to find the time to look into everything that is happening. Sadly there is little chance of my making it over from Finland to Chicago:(

    My interest in the 6809 dates from 1980 when a couple of "green" trainee engineers at the Marconi Radar Company built a 6809 SBC on a wire wrap board and then put together a debug monitor program for it. This was by way of evaluation of the chip which we soon came to prefer over all the other 8 bitters. Sadly it was never adopted for real projects within the company.

    As for MoCog progress, everything for me is pretty much on hold now a days as there is a lot of "real" work to be getting on with. There are already most of the op-codes in place in the emulation and all the addressing modes. There is some work to be done on flag settings. It has been running simple code compiled with C though.

    Looking at the experiences of various attempts at emulators/virtual machines here (Z80, 6502, Java byte codes) it seems that it is best to go for a single COG solution using overlays or LMM rather than to try for a multiple COG solution to get all the code in. This seems rather counter intuitive, how can overlay/LMM be quicker than raw full speed PASM in two or more COGs? Still all of the efforts I mentioned have tried multi-cog and eventually abandoned it in favour of single COG + LMM/overlay. Looks like the overheads of sharing state between COGs and synchronizing them are just too great.

    For me, the past is not over yet.
    Last edited by ForumTools; 09-30-2010 at 03:42 PM. Reason: Forum Migration

  5. #85

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Great stuff guys.
    I just found out about the Propeller while researching components that could be used for Video and I/O functions on a 63C09E based computer.
    I'm not sure that the propeller is the ideal substitute for a real 6809/6309, but those of you who have suggested that it could emulate a GIME chip seem to be on the right track.
    But why stop there?
    Higher resolutions, better I/O, sound, keyboard and mouse interfaces - all possible, freeing the processor for pure calculation.

    And how about multiple processors with greatly increased RAM capacity?

    The Propeller looks like it could be used to design a killer OS-9 or NitrosOS9 system.

    I'm also going to look at throwing a 68K or Coldfire processor into this mix.

  6. #86

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Hi jimigou, welcome to the forum.

    This is a good old thread you have dug up here. Sadly my 6809 end Z80 emlators have been on hold for a long time. To much work and life in the way and then lots of other interesting projects pop up to eat time.

    Actually when I started with the Prop the idea was exactly to use a real Intel 8085 and the Prop as peripheral handler and video driver for CP/M. Same could be done for 6809 and whatever peripherals. Then it occured to me to learn some PASM and that writing a 8085 emulator in PASM would be a good way to do so.

    Turns out the 8085 emulation is a good fit for the Prop as it is not such a big job, most of the code fits in COG and it runs at speeds comparable to an original chip.
    The Z80 kind of grew from that. The 6809 is a bit tougher, bigger and slower.

    I kind of promised myself that I would revive these emulator efforts when the Prop II comes out. Then we have enough RAM space on chip for full CP/M or other systems and the thing will run a lot faster. I got of got fed up with bolting external RAM on to the Prop and fighting over pins and such. Not to mention the much better video possibilities.

  7. #87

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    An FPGA is a better way to emulate those old devices. Here is a 6809 running on a low-cost Xilinx Spartan 3 kit:


    I tried it some years ago and it worked very well.

    Lots more are here, including a 68000:

    Leon Heller

  8. #88

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    FPGA is a good way to go. I have often thought about it as VHDL/Verilog is something I'd like to learn.

    Not sure about the low cost though. A quick google finds me Spartan 3 boards at over 200 dollars. Does not quite compete with my 8085 running from a Prop, a RAM and an SD card.

    FPGA will make more sense for more complicated processors like 6809 and more complex peripherals.

  9. #89

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    I have one of these Digilent Spartan 3 boards($169):


    I tried John Kent's 6809 on it some years ago. No additional hardware was required as it includes a keyboard interface and VGA.

    This Altera Cyclone IV board is very good value:


    I bought one last week. Additional hardware would need to be added on a small PCB for a keyboard and VGA interface.
    Leon Heller

  10. #90

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    $169 dollars is way to much. I can run a 6809 emulator on a Raspberry Pi for $30

    The Cyclone IV board looks very interesting, although I'm not keen on buying stuff that comes in limited quantities from an unreliable supply.

  11. #91

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    The Cyclone IV board seems to be made by the same manufacturer that makes a widely available Cyclone II board, and will probably be available from lots of suppliers soon.

    One of these Terasic DE0-Nano Cyclone IV boards is being delivered to me today:


    They are available from RS, Farnell and Digi-Key for about 60.

    The Cyclone IV is the latest low-cost Altera FPGA. The newer Cyclone V is supposedly in production, but doesn't seem to be available anywhere. It uses the new 28 nm TSMC process, and they are probably having problems getting them made.
    Last edited by Leon; 09-03-2012 at 09:08 AM.
    Leon Heller

  12. #92

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    I don't think Propellers are a bad fit at all. The trouble with P1 is the clock speed it runs at and it's RAM are both just shy of being able to do the better machines and CPU's justice. It's almost there, and frankly the Z80 / 8080 stuff is impressive!

    When we get P2, this stuff will be cake, and I'm deffo in line with Heater on that. I love emulation projects and really want to learn more and emulate some great devices. P2 is gonna hit the sweet spot on all the 8 bit stuff for sure.

    BTW: A 6809 is probably the hardest emulation due to how complex the chip instruction set is. That chip is IMHO, the most powerful and elegant of the 8 bitters, improved only by the Hitachi 6309 and it's extras. When it's time, that's the device to emulate. On P2, we get much improved LMM.

    An Apple //e will mostly fit into a P2, and it's going to very easily run at clock speed+. Imagine that.
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another

    Parallax colors simplified: http://forums.parallax.com/showthrea...hics_Demo.spin
    PropGCC Mac OS 10.6.8 + https://www.dropbox.com/s/539urmnpem...allax.zip?dl=0

  13. #93

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Thanks for the response Heater.
    I think that with what the Prop1 is capable off, I can use it to build a pretty competant 63C09 based computer (at about 3.58 to 5 MHz).
    The advantage to emulation or an FPGA design would be increased speed.
    At this point, I'm thinking of running the SRAM I'm going to use at about four times processor speed and interleave access to four seperate CPUs.
    Memory allocation will be tricky, but SMD isn't anything new to the 6809/6309.

  14. #94

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    With the Z80 we pushed the propeller to do amazing things, but I don't think we fully explored all it is capable of, and I think the same logic applies to the 6809 as well.

    For a 16 bit micro with 64k of program space, if you write it in LMM you only can use 32k hub space at most. This means you end up fetching each instruction from external ram, then processing it via LMM. So for the dracblade for instance, it took 20 instructions to get one byte from external ram, and for a Z80 where many instructions are 2 or 3 bytes, that could be as bad as a 60:1 ratio.

    I believe we can do better with caching and with different ram. For instance with a different ram arrangement, eg the touchscreens that read 1 word rather than 1 byte, and do that word in a tight pasm loop, I think that can be 20x faster. And with caching you can do even better again.

    The challenge I think is how you divide the task up between cogs. In a simplistic way, cache driver in one cog and micro emulator in another cog. But there might be a better solution with cache plus the commonly used instructions in one cog, and lesser used instructions in another cog.

    The cache part can further be divided into the external ram interface and the cache manager.

    Sometimes I ponder a new language for the propeller - XMM pasm where the entire program is in external ram, hub is for variables, and you move blocks of raw pasm into cogs as needed. So a cog has the external ram driver, a cache driver, and about half the cog is free for code. Move a block of code from external ram to hub and then into the cog and run it. Replace all jumps and calls with jumps to special handlers in the cog code. Replace all 32bit dat variables with code that creates a variable out of mov and shift instructions. Have some common variables eg r0 to r15. Have some stacks either in cog or hub eg program counter, call stack, temp variable stack so make it a hybrid stack/register architecture. Have a precompiler that keeps functions contiguous within a cog (ie if nearly at the end of what is going to fit in a cog and the function will be split, move to the next cog).

    It should end up faster than LMM and enable pasm programs megabytes in size. But it would need a smart precompiler. Such a program could simplify the creation of emulators because you wouldn't need to worry about cog size limitations.

    So it is back to reading deSilva's pasm tutorials for me...

  15. #95

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Considering the current fire sale on SX chips (thanks Parallax!), the interested tinkerer could couple the 48-pin version with a fast Cypress SRAM and execute 6809 code faster and cheaper than either the Propeller or the MC6809.

  16. #96

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    What is an SX chip?
    And can it do VT100 terminal video at the same time as being a CP/M machine?

  17. #97

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Do you mean XS as in Xmos?

    Those don't seem to be able to generate as high resolution video as the Prop.

    BTW - Decided my initial idea was too ambitious.
    For now 1 6309, static RAM, and a Prop for VGA, keyboard and mouse (and possibly interrupt generation).
    Can't decide how to approach audio.

  18. #98

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    The Ubicom SX chips - basically 75 MHz single-cycle PICs.
    Leon Heller

  19. #99

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Parallax SX

    "The SX dies are still manufactured by Ubicom, who sends them to Parallax for packaging."
    "On July 31, 2009, Parallax announced that the SX line of microcontrollers will be discontinued. They will only be available until their stock is depleted."

  20. #100

    Default Re: MoCog - A Motorola 6809 emulator for the Propeller

    Looking at Prop and SX based machines makes me think that I might just want to start with a Hydra with a 512K card and add the 63C09.

    BTW - Of the two, the Prop looks like the more powerful MCU.

+ Reply to Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts