00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef DECODER_H_INCLUDED
00026 #define DECODER_H_INCLUDED
00027
00028 #include <inttypes.h>
00029
00030 #ifndef USING_MINGW
00031 #include <sys/time.h>
00032 #endif
00033
00034 #include "ifo_types.h"
00035 #include "dvdnav_internal.h"
00036
00037
00038 typedef enum {
00039 LinkNoLink = 0,
00040
00041 LinkTopC = 1,
00042 LinkNextC = 2,
00043 LinkPrevC = 3,
00044
00045 LinkTopPG = 5,
00046 LinkNextPG = 6,
00047 LinkPrevPG = 7,
00048
00049 LinkTopPGC = 9,
00050 LinkNextPGC = 10,
00051 LinkPrevPGC = 11,
00052 LinkGoUpPGC = 12,
00053 LinkTailPGC = 13,
00054
00055 LinkRSM = 16,
00056
00057 LinkPGCN,
00058 LinkPTTN,
00059 LinkPGN,
00060 LinkCN,
00061
00062 Exit,
00063
00064 JumpTT,
00065 JumpVTS_TT,
00066 JumpVTS_PTT,
00067
00068 JumpSS_FP,
00069 JumpSS_VMGM_MENU,
00070 JumpSS_VTSM,
00071 JumpSS_VMGM_PGC,
00072
00073 CallSS_FP,
00074 CallSS_VMGM_MENU,
00075 CallSS_VTSM,
00076 CallSS_VMGM_PGC,
00077
00078 PlayThis
00079 } link_cmd_t;
00080
00081
00082 typedef struct {
00083 link_cmd_t command;
00084 uint16_t data1;
00085 uint16_t data2;
00086 uint16_t data3;
00087 } link_t;
00088
00089
00090 typedef struct {
00091 uint16_t SPRM[24];
00092 uint16_t GPRM[16];
00093 uint8_t GPRM_mode[16];
00094 struct timeval GPRM_time[16];
00095 } registers_t;
00096
00097
00098 typedef struct {
00099 uint64_t instruction;
00100 uint64_t examined;
00101 registers_t *registers;
00102 } command_t;
00103
00104
00105
00106
00107 int32_t vmEval_CMD(vm_cmd_t commands[], int32_t num_commands,
00108 registers_t *registers, link_t *return_values);
00109
00110
00111 uint32_t vm_getbits(command_t* command, int32_t start, int32_t count);
00112
00113 #ifdef TRACE
00114
00115 void vm_print_link(link_t value);
00116
00117
00118 void vm_print_registers( registers_t *registers );
00119 #endif
00120
00121 #endif