New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: Support LC status and memory #406

Closed
tomcw opened this Issue Apr 26, 2017 · 31 comments

Comments

Projects
None yet
3 participants
@tomcw
Contributor

tomcw commented Apr 26, 2017

John Public in cea2 "AppleWin's Debugger is still crap ... how do we fix it?", (21st May 2016) said:

I'd still like to see an indicator to show whether you're in MAIN or AUX
memory. I was reading one of the apple 2 books and it says when the computer
starts up, you're in LCBANK2, so I'd like to see an indicator for that as well. (Yes, I'm still messing with Diversi-Dial). :)

--Deeply Shrouded & Quiet
--Central Control! D-Dial # 49

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Apr 26, 2017

Contributor

[ Michael: EDIT -- added non-proportional markup]

(Michael's reply to cea2)

  1. Yup, that's been a wishlist of mine too! There is just enough room to squeeze in a few more modes:

http://michael.peopleofhonoronly.com/dev/applewin/debugger/debugger_all_registers.png

Considering there a dozen soft switches for memory management which are the (2) most important ones that people want displayed? I'm thinking the abbreviations ...

02:RM/X
04:WM/X

... instead of the more common verbose RAMDRON, RAMDROFF. I see these are Appple's "official" names (from ProDOS sources):

ramin    equ $c08b 
ramin2   equ $c083 
romin    equ $c082 ;swap rom in, write protect ram 
romin1   equ $c081 ;swap rom in w/o w-prot ram 
slot3rom equ $c00b ;write location to switch in slot 3 rom 
read3rom equ $c017 ; bit 7 =1 if slot space 3 enabled 
int3rom  equ $c00a ;write location to switch in internal 3 

I have to admit I've never done any Aux. memory programming (yet) so feedback would be appreciated!

  1. I also need to show the Language Card read/write bank state. How should this be compactly shown?

The $C080 .. $0C08F area is a bit of a clusterfrack. :-/ The ancient "Language Card Crack" technique (C081 C081 D000<D000.FFFFM FA62:4C 59 FF C080) should be visible:

80:LC2/ROM R/W+
88:LC1/ROM R/W+
^ ^ ^
| | Language Card State: Read, Write Enable, Write Protect
| Read from ROM or Language Card
Address

Reference; more for my sake so I don't have to track these down again :-)

MEMORY MANAGEMENT SOFT SWITCHES 
$C000 W 80STOREOFF Allow page2 to switch video page1 page2 
$C001 W 80STOREON Allow page2 to switch main & aux video memory 
$C002 W RAMRDOFF Read enable main memory from $0200-$BFFF 
$C003 W RAMDRON Read enable aux memory from $0200-$BFFF 
$C004 W RAMWRTOFF Write enable main memory from $0200-$BFFF 
$C005 W RAMWRTON Write enable aux memory from $0200-$BFFF 
$C006 W INTCXROMOFF Enable slot ROM from $C100-$CFFF 
$C007 W INTCXROMON Enable main ROM from $C100-$CFFF 
$C008 W ALZTPOFF Enable main memory from $0000-$01FF & avl BSR 
$C009 W ALTZPON Enable aux memory from $0000-$01FF & avl BSR 
$C00A W SLOTC3ROMOFF Enable main ROM from $C300-$C3FF 
$C00B W SLOTC3ROMON Enable slot ROM from $C300-$C3FF 

http://mirrors.apple2.org.za/apple.cabi.net/Languages.Programming/MemoryMap.IIe.64K.128K.txt

For WR-enable LC RAM, the softswitch REQUIRES two successive reads

                        $C080                ;RD LC RAM bank2, WR-protect LC RAM 
ROMIN          =        $C081                ;RD ROM, WR-enable LC RAM 
                        $C082                ;RD ROM, WR-protect LC RAM 
LCBANK2        =        $C083                ;RD LC RAM bank2, WR-enable LC RAM 

                        $C084                ;RD LC RAM bank2, WR-protect LC RAM 
                        $C085                ;RD ROM, WR-enable LC RAM 
                        $C086                ;RD ROM, WR-protect LC RAM 
                        $C087                ;RD LC RAM bank2, WR-enable LC RAM 

                        $C088                ;RD LC RAM bank1, WR-protect LC RAM 
                        $C089                ;RD ROM, WR-enable LC RAM 
                        $C08A                ;RD ROM, WR-protect LC RAM 
LCBANK1        =        $C08B                ;RD LC RAM bank1, WR-enable LC RAM 

                        $C08C                ;RD LC RAM bank1, WR-protect LC RAM 
                        $C08D                ;RD ROM, WR-enable LC RAM 
                        $C08E                ;RD ROM, WR-protect LC RAM 
                        $C08F                ;RD LC RAM bank1, WR-enable LC RAM 
Contributor

tomcw commented Apr 26, 2017

[ Michael: EDIT -- added non-proportional markup]

(Michael's reply to cea2)

  1. Yup, that's been a wishlist of mine too! There is just enough room to squeeze in a few more modes:

http://michael.peopleofhonoronly.com/dev/applewin/debugger/debugger_all_registers.png

Considering there a dozen soft switches for memory management which are the (2) most important ones that people want displayed? I'm thinking the abbreviations ...

02:RM/X
04:WM/X

... instead of the more common verbose RAMDRON, RAMDROFF. I see these are Appple's "official" names (from ProDOS sources):

ramin    equ $c08b 
ramin2   equ $c083 
romin    equ $c082 ;swap rom in, write protect ram 
romin1   equ $c081 ;swap rom in w/o w-prot ram 
slot3rom equ $c00b ;write location to switch in slot 3 rom 
read3rom equ $c017 ; bit 7 =1 if slot space 3 enabled 
int3rom  equ $c00a ;write location to switch in internal 3 

I have to admit I've never done any Aux. memory programming (yet) so feedback would be appreciated!

  1. I also need to show the Language Card read/write bank state. How should this be compactly shown?

The $C080 .. $0C08F area is a bit of a clusterfrack. :-/ The ancient "Language Card Crack" technique (C081 C081 D000<D000.FFFFM FA62:4C 59 FF C080) should be visible:

80:LC2/ROM R/W+
88:LC1/ROM R/W+
^ ^ ^
| | Language Card State: Read, Write Enable, Write Protect
| Read from ROM or Language Card
Address

Reference; more for my sake so I don't have to track these down again :-)

MEMORY MANAGEMENT SOFT SWITCHES 
$C000 W 80STOREOFF Allow page2 to switch video page1 page2 
$C001 W 80STOREON Allow page2 to switch main & aux video memory 
$C002 W RAMRDOFF Read enable main memory from $0200-$BFFF 
$C003 W RAMDRON Read enable aux memory from $0200-$BFFF 
$C004 W RAMWRTOFF Write enable main memory from $0200-$BFFF 
$C005 W RAMWRTON Write enable aux memory from $0200-$BFFF 
$C006 W INTCXROMOFF Enable slot ROM from $C100-$CFFF 
$C007 W INTCXROMON Enable main ROM from $C100-$CFFF 
$C008 W ALZTPOFF Enable main memory from $0000-$01FF & avl BSR 
$C009 W ALTZPON Enable aux memory from $0000-$01FF & avl BSR 
$C00A W SLOTC3ROMOFF Enable main ROM from $C300-$C3FF 
$C00B W SLOTC3ROMON Enable slot ROM from $C300-$C3FF 

http://mirrors.apple2.org.za/apple.cabi.net/Languages.Programming/MemoryMap.IIe.64K.128K.txt

For WR-enable LC RAM, the softswitch REQUIRES two successive reads

                        $C080                ;RD LC RAM bank2, WR-protect LC RAM 
ROMIN          =        $C081                ;RD ROM, WR-enable LC RAM 
                        $C082                ;RD ROM, WR-protect LC RAM 
LCBANK2        =        $C083                ;RD LC RAM bank2, WR-enable LC RAM 

                        $C084                ;RD LC RAM bank2, WR-protect LC RAM 
                        $C085                ;RD ROM, WR-enable LC RAM 
                        $C086                ;RD ROM, WR-protect LC RAM 
                        $C087                ;RD LC RAM bank2, WR-enable LC RAM 

                        $C088                ;RD LC RAM bank1, WR-protect LC RAM 
                        $C089                ;RD ROM, WR-enable LC RAM 
                        $C08A                ;RD ROM, WR-protect LC RAM 
LCBANK1        =        $C08B                ;RD LC RAM bank1, WR-enable LC RAM 

                        $C08C                ;RD LC RAM bank1, WR-protect LC RAM 
                        $C08D                ;RD ROM, WR-enable LC RAM 
                        $C08E                ;RD ROM, WR-protect LC RAM 
                        $C08F                ;RD LC RAM bank1, WR-enable LC RAM 
@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Apr 26, 2017

Contributor

(Tom's reply to cea2)

On Saturday, May 28, 2016 at 5:57:04 PM UTC+1, Michael AppleWin Debugger Dev wrote:

  1. Yup, that's been a wishlist of mine too! There is just enough room to squeeze in a few more modes:

Random thought, but you could toggle (via keyboard or mouse click) the video mode part and instead show the MMU config. (That's 10 lines of 12 chars!)

You'd also need the current Aux 64K bank, eg. RAMworks cards can support up to 127 x 64K aux banks.

Contributor

tomcw commented Apr 26, 2017

(Tom's reply to cea2)

On Saturday, May 28, 2016 at 5:57:04 PM UTC+1, Michael AppleWin Debugger Dev wrote:

  1. Yup, that's been a wishlist of mine too! There is just enough room to squeeze in a few more modes:

Random thought, but you could toggle (via keyboard or mouse click) the video mode part and instead show the MMU config. (That's 10 lines of 12 chars!)

You'd also need the current Aux 64K bank, eg. RAMworks cards can support up to 127 x 64K aux banks.

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Apr 27, 2017

Contributor

OK, I finally decoded and exported these obtuse flags in Memory.cpp. Looks like no one ever used MF_HIGHRAM ... at least it was set. :-)

	// DETERMINE THE NEW MEMORY PAGING MODE.
	if ((address >= 0x80) && (address <= 0x8F))
	{
		SetMemMode(memmode & ~(MF_BANK2 | MF_HIGHRAM));

		if (!(address & 8))
			SetMemMode(memmode | MF_BANK2);

		if (((address & 2) >> 1) == (address & 1))
			SetMemMode(memmode | MF_HIGHRAM);

		if (address & 1)	// GH#392
		{
			if (!write && g_bLastWriteRam)
			{
				SetMemMode(memmode | MF_WRITERAM); // UTAIIe:5-23
			}
		}
		else
		{
			SetMemMode(memmode & ~(MF_WRITERAM)); // UTAIIe:5-23
		}
		g_bLastWriteRam = (address & 1) && (!write); // UTAIIe:5-23
	}
Name Function
MF_HIGHRAM Language Card $D000..$FFFF is active
MF_BANK2 Bank 2 of Language Card active
MF_WRITERAM Write-enable Language Card

This is now implemented with commit 18fd420 and 5cc4cbd.

Contributor

Michaelangel007 commented Apr 27, 2017

OK, I finally decoded and exported these obtuse flags in Memory.cpp. Looks like no one ever used MF_HIGHRAM ... at least it was set. :-)

	// DETERMINE THE NEW MEMORY PAGING MODE.
	if ((address >= 0x80) && (address <= 0x8F))
	{
		SetMemMode(memmode & ~(MF_BANK2 | MF_HIGHRAM));

		if (!(address & 8))
			SetMemMode(memmode | MF_BANK2);

		if (((address & 2) >> 1) == (address & 1))
			SetMemMode(memmode | MF_HIGHRAM);

		if (address & 1)	// GH#392
		{
			if (!write && g_bLastWriteRam)
			{
				SetMemMode(memmode | MF_WRITERAM); // UTAIIe:5-23
			}
		}
		else
		{
			SetMemMode(memmode & ~(MF_WRITERAM)); // UTAIIe:5-23
		}
		g_bLastWriteRam = (address & 1) && (!write); // UTAIIe:5-23
	}
Name Function
MF_HIGHRAM Language Card $D000..$FFFF is active
MF_BANK2 Bank 2 of Language Card active
MF_WRITERAM Write-enable Language Card

This is now implemented with commit 18fd420 and 5cc4cbd.

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Apr 27, 2017

Contributor

I guess there is probably no need to show the R/W status twice ... showing the RAMWorks (or in the future Saturrn 128K) bank in yellow should nicely fit in there.

  • RAMWorks: R01 .. R7F
  • Saturn: S01 .. S07

Anyways ...

  • $C081 Lang Card Off

1_lang_card_off

  • $C080

2_lang_card_c080

  • $C083
    3_lang_card_c083
Contributor

Michaelangel007 commented Apr 27, 2017

I guess there is probably no need to show the R/W status twice ... showing the RAMWorks (or in the future Saturrn 128K) bank in yellow should nicely fit in there.

  • RAMWorks: R01 .. R7F
  • Saturn: S01 .. S07

Anyways ...

  • $C081 Lang Card Off

1_lang_card_off

  • $C080

2_lang_card_c080

  • $C083
    3_lang_card_c083
@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Apr 27, 2017

Contributor

Tom

Is zero a valid value for RAMWorks g_uActiveBank ?
Is it possible to use RAMWorks on a //e ?

Contributor

Michaelangel007 commented Apr 27, 2017

Tom

Is zero a valid value for RAMWorks g_uActiveBank ?
Is it possible to use RAMWorks on a //e ?

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Apr 27, 2017

Contributor

Is zero a valid value for RAMWorks g_uActiveBank ?

Yes. It takes values [0..0x7E].

Contributor

tomcw commented Apr 27, 2017

Is zero a valid value for RAMWorks g_uActiveBank ?

Yes. It takes values [0..0x7E].

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Apr 27, 2017

Contributor

Is it possible to use RAMWorks on a //e ?

Yes.

Contributor

tomcw commented Apr 27, 2017

Is it possible to use RAMWorks on a //e ?

Yes.

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Apr 27, 2017

Contributor

Thanks for the info Tom.

The reason I was asking was that I was trying to determine if the RAMWORKS card had been "installed." I ended up adding a new Language Card memory type, g_eMemType for the various Language Cards -- since we need to support the Saturn as well.

It is being used by the debugger to show if a RAMWORKS or SATURN is active in [DrawSoftSwitches()](https://github.com/AppleWin/AppleWin/blob/master/source/Debugger/Debugger_Display.cpp#L2988-L2999}

Do you see any potential problems with this?

#ifdef RAMWORKS
		// We could show the RAMWORKS active bank only when main isn't active via
		//      if (g_uActiveBank > 0)
		// We want to always show that RAMWORKS card is installed even if on page 0 aka "r00"
		if (g_eMemType == MEM_TYPE_RAMWORKS)
			extraBank = g_uActiveBank;
#endif //RAMWORKS

#ifdef SATURN
		if (g_eMemType == MEM_TYPE_SATURN)
			extraBank = g_uSaturnActiveBank;
#endif // SATURN
Contributor

Michaelangel007 commented Apr 27, 2017

Thanks for the info Tom.

The reason I was asking was that I was trying to determine if the RAMWORKS card had been "installed." I ended up adding a new Language Card memory type, g_eMemType for the various Language Cards -- since we need to support the Saturn as well.

It is being used by the debugger to show if a RAMWORKS or SATURN is active in [DrawSoftSwitches()](https://github.com/AppleWin/AppleWin/blob/master/source/Debugger/Debugger_Display.cpp#L2988-L2999}

Do you see any potential problems with this?

#ifdef RAMWORKS
		// We could show the RAMWORKS active bank only when main isn't active via
		//      if (g_uActiveBank > 0)
		// We want to always show that RAMWORKS card is installed even if on page 0 aka "r00"
		if (g_eMemType == MEM_TYPE_RAMWORKS)
			extraBank = g_uActiveBank;
#endif //RAMWORKS

#ifdef SATURN
		if (g_eMemType == MEM_TYPE_SATURN)
			extraBank = g_uSaturnActiveBank;
#endif // SATURN
@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Apr 27, 2017

Contributor

Front-end UI is hooked up, just need the back-end support.

$C08F with command-line: -saturn 128

5_lang_card_saturn_bank_7

Contributor

Michaelangel007 commented Apr 27, 2017

Front-end UI is hooked up, just need the back-end support.

$C08F with command-line: -saturn 128

5_lang_card_saturn_bank_7

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Apr 28, 2017

Contributor

"Alrighty then" the debugger sucks a little less now with commit d243425. :-)

  • Read/Write for Main/Aux is now shown
  • I've cleaned up the order of the IO softswitches for memory
  • All memory status have a slightly darker background to distinguish it from the graphics switches.

4_aux_mem_status

Contributor

Michaelangel007 commented Apr 28, 2017

"Alrighty then" the debugger sucks a little less now with commit d243425. :-)

  • Read/Write for Main/Aux is now shown
  • I've cleaned up the order of the IO softswitches for memory
  • All memory status have a slightly darker background to distinguish it from the graphics switches.

4_aux_mem_status

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Apr 30, 2017

Contributor

Do you see any potential problems with this?

This looks OK to me.

But a word on _DrawSoftSwitchLanguageCardBank(), in Debugger_Display.cpp:
The argument extraBank has the value g_eMemType encoded in bits 8 and higher. But if the enum were to change (such that the Ramworks or Saturn type has value 0) then this code would break:

	if (extraBank > 0 )
	{
		// ...

Why not pass g_eMemType as an argument? Or just use it directly (since you made it global).

Contributor

tomcw commented Apr 30, 2017

Do you see any potential problems with this?

This looks OK to me.

But a word on _DrawSoftSwitchLanguageCardBank(), in Debugger_Display.cpp:
The argument extraBank has the value g_eMemType encoded in bits 8 and higher. But if the enum were to change (such that the Ramworks or Saturn type has value 0) then this code would break:

	if (extraBank > 0 )
	{
		// ...

Why not pass g_eMemType as an argument? Or just use it directly (since you made it global).

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 1, 2017

Contributor

Thanks for the feedback Tom:

  • I'll get that fixed later this week.

You are absolutely right -- that was more verbose then needed.

Contributor

Michaelangel007 commented May 1, 2017

Thanks for the feedback Tom:

  • I'll get that fixed later this week.

You are absolutely right -- that was more verbose then needed.

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 1, 2017

Contributor

Should "L1" and "L2" labels be switched to "B1" and "B2" for Bank?

I abbreviated LC1/LC2 as "L1" and "L2" but that may not be obvious they are banks?

Contributor

Michaelangel007 commented May 1, 2017

Should "L1" and "L2" labels be switched to "B1" and "B2" for Bank?

I abbreviated LC1/LC2 as "L1" and "L2" but that may not be obvious they are banks?

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 10, 2017

Contributor

This still needs more work.

The problem is that both L1 (or L2) and M are highlighted at the same time. This gives a contradictory view of which memory is actually active -- the LC has priority.

There are three display states. Using [] as notation for the highlighted banked area:

80: 88: Notes
[L2]/M L1/[M] Bank 2 Active
L2/[M] [L1]/M Bank 1 Active
L2/[M] L1/[M] Main memory active

Instead, this should be displayed as:

80: 88: Notes
[L2]/M L1/M Bank 2 Active
L2/M [L1]/M Bank 1 Active
L2/[M] L1/[M] Main memory active

Using a pivot table:

-- State 1 State 2 State 3 iDisplay
80: [L2]/M L2/M L1/[M] 2
88: L1/M [L1]/M L2/[M] 1
iActive 2 1 0 ---

Line #2823 of Debugger_Display needs to have additional conditional logic:

	_DrawSoftSwitch( rect, nAddress, bBankOn, NULL, sOn, "M", " ", bg_default );
Contributor

Michaelangel007 commented May 10, 2017

This still needs more work.

The problem is that both L1 (or L2) and M are highlighted at the same time. This gives a contradictory view of which memory is actually active -- the LC has priority.

There are three display states. Using [] as notation for the highlighted banked area:

80: 88: Notes
[L2]/M L1/[M] Bank 2 Active
L2/[M] [L1]/M Bank 1 Active
L2/[M] L1/[M] Main memory active

Instead, this should be displayed as:

80: 88: Notes
[L2]/M L1/M Bank 2 Active
L2/M [L1]/M Bank 1 Active
L2/[M] L1/[M] Main memory active

Using a pivot table:

-- State 1 State 2 State 3 iDisplay
80: [L2]/M L2/M L1/[M] 2
88: L1/M [L1]/M L2/[M] 1
iActive 2 1 0 ---

Line #2823 of Debugger_Display needs to have additional conditional logic:

	_DrawSoftSwitch( rect, nAddress, bBankOn, NULL, sOn, "M", " ", bg_default );
@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 10, 2017

Contributor
  • Only last activated bank shows inverse M if main memory is active
  • Inactive bank now grayed out
  • Banks shown as B1 or B2

image

Contributor

Michaelangel007 commented May 10, 2017

  • Only last activated bank shows inverse M if main memory is active
  • Inactive bank now grayed out
  • Banks shown as B1 or B2

image

@Michaelangel007 Michaelangel007 added this to the 1.27 milestone May 10, 2017

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw May 11, 2017

Contributor

Hi Michael,

I'm not quite following the notation. Here's what I (partially) understand - but please correct me!
Like you, I will use [] to indicate what it highlighted.

[B2] = LC 4K RAM Bank2 is enabled at $D000-DFFF.
[B1] = LC 4K RAM Bank1 is enabled at $D000-DFFF.
B2 && B1 = 12K ROM is enabled at $D000-FFFF.

[M] = ?
M = ?

[R] = LC 12K RAM at $D000-FFFF
R = LC 12K ROM at $D000-FFFF

[W] = LC 12K RAM at $D000-FFFF is write enabled
W = LC 12K RAM at $D000-FFFF is write protected

Contributor

tomcw commented May 11, 2017

Hi Michael,

I'm not quite following the notation. Here's what I (partially) understand - but please correct me!
Like you, I will use [] to indicate what it highlighted.

[B2] = LC 4K RAM Bank2 is enabled at $D000-DFFF.
[B1] = LC 4K RAM Bank1 is enabled at $D000-DFFF.
B2 && B1 = 12K ROM is enabled at $D000-FFFF.

[M] = ?
M = ?

[R] = LC 12K RAM at $D000-FFFF
R = LC 12K ROM at $D000-FFFF

[W] = LC 12K RAM at $D000-FFFF is write enabled
W = LC 12K RAM at $D000-FFFF is write protected

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 13, 2017

Contributor

Tom, sure, here is the "Cheat Sheet"

Legend

[B2] LC 4K RAM Bank 2 along rest of LC: $D000-$FFFF (RAM)
[B2] LC 4K RAM Bank 1 along rest of LC: $D000-$FFFF (RAM)
[M]  Main Memory ROM active, LC is banked out. $D000-$FFFF (ROM)
 M   Main Memory ROM not active, LC is banked in. $D000-$FFFF (RAM)

I did not want to use R for ROM because of R/W (Read/Write).

Is there another 1 character abbreviation for main memory that is clearer?

Ideally, there should be:

  • a tool-tip that explains the abbreviations when you hover over the memory area
  • output in the debugger window when you click on B1/M.
Contributor

Michaelangel007 commented May 13, 2017

Tom, sure, here is the "Cheat Sheet"

Legend

[B2] LC 4K RAM Bank 2 along rest of LC: $D000-$FFFF (RAM)
[B2] LC 4K RAM Bank 1 along rest of LC: $D000-$FFFF (RAM)
[M]  Main Memory ROM active, LC is banked out. $D000-$FFFF (ROM)
 M   Main Memory ROM not active, LC is banked in. $D000-$FFFF (RAM)

I did not want to use R for ROM because of R/W (Read/Write).

Is there another 1 character abbreviation for main memory that is clearer?

Ideally, there should be:

  • a tool-tip that explains the abbreviations when you hover over the memory area
  • output in the debugger window when you click on B1/M.
@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw May 13, 2017

Contributor

Is there another 1 character abbreviation for main memory that is clearer?

The problem with calling it "memory" is that both RAM and ROM is memory.
What about: I for Internal ROM?

It's tricky with just one character!

Contributor

tomcw commented May 13, 2017

Is there another 1 character abbreviation for main memory that is clearer?

The problem with calling it "memory" is that both RAM and ROM is memory.
What about: I for Internal ROM?

It's tricky with just one character!

@sicklittlemonkey

This comment has been minimized.

Show comment
Hide comment
@sicklittlemonkey

sicklittlemonkey May 14, 2017

Contributor
Contributor

sicklittlemonkey commented May 14, 2017

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 15, 2017

Contributor

Great point about "memory" being too generic Tom!

Normally the LC is ROM but can become RAM. This is taken care of the R/W display.

However, what we are really trying to show is the usage of the: 16K / 48K memory split -- specifically how is the 16K allocated?

Not counting the 2 character address, we have a total of 8 chars on the bottom line.

My first choice takes up 11 characters :-/

80:LC2/LC1/ROM
   12345678901

Note: Ignore the bottom number line -- that is just to show the visual alignment.

Unfortunately my second choice takes up 9 characters:

80:B2/B1/ROM
   12345678    

One option might be to get rid of the forward slashes / but that is inconsistent with the rest of the switch display -- everything runs together. We can mitigate that by using lowercase but that looks goofy/dumb:

80:b2b1rom
   12345678

Instead we can get rid of the Bank and abbreviate it like this:

80:2/1/ROM
   12345678

This a total of 7 characters -- which just fits. 👍 The trade-off is that we lose the visual mapping of c088 for bank 1 -- but considering the only people (probably ) looking at the debugger already know the Apple's IO soft-switches -- I'm OK with this trade-off.

I'll have to move the R/W down to the next line -- it may look a little funny without the address but here is a screenshot of that so we can compare/contrast.

image

Thoughts?

Contributor

Michaelangel007 commented May 15, 2017

Great point about "memory" being too generic Tom!

Normally the LC is ROM but can become RAM. This is taken care of the R/W display.

However, what we are really trying to show is the usage of the: 16K / 48K memory split -- specifically how is the 16K allocated?

Not counting the 2 character address, we have a total of 8 chars on the bottom line.

My first choice takes up 11 characters :-/

80:LC2/LC1/ROM
   12345678901

Note: Ignore the bottom number line -- that is just to show the visual alignment.

Unfortunately my second choice takes up 9 characters:

80:B2/B1/ROM
   12345678    

One option might be to get rid of the forward slashes / but that is inconsistent with the rest of the switch display -- everything runs together. We can mitigate that by using lowercase but that looks goofy/dumb:

80:b2b1rom
   12345678

Instead we can get rid of the Bank and abbreviate it like this:

80:2/1/ROM
   12345678

This a total of 7 characters -- which just fits. 👍 The trade-off is that we lose the visual mapping of c088 for bank 1 -- but considering the only people (probably ) looking at the debugger already know the Apple's IO soft-switches -- I'm OK with this trade-off.

I'll have to move the R/W down to the next line -- it may look a little funny without the address but here is a screenshot of that so we can compare/contrast.

image

Thoughts?

Michaelangel007 added a commit that referenced this issue May 15, 2017

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 15, 2017

Contributor

Add new branch: langcard_status

Contributor

Michaelangel007 commented May 15, 2017

Add new branch: langcard_status

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 15, 2017

Contributor

Since we now have extra space on the bottom ... we could better utilize the 3 character address : space a little better by showing which (3rd party) "memory page" is active.

If the RamWorks card is enabled -r 128:

00:RWrk R/W
   12345678

Note: Ignore the bottom number line -- that is just to show the visual alignment and column edges.

The label RWrk -- would be shown in light blue -- is an abbreviation for RamWorks

If the Saturn memory card is enabled -saturn 128:

00:Sat  R/W
   12345678

The label Sat -- would also be shown in light blue -- is an abbreviation for Saturn.

The Ramworks/Saturn page number would be shown in red instead of orange, since it isn't a memory IO location.

Contributor

Michaelangel007 commented May 15, 2017

Since we now have extra space on the bottom ... we could better utilize the 3 character address : space a little better by showing which (3rd party) "memory page" is active.

If the RamWorks card is enabled -r 128:

00:RWrk R/W
   12345678

Note: Ignore the bottom number line -- that is just to show the visual alignment and column edges.

The label RWrk -- would be shown in light blue -- is an abbreviation for RamWorks

If the Saturn memory card is enabled -saturn 128:

00:Sat  R/W
   12345678

The label Sat -- would also be shown in light blue -- is an abbreviation for Saturn.

The Ramworks/Saturn page number would be shown in red instead of orange, since it isn't a memory IO location.

Michaelangel007 added a commit that referenced this issue May 16, 2017

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 16, 2017

Contributor

Visual montage / comparison of latest lang. card status.

  • Ramworks/Saturn page number is shown in yellow. If the langauage card is writeable then the page number is shown in red.

lang_card_status_new

Contributor

Michaelangel007 commented May 16, 2017

Visual montage / comparison of latest lang. card status.

  • Ramworks/Saturn page number is shown in yellow. If the langauage card is writeable then the page number is shown in red.

lang_card_status_new

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 16, 2017

Contributor

@sicklittlemonkey The I is not a bad idea. That would allow 80:2/1/IR/W to fit on a single line -- albeit without any spacing before R/W. I'm going to go with ROM for now since we have the extra line.

Contributor

Michaelangel007 commented May 16, 2017

@sicklittlemonkey The I is not a bad idea. That would allow 80:2/1/IR/W to fit on a single line -- albeit without any spacing before R/W. I'm going to go with ROM for now since we have the extra line.

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 May 16, 2017

Contributor

Full context using Ramworks as an example:

9a_lang_card_mem_ramworks_read
9b_lang_card_mem_ramworks_write

Contributor

Michaelangel007 commented May 16, 2017

Full context using Ramworks as an example:

9a_lang_card_mem_ramworks_read
9b_lang_card_mem_ramworks_write

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw May 21, 2017

Contributor

Hi Michael,

This looks fine for the last 2 lines:

80:2/1/ROM
00RWrk R/W

Can you provide a cheat-sheet for the 02:Rm/xWm/x line too?

Does it cover the state of these 4 soft switches:

$C002 W RAMRDOFF Read enable main memory from $0200-$BFFF 
$C003 W RAMDRON Read enable aux memory from $0200-$BFFF 
$C004 W RAMWRTOFF Write enable main memory from $0200-$BFFF 
$C005 W RAMWRTON Write enable aux memory from $0200-$BFFF 

?

Contributor

tomcw commented May 21, 2017

Hi Michael,

This looks fine for the last 2 lines:

80:2/1/ROM
00RWrk R/W

Can you provide a cheat-sheet for the 02:Rm/xWm/x line too?

Does it cover the state of these 4 soft switches:

$C002 W RAMRDOFF Read enable main memory from $0200-$BFFF 
$C003 W RAMDRON Read enable aux memory from $0200-$BFFF 
$C004 W RAMWRTOFF Write enable main memory from $0200-$BFFF 
$C005 W RAMWRTON Write enable aux memory from $0200-$BFFF 

?

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Jul 18, 2017

Contributor

Sorry Tom for the delay. Now that Diablo 3 Season 10 on the PS4 is over and dealing with my father passing is (mostly) over, I can get back to Language Card work.

Can you provide a cheat-sheet for the 02:Rm/xWm/x line too?

You just did. ;-) But I'll provide another variation:

   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

I've updated docs/debugger_changelog.txt with the above with commits c863741 and 795aff2.

$C002 W RAMRDOFF Read enable main memory from $0200-$BFFF
$C003 W RAMDRON Read enable aux memory from $0200-$BFFF
$C004 W RAMWRTOFF Write enable main memory from $0200-$BFFF
$C005 W RAMWRTON Write enable aux memory from $0200-$BFFF

Correct, it displays those locations:

_DrawSoftSwitchMainAuxBanks()

	int  nAddress  = 0xC002;
	bool bMainRead = (memmode & MF_AUXREAD)  ? true : false;
	bool bAuxWrite = (memmode & MF_AUXWRITE) ? true : false;
Contributor

Michaelangel007 commented Jul 18, 2017

Sorry Tom for the delay. Now that Diablo 3 Season 10 on the PS4 is over and dealing with my father passing is (mostly) over, I can get back to Language Card work.

Can you provide a cheat-sheet for the 02:Rm/xWm/x line too?

You just did. ;-) But I'll provide another variation:

   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

I've updated docs/debugger_changelog.txt with the above with commits c863741 and 795aff2.

$C002 W RAMRDOFF Read enable main memory from $0200-$BFFF
$C003 W RAMDRON Read enable aux memory from $0200-$BFFF
$C004 W RAMWRTOFF Write enable main memory from $0200-$BFFF
$C005 W RAMWRTON Write enable aux memory from $0200-$BFFF

Correct, it displays those locations:

_DrawSoftSwitchMainAuxBanks()

	int  nAddress  = 0xC002;
	bool bMainRead = (memmode & MF_AUXREAD)  ? true : false;
	bool bAuxWrite = (memmode & MF_AUXWRITE) ? true : false;

@tomcw tomcw self-assigned this Jul 20, 2017

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Jul 20, 2017

Contributor

Michael - sorry to hear about your father.

I can't remember where we got to on this thread. From a quick scan, I think we may nearly be done? There's just the html doc to update. (Assigned to self)

Contributor

tomcw commented Jul 20, 2017

Michael - sorry to hear about your father.

I can't remember where we got to on this thread. From a quick scan, I think we may nearly be done? There's just the html doc to update. (Assigned to self)

@Michaelangel007

This comment has been minimized.

Show comment
Hide comment
@Michaelangel007

Michaelangel007 Jul 27, 2017

Contributor

Thanks Nick. Funeral is this Monday, July 31, so it is almost over.

I don't believe there is any more work to be done. Tom did mention that you should be able to (mouse) click on them to change status -- I've raised a new enhancement #447

I need to do some more testing. i.e. checkout master, cherrypick this branch. before I feel happy with this patch.

Thanks for taking care of the docs Nick.

Contributor

Michaelangel007 commented Jul 27, 2017

Thanks Nick. Funeral is this Monday, July 31, so it is almost over.

I don't believe there is any more work to be done. Tom did mention that you should be able to (mouse) click on them to change status -- I've raised a new enhancement #447

I need to do some more testing. i.e. checkout master, cherrypick this branch. before I feel happy with this patch.

Thanks for taking care of the docs Nick.

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Dec 19, 2017

Contributor

Tom did mention that you should be able to (mouse) click on them to change status -- I've raised a new enhancement #447

Actually I said:

Random thought, but you could toggle (via keyboard or mouse click) the video mode part and instead show the MMU config. (That's 10 lines of 12 chars!)

So not toggle the soft-switches, but toggle what is being displayed: video or MMU state (to give you more screen real-estate to play with).

Contributor

tomcw commented Dec 19, 2017

Tom did mention that you should be able to (mouse) click on them to change status -- I've raised a new enhancement #447

Actually I said:

Random thought, but you could toggle (via keyboard or mouse click) the video mode part and instead show the MMU config. (That's 10 lines of 12 chars!)

So not toggle the soft-switches, but toggle what is being displayed: video or MMU state (to give you more screen real-estate to play with).

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Dec 19, 2017

Contributor

Outstanding:

  • html help doc to update
Contributor

tomcw commented Dec 19, 2017

Outstanding:

  • html help doc to update

@tomcw tomcw closed this in 355f5d0 Dec 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment