Пример #1
0
uint32_t nubus_vikbw_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	uint32_t *scanline;
	int x, y;
	uint8_t pixels;

	if (!m_vbl_disable)
	{
		raise_slot_irq();
	}

	for (y = 0; y < 768; y++)
	{
		scanline = &bitmap.pix32(y);
		for (x = 0; x < 1024/8; x++)
		{
			pixels = m_vram[(y * 128) + (BYTE4_XOR_BE(x))];

			*scanline++ = m_palette[(pixels>>7)&1];
			*scanline++ = m_palette[(pixels>>6)&1];
			*scanline++ = m_palette[(pixels>>5)&1];
			*scanline++ = m_palette[(pixels>>4)&1];
			*scanline++ = m_palette[(pixels>>3)&1];
			*scanline++ = m_palette[(pixels>>2)&1];
			*scanline++ = m_palette[(pixels>>1)&1];
			*scanline++ = m_palette[(pixels&1)];
		}
	}

	return 0;
}
Пример #2
0
void nubus_radiustpd_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr)
{
	if (!m_vbl_disable)
	{
		raise_slot_irq();
	}

	m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
Пример #3
0
void nubus_xceed30hr_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr)
{
	if (!m_vbl_disable)
	{
		raise_slot_irq();
	}

	m_timer->adjust(screen().time_until_pos(479, 0), 0);
}
Пример #4
0
void nubus_spec8s3_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr)
{
    if (!m_vbl_disable)
    {
        raise_slot_irq();
        m_vbl_pending = true;
    }

    m_timer->adjust(m_screen->time_until_pos(767, 0), 0);
}
Пример #5
0
UINT32 nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
    UINT32 *scanline, *base;
    int x, y;
    UINT8 pixels;

    if (!m_cb264_vbl_disable)
    {
        raise_slot_irq();
    }

    switch (m_cb264_mode)
    {
    case 0: // 1 bpp
        for (y = 0; y < 480; y++)
        {
            scanline = &bitmap.pix32(y);
            for (x = 0; x < 640/8; x++)
            {
                pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];

                *scanline++ = m_palette[pixels&0x80];
                *scanline++ = m_palette[(pixels<<1)&0x80];
                *scanline++ = m_palette[(pixels<<2)&0x80];
                *scanline++ = m_palette[(pixels<<3)&0x80];
                *scanline++ = m_palette[(pixels<<4)&0x80];
                *scanline++ = m_palette[(pixels<<5)&0x80];
                *scanline++ = m_palette[(pixels<<6)&0x80];
                *scanline++ = m_palette[(pixels<<7)&0x80];
            }
        }
        break;

    case 1: // 2 bpp (3f/7f/bf/ff)
        for (y = 0; y < 480; y++)
        {
            scanline = &bitmap.pix32(y);
            for (x = 0; x < 640/4; x++)
            {
                pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];

                *scanline++ = m_palette[pixels&0xc0];
                *scanline++ = m_palette[(pixels<<2)&0xc0];
                *scanline++ = m_palette[(pixels<<4)&0xc0];
                *scanline++ = m_palette[(pixels<<6)&0xc0];
            }
        }
        break;

    case 2: // 4 bpp
        for (y = 0; y < 480; y++)
        {
            scanline = &bitmap.pix32(y);

            for (x = 0; x < 640/2; x++)
            {
                pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];

                *scanline++ = m_palette[pixels&0xf0];
                *scanline++ = m_palette[(pixels<<4)&0xf0];
            }
        }
        break;

    case 3: // 8 bpp
        for (y = 0; y < 480; y++)
        {
            scanline = &bitmap.pix32(y);

            for (x = 0; x < 640; x++)
            {
                pixels = m_vram[(y * 1024) + (BYTE4_XOR_BE(x))];
                *scanline++ = m_palette[pixels];
            }
        }
        break;

    case 4: // 24 bpp
    case 7: // ???
    {
        UINT32 *vram32 = (UINT32 *)&m_vram[0];

        for (y = 0; y < 480; y++)
        {
            scanline = &bitmap.pix32(y);
            base = &vram32[y * 1024];
            for (x = 0; x < 640; x++)
            {
                *scanline++ = *base++;
            }
        }
    }
    break;

    default:
        fatalerror("cb264: unknown video mode %d\n", m_cb264_mode);
    }

    return 0;
}
Пример #6
0
void a2bus_themill_device::write_c0nx(uint8_t offset, uint8_t data)
{
	switch (offset)
	{
		case 0: // 6502 IRQ
			if (data & 0x80)
			{
				m_status |= 0x01;
				lower_slot_irq();
			}
			else
			{
				m_status &= ~0x01;
				raise_slot_irq();
			}
			break;

		case 2: // 6809 reset
			if (data & 0x80)
			{
				m_6809->reset();

				m_6809->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
				m_6809->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);

				m_bEnabled = true;
				m_status &= ~0x04;
			}
			else
			{
				m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
				m_bEnabled = false;
				m_status |= 0x04;
			}
			break;

		case 1: // 6809 halt
			if (data & 0x80)    // release reset
			{
				m_status |= 0x02;
			}
			else
			{
				m_6809->reset();
				m_status &= ~0x02;
			}
			break;

		case 3: // 6809 NMI
			if (data & 0x80)
			{
				m_6809->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
				m_status |= 0x08;
			}
			else
			{
				m_6809->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
				m_status &= ~0x08;
			}
			break;

		case 4: // 6809 FIRQ
			if (data & 0x80)
			{
				m_6809->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
				m_status |= 0x10;
			}
			else
			{
				m_6809->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
				m_status &= ~0x10;
			}
			break;

		case 5: // 6809 IRQ
			if (data & 0x80)
			{
				m_6809->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
				m_status |= 0x20;
			}
			else
			{
				m_6809->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
				m_status &= ~0x20;
			}
			break;

		case 6:
			if (data & 0x80)    // enable ROM socket
			{
				m_status |= 0x40;
				printf("The Mill: on-board ROM socket enabled; because none of these ROMs are dumped, the 6809 will not run!\n");
			}
			else
			{
				m_status &= ~0x40;
			}
			break;

		case 7: // 6809 mapping
			if (data & 0x80)
			{
				m_status |= 0x80;
				m_flipAddrSpace = false;
			}
			else
			{
				m_status &= ~0x80;
				m_flipAddrSpace = true;
			}
			break;

		case 0xa:   // addresses >= 0x8 are direct status writes?  "Excel Flex 9" disc seems to indicate so.
			m_status = data;
			break;

		default:
			printf("The Mill: %02x to unhandled c0n%x\n", data, offset);
			break;
	}
}
Пример #7
0
UINT32 jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	UINT32 *scanline, *base;
	int x, y;
	UINT8 *vram8 = (UINT8 *)m_vram;
	UINT8 pixels;

	if (!m_vbl_disable)
	{
		raise_slot_irq();
	}

	vram8 += 0xa00;

	switch (m_mode)
	{
		case 0: // 1bpp
			for (y = 0; y < m_yres; y++)
			{
				scanline = &bitmap.pix32(y);
				for (x = 0; x < m_xres/8; x++)
				{
					pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];

					*scanline++ = m_palette[(pixels>>7)&1];
					*scanline++ = m_palette[(pixels>>6)&1];
					*scanline++ = m_palette[(pixels>>5)&1];
					*scanline++ = m_palette[(pixels>>4)&1];
					*scanline++ = m_palette[(pixels>>3)&1];
					*scanline++ = m_palette[(pixels>>2)&1];
					*scanline++ = m_palette[(pixels>>1)&1];
					*scanline++ = m_palette[pixels&1];
				}
			}
			break;

		case 1: // 2bpp
			for (y = 0; y < m_yres; y++)
			{
				scanline = &bitmap.pix32(y);
				for (x = 0; x < m_xres/4; x++)
				{
					pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];

					*scanline++ = m_palette[(pixels>>6)&0x3];
					*scanline++ = m_palette[(pixels>>4)&0x3];
					*scanline++ = m_palette[(pixels>>2)&0x3];
					*scanline++ = m_palette[pixels&3];
				}
			}
			break;

		case 2: // 4 bpp
			for (y = 0; y < m_yres; y++)
			{
				scanline = &bitmap.pix32(y);

				for (x = 0; x < m_xres/2; x++)
				{
					pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];

					*scanline++ = m_palette[(pixels>>4)&0xf];
					*scanline++ = m_palette[pixels&0xf];
				}
			}
			break;

		case 3: // 8 bpp
			for (y = 0; y < m_yres; y++)
			{
				scanline = &bitmap.pix32(y);

				for (x = 0; x < m_xres; x++)
				{
					pixels = vram8[(y * m_stride) + (BYTE4_XOR_BE(x))];
					*scanline++ = m_palette[pixels];
				}
			}
			break;

		case 4: // 24 bpp
			for (y = 0; y < m_yres; y++)
			{
				scanline = &bitmap.pix32(y);
				base = (UINT32 *)&m_vram[y * m_stride];
				for (x = 0; x < m_xres; x++)
				{
					*scanline++ = *base++;
				}
			}
			break;
	}

	return 0;
}