C64 emulation on STM32F429 Discovery board with builtin LCD and USB keyboard support (OTG). More info at davevw.com and/or github.com/davervw
Dependencies: LCD_DISCO_F429ZI BSP_DISCO_F429ZI USBHOST
emu6502.h
00001 // emu6502.h - MOS6502 Emulator 00002 // 00003 //////////////////////////////////////////////////////////////////////////////// 00004 // 00005 // C64-stm429_discovery 00006 // C64/6502 Emulator targeting STM32F429 LCD/USBHOST 00007 // [ported from c-simple-emu-cbm (C Portable Version - for console)] 00008 // 00009 // MIT License 00010 // 00011 // Copyright(c) 2020 by David R.Van Wagner 00012 // davevw.com 00013 // 00014 // Permission is hereby granted, free of charge, to any person obtaining a copy 00015 // of this software and associated documentation files (the "Software"), to deal 00016 // in the Software without restriction, including without limitation the rights 00017 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00018 // copies of the Software, and to permit persons to whom the Software is 00019 // furnished to do so, subject to the following conditions: 00020 // 00021 // The above copyright notice and this permission notice shall be included in all 00022 // copies or substantial portions of the Software. 00023 // 00024 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00025 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00026 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE 00027 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00028 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00029 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00030 // SOFTWARE. 00031 // 00032 //////////////////////////////////////////////////////////////////////////////// 00033 00034 #pragma once 00035 00036 typedef signed char sbyte; 00037 typedef unsigned char byte; 00038 //typedef unsigned char bool; 00039 typedef unsigned short ushort; 00040 #define false 0 00041 #define true 1 00042 00043 extern byte A; 00044 extern byte X; 00045 extern byte Y; 00046 extern byte S; 00047 extern bool N; 00048 extern bool V; 00049 extern bool B; 00050 extern bool D; 00051 extern bool I; 00052 extern bool Z; 00053 extern bool C; 00054 extern ushort PC; 00055 00056 extern bool trace; 00057 extern bool step; 00058 00059 extern void ResetRun(bool (*ExecutePatch)(void)); 00060 extern void Execute(ushort addr, bool (*ExecutePatch)(void)); 00061 extern void Push(int value); 00062 extern byte Pop(void); 00063 extern void PHP(); 00064 extern void DisassembleLong(ushort addr, bool *p_conditional, byte *p_bytes, ushort *p_addr2, char *dis, int dis_size, char *line, int line_size); 00065 extern void DisassembleShort(ushort addr, bool *p_conditional, byte *p_bytes, ushort *p_addr2, char *dis, int dis_size); 00066 extern byte LO(ushort value); 00067 extern byte HI(ushort value); 00068 00069 extern void SetMemory(ushort addr, byte value); 00070 extern byte GetMemory(ushort addr); 00071 extern bool ExecutePatch(void); 00072
Generated on Sun Jul 17 2022 23:46:19 by 1.7.2