Skip to content

Commit

Permalink
Debugger: 2.9.1.12 Added: New commands HGR0, HGR3, HGR4, HGR5 to see …
Browse files Browse the repository at this point in the history
…pages /usr/bin/bash0, 0, 0, respectively.
  • Loading branch information
Michaelangel007 committed Jan 5, 2022
1 parent 1613671 commit 2a5e156
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/Debugger_Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
2.9.1.12 Added: New commands HGR0, HGR3, HGR4, HGR5 to see pseudo pages $00, $60, $80, $A0 respectively.
2.9.1.11 Fixed: Right justify signed decimal values.
Example:
U 300
Expand Down
32 changes: 28 additions & 4 deletions source/Debugger/Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define ALLOW_INPUT_LOWERCASE 1

// See /docs/Debugger_Changelog.txt for full details
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,11);
const int DEBUGGER_VERSION = MAKE_VERSION(2,9,1,12);


// Public _________________________________________________________________________________________
Expand Down Expand Up @@ -6470,8 +6470,12 @@ Update_t CmdCyclesReset(int /*nArgs*/)
enum ViewVideoPage_t
{
VIEW_PAGE_X, // current page
VIEW_PAGE_0, // Pseudo
VIEW_PAGE_1,
VIEW_PAGE_2
VIEW_PAGE_2,
VIEW_PAGE_3, // Pseudo
VIEW_PAGE_4, // Pseudo
VIEW_PAGE_5 // Pseudo
};

Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
Expand All @@ -6482,8 +6486,12 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
bVideoModeFlags |= !GetVideo().VideoGetSWPAGE2() ? 0 : VF_PAGE2;
bVideoModeFlags |= !GetVideo().VideoGetSWMIXED() ? 0 : VF_MIXED;
break; // Page Current & current MIXED state
case VIEW_PAGE_1: bVideoModeFlags |= 0; break; // Page 1
case VIEW_PAGE_2: bVideoModeFlags |= VF_PAGE2; break; // Page 2
case VIEW_PAGE_0: bVideoModeFlags |= VF_PAGE0; break; // Pseudo Page 0 ($0000)
case VIEW_PAGE_1: bVideoModeFlags |= 0 ; break; // Hardware Page 1 ($2000), NOTE: VF_HIRES will be passed in
case VIEW_PAGE_2: bVideoModeFlags |= VF_PAGE2; break; // Hardware Page 2 ($4000)
case VIEW_PAGE_3: bVideoModeFlags |= VF_PAGE3; break; // Pseudo Page 3 ($6000)
case VIEW_PAGE_4: bVideoModeFlags |= VF_PAGE4; break; // Pseudo Page 4 ($8000)
case VIEW_PAGE_5: bVideoModeFlags |= VF_PAGE5; break; // Pseudo Page 5 ($A000)
default:
_ASSERT(0);
break;
Expand Down Expand Up @@ -6551,6 +6559,10 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
{
return _ViewOutput( VIEW_PAGE_X, VF_HIRES );
}
Update_t CmdViewOutput_HGR0 (int nArgs)
{
return _ViewOutput( VIEW_PAGE_0, VF_HIRES ); // Pseudo page ($0000)
}
Update_t CmdViewOutput_HGR1 (int nArgs)
{
return _ViewOutput( VIEW_PAGE_1, VF_HIRES );
Expand All @@ -6559,6 +6571,18 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
{
return _ViewOutput( VIEW_PAGE_2, VF_HIRES );
}
Update_t CmdViewOutput_HGR3 (int nArgs)
{
return _ViewOutput( VIEW_PAGE_3, VF_HIRES ); // Pseudo page ($6000)
}
Update_t CmdViewOutput_HGR4 (int nArgs)
{
return _ViewOutput( VIEW_PAGE_4, VF_HIRES ); // Pseudo page ($8000)
}
Update_t CmdViewOutput_HGR5 (int nArgs)
{
return _ViewOutput( VIEW_PAGE_5, VF_HIRES ); // Pseudo page ($A000)
}
// Double Hi-Res
Update_t CmdViewOutput_DHGRX (int nArgs)
{
Expand Down
8 changes: 6 additions & 2 deletions source/Debugger/Debugger_Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{TEXT("DGR1") , CmdViewOutput_DGR1 , CMD_VIEW_DGR1 , "View Double lo-res Page 1" },
{TEXT("DGR2") , CmdViewOutput_DGR2 , CMD_VIEW_DGR2 , "View Double lo-res Page 2" },
{TEXT("HGR") , CmdViewOutput_HGRX , CMD_VIEW_HGRX , "View Hi-res (current page)" },
{TEXT("HGR1") , CmdViewOutput_HGR1 , CMD_VIEW_HGR1 , "View Hi-res Page 1" },
{TEXT("HGR2") , CmdViewOutput_HGR2 , CMD_VIEW_HGR2 , "View Hi-res Page 2" },
{TEXT("HGR0") , CmdViewOutput_HGR0 , CMD_VIEW_HGR0 , "View pseudo Hi-res Page 0 ($0000)" },
{TEXT("HGR1") , CmdViewOutput_HGR1 , CMD_VIEW_HGR1 , "View Hi-res Page 1 ($2000)" },
{TEXT("HGR2") , CmdViewOutput_HGR2 , CMD_VIEW_HGR2 , "View Hi-res Page 2 ($4000)" },
{TEXT("HGR3") , CmdViewOutput_HGR3 , CMD_VIEW_HGR3 , "View pseudo Hi-res Page 3 ($6000)" },
{TEXT("HGR4") , CmdViewOutput_HGR4 , CMD_VIEW_HGR4 , "View pseudo Hi-res Page 4 ($8000)" },
{TEXT("HGR5") , CmdViewOutput_HGR5 , CMD_VIEW_HGR5 , "View pseudo Hi-res Page 5 ($A000)" },
{TEXT("DHGR") , CmdViewOutput_DHGRX , CMD_VIEW_DHGRX , "View Double Hi-res (current page)" },
{TEXT("DHGR1") , CmdViewOutput_DHGR1 , CMD_VIEW_DHGR1 , "View Double Hi-res Page 1" },
{TEXT("DHGR2") , CmdViewOutput_DHGR2 , CMD_VIEW_DHGR2 , "View Double Hi-res Page 2" },
Expand Down
8 changes: 8 additions & 0 deletions source/Debugger/Debugger_Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,12 @@
, CMD_VIEW_DGR1
, CMD_VIEW_DGR2
, CMD_VIEW_HGRX
, CMD_VIEW_HGR0
, CMD_VIEW_HGR1
, CMD_VIEW_HGR2
, CMD_VIEW_HGR3
, CMD_VIEW_HGR4
, CMD_VIEW_HGR5
, CMD_VIEW_DHGRX
, CMD_VIEW_DHGR1
, CMD_VIEW_DHGR2
Expand Down Expand Up @@ -766,8 +770,12 @@
Update_t CmdViewOutput_DGR2 (int nArgs);

Update_t CmdViewOutput_HGRX (int nArgs);
Update_t CmdViewOutput_HGR0 (int nArgs);
Update_t CmdViewOutput_HGR1 (int nArgs);
Update_t CmdViewOutput_HGR2 (int nArgs);
Update_t CmdViewOutput_HGR3 (int nArgs);
Update_t CmdViewOutput_HGR4 (int nArgs);
Update_t CmdViewOutput_HGR5 (int nArgs);
Update_t CmdViewOutput_DHGRX (int nArgs);
Update_t CmdViewOutput_DHGR1 (int nArgs);
Update_t CmdViewOutput_DHGR2 (int nArgs);
Expand Down
20 changes: 20 additions & 0 deletions source/NTSC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,26 @@ void NTSC_SetVideoMode( uint32_t uVideoModeFlags, bool bDelay/*=false*/ )
}
}

if( uVideoModeFlags & VF_PAGE0) // Pseudo page ($0000)
{
g_nHiresPage = 0;
}

if( uVideoModeFlags & VF_PAGE3) // Pseudo page ($6000)
{
g_nHiresPage = 3;
}

if( uVideoModeFlags & VF_PAGE4) // Pseudo page ($8000)
{
g_nHiresPage = 4;
}

if( uVideoModeFlags & VF_PAGE5) // Pseudo page ($A000)
{
g_nHiresPage = 5;
}

if (GetVideo().GetVideoRefreshRate() == VR_50HZ && g_pVideoAddress) // GH#763 / NB. g_pVideoAddress==NULL when called via VideoResetState()
{
if (uVideoModeFlags & VF_TEXT)
Expand Down
8 changes: 6 additions & 2 deletions source/Video.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ enum VideoFlag_e
VF_HIRES = 0x00000004,
VF_80STORE= 0x00000008,
VF_MIXED = 0x00000010,
VF_PAGE2 = 0x00000020,
VF_PAGE2 = 0x00000020, // Text or Hires
VF_TEXT = 0x00000040,
VF_SHR = 0x00000080 // For VidHD's support for IIgs SHR video modes
VF_SHR = 0x00000080, // For VidHD's support for IIgs SHR video modes
VF_PAGE0 = 0x00000100, // Pseudo Page $00 (Poorman's heatmap)
VF_PAGE3 = 0x00000200, // Pseudo Page $60 (Poorman's heatmap)
VF_PAGE4 = 0x00000400, // Pseudo Page $80 (Poorman's heatmap)
VF_PAGE5 = 0x00000800, // Pseudo Page $A0 (Poorman's heatmap)
};

enum AppleFont_e
Expand Down

0 comments on commit 2a5e156

Please sign in to comment.