Page 20 of 32
Re: Kowalski Simulator Updates
Posted: Fri Mar 15, 2024 7:37 pm
by BigDumbDinosaur
Some of us use it as a simulator too, BDD. It's in the title.
Duh! Yes, I know that. However, it is a 6502 microprocessor simulator, not an entire-system simulator. The built-in console is good enough to test basic I/O routines. As Daryl notes, you can simulate any hardware you want with the right code.
Re: Kowalski Simulator Updates
Posted: Fri Mar 15, 2024 7:39 pm
by GARTHWILSON
I'd love to see two things [...] 6551 [...]
I’m confused. What does the 6551 have to do with an editor/assembler that runs on MS Windows?
Simulators usually don't work very well for testing I/O-intensive things, especially interrupt-driven. Simulators simulate the processor activity, but not the innards of I/O ICs and their registers and ports. jdimeglio, what I've done there is just follow the data sheets carefully, and things have always worked. I have various pieces of working sample code on my site, including interrupt support RS-232 receive in the 6502 interrupts primer, at http://wilsonminesco.com/6502interrupts/#3.1 .
Re: Kowalski Simulator Updates
Posted: Fri Mar 15, 2024 9:50 pm
by barrym95838
Daryl sent me a PM a couple of years ago when I had trouble tracking down the details of the built-in I/O system. I'm not sure if anyone else has struggled to find this in the documentation, but I'm including it here anyway, and apologizing in advance if it's redundant:
Code: Select all
Functions built into the Simulator's IO page.
The following table lists the IO functions supported within the IO page. The IO Page is set in the options menu. The variable "IO_AREA" is reserved and will return the start address of the IO page.
IO_AREA+0: TERMINAL_CLS (w)
IO_AREA+1: TERMINAL_OUT (w)
IO_AREA+2: TERMINAL_OUT_CHR (w)
IO_AREA+3: TERMINAL_OUT_HEX (w)
IO_AREA+4: TERMINAL_IN (r)
IO_AREA+5: TERMINAL_X_POS (r/w)
IO_AREA+6: TERMINAL_Y_POS (r/w)
(w) means write only port, (r) read only, (r/w) read/write.
TERMINAL_CLS - clear terminal window, set cursor at (0,0) position.
TERMINAL_OUT - output single character interpreting control characters.
Terminal can only recognize those characters:
ASCII $0D (carriage return) moving cursor to the beginning of line,
ASCII $0A (line feed) moving cursor to the next line and scrolling window if necessary,
ASCII $08 (backspace) moving one position to the left and erasing char below cursor.
TERMINAL_OUT_CHR - outputs single character; control chars are being output just like regular characters.
TERMINAL_OUT_HEX - outputs single byte as a two-digit hexadecimal number.
TERMINAL_IN - input single byte, returns 0 if there's no characters available in terminal's buffer; when I/O terminal window is active it can accept keyboard input; press [Ins] key to paste clipboard's contents into terminal.
TERMINAL_X_POS - cursor X position (column).
TERMINAL_Y_POS - cursor Y position (row).
... what I've done there is just follow the data sheets carefully, and things have always worked.
You have a rare talent, Garth. I consider myself lucky when a non-trivial creation of mine works properly on the first run. It happens, but not often, and certainly not always.
Re: Kowalski Simulator Updates
Posted: Fri Mar 15, 2024 10:26 pm
by BigDumbDinosaur
Daryl sent me a PM a couple of years ago when I had trouble tracking down the details of the built-in I/O system...
I haven’t used the console feature much during the nearly 20 years I’ve used the simulator. However, I seem to recall it was possible to copy-and-paste text from another Windows program into the console and have the simulator treat it as typed input.
Most of my simulation is limited to testing algorithms prior to running them on my POC unit...and possibly crashing the latter (haven’t done that in a while—current uptime on POC V1.3 is 195 days). However, I am limited in what I can test in the simulator, since it currently can’t simulate a 65C816. In some cases, I can write a function test with 65C02-style code and run it to prove the logic is correct. Once that hurdle has been leaped, I can change the function to 816 native-mode code for testing on the actual hardware.
Since I switched the POC firmware over to interrupt-driven API calls, opportunities for crashing the machine have been significantly reduced...but not eliminated!
Use of the Kowalski assembler’s macro language for handling BIOS API and library function calls, the latter which receive parameters via the stack, has helped a lot in that regard—a lot fewer opportunities for minor typos to result in major malfunctions.
It’s one of the reasons I’m focused on eradicating assembler bugs.
Re: Kowalski Simulator Updates
Posted: Fri Mar 15, 2024 11:55 pm
by 8BIT
Daryl sent me a PM a couple of years ago when I had trouble tracking down the details of the built-in I/O system. I'm not sure if anyone else has struggled to find this in the documentation, but I'm including it here anyway, and apologizing in advance if it's redundant...
Twice is better than none
FYI - I added it to the html help when I did the conversion. Its second from the bottom of the keyword list.
Daryl
Re: Kowalski Simulator Updates
Posted: Sat Mar 16, 2024 2:00 am
by BigDumbDinosaur
Daryl sent me a PM a couple of years ago when I had trouble tracking down the details of the built-in I/O system. I'm not sure if anyone else has struggled to find this in the documentation, but I'm including it here anyway, and apologizing in advance if it's redundant...
Twice is better than none
FYI - I added it to the html help when I did the conversion. Its second from the bottom of the keyword list.
A project I have simmering on one of my computing stove’s many back burners is a standalone manual for the Kowalski package to help out new users of the software. The built-in help can only go so far and, unavoidably, has to make some assumptions about what the user does and doesn’t know. I’ve learned a lot of tricks with using the assembler, especially the macro processor, which info, I’m sure, would be welcome by others.
Incidentally, the help’s description of the STP instruction incorrectly says “only processor 65816.” STP is also supported on the WDC 65C02.
The description for PHD says the stack pointer (SP) is decremented. Since PHD pushes a word, SP = SP - 2.
The description for PLD says it pulls a byte. PLD pulls a word and therefore, SP = SP + 2.
The help descriptions for the 65C816’s TDC and TSC instructions should mention that the copy is always a 16-bit operation, regardless of the width of the accumulator. That behavior is a potential boob-trap for the unwary programmer.
Re: Kowalski Simulator Updates
Posted: Sat Mar 16, 2024 1:59 pm
by 8BIT
Incidentally, the help’s description of the STP instruction incorrectly says “only processor 65816.” STP is also supported on the WDC 65C02.
The description for PHD says the stack pointer (SP) is decremented. Since PHD pushes a word, SP = SP - 2.
The description for PLD says it pulls a byte. PLD pulls a word and therefore, SP = SP + 2.
The help descriptions for the 65C816’s TDC and TSC instructions should mention that the copy is always a 16-bit operation, regardless of the width of the accumulator. That behavior is a potential boob-trap for the unwary programmer.
Noted - I'll update the help on my next bug-fix release.
thanks!
Daryl
Re: Kowalski Simulator Updates
Posted: Sat Mar 16, 2024 8:27 pm
by BigDumbDinosaur
Noted - I'll update the help on my next bug-fix release.
Once again, I must commend you for taking over the maintenance of the Kowalski simulator. It began life as a good piece of software and has only gotten better with your efforts. Your place in computing history has been solidified—at least around here. 
Kowalski Simulator Updates: Bugs?
Posted: Wed Mar 20, 2024 10:15 pm
by BigDumbDinosaur
In the process of trying to get a piece of software to run in extended RAM on my POC V1.3 unit, I discovered some anomalies with using the JMP instruction. Assembling the attached file will illustrate the issues. I included information from David Gray of WDC on how the WDC assembler processes JMP instructions with different addressing mode forms.
- jump_usage.asm
- Jump Usage in Kowalski Assembler
- (5.08 KiB) Downloaded 213 times
Re: Kowalski Simulator Updates
Posted: Sat Mar 23, 2024 9:14 pm
by jdimeglio
I'd love to see two things [...] 6551 [...]
I’m confused. What does the 6551 have to do with an editor/assembler that runs on MS Windows?
Simulators usually don't work very well for testing I/O-intensive things, especially interrupt-driven. Simulators simulate the processor activity, but not the innards of I/O ICs and their registers and ports. jdimeglio, what I've done there is just follow the data sheets carefully, and things have always worked. I have various pieces of working sample code on my site, including interrupt support RS-232 receive in the 6502 interrupts primer, at http://wilsonminesco.com/6502interrupts/#3.1 .
Thank you. The IRQ support for the rs-232 was exactly what i was looking for.
Re: Kowalski Simulator Updates
Posted: Sun Mar 24, 2024 12:01 am
by 8BIT
I have updated the Simulator to v1.3.4.8 - fixing the following:
Windows Invalid Argument call error reported by BDD.
Updated the JMP, JML, JSR, and JSL assembly errors reported my BDD (he reported the JMP issues, I extended the fix to the JSR opcodes as well)
Fixed scrolling the disassembly windows past the top of memory bug that cause the program to become unresponsive
Correct some of the HTML Help reported by BDD
I made a lot of changes and may have inadvertently broken something that worked previously. I'm leaving the old version 1.3.4.7 on my website for now, just in case.
You can find the program and source files here ->
https://sbc.rictor.org/kowalski.html
Let me know if you have any issues.
Daryl
Re: Kowalski Simulator Updates
Posted: Sun Mar 24, 2024 1:05 am
by BigDumbDinosaur
I’ve downloaded the updated version and will give it a whirl. Thanks for maintaining this software!
Re: Kowalski Simulator Updates
Posted: Sun Mar 24, 2024 9:53 pm
by Yuri
CHM viewer under Windows 11 is pretty broken these days. Might make sense to start packaging the help as just loose HTML files at this point and just opening them in the user's browser of choice.
Re: Kowalski Simulator Updates
Posted: Sun Mar 24, 2024 10:26 pm
by BigDumbDinosaur
CHM viewer under Windows 11 is pretty broken these days. Might make sense to start packaging the help as just loose HTML files at this point and just opening them in the user's browser of choice.
Everything about Windows 10/11 seems to be broken or otherwise messed up in some way. I have some clients who “upgraded” from Windows 7 to Win 10 and all of a sudden, software that used to work either didn’t work at all and had to be replaced, or something function in the software that was fine under Win 7 is now broken in some fashion—necessitating replacement to regain lost functionality. It’s Micro$oft at its finest. 
I have an insurance agency client who is still running on Win 7 workstations for fear that switching to Win 10 or 11 will break their agency management software. Evidently the company who maintains the management software ran into a slew of problems with trying to run it on Win 10 and has advised their clients to stick with Win 7 as long as possible.
I won’t even mention how intrusive Windows has become...
Re: Kowalski Simulator Updates
Posted: Sun Mar 24, 2024 10:57 pm
by Yuri
CHM viewer under Windows 11 is pretty broken these days. Might make sense to start packaging the help as just loose HTML files at this point and just opening them in the user's browser of choice.
Everything about Windows 10/11 seems to be broken or otherwise messed up in some way.
True, though to be fair, Microsoft said that the CHM format was broken and highly insecure many many years ago and that it would be removed at some point in the future.
I won’t even mention how intrusive Windows has become...
Preaching to the choir here; if I could I'd jump from Windoze to OS X or Linux (actually I prefer FreeBSD myself, but Linux seems better supported these days)