filename | src/sh4/sh4core.h |
changeset | 27:1ef09a52cd1e |
prev | 23:1ec3acd0594d |
next | 30:89b30313d757 |
author | nkeynes |
date | Sun Dec 25 01:28:39 2005 +0000 (18 years ago) |
permissions | -rw-r--r-- |
last change | Refactor all the GUI bits out of the main directory (except for a couple lingering temporarily in loader.c Fix a few timeslice issues |
file | annotate | diff | log | raw |
1.1 --- a/src/sh4/sh4core.h Fri Dec 23 11:44:55 2005 +00001.2 +++ b/src/sh4/sh4core.h Sun Dec 25 01:28:39 2005 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: sh4core.h,v 1.4 2005-12-23 11:44:55 nkeynes Exp $1.6 + * $Id: sh4core.h,v 1.5 2005-12-25 01:28:39 nkeynes Exp $1.7 *1.8 * This file defines the public functions exported by the SH4 core, except1.9 * for disassembly functions defined in sh4dasm.h1.10 @@ -19,6 +19,7 @@1.11 #ifndef sh4core_H1.12 #define sh4core_H 11.14 +#include <glib/gtypes.h>1.15 #include <stdint.h>1.16 #include <stdio.h>1.18 @@ -29,6 +30,29 @@1.19 #endif1.20 #endif1.22 +1.23 +/**1.24 + * SH4 is running normally1.25 + */1.26 +#define SH4_STATE_RUNNING 11.27 +/**1.28 + * SH4 is not executing instructions but all peripheral modules are still1.29 + * running1.30 + */1.31 +#define SH4_STATE_SLEEP 21.32 +/**1.33 + * SH4 is not executing instructions, DMAC is halted, but all other peripheral1.34 + * modules are still running1.35 + */1.36 +#define SH4_STATE_DEEP_SLEEP 31.37 +/**1.38 + * SH4 is not executing instructions and all peripheral modules are also1.39 + * stopped. As close as you can get to powered-off without actually being1.40 + * off.1.41 + */1.42 +#define SH4_STATE_STANDBY 41.43 +1.44 +1.45 struct sh4_registers {1.46 uint32_t r[16];1.47 uint32_t r_bank[8]; /* hidden banked registers */1.48 @@ -45,6 +69,7 @@1.49 uint32_t int_pending; /* flag set by the INTC = pending priority level */1.50 int in_delay_slot; /* flag to indicate the current instruction is in1.51 * a delay slot (certain rules apply) */1.52 + int sh4_state; /* Current power-on state (one of the SH4_STATE_* values ) */1.53 };1.55 extern struct sh4_registers sh4r;1.56 @@ -59,7 +84,7 @@1.57 int sh4_isrunning( void );1.58 void sh4_stop( void );1.59 void sh4_set_pc( int );1.60 -void sh4_execute_instruction( void );1.61 +gboolean sh4_execute_instruction( void );1.62 void sh4_raise_exception( int, int );1.63 void sh4_set_breakpoint( uint32_t pc, int type );
.