summaryrefslogtreecommitdiffstats
path: root/dev-doc/defines.txt
blob: dd620554eb7cccc8eadb1f7f15d40f0a9c272040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
The compilation of ReGBA can be affected by various conditional compilation
directives. Here are some of the most important ones:

* MIPS_XBURST, MIPS optimisation option.
  If compiled with this option, ReGBA's MIPS assembly core will assume that the
  instruction following a load-memory instruction may read the register that
  was just loaded. This reduces the instruction count in the programm, making
  better use of the instruction cache.
  Do not use this option if you are using an older MIPS processor which
  requires that the instruction following a load-memory instruction not use the
  register being loaded. This is known as a *load delay slot*.
* MIPS_32R2, MIPS optimisation option.
  If compiled with this option, ReGBA's MIPS assembly core and code generator
  will assume that the MIPS32 Revision II architecture instructions can be used
  to insert and extract bits from 32-bit values. This speeds up address
  calculations for GBA memory access, because these operations can use single
  INS and EXT instructions instead of much longer sequences of bitwise and
  shift (AND, OR, SLL, SRL) instructions.
  The SYNCI instruction, which flushes native code that has just been written,
  is also faster than needing to switch to the kernel constantly.
  Do not use this option if you are using a MIPS32 Revision I processor.
* PERFORMANCE_IMPACTING_STATISTICS, cross-platform statistics gathering option.
  If compiled with this option, ReGBA will fill the Stats structure in stats.c
  with statistics that would make the emulator unacceptably slow for playing
  on.
  In particular, ReGBA gathers statistics about GBA opcode decoding, memory
  accessor patching, and a few other things that are useful for optimisations,
  as required.
  Release builds should not use this option.

The following options are also available on the DSTwo port:

* TRACE_FRAMESKIP, low-volume tracing option.
  If compiled with this option, ReGBA will emit trace information when the
  automatic frame skip value changes during emulation.
* TRACE_SOUND, low-volume tracing option.
  If compiled with this option, ReGBA will emit trace information when there
  are -1 audio buffers left.
* GIT_VERSION, version variable.
  The DSTwo port uses the value of this variable to show the Git commit hash
  of the version being compiled.

The following options are also available on the OpenDingux ports:

* USE_MMAP, memory-mapping of files.
* LOAD_ALL_ROM, disabling on-demand loading of files.
  These two mutually-exclusive options control how ROMs are to be loaded.
  If compiled with USE_MMAP, ReGBA will ask the operating system to map pages
  on demand from a memory-mapped file.
  If compiled with LOAD_ALL_ROM, ReGBA will load the entire file into memory
  in a private allocation.
  If compiled with neither option, ReGBA will use its own on-demand loading
  code with an allocation possibly smaller than the file.
* TRACE_MEMORY, low-volume tracing option.
  If compiled with this option, ReGBA will emit trace information when memory
  is being mapped, unmapped, loaded on demand, or allocated or deallocated for
  a compressed ROM.
* GIT_VERSION, version variable.
  The OpenDingux ports use the value of this variable to show the Git commit
  hash of the version being compiled.

The following trace options are available on all platforms:

* TRACE_FLUSHING, medium-volume tracing option in some games.
  If compiled with this option, ReGBA will emit trace information when a code
  cache is being flushed.
* TRACE_TRANSLATION_REQUESTS, high-volume tracing option.
  If compiled with this option, ReGBA will emit trace information the first
  time a certain GBA code block is being recompiled to native code while
  emulating a certain game.
* TRACE_REUSE, high-volume tracing option in some games.
  If compiled with this option, ReGBA will emit trace information every time
  the current game rewrites code that ReGBA has seen before in GBA RAM at the
  same location.
* TRACE_RECOMPILATION, high-volume tracing option.
  If compiled with this option, ReGBA will emit trace information when a code
  block is being recompiled, giving the address in the GBA memory space, the
  length of the code block, and even a hexadecimal dump of the instructions in
  it.
* TRACE, very high-volume tracing option.
  If compiled with this option, ReGBA will emit trace information when anything
  happens in the Universe.