예제 #1
0
파일: tzx_cas.cpp 프로젝트: MASHinfo/mame
static int cdt_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
{
	int16_t *p = buffer;
	int size = 0;
	t_scale = (40 / 35);  /* scale to 4MHz */
	size = tzx_cas_do_work(&p);
	return size;
}
예제 #2
0
파일: tzx_cas.cpp 프로젝트: MASHinfo/mame
static int tzx_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
{
	int16_t *p = buffer;
	int size = 0;
	t_scale = 1.0;
	size = tzx_cas_do_work(&p);
	return size;
}
예제 #3
0
파일: tzx_cas.cpp 프로젝트: MASHinfo/mame
static int tzx_cas_to_wav_size( const uint8_t *casdata, int caslen )
{
	int size = 0;

	/* Header size plus major and minor version number */
	if (caslen < 10)
	{
		LOG_FORMATS("tzx_cas_to_wav_size: cassette image too small\n");
		goto cleanup;
	}

	/* Check for correct header */
	if (memcmp(casdata, TZX_HEADER, sizeof(TZX_HEADER)))
	{
		LOG_FORMATS("tzx_cas_to_wav_size: cassette image has incompatible header\n");
		goto cleanup;
	}

	/* Check major version number in header */
	if (casdata[0x08] > SUPPORTED_VERSION_MAJOR)
	{
		LOG_FORMATS("tzx_cas_to_wav_size: unsupported version\n");
		goto cleanup;
	}

	tzx_cas_get_blocks(casdata, caslen);

	LOG_FORMATS("tzx_cas_to_wav_size: %d blocks found\n", block_count);

	if (block_count == 0)
	{
		LOG_FORMATS("tzx_cas_to_wav_size: no blocks found!\n");
		goto cleanup;
	}

	size = tzx_cas_do_work(nullptr);

	return size;

cleanup:
	return -1;
}
예제 #4
0
static int tzx_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {
	INT16	*p = buffer;
	int	size = 0;
	size = tzx_cas_do_work( &p );
	return size;
}