frontend: update libpicofe, fix missed callbacks
[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/* COP2/GTE */
7enum gte_opcodes {
8 GTE_RTPS = 0x01,
9 GTE_NCLIP = 0x06,
10 GTE_OP = 0x0c,
11 GTE_DPCS = 0x10,
12 GTE_INTPL = 0x11,
13 GTE_MVMVA = 0x12,
14 GTE_NCDS = 0x13,
15 GTE_CDP = 0x14,
16 GTE_NCDT = 0x16,
17 GTE_NCCS = 0x1b,
18 GTE_CC = 0x1c,
19 GTE_NCS = 0x1e,
20 GTE_NCT = 0x20,
21 GTE_SQR = 0x28,
22 GTE_DCPL = 0x29,
23 GTE_DPCT = 0x2a,
24 GTE_AVSZ3 = 0x2d,
25 GTE_AVSZ4 = 0x2e,
26 GTE_RTPT = 0x30,
27 GTE_GPF = 0x3d,
28 GTE_GPL = 0x3e,
29 GTE_NCCT = 0x3f,
30};
31
32extern void *gte_handlers[64];
33extern void *gte_handlers_nf[64];
34extern const char *gte_regnames[64];
35extern const uint64_t gte_reg_reads[64];
36extern const uint64_t gte_reg_writes[64];
37
38/* mem */
39extern void *mem_rtab;
40extern void *mem_wtab;
41
42void jump_handler_read8(u32 addr, u32 *table, u32 cycles);
43void jump_handler_read16(u32 addr, u32 *table, u32 cycles);
44void jump_handler_read32(u32 addr, u32 *table, u32 cycles);
45void jump_handler_write8(u32 addr, u32 data, u32 cycles, u32 *table);
46void jump_handler_write16(u32 addr, u32 data, u32 cycles, u32 *table);
47void jump_handler_write32(u32 addr, u32 data, u32 cycles, u32 *table);
48void jump_handler_write_h(u32 addr, u32 data, u32 cycles, void *handler);
49void jump_handle_swl(u32 addr, u32 data, u32 cycles);
50void jump_handle_swr(u32 addr, u32 data, u32 cycles);
51u32 rcnt0_read_count_m0(u32 addr, u32, u32 cycles);
52u32 rcnt0_read_count_m1(u32 addr, u32, u32 cycles);
53u32 rcnt1_read_count_m0(u32 addr, u32, u32 cycles);
54u32 rcnt1_read_count_m1(u32 addr, u32, u32 cycles);
55u32 rcnt2_read_count_m0(u32 addr, u32, u32 cycles);
56u32 rcnt2_read_count_m1(u32 addr, u32, u32 cycles);
57
58extern unsigned int address;
59extern unsigned int hack_addr;
60extern void *psxH_ptr;
61extern void *zeromem_ptr;
62extern void *scratch_buf_ptr;
63
64// same as invalid_code, just a region for ram write checks (inclusive)
65// (psx/guest address range)
66extern u32 inv_code_start, inv_code_end;
67
68/* cycles/irqs */
69extern u32 next_interupt;
70
71/* called by drc */
72struct psxRegisters;
73void pcsx_mtc0(struct psxRegisters *regs, u32 reg, u32 val);
74void pcsx_mtc0_ds(struct psxRegisters *regs, u32 reg, u32 val);
75
76/* misc */
77extern void SysPrintf(const char *fmt, ...);
78