Post by Andrew RoughanI have been writing and debugging software that runs in auxmem and have had
some challenges with using AppleWin for this.
Perhaps these have answers or perhaps they need to be upgraded to feature
requests. I’m new to AppleWin so I don’t know.
Welcome to the debugger!
Some things are easy, some things are not documented as well as they should be, and some things are still difficult that could be easier. Please post feedback if something is incomplete/crap/hard-to-use because we will probably agree with you that a FR needs to be added.
Post by Andrew RoughanThe AppleWin debugger memory help section does not mention LC or Aux memory
at all. This can potentially use some improvement for those who start
looking there (like I did).
If you search the help manual for "Language Card" or "LC" or "aux" you will find they are actually are mentioned, albeit not in a clear fashion, tucked away in a Soft-switches" section. Sorry that this information was difficult to find. Would adding a new "Quick overview of Apple Memory" section help?
In the help if you navigate to "Debugger > Debugger Screen Layout > Soft-Switches" you can find a short description about the OUT commands required where it says:
The next 6 rows describe the current MMU settings and can be interpreted as follows:
00: $C000 - 80Sto0/1 (inverse indicates state of 80STORE)
02: $C002-C005: Rm/xWm/x (NB. 'R' is blue and 'W' is red for readability)
Rm Read from main mem for $0200-$BFFF; Use OUT C002 to enable
Rx Read from aux mem for $0200-$BFFF; Use OUT C003 to enable
Wm Write to main mem for $0200-$BFFF; Use OUT C004 to enable
Wx Write to aux mem for $0200-$BFFF; Use OUT C005 to enable
0C: $C00C - Col40/80 (inverse indicates state of 80COL)
0E: $C00E - ASC/MOUS (inverse indicates state of ALTCHARSET)
80: $C080-C087: B2/M R/W (Language Card Bank2)
A red 'x' if ALTZP (and Alt Language Card) is set by a write to $C009.
88: $C088-C08F: B1/M rNN (Language Card Bank1 and RamWorks 64K bank number)
'B2' or 'B1' is inverse when that LC bank is enabled.
If 'M' is inverse: ROM is active for reading.
If 'M' is not inverse: LC2 or LC1 RAM is active.
If 'W' is inverse: RAM is write enabled.
If 'W' is not inverse: RAM is write protected.
'rNN' will appear if a RamWorks 64K bank is active.
'sNN' will appear if a Saturn 16K bank is active.
Post by Andrew RoughanOn another forum someone mentioned OUT 3. I’m not sure what this is meant
to do but I was able to see content of (some)
auxmem after using it.
As you probably know the 6502 CPU lacks dedicated IN/OUT assembly mnemonics -- all I/O is memory mapped (unlike the 8086 which has a dedicated IN and OUT mnemonics.)
Now normally one would do a read or write from assembly language but since you can't do that from the debugger there are two debugger commands provided instead:
* IN, and
* OUT.
The OUT ## command outputs a byte to the specified $C000 - $C0FF range. Which 256 byte address you need to use depends on what you are trying to do with memory -- which requires knowing the Apple 2 soft switches. When I wrote the manual I made the assumption that most people who use the debugger are usually already familiar with bank-switching (on the Apple 2) but looks that assumption is no longer valid.
To help remember which C0XX address one needs to use for memory I added the bank status to the bottom right of the disassembly window -- the orange numbers refer to the C0XX address and the remaining line shows the current soft switch state.
For example, you'll have to manually type OUT 80 (or OUT C080) to switch to LC Bank 2. To switch back to ROM type OUT 81 which will bank it back in.
Post by Andrew RoughanAt one point my code crashed at (aux)FF85 but I was not able to see any
content there within the debugger. The monitor rom content was always
displayed no matter what I tried.
(Yes I understand that it hit a BRK as auxmem up there was not initialised)
Yes, you are correct that OUT 3 (or OUT C003) is the soft-switch that will tell the Apple 2e+ to read from aux. memory instead of main memory.
You can check the memory bank status by inspecting these lines:
02:Rm/x Wm/x
80:B2/M R/W
If you don't see those lines in the debugger please run version 2.90.6 or later version of the debugger when I added them.
Post by Andrew RoughanI would have liked to be able to copy memory content results with mouse
selection from the debugger data display. It would have saved some
retyping. Please consider adding copy into the interface.
Unfortunately the DATA view is lacking many features, such as the ability to visually edit and mouse selection. Sorry.
In the mean-time use Ctrl-PrintScreen to copy the entire debugger window as text which you can then paste into another document / application.
Post by Andrew RoughanI’d be happy to create tickets if necessary.
Yes, please create new feature requests (Issues) on GitHub so the team can track them and work on them as needed since I am no longer the only one that works on the debugger. You can raise new features here:
https://github.com/AppleWin/AppleWin/issues/new
Thanks!
Sorry the debugger still has some rough edges. We are slowly working on them!
m.