~ubuntu-branches/ubuntu/precise/mupen64plus/precise

« back to all changes in this revision

Viewing changes to r4300/r4300.h

  • Committer: Bazaar Package Importer
  • Author(s): Sven Eckelmann
  • Date: 2009-09-08 22:17:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090908221700-yela0ckgc1xwiqtn
Tags: upstream-1.5+dfsg1
ImportĀ upstreamĀ versionĀ 1.5+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
2
 *   Mupen64plus - r4300.h                                                 *
 
3
 *   Mupen64Plus homepage: http://code.google.com/p/mupen64plus/           *
 
4
 *   Copyright (C) 2002 Hacktarux                                          *
 
5
 *                                                                         *
 
6
 *   This program is free software; you can redistribute it and/or modify  *
 
7
 *   it under the terms of the GNU General Public License as published by  *
 
8
 *   the Free Software Foundation; either version 2 of the License, or     *
 
9
 *   (at your option) any later version.                                   *
 
10
 *                                                                         *
 
11
 *   This program is distributed in the hope that it will be useful,       *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU General Public License for more details.                          *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU General Public License     *
 
17
 *   along with this program; if not, write to the                         *
 
18
 *   Free Software Foundation, Inc.,                                       *
 
19
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
 
20
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
21
 
 
22
#ifndef R4300_H
 
23
#define R4300_H
 
24
 
 
25
#include <stdio.h>
 
26
#include <string.h>
 
27
 
 
28
#include "recomp.h"
 
29
 
 
30
#include "../main/rom.h"
 
31
#include "../memory/tlb.h"
 
32
 
 
33
extern precomp_instr *PC;
 
34
 
 
35
extern precomp_block *blocks[0x100000], *actual;
 
36
 
 
37
extern int stop, llbit, rompause;
 
38
extern long long int reg[32], hi, lo;
 
39
extern long long int local_rs, local_rt;
 
40
extern unsigned int reg_cop0[32];
 
41
extern int local_rs32, local_rt32;
 
42
extern unsigned int jump_target;
 
43
extern double *reg_cop1_double[32];
 
44
extern float *reg_cop1_simple[32];
 
45
extern int reg_cop1_fgr_32[32];
 
46
extern long long int reg_cop1_fgr_64[32];
 
47
extern int FCR0, FCR31;
 
48
extern tlb tlb_e[32];
 
49
extern unsigned int delay_slot, skip_jump, dyna_interp;
 
50
extern unsigned long long int debug_count;
 
51
extern unsigned int dynacore;
 
52
extern unsigned int interpcore;
 
53
extern unsigned int next_interupt, CIC_Chip;
 
54
extern int rounding_mode, trunc_mode, round_mode, ceil_mode, floor_mode;
 
55
extern unsigned int last_addr, interp_addr;
 
56
extern char invalid_code[0x100000];
 
57
extern unsigned int jump_to_address;
 
58
extern int no_compiled_jump;
 
59
 
 
60
void init_blocks();
 
61
void r4300_reset_hard();
 
62
void r4300_reset_soft();
 
63
void r4300_execute();
 
64
void pure_interpreter();
 
65
void compare_core();
 
66
void jump_to_func();
 
67
void update_count();
 
68
int check_cop1_unusable();
 
69
 
 
70
#define jump_to(a) { jump_to_address = a; jump_to_func(); }
 
71
 
 
72
// profiling
 
73
 
 
74
#define GFX_SECTION 1
 
75
#define AUDIO_SECTION 2
 
76
#define COMPILER_SECTION 3
 
77
#define IDLE_SECTION 4
 
78
 
 
79
#ifndef __WIN32__
 
80
 
 
81
//#define PROFILE
 
82
 
 
83
#ifdef PROFILE
 
84
 
 
85
void start_section(int section_type);
 
86
void end_section(int section_type);
 
87
void refresh_stat();
 
88
 
 
89
#else
 
90
 
 
91
#define start_section(a)
 
92
#define end_section(a)
 
93
#define refresh_stat()
 
94
 
 
95
#endif
 
96
 
 
97
#else
 
98
 
 
99
#define start_section(a)
 
100
#define end_section(a)
 
101
#define refresh_stat()
 
102
 
 
103
#endif
 
104
 
 
105
#endif
 
106