(MESS) Removed unused legacy code. (nw)

This commit is contained in:
Curt Coder 2012-12-07 16:06:31 +00:00
parent 0b78c005f6
commit 49d9ed05aa
6 changed files with 0 additions and 3789 deletions

4
.gitattributes vendored
View File

@ -7721,13 +7721,9 @@ src/mess/video/uv201.c svneol=native#text/plain
src/mess/video/uv201.h svneol=native#text/plain
src/mess/video/v1050.c svneol=native#text/plain
src/mess/video/vc4000.c svneol=native#text/plain
src/mess/video/vdc8563.c svneol=native#text/plain
src/mess/video/vdc8563.h svneol=native#text/plain
src/mess/video/vector06.c svneol=native#text/plain
src/mess/video/vic4567.c svneol=native#text/plain
src/mess/video/vic4567.h svneol=native#text/plain
src/mess/video/vic6567.c svneol=native#text/plain
src/mess/video/vic6567.h svneol=native#text/plain
src/mess/video/vtech2.c svneol=native#text/plain
src/mess/video/vtvideo.c svneol=native#text/plain
src/mess/video/vtvideo.h svneol=native#text/plain

View File

@ -933,8 +933,6 @@ $(MESSOBJ)/cbm.a: \
$(MESS_MACHINE)/mos8722.o \
$(MESS_MACHINE)/mos8726.o \
$(MESS_MACHINE)/c2n.o \
$(MESS_VIDEO)/vdc8563.o \
$(MESS_VIDEO)/vic6567.o \
$(MESS_VIDEO)/vic4567.o \
$(MESS_VIDEO)/mos6566.o \
$(MESS_DRIVERS)/c900.o \
@ -1284,7 +1282,6 @@ $(MESSOBJ)/luxor.a: \
$(MESS_MACHINE)/abc99.o \
$(MESS_MACHINE)/lux10828.o \
$(MESS_MACHINE)/lux21046.o \
$(MESS_MACHINE)/abc830.o \
$(MESS_MACHINE)/abc890.o \
$(MESS_DRIVERS)/abc1600.o \
$(MESS_MACHINE)/abc1600_bus.o \

View File

@ -1,696 +0,0 @@
/***************************************************************************
CBM Video Device Chip 8563
Original code by PeT (peter.trauner@jk.uni-linz.ac.at)
2010-02: converted to be a device
TODO:
- clean up the code
- add RAM with an internal address map
***************************************************************************/
/*
several graphic problems
some are in the rastering engine and should be solved during its evalution
rare and short documentation,
registers and some words of description in the c128 user guide */
/* seems to be a motorola m6845 variant */
#include "emu.h"
#include "video/vdc8563.h"
struct vdc8563_state
{
screen_device *screen;
int state;
UINT8 reg[37];
UINT8 index;
UINT16 addr, src;
UINT16 videoram_start, colorram_start, fontram_start;
UINT16 videoram_size;
int rastering;
UINT8 *ram;
UINT8 *dirty;
UINT8 fontdirty[0x200];
UINT16 mask, fontmask;
double cursor_time;
int cursor_on;
int changed;
};
/*****************************************************************************
CONSTANTS
*****************************************************************************/
#define VERBOSE_LEVEL 0
#define DBG_LOG(N, M, A) \
do { \
if (VERBOSE_LEVEL >= N) \
{ \
if (M) \
logerror("%11.6f: %-24s",device->machine().time().as_double(),(char*)M ); \
logerror A; \
} \
} while (0)
static const struct {
int stored,
read;
} reg_mask[]= {
{ 0xff, 0 },
{ 0xff, 0 },
{ 0xff, 0 },
{ 0xff, 0 },
{ 0xff, 0 },
{ 0x1f, 0 },
{ 0xff, 0 },
{ 0xff, 0 },
{ 0x3, 0 }, //8
{ 0x1f, 0 },
{ 0x7f, 0 },
{ 0x1f, 0 },
{ 0xff, 0xff },
{ 0xff, 0xff },
{ 0xff, 0xff },
{ 0xff, 0xff },
{ -1, 0xff }, //0x10
{ -1, 0xff },
{ 0xff, 0xff },
{ 0xff, 0xff },
{ 0xff, -1 },
{ 0x1f, -1 },
{ 0xff, -1 },
{ 0xff, -1 },
{ 0xff, -1 },//0x18
{ 0xff, -1 },
{ 0xff, -1 },
{ 0xff, -1 },
{ 0xf0, -1 },
{ 0x1f, -1 },
{ 0xff, -1 },
{ 0xff, -1 },
{ 0xff, -1 }, //0x20
{ 0xff, -1 },
{ 0xff, -1 },
{ 0xff, -1 },
{ 0x0f, -1 },
};
#define REG(x) (vdc8563->reg[x] & reg_mask[x].stored)
#define CHAR_WIDTH (((vdc8563->reg[0x16] & 0xf0) >> 4) + 1)
#define CHAR_WIDTH_VISIBLE ((vdc8563->reg[0x16] & 0x0f) + 1)
#define BLOCK_COPY (vdc8563->reg[0x18] & 0x80)
#define MONOTEXT ((vdc8563->reg[0x19] & 0xc0) == 0)
#define TEXT ((vdc8563->reg[0x19] & 0xc0) == 0x40)
#define GRAPHIC (vdc8563->reg[0x19] & 0x80)
#define FRAMECOLOR (vdc8563->reg[0x1a] & 0x0f)
#define MONOCOLOR (vdc8563->reg[0x1a] >> 4)
#define LINEDIFF (vdc8563->reg[0x1b])
#define FONT_START ((vdc8563->reg[0x1c] & 0xe0) << 8)
/* 0x1c 0x10 dram 0:4416, 1: 4164 */
/* 0x1d 0x1f counter for underlining */
#define FILLBYTE vdc8563->reg[0x1f]
#define CLOCK_HALFING (vdc8563->reg[25] & 0x10)
/* the regs below corresponds to the ones used by 6845, hence we borrow the macros */
#define CRTC6845_COLUMNS (REG(0) + 1)
#define CRTC6845_CHAR_COLUMNS (REG(1))
#define CRTC6845_CHAR_LINES REG(6)
#define CRTC6845_CHAR_HEIGHT ((REG(9) & 0x1f) + 1)
#define CRTC6845_LINES (REG(4) * CRTC6845_CHAR_HEIGHT + REG(5))
#define CRTC6845_VIDEO_START ((REG(0xc) << 8) | REG(0xd))
#define CRTC6845_INTERLACE_MODE (REG(8) & 3)
#define CRTC6845_INTERLACE_SIGNAL 1
#define CRTC6845_INTERLACE 3
#define CRTC6845_CURSOR_MODE (REG(0xa) & 0x60)
#define CRTC6845_CURSOR_OFF 0x20
#define CRTC6845_CURSOR_16FRAMES 0x40
#define CRTC6845_CURSOR_32FRAMES 0x60
#define CRTC6845_SKEW (REG(8) & 15)
#define CRTC6845_CURSOR_POS ((REG(0xe) << 8) | REG(0xf))
#define CRTC6845_CURSOR_TOP (REG(0xa) & 0x1f)
#define CRTC6845_CURSOR_BOTTOM REG(0xb)
/*****************************************************************************
INLINE FUNCTIONS
*****************************************************************************/
INLINE vdc8563_state *get_safe_token( device_t *device )
{
assert(device != NULL);
assert(device->type() == VDC8563);
return (vdc8563_state *)downcast<vdc8563_device *>(device)->token();
}
INLINE const vdc8563_interface *get_interface( device_t *device )
{
assert(device != NULL);
assert((device->type() == VDC8563));
return (const vdc8563_interface *) device->static_config();
}
/*****************************************************************************
IMPLEMENTATION
*****************************************************************************/
static void vdc_videoram_w( device_t *device, int offset, int data )
{
vdc8563_state *vdc8563 = get_safe_token(device);
offset &= vdc8563->mask;
if (vdc8563->ram[offset] != data)
{
vdc8563->ram[offset] = data;
vdc8563->dirty[offset] = 1;
if ((vdc8563->fontram_start & vdc8563->fontmask) == (offset & vdc8563->fontmask))
vdc8563->fontdirty[(offset & 0x1ff0) >> 4] = 1;
}
}
INLINE int vdc_videoram_r( device_t *device, int offset )
{
vdc8563_state *vdc8563 = get_safe_token(device);
return vdc8563->ram[offset & vdc8563->mask];
}
void vdc8563_set_rastering( device_t *device, int on )
{
vdc8563_state *vdc8563 = get_safe_token(device);
vdc8563->rastering = on;
vdc8563->changed |= 1;
}
/* 0x22 number of chars from start of line to positiv edge of display enable */
/* 0x23 number of chars from start of line to negativ edge of display enable */
/* 0x24 0xf number of refresh cycles per line */
WRITE8_DEVICE_HANDLER( vdc8563_port_w )
{
vdc8563_state *vdc8563 = get_safe_token(device);
UINT8 i;
if (offset & 1)
{
if ((vdc8563->index & 0x3f) < 37)
{
switch (vdc8563->index & 0x3f)
{
case 1: case 4: case 0x1b:
vdc8563->reg[vdc8563->index] = data;
vdc8563->videoram_size = CRTC6845_CHAR_LINES * (CRTC6845_CHAR_COLUMNS + LINEDIFF);
vdc8563->changed = 1;
break;
case 0xe: case 0xf: case 0xa: case 0xb:
vdc8563->dirty[CRTC6845_CURSOR_POS & vdc8563->mask] = 1;
vdc8563->reg[vdc8563->index] = data;
break;
case 0xc: case 0xd:
vdc8563->reg[vdc8563->index] = data;
vdc8563->videoram_start = CRTC6845_VIDEO_START;
vdc8563->changed = 1;
break;
case 0x12:
vdc8563->addr = (vdc8563->addr & 0x00ff) | (data << 8);
break;
case 0x13:
vdc8563->addr = (vdc8563->addr & 0xff00) | data;
break;
case 0x20:
vdc8563->src = (vdc8563->src & 0x00ff) | (data << 8);
break;
case 0x21:
vdc8563->src = (vdc8563->src & 0xff00) | data;
break;
case 0x14: case 0x15:
vdc8563->reg[vdc8563->index] = data;
vdc8563->colorram_start = (vdc8563->reg[0x14] << 8) | vdc8563->reg[0x15];
vdc8563->changed = 1;
break;
case 0x1c:
vdc8563->reg[vdc8563->index] = data;
vdc8563->fontram_start = FONT_START;
vdc8563->changed = 1;
break;
case 0x16: case 0x19: case 0x1a:
vdc8563->reg[vdc8563->index] = data;
vdc8563->changed = 1;
break;
case 0x1e:
vdc8563->reg[vdc8563->index] = data;
if (BLOCK_COPY)
{
DBG_LOG(2, "vdc block copy", ("src:%.4x dst:%.4x size:%.2x\n", vdc8563->src, vdc8563->addr, data));
i = data;
do {
vdc_videoram_w(device, vdc8563->addr++, vdc_videoram_r(device, vdc8563->src++));
} while (--i != 0);
}
else
{
DBG_LOG(2, "vdc block set", ("dest:%.4x value:%.2x size:%.2x\n", vdc8563->addr, FILLBYTE, data));
i = data;
do {
vdc_videoram_w(device, vdc8563->addr++, FILLBYTE);
} while (--i != 0);
}
break;
case 0x1f:
DBG_LOG(2, "vdc written", ("dest:%.4x size:%.2x\n", vdc8563->addr, data));
vdc8563->reg[vdc8563->index] = data;
vdc_videoram_w(device, vdc8563->addr++, data);
break;
default:
vdc8563->reg[vdc8563->index] = data;
DBG_LOG(2, "vdc8563_port_w", ("%.2x:%.2x\n", vdc8563->index, data));
break;
}
}
DBG_LOG(3, "vdc8563_port_w", ("%.2x:%.2x\n", vdc8563->index, data));
}
else
{
vdc8563->index = data;
}
}
READ8_DEVICE_HANDLER( vdc8563_port_r )
{
vdc8563_state *vdc8563 = get_safe_token(device);
int val;
val = 0xff;
if (offset & 1)
{
if ((vdc8563->index & 0x3f) < 37)
{
switch (vdc8563->index & 0x3f)
{
case 0x12:
val = vdc8563->addr >> 8;
break;
case 0x13:
val = vdc8563->addr & 0xff;
break;
case 0x1e:
val = 0;
break;
case 0x1f:
val = vdc_videoram_r(device, vdc8563->addr);
DBG_LOG(2, "vdc read", ("%.4x %.2x\n", vdc8563->addr, val));
break;
case 0x20:
val = vdc8563->src >> 8;
break;
case 0x21:
val = vdc8563->src & 0xff;
break;
default:
val = vdc8563->reg[vdc8563->index & 0x3f] & reg_mask[vdc8563->index & 0x3f].read;
}
}
DBG_LOG(2, "vdc8563_port_r", ("%.2x:%.2x\n", vdc8563->index, val));
}
else
{
val = vdc8563->index;
if (vdc8563->state)
val |= 0x80;
}
return val;
}
static int vdc8563_clocks_in_frame( device_t *device )
{
vdc8563_state *vdc8563 = get_safe_token(device);
int clocks = CRTC6845_COLUMNS * CRTC6845_LINES;
switch (CRTC6845_INTERLACE_MODE)
{
case CRTC6845_INTERLACE_SIGNAL: // interlace generation of video signals only
case CRTC6845_INTERLACE: // interlace
return clocks / 2;
default:
return clocks;
}
}
static void vdc8563_time( device_t *device )
{
vdc8563_state *vdc8563 = get_safe_token(device);
double newtime, ftime;
newtime = device->machine().time().as_double();
if (vdc8563_clocks_in_frame(device) == 0.0)
return;
ftime = 16 * vdc8563_clocks_in_frame(device) / 2000000.0;
if (CLOCK_HALFING)
ftime *= 2;
switch (CRTC6845_CURSOR_MODE)
{
case CRTC6845_CURSOR_OFF:
vdc8563->cursor_on = 0;
break;
case CRTC6845_CURSOR_32FRAMES:
ftime *= 2;
case CRTC6845_CURSOR_16FRAMES:
if (newtime - vdc8563->cursor_time > ftime)
{
vdc8563->cursor_time += ftime;
vdc8563->dirty[CRTC6845_CURSOR_POS & vdc8563->mask] = 1;
vdc8563->cursor_on ^= 1;
}
break;
default:
vdc8563->cursor_on = 1;
break;
}
}
static void vdc8563_monotext_screenrefresh( device_t *device, bitmap_ind16 &bitmap, int full_refresh )
{
vdc8563_state *vdc8563 = get_safe_token(device);
running_machine &machine = device->machine();
int x, y, i;
rectangle rect;
int w = CRTC6845_CHAR_COLUMNS;
int h = CRTC6845_CHAR_LINES;
int height = CRTC6845_CHAR_HEIGHT;
rect.setx(vdc8563->screen->visible_area().min_x, vdc8563->screen->visible_area().max_x);
if (full_refresh)
memset(vdc8563->dirty + vdc8563->videoram_start, 1, vdc8563->videoram_size);
for (y = 0, rect.min_y = height, rect.max_y = rect.min_y + height - 1, i = vdc8563->videoram_start & vdc8563->mask; y < h;
y++, rect.min_y += height, rect.max_y += height)
{
for (x = 0; x < w; x++, i = (i + 1) & vdc8563->mask)
{
if (vdc8563->dirty[i])
{
drawgfx_opaque(bitmap,rect,machine.gfx[0], vdc8563->ram[i], FRAMECOLOR | (MONOCOLOR << 4), 0, 0,
machine.gfx[0]->width() * x + 8, height * y + height);
if ((vdc8563->cursor_on) && (i == (CRTC6845_CURSOR_POS & vdc8563->mask)))
{
int k = height - CRTC6845_CURSOR_TOP;
if (CRTC6845_CURSOR_BOTTOM < height)
k = CRTC6845_CURSOR_BOTTOM - CRTC6845_CURSOR_TOP + 1;
if (k > 0)
bitmap.plot_box(machine.gfx[0]->width() * x + 8, height * y + height + CRTC6845_CURSOR_TOP, machine.gfx[0]->width(), k, FRAMECOLOR);
}
vdc8563->dirty[i] = 0;
}
}
i += LINEDIFF;
}
}
static void vdc8563_text_screenrefresh( device_t *device, bitmap_ind16 &bitmap, int full_refresh )
{
vdc8563_state *vdc8563 = get_safe_token(device);
running_machine &machine = device->machine();
int x, y, i, j;
rectangle rect;
int w = CRTC6845_CHAR_COLUMNS;
int h = CRTC6845_CHAR_LINES;
int height = CRTC6845_CHAR_HEIGHT;
rect.setx(vdc8563->screen->visible_area().min_x, vdc8563->screen->visible_area().max_x);
if (full_refresh)
memset(vdc8563->dirty + vdc8563->videoram_start, 1, vdc8563->videoram_size);
for (y = 0, rect.min_y = height, rect.max_y = rect.min_y + height - 1, i = vdc8563->videoram_start & vdc8563->mask,
j = vdc8563->colorram_start & vdc8563->mask; y < h; y++, rect.min_y += height, rect.max_y += height)
{
for (x = 0; x < w; x++, i = (i + 1) & vdc8563->mask, j = (j + 1) & vdc8563->mask)
{
if (vdc8563->dirty[i] || vdc8563->dirty[j])
{
{
UINT16 ch, fg, bg;
const UINT8 *charptr;
int v, h2;
UINT16 *pixel;
ch = vdc8563->ram[i] | ((vdc8563->ram[j] & 0x80) ? 0x100 : 0);
charptr = &vdc8563->ram[(vdc8563->fontram_start + (ch * 16)) & vdc8563->mask];
fg = ((vdc8563->ram[j] & 0x0f) >> 0) + 0x10;
bg = ((vdc8563->ram[j] & 0x70) >> 4) + 0x10;
for (v = 0; v < 16; v++)
{
for (h2 = 0; h2 < 8; h2++)
{
pixel = &bitmap.pix16((y * height) + height + v, (x * 8) + 8 + h2);
*pixel = (charptr[v] & (0x80 >> h2)) ? fg : bg;
}
}
}
if ((vdc8563->cursor_on) && (i == (CRTC6845_CURSOR_POS & vdc8563->mask)))
{
int k = height - CRTC6845_CURSOR_TOP;
if (CRTC6845_CURSOR_BOTTOM < height)
k = CRTC6845_CURSOR_BOTTOM - CRTC6845_CURSOR_TOP + 1;
if (k > 0)
bitmap.plot_box(machine.gfx[0]->width() * x + 8, height * y + height + CRTC6845_CURSOR_TOP, machine.gfx[0]->width(),
k, 0x10 | (vdc8563->ram[j] & 0x0f));
}
vdc8563->dirty[i] = 0;
vdc8563->dirty[j] = 0;
}
}
i += LINEDIFF;
j += LINEDIFF;
}
}
static void vdc8563_graphic_screenrefresh( device_t *device, bitmap_ind16 &bitmap, int full_refresh )
{
vdc8563_state *vdc8563 = get_safe_token(device);
running_machine &machine = device->machine();
int x, y, i, j, k;
rectangle rect;
int w = CRTC6845_CHAR_COLUMNS;
int h = CRTC6845_CHAR_LINES;
int height = CRTC6845_CHAR_HEIGHT;
rect.setx(vdc8563->screen->visible_area().min_x, vdc8563->screen->visible_area().max_x);
if (full_refresh)
memset(vdc8563->dirty, 1, vdc8563->mask + 1);
for (y = 0, rect.min_y = height, rect.max_y = rect.min_y + height - 1, i = vdc8563->videoram_start & vdc8563->mask; y < h;
y++, rect.min_y += height, rect.max_y += height)
{
for (x = 0; x < w; x++, i = (i + 1) & vdc8563->mask)
{
for (j = 0; j < height; j++)
{
k = ((i << 4) + j) & vdc8563->mask;
if (vdc8563->dirty[k])
{
drawgfx_opaque(bitmap, rect, machine.gfx[1], vdc8563->ram[k], FRAMECOLOR | (MONOCOLOR << 4), 0, 0,
machine.gfx[0]->width() * x + 8, height * y + height + j);
vdc8563->dirty[k] = 0;
}
}
}
i += LINEDIFF;
}
}
UINT32 vdc8563_video_update( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
vdc8563_state *vdc8563 = get_safe_token(device);
int i;
int full_refresh = 1;
if (!vdc8563->rastering)
return 0;
vdc8563_time(device);
full_refresh |= vdc8563->changed;
if (GRAPHIC)
{
vdc8563_graphic_screenrefresh(device, bitmap, full_refresh);
}
else
{
for (i = 0; i < 512; i++)
{
if (full_refresh || vdc8563->fontdirty[i])
{
device->machine().gfx[0]->mark_dirty(i);
vdc8563->fontdirty[i] = 0;
}
}
if (TEXT)
vdc8563_text_screenrefresh(device, bitmap, full_refresh);
else
vdc8563_monotext_screenrefresh(device, bitmap, full_refresh);
}
if (full_refresh)
{
int w = CRTC6845_CHAR_COLUMNS;
int h = CRTC6845_CHAR_LINES;
int height = CRTC6845_CHAR_HEIGHT;
bitmap.plot_box(0, 0, device->machine().gfx[0]->width() * (w + 2), height, FRAMECOLOR);
bitmap.plot_box(0, height, device->machine().gfx[0]->width(), height * h, FRAMECOLOR);
bitmap.plot_box(device->machine().gfx[0]->width() * (w + 1), height, device->machine().gfx[0]->width(), height * h, FRAMECOLOR);
bitmap.plot_box(0, height * (h + 1), device->machine().gfx[0]->width() * (w + 2), height, FRAMECOLOR);
}
vdc8563->changed = 0;
return 0;
}
/*****************************************************************************
DEVICE INTERFACE
*****************************************************************************/
static DEVICE_START( vdc8563 )
{
vdc8563_state *vdc8563 = get_safe_token(device);
const vdc8563_interface *intf = (vdc8563_interface *)device->static_config();
vdc8563->screen = device->machine().device<screen_device>(intf->screen);
vdc8563->ram = auto_alloc_array_clear(device->machine(), UINT8, 0x20000);
vdc8563->dirty = vdc8563->ram + 0x10000;
/* currently no driver uses 16k only */
if (intf->ram16konly)
{
vdc8563->mask = 0x3fff;
vdc8563->fontmask = 0x2000;
}
else
{
vdc8563->mask = 0xffff;
vdc8563->fontmask = 0xe000;
}
device->save_pointer(NAME(vdc8563->ram), 0x20000);
device->save_item(NAME(vdc8563->reg));
device->save_item(NAME(vdc8563->state));
device->save_item(NAME(vdc8563->index));
device->save_item(NAME(vdc8563->addr));
device->save_item(NAME(vdc8563->src));
device->save_item(NAME(vdc8563->videoram_start));
device->save_item(NAME(vdc8563->colorram_start));
device->save_item(NAME(vdc8563->fontram_start));
device->save_item(NAME(vdc8563->videoram_size));
device->save_item(NAME(vdc8563->rastering));
device->save_item(NAME(vdc8563->fontdirty));
device->save_item(NAME(vdc8563->cursor_time));
device->save_item(NAME(vdc8563->cursor_on));
device->save_item(NAME(vdc8563->changed));
}
static DEVICE_RESET( vdc8563 )
{
vdc8563_state *vdc8563 = get_safe_token(device);
memset(vdc8563->reg, 0, ARRAY_LENGTH(vdc8563->reg));
memset(vdc8563->fontdirty, 0, ARRAY_LENGTH(vdc8563->fontdirty));
vdc8563->cursor_time = 0.0;
vdc8563->state = 1;
vdc8563->index = 0;
vdc8563->addr = 0;
vdc8563->src = 0;
vdc8563->videoram_start = 0;
vdc8563->colorram_start = 0;
vdc8563->fontram_start = 0;
vdc8563->videoram_size = 0;
vdc8563->rastering = 1;
vdc8563->cursor_on = 0;
vdc8563->changed = 0;
}
const device_type VDC8563 = &device_creator<vdc8563_device>;
vdc8563_device::vdc8563_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VDC8563, "8563 / 8568 VDC", tag, owner, clock)
{
m_token = global_alloc_clear(vdc8563_state);
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
void vdc8563_device::device_config_complete()
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void vdc8563_device::device_start()
{
DEVICE_START_NAME( vdc8563 )(this);
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void vdc8563_device::device_reset()
{
DEVICE_RESET_NAME( vdc8563 )(this);
}

View File

@ -1,66 +0,0 @@
/*****************************************************************************
*
* video/vdc8563.h
*
* CBM Video Device Chip 8563
*
* peter.trauner@jk.uni-linz.ac.at, 2000
*
****************************************************************************/
#ifndef __VDC8563_H__
#define __VDC8563_H__
#include "devcb.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
struct vdc8563_interface
{
const char *screen;
int ram16konly;
};
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
class vdc8563_device : public device_t
{
public:
vdc8563_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~vdc8563_device() { global_free(m_token); }
// access to legacy token
void *token() const { assert(m_token != NULL); return m_token; }
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
private:
// internal state
void *m_token;
};
extern const device_type VDC8563;
#define MCFG_VDC8563_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, VDC8563, 0) \
MCFG_DEVICE_CONFIG(_interface)
/*----------- defined in video/vdc8563.c -----------*/
void vdc8563_set_rastering(device_t *device, int on);
UINT32 vdc8563_video_update(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE8_DEVICE_HANDLER( vdc8563_port_w );
DECLARE_READ8_DEVICE_HANDLER( vdc8563_port_r );
#endif /* __VDC8563_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,182 +0,0 @@
/*****************************************************************************
*
* video/vic6567.h
*
****************************************************************************/
#ifndef __VIC6567_H__
#define __VIC6567_H__
#include "devcb.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
enum vic2_type
{
VIC6567, // VIC II NTSC
VIC6569, // VIC II PAL
VIC8564, // VIC IIe NTSC
VIC8566 // VIC IIe PAL
};
struct vic2_interface
{
const char *screen;
const char *cpu;
vic2_type type;
devcb_read8 in_x_cb;
devcb_read8 in_y_cb;
devcb_read8 in_button_cb;
devcb_read8 in_dma_read_cb;
devcb_read8 in_dma_read_color_cb;
devcb_write_line out_irq_cb;
devcb_read8 in_rdy_cb;
};
/***************************************************************************
CONSTANTS
***************************************************************************/
#define VIC6566_CLOCK (XTAL_8MHz / 8) // 1000000
#define VIC6567R56A_CLOCK (XTAL_8MHz / 8) // 1000000
#define VIC6567_CLOCK (XTAL_14_31818MHz / 14) // 1022727
#define VIC6569_CLOCK (XTAL_17_734472MHz / 18) // 985248
#define VIC6566_DOTCLOCK (VIC6566_CLOCK * 8) // 8000000
#define VIC6567R56A_DOTCLOCK (VIC6567R56A_CLOCK * 8) // 8000000
#define VIC6567_DOTCLOCK (VIC6567_CLOCK * 8) // 8181818
#define VIC6569_DOTCLOCK (VIC6569_CLOCK * 8) // 7881988
#define VIC6567_CYCLESPERLINE 65
#define VIC6569_CYCLESPERLINE 63
#define VIC6567_LINES 263
#define VIC6569_LINES 312
#define VIC6566_VRETRACERATE ((float)VIC6566_CLOCK / 262 / 64)
#define VIC6567R56A_VRETRACERATE ((float)VIC6567R56A_CLOCK / 262 / 64)
#define VIC6567_VRETRACERATE ((float)VIC6567_CLOCK / 263 / 65)
#define VIC6569_VRETRACERATE ((float)VIC6569_CLOCK / 312 / 63)
#define VIC6566_HRETRACERATE (VIC6566_CLOCK / VIC6566_CYCLESPERLINE)
#define VIC6567_HRETRACERATE (VIC6567_CLOCK / VIC6567_CYCLESPERLINE)
#define VIC6569_HRETRACERATE (VIC6569_CLOCK / VIC6569_CYCLESPERLINE)
#define VIC2_HSIZE 320
#define VIC2_VSIZE 200
#define VIC6567_VISIBLELINES 235
#define VIC6569_VISIBLELINES 284
#define VIC6567_FIRST_DMA_LINE 0x30
#define VIC6569_FIRST_DMA_LINE 0x30
#define VIC6567_LAST_DMA_LINE 0xf7
#define VIC6569_LAST_DMA_LINE 0xf7
#define VIC6567_FIRST_DISP_LINE 0x29
#define VIC6569_FIRST_DISP_LINE 0x10
#define VIC6567_LAST_DISP_LINE (VIC6567_FIRST_DISP_LINE + VIC6567_VISIBLELINES - 1)
#define VIC6569_LAST_DISP_LINE (VIC6569_FIRST_DISP_LINE + VIC6569_VISIBLELINES - 1)
#define VIC6567_RASTER_2_EMU(a) ((a >= VIC6567_FIRST_DISP_LINE) ? (a - VIC6567_FIRST_DISP_LINE) : (a + 222))
#define VIC6569_RASTER_2_EMU(a) (a - VIC6569_FIRST_DISP_LINE)
#define VIC6567_FIRSTCOLUMN 50
#define VIC6569_FIRSTCOLUMN 50
#define VIC6567_VISIBLECOLUMNS 418
#define VIC6569_VISIBLECOLUMNS 403
#define VIC6567_X_2_EMU(a) (a)
#define VIC6569_X_2_EMU(a) (a)
#define VIC6567_STARTVISIBLELINES ((VIC6567_LINES - VIC6567_VISIBLELINES)/2)
#define VIC6569_STARTVISIBLELINES 16 /* ((VIC6569_LINES - VIC6569_VISIBLELINES)/2) */
#define VIC6567_FIRSTRASTERLINE 34
#define VIC6569_FIRSTRASTERLINE 0
#define VIC6567_COLUMNS 512
#define VIC6569_COLUMNS 504
#define VIC6567_STARTVISIBLECOLUMNS ((VIC6567_COLUMNS - VIC6567_VISIBLECOLUMNS)/2)
#define VIC6569_STARTVISIBLECOLUMNS ((VIC6569_COLUMNS - VIC6569_VISIBLECOLUMNS)/2)
#define VIC6567_FIRSTRASTERCOLUMNS 412
#define VIC6569_FIRSTRASTERCOLUMNS 404
#define VIC6569_FIRST_X 0x194
#define VIC6567_FIRST_X 0x19c
#define VIC6569_FIRST_VISIBLE_X 0x1e0
#define VIC6567_FIRST_VISIBLE_X 0x1e8
#define VIC6569_MAX_X 0x1f7
#define VIC6567_MAX_X 0x1ff
#define VIC6569_LAST_VISIBLE_X 0x17c
#define VIC6567_LAST_VISIBLE_X 0x184
#define VIC6569_LAST_X 0x193
#define VIC6567_LAST_X 0x19b
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
class vic2_device : public device_t
{
public:
vic2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~vic2_device() { global_free(m_token); }
// access to legacy token
void *token() const { assert(m_token != NULL); return m_token; }
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
private:
// internal state
void *m_token;
};
extern const device_type VIC2;
#define MCFG_VIC2_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, VIC2, 0) \
MCFG_DEVICE_CONFIG(_interface)
/*----------- defined in video/vic6567.c -----------*/
DECLARE_WRITE8_DEVICE_HANDLER ( vic2_port_w );
DECLARE_READ8_DEVICE_HANDLER ( vic2_port_r );
int vic2e_k0_r(device_t *device);
int vic2e_k1_r(device_t *device);
int vic2e_k2_r(device_t *device);
void vic2_raster_interrupt_gen( device_t *device );
UINT32 vic2_video_update( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect );
extern void vic2_set_rastering(device_t *device, int onoff);
extern void vic2_lightpen_write(device_t *device, int level);
#endif /* __VIC6567_H__ */