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

Re: [cosmacelf] Enhanced SimElf Simulator in JavaScript -- (pre-announce)

Expand Messages
  • Aurel Boisvert
    I just tried it with FireFox 4.X running on Windows 7. Worked fine. ... -- Aurel [Non-text portions of this message have been removed]
    Message 1 of 13 , Jun 1, 2011
    • 0 Attachment
      I just tried it with FireFox 4.X running on Windows 7.
      Worked fine.

      On 31/05/2011 10:23 PM, whd_whd_whd wrote:
      >
      > I've been messing around with the SimElf JavaScript simulator
      > originally written by Maciej Szyc in 2005. He published it as GNU GPL
      > 2+. I've e-mail corresponded with him and he is supportive of my efforts.
      >
      > Over the last week or so, on and off, I have enhanced it quite a bit
      > to make it "better" and more usable and user-friendly. I've also
      > corrected some severe bugs I found. (which effectively made it
      > unusable -- Maciej wrote it and never tested or debugged it) I'll list
      > below what I've done and intend to do, from the internal
      > documentation, and more that is not mentioned.
      >
      > It's still not done, but getting there, and is a lot better than the
      > original. (in a sense) Basically, I consider it more or less usable
      > right now, in the sense that it is more than a COSMAC Elf "black box"
      > with only switches and a two-digit hex display and a Q LED. It's a bit
      > slow (mostly with the display/LED updates), but not too bad. It's more
      > or less usable. Especially as an easy-to-use and user-friendly
      > intro/trainer. (and just fun to play with if you're into that sort of
      > thing)
      >
      > So I decided to show it to you as an unfinished "rough draft". Let me
      > know what you think if you get a chance to look at it. It might take
      > me a few more weeks+ or so to finish it off the way I envision it,
      > depending on how much I work on it. (although I have a feeling that
      > this is going to be a LONG TERM project) Remember that not all of the
      > features and functionality are supported at this point, some of which
      > are evident and present but non-functioning.
      >
      > I'm kind of calling it the COSMAC Elf^2. (squared) [working title]
      >
      > http://www.donnelly-house.net/programming/cdp1802/simelf/cosmacelf.html
      >
      > (I like to run it locally as a file:// program, so that format is
      > supported, and will be additionally supported as a ZIP archive download)
      >
      > NOTE: It currently works in Firefox 3.x and Opera, and Google Chrome I
      > think, but not IE (9). I may or may not support IE.
      >
      > There is no HELP right now, so the quick-use description is as follows:
      >
      > AFAIK, the basic unit works like the original hardware COSMAC Elf did,
      > the way the switches are used to enter and run programs. As anyone who
      > has used the switches to enter programs knows, that can quickly become
      > tedious and tiresome. Plus the limited I/O available. So I have added
      > some features and functionality to make it easier and funner to use.
      > More will be added later to extend it quite a bit.
      >
      > DOUBLE-click on the 7-segment LED's image(s) to enter "Hex Keypad
      > Entry Mode". There are a few modes that sequence through the
      > double-click selections. The first is just a quick auto-enter with one
      > byte per two-digit hex entry. The other two modes require an ENTER
      > and/or SPACE key to enter and move on. ESC or taking it out of Load
      > Mode with the toggle switch takes you out of hex entry mode. It is
      > also temporarily out of hex entry mode when the Memory Dump and
      > Program Load "window" is activated. This makes it MUCH easier to enter
      > programs.
      >
      > The Memory Dump and Program Load "window" is activated by clicking on
      > either of the memory IC chips at the top. This "pops up" a "window"
      > (hidden and unhidden HTML div). This offers some additional program
      > entry options, as well as Memory Hex Dump, DisAssembly, and Program
      > Load from hex text and built-in programs. It's fairly understandable
      > without too much explanation, I think. The two check boxes don't work
      > yet. I have to decide which formats of hex dump entry I want to
      > support. But it does support "starting address specification" and
      > "line addresses" with a default to 0000. You can see how the
      > "built-in" programs to load are specified in 1802programs.js, which
      > I've added several programs to.
      >
      > Right now it has 1K RAM instead of 256 bytes. This can be changed if
      > desired. And I probably will offer various selectable sizes up to
      > maybe 64K. I also might support a form of ROM memory.
      >
      > Changes and to be changed:
      > * Brightened switches and "7-segment" LED images (also made OFF and
      > green LED versions)
      > * Added "COSMAC ELF" 'logo' text (image -- click for "About...")
      > * Cleaned up and streamlined JavaScript code and HTML specification
      > ** cosmacelf.html, simelf.js, 1802cpu.js; created 1802programs.js;
      > added 1802disasm.js
      > ** Prefixed and renamed variable names
      > ** Formatted code (whitespace, etc.)
      > ** Changed from HTML Tables to Divs and changed FONT tags to SPAN
      > ** Fixed several bugs and added speed enhancers
      > * Added memory dump and load form functionality and access via CDP1802
      > chip click (oops, memory chips click -- will correct)
      > * Added mnemonic list functionality (DisAssembly)
      > * (future) Added debugger window w/single step, breakpoint, etc.
      > * (future) Offered ZIP archive so user can install and use it locally
      > off-line
      > * (future) Added "check for more recent update version" functionality
      >
      > I also intend to add:
      >
      > * Enhanced emulator interface that displays internals and more I/O and
      > switch options. (instead of the COSMAC Elf interface -- kind of an
      > enhanced "front panel" a la the good old days of blinking LED's)
      > * CDP1861/64 graphics chip output support.
      > * A terminal emulator for output and keyboard input. (VT-100?)
      > * Possibly saving and loading programs from disk. (when used locally)
      > * An assembler and "machine language" entry.
      > * Other fun stuff.
      >
      > Enjoy.
      >
      > - Bill
      >
      >

      --
      Aurel



      [Non-text portions of this message have been removed]
    • Dave Ruske
      Seems to work fine under Safari 5.0.5 on OS X, too, though I haven t played much with your additions yet. Dave ... [Non-text portions of this message have been
      Message 2 of 13 , Jun 1, 2011
      • 0 Attachment
        Seems to work fine under Safari 5.0.5 on OS X, too, though I haven't played much with your additions yet.

        Dave

        On Jun 1, 2011, at 8:20 AM, Aurel Boisvert wrote:
        > I just tried it with FireFox 4.X running on Windows 7.
        > Worked fine.
        >
        > On 31/05/2011 10:23 PM, whd_whd_whd wrote:
        > >
        > > I've been messing around with the SimElf JavaScript simulator
        > > originally written by Maciej Szyc in 2005. He published it as GNU GPL
        > > 2+. I've e-mail corresponded with him and he is supportive of my efforts.
        >
        >



        [Non-text portions of this message have been removed]
      • aa3nm
        Working fine as far as I can tell with IE 8.0.7601. Nice job, I m particularly a fan of the load feature. For me, once I m finished with a piece of code I end
        Message 3 of 13 , Jun 1, 2011
        • 0 Attachment
          Working fine as far as I can tell with IE 8.0.7601.

          Nice job, I'm particularly a fan of the load feature.

          For me, once I'm finished with a piece of code I end up with a HEX file usually just as a PROM image but sometimes in intel hex format. Being able to load those and check functionality before comitting to a PROM would be a nice addition to the tool box.

          Also, just a thought - the old hardware by RCA Quest and Newtonics could load from a cassette tape. ELFTools was developed to pull these cassette formats through .wav files into .bin files and vice versa cleaning up noise along the way. The formats are fairly known. There should also be code in various formats for doing some of it depending on who raises a hand. Adding that kind of feature could also add value.

          Again, Very nice project.

          73,
          Steve
          (AA3NM)


          --- In cosmacelf@yahoogroups.com, Dave Ruske <dave@...> wrote:
          >
          > Seems to work fine under Safari 5.0.5 on OS X, too, though I haven't played much with your additions yet.
          >
          > Dave
          >
          > On Jun 1, 2011, at 8:20 AM, Aurel Boisvert wrote:
          > > I just tried it with FireFox 4.X running on Windows 7.
          > > Worked fine.
          > >
          > > On 31/05/2011 10:23 PM, whd_whd_whd wrote:
          > > >
          > > > I've been messing around with the SimElf JavaScript simulator
          > > > originally written by Maciej Szyc in 2005. He published it as GNU GPL
          > > > 2+. I've e-mail corresponded with him and he is supportive of my efforts.
          > >
          > >
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        • whd_whd_whd
          Thanks for the feedback. Especially working on various browsers on various machines. It also seems to work on IE 9, but only when on the web. For some reason
          Message 4 of 13 , Jun 1, 2011
          • 0 Attachment
            Thanks for the feedback. Especially working on various browsers on
            various machines.

            It also seems to work on IE 9, but only when on the web.
            For some reason it doesn't work in local machine mode. (file://)

            So it's probably some small thing to fix. I don't care for IE, but
            I know 'some people still use it', so I'll probably try to support it
            as long as it doesn't irritate me or take too much time. (I've done
            more cross-browser coding than I ever wanted to, so it shouldn't be
            a problem, I'm just getting grumpy in my old age)

            I want this to work off of people's hard drives, though, so you don't
            have to go to a website every time you want to use it.

            I already made a few changes, like the check boxes working, so I'll
            update it now and then, and eventually "phase one" will be complete.

            Then more fun stuff like graphics and video terminal after that.

            --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@...> wrote:
            >
            {snip}
          • awasson2001
            The reason it doesn t work locally in IE9 is because by default IE prevents local scripts from running. I suppose it s a misguided gesture meant to combat
            Message 5 of 13 , Jun 2, 2011
            • 0 Attachment
              The reason it doesn't work locally in IE9 is because by default IE prevents local scripts from running. I suppose it's a misguided gesture meant to combat hackers. If you run your page from a server (even a built-in IIS server), you are using http rather than the local file system and IE9 then feels it's safe to execute the script.

              I'm also not a fan of browsers that begin with IE.

              By the way, I took the simulator out for a spin the other day... Very nice!

              Andrew

              --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@...> wrote:
              >
              > Thanks for the feedback. Especially working on various browsers on
              > various machines.
              >
              > It also seems to work on IE 9, but only when on the web.
              > For some reason it doesn't work in local machine mode. (file://)
              >
              > So it's probably some small thing to fix. I don't care for IE, but
              > I know 'some people still use it', so I'll probably try to support it
              > as long as it doesn't irritate me or take too much time. (I've done
              > more cross-browser coding than I ever wanted to, so it shouldn't be
              > a problem, I'm just getting grumpy in my old age)
              >
              > I want this to work off of people's hard drives, though, so you don't
              > have to go to a website every time you want to use it.
              >
              > I already made a few changes, like the check boxes working, so I'll
              > update it now and then, and eventually "phase one" will be complete.
              >
              > Then more fun stuff like graphics and video terminal after that.
              >
              > --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@> wrote:
              > >
              > {snip}
              >
            • whd_whd_whd
              Thanks. I figured I would have to support Intel Hex. I ve read about it over the years, but mostly ignored it. So I looked up the spec and have added that as a
              Message 6 of 13 , Jun 2, 2011
              • 0 Attachment
                Thanks.

                I figured I would have to support Intel Hex. I've read about it over
                the years, but mostly ignored it. So I looked up the spec and have
                added that as a feature.

                If you check the Intel Hex Format check box, it will Dump and Load
                in Intel Hex format now. I've tested it fairly well and it seems to
                work. I implemented what I call "Partially supported Intel Hex memory
                load and dump (only Record Types 0 and 1)", which should be sufficient
                for 1802 programs. (I think the other extended record types are
                unnecessary) I used the eVile wikipedia and a PDF of the spec for references:

                http://en.wikipedia.org/wiki/Intel_HEX
                http://www.microsym.com/content/index.php?pid=4&id=25

                Could you (and others?) test it to see if it works for what you need?

                I'm not sure what you mean about the second part cassette tape stuff.
                Do you mean the ability to load in .BIN files?


                --- In cosmacelf@yahoogroups.com, "aa3nm" <steve@...> wrote:
                >
                > Working fine as far as I can tell with IE 8.0.7601.
                >
                > Nice job, I'm particularly a fan of the load feature.
                >
                > For me, once I'm finished with a piece of code I end up with a HEX file usually just as a PROM image but sometimes in intel hex format. Being able to load those and check functionality before comitting to a PROM would be a nice addition to the tool box.
                >
                > Also, just a thought - the old hardware by RCA Quest and Newtonics could load from a cassette tape. ELFTools was developed to pull these cassette formats through .wav files into .bin files and vice versa cleaning up noise along the way. The formats are fairly known. There should also be code in various formats for doing some of it depending on who raises a hand. Adding that kind of feature could also add value.
                >
                > Again, Very nice project.
                >
                > 73,
                > Steve
                > (AA3NM)
              • whd_whd_whd
                Thanks. I vaguely remember something about IE not liking to run locally. I ll check that out. (the Old Gray Mare just ain t what she used to be.... I miss my
                Message 7 of 13 , Jun 2, 2011
                • 0 Attachment
                  Thanks.

                  I vaguely remember something about IE not liking to run locally.
                  I'll check that out.

                  (the Old Gray Mare just ain't what she used to be.... I miss my memory)


                  --- In cosmacelf@yahoogroups.com, "awasson2001" <awasson@...> wrote:
                  >
                  > The reason it doesn't work locally in IE9 is because by default IE prevents local scripts from running. I suppose it's a misguided gesture meant to combat hackers. If you run your page from a server (even a built-in IIS server), you are using http rather than the local file system and IE9 then feels it's safe to execute the script.
                  >
                  > I'm also not a fan of browsers that begin with IE.
                  >
                  > By the way, I took the simulator out for a spin the other day... Very nice!
                  >
                  > Andrew
                  {snip}
                • WRN
                  MAKING JAVASCRIPT RUN ON LOCAL FILES (file://) : You need to add a Mark of the Web to the HTML source:
                  Message 8 of 13 , Jun 2, 2011
                  • 0 Attachment
                    MAKING JAVASCRIPT RUN ON LOCAL FILES (file://) :

                    You need to add a "Mark of the Web" to the HTML source:

                    http://technet.microsoft.com/en-us/library/cc749149%28WS.10%29.aspx


                    Remediation

                    If your Web page runs a Microsoft® ActiveX® control or script, you can add a Mark of the Web comment to the HTML of the page. Mark of the Web is a Windows® Internet Explorer® feature that forces the HTML file into the security zone of the specified URL. This enables the Web page to run the script or ActiveX control in a less restrictive zone. This only works for Internet Explorer 4.0 and later.

                    Use the following comment to insert a Mark of the Web comment into a page with an identified domain, replacing http://www.fabrikam.com with the URL of the Internet or intranet domain where the page is hosted.

                    <!--saved from url= <http://www.fabrikam.com> -->

                    Use the following comment when you need to insert a generic Mark of the Web.

                    <!--saved from <url=about:internet>-->




                    --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@...> wrote:
                    >
                    > Thanks for the feedback. Especially working on various browsers on
                    > various machines.
                    >
                    > It also seems to work on IE 9, but only when on the web.
                    > For some reason it doesn't work in local machine mode. (file://)
                    >
                    > So it's probably some small thing to fix. I don't care for IE, but
                    > I know 'some people still use it', so I'll probably try to support it
                    > as long as it doesn't irritate me or take too much time. (I've done
                    > more cross-browser coding than I ever wanted to, so it shouldn't be
                    > a problem, I'm just getting grumpy in my old age)
                    >
                    > I want this to work off of people's hard drives, though, so you don't
                    > have to go to a website every time you want to use it.
                    >
                    > I already made a few changes, like the check boxes working, so I'll
                    > update it now and then, and eventually "phase one" will be complete.
                    >
                    > Then more fun stuff like graphics and video terminal after that.
                    >
                    > --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@> wrote:
                    > >
                    > {snip}
                    >
                  • whd_whd_whd
                    Thanks. I tried that and it didn t work. Now I m thinking that isn t the actual problem. I just found out I am getting an odd scripting error: SCRIPT1014:
                    Message 9 of 13 , Jun 2, 2011
                    • 0 Attachment
                      Thanks. I tried that and it didn't work. Now I'm thinking that isn't
                      the actual problem.

                      I just found out I am getting an odd scripting error:

                      SCRIPT1014: Invalid character
                      functions.js, line 1 character 1

                      which is a comment. So apparently it doesn't like script files to
                      begin with comments. Pretty strange. Nothing found via web search.
                      I'll figure it out. (thanks for any help, hints, etc., though)


                      --- In cosmacelf@yahoogroups.com, "WRN" <kriceslo@...> wrote:
                      >
                      > MAKING JAVASCRIPT RUN ON LOCAL FILES (file://) :
                      >
                      > You need to add a "Mark of the Web" to the HTML source:
                      {snip}
                    • aa3nm
                      In the early days of 1802 life, storing programs became a consideration. RCA, in their VIP, Quest Electronics in their Super ELF, and Netronics in their ELF
                      Message 10 of 13 , Jun 2, 2011
                      • 0 Attachment
                        In the early days of 1802 life, storing programs became a consideration. RCA, in their VIP, Quest Electronics in their Super ELF, and Netronics in their ELF II each supported a slightly different format for storing and reloading data via cassette tapes.

                        As I recall, each format was similar in some ways to what was referred to as Kansas City Standard - but it was not the same.

                        Basically they each whipped the Q around to create square waves in the audio Freq. with tone or duration changes to represent 1s and 0s... This drove the mic input of the cassette recorder. Upon playback, with the earphone fed into sort of a limiter/clipper circuit they edge detected the distroted audio into the EF line to recover the timing and thus the bits.

                        In or around 2002 Richard Dienstknecht (r.dienstknecht@...
                        I hope I got it right) pulled together a rough (by his description - rather nice by mine) piece of PC code called ElfTools (look in the files section) that accepted/generated wave file formatted copies of these cassette recordings (recorded through the PC line in/out). ElfTools included support for 2 of the 3 formats and has a bunch of knobs to twiddle so it recovers tapes with many sins. Richard has recently undertaken to improve the tool and add the third format. He is on the group and may chime in (my changing the thread may help).

                        If this seems like a worthwhile capability for your project, I suggest information sharing between you two as the synergistic result is likely to be easier/quicker & better.

                        73

                        Steve



                        --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@...> wrote:
                        >
                        >
                        > I'm not sure what you mean about the second part cassette tape stuff.
                        > Do you mean the ability to load in .BIN files?
                        >
                        >
                        > --- In cosmacelf@yahoogroups.com, "aa3nm" <steve@> wrote:
                        > >
                        > >
                        > > Also, just a thought - the old hardware by RCA Quest and Newtonics could load from a cassette tape. ELFTools was developed to pull these cassette formats through .wav files into .bin files and vice versa cleaning up noise along the way. The formats are fairly known. There should also be code in various formats for doing some of it depending on who raises a hand. Adding that kind of feature could also add value.
                        > >
                      • whd_whd_whd
                        On second thought, the error seems to only be occurring on half of the files, and it works online, without any errors, so I think it is some form of a bug in
                        Message 11 of 13 , Jun 2, 2011
                        • 0 Attachment
                          On second thought, the error seems to only be occurring on half of the
                          files, and it works online, without any errors, so I think it is some
                          form of a bug in Internet Explorer.

                          So I'm done. If people want to use it locally, they can use a "good" browser.


                          --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@...> wrote:
                          >
                          > Thanks. I tried that and it didn't work. Now I'm thinking that isn't
                          > the actual problem.
                          >
                          > I just found out I am getting an odd scripting error:
                          >
                          > SCRIPT1014: Invalid character
                          > functions.js, line 1 character 1
                          >
                          > which is a comment. So apparently it doesn't like script files to
                          > begin with comments. Pretty strange. Nothing found via web search.
                          > I'll figure it out. (thanks for any help, hints, etc., though)
                          >
                          >
                          > --- In cosmacelf@yahoogroups.com, "WRN" <kriceslo@> wrote:
                          > >
                          > > MAKING JAVASCRIPT RUN ON LOCAL FILES (file://) :
                          > >
                          > > You need to add a "Mark of the Web" to the HTML source:
                          > {snip}
                          >
                        • Richard
                          You rang? The old ElfTools were my first shot ever at restoring and analyzing a waveform. I added and removed functions until it worked. It was not really
                          Message 12 of 13 , Jun 2, 2011
                          • 0 Attachment
                            You rang? The old ElfTools were my first shot ever at restoring and analyzing a waveform. I added and removed functions until it worked. It was not really nasty spaghetti code, but it was not the kind of code I would proudly publish. The old C++ code is a bit dated by now anyway.

                            The new ElfTools already can load and display WAV files and the code for analyzing and converting already has been ported. Now I'm looking for ways to make it easier to use. Finding the right settings always was a pain, but then it used to work nicely.

                            Also, I would like to eliminate the need to use WAV files at all. Why not sample everything directly from the sound hardware? The problem with that is, that this can very quickly lead to a program that workes fine on my hardware, but not on anybody else's.

                            I promise, I will get working on it as soon as I can. At the moment both work and my other little hobby (http://imageshack.us/photo/my-images/600/praeui1.jpg/) also keep me busy :)



                            --- In cosmacelf@yahoogroups.com, "aa3nm" <steve@...> wrote:
                            >
                            > In the early days of 1802 life, storing programs became a consideration. RCA, in their VIP, Quest Electronics in their Super ELF, and Netronics in their ELF II each supported a slightly different format for storing and reloading data via cassette tapes.
                            >
                            > As I recall, each format was similar in some ways to what was referred to as Kansas City Standard - but it was not the same.
                            >
                            > Basically they each whipped the Q around to create square waves in the audio Freq. with tone or duration changes to represent 1s and 0s... This drove the mic input of the cassette recorder. Upon playback, with the earphone fed into sort of a limiter/clipper circuit they edge detected the distroted audio into the EF line to recover the timing and thus the bits.
                            >
                            > In or around 2002 Richard Dienstknecht (r.dienstknecht@...
                            > I hope I got it right) pulled together a rough (by his description - rather nice by mine) piece of PC code called ElfTools (look in the files section) that accepted/generated wave file formatted copies of these cassette recordings (recorded through the PC line in/out). ElfTools included support for 2 of the 3 formats and has a bunch of knobs to twiddle so it recovers tapes with many sins. Richard has recently undertaken to improve the tool and add the third format. He is on the group and may chime in (my changing the thread may help).
                            >
                            > If this seems like a worthwhile capability for your project, I suggest information sharing between you two as the synergistic result is likely to be easier/quicker & better.
                            >
                            > 73
                            >
                            > Steve
                            >
                            >
                            >
                            > --- In cosmacelf@yahoogroups.com, "whd_whd_whd" <whd_whd_whd@> wrote:
                            > >
                            > >
                            > > I'm not sure what you mean about the second part cassette tape stuff.
                            > > Do you mean the ability to load in .BIN files?
                            > >
                            > >
                            > > --- In cosmacelf@yahoogroups.com, "aa3nm" <steve@> wrote:
                            > > >
                            > > >
                            > > > Also, just a thought - the old hardware by RCA Quest and Newtonics could load from a cassette tape. ELFTools was developed to pull these cassette formats through .wav files into .bin files and vice versa cleaning up noise along the way. The formats are fairly known. There should also be code in various formats for doing some of it depending on who raises a hand. Adding that kind of feature could also add value.
                            > > >
                            >
                          Your message has been successfully submitted and would be delivered to recipients shortly.