Kowalski Simulator Updates
Re: Kowalski Simulator Updates
OK, I must have uploaded the wrong zip file previously.
Here is the latest file v1.3.3.2 with all the ASCIS fixes.
Sorry for the extra trouble.
Help - About should show v1.3.3.2
thanks!
Daryl
Here is the latest file v1.3.3.2 with all the ASCIS fixes.
Sorry for the extra trouble.
Help - About should show v1.3.3.2
thanks!
Daryl
- Attachments
-
- 6502 v1.3.3.2.zip
- V1.3.3.2 - ASCIS bugs fixed.
- (621.58 KiB) Downloaded 86 times
Please visit my website -> https://sbc.rictor.org/
Re: Kowalski Simulator Updates
_________________________________________________________________________
Checkout my 2pass assembler/monitor https://github.com/jdimeglio/6502-Monitor
Checkout my 2pass assembler/monitor https://github.com/jdimeglio/6502-Monitor
Re: Kowalski Simulator Updates
Hi all,
I found a bug in the disassembly window. I have the address extended to 24 bits and if you scroll down past $FFFF (6502 or 65C02 modes), it will wrap to $000000 and keep going. The problem is if you try to scroll back up, it locks up the program and its stops responding. So until I fix it, be aware and do not scroll past $FFFF.
Wishing everyone a happy new year!
Daryl
I found a bug in the disassembly window. I have the address extended to 24 bits and if you scroll down past $FFFF (6502 or 65C02 modes), it will wrap to $000000 and keep going. The problem is if you try to scroll back up, it locks up the program and its stops responding. So until I fix it, be aware and do not scroll past $FFFF.
Wishing everyone a happy new year!
Daryl
Please visit my website -> https://sbc.rictor.org/
Re: Kowalski Simulator Updates
8BIT wrote:
Hi all,
I found a bug in the disassembly window. I have the address extended to 24 bits and if you scroll down past $FFFF (6502 or 65C02 modes), it will wrap to $000000 and keep going. The problem is if you try to scroll back up, it locks up the program and its stops responding. So until I fix it, be aware and do not scroll past $FFFF.
Wishing everyone a happy new year!
Daryl
I found a bug in the disassembly window. I have the address extended to 24 bits and if you scroll down past $FFFF (6502 or 65C02 modes), it will wrap to $000000 and keep going. The problem is if you try to scroll back up, it locks up the program and its stops responding. So until I fix it, be aware and do not scroll past $FFFF.
Wishing everyone a happy new year!
Daryl
Daryl
- Attachments
-
- 6502 v1.3.3.3.zip
- V1.3.3.3 - fixed disassembler window scrolling issues.
- (621.69 KiB) Downloaded 70 times
Please visit my website -> https://sbc.rictor.org/
Re: Kowalski Simulator Updates
For those having trouble finding the latest update in all of these pages, I will always post the latest updates to my Simulator page on my website as well as this forum.
Here's a link -> https://sbc.rictor.org/kowalski.html
Daryl
Here's a link -> https://sbc.rictor.org/kowalski.html
Daryl
Please visit my website -> https://sbc.rictor.org/
Re: Kowalski Simulator Updates
I found another bug yesterday. In 65816 assembly, labels above $FFFF cause a missing ORG error. I believe it is not assigning/handling 24-bit addresses for labels properly. I am working on the fix, should be ready in a few days.
Daryl
Daryl
Please visit my website -> https://sbc.rictor.org/
Re: Kowalski Simulator Updates
After fixing the label issue, I realized I had a few other oversights as well. Branches, jumps, and JSR's also had issues outside of bank 0. I have fixed those also and I am finishing up testing of operations that attempt to cross bank boundaries. I added a new error message for invalid bank crossings.
I am also adding a popup warning when code is assembled across a bank boundary. The one issue is no line # can be provided. The programmer will have to look at the assembly listing to find the location in the source to ensure branches, jumps, and JSR's are respecting the bank limits. I will try to flag an error if an operation splits the boundary, and the warning if does not.
I hope to get the update out this weekend.
Thanks!
Daryl
I am also adding a popup warning when code is assembled across a bank boundary. The one issue is no line # can be provided. The programmer will have to look at the assembly listing to find the location in the source to ensure branches, jumps, and JSR's are respecting the bank limits. I will try to flag an error if an operation splits the boundary, and the warning if does not.
I hope to get the update out this weekend.
Thanks!
Daryl
Please visit my website -> https://sbc.rictor.org/
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Kowalski Simulator Updates
8BIT wrote:
After fixing the label issue, I realized I had a few other oversights as well. Branches, jumps, and JSR's also had issues outside of bank 0. I have fixed those also and I am finishing up testing of operations that attempt to cross bank boundaries. I added a new error message for invalid bank crossings.
I am also adding a popup warning when code is assembled across a bank boundary. The one issue is no line # can be provided. The programmer will have to look at the assembly listing to find the location in the source to ensure branches, jumps, and JSR's are respecting the bank limits. I will try to flag an error if an operation splits the boundary, and the warning if does not.
I am also adding a popup warning when code is assembled across a bank boundary. The one issue is no line # can be provided. The programmer will have to look at the assembly listing to find the location in the source to ensure branches, jumps, and JSR's are respecting the bank limits. I will try to flag an error if an operation splits the boundary, and the warning if does not.
I'm not sure I'm understanding...wouldn't the program bank byte be static once established? If I say * = $A18000 I would have fixed the execution bank and should the program counter wrap the bank would remain $A1, thus following the behavior of the hardware. If so, it would seem a branch, subroutine call or jump (excepting JML and JSL) would never cross banks because the bank byte would not be changed.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Kowalski Simulator Updates
Here are some code examples that I was testing with. Assuming a programmer was assembling a huge program and did not realize he ran over a bank boundary. I get the fact that a good programmer would know where he is and not need these errors and warnings, I'm writing the assembler to assume nothing.
This code will cause an error due to the BEQ crossing a bank.
This code would cause a warning pop-up only as STA $01 fits inside the first bank and STA $02 fits inside the next bank. Assembly is correct but execution will not flow as this is written.
This code would cause an error as STA $01 splits the bank - STA opcode is on first bank and $01 is in the next bank.
Hope that helps!
Daryl
This code will cause an error due to the BEQ crossing a bank.
Code: Select all
*= $FFFA ; just to place us close to the end
LDA $00
BEQ NEXT
LDA $03
STA $01
NEXT STA $02
This code would cause a warning pop-up only as STA $01 fits inside the first bank and STA $02 fits inside the next bank. Assembly is correct but execution will not flow as this is written.
Code: Select all
*= $FFFA ; just to place us close to the end
NEXT LDA $00
BEQ NEXT
STA $01
STA $02
This code would cause an error as STA $01 splits the bank - STA opcode is on first bank and $01 is in the next bank.
Code: Select all
*= $FFFB ; just to place us close to the end
NEXT LDA $00
BEQ NEXT
STA $01
STA $02
Daryl
Please visit my website -> https://sbc.rictor.org/
Re: Kowalski Simulator Updates
After re-reading your question, I think I understand your statement better. You want the assembler to wrap the PC back to $0000 of the present bank. In the current format, that would cause a PC wrapped error, just like the 65C02 code does. If the consensus is to wrap the PC vs. advancing to the next bank, then I'd leave the error as is and let the assembly stop.
By default, the assembler just increments the PC after each instruction and I was letting it pass into the next bank. As long as I have the errors and warnings that I have added, this too is a viable option. The coder just needs to ensure he is adjusting the PBR for code on either side of the bank boundary. The warning reminds him of that need.
What does everyone prefer?
Daryl
By default, the assembler just increments the PC after each instruction and I was letting it pass into the next bank. As long as I have the errors and warnings that I have added, this too is a viable option. The coder just needs to ensure he is adjusting the PBR for code on either side of the bank boundary. The warning reminds him of that need.
What does everyone prefer?
Daryl
Please visit my website -> https://sbc.rictor.org/
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Kowalski Simulator Updates
8BIT wrote:
After re-reading your question, I think I understand your statement better. You want the assembler to wrap the PC back to $0000 of the present bank. In the current format, that would cause a PC wrapped error, just like the 65C02 code does. If the consensus is to wrap the PC vs. advancing to the next bank, then I'd leave the error as is and let the assembly stop.
By default, the assembler just increments the PC after each instruction and I was letting it pass into the next bank. As long as I have the errors and warnings that I have added, this too is a viable option. The coder just needs to ensure he is adjusting the PBR for code on either side of the bank boundary. The warning reminds him of that need.
What does everyone prefer?
By default, the assembler just increments the PC after each instruction and I was letting it pass into the next bank. As long as I have the errors and warnings that I have added, this too is a viable option. The coder just needs to ensure he is adjusting the PBR for code on either side of the bank boundary. The warning reminds him of that need.
What does everyone prefer?
My opinion is the assembler should halt with an error if PC wraps. The 65C816 will not increment PB when PC wraps, so it makes sense to me that the assembler should behave in the same fashion.
I should note there is no programmatic means by which PB can be directly changed in the 816. Following that pattern, the only way the assembler's analog of PB should be changeable is by explicitly setting an assembly address as a 24-bit value.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Kowalski Simulator Updates
8BIT wrote:
Assuming a programmer was assembling a huge program and did not realize he ran over a bank boundary. I get the fact that a good programmer would know where he is and not need these errors and warnings....
BDD's suggestion sounds like the right one to me. Wrapping code execution around to the beginning of the bank sounds like a bit of a trick that you'd want documented in your code, and it seems to me that his approach would make such documentation easy. Of course, this would best be tested with an example of where it would be reasonable to do this and then looking at exactly how much extra work the programmer has to go to in order to make this happen.
Curt J. Sampson - github.com/0cjs
Re: Kowalski Simulator Updates
8BIT wrote:
What does everyone prefer?
When assembling code it makes sense to catch bank boundary crossings, and when assembling data it makes sense to ignore bank boundary crossings (after all, <64k of code with >64k of data isn't a crazy scenario). However, it's not so easy for the assembler to figure out which is being assembled.
Code: Select all
ENABLE
SEP #$40
.byte $50 ; BVC, skip CLV
DISABLE
CLV
There are also routines like PRIMM that use inline data.
Code: Select all
.org $12FFF8
JSL PRIMM
.string "nvmxdizc e"
.byte 0
It'll likely be a lot simpler to pick a reasonable default behavior and let the user tell you if and when to use a different behavior, perhaps even via an assembler directive. I can imagine use cases where the desired behavior is:
- If bank boundary crossing occurs, wrap, issue error and halt immediately
- If bank boundary crossing occurs, wrap, issue warning and continue
- If bank boundary crossing occurs, wrap, continue without issuing a warning or error
- If bank boundary crossing occurs, increment bank, continue without issuing a warning or error
- If bank boundary crossing occurs, increment bank, issue warning
Again, be careful about placing too much weight on the thoughts of someone who isn't (and in the foreseeable future isn't likely to be) using the simulator, but be aware there are subtle ways in which the 65C816 is more complicated than the 6502 and 65C02.
Good luck.
Re: Kowalski Simulator Updates
dclxvi wrote:
Code wraps at a bank boundary, but data does not.... When assembling code it makes sense to catch bank boundary crossings, and when assembling data it makes sense to ignore bank boundary crossings....
Perhaps the assembler could always simply move foward into the next bank when the assembly address counter passes over a bank boundary, but generate an error on any attempt to assemble an instruction mnemonic (or anything that contains one, such as a macro) when the current bank is not the same bank as the last explicitly set assembly address. Then large amounts of data will assemble just fine, but code, even after a large amount of data, will generate an appropriate error. I'm not sure if it would be useful to have a way of generating an error on data overflowing a bank.
Quote:
...issue warning and continue...
Curt J. Sampson - github.com/0cjs
Re: Kowalski Simulator Updates
Thank you all for your input. This is what I have chosen to do:
If program code goes past the end of a bank, it will stop and error on the instruction where the cross happens.
Program code can go all the way to $FFFF of the current bank without warnings or errors.
Data can freely cross a page boundary.
To move from one bank to another for program code, use a .ORG or *= directive to set the new starting address for that bank.
If a branch, jump, or JSR tries to move to a label in a different bank, an error will be generated. JSL and JML will cross banks as designed.
There are no pop-up warnings. Errors will have to be resolved.
I have not done any testing with macros, but expect they will error when they should.
So for now, here is version 1.3.3.4 - correcting the bank boundary issues. Please let me know if you find anything out of sorts.
Source code is on my website.
Thanks!
Daryl
If program code goes past the end of a bank, it will stop and error on the instruction where the cross happens.
Program code can go all the way to $FFFF of the current bank without warnings or errors.
Data can freely cross a page boundary.
To move from one bank to another for program code, use a .ORG or *= directive to set the new starting address for that bank.
If a branch, jump, or JSR tries to move to a label in a different bank, an error will be generated. JSL and JML will cross banks as designed.
There are no pop-up warnings. Errors will have to be resolved.
I have not done any testing with macros, but expect they will error when they should.
So for now, here is version 1.3.3.4 - correcting the bank boundary issues. Please let me know if you find anything out of sorts.
Source code is on my website.
Thanks!
Daryl
- Attachments
-
- 6502 v1.3.3.4.zip
- Version 1.3.3.4 - Fixed bank boundary issues
- (622.08 KiB) Downloaded 90 times
Please visit my website -> https://sbc.rictor.org/