├── .gitignore ├── 6502.cpp ├── 6502.h ├── 6502.rc ├── 6502.reg ├── 6502.sln ├── 6502.vcxproj ├── 6502Doc.cpp ├── 6502Doc.h ├── 6502View.cpp ├── 6502View.h ├── About.cpp ├── About.h ├── AllocMem.cpp ├── Asm.cpp ├── Asm.h ├── AtariBin.cpp ├── AtariBin.h ├── Broadcast.cpp ├── Broadcast.h ├── CXMultiDocTemplate.cpp ├── CXMultiDocTemplate.h ├── ChildFrm.cpp ├── ChildFrm.h ├── ChildFrmDeAsm.cpp ├── ChildFrmDeAsm.h ├── ColorButton.cpp ├── ColorButton.h ├── ConfigSettings.cpp ├── ConfigSettings.h ├── CrystalEdit ├── CCrystalEditView.cpp ├── CCrystalEditView.h ├── CCrystalEditView.inl ├── CCrystalTextBuffer.cpp ├── CCrystalTextBuffer.h ├── CCrystalTextBuffer.inl ├── CCrystalTextView.cpp ├── CCrystalTextView.h ├── CCrystalTextView.inl ├── CEditReplaceDlg.cpp ├── CEditReplaceDlg.h ├── CFindTextDlg.cpp ├── CFindTextDlg.h ├── Parse6502.cpp ├── cedefs.h ├── editcmd.h └── editreg.h ├── Deasm.cpp ├── Deasm.h ├── Deasm6502Doc.cpp ├── Deasm6502Doc.h ├── Deasm6502View.cpp ├── Deasm6502View.h ├── DeasmGoto.cpp ├── DeasmGoto.h ├── DeasmSaveOptions.cpp ├── DeasmSaveOptions.h ├── DebugInfo.cpp ├── DebugInfo.h ├── DialAsmStat.cpp ├── DialAsmStat.h ├── DialBar.cpp ├── DockBarEx.cpp ├── DockBarEx.h ├── DrawMarks.cpp ├── DrawMarks.h ├── DynamicHelp.cpp ├── DynamicHelp.h ├── EditBrkpDial.cpp ├── EditBrkpDial.h ├── EditDisplay.cpp ├── EditDisplay.h ├── FlatBar.cpp ├── FlatBar.h ├── FormatNums.cpp ├── FormatNums.h ├── Global.cpp ├── Global.h ├── HyperLink.cpp ├── HyperLink.h ├── IOWindow.cpp ├── IOWindow.h ├── Ident.h ├── IdentInfoDoc.cpp ├── IdentInfoDoc.h ├── IdentInfoFrame.cpp ├── IdentInfoFrame.h ├── IdentInfoView.cpp ├── IdentInfoView.h ├── InputWnd.cpp ├── IntGenerator.cpp ├── IntGenerator.h ├── IntRequestGeneratorDlg.cpp ├── IntRequestGeneratorDlg.h ├── IntelHex.cpp ├── IntelHex.h ├── LICENSE ├── LeftBar.cpp ├── LeftBar.h ├── LoadCode.cpp ├── LoadCode.h ├── LoadCodeOptions.cpp ├── LoadCodeOptions.h ├── LogBuffer.cpp ├── LogBuffer.h ├── LogWindow.cpp ├── LogWindow.h ├── M6502.cpp ├── M6502.h ├── M6502x.cpp ├── MainFrm.cpp ├── MainFrm.h ├── MakeHelp.bat ├── MapFile.cpp ├── MapFile.h ├── MarkArea.cpp ├── MarkArea.h ├── MemoryChg.cpp ├── MemoryChg.h ├── MemoryDC.cpp ├── MemoryDC.h ├── MemoryDoc.cpp ├── MemoryDoc.h ├── MemoryGoto.cpp ├── MemoryGoto.h ├── MemoryInfo.cpp ├── MemoryInfo.h ├── MemoryView.cpp ├── MemoryView.h ├── Messages.h ├── MotorolaSRecord.cpp ├── MotorolaSRecord.h ├── Options.cpp ├── Options.h ├── OptionsViewPage.cpp ├── OptionsViewPage.h ├── OutputMem.h ├── README.md ├── RegisterBar.cpp ├── RegisterBar.h ├── ResDll └── ResDll.vcxproj ├── SaveCode.cpp ├── SaveCode.h ├── SaveCodeBlockOptions.cpp ├── SaveCodeBlockOptions.h ├── SaveCodeOptions.cpp ├── SaveCodeOptions.h ├── Splash.cpp ├── Splash.h ├── StackTemplate.h ├── StackView.cpp ├── StackView.h ├── StaticLink.cpp ├── StaticLink.h ├── StdAfx.cpp ├── StdAfx.h ├── Sym6502.cpp ├── Sym6502.h ├── SyntaxExample.cpp ├── SyntaxExample.h ├── Test └── All legal mnemonics.65s ├── ToolBox.cpp ├── ToolBox.h ├── ZeroPageView.cpp ├── ZeroPageView.h ├── dialbar.h ├── dialeditbrkp.cpp ├── dialeditbrkp.h ├── hlp ├── 6502 Macroassemby.rtf ├── 6502.GID ├── 6502.HLP ├── 6502.cnt ├── 6502.hm ├── 6502.hpj ├── 6502.ph ├── AfxCore.rtf ├── AfxPrint.rtf ├── AppExit.bmp ├── BNF.doc ├── BNF.txt ├── Bullet.bmp ├── CurArw2.bmp ├── CurArw4.bmp ├── CurHelp.bmp ├── Dyrektywy asemblera 6502.rtf ├── EditCopy.bmp ├── EditCut.bmp ├── EditPast.bmp ├── EditUndo.bmp ├── FileNew.bmp ├── FileOpen.bmp ├── FilePrnt.bmp ├── FileSave.bmp ├── Funkcje i stale asemblera 6502.rtf ├── HlpSBar.bmp ├── HlpTBar.bmp ├── Kevin Wilson - Docs1.zip ├── Kopia Dyrektywy asemblera 6502.rtf ├── MAKEHM.EXE ├── Opis asemblera.rtf ├── Opis symulatora.rtf ├── Options Appearance.gif ├── Options Assembler.gif ├── Options Disassembler.gif ├── Options Editor.gif ├── Options General.gif ├── Options Simulator.gif ├── Pomoc do programu.rtf ├── RecFirst.bmp ├── RecLast.bmp ├── RecNext.bmp ├── RecPrev.bmp ├── Rejestry.BMP ├── Rozkazy procesora 6502.rtf ├── ScMenu.bmp ├── Scmax.bmp ├── Scmin.bmp ├── xOptions Assembler.gif └── xOptions Simulator.gif ├── identinfo.cpp ├── identinfo.h ├── mg_cur.cur ├── res ├── 6502.ico ├── 6502.rc2 ├── 6502Doc.ico ├── 6502_source.ico ├── AfxprintPl.rc ├── AfxresPl.rc ├── Directives.txt ├── Rejestry.gif ├── Toolbar.bmp ├── about.bmp ├── arrow.ico ├── bitmap2.bmp ├── bmp00001.bmp ├── bmp00002.bmp ├── close_tb.bmp ├── code.GIF ├── code.bmp ├── code1.bmp ├── debug.GIF ├── debug.bmp ├── disasm.ico ├── ident_info.ico ├── io_window.ico ├── link.cur ├── manifest.txt ├── memory_info.ico ├── mg_icons.bmp ├── splash16_en.bmp ├── splash16_pl.bmp ├── splash_en.bmp ├── splash_pl.bmp └── toolbar1.bmp └── resource.h /6502.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/6502.cpp -------------------------------------------------------------------------------- /6502.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // 6502.h : main header file for the 6502 application 22 | // 23 | 24 | #include "resource.h" 25 | #include "Global.h" 26 | 27 | #ifndef __AFXWIN_H__ 28 | #error include 'stdafx.h' before including this file for PCH 29 | #endif 30 | 31 | //#include "resource.h" // main symbols 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | // C6502App: 35 | // See 6502.cpp for the implementation of this class 36 | // 37 | 38 | class C6502App : public CWinApp 39 | { 40 | static const TCHAR REGISTRY_KEY[]; 41 | static const TCHAR PROFILE_NAME[]; 42 | HINSTANCE m_hInstRes; 43 | HMODULE m_hRichEdit; 44 | 45 | public: 46 | static bool m_bMaximize; // flaga - maksymalne wymiary okna przy starcie; 47 | static bool m_bFileNew; // flaga - owieranie pustego dokumentu przy starcie 48 | CGlobal m_global; // zmienne globalne aplikacji 49 | bool m_bDoNotAddToRecentFileList; 50 | CDocTemplate *m_pDocDeasmTemplate; 51 | 52 | C6502App(); 53 | 54 | // Overrides 55 | // ClassWizard generated virtual function overrides 56 | //{{AFX_VIRTUAL(C6502App) 57 | public: 58 | virtual BOOL InitInstance(); 59 | virtual void AddToRecentFileList(LPCTSTR lpszPathName); 60 | virtual int ExitInstance(); 61 | //}}AFX_VIRTUAL 62 | 63 | // Implementation 64 | 65 | //{{AFX_MSG(C6502App) 66 | afx_msg void OnAppAbout(); 67 | //}}AFX_MSG 68 | DECLARE_MESSAGE_MAP() 69 | }; 70 | 71 | 72 | extern C6502App theApp; 73 | 74 | ///////////////////////////////////////////////////////////////////////////// 75 | -------------------------------------------------------------------------------- /6502.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/6502.rc -------------------------------------------------------------------------------- /6502.reg: -------------------------------------------------------------------------------- 1 | REGEDIT 2 | ; This .REG file may be used by your SETUP program. 3 | ; If a SETUP program is not available, the entries below will be 4 | ; registered in your InitInstance automatically with a call to 5 | ; CWinApp::RegisterShellFileTypes and COleObjectFactory::UpdateRegistryAll. 6 | 7 | HKEY_CLASSES_ROOT\.65S = M6502.Source 8 | HKEY_CLASSES_ROOT\M6502.Source\shell\open\command = 6502.EXE %1 9 | HKEY_CLASSES_ROOT\M6502.Source\shell\open\ddeexec = [open("%1")] 10 | HKEY_CLASSES_ROOT\M6502.Source\shell\open\ddeexec\application = 6502 11 | ; note: the application is optional 12 | ; (it defaults to the app name in "command") 13 | 14 | HKEY_CLASSES_ROOT\M6502.Source = Src65 Source 15 | -------------------------------------------------------------------------------- /6502.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "6502", "6502.vcxproj", "{C674658E-28D3-4C71-A44A-8F7E3DD66D94}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ResDll", "ResDll\ResDll.vcxproj", "{967E928A-EB03-48C7-B310-245D0AED200F}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Static En|Win32 = Static En|Win32 14 | Static Pl|Win32 = Static Pl|Win32 15 | Static|Win32 = Static|Win32 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Debug|Win32.Build.0 = Debug|Win32 20 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Static En|Win32.ActiveCfg = Static|Win32 21 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Static En|Win32.Build.0 = Static|Win32 22 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Static Pl|Win32.ActiveCfg = Static|Win32 23 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Static Pl|Win32.Build.0 = Static|Win32 24 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Static|Win32.ActiveCfg = Static|Win32 25 | {C674658E-28D3-4C71-A44A-8F7E3DD66D94}.Static|Win32.Build.0 = Static|Win32 26 | {967E928A-EB03-48C7-B310-245D0AED200F}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {967E928A-EB03-48C7-B310-245D0AED200F}.Debug|Win32.Build.0 = Debug|Win32 28 | {967E928A-EB03-48C7-B310-245D0AED200F}.Static En|Win32.ActiveCfg = Static En|Win32 29 | {967E928A-EB03-48C7-B310-245D0AED200F}.Static En|Win32.Build.0 = Static En|Win32 30 | {967E928A-EB03-48C7-B310-245D0AED200F}.Static Pl|Win32.ActiveCfg = Static Pl|Win32 31 | {967E928A-EB03-48C7-B310-245D0AED200F}.Static Pl|Win32.Build.0 = Static Pl|Win32 32 | {967E928A-EB03-48C7-B310-245D0AED200F}.Static|Win32.ActiveCfg = Static|Win32 33 | {967E928A-EB03-48C7-B310-245D0AED200F}.Static|Win32.Build.0 = Static|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /6502Doc.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // 6502Doc.cpp : implementation of the CSrc6502Doc class 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | #include "6502Doc.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CSrc6502Doc 36 | 37 | IMPLEMENT_DYNCREATE(CSrc6502Doc, CDocument) 38 | 39 | BEGIN_MESSAGE_MAP(CSrc6502Doc, CDocument) 40 | //{{AFX_MSG_MAP(CSrc6502Doc) 41 | // NOTE - the ClassWizard will add and remove mapping macros here. 42 | // DO NOT EDIT what you see in these blocks of generated code! 43 | //}}AFX_MSG_MAP 44 | END_MESSAGE_MAP() 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | // CSrc6502Doc construction/destruction 48 | 49 | CSrc6502Doc::CSrc6502Doc() 50 | { 51 | m_TextBuffer.m_pOwnerDoc = this; 52 | } 53 | 54 | CSrc6502Doc::~CSrc6502Doc() 55 | { 56 | #ifdef USE_CRYSTAL_EDIT 57 | // m_TextBuffer.FreeAll(); 58 | #endif 59 | } 60 | 61 | BOOL CSrc6502Doc::OnNewDocument() 62 | { 63 | if (!CDocument::OnNewDocument()) 64 | return FALSE; 65 | 66 | #ifdef USE_CRYSTAL_EDIT 67 | m_TextBuffer.InitNew(); 68 | #endif 69 | 70 | static UINT no= 1; 71 | CString name; 72 | name.Format(_T("NewFile %u"),no++); 73 | SetPathName(name,false); 74 | 75 | return TRUE; 76 | } 77 | 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // CSrc6502Doc serialization 80 | 81 | void CSrc6502Doc::Serialize(CArchive& ar) 82 | { 83 | #ifdef USE_CRYSTAL_EDIT 84 | //no-op 85 | #else 86 | // CEditView contains an edit control which handles all serialization 87 | ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar); 88 | #endif 89 | } 90 | 91 | ///////////////////////////////////////////////////////////////////////////// 92 | // CSrc6502Doc diagnostics 93 | 94 | #ifdef _DEBUG 95 | void CSrc6502Doc::AssertValid() const 96 | { 97 | CDocument::AssertValid(); 98 | } 99 | 100 | void CSrc6502Doc::Dump(CDumpContext& dc) const 101 | { 102 | CDocument::Dump(dc); 103 | } 104 | #endif //_DEBUG 105 | 106 | ///////////////////////////////////////////////////////////////////////////// 107 | 108 | #ifdef USE_CRYSTAL_EDIT 109 | 110 | void CSrc6502Doc::DeleteContents() 111 | { 112 | CDocument::DeleteContents(); 113 | m_TextBuffer.FreeAll(); 114 | } 115 | 116 | 117 | BOOL CSrc6502Doc::OnOpenDocument(LPCTSTR lpszPathName) 118 | { 119 | if (!CDocument::OnOpenDocument(lpszPathName)) 120 | return FALSE; 121 | 122 | return m_TextBuffer.LoadFromFile(lpszPathName); 123 | } 124 | 125 | 126 | BOOL CSrc6502Doc::OnSaveDocument(LPCTSTR lpszPathName) 127 | { 128 | m_TextBuffer.SaveToFile(lpszPathName); 129 | return true; 130 | } 131 | 132 | #else 133 | 134 | void CSrc6502Doc::DeleteContents() 135 | { 136 | CDocument::DeleteContents(); 137 | } 138 | 139 | 140 | BOOL CSrc6502Doc::OnOpenDocument(LPCTSTR lpszPathName) 141 | { 142 | return CDocument::OnOpenDocument(lpszPathName); 143 | } 144 | 145 | 146 | BOOL CSrc6502Doc::OnSaveDocument(LPCTSTR lpszPathName) 147 | { 148 | return CDocument::OnSaveDocument(lpszPathName); 149 | } 150 | 151 | #endif 152 | -------------------------------------------------------------------------------- /6502Doc.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // 6502Doc.h : interface of the CSrc6502Doc class 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | #ifdef USE_CRYSTAL_EDIT 25 | #include "CCrystalTextBuffer.h" 26 | #endif 27 | 28 | 29 | class CSrc6502Doc : public CDocument 30 | { 31 | protected: // create from serialization only 32 | CSrc6502Doc(); 33 | DECLARE_DYNCREATE(CSrc6502Doc) 34 | 35 | // Attributes 36 | public: 37 | #ifdef USE_CRYSTAL_EDIT 38 | class CTextBuffer : public CCrystalTextBuffer 39 | { 40 | public: 41 | CDocument* m_pOwnerDoc; 42 | 43 | CTextBuffer() { m_pOwnerDoc = 0; }; 44 | 45 | virtual void SetModified(BOOL bModified= TRUE) 46 | { m_pOwnerDoc->SetModifiedFlag(bModified); }; 47 | }; 48 | 49 | CTextBuffer m_TextBuffer; 50 | LOGFONT m_lfNormal; 51 | 52 | void GetText(CString& strText) { m_TextBuffer.GetText(strText); } 53 | 54 | CCrystalTextBuffer* GetBuffer() { return &m_TextBuffer; } 55 | #endif 56 | 57 | // Operations 58 | public: 59 | // Overrides 60 | // ClassWizard generated virtual function overrides 61 | //{{AFX_VIRTUAL(CSrc6502Doc) 62 | public: 63 | virtual BOOL OnNewDocument(); 64 | virtual void Serialize(CArchive& ar); 65 | virtual void DeleteContents(); 66 | virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); 67 | virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); 68 | //}}AFX_VIRTUAL 69 | 70 | // Implementation 71 | public: 72 | virtual ~CSrc6502Doc(); 73 | #ifdef _DEBUG 74 | virtual void AssertValid() const; 75 | virtual void Dump(CDumpContext& dc) const; 76 | #endif 77 | 78 | protected: 79 | 80 | // Generated message map functions 81 | protected: 82 | //{{AFX_MSG(CSrc6502Doc) 83 | // NOTE - the ClassWizard will add and remove member functions here. 84 | // DO NOT EDIT what you see in these blocks of generated code ! 85 | //}}AFX_MSG 86 | DECLARE_MESSAGE_MAP() 87 | }; 88 | 89 | ///////////////////////////////////////////////////////////////////////////// 90 | -------------------------------------------------------------------------------- /6502View.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/6502View.cpp -------------------------------------------------------------------------------- /6502View.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/6502View.h -------------------------------------------------------------------------------- /About.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #include "StdAfx.h" 22 | #include "About.h" 23 | 24 | 25 | 26 | CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) 27 | { 28 | //{{AFX_DATA_INIT(CAboutDlg) 29 | m_strVersion = _T(""); 30 | //}}AFX_DATA_INIT 31 | } 32 | 33 | void CAboutDlg::DoDataExchange(CDataExchange* pDX) 34 | { 35 | CDialog::DoDataExchange(pDX); 36 | //{{AFX_DATA_MAP(CAboutDlg) 37 | DDX_Control(pDX, IDC_6502, m_wndTitle); 38 | DDX_Text(pDX, IDC_ABOUT_VER, m_strVersion); 39 | //}}AFX_DATA_MAP 40 | } 41 | 42 | BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) 43 | //{{AFX_MSG_MAP(CAboutDlg) 44 | //}}AFX_MSG_MAP 45 | END_MESSAGE_MAP() 46 | 47 | 48 | 49 | BOOL CAboutDlg::OnInitDialog() 50 | { 51 | HRSRC hRsrc= ::FindResource(AfxGetInstanceHandle(),MAKEINTRESOURCE(VS_VERSION_INFO),RT_VERSION); 52 | HGLOBAL hGlobal; 53 | if ( hRsrc && (hGlobal = ::LoadResource(AfxGetInstanceHandle(),hRsrc)) != NULL ) 54 | { 55 | VS_FIXEDFILEINFO *pVer= (VS_FIXEDFILEINFO *)( (char *)::LockResource(hGlobal) + 0x28 ); 56 | if (pVer->dwSignature == 0xfeef04bd) 57 | m_strVersion.Format( IDS_ABOUT_VER, 58 | (int)HIWORD(pVer->dwProductVersionMS), 59 | (int)LOWORD(pVer->dwProductVersionMS), 60 | (int)HIWORD(pVer->dwProductVersionLS) ); 61 | // (int)LOWORD(pVer->dwProductVersionLS) ); 62 | 63 | ::FreeResource(hGlobal); 64 | } 65 | 66 | CDialog::OnInitDialog(); 67 | 68 | LOGFONT lf; 69 | m_wndTitle.GetFont()->GetLogFont(&lf); 70 | 71 | GetFont()->GetLogFont(&lf); 72 | // CClientDC dc(this); 73 | // lf.lfHeight = -MulDiv(9, dc.GetDeviceCaps(LOGPIXELSY), 96); 74 | lf.lfWeight = 700; // bold 75 | lf.lfHeight -= 2; 76 | m_TitleFont.CreateFontIndirect(&lf); 77 | m_wndTitle.SetFont(&m_TitleFont); 78 | 79 | m_StaticLink.SubclassDlgItem(IDC_LINK, this, "http://home.pacbell.net/michal_k/"); 80 | 81 | return true; // return true unless you set the focus to a control 82 | // EXCEPTION: OCX Property Pages should return false 83 | } 84 | 85 | /* 86 | void CAboutDlg::OnPaint() 87 | { 88 | CPaintDC dc(this); // device context for painting 89 | 90 | RECT rectWindow; 91 | POINT org; 92 | DWORD dbu= ::GetDialogBaseUnits(); 93 | CWnd *pFrm = GetDlgItem(IDC_TEST); 94 | pFrm->GetWindowRect(&rectWindow); 95 | ScreenToClient(&rectWindow); 96 | org.x = (rectWindow.left * LOWORD(dbu)) / 4; 97 | org.y = (rectWindow.top * HIWORD(dbu)) / 8; 98 | 99 | CBitmap bmp, mask; 100 | bmp.LoadBitmap(IDB_BITMAP1); 101 | mask.LoadBitmap(IDB_BITMAP2); 102 | 103 | CDC dcComp; 104 | dcComp.CreateCompatibleDC(&dc); 105 | 106 | 107 | dcComp.SelectObject(&mask); 108 | BITMAP info; 109 | bmp.GetObject(sizeof(info),&info); 110 | dc.BitBlt(1,1,info.bmWidth,info.bmHeight,&dcComp,0,0,SRCAND); 111 | dcComp.SelectObject(&bmp); 112 | dc.BitBlt(1,1,info.bmWidth,info.bmHeight,&dcComp,0,0,SRCPAINT); 113 | 114 | // Do not call CDialog::OnPaint() for painting messages 115 | } 116 | */ 117 | -------------------------------------------------------------------------------- /About.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | ///////////////////////////////////////////////////////////////////////////// 22 | // CAboutDlg dialog used for App About 23 | 24 | #include "resource.h" 25 | #include "StaticLink.h" 26 | 27 | 28 | class CAboutDlg : public CDialog 29 | { 30 | CFont m_TitleFont; 31 | 32 | public: 33 | CAboutDlg(); 34 | 35 | // Dialog Data 36 | //{{AFX_DATA(CAboutDlg) 37 | enum { IDD = IDD_ABOUTBOX }; 38 | CStatic m_wndTitle; 39 | CString m_strVersion; 40 | //}}AFX_DATA 41 | 42 | // ClassWizard generated virtual function overrides 43 | //{{AFX_VIRTUAL(CAboutDlg) 44 | protected: 45 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 46 | //}}AFX_VIRTUAL 47 | 48 | // Implementation 49 | protected: 50 | //{{AFX_MSG(CAboutDlg) 51 | virtual BOOL OnInitDialog(); 52 | //}}AFX_MSG 53 | DECLARE_MESSAGE_MAP() 54 | 55 | CStaticLink m_StaticLink; 56 | }; 57 | -------------------------------------------------------------------------------- /AllocMem.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/AllocMem.cpp -------------------------------------------------------------------------------- /Asm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Asm.cpp -------------------------------------------------------------------------------- /Asm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Asm.h -------------------------------------------------------------------------------- /AtariBin.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // AtariBin.cpp: implementation of the CAtariBin class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #include "stdafx.h" 26 | #include "AtariBin.h" 27 | 28 | #ifdef _DEBUG 29 | #undef THIS_FILE 30 | static char THIS_FILE[]=__FILE__; 31 | #define new DEBUG_NEW 32 | #endif 33 | 34 | ////////////////////////////////////////////////////////////////////// 35 | // Construction/Destruction 36 | ////////////////////////////////////////////////////////////////////// 37 | 38 | CAtariBin::CAtariBin() 39 | {} 40 | 41 | CAtariBin::~CAtariBin() 42 | {} 43 | 44 | 45 | bool CAtariBin::LoadAtaBinFormat(CArchive& ar, COutputMem& mem, CMarkArea& area, int& prog_start) 46 | { 47 | WORD wTemp; 48 | ar >> wTemp; 49 | if (wTemp != 0xFFFF) 50 | return false; 51 | 52 | WORD wBegin= 0; 53 | 54 | for (;;) 55 | { 56 | WORD wFrom, wTo; 57 | ar >> wFrom; 58 | ar >> wTo; 59 | if (wTo < wFrom) 60 | return false; 61 | 62 | if (wBegin == 0) 63 | wBegin = wFrom; 64 | 65 | area.SetStart(wFrom); 66 | area.SetEnd(wTo); 67 | 68 | mem.Load(ar, wFrom, wTo); 69 | 70 | if (ar.GetFile()->GetLength() >= ar.GetFile()->GetPosition() && ar.IsBufferEmpty()) 71 | break; 72 | } 73 | 74 | int nStart= mem[0x2e0] + mem[0x2e1] * 256; // run address 75 | if (nStart == 0) 76 | nStart = mem[0x2e2] + mem[0x2e3] * 256; // init address 77 | if (nStart == 0) 78 | nStart = wBegin; // beginning of first block 79 | if (nStart != 0) 80 | prog_start = nStart; 81 | 82 | return true; 83 | } 84 | -------------------------------------------------------------------------------- /AtariBin.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // AtariBin.h: interface for the CAtariBin class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #if !defined(AFX_ATARIBIN_H__CDA48FC2_1432_11D2_809C_AEA13AAADC12__INCLUDED_) 26 | #define AFX_ATARIBIN_H__CDA48FC2_1432_11D2_809C_AEA13AAADC12__INCLUDED_ 27 | 28 | #if _MSC_VER >= 1000 29 | #pragma once 30 | #endif // _MSC_VER >= 1000 31 | 32 | class CAtariBin 33 | { 34 | public: 35 | CAtariBin(); 36 | virtual ~CAtariBin(); 37 | 38 | bool LoadAtaBinFormat(CArchive &archive, COutputMem &mem, CMarkArea &area, int &prog_start); 39 | }; 40 | 41 | #endif // !defined(AFX_ATARIBIN_H__CDA48FC2_1432_11D2_809C_AEA13AAADC12__INCLUDED_) 42 | -------------------------------------------------------------------------------- /Broadcast.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Broadcast.cpp -------------------------------------------------------------------------------- /Broadcast.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Broadcast.h -------------------------------------------------------------------------------- /CXMultiDocTemplate.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #include "StdAfx.h" 22 | #include "CXMultiDocTemplate.h" 23 | 24 | bool CXMultiDocTemplate::s_bRegistrationExt= true; 25 | 26 | 27 | BOOL CXMultiDocTemplate::GetDocString(CString& rString, enum DocStringIndex i) const 28 | { 29 | if (!CMultiDocTemplate::GetDocString(rString, i)) 30 | return false; 31 | 32 | if (i == filterExt) 33 | { 34 | if (s_bRegistrationExt) 35 | if (rString.GetLength() > 4) 36 | rString = rString.Left(4); 37 | } 38 | 39 | return true; 40 | } 41 | -------------------------------------------------------------------------------- /CXMultiDocTemplate.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/CXMultiDocTemplate.h -------------------------------------------------------------------------------- /ChildFrm.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // ChildFrm.cpp : implementation of the CChildFrame class 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | 27 | #include "ChildFrm.h" 28 | 29 | #ifdef _DEBUG 30 | #define new DEBUG_NEW 31 | #undef THIS_FILE 32 | static char THIS_FILE[] = __FILE__; 33 | #endif 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | // CChildFrame 37 | 38 | IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) 39 | 40 | BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) 41 | //{{AFX_MSG_MAP(CChildFrame) 42 | // NOTE - the ClassWizard will add and remove mapping macros here. 43 | // DO NOT EDIT what you see in these blocks of generated code ! 44 | //}}AFX_MSG_MAP 45 | END_MESSAGE_MAP() 46 | 47 | ///////////////////////////////////////////////////////////////////////////// 48 | // CChildFrame construction/destruction 49 | 50 | CChildFrame::CChildFrame() 51 | { 52 | // TODO: add member initialization code here 53 | 54 | } 55 | 56 | CChildFrame::~CChildFrame() 57 | { 58 | } 59 | 60 | BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) 61 | { 62 | // TODO: Modify the Window class or styles here by modifying 63 | // the CREATESTRUCT cs 64 | 65 | return CMDIChildWnd::PreCreateWindow(cs); 66 | } 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | // CChildFrame diagnostics 70 | 71 | #ifdef _DEBUG 72 | void CChildFrame::AssertValid() const 73 | { 74 | CMDIChildWnd::AssertValid(); 75 | } 76 | 77 | void CChildFrame::Dump(CDumpContext& dc) const 78 | { 79 | CMDIChildWnd::Dump(dc); 80 | } 81 | 82 | #endif //_DEBUG 83 | 84 | ///////////////////////////////////////////////////////////////////////////// 85 | // CChildFrame message handlers 86 | 87 | BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 88 | { 89 | return m_wndSplitter.Create(this, 2, 1, CSize(30, 30), pContext); 90 | // return CMDIChildWnd::OnCreateClient(lpcs, pContext); 91 | } 92 | -------------------------------------------------------------------------------- /ChildFrm.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // ChildFrm.h : interface of the CChildFrame class 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #ifndef _ChildFrame_ 26 | #define _ChildFrame_ 27 | 28 | 29 | class CChildFrame : public CMDIChildWnd 30 | { 31 | DECLARE_DYNCREATE(CChildFrame) 32 | public: 33 | CChildFrame(); 34 | 35 | // Attributes 36 | public: 37 | CSplitterWnd m_wndSplitter; 38 | 39 | // Operations 40 | public: 41 | 42 | // Overrides 43 | // ClassWizard generated virtual function overrides 44 | //{{AFX_VIRTUAL(CChildFrame) 45 | public: 46 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 47 | protected: 48 | virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); 49 | //}}AFX_VIRTUAL 50 | 51 | // Implementation 52 | public: 53 | virtual ~CChildFrame(); 54 | #ifdef _DEBUG 55 | virtual void AssertValid() const; 56 | virtual void Dump(CDumpContext& dc) const; 57 | #endif 58 | 59 | // Generated message map functions 60 | protected: 61 | //{{AFX_MSG(CChildFrame) 62 | // NOTE - the ClassWizard will add and remove member functions here. 63 | // DO NOT EDIT what you see in these blocks of generated code! 64 | //}}AFX_MSG 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /ChildFrmDeAsm.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // ChildFrm.cpp : implementation of the CChildFrameDeAsm class 22 | // 23 | 24 | #include "stdafx.h" 25 | #include "ChildFrmDeAsm.h" 26 | 27 | #ifdef _DEBUG 28 | #define new DEBUG_NEW 29 | #undef THIS_FILE 30 | static char THIS_FILE[] = __FILE__; 31 | #endif 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | // CChildFrameDeAsm 35 | 36 | IMPLEMENT_DYNCREATE(CChildFrameDeAsm, CMDIChildWnd) 37 | 38 | BEGIN_MESSAGE_MAP(CChildFrameDeAsm, CMDIChildWnd) 39 | //{{AFX_MSG_MAP(CChildFrameDeAsm) 40 | // NOTE - the ClassWizard will add and remove mapping macros here. 41 | // DO NOT EDIT what you see in these blocks of generated code ! 42 | //}}AFX_MSG_MAP 43 | END_MESSAGE_MAP() 44 | 45 | ///////////////////////////////////////////////////////////////////////////// 46 | // CChildFrameDeAsm construction/destruction 47 | 48 | CChildFrameDeAsm::CChildFrameDeAsm() 49 | { 50 | // TODO: add member initialization code here 51 | 52 | } 53 | 54 | CChildFrameDeAsm::~CChildFrameDeAsm() 55 | { 56 | } 57 | 58 | BOOL CChildFrameDeAsm::PreCreateWindow(CREATESTRUCT& cs) 59 | { 60 | // TODO: Modify the Window class or styles here by modifying 61 | // the CREATESTRUCT cs 62 | 63 | return CMDIChildWnd::PreCreateWindow(cs); 64 | } 65 | 66 | ///////////////////////////////////////////////////////////////////////////// 67 | // CChildFrameDeAsm diagnostics 68 | 69 | #ifdef _DEBUG 70 | void CChildFrameDeAsm::AssertValid() const 71 | { 72 | CMDIChildWnd::AssertValid(); 73 | } 74 | 75 | void CChildFrameDeAsm::Dump(CDumpContext& dc) const 76 | { 77 | CMDIChildWnd::Dump(dc); 78 | } 79 | 80 | #endif //_DEBUG 81 | 82 | ///////////////////////////////////////////////////////////////////////////// 83 | // CChildFrameDeAsm message handlers 84 | 85 | BOOL CChildFrameDeAsm::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 86 | { 87 | return CMDIChildWnd::OnCreateClient(lpcs, pContext); 88 | } 89 | -------------------------------------------------------------------------------- /ChildFrmDeAsm.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // ChildFrm.h : interface of the CChildFrameDeAsm class 22 | // 23 | ///////////////////////////////////////////////////////////////////////////// 24 | 25 | #ifndef _ChildFrameDeAsm_ 26 | #define _ChildFrameDeAsm_ 27 | 28 | 29 | class CChildFrameDeAsm : public CMDIChildWnd 30 | { 31 | DECLARE_DYNCREATE(CChildFrameDeAsm) 32 | public: 33 | CChildFrameDeAsm(); 34 | 35 | // Attributes 36 | public: 37 | 38 | // Operations 39 | public: 40 | 41 | // Overrides 42 | // ClassWizard generated virtual function overrides 43 | //{{AFX_VIRTUAL(CChildFrameDeAsm) 44 | public: 45 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 46 | protected: 47 | virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); 48 | //}}AFX_VIRTUAL 49 | 50 | // Implementation 51 | public: 52 | virtual ~CChildFrameDeAsm(); 53 | #ifdef _DEBUG 54 | virtual void AssertValid() const; 55 | virtual void Dump(CDumpContext& dc) const; 56 | #endif 57 | 58 | // Generated message map functions 59 | protected: 60 | //{{AFX_MSG(CChildFrameDeAsm) 61 | // NOTE - the ClassWizard will add and remove member functions here. 62 | // DO NOT EDIT what you see in these blocks of generated code! 63 | //}}AFX_MSG 64 | DECLARE_MESSAGE_MAP() 65 | }; 66 | 67 | ///////////////////////////////////////////////////////////////////////////// 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /ColorButton.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/ColorButton.cpp -------------------------------------------------------------------------------- /ColorButton.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // ColorButton.h : header file 22 | // 23 | 24 | #ifndef _color_button_ 25 | #define _color_button_ 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // CColorButton window 29 | 30 | class CColorButton : public CButton 31 | { 32 | const COLORREF *m_prgbColor; 33 | int m_nDx; 34 | int m_nDy; 35 | 36 | void PaintIt(int offset); 37 | 38 | // Construction 39 | public: 40 | CColorButton(); 41 | 42 | // Attributes 43 | public: 44 | void SetColorRef(const COLORREF *pColor); 45 | afx_msg LRESULT OnSetState(WPARAM wParam, LPARAM /* lParam */); 46 | 47 | // Operations 48 | public: 49 | 50 | // Overrides 51 | // ClassWizard generated virtual function overrides 52 | //{{AFX_VIRTUAL(CColorButton) 53 | //}}AFX_VIRTUAL 54 | 55 | // Implementation 56 | public: 57 | virtual ~CColorButton(); 58 | 59 | // Generated message map functions 60 | protected: 61 | //{{AFX_MSG(CColorButton) 62 | afx_msg void OnPaint(); 63 | //}}AFX_MSG 64 | 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /ConfigSettings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/ConfigSettings.cpp -------------------------------------------------------------------------------- /ConfigSettings.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/ConfigSettings.h -------------------------------------------------------------------------------- /CrystalEdit/CCrystalEditView.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: CCrystalEditView.inl 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Inline functions of Crystal Edit classes 10 | // 11 | // You are free to use or modify this code to the following restrictions: 12 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 13 | // will be enough. If you can't (or don't want to), contact me personally. 14 | // - LEAVE THIS HEADER INTACT 15 | //////////////////////////////////////////////////////////////////////////// 16 | 17 | #ifndef __CCrystalEditView_INL_INCLUDED 18 | #define __CCrystalEditView_INL_INCLUDED 19 | 20 | #include "CCrystalEditView.h" 21 | 22 | CE_INLINE BOOL CCrystalEditView::GetOverwriteMode() const 23 | { 24 | return m_bOvrMode; 25 | } 26 | 27 | CE_INLINE void CCrystalEditView::SetOverwriteMode(BOOL bOvrMode /*= TRUE*/) 28 | { 29 | m_bOvrMode = bOvrMode; 30 | } 31 | 32 | CE_INLINE BOOL CCrystalEditView::GetDisableBSAtSOL() const 33 | { 34 | return m_bDisableBSAtSOL; 35 | } 36 | 37 | CE_INLINE BOOL CCrystalEditView::GetAutoIndent() const 38 | { 39 | return m_bAutoIndent; 40 | } 41 | 42 | CE_INLINE void CCrystalEditView::SetAutoIndent(BOOL bAutoIndent) 43 | { 44 | m_bAutoIndent = bAutoIndent; 45 | } 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /CrystalEdit/CCrystalTextBuffer.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: CCrystalTextBuffer.inl 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Inline functions of Crystal Edit classes 10 | // 11 | // You are free to use or modify this code to the following restrictions: 12 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 13 | // will be enough. If you can't (or don't want to), contact me personally. 14 | // - LEAVE THIS HEADER INTACT 15 | //////////////////////////////////////////////////////////////////////////// 16 | 17 | #ifndef __CCrystalTextBuffer_INL_INCLUDED 18 | #define __CCrystalTextBuffer_INL_INCLUDED 19 | 20 | #include "CCrystalTextBuffer.h" 21 | 22 | CE_INLINE BOOL CCrystalTextBuffer::IsModified() const 23 | { 24 | return m_bModified; 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /CrystalEdit/CCrystalTextView.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: CCrystalTextView.inl 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Inline functions of Crystal Edit classes 10 | // 11 | // You are free to use or modify this code to the following restrictions: 12 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 13 | // will be enough. If you can't (or don't want to), contact me personally. 14 | // - LEAVE THIS HEADER INTACT 15 | //////////////////////////////////////////////////////////////////////////// 16 | 17 | #ifndef __CCrystalTextView_INL_INCLUDED 18 | #define __CCrystalTextView_INL_INCLUDED 19 | 20 | #include "CCrystalTextView.h" 21 | 22 | CE_INLINE BOOL CCrystalTextView::IsDraggingText() const 23 | { 24 | return m_bDraggingText; 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /CrystalEdit/CEditReplaceDlg.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: CEditReplaceDlg.h 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Declaration of the CEditReplaceDlg dialog, a part of Crystal Edit - 10 | // syntax coloring text editor. 11 | // 12 | // You are free to use or modify this code to the following restrictions: 13 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 14 | // will be enough. If you can't (or don't want to), contact me personally. 15 | // - LEAVE THIS HEADER INTACT 16 | //////////////////////////////////////////////////////////////////////////// 17 | 18 | #if !defined(AFX_CEDITREPLACEDLG_H__759417E3_7B18_11D2_8C50_0080ADB86836__INCLUDED_) 19 | #define AFX_CEDITREPLACEDLG_H__759417E3_7B18_11D2_8C50_0080ADB86836__INCLUDED_ 20 | 21 | #if _MSC_VER >= 1000 22 | #pragma once 23 | #endif // _MSC_VER >= 1000 24 | // CEditReplaceDlg.h : header file 25 | // 26 | 27 | #include "cedefs.h" 28 | #include "editcmd.h" 29 | 30 | class CCrystalEditView; 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | // CEditReplaceDlg dialog 34 | 35 | class CEditReplaceDlg : public CDialog 36 | { 37 | private: 38 | CCrystalEditView *m_pBuddy; 39 | BOOL m_bFound; 40 | CPoint m_ptFoundAt; 41 | BOOL DoHighlightText(); 42 | 43 | // Construction 44 | public: 45 | CEditReplaceDlg(CCrystalEditView *pBuddy); 46 | 47 | BOOL m_bEnableScopeSelection; 48 | CPoint m_ptCurrentPos; 49 | CPoint m_ptBlockBegin, m_ptBlockEnd; 50 | 51 | // Dialog Data 52 | //{{AFX_DATA(CEditReplaceDlg) 53 | enum { IDD = IDD_EDIT_REPLACE }; 54 | BOOL m_bMatchCase; 55 | BOOL m_bWholeWord; 56 | CString m_sText; 57 | CString m_sNewText; 58 | int m_nScope; 59 | //}}AFX_DATA 60 | 61 | 62 | // Overrides 63 | // ClassWizard generated virtual function overrides 64 | //{{AFX_VIRTUAL(CEditReplaceDlg) 65 | protected: 66 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 67 | //}}AFX_VIRTUAL 68 | 69 | // Implementation 70 | protected: 71 | 72 | // Generated message map functions 73 | //{{AFX_MSG(CEditReplaceDlg) 74 | afx_msg void OnChangeEditText(); 75 | virtual void OnCancel(); 76 | virtual BOOL OnInitDialog(); 77 | afx_msg void OnEditReplace(); 78 | afx_msg void OnEditReplaceAll(); 79 | afx_msg void OnEditSkip(); 80 | //}}AFX_MSG 81 | DECLARE_MESSAGE_MAP() 82 | }; 83 | 84 | //{{AFX_INSERT_LOCATION}} 85 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 86 | 87 | #endif // !defined(AFX_CEDITREPLACEDLG_H__759417E3_7B18_11D2_8C50_0080ADB86836__INCLUDED_) 88 | -------------------------------------------------------------------------------- /CrystalEdit/CFindTextDlg.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: CFindTextDlg.cpp 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Implementation of the CFindTextDlg dialog, a part of Crystal Edit - 10 | // syntax coloring text editor. 11 | // 12 | // You are free to use or modify this code to the following restrictions: 13 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 14 | // will be enough. If you can't (or don't want to), contact me personally. 15 | // - LEAVE THIS HEADER INTACT 16 | //////////////////////////////////////////////////////////////////////////// 17 | 18 | #include "stdafx.h" 19 | #include "CFindTextDlg.h" 20 | #include "CCrystalTextView.h" 21 | 22 | #ifdef _DEBUG 23 | #define new DEBUG_NEW 24 | #undef THIS_FILE 25 | static char THIS_FILE[] = __FILE__; 26 | #endif 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CFindTextDlg dialog 30 | 31 | CFindTextDlg::CFindTextDlg(CCrystalTextView *pBuddy) : CDialog(CFindTextDlg::IDD, NULL) 32 | { 33 | m_pBuddy = pBuddy; 34 | //{{AFX_DATA_INIT(CFindTextDlg) 35 | m_nDirection = 1; 36 | m_bMatchCase = FALSE; 37 | m_bWholeWord = FALSE; 38 | m_sText = _T(""); 39 | //}}AFX_DATA_INIT 40 | m_ptCurrentPos = CPoint(0, 0); 41 | } 42 | 43 | 44 | void CFindTextDlg::DoDataExchange(CDataExchange* pDX) 45 | { 46 | CDialog::DoDataExchange(pDX); 47 | //{{AFX_DATA_MAP(CFindTextDlg) 48 | DDX_Radio(pDX, IDC_EDIT_DIRECTION_UP, m_nDirection); 49 | DDX_Check(pDX, IDC_EDIT_MATCH_CASE, m_bMatchCase); 50 | DDX_Text(pDX, IDC_EDIT_TEXT, m_sText); 51 | DDX_Check(pDX, IDC_EDIT_WHOLE_WORD, m_bWholeWord); 52 | //}}AFX_DATA_MAP 53 | } 54 | 55 | 56 | BEGIN_MESSAGE_MAP(CFindTextDlg, CDialog) 57 | //{{AFX_MSG_MAP(CFindTextDlg) 58 | ON_EN_CHANGE(IDC_EDIT_TEXT, OnChangeEditText) 59 | //}}AFX_MSG_MAP 60 | END_MESSAGE_MAP() 61 | 62 | ///////////////////////////////////////////////////////////////////////////// 63 | // CFindTextDlg message handlers 64 | 65 | void CFindTextDlg::OnOK() 66 | { 67 | if (UpdateData()) 68 | { 69 | ASSERT(m_pBuddy != NULL); 70 | DWORD dwSearchFlags = 0; 71 | if (m_bMatchCase) 72 | dwSearchFlags |= FIND_MATCH_CASE; 73 | if (m_bWholeWord) 74 | dwSearchFlags |= FIND_WHOLE_WORD; 75 | if (m_nDirection == 0) 76 | dwSearchFlags |= FIND_DIRECTION_UP; 77 | 78 | CPoint ptTextPos; 79 | if (! m_pBuddy->FindText(m_sText, m_ptCurrentPos, dwSearchFlags, TRUE, &ptTextPos)) 80 | { 81 | CString prompt; 82 | prompt.Format(IDS_EDIT_TEXT_NOT_FOUND, m_sText); 83 | AfxMessageBox(prompt); 84 | m_ptCurrentPos = CPoint(0, 0); 85 | return; 86 | } 87 | 88 | m_pBuddy->HighlightText(ptTextPos, lstrlen(m_sText)); 89 | 90 | CDialog::OnOK(); 91 | } 92 | } 93 | 94 | void CFindTextDlg::OnChangeEditText() 95 | { 96 | CString text; 97 | GetDlgItem(IDC_EDIT_TEXT)->GetWindowText(text); 98 | GetDlgItem(IDOK)->EnableWindow(text != _T("")); 99 | } 100 | 101 | BOOL CFindTextDlg::OnInitDialog() 102 | { 103 | CDialog::OnInitDialog(); 104 | 105 | GetDlgItem(IDOK)->EnableWindow(m_sText != _T("")); 106 | 107 | return TRUE; 108 | } 109 | 110 | void CFindTextDlg::OnCancel() 111 | { 112 | VERIFY(UpdateData()); 113 | 114 | CDialog::OnCancel(); 115 | } 116 | -------------------------------------------------------------------------------- /CrystalEdit/CFindTextDlg.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: CFindTextDlg.h 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Declaration of the CFindTextDlg dialog, a part of Crystal Edit - 10 | // syntax coloring text editor. 11 | // 12 | // You are free to use or modify this code to the following restrictions: 13 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 14 | // will be enough. If you can't (or don't want to), contact me personally. 15 | // - LEAVE THIS HEADER INTACT 16 | //////////////////////////////////////////////////////////////////////////// 17 | 18 | #if !defined(AFX_CFINDTEXTDLG_H__F59009E3_7B01_11D2_8C4F_0080ADB86836__INCLUDED_) 19 | #define AFX_CFINDTEXTDLG_H__F59009E3_7B01_11D2_8C4F_0080ADB86836__INCLUDED_ 20 | 21 | #if _MSC_VER >= 1000 22 | #pragma once 23 | #endif // _MSC_VER >= 1000 24 | 25 | #include "cedefs.h" 26 | #include "editcmd.h" 27 | 28 | class CCrystalTextView; 29 | 30 | 31 | ///////////////////////////////////////////////////////////////////////////// 32 | // CFindTextDlg dialog 33 | 34 | class CFindTextDlg : public CDialog 35 | { 36 | private: 37 | CCrystalTextView *m_pBuddy; 38 | 39 | // Construction 40 | public: 41 | CFindTextDlg(CCrystalTextView *pBuddy); 42 | 43 | CPoint m_ptCurrentPos; 44 | // Dialog Data 45 | //{{AFX_DATA(CFindTextDlg) 46 | enum { IDD = IDD_EDIT_FIND }; 47 | int m_nDirection; 48 | BOOL m_bMatchCase; 49 | CString m_sText; 50 | BOOL m_bWholeWord; 51 | //}}AFX_DATA 52 | 53 | // Overrides 54 | // ClassWizard generated virtual function overrides 55 | //{{AFX_VIRTUAL(CFindTextDlg) 56 | protected: 57 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 58 | //}}AFX_VIRTUAL 59 | 60 | // Implementation 61 | protected: 62 | 63 | // Generated message map functions 64 | //{{AFX_MSG(CFindTextDlg) 65 | virtual void OnOK(); 66 | afx_msg void OnChangeEditText(); 67 | virtual BOOL OnInitDialog(); 68 | virtual void OnCancel(); 69 | //}}AFX_MSG 70 | DECLARE_MESSAGE_MAP() 71 | }; 72 | 73 | //{{AFX_INSERT_LOCATION}} 74 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 75 | 76 | #endif // !defined(AFX_CFINDTEXTDLG_H__F59009E3_7B01_11D2_8C4F_0080ADB86836__INCLUDED_) 77 | -------------------------------------------------------------------------------- /CrystalEdit/Parse6502.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/CrystalEdit/Parse6502.cpp -------------------------------------------------------------------------------- /CrystalEdit/cedefs.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: cedefs.h 3 | // Version: 1.0.0.0 4 | // Created: 21-Feb-1999 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Global definitions for Crystal Edit - syntax coloring text editor. 10 | // 11 | // You are free to use or modify this code to the following restrictions: 12 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 13 | // will be enough. If you can't (or don't want to), contact me personally. 14 | // - LEAVE THIS HEADER INTACT 15 | //////////////////////////////////////////////////////////////////////////// 16 | 17 | #ifndef CEDEFS_H__INCLUDED 18 | #define CEDEFS_H__INCLUDED 19 | 20 | #if defined(CE_DLL_BUILD) && defined(CE_FROM_DLL) 21 | #error Define CE_DLL_BUILD or CE_FROM_DLL, but not both 22 | #endif 23 | 24 | #ifndef CRYSEDIT_CLASS_DECL 25 | #if defined(CE_DLL_BUILD) 26 | #define CRYSEDIT_CLASS_DECL __declspec(dllexport) 27 | #elif defined(CE_FROM_DLL) 28 | #define CRYSEDIT_CLASS_DECL __declspec(dllimport) 29 | #else 30 | #define CRYSEDIT_CLASS_DECL 31 | #endif 32 | #endif 33 | 34 | #ifndef CE_INLINE 35 | #if defined(CE_DLL_BUILD) || defined(CE_FROM_DLL) 36 | #define CE_INLINE 37 | #else 38 | #define CE_INLINE inline 39 | #endif 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /CrystalEdit/editreg.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////// 2 | // File: editcmd.h 3 | // Version: 1.0.0.0 4 | // Created: 29-Dec-1998 5 | // 6 | // Author: Stcherbatchenko Andrei 7 | // E-mail: windfall@gmx.de 8 | // 9 | // Registry keys and values for Crystal Edit - syntax colorig text editor. 10 | // 11 | // You are free to use or modify this code to the following restrictions: 12 | // - Acknowledge me somewhere in your about box, simple "Parts of code by.." 13 | // will be enough. If you can't (or don't want to), contact me personally. 14 | // - LEAVE THIS HEADER INTACT 15 | //////////////////////////////////////////////////////////////////////////// 16 | 17 | #ifndef CRYSEDITREG_H__INCLUDED 18 | #define CRYSEDITREG_H__INCLUDED 19 | 20 | // Registry keys & values 21 | #define REG_FIND_SUBKEY _T("CrystalEdit\\Find") 22 | #define REG_REPLACE_SUBKEY _T("CrystalEdit\\Replace") 23 | #define REG_MATCH_CASE _T("MatchCase") 24 | #define REG_WHOLE_WORD _T("WholeWord") 25 | #define REG_FIND_WHAT _T("FindWhat") 26 | #define REG_REPLACE_WITH _T("ReplaceWith") 27 | 28 | #define REG_PAGE_SUBKEY _T("CrystalEdit\\PageSetup") 29 | #define REG_MARGIN_LEFT _T("LeftMargin") 30 | #define REG_MARGIN_RIGHT _T("RightMargin") 31 | #define REG_MARGIN_TOP _T("TopMargin") 32 | #define REG_MARGIN_BOTTOM _T("BottomMargin") 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Deasm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Deasm.cpp -------------------------------------------------------------------------------- /Deasm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Deasm.h -------------------------------------------------------------------------------- /Deasm6502Doc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Deasm6502Doc.cpp -------------------------------------------------------------------------------- /Deasm6502Doc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Deasm6502Doc.h -------------------------------------------------------------------------------- /Deasm6502View.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Deasm6502View.cpp -------------------------------------------------------------------------------- /Deasm6502View.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Deasm6502View.h -------------------------------------------------------------------------------- /DeasmGoto.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // DeasmGoto.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | #include "DeasmGoto.h" 26 | 27 | #ifdef _DEBUG 28 | #define new DEBUG_NEW 29 | #undef THIS_FILE 30 | static char THIS_FILE[] = __FILE__; 31 | #endif 32 | 33 | extern void AFX_CDECL DDX_HexDec(CDataExchange* pDX, int nIDC, unsigned int &num, bool bWord= true); 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | // CDeasmGoto dialog 37 | 38 | 39 | CDeasmGoto::CDeasmGoto(CWnd* pParent /*=NULL*/) : CDialog(CDeasmGoto::IDD, pParent) 40 | { 41 | //{{AFX_DATA_INIT(CDeasmGoto) 42 | m_uAddress = 0; 43 | //}}AFX_DATA_INIT 44 | } 45 | 46 | 47 | void CDeasmGoto::DoDataExchange(CDataExchange* pDX) 48 | { 49 | CDialog::DoDataExchange(pDX); 50 | DDX_HexDec(pDX, IDC_DEASM_ADDR, m_uAddress); 51 | //{{AFX_DATA_MAP(CDeasmGoto) 52 | DDV_MinMaxUInt(pDX, m_uAddress, 0, 65535); 53 | //}}AFX_DATA_MAP 54 | } 55 | 56 | 57 | BEGIN_MESSAGE_MAP(CDeasmGoto, CDialog) 58 | //{{AFX_MSG_MAP(CDeasmGoto) 59 | // NOTE: the ClassWizard will add message map macros here 60 | //}}AFX_MSG_MAP 61 | END_MESSAGE_MAP() 62 | 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // CDeasmGoto message handlers 65 | -------------------------------------------------------------------------------- /DeasmGoto.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // DeasmGoto.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CDeasmGoto dialog 26 | 27 | class CDeasmGoto : public CDialog 28 | { 29 | // Construction 30 | public: 31 | CDeasmGoto(CWnd* pParent = NULL); // standard constructor 32 | 33 | // Dialog Data 34 | //{{AFX_DATA(CDeasmGoto) 35 | enum { IDD = IDD_DEASM_GOTO }; 36 | UINT m_uAddress; 37 | //}}AFX_DATA 38 | 39 | 40 | // Overrides 41 | // ClassWizard generated virtual function overrides 42 | //{{AFX_VIRTUAL(CDeasmGoto) 43 | protected: 44 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 45 | //}}AFX_VIRTUAL 46 | 47 | // Implementation 48 | protected: 49 | 50 | // Generated message map functions 51 | //{{AFX_MSG(CDeasmGoto) 52 | // NOTE: the ClassWizard will add member functions here 53 | //}}AFX_MSG 54 | DECLARE_MESSAGE_MAP() 55 | }; 56 | -------------------------------------------------------------------------------- /DeasmSaveOptions.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/DeasmSaveOptions.cpp -------------------------------------------------------------------------------- /DeasmSaveOptions.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // DeasmSaveOptions.h : header file 22 | // 23 | #include "FormatNums.h" 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CDeasmSaveOptions dialog 27 | 28 | class CDeasmSaveOptions : public CDialog, CFormatNums 29 | { 30 | bool m_bModify; 31 | void CalculateNums(int pos); 32 | // Construction 33 | public: 34 | CDeasmSaveOptions(CWnd* pParent = NULL); // standard constructor 35 | 36 | // Dialog Data 37 | //{{AFX_DATA(CDeasmSaveOptions) 38 | enum { IDD = IDD_DEASM_SAVE_OPT }; 39 | UINT m_uEnd; 40 | UINT m_uLength; 41 | UINT m_uStart; 42 | BOOL m_bSaveAsData; 43 | //}}AFX_DATA 44 | 45 | 46 | // Overrides 47 | // ClassWizard generated virtual function overrides 48 | //{{AFX_VIRTUAL(CDeasmSaveOptions) 49 | protected: 50 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 51 | //}}AFX_VIRTUAL 52 | 53 | // Implementation 54 | protected: 55 | 56 | // Generated message map functions 57 | //{{AFX_MSG(CDeasmSaveOptions) 58 | afx_msg void OnChangeDeasmEnd(); 59 | afx_msg void OnChangeDeasmLength(); 60 | afx_msg void OnChangeDeasmStart(); 61 | afx_msg void OnDeltaposDeasmSpinEnd(NMHDR* pNMHDR, LRESULT* pResult); 62 | afx_msg void OnDeltaposDeasmSpinLength(NMHDR* pNMHDR, LRESULT* pResult); 63 | afx_msg void OnDeltaposDeasmSpinStart(NMHDR* pNMHDR, LRESULT* pResult); 64 | virtual BOOL OnInitDialog(); 65 | //}}AFX_MSG 66 | DECLARE_MESSAGE_MAP() 67 | }; 68 | -------------------------------------------------------------------------------- /DebugInfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/DebugInfo.cpp -------------------------------------------------------------------------------- /DebugInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/DebugInfo.h -------------------------------------------------------------------------------- /DialAsmStat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/DialAsmStat.cpp -------------------------------------------------------------------------------- /DialAsmStat.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/DialAsmStat.h -------------------------------------------------------------------------------- /DockBarEx.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_DOCKBAREX_H__CCF8FACC_8FB1_4DCF_825E_9E754C796CB8__INCLUDED_) 22 | #define AFX_DOCKBAREX_H__CCF8FACC_8FB1_4DCF_825E_9E754C796CB8__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | // DockBarEx.h : header file 28 | // 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // CDockBarEx window 32 | 33 | class CDockBarEx : public CDockBar 34 | { 35 | // Construction 36 | public: 37 | CDockBarEx(); 38 | 39 | // Attributes 40 | public: 41 | 42 | // Operations 43 | public: 44 | 45 | // Overrides 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CDockBarEx) 48 | //}}AFX_VIRTUAL 49 | 50 | // Implementation 51 | public: 52 | virtual ~CDockBarEx(); 53 | // virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz); 54 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 55 | 56 | // Generated message map functions 57 | protected: 58 | //{{AFX_MSG(CDockBarEx) 59 | afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 60 | afx_msg LRESULT OnNcHitTest(CPoint point); 61 | afx_msg void OnSize(UINT nType, int cx, int cy); 62 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 63 | //}}AFX_MSG 64 | DECLARE_MESSAGE_MAP() 65 | afx_msg LRESULT OnEnterSizeMove(WPARAM wParam, LPARAM lParam); 66 | afx_msg LRESULT OnExitSizeMove(WPARAM wParam, LPARAM lParam); 67 | 68 | CRect ResizeArea(); 69 | bool m_bResize; 70 | CPoint m_ptStart; 71 | int m_nStartWidth; 72 | void ResizeBars(int nWidth); 73 | bool m_bResizing; 74 | int m_nDeltaWidth; 75 | }; 76 | 77 | ///////////////////////////////////////////////////////////////////////////// 78 | 79 | //{{AFX_INSERT_LOCATION}} 80 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 81 | 82 | #endif // !defined(AFX_DOCKBAREX_H__CCF8FACC_8FB1_4DCF_825E_9E754C796CB8__INCLUDED_) 83 | -------------------------------------------------------------------------------- /DrawMarks.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/DrawMarks.cpp -------------------------------------------------------------------------------- /DrawMarks.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #ifndef _draw_marks_h_ 22 | #define _draw_marks_h_ 23 | 24 | class CMarks 25 | { 26 | 27 | public: 28 | static COLORREF m_rgbPointer; 29 | static COLORREF m_rgbBreakpoint; 30 | static COLORREF m_rgbError; 31 | 32 | enum MarkType 33 | { MT_ERASE, MT_POINTER, MT_BREAKPOINT, MT_DISBRKP, MT_ERROR }; 34 | 35 | static void draw_breakpoint(CDC &dc, int x, int y, int h, bool active); 36 | static void draw_pointer(CDC &dc, int x, int y, int h); 37 | static void draw_mark(CDC &dc, int x, int y, int h); 38 | 39 | // virtual int ScrollToLine(int line, int &height, BOOL scroll)= 0; 40 | // void DrawMark(CDC &dc, int line, MarkType type, BOOL scroll); 41 | 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /DynamicHelp.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_ELEMENTBAR_H__3BAE8904_36AA_11D2_809C_ABC7258C6120__INCLUDED_) 22 | #define AFX_ELEMENTBAR_H__3BAE8904_36AA_11D2_809C_ABC7258C6120__INCLUDED_ 23 | 24 | #if _MSC_VER >= 1000 25 | #pragma once 26 | #endif // _MSC_VER >= 1000 27 | // PropertyBar.h : header file 28 | // 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // CDynamicHelp window 31 | struct TEXTBLOCK; 32 | 33 | 34 | class CDynamicHelp : public CControlBar 35 | { 36 | typedef CControlBar inherited; 37 | static PCSTR s_pcszWndClass; 38 | void SizeToolBar(int nLength, bool bVert= false); 39 | CToolTipCtrl m_ToolTip; 40 | CRichEditCtrl m_wndHelp; 41 | int m_nHeaderHeight; 42 | CToolBarCtrl m_wndClose; 43 | 44 | // Construction 45 | public: 46 | CDynamicHelp(); 47 | 48 | // Attributes 49 | public: 50 | void SetContextHelp(const TCHAR* pcszText, const TCHAR* pcszHeader= 0); 51 | 52 | void DisplayHelp(const CString& strLine, int nWordStart, int nWordEnd); 53 | 54 | // Operations 55 | public: 56 | bool Create(CWnd* pParentWnd, UINT nID); 57 | 58 | 59 | // Overrides 60 | // ClassWizard generated virtual function overrides 61 | //{{AFX_VIRTUAL(CDynamicHelp) 62 | //}}AFX_VIRTUAL 63 | 64 | // Implementation 65 | public: 66 | virtual ~CDynamicHelp(); 67 | virtual void DoPaint(CDC* pDC); 68 | virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz); 69 | virtual CSize CalcDynamicLayout(int nLength, DWORD nMode); 70 | virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler); 71 | CSize CalcLayout(DWORD dwMode, int nLength); 72 | virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle); 73 | 74 | // Generated message map functions 75 | protected: 76 | //{{AFX_MSG(CDynamicHelp) 77 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 78 | afx_msg void OnSize(UINT nType, int cx, int cy); 79 | afx_msg void OnNcPaint(); 80 | afx_msg void OnDestroy(); 81 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 82 | afx_msg void OnCloseWnd(); 83 | //}}AFX_MSG 84 | afx_msg BOOL OnToolTipGetText(UINT uId, NMHDR* pNmHdr, LRESULT* pResult); 85 | 86 | DECLARE_MESSAGE_MAP() 87 | 88 | static CString s_strWndClass; 89 | void RegisterWndClass(); 90 | CSize m_sizeDefault; 91 | void Resize(); 92 | 93 | LRESULT OnDelayedResize(WPARAM, LPARAM); 94 | }; 95 | 96 | ///////////////////////////////////////////////////////////////////////////// 97 | 98 | //{{AFX_INSERT_LOCATION}} 99 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 100 | 101 | #endif // !defined(AFX_ELEMENTBAR_H__3BAE8904_36AA_11D2_809C_ABC7258C6120__INCLUDED_) 102 | -------------------------------------------------------------------------------- /EditBrkpDial.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // EditBrkpDial.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | #include "EditBrkpDial.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CDialEditBreakpoint dialog 36 | 37 | 38 | CDialEditBreakpoint::CDialEditBreakpoint(Breakpoint bp, CWnd* pParent /*=NULL*/) 39 | : CDialog(CDialEditBreakpoint::IDD, pParent) 40 | { 41 | //{{AFX_DATA_INIT(CDialEditBreakpoint) 42 | //}}AFX_DATA_INIT 43 | m_Execute = (bp & BPT_EXEC) != 0; 44 | m_Read = (bp & BPT_READ) != 0; 45 | m_Write = (bp & BPT_WRITE) != 0; 46 | m_Disabled = (bp & BPT_DISABLED) != 0; 47 | } 48 | 49 | 50 | void CDialEditBreakpoint::DoDataExchange(CDataExchange* pDX) 51 | { 52 | CDialog::DoDataExchange(pDX); 53 | //{{AFX_DATA_MAP(CDialEditBreakpoint) 54 | DDX_Check(pDX, IDC_EDIT_BP_DISABLED, m_Disabled); 55 | DDX_Check(pDX, IDC_EDIT_BP_EXEC, m_Execute); 56 | DDX_Check(pDX, IDC_EDIT_BP_READ, m_Read); 57 | DDX_Check(pDX, IDC_EDIT_BP_WRITE, m_Write); 58 | //}}AFX_DATA_MAP 59 | } 60 | 61 | 62 | BEGIN_MESSAGE_MAP(CDialEditBreakpoint, CDialog) 63 | //{{AFX_MSG_MAP(CDialEditBreakpoint) 64 | // NOTE: the ClassWizard will add message map macros here 65 | //}}AFX_MSG_MAP 66 | END_MESSAGE_MAP() 67 | 68 | ///////////////////////////////////////////////////////////////////////////// 69 | // CDialEditBreakpoint message handlers 70 | 71 | -------------------------------------------------------------------------------- /EditBrkpDial.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // DialEditBrkp.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CDialEditBreakpoint dialog 26 | 27 | class CDialEditBreakpoint : public CDialog, CAsm 28 | { 29 | // Construction 30 | public: 31 | CDialEditBreakpoint(Breakpoint bp, CWnd* pParent = NULL); // standard constructor 32 | 33 | // Dialog Data 34 | //{{AFX_DATA(CDialEditBreakpoint) 35 | enum { IDD = IDD_EDIT_BREAKPOINT }; 36 | bool m_Disabled; 37 | bool m_Execute; 38 | bool m_Read; 39 | bool m_Write; 40 | //}}AFX_DATA 41 | 42 | 43 | // Overrides 44 | // ClassWizard generated virtual function overrides 45 | //{{AFX_VIRTUAL(CDialEditBreakpoint) 46 | protected: 47 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 48 | //}}AFX_VIRTUAL 49 | 50 | // Implementation 51 | protected: 52 | 53 | // Generated message map functions 54 | //{{AFX_MSG(CDialEditBreakpoint) 55 | // NOTE: the ClassWizard will add member functions here 56 | //}}AFX_MSG 57 | DECLARE_MESSAGE_MAP() 58 | }; 59 | -------------------------------------------------------------------------------- /EditDisplay.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // EditDisplay.cpp : implementation file 22 | // 23 | 24 | #include "StdAfx.h" 25 | //#include "6502.h" 26 | //#include "EditDisplay.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CEditDisplay 36 | 37 | CEditDisplay::CEditDisplay() : m_pView(NULL) 38 | { 39 | } 40 | 41 | CEditDisplay::~CEditDisplay() 42 | { 43 | } 44 | 45 | 46 | BEGIN_MESSAGE_MAP(CEditDisplay, CEdit) 47 | //{{AFX_MSG_MAP(CEditDisplay) 48 | ON_WM_PAINT() 49 | ON_WM_CHAR() 50 | ON_WM_KEYUP() 51 | //}}AFX_MSG_MAP 52 | END_MESSAGE_MAP() 53 | 54 | 55 | void CEditDisplay::Subclass(CSrc6502View *pView) 56 | { 57 | m_pView = pView; 58 | SubclassWindow(pView->GetEditCtrl().m_hWnd); 59 | } 60 | 61 | 62 | ///////////////////////////////////////////////////////////////////////////// 63 | // CEditDisplay message handlers 64 | 65 | void CEditDisplay::OnPaint() 66 | { 67 | // CPaintDC dc(this); // device context for painting 68 | 69 | // TODO: Add your message handler code here 70 | 71 | // Do not call CEdit::OnPaint() for painting messages 72 | } 73 | 74 | void CEditDisplay::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 75 | { 76 | // TODO: Add your message handler code here and/or call default 77 | 78 | // CEdit::OnChar(nChar, nRepCnt, nFlags); 79 | } 80 | 81 | void CEditDisplay::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 82 | { 83 | // TODO: Add your message handler code here and/or call default 84 | 85 | // CEdit::OnKeyUp(nChar, nRepCnt, nFlags); 86 | } 87 | 88 | //----------------------------------------------------------------------------- 89 | 90 | -------------------------------------------------------------------------------- /EditDisplay.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // EditDisplay.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CEditDisplay window 26 | class CSrc6502View; 27 | 28 | class CEditDisplay : public CEdit 29 | { 30 | CSrc6502View *m_pView; 31 | 32 | void draw_pointer(CDC &dc, int x, int y, int h); 33 | void draw_breakpoint(CDC &dc, int x, int y, int h, bool active); 34 | 35 | void MarkBreakpoint(int line); 36 | 37 | // Construction 38 | public: 39 | CEditDisplay(); 40 | // CEditDisplay(CSrc6502View *pView); 41 | 42 | // Attributes 43 | public: 44 | 45 | // Operations 46 | public: 47 | void Subclass(CSrc6502View *pView); 48 | 49 | // Overrides 50 | // ClassWizard generated virtual function overrides 51 | //{{AFX_VIRTUAL(CEditDisplay) 52 | //}}AFX_VIRTUAL 53 | 54 | // Implementation 55 | public: 56 | virtual ~CEditDisplay(); 57 | 58 | // Generated message map functions 59 | protected: 60 | //{{AFX_MSG(CEditDisplay) 61 | afx_msg void OnPaint(); 62 | afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); 63 | afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); 64 | //}}AFX_MSG 65 | 66 | DECLARE_MESSAGE_MAP() 67 | }; 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | -------------------------------------------------------------------------------- /FlatBar.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // CFlatToolBar 1997 Microsoft Systems Journal. 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // This code compiles with Visual C++ 5.0 on Windows 95 6 | // 7 | #ifndef TBSTYLE_FLAT 8 | #define TBSTYLE_FLAT 0x0800 // (in case you don't have the new commctrl.h) 9 | #endif 10 | 11 | ////////////////// 12 | // "Flat" style tool bar. Use instead of CToolBar in your CMainFrame 13 | // or other window to create a tool bar with the flat look. 14 | // 15 | // CFlatToolBar fixes the display bug described in the article. It also has 16 | // overridden load functions that modify the style to TBSTYLE_FLAT. If you 17 | // don't create your toolbar by loading it from a resource, you should call 18 | // ModifyStyle(0, TBSTYLE_FLAT) yourself. 19 | // 20 | class CFlatToolBar : public CToolBar 21 | { 22 | public: 23 | BOOL LoadToolBar(LPCTSTR lpszResourceName); 24 | BOOL LoadToolBar(UINT nIDResource) 25 | { return LoadToolBar(MAKEINTRESOURCE(nIDResource)); } 26 | protected: 27 | DECLARE_DYNAMIC(CFlatToolBar) 28 | virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler); 29 | DECLARE_MESSAGE_MAP() 30 | afx_msg void OnWindowPosChanging(LPWINDOWPOS lpWndPos); 31 | afx_msg void OnWindowPosChanged(LPWINDOWPOS lpWndPos); 32 | }; 33 | -------------------------------------------------------------------------------- /FormatNums.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #include "stdafx.h" 22 | #include "FormatNums.h" 23 | 24 | 25 | void CFormatNums::IncEditField(CWnd *pCtrl, int iDelta, int iMin, int iMax) 26 | { 27 | int num,old; 28 | NumFmt fmt; 29 | 30 | old = num = ReadNumber(pCtrl,fmt); 31 | 32 | num += iDelta; 33 | if (num > iMax) 34 | num = iMax; 35 | else if (num < iMin) 36 | num = iMin; 37 | if (num != old) 38 | SetNumber(pCtrl,num,fmt); 39 | } 40 | 41 | 42 | int CFormatNums::ReadNumber(CWnd *pCtrl, NumFmt &fmt) 43 | { 44 | TCHAR buf[32]; 45 | int num= 0; 46 | if (pCtrl==NULL) 47 | return num; 48 | 49 | pCtrl->GetWindowText(buf,sizeof(buf)/sizeof(buf[0])); 50 | if (buf[0]==_T('$')) 51 | { 52 | fmt = NUM_HEX_DOL; 53 | if (sscanf(buf+1, _T("%X"),&num) <= 0) 54 | {} 55 | } 56 | else if (buf[0]==_T('0') && (buf[1]==_T('x') || buf[1]==_T('X'))) 57 | { 58 | fmt = NUM_HEX_0X; 59 | if (sscanf(buf+2, _T("%X"),&num) <= 0) 60 | {} 61 | } 62 | else if (buf[0]>=_T('0') && buf[0]<=_T('9')) 63 | { 64 | fmt = NUM_DEC; 65 | if (sscanf(buf, _T("%d"),&num) <= 0) 66 | {} 67 | } 68 | else 69 | fmt = NUM_ERR; 70 | 71 | return num; 72 | } 73 | 74 | 75 | void CFormatNums::SetNumber(CWnd *pCtrl, int num, NumFmt fmt) 76 | { 77 | TCHAR buf[32]; 78 | 79 | buf[0] = 0; 80 | 81 | switch (fmt) 82 | { 83 | case NUM_ERR: 84 | case NUM_HEX_0X: 85 | wsprintf(buf,_T("0x%04X"),num); 86 | break; 87 | case NUM_HEX_DOL: 88 | wsprintf(buf,_T("$%04X"),num); 89 | break; 90 | case NUM_DEC: 91 | wsprintf(buf,_T("%d"),num); 92 | break; 93 | default: 94 | ASSERT(FALSE); 95 | } 96 | 97 | if (pCtrl) 98 | { 99 | pCtrl->SetWindowText(buf); 100 | pCtrl->UpdateWindow(); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /FormatNums.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #ifndef _format_nums_ 22 | #define _format_nums_ 23 | 24 | 25 | class CFormatNums 26 | { 27 | public: 28 | enum NumFmt { NUM_ERR, NUM_DEC, NUM_HEX_0X, NUM_HEX_DOL }; 29 | 30 | int ReadNumber(CWnd *pCtrl, NumFmt &fmt); 31 | void SetNumber(CWnd *pCtrl, int num, NumFmt fmt); 32 | void IncEditField(CWnd *pCtrl, int iDelta, int iMin, int iMax); 33 | }; 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Global.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Global.cpp -------------------------------------------------------------------------------- /Global.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Global.h -------------------------------------------------------------------------------- /HyperLink.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // 1998 Microsoft Systems Journal 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | #include "StdAfx.h" 7 | #include "HyperLink.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ////////////////// 16 | // Navigate link -- ie, execute the file 17 | // Returns instance handle of app run, or error code (just like ShellExecute) 18 | // 19 | HINSTANCE CHyperlink::Navigate() 20 | { 21 | return IsEmpty() ? NULL : ShellExecute(0, _T("open"), *this, 0, 0, SW_SHOWNORMAL); 22 | } 23 | -------------------------------------------------------------------------------- /HyperLink.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // 1998 Microsoft Systems Journal 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | // CHyperlink implements a simple text hyperlink 7 | // 8 | #ifndef _HYPRILNK_H 9 | #define _HYPRILNK_H 10 | 11 | ////////////////// 12 | // Simple text hyperlink derived from CString 13 | // 14 | class CHyperlink : public CString 15 | { 16 | public: 17 | CHyperlink(LPCTSTR lpLink = NULL) : CString(lpLink) 18 | {} 19 | ~CHyperlink() 20 | {} 21 | 22 | const CHyperlink& operator = (LPCTSTR lpsz) 23 | { 24 | CString::operator=(lpsz); 25 | return *this; 26 | } 27 | 28 | operator PCSTR() 29 | { 30 | return CString::operator LPCTSTR(); 31 | } 32 | 33 | HINSTANCE Navigate(); 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /IOWindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/IOWindow.cpp -------------------------------------------------------------------------------- /IOWindow.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/IOWindow.h -------------------------------------------------------------------------------- /Ident.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Ident.h -------------------------------------------------------------------------------- /IdentInfoDoc.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IdentInfoDoc.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | #include "IdentInfoDoc.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CIdentInfoDoc 36 | 37 | IMPLEMENT_DYNCREATE(CIdentInfoDoc, CDocument) 38 | 39 | CIdentInfoDoc::CIdentInfoDoc() 40 | { 41 | } 42 | 43 | 44 | BOOL CIdentInfoDoc::OnNewDocument() 45 | { 46 | if (!CDocument::OnNewDocument()) 47 | return false; 48 | return true; 49 | } 50 | 51 | 52 | CIdentInfoDoc::~CIdentInfoDoc() 53 | { 54 | } 55 | 56 | 57 | BEGIN_MESSAGE_MAP(CIdentInfoDoc, CDocument) 58 | //{{AFX_MSG_MAP(CIdentInfoDoc) 59 | // NOTE - the ClassWizard will add and remove mapping macros here. 60 | //}}AFX_MSG_MAP 61 | END_MESSAGE_MAP() 62 | 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // CIdentInfoDoc diagnostics 65 | 66 | #ifdef _DEBUG 67 | void CIdentInfoDoc::AssertValid() const 68 | { 69 | CDocument::AssertValid(); 70 | } 71 | 72 | void CIdentInfoDoc::Dump(CDumpContext& dc) const 73 | { 74 | CDocument::Dump(dc); 75 | } 76 | #endif //_DEBUG 77 | 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // CIdentInfoDoc serialization 80 | 81 | void CIdentInfoDoc::Serialize(CArchive& ar) 82 | { 83 | if (ar.IsStoring()) 84 | { 85 | // TODO: add storing code here 86 | } 87 | else 88 | { 89 | // TODO: add loading code here 90 | } 91 | } 92 | 93 | ///////////////////////////////////////////////////////////////////////////// 94 | // CIdentInfoDoc commands 95 | -------------------------------------------------------------------------------- /IdentInfoDoc.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IdentInfoDoc.h : header file 22 | // 23 | #include "DebugInfo.h" 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CIdentInfoDoc document 27 | 28 | class CIdentInfoDoc : public CDocument 29 | { 30 | CDebugInfo *m_pDebug; 31 | 32 | public: 33 | void GetIdent(int index, CString &str, CIdent &info) 34 | { 35 | ASSERT(m_pDebug != NULL); 36 | m_pDebug->GetIdent(index,str,info); 37 | } 38 | int GetIdentCount() 39 | { 40 | ASSERT(m_pDebug != NULL); 41 | return m_pDebug->GetIdentCount(); 42 | } 43 | //protected: 44 | // CIdentInfoDoc(); // protected constructor used by dynamic creation 45 | DECLARE_DYNCREATE(CIdentInfoDoc) 46 | 47 | public: 48 | // CIdentInfoDoc(CDebugInfo *pDebug); 49 | void SetDebugInfo(CDebugInfo *pDebug) 50 | { m_pDebug = pDebug; } 51 | 52 | // Attributes 53 | public: 54 | 55 | // Operations 56 | public: 57 | 58 | // Overrides 59 | // ClassWizard generated virtual function overrides 60 | //{{AFX_VIRTUAL(CIdentInfoDoc) 61 | public: 62 | virtual void Serialize(CArchive& ar); // overridden for document i/o 63 | protected: 64 | virtual BOOL OnNewDocument(); 65 | //}}AFX_VIRTUAL 66 | 67 | // Implementation 68 | public: 69 | CIdentInfoDoc(); 70 | virtual ~CIdentInfoDoc(); 71 | #ifdef _DEBUG 72 | virtual void AssertValid() const; 73 | virtual void Dump(CDumpContext& dc) const; 74 | #endif 75 | 76 | // Generated message map functions 77 | protected: 78 | //{{AFX_MSG(CIdentInfoDoc) 79 | // NOTE - the ClassWizard will add and remove member functions here. 80 | //}}AFX_MSG 81 | DECLARE_MESSAGE_MAP() 82 | }; 83 | -------------------------------------------------------------------------------- /IdentInfoFrame.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IdentInfoFrame.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | #include "IdentInfoFrame.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CIdentInfoFrame 36 | 37 | IMPLEMENT_DYNCREATE(CIdentInfoFrame, CMiniFrameWnd) //CFrameWnd) 38 | 39 | CIdentInfoFrame::CIdentInfoFrame() 40 | { 41 | } 42 | 43 | CIdentInfoFrame::~CIdentInfoFrame() 44 | { 45 | } 46 | 47 | 48 | BEGIN_MESSAGE_MAP(CIdentInfoFrame, CMiniFrameWnd) //CFrameWnd) 49 | //{{AFX_MSG_MAP(CIdentInfoFrame) 50 | //}}AFX_MSG_MAP 51 | END_MESSAGE_MAP() 52 | 53 | ///////////////////////////////////////////////////////////////////////////// 54 | // CIdentInfoFrame message handlers 55 | -------------------------------------------------------------------------------- /IdentInfoFrame.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IdentInfoFrame.h : header file 22 | // 23 | 24 | #include "ChildFrm.h" 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // CIdentInfoFrame frame 28 | 29 | class CIdentInfoFrame : public CMiniFrameWnd //CFrameWnd 30 | { 31 | DECLARE_DYNCREATE(CIdentInfoFrame) 32 | protected: 33 | CIdentInfoFrame(); // protected constructor used by dynamic creation 34 | 35 | // Attributes 36 | public: 37 | 38 | // Operations 39 | public: 40 | 41 | // Overrides 42 | // ClassWizard generated virtual function overrides 43 | //{{AFX_VIRTUAL(CIdentInfoFrame) 44 | //}}AFX_VIRTUAL 45 | 46 | // Implementation 47 | protected: 48 | // CIdentInfoFrame(); 49 | virtual ~CIdentInfoFrame(); 50 | 51 | // Generated message map functions 52 | //{{AFX_MSG(CIdentInfoFrame) 53 | //}}AFX_MSG 54 | DECLARE_MESSAGE_MAP() 55 | }; 56 | 57 | ///////////////////////////////////////////////////////////////////////////// 58 | -------------------------------------------------------------------------------- /IdentInfoView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/IdentInfoView.cpp -------------------------------------------------------------------------------- /IdentInfoView.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IdentInfoView.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CIdentInfoView view 26 | 27 | class CIdentInfoView : public CListView 28 | { 29 | static int CALLBACK CompareLVIFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); 30 | int m_nSortBy; 31 | 32 | protected: 33 | CIdentInfoView(); // protected constructor used by dynamic creation 34 | DECLARE_DYNCREATE(CIdentInfoView) 35 | 36 | // Attributes 37 | public: 38 | 39 | // Operations 40 | public: 41 | 42 | // Overrides 43 | // ClassWizard generated virtual function overrides 44 | //{{AFX_VIRTUAL(CIdentInfoView) 45 | public: 46 | virtual void OnInitialUpdate(); 47 | protected: 48 | virtual void OnDraw(CDC* pDC); // overridden to draw this view 49 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | virtual ~CIdentInfoView(); 55 | #ifdef _DEBUG 56 | virtual void AssertValid() const; 57 | virtual void Dump(CDumpContext& dc) const; 58 | #endif 59 | 60 | // Generated message map functions 61 | protected: 62 | //{{AFX_MSG(CIdentInfoView) 63 | afx_msg void OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult); 64 | afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult); 65 | //}}AFX_MSG 66 | DECLARE_MESSAGE_MAP() 67 | }; 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | -------------------------------------------------------------------------------- /InputWnd.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | 22 | #include "stdafx.h" 23 | #include "M6502.h" 24 | #include "DialAsmStat.h" 25 | 26 | 27 | class CInputWnd : CWnd 28 | { 29 | void open(const CString &fname); 30 | void close(); 31 | void seek_to_begin(); 32 | LPTSTR read_line(LPTSTR str, UINT max_len); 33 | int get_line_no(); 34 | const CString &get_file_name(); 35 | }; 36 | 37 | 38 | LPTSTR CInputWnd::read_line(LPTSTR str, UINT max_len) 39 | { 40 | int ret= SendMessage(WM_USER_GET_NEXT_LINE, WPARAM(max_len), LPARAM(str)); 41 | ASSERT(ret); 42 | return str; 43 | } 44 | 45 | 46 | int CInputWnd::get_line_no() 47 | { 48 | int no; 49 | int ret= SendMessage(WM_USER_GET_LINE_NO, 0, LPARAM(&no)); 50 | ASSERT(ret); 51 | return no; 52 | } 53 | 54 | 55 | const CString &CInputWnd::get_file_name() 56 | { 57 | CString fname; 58 | int ret= SendMessage(WM_USER_GET_TITLE, WPARAM(_MAX_PATH), LPARAM(fname.GetBuffer(_MAX_PATH+1))); 59 | fname.ReleaseBuffer(); 60 | ASSERT(ret); 61 | return fname; 62 | } 63 | -------------------------------------------------------------------------------- /IntGenerator.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IntGenerator.cpp: implementation of the CIntGenerator class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #include "stdafx.h" 26 | #include "IntGenerator.h" 27 | 28 | #ifdef _DEBUG 29 | #undef THIS_FILE 30 | static char THIS_FILE[]=__FILE__; 31 | #define new DEBUG_NEW 32 | #endif 33 | 34 | ////////////////////////////////////////////////////////////////////// 35 | // Construction/Destruction 36 | ////////////////////////////////////////////////////////////////////// 37 | 38 | CIntGenerator::CIntGenerator() 39 | { 40 | m_nIRQTimeLapse = 100; 41 | m_bGenerateIRQ = false; 42 | 43 | m_nNMITimeLapse = 50; 44 | m_bGenerateNMI = false; 45 | } 46 | 47 | CIntGenerator::~CIntGenerator() 48 | {} 49 | -------------------------------------------------------------------------------- /IntGenerator.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IntGenerator.h: interface for the CIntGenerator class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #if !defined(AFX_INTGENERATOR_H__95B80699_804F_41D1_9BFE_B7618C2D1151__INCLUDED_) 26 | #define AFX_INTGENERATOR_H__95B80699_804F_41D1_9BFE_B7618C2D1151__INCLUDED_ 27 | 28 | #if _MSC_VER > 1000 29 | #pragma once 30 | #endif // _MSC_VER > 1000 31 | 32 | class CIntGenerator 33 | { 34 | public: 35 | CIntGenerator(); 36 | ~CIntGenerator(); 37 | 38 | int m_nIRQTimeLapse; 39 | bool m_bGenerateIRQ; 40 | 41 | int m_nNMITimeLapse; 42 | bool m_bGenerateNMI; 43 | }; 44 | 45 | #endif // !defined(AFX_INTGENERATOR_H__95B80699_804F_41D1_9BFE_B7618C2D1151__INCLUDED_) 46 | -------------------------------------------------------------------------------- /IntRequestGeneratorDlg.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // IntRequestGeneratorDlg.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | #include "resource.h" 26 | #include "IntRequestGeneratorDlg.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CIntRequestGeneratorDlg dialog 36 | 37 | 38 | CIntRequestGeneratorDlg::CIntRequestGeneratorDlg(CWnd* pParent /*=NULL*/) 39 | : CDialog(CIntRequestGeneratorDlg::IDD, pParent) 40 | { 41 | //{{AFX_DATA_INIT(CIntRequestGeneratorDlg) 42 | m_bGenerateIRQ = FALSE; 43 | m_bGenerateNMI = FALSE; 44 | m_uIRQTimeLapse = 0; 45 | m_uNMITimeLapse = 0; 46 | //}}AFX_DATA_INIT 47 | } 48 | 49 | 50 | void CIntRequestGeneratorDlg::DoDataExchange(CDataExchange* pDX) 51 | { 52 | CDialog::DoDataExchange(pDX); 53 | //{{AFX_DATA_MAP(CIntRequestGeneratorDlg) 54 | DDX_Check(pDX, IDC_GEN_IRQ, m_bGenerateIRQ); 55 | DDX_Check(pDX, IDC_GEN_NMI, m_bGenerateNMI); 56 | DDX_Text(pDX, IDC_IRQ_LAPSE, m_uIRQTimeLapse); 57 | DDV_MinMaxUInt(pDX, m_uIRQTimeLapse, 1, 2147483647); 58 | DDX_Text(pDX, IDC_NMI_LAPSE, m_uNMITimeLapse); 59 | DDV_MinMaxUInt(pDX, m_uNMITimeLapse, 1, 2147483647); 60 | //}}AFX_DATA_MAP 61 | } 62 | 63 | 64 | BEGIN_MESSAGE_MAP(CIntRequestGeneratorDlg, CDialog) 65 | //{{AFX_MSG_MAP(CIntRequestGeneratorDlg) 66 | // NOTE: the ClassWizard will add message map macros here 67 | //}}AFX_MSG_MAP 68 | END_MESSAGE_MAP() 69 | 70 | ///////////////////////////////////////////////////////////////////////////// 71 | // CIntRequestGeneratorDlg message handlers 72 | -------------------------------------------------------------------------------- /IntRequestGeneratorDlg.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_INTREQUESTGENERATORDLG_H__1AEFC032_2D6B_4A3D_8DE5_5BB89CB76F80__INCLUDED_) 22 | #define AFX_INTREQUESTGENERATORDLG_H__1AEFC032_2D6B_4A3D_8DE5_5BB89CB76F80__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | // IntRequestGeneratorDlg.h : header file 28 | // 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // CIntRequestGeneratorDlg dialog 32 | 33 | class CIntRequestGeneratorDlg : public CDialog 34 | { 35 | // Construction 36 | public: 37 | CIntRequestGeneratorDlg(CWnd* pParent = NULL); // standard constructor 38 | 39 | // Dialog Data 40 | //{{AFX_DATA(CIntRequestGeneratorDlg) 41 | enum { IDD = IDD_INTERRUPTS }; 42 | BOOL m_bGenerateIRQ; 43 | BOOL m_bGenerateNMI; 44 | UINT m_uIRQTimeLapse; 45 | UINT m_uNMITimeLapse; 46 | //}}AFX_DATA 47 | 48 | 49 | // Overrides 50 | // ClassWizard generated virtual function overrides 51 | //{{AFX_VIRTUAL(CIntRequestGeneratorDlg) 52 | protected: 53 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 54 | //}}AFX_VIRTUAL 55 | 56 | // Implementation 57 | protected: 58 | 59 | // Generated message map functions 60 | //{{AFX_MSG(CIntRequestGeneratorDlg) 61 | // NOTE: the ClassWizard will add member functions here 62 | //}}AFX_MSG 63 | DECLARE_MESSAGE_MAP() 64 | }; 65 | 66 | //{{AFX_INSERT_LOCATION}} 67 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 68 | 69 | #endif // !defined(AFX_INTREQUESTGENERATORDLG_H__1AEFC032_2D6B_4A3D_8DE5_5BB89CB76F80__INCLUDED_) 70 | -------------------------------------------------------------------------------- /IntelHex.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/IntelHex.cpp -------------------------------------------------------------------------------- /IntelHex.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #ifndef _intel_hex_ 22 | #define _intel_hex_ 23 | 24 | class COutputMem; 25 | class CMarkArea; 26 | 27 | class CIntelHex 28 | { 29 | UINT geth(const TCHAR *&ptr, UINT &sum); // interpretacja dwucyfrowej liczby hex 30 | UINT row; 31 | 32 | public: 33 | void SaveHexFormat(CArchive &archive, COutputMem &mem, CMarkArea &area, int prog_start= -1); 34 | 35 | void LoadHexFormat(CArchive &archive, COutputMem &mem, CMarkArea &area, int &prog_start); 36 | 37 | class CIntelHexException //: public CException 38 | { 39 | public: 40 | enum Err { E_NONE, E_BAD_FORMAT, E_CHKSUM, E_FORMAT }; 41 | private: 42 | Err error; 43 | UINT row; 44 | public: 45 | CIntelHexException(Err err= E_NONE, UINT row= 0) : error(err), row(row) 46 | { } 47 | /*virtual*/ ~CIntelHexException() 48 | {} 49 | 50 | /*virtual*/ bool GetErrorMessage(LPTSTR lpszError, UINT nMaxError, PUINT pnHelpContext = NULL); 51 | }; 52 | }; 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 mikekov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LeftBar.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_LEFTBAR_H__6B81B5B6_5388_11D3_B4BA_000000000000__INCLUDED_) 22 | #define AFX_LEFTBAR_H__6B81B5B6_5388_11D3_B4BA_000000000000__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | // LeftBar.h : header file 28 | // 29 | #include "DrawMarks.h" 30 | class CSrc6502View; 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | // CLeftBar window 34 | 35 | class CLeftBar : public CControlBar, public CMarks 36 | { 37 | // Construction 38 | public: 39 | CLeftBar(); 40 | 41 | // Attributes 42 | public: 43 | 44 | // Operations 45 | public: 46 | bool Create(CWnd* pParent, CSrc6502View* pView); 47 | 48 | void DrawMark(); 49 | void SetWidth(int nWidth); 50 | 51 | void RedrawLine(int nLine); 52 | 53 | // Overrides 54 | // ClassWizard generated virtual function overrides 55 | //{{AFX_VIRTUAL(CLeftBar) 56 | //}}AFX_VIRTUAL 57 | 58 | // Implementation 59 | public: 60 | virtual ~CLeftBar(); 61 | 62 | virtual CSize CalcFixedLayout( BOOL bStretch, BOOL bHorz ) 63 | { return MySize(); } 64 | virtual CSize CalcDynamicLayout( int nLength, DWORD dwMode ) 65 | { return MySize(); } 66 | virtual void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler ) 67 | { } 68 | CSize MySize(); 69 | 70 | virtual void DoPaint(CDC* pDC); 71 | 72 | COLORREF GetBkColor(); 73 | 74 | // Generated message map functions 75 | protected: 76 | //{{AFX_MSG(CLeftBar) 77 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 78 | //}}AFX_MSG 79 | 80 | DECLARE_MESSAGE_MAP() 81 | 82 | private: 83 | int m_nBarWidth; 84 | CSrc6502View* m_pEditView; 85 | }; 86 | 87 | ///////////////////////////////////////////////////////////////////////////// 88 | 89 | //{{AFX_INSERT_LOCATION}} 90 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 91 | 92 | #endif // !defined(AFX_LEFTBAR_H__6B81B5B6_5388_11D3_B4BA_000000000000__INCLUDED_) 93 | -------------------------------------------------------------------------------- /LoadCode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/LoadCode.cpp -------------------------------------------------------------------------------- /LoadCode.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // LoadCode.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CLoadCode dialog 26 | 27 | class CLoadCode : public CFileDialog 28 | { 29 | CString m_strTitle; 30 | int m_nPos; 31 | static int m_nInitPos; 32 | 33 | DECLARE_DYNAMIC(CLoadCode) 34 | 35 | public: 36 | CLoadCode(LPCTSTR lpszFileName = NULL, 37 | LPCTSTR lpszFilter = NULL, 38 | CWnd* pParentWnd = NULL); 39 | 40 | void LoadCode(); 41 | 42 | protected: 43 | //{{AFX_MSG(CLoadCode) 44 | virtual BOOL OnInitDialog(); 45 | //}}AFX_MSG 46 | DECLARE_MESSAGE_MAP() 47 | 48 | // virtual void OnTypeChange(); 49 | }; 50 | -------------------------------------------------------------------------------- /LoadCodeOptions.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // LoadCodeOptions.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | #include "resource.h" 26 | #include "LoadCodeOptions.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | 35 | UINT CLoadCodeOptions::m_uStart= 0; 36 | BOOL CLoadCodeOptions::m_bClearMem= true; 37 | UINT CLoadCodeOptions::m_uFill= 0x00; 38 | 39 | ///////////////////////////////////////////////////////////////////////////// 40 | // CLoadCodeOptions dialog 41 | 42 | 43 | CLoadCodeOptions::CLoadCodeOptions(CWnd* pParent /*=NULL*/) 44 | : CDialog(CLoadCodeOptions::IDD, pParent) 45 | { 46 | //{{AFX_DATA_INIT(CLoadCodeOptions) 47 | //}}AFX_DATA_INIT 48 | } 49 | 50 | 51 | extern void AFX_CDECL DDX_HexDec(CDataExchange* pDX, int nIDC, unsigned int &num, bool bWord= true); 52 | 53 | void CLoadCodeOptions::DoDataExchange(CDataExchange* pDX) 54 | { 55 | CDialog::DoDataExchange(pDX); 56 | //{{AFX_DATA_MAP(CLoadCodeOptions) 57 | DDX_HexDec(pDX, IDC_LOAD_CODE_START, m_uStart); 58 | DDV_MinMaxUInt(pDX, m_uStart, 0, 65535); 59 | DDX_Check(pDX, IDC_LOAD_CODE_CLR, m_bClearMem); 60 | DDX_HexDec(pDX, IDC_LOAD_CODE_FILL_VALUE, m_uFill, false); 61 | DDV_MinMaxUInt(pDX, m_uFill, 0, 255); 62 | //}}AFX_DATA_MAP 63 | } 64 | 65 | 66 | BEGIN_MESSAGE_MAP(CLoadCodeOptions, CDialog) 67 | //{{AFX_MSG_MAP(CLoadCodeOptions) 68 | // NOTE: the ClassWizard will add message map macros here 69 | //}}AFX_MSG_MAP 70 | END_MESSAGE_MAP() 71 | 72 | ///////////////////////////////////////////////////////////////////////////// 73 | // CLoadCodeOptions message handlers 74 | -------------------------------------------------------------------------------- /LoadCodeOptions.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // LoadCodeOptions.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CLoadCodeOptions dialog 26 | 27 | class CLoadCodeOptions : public CDialog 28 | { 29 | // Construction 30 | public: 31 | CLoadCodeOptions(CWnd* pParent = NULL); // standard constructor 32 | 33 | // Dialog Data 34 | //{{AFX_DATA(CLoadCodeOptions) 35 | enum { IDD = IDD_LOAD_CODE_OPT }; 36 | //}}AFX_DATA 37 | static UINT m_uStart; 38 | static BOOL m_bClearMem; 39 | static UINT m_uFill; 40 | 41 | // Overrides 42 | // ClassWizard generated virtual function overrides 43 | //{{AFX_VIRTUAL(CLoadCodeOptions) 44 | protected: 45 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 46 | //}}AFX_VIRTUAL 47 | 48 | // Implementation 49 | protected: 50 | 51 | // Generated message map functions 52 | //{{AFX_MSG(CLoadCodeOptions) 53 | // NOTE: the ClassWizard will add member functions here 54 | //}}AFX_MSG 55 | DECLARE_MESSAGE_MAP() 56 | }; 57 | -------------------------------------------------------------------------------- /LogBuffer.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // LogBuffer.cpp: implementation of the CLogBuffer class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #include "stdafx.h" 26 | #include "LogBuffer.h" 27 | 28 | #ifdef _DEBUG 29 | #undef THIS_FILE 30 | static char THIS_FILE[]=__FILE__; 31 | #define new DEBUG_NEW 32 | #endif 33 | 34 | ////////////////////////////////////////////////////////////////////// 35 | // Construction/Destruction 36 | ////////////////////////////////////////////////////////////////////// 37 | 38 | -------------------------------------------------------------------------------- /LogBuffer.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // LogBuffer.h: interface for the CLogBuffer class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #if !defined(AFX_LOGBUFFER_H__F7F5D1B0_569C_4E6D_A034_D79FB77DB930__INCLUDED_) 26 | #define AFX_LOGBUFFER_H__F7F5D1B0_569C_4E6D_A034_D79FB77DB930__INCLUDED_ 27 | 28 | #if _MSC_VER > 1000 29 | #pragma once 30 | #endif // _MSC_VER > 1000 31 | #include 32 | 33 | // Logging class: recording consecutive items in the buffer overwriting 34 | // old values 35 | 36 | template 37 | class CLogBuffer 38 | { 39 | public: 40 | CLogBuffer(int nSize= 100000) 41 | { m_vBuffer.resize(nSize); m_pHead = &m_vBuffer.front(); m_bFull = false; } 42 | 43 | ~CLogBuffer() {} 44 | 45 | // record item 46 | void Record(const T& t) 47 | { 48 | *m_pHead++ = t; 49 | if (m_pHead >= &m_vBuffer.back() + 1) 50 | { 51 | m_pHead = &m_vBuffer.front(); 52 | m_bFull = true; 53 | } 54 | } 55 | 56 | // no of items recorded 57 | int GetCount() const 58 | { 59 | return m_bFull ? m_vBuffer.size() : m_pHead - &m_vBuffer.front(); 60 | } 61 | 62 | // get n-th item 63 | const T& operator [] (int nIndex) const 64 | { 65 | ASSERT(nIndex >= 0 && nIndex < GetCount()); 66 | const T* pStart= m_bFull ? m_pHead : &m_vBuffer.front(); 67 | pStart += nIndex; 68 | if (pStart >= &m_vBuffer.back() + 1) 69 | return pStart[0-m_vBuffer.size()]; 70 | else 71 | return *pStart; 72 | } 73 | 74 | // empty buffer 75 | void Clear() 76 | { 77 | m_pHead = &m_vBuffer.front(); 78 | m_bFull = false; 79 | } 80 | 81 | private: 82 | std::vector m_vBuffer; 83 | T* m_pHead; 84 | bool m_bFull; 85 | }; 86 | 87 | #endif // !defined(AFX_LOGBUFFER_H__F7F5D1B0_569C_4E6D_A034_D79FB77DB930__INCLUDED_) 88 | -------------------------------------------------------------------------------- /LogWindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/LogWindow.cpp -------------------------------------------------------------------------------- /LogWindow.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_LOGWINDOW_H__8C02C384_F043_404A_A895_3D02CB27FAAA__INCLUDED_) 22 | #define AFX_LOGWINDOW_H__8C02C384_F043_404A_A895_3D02CB27FAAA__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | // LogWindow.h : header file 28 | // 29 | struct CmdInfo; 30 | 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | // CLogWindow frame 34 | 35 | class CLogWindow : public CMiniFrameWnd 36 | { 37 | DECLARE_DYNCREATE(CLogWindow) 38 | 39 | // Attributes 40 | public: 41 | void SetText(const CommandLog& log); 42 | void Invalidate(); 43 | CRect m_WndRect; 44 | bool m_bHidden; 45 | 46 | // Operations 47 | public: 48 | bool Create(); 49 | 50 | // Overrides 51 | // ClassWizard generated virtual function overrides 52 | //{{AFX_VIRTUAL(CLogWindow) 53 | protected: 54 | virtual void PostNcDestroy(); 55 | //}}AFX_VIRTUAL 56 | 57 | // Implementation 58 | public: 59 | CLogWindow(); 60 | virtual ~CLogWindow(); 61 | 62 | // Generated message map functions 63 | //{{AFX_MSG(CLogWindow) 64 | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 65 | afx_msg void OnDestroy(); 66 | afx_msg void OnClose(); 67 | //}}AFX_MSG 68 | DECLARE_MESSAGE_MAP() 69 | 70 | CFont m_fntMono; 71 | CBrush m_brBackground; 72 | afx_msg LRESULT OnChangeCode(WPARAM wParam, LPARAM lParam); 73 | afx_msg LRESULT OnStartDebug(WPARAM /*wParam*/, LPARAM /* lParam */); 74 | afx_msg LRESULT OnExitDebug(WPARAM /*wParam*/, LPARAM /* lParam */); 75 | }; 76 | 77 | ///////////////////////////////////////////////////////////////////////////// 78 | 79 | //{{AFX_INSERT_LOCATION}} 80 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 81 | 82 | #endif // !defined(AFX_LOGWINDOW_H__8C02C384_F043_404A_A895_3D02CB27FAAA__INCLUDED_) 83 | -------------------------------------------------------------------------------- /M6502.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/M6502.cpp -------------------------------------------------------------------------------- /M6502.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/M6502.h -------------------------------------------------------------------------------- /M6502x.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/M6502x.cpp -------------------------------------------------------------------------------- /MainFrm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MainFrm.cpp -------------------------------------------------------------------------------- /MainFrm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MainFrm.h -------------------------------------------------------------------------------- /MakeHelp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM -- First make map file from Microsoft Visual C++ generated resource.h 3 | echo // MAKEHELP.BAT generated Help Map file. Used by 6502.HPJ. >"hlp\6502.hm" 4 | echo. >>"hlp\6502.hm" 5 | echo // Commands (ID_* and IDM_*) >>"hlp\6502.hm" 6 | makehm ID_,HID_,0x10000 IDM_,HIDM_,0x10000 resource.h >>"hlp\6502.hm" 7 | echo. >>"hlp\6502.hm" 8 | echo // Prompts (IDP_*) >>"hlp\6502.hm" 9 | makehm IDP_,HIDP_,0x30000 resource.h >>"hlp\6502.hm" 10 | echo. >>"hlp\6502.hm" 11 | echo // Resources (IDR_*) >>"hlp\6502.hm" 12 | makehm IDR_,HIDR_,0x20000 resource.h >>"hlp\6502.hm" 13 | echo. >>"hlp\6502.hm" 14 | echo // Dialogs (IDD_*) >>"hlp\6502.hm" 15 | makehm IDD_,HIDD_,0x20000 resource.h >>"hlp\6502.hm" 16 | echo. >>"hlp\6502.hm" 17 | echo // Frame Controls (IDW_*) >>"hlp\6502.hm" 18 | makehm IDW_,HIDW_,0x50000 resource.h >>"hlp\6502.hm" 19 | echo // Obiekty w oknach dialogowych (IDC_*) >>"hlp\6502.hm" 20 | makehm IDC_,HIDC_,0xA0000 resource.h >>"hlp\6502.hm" 21 | echo. >>"hlp\6502.hm" 22 | REM -- Make help for Project 6502 23 | 24 | 25 | echo Building Win32 Help files 26 | start /wait hcrtf -x "hlp\6502.hpj" 27 | echo. 28 | if exist Debug\nul copy "hlp\6502.hlp" Debug 29 | if exist Debug\nul copy "hlp\6502.cnt" Debug 30 | if exist Release\nul copy "hlp\6502.hlp" Release 31 | if exist Release\nul copy "hlp\6502.cnt" Release 32 | if exist Static\nul copy "hlp\6502.hlp" Static 33 | if exist Static\nul copy "hlp\6502.cnt" Static 34 | echo. 35 | 36 | 37 | -------------------------------------------------------------------------------- /MapFile.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MapFile.cpp -------------------------------------------------------------------------------- /MapFile.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #ifndef _map_file_ 22 | #define _map_file_ 23 | 24 | #include "Asm.h" 25 | 26 | 27 | class CMapFile : CArray, public CAsm 28 | { 29 | CMap m_PathToFuid; 30 | int m_nLastUID; 31 | 32 | public: 33 | CMapFile() : m_nLastUID(0) 34 | {} 35 | ~CMapFile() 36 | {} 37 | 38 | void Reset() 39 | { m_nLastUID = 0; m_PathToFuid.RemoveAll(); RemoveAll(); } 40 | 41 | LPCTSTR GetPath(FileUID fuid); 42 | FileUID GetFileUID(LPCTSTR path); 43 | }; 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /MarkArea.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MarkArea.cpp -------------------------------------------------------------------------------- /MarkArea.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #ifndef _mark_h_ 22 | #define _mark_h_ 23 | 24 | class CMarkArea 25 | { 26 | struct Pair 27 | { int a,b; }; 28 | int start; 29 | UINT n; 30 | CArray arr; 31 | 32 | public: 33 | 34 | CMarkArea() : start(-1), n(0) 35 | { } 36 | 37 | void SetStart(int s) 38 | { ASSERT(s>=0); start = s; } 39 | 40 | void SetEnd(int end); 41 | 42 | bool IsStartSet() 43 | { return start != -1; } 44 | 45 | UINT GetSize() 46 | { return n; } 47 | 48 | bool GetPartition(UINT no, int &a, int &b); 49 | 50 | void Clear() 51 | { 52 | start = -1; 53 | n = 0; 54 | arr.RemoveAll(); 55 | } 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /MemoryChg.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_MEMORYCHG_H__82E05821_16FE_11D1_A91F_444553540000__INCLUDED_) 22 | #define AFX_MEMORYCHG_H__82E05821_16FE_11D1_A91F_444553540000__INCLUDED_ 23 | 24 | #if _MSC_VER >= 1000 25 | #pragma once 26 | #endif // _MSC_VER >= 1000 27 | // MemoryChg.h : header file 28 | // 29 | 30 | #include "OutputMem.h" 31 | 32 | ///////////////////////////////////////////////////////////////////////////// 33 | // CMemoryChg dialog 34 | 35 | class CMemoryChg : public CDialog 36 | { 37 | COutputMem& m_Mem; 38 | 39 | void Modify(); 40 | // Construction 41 | public: 42 | CMemoryChg(COutputMem& mem, CWnd* pParent = NULL); // standard constructor 43 | 44 | // Dialog Data 45 | //{{AFX_DATA(CMemoryChg) 46 | enum { IDD = IDD_MEMORY_CHG }; 47 | UINT m_uAddr; 48 | int m_nData; 49 | int m_nByte; 50 | BOOL m_bSigned; 51 | //}}AFX_DATA 52 | 53 | 54 | // Overrides 55 | // ClassWizard generated virtual function overrides 56 | //{{AFX_VIRTUAL(CMemoryChg) 57 | protected: 58 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 59 | //}}AFX_VIRTUAL 60 | 61 | // Implementation 62 | protected: 63 | 64 | // Generated message map functions 65 | //{{AFX_MSG(CMemoryChg) 66 | afx_msg void OnChangeMemoryAddr(); 67 | afx_msg void OnMemorySigned(); 68 | afx_msg void OnMemoryByte(); 69 | afx_msg void OnMemoryWord(); 70 | virtual void OnOK(); 71 | afx_msg void OnMemoryChg(); 72 | //}}AFX_MSG 73 | DECLARE_MESSAGE_MAP() 74 | }; 75 | 76 | //{{AFX_INSERT_LOCATION}} 77 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 78 | 79 | #endif // !defined(AFX_MEMORYCHG_H__82E05821_16FE_11D1_A91F_444553540000__INCLUDED_) 80 | -------------------------------------------------------------------------------- /MemoryDC.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // MemoryDC.cpp: implementation of the CMemoryDC class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #include "stdafx.h" 26 | #include "MemoryDC.h" 27 | 28 | #ifdef _DEBUG 29 | #undef THIS_FILE 30 | static char THIS_FILE[]=__FILE__; 31 | #define new DEBUG_NEW 32 | #endif 33 | 34 | ////////////////////////////////////////////////////////////////////// 35 | // Construction/Destruction 36 | ////////////////////////////////////////////////////////////////////// 37 | 38 | CMemoryDC::CMemoryDC(CDC& dc, CWnd* pWnd, COLORREF rgbClrBack/*= -1*/) 39 | { 40 | CRect rect; 41 | pWnd->GetClientRect(rect); 42 | Init(dc, rect, rgbClrBack); 43 | } 44 | 45 | CMemoryDC::CMemoryDC(CDC& dc, const CRect& rect) 46 | { 47 | Init(dc, rect, -1); 48 | } 49 | 50 | 51 | void CMemoryDC::BitBlt() 52 | { 53 | POINT ptOrg= GetWindowOrg(); 54 | CPoint ptVpOrg= GetViewportOrg(); 55 | ptVpOrg -= m_ptPos; 56 | SetViewportOrg(0, 0); 57 | m_pDC->BitBlt(ptOrg.x - ptVpOrg.x, ptOrg.y - ptVpOrg.y, m_Size.cx, m_Size.cy, this, ptOrg.x, ptOrg.y, SRCCOPY); 58 | } 59 | 60 | CMemoryDC::~CMemoryDC() 61 | { 62 | DeleteDC(); // delete in this order! 63 | m_bmpScreen.DeleteObject(); 64 | } 65 | 66 | 67 | 68 | void CMemoryDC::Init(CDC& dc, const CRect& rect, COLORREF rgbClrBack) 69 | { 70 | m_Size = rect.Size(); 71 | m_ptPos = rect.TopLeft(); 72 | m_pDC = &dc; 73 | 74 | m_bmpScreen.CreateCompatibleBitmap(&dc, m_Size.cx, m_Size.cy); 75 | if (m_bmpScreen.m_hObject == 0) 76 | { 77 | DWORD dw= ::GetLastError(); 78 | return; 79 | } 80 | 81 | CreateCompatibleDC(&dc); 82 | SelectObject(&m_bmpScreen); 83 | if (rgbClrBack != -1) 84 | FillSolidRect(0, 0, m_Size.cx, m_Size.cy, rgbClrBack); 85 | 86 | POINT ptOrg= dc.GetWindowOrg(); 87 | SetWindowOrg(ptOrg); 88 | 89 | POINT ptVpOrg= dc.GetViewportOrg(); 90 | SetViewportOrg(-rect.left + ptVpOrg.x, -rect.top + ptVpOrg.y); 91 | 92 | SetBrushOrg(rect.left % 8, rect.top % 8); 93 | } 94 | -------------------------------------------------------------------------------- /MemoryDC.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // MemoryDC.h: interface for the CMemoryDC class. 22 | // 23 | ////////////////////////////////////////////////////////////////////// 24 | 25 | #if !defined(AFX_MEMORYDC_H__1DFA018A_CA70_45E4_87EE_865C0E9982AC__INCLUDED_) 26 | #define AFX_MEMORYDC_H__1DFA018A_CA70_45E4_87EE_865C0E9982AC__INCLUDED_ 27 | 28 | #if _MSC_VER > 1000 29 | #pragma once 30 | #endif // _MSC_VER > 1000 31 | 32 | class CMemoryDC : public CDC 33 | { 34 | public: 35 | CMemoryDC(CDC& dc, CWnd* pWnd, COLORREF rgbClrBack= -1); 36 | CMemoryDC(CDC& dc, const CRect& rect); 37 | virtual ~CMemoryDC(); 38 | 39 | void BitBlt(); 40 | 41 | private: 42 | CDC* m_pDC; 43 | CBitmap m_bmpScreen; 44 | CPoint m_ptPos; 45 | CSize m_Size; 46 | 47 | void Init(CDC& dc, const CRect& rect, COLORREF rgbClrBack); 48 | }; 49 | 50 | #endif // !defined(AFX_MEMORYDC_H__1DFA018A_CA70_45E4_87EE_865C0E9982AC__INCLUDED_) 51 | -------------------------------------------------------------------------------- /MemoryDoc.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // MemoryDoc.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | #include "MemoryDoc.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // CMemoryDoc 36 | 37 | IMPLEMENT_DYNCREATE(CMemoryDoc, CDocument) 38 | 39 | CMemoryDoc::CMemoryDoc() 40 | { 41 | m_uStackPtr = 0x1ff; 42 | m_uAddress = 0; 43 | m_pMem = 0; 44 | } 45 | 46 | BOOL CMemoryDoc::OnNewDocument() 47 | { 48 | if (!CDocument::OnNewDocument()) 49 | return FALSE; 50 | return TRUE; 51 | } 52 | 53 | CMemoryDoc::~CMemoryDoc() 54 | { 55 | } 56 | 57 | 58 | BEGIN_MESSAGE_MAP(CMemoryDoc, CDocument) 59 | //{{AFX_MSG_MAP(CMemoryDoc) 60 | //}}AFX_MSG_MAP 61 | END_MESSAGE_MAP() 62 | 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // CMemoryDoc diagnostics 65 | 66 | #ifdef _DEBUG 67 | void CMemoryDoc::AssertValid() const 68 | { 69 | CDocument::AssertValid(); 70 | } 71 | 72 | void CMemoryDoc::Dump(CDumpContext& dc) const 73 | { 74 | CDocument::Dump(dc); 75 | } 76 | #endif //_DEBUG 77 | 78 | ///////////////////////////////////////////////////////////////////////////// 79 | // CMemoryDoc serialization 80 | 81 | void CMemoryDoc::Serialize(CArchive& ar) 82 | { 83 | if (ar.IsStoring()) 84 | { 85 | // TODO: add storing code here 86 | } 87 | else 88 | { 89 | // TODO: add loading code here 90 | } 91 | } 92 | 93 | ///////////////////////////////////////////////////////////////////////////// 94 | // CMemoryDoc commands 95 | 96 | BOOL CMemoryDoc::DoSave(LPCTSTR lpszPathName, BOOL bReplace/*= TRUE*/) 97 | { 98 | // nop 99 | return false; 100 | } 101 | -------------------------------------------------------------------------------- /MemoryDoc.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // MemoryDoc.h : header file 22 | // 23 | 24 | #ifndef _MemoryDoc_ 25 | #define _MemoryDoc_ 26 | 27 | #include "Asm.h" 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // CMemoryDoc document 31 | class COutputMem; 32 | 33 | 34 | class CMemoryDoc : public CDocument 35 | { 36 | protected: 37 | // CMemoryDoc(); // protected constructor used by dynamic creation 38 | DECLARE_DYNCREATE(CMemoryDoc) 39 | 40 | virtual BOOL DoSave(LPCTSTR lpszPathName, BOOL bReplace = TRUE); 41 | 42 | // Attributes 43 | public: 44 | UINT16 m_uAddress; 45 | UINT16 m_uStackPtr; 46 | COutputMem* m_pMem; 47 | 48 | // Operations 49 | public: 50 | CMemoryDoc(); 51 | 52 | void SetData(COutputMem* pMem, UINT16 uAddress) 53 | { 54 | m_uAddress = uAddress; 55 | m_pMem = pMem; 56 | } 57 | 58 | // Overrides 59 | // ClassWizard generated virtual function overrides 60 | //{{AFX_VIRTUAL(CMemoryDoc) 61 | public: 62 | virtual void Serialize(CArchive& ar); // overridden for document i/o 63 | protected: 64 | virtual BOOL OnNewDocument(); 65 | //}}AFX_VIRTUAL 66 | 67 | // Implementation 68 | public: 69 | virtual ~CMemoryDoc(); 70 | #ifdef _DEBUG 71 | virtual void AssertValid() const; 72 | virtual void Dump(CDumpContext& dc) const; 73 | #endif 74 | 75 | // Generated message map functions 76 | protected: 77 | //{{AFX_MSG(CMemoryDoc) 78 | // NOTE - the ClassWizard will add and remove member functions here. 79 | //}}AFX_MSG 80 | DECLARE_MESSAGE_MAP() 81 | }; 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /MemoryGoto.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // MemoryGoto.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | //#include "6502.h" 26 | #include "MemoryGoto.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | extern void AFX_CDECL DDX_HexDec(CDataExchange* pDX, int nIDC, unsigned int &num, bool bWord= true); 35 | 36 | ///////////////////////////////////////////////////////////////////////////// 37 | // CMemoryGoto dialog 38 | 39 | 40 | CMemoryGoto::CMemoryGoto(CWnd* pParent /*=NULL*/) 41 | : CDialog(CMemoryGoto::IDD, pParent) 42 | { 43 | //{{AFX_DATA_INIT(CMemoryGoto) 44 | m_uAddr = 0; 45 | //}}AFX_DATA_INIT 46 | } 47 | 48 | 49 | void CMemoryGoto::DoDataExchange(CDataExchange* pDX) 50 | { 51 | CDialog::DoDataExchange(pDX); 52 | // DDX_Text(pDX, IDC_MEMORY_ADDR, m_uAddr); 53 | DDX_HexDec(pDX, IDC_MEMORY_ADDR, m_uAddr); 54 | //{{AFX_DATA_MAP(CMemoryGoto) 55 | DDV_MinMaxUInt(pDX, m_uAddr, 0, 65535); 56 | //}}AFX_DATA_MAP 57 | } 58 | 59 | 60 | BEGIN_MESSAGE_MAP(CMemoryGoto, CDialog) 61 | //{{AFX_MSG_MAP(CMemoryGoto) 62 | // NOTE: the ClassWizard will add message map macros here 63 | //}}AFX_MSG_MAP 64 | END_MESSAGE_MAP() 65 | 66 | ///////////////////////////////////////////////////////////////////////////// 67 | // CMemoryGoto message handlers 68 | -------------------------------------------------------------------------------- /MemoryGoto.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_MEMORYGOTO_H__22F34942_BE43_11D0_B033_444553540000__INCLUDED_) 22 | #define AFX_MEMORYGOTO_H__22F34942_BE43_11D0_B033_444553540000__INCLUDED_ 23 | 24 | #if _MSC_VER >= 1000 25 | #pragma once 26 | #endif // _MSC_VER >= 1000 27 | // MemoryGoto.h : header file 28 | // 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // CMemoryGoto dialog 32 | 33 | class CMemoryGoto : public CDialog 34 | { 35 | // Construction 36 | public: 37 | CMemoryGoto(CWnd* pParent = NULL); // standard constructor 38 | 39 | // Dialog Data 40 | //{{AFX_DATA(CMemoryGoto) 41 | enum { IDD = IDD_MEMORY_GOTO }; 42 | UINT m_uAddr; 43 | //}}AFX_DATA 44 | 45 | 46 | // Overrides 47 | // ClassWizard generated virtual function overrides 48 | //{{AFX_VIRTUAL(CMemoryGoto) 49 | protected: 50 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 51 | //}}AFX_VIRTUAL 52 | 53 | // Implementation 54 | protected: 55 | 56 | // Generated message map functions 57 | //{{AFX_MSG(CMemoryGoto) 58 | // NOTE: the ClassWizard will add member functions here 59 | //}}AFX_MSG 60 | DECLARE_MESSAGE_MAP() 61 | }; 62 | 63 | //{{AFX_INSERT_LOCATION}} 64 | // Microsoft Developer Studio will insert additional declarations immediately before the previous line. 65 | 66 | #endif // !defined(AFX_MEMORYGOTO_H__22F34942_BE43_11D0_B033_444553540000__INCLUDED_) 67 | -------------------------------------------------------------------------------- /MemoryInfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MemoryInfo.cpp -------------------------------------------------------------------------------- /MemoryInfo.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // MemoryInfo.h : header file 22 | // 23 | 24 | #include "MemoryView.h" 25 | #include "MemoryDoc.h" 26 | 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // CMemoryInfo frame 30 | class COutputMem; 31 | 32 | class CMemoryInfo : public CMiniFrameWnd 33 | { 34 | COutputMem *m_pMem; 35 | UINT16 m_uAddr; 36 | CMemoryDoc m_Doc; 37 | 38 | static CString m_strClass; 39 | static bool m_bRegistered; 40 | void RegisterWndClass(); 41 | void init(); 42 | 43 | DECLARE_DYNCREATE(CMemoryInfo) 44 | 45 | // Attributes 46 | public: 47 | CMemoryInfo(); 48 | virtual ~CMemoryInfo(); 49 | CRect m_WndRect; 50 | bool m_bHidden; 51 | 52 | // Operations 53 | public: 54 | enum ViewType { VIEW_MEMORY, VIEW_ZEROPAGE, VIEW_STACK }; 55 | bool Create(COutputMem *pMem, UINT16 uAddr, ViewType bView); 56 | 57 | void InvalidateView(UINT16 uStackPtr= 0); 58 | void Invalidate(); 59 | 60 | // Overrides 61 | // ClassWizard generated virtual function overrides 62 | //{{AFX_VIRTUAL(CMemoryInfo) 63 | protected: 64 | virtual void PostNcDestroy(); 65 | //}}AFX_VIRTUAL 66 | 67 | // Implementation 68 | protected: 69 | afx_msg LRESULT OnStartDebug(WPARAM wParam, LPARAM lParam); 70 | afx_msg LRESULT OnExitDebug(WPARAM wParam, LPARAM lParam); 71 | // Generated message map functions 72 | //{{AFX_MSG(CMemoryInfo) 73 | afx_msg void OnDestroy(); 74 | afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); 75 | afx_msg void OnClose(); 76 | //}}AFX_MSG 77 | afx_msg LRESULT OnChangeCode(WPARAM wParam, LPARAM lParam); 78 | DECLARE_MESSAGE_MAP() 79 | }; 80 | 81 | ///////////////////////////////////////////////////////////////////////////// 82 | -------------------------------------------------------------------------------- /MemoryView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MemoryView.cpp -------------------------------------------------------------------------------- /MemoryView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MemoryView.h -------------------------------------------------------------------------------- /Messages.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Messages.h -------------------------------------------------------------------------------- /MotorolaSRecord.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/MotorolaSRecord.cpp -------------------------------------------------------------------------------- /MotorolaSRecord.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #ifndef _motorola_s_record_ 22 | #define _motorola_s_record_ 23 | 24 | class COutputMem; 25 | class CMarkArea; 26 | 27 | class CMotorolaSRecord 28 | { 29 | UINT geth(const TCHAR *&ptr, UINT &sum); // interpretacja dwucyfrowej liczby hex 30 | UINT row; 31 | 32 | public: 33 | void SaveHexFormat(CArchive &archive, COutputMem &mem, CMarkArea &area, int prog_start= -1); 34 | 35 | void LoadHexFormat(CArchive &archive, COutputMem &mem, CMarkArea &area, int &prog_start); 36 | 37 | class CMotorolaSRecordException: public CException 38 | { 39 | public: 40 | enum Err { E_NONE, E_BAD_FORMAT, E_CHKSUM, E_FORMAT }; 41 | private: 42 | Err error; 43 | UINT row; 44 | public: 45 | CMotorolaSRecordException(Err err= E_NONE, UINT row= 0) : error(err), row(row) 46 | { } 47 | virtual ~CMotorolaSRecordException() 48 | {} 49 | virtual BOOL GetErrorMessage(LPTSTR lpszError, UINT nMaxError, PUINT pnHelpContext= NULL); 50 | }; 51 | }; 52 | 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Options.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Options.cpp -------------------------------------------------------------------------------- /OptionsViewPage.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // OptionsViewPage.h : header file 22 | // 23 | 24 | #include "ColorButton.h" 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // COptionsViewPage dialog 28 | 29 | class COptionsViewPage : public CPropertyPage 30 | { 31 | CColorButton m_ColorButtonText; 32 | CColorButton m_ColorButtonBkgnd; 33 | BOOL m_bSubclassed; 34 | int m_nSelection; 35 | COLORREF m_rgbBkgndCol; 36 | COLORREF m_rgbTextCol; 37 | 38 | void repaint_example(); 39 | 40 | DECLARE_DYNCREATE(COptionsViewPage) 41 | // Construction 42 | public: 43 | struct TextDef 44 | { 45 | COLORREF text, bkgnd; 46 | CFont font; 47 | int changed; 48 | CBrush brush; 49 | }; 50 | static TextDef m_Text[]; 51 | 52 | COptionsViewPage(); 53 | ~COptionsViewPage(); 54 | 55 | // Dialog Data 56 | //{{AFX_DATA(COptionsViewPage) 57 | enum { IDD = IDD_PROPPAGE_VIEW }; 58 | // NOTE - ClassWizard will add data members here. 59 | // DO NOT EDIT what you see in these blocks of generated code ! 60 | //}}AFX_DATA 61 | 62 | 63 | // Overrides 64 | // ClassWizard generate virtual function overrides 65 | //{{AFX_VIRTUAL(COptionsViewPage) 66 | public: 67 | virtual BOOL OnSetActive(); 68 | protected: 69 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 70 | //}}AFX_VIRTUAL 71 | 72 | // Implementation 73 | protected: 74 | // Generated message map functions 75 | //{{AFX_MSG(COptionsViewPage) 76 | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 77 | afx_msg void OnSelchangeViewWnd(); 78 | afx_msg void OnViewTxtCol(); 79 | afx_msg void OnViewBkgndCol(); 80 | afx_msg void OnViewFontBtn(); 81 | //}}AFX_MSG 82 | DECLARE_MESSAGE_MAP() 83 | 84 | }; 85 | -------------------------------------------------------------------------------- /OutputMem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/OutputMem.h -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 6502 2 | 3 | Integrated macro assembler, simulator and debugger for 650x microprocessor family. Allows you to write, test, and run 6502/65c02 programs. 4 | 5 | Can be built with free Community Edition Visual Studio 2017. 6 | -------------------------------------------------------------------------------- /RegisterBar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/RegisterBar.cpp -------------------------------------------------------------------------------- /RegisterBar.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // RegisterBar.h : header file 22 | // 23 | 24 | #include "resource.h" 25 | #include "Asm.h" 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // CRegisterBar dialog bar 29 | 30 | class CContext; 31 | 32 | class CRegisterBar : public CDialogBar, public CAsm 33 | { 34 | bool m_bInUpdate; 35 | 36 | bool UpdateItem(int itemID); 37 | 38 | void UpdateRegA(const CContext *pCtx, const CContext *pOld= NULL); 39 | void UpdateRegX(const CContext *pCtx, const CContext *pOld= NULL); 40 | void UpdateRegY(const CContext *pCtx, const CContext *pOld= NULL); 41 | void UpdateRegP(const CContext *pCtx, const CContext *pOld= NULL); 42 | void UpdateRegS(const CContext *pCtx, const CContext *pOld= NULL); 43 | void UpdateRegPC(const CContext *pCtx, const CContext *pOld= NULL); 44 | void UpdateCycles(ULONG uCycles); 45 | void ChangeRegister(int ID, int reg_no); 46 | void ChangeFlags(int flag_bit, bool set); // zmiana bitu rej. flagowego 47 | 48 | afx_msg LRESULT OnUpdate(WPARAM wParam, LPARAM lParam); 49 | afx_msg LRESULT OnStartDebug(WPARAM wParam, LPARAM lParam); 50 | afx_msg LRESULT OnExitDebug(WPARAM wParam, LPARAM lParam); 51 | 52 | virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler); 53 | 54 | // Construction 55 | public: 56 | static bool m_bHidden; 57 | void Update(const CContext *pCtx, const CString &stat, const CContext *pOld= NULL, bool bDraw= TRUE); 58 | bool Create(CWnd* pParentWnd, UINT nStyle, UINT nID); 59 | CRegisterBar(); // standard constructor 60 | 61 | // Dialog Data 62 | //{{AFX_DATA(CRegisterBar) 63 | enum { IDD = IDD_REGISTERBAR }; 64 | // NOTE: the ClassWizard will add data members here 65 | //}}AFX_DATA 66 | 67 | // Overrides 68 | // ClassWizard generated virtual function overrides 69 | //{{AFX_VIRTUAL(CRegisterBar) 70 | //}}AFX_VIRTUAL 71 | 72 | // Implementation 73 | protected: 74 | 75 | // Generated message map functions 76 | //{{AFX_MSG(CRegisterBar) 77 | afx_msg void OnChangeRegA(); 78 | afx_msg void OnChangeRegX(); 79 | afx_msg void OnChangeRegY(); 80 | afx_msg void OnChangeRegS(); 81 | afx_msg void OnChangeRegP(); 82 | afx_msg void OnChangeRegPC(); 83 | afx_msg void OnRegFlagNeg(); 84 | afx_msg void OnRegFlagCarry(); 85 | afx_msg void OnRegFlagDec(); 86 | afx_msg void OnRegFlagInt(); 87 | afx_msg void OnRegFlagOver(); 88 | afx_msg void OnRegFlagZero(); 89 | afx_msg void OnRegFlagBrk(); 90 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 91 | afx_msg void OnRegsCyclesClr(); 92 | //}}AFX_MSG 93 | DECLARE_MESSAGE_MAP() 94 | private: 95 | CString Binary(UINT8 val); 96 | void SetDlgItemInf(int nID, UINT8 val); 97 | void SetDlgItemMem(int nID, int nBytes, UINT16 ptr, const CContext *pCtx); 98 | void SetDlgItemWordHex(int nID, UINT16 val); 99 | void SetDlgItemByteHex(int nID, UINT8 val); 100 | 101 | }; 102 | -------------------------------------------------------------------------------- /SaveCode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/SaveCode.cpp -------------------------------------------------------------------------------- /SaveCode.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // SaveCode.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CSaveCode dialog 26 | 27 | class CSaveCode : public CFileDialog 28 | { 29 | static UINT m_uStart; 30 | static UINT m_uEnd; 31 | CString m_strTitle; 32 | int m_nPos; 33 | static int m_nInitPos; 34 | 35 | void EnableOptions(bool bRedraw= TRUE); 36 | 37 | DECLARE_DYNAMIC(CSaveCode) 38 | 39 | public: 40 | CSaveCode(LPCTSTR lpszFileName = NULL, 41 | LPCTSTR lpszFilter = NULL, 42 | CWnd* pParentWnd = NULL); 43 | void SaveCode(); 44 | 45 | protected: 46 | //{{AFX_MSG(CSaveCode) 47 | virtual BOOL OnInitDialog(); 48 | //}}AFX_MSG 49 | // afx_msg LRESULT OnNotify(WPARAM wParam, LPARAM lParam); 50 | void OnOptions(); 51 | 52 | virtual void OnTypeChange(); 53 | 54 | DECLARE_MESSAGE_MAP() 55 | }; 56 | -------------------------------------------------------------------------------- /SaveCodeBlockOptions.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/SaveCodeBlockOptions.cpp -------------------------------------------------------------------------------- /SaveCodeBlockOptions.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // SaveCodeBlockOptions.h : header file 22 | // 23 | #include "FormatNums.h" 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CSaveCodeBlockOptions dialog 27 | 28 | class CSaveCodeBlockOptions : public CDialog, CFormatNums 29 | { 30 | bool m_bModify; 31 | void CalculateNums(int pos); 32 | // Construction 33 | public: 34 | CSaveCodeBlockOptions(CWnd* pParent = NULL); // standard constructor 35 | 36 | // Dialog Data 37 | //{{AFX_DATA(CSaveCodeBlockOptions) 38 | enum { IDD = IDD_SAVE_CODE_OPT_2 }; 39 | UINT m_uEnd; 40 | UINT m_uLength; 41 | UINT m_uStart; 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CSaveCodeBlockOptions) 48 | protected: 49 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | 55 | // Generated message map functions 56 | //{{AFX_MSG(CSaveCodeBlockOptions) 57 | virtual BOOL OnInitDialog(); 58 | afx_msg void OnDeltaposSpinStart(NMHDR* pNMHDR, LRESULT* pResult); 59 | afx_msg void OnDeltaposSpinEnd(NMHDR* pNMHDR, LRESULT* pResult); 60 | afx_msg void OnDeltaposSpinLength(NMHDR* pNMHDR, LRESULT* pResult); 61 | afx_msg void OnChangeFieldStart(); 62 | afx_msg void OnChangeFieldEnd(); 63 | afx_msg void OnChangeFieldLength(); 64 | //}}AFX_MSG 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | -------------------------------------------------------------------------------- /SaveCodeOptions.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/SaveCodeOptions.cpp -------------------------------------------------------------------------------- /SaveCodeOptions.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // SaveCodeOptions.h : header file 22 | // 23 | #include "FormatNums.h" 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CSaveCodeOptions dialog 27 | 28 | class CSaveCodeOptions : public CDialog, CFormatNums 29 | { 30 | bool m_bModify; 31 | void CalculateNums(int pos); 32 | // Construction 33 | public: 34 | CSaveCodeOptions(CWnd* pParent = NULL); // standard constructor 35 | 36 | // Dialog Data 37 | //{{AFX_DATA(CSaveCodeOptions) 38 | enum { IDD = IDD_SAVE_CODE_OPT_1 }; 39 | UINT m_uEnd; 40 | UINT m_uLength; 41 | UINT m_uStart; 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CSaveCodeOptions) 48 | protected: 49 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | 55 | // Generated message map functions 56 | //{{AFX_MSG(CSaveCodeOptions) 57 | afx_msg void OnDeltaposSpinStart(NMHDR* pNMHDR, LRESULT* pResult); 58 | afx_msg void OnDeltaposSpinEnd(NMHDR* pNMHDR, LRESULT* pResult); 59 | afx_msg void OnDeltaposSpinLength(NMHDR* pNMHDR, LRESULT* pResult); 60 | virtual BOOL OnInitDialog(); 61 | afx_msg void OnChangeFieldStart(); 62 | afx_msg void OnChangeFieldEnd(); 63 | afx_msg void OnChangeFieldLength(); 64 | //}}AFX_MSG 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | -------------------------------------------------------------------------------- /Splash.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Splash.cpp -------------------------------------------------------------------------------- /Splash.h: -------------------------------------------------------------------------------- 1 | // CG: This file was added by the Splash Screen component. 2 | 3 | #ifndef _SPLASH_SCRN_ 4 | #define _SPLASH_SCRN_ 5 | 6 | // Splash.h : header file 7 | // 8 | 9 | ///////////////////////////////////////////////////////////////////////////// 10 | // Splash Screen class 11 | 12 | class CSplashWnd : public CWnd 13 | { 14 | // Construction 15 | protected: 16 | CSplashWnd(); 17 | 18 | // Attributes: 19 | public: 20 | CBitmap m_bitmap; 21 | HANDLE m_hdib; 22 | 23 | // Operations 24 | public: 25 | static void EnableSplashScreen(bool bEnable= true); 26 | static void ShowSplashScreen(CWnd* pParentWnd = NULL); 27 | static void PreTranslateAppMessage(MSG* pMsg); 28 | 29 | // Overrides 30 | // ClassWizard generated virtual function overrides 31 | //{{AFX_VIRTUAL(CSplashWnd) 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | public: 36 | ~CSplashWnd(); 37 | virtual void PostNcDestroy(); 38 | 39 | protected: 40 | bool Create(CWnd* pParentWnd = NULL); 41 | void HideSplashScreen(); 42 | static bool c_bShowSplashWnd; 43 | static CSplashWnd* c_pSplashWnd; 44 | 45 | // Generated message map functions 46 | protected: 47 | //{{AFX_MSG(CSplashWnd) 48 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 49 | afx_msg void OnPaint(); 50 | afx_msg void OnTimer(UINT nIDEvent); 51 | //}}AFX_MSG 52 | DECLARE_MESSAGE_MAP() 53 | }; 54 | 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /StackTemplate.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/StackTemplate.h -------------------------------------------------------------------------------- /StackView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/StackView.cpp -------------------------------------------------------------------------------- /StackView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/StackView.h -------------------------------------------------------------------------------- /StaticLink.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////// 2 | // 1998 Microsoft Systems Journal 3 | // If this code works, it was written by Paul DiLascia. 4 | // If not, I don't know who wrote it. 5 | // 6 | // 7 | // CStaticLink implements a static control that's a hyperlink 8 | // to any file on your desktop or web. You can use it in dialog boxes 9 | // to create hyperlinks to web sites. When clicked, opens the file/URL 10 | // 11 | #ifndef _STATLINK_H 12 | #define _STATLINK_H 13 | 14 | #include "HyperLink.h" 15 | 16 | class CStaticLink : public CStatic 17 | { 18 | public: 19 | DECLARE_DYNAMIC(CStaticLink) 20 | CStaticLink(LPCTSTR lpText = NULL, BOOL bDeleteOnDestroy= FALSE); 21 | ~CStaticLink() { } 22 | 23 | // Use this if you want to subclass and also set different URL 24 | BOOL SubclassDlgItem(UINT nID, CWnd* pParent, LPCTSTR lpszLink= NULL) 25 | { 26 | m_link = lpszLink; 27 | return CStatic::SubclassDlgItem(nID, pParent); 28 | } 29 | 30 | // Hyperlink contains URL/filename. If NULL, I will use the window text. 31 | // (GetWindowText) to get the target. 32 | CHyperlink m_link; 33 | COLORREF m_color; 34 | 35 | // Default colors you can change 36 | // These are global, so they're the same for all links. 37 | static COLORREF g_colorUnvisited; 38 | static COLORREF g_colorVisited; 39 | 40 | // Cursor used when mouse is on a link--you can set, or 41 | // it will default to the standard hand with pointing finger. 42 | // This is global, so it's the same for all links. 43 | static HCURSOR g_hCursorLink; 44 | 45 | protected: 46 | CFont m_font; // underline font for text control 47 | BOOL m_bDeleteOnDestroy; // delete object when window destroyed? 48 | 49 | virtual void PostNcDestroy(); 50 | 51 | // message handlers 52 | DECLARE_MESSAGE_MAP() 53 | afx_msg LRESULT OnNcHitTest(CPoint point); 54 | afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); 55 | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 56 | afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 57 | }; 58 | 59 | #endif _STATLINK_H 60 | -------------------------------------------------------------------------------- /StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // 6502.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | -------------------------------------------------------------------------------- /StdAfx.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // stdafx.h : include file for standard system include files, 22 | // or project specific include files that are used frequently, but 23 | // are changed infrequently 24 | // 25 | 26 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 27 | 28 | #define _SCL_SECURE_NO_WARNINGS 29 | #define _CRT_SECURE_NO_WARNINGS 30 | 31 | #define WINVER 0x501 32 | 33 | 34 | #include // MFC core and standard components 35 | #include // MFC extensions 36 | #include 37 | #include 38 | #ifndef _AFX_NO_AFXCMN_SUPPORT 39 | #include // MFC support for Windows 95 Common Controls 40 | #endif // _AFX_NO_AFXCMN_SUPPORT 41 | 42 | #include 43 | #include 44 | 45 | #include 46 | 47 | #pragma warning(disable : 4800) 48 | 49 | #include "Shlwapi.h" 50 | 51 | #include "6502.h" 52 | -------------------------------------------------------------------------------- /Sym6502.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Sym6502.cpp -------------------------------------------------------------------------------- /Sym6502.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/Sym6502.h -------------------------------------------------------------------------------- /SyntaxExample.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | #if !defined(AFX_SYNTAXEXAMPLE_H__95642D27_FE87_4AD4_8404_9EB9599F46FA__INCLUDED_) 22 | #define AFX_SYNTAXEXAMPLE_H__95642D27_FE87_4AD4_8404_9EB9599F46FA__INCLUDED_ 23 | 24 | #if _MSC_VER > 1000 25 | #pragma once 26 | #endif // _MSC_VER > 1000 27 | // SyntaxExample.h : header file 28 | // 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | // CSyntaxExample window 32 | 33 | class CSyntaxExample : public CButton 34 | { 35 | // Construction 36 | public: 37 | CSyntaxExample(); 38 | 39 | // Attributes 40 | public: 41 | int m_nTabStop; 42 | HFONT m_hEditorFont; 43 | COLORREF m_rgbBackground; 44 | COLORREF m_rgbText; 45 | COLORREF m_rgbInstruction; 46 | COLORREF m_rgbDirective; 47 | COLORREF m_rgbComment; 48 | COLORREF m_rgbNumber; 49 | COLORREF m_rgbString; 50 | COLORREF m_rgbSelection; 51 | bool m_vbBold[5]; 52 | 53 | // Operations 54 | public: 55 | virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); 56 | 57 | // Overrides 58 | // ClassWizard generated virtual function overrides 59 | //{{AFX_VIRTUAL(CSyntaxExample) 60 | //}}AFX_VIRTUAL 61 | 62 | // Implementation 63 | public: 64 | virtual ~CSyntaxExample(); 65 | 66 | // Generated message map functions 67 | protected: 68 | //{{AFX_MSG(CSyntaxExample) 69 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 70 | //}}AFX_MSG 71 | 72 | DECLARE_MESSAGE_MAP() 73 | }; 74 | 75 | ///////////////////////////////////////////////////////////////////////////// 76 | 77 | //{{AFX_INSERT_LOCATION}} 78 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 79 | 80 | #endif // !defined(AFX_SYNTAXEXAMPLE_H__95642D27_FE87_4AD4_8404_9EB9599F46FA__INCLUDED_) 81 | -------------------------------------------------------------------------------- /ToolBox.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/ToolBox.cpp -------------------------------------------------------------------------------- /ToolBox.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // ToolBox.h : header file 22 | // 23 | 24 | #include "resource.h" 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // CToolBox dialog 28 | 29 | class CToolBox : public CDialog 30 | { 31 | private: 32 | int rsc_id; 33 | BOOL created; 34 | 35 | // Construction 36 | public: 37 | ~CToolBox(); 38 | CToolBox(CWnd* pParent = NULL); // standard constructor 39 | 40 | BOOL Create(int rsc_id, CWnd* pParentWnd); 41 | // Dialog Data 42 | //{{AFX_DATA(CToolBox) 43 | enum { IDD = IDD_ZEROPAGEBAR }; 44 | // NOTE: the ClassWizard will add data members here 45 | //}}AFX_DATA 46 | 47 | 48 | // Overrides 49 | // ClassWizard generated virtual function overrides 50 | //{{AFX_VIRTUAL(CToolBox) 51 | public: 52 | virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL); 53 | protected: 54 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 55 | virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 56 | //}}AFX_VIRTUAL 57 | 58 | // Implementation 59 | protected: 60 | 61 | // Generated message map functions 62 | //{{AFX_MSG(CToolBox) 63 | // NOTE: the ClassWizard will add member functions here 64 | //}}AFX_MSG 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | -------------------------------------------------------------------------------- /ZeroPageView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/ZeroPageView.cpp -------------------------------------------------------------------------------- /ZeroPageView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/ZeroPageView.h -------------------------------------------------------------------------------- /dialbar.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | class CDialBar : public CDialogBar 22 | { 23 | DECLARE_DYNAMIC(CDialBar) 24 | 25 | // Construction 26 | public: 27 | BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID); 28 | virtual CSize CalcFixedLayout(bool bStretch, bool bHorz); 29 | virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode); 30 | CDialBar(); 31 | ~CDialBar(); 32 | 33 | //{{AFX_MSG(CDialBar) 34 | afx_msg void OnGetMinMaxInfo(MINMAXINFO *lpMMI); 35 | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 36 | //}}AFX_MSG 37 | 38 | DECLARE_MESSAGE_MAP() 39 | 40 | private: 41 | CSize m_lastSize; 42 | CSize CalcLayout(int nLength, DWORD dwMode); 43 | }; 44 | -------------------------------------------------------------------------------- /dialeditbrkp.cpp: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // DialEditBrkp.cpp : implementation file 22 | // 23 | 24 | #include "stdafx.h" 25 | #include "resource.h" 26 | #include "DialEditBrkp.h" 27 | 28 | #ifdef _DEBUG 29 | #define new DEBUG_NEW 30 | #undef THIS_FILE 31 | static char THIS_FILE[] = __FILE__; 32 | #endif 33 | 34 | extern void AFX_CDECL DDX_HexDec(CDataExchange* pDX, int nIDC, unsigned int &num, bool bWord= true); 35 | 36 | ///////////////////////////////////////////////////////////////////////////// 37 | // CDialEditBreakpoint dialog 38 | 39 | 40 | CDialEditBreakpoint::CDialEditBreakpoint(Breakpoint bp, CWnd* pParent /*=NULL*/) 41 | : CDialog(CDialEditBreakpoint::IDD, pParent) 42 | { 43 | //{{AFX_DATA_INIT(CDialEditBreakpoint) 44 | m_uAddr = 0; 45 | //}}AFX_DATA_INIT 46 | m_Execute = (bp & BPT_EXECUTE) != 0; 47 | m_Read = (bp & BPT_READ) != 0; 48 | m_Write = (bp & BPT_WRITE) != 0; 49 | m_Disabled = (bp & BPT_DISABLED) != 0; 50 | } 51 | 52 | 53 | void CDialEditBreakpoint::DoDataExchange(CDataExchange* pDX) 54 | { 55 | CDialog::DoDataExchange(pDX); 56 | DDX_HexDec(pDX, IDC_ADDR, m_uAddr); 57 | DDV_MinMaxUInt(pDX, m_uAddr, 0, 65535); 58 | //{{AFX_DATA_MAP(CDialEditBreakpoint) 59 | DDX_Check(pDX, IDC_EDIT_BP_DISABLED, m_Disabled); 60 | DDX_Check(pDX, IDC_EDIT_BP_EXEC, m_Execute); 61 | DDX_Check(pDX, IDC_EDIT_BP_READ, m_Read); 62 | DDX_Check(pDX, IDC_EDIT_BP_WRITE, m_Write); 63 | DDX_Text(pDX, IDC_ADDR, m_uAddr); 64 | //}}AFX_DATA_MAP 65 | } 66 | 67 | 68 | BEGIN_MESSAGE_MAP(CDialEditBreakpoint, CDialog) 69 | //{{AFX_MSG_MAP(CDialEditBreakpoint) 70 | // NOTE: the ClassWizard will add message map macros here 71 | //}}AFX_MSG_MAP 72 | END_MESSAGE_MAP() 73 | 74 | ///////////////////////////////////////////////////////////////////////////// 75 | // CDialEditBreakpoint message handlers 76 | 77 | 78 | CAsm::Breakpoint CDialEditBreakpoint::GetBreakpoint() 79 | { 80 | int bp= BPT_NONE; 81 | if (m_Execute) 82 | bp |= BPT_EXECUTE; 83 | if (m_Read) 84 | bp |= BPT_READ; 85 | if (m_Write) 86 | bp |= BPT_WRITE; 87 | if (m_Disabled) 88 | bp |= BPT_DISABLED; 89 | return (Breakpoint)bp; 90 | } 91 | -------------------------------------------------------------------------------- /dialeditbrkp.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | 6502 Macroassembler and Simulator 3 | 4 | Copyright (C) 1995-2003 Michal Kowalski 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | -----------------------------------------------------------------------------*/ 20 | 21 | // DialEditBrkp.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CDialEditBreakpoint dialog 26 | 27 | class CDialEditBreakpoint : public CDialog, CAsm 28 | { 29 | // Construction 30 | public: 31 | Breakpoint GetBreakpoint(); 32 | CDialEditBreakpoint(Breakpoint bp, CWnd* pParent = NULL); // standard constructor 33 | 34 | // Dialog Data 35 | //{{AFX_DATA(CDialEditBreakpoint) 36 | enum { IDD = IDD_EDIT_BREAKPOINT }; 37 | BOOL m_Disabled; 38 | BOOL m_Execute; 39 | BOOL m_Read; 40 | BOOL m_Write; 41 | UINT m_uAddr; 42 | //}}AFX_DATA 43 | 44 | 45 | // Overrides 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CDialEditBreakpoint) 48 | protected: 49 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | 55 | // Generated message map functions 56 | //{{AFX_MSG(CDialEditBreakpoint) 57 | // NOTE: the ClassWizard will add member functions here 58 | //}}AFX_MSG 59 | DECLARE_MESSAGE_MAP() 60 | }; 61 | -------------------------------------------------------------------------------- /hlp/6502.GID: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/6502.GID -------------------------------------------------------------------------------- /hlp/6502.HLP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/6502.HLP -------------------------------------------------------------------------------- /hlp/6502.cnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/6502.cnt -------------------------------------------------------------------------------- /hlp/6502.hpj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/6502.hpj -------------------------------------------------------------------------------- /hlp/6502.ph: -------------------------------------------------------------------------------- 1 | (Control 2 | (Edit 3 | (File 4 | (Help 5 | (System 6 | (View 7 | (Window 8 | (application 9 | (document 10 | << Write application-specific help here. >> 11 | <> 12 | <>, 13 | <>. 14 | AFX_HIDP_xxx 15 | About 16 | AppWizard 17 | Arrange Icons 18 | Bar 19 | Cascade 20 | Choose 21 | Choose this button to connect to a network location, assigning it a new drive letter. 22 | Clear 23 | Close 24 | Commands 25 | Context 26 | Control 27 | Control-menu 28 | Copies 29 | Copy 30 | DIRECTION 31 | Directories 32 | Drives 33 | Exit 34 | File 35 | File Name 36 | File New dialog box 37 | File menu commands 38 | Find 39 | Go to the 40 | HIDR_DOC1TYPE 41 | Help 42 | Horizontal 43 | Icons 44 | Keys: 45 | List 46 | Lock 47 | MAKEHM 48 | Minimize 49 | Modify 50 | Mouse: 51 | Name 52 | Name of the 53 | Network... 54 | New 55 | No Help Available 56 | No help is available for this 57 | Note: This command is unavailable if you maximize the window. 58 | Open 59 | Open a 60 | Pane 61 | Prev 62 | Prev Pane 63 | Preview 64 | Print 65 | Print Setup dialog box 66 | Quality 67 | Remove 68 | Repeat 69 | Replace 70 | Save 71 | Save As dialog box 72 | Scroll 73 | Select 74 | Setup 75 | Shortcut 76 | Shortcuts 77 | Split 78 | Status Bar 79 | Toolbar 80 | Toolbar, 81 | Toolbar: 82 | Undo 83 | Use 84 | Vertical 85 | View 86 | When 87 | Window 88 | Write 89 | according 90 | across 91 | action 92 | action. 93 | actions 94 | active 95 | active. 96 | affect 97 | all 98 | allow 99 | also 100 | and 101 | another 102 | appear 103 | appears 104 | application 105 | application's 106 | application, 107 | application-specific 108 | application. 109 | applications 110 | area 111 | arrange 112 | arrow 113 | assigning 114 | author 115 | available 116 | bar. 117 | bars 118 | before 119 | bottom 120 | box 121 | box. 122 | button 123 | button, 124 | button. 125 | buttons 126 | can 127 | cannot 128 | change 129 | changes 130 | changes. 131 | check 132 | choose 133 | click 134 | clipboard 135 | clipboard. 136 | closes 137 | command 138 | command, 139 | command. 140 | commands, 141 | commands: 142 | connect 143 | connection. 144 | contain 145 | contents 146 | create 147 | current 148 | currently 149 | data 150 | depending 151 | describe 152 | describes 153 | description 154 | destination 155 | determines 156 | dialog 157 | different 158 | directory 159 | display 160 | displayed 161 | displayed. 162 | displays 163 | document 164 | document, 165 | document. 166 | documents 167 | documents. 168 | down. 169 | drive 170 | each 171 | editing 172 | electronic 173 | example, 174 | existing 175 | extension 176 | fashion. 177 | field, 178 | filename 179 | files 180 | first 181 | following 182 | for 183 | four-headed 184 | from 185 | generated 186 | have 187 | help. 188 | here. 189 | hide 190 | i.d. 191 | icon 192 | icons. 193 | indicate 194 | insert 195 | instructions 196 | interface 197 | into 198 | item 199 | its 200 | keyboard 201 | keys 202 | last 203 | latched 204 | letter. 205 | location 206 | location, 207 | location. 208 | main 209 | mark 210 | maximize 211 | may 212 | menu 213 | menu) 214 | menu. 215 | message 216 | minimized 217 | mouse 218 | move 219 | multiple 220 | name. 221 | network 222 | next 223 | non-overlapped 224 | not 225 | number 226 | offers 227 | one 228 | only 229 | open. 230 | opened 231 | opening 232 | option 233 | options 234 | options: 235 | other 236 | overlapped 237 | page 238 | page. 239 | pages 240 | panes. 241 | parts 242 | point. 243 | pointer 244 | presents 245 | previous 246 | previously 247 | print preview toolbar 248 | printed 249 | printed. 250 | printer 251 | printers 252 | printing 253 | printing, 254 | printing. 255 | provides 256 | range 257 | record 258 | reduced 259 | replaces 260 | return 261 | reverse 262 | same 263 | screen 264 | screen. 265 | selected 266 | selected. 267 | selection 268 | selection. 269 | should 270 | shown 271 | single 272 | size 273 | some 274 | specific 275 | specified 276 | specify 277 | splitter 278 | status 279 | stored 280 | stores 281 | such 282 | suggests 283 | supports 284 | switch 285 | that 286 | the 287 | their 288 | then 289 | there 290 | there. 291 | they 292 | this 293 | through 294 | time 295 | time. 296 | title 297 | toolbar. 298 | topic 299 | topics 300 | type 301 | type. 302 | types 303 | unavailable 304 | used 305 | using 306 | various 307 | version 308 | views 309 | want 310 | where 311 | which 312 | will 313 | window, 314 | window. 315 | windows 316 | windows. 317 | wish 318 | with 319 | you 320 | your 321 | -------------------------------------------------------------------------------- /hlp/AppExit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/AppExit.bmp -------------------------------------------------------------------------------- /hlp/BNF.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/BNF.doc -------------------------------------------------------------------------------- /hlp/BNF.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/BNF.txt -------------------------------------------------------------------------------- /hlp/Bullet.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Bullet.bmp -------------------------------------------------------------------------------- /hlp/CurArw2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/CurArw2.bmp -------------------------------------------------------------------------------- /hlp/CurArw4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/CurArw4.bmp -------------------------------------------------------------------------------- /hlp/CurHelp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/CurHelp.bmp -------------------------------------------------------------------------------- /hlp/EditCopy.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/EditCopy.bmp -------------------------------------------------------------------------------- /hlp/EditCut.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/EditCut.bmp -------------------------------------------------------------------------------- /hlp/EditPast.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/EditPast.bmp -------------------------------------------------------------------------------- /hlp/EditUndo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/EditUndo.bmp -------------------------------------------------------------------------------- /hlp/FileNew.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/FileNew.bmp -------------------------------------------------------------------------------- /hlp/FileOpen.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/FileOpen.bmp -------------------------------------------------------------------------------- /hlp/FilePrnt.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/FilePrnt.bmp -------------------------------------------------------------------------------- /hlp/FileSave.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/FileSave.bmp -------------------------------------------------------------------------------- /hlp/HlpSBar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/HlpSBar.bmp -------------------------------------------------------------------------------- /hlp/HlpTBar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/HlpTBar.bmp -------------------------------------------------------------------------------- /hlp/Kevin Wilson - Docs1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Kevin Wilson - Docs1.zip -------------------------------------------------------------------------------- /hlp/MAKEHM.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/MAKEHM.EXE -------------------------------------------------------------------------------- /hlp/Options Appearance.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Options Appearance.gif -------------------------------------------------------------------------------- /hlp/Options Assembler.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Options Assembler.gif -------------------------------------------------------------------------------- /hlp/Options Disassembler.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Options Disassembler.gif -------------------------------------------------------------------------------- /hlp/Options Editor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Options Editor.gif -------------------------------------------------------------------------------- /hlp/Options General.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Options General.gif -------------------------------------------------------------------------------- /hlp/Options Simulator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Options Simulator.gif -------------------------------------------------------------------------------- /hlp/RecFirst.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/RecFirst.bmp -------------------------------------------------------------------------------- /hlp/RecLast.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/RecLast.bmp -------------------------------------------------------------------------------- /hlp/RecNext.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/RecNext.bmp -------------------------------------------------------------------------------- /hlp/RecPrev.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/RecPrev.bmp -------------------------------------------------------------------------------- /hlp/Rejestry.BMP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Rejestry.BMP -------------------------------------------------------------------------------- /hlp/ScMenu.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/ScMenu.bmp -------------------------------------------------------------------------------- /hlp/Scmax.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Scmax.bmp -------------------------------------------------------------------------------- /hlp/Scmin.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/Scmin.bmp -------------------------------------------------------------------------------- /hlp/xOptions Assembler.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/xOptions Assembler.gif -------------------------------------------------------------------------------- /hlp/xOptions Simulator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/hlp/xOptions Simulator.gif -------------------------------------------------------------------------------- /identinfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/identinfo.cpp -------------------------------------------------------------------------------- /identinfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/identinfo.h -------------------------------------------------------------------------------- /mg_cur.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/mg_cur.cur -------------------------------------------------------------------------------- /res/6502.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/6502.ico -------------------------------------------------------------------------------- /res/6502.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/6502.rc2 -------------------------------------------------------------------------------- /res/6502Doc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/6502Doc.ico -------------------------------------------------------------------------------- /res/6502_source.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/6502_source.ico -------------------------------------------------------------------------------- /res/Directives.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/Directives.txt -------------------------------------------------------------------------------- /res/Rejestry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/Rejestry.gif -------------------------------------------------------------------------------- /res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/Toolbar.bmp -------------------------------------------------------------------------------- /res/about.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/about.bmp -------------------------------------------------------------------------------- /res/arrow.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/arrow.ico -------------------------------------------------------------------------------- /res/bitmap2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/bitmap2.bmp -------------------------------------------------------------------------------- /res/bmp00001.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/bmp00001.bmp -------------------------------------------------------------------------------- /res/bmp00002.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/bmp00002.bmp -------------------------------------------------------------------------------- /res/close_tb.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/close_tb.bmp -------------------------------------------------------------------------------- /res/code.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/code.GIF -------------------------------------------------------------------------------- /res/code.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/code.bmp -------------------------------------------------------------------------------- /res/code1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/code1.bmp -------------------------------------------------------------------------------- /res/debug.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/debug.GIF -------------------------------------------------------------------------------- /res/debug.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/debug.bmp -------------------------------------------------------------------------------- /res/disasm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/disasm.ico -------------------------------------------------------------------------------- /res/ident_info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/ident_info.ico -------------------------------------------------------------------------------- /res/io_window.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/io_window.ico -------------------------------------------------------------------------------- /res/link.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/link.cur -------------------------------------------------------------------------------- /res/manifest.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 6502 Simulator 9 | 10 | 11 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /res/memory_info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/memory_info.ico -------------------------------------------------------------------------------- /res/mg_icons.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/mg_icons.bmp -------------------------------------------------------------------------------- /res/splash16_en.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/splash16_en.bmp -------------------------------------------------------------------------------- /res/splash16_pl.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/splash16_pl.bmp -------------------------------------------------------------------------------- /res/splash_en.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/splash_en.bmp -------------------------------------------------------------------------------- /res/splash_pl.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/splash_pl.bmp -------------------------------------------------------------------------------- /res/toolbar1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikekov/6502/49c757b1cead8b4a3deae1830298083634868103/res/toolbar1.bmp --------------------------------------------------------------------------------