mupen64plus-oldsvn/debugger/opprintf.h
2008-09-10 12:04:22 +00:00

65 lines
1.9 KiB
C

/*
* Mupen64Plus - debugger/opprintf.h
*
* Copyright (C) 2008 ZZT32 (zz@64.vg)
*
* Mupen64 homepage: http://code.google.com/p/mupen64plus/
*
* This program is free software; you can redistribute it and/
* or modify it under the terms of the GNU General Public Li-
* cence as published by the Free Software Foundation; either
* version 2 of the Licence.
*
* This program is distributed in the hope that it will be use-
* ful, but WITHOUT ANY WARRANTY; without even the implied war-
* ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public Licence for more details.
*
* You should have received a copy of the GNU General Public
* Licence along with this program; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
* USA.
*
**/
#ifndef __MR4KD_H
#define __MR4KD_H
/* Types */
#include "types.h"
/* Macros */
#define MR4KD_SPACING(x) ((x) << 24)
#define MR4KD_SET_SPACE(x) (mr4kd_conf |= (x) << 24)
#define MR4KD_GET_SPACE(x) (mr4kd_conf >> 24 & 0xFF)
#define MR4KD_FLAG_SET(x) (mr4kd_conf |= (x))
#define MR4KD_FLAG_GET(x) (mr4kd_conf & (x))
#define MR4KD_FLAG_CLEAR(x) (mr4kd_conf &= ~(x))
/* Disassembler flags */
enum
{
/* Register display options */
MR4KD_RTYPE0 = 0x00000001, /* K0 */
MR4KD_RTYPE1 = 0x00000002, /* 21 */
MR4KD_RPREFIX = 0x00000004, /* $K0 */
MR4KD_RLOWER = 0x00000008, /* k0 */
/* Opcode display options */
MR4KD_OLOWER = 0x00000010, /* mfhi */
/* Number display options */
MR4KD_HLOWER = 0x00000020, /* 0xffff */
};
/* Controlling functions (global) */
void mr4kd_flag_set ( int flag );
void mr4kd_flag_clear ( int flag );
void mr4kd_spacing ( int space );
int mr4kd_flag_get ( int flag );
/* Controlling functions (app-wide) */
int mr4kd_sprintf ( char *dest, char *name, uint32 instruction, uint32 pc, char *fmt );
#endif /* __MR4KD_H */