Beispiel #1
0
size_t read_unknown_inchan(in_chan *chan, void **out_buffer)
{
  uint32_t len = pull_next_size(&chan->core);
  *out_buffer = malloc(len);
  internal_read(&chan->core, *out_buffer, len);
  return len;
}
Beispiel #2
0
void eeprom_base_device::write_all(UINT32 data)
{
	if (!ready())
		logerror("EEPROM: Write all performed before previous operation completed!");
	for (offs_t address = 0; address < (1 << m_address_bits); address++)
		internal_write(address, internal_read(address) & data);
	m_completion_time = machine().time() + m_operation_time[WRITE_ALL_TIME];
}
Beispiel #3
0
int read_inchan(in_chan *chan, void *buffer, int size)
{
  uint32_t len = pull_next_size(&chan->core);

  if(len > size)
    return 0;

  internal_read(&chan->core, buffer, len);
  return len;
}
Beispiel #4
0
/* read 0x6000-0x7fff */
BYTE finalexpansion_blk3_read(WORD addr)
{
    BYTE value;
    if (!(register_b & REGB_BLK3_OFF)) {
        value = internal_read(addr, 3, BLK3_BASE, register_a & REGA_BLK3_SEL);
    } else {
        value = vic20_cpu_last_data;
    }
    return value;
}
Beispiel #5
0
void comma_reader(CL_FORM *base)
{
	COPY(SYMVAL(Slisp, 447), ARG(2));	/* *BQ-LEVEL* */
	LOAD_FIXNUM(ARG(3), 0, ARG(3));
	Fle(ARG(2), 2);
	if(CL_TRUEP(ARG(2)))
	{
		LOAD_SMSTR((CL_FORM *)&Kcomma_reader[0], ARG(2));	/* A comma appeared outside of a backquote */
		Ferror(ARG(2), 1);
	}
	COPY(SYMVAL(Slisp, 447), ARG(2));	/* *BQ-LEVEL* */
	F1minus(ARG(2));
	COPY(ARG(2), SYMVAL(Slisp, 447));	/* *BQ-LEVEL* */
	LOAD_NIL(ARG(2));
	COPY(ARG(0), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
	LOAD_NIL(ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
	peek_char1(ARG(2));
	if(CL_CHARP(ARG(2)) && GET_CHAR(ARG(2)) == '@')
	{
		COPY(ARG(0), ARG(3));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
		LOAD_NIL(ARG(5));
		LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
		read_char1(ARG(3));
		COPY(SYMVAL(Slisp, 437), ARG(2));	/* *COMMA-ATSIGN* */
	}
	else
	{
		if(CL_CHARP(ARG(2)) && GET_CHAR(ARG(2)) == '.')
		{
			COPY(ARG(0), ARG(3));
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
			LOAD_NIL(ARG(5));
			LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
			read_char1(ARG(3));
			COPY(SYMVAL(Slisp, 438), ARG(2));	/* *COMMA-DOT* */
		}
		else
		{
			COPY(SYMVAL(Slisp, 436), ARG(2));	/* *COMMA* */
		}
	}
	COPY(ARG(0), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
	LOAD_NIL(ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
	internal_read(ARG(3));
	ALLOC_CONS(ARG(4), ARG(2), ARG(3), ARG(2));
	COPY(SYMVAL(Slisp, 447), ARG(3));	/* *BQ-LEVEL* */
	F1plus(ARG(3));
	COPY(ARG(3), SYMVAL(Slisp, 447));	/* *BQ-LEVEL* */
	COPY(ARG(2), ARG(0));
}
Beispiel #6
0
void quote_reader(CL_FORM *base)
{
	LOAD_SYMBOL(SYMBOL(Slisp, 455), ARG(2));	/* QUOTE */
	COPY(ARG(0), ARG(3));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(4));	/* T */
	LOAD_NIL(ARG(5));
	LOAD_SYMBOL(SYMBOL(Slisp, 48), ARG(6));	/* T */
	internal_read(ARG(3));
	Flist(ARG(2), 2);
	COPY(ARG(2), ARG(0));
}
Beispiel #7
0
/* read 0xa000-0xbfff */
BYTE finalexpansion_blk5_read(WORD addr)
{
    BYTE value;

    lock_bit = 1;

    if (!(register_b & REGB_BLK5_OFF)) {
        value = internal_read(addr, 5, BLK5_BASE, register_a & REGA_BLK5_SEL);
    } else {
        value = vic20_cpu_last_data;
    }
    return value;
}
Beispiel #8
0
UINT32 eeprom_base_device::read(offs_t address)
{
	if (!ready())
		logerror("EEPROM: Read performed before previous operation completed!");
	return internal_read(address);
}