Rizin
unix-like reverse engineering framework and cli tools
gb_makros.h File Reference
#include <rz_types.h>

Go to the source code of this file.

Macros

#define GB_IS_VIRTUAL(x)   (x / 0x10000)
 
#define GB_R_MBC_ADDR(x)   (x % 0x10000)
 
#define GB_SOFTCAST(x, y)   (x + (y * 0x100))
 
#define GB_IS_RAM_DST(x, y)   (GB_SOFTCAST(x, y) / 0x8000)
 
#define GB_VBANK_ADDR(x)   ((x / 0x10000) * 0x10000 + 0x4000)
 
#define GB_IB_DST(x, y, z)   (GB_SOFTCAST(x, y) - 0x4000 + GB_VBANK_ADDR(z))
 
#define GB_IS_VBANK(x)   (x > (GB_VBANK_ADDR(x) - 1) && x < (GB_VBANK_ADDR(x) + 0x4000))
 
#define GB_IS_VBANK_DST(x, y)   (GB_IS_VBANK(GB_SOFTCAST(x, y)))
 

Macro Definition Documentation

◆ GB_IB_DST

#define GB_IB_DST (   x,
  y,
 
)    (GB_SOFTCAST(x, y) - 0x4000 + GB_VBANK_ADDR(z))

Definition at line 11 of file gb_makros.h.

◆ GB_IS_RAM_DST

#define GB_IS_RAM_DST (   x,
 
)    (GB_SOFTCAST(x, y) / 0x8000)

Definition at line 9 of file gb_makros.h.

◆ GB_IS_VBANK

#define GB_IS_VBANK (   x)    (x > (GB_VBANK_ADDR(x) - 1) && x < (GB_VBANK_ADDR(x) + 0x4000))

Definition at line 12 of file gb_makros.h.

◆ GB_IS_VBANK_DST

#define GB_IS_VBANK_DST (   x,
 
)    (GB_IS_VBANK(GB_SOFTCAST(x, y)))

Definition at line 13 of file gb_makros.h.

◆ GB_IS_VIRTUAL

#define GB_IS_VIRTUAL (   x)    (x / 0x10000)

Definition at line 6 of file gb_makros.h.

◆ GB_R_MBC_ADDR

#define GB_R_MBC_ADDR (   x)    (x % 0x10000)

Definition at line 7 of file gb_makros.h.

◆ GB_SOFTCAST

#define GB_SOFTCAST (   x,
 
)    (x + (y * 0x100))

Definition at line 8 of file gb_makros.h.

◆ GB_VBANK_ADDR

#define GB_VBANK_ADDR (   x)    ((x / 0x10000) * 0x10000 + 0x4000)

Definition at line 10 of file gb_makros.h.