2002-03-30 16:43:27 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* */
|
|
|
|
|
/* cpucore.h */
|
|
|
|
|
/* */
|
|
|
|
|
/* CPU core for the 6502 simulator */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
2003-05-01 22:38:47 +00:00
|
|
|
|
/* (C) 2002-2003 Ullrich von Bassewitz */
|
|
|
|
|
/* R<>merstrasse 52 */
|
|
|
|
|
/* D-70794 Filderstadt */
|
2002-03-30 16:43:27 +00:00
|
|
|
|
/* EMail: uz@cc65.org */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
|
/* */
|
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
|
/* */
|
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
|
/* distribution. */
|
|
|
|
|
/* */
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CPUCORE_H
|
|
|
|
|
#define CPUCORE_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-05-04 21:51:13 +00:00
|
|
|
|
/* sim65 */
|
|
|
|
|
#include "cpuregs.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-03-30 16:43:27 +00:00
|
|
|
|
/*****************************************************************************/
|
2003-05-04 21:51:13 +00:00
|
|
|
|
/* Data */
|
2002-03-30 16:43:27 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Registers */
|
2003-05-04 21:51:13 +00:00
|
|
|
|
extern CPURegs Regs;
|
2002-03-30 16:43:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-04-01 17:42:24 +00:00
|
|
|
|
/*****************************************************************************/
|
2003-05-04 21:51:13 +00:00
|
|
|
|
/* Code */
|
2002-04-01 17:42:24 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CPUInit (void);
|
|
|
|
|
/* Initialize the CPU */
|
|
|
|
|
|
2003-05-04 21:51:13 +00:00
|
|
|
|
void RESET (void);
|
|
|
|
|
/* Generate a CPU RESET */
|
2002-04-01 17:42:24 +00:00
|
|
|
|
|
2003-05-04 21:51:13 +00:00
|
|
|
|
void IRQRequest (void);
|
2002-04-01 17:42:24 +00:00
|
|
|
|
/* Generate an IRQ */
|
|
|
|
|
|
2003-05-04 21:51:13 +00:00
|
|
|
|
void NMIRequest (void);
|
2002-04-01 17:42:24 +00:00
|
|
|
|
/* Generate an NMI */
|
|
|
|
|
|
2003-05-01 18:58:35 +00:00
|
|
|
|
void Break (const char* Format, ...);
|
|
|
|
|
/* Stop running and display the given message */
|
|
|
|
|
|
2002-04-01 17:42:24 +00:00
|
|
|
|
void CPURun (void);
|
2003-05-04 21:51:13 +00:00
|
|
|
|
/* Run one CPU instruction */
|
2002-04-01 17:42:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-03-30 16:43:27 +00:00
|
|
|
|
/* End of cpucore.h */
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|