mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
Hooked up drawing
This commit is contained in:
parent
c06bfbfa28
commit
f603291c0e
@ -849,7 +849,8 @@ void h63484_device::process_fifo()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalerror("stop!");
|
printf("%04x\n",m_cr);
|
||||||
|
//fatalerror("stop!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -956,6 +957,22 @@ void h63484_device::video_registers_w(int offset)
|
|||||||
m_mwr[(offset & 0x18) >> 3] = vreg_data & 0xfff; // pitch
|
m_mwr[(offset & 0x18) >> 3] = vreg_data & 0xfff; // pitch
|
||||||
m_mwr_chr[(offset & 0x18) >> 3] = (vreg_data & 0x8000) >> 15;
|
m_mwr_chr[(offset & 0x18) >> 3] = (vreg_data & 0x8000) >> 15;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0xc4: // Start Address Register
|
||||||
|
case 0xcc:
|
||||||
|
case 0xd4:
|
||||||
|
case 0xdc:
|
||||||
|
m_sar[(offset & 0x18) >> 3] = ((vreg_data & 0xf) << 16) | (m_sar[(offset & 0x18) >> 3] & 0xffff);
|
||||||
|
m_sda[(offset & 0x18) >> 3] = (vreg_data & 0x0f00) >> 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 0xc6: // Start Address Register
|
||||||
|
case 0xce:
|
||||||
|
case 0xd6:
|
||||||
|
case 0xde:
|
||||||
|
m_sar[(offset & 0x18) >> 3] = (vreg_data & 0xffff) | (m_sar[(offset & 0x18) >> 3] & 0xf0000);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if(LOG) printf("%s -> %04x\n",acrtc_regnames[m_ar/2],vreg_data);
|
if(LOG) printf("%s -> %04x\n",acrtc_regnames[m_ar/2],vreg_data);
|
||||||
break;
|
break;
|
||||||
@ -1036,6 +1053,35 @@ void h63484_device::device_reset()
|
|||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// draw_graphics_line -
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void h63484_device::draw_graphics_line(bitmap_t *bitmap, const rectangle *cliprect, int y, int layer_n)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int pitch;
|
||||||
|
int base_offs;
|
||||||
|
|
||||||
|
pitch = m_mwr[layer_n];
|
||||||
|
base_offs = m_sar[layer_n];
|
||||||
|
|
||||||
|
for(x=0;x<pitch * 4;x+=4)
|
||||||
|
{
|
||||||
|
UINT16 data;
|
||||||
|
|
||||||
|
data = readbyte(base_offs + (x >> 1) + y * pitch * 2);
|
||||||
|
|
||||||
|
m_display_cb(this, bitmap, y, x+3, (data >> 4) & 0xf);
|
||||||
|
m_display_cb(this, bitmap, y, x+2, data & 0xf);
|
||||||
|
|
||||||
|
data = readbyte(base_offs + ((x + 2) >> 1) + y * pitch * 2);
|
||||||
|
|
||||||
|
m_display_cb(this, bitmap, y, x+1, (data >> 4) & 0xf);
|
||||||
|
m_display_cb(this, bitmap, y, x+0, data & 0xf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// update_screen -
|
// update_screen -
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -1044,6 +1090,12 @@ void h63484_device::update_screen(bitmap_t *bitmap, const rectangle *cliprect)
|
|||||||
{
|
{
|
||||||
if(m_dcr & 0x8000) // correct?
|
if(m_dcr & 0x8000) // correct?
|
||||||
{
|
{
|
||||||
// ...
|
int y;
|
||||||
|
|
||||||
|
for(y=cliprect->min_y;y<cliprect->max_y;y++)
|
||||||
|
{
|
||||||
|
if (m_display_cb)
|
||||||
|
draw_graphics_line(bitmap,cliprect, y, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
#define H63484_INTERFACE(name) \
|
#define H63484_INTERFACE(name) \
|
||||||
const h63484_interface (name) =
|
const h63484_interface (name) =
|
||||||
|
|
||||||
typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int x, UINT32 address, UINT16 data, UINT8 *vram);
|
typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data);
|
||||||
#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int x, UINT32 address, UINT16 data, UINT8 *vram)
|
#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data)
|
||||||
|
|
||||||
// ======================> h63484_interface
|
// ======================> h63484_interface
|
||||||
|
|
||||||
@ -88,6 +88,7 @@ private:
|
|||||||
UINT16 video_registers_r(int offset);
|
UINT16 video_registers_r(int offset);
|
||||||
void video_registers_w(int offset);
|
void video_registers_w(int offset);
|
||||||
int translate_command(UINT16 data);
|
int translate_command(UINT16 data);
|
||||||
|
void draw_graphics_line(bitmap_t *bitmap, const rectangle *cliprect, int y, int layer_n);
|
||||||
|
|
||||||
|
|
||||||
screen_device *m_screen;
|
screen_device *m_screen;
|
||||||
@ -123,6 +124,9 @@ private:
|
|||||||
UINT16 m_mwr[4];
|
UINT16 m_mwr[4];
|
||||||
UINT8 m_mwr_chr[4];
|
UINT8 m_mwr_chr[4];
|
||||||
|
|
||||||
|
UINT32 m_sar[4];
|
||||||
|
UINT8 m_sda[4];
|
||||||
|
|
||||||
UINT16 m_pram[0x10];
|
UINT16 m_pram[0x10];
|
||||||
UINT8 m_dn;
|
UINT8 m_dn;
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ void adp_state::video_start()
|
|||||||
|
|
||||||
static H63484_DISPLAY_PIXELS( acrtc_display_pixels )
|
static H63484_DISPLAY_PIXELS( acrtc_display_pixels )
|
||||||
{
|
{
|
||||||
// ...
|
*BITMAP_ADDR16(bitmap, y, x) = data & 0xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
|
bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
|
||||||
|
Loading…
Reference in New Issue
Block a user