Ejemplo n.º 1
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int err;

	// Wait for user's action (execing program)
	sprintf(handle->updat->text, _("Waiting for execing of program..."));
	handle->updat->label();

	do
	{
		handle->updat->refresh();
		if (handle->updat->cancel)
			return ERR_ABORT;
		
		//send RDY request ???
		PAUSE(1000);
		err = rd_is_ready(handle);
	}
	while (err == ERROR_READ_TIMEOUT);

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
Ejemplo n.º 2
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int err;
	//uint16_t keys[] = { 
	//    0x76, 0x08, 0x08, 		/* Quit, Clear, Clear,	*/
	//	  0x28, 0x3A, 0x34,	0x11,	/* A, S, M, (,			*/
	//    0x39, 0x36, 0x34, 0x2B,   /* R, O, M, D	*/
	//    0x56, 0x4E, 0x51, 0x12,	/* u, m, p, )	*/
	//    0x06						/* Enter		*/
	//};               

	// Wait for user's action (execing program)
	sprintf(handle->updat->text, _("Waiting for user's action..."));
	handle->updat->label();

	do
	{
		handle->updat->refresh();
		if (handle->updat->cancel)
			return ERR_ABORT;
		
		//send RDY request ???
		PAUSE(1000);
		err = rd_is_ready(handle);
	}
	while (err == ERROR_READ_TIMEOUT);

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
Ejemplo n.º 3
0
// same code as calc_89.c
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	// Launch program by remote control
    TRYF(send_key(handle, 'm'));
    TRYF(send_key(handle, 'a'));
    TRYF(send_key(handle, 'i'));
    TRYF(send_key(handle, 'n'));
    TRYF(send_key(handle, '\\'));
    TRYF(send_key(handle, 'r'));
    TRYF(send_key(handle, 'o'));
    TRYF(send_key(handle, 'm'));
    TRYF(send_key(handle, 'd'));
    TRYF(send_key(handle, 'u'));
    TRYF(send_key(handle, 'm'));
    TRYF(send_key(handle, 'p'));
    TRYF(send_key(handle, KEY92P_LP));
    TRYF(send_key(handle, KEY92P_RP));
    TRYF(send_key(handle, KEY92P_ENTER));
	PAUSE(200);

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
Ejemplo n.º 4
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int i, err = 0;
	static const uint16_t keys[] = {				
		0x40, 0x09, 0x09,			/* Quit, Clear, Clear, */
		0xFE63, 0x97, 0xDA,			/* Send(, 9, prgm */
		0xAB, 0xA8, 0xA6, 0x9D,		/* R, O, M, D */
		0xAE, 0xA6, 0xA9, 0x05		/* U, M, P, Enter */
	};

	// Launch program by remote control
	for(i = 0; i < (int)(sizeof(keys) / sizeof(keys[0])); i++)
	{
		TRYF(send_key(handle, keys[i]));
		PAUSE(100);
	}

	do
	{
		handle->updat->refresh();
		if (handle->updat->cancel)
			return ERR_ABORT;
		
		//send RDY request ???
		PAUSE(1000);
		err = rd_is_ready(handle);
	}
	while (err == ERROR_READ_TIMEOUT);

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
Ejemplo n.º 5
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
#if 0
	int i;
	static const uint16_t keys[] = { 
		0x40, 0x09, 0x09, 0xFC9C, /* Quit, Clear, Clear, Asm( */
		0xDA, 0xAB, 0xA8, 0xA6,   /* prgm, R, O, M */
		0x9D, 0xAE, 0xA6, 0xA9,   /* D, U, M, P */
		0x86 };                   /* ) */

	// Launch program by remote control
	PAUSE(200);
	for(i = 0; i < sizeof(keys) / sizeof(uint16_t); i++)
	{
		TRYF(send_key(handle, keys[i]));
		PAUSE(100);
	}

	// This fixes a 100% reproducible timeout: send_key normally requests a data ACK,
	// but when the program is running, no data ACK is sent. Therefore, hit the Enter
	// key without requesting a data ACK, only the initial delay ACK.
	TRYF(cmd_s_execute(handle, "", "", EID_KEY, NULL, 0x05));
	TRYF(cmd_r_delay_ack(handle));
	PAUSE(400);
#endif
#if 1
	TRYF(cmd_s_execute(handle, NULL, "ROMDUMP", EID_PRGM, NULL, 0));
	TRYF(cmd_r_data_ack(handle));
	PAUSE(400);
#endif
	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
Ejemplo n.º 6
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int ret = 0;
	unsigned int i;

	if (handle->model == CALC_TI83)
	{
		static const uint16_t keys[] = {
			0x40, 0x09, 0x09,       /* Quit, Clear, Clear, */
			0xFE63, 0x97, 0xDA,     /* Send(, 9, prgm */
			0xAB, 0xA8, 0xA6, 0x9D, /* R, O, M, D */
			0xAE, 0xA6, 0xA9, 0x05  /* U, M, P, Enter */
		};

		// Launch program by remote control
		for (i = 0; !ret && i < sizeof(keys) / sizeof(keys[0]); i++)
		{
			ret = send_key(handle, (uint32_t)(keys[i]));
			PAUSE(100);
		}
	}
	else if (handle->model == CALC_TI86)
	{
		static const uint16_t keys[] = {
			0x76, 0x08, 0x08,       /* Quit, Clear, Clear, */
			0x28, 0x3A, 0x34, 0x11, /* A, S, M, (, */
			0x39, 0x36, 0x34, 0x2B, /* R, O, M, D, */
			0x56, 0x4E, 0x51, 0x12, /* u, m, p, ), */
			0x06                    /* Enter */
		};
		uint16_t dummy;

		// Launch program by remote control
		for (i = 0; !ret && i < (sizeof(keys) / sizeof(keys[0])) - 1; i++)
		{
			ret = send_key(handle, (uint32_t)(keys[i]));
		}

		if (!ret)
		{
			ret = SEND_KEY(handle, keys[i]);
			if (!ret)
			{
				ret = RECV_ACK(handle, &dummy);
			}
			PAUSE(200);
		}
	}

	if (!ret)
	{
		// Get dump
		ret = rd_dump(handle, filename);

		// TI-86: normally there would be another ACK after the program exits, but the ROM dumper disables that behaviour.
	}

	return ret;
}
Ejemplo n.º 7
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	static const uint16_t keys_83p[] = {
		0x40, 0x09, 0x09, 0xFC9C, /* Quit, Clear, Clear, Asm( */
		0xDA, 0xAB, 0xA8, 0xA6,   /* prgm, R, O, M */
		0x9D, 0xAE, 0xA6, 0xA9,   /* D, U, M, P */
		0x86, 0x05 };             /* ), Enter */

	static const uint16_t keys_73[] = {
		0x40, 0x09, 0x09, 0xDA,   /* Quit, Clear, Clear, prgm */
		0xAB, 0xA8, 0xA6, 0x9D,   /* R, O, M, D, */
		0xAE, 0xA6, 0xA9, 0x05 }; /* U, M, P, Enter */

	int ret = 0;
	const uint16_t *keys;
	unsigned int i, nkeys;

	if (handle->model == CALC_TI73)
	{
		keys = keys_73;
		nkeys = sizeof(keys_73) / sizeof(keys_73[0]);
	}
	else
	{
		keys = keys_83p;
		nkeys = sizeof(keys_83p) / sizeof(keys_83p[0]);
	}

	// Launch program by remote control
	PAUSE(200);
	for (i = 0; !ret && i < nkeys - 1; i++)
	{
		ret = send_key(handle, (uint32_t)(keys[i]));
		PAUSE(100);
	}

	if (!ret)
	{
		// This fixes a 100% reproducible timeout: send_key normally requests an ACK,
		// but when the program is running, no ACK is sent. Therefore, hit the Enter key
		// without requesting an ACK.
		ret = SEND_KEY(handle, keys[i]);
		if (!ret)
		{
			ret = RECV_ACK(handle, NULL); // when the key is received
			if (!ret)
			{
				PAUSE(1000);

				// Get dump
				// (Normally there would be another ACK after the program exits,
				// but the ROM dumper disables that behavior)
				ret = rd_dump(handle, filename);
			}
		}
	}

	return ret;
}
Ejemplo n.º 8
0
static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int i;
	static const uint16_t keys[] = {				
		0x40, 0x09, 0x09,			/* Quit, Clear, Clear, */
		0xFE63, 0x97, 0xDA,			/* Send(, 9, prgm */
		0xAB, 0xA8, 0xA6, 0x9D,		/* R, O, M, D */
		0xAE, 0xA6, 0xA9, 0x05		/* U, M, P, Enter */
	};

	// Launch program by remote control
	for(i = 0; i < (int)(sizeof(keys) / sizeof(keys[0])); i++)
	{
		TRYF(send_key(handle, keys[i]));
		PAUSE(100);
	}

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}