1.1 --- a/src/cpu.h Mon Dec 12 10:37:41 2005 +0000
1.2 +++ b/src/cpu.h Sun Dec 25 08:24:11 2005 +0000
1.5 + * $Id: cpu.h,v 1.6 2005-12-25 05:56:55 nkeynes Exp $
1.7 + * Generic CPU definitions, primarily for providing information to the GUI.
1.9 + * Copyright (c) 2005 Nathan Keynes.
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.22 -#ifndef dream_disasm_H
1.23 -#define dream_disasm_H 1
1.24 +#ifndef dream_cpu_H
1.25 +#define dream_cpu_H 1
1.27 +#include <stdint.h>
1.29 +#include <glib/gtypes.h>
1.34 typedef uint32_t (*disasm_func_t)(uint32_t pc, char *buffer, int buflen, char *opcode );
1.36 typedef int (*is_valid_page_t)(uint32_t pc);
1.37 +typedef gboolean (*step_func_t)();
1.46 + * CPU definition structure - basic information and support functions.
1.48 typedef struct cpu_desc_struct {
1.49 char *name; /* CPU Name */
1.50 disasm_func_t disasm_func; /* Disassembly function */
1.51 + step_func_t step_func; /* Single step function */
1.52 + is_valid_page_t is_valid_page_func; /* Test for valid memory page */
1.53 size_t instr_size; /* Size of instruction */
1.54 char *regs; /* Pointer to start of registers */
1.55 size_t regs_size; /* Size of register structure in bytes */
1.56 const struct reg_desc_struct *regs_info; /* Description of all registers */
1.57 uint32_t *pc; /* Pointer to PC register */
1.58 uint32_t *icount; /* Pointer to instruction counter */
1.60 - is_valid_page_t is_valid_page_func; /* Test for valid memory page */
1.67 -#endif /* !dream_disasm_H */
1.68 +#endif /* !dream_cpu_H */