Path: blob/master/libmupen64plus/mupen64plus-core/src/r4300/r4300.h
2 views
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *1* Mupen64plus - r4300.h *2* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *3* Copyright (C) 2002 Hacktarux *4* *5* This program is free software; you can redistribute it and/or modify *6* it under the terms of the GNU General Public License as published by *7* the Free Software Foundation; either version 2 of the License, or *8* (at your option) any later version. *9* *10* This program is distributed in the hope that it will be useful, *11* but WITHOUT ANY WARRANTY; without even the implied warranty of *12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *13* GNU General Public License for more details. *14* *15* You should have received a copy of the GNU General Public License *16* along with this program; if not, write to the *17* Free Software Foundation, Inc., *18* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *19* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */2021#ifndef R4300_H22#define R4300_H2324#define WIN32_LEAN_AND_MEAN25#include <Windows.h>2627#include "recomp.h"28#include "memory/tlb.h"2930extern precomp_instr *PC;3132extern precomp_block *blocks[0x100000], *actual;3334extern int stop, llbit; //, rompause;35extern HANDLE rompausesem;36extern long long int reg[32], hi, lo;37extern long long int local_rs;38extern unsigned int reg_cop0[32];39extern double *reg_cop1_double[32];40extern float *reg_cop1_simple[32];41extern long long int reg_cop1_fgr_64[32];42extern int FCR0, FCR31;43extern tlb tlb_e[32];44extern unsigned int delay_slot, skip_jump, dyna_interp, op;45extern unsigned long long int debug_count;46extern unsigned int r4300emu;47extern unsigned int next_interupt, CIC_Chip;48extern int rounding_mode, trunc_mode, round_mode, ceil_mode, floor_mode;49extern unsigned int last_addr;50extern char invalid_code[0x100000];51extern unsigned int jump_to_address;52extern int no_compiled_jump;5354void init_blocks(void);55void free_blocks(void);56void r4300_reset_hard(void);57void r4300_reset_soft(void);58void r4300_execute(void (*startcb)(void));59void pure_interpreter(void);60void compare_core(void);61void jump_to_func(void);62void update_count(void);63int check_cop1_unusable(void);64void shuffle_fpr_data(int oldStatus, int newStatus);65void set_fpr_pointers(int newStatus);6667/* Jumps to the given address. This is for the cached interpreter / dynarec. */68#define jump_to(a) { jump_to_address = a; jump_to_func(); }6970/* Jump to the given address. This works for all r4300 emulator, but is slower.71* Use this for common code which can be executed from any r4300 emulator. */72void generic_jump_to(unsigned int address);7374// r4300 emulators75#define CORE_PURE_INTERPRETER 076#define CORE_INTERPRETER 177#define CORE_DYNAREC 27879// profiling80#define ALL_SECTION 081#define GFX_SECTION 182#define AUDIO_SECTION 283#define COMPILER_SECTION 384#define IDLE_SECTION 48586#ifdef PROFILE87void start_section(int section_type);88void end_section(int section_type);89void refresh_stat(void);90#else91#define start_section(a)92#define end_section(a)93#define refresh_stat()94#endif9596#endif /* R4300_H */979899100