Beispiel #1
0
void nes_whirl2706_device::device_start()
{
	common_start();
	save_item(NAME(m_latch));
}
Beispiel #2
0
void sb16_device::device_start()
{
	ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262");
	m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy")));
	m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this));
	m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) );
	m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) );
	m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) );
	m_isa->install_device(0x0224, 0x0225, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this));
	m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_device::mpu401_r), this), write8_delegate(FUNC(sb16_device::mpu401_w), this));
	m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
	m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
	m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));

	save_item(NAME(m_mixer.data));
	save_item(NAME(m_mixer.status));
	save_item(NAME(m_mixer.main_vol));
	save_item(NAME(m_mixer.dac_vol));
	save_item(NAME(m_mixer.fm_vol));
	save_item(NAME(m_mixer.cd_vol));
	save_item(NAME(m_mixer.line_vol));
	save_item(NAME(m_mixer.mic_vol));
	save_item(NAME(m_mixer.pc_speaker_vol));
	save_item(NAME(m_mixer.output_ctl));
	save_item(NAME(m_mixer.input_ctl));
	save_item(NAME(m_mixer.input_gain));
	save_item(NAME(m_mixer.output_gain));
	save_item(NAME(m_mixer.agc));
	save_item(NAME(m_mixer.treble));
	save_item(NAME(m_mixer.bass));

	sb_device::device_start();
}
Beispiel #3
0
void usb_sound_device::device_start()
{
	g80_filter_state temp;
	int tchan, tgroup;

	/* find the CPU we are associated with */
	m_maincpu = machine().device("maincpu");
	assert(m_maincpu != nullptr);

	/* create a sound stream */
	m_stream = machine().sound().stream_alloc(*this, 0, 1, SAMPLE_RATE);

	/* initialize state */
	m_noise_shift = 0x15555;

	for (timer8253 &g : m_timer_group)
	{
		g.chan_filter[0].configure(10e3, 1e-6);
		g.chan_filter[1].configure(10e3, 1e-6);
		g.gate1.configure(100e3, 0.01e-6);
		g.gate2.configure(2 * 100e3, 0.01e-6);
	}

	temp.configure(100e3, 0.01e-6);
	m_gate_rc1_exp[0] = temp.exponent;
	temp.configure(1e3, 0.01e-6);
	m_gate_rc1_exp[1] = temp.exponent;
	temp.configure(2 * 100e3, 0.01e-6);
	m_gate_rc2_exp[0] = temp.exponent;
	temp.configure(2 * 1e3, 0.01e-6);
	m_gate_rc2_exp[1] = temp.exponent;

	m_noise_filters[0].configure(2.7e3 + 2.7e3, 1.0e-6);
	m_noise_filters[1].configure(2.7e3 + 1e3, 0.30e-6);
	m_noise_filters[2].configure(2.7e3 + 270, 0.15e-6);
	m_noise_filters[3].configure(2.7e3 + 0, 0.082e-6);
	m_noise_filters[4].configure(33e3, 0.1e-6);

	m_final_filter.configure(100e3, 4.7e-6);

	/* register for save states */
	save_item(NAME(m_in_latch));
	save_item(NAME(m_out_latch));
	save_item(NAME(m_last_p2_value));
	save_item(NAME(m_work_ram_bank));
	save_item(NAME(m_t1_clock));

	for (tgroup = 0; tgroup < 3; tgroup++)
	{
		timer8253 *group = &m_timer_group[tgroup];
		for (tchan = 0; tchan < 3; tchan++)
		{
			timer8253::channel *channel = &group->chan[tchan];
			save_item(NAME(channel->holding), tgroup * 3 + tchan);
			save_item(NAME(channel->latchmode), tgroup * 3 + tchan);
			save_item(NAME(channel->latchtoggle), tgroup * 3 + tchan);
			save_item(NAME(channel->clockmode), tgroup * 3 + tchan);
			save_item(NAME(channel->bcdmode), tgroup * 3 + tchan);
			save_item(NAME(channel->output), tgroup * 3 + tchan);
			save_item(NAME(channel->lastgate), tgroup * 3 + tchan);
			save_item(NAME(channel->gate), tgroup * 3 + tchan);
			save_item(NAME(channel->subcount), tgroup * 3 + tchan);
			save_item(NAME(channel->count), tgroup * 3 + tchan);
			save_item(NAME(channel->remain), tgroup * 3 + tchan);
		}
		save_item(NAME(group->env), tgroup);
		save_item(NAME(group->chan_filter[0].capval), tgroup);
		save_item(NAME(group->chan_filter[1].capval), tgroup);
		save_item(NAME(group->gate1.capval), tgroup);
		save_item(NAME(group->gate2.capval), tgroup);
		save_item(NAME(group->config), tgroup);
	}

	save_item(NAME(m_timer_mode));
	save_item(NAME(m_noise_shift));
	save_item(NAME(m_noise_state));
	save_item(NAME(m_noise_subcount));
	save_item(NAME(m_final_filter.capval));
	save_item(NAME(m_noise_filters[0].capval));
	save_item(NAME(m_noise_filters[1].capval));
	save_item(NAME(m_noise_filters[2].capval));
	save_item(NAME(m_noise_filters[3].capval));
	save_item(NAME(m_noise_filters[4].capval));
}
Beispiel #4
0
CBaseGraph::CBaseGraph()
	: CUnknown(NAME("CBaseGraph"), NULL)
	, m_hNotifyWnd(NULL)
{
}
CTextPassThruOutputPin::CTextPassThruOutputPin(CTextPassThruFilter* pTPTFilter, CCritSec* pLock, HRESULT* phr)
	: CBaseOutputPin(NAME(""), pTPTFilter, pLock, phr, L"Out")
	, m_pTPTFilter(pTPTFilter)
{
}
Beispiel #6
0
void crt9212_t::device_start()
{
	// resolve callbacks
	m_write_dout.resolve_safe();
	m_write_rof.resolve_safe();
	m_write_wof.resolve_safe();

	// state saving
	save_item(NAME(m_data));
	save_item(NAME(m_clrcnt));
	save_item(NAME(m_tog));
	save_item(NAME(m_ren));
	save_item(NAME(m_wen1));
	save_item(NAME(m_wen2));
	save_item(NAME(m_oe));
	save_item(NAME(m_rclk));
	save_item(NAME(m_wclk));
	save_item(NAME(m_clrcnt_edge));
	save_item(NAME(m_data_latch));
	save_item(NAME(m_ren_int));
	save_item(NAME(m_wen_int));
	save_item(NAME(m_ram[0]));
	save_item(NAME(m_ram[1]));
	save_item(NAME(m_buffer));
	save_item(NAME(m_rac));
	save_item(NAME(m_wac));
}
Beispiel #7
0
/*
 * la_objopen() caller for the head link-map.  Global auditors, or an auditor
 * started from the object that heads a link-map list (typically the dynamic
 * executable), are passed to la_objopen().  However, local auditors can
 * provide activity and preinit events, and for these events, a cookie
 * representing the head link-map list object is expected.  This routine obtains
 * these cookies from the link-map list lm_cookies element.  This element
 * ensures all clients of the same auditor use the same cookie.
 *
 * Although a local auditor will get an la_objopen() call for the object that
 * heads the link-map list of the object being audited, the auditor is not
 * permitted to request binding information for this head object.  The head
 * object has already been in existence, and bindings may have been resolved
 * with it.  This local auditor is coming into existence too late, and thus we
 * don't allow any bindings to be caught at all.
 */
static int
_audit_add_head(Rt_map *clmp, Rt_map *hlmp, int preinit, int activity)
{
	Lm_list		*clml = LIST(clmp);
	Lmid_t		lmid = get_linkmap_id(clml);
	Audit_list	*alp;
	Aliste		idx;
	int		save = 0;

	for (APLIST_TRAVERSE(AUDITORS(clmp)->ad_list, idx, alp)) {
		Audit_client	*acp;
		Rt_map		*almp = alp->al_lmp;
		Lm_list		*alml = LIST(almp);
		uintptr_t	*cookie;
		uint_t		rtldflags;

		/*
		 * Ensure this local auditor isn't already in existence as an
		 * auditor for the head of the link-map list.  If it is, then
		 * this auditor will have already receive preinit and activity
		 * events.
		 */
		if (AUDITORS(hlmp) && _audit_used_by_head(hlmp, almp))
			continue;

		/*
		 * Create a cookie that represents the object that heads the
		 * link-map list.  If the cookie already exists, then this
		 * auditor has already been established for another objects
		 * local auditing.  In this case, do not issue a la_objopen()
		 * or la_activity() event, as these will have already occurred.
		 */
		if ((acp = _audit_get_head_client(clml->lm_head, almp)) != NULL)
			continue;
		if ((acp =
		    _audit_create_head_client(clml->lm_head, almp)) == NULL)
			return (0);

		cookie = &(acp->ac_cookie);
		save++;

		/*
		 * Call the la_objopen() if available.
		 */
		if (alp->al_objopen) {
			uint_t	flags;

			DBG_CALL(Dbg_audit_objopen(clml, DBG_AUD_CALL,
			    alp->al_libname, NAME(hlmp), 0, FALSE));

			APPLICATION_ENTER(rtldflags);
			leave(alml, thr_flg_reenter);
			flags = (*alp->al_objopen)((Link_map *)hlmp, lmid,
			    cookie);
			(void) enter(thr_flg_reenter);
			APPLICATION_RETURN(rtldflags);

			if (flags) {
				DBG_CALL(Dbg_audit_objopen(clml, DBG_AUD_RET,
				    alp->al_libname, NAME(hlmp), flags, TRUE));
			}
		}

		/*
		 * Call the la_activity() if available.
		 */
		if (alp->al_activity) {
			alml->lm_flags |= LML_FLG_AUDITNOTIFY;
			clml->lm_flags |= LML_FLG_ACTAUDIT;

			DBG_CALL(Dbg_audit_activity(clml, alp->al_libname,
			    NAME(clml->lm_head), LA_ACT_ADD));

			APPLICATION_ENTER(rtldflags);
			leave(alml, thr_flg_reenter);
			(*alp->al_activity)(cookie, LA_ACT_ADD);
			(void) enter(thr_flg_reenter);
			APPLICATION_RETURN(rtldflags);
		}
	}

	/*
	 * If new head link-map cookies have been generated, then maintain
	 * any preinit and/or activity requirements.
	 */
	if (save) {
		if (preinit && (aplist_append(&aud_preinit, clmp,
		    AL_CNT_AUDITORS) == NULL))
			return (0);
		if (activity && (aplist_append(&aud_activity, clmp,
		    AL_CNT_AUDITORS) == NULL))
			return (0);
	}
	return (1);
}
Beispiel #8
0
void pacland_state::machine_start()
{
    save_item(NAME(m_main_irq_mask));
    save_item(NAME(m_mcu_irq_mask));
}
Beispiel #9
0
MACHINE_START_MEMBER(niyanpai_state, musobana)
{
	save_item(NAME(m_motor_on));
	save_item(NAME(m_musobana_inputport));
	save_item(NAME(m_musobana_outcoin_flag));
}
Beispiel #10
0
void nes_ac08_device::device_start()
{
	common_start();
	save_item(NAME(m_latch));
}
Beispiel #11
0
void nes_unl_bb_device::device_start()
{
	common_start();
	save_item(NAME(m_reg));
}
Beispiel #12
0
void nes_lh10_device::device_start()
{
	common_start();
	save_item(NAME(m_latch));
	save_item(NAME(m_reg));
}
Beispiel #13
0
void nes_tobidase_device::device_start()
{
	common_start();
	save_item(NAME(m_latch));
}
Beispiel #14
0
void nes_09034a_device::device_start()
{
	common_start();
	save_item(NAME(m_reg));
}
Beispiel #15
0
void chanbara_state::machine_start()
{
	save_item(NAME(m_scroll));
	save_item(NAME(m_scrollhi));
}
Beispiel #16
0
	CASAPSourceStream(HRESULT *phr, CSource *pFilter)
		: CSourceStream(NAME("ASAPSourceStream"), phr, pFilter, L"Out"), loaded(FALSE), duration(0)
	{
	}
Beispiel #17
0
CTTASplitterOutputPin::CTTASplitterOutputPin(CTTASplitter *pParentFilter, CCritSec *pLock, HRESULT *phr) :
	CBaseOutputPin(NAME("CTTASplitterOutputPin"), (CBaseFilter*)pParentFilter, pLock, phr, L"Output"),
	m_pParentFilter(pParentFilter)
{
}
DECL_STATE_ACTION(_)
DECL_STATE_ACTION(T)
DECL_STATE_ACTION(U)
DECL_STATE_ACTION(W)
DECL_STATE_ACTION(V)
DECL_STATE_ACTION(O)
DECL_STATE_ACTION(S)
DECL_STATE_ACTION(P)
DECL_STATE_ACTION(R)
DECL_STATE_ACTION(Q)
DECL_STATE_ACTION(A)
#undef DECL_STATE_ACTION

#define NAME(action) tc_state_##action
static state_func const state_table[eTCStateMax] = {
	NAME(start), NAME(end) , NAME(H), NAME(X), NAME(N), NAME(D), NAME(C), NAME(E),
	NAME(F), NAME(G), NAME(I), NAME(J), NAME(K), NAME(M), NAME(Z), NAME(_),
	NAME(T), NAME(U), NAME(W), NAME(V), NAME(O), NAME(S), NAME(P), NAME(R),
	NAME(Q), NAME(A)
};
#undef NAME
///////////////////////////////////////////////////////////////////////////////
// End of data types for state machine which parse type codes
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// State machine for parsing type codes functions
///////////////////////////////////////////////////////////////////////////////

static EDemanglerErr get_type_code_string(	char *sym,
											unsigned int *amount_of_read_chars,
Beispiel #19
0
void galaxian_state::state_save_register()
{
	save_item(NAME(m_flipscreen_x));
	save_item(NAME(m_flipscreen_y));
	save_item(NAME(m_background_enable));
	save_item(NAME(m_background_red));
	save_item(NAME(m_background_green));
	save_item(NAME(m_background_blue));

	save_item(NAME(m_sprites_base));
	save_item(NAME(m_bullets_base));
	save_item(NAME(m_gfxbank));

	save_item(NAME(m_stars_enabled));
	save_item(NAME(m_star_rng_origin));
	save_item(NAME(m_star_rng_origin_frame));
	save_item(NAME(m_stars_blink_state));
}
//////////////////////////////////////////////////////////////////////////
// CVCamStream is the one and only output pin of CVCam which handles 
// all the stuff.
//////////////////////////////////////////////////////////////////////////
CVCamStream::CVCamStream(HRESULT *phr, CVCam *pParent, LPCWSTR pPinName) :
    CSourceStream(NAME("Audio Out"),phr, pParent, pPinName), m_pParent(pParent)
{
    // Set the media type...
	GetMediaType(0, &m_mt);
}
Beispiel #21
0
/*
 * la_objopen() caller.  Create an audit information structure for the indicated
 * link-map, regardless of an la_objopen() entry point.  This structure is used
 * to supply information to various audit interfaces (see LML_MSK_AUDINFO).
 * Traverse through all audit libraries and call any la_objopen() entry points
 * found.
 */
static int
_audit_objopen(APlist *list, Rt_map *nlmp, Lmid_t lmid, Audit_info *aip,
    int *ndx)
{
	Lm_list		*nlml = LIST(nlmp);
	Audit_list	*alp;
	Aliste		idx;

	for (APLIST_TRAVERSE(list, idx, alp)) {
		uint_t		flags;
		Audit_client	*acp;
		Rt_map		*almp = alp->al_lmp;
		Lm_list		*alml = LIST(almp);

		/*
		 * Associate a cookie with the audit library, and assign the
		 * initial cookie as the present link-map.
		 */
		acp = &aip->ai_clients[(*ndx)++];
		acp->ac_lmp = alp->al_lmp;
		acp->ac_cookie = (uintptr_t)nlmp;

		if (alp->al_objopen == NULL)
			continue;

		DBG_CALL(Dbg_audit_objopen(nlml, DBG_AUD_CALL, alp->al_libname,
		    NAME(nlmp), 0, FALSE));

		leave(alml, thr_flg_reenter);
		flags = (*alp->al_objopen)((Link_map *)nlmp, lmid,
		    &(acp->ac_cookie));
		(void) enter(thr_flg_reenter);

		/*
		 * Diagnose any flags returned by the auditor.
		 */
		if (flags) {
			DBG_CALL(Dbg_audit_objopen(nlml, DBG_AUD_RET,
			    alp->al_libname, NAME(nlmp), flags, FALSE));
		}

		if (flags & LA_FLG_BINDTO)
			acp->ac_flags |= FLG_AC_BINDTO;

		if (flags & LA_FLG_BINDFROM) {
			ulong_t		pltcnt;

			acp->ac_flags |= FLG_AC_BINDFROM;

			/*
			 * We only need dynamic plt's if a pltenter and/or a
			 * pltexit() entry point exist in one of our auditing
			 * libraries.
			 */
			if (aip->ai_dynplts || (JMPREL(nlmp) == 0) ||
			    ((audit_flags & (AF_PLTENTER | AF_PLTEXIT)) == 0))
				continue;

			/*
			 * Create one dynplt for every 'PLT' that exists in the
			 * object.
			 */
			pltcnt = PLTRELSZ(nlmp) / RELENT(nlmp);
			if ((aip->ai_dynplts = calloc(pltcnt,
			    dyn_plt_ent_size)) == NULL)
				return (0);
		}
	}
	return (1);
}
Beispiel #22
0
void bt459_device::device_start()
{
	save_item(NAME(m_address));
	save_item(NAME(m_address_rgb));

	save_item(NAME(m_overlay_color));
	save_item(NAME(m_cursor_color));

	save_item(NAME(m_command_0));
	save_item(NAME(m_command_1));
	save_item(NAME(m_command_2));
	save_item(NAME(m_pixel_read_mask));
	save_item(NAME(m_pixel_blink_mask));
	save_item(NAME(m_overlay_read_mask));
	save_item(NAME(m_overlay_blink_mask));
	save_item(NAME(m_interleave));
	save_item(NAME(m_test));
	save_item(NAME(m_red_signature));
	save_item(NAME(m_green_signature));
	save_item(NAME(m_blue_signature));
	save_item(NAME(m_cursor_command));

	save_item(NAME(m_cursor_x));
	save_item(NAME(m_cursor_y));
	save_item(NAME(m_window_x));
	save_item(NAME(m_window_y));
	save_item(NAME(m_window_w));
	save_item(NAME(m_window_h));

	save_item(NAME(m_cursor_ram));
	save_item(NAME(m_palette_ram));

	save_item(NAME(m_blink_start));
	save_item(NAME(m_contrast));
}
Beispiel #23
0
	AM_RANGE( 0x00, 0x7f ) AM_RAM
ADDRESS_MAP_END


static void cpu_init_tms_common( legacy_cpu_device *device, const UINT32* decode_table, UINT16 o_mask, UINT16 r_mask, UINT8 pc_size, UINT8 byte_size )
{
	tms0980_state *cpustate = get_safe_token( device );

	cpustate->config = (const tms0980_config *) device->baseconfig().static_config();

	assert( cpustate->config != NULL );

	cpustate->decode_table = decode_table;
	cpustate->o_mask = o_mask;
	cpustate->r_mask = r_mask;
	cpustate->pc_size = pc_size;
	cpustate->byte_size = byte_size;

	cpustate->program = device->space( AS_PROGRAM );
	cpustate->data = device->space( AS_PROGRAM );

	device->save_item( NAME(cpustate->prev_pc) );
	device->save_item( NAME(cpustate->prev_pa) );
	device->save_item( NAME(cpustate->pc) );
	device->save_item( NAME(cpustate->pa) );
	device->save_item( NAME(cpustate->sr) );
	device->save_item( NAME(cpustate->pb) );
	device->save_item( NAME(cpustate->a) );
	device->save_item( NAME(cpustate->x) );
	device->save_item( NAME(cpustate->y) );
	device->save_item( NAME(cpustate->dam) );
	device->save_item( NAME(cpustate->ca) );
	device->save_item( NAME(cpustate->cb) );
	device->save_item( NAME(cpustate->cs) );
	device->save_item( NAME(cpustate->r) );
	device->save_item( NAME(cpustate->o) );
	device->save_item( NAME(cpustate->cki_bus) );
	device->save_item( NAME(cpustate->p) );
	device->save_item( NAME(cpustate->n) );
	device->save_item( NAME(cpustate->adder_result) );
	device->save_item( NAME(cpustate->carry_in) );
	device->save_item( NAME(cpustate->status) );
	device->save_item( NAME(cpustate->status_latch) );
	device->save_item( NAME(cpustate->special_status) );
	device->save_item( NAME(cpustate->call_latch) );
	device->save_item( NAME(cpustate->add_latch) );
	device->save_item( NAME(cpustate->branch_latch) );
	device->save_item( NAME(cpustate->subcycle) );
	device->save_item( NAME(cpustate->ram_address) );
	device->save_item( NAME(cpustate->ram_data) );
	device->save_item( NAME(cpustate->rom_address) );
	device->save_item( NAME(cpustate->opcode) );
	device->save_item( NAME(cpustate->decode) );
}
Beispiel #24
0
void esripsys_state::video_start()
{
	struct line_buffer_t *line_buffer = m_line_buffer;
	int i;

	/* Allocate memory for the two 512-pixel line buffers */
	line_buffer[0].colour_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[0].intensity_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[0].priority_buf = auto_alloc_array(machine(), UINT8, 512);

	line_buffer[1].colour_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[1].intensity_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[1].priority_buf = auto_alloc_array(machine(), UINT8, 512);

	/* Create and initialise the HBLANK timers */
	m_hblank_start_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(esripsys_state::hblank_start_callback),this));
	m_hblank_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(esripsys_state::hblank_end_callback),this));
	m_hblank_start_timer->adjust(m_screen->time_until_pos(0, ESRIPSYS_HBLANK_START));

	/* Create the sprite scaling table */
	m_scale_table = auto_alloc_array(machine(), UINT8, 64 * 64);

	for (i = 0; i < 64; ++i)
	{
		int j;

		for (j = 1; j < 65; ++j)
		{
			int p0 = 0;
			int p1 = 0;
			int p2 = 0;
			int p3 = 0;
			int p4 = 0;
			int p5 = 0;

			if (i & 0x1)
				p0 = BIT(j, 5) && !BIT(j, 4) && !BIT(j,3) && !BIT(j, 2) && !BIT(j, 1) && !BIT(j, 0);
			if (i & 0x2)
				p1 = BIT(j, 4) && !BIT(j, 3) && !BIT(j, 2) && !BIT(j, 1) && !BIT(j, 0);
			if (i & 0x4)
				p2 = BIT(j,3) && !BIT(j, 2) && !BIT(j, 1) && !BIT(j, 0);
			if (i & 0x8)
				p3 = BIT(j, 2) && !BIT(j,1) && !BIT(j,0);
			if (i & 0x10)
				p4 = BIT(j, 1) && !BIT(j, 0);
			if (i & 0x20)
				p5 = BIT(j, 0);

			m_scale_table[i * 64 + j - 1] = p0 | p1 | p2 | p3 | p4 | p5;
		}
	}

	/* Now create a lookup table for scaling the sprite 'fig' value */
	m_fig_scale_table = auto_alloc_array(machine(), UINT8, 1024 * 64);

	for (i = 0; i < 1024; ++i)
	{
		int scale;

		for (scale = 0; scale < 64; ++scale)
		{
			int input_pixels = i + 1;
			int scaled_pixels = 0;

			while (input_pixels)
			{
				if (m_scale_table[scale * 64 + (scaled_pixels & 0x3f)] == 0)
					input_pixels--;

				scaled_pixels++;
			}

			m_fig_scale_table[i * 64 + scale] = scaled_pixels - 1;
		}
	}

	/* Register stuff for state saving */
	save_pointer(NAME(line_buffer[0].colour_buf), 512);
	save_pointer(NAME(line_buffer[0].intensity_buf), 512);
	save_pointer(NAME(line_buffer[0].priority_buf), 512);

	save_pointer(NAME(line_buffer[1].colour_buf), 512);
	save_pointer(NAME(line_buffer[1].intensity_buf), 512);
	save_pointer(NAME(line_buffer[1].priority_buf), 512);

	save_item(NAME(m_video_firq));
	save_item(NAME(m_bg_intensity));
	save_item(NAME(m_hblank));
	save_item(NAME(m_video_firq_en));
	save_item(NAME(m_frame_vbl));
	save_item(NAME(m_12sel));
}
Beispiel #25
0
void pce_sf2_device::device_start()
{
	save_item(NAME(m_bank_base));
}
Beispiel #26
0
void via6522_device::device_start()
{
	m_in_a_func.resolve(m_in_a_cb, *this);
	m_in_b_func.resolve(m_in_b_cb, *this);
	m_in_ca1_func.resolve(m_in_ca1_cb, *this);
	m_in_cb1_func.resolve(m_in_cb1_cb, *this);
	m_in_ca2_func.resolve(m_in_ca2_cb, *this);
	m_in_cb2_func.resolve(m_in_cb2_cb, *this);
	m_out_a_func.resolve(m_out_a_cb, *this);
	m_out_b_func.resolve(m_out_b_cb, *this);
	m_out_ca1_func.resolve(m_out_ca1_cb, *this);
	m_out_cb1_func.resolve(m_out_cb1_cb, *this);
	m_out_ca2_func.resolve(m_out_ca2_cb, *this);
	m_out_cb2_func.resolve(m_out_cb2_cb, *this);
	m_irq_func.resolve(m_irq_cb, *this);

	m_t1ll = 0xf3; /* via at 0x9110 in vic20 show these values */
	m_t1lh = 0xb5; /* ports are not written by kernel! */
	m_t2ll = 0xff; /* taken from vice */
	m_t2lh = 0xff;
	m_time2 = m_time1 = machine().time();
	m_t1 = timer_alloc(TIMER_T1);
	m_t2 = timer_alloc(TIMER_T2);
	m_ca2_timer = timer_alloc(TIMER_CA2);
	m_shift_timer = timer_alloc(TIMER_SHIFT);
	m_pcr = 0;
	m_in_ca1 = 0;
	m_in_ca2 = 0;

	/* Default clock is from CPU1 */
	if (clock() == 0)
	{
		set_unscaled_clock(machine().firstcpu->clock());
	}

	/* save state register */
	save_item(NAME(m_in_a));
	save_item(NAME(m_in_ca1));
	save_item(NAME(m_in_ca2));
	save_item(NAME(m_out_a));
	save_item(NAME(m_out_ca2));
	save_item(NAME(m_ddr_a));
	save_item(NAME(m_in_b));
	save_item(NAME(m_in_cb1));
	save_item(NAME(m_in_cb2));
	save_item(NAME(m_out_b));
	save_item(NAME(m_out_cb2));
	save_item(NAME(m_ddr_b));
	save_item(NAME(m_t1cl));
	save_item(NAME(m_t1ch));
	save_item(NAME(m_t1ll));
	save_item(NAME(m_t1lh));
	save_item(NAME(m_t2cl));
	save_item(NAME(m_t2ch));
	save_item(NAME(m_t2ll));
	save_item(NAME(m_t2lh));
	save_item(NAME(m_sr));
	save_item(NAME(m_pcr));
	save_item(NAME(m_acr));
	save_item(NAME(m_ier));
	save_item(NAME(m_ifr));
	save_item(NAME(m_irq));
	save_item(NAME(m_t1_active));
	save_item(NAME(m_t2_active));
	save_item(NAME(m_shift_counter));
}
Beispiel #27
0
void sb_device::device_start()
{
	m_timer = timer_alloc(0, nullptr);

	save_item(NAME(m_dack_out));
	save_item(NAME(m_onebyte_midi));
	save_item(NAME(m_uart_midi));
	save_item(NAME(m_uart_irq));
	save_item(NAME(m_mpu_midi));
	save_item(NAME(m_rx_waiting));
	save_item(NAME(m_tx_waiting));
	save_item(NAME(m_recvring));
	save_item(NAME(m_xmitring));
	save_item(NAME(m_xmit_read));
	save_item(NAME(m_xmit_write));
	save_item(NAME(m_recv_read));
	save_item(NAME(m_recv_write));
	save_item(NAME(m_tx_busy));

	save_item(NAME(m_dsp.reset_latch));
	save_item(NAME(m_dsp.rbuf_status));
	save_item(NAME(m_dsp.wbuf_status));
	save_item(NAME(m_dsp.fifo));
	save_item(NAME(m_dsp.fifo_ptr));
	save_item(NAME(m_dsp.fifo_r));
	save_item(NAME(m_dsp.fifo_r_ptr));

	save_item(NAME(m_dsp.test_reg));
	save_item(NAME(m_dsp.speaker_on));
	save_item(NAME(m_dsp.dma_no_irq));
	save_item(NAME(m_dsp.prot_count));
	save_item(NAME(m_dsp.prot_value));
	save_item(NAME(m_dsp.frequency));
	save_item(NAME(m_dsp.adc_freq));
	save_item(NAME(m_dsp.dma_length));
	save_item(NAME(m_dsp.dma_transferred));
	save_item(NAME(m_dsp.adc_length));
	save_item(NAME(m_dsp.adc_transferred));
	save_item(NAME(m_dsp.dma_autoinit));
	save_item(NAME(m_dsp.data));
	save_item(NAME(m_dsp.d_wptr));
	save_item(NAME(m_dsp.d_rptr));
	save_item(NAME(m_dsp.dma_timer_started));
	save_item(NAME(m_dsp.dma_throttled));
	save_item(NAME(m_dsp.flags));
	save_item(NAME(m_dsp.irq_active));
	save_item(NAME(m_dsp.adpcm_new_ref));
	save_item(NAME(m_dsp.adpcm_ref));
	save_item(NAME(m_dsp.adpcm_step));
	save_item(NAME(m_dsp.adpcm_count));

}
void nes_racermate_device::device_start()
{
	common_start();
	save_item(NAME(m_latch));
}
Beispiel #29
0
MACHINE_START_MEMBER(foodf_state,foodf)
{
	atarigen_state::machine_start();
	save_item(NAME(m_whichport));
}
Beispiel #30
0
void nes_btl_dn_device::device_start()
{
	common_start();
	save_item(NAME(m_irq_count));
}