Search
lxdream.org :: lxdream/src/sh4/sh4core.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.h
changeset 27:1ef09a52cd1e
prev23:1ec3acd0594d
next30:89b30313d757
author nkeynes
date Sun Dec 25 01:28:39 2005 +0000 (15 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 +0000
1.2 +++ b/src/sh4/sh4core.h Sun Dec 25 01:28:39 2005 +0000
1.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, except
1.9 * for disassembly functions defined in sh4dasm.h
1.10 @@ -19,6 +19,7 @@
1.11 #ifndef sh4core_H
1.12 #define sh4core_H 1
1.13
1.14 +#include <glib/gtypes.h>
1.15 #include <stdint.h>
1.16 #include <stdio.h>
1.17
1.18 @@ -29,6 +30,29 @@
1.19 #endif
1.20 #endif
1.21
1.22 +
1.23 +/**
1.24 + * SH4 is running normally
1.25 + */
1.26 +#define SH4_STATE_RUNNING 1
1.27 +/**
1.28 + * SH4 is not executing instructions but all peripheral modules are still
1.29 + * running
1.30 + */
1.31 +#define SH4_STATE_SLEEP 2
1.32 +/**
1.33 + * SH4 is not executing instructions, DMAC is halted, but all other peripheral
1.34 + * modules are still running
1.35 + */
1.36 +#define SH4_STATE_DEEP_SLEEP 3
1.37 +/**
1.38 + * SH4 is not executing instructions and all peripheral modules are also
1.39 + * stopped. As close as you can get to powered-off without actually being
1.40 + * off.
1.41 + */
1.42 +#define SH4_STATE_STANDBY 4
1.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 in
1.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.54
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 );
1.64
.