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 »

8BIT wrote:
I have found the reason the registry settings were not being read and have now corrected it. I did not encounter the editor issue reported, and cannot duplicated it, so will need more details if there is in fact an editor problem.

The updated Kowalski Simulator, version 1.2.15 - is attached here.

Thank you all for your feedback.

Daryl
I tried it out and everything appears to be okay, including the editor.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

I'm glad it is working better now. For those interested, here are the latest source code files that produce v1.2.15.

Daryl
Attachments
6502 v1.2.15 source.zip
(8.28 MiB) Downloaded 160 times
Please visit my website -> https://sbc.rictor.org/
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Kowalski Simulator Updates

Post by BigEd »

Thanks for picking up this project and continuing to maintain it!
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

I'm happy to help out where ever I can. I hope everyone finds it useful.

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

For those interested, I have also placed the latest source on github, here: https://github.com/DRictor/6502/tree/DR ... 02-v1.2.15

Daryl
Please visit my website -> https://sbc.rictor.org/
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Kowalski Simulator - new feature

Post by 8BIT »

OK, so I thought I'd throw this tickler out.
65816.png
Yes, I have added support for assembling 65816 code. Right now, it can properly assemble all of the 65816 opcodes and addressing modes, except WDM. The way the code is written, it used one value as a marker for an invalid opcode. For the 6501 and 65C02, there were plenty. The 65816 does not have any invalid opcodes. However, since WDM is reserved for future use, I chose to use it as the marker. You can still have a WDM opcode by using the .DB $42 directive.

As of now, it only operates on the first 64k of memory but I plan to expand that to the full 16MB (24 bit) address space.

Also, the Simulator and disassembler are currently disabled for 65816 mode. That will take a lot more time to complete, if ever.

I am still testing to syntax checker and am working on the memory extension. I will release a copy when I think its ready.

Is anyone interested in this new feature?

Daryl
Last edited by 8BIT on Fri Dec 18, 2020 5:29 am, edited 1 time in total.
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 - new feature

Post by BigDumbDinosaur »

8BIT wrote:
OK, so I thought I'd through this tickler out...Is anyone interested in this new feature?
Well, I think you know of at least one dinosaur that would give it a spin. :D

BTW, you likely already know that internally all values are stored as 32-bit integers. So I'd think it wouldn't be too much of a leap to get 24-bit addressing to work.

One thing I'd really like to see is
% used for the binary radix instead of @. You can't imagine how many times I've been tripped up by that over the years. :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Kowalski Simulator Updates

Post by BigEd »

Sounds like a great idea!
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator - new feature

Post by 8BIT »

BigDumbDinosaur wrote:
BTW, you likely already know that internally all values are stored as 32-bit integers. So I'd think it wouldn't be too much of a leap to get 24-bit addressing to work.
Well, the code uses UINT16 and UINT8 all over the place so right now any address over $FFFF gives errors or gets truncated. I know I can do it, its just going to take a lot of time to go line by line in the code to update address references to UINT32.
Quote:
One thing I'd really like to see is % used for the binary radix instead of @. You can't imagine how many times I've been tripped up by that over the years. :D
Unfortunately, % is used now for the Modulo function for expressions. I could change it, but then others might have issues with having to change their sources. Had % been available, I could have added it so that either could be used for binary radix and everyone would be satisfied.

Thanks for the feedback!

Daryl
Please visit my website -> https://sbc.rictor.org/
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: Kowalski Simulator Updates

Post by Chromatix »

One reasonable standard prefix for binary constants is 0b, similarly to 0x for hxadecimal.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Kowalski Simulator Updates

Post by GARTHWILSON »

or putting a B after the 0's and 1's, as in ORA #00011100B, as a couple of assemblers I've used do. 0b and 0x are C language and its derivatives. It is apparently common for assemblers to accept multiple methods of specifying base.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: Kowalski Simulator Updates

Post by cjs »

GARTHWILSON wrote:
or putting a B after the 0's and 1's, as in ORA #00011100B, as a couple of assemblers I've used do. 0b and 0x are C language and its derivatives. It is apparently common for assemblers to accept multiple methods of specifying base.
Indeed. I ran into this recently when discussing base specification and symbol names with some MSX folks, as I was wanting to use the Motorola convention ($nn) for hex numbers rather than the Intel (0nnh).*

I was informed that many (most?) MSX assemblers do accept both, that it's not uncommon for MSX programmers to use the Motorola convention, and that there aren't really any technical issues with this. It's even safe to accept tokens matching [A-F][0-9A-F]*h; you just try looking them up in the symbol table first and, if they're not there, you interpret them as a constant. Apparently experience has shown the theoretical conflicts in this scheme cause no serious problems in practice.

___________________
* I had technical reasons for this: I wanted to be able easily to use the same data files included in both 6502/6800 and 8080/Z80 assembly source files. That of course does not change the incontrovertable fact that the Intel convention is morally wrong, a Sin Against God, people who prefer it are evil, it will bring about the collapse of civilisation, etc. etc.
Curt J. Sampson - github.com/0cjs
John West
Posts: 383
Joined: 03 Sep 2002

Re: Kowalski Simulator Updates

Post by John West »

% the numeric literal prefix and % the binary operator appear in different contexts, with no overlap. It's always possible to distinguish them, although an existing parser might not be structured in a way that makes it easy. It's similar to * being used for both "current assembly address" and multiplication, or - being used for negative numeric literals and subtraction.

I think I've mentioned it here before somewhere, but my favourite notation is [[radix]$]<number>. A number on its own is in decimal. With a $ before it, it's hex. If there's a number before the $, that specifies the radix. So 10 = $a = 16$a = 2$1010 = 8$12 = 6$14. Base 23 doesn't come up all that often, but if you ever need it, it's there. My assembler accepts % for binary as well, because it's a common convention.
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Kowalski Simulator Updates

Post by 8BIT »

The parser was not written to allow for the context of % to be distinguished. I do not plan to rewrite the parsing code, but have come up with a workaround for those who want % for a binary radix.

I have created a new option flag "SwapBin" which swaps the symbols % and @ functions. When added to the source, % will be the binary radix and @ will be the Modulo operator.

Code: Select all

     .opt SwapBin

     LDA #%10100101 - returns LDA #$A5
     LDX #13@5  - returns LDX #$03
I hope everyone will find that acceptable.

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 »

8BIT wrote:
The parser was not written to allow for the context of % to be distinguished. I do not plan to rewrite the parsing code, but have come up with a workaround for those who want % for a binary radix.

I have created a new option flag "SwapBin" which swaps the symbols % and @ functions. When added to the source, % will be the binary radix and @ will be the Modulo operator.

Code: Select all

     .opt SwapBin

     LDA #%10100101 - returns LDA #$A5
     LDX #13@5  - returns LDX #$03


I hope everyone will find that acceptable.

Daryl
Looks like a good compromise to me. I use binary values much more often than I use the modulo function.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Post Reply