Shop OBEX P1 Docs P2 Docs Learn Events
I've seen the Z-80 emulator, could a SX emulator be done ? — Parallax Forums

I've seen the Z-80 emulator, could a SX emulator be done ?

BeanBean Posts: 8,129
edited 2009-08-07 12:17 in Propeller 1
I've seen the thread about the z-80 emulator.
Now that the SX is EOL'd I was wondering how difficult it would be to make an SX emulator.
Then Propeller users could enjoy the use of SX/B.

Any ideas how difficult this would be ? I know the timing would be different, and interrupt may not be possible, but I'd take those restrictions if you could run multiple SX/B programs on multiple cogs.

Bean.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...




Post Edited (Bean (Hitt Consulting)) : 8/6/2009 9:16:33 PM GMT

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2009-08-06 21:14
    If you are NOT trying to be cycle accurate it should be very doable - and a lot easier than the Z80 emulator!

    Basically you'd have to write a word code interpreter. If I was doing it:

    - 2K word or 4K word array in hub (code space)
    - 137 / 262 bytes of ram - easiest if in the hub, or you can pack 3 per word easily (4 more slowly)
    - stack in hub or cog
    - there are only 43 "real" instructions, nice jump table takes care of that

    The pains in the posterior would be:

    - timers
    - io pin modes not supported on the prop
    - interrupts (as you mentioned) but they could be faked fairly easily by checking after each instruction
    - SLOW compared to real thing

    I think with a lot of work it might run at the speed of a 2MHz SX
    Bean (Hitt Consulting) said...
    I've seen the thread about the z-80 emulator.
    Now that the SX is EOL'd I was wondering how difficult it would be to make an SX emutor.

    Then Propeller users could enjoy the use of SX/B.



    Any ideas how difficult this would be ? I know the timing would be different, and interrupt may not be possible, but I'd take those restrictions if you could run multiple SX/B programs on multiple cogs.



    Bean.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheus & Mem+ Advanced dual Propeller SBC with XMM and 256 Color VGA - PCB, kit, A&T available NOW!
    www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-07 01:10
    Totally doable except the interrupt, although even that may be possible with some latency. It would be a great project but no time at the moment and I think heater id flat out as well. Anyone??

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • heaterheater Posts: 3,370
    edited 2009-08-07 06:59
    See to be quite feasible. (As long as you are not talking about the NEC SX[noparse]:)[/noparse])

    I'm not the man for the job. After MoCog I will be done with emulators on the Prop. Must move on to other things.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-08-07 11:32
    Actully considering all the emulations you have done you are the man for the job!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Toys are microcontroled.
    Robots are microcontroled.
    I am microcontroled.



    If it's not Parallax then don't even bother. :-)
    ·
    I have changed my avatar so that I will no longer be confused with others who use genaric avatars.

    Mini-Din/PS2 connectors are for sale! 5 for $1! PM me if you wish to make an order.
    Cheap·shipping unless specified!··········150 left!!··




  • heaterheater Posts: 3,370
    edited 2009-08-07 12:17
    Thanks for the encouragement microcontrolled.

    Thing is I don't have any historical, emotional, whatever attachment to the SX or any software that runs on it. So no motivation. A lot of my motivation has come from "software archaeology" as it were.

    I am taken by the idea of the Apollo AGC on a Prop though. Especially since there is an existing AGC simulator written in C that we can get up and running with Catalina on a TriBlade or Morpheous board.

    But I also want time for other interesting projects.....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
Sign In or Register to comment.