Kowalski Simulator Updates

Topics pertaining to the emulation or simulation of the 65xx microprocessors and their peripheral chips.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Kowalski Simulator Updates

Post by BigDumbDinosaur »

barrym95838 wrote:
It almost looks like he was leaving space for a 24-bit address and a fourth instruction byte, huh? :roll:
Possibly, although the assembler is for the 6502/65C02, which would never use a 24 bit address. The little bit of inspection I've done on the source code (which is not particularly readable if your native language isn't Polish) doesn't at all suggest that Mike Kowalski was planning to include the 65C816.
Quote:
Does anyone else prefer a different ordering, like so:

Code: Select all

E303:BD 50 D9 `04013 .0000010 lda postmemc,x        ;current memory count
It would allow a .lst file to be pasted directly into a Woz-style monitor.
I would not like that at all—readability is inferior to the present format, especially with the colon between the assembly address and opcode byte. In my case, when I'm debugging a large program I make notations of where things are in the listing by referring to the line numbers, not assembly addresses. Having the line number at the left end of the statement, as has been traditional since the days of the MOS Technology reference assembler, helps in that regard.
8BIT wrote:
As for rearranging the order, I can do that too, but do not want to create any forks for future releases, so we'll need a consensus from the group. I can create a one-time executable with that format if you would like.
Just how many people use a Woz-style monitor these days? Surely there aren't that many around that a wholesale restructuring of the listing format is warranted. It would be better if a separate program or script were used to generate output from a binary that will suit the Woz monitor's input requirements.
Quote:
Give this version a try... the white spaces should be shortened.

Code: Select all

04018  E302  BD 50 D9  .0000010 lda postmemc,x        ;current memory count
Looks like it works as expected. :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Kowalski Simulator Updates

Post by Druzyek »

The old version of the simulator loaded right up on my computer but the 1.2.14 version I downloaded here stalls and I can't end it in task manager. Any ideas?
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

Druzyek wrote:
The old version of the simulator loaded right up on my computer but the 1.2.14 version I downloaded here stalls and I can't end it in task manager. Any ideas?
Can you try the 1.2.13 version I built? or re-download the 1.2.14 version?

Also, what version of Windows (XP, 7, 10,etc)? Home or Pro? 32 bit or 64 bit OS? how much RAM?

thanks!

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Kowalski Simulator Updates

Post by Druzyek »

I restarted my computer and the 1.2.14 version started fine. I'll let you know if it happens again.

In case it comes back up and you want to troubleshoot: Windows 7 Ultimate, SP1 64-bit. 8gb RAM.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

Glad to hear the reboot fixed it!

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Kowalski Simulator Updates

Post by Druzyek »

I'm back with more complaints :( The following short program reliably crashes on my installation (1.2.14):

Code: Select all


     .start main
     .org $8000
main:
     LDA #5
It freezes on this screen for about 3 seconds then exits silently.
Attachments
kowalski.png
whartung
Posts: 1004
Joined: 13 Dec 2003

Re: Kowalski Simulator Updates

Post by whartung »

Now, I don't know anything about the Kowalski Simulator. But, what happens to be the values of the RAM at address $8002?

Your program isn't like a C program, that has a defined start and stop point.

Yours loads the accumulator with a 5, and then goes off and does whatever follows it in RAM.

So, it may be no surprise that the program just goes out to lunch after executing your LDA instruction.

For example the memory may all default to 0. And the opcode that has the value of $00 is the BRK instruction. That means your program that's actually executing is this:

Code: Select all

8000 LDA #5
8002 BRK
Well, BRK jumps through the BRK vector in the CPU which, perhaps, is ALSO $0000.

Which directs the CPU to address $0000, where we find:

Code: Select all

0000 BRK
Which simply goes in to an endless loop, crushing the stack.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

I could not get that code to crash. Can you send me screen shots of all the options tabs? Might be a specific setup causing it.
sim.png
sim.png (11.47 KiB) Viewed 29728 times
Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Kowalski Simulator Updates

Post by BigDumbDinosaur »

Druzyek wrote:
I'm back with more complaints :( The following short program reliably crashes on my installation (1.2.14):

Code: Select all

     .start main
     .org $8000
main:
     LDA #5
It freezes on this screen for about 3 seconds then exits silently.
Like Daryl, I tried this and didn't see any problem.

Incidentally, in the Kowalski assembler, a label does not have to be followed by a colon and an instruction can be on the same line as the label. These changes will have a small but definite effect on how quickly the assembler can parse the source code of a large program.

Also, *=$8000 is a synonym for .org $8000.

I would write the above as:

Code: Select all

         .start main
         *=$8000
;
main     lda #5
whartung wrote:
Your program isn't like a C program, that has a defined start and stop point.

Yours loads the accumulator with a 5, and then goes off and does whatever follows it in RAM.

So, it may be no surprise that the program just goes out to lunch after executing your LDA instruction.
Actually, the program does have defined start and stop points. The .start main pseudo-op sets the starting point for execution and there is an implied BRK following the last instruction. Executing BRK in the Kowalski simulator terminates the program and returns control to the user.

However, the problem being reported by Druzyek is one that is occurring during assembly of the program, not execution.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Kowalski Simulator Updates

Post by Druzyek »

8BIT, you were right. The listing output was pointing to a folder I had moved. It stopped crashing when I changed it. Thanks for the help.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

I'm glad you found the problem!
Please visit my website -> https://sbc.rictor.org/
Mark H
Posts: 1
Joined: 19 Jun 2019

Re: Kowalski Simulator Updates

Post by Mark H »

Hi,

Thanks for posting this update.

I am getting to grips with how to us the Kowalski Simulator. A question:

What is the difference between the File, Save Code output options of:
a) Binary Image .65b and
b) Binary Program .65p

Assembling one of the examples the output looks identical?
(at least when input to my Eprom Programmer TL866A USB Universal Minipro Programmer Kit (Mino Pro v6.60 interface))

Thanks in advance.

Mark

ps, If anyone would be generous enough to post (or point me to) some extended example code to help me get a feel for how the various Kowalski simulator/assembler directives are used in practice that would be helpful, the documentation and examples I have found from http://exifpro.com/utils.html are somewhat limited.
pps, Or is there a 'Manual' out there?
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Kowalski Simulator Updates

Post by Druzyek »

Is there any way to reset the I/O, Register, and Memory windows to their default position? I have two monitors I plug into my laptop at work. If I have the simulator open on one of the three displays that isn't the "main" one, then when I go home and open my laptop I have the simulator but all the toolbar windows are still on the other (now not connected) display, so I can't see them. Restarting the program doesn't help. How can I get them back?
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

Here's a quick but dirty work around. Open Regedit and move to:
Computer\HKEY_CURRENT_USER\Software\MiKSoft\6502 Simulator\1.2\View


You will Find the Window Positions for the 7 tabs here. For instance, the "6502 memory" tab is labeled MemoryXPos and MemoryYPos.

I closed (unchecked) that window and then changed these DWORD values to 1.

When I reopen the tab, it is in the upper left corner of my screen.

I don't have multiple monitors so could not confirm that this will work, but you can give it a try.

I'll dig through the source when I get time to see where these get saved and try to figure a way to add a "reset all" option.

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Kowalski Simulator Updates

Post by Druzyek »

Thanks! I'll give it a try.
Post Reply