Loading ...
Sorry, an error occurred while loading the content.

creating a cosmacelf simulator in C

Expand Messages
  • akshay parelkar
    Hi Fans of Cosmac Elfs,   I recently discovered this fancy little computer while searchig on the web. I dont have a Real Cosmac Elf yet(Have digital ones
    Message 1 of 16 , Oct 2, 2008
    • 0 Attachment
      Hi Fans of Cosmac Elfs,
       
      I recently discovered this fancy little computer while searchig on the web. I dont have a Real Cosmac Elf yet(Have digital ones though).
       
      Lately, I have been thinking about writing up my own code (in C) to simulate the Cosmac elf. I dont expect this project to compete with the ones already available, just something with which I can undertand more about the 1802 itself and improve and exercise my own (rather limited) knowledge of C.
       
      Can somebody give some suggestions as to how and where I can/should start?
       
      Also, another idea rolling in my mind is, Would it be possible to build a replica Cosmac Elf based on a PIC or has anyone already done this?
       
      Thanks,
       
      Long live cosmac elfs! 




      [Non-text portions of this message have been removed]
    • Matthew Mikolay
      You should start by finding the most detailed documentation on the 1802 processor and the COSMAC ELF that you can find. I wrote an article about the rest. You
      Message 2 of 16 , Oct 2, 2008
      • 0 Attachment
        You should start by finding the most detailed documentation on the 1802 processor and the COSMAC ELF that you can find. I wrote an article about the rest. You can find it at http://blogs.pcworld.com/communityvoices/archives/2008/03/how_to_code_a_v.html and http://blogs.pcworld.com/communityvoices/archives/2008/03/how_to_code_a_v_1.html.

        Good luck!
        ~Matt

        --- On Fri, 10/3/08, akshay parelkar <va7aax@...> wrote:
        From: akshay parelkar <va7aax@...>
        Subject: [cosmacelf] creating a cosmacelf simulator in C
        To: cosmacelf@yahoogroups.com
        Date: Friday, October 3, 2008, 12:00 AM











        Hi Fans of Cosmac Elfs,

         

        I recently discovered this fancy little computer while searchig on the web. I dont have a Real Cosmac Elf yet(Have digital ones though).

         

        Lately, I have been thinking about writing up my own code (in C) to simulate the Cosmac elf. I dont expect this project to compete with the ones already available, just something with which I can undertand more about the 1802 itself and improve and exercise my own (rather limited) knowledge of C.

         

        Can somebody give some suggestions as to how and where I can/should start?

         

        Also, another idea rolling in my mind is, Would it be possible to build a replica Cosmac Elf based on a PIC or has anyone already done this?

         

        Thanks,

         

        Long live cosmac elfs! 



        [Non-text portions of this message have been removed]





























        [Non-text portions of this message have been removed]
      • Andrew Wasson
        Great articles Matt! I have a partial TTL CPU on my bench (temporarily in storage due to renovations) and it is really easy to draw parallels in the process of
        Message 3 of 16 , Oct 2, 2008
        • 0 Attachment
          Great articles Matt!
          I have a partial TTL CPU on my bench (temporarily in storage due to
          renovations) and it is really easy to draw parallels in the process of
          creating an emulator and creating registers, data bus, instruction
          bus, etc... out of gates.

          A good jump start on writing an 1802 processor would be in having a
          look at the one that was built in JavaScript: http://www.cosmac.szyc.org/

          And yes there is a fellow on this board who built an 1802 in ASM for a
          Pic Microcontroller.

          Andrew

          --- In cosmacelf@yahoogroups.com, Matthew Mikolay <mikolaym@...> wrote:
          >
          > You should start by finding the most detailed documentation on the
          1802 processor and the COSMAC ELF that you can find. I wrote an
          article about the rest. You can find it at
          http://blogs.pcworld.com/communityvoices/archives/2008/03/how_to_code_a_v.html
          and
          http://blogs.pcworld.com/communityvoices/archives/2008/03/how_to_code_a_v_1.html.
          >
          > Good luck!
          > ~Matt
          >
          > --- On Fri, 10/3/08, akshay parelkar <va7aax@...> wrote:
          > From: akshay parelkar <va7aax@...>
          > Subject: [cosmacelf] creating a cosmacelf simulator in C
          > To: cosmacelf@yahoogroups.com
          > Date: Friday, October 3, 2008, 12:00 AM
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > Hi Fans of Cosmac Elfs,
          >
          >  
          >
          > I recently discovered this fancy little computer while searchig on
          the web. I dont have a Real Cosmac Elf yet(Have digital ones though).
          >
          >  
          >
          > Lately, I have been thinking about writing up my own code (in C) to
          simulate the Cosmac elf. I dont expect this project to compete with
          the ones already available, just something with which I can undertand
          more about the 1802 itself and improve and exercise my own (rather
          limited) knowledge of C.
          >
          >  
          >
          > Can somebody give some suggestions as to how and where I can/should
          start?
          >
          >  
          >
          > Also, another idea rolling in my mind is, Would it be possible to
          build a replica Cosmac Elf based on a PIC or has anyone already done this?
          >
          >  
          >
          > Thanks,
          >
          >  
          >
          > Long live cosmac elfs! 
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        • Kathy Quinlan
          akshay parelkar wrote: Hi Fans of Cosmac Elfs, I recently discovered this fancy little computer while searchig on the web. I dont have a Real Cosmac Elf
          Message 4 of 16 , Oct 3, 2008
          • 0 Attachment
            akshay parelkar wrote:


            Hi Fans of Cosmac Elfs,

            I recently discovered this fancy little computer while searchig on the
            web. I dont have a Real Cosmac Elf yet(Have digital ones though).

            Lately, I have been thinking about writing up my own code (in C) to
            simulate the Cosmac elf. I dont expect this project to compete with the
            ones already available, just something with which I can undertand more
            about the 1802 itself and improve and exercise my own (rather limited)
            knowledge of C.

            Can somebody give some suggestions as to how and where I can/should start?

            Also, another idea rolling in my mind is, Would it be possible to build
            a replica Cosmac Elf based on a PIC or has anyone already done this?

            Thanks,

            Long live cosmac elfs!

            I was actually thinking of making an 1802 in an FPGA for the fun of it
            (once I move a few other projects out the way and learn to use my fpga
            development system) I was not going to write the code in VHDL instead do
            a schematic entry system, this way it will be like doing it in TTL
            gates, without the pain of making PCB's or wire wrapping, if I make a
            mistake, it is very quick to change the system :)

            Is anyone else interested in such a project ? This would not be a drop
            in (with adapter) for an 1802 as I am thinking of clocking as fast as
            the Chosen FPGA can go (kinda like an 1802 on red bull with a slab of
            Jolt ;)

            Regards,

            Kat.
          • William McKee
            Dear Kat, Sierra Circuit Designs (http://www.sierracircuit.com/) has made a VHDL version of the 1802. You might want to contact them. Cheers, Will. On
            Message 5 of 16 , Oct 3, 2008
            • 0 Attachment
              Dear Kat,

              Sierra Circuit Designs (http://www.sierracircuit.com/) has made a
              VHDL version of the 1802. You might want to contact them.

              Cheers,
              Will.

              On 3-Oct-08, at 5:28 AM, Kathy Quinlan wrote:

              akshay parelkar wrote:

              Hi Fans of Cosmac Elfs,

              I recently discovered this fancy little computer while searchig on the
              web. I dont have a Real Cosmac Elf yet(Have digital ones though).

              Lately, I have been thinking about writing up my own code (in C) to
              simulate the Cosmac elf. I dont expect this project to compete with the
              ones already available, just something with which I can undertand more
              about the 1802 itself and improve and exercise my own (rather limited)
              knowledge of C.

              Can somebody give some suggestions as to how and where I can/should
              start?

              Also, another idea rolling in my mind is, Would it be possible to build
              a replica Cosmac Elf based on a PIC or has anyone already done this?

              Thanks,

              Long live cosmac elfs!

              I was actually thinking of making an 1802 in an FPGA for the fun of it
              (once I move a few other projects out the way and learn to use my fpga
              development system) I was not going to write the code in VHDL instead do
              a schematic entry system, this way it will be like doing it in TTL
              gates, without the pain of making PCB's or wire wrapping, if I make a
              mistake, it is very quick to change the system :)

              Is anyone else interested in such a project ? This would not be a drop
              in (with adapter) for an 1802 as I am thinking of clocking as fast as
              the Chosen FPGA can go (kinda like an 1802 on red bull with a slab of
              Jolt ;)

              Regards,

              Kat.




              - - - - - - - - - -
              William A. McKee <william@...>
              Asia Communication Quebec Inc.
              http://www.cjkware.com
            • ted_rossin
              I just uploaded the source code to my Elf emulator in the Files/Simulators folder (TedsElf.zip). It is in C++ but should give you some hints on how to
              Message 6 of 16 , Oct 3, 2008
              • 0 Attachment
                I just uploaded the source code to my Elf emulator in the
                Files/Simulators folder (TedsElf.zip). It is in C++ but should give
                you some hints on how to proceed. The source is for a Visual Studio
                project. The real meat is in 1802.cpp and 1802.h. You can find
                programs that will run and instuctions on my web site:

                http://www.geocities.com/ted_rossin/Electronics/RCA/RCA.html

                One problem with many of the 1802 emulators that I tried is that
                they are not coded up for real-time operation. They tend to run as
                fast as they can which tends to be much faster than the real machine
                and varies based on processor speed. I use Windows timers to step
                my emulator at a periodic rate (I think every 50ms) for a tunable
                number of steps. This keeps the simulator speed constant across
                multiple machines. I don't have it perfectly tuned up but it does
                run within 10% of my real Elf system.

                The point I'm trying to make is to not make your emulator a giant
                while loop but instead write it such that it is a subroutine that
                maintains the state of the machine so that it can be called once per
                unit of activity. For example, you could model all the machine
                states and call the subroutine once per clock cycle. I choose to do
                it once per instruction but I maintain state as to the number of
                machine cycles executed (2 or 3 per instruction). Machine cycles
                are 8 clock cycles.

                This also allows you to hook up devices to your emulator such as
                LEDs, keyboards or 1861 video chips.

                Good luck and have fun. I enjoyed the process and am now able to
                develope code for my 1.6 MHz Elf on a 3.0 GHz PC.

                --- In cosmacelf@yahoogroups.com, akshay parelkar <va7aax@...> wrote:
                >
                > Hi Fans of Cosmac Elfs,
                >  
                > I recently discovered this fancy little computer while searchig on
                the web. I dont have a Real Cosmac Elf yet(Have digital ones
                though).
                >  
                > Lately, I have been thinking about writing up my own code (in C)
                to simulate the Cosmac elf. I dont expect this project to compete
                with the ones already available, just something with which I can
                undertand more about the 1802 itself and improve and exercise my own
                (rather limited) knowledge of C.
                >  
                > Can somebody give some suggestions as to how and where I
                can/should start?
                >  
                > Also, another idea rolling in my mind is, Would it be possible to
                build a replica Cosmac Elf based on a PIC or has anyone already done
                this?
                >  
                > Thanks,
                >  
                > Long live cosmac elfs! 
                >
                >
                >
                >
                > [Non-text portions of this message have been removed]
                >
              • akshay parelkar
                Thanks a lot for all the tip, suggestions and articles. I will now proceed with the project. Thanks again ... From: ted_rossin Subject:
                Message 7 of 16 , Oct 3, 2008
                • 0 Attachment
                  Thanks a lot for all the tip, suggestions and articles.

                  I will now proceed with the project.

                  Thanks again



                  --- On Fri, 10/3/08, ted_rossin <ted_rossin@...> wrote:
                  From: ted_rossin <ted_rossin@...>
                  Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                  To: cosmacelf@yahoogroups.com
                  Date: Friday, October 3, 2008, 11:30 AM











                  I just uploaded the source code to my Elf emulator in the

                  Files/Simulators folder (TedsElf.zip) . It is in C++ but should give

                  you some hints on how to proceed. The source is for a Visual Studio

                  project. The real meat is in 1802.cpp and 1802.h. You can find

                  programs that will run and instuctions on my web site:



                  http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html



                  One problem with many of the 1802 emulators that I tried is that

                  they are not coded up for real-time operation. They tend to run as

                  fast as they can which tends to be much faster than the real machine

                  and varies based on processor speed. I use Windows timers to step

                  my emulator at a periodic rate (I think every 50ms) for a tunable

                  number of steps. This keeps the simulator speed constant across

                  multiple machines. I don't have it perfectly tuned up but it does

                  run within 10% of my real Elf system.



                  The point I'm trying to make is to not make your emulator a giant

                  while loop but instead write it such that it is a subroutine that

                  maintains the state of the machine so that it can be called once per

                  unit of activity. For example, you could model all the machine

                  states and call the subroutine once per clock cycle. I choose to do

                  it once per instruction but I maintain state as to the number of

                  machine cycles executed (2 or 3 per instruction) . Machine cycles

                  are 8 clock cycles.



                  This also allows you to hook up devices to your emulator such as

                  LEDs, keyboards or 1861 video chips.



                  Good luck and have fun. I enjoyed the process and am now able to

                  develope code for my 1.6 MHz Elf on a 3.0 GHz PC.



                  --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@...> wrote:

                  >

                  > Hi Fans of Cosmac Elfs,

                  >  

                  > I recently discovered this fancy little computer while searchig on

                  the web. I dont have a Real Cosmac Elf yet(Have digital ones

                  though).

                  >  

                  > Lately, I have been thinking about writing up my own code (in C)

                  to simulate the Cosmac elf. I dont expect this project to compete

                  with the ones already available, just something with which I can

                  undertand more about the 1802 itself and improve and exercise my own

                  (rather limited) knowledge of C.

                  >  

                  > Can somebody give some suggestions as to how and where I

                  can/should start?

                  >  

                  > Also, another idea rolling in my mind is, Would it be possible to

                  build a replica Cosmac Elf based on a PIC or has anyone already done

                  this?

                  >  

                  > Thanks,

                  >  

                  > Long live cosmac elfs! 

                  >

                  >

                  >

                  >

                  > [Non-text portions of this message have been removed]

                  >





























                  [Non-text portions of this message have been removed]
                • Bill Rowe
                  re the PIC version, if you look way back in the message archives to where we were talking about a Membership Card single board system, someone had built a
                  Message 8 of 16 , Oct 4, 2008
                  • 0 Attachment
                    re the PIC version, if you look way back in the message archives to where we were talking about a "Membership Card" single board system, someone had built a tiny replica with 1802 emulation on a chip - I forget the builder and the chip type but I thought it was wonderfully cute.
                    ----- Original Message -----
                    From: akshay parelkar
                    To: cosmacelf@yahoogroups.com
                    Sent: Friday, October 03, 2008 5:05 PM
                    Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C


                    Thanks a lot for all the tip, suggestions and articles.

                    I will now proceed with the project.

                    Thanks again

                    --- On Fri, 10/3/08, ted_rossin <ted_rossin@...> wrote:
                    From: ted_rossin <ted_rossin@...>
                    Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                    To: cosmacelf@yahoogroups.com
                    Date: Friday, October 3, 2008, 11:30 AM

                    I just uploaded the source code to my Elf emulator in the

                    Files/Simulators folder (TedsElf.zip) . It is in C++ but should give

                    you some hints on how to proceed. The source is for a Visual Studio

                    project. The real meat is in 1802.cpp and 1802.h. You can find

                    programs that will run and instuctions on my web site:

                    http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html

                    One problem with many of the 1802 emulators that I tried is that

                    they are not coded up for real-time operation. They tend to run as

                    fast as they can which tends to be much faster than the real machine

                    and varies based on processor speed. I use Windows timers to step

                    my emulator at a periodic rate (I think every 50ms) for a tunable

                    number of steps. This keeps the simulator speed constant across

                    multiple machines. I don't have it perfectly tuned up but it does

                    run within 10% of my real Elf system.

                    The point I'm trying to make is to not make your emulator a giant

                    while loop but instead write it such that it is a subroutine that

                    maintains the state of the machine so that it can be called once per

                    unit of activity. For example, you could model all the machine

                    states and call the subroutine once per clock cycle. I choose to do

                    it once per instruction but I maintain state as to the number of

                    machine cycles executed (2 or 3 per instruction) . Machine cycles

                    are 8 clock cycles.

                    This also allows you to hook up devices to your emulator such as

                    LEDs, keyboards or 1861 video chips.

                    Good luck and have fun. I enjoyed the process and am now able to

                    develope code for my 1.6 MHz Elf on a 3.0 GHz PC.

                    --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@...> wrote:

                    >

                    > Hi Fans of Cosmac Elfs,

                    >

                    > I recently discovered this fancy little computer while searchig on

                    the web. I dont have a Real Cosmac Elf yet(Have digital ones

                    though).

                    >

                    > Lately, I have been thinking about writing up my own code (in C)

                    to simulate the Cosmac elf. I dont expect this project to compete

                    with the ones already available, just something with which I can

                    undertand more about the 1802 itself and improve and exercise my own

                    (rather limited) knowledge of C.

                    >

                    > Can somebody give some suggestions as to how and where I

                    can/should start?

                    >

                    > Also, another idea rolling in my mind is, Would it be possible to

                    build a replica Cosmac Elf based on a PIC or has anyone already done

                    this?

                    >

                    > Thanks,

                    >

                    > Long live cosmac elfs!

                    >

                    >

                    >

                    >

                    > [Non-text portions of this message have been removed]

                    >











                    [Non-text portions of this message have been removed]






                    ------------------------------------------------------------------------------


                    No virus found in this incoming message.
                    Checked by AVG.
                    Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date: 03/10/2008 8:18 AM


                    [Non-text portions of this message have been removed]
                  • Andrew Wasson
                    That s right Bill. If I remember correctly it was Kevin Timmerman who created the Pic 1802. I used to have the ASM listing for it. I thought it was a really
                    Message 9 of 16 , Oct 4, 2008
                    • 0 Attachment
                      That's right Bill.
                      If I remember correctly it was Kevin Timmerman who created the Pic
                      1802. I used to have the ASM listing for it. I thought it was a really
                      neat idea.

                      Andrew





                      --- In cosmacelf@yahoogroups.com, "Bill Rowe" <bill_rowe@...> wrote:
                      >
                      > re the PIC version, if you look way back in the message archives to
                      where we were talking about a "Membership Card" single board system,
                      someone had built a tiny replica with 1802 emulation on a chip - I
                      forget the builder and the chip type but I thought it was wonderfully
                      cute.
                      > ----- Original Message -----
                      > From: akshay parelkar
                      > To: cosmacelf@yahoogroups.com
                      > Sent: Friday, October 03, 2008 5:05 PM
                      > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                      >
                      >
                      > Thanks a lot for all the tip, suggestions and articles.
                      >
                      > I will now proceed with the project.
                      >
                      > Thanks again
                      >
                      > --- On Fri, 10/3/08, ted_rossin <ted_rossin@...> wrote:
                      > From: ted_rossin <ted_rossin@...>
                      > Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                      > To: cosmacelf@yahoogroups.com
                      > Date: Friday, October 3, 2008, 11:30 AM
                      >
                      > I just uploaded the source code to my Elf emulator in the
                      >
                      > Files/Simulators folder (TedsElf.zip) . It is in C++ but should give
                      >
                      > you some hints on how to proceed. The source is for a Visual Studio
                      >
                      > project. The real meat is in 1802.cpp and 1802.h. You can find
                      >
                      > programs that will run and instuctions on my web site:
                      >
                      > http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html
                      >
                      > One problem with many of the 1802 emulators that I tried is that
                      >
                      > they are not coded up for real-time operation. They tend to run as
                      >
                      > fast as they can which tends to be much faster than the real machine
                      >
                      > and varies based on processor speed. I use Windows timers to step
                      >
                      > my emulator at a periodic rate (I think every 50ms) for a tunable
                      >
                      > number of steps. This keeps the simulator speed constant across
                      >
                      > multiple machines. I don't have it perfectly tuned up but it does
                      >
                      > run within 10% of my real Elf system.
                      >
                      > The point I'm trying to make is to not make your emulator a giant
                      >
                      > while loop but instead write it such that it is a subroutine that
                      >
                      > maintains the state of the machine so that it can be called once per
                      >
                      > unit of activity. For example, you could model all the machine
                      >
                      > states and call the subroutine once per clock cycle. I choose to do
                      >
                      > it once per instruction but I maintain state as to the number of
                      >
                      > machine cycles executed (2 or 3 per instruction) . Machine cycles
                      >
                      > are 8 clock cycles.
                      >
                      > This also allows you to hook up devices to your emulator such as
                      >
                      > LEDs, keyboards or 1861 video chips.
                      >
                      > Good luck and have fun. I enjoyed the process and am now able to
                      >
                      > develope code for my 1.6 MHz Elf on a 3.0 GHz PC.
                      >
                      > --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@> wrote:
                      >
                      > >
                      >
                      > > Hi Fans of Cosmac Elfs,
                      >
                      > >
                      >
                      > > I recently discovered this fancy little computer while searchig on
                      >
                      > the web. I dont have a Real Cosmac Elf yet(Have digital ones
                      >
                      > though).
                      >
                      > >
                      >
                      > > Lately, I have been thinking about writing up my own code (in C)
                      >
                      > to simulate the Cosmac elf. I dont expect this project to compete
                      >
                      > with the ones already available, just something with which I can
                      >
                      > undertand more about the 1802 itself and improve and exercise my own
                      >
                      > (rather limited) knowledge of C.
                      >
                      > >
                      >
                      > > Can somebody give some suggestions as to how and where I
                      >
                      > can/should start?
                      >
                      > >
                      >
                      > > Also, another idea rolling in my mind is, Would it be possible to
                      >
                      > build a replica Cosmac Elf based on a PIC or has anyone already done
                      >
                      > this?
                      >
                      > >
                      >
                      > > Thanks,
                      >
                      > >
                      >
                      > > Long live cosmac elfs!
                      >
                      > >
                      >
                      > >
                      >
                      > >
                      >
                      > >
                      >
                      > > [Non-text portions of this message have been removed]
                      >
                      > >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      ------------------------------------------------------------------------------
                      >
                      >
                      > No virus found in this incoming message.
                      > Checked by AVG.
                      > Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date:
                      03/10/2008 8:18 AM
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                    • J.C. Wren
                      http://www.compendiumarcana.com/CDP1802/PIC1802.asm Not sure of the currency of it, but Google found it. --jc ... [Non-text portions of this message have been
                      Message 10 of 16 , Oct 4, 2008
                      • 0 Attachment
                        http://www.compendiumarcana.com/CDP1802/PIC1802.asm
                        Not sure of the currency of it, but Google found it.

                        --jc

                        On Sat, Oct 4, 2008 at 11:57 AM, Andrew Wasson <andrew@...>wrote:

                        > That's right Bill.
                        > If I remember correctly it was Kevin Timmerman who created the Pic
                        > 1802. I used to have the ASM listing for it. I thought it was a really
                        > neat idea.
                        >
                        > Andrew
                        >
                        >
                        >
                        >
                        >
                        > --- In cosmacelf@yahoogroups.com, "Bill Rowe" <bill_rowe@...> wrote:
                        > >
                        > > re the PIC version, if you look way back in the message archives to
                        > where we were talking about a "Membership Card" single board system,
                        > someone had built a tiny replica with 1802 emulation on a chip - I
                        > forget the builder and the chip type but I thought it was wonderfully
                        > cute.
                        > > ----- Original Message -----
                        > > From: akshay parelkar
                        > > To: cosmacelf@yahoogroups.com
                        > > Sent: Friday, October 03, 2008 5:05 PM
                        > > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                        > >
                        > >
                        > > Thanks a lot for all the tip, suggestions and articles.
                        > >
                        > > I will now proceed with the project.
                        > >
                        > > Thanks again
                        > >
                        > > --- On Fri, 10/3/08, ted_rossin <ted_rossin@...> wrote:
                        > > From: ted_rossin <ted_rossin@...>
                        > > Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                        > > To: cosmacelf@yahoogroups.com
                        > > Date: Friday, October 3, 2008, 11:30 AM
                        > >
                        > > I just uploaded the source code to my Elf emulator in the
                        > >
                        > > Files/Simulators folder (TedsElf.zip) . It is in C++ but should give
                        > >
                        > > you some hints on how to proceed. The source is for a Visual Studio
                        > >
                        > > project. The real meat is in 1802.cpp and 1802.h. You can find
                        > >
                        > > programs that will run and instuctions on my web site:
                        > >
                        > > http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html
                        > >
                        > > One problem with many of the 1802 emulators that I tried is that
                        > >
                        > > they are not coded up for real-time operation. They tend to run as
                        > >
                        > > fast as they can which tends to be much faster than the real machine
                        > >
                        > > and varies based on processor speed. I use Windows timers to step
                        > >
                        > > my emulator at a periodic rate (I think every 50ms) for a tunable
                        > >
                        > > number of steps. This keeps the simulator speed constant across
                        > >
                        > > multiple machines. I don't have it perfectly tuned up but it does
                        > >
                        > > run within 10% of my real Elf system.
                        > >
                        > > The point I'm trying to make is to not make your emulator a giant
                        > >
                        > > while loop but instead write it such that it is a subroutine that
                        > >
                        > > maintains the state of the machine so that it can be called once per
                        > >
                        > > unit of activity. For example, you could model all the machine
                        > >
                        > > states and call the subroutine once per clock cycle. I choose to do
                        > >
                        > > it once per instruction but I maintain state as to the number of
                        > >
                        > > machine cycles executed (2 or 3 per instruction) . Machine cycles
                        > >
                        > > are 8 clock cycles.
                        > >
                        > > This also allows you to hook up devices to your emulator such as
                        > >
                        > > LEDs, keyboards or 1861 video chips.
                        > >
                        > > Good luck and have fun. I enjoyed the process and am now able to
                        > >
                        > > develope code for my 1.6 MHz Elf on a 3.0 GHz PC.
                        > >
                        > > --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@> wrote:
                        > >
                        > > >
                        > >
                        > > > Hi Fans of Cosmac Elfs,
                        > >
                        > > >
                        > >
                        > > > I recently discovered this fancy little computer while searchig on
                        > >
                        > > the web. I dont have a Real Cosmac Elf yet(Have digital ones
                        > >
                        > > though).
                        > >
                        > > >
                        > >
                        > > > Lately, I have been thinking about writing up my own code (in C)
                        > >
                        > > to simulate the Cosmac elf. I dont expect this project to compete
                        > >
                        > > with the ones already available, just something with which I can
                        > >
                        > > undertand more about the 1802 itself and improve and exercise my own
                        > >
                        > > (rather limited) knowledge of C.
                        > >
                        > > >
                        > >
                        > > > Can somebody give some suggestions as to how and where I
                        > >
                        > > can/should start?
                        > >
                        > > >
                        > >
                        > > > Also, another idea rolling in my mind is, Would it be possible to
                        > >
                        > > build a replica Cosmac Elf based on a PIC or has anyone already done
                        > >
                        > > this?
                        > >
                        > > >
                        > >
                        > > > Thanks,
                        > >
                        > > >
                        > >
                        > > > Long live cosmac elfs!
                        > >
                        > > >
                        > >
                        > > >
                        > >
                        > > >
                        > >
                        > > >
                        > >
                        > > > [Non-text portions of this message have been removed]
                        > >
                        > > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > > [Non-text portions of this message have been removed]
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        > >
                        >
                        > ------------------------------------------------------------------------------
                        > >
                        > >
                        > > No virus found in this incoming message.
                        > > Checked by AVG.
                        > > Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date:
                        > 03/10/2008 8:18 AM
                        > >
                        > >
                        > > [Non-text portions of this message have been removed]
                        > >
                        >
                        >
                        >
                        > ------------------------------------
                        >
                        > ========================================================
                        > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
                        > Links
                        >
                        >
                        >


                        [Non-text portions of this message have been removed]
                      • Andrew Wasson
                        That looks like it! Gotta love the Google. If Kevin s around maybe he can shed some light on what to do and what not to do when embarking on a project like
                        Message 11 of 16 , Oct 4, 2008
                        • 0 Attachment
                          That looks like it!
                          Gotta love the Google.

                          If Kevin's around maybe he can shed some light on what to do and what
                          not to do when embarking on a project like this.

                          Andrew

                          --- In cosmacelf@yahoogroups.com, "J.C. Wren" <jcwren@...> wrote:
                          >
                          > http://www.compendiumarcana.com/CDP1802/PIC1802.asm
                          > Not sure of the currency of it, but Google found it.
                          >
                          > --jc
                          >
                          > On Sat, Oct 4, 2008 at 11:57 AM, Andrew Wasson <andrew@...>wrote:
                          >
                          > > That's right Bill.
                          > > If I remember correctly it was Kevin Timmerman who created the Pic
                          > > 1802. I used to have the ASM listing for it. I thought it was a really
                          > > neat idea.
                          > >
                          > > Andrew
                          > >
                          > >
                          > >
                          > >
                          > >
                          > > --- In cosmacelf@yahoogroups.com, "Bill Rowe" <bill_rowe@> wrote:
                          > > >
                          > > > re the PIC version, if you look way back in the message archives to
                          > > where we were talking about a "Membership Card" single board system,
                          > > someone had built a tiny replica with 1802 emulation on a chip - I
                          > > forget the builder and the chip type but I thought it was wonderfully
                          > > cute.
                          > > > ----- Original Message -----
                          > > > From: akshay parelkar
                          > > > To: cosmacelf@yahoogroups.com
                          > > > Sent: Friday, October 03, 2008 5:05 PM
                          > > > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                          > > >
                          > > >
                          > > > Thanks a lot for all the tip, suggestions and articles.
                          > > >
                          > > > I will now proceed with the project.
                          > > >
                          > > > Thanks again
                          > > >
                          > > > --- On Fri, 10/3/08, ted_rossin <ted_rossin@> wrote:
                          > > > From: ted_rossin <ted_rossin@>
                          > > > Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                          > > > To: cosmacelf@yahoogroups.com
                          > > > Date: Friday, October 3, 2008, 11:30 AM
                          > > >
                          > > > I just uploaded the source code to my Elf emulator in the
                          > > >
                          > > > Files/Simulators folder (TedsElf.zip) . It is in C++ but
                          should give
                          > > >
                          > > > you some hints on how to proceed. The source is for a Visual
                          Studio
                          > > >
                          > > > project. The real meat is in 1802.cpp and 1802.h. You can find
                          > > >
                          > > > programs that will run and instuctions on my web site:
                          > > >
                          > > > http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html
                          > > >
                          > > > One problem with many of the 1802 emulators that I tried is that
                          > > >
                          > > > they are not coded up for real-time operation. They tend to run as
                          > > >
                          > > > fast as they can which tends to be much faster than the real
                          machine
                          > > >
                          > > > and varies based on processor speed. I use Windows timers to step
                          > > >
                          > > > my emulator at a periodic rate (I think every 50ms) for a tunable
                          > > >
                          > > > number of steps. This keeps the simulator speed constant across
                          > > >
                          > > > multiple machines. I don't have it perfectly tuned up but it does
                          > > >
                          > > > run within 10% of my real Elf system.
                          > > >
                          > > > The point I'm trying to make is to not make your emulator a giant
                          > > >
                          > > > while loop but instead write it such that it is a subroutine that
                          > > >
                          > > > maintains the state of the machine so that it can be called
                          once per
                          > > >
                          > > > unit of activity. For example, you could model all the machine
                          > > >
                          > > > states and call the subroutine once per clock cycle. I choose
                          to do
                          > > >
                          > > > it once per instruction but I maintain state as to the number of
                          > > >
                          > > > machine cycles executed (2 or 3 per instruction) . Machine cycles
                          > > >
                          > > > are 8 clock cycles.
                          > > >
                          > > > This also allows you to hook up devices to your emulator such as
                          > > >
                          > > > LEDs, keyboards or 1861 video chips.
                          > > >
                          > > > Good luck and have fun. I enjoyed the process and am now able to
                          > > >
                          > > > develope code for my 1.6 MHz Elf on a 3.0 GHz PC.
                          > > >
                          > > > --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@>
                          wrote:
                          > > >
                          > > > >
                          > > >
                          > > > > Hi Fans of Cosmac Elfs,
                          > > >
                          > > > >
                          > > >
                          > > > > I recently discovered this fancy little computer while
                          searchig on
                          > > >
                          > > > the web. I dont have a Real Cosmac Elf yet(Have digital ones
                          > > >
                          > > > though).
                          > > >
                          > > > >
                          > > >
                          > > > > Lately, I have been thinking about writing up my own code (in C)
                          > > >
                          > > > to simulate the Cosmac elf. I dont expect this project to compete
                          > > >
                          > > > with the ones already available, just something with which I can
                          > > >
                          > > > undertand more about the 1802 itself and improve and exercise
                          my own
                          > > >
                          > > > (rather limited) knowledge of C.
                          > > >
                          > > > >
                          > > >
                          > > > > Can somebody give some suggestions as to how and where I
                          > > >
                          > > > can/should start?
                          > > >
                          > > > >
                          > > >
                          > > > > Also, another idea rolling in my mind is, Would it be
                          possible to
                          > > >
                          > > > build a replica Cosmac Elf based on a PIC or has anyone
                          already done
                          > > >
                          > > > this?
                          > > >
                          > > > >
                          > > >
                          > > > > Thanks,
                          > > >
                          > > > >
                          > > >
                          > > > > Long live cosmac elfs!
                          > > >
                          > > > >
                          > > >
                          > > > >
                          > > >
                          > > > >
                          > > >
                          > > > >
                          > > >
                          > > > > [Non-text portions of this message have been removed]
                          > > >
                          > > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > > [Non-text portions of this message have been removed]
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > > >
                          > >
                          > >
                          ------------------------------------------------------------------------------
                          > > >
                          > > >
                          > > > No virus found in this incoming message.
                          > > > Checked by AVG.
                          > > > Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date:
                          > > 03/10/2008 8:18 AM
                          > > >
                          > > >
                          > > > [Non-text portions of this message have been removed]
                          > > >
                          > >
                          > >
                          > >
                          > > ------------------------------------
                          > >
                          > > ========================================================
                          > > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
                          > > Links
                          > >
                          > >
                          > >
                          >
                          >
                          > [Non-text portions of this message have been removed]
                          >
                        • Bill Rowe
                          That s it and there s a wonderful picture of it with switches and lights. http://www.compendiumarcana.com/CDP1802/CC1802.PNG I ve fallen in love with the
                          Message 12 of 16 , Oct 4, 2008
                          • 0 Attachment
                            That's it and there's a wonderful picture of it with switches and lights.
                            http://www.compendiumarcana.com/CDP1802/CC1802.PNG

                            I've fallen in love with the arduino which uses the AVR microcomputers instead of the PICs but they offer the same kind of wonderful compactness.
                            ----- Original Message -----
                            From: J.C. Wren
                            To: cosmacelf@yahoogroups.com
                            Sent: Saturday, October 04, 2008 12:01 PM
                            Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C


                            http://www.compendiumarcana.com/CDP1802/PIC1802.asm
                            Not sure of the currency of it, but Google found it.

                            --jc

                            On Sat, Oct 4, 2008 at 11:57 AM, Andrew Wasson <andrew@...>wrote:

                            > That's right Bill.
                            > If I remember correctly it was Kevin Timmerman who created the Pic
                            > 1802. I used to have the ASM listing for it. I thought it was a really
                            > neat idea.
                            >
                            > Andrew
                            >
                            >
                            >
                            >
                            >
                            > --- In cosmacelf@yahoogroups.com, "Bill Rowe" <bill_rowe@...> wrote:
                            > >
                            > > re the PIC version, if you look way back in the message archives to
                            > where we were talking about a "Membership Card" single board system,
                            > someone had built a tiny replica with 1802 emulation on a chip - I
                            > forget the builder and the chip type but I thought it was wonderfully
                            > cute.
                            > > ----- Original Message -----
                            > > From: akshay parelkar
                            > > To: cosmacelf@yahoogroups.com
                            > > Sent: Friday, October 03, 2008 5:05 PM
                            > > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                            > >
                            > >
                            > > Thanks a lot for all the tip, suggestions and articles.
                            > >
                            > > I will now proceed with the project.
                            > >
                            > > Thanks again
                            > >
                            > > --- On Fri, 10/3/08, ted_rossin <ted_rossin@...> wrote:
                            > > From: ted_rossin <ted_rossin@...>
                            > > Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                            > > To: cosmacelf@yahoogroups.com
                            > > Date: Friday, October 3, 2008, 11:30 AM
                            > >
                            > > I just uploaded the source code to my Elf emulator in the
                            > >
                            > > Files/Simulators folder (TedsElf.zip) . It is in C++ but should give
                            > >
                            > > you some hints on how to proceed. The source is for a Visual Studio
                            > >
                            > > project. The real meat is in 1802.cpp and 1802.h. You can find
                            > >
                            > > programs that will run and instuctions on my web site:
                            > >
                            > > http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html
                            > >
                            > > One problem with many of the 1802 emulators that I tried is that
                            > >
                            > > they are not coded up for real-time operation. They tend to run as
                            > >
                            > > fast as they can which tends to be much faster than the real machine
                            > >
                            > > and varies based on processor speed. I use Windows timers to step
                            > >
                            > > my emulator at a periodic rate (I think every 50ms) for a tunable
                            > >
                            > > number of steps. This keeps the simulator speed constant across
                            > >
                            > > multiple machines. I don't have it perfectly tuned up but it does
                            > >
                            > > run within 10% of my real Elf system.
                            > >
                            > > The point I'm trying to make is to not make your emulator a giant
                            > >
                            > > while loop but instead write it such that it is a subroutine that
                            > >
                            > > maintains the state of the machine so that it can be called once per
                            > >
                            > > unit of activity. For example, you could model all the machine
                            > >
                            > > states and call the subroutine once per clock cycle. I choose to do
                            > >
                            > > it once per instruction but I maintain state as to the number of
                            > >
                            > > machine cycles executed (2 or 3 per instruction) . Machine cycles
                            > >
                            > > are 8 clock cycles.
                            > >
                            > > This also allows you to hook up devices to your emulator such as
                            > >
                            > > LEDs, keyboards or 1861 video chips.
                            > >
                            > > Good luck and have fun. I enjoyed the process and am now able to
                            > >
                            > > develope code for my 1.6 MHz Elf on a 3.0 GHz PC.
                            > >
                            > > --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@> wrote:
                            > >
                            > > >
                            > >
                            > > > Hi Fans of Cosmac Elfs,
                            > >
                            > > >
                            > >
                            > > > I recently discovered this fancy little computer while searchig on
                            > >
                            > > the web. I dont have a Real Cosmac Elf yet(Have digital ones
                            > >
                            > > though).
                            > >
                            > > >
                            > >
                            > > > Lately, I have been thinking about writing up my own code (in C)
                            > >
                            > > to simulate the Cosmac elf. I dont expect this project to compete
                            > >
                            > > with the ones already available, just something with which I can
                            > >
                            > > undertand more about the 1802 itself and improve and exercise my own
                            > >
                            > > (rather limited) knowledge of C.
                            > >
                            > > >
                            > >
                            > > > Can somebody give some suggestions as to how and where I
                            > >
                            > > can/should start?
                            > >
                            > > >
                            > >
                            > > > Also, another idea rolling in my mind is, Would it be possible to
                            > >
                            > > build a replica Cosmac Elf based on a PIC or has anyone already done
                            > >
                            > > this?
                            > >
                            > > >
                            > >
                            > > > Thanks,
                            > >
                            > > >
                            > >
                            > > > Long live cosmac elfs!
                            > >
                            > > >
                            > >
                            > > >
                            > >
                            > > >
                            > >
                            > > >
                            > >
                            > > > [Non-text portions of this message have been removed]
                            > >
                            > > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > > [Non-text portions of this message have been removed]
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            >
                            > ----------------------------------------------------------
                            > >
                            > >
                            > > No virus found in this incoming message.
                            > > Checked by AVG.
                            > > Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date:
                            > 03/10/2008 8:18 AM
                            > >
                            > >
                            > > [Non-text portions of this message have been removed]
                            > >
                            >
                            >
                            >
                            > ------------------------------------
                            >
                            > ========================================================
                            > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
                            > Links
                            >
                            >
                            >

                            [Non-text portions of this message have been removed]






                            ------------------------------------------------------------------------------


                            No virus found in this incoming message.
                            Checked by AVG.
                            Version: 7.5.524 / Virus Database: 270.7.5/1706 - Release Date: 03/10/2008 6:17 PM


                            [Non-text portions of this message have been removed]
                          • J.C. Wren
                            Color me confused, but I can t understand the appeal of the Arduino. Other than some canned libraries, and some pre-made PCBs, what exactly do they have to
                            Message 13 of 16 , Oct 4, 2008
                            • 0 Attachment
                              Color me confused, but I can't understand the appeal of the Arduino. Other
                              than some canned libraries, and some pre-made PCBs, what exactly do they
                              have to offer that I can't do with some simple C code anyway? And this bit
                              about "sketches" and "shields"... We've been calling them "programs" and
                              "daughter cards" for the last 40+ years. Why do we need some new words for
                              this?
                              --jc

                              On Sat, Oct 4, 2008 at 1:15 PM, Bill Rowe <bill_rowe@...> wrote:

                              > That's it and there's a wonderful picture of it with switches and lights.
                              > http://www.compendiumarcana.com/CDP1802/CC1802.PNG
                              >
                              > I've fallen in love with the arduino which uses the AVR microcomputers
                              > instead of the PICs but they offer the same kind of wonderful compactness.
                              > ----- Original Message -----
                              > From: J.C. Wren
                              > To: cosmacelf@yahoogroups.com
                              > Sent: Saturday, October 04, 2008 12:01 PM
                              > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                              >
                              >
                              > http://www.compendiumarcana.com/CDP1802/PIC1802.asm
                              > Not sure of the currency of it, but Google found it.
                              >
                              > --jc
                              >
                              > On Sat, Oct 4, 2008 at 11:57 AM, Andrew Wasson <andrew@...
                              > >wrote:
                              >
                              > > That's right Bill.
                              > > If I remember correctly it was Kevin Timmerman who created the Pic
                              > > 1802. I used to have the ASM listing for it. I thought it was a really
                              > > neat idea.
                              > >
                              > > Andrew
                              > >
                              > >
                              > >
                              > >
                              > >
                              > > --- In cosmacelf@yahoogroups.com, "Bill Rowe" <bill_rowe@...> wrote:
                              > > >
                              > > > re the PIC version, if you look way back in the message archives to
                              > > where we were talking about a "Membership Card" single board system,
                              > > someone had built a tiny replica with 1802 emulation on a chip - I
                              > > forget the builder and the chip type but I thought it was wonderfully
                              > > cute.
                              > > > ----- Original Message -----
                              > > > From: akshay parelkar
                              > > > To: cosmacelf@yahoogroups.com
                              > > > Sent: Friday, October 03, 2008 5:05 PM
                              > > > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                              > > >
                              > > >
                              > > > Thanks a lot for all the tip, suggestions and articles.
                              > > >
                              > > > I will now proceed with the project.
                              > > >
                              > > > Thanks again
                              > > >
                              > > > --- On Fri, 10/3/08, ted_rossin <ted_rossin@...> wrote:
                              > > > From: ted_rossin <ted_rossin@...>
                              > > > Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                              > > > To: cosmacelf@yahoogroups.com
                              > > > Date: Friday, October 3, 2008, 11:30 AM
                              > > >
                              > > > I just uploaded the source code to my Elf emulator in the
                              > > >
                              > > > Files/Simulators folder (TedsElf.zip) . It is in C++ but should give
                              > > >
                              > > > you some hints on how to proceed. The source is for a Visual Studio
                              > > >
                              > > > project. The real meat is in 1802.cpp and 1802.h. You can find
                              > > >
                              > > > programs that will run and instuctions on my web site:
                              > > >
                              > > > http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html
                              > > >
                              > > > One problem with many of the 1802 emulators that I tried is that
                              > > >
                              > > > they are not coded up for real-time operation. They tend to run as
                              > > >
                              > > > fast as they can which tends to be much faster than the real machine
                              > > >
                              > > > and varies based on processor speed. I use Windows timers to step
                              > > >
                              > > > my emulator at a periodic rate (I think every 50ms) for a tunable
                              > > >
                              > > > number of steps. This keeps the simulator speed constant across
                              > > >
                              > > > multiple machines. I don't have it perfectly tuned up but it does
                              > > >
                              > > > run within 10% of my real Elf system.
                              > > >
                              > > > The point I'm trying to make is to not make your emulator a giant
                              > > >
                              > > > while loop but instead write it such that it is a subroutine that
                              > > >
                              > > > maintains the state of the machine so that it can be called once per
                              > > >
                              > > > unit of activity. For example, you could model all the machine
                              > > >
                              > > > states and call the subroutine once per clock cycle. I choose to do
                              > > >
                              > > > it once per instruction but I maintain state as to the number of
                              > > >
                              > > > machine cycles executed (2 or 3 per instruction) . Machine cycles
                              > > >
                              > > > are 8 clock cycles.
                              > > >
                              > > > This also allows you to hook up devices to your emulator such as
                              > > >
                              > > > LEDs, keyboards or 1861 video chips.
                              > > >
                              > > > Good luck and have fun. I enjoyed the process and am now able to
                              > > >
                              > > > develope code for my 1.6 MHz Elf on a 3.0 GHz PC.
                              > > >
                              > > > --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@> wrote:
                              > > >
                              > > > >
                              > > >
                              > > > > Hi Fans of Cosmac Elfs,
                              > > >
                              > > > >
                              > > >
                              > > > > I recently discovered this fancy little computer while searchig on
                              > > >
                              > > > the web. I dont have a Real Cosmac Elf yet(Have digital ones
                              > > >
                              > > > though).
                              > > >
                              > > > >
                              > > >
                              > > > > Lately, I have been thinking about writing up my own code (in C)
                              > > >
                              > > > to simulate the Cosmac elf. I dont expect this project to compete
                              > > >
                              > > > with the ones already available, just something with which I can
                              > > >
                              > > > undertand more about the 1802 itself and improve and exercise my own
                              > > >
                              > > > (rather limited) knowledge of C.
                              > > >
                              > > > >
                              > > >
                              > > > > Can somebody give some suggestions as to how and where I
                              > > >
                              > > > can/should start?
                              > > >
                              > > > >
                              > > >
                              > > > > Also, another idea rolling in my mind is, Would it be possible to
                              > > >
                              > > > build a replica Cosmac Elf based on a PIC or has anyone already done
                              > > >
                              > > > this?
                              > > >
                              > > > >
                              > > >
                              > > > > Thanks,
                              > > >
                              > > > >
                              > > >
                              > > > > Long live cosmac elfs!
                              > > >
                              > > > >
                              > > >
                              > > > >
                              > > >
                              > > > >
                              > > >
                              > > > >
                              > > >
                              > > > > [Non-text portions of this message have been removed]
                              > > >
                              > > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > > [Non-text portions of this message have been removed]
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > > >
                              > >
                              > > ----------------------------------------------------------
                              > > >
                              > > >
                              > > > No virus found in this incoming message.
                              > > > Checked by AVG.
                              > > > Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date:
                              > > 03/10/2008 8:18 AM
                              > > >
                              > > >
                              > > > [Non-text portions of this message have been removed]
                              > > >
                              > >
                              > >
                              > >
                              > > ------------------------------------
                              > >
                              > > ========================================================
                              > > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
                              > > Links
                              > >
                              > >
                              > >
                              >
                              > [Non-text portions of this message have been removed]
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              > ------------------------------------------------------------------------------
                              >
                              >
                              > No virus found in this incoming message.
                              > Checked by AVG.
                              > Version: 7.5.524 / Virus Database: 270.7.5/1706 - Release Date:
                              > 03/10/2008 6:17 PM
                              >
                              >
                              > [Non-text portions of this message have been removed]
                              >
                              >
                              > ------------------------------------
                              >
                              > ========================================================
                              > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
                              > Links
                              >
                              >
                              >


                              [Non-text portions of this message have been removed]
                            • Andrew Wasson
                              I haven t played with the Arduino myself but I m impressed with the following it has generated. Some really neat things have been created with them. Other than
                              Message 14 of 16 , Oct 4, 2008
                              • 0 Attachment
                                I haven't played with the Arduino myself but I'm impressed with the
                                following it has generated. Some really neat things have been created
                                with them. Other than that, I'm a fan of the Ubicom SX Chips...

                                They can be run in Pic mode if need be or they can run in their native
                                turbo mode which is several times faster. I've only used them with ASM
                                code but I believe you can program them in a variant of C.

                                Andrew

                                --- In cosmacelf@yahoogroups.com, "J.C. Wren" <jcwren@...> wrote:
                                >
                                > Color me confused, but I can't understand the appeal of the Arduino.
                                Other
                                > than some canned libraries, and some pre-made PCBs, what exactly do they
                                > have to offer that I can't do with some simple C code anyway? And
                                this bit
                                > about "sketches" and "shields"... We've been calling them
                                "programs" and
                                > "daughter cards" for the last 40+ years. Why do we need some new
                                words for
                                > this?
                                > --jc
                                >
                                > On Sat, Oct 4, 2008 at 1:15 PM, Bill Rowe <bill_rowe@...> wrote:
                                >
                                > > That's it and there's a wonderful picture of it with switches and
                                lights.
                                > > http://www.compendiumarcana.com/CDP1802/CC1802.PNG
                                > >
                                > > I've fallen in love with the arduino which uses the AVR microcomputers
                                > > instead of the PICs but they offer the same kind of wonderful
                                compactness.
                                > > ----- Original Message -----
                                > > From: J.C. Wren
                                > > To: cosmacelf@yahoogroups.com
                                > > Sent: Saturday, October 04, 2008 12:01 PM
                                > > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                                > >
                                > >
                                > > http://www.compendiumarcana.com/CDP1802/PIC1802.asm
                                > > Not sure of the currency of it, but Google found it.
                                > >
                                > > --jc
                                > >
                                > > On Sat, Oct 4, 2008 at 11:57 AM, Andrew Wasson <andrew@...
                                > > >wrote:
                                > >
                                > > > That's right Bill.
                                > > > If I remember correctly it was Kevin Timmerman who created the Pic
                                > > > 1802. I used to have the ASM listing for it. I thought it was a
                                really
                                > > > neat idea.
                                > > >
                                > > > Andrew
                                > > >
                                > > >
                                > > >
                                > > >
                                > > >
                                > > > --- In cosmacelf@yahoogroups.com, "Bill Rowe" <bill_rowe@> wrote:
                                > > > >
                                > > > > re the PIC version, if you look way back in the message
                                archives to
                                > > > where we were talking about a "Membership Card" single board
                                system,
                                > > > someone had built a tiny replica with 1802 emulation on a chip - I
                                > > > forget the builder and the chip type but I thought it was
                                wonderfully
                                > > > cute.
                                > > > > ----- Original Message -----
                                > > > > From: akshay parelkar
                                > > > > To: cosmacelf@yahoogroups.com
                                > > > > Sent: Friday, October 03, 2008 5:05 PM
                                > > > > Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                                > > > >
                                > > > >
                                > > > > Thanks a lot for all the tip, suggestions and articles.
                                > > > >
                                > > > > I will now proceed with the project.
                                > > > >
                                > > > > Thanks again
                                > > > >
                                > > > > --- On Fri, 10/3/08, ted_rossin <ted_rossin@> wrote:
                                > > > > From: ted_rossin <ted_rossin@>
                                > > > > Subject: [cosmacelf] Re: creating a cosmacelf simulator in C
                                > > > > To: cosmacelf@yahoogroups.com
                                > > > > Date: Friday, October 3, 2008, 11:30 AM
                                > > > >
                                > > > > I just uploaded the source code to my Elf emulator in the
                                > > > >
                                > > > > Files/Simulators folder (TedsElf.zip) . It is in C++ but
                                should give
                                > > > >
                                > > > > you some hints on how to proceed. The source is for a Visual
                                Studio
                                > > > >
                                > > > > project. The real meat is in 1802.cpp and 1802.h. You can find
                                > > > >
                                > > > > programs that will run and instuctions on my web site:
                                > > > >
                                > > > > http://www.geocitie s.com/ted_ rossin/Electroni cs/RCA/RCA. html
                                > > > >
                                > > > > One problem with many of the 1802 emulators that I tried is that
                                > > > >
                                > > > > they are not coded up for real-time operation. They tend to
                                run as
                                > > > >
                                > > > > fast as they can which tends to be much faster than the real
                                machine
                                > > > >
                                > > > > and varies based on processor speed. I use Windows timers to step
                                > > > >
                                > > > > my emulator at a periodic rate (I think every 50ms) for a tunable
                                > > > >
                                > > > > number of steps. This keeps the simulator speed constant across
                                > > > >
                                > > > > multiple machines. I don't have it perfectly tuned up but it does
                                > > > >
                                > > > > run within 10% of my real Elf system.
                                > > > >
                                > > > > The point I'm trying to make is to not make your emulator a giant
                                > > > >
                                > > > > while loop but instead write it such that it is a subroutine that
                                > > > >
                                > > > > maintains the state of the machine so that it can be called
                                once per
                                > > > >
                                > > > > unit of activity. For example, you could model all the machine
                                > > > >
                                > > > > states and call the subroutine once per clock cycle. I choose
                                to do
                                > > > >
                                > > > > it once per instruction but I maintain state as to the number of
                                > > > >
                                > > > > machine cycles executed (2 or 3 per instruction) . Machine cycles
                                > > > >
                                > > > > are 8 clock cycles.
                                > > > >
                                > > > > This also allows you to hook up devices to your emulator such as
                                > > > >
                                > > > > LEDs, keyboards or 1861 video chips.
                                > > > >
                                > > > > Good luck and have fun. I enjoyed the process and am now able to
                                > > > >
                                > > > > develope code for my 1.6 MHz Elf on a 3.0 GHz PC.
                                > > > >
                                > > > > --- In cosmacelf@yahoogrou ps.com, akshay parelkar <va7aax@>
                                wrote:
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > Hi Fans of Cosmac Elfs,
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > I recently discovered this fancy little computer while
                                searchig on
                                > > > >
                                > > > > the web. I dont have a Real Cosmac Elf yet(Have digital ones
                                > > > >
                                > > > > though).
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > Lately, I have been thinking about writing up my own code
                                (in C)
                                > > > >
                                > > > > to simulate the Cosmac elf. I dont expect this project to compete
                                > > > >
                                > > > > with the ones already available, just something with which I can
                                > > > >
                                > > > > undertand more about the 1802 itself and improve and exercise
                                my own
                                > > > >
                                > > > > (rather limited) knowledge of C.
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > Can somebody give some suggestions as to how and where I
                                > > > >
                                > > > > can/should start?
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > Also, another idea rolling in my mind is, Would it be
                                possible to
                                > > > >
                                > > > > build a replica Cosmac Elf based on a PIC or has anyone
                                already done
                                > > > >
                                > > > > this?
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > Thanks,
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > Long live cosmac elfs!
                                > > > >
                                > > > > >
                                > > > >
                                > > > > >
                                > > > >
                                > > > > >
                                > > > >
                                > > > > >
                                > > > >
                                > > > > > [Non-text portions of this message have been removed]
                                > > > >
                                > > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > > [Non-text portions of this message have been removed]
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > >
                                > > > ----------------------------------------------------------
                                > > > >
                                > > > >
                                > > > > No virus found in this incoming message.
                                > > > > Checked by AVG.
                                > > > > Version: 7.5.524 / Virus Database: 270.7.5/1705 - Release Date:
                                > > > 03/10/2008 8:18 AM
                                > > > >
                                > > > >
                                > > > > [Non-text portions of this message have been removed]
                                > > > >
                                > > >
                                > > >
                                > > >
                                > > > ------------------------------------
                                > > >
                                > > > ========================================================
                                > > > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo!
                                Groups
                                > > > Links
                                > > >
                                > > >
                                > > >
                                > >
                                > > [Non-text portions of this message have been removed]
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                ------------------------------------------------------------------------------
                                > >
                                > >
                                > > No virus found in this incoming message.
                                > > Checked by AVG.
                                > > Version: 7.5.524 / Virus Database: 270.7.5/1706 - Release Date:
                                > > 03/10/2008 6:17 PM
                                > >
                                > >
                                > > [Non-text portions of this message have been removed]
                                > >
                                > >
                                > > ------------------------------------
                                > >
                                > > ========================================================
                                > > Visit the COSMAC ELF website at http://www.cosmacelf.comYahoo! Groups
                                > > Links
                                > >
                                > >
                                > >
                                >
                                >
                                > [Non-text portions of this message have been removed]
                                >
                              • Robert L. Doerr
                                ... Hello Andrew, Not meaning to get too far off topic but those SX chips are pretty slick. Parallax is the distributor for all those chips now and they are
                                Message 15 of 16 , Oct 4, 2008
                                • 0 Attachment
                                  Andrew Wasson wrote:
                                  > I haven't played with the Arduino myself but I'm impressed with the
                                  > following it has generated. Some really neat things have been created
                                  > with them. Other than that, I'm a fan of the Ubicom SX Chips...
                                  >
                                  > They can be run in Pic mode if need be or they can run in their native
                                  > turbo mode which is several times faster. I've only used them with ASM
                                  > code but I believe you can program them in a variant of C.
                                  >
                                  Hello Andrew,

                                  Not meaning to get too far off topic but those SX chips are pretty
                                  slick. Parallax is the distributor for all those chips now and they are
                                  very handy for a lot of projects. They have a free BASIC compiler out
                                  for that chip called SX/B and it works great. Used it for a few
                                  projects I had in SERVO magazine. I would expect that the SX48 could be
                                  used to emulate an 1802 using the 1802 PIC code that is already out
                                  there as a starting point. Nice thing about the SX48 is that it has
                                  lots of I/O and is a fast chip. I've got a kit that puts in in a 40-pin
                                  form factor perfect for a breadboard. Be interesting to see if it could
                                  work in place of an 1802 with the emulation code and an adapter to make
                                  it fit the 1802 pinout. In case you are curious the full kit
                                  w/instructions is right around $30.

                                  http://www.robotworkshop.com/robotworkshop/projects/DSCF0037.JPG

                                  Best Regards,

                                  Robert
                                • akshay parelkar
                                  Thanks to everybody for providing answers to my questions. Some very nice stuff about the PIC1802, too Thanks to everybody ... From: Robert L. Doerr
                                  Message 16 of 16 , Oct 4, 2008
                                  • 0 Attachment
                                    Thanks to everybody for providing answers to my questions.
                                    Some very nice stuff about the PIC1802, too


                                    Thanks to everybody

                                    --- On Sat, 10/4/08, Robert L. Doerr <rdoerr@...> wrote:
                                    From: Robert L. Doerr <rdoerr@...>
                                    Subject: Re: [cosmacelf] Re: creating a cosmacelf simulator in C
                                    To: cosmacelf@yahoogroups.com
                                    Date: Saturday, October 4, 2008, 11:51 AM











                                    Andrew Wasson wrote:

                                    > I haven't played with the Arduino myself but I'm impressed with the

                                    > following it has generated. Some really neat things have been created

                                    > with them. Other than that, I'm a fan of the Ubicom SX Chips...

                                    >

                                    > They can be run in Pic mode if need be or they can run in their native

                                    > turbo mode which is several times faster. I've only used them with ASM

                                    > code but I believe you can program them in a variant of C.

                                    >

                                    Hello Andrew,



                                    Not meaning to get too far off topic but those SX chips are pretty

                                    slick. Parallax is the distributor for all those chips now and they are

                                    very handy for a lot of projects. They have a free BASIC compiler out

                                    for that chip called SX/B and it works great. Used it for a few

                                    projects I had in SERVO magazine. I would expect that the SX48 could be

                                    used to emulate an 1802 using the 1802 PIC code that is already out

                                    there as a starting point. Nice thing about the SX48 is that it has

                                    lots of I/O and is a fast chip. I've got a kit that puts in in a 40-pin

                                    form factor perfect for a breadboard. Be interesting to see if it could

                                    work in place of an 1802 with the emulation code and an adapter to make

                                    it fit the 1802 pinout. In case you are curious the full kit

                                    w/instructions is right around $30.



                                    http://www.robotwor kshop.com/ robotworkshop/ projects/ DSCF0037. JPG



                                    Best Regards,



                                    Robert



























                                    [Non-text portions of this message have been removed]
                                  Your message has been successfully submitted and would be delivered to recipients shortly.