Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > SX Microcontrollers, SX/B Compiler and SX-Key Tool > SXSim for MS Windows  Forum Quick Jump
 
New Topic Post Reply Printable Version
236 posts in this thread.
Viewing Page :
 1  2  3  4  5  6  7  8  9  10 
[ | Show Newest Post First ]

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/23/2004 4:00 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hi Folks,

from this post, you can download the latest version of my SX Simulator for MS Windows.

To install it, just un-zip the files into any folder, and run it from there. If you like, you may manually put a shortcut to SXSimW on your desktop.

You will find the documentation in a separate ZIP file, attached to this post.

SXSim is by no means complete yet, and I'll add more features when I have the time.

Have fun!

In order to keep this post at moderate length, I have decided to strip down the software history and comments section to only contain the most recent two entries. From now on, you will find the complete history attached to the end of the documentation. Therefore, whenever I post a new software version, I will also post a new doc file in the future.

Remarks:

Added June 24, 2006:
This new version 2.08.05 comes with the following fixes/enhancements:

- internal program counter is now displayed
- "odd" clock frequencies are now handled correctly
- SKIP handling corrected

Added December 12, 2006:
This new version 2.08.06 comes with the following fixes/enhancements:

- When WREG is mapped into address $01, the contents of RTCC will be shown in a separate field
- In RUN mode, the list display no longer jumps to the first line
- When SXSim is terminated with the main window minimized, it will be re-opened with its default size when invoked again later
- When TRIS bits are changed, the I/O Panel is correctly updated in "Run" mode now
- Breakpoints now work correctly on targets of JMP w instructions
- Wrong cycle count of skip instructions (2 instead of 3 in case of a skip) fixed
- SKIP status display fixed, it will now only be highlighted when a skip instruction actually causes a skip
- New "Run to Right-Clicked", and "Jump to Right-Clicked" modes
- New status display in the Commands window indicating the current mode of SXSim ("Idle", "walking", or "running")

When your version of SXSim was auto-installed together with the latest SX-Key software, make sure to install the new SXSim files into the Tools\SXSim folder located in the main SX-Key folder (usually Program Files\Parallax Inc\SX-Key v3.1\Tools\SXSim).


Greetings from Germany,

Günther

Post Edited (Guenther Daubach) : 12/12/2006 6:08:12 PM GMT



File Attachment :
SXSim Manual_2_08_06.zip   159KB (application/x-zip-compressed)
This file has been downloaded 945 time(s).

File Attachment :
SXSim_2_08_06.zip   106KB (application/x-zip-compressed)
This file has been downloaded 939 time(s).
Back to Top
 

simon
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2004
Total Posts : 20
 
   Posted 10/23/2004 5:56 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hi!

Does this Version support the output from Bytecrafts SXC Compiler ?
Last time i tried it all i got was an error message after reading the
sxc generated file.

Bye, Simon
Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/23/2004 3:44 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Simon,

SXSim only works on the LST files that are generated by SASM as part of the SX-Key IDE. To be honest, I don't know anything about the SXC Compiler, i.e. I never used it before. Nevertheless, if SXC generates a SRC file that finally can be translated by SASM, you should be able to "feed" the resulting LST file to SXSim.


Greetings from Germany,
 
Günther

Back to Top
 

Peter Verkaik
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 3985
 
   Posted 10/23/2004 6:37 PM (GMT -7)    Quote This PostAlert An Admin About This Post.

Gunther,

When I load a SASM produced .lst file from a program

that I currently run (so it works) the SXSIM produces:

Laufzeit fehler 11

Division durch null

 

What happens here?

regards peter

 

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/24/2004 12:46 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Peter,

if possible, could you please send me this .lst file via private eMail, so that I can test what happens?


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/24/2004 3:42 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Peter,
 
thanks for sending the .LST file. The error was caused because SXSim cannot handle freq directives like
 
freq RESONATOR * 1000000, i.e. expressions, but numerics like 50000000, or 50_000_000 only.
 
I have changed SXSim in a way that it ignores such expressions. In this case, it does not calculate execution times.
 
This new version of SXSim is 1.41, and I have appended a new ZIP file to my original posting with this version.


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/24/2004 3:47 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
simon said...
Hi!

Does this Version support the output from Bytecrafts SXC Compiler ?
Last time i tried it all i got was an error message after reading the
sxc generated file.

Bye, Simon
Simon,
 
thanks for sending me the sample files. Unfortunately, the LST files created by the Bytecraft SXC Compiler have a completely different format as the ones generated by SASM (thy only contain C code, no assebmly mnemonics). Therefore, SXSim cannot handle these files at all.
 
Maybe, the Compiler has an option to generate Assembly source files which you can then run through SASM to achieve a .lst file that can be handled by SXSim.


Greetings from Germany,
 
Günther

Back to Top
 

Peter Verkaik
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 3985
 
   Posted 10/24/2004 4:26 AM (GMT -7)    Quote This PostAlert An Admin About This Post.

Gunther,

I changed the lines

resonator equ 20

freq resontor*1000000

into

resonator equ 20

freq 20_000_000 ;equ resonator*1000000

and now the .lst file loads.

thanks.

regards peter

 

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/25/2004 8:40 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Dear Forum Administrator,

is it possible to make my first post in this thread "sticky", so that it stays on top?

I plan to put new versions of SXSim in the forum from time to time, and so they could always be found in the first "sticky" message.

Thanks!


Greetings from Germany,
 
Günther

Back to Top
 

Jim Brain
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2004
Total Posts : 17
 
   Posted 10/26/2004 1:24 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
I'm not sure if this is a bug, or just my lack of understanding of the RTCC

I have a piece of code (the dualuart VP) that does:

mov w,#RTCC_ON | RTCC_PS_OFF ;setup option register
mov !option,w

After that command, the RTCC starts going up in SxSim. However, since I don't want IRQs enables, I changed it to:

mov w,#RTCC_ON | RTCC_ID | RTCC_PS_OFF ;setup option register
mov !option,w

But then the RTCC does not increment is SxSim.

The EQUs are:

RTCC_ON =%10000000 ;Enables RTCC at address $01 (RTW hi)
;*WREG at address $01 (RTW lo) by default
RTCC_ID =%01000000 ;Disables RTCC edge interrupt (RTE_IE hi)
;*RTCC edge interrupt (RTE_IE lo) enabled by default


Jim
Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 10/27/2004 8:08 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Jim,

you are right - this was a bug in SXSim. In the meantime, I have fixed it.

You can find the new version in the "sticky" post at the top of this thread.

From now on, I will place two separate ZIP archives there. One containing just the latest version of SXSim, called SXSimvvv.zip (where "vvv" is the version), and another one called SXSimdoc.zip containing the documentation, and a sample .lst file. This makes downloading faster, in case just the software has been updated.


Greetings from Germany,
 
Günther

Back to Top
 

TrapperBob
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2004
Total Posts : 44
 
   Posted 11/4/2004 5:32 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hi Guenther,

Is the 142 version meant to work on XP?

I am getting a message:

Component Comdlg32.ocx or one of its dependencies not correctly registered: a file is missing or valid

This Xp install is fresh and working fine otherwise

Thanks
Trapper
Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 11/14/2004 4:41 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hi Trapper,

sorry for answering so late - I simply overlooked your posting.

Please check if you have cmodlg32.ocx on your machine. If this is the case, try registering the control using regsvr32,

ie. from the DOS prompt type:

regsvr32 comdlg32.ocx

be sure to use proper pathnames.

Should comdlg32.ocx not be available on your machine, you may Google the net for a download location, or contact me off-list.


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 11/14/2004 11:35 AM (GMT -7)    Quote This PostAlert An Admin About This Post.

Hi Folks,

I have uploaded a new version of SXSim (1.43) - you'll find it in the topmost post of this thread. In this version I fixed a bug which under certain situations caused shifting in and out the carry flag incorrectly with RR and RL instructions (and maybe, other bit-related operations either).

Two bugs met in a program. Says the first one: "My programmer is searching for me since two weeks." Says the other one: "Ha, my programmer does not even know that I exist."

I'm pretty sure that there are some of these still living in SXSim, so your bug reports are always welcome.


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/7/2004 2:09 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hi Folks,

I have uploaded a new version of SXSim (1.44) - you'll find it in the topmost post of this thread. In this version I fixed a bug that caused IREAD to return wrong values in the M register.


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/8/2004 11:15 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
One day later...

Another version of SxSim (1.45).

Thanks to Jonathan, the current SxSim "Power Tester", I could fix another SxSim bug. This was a tricky one because in former versions, I made SxSim behave like I liked the SX to behave.

Here is an example:

org $100
page table
mov W, #1
jmp PC+W
jmp state_1
jmp state_2

org $200
table = $
state_1
;
; some code
;
state_2

It would be nice to have the initial "page table" instruction prepare the page bits for the jump table instructions following the "jmp PC+W" instruction i.e. have the "jmp PC+W" ignore the page bits (like SxSim did).

In "real SX silicon", this is not the case, i.e. the "jmp PC+W" respects the page bits, so that the next instruction following the "jmp PC+W" is executed at address $201 but not the "jmp State_2" at address $104 as one might expect/hope/wish.

SxSim now handles this like the "real" SX does (with the advantage that you get a warning message in case the jump should end in "nirvana").

I also received some bug reports that SxSim did generate a type mismatch run-time error at start-up. This is caused by the different date-time formats depending on the country settings of Windows. Should you run into this problem, simply delete any *.SIM files in the folders where you have the *.LST files for simulation. The next time, SxSim saves *.SIM files, they will contain the time-date information of the assiciated *.LST file in the format that matches your Windows country settings.

Thanks to all of you helping to improve SxSim!


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/11/2004 7:07 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Viola,

here is a new version of SxSim (1.50) that suppprts most of the "secret" SX instructions.
Have fun!


Greetings from Germany,
 
Günther

Back to Top
 

pjv
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Nov 2004
Total Posts : 1411
 
   Posted 12/11/2004 1:43 PM (GMT -7)    Quote This PostAlert An Admin About This Post.

Hello Guenther;

Wow, that was fast. You must have been up all night!

Peter

 

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/11/2004 3:19 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hello Peter,

although I'm used to be up at nights, this time, I did it Saturday morning. Thanks to your clear description, I knew what had to be done. I hope the simulation reflects how the "real" SX performs on these "secret" instructions.

When I have the time, I'll test-run them on a "real" SX, and compare the results to what SxSim does.

A set of simple macros to have mnemonics instead of DW directives for such secret instructions would be fine. Maybe, our "MOM", i.e. Master Of Macros, James Newton has some in the drawer :-)


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/13/2004 11:55 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hello "SxSim-ers",

Version 1.51 is here, together with an updated manual (see the first thread message).

This one allows you to disable the "RETI/RETIW without interrupt checking" (might be handy when using RETI/RETIWs together with the recently published "secret or hidden" SX features). I have also changed the format of the *.SIM files that are created after each SxSim session. Future versions can now be "downward-compatible", i.e. they will be able to restore parameters (like breakpoints, etc.) saved by earlier versions (>= 1.51).


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/21/2004 1:07 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hello "SxSim-ers",

I have posted a new version 1.52 of SxSim in the very first thread message. Not a big change, I just fixed the handling of the shadow stacks that are used by the "secret" PUSH/POP instructions to comply to the "real" SX silicon.


Greetings from Germany,
 
Günther

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 12/22/2004 2:48 PM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hello "SxSim-ers",

I could not resist adding another feature to SxSim: The "Undo Single Steps". When single-stepping, it may happen that you step "too fast" sometimes, i.e. click the "Step" button just before noticing important changes of file register contents, etc.

Version 1.53 of SxSim now keeps track of the last 20 single steps, and the new "Bck" button allows you to "roll them back".

Have fun!


Greetings from Germany,

Günther

Post Edited (Günther Daubach) : 12/22/2004 9:50:55 PM GMT

Back to Top
 

Peter Verkaik
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 3985
 
   Posted 1/2/2005 7:12 AM (GMT -7)    Quote This PostAlert An Admin About This Post.

Gunther,

I use version 1.53 and have a problem with break points.

Using my latest test.src file (post smallc compiler) it appears

a set breakpoint s ignored. I set a breakpoint at label :zero_end

(just after clearing memory) but walk and run modes simply continue.

Can you confirm this?

Also, hitting the reset button, does that clear breakpoints or are these

only to be cleared by hitting CLR BP ?

Also, when using find label, when the label is found, the sxsim window is

repositioned on the screen. I use 800x800 resolution and the window

is normally positioned with the titlebar at the top. After a find label

the window moves down to about 25% from the top of the screen.

 This also happens when I display the I/O panel and then hide

the I/O panel.

regards peter

 


Post Edited (Peter Verkaik) : 1/2/2005 2:21:39 PM GMT

Back to Top
 

Guenther Daubach
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 1333
 
   Posted 1/3/2005 3:25 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Peter,

thank you for your report - I'll try to fix these problems in the next version to be released soon.

Yes, you are right, the reset button only "resets" the simulated SX but it should not reset the breakpoints. The CLR BP button should do that.


Greetings from Germany,

Günther

Back to Top
 

David B
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 382
 
   Posted 1/3/2005 11:44 AM (GMT -7)    Quote This PostAlert An Admin About This Post.
Hello Gunther,

I just started using SXSim - it is great! It is amazing how it opens up the entire workings of the process right in front of my eyes! I've already used it to tune up a few badly-coded routines.

I've used it on Windows NT 4.00, where it works fine. My Windows 95 laptop was lacking the file comdlg32.ocx but I copied the WinNT file and it worked.

Minor suggestion - I'm getting lazy about initializing RAM because the SxSim zeroes RAM for me, unlike the actual chip, according to documentation.

What about having SxSim explicitly write random values into the simulated RAM locations and those registers that power-up to "undefined" in the real chip?

This would force code to initialize where it ought to, and might help detect initialization bugs for when code goes live. Maybe a checkbox could turn on this feature for final testing of a design.

David
Back to Top
 
[
New Topic Post Reply Printable Version
236 posts in this thread.
Viewing Page :
 1  2  3  4  5  6  7  8  9  10 
 
Forum Information
Currently it is Thursday, July 29, 2010 5:22 PM (GMT -7)
There are a total of 462,441 posts in 62,066 threads.
In the last 3 days there were 90 new threads and 802 reply posts. View Active Threads
Who's Online
This forum has 20143 registered members. Please welcome our newest member, ME01.
58 Guest(s), 15 Registered Member(s) are currently online.  Details
John Abshier, Erik Friesen, RossH, Kevin Wood, simpsonmichael1, BradC, David Betz, Julian800, Martin Hodge, RDL2004, Harley, Sapieha, wiresalot, Ravenkallen, Tubular