Example #1
0
void sysmng_updatecaption(UINT8 flag) {

	OEMCHAR	work[512];
	static OEMCHAR	title[512];
	static OEMCHAR	clock[64];

	if (flag & 1) {
		title[0] = '\0';
		if (fdd_diskready(0)) {
			milstr_ncat(title, OEMTEXT("  FDD1:"), NELEMENTS(title));
			milstr_ncat(title, file_getname(fdd_diskname(0)), NELEMENTS(title));
		}
		if (fdd_diskready(1)) {
			milstr_ncat(title, OEMTEXT("  FDD2:"), NELEMENTS(title));
			milstr_ncat(title, file_getname(fdd_diskname(1)), NELEMENTS(title));
		}
	}
	if (flag & 2) {
		clock[0] = '\0';
		if (np2oscfg.DISPCLK & 2) {
			if (workclock.fps) {
				OEMSPRINTF(clock, OEMTEXT(" - %u.%1uFPS"),
									workclock.fps / 10, workclock.fps % 10);
			}
			else {
				milstr_ncpy(clock, OEMTEXT(" - 0FPS"), NELEMENTS(clock));
			}
		}
		if (np2oscfg.DISPCLK & 1) {
			OEMSPRINTF(work, OEMTEXT(" %2u.%03uMHz"),
								workclock.khz / 1000, workclock.khz % 1000);
			if (clock[0] == '\0') {
				milstr_ncpy(clock, OEMTEXT(" -"), NELEMENTS(clock));
			}
			milstr_ncat(clock, work, sizeof(clock));
#if 0
			OEMSPRINTF(work, OEMTEXT(" (debug: OPN %d / PSG %s)"),
							opngen.playing,
							(g_psg1.mixer & 0x3f)?OEMTEXT("ON"):OEMTEXT("OFF"));
			milstr_ncat(clock, work, NELEMENTS(clock));
#endif
		}
	}
	milstr_ncpy(work, np2oscfg.titles, NELEMENTS(work));
	milstr_ncat(work, title, NELEMENTS(work));
	milstr_ncat(work, clock, NELEMENTS(work));
	if(np2stopemulate)
	{
		milstr_ncat(work, OEMTEXT(" (paused)"), NELEMENTS(work));
	}
	SetWindowText(g_hWndMain, work);
}
Example #2
0
static void binget(OEMCHAR *work, int size, const UINT8 *bin, UINT binlen) {

	UINT	i;
	OEMCHAR	tmp[8];

	if (binlen) {
		OEMSPRINTF(tmp, OEMTEXT("%.2x"), bin[0]);
		milstr_ncpy(work, tmp, size);
	}
	for (i=1; i<binlen; i++) {
		OEMSPRINTF(tmp, OEMTEXT(" %.2x"), bin[i]);
		milstr_ncat(work, tmp, size);
	}
}
Example #3
0
/**
 * 初期化
 */
void CTraceWnd::Initialize()
{
	WNDCLASS wc;
	ZeroMemory(&wc, sizeof(wc));
	wc.style = CS_HREDRAW | CS_VREDRAW;
	wc.lpfnWndProc = ::DefWindowProc;
	wc.hInstance = GetInstanceHandle();
	wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = static_cast<HBRUSH>(::GetStockObject(WHITE_BRUSH));
	wc.lpszClassName = s_szClassName;
	if (!::RegisterClass(&wc))
	{
		return;
	}

#if 1
	m_nFlags = 4;
#else
	m_nFlags = 1;
	m_tfh = textfile_create(OEMTEXT("traceout.txt"), 0x800);
#endif

	tracecfg.posx = CW_USEDEFAULT;
	tracecfg.posy = CW_USEDEFAULT;
	tracecfg.width = CW_USEDEFAULT;
	tracecfg.height = CW_USEDEFAULT;
	ini_read(file_getcd(np2trace), inititle, initbl, NELEMENTS(initbl));

	if (!CreateEx(WS_EX_CONTROLPARENT, s_szClassName, s_szTitle, WS_OVERLAPPEDWINDOW, tracecfg.posx, tracecfg.posy, tracecfg.width, tracecfg.height, NULL, NULL))
	{
		return;
	}
	ShowWindow(SW_SHOW);
	UpdateWindow();
}
Example #4
0
/**
 * フレームワークは、ユーザーがコントロール メニューからコマンドを選択したとき、または最大化または最小化ボタンを選択すると、このメンバー関数を呼び出します
 * @param[in] nID 必要なシステム コマンドの種類を指定します
 * @param[in] lParam カーソルの座標
 */
void CTraceWnd::OnSysCommand(UINT nID, LPARAM lParam)
{
	switch (nID)
	{
		case IDM_TRACE_TRACE:
			m_nFlags ^= 1;
			break;

		case IDM_TRACE_VERBOSE:
			m_nFlags ^= 2;
			break;

		case IDM_TRACE_ENABLE:
			m_nFlags ^= 4;
			break;

		case IDM_TRACE_FILEOUT:
			if (m_tfh != NULL)
			{
				textfile_close(m_tfh);
				m_tfh = NULL;
			}
			else
			{
				m_tfh = textfile_create(OEMTEXT("traceout.txt"), 0x800);
			}
			break;

		case IDM_TRACE_CLEAR:
			m_wndView.SetWindowText(TEXT(""));
			break;
	}
}
Example #5
0
void board26k_reset(const NP2CFG *pConfig) {

	opngen_setcfg(&g_opngen, 3, 0);
	fmtimer_reset(pConfig->snd26opt & 0xc0);
	soundrom_loadex(pConfig->snd26opt & 7, OEMTEXT("26"));
	g_opn.base = (pConfig->snd26opt & 0x10)?0x000:0x100;
}
Example #6
0
void board26k_reset(void) {

	opngen_setcfg(3, 0);
	fmtimer_reset(np2cfg.snd26opt & 0xc0);
	soundrom_loadex(np2cfg.snd26opt & 7, OEMTEXT("26"));
	opn.base = (np2cfg.snd26opt & 0x10)?0x000:0x100;
}
Example #7
0
/**
 * Reset
 * @param[in] pConfig A pointer to a configure structure
 */
void boardpx2_reset(const NP2CFG *pConfig)
{
	UINT nIrq1;
	UINT nIrq2;

	nIrq1 = (pConfig->spbopt & 0xc0) | 0x10;
	nIrq2 = (nIrq1 == 0xd0) ? 0x90 : 0xd0;

	opna_reset(&g_opna[0], OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_HAS_ADPCM | OPNA_S98);
	opna_timer(&g_opna[0], nIrq1, NEVENT_FMTIMERA, NEVENT_FMTIMERB);
	opna_reset(&g_opna[1], OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_HAS_ADPCM);
	opna_timer(&g_opna[1], nIrq2, NEVENT_FMTIMER2A, NEVENT_FMTIMER2B);
	opna_reset(&g_opna[2], OPNA_MODE_3438);
	opna_reset(&g_opna[3], OPNA_MODE_3438);
	opna_reset(&g_opna[4], OPNA_MODE_2608 | OPNA_HAS_ADPCM);

	opngen_setcfg(&g_opna[0].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[1].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[2].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[3].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[4].opngen, 3, OPN_STEREO | 0x38);
	soundrom_loadex(pConfig->spbopt & 7, OEMTEXT("SPB"));
	g_opna[0].s.base = (pConfig->spbopt & 0x10) ? 0x000 : 0x100;
	fmboard_extreg(extendchannelx2);
	pcm86io_setopt(0x00);
}
Example #8
0
void boardx2_reset(void) {

    fmtimer_reset(0xc0);
    opn.channels = 6;
    opngen_setcfg(6, OPN_STEREO | 0x1c0);
    soundrom_load(0xcc000, OEMTEXT("86"));
    fmboard_extreg(extendchannel);
}
Example #9
0
void board118_reset(void) {

	fmtimer_reset(0xc0);
	opngen_setcfg(3, OPN_STEREO | 0x038);
	cs4231io_reset();
	soundrom_load(0xcc000, OEMTEXT("118"));
	fmboard_extreg(extendchannel);
}
Example #10
0
void boardspb_reset(void) {

	fmtimer_reset(np2cfg.spbopt & 0xc0);
	opn.channels = 6;
	opngen_setcfg(6, OPN_STEREO | 0x03f);
	soundrom_loadex(np2cfg.spbopt & 7, OEMTEXT("SPB"));
	opn.base = ((np2cfg.spbopt & 0x10)?0x000:0x100);
}
Example #11
0
void boardspr_reset(void) {

	fmtimer_reset(np2cfg.spbopt & 0xc0);
	opn.reg[0x2ff] = 0;
	opn.channels = 12;
	opngen_setcfg(12, OPN_STEREO | 0x03f);
	soundrom_loadex(np2cfg.spbopt & 7, OEMTEXT("SPB"));
	opn.base = (np2cfg.spbopt & 0x10)?0x000:0x100;
}
Example #12
0
void board118_reset(const NP2CFG *pConfig) {

	fmtimer_reset(0xc0);
	opngen_setcfg(&g_opngen, 3, OPN_STEREO | 0x038);
	cs4231io_reset();
	soundrom_load(0xcc000, OEMTEXT("118"));
	fmboard_extreg(extendchannel);

	(void)pConfig;
}
Example #13
0
void boardpx1_reset(const NP2CFG *pConfig) {

	fmtimer_reset(pConfig->spbopt & 0xc0);
	g_opn.reg[0x2ff] = 0;
	g_opn.channels = 12;
	g_opn2.reg[0x2ff] = 0;
	g_opn2.channels = 12;
	opngen_setcfg(&g_opngen, 24, OPN_STEREO | 0x00ffffff);
	soundrom_loadex(pConfig->spbopt & 7, OEMTEXT("SPB"));
	g_opn.base = (pConfig->spbopt & 0x10)?0x000:0x100;
}
Example #14
0
/**
 * Reset
 * @param[in] pConfig A pointer to a configure structure
 */
void board118_reset(const NP2CFG *pConfig)
{
	opna_reset(&g_opna[0], OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_S98);

	fmtimer_reset(0xc0);
	opngen_setcfg(&g_opna[0].opngen, 3, OPN_STEREO | 0x038);
	cs4231io_reset();
	soundrom_load(0xcc000, OEMTEXT("118"));
	fmboard_extreg(extendchannel);

	(void)pConfig;
}
Example #15
0
void board86_reset(const NP2CFG *pConfig) {

	fmtimer_reset((pConfig->snd86opt & 0x10) |
					((pConfig->snd86opt & 0x4) << 5) |
					((pConfig->snd86opt & 0x8) << 3));
	opngen_setcfg(3, OPN_STEREO | 0x038);
	if (pConfig->snd86opt & 2) {
		soundrom_load(0xcc000, OEMTEXT("86"));
	}
	opn.base = (pConfig->snd86opt & 0x01)?0x000:0x100;
	fmboard_extreg(extendchannel);
}
Example #16
0
void boardpx2_reset(const NP2CFG *pConfig) {

	fmtimer_reset(pConfig->spbopt & 0xc0);
	g_opn.reg[0x2ff] = 0;
	g_opn.channels = 12;
	g_opn2.reg[0x2ff] = 0;
	g_opn2.channels = 12;
	g_opn3.channels = 3;
	opngen_setcfg(&g_opngen, 27, OPN_STEREO | 0x38ffffff);
	soundrom_loadex(pConfig->spbopt & 7, OEMTEXT("SPB"));
	g_opn.base = (pConfig->spbopt & 0x10)?0x000:0x100;
	fmboard_extreg(extendchannelx2);
}
Example #17
0
static void pathaddex(MIDIMOD mod, const OEMCHAR *path) {

	OEMCHAR	_path[MAX_PATH];

	if (milstr_memcmp(path, OEMTEXT("${basedir}"))) {
		pathadd(mod, path);
	}
	else {
		file_cpyname(_path, file_getcd(str_null), NELEMENTS(_path));
		file_cutseparator(_path);
		file_catname(_path, path + 10, NELEMENTS(_path));
		pathadd(mod, _path);
	}
}
Example #18
0
/**
 * Reset
 * @param[in] pConfig A pointer to a configure structure
 * @param[in] adpcm Enable ADPCM
 */
void boardx2_reset(const NP2CFG *pConfig)
{
	opna_reset(&g_opna[0], OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_S98);
	opna_reset(&g_opna[1], OPNA_MODE_2203);

	fmtimer_reset(0xc0);
	opngen_setcfg(&g_opna[0].opngen, 3, OPN_STEREO | 0x038);
	opngen_setcfg(&g_opna[1].opngen, 3, 0);
	if (pConfig->snd86opt & 2)
	{
		soundrom_load(0xcc000, OEMTEXT("86"));
	}
	fmboard_extreg(extendchannel);
}
Example #19
0
static LRESULT onSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
	HMENU	hMenu;

	hMenu = GetSystemMenu(hWnd, FALSE);
	switch(wParam)
	{
		case IDM_TRACE_TRACE:
			tracewin.en ^= 1;
			CheckMenuItem(hMenu, IDM_TRACE_TRACE,
								(tracewin.en & 1)?MF_CHECKED:MF_UNCHECKED);
			break;

		case IDM_TRACE_VERBOSE:
			tracewin.en ^= 2;
			CheckMenuItem(hMenu, IDM_TRACE_VERBOSE,
								(tracewin.en & 2)?MF_CHECKED:MF_UNCHECKED);
			break;

		case IDM_TRACE_ENABLE:
			tracewin.en ^= 4;
			CheckMenuItem(hMenu, IDM_TRACE_ENABLE,
								(tracewin.en & 4)?MF_CHECKED:MF_UNCHECKED);
			break;

		case IDM_TRACE_FILEOUT:
			if (tracewin.tf != NULL)
			{
				textfile_close(tracewin.tf);
				tracewin.tf = NULL;
			}
			else
			{
				tracewin.tf = textfile_create(OEMTEXT("traceout.txt"),
																0x800);
			}
			CheckMenuItem(hMenu, IDM_TRACE_FILEOUT,
									(tracewin.tf)?MF_CHECKED:MF_UNCHECKED);
			break;

		case IDM_TRACE_CLEAR:
			View_ClrString();
			break;

		default:
			return DefWindowProc(hWnd, WM_SYSCOMMAND, wParam, lParam);
	}
	return FALSE;
}
Example #20
0
static int flagload(const OEMCHAR *ext, const OEMCHAR *title, BOOL force) {

	int		ret;
	int		id;
	OEMCHAR	path[MAX_PATH];
	OEMCHAR	buf[1024];
	OEMCHAR	buf2[1024 + 256];

	getstatfilename(path, ext, NELEMENTS(path));
	id = DID_YES;
	ret = statsave_check(path, buf, NELEMENTS(buf));
	if (ret & (~STATFLAG_DISKCHG)) {
		menumbox(OEMTEXT("Couldn't restart"), title, MBOX_OK | MBOX_ICONSTOP);
		id = DID_NO;
	}
	else if ((!force) && (ret & STATFLAG_DISKCHG)) {
		OEMSPRINTF(buf2, OEMTEXT("Conflict!\n\n%s\nContinue?"), buf);
		id = menumbox(buf2, title, MBOX_YESNOCAN | MBOX_ICONQUESTION);
	}
	if (id == DID_YES) {
		statsave_load(path);
	}
	return(id);
}
Example #21
0
void debugsub_status(void) {

static int		filenum = 0;
	FILEH		fh;
	OEMCHAR		work[512];
const OEMCHAR	*p;

	OEMSPRINTF(work, file_i386reg, filenum);
	fh = file_create_c(work);
	if (fh != FILEH_INVALID) {
		p = debugsub_regs();
		file_write(fh, p, OEMSTRLEN(p) * sizeof(OEMCHAR));
		OEMSPRINTF(work, str_picstat,
								pic.pi[0].imr, pic.pi[0].irr, pic.pi[0].isr,
								pic.pi[1].imr, pic.pi[1].irr, pic.pi[1].isr,
								mouseif.upd8255.portc, sysport.c);
		file_write(fh, work, OEMSTRLEN(work) * sizeof(OEMCHAR));

		OEMSPRINTF(work, OEMTEXT("CS = %.8x:%.8x") OEMTEXT(CRLITERAL),
						CPU_STAT_SREGBASE(CPU_CS_INDEX),
						CPU_STAT_SREGLIMIT(CPU_CS_INDEX));
		file_write(fh, work, OEMSTRLEN(work) * sizeof(OEMCHAR));

		file_close(fh);
	}

	OEMSPRINTF(work, file_i386cs, filenum);
	debugwriteseg(work, &CPU_STAT_SREG(CPU_CS_INDEX), CPU_EIP & 0xffff0000, 0x10000);
	OEMSPRINTF(work, file_i386ds, filenum);
	debugwriteseg(work, &CPU_STAT_SREG(CPU_DS_INDEX), 0, 0x10000);
	OEMSPRINTF(work, file_i386es, filenum);
	debugwriteseg(work, &CPU_STAT_SREG(CPU_ES_INDEX), 0, 0x10000);
	OEMSPRINTF(work, file_i386ss, filenum);
	debugwriteseg(work, &CPU_STAT_SREG(CPU_SS_INDEX), CPU_ESP & 0xffff0000, 0x10000);
	filenum++;
}
Example #22
0
/**
 * Reset
 * @param[in] pConfig A pointer to a configure structure
 */
void boardpx1_reset(const NP2CFG *pConfig)
{
	opna_reset(&g_opna[0], OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_HAS_ADPCM | OPNA_S98);
	opna_reset(&g_opna[1], OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_HAS_ADPCM | OPNA_S98);
	opna_reset(&g_opna[2], OPNA_MODE_3438);
	opna_reset(&g_opna[3], OPNA_MODE_3438);

	fmtimer_reset(pConfig->spbopt & 0xc0);
	opngen_setcfg(&g_opna[0].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[1].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[2].opngen, 6, OPN_STEREO | 0x3f);
	opngen_setcfg(&g_opna[3].opngen, 6, OPN_STEREO | 0x3f);
	soundrom_loadex(pConfig->spbopt & 7, OEMTEXT("SPB"));
	g_opna[0].s.base = (pConfig->spbopt & 0x10) ? 0x000 : 0x100;
}
Example #23
0
void trace_init(void) {

    HWND	hwnd;

    ZeroMemory(&tracewin, sizeof(tracewin));
    WNDCLASS wc;
    wc.style = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = traceproc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = g_hInstance;
    wc.hIcon = NULL;
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
    wc.lpszMenuName = NULL;
    wc.lpszClassName = ClassName;
    if (!RegisterClass(&wc)) {
        return;
    }

#if 1
    tracewin.en = 4;
#else
    tracewin.en = 1;
    tracewin.tf = textfile_create(OEMTEXT("traceout.txt"), 0x800);
#endif

    tracecfg.posx = CW_USEDEFAULT;
    tracecfg.posy = CW_USEDEFAULT;
    tracecfg.width = CW_USEDEFAULT;
    tracecfg.height = CW_USEDEFAULT;
    ini_read(file_getcd(np2trace), inititle, initbl, NELEMENTS(initbl));

    hwnd = CreateWindowEx(WS_EX_CONTROLPARENT,
                          ClassName, ProgTitle,
                          WS_OVERLAPPEDWINDOW,
                          tracecfg.posx, tracecfg.posy,
                          tracecfg.width, tracecfg.height,
                          NULL, NULL, g_hInstance, NULL);
    tracewin.hwnd = hwnd;
    if (hwnd == NULL) {
        return;
    }
    ShowWindow(hwnd, SW_SHOW);
    UpdateWindow(hwnd);
}
Example #24
0
static void inirdkb(const OEMCHAR *src, const PFTBL *ini) {

	if ((!milstr_extendcmp(src, OEMTEXT("PC98"))) ||
		(!milstr_cmp(src, OEMTEXT("98")))) {
		*(UINT8 *)ini->value = KEY_PC98;
	}
	else if ((!milstr_extendcmp(src, OEMTEXT("DOS"))) ||
			(!milstr_cmp(src, OEMTEXT("PCAT"))) ||
			(!milstr_cmp(src, OEMTEXT("AT")))) {
		*(UINT8 *)ini->value = KEY_KEY106;
	}
	else if ((!milstr_extendcmp(src, OEMTEXT("KEY101"))) ||
			(!milstr_cmp(src, OEMTEXT("101")))) {
		*(UINT8 *)ini->value = KEY_KEY101;
	}
}
Example #25
0
/**
 * Reset
 * @param[in] pConfig A pointer to a configure structure
 * @param[in] adpcm Enable ADPCM
 */
void board86_reset(const NP2CFG *pConfig, BOOL adpcm)
{
	REG8 cCaps;

	cCaps = OPNA_MODE_2608 | OPNA_HAS_TIMER | OPNA_S98;
	if (adpcm)
	{
		cCaps |= OPNA_HAS_ADPCM;
	}
	opna_reset(&g_opna[0], cCaps);

	fmtimer_reset((pConfig->snd86opt & 0x10) |
					((pConfig->snd86opt & 0x4) << 5) |
					((pConfig->snd86opt & 0x8) << 3));
	opngen_setcfg(&g_opna[0].opngen, 3, OPN_STEREO | 0x38);
	if (pConfig->snd86opt & 2)
	{
		soundrom_load(0xcc000, OEMTEXT("86"));
	}
	g_opna[0].s.base = (pConfig->snd86opt & 0x01) ? 0x000 : 0x100;
	fmboard_extreg(extendchannel);
}
Example #26
0
void steptrap_hisfileout(void) {

	UINT	s;
	FILEH	fh;
	UINT	pos;
	char	buf[32];

	s = trpos;
	if (s > IPTRACE) {
		s -= IPTRACE;
	}
	else {
		s = 0;
	}
	fh = file_create_c(OEMTEXT("his.txt"));
	while(s < trpos) {
		pos = s & (IPTRACE - 1);
		s++;
		SPRINTF(buf, "%.4x:%.8x\r\n", trcs[pos], treip[pos]);
		file_write(fh, buf, STRLEN(buf));
	}
	file_close(fh);
}
Example #27
0
/**
 * ファイルの検索
 * @param[in] lpPathName パス
 * @param[out] fli 検索結果
 * @return ファイル検索ハンドル
 */
FLISTH DOSIOCALL file_list1st(const OEMCHAR* lpPathName, FLINFO* fli)
{
	static const OEMCHAR s_szWildCard[] = OEMTEXT("*.*");

	OEMCHAR szPath[MAX_PATH];
	file_cpyname(szPath, lpPathName, NELEMENTS(szPath));
	file_setseparator(szPath, NELEMENTS(szPath));
	file_catname(szPath, s_szWildCard, NELEMENTS(szPath));

	WIN32_FIND_DATA w32fd;
	HANDLE hFile = ::FindFirstFile(szPath, &w32fd);
	if (hFile != INVALID_HANDLE_VALUE)
	{
		do
		{
			if (setFLInfo(w32fd, fli))
			{
				return hFile;
			}
		} while(::FindNextFile(hFile, &w32fd));
		::FindClose(hFile);
	}
	return FLISTH_INVALID;
}
Example #28
0
	}
	return(FAILURE);
}


// ---- file

typedef struct {
	OEMCHAR	path[MAX_PATH];
	UINT	ftype;
	int		readonly;
	DOSDATE	date;
	DOSTIME	time;
} STATPATH;

static const OEMCHAR str_updated[] = OEMTEXT("%s: updated");
static const OEMCHAR str_notfound[] = OEMTEXT("%s: not found");

static int statflag_writepath(STFLAGH sfh, const OEMCHAR *path,
												UINT ftype, int readonly) {

	STATPATH	sp;
	FILEH		fh;

	ZeroMemory(&sp, sizeof(sp));
	if ((path) && (path[0])) {
		file_cpyname(sp.path, path, NELEMENTS(sp.path));
		sp.ftype = ftype;
		sp.readonly = readonly;
		fh = file_open_rb(path);
		if (fh != FILEH_INVALID) {
Example #29
0
// verB
//		out->str: 'cpu'				in->str:	CPU型番
//		out->str: 'clock'			in->str:	動作クロック数


// ----

typedef struct {
const char	*key;
	void	(*func)(const void *arg1, long arg2);
const void	*arg1;
	long	arg2;
} SYSPCMD;

static const OEMCHAR str_80286[] = OEMTEXT("80286");
static const OEMCHAR str_v30[] = OEMTEXT("V30");
static const OEMCHAR str_pentium[] = OEMTEXT("PENTIUM");
static const OEMCHAR str_mhz[] = OEMTEXT("%uMHz");


static void setoutstr(const OEMCHAR *str) {

#if defined(OSLANG_UCS2)
	oemtext_oemtosjis(np2sysp.outstr, sizeof(np2sysp.outstr), str, -1);
#else
	milstr_ncpy(np2sysp.outstr, str, sizeof(np2sysp.outstr));
#endif
	np2sysp.outpos = 0;
}
Example #30
0
#include	"compiler.h"
#include	"strres.h"
#include	"scrnmng.h"
#include	"cpucore.h"
#include	"pccore.h"
#include	"iocore.h"
#include	"sound.h"
#include	"fmboard.h"
#include	"np2info.h"


static const OEMCHAR str_comma[] = OEMTEXT(", ");
static const OEMCHAR str_2halfMHz[] = OEMTEXT("2.5MHz");
#define str_5MHz	(str_2halfMHz + 2)
static const OEMCHAR str_8MHz[] = OEMTEXT("8MHz");
static const OEMCHAR str_notexist[] = OEMTEXT("not exist");
static const OEMCHAR str_disable[] = OEMTEXT("disable");

static const OEMCHAR str_cpu[] = OEMTEXT("8086-2\00070116\00080286\00080386\00080486\0Pentium\0PentiumPro");
static const OEMCHAR str_winclr[] = OEMTEXT("256-colors\00065536-colors\0full color\0true color");
static const OEMCHAR str_winmode[] = OEMTEXT(" (window)\0 (fullscreen)");
static const OEMCHAR str_grcgchip[] = OEMTEXT("\0GRCG \0GRCG CG-Window \0EGC CG-Window ");
static const OEMCHAR str_vrammode[] = OEMTEXT("Digital\0Analog\000256colors");
static const OEMCHAR str_vrampage[] = OEMTEXT(" page-0\0 page-1\0 page-all");
static const OEMCHAR str_chpan[] = OEMTEXT("none\0Mono-R\0Mono-L\0Stereo");
static const OEMCHAR str_fmboard[] = OEMTEXT("none\0PC-9801-14\0PC-9801-26\0PC-9801-86\0PC-9801-26 + 86\0PC-9801-118\0PC-9801-86 + Chibi-oto\0Speak board\0Spark board\0AMD-98");

static const OEMCHAR str_clockfmt[] = OEMTEXT("%d.%1dMHz");
static const OEMCHAR str_memfmt[] = OEMTEXT("%3uKB");
static const OEMCHAR str_memfmt2[] = OEMTEXT("%3uKB + %uKB");
static const OEMCHAR str_memfmt3[] = OEMTEXT("%d.%1dMB");