1.1 --- a/src/state.h Mon Dec 06 01:43:04 2010 +0000 1.2 +++ b/src/state.h Sun Dec 12 23:47:35 2010 +0000 1.3 @@ -10,6 +10,16 @@ 1.4 #define ROM_SIZE 32768 1.5 1.6 /** 1.7 + * State error codes 1.8 + */ 1.9 +typedef enum { 1.10 + STATE_E_OK = 0, ///< Operation succeeded 1.11 + STATE_E_BAD_RAMSIZE = -1, ///< Bad RAM size specified (not a multiple of 512K, or less than 512K) 1.12 + STATE_E_NO_MEMORY = -2, ///< Out of memory while allocating state variables 1.13 + STATE_E_ROM_LOAD_FAIL = -3 ///< Error loading ROMs 1.14 +} STATE_ERR; 1.15 + 1.16 +/** 1.17 * @brief Emulator state storage 1.18 * 1.19 * This structure stores the internal state of the emulator.