Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
emu6502.h
00001 // emu6502.h - Emu6502 - MOS6502 Emulator 00002 // 00003 //////////////////////////////////////////////////////////////////////////////// 00004 // 00005 // c-simple-emu-cbm (C Portable Version) 00006 // C64/6502 Emulator for Terminal Console 00007 // 00008 // MIT License 00009 // 00010 // Copyright(c) 2020 by David R. Van Wagner 00011 // davevw.com 00012 // 00013 // Permission is hereby granted, free of charge, to any person obtaining a copy 00014 // of this software and associated documentation files (the "Software"), to deal 00015 // in the Software without restriction, including without limitation the rights 00016 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00017 // copies of the Software, and to permit persons to whom the Software is 00018 // furnished to do so, subject to the following conditions: 00019 // 00020 // The above copyright notice and this permission notice shall be included in all 00021 // copies or substantial portions of the Software. 00022 // 00023 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00024 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00025 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE 00026 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00027 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00028 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00029 // SOFTWARE. 00030 // 00031 //////////////////////////////////////////////////////////////////////////////// 00032 00033 #pragma once 00034 00035 typedef signed char sbyte; 00036 typedef unsigned char byte; 00037 //typedef unsigned char bool; 00038 typedef unsigned short ushort; 00039 #define false 0 00040 #define true 1 00041 00042 extern byte A; 00043 extern byte X; 00044 extern byte Y; 00045 extern byte S; 00046 extern bool N; 00047 extern bool V; 00048 extern bool B; 00049 extern bool D; 00050 extern bool I; 00051 extern bool Z; 00052 extern bool C; 00053 extern ushort PC; 00054 00055 extern bool trace; 00056 extern bool step; 00057 00058 extern void ResetRun(bool (*ExecutePatch)(void)); 00059 extern void Execute(ushort addr, bool (*ExecutePatch)(void)); 00060 extern void Push(int value); 00061 extern byte Pop(void); 00062 extern void DisassembleLong(ushort addr, bool *p_conditional, byte *p_bytes, ushort *p_addr2, char *dis, int dis_size, char *line, int line_size); 00063 extern void DisassembleShort(ushort addr, bool *p_conditional, byte *p_bytes, ushort *p_addr2, char *dis, int dis_size); 00064 extern byte LO(ushort value); 00065 extern byte HI(ushort value); 00066 00067 extern void SetMemory(ushort addr, byte value); 00068 extern byte GetMemory(ushort addr); 00069 extern bool ExecutePatch(void);
Generated on Mon Jul 18 2022 22:17:52 by
1.7.2