Shop OBEX P1 Docs P2 Docs Learn Events
SXSim for MS Windows - Page 3 — Parallax Forums

SXSim for MS Windows

135678

Comments

  • James NewtonJames Newton Posts: 329
    edited 2005-01-30 05:40
    Could someone PLEASE clue me in as to what the advantage of this SxSim - ICE thing is over just connecting an SxKey to that actual original SX? I've read this all over again and I still just... don't... get it.

    The ability to in circuit debug the actual, production, SX chip avoids so many problems asociated with ICE...

    On another chip, long, long ago, I once spent a week being told that my software was wrong (by the hardware guys) only to find out that the bondout wire on the emulator was fried. The hardware guys kept telling me that the signal was on that pin and that is was perfectly good. Being a junior engineer at the time, it took me a while to figure out A) how they could be right and still not see the signal in the software and B) how to prove it to them. The emulator cost big $$$ so they didn't have another one to try and didn't want to replace it.

    With the SX Key, I always get to see EXACTLY what the SX is actually seeing inside. NOT what the emulator thinks the production chip will see.

    On another job, mr. hardware cross wired something and the board was burning out the input pin I was looking for in the production chips, but the emulator could aparently handle the strain so the system worked when I was debugging but failed in production. The hardware dude was using logic probes instead of a 'scope so he never realized that, while the signal was there, it was off the scale! I figured that one out because when we would drop in a new production chip, the system would work for about a millisecond (before the pin fried) and the hardware guy had been noticing that some part of his circuit was running a little hot... <GRIN>

    Anyway... Why are we burning cycles talking about down-grading from the beautifull system we already have?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • KenMKenM Posts: 657
    edited 2005-01-30 14:29
    For me, you cannot beat the actual chip running.

    However, SX sim is useful to me when I am in the beginning stages of writing a program where·I am not sure if it will work, and typically if I do not have the luxury of connecting a SX.

    Like lunch time at work for example.

    Ken
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-01-30 22:36
    Hello "SXSimers",

    I have just posted a new version 2.01 of SXSim.

    Guess why I have given it a new major version number - it now (hopefully) supports the "big ones", i.e. the SX48 and the SX52 - no multi-purpose timer/counters for now, just the memory models and the addressing modes.

    Have fun!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-01-31 10:37
    Hello "SXSimers",

    Yesterday, I was a bit too fast uploading the new version, as it had a bug that could cause bad results when reading file registers while an SX48/52 was simulated. This should be fixed in version 2.02 attached to the very first post in this thread. Sorry for that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Tony LeylandTony Leyland Posts: 71
    edited 2005-01-31 16:58
    Hi all,

    Just a quick note to say that I agree entirely with the last posts by James Newton & KenM.
    The ICE (In-Circuit Emulator ?) system is not intended as a replacement for the SX-Key, but rather as
    an additional tool for the developer. The primary purpose (in my opinion) of the ICE system is signal
    injection and retrieval. Maybe the name needs to be changed (?)

    I'm going to come back in a few days and post some block diagrams to explain things and examples on how
    this tool will be useful.

    Hello G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-01-31 19:08
    Tony,

    I also agree entirely with James, and Ken that the ICE we are discussing is not a replacement for (IMO) the easyest to use, and the fastest debugging tool for any available microcontroller (as the SX-Key does real "on-chip debugging"). On the other hand, I think it is a challenge to tie two SXes together - actually, I'm thinking of another interesting application where two "cooperating" SXes seem to make a lot of sense but I need some more time for "thinking" before going public.

    Concerning the speed of SXSim, please let me do some tests before giving an answer to this question.

    In the protocol descripiton, I have included a command sent from the master to read the port B WKPND bits, and another message issued by the slave when a port B pin has changed status, according to the settings of the WKEN and WKED bits. Maybe, the first one is not really necessary when the slave can send a "priority message" in case such events occur.

    USB will definitely faster than serial communication - I have some FTDI chips around here, to play with, but unfortunately, I did not have the time so far. Nevertheless, before discussing the speed of the serial link, I should first time SXSim in more detail in oder to find out which one is the real bottleneck.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-02 10:17
    Hello "SXSimers",

    Thanks to some user reports, I could fix more bugs in the SX48/52 simulation. The FSR and memory addressing should now behave correctly.
    You may now also launch SXSim by dragging and dropping a list file icon on the SXSim program icon. This list file will be automatically loaded
    I have also added some minor details to the documentation.

    Have fun!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-02 14:33
    Hello again,

    thanky to Tony, I could fix two more bugs in SXSim. As I dont want to bother you with more than one new version per day smile.gif just be aware of these two problems in version 2.03:

    Clicking "Find Main" causes SXSim to report "Bad jump or call address".
    Minimizing the main window causes a run-time error "A form can't be moved or sized while minimized or maximized".

    Both bugs have been fixed and will be gone in the next version I'll post. In the meantime, just don't touch the "Find Main" and minimize buttons.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-05 23:45
    Hello "SXSim-ers",

    Version 2.04 is born.

    Thanks to several user reports, I could fix various bugs.

    I have also added some new features, like “clickable” LEDs in the I/O panel, handling of OPTION bit 7 for mapping RTCC or the W register into address $01.

    In my opinion, the most important new feature in this version is the option to run ISR code at full speed (see the new "Run ISR" checkbox) while “single-stepping”, or “walking” through a program, as I always found it annoying to be distracted from following the “normal” program flow in single steps when a call of the ISR code occurred.

    Have fun!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • KypecKypec Posts: 5
    edited 2005-02-11 14:12
    Dear Guenther,

    I'm a new user and I like your SXSim. However, I was only able to download version 1.0
    directly from Parallax website.
    I searched for newer version 2.04 also on your homepage but was unable to find it.
    Where can I download the latest version of SXSim?

    I'm sorry for bothering you with such a silly question but I couldn't
    find any link for download neither in SXSim 1.0 executable nor in PDF document included confused.gif

    Thanks for your patience,
    Kypec
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-02-11 14:13
    Kypec,

    ·· The newest versions are always at the top of the first page of this thread in a sticky post.· See the attachments.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --==<{Chris}>==--
  • KypecKypec Posts: 5
    edited 2005-02-11 14:19
    Thank you Chris,

    I just found it out myself few seconds ago.

    Kypec
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-11 18:39
    Thanks Chris,

    for leading Kypec in the right direction.

    To any "lurking" Parallax site operators: My suggestion is to remove the "stone-age" version of SXSim from the Parallax download site, and replace it by a link to the "sticky" post of this thread. This would make sure that visitors of the Parallax site are always directed to the most recent version of SXSim w/o keeping you guys busy updating your download area whenever I release a new version (sometimes, this happens serveral times in a week) smile.gif .

    There will be a new one soon with more bug fixes. Seems as if I have under-estimated the impact, the new SX48/52 support has on the rest of the code.

    Don't expect this in the next few days because I'm currently "grounded" by many little virusses who have decided to build a new settlement in my body. Too bad that you can't simply kill them. I hope I'll be back soon.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • KypecKypec Posts: 5
    edited 2005-02-18 13:10
    Hi Guenther,

    SXSim is just GREAT, I like it. smile.gif
    Anyway, could you implement this little feature
    concerning Time/Cycle display in the future release?

    When displaying time [noparse][[/noparse]us] there should
    be fixed decimal format [noparse][[/noparse]0,00] used:
    Example - FREQ = 50 MHz -> one cycle time = 20 ns = 0,02 us
    After ten cycles display would read 2,00 instead of 2 as it is now.
    You know, that vanishing decimal point is rather disturbing.

    And what about two separate displays [noparse][[/noparse]cycles] / [noparse][[/noparse]time]
    placed next to each other? In this case one can spare manual toggling
    whenever I need cycles/time information?
    I mean something like Microchip's MPLAB Stopwatch window.

    Thank you for hearing me out,
    Kypec
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-18 13:53
    Kypec,

    thank you for both of your suggestions. Both changes make a lot of sense, and can easily be done. I have put them on the recent TODO list. They'll be there with the next version to be released soon.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • saverysavery Posts: 12
    edited 2005-02-25 02:53
    Geunther,
    I'm using SXSim 2.4 and have noticed what I think may be a bug. I'm using the SX52 and believe that in the data sheet the M register should be 0x1f at reset. SXSim shows a 0xf.

    Your tool have been very helpful. Thanks so much for putting forth the effort!

    cheers,
    savery
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-02-25 09:46
    Hi Savery,

    thank you for the information about the M register. I'll check the data sheet, and fix this in SXSim (should be easy).

    I'm planning to release a new version within the next couple of days. The M register issue will be fixed then.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • PaulPaul Posts: 263
    edited 2005-03-02 21:02
    RE: SXSim 2.04
    First of all running SXSim is a real blast!
    I'm having problems wih the registery in Windoze XP Home. Running SXSim wants to "install Autocad 2002" go figure that one..lol. Hitting "cancel' eventually brings up SX Sim. It worked fine the first time. shrugs.
    Widening the main window pushed the Commands window off the screen ..had a heck of a time finding it and bringing it back. Is there some way to save it to "RightsideMAX-100" in VB?
    Overall I found that they worked quite well and was fun. I compiled a couple SX/B files just to test. I found that changing the PAUSE to PAUSEUS made the blinking light almost correct! (that was before I read about Hyper Counters, doh).

    First on my wish list: A SERIN / SEROUT / SHIFTIN / SHIFTOUT Window! Lets see..shifting bits in one at a time faking the interupt into reading the bits...hmmmmm

    Thanks for a great product!
    Paul
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-03 09:54
    Paul,

    thank you for your comments on SXSim.

    The registry problem looks strange to me. The only key I'm saving in the registry is the name of the last open file (under HKEY_CURRENT_USER/Software/VB and VBA Program Settings/SXSim/Files/Last). I have no idea why this can cause an "install Autocad 2002". Well, when you started SXSim the first time, there was no registry enty yet, as SXSim creates it when you terminate the application. Maybe you could run regedit to find out what's in the registry. BTW, I'm running Windoze XP Home here too and never had trouble like this.

    Yes, you are right, when the main window is maximized, the Commands window gets hidden. I'm pretty sure that there is a way to limit the width of the main window so that the Commands window remains visible, located at the rightmost position of the screen. But this does not really fix the problem. With a high screen resolution, it is also possible to place the Commands window below the main window. Now, when you maximize the main window, the Conndans window will be hidden again, unless I would limit the height of the main window in this case. Maybe, it would be an option to give the Commands window focus after maximizing the main window to have it on top. I'll try these options, and hopefully come up with an accepatable solution.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-03 11:18
    Paul,

    in the meantime, I did some testing concerning the maximize problem. Unfortunately, VB (or Windows) does not allow to resize a window when it is minimized or maximized. This means, I can't move the Commands window all the way right, and then reduce the width of the main window so that it does not overlap the Commands window. I also tried to set the focus to the Commands window after the main window was maximized. This brings the Commands window on top, but as soon as you set the focus to the main window, it will again overlap the Commands window, so this is not a solution either. Let's see what else I can do - at least, I could add a button "Show Commands" to the main window.

    In my lastpost, I forgot to refert to your SERIN/SEROUT/SHIFTIN/SHIFTOUT wish. Hmmm this SX/B related stuff, and not directly related to the SX. I think such window would be very specific. Maybe, I should write another application called SX/BSim smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-03 13:54
    Paul, and all the other SXSimmers,

    in a private message, I received the suggestion to convert SXSim into an MDI (Multiple Document Interface) application, i.e. one "Master" window with all the other windows, like the main, Commands, and I/O Panel windows inside. This would solve the problem that a maximized main window hides the Commands window (and the I/O Panel as well). On the other hand, the mutliple windows interface, SXSim is using right now also has advantages. I know that some SXSim users (including myself) run it on a two-screen system with the Windows desktop extended to the second screen. This makes it possible, for example, to move the Main window, and the I/O Panel to the right screen where the Commands window is located on the left secreen, together with the SXKey IDE.

    For now, I have added another button to the main window called "Show Commands" which brings the Commands window on top should it be hidden by some other window.

    What would you - the SXSimmers - prefer: leave SXSim as is, or change it into in MDI application?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Tony LeylandTony Leyland Posts: 71
    edited 2005-03-03 16:27
    Hi G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-03 16:44
    Hi Tony,

    Patient to Doctor: "Whenever I press here, it hurts". Doctor to Patient: "Then don't press there" smile.gif .

    Good idea to remove the maximize button, then you cant press it, and it would not hurt.

    Yeah - I've been searching for the 'Z' order adjustment of VB because giving the Commands window an "always on top" attribute would immediately solve the problem. So far, I did not find the trick. Do you (or anybody else) have an idea?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Tony LeylandTony Leyland Posts: 71
    edited 2005-03-03 16:54
    Hi G
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-03-03 17:28
    Hi G
  • LemonLemon Posts: 34
    edited 2005-03-03 17:31
    Tony is right, the SetWindowPos function in user32.dll will do the trick.

    --BEGIN VB Code--
    Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
    ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
    ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

    Const HWND_TOPMOST = -1
    Const SWP_SHOWWINDOW = &H40

    Private Sub Form_Load()
    Dim returnValue As Long
    Load Form1
    returnValue = SetWindowPos(Me.hwnd, HWND_TOPMOST, 100, 200, _
    400, 200, SWP_SHOWWINDOW)
    End Sub
    --END VB Code--

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Why do·they call it a spacestation? There's hardly "space" for anything in there.
  • PaulPaul Posts: 263
    edited 2005-03-04 03:34
    Hi again Gunther!
    First, I checked the registry and the 'last file open' was right where it supposed to be. Dunno what is going on either but I can live with it for now.
    Second, Maximizing the main window doesn't move the Command window, only making the window wider by dragging the right side of the main window will move it. So even with the command window "always on top it" will still get moved off the right side. (I think)
    I'd vote for the MDI interface myself but can see the advantages of multiple windows. Now that I know where to look for 'missing' command window its not such a big deal really. (and I'm not in the panic mode of a couple days ago.)

    Now wouldn't a SX/BSim be a great thing? Of course you may be risking the wrath of Parallax for skimming off a certain number of Basic Stamp ($$$) programmers to the SX ($) side. [noparse];)[/noparse]

    Thanks for listening.
    Paul
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-04 08:44
    Beau Schwabe said...
    Hi G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-04 08:48
    Hi Tony and Lemon,

    yeah the API call was exacty what I've been looking for! The Commands window now nicely always stays on top. Tony, the API Guide is really nice - a lot of useful information. Thank you for that tip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-03-04 08:55
    Paul said...
    Hi again Gunther!
    First, I checked the registry and the 'last file open' was right where it supposed to be. Dunno what is going on either but I can live with it for now.
    Second, Maximizing the main window doesn't move the Command window, only making the window wider by dragging the right side of the main window will move it. So even with the command window "always on top it" will still get moved off the right side. (I think)
    I'd vote for the MDI interface myself but can see the advantages of multiple windows. Now that I know where to look for 'missing' command window its not such a big deal really. (and I'm not in the panic mode of a couple days ago.)

    Now wouldn't a SX/BSim be a great thing? Of course you may be risking the wrath of Parallax for skimming off a certain number of Basic Stamp ($$$) programmers to the SX ($) side. [noparse];)[/noparse]

    Thanks for listening.
    Paul
    Paul,
    yes, you are right, maximizing the main window does not move the Commands window. This only happens when you resize the main window. Now that the Commands window is always on top, it won't get lost when you maximize the main window. Nevertheless, I still have left in the "push right" functionality on main window resizing.

    I agree, SX/BSim would be great (and a lot of work). To make Parallax happy, it could do both: simulate SX/B and the Stamps smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
Sign In or Register to comment.