예제 #1
0
static astring nvram_filename(running_machine &machine, astring &result)
{
    if (rom_system_bios(machine) == 0 || rom_default_bios(machine) == rom_system_bios(machine)) {
        result.printf("%s",machine.basename());
    } else {
        result.printf("%s_%d",machine.basename(),rom_system_bios(machine) - 1);
    }
    return result;
}
예제 #2
0
static astring nvram_filename(device_t &device, astring &result)
{
    running_machine &machine = device.machine();
    astring name = astring(device.tag()).replacechr(':','_');
    if (rom_system_bios(machine) == 0 || rom_default_bios(machine) == rom_system_bios(machine)) {
        result.printf("%s\\%s",machine.basename(),name.cstr());
    } else {
        result.printf("%s_%d\\%s",machine.basename(),rom_system_bios(machine) - 1,name.cstr());
    }
    return result;
}
예제 #3
0
void ui_menu_image_info::image_info_astring(running_machine &machine, astring &string)
{
	string.printf("%s\n\n", machine.system().description);

#if 0
	if (mess_ram_size > 0)
	{
		char buf2[RAM_STRING_BUFLEN];
		string.catprintf("RAM: %s\n\n", ram_string(buf2, mess_ram_size));
	}
#endif

	image_interface_iterator iter(machine.root_device());
	for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
	{
		const char *name = image->filename();
		if (name != NULL)
		{
			const char *base_filename;
			const char *info;
			char *base_filename_noextension;

			base_filename = image->basename();
			base_filename_noextension = strip_extension(base_filename);

			// display device type and filename
			string.catprintf("%s: %s\n", image->device().name(), base_filename);

			// display long filename, if present and doesn't correspond to name
			info = image->longname();
			if (info && (!base_filename_noextension || core_stricmp(info, base_filename_noextension)))
				string.catprintf("%s\n", info);

			// display manufacturer, if available
			info = image->manufacturer();
			if (info != NULL)
			{
				string.catprintf("%s", info);
				info = stripspace(image->year());
				if (info && *info)
					string.catprintf(", %s", info);
				string.catprintf("\n");
			}

			// display supported information, if available
			switch(image->supported()) {
				case SOFTWARE_SUPPORTED_NO : string.catprintf("Not supported\n"); break;
				case SOFTWARE_SUPPORTED_PARTIAL : string.catprintf("Partially supported\n"); break;
				default : break;
			}

			if (base_filename_noextension != NULL)
				free(base_filename_noextension);
		}
		else
		{
			string.catprintf("%s: ---\n", image->device().name());
		}
	}
}
예제 #4
0
파일: tapectrl.c 프로젝트: crazii/mameplus
void ui_menu_tape_control::get_time_string(astring &dest, cassette_image_device *cassette, int *curpos, int *endpos)
{
	double t0, t1;

	t0 = cassette->get_position();
	t1 = cassette->get_length();

	if (t1)
		dest.printf("%04d/%04d", (int) t0, (int) t1);
	else
		dest.printf("%04d/%04d", 0, (int) t1);

	if (curpos != NULL)
		*curpos = t0;
	if (endpos != NULL)
		*endpos = t1;
}
예제 #5
0
파일: alph8201.c 프로젝트: LeWoY/MAMEHub
void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c", m_cf?'C':'.', m_zf?'Z':'.');
			break;
	}
}
예제 #6
0
파일: tms32082.c 프로젝트: andysarcade/mame
void tms32082_pp_device::state_string_export(const device_state_entry &entry, astring &str)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			str.printf("?");
			break;
	}
}
예제 #7
0
void mb86233_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c", (m_sr & SIGN_FLAG) ? 'N' : 'n', (m_sr & ZERO_FLAG) ? 'Z' : 'z' );
			break;
	}
}
예제 #8
0
파일: lr35902.c 프로젝트: opicron/mame
void lr35902_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case LR35902_SPEED:
			string.printf("%02X", 0x7E | ( ( m_gb_speed - 1 ) << 7 ) | m_gb_speed_change_pending );
			break;

		case STATE_GENFLAGS:
			string.printf("%c%c%c%c",
				m_F & FLAG_Z   ? 'Z' : '.',
				m_F & FLAG_N   ? 'N' : '.',
				m_F & FLAG_H   ? 'H' : '.',
				m_F & FLAG_C   ? 'C' : '.'
			);
			break;
	}
}
예제 #9
0
파일: cosmac.c 프로젝트: LeWoY/MAMEHub
void cosmac_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c%c",
							m_df ? 'D' : '.',
							m_ie ? 'I' : '.',
							m_q  ? 'Q' : '.');
			break;
	}
}
예제 #10
0
void xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c%c%c",
				m_flags & 0x80 ? 'S':'.',
				m_flags & 0x40 ? 'Z':'.',
				m_flags & 0x20 ? 'V':'.',
				m_flags & 0x10 ? 'C':'.');
			break;
	}
}
예제 #11
0
파일: lc8670.c 프로젝트: jiangzhonghui/mame
void lc8670_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%s%s%s%s",
				GET_CY ? "CY" : "..",
				GET_AC ? "AC" : "..",
				GET_OV ? "OV" : "..",
				GET_P  ? "P"  : "."
			);
			break;
	}
}
예제 #12
0
파일: dsp32.c 프로젝트: pinchyCZN/mameppk
void dsp32c_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c%c%c%c%c%c%c",
				NFLAG ? 'N':'.',
				ZFLAG ? 'Z':'.',
                UFLAG ? 'U':'.',
                VFLAG ? 'V':'.',
                nFLAG ? 'n':'.',
                zFLAG ? 'z':'.',
                cFLAG ? 'c':'.',
                vFLAG ? 'v':'.');
			break;

		case DSP32_A0:
		case DSP32_A1:
		case DSP32_A2:
		case DSP32_A3:
			string.printf("%8g", *(double *)entry.dataptr());
			break;
	}
}
예제 #13
0
파일: lh5801.c 프로젝트: LeWoY/MAMEHub
void lh5801_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c%c%c%c%c%c%c",
				m_t&0x80?'1':'0',
				m_t&0x40?'1':'0',
				m_t&0x20?'1':'0',
				m_t&0x10?'H':'.',
				m_t&0x08?'V':'.',
				m_t&0x04?'Z':'.',
				m_t&0x02?'I':'.',
				m_t&0x01?'C':'.');
			break;
	}
}
예제 #14
0
void m6809_base_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c%c%c%c%c%c%c",
				(m_cc & 0x80) ? 'E' : '.',
				(m_cc & 0x40) ? 'F' : '.',
				(m_cc & 0x20) ? 'H' : '.',
				(m_cc & 0x10) ? 'I' : '.',
				(m_cc & 0x08) ? 'N' : '.',
				(m_cc & 0x04) ? 'Z' : '.',
				(m_cc & 0x02) ? 'V' : '.',
				(m_cc & 0x01) ? 'C' : '.');
			break;
	}
}
예제 #15
0
파일: ucom4.c 프로젝트: andysarcade/mame
// disasm
void ucom4_cpu_device::state_string_export(const device_state_entry &entry, astring &str)
{
	switch (entry.index())
	{
		// obviously not from a single flags register
		case STATE_GENFLAGS:
			str.printf("%c%c%c%c%c",
				m_inte_f    ? 'E':'e',
				m_int_f     ? 'I':'i',
				m_timer_f   ? 'T':'t',
				m_carry_s_f ? 'S':'s',
				m_carry_f   ? 'C':'c'
			);
			break;

		default: break;
	}
}
예제 #16
0
파일: arm.c 프로젝트: crazii/mameplus
void arm_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	static const char *s[4] = { "USER", "FIRQ", "IRQ ", "SVC " };

	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf("%c%c%c%c%c%c %s",
				(m_sArmRegister[15] & N_MASK) ? 'N' : '-',
				(m_sArmRegister[15] & Z_MASK) ? 'Z' : '-',
				(m_sArmRegister[15] & C_MASK) ? 'C' : '-',
				(m_sArmRegister[15] & V_MASK) ? 'V' : '-',
				(m_sArmRegister[15] & I_MASK) ? 'I' : '-',
				(m_sArmRegister[15] & F_MASK) ? 'F' : '-',
				s[m_sArmRegister[15] & 3] );
			break;
	}
}
예제 #17
0
void minx_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
			string.printf( "%c%c%c%c%c%c%c%c-%c%c%c%c%c",
				m_F & FLAG_I ? 'I' : '.',
				m_F & FLAG_D ? 'D' : '.',
				m_F & FLAG_L ? 'L' : '.',
				m_F & FLAG_B ? 'B' : '.',
				m_F & FLAG_S ? 'S' : '.',
				m_F & FLAG_O ? 'O' : '.',
				m_F & FLAG_C ? 'C' : '.',
				m_F & FLAG_Z ? 'Z' : '.',
				m_E & EXEC_X0 ? '0' : '.',
				m_E & EXEC_X1 ? '1' : '.',
				m_E & EXEC_X2 ? '2' : '.',
				m_E & EXEC_DZ ? 'z' : '.',
				m_E & EXEC_EN ? 'E' : '.' );
			break;
	}
}
예제 #18
0
void mcs96_device::state_string_export(const device_state_entry &entry, astring &string)
{
    switch(entry.index()) {
    case STATE_GENFLAGS:
    case MCS96_PSW:
        string.printf("%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c",
                      PSW & F_Z  ? 'Z' : '.',
                      PSW & F_N  ? 'N' : '.',
                      PSW & F_V  ? 'V' : '.',
                      PSW & F_VT ? 'v' : '.',
                      PSW & F_C  ? 'C' : '.',
                      PSW & F_I  ? 'I' : '.',
                      PSW & F_ST ? 'S' : '.',
                      PSW & 0x80 ? '7' : '.',
                      PSW & 0x40 ? '6' : '.',
                      PSW & 0x20 ? '5' : '.',
                      PSW & 0x10 ? '4' : '.',
                      PSW & 0x08 ? '3' : '.',
                      PSW & 0x04 ? '2' : '.',
                      PSW & 0x02 ? '1' : '.',
                      PSW & 0x01 ? '0' : '.');
        break;
    }
}
예제 #19
0
void dsp16_device::state_string_export(const device_state_entry &entry, astring &string)
{
    string.printf("");
}
예제 #20
0
void dsp16_device::state_string_export(const device_state_entry &entry, astring &string)
{
	switch (entry.index())
	{
		case STATE_GENFLAGS:
		string.printf("(below)");
			break;

		case DSP16_AUC:
		{
			astring alignString;
			const UINT8 align = m_auc & 0x03;
			switch (align)
			{
				case 0x00: alignString.printf("xy"); break;
				case 0x01: alignString.printf("/4"); break;
				case 0x02: alignString.printf("x4"); break;
				case 0x03: alignString.printf(",,"); break;
			}
			string.printf("%c%c%c%c%c%s",
							m_auc & 0x40 ? 'Y':'.',
							m_auc & 0x20 ? '1':'.',
							m_auc & 0x10 ? '0':'.',
							m_auc & 0x08 ? '1':'.',
							m_auc & 0x04 ? '0':'.',
							alignString.cstr());
			break;
		}

		case DSP16_PSW:
			string.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
							m_psw & 0x8000 ? 'M':'.',
							m_psw & 0x4000 ? 'E':'.',
							m_psw & 0x2000 ? 'L':'.',
							m_psw & 0x1000 ? 'V':'.',
							m_psw & 0x0800 ? ',':',',
							m_psw & 0x0400 ? ',':',',
							m_psw & 0x0200 ? 'O':'.',
							m_psw & 0x0100 ? '1':'.',
							m_psw & 0x0080 ? '1':'.',
							m_psw & 0x0040 ? '1':'.',
							m_psw & 0x0020 ? '1':'.',
							m_psw & 0x0010 ? 'O':'.',
							m_psw & 0x0008 ? '1':'.',
							m_psw & 0x0004 ? '1':'.',
							m_psw & 0x0002 ? '1':'.',
							m_psw & 0x0001 ? '1':'.');
			break;

		case DSP16_PIOC:
		{
			astring strobeString;
			const UINT8 strobe = (m_pioc & 0x6000) >> 13;
			switch (strobe)
			{
				case 0x00: strobeString.printf("1T"); break;
				case 0x01: strobeString.printf("2T"); break;
				case 0x02: strobeString.printf("3T"); break;
				case 0x03: strobeString.printf("4T"); break;
			}
			string.printf("%c%s%c%c%c%c%c%c%c%c%c%c%c%c%c",
							m_pioc & 0x8000 ? 'I':'.',
							strobeString.cstr(),
							m_pioc & 0x1000 ? 'O':'I',
							m_pioc & 0x0800 ? 'O':'I',
							m_pioc & 0x0400 ? 'S':'.',
							m_pioc & 0x0200 ? 'I':'.',
							m_pioc & 0x0100 ? 'O':'.',
							m_pioc & 0x0080 ? 'P':'.',
							m_pioc & 0x0040 ? 'P':'.',
							m_pioc & 0x0020 ? 'I':'.',
							m_pioc & 0x0010 ? 'I':'.',
							m_pioc & 0x0008 ? 'O':'.',
							m_pioc & 0x0004 ? 'P':'.',
							m_pioc & 0x0002 ? 'P':'.',
							m_pioc & 0x0001 ? 'I':'.');
			break;
		}

		// Placeholder for a better view later (TODO)
		case DSP16_SIOC:
		{
			astring clkString;
			const UINT8 clk = (m_sioc & 0x0180) >> 7;
			switch (clk)
			{
				case 0x00: clkString.printf("/4"); break;
				case 0x01: clkString.printf("12"); break;
				case 0x02: clkString.printf("16"); break;
				case 0x03: clkString.printf("20"); break;
			}
			string.printf("%c%s%c%c%c%c%c%c%c",
							m_sioc & 0x0200 ? 'I':'O',
							clkString.cstr(),
							m_sioc & 0x0040 ? 'L':'M',
							m_sioc & 0x0020 ? 'I':'O',
							m_sioc & 0x0010 ? 'I':'O',
							m_sioc & 0x0008 ? 'I':'O',
							m_sioc & 0x0004 ? 'I':'O',
							m_sioc & 0x0002 ? '2':'1',
							m_sioc & 0x0001 ? '2':'1');
			break;
		}
	}
}
예제 #21
0
void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
    switch (entry.index())
    {
    case STATE_GENPC:
        string.printf("%06X", ( m_cseg << 16 ) | m_ip);
        break;

    case STATE_GENFLAGS:
        string.printf("%s-%s-%s-%c-%c",
                      m_f & _FLAG_ZH ? "ZH":"__",
                      m_f & _FLAG_CL ? "CL":"__",
                      m_f & _FLAG_ZL ? "ZL":"__",
                      m_f & _FLAG_C ? 'C':'_',
                      m_f & _FLAG_Z ? 'Z':'_'
                     );

        break;

    case HCD62121_R00:
        string.printf("%02X%02X%02X%02X", m_reg[0x00], m_reg[0x01], m_reg[0x02], m_reg[0x03]);
        break;
    case HCD62121_R04:
        string.printf("%02X%02X%02X%02X", m_reg[0x04], m_reg[0x05], m_reg[0x06], m_reg[0x07]);
        break;
    case HCD62121_R08:
        string.printf("%02X%02X%02X%02X", m_reg[0x08], m_reg[0x09], m_reg[0x0A], m_reg[0x0B]);
        break;
    case HCD62121_R0C:
        string.printf("%02X%02X%02X%02X", m_reg[0x0C], m_reg[0x0D], m_reg[0x0E], m_reg[0x0F]);
        break;
    case HCD62121_R10:
        string.printf("%02X%02X%02X%02X", m_reg[0x10], m_reg[0x11], m_reg[0x12], m_reg[0x13]);
        break;
    case HCD62121_R14:
        string.printf("%02X%02X%02X%02X", m_reg[0x14], m_reg[0x15], m_reg[0x16], m_reg[0x17]);
        break;
    case HCD62121_R18:
        string.printf("%02X%02X%02X%02X", m_reg[0x18], m_reg[0x19], m_reg[0x1A], m_reg[0x1B]);
        break;
    case HCD62121_R1C:
        string.printf("%02X%02X%02X%02X", m_reg[0x1C], m_reg[0x1D], m_reg[0x1E], m_reg[0x1F]);
        break;
    case HCD62121_R20:
        string.printf("%02X%02X%02X%02X", m_reg[0x20], m_reg[0x21], m_reg[0x22], m_reg[0x23]);
        break;
    case HCD62121_R24:
        string.printf("%02X%02X%02X%02X", m_reg[0x24], m_reg[0x25], m_reg[0x26], m_reg[0x27]);
        break;
    case HCD62121_R28:
        string.printf("%02X%02X%02X%02X", m_reg[0x28], m_reg[0x29], m_reg[0x2A], m_reg[0x2B]);
        break;
    case HCD62121_R2C:
        string.printf("%02X%02X%02X%02X", m_reg[0x2C], m_reg[0x2D], m_reg[0x2E], m_reg[0x2F]);
        break;
    case HCD62121_R30:
        string.printf("%02X%02X%02X%02X", m_reg[0x30], m_reg[0x31], m_reg[0x32], m_reg[0x33]);
        break;
    case HCD62121_R34:
        string.printf("%02X%02X%02X%02X", m_reg[0x34], m_reg[0x35], m_reg[0x36], m_reg[0x37]);
        break;
    case HCD62121_R38:
        string.printf("%02X%02X%02X%02X", m_reg[0x38], m_reg[0x39], m_reg[0x3A], m_reg[0x3B]);
        break;
    case HCD62121_R3C:
        string.printf("%02X%02X%02X%02X", m_reg[0x3C], m_reg[0x3D], m_reg[0x3E], m_reg[0x3F]);
        break;
    case HCD62121_R40:
        string.printf("%02X%02X%02X%02X", m_reg[0x40], m_reg[0x41], m_reg[0x42], m_reg[0x43]);
        break;
    case HCD62121_R44:
        string.printf("%02X%02X%02X%02X", m_reg[0x44], m_reg[0x45], m_reg[0x46], m_reg[0x47]);
        break;
    case HCD62121_R48:
        string.printf("%02X%02X%02X%02X", m_reg[0x48], m_reg[0x49], m_reg[0x4A], m_reg[0x4B]);
        break;
    case HCD62121_R4C:
        string.printf("%02X%02X%02X%02X", m_reg[0x4C], m_reg[0x4D], m_reg[0x4E], m_reg[0x4F]);
        break;
    case HCD62121_R50:
        string.printf("%02X%02X%02X%02X", m_reg[0x50], m_reg[0x51], m_reg[0x52], m_reg[0x53]);
        break;
    case HCD62121_R54:
        string.printf("%02X%02X%02X%02X", m_reg[0x54], m_reg[0x55], m_reg[0x56], m_reg[0x57]);
        break;
    case HCD62121_R58:
        string.printf("%02X%02X%02X%02X", m_reg[0x58], m_reg[0x59], m_reg[0x5A], m_reg[0x5B]);
        break;
    case HCD62121_R5C:
        string.printf("%02X%02X%02X%02X", m_reg[0x5C], m_reg[0x5D], m_reg[0x5E], m_reg[0x5F]);
        break;
    case HCD62121_R60:
        string.printf("%02X%02X%02X%02X", m_reg[0x60], m_reg[0x61], m_reg[0x62], m_reg[0x63]);
        break;
    case HCD62121_R64:
        string.printf("%02X%02X%02X%02X", m_reg[0x64], m_reg[0x65], m_reg[0x66], m_reg[0x67]);
        break;
    case HCD62121_R68:
        string.printf("%02X%02X%02X%02X", m_reg[0x68], m_reg[0x69], m_reg[0x6A], m_reg[0x6B]);
        break;
    case HCD62121_R6C:
        string.printf("%02X%02X%02X%02X", m_reg[0x6C], m_reg[0x6D], m_reg[0x6E], m_reg[0x6F]);
        break;
    case HCD62121_R70:
        string.printf("%02X%02X%02X%02X", m_reg[0x70], m_reg[0x71], m_reg[0x72], m_reg[0x73]);
        break;
    case HCD62121_R74:
        string.printf("%02X%02X%02X%02X", m_reg[0x74], m_reg[0x75], m_reg[0x76], m_reg[0x77]);
        break;
    case HCD62121_R78:
        string.printf("%02X%02X%02X%02X", m_reg[0x78], m_reg[0x79], m_reg[0x7A], m_reg[0x7B]);
        break;
    case HCD62121_R7C:
        string.printf("%02X%02X%02X%02X", m_reg[0x7C], m_reg[0x7D], m_reg[0x7E], m_reg[0x7F]);
        break;
    }
}