本文整理汇总了C++中running_machine::describe_context方法的典型用法代码示例。如果您正苦于以下问题:C++ running_machine::describe_context方法的具体用法?C++ running_machine::describe_context怎么用?C++ running_machine::describe_context使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类running_machine
的用法示例。
在下文中一共展示了running_machine::describe_context方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ATTR_PRINTF
INLINE void ATTR_PRINTF( 3, 4 ) verboselog( int n_level, running_machine &machine, const char *s_fmt, ... )
{
if( VERBOSE_LEVEL >= n_level )
{
va_list v;
char buf[ 32768 ];
va_start( v, s_fmt );
vsprintf( buf, s_fmt, v );
va_end( v );
logerror( "%s: %s", machine.describe_context( ), buf );
}
}
示例2:
// this accepts only 32-bit accesses
INLINE int decode_reg32_64(running_machine &machine, UINT32 offset, UINT64 mem_mask, UINT64 *shift)
{
int reg = offset * 2;
*shift = 0;
// non 32-bit accesses have not yet been seen here, we need to know when they are
if ((mem_mask != U64(0xffffffff00000000)) && (mem_mask != U64(0x00000000ffffffff)))
{
mame_printf_verbose("%s:Wrong mask!\n", machine.describe_context());
// debugger_break(machine);
}
if (mem_mask == U64(0xffffffff00000000))
{
reg++;
*shift = 32;
}
return reg;
}
示例3: execute_blit
static void execute_blit(running_machine &machine)
{
artmagic_state *state = machine.driver_data<artmagic_state>();
UINT16 *dest = state->m_blitter_page ? state->m_vram0 : state->m_vram1;
int offset = ((state->m_blitter_data[1] & 0xff) << 16) | state->m_blitter_data[0];
int color = (state->m_blitter_data[1] >> 4) & 0xf0;
int x = (INT16)state->m_blitter_data[2];
int y = (INT16)state->m_blitter_data[3];
int maskx = state->m_blitter_data[6] & 0xff;
int masky = state->m_blitter_data[6] >> 8;
int w = ((state->m_blitter_data[7] & 0xff) + 1) * 4;
int h = (state->m_blitter_data[7] >> 8) + 1;
int i, j, sx, sy, last;
#if 0
{
static UINT32 hit_list[50000];
static int hit_index;
static FILE *f;
logerror("%s:Blit from %06X to (%d,%d) %dx%d -- %04X %04X %04X %04X %04X %04X %04X %04X\n",
machine.describe_context(), offset, x, y, w, h,
state->m_blitter_data[0], state->m_blitter_data[1],
state->m_blitter_data[2], state->m_blitter_data[3],
state->m_blitter_data[4], state->m_blitter_data[5],
state->m_blitter_data[6], state->m_blitter_data[7]);
if (!f) f = fopen("artmagic.log", "w");
for (i = 0; i < hit_index; i++)
if (hit_list[i] == offset)
break;
if (i == hit_index)
{
int tempoffs = offset;
hit_list[hit_index++] = offset;
fprintf(f, "----------------------\n"
"%s:Blit from %06X to (%d,%d) %dx%d -- %04X %04X %04X %04X %04X %04X %04X %04X\n",
machine.describe_context(), offset, x, y, w, h,
state->m_blitter_data[0], state->m_blitter_data[1],
state->m_blitter_data[2], state->m_blitter_data[3],
state->m_blitter_data[4], state->m_blitter_data[5],
state->m_blitter_data[6], state->m_blitter_data[7]);
fprintf(f, "\t");
for (i = 0; i < h; i++)
{
for (j = 0; j < w; j += 4)
fprintf(f, "%04X ", state->m_blitter_base[tempoffs++]);
fprintf(f, "\n\t");
}
fprintf(f, "\n\t");
tempoffs = offset;
for (i = 0; i < h; i++)
{
last = 0;
if (i == 0) /* first line */
{
/* ultennis, stonebal */
last ^= (state->m_blitter_data[7] & 0x0001);
if (state->m_is_stoneball)
last ^= ((state->m_blitter_data[0] & 0x0020) >> 3);
else /* ultennis */
last ^= ((state->m_blitter_data[0] & 0x0040) >> 4);
/* cheesech */
last ^= ((state->m_blitter_data[7] & 0x0400) >> 9);
last ^= ((state->m_blitter_data[0] & 0x2000) >> 10);
}
else /* following lines */
{