Exemple #1
0
static VIDEO_UPDATE(gal3)
{
	int i;
	char mst[18], slv[18];
	static int pivot = 15;
	int pri;

	update_palette(screen->machine);

	if( input_code_pressed_once(screen->machine, KEYCODE_H)&&(pivot<15) )	pivot+=1;
	if( input_code_pressed_once(screen->machine, KEYCODE_J)&&(pivot>0) )	pivot-=1;

	for( pri=0; pri<pivot; pri++ )
	{
		namco_obj_draw(screen->machine, bitmap, cliprect, pri );
	}

/*  CopyVisiblePolyFrameBuffer( bitmap, cliprect,0,0x7fbf );

    for( pri=pivot; pri<15; pri++ )
    {
        namco_obj_draw(screen->machine, bitmap, cliprect, pri );
    }*/

	// CPU Diag LEDs
	mst[17]='\0', slv[17]='\0';
/// printf("mst=0x%x\tslv=0x%x\n", led_mst, led_slv);
	for(i=16;i<32;i++)
	{
		int t;
		if(i<24)
			t=i;
		else
			t=i+1;
		mst[8]=' '; slv[8]=' ';

		if(led_mst&(1<<i))
			mst[t-16]='*';
		else
			mst[t-16]='O';

		if(led_slv&(1<<i))
			slv[t-16]='*';
		else
			slv[t-16]='O';
	}

	popmessage("LED_MST:  %s\nLED_SLV:  %s\n2D Layer: 0-%d (Press H for +, J for -)\n", mst, slv, pivot);

	return 0;
}
Exemple #2
0
/*
0x00-0x7f controls u7759 samples (command 0xff->n)
0x80-0x85 ym2151 bgm
0x90-0x9b ym2151 sfx
*/
static READ8_HANDLER( sound_test_r )
{
    static UINT8 x;

    if(input_code_pressed_once(space->machine, KEYCODE_Z))
        x++;

    if(input_code_pressed_once(space->machine, KEYCODE_X))
        x--;

    if(input_code_pressed_once(space->machine, KEYCODE_A))
        return 0xff;

    popmessage("%02x",x);
    return x;
}
Exemple #3
0
/*
0x00-0x7f controls u7759 samples (command 0xff->n)
0x80-0x85 ym2151 bgm
0x90-0x9b ym2151 sfx
*/
static READ8_HANDLER( sound_test_r )
{
	bingoc_state *state = space->machine().driver_data<bingoc_state>();

	if(input_code_pressed_once(space->machine(), KEYCODE_Z))
		state->m_x++;

	if(input_code_pressed_once(space->machine(), KEYCODE_X))
		state->m_x--;

	if(input_code_pressed_once(space->machine(), KEYCODE_A))
		return 0xff;

	popmessage("%02x",state->m_x);
	return state->m_x;
}
Exemple #4
0
static VIDEO_UPDATE(monzagp)
{
    int x,y;

    if(input_code_pressed_once(screen->machine,KEYCODE_Z))
        bank--;

    if(input_code_pressed_once(screen->machine,KEYCODE_X))
        bank++;

    if(input_code_pressed_once(screen->machine,KEYCODE_Q))
    {
        screenw--;
        printf("%x\n",screenw);
    }

    if(input_code_pressed_once(screen->machine,KEYCODE_W))
    {
        screenw++;
        printf("%x\n",screenw);
    }

    if(input_code_pressed_once(screen->machine,KEYCODE_A))
    {
        FILE * p=fopen("vram.bin","wb");
        fwrite(&vram[0],1,0x10000,p);
        fclose(p);
    }

    bitmap_fill(bitmap, cliprect, 0);
    for(y=0; y<256; y++)
    {
        for(x=0; x<256; x++)
        {
            drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[bank&1],
                             vram[y*screenw+x],
                             //(vram[y*screenw+x]&0x3f)+(bank>>1)*64,
                             0,
                             0, 0,
                             x*8,y*8,
                             0);

        }
    }

    return 0;
}
Exemple #5
0
static VIDEO_UPDATE(mirax)
{
#ifdef MAME_DEBUG
	//audio tester
	if(input_code_pressed_once(KEYCODE_Q))
	{
		cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
	}
#endif
	return 0;
}
Exemple #6
0
static void slapfght_log_vram(void)
{
	if ( input_code_pressed_once(KEYCODE_B) )
	{
		int i;
		for (i=0; i<0x800; i++)
		{
			logerror("Offset:%03x   TileRAM:%02x   AttribRAM:%02x   SpriteRAM:%02x\n",i, videoram[i],colorram[i],spriteram[i]);
		}
	}
}
Exemple #7
0
static void nycaptor_setmask( running_machine &machine )
{
	nycaptor_state *state = machine.driver_data<nycaptor_state>();

	mKEY_MASK(KEYCODE_Q, 1); /* bg */
	mKEY_MASK(KEYCODE_W, 2);
	mKEY_MASK(KEYCODE_E, 4);
	mKEY_MASK(KEYCODE_R, 8);

	mKEY_MASK(KEYCODE_A, 0x10); /* sprites */
	mKEY_MASK(KEYCODE_S, 0x20);
	mKEY_MASK(KEYCODE_D, 0x40);
	mKEY_MASK(KEYCODE_F, 0x80);
	mKEY_MASK(KEYCODE_G, 0x100);
	mKEY_MASK(KEYCODE_H, 0x200);
	mKEY_MASK(KEYCODE_J, 0x400);
	mKEY_MASK(KEYCODE_K, 0x800);

	if (input_code_pressed_once(machine, KEYCODE_Z)){state->m_mask = 0; tilemap_mark_all_tiles_dirty(state->m_bg_tilemap);} /* disable */
	if (input_code_pressed_once(machine, KEYCODE_X)){state->m_mask |= 0x1000; tilemap_mark_all_tiles_dirty(state->m_bg_tilemap);} /* no layers */
}
Exemple #8
0
static void slapfght_log_vram(running_machine *machine)
{
#ifdef MAME_DEBUG
	if ( input_code_pressed_once(machine, KEYCODE_B) )
	{
		int i;
		for (i=0; i<0x800; i++)
		{
			logerror("Offset:%03x   TileRAM:%02x   AttribRAM:%02x   SpriteRAM:%02x\n",i, videoram[i],colorram[i],spriteram[i]);
		}
	}
#endif
}
Exemple #9
0
static SCREEN_UPDATE( pntnpuzl )
{
	pntnpuzl_state *state = screen->machine().driver_data<pntnpuzl_state>();
	int x,y;
	int count;
#if 0
	static int xxx=0x18f;
	static int yyy=512;
	static int sss=0xa8;

	if ( input_code_pressed_once(screen->machine(), KEYCODE_Q) )
	{
		xxx--;
		mame_printf_debug("xxx %04x\n",xxx);
	}

	if ( input_code_pressed_once(screen->machine(), KEYCODE_W) )
	{
		xxx++;
		mame_printf_debug("xxx %04x\n",xxx);
	}

	if ( input_code_pressed_once(screen->machine(), KEYCODE_A) )
	{
		yyy--;
		mame_printf_debug("yyy %04x\n",yyy);
	}

	if ( input_code_pressed_once(screen->machine(), KEYCODE_S) )
	{
		yyy++;
		mame_printf_debug("yyy %04x\n",yyy);
	}

	if ( input_code_pressed_once(screen->machine(), KEYCODE_Z) )
	{
		sss--;
		mame_printf_debug("sss %04x\n",sss);
	}

	if ( input_code_pressed_once(screen->machine(), KEYCODE_X) )
	{
		sss++;
		mame_printf_debug("sss %04x\n",sss);
	}
#else
	const int xxx=0x18f;
	const int yyy=512;
	const int sss=0xa8;
#endif


	count=sss;

	for(y=0;y<yyy;y++)
	{
		for(x=0;x<xxx;x+=2)
		{
			*BITMAP_ADDR16(bitmap, y, x) = (state->m_3a0000ram[count]&0x1f00)>>8;
			*BITMAP_ADDR16(bitmap, y, x+1) = (state->m_3a0000ram[count]&0x001f)>>0;
			count++;
		}
	}
	return 0;
}