cdrom: change pause timing again
[pcsx_rearmed.git] / libpcsxcore / new_dynarec / emu_if.h
... / ...
CommitLineData
1#include "new_dynarec.h"
2#include "../r3000a.h"
3
4extern int dynarec_local[];
5
6/* same as psxRegs.GPR.n.* */
7extern int hi, lo;
8
9/* same as psxRegs.CP0.n.* */
10extern int reg_cop0[];
11
12/* COP2/GTE */
13enum gte_opcodes {
14 GTE_RTPS = 0x01,
15 GTE_NCLIP = 0x06,
16 GTE_OP = 0x0c,
17 GTE_DPCS = 0x10,
18 GTE_INTPL = 0x11,
19 GTE_MVMVA = 0x12,
20 GTE_NCDS = 0x13,
21 GTE_CDP = 0x14,
22 GTE_NCDT = 0x16,
23 GTE_NCCS = 0x1b,
24 GTE_CC = 0x1c,
25 GTE_NCS = 0x1e,
26 GTE_NCT = 0x20,
27 GTE_SQR = 0x28,
28 GTE_DCPL = 0x29,
29 GTE_DPCT = 0x2a,
30 GTE_AVSZ3 = 0x2d,
31 GTE_AVSZ4 = 0x2e,
32 GTE_RTPT = 0x30,
33 GTE_GPF = 0x3d,
34 GTE_GPL = 0x3e,
35 GTE_NCCT = 0x3f,
36};
37
38extern int reg_cop2d[], reg_cop2c[];
39extern void *gte_handlers[64];
40extern void *gte_handlers_nf[64];
41extern const char *gte_regnames[64];
42extern const uint64_t gte_reg_reads[64];
43extern const uint64_t gte_reg_writes[64];
44
45/* mem */
46extern void *mem_rtab;
47extern void *mem_wtab;
48
49void jump_handler_read8(u32 addr, u32 *table, u32 cycles);
50void jump_handler_read16(u32 addr, u32 *table, u32 cycles);
51void jump_handler_read32(u32 addr, u32 *table, u32 cycles);
52void jump_handler_write8(u32 addr, u32 data, u32 cycles, u32 *table);
53void jump_handler_write16(u32 addr, u32 data, u32 cycles, u32 *table);
54void jump_handler_write32(u32 addr, u32 data, u32 cycles, u32 *table);
55void jump_handler_write_h(u32 addr, u32 data, u32 cycles, void *handler);
56void jump_handle_swl(u32 addr, u32 data, u32 cycles);
57void jump_handle_swr(u32 addr, u32 data, u32 cycles);
58u32 rcnt0_read_count_m0(u32 addr, u32, u32 cycles);
59u32 rcnt0_read_count_m1(u32 addr, u32, u32 cycles);
60u32 rcnt1_read_count_m0(u32 addr, u32, u32 cycles);
61u32 rcnt1_read_count_m1(u32 addr, u32, u32 cycles);
62u32 rcnt2_read_count_m0(u32 addr, u32, u32 cycles);
63u32 rcnt2_read_count_m1(u32 addr, u32, u32 cycles);
64
65extern unsigned int address;
66extern unsigned int hack_addr;
67extern void *psxH_ptr;
68extern void *zeromem_ptr;
69extern void *scratch_buf_ptr;
70
71// same as invalid_code, just a region for ram write checks (inclusive)
72// (psx/guest address range)
73extern u32 inv_code_start, inv_code_end;
74
75/* cycles/irqs */
76extern u32 next_interupt;
77extern int pending_exception;
78
79/* called by drc */
80void pcsx_mtc0(u32 reg, u32 val);
81void pcsx_mtc0_ds(u32 reg, u32 val);
82
83/* misc */
84extern void SysPrintf(const char *fmt, ...);
85