6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Apr 28, 2024 4:21 pm

All times are UTC




Post new topic Reply to topic  [ 331 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21, 22, 23  Next
Author Message
PostPosted: Fri Mar 15, 2024 7:37 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
barrym95838 wrote:
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 15, 2024 7:39 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
BigDumbDinosaur wrote:
jdimeglio wrote:
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?[/color]

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 .

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 15, 2024 9:50 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1927
Location: Sacramento, CA, USA
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:
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).

GARTHWILSON wrote:
... 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.

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 15, 2024 10:26 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
barrym95838 wrote:
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!  :D  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.  :shock:  It’s one of the reasons I’m focused on eradicating assembler bugs.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 15, 2024 11:55 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
barrym95838 wrote:
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 :D

FYI - I added it to the html help when I did the conversion. Its second from the bottom of the keyword list.

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 16, 2024 2:00 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
8BIT wrote:
barrym95838 wrote:
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 :D

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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 16, 2024 1:59 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
BigDumbDinosaur wrote:
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.[/color]


Noted - I'll update the help on my next bug-fix release.

thanks!
Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 16, 2024 8:27 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
8BIT wrote:
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.  :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 20, 2024 10:15 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
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.

Attachment:
File comment: Jump Usage in Kowalski Assembler
jump_usage.asm [5.08 KiB]
Downloaded 31 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 23, 2024 9:14 pm 
Offline
User avatar

Joined: Wed Nov 11, 2020 3:33 am
Posts: 22
Location: Sydney
GARTHWILSON wrote:
BigDumbDinosaur wrote:
jdimeglio wrote:
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?[/color]

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.

_________________
_________________________________________________________________________
Checkout my 2pass assembler/monitor https://github.com/jdimeglio/6502-Monitor


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 24, 2024 12:01 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
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

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 24, 2024 1:05 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
I’ve downloaded the updated version and will give it a whirl.  Thanks for maintaining this software!

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 24, 2024 9:53 pm 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 24, 2024 10:26 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8147
Location: Midwestern USA
Yuri wrote:
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.  :evil:

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...

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 24, 2024 10:57 pm 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
BigDumbDinosaur wrote:
[color=#000000]
Yuri wrote:
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.

Quote:
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)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 331 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21, 22, 23  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: