Ejemplo n.º 1
0
static void set_boarder_pieces (void)
{
	UINT8 i;

	for (i=0;i<12;i++)
		output_set_indexed_value("Q", i, border_pieces[i]);
}
Ejemplo n.º 2
0
void bfm_bd1_t::device_post_load()
{
	for (int i =0; i<16; i++)
	{
		output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
	}
}
Ejemplo n.º 3
0
void supercon_state::set_border_pieces()
{
	UINT8 i;

	for (i=0;i<12;i++)
		output_set_indexed_value("Q", i, m_border_pieces[i]);
}
Ejemplo n.º 4
0
static void clear_pieces(supercon_state *state)
{
	int i;
	for (i=0;i<64;i++)
	{
		output_set_indexed_value("P", i, EM);
		state->m_board[i]=EM;
	}
}
Ejemplo n.º 5
0
void supercon_state::clear_pieces()
{
	int i;
	for (i=0;i<64;i++)
	{
		output_set_indexed_value("P", i, EM);
		m_board[i]=EM;
	}
}
Ejemplo n.º 6
0
static void ROC10937_plot(int id, int power)
{
	int cursor;
	ROC10937_set_outputs(id);

	for (cursor = 0; cursor < 16; cursor++)
	{
		output_set_indexed_value("vfd", (id*16)+cursor, power?ROC10937_get_outputs(id)[cursor]:0x00000);
	}
}
Ejemplo n.º 7
0
		void update_lamps(void)
	{
		for (int i=0; i<16; i++)
		{
			for (int bit=0;bit<16;bit++)
			{
				int data = ((m_lamps[i] << bit)&0x8000)>>15;

				output_set_indexed_value("lamp", (i*16)+bit, data );
			}
		}
	}
Ejemplo n.º 8
0
void rocvfd_t::update_display()
{
	for (int i =0; i<16; i++)
	{
		if (m_reversed)
		{
			m_outputs[i] = set_display(m_chars[15-i]);
		}
		else
		{
			m_outputs[i] = set_display(m_chars[i]);
		}
		output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
	}
}
Ejemplo n.º 9
0
void bfm_bd1_t::update_display()
{
	for (int i =0; i<16; i++)
	{
		if (m_attrs[i] != AT_BLANK)
		{
			m_outputs[i] = set_display(m_chars[i]);
		}
		else
		{
			m_outputs[i] = 0;
		}
		output_set_indexed_value("vfd", (m_port_val*16) + i, m_outputs[i]);
	}
}
Ejemplo n.º 10
0
static WRITE8_HANDLER( mux_w )
{
	int x = xcounter;

	if ( x < DM_BYTESPERROW )
	{
		scanline[xcounter++] = data;
	}

	if ( x == 8 )
	{
    	int row = ((0xFF^data) & 0x7C) >> 2;	// 7C = 000001111100

		scanline[x] &= 0x80;
		if ( (row >= 0)  && (row < DM_MAXLINES) )
		{
			int p,dots;

			x = 0;
			p = 0;
			dots = 0;

			while ( p < (DM_BYTESPERROW) )
			{

				UINT8 d = scanline[p];
				if (d & 0x80) dots |= 0x01;
				else          dots &=~0x01;
				if (d & 0x40) dots |= 0x02;
				else          dots &=~0x02;
				if (d & 0x20) dots |= 0x04;
				else          dots &=~0x04;
				if (d & 0x10) dots |= 0x08;
				else          dots &=~0x08;
				if (d & 0x08) dots |= 0x10;
				else          dots &=~0x10;
				if (d & 0x04) dots |= 0x20;
				else          dots &=~0x20;
				if (d & 0x02) dots |= 0x40;
				else          dots &=~0x40;
				if (d & 0x01) dots |= 0x80;
				else          dots &=~0x80;
				output_set_indexed_value("matrix", p +(8*row), dots);
				p++;
			}
		}
	}
Ejemplo n.º 11
0
// generic display update; can override from child classes if not good enough
void esqvfd_t::update_display()
{
    for (int row = 0; row < m_rows; row++)
    {
        for (int col = 0; col < m_cols; col++)
        {
            if (m_dirty[row][col])
            {
                UINT32 segdata = conv_segments(font[m_chars[row][col]]);

                output_set_indexed_value("vfd", (row*m_cols) + col, segdata);

                m_dirty[row][col] = 0;
            }
        }
    }
}
Ejemplo n.º 12
0
void BFM_BD1_draw(int id)
{
	int cursor;
	BFM_BD1_set_outputs(id);

	for (cursor = 0; cursor < 16; cursor++)
	{
		output_set_indexed_value("vfd", (id*16)+cursor, BFM_BD1_get_outputs(id)[cursor]);

		if (BFM_BD1_get_outputs(id)[cursor] & 0x40000)
		{
			//activate flashing (unimplemented, just toggle on and off)
		}
		else
		{
			//deactivate flashing (unimplemented)
		}
	}
}
Ejemplo n.º 13
0
static void ROC10937_plot(int id, int power)
{
	int cursor;
	ROC10937_set_outputs(id);

	for (cursor = 0; cursor < 16; cursor++)
	{
		output_set_indexed_value("vfd", (id*16)+cursor, power?ROC10937_get_outputs(id)[cursor]:0x00000);

		if (ROC10937_get_outputs(id)[cursor] & 0x40000)
		{
			//activate flashing (unimplemented, just toggle on and off)
		}
		else
		{
			//deactivate flashing (unimplemented)
		}
	}
}
Ejemplo n.º 14
0
static WRITE8_HANDLER( mux_w )
{
	if ( dm01.xcounter < DM_BYTESPERROW )
	{
		dm01.scanline[dm01.xcounter] = data;
		dm01.xcounter++;
	}
	if ( dm01.xcounter == 9 )
	{
		int row = ((0xFF^data) & 0x7C) >> 2;    // 7C = 000001111100
		dm01.scanline[8] &= 0x80;//filter all other bits
		if ( (row >= 0)  && (row < DM_MAXLINES) )
		{
			int p = 0;

			while ( p < (DM_BYTESPERROW) )
			{
				UINT8 d = dm01.scanline[p];

				for (int bitpos=0; bitpos <8; bitpos++)
				{
					if (((p*8)+bitpos) <65)
					{
						if (d & 1<<(7-bitpos)) dm01.segbuffer[(p*8)+bitpos]=1;
						else dm01.segbuffer[(p*8)+bitpos]=0;
					}
				}
				p++;
			}

			for (int pos=0;pos<65;pos++)
			{
				output_set_indexed_value("dotmatrix", pos +(65*row), dm01.segbuffer[(pos)]);
			}
		}
	}
Ejemplo n.º 15
0
INLINE void output_set_neon_value(int index, int value)
{
	output_set_indexed_value("neon", index, value);
}
Ejemplo n.º 16
0
INLINE void output_set_nixie_value(int index, int value)
{
	output_set_indexed_value("nixie", index, value);
}
Ejemplo n.º 17
0
inline void nixieclock_state::output_set_neon_value(int index, int value)
{
	output_set_indexed_value("neon", index, value);
}
Ejemplo n.º 18
0
void supercon_state::set_pieces()
{
	int i;
	for (i=0;i<64;i++)
		output_set_indexed_value("P", i, m_board[i]);
}
Ejemplo n.º 19
0
static WRITE32_HANDLER( twinkle_io_w )
{
	twinkle_state *state = space->machine().driver_data<twinkle_state>();

	if( ACCESSING_BITS_16_23 )
	{
		state->m_io_offset = ( data >> 16 ) & 0xff;
	}
	if( ACCESSING_BITS_0_7 )
	{
		if( state->m_output_last[ state->m_io_offset ] != ( data & 0xff ) )
		{
			state->m_output_last[ state->m_io_offset ] = ( data & 0xff );

			switch( state->m_io_offset )
			{
				/* ? */
			case 0x07:
			case 0x0f:
			case 0x17:
			case 0x1f:
			case 0x27:
			case 0x2f:
			case 0x37:

				/* led */
			case 0x3f:
			case 0x47:
			case 0x4f:
			case 0x57:
			case 0x5f:
			case 0x67:
			case 0x6f:
			case 0x77:
			case 0x7f:
				output_set_indexed_value( "led", ( state->m_io_offset - 7 ) / 8, asciicharset[ ( data ^ 0xff ) & 0x7f ] );
				break;

			case 0x87:
				output_set_indexed_value( "spotlight", 0, ( ~data >> 3 ) & 1 );
				output_set_indexed_value( "spotlight", 1, ( ~data >> 2 ) & 1 );
				output_set_indexed_value( "spotlight", 2, ( ~data >> 1 ) & 1 );
				output_set_indexed_value( "spotlight", 3, ( ~data >> 0 ) & 1 );
				output_set_indexed_value( "spotlight", 4, ( ~data >> 4 ) & 1 );
				output_set_indexed_value( "spotlight", 5, ( ~data >> 5 ) & 1 );
				output_set_indexed_value( "spotlight", 6, ( ~data >> 6 ) & 1 );
				output_set_indexed_value( "spotlight", 7, ( ~data >> 7 ) & 1 );
				break;

			case 0x8f:
				output_set_value( "neonlamp", ~data & 1 );

				if( ( data & 0xfe ) != 0xfe )
				{
					printf("%02x = %02x\n", state->m_io_offset, data & 0xff );
				}
				break;

			default:
				printf( "unknown io %02x = %02x\n", state->m_io_offset, data & 0xff );
				break;
			}
		}
	}
Ejemplo n.º 20
0
/* seems to only work correctly for 'solarwap', 'poleposn' and 'sonstwar' (look at how high-scores are displayed for example) - or shall layout be changed ? */
static WRITE8_HANDLER(disp_w)
{
    peyper_state *state = space->machine().driver_data<peyper_state>();
    state->display[state->display_block] = data;

    UINT8 a = data & 0x0f;
    UINT8 b = data >> 4;
    UINT8 hex_a = hex_to_7seg[a];
    UINT8 hex_b = hex_to_7seg[b];
/*
0 -> XA0 DPL25,DPL27
1 -> XA1 DPL26,DPL28
2 -> DPL23,DPL5
3 -> DPL22,DPL4
4 -> DPL21,DPL3
5 -> DPL20,DPL2
6 -> DPL19,DPL1
7 -> DPL30,DPL33
*/
    switch(state->display_block) {
        case 0 :
                output_set_indexed_value("dpl_",25,hex_a);
                output_set_indexed_value("dpl_",27,hex_b);
                break;
        case 1 :
                output_set_indexed_value("dpl_",26,hex_a);
                output_set_indexed_value("dpl_",28,hex_b);
                break;
        case 2 :
                output_set_indexed_value("dpl_",23,hex_a);
                output_set_indexed_value("dpl_",5,hex_b);
                break;
        case 3 :
                output_set_indexed_value("dpl_",22,hex_a);
                output_set_indexed_value("dpl_",4,hex_b);
                break;
        case 4 :
                output_set_indexed_value("dpl_",21,hex_a);
                output_set_indexed_value("dpl_",3,hex_b);
                break;
        case 5 :
                output_set_indexed_value("dpl_",20,hex_a);
                output_set_indexed_value("dpl_",2,hex_b);
                break;
        case 6 :
                output_set_indexed_value("dpl_",19,hex_a);
                output_set_indexed_value("dpl_",1,hex_b);
                break;
        case 7 :
                output_set_indexed_value("dpl_",30,hex_a);
                output_set_indexed_value("dpl_",33,hex_b);
                break;
/*
8 ->  XB0
9 ->  XB1
10 -> DPL11,DPL17
11 -> DPL10,DPL16
12 -> DPL09,DPL15
13 -> DPL08,DPL14
14 -> DPL07,DPL13
15 -> DPL31,DPL32
*/
        case 8 :
                /*
                if (BIT(a,3)) logerror("TILT\n");
                if (BIT(a,2)) logerror("ONC\n");
                if (BIT(a,1)) logerror("GAME OVER\n");
                if (BIT(a,0)) logerror("BALL IN PLAY\n");
                */
                output_set_indexed_value("led_",1,BIT(b,0)); // PLAYER 1
                output_set_indexed_value("led_",2,BIT(b,1)); // PLAYER 2
                output_set_indexed_value("led_",3,BIT(b,2)); // PLAYER 3
                output_set_indexed_value("led_",4,BIT(b,3)); // PLAYER 4
                break;
        case 9 :
                if (!BIT(b,0)) output_set_indexed_value("dpl_",6,hex_to_7seg[0]);
                if (!BIT(b,1)) output_set_indexed_value("dpl_",12,hex_to_7seg[0]);
                if (!BIT(b,2)) output_set_indexed_value("dpl_",24,hex_to_7seg[0]);
                if (!BIT(b,3)) output_set_indexed_value("dpl_",18,hex_to_7seg[0]);
                output_set_indexed_value("dpl_",29,hex_a);
                break;
        case 10 :
                output_set_indexed_value("dpl_",11,hex_a);
                output_set_indexed_value("dpl_",17,hex_b);
                break;
        case 11 :
                output_set_indexed_value("dpl_",10,hex_a);
                output_set_indexed_value("dpl_",16,hex_b);
                break;
        case 12 :
                output_set_indexed_value("dpl_",9,hex_a);
                output_set_indexed_value("dpl_",15,hex_b);
                break;
        case 13 :
                output_set_indexed_value("dpl_",8,hex_a);
                output_set_indexed_value("dpl_",14,hex_b);
                break;
        case 14 :
                output_set_indexed_value("dpl_",7,hex_a);
                output_set_indexed_value("dpl_",13,hex_b);
                break;
        case 15 :
                output_set_indexed_value("dpl_",31,hex_a);
                output_set_indexed_value("dpl_",32,hex_b);
                break;
    }

    state->display_block++;
    state->display_block&=0x0f;
}
Ejemplo n.º 21
0
static void set_pieces (supercon_state *state)
{
	int i;
	for (i=0;i<64;i++)
		output_set_indexed_value("P", i, state->m_board[i]);
}