mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Renames CRTC6845 to M6845
This commit is contained in:
parent
e12664a5ae
commit
d3cc7e0dd4
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -897,10 +897,10 @@ src/emu/video.c svneol=native#text/plain
|
||||
src/emu/video.h svneol=native#text/plain
|
||||
src/emu/video/cdp1869.c svneol=native#text/plain
|
||||
src/emu/video/cdp1869.h svneol=native#text/plain
|
||||
src/emu/video/crtc6845.c svneol=native#text/plain
|
||||
src/emu/video/crtc6845.h svneol=native#text/plain
|
||||
src/emu/video/generic.c svneol=native#text/plain
|
||||
src/emu/video/generic.h svneol=native#text/plain
|
||||
src/emu/video/m6845.c svneol=native#text/plain
|
||||
src/emu/video/m6845.h svneol=native#text/plain
|
||||
src/emu/video/poly.c svneol=native#text/plain
|
||||
src/emu/video/poly.h svneol=native#text/plain
|
||||
src/emu/video/resnet.c svneol=native#text/plain
|
||||
|
@ -166,8 +166,8 @@ EMUMACHINEOBJS = \
|
||||
|
||||
EMUVIDEOOBJS = \
|
||||
$(EMUVIDEO)/cdp1869.o \
|
||||
$(EMUVIDEO)/crtc6845.o \
|
||||
$(EMUVIDEO)/generic.o \
|
||||
$(EMUVIDEO)/m6845.o \
|
||||
$(EMUVIDEO)/poly.o \
|
||||
$(EMUVIDEO)/resnet.o \
|
||||
$(EMUVIDEO)/s2636.o \
|
||||
|
@ -1,421 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Motorola 6845 CRT controller emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "crtc6845.h"
|
||||
|
||||
|
||||
#define LOG (0)
|
||||
|
||||
|
||||
struct _crtc6845_t
|
||||
{
|
||||
const crtc6845_interface *intf;
|
||||
|
||||
/* internal registers */
|
||||
UINT8 address_latch;
|
||||
UINT8 horiz_total;
|
||||
UINT8 horiz_disp;
|
||||
UINT8 horiz_sync_pos;
|
||||
UINT8 sync_width;
|
||||
UINT8 vert_total;
|
||||
UINT8 vert_total_adj;
|
||||
UINT8 vert_disp;
|
||||
UINT8 vert_sync_pos;
|
||||
UINT8 intl_skew;
|
||||
UINT8 max_ras_addr;
|
||||
UINT8 cursor_start_ras;
|
||||
UINT8 cursor_end_ras;
|
||||
UINT16 start_addr;
|
||||
UINT16 cursor;
|
||||
UINT16 light_pen;
|
||||
|
||||
emu_timer *display_enable_changed_timer;
|
||||
|
||||
/* saved screen parameters so we don't call
|
||||
video_screen_configure() unneccessarily.
|
||||
Do NOT state save these! */
|
||||
UINT16 last_horiz_total;
|
||||
UINT16 last_vert_total;
|
||||
UINT16 last_max_x;
|
||||
UINT16 last_max_y;
|
||||
UINT16 current_ma; /* the MA address currently drawn */
|
||||
int has_valid_parameters;
|
||||
};
|
||||
|
||||
|
||||
static void crtc6845_state_save_postload(void *param);
|
||||
static void configure_screen(crtc6845_t *crtc6845, int postload);
|
||||
static void update_timer(crtc6845_t *crtc6845);
|
||||
static TIMER_CALLBACK( display_enable_changed_timer_cb );
|
||||
|
||||
|
||||
crtc6845_t *crtc6845_config(const crtc6845_interface *intf)
|
||||
{
|
||||
crtc6845_t *crtc6845;
|
||||
|
||||
/* allocate the object that holds the state */
|
||||
crtc6845 = auto_malloc(sizeof(*crtc6845));
|
||||
memset(crtc6845, 0, sizeof(*crtc6845));
|
||||
|
||||
crtc6845->intf = intf;
|
||||
|
||||
/* create the timer if the user is interested in getting display enable
|
||||
notifications */
|
||||
if (intf && intf->display_enable_changed)
|
||||
crtc6845->display_enable_changed_timer = timer_alloc(display_enable_changed_timer_cb, crtc6845);
|
||||
|
||||
/* register for state saving */
|
||||
state_save_register_func_postload_ptr(crtc6845_state_save_postload, crtc6845);
|
||||
|
||||
state_save_register_item("crtc6845", 0, crtc6845->address_latch);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->horiz_total);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->horiz_disp);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->horiz_sync_pos);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->sync_width);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->vert_total);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->vert_total_adj);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->vert_disp);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->vert_sync_pos);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->intl_skew);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->max_ras_addr);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->cursor_start_ras);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->cursor_end_ras);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->start_addr);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->cursor);
|
||||
state_save_register_item("crtc6845", 0, crtc6845->light_pen);
|
||||
|
||||
return crtc6845;
|
||||
}
|
||||
|
||||
|
||||
static void crtc6845_state_save_postload(void *param)
|
||||
{
|
||||
crtc6845_t *crtc6845 = (crtc6845_t *)param;
|
||||
|
||||
configure_screen(crtc6845, TRUE);
|
||||
}
|
||||
|
||||
|
||||
void crtc6845_address_w(crtc6845_t *crtc6845, UINT8 data)
|
||||
{
|
||||
crtc6845->address_latch = data & 0x1f;
|
||||
}
|
||||
|
||||
|
||||
UINT8 crtc6845_register_r(crtc6845_t *crtc6845)
|
||||
{
|
||||
UINT8 ret = 0xff;
|
||||
|
||||
switch (crtc6845->address_latch)
|
||||
{
|
||||
case 14:
|
||||
ret = crtc6845->cursor >> 8;
|
||||
break;
|
||||
case 15:
|
||||
ret = crtc6845->cursor;
|
||||
break;
|
||||
case 16:
|
||||
ret = crtc6845->light_pen >> 8;
|
||||
break;
|
||||
case 17:
|
||||
ret = crtc6845->light_pen;
|
||||
break;
|
||||
default:
|
||||
/* all other registers are write only */
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void crtc6845_register_w(crtc6845_t *crtc6845, UINT8 data)
|
||||
{
|
||||
int call_configure_screen = FALSE;
|
||||
if (LOG) logerror("CRT #0 PC %04x: CRTC6845 reg 0x%02x = 0x%02x\n", activecpu_get_pc(), crtc6845->address_latch, data);
|
||||
|
||||
switch (crtc6845->address_latch)
|
||||
{
|
||||
case 0:
|
||||
crtc6845->horiz_total = data;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
crtc6845->horiz_disp = data;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
crtc6845->horiz_sync_pos = data;
|
||||
break;
|
||||
case 3:
|
||||
crtc6845->sync_width = data & 0x0f;
|
||||
break;
|
||||
case 4:
|
||||
crtc6845->vert_total = data & 0x7f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 5:
|
||||
crtc6845->vert_total_adj = data & 0x1f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 6:
|
||||
crtc6845->vert_disp = data & 0x7f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 7:
|
||||
crtc6845->vert_sync_pos = data & 0x7f;
|
||||
break;
|
||||
case 8:
|
||||
crtc6845->intl_skew = data & 0x03;
|
||||
break;
|
||||
case 9:
|
||||
crtc6845->max_ras_addr = data & 0x1f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 10:
|
||||
crtc6845->cursor_start_ras = data & 0x7f;
|
||||
break;
|
||||
case 11:
|
||||
crtc6845->cursor_end_ras = data & 0x1f;
|
||||
break;
|
||||
case 12:
|
||||
crtc6845->start_addr &= 0x00ff;
|
||||
crtc6845->start_addr |= (data & 0x3f) << 8;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 13:
|
||||
crtc6845->start_addr &= 0xff00;
|
||||
crtc6845->start_addr |= data;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 14:
|
||||
crtc6845->cursor &= 0x00ff;
|
||||
crtc6845->cursor |= (data & 0x3f) << 8;
|
||||
break;
|
||||
case 15:
|
||||
crtc6845->cursor &= 0xff00;
|
||||
crtc6845->cursor |= data;
|
||||
break;
|
||||
case 16: /* read-only */
|
||||
break;
|
||||
case 17: /* read-only */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (call_configure_screen)
|
||||
configure_screen(crtc6845, FALSE);
|
||||
}
|
||||
|
||||
|
||||
static void configure_screen(crtc6845_t *crtc6845, int postload)
|
||||
{
|
||||
if (crtc6845->intf)
|
||||
{
|
||||
/* compute the screen sizes */
|
||||
UINT16 horiz_total = (crtc6845->horiz_total + 1) * crtc6845->intf->hpixels_per_column;
|
||||
UINT16 vert_total = (crtc6845->vert_total + 1) * (crtc6845->max_ras_addr + 1) + crtc6845->vert_total_adj;
|
||||
|
||||
/* determine the visible area, avoid division by 0 */
|
||||
UINT16 max_x = crtc6845->horiz_disp * crtc6845->intf->hpixels_per_column - 1;
|
||||
UINT16 max_y = crtc6845->vert_disp * (crtc6845->max_ras_addr + 1) - 1;
|
||||
|
||||
/* update only if screen parameters changed, unless we are coming here after loading the saved state */
|
||||
if (postload ||
|
||||
(horiz_total != crtc6845->last_horiz_total) || (vert_total != crtc6845->last_vert_total) ||
|
||||
(max_x != crtc6845->last_max_x) || (max_y != crtc6845->last_max_y))
|
||||
{
|
||||
/* update the screen only if we have valid data */
|
||||
if ((crtc6845->horiz_total > 0) && (max_x < horiz_total) && (crtc6845->vert_total > 0) && (max_y < vert_total))
|
||||
{
|
||||
rectangle visarea;
|
||||
|
||||
attoseconds_t refresh = HZ_TO_ATTOSECONDS(crtc6845->intf->clock) * (crtc6845->horiz_total + 1) * vert_total;
|
||||
|
||||
visarea.min_x = 0;
|
||||
visarea.min_y = 0;
|
||||
visarea.max_x = max_x;
|
||||
visarea.max_y = max_y;
|
||||
|
||||
if (LOG) logerror("CRTC6845 config screen: HTOTAL: %x VTOTAL: %x MAX_X: %x MAX_Y: %x FPS: %f\n",
|
||||
horiz_total, vert_total, max_x, max_y, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
|
||||
|
||||
video_screen_configure(crtc6845->intf->scrnum, horiz_total, vert_total, &visarea, refresh);
|
||||
|
||||
crtc6845->has_valid_parameters = TRUE;
|
||||
}
|
||||
else
|
||||
crtc6845->has_valid_parameters = FALSE;
|
||||
|
||||
crtc6845->last_horiz_total = horiz_total;
|
||||
crtc6845->last_vert_total = vert_total;
|
||||
crtc6845->last_max_x = max_x;
|
||||
crtc6845->last_max_y = max_y;
|
||||
|
||||
update_timer(crtc6845);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int is_display_enabled(crtc6845_t *crtc6845)
|
||||
{
|
||||
UINT16 y = video_screen_get_vpos(crtc6845->intf->scrnum);
|
||||
UINT16 x = video_screen_get_hpos(crtc6845->intf->scrnum);
|
||||
|
||||
return (y <= crtc6845->last_max_y) && (x <= crtc6845->last_max_x);
|
||||
}
|
||||
|
||||
|
||||
static void update_timer(crtc6845_t *crtc6845)
|
||||
{
|
||||
INT16 next_y;
|
||||
UINT16 next_x;
|
||||
attotime duration;
|
||||
|
||||
if (crtc6845->has_valid_parameters && (crtc6845->display_enable_changed_timer != 0))
|
||||
{
|
||||
if (is_display_enabled(crtc6845))
|
||||
{
|
||||
/* we are in a display region,
|
||||
get the location of the next blanking start */
|
||||
|
||||
/* normally, it's at end the current raster line */
|
||||
next_y = video_screen_get_vpos(crtc6845->intf->scrnum);
|
||||
next_x = crtc6845->last_max_x + 1;
|
||||
|
||||
/* but if visible width = horiz_total, then we need
|
||||
to go to the beginning of VBLANK */
|
||||
if (next_x == crtc6845->last_horiz_total)
|
||||
{
|
||||
next_y = crtc6845->last_max_y + 1;
|
||||
next_x = 0;
|
||||
|
||||
/* abnormal case, no vertical blanking, either */
|
||||
if (next_y == crtc6845->last_vert_total)
|
||||
next_y = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we are in a blanking region,
|
||||
get the location of the next display start */
|
||||
next_x = 0;
|
||||
next_y = (video_screen_get_vpos(crtc6845->intf->scrnum) + 1) % crtc6845->last_vert_total;
|
||||
|
||||
/* if we would now fall in the vertical blanking, we need
|
||||
to go to the top of the screen */
|
||||
if (next_y > crtc6845->last_max_y)
|
||||
next_y = 0;
|
||||
}
|
||||
|
||||
if (next_y != -1)
|
||||
duration = video_screen_get_time_until_pos(crtc6845->intf->scrnum, next_y, next_x);
|
||||
else
|
||||
duration = attotime_never;
|
||||
|
||||
timer_adjust_oneshot(crtc6845->display_enable_changed_timer, duration, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( display_enable_changed_timer_cb )
|
||||
{
|
||||
crtc6845_t *crtc6845 = ptr;
|
||||
|
||||
/* call the callback function -- we know it exists */
|
||||
crtc6845->intf->display_enable_changed(is_display_enabled(crtc6845));
|
||||
|
||||
update_timer(crtc6845);
|
||||
}
|
||||
|
||||
|
||||
UINT16 crtc6845_get_ma(crtc6845_t *crtc6845)
|
||||
{
|
||||
UINT16 ret;
|
||||
|
||||
if (crtc6845->has_valid_parameters)
|
||||
{
|
||||
/* get the current raster positions and clamp them to the visible region */
|
||||
int y = video_screen_get_vpos(0);
|
||||
int x = video_screen_get_hpos(0);
|
||||
|
||||
/* since the MA counter stops in the blanking regions, if we are in a
|
||||
VBLANK, both X and Y are at their max */
|
||||
if ((y > crtc6845->last_max_y) || (x > crtc6845->last_max_x))
|
||||
x = crtc6845->last_max_x;
|
||||
|
||||
if (y > crtc6845->last_max_y)
|
||||
y = crtc6845->last_max_y;
|
||||
|
||||
ret = (crtc6845->start_addr +
|
||||
(y / (crtc6845->max_ras_addr + 1)) * crtc6845->horiz_disp +
|
||||
(x / crtc6845->intf->hpixels_per_column)) & 0x3fff;
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
UINT8 crtc6845_get_ra(crtc6845_t *crtc6845)
|
||||
{
|
||||
UINT8 ret;
|
||||
|
||||
if (crtc6845->has_valid_parameters)
|
||||
{
|
||||
/* get the current vertical raster position and clamp it to the visible region */
|
||||
int y = video_screen_get_vpos(0);
|
||||
|
||||
if (y > crtc6845->last_max_y)
|
||||
y = crtc6845->last_max_y;
|
||||
|
||||
ret = y % (crtc6845->max_ras_addr + 1);
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void crtc6845_update(crtc6845_t *crtc6845, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
if (crtc6845->has_valid_parameters)
|
||||
{
|
||||
UINT16 y;
|
||||
|
||||
/* call the set up function if any */
|
||||
void *param = 0;
|
||||
|
||||
if (crtc6845->intf->begin_update)
|
||||
param = crtc6845->intf->begin_update(bitmap, cliprect);
|
||||
|
||||
/* read the start address at the beginning of the frame */
|
||||
if (cliprect->min_y == 0)
|
||||
crtc6845->current_ma = crtc6845->start_addr;
|
||||
|
||||
/* for each row in the visible region */
|
||||
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
|
||||
{
|
||||
UINT8 ra = y % (crtc6845->max_ras_addr + 1);
|
||||
|
||||
/* call the external system to draw it */
|
||||
crtc6845->intf->update_row(bitmap, cliprect, crtc6845->current_ma, ra, y, crtc6845->horiz_disp, param);
|
||||
|
||||
/* update MA if the last raster address */
|
||||
if (ra == crtc6845->max_ras_addr)
|
||||
crtc6845->current_ma = (crtc6845->current_ma + crtc6845->horiz_disp) & 0x3fff;
|
||||
}
|
||||
|
||||
/* call the tear down function if any */
|
||||
if (crtc6845->intf->end_update)
|
||||
crtc6845->intf->end_update(bitmap, cliprect, param);
|
||||
}
|
||||
}
|
421
src/emu/video/m6845.c
Normal file
421
src/emu/video/m6845.c
Normal file
@ -0,0 +1,421 @@
|
||||
/**********************************************************************
|
||||
|
||||
Motorola 6845 CRT controller emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "m6845.h"
|
||||
|
||||
|
||||
#define LOG (0)
|
||||
|
||||
|
||||
struct _m6845_t
|
||||
{
|
||||
const m6845_interface *intf;
|
||||
|
||||
/* internal registers */
|
||||
UINT8 address_latch;
|
||||
UINT8 horiz_total;
|
||||
UINT8 horiz_disp;
|
||||
UINT8 horiz_sync_pos;
|
||||
UINT8 sync_width;
|
||||
UINT8 vert_total;
|
||||
UINT8 vert_total_adj;
|
||||
UINT8 vert_disp;
|
||||
UINT8 vert_sync_pos;
|
||||
UINT8 intl_skew;
|
||||
UINT8 max_ras_addr;
|
||||
UINT8 cursor_start_ras;
|
||||
UINT8 cursor_end_ras;
|
||||
UINT16 start_addr;
|
||||
UINT16 cursor;
|
||||
UINT16 light_pen;
|
||||
|
||||
emu_timer *display_enable_changed_timer;
|
||||
|
||||
/* saved screen parameters so we don't call
|
||||
video_screen_configure() unneccessarily.
|
||||
Do NOT state save these! */
|
||||
UINT16 last_horiz_total;
|
||||
UINT16 last_vert_total;
|
||||
UINT16 last_max_x;
|
||||
UINT16 last_max_y;
|
||||
UINT16 current_ma; /* the MA address currently drawn */
|
||||
int has_valid_parameters;
|
||||
};
|
||||
|
||||
|
||||
static void m6845_state_save_postload(void *param);
|
||||
static void configure_screen(m6845_t *m6845, int postload);
|
||||
static void update_timer(m6845_t *m6845);
|
||||
static TIMER_CALLBACK( display_enable_changed_timer_cb );
|
||||
|
||||
|
||||
m6845_t *m6845_config(const m6845_interface *intf)
|
||||
{
|
||||
m6845_t *m6845;
|
||||
|
||||
/* allocate the object that holds the state */
|
||||
m6845 = auto_malloc(sizeof(*m6845));
|
||||
memset(m6845, 0, sizeof(*m6845));
|
||||
|
||||
m6845->intf = intf;
|
||||
|
||||
/* create the timer if the user is interested in getting display enable
|
||||
notifications */
|
||||
if (intf && intf->display_enable_changed)
|
||||
m6845->display_enable_changed_timer = timer_alloc(display_enable_changed_timer_cb, m6845);
|
||||
|
||||
/* register for state saving */
|
||||
state_save_register_func_postload_ptr(m6845_state_save_postload, m6845);
|
||||
|
||||
state_save_register_item("m6845", 0, m6845->address_latch);
|
||||
state_save_register_item("m6845", 0, m6845->horiz_total);
|
||||
state_save_register_item("m6845", 0, m6845->horiz_disp);
|
||||
state_save_register_item("m6845", 0, m6845->horiz_sync_pos);
|
||||
state_save_register_item("m6845", 0, m6845->sync_width);
|
||||
state_save_register_item("m6845", 0, m6845->vert_total);
|
||||
state_save_register_item("m6845", 0, m6845->vert_total_adj);
|
||||
state_save_register_item("m6845", 0, m6845->vert_disp);
|
||||
state_save_register_item("m6845", 0, m6845->vert_sync_pos);
|
||||
state_save_register_item("m6845", 0, m6845->intl_skew);
|
||||
state_save_register_item("m6845", 0, m6845->max_ras_addr);
|
||||
state_save_register_item("m6845", 0, m6845->cursor_start_ras);
|
||||
state_save_register_item("m6845", 0, m6845->cursor_end_ras);
|
||||
state_save_register_item("m6845", 0, m6845->start_addr);
|
||||
state_save_register_item("m6845", 0, m6845->cursor);
|
||||
state_save_register_item("m6845", 0, m6845->light_pen);
|
||||
|
||||
return m6845;
|
||||
}
|
||||
|
||||
|
||||
static void m6845_state_save_postload(void *param)
|
||||
{
|
||||
m6845_t *m6845 = (m6845_t *)param;
|
||||
|
||||
configure_screen(m6845, TRUE);
|
||||
}
|
||||
|
||||
|
||||
void m6845_address_w(m6845_t *m6845, UINT8 data)
|
||||
{
|
||||
m6845->address_latch = data & 0x1f;
|
||||
}
|
||||
|
||||
|
||||
UINT8 m6845_register_r(m6845_t *m6845)
|
||||
{
|
||||
UINT8 ret = 0xff;
|
||||
|
||||
switch (m6845->address_latch)
|
||||
{
|
||||
case 14:
|
||||
ret = m6845->cursor >> 8;
|
||||
break;
|
||||
case 15:
|
||||
ret = m6845->cursor;
|
||||
break;
|
||||
case 16:
|
||||
ret = m6845->light_pen >> 8;
|
||||
break;
|
||||
case 17:
|
||||
ret = m6845->light_pen;
|
||||
break;
|
||||
default:
|
||||
/* all other registers are write only */
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void m6845_register_w(m6845_t *m6845, UINT8 data)
|
||||
{
|
||||
int call_configure_screen = FALSE;
|
||||
if (LOG) logerror("CRT #0 PC %04x: CRTC6845 reg 0x%02x = 0x%02x\n", activecpu_get_pc(), m6845->address_latch, data);
|
||||
|
||||
switch (m6845->address_latch)
|
||||
{
|
||||
case 0:
|
||||
m6845->horiz_total = data;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
m6845->horiz_disp = data;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
m6845->horiz_sync_pos = data;
|
||||
break;
|
||||
case 3:
|
||||
m6845->sync_width = data & 0x0f;
|
||||
break;
|
||||
case 4:
|
||||
m6845->vert_total = data & 0x7f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 5:
|
||||
m6845->vert_total_adj = data & 0x1f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 6:
|
||||
m6845->vert_disp = data & 0x7f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 7:
|
||||
m6845->vert_sync_pos = data & 0x7f;
|
||||
break;
|
||||
case 8:
|
||||
m6845->intl_skew = data & 0x03;
|
||||
break;
|
||||
case 9:
|
||||
m6845->max_ras_addr = data & 0x1f;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 10:
|
||||
m6845->cursor_start_ras = data & 0x7f;
|
||||
break;
|
||||
case 11:
|
||||
m6845->cursor_end_ras = data & 0x1f;
|
||||
break;
|
||||
case 12:
|
||||
m6845->start_addr &= 0x00ff;
|
||||
m6845->start_addr |= (data & 0x3f) << 8;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 13:
|
||||
m6845->start_addr &= 0xff00;
|
||||
m6845->start_addr |= data;
|
||||
call_configure_screen = TRUE;
|
||||
break;
|
||||
case 14:
|
||||
m6845->cursor &= 0x00ff;
|
||||
m6845->cursor |= (data & 0x3f) << 8;
|
||||
break;
|
||||
case 15:
|
||||
m6845->cursor &= 0xff00;
|
||||
m6845->cursor |= data;
|
||||
break;
|
||||
case 16: /* read-only */
|
||||
break;
|
||||
case 17: /* read-only */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (call_configure_screen)
|
||||
configure_screen(m6845, FALSE);
|
||||
}
|
||||
|
||||
|
||||
static void configure_screen(m6845_t *m6845, int postload)
|
||||
{
|
||||
if (m6845->intf)
|
||||
{
|
||||
/* compute the screen sizes */
|
||||
UINT16 horiz_total = (m6845->horiz_total + 1) * m6845->intf->hpixels_per_column;
|
||||
UINT16 vert_total = (m6845->vert_total + 1) * (m6845->max_ras_addr + 1) + m6845->vert_total_adj;
|
||||
|
||||
/* determine the visible area, avoid division by 0 */
|
||||
UINT16 max_x = m6845->horiz_disp * m6845->intf->hpixels_per_column - 1;
|
||||
UINT16 max_y = m6845->vert_disp * (m6845->max_ras_addr + 1) - 1;
|
||||
|
||||
/* update only if screen parameters changed, unless we are coming here after loading the saved state */
|
||||
if (postload ||
|
||||
(horiz_total != m6845->last_horiz_total) || (vert_total != m6845->last_vert_total) ||
|
||||
(max_x != m6845->last_max_x) || (max_y != m6845->last_max_y))
|
||||
{
|
||||
/* update the screen only if we have valid data */
|
||||
if ((m6845->horiz_total > 0) && (max_x < horiz_total) && (m6845->vert_total > 0) && (max_y < vert_total))
|
||||
{
|
||||
rectangle visarea;
|
||||
|
||||
attoseconds_t refresh = HZ_TO_ATTOSECONDS(m6845->intf->clock) * (m6845->horiz_total + 1) * vert_total;
|
||||
|
||||
visarea.min_x = 0;
|
||||
visarea.min_y = 0;
|
||||
visarea.max_x = max_x;
|
||||
visarea.max_y = max_y;
|
||||
|
||||
if (LOG) logerror("CRTC6845 config screen: HTOTAL: %x VTOTAL: %x MAX_X: %x MAX_Y: %x FPS: %f\n",
|
||||
horiz_total, vert_total, max_x, max_y, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
|
||||
|
||||
video_screen_configure(m6845->intf->scrnum, horiz_total, vert_total, &visarea, refresh);
|
||||
|
||||
m6845->has_valid_parameters = TRUE;
|
||||
}
|
||||
else
|
||||
m6845->has_valid_parameters = FALSE;
|
||||
|
||||
m6845->last_horiz_total = horiz_total;
|
||||
m6845->last_vert_total = vert_total;
|
||||
m6845->last_max_x = max_x;
|
||||
m6845->last_max_y = max_y;
|
||||
|
||||
update_timer(m6845);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int is_display_enabled(m6845_t *m6845)
|
||||
{
|
||||
UINT16 y = video_screen_get_vpos(m6845->intf->scrnum);
|
||||
UINT16 x = video_screen_get_hpos(m6845->intf->scrnum);
|
||||
|
||||
return (y <= m6845->last_max_y) && (x <= m6845->last_max_x);
|
||||
}
|
||||
|
||||
|
||||
static void update_timer(m6845_t *m6845)
|
||||
{
|
||||
INT16 next_y;
|
||||
UINT16 next_x;
|
||||
attotime duration;
|
||||
|
||||
if (m6845->has_valid_parameters && (m6845->display_enable_changed_timer != 0))
|
||||
{
|
||||
if (is_display_enabled(m6845))
|
||||
{
|
||||
/* we are in a display region,
|
||||
get the location of the next blanking start */
|
||||
|
||||
/* normally, it's at end the current raster line */
|
||||
next_y = video_screen_get_vpos(m6845->intf->scrnum);
|
||||
next_x = m6845->last_max_x + 1;
|
||||
|
||||
/* but if visible width = horiz_total, then we need
|
||||
to go to the beginning of VBLANK */
|
||||
if (next_x == m6845->last_horiz_total)
|
||||
{
|
||||
next_y = m6845->last_max_y + 1;
|
||||
next_x = 0;
|
||||
|
||||
/* abnormal case, no vertical blanking, either */
|
||||
if (next_y == m6845->last_vert_total)
|
||||
next_y = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* we are in a blanking region,
|
||||
get the location of the next display start */
|
||||
next_x = 0;
|
||||
next_y = (video_screen_get_vpos(m6845->intf->scrnum) + 1) % m6845->last_vert_total;
|
||||
|
||||
/* if we would now fall in the vertical blanking, we need
|
||||
to go to the top of the screen */
|
||||
if (next_y > m6845->last_max_y)
|
||||
next_y = 0;
|
||||
}
|
||||
|
||||
if (next_y != -1)
|
||||
duration = video_screen_get_time_until_pos(m6845->intf->scrnum, next_y, next_x);
|
||||
else
|
||||
duration = attotime_never;
|
||||
|
||||
timer_adjust_oneshot(m6845->display_enable_changed_timer, duration, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static TIMER_CALLBACK( display_enable_changed_timer_cb )
|
||||
{
|
||||
m6845_t *m6845 = ptr;
|
||||
|
||||
/* call the callback function -- we know it exists */
|
||||
m6845->intf->display_enable_changed(is_display_enabled(m6845));
|
||||
|
||||
update_timer(m6845);
|
||||
}
|
||||
|
||||
|
||||
UINT16 m6845_get_ma(m6845_t *m6845)
|
||||
{
|
||||
UINT16 ret;
|
||||
|
||||
if (m6845->has_valid_parameters)
|
||||
{
|
||||
/* get the current raster positions and clamp them to the visible region */
|
||||
int y = video_screen_get_vpos(0);
|
||||
int x = video_screen_get_hpos(0);
|
||||
|
||||
/* since the MA counter stops in the blanking regions, if we are in a
|
||||
VBLANK, both X and Y are at their max */
|
||||
if ((y > m6845->last_max_y) || (x > m6845->last_max_x))
|
||||
x = m6845->last_max_x;
|
||||
|
||||
if (y > m6845->last_max_y)
|
||||
y = m6845->last_max_y;
|
||||
|
||||
ret = (m6845->start_addr +
|
||||
(y / (m6845->max_ras_addr + 1)) * m6845->horiz_disp +
|
||||
(x / m6845->intf->hpixels_per_column)) & 0x3fff;
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
UINT8 m6845_get_ra(m6845_t *m6845)
|
||||
{
|
||||
UINT8 ret;
|
||||
|
||||
if (m6845->has_valid_parameters)
|
||||
{
|
||||
/* get the current vertical raster position and clamp it to the visible region */
|
||||
int y = video_screen_get_vpos(0);
|
||||
|
||||
if (y > m6845->last_max_y)
|
||||
y = m6845->last_max_y;
|
||||
|
||||
ret = y % (m6845->max_ras_addr + 1);
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void m6845_update(m6845_t *m6845, mame_bitmap *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
if (m6845->has_valid_parameters)
|
||||
{
|
||||
UINT16 y;
|
||||
|
||||
/* call the set up function if any */
|
||||
void *param = 0;
|
||||
|
||||
if (m6845->intf->begin_update)
|
||||
param = m6845->intf->begin_update(bitmap, cliprect);
|
||||
|
||||
/* read the start address at the beginning of the frame */
|
||||
if (cliprect->min_y == 0)
|
||||
m6845->current_ma = m6845->start_addr;
|
||||
|
||||
/* for each row in the visible region */
|
||||
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
|
||||
{
|
||||
UINT8 ra = y % (m6845->max_ras_addr + 1);
|
||||
|
||||
/* call the external system to draw it */
|
||||
m6845->intf->update_row(bitmap, cliprect, m6845->current_ma, ra, y, m6845->horiz_disp, param);
|
||||
|
||||
/* update MA if the last raster address */
|
||||
if (ra == m6845->max_ras_addr)
|
||||
m6845->current_ma = (m6845->current_ma + m6845->horiz_disp) & 0x3fff;
|
||||
}
|
||||
|
||||
/* call the tear down function if any */
|
||||
if (m6845->intf->end_update)
|
||||
m6845->intf->end_update(bitmap, cliprect, param);
|
||||
}
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
/**********************************************************************
|
||||
|
||||
Motorola 6845 CRT controller emulation
|
||||
Motorola M6845 CRT controller emulation
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef CRTC6845
|
||||
#define CRTC6845
|
||||
#ifndef M6845
|
||||
#define M6845
|
||||
|
||||
|
||||
typedef struct _crtc6845_t crtc6845_t;
|
||||
typedef struct _crtc6845_interface crtc6845_interface;
|
||||
typedef struct _m6845_t m6845_t;
|
||||
typedef struct _m6845_interface m6845_interface;
|
||||
|
||||
struct _crtc6845_interface
|
||||
struct _m6845_interface
|
||||
{
|
||||
int scrnum; /* screen we are acting on */
|
||||
int clock; /* the clock (pin 21) of the chip */
|
||||
@ -35,28 +35,28 @@ struct _crtc6845_interface
|
||||
};
|
||||
|
||||
|
||||
/* use crtc6845_init to set up for save states.
|
||||
/* use m6845_init to set up for save states.
|
||||
if intf is NULL, the emulator will NOT call video_configure_screen() */
|
||||
crtc6845_t *crtc6845_config(const crtc6845_interface *intf);
|
||||
m6845_t *m6845_config(const m6845_interface *intf);
|
||||
|
||||
/* selects one of the registers for reading or writing */
|
||||
void crtc6845_address_w(crtc6845_t *crtc6845, UINT8 data);
|
||||
void m6845_address_w(m6845_t *m6845, UINT8 data);
|
||||
|
||||
/* reads the currently selected register */
|
||||
UINT8 crtc6845_register_r(crtc6845_t *crtc6845);
|
||||
UINT8 m6845_register_r(m6845_t *m6845);
|
||||
|
||||
/* writes the currently selected register */
|
||||
void crtc6845_register_w(crtc6845_t *crtc6845, UINT8 data);
|
||||
void m6845_register_w(m6845_t *m6845, UINT8 data);
|
||||
|
||||
/* return the current value on the MA0-MA13 pins */
|
||||
UINT16 crtc6845_get_ma(crtc6845_t *crtc6845);
|
||||
UINT16 m6845_get_ma(m6845_t *m6845);
|
||||
|
||||
/* return the current value on the RA0-RA4 pins */
|
||||
UINT8 crtc6845_get_ra(crtc6845_t *crtc6845);
|
||||
UINT8 m6845_get_ra(m6845_t *m6845);
|
||||
|
||||
/* updates the screen -- this will call begin_update(),
|
||||
followed by update_row() reapeatedly and after all row
|
||||
updating is complete, end_update() */
|
||||
void crtc6845_update(crtc6845_t *crtc6845, mame_bitmap *bitmap, const rectangle *cliprect);
|
||||
void m6845_update(m6845_t *m6845, mame_bitmap *bitmap, const rectangle *cliprect);
|
||||
|
||||
#endif
|
@ -44,21 +44,21 @@ Emulation Notes:
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
static UINT8* carrera_tileram;
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
|
||||
|
||||
|
||||
static WRITE8_HANDLER( carrera_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( carrera_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( carrera_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( carrera_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -71,8 +71,8 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x4fff) AM_WRITE(MWA8_ROM)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(MWA8_RAM)
|
||||
AM_RANGE(0xe800, 0xe800) AM_WRITE(carrera_crtc6845_address_w)
|
||||
AM_RANGE(0xe801, 0xe801) AM_WRITE(carrera_crtc6845_register_w)
|
||||
AM_RANGE(0xe800, 0xe800) AM_WRITE(carrera_m6845_address_w)
|
||||
AM_RANGE(0xe801, 0xe801) AM_WRITE(carrera_m6845_register_w)
|
||||
AM_RANGE(0xf000, 0xffff) AM_WRITE(MWA8_RAM) AM_BASE(&carrera_tileram)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -259,7 +259,7 @@ GFXDECODE_END
|
||||
|
||||
static VIDEO_START(carrera)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
}
|
||||
|
||||
static VIDEO_UPDATE(carrera)
|
||||
|
@ -24,12 +24,12 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
|
||||
static UINT8 *attr_ram1, *attr_ram2;
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
|
||||
static UINT8 question_adr[4];
|
||||
@ -116,14 +116,14 @@ static WRITE8_HANDLER( question_w )
|
||||
question_adr[offset] = data;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( coinmstr_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( coinmstr_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( coinmstr_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( coinmstr_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
// Common memory map
|
||||
@ -149,8 +149,8 @@ static ADDRESS_MAP_START( quizmstr_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
AM_RANGE(0x50, 0x53) AM_READNOP
|
||||
AM_RANGE(0x50, 0x53) AM_WRITENOP
|
||||
AM_RANGE(0x58, 0x5b) AM_READWRITE(pia_2_r, pia_2_w)
|
||||
AM_RANGE(0x70, 0x70) AM_WRITE(coinmstr_crtc6845_address_w)
|
||||
AM_RANGE(0x71, 0x71) AM_WRITE(coinmstr_crtc6845_register_w)
|
||||
AM_RANGE(0x70, 0x70) AM_WRITE(coinmstr_m6845_address_w)
|
||||
AM_RANGE(0x71, 0x71) AM_WRITE(coinmstr_m6845_register_w)
|
||||
AM_RANGE(0xc0, 0xc3) AM_READNOP
|
||||
AM_RANGE(0xc0, 0xc3) AM_WRITENOP
|
||||
ADDRESS_MAP_END
|
||||
@ -159,8 +159,8 @@ static ADDRESS_MAP_START( trailblz_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
|
||||
AM_RANGE(0x00, 0x00) AM_READ(question_r)
|
||||
AM_RANGE(0x00, 0x03) AM_WRITE(question_w)
|
||||
AM_RANGE(0x40, 0x40) AM_WRITE(coinmstr_crtc6845_address_w)
|
||||
AM_RANGE(0x41, 0x41) AM_WRITE(coinmstr_crtc6845_register_w)
|
||||
AM_RANGE(0x40, 0x40) AM_WRITE(coinmstr_m6845_address_w)
|
||||
AM_RANGE(0x41, 0x41) AM_WRITE(coinmstr_m6845_register_w)
|
||||
AM_RANGE(0x48, 0x48) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0x49, 0x49) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w)
|
||||
AM_RANGE(0x50, 0x53) AM_READWRITE(pia_0_r, pia_0_w) //?
|
||||
@ -176,8 +176,8 @@ static ADDRESS_MAP_START( supnudg2_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
AM_RANGE(0x40, 0x41) AM_READNOP
|
||||
AM_RANGE(0x40, 0x43) AM_WRITENOP
|
||||
AM_RANGE(0x43, 0x43) AM_READNOP
|
||||
AM_RANGE(0x48, 0x48) AM_WRITE(coinmstr_crtc6845_address_w)
|
||||
AM_RANGE(0x49, 0x49) AM_WRITE(coinmstr_crtc6845_register_w)
|
||||
AM_RANGE(0x48, 0x48) AM_WRITE(coinmstr_m6845_address_w)
|
||||
AM_RANGE(0x49, 0x49) AM_WRITE(coinmstr_m6845_register_w)
|
||||
AM_RANGE(0x50, 0x51) AM_READNOP
|
||||
AM_RANGE(0x50, 0x53) AM_WRITENOP
|
||||
AM_RANGE(0x53, 0x53) AM_READNOP
|
||||
@ -544,7 +544,7 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
|
||||
static VIDEO_START( coinmstr )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows, 8, 8, 46, 64);
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,10 @@ Provided to you by Thierry (ShinobiZ) & Gerald (COY)
|
||||
#include "driver.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
static tilemap *bg_tilemap;
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 *vram_lo,*vram_hi;
|
||||
static UINT8 *backup_ram;
|
||||
|
||||
@ -54,14 +54,14 @@ x-x- ---- ---- ---- extra tile number.
|
||||
---- ---- xxxx xxxx tile number
|
||||
*/
|
||||
|
||||
static WRITE8_HANDLER( couple_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( couple_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( couple_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( couple_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_tile_info )
|
||||
@ -76,7 +76,7 @@ static TILE_GET_INFO( get_tile_info )
|
||||
|
||||
static VIDEO_START( couple )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,8,8,64,32);
|
||||
}
|
||||
|
||||
@ -158,8 +158,8 @@ static ADDRESS_MAP_START( merit_mem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
// AM_RANGE( 0xc000, 0xc00f ) AM_READ(dummy_inputs_r)
|
||||
// AM_RANGE( 0xc008, 0xc008 ) AM_READ(input_port_0_r)
|
||||
// AM_RANGE( 0xc00a, 0xc00a ) AM_READ(input_port_1_r)
|
||||
AM_RANGE( 0xe000, 0xe000 ) AM_WRITE(couple_crtc6845_address_w)
|
||||
AM_RANGE( 0xe001, 0xe001 ) AM_WRITE(couple_crtc6845_register_w)
|
||||
AM_RANGE( 0xe000, 0xe000 ) AM_WRITE(couple_m6845_address_w)
|
||||
AM_RANGE( 0xe001, 0xe001 ) AM_WRITE(couple_m6845_register_w)
|
||||
AM_RANGE( 0xe800, 0xefff ) AM_READWRITE(MRA8_RAM, couple_vram_hi_w) AM_BASE(&vram_hi)
|
||||
AM_RANGE( 0xf000, 0xf7ff ) AM_READWRITE(MRA8_RAM, couple_vram_lo_w) AM_BASE(&vram_lo)
|
||||
AM_RANGE( 0xf800, 0xfbff ) AM_RAM /*extra VRAM?*/
|
||||
|
@ -808,9 +808,9 @@
|
||||
/* from video */
|
||||
WRITE8_HANDLER( funworld_videoram_w );
|
||||
WRITE8_HANDLER( funworld_colorram_w );
|
||||
WRITE8_HANDLER( funworld_crtc6845_address_w );
|
||||
READ8_HANDLER( funworld_crtc6845_register_r );
|
||||
WRITE8_HANDLER( funworld_crtc6845_register_w );
|
||||
WRITE8_HANDLER( funworld_m6845_address_w );
|
||||
READ8_HANDLER( funworld_m6845_register_r );
|
||||
WRITE8_HANDLER( funworld_m6845_register_w );
|
||||
PALETTE_INIT( funworld );
|
||||
VIDEO_START( funworld );
|
||||
VIDEO_START( magiccrd );
|
||||
@ -853,8 +853,8 @@ static ADDRESS_MAP_START( funworld_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w)
|
||||
AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_crtc6845_address_w)
|
||||
AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_crtc6845_register_r, funworld_crtc6845_register_w)
|
||||
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_m6845_address_w)
|
||||
AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_m6845_register_r, funworld_m6845_register_w)
|
||||
AM_RANGE(0x2000, 0x2fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x3000, 0x3fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x4000, 0x4000) AM_READNOP
|
||||
@ -868,8 +868,8 @@ static ADDRESS_MAP_START( magiccrd_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w)
|
||||
AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_crtc6845_address_w)
|
||||
AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_crtc6845_register_r, funworld_crtc6845_register_w)
|
||||
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_m6845_address_w)
|
||||
AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_m6845_register_r, funworld_m6845_register_w)
|
||||
AM_RANGE(0x3600, 0x36ff) AM_RAM // some games use $3603-05 range for protection.
|
||||
AM_RANGE(0x4000, 0x4fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x5000, 0x5fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram)
|
||||
@ -882,8 +882,8 @@ static ADDRESS_MAP_START( cuoreuno_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w)
|
||||
AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_crtc6845_address_w)
|
||||
AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_crtc6845_register_r, funworld_crtc6845_register_w)
|
||||
AM_RANGE(0x0e00, 0x0e00) AM_WRITE(funworld_m6845_address_w)
|
||||
AM_RANGE(0x0e01, 0x0e01) AM_READWRITE(funworld_m6845_register_r, funworld_m6845_register_w)
|
||||
AM_RANGE(0x2000, 0x2000) AM_READNOP // some unknown reads
|
||||
AM_RANGE(0x3e00, 0x3fff) AM_RAM // some games use $3e03-05 range for protection.
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram)
|
||||
@ -897,8 +897,8 @@ static ADDRESS_MAP_START( royalmcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2a00, 0x2a03) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x2c00, 0x2c00) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w)
|
||||
AM_RANGE(0x2c01, 0x2c01) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0x2e00, 0x2e00) AM_WRITE(funworld_crtc6845_address_w)
|
||||
AM_RANGE(0x2e01, 0x2e01) AM_READWRITE(funworld_crtc6845_register_r, funworld_crtc6845_register_w)
|
||||
AM_RANGE(0x2e00, 0x2e00) AM_WRITE(funworld_m6845_address_w)
|
||||
AM_RANGE(0x2e01, 0x2e01) AM_READWRITE(funworld_m6845_register_r, funworld_m6845_register_w)
|
||||
AM_RANGE(0x4000, 0x4fff) AM_RAM AM_WRITE(funworld_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x5000, 0x5fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x6000, 0xffff) AM_ROM
|
||||
|
@ -241,9 +241,9 @@
|
||||
/* from video */
|
||||
WRITE8_HANDLER( gdrawpkr_videoram_w );
|
||||
WRITE8_HANDLER( gdrawpkr_colorram_w );
|
||||
WRITE8_HANDLER( gdrawpkr_crtc6845_address_w );
|
||||
READ8_HANDLER( gdrawpkr_crtc6845_register_r );
|
||||
WRITE8_HANDLER( gdrawpkr_crtc6845_register_w );
|
||||
WRITE8_HANDLER( gdrawpkr_m6845_address_w );
|
||||
READ8_HANDLER( gdrawpkr_m6845_register_r );
|
||||
WRITE8_HANDLER( gdrawpkr_m6845_register_w );
|
||||
PALETTE_INIT( gdrawpkr );
|
||||
VIDEO_START( gdrawpkr );
|
||||
VIDEO_UPDATE( gdrawpkr );
|
||||
@ -257,8 +257,8 @@ static ADDRESS_MAP_START( gdrawpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
|
||||
AM_RANGE(0x0840, 0x0840) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0x0841, 0x0841) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0x0880, 0x0880) AM_WRITE(gdrawpkr_crtc6845_address_w)
|
||||
AM_RANGE(0x0881, 0x0881) AM_READWRITE(gdrawpkr_crtc6845_register_r, gdrawpkr_crtc6845_register_w)
|
||||
AM_RANGE(0x0880, 0x0880) AM_WRITE(gdrawpkr_m6845_address_w)
|
||||
AM_RANGE(0x0881, 0x0881) AM_READWRITE(gdrawpkr_m6845_register_r, gdrawpkr_m6845_register_w)
|
||||
AM_RANGE(0x08c4, 0x08c7) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x08c8, 0x08cb) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(gdrawpkr_videoram_w) AM_BASE(&videoram)
|
||||
@ -270,8 +270,8 @@ static ADDRESS_MAP_START( elgrande_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
|
||||
AM_RANGE(0x0840, 0x0840) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0x0841, 0x0841) AM_WRITE(AY8910_write_port_0_w)
|
||||
AM_RANGE(0x0880, 0x0880) AM_WRITE(gdrawpkr_crtc6845_address_w)
|
||||
AM_RANGE(0x0881, 0x0881) AM_READWRITE(gdrawpkr_crtc6845_register_r, gdrawpkr_crtc6845_register_w)
|
||||
AM_RANGE(0x0880, 0x0880) AM_WRITE(gdrawpkr_m6845_address_w)
|
||||
AM_RANGE(0x0881, 0x0881) AM_READWRITE(gdrawpkr_m6845_register_r, gdrawpkr_m6845_register_w)
|
||||
AM_RANGE(0x08c4, 0x08c7) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x08c8, 0x08cb) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(gdrawpkr_videoram_w) AM_BASE(&videoram)
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
#define MAIN_CLOCK 10595000
|
||||
@ -30,7 +30,7 @@ static UINT8 madalien_headlight_pos;
|
||||
static UINT8 madalien_shift_count;
|
||||
static UINT8 madalien_shift_data;
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
|
||||
static tilemap* tilemap_fg;
|
||||
|
||||
@ -87,19 +87,19 @@ static PALETTE_INIT( madalien )
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( madalien_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( madalien_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( madalien_crtc6845_register_r )
|
||||
static READ8_HANDLER( madalien_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( madalien_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( madalien_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ static VIDEO_START( madalien )
|
||||
{
|
||||
rectangle rect = { 0, 127, 0, 127 };
|
||||
|
||||
static const crtc6845_interface crtc6845_intf =
|
||||
static const m6845_interface m6845_intf =
|
||||
{
|
||||
0, /* screen we are acting on */
|
||||
PIXEL_CLOCK / 8, /* the clock of the chip */
|
||||
@ -190,7 +190,7 @@ static VIDEO_START( madalien )
|
||||
NULL /* call back for display state changes */
|
||||
};
|
||||
|
||||
crtc6845 = crtc6845_config(&crtc6845_intf);
|
||||
m6845 = m6845_config(&m6845_intf);
|
||||
|
||||
tilemap_fg = tilemap_create(get_tile_info_FG,
|
||||
tilemap_scan_cols_flip_x, 8, 8, 32, 32);
|
||||
@ -515,8 +515,8 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x6400, 0x67ff) AM_RAM
|
||||
AM_RANGE(0x6800, 0x7fff) AM_RAM AM_BASE(&madalien_charram)
|
||||
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0ff0) AM_WRITE(madalien_crtc6845_address_w)
|
||||
AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x0ff0) AM_READWRITE(madalien_crtc6845_register_r, madalien_crtc6845_register_w)
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0ff0) AM_WRITE(madalien_m6845_address_w)
|
||||
AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x0ff0) AM_READWRITE(madalien_m6845_register_r, madalien_m6845_register_w)
|
||||
AM_RANGE(0x8004, 0x8004) AM_MIRROR(0x0ff0) AM_WRITE(madalien_screen_control_w)
|
||||
AM_RANGE(0x8005, 0x8005) AM_MIRROR(0x0ff0) AM_WRITE(madalien_output_w)
|
||||
AM_RANGE(0x8006, 0x8006) AM_MIRROR(0x0ff0) AM_READWRITE(soundlatch2_r, madalien_sound_command_w)
|
||||
|
@ -314,14 +314,14 @@
|
||||
#define MASTER_CLOCK 10000000 /* 10MHz */
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
|
||||
/*************************
|
||||
* Video Hardware *
|
||||
*************************/
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
|
||||
static WRITE8_HANDLER( magicfly_videoram_w )
|
||||
@ -336,19 +336,19 @@ static WRITE8_HANDLER( magicfly_colorram_w )
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( magicfly_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( magicfly_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( magicfly_crtc6845_register_r )
|
||||
static READ8_HANDLER( magicfly_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( magicfly_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( magicfly_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_magicfly_tile_info )
|
||||
@ -379,7 +379,7 @@ static TILE_GET_INFO( get_magicfly_tile_info )
|
||||
|
||||
static VIDEO_START(magicfly)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_magicfly_tile_info, tilemap_scan_rows, 8, 8, 32, 29);
|
||||
}
|
||||
|
||||
@ -470,8 +470,8 @@ static WRITE8_HANDLER( mux_w )
|
||||
|
||||
static ADDRESS_MAP_START( magicfly_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* MK48Z02B NVRAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(magicfly_crtc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(magicfly_crtc6845_register_r, magicfly_crtc6845_register_w)
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(magicfly_m6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(magicfly_m6845_register_r, magicfly_m6845_register_w)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(magicfly_videoram_w) AM_BASE(&videoram) /* HM6116LP #1 (2K x 8) RAM (only 1st half used) */
|
||||
AM_RANGE(0x1800, 0x1bff) AM_RAM AM_WRITE(magicfly_colorram_w) AM_BASE(&colorram) /* HM6116LP #2 (2K x 8) RAM (only 1st half used) */
|
||||
AM_RANGE(0x2800, 0x2800) AM_READ(mux_port_r) /* multiplexed input port */
|
||||
|
@ -124,14 +124,14 @@
|
||||
#define MASTER_CLOCK 10000000 /* 10MHz */
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
|
||||
/*************************
|
||||
* Video Hardware *
|
||||
*************************/
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
|
||||
static WRITE8_HANDLER( miniboy7_videoram_w )
|
||||
@ -146,19 +146,19 @@ static WRITE8_HANDLER( miniboy7_colorram_w )
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( miniboy7_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( miniboy7_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( miniboy7_crtc6845_register_r )
|
||||
static READ8_HANDLER( miniboy7_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( miniboy7_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( miniboy7_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
@ -182,7 +182,7 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
|
||||
static VIDEO_START( miniboy7 )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 37, 37);
|
||||
}
|
||||
|
||||
@ -203,8 +203,8 @@ static ADDRESS_MAP_START( miniboy7_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x1000, 0x17ff) AM_RAM AM_WRITE(miniboy7_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x1800, 0x25ff) AM_RAM /* looks like videoram */
|
||||
AM_RANGE(0x2600, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x2800, 0x2800) AM_WRITE(miniboy7_crtc6845_address_w)
|
||||
AM_RANGE(0x2801, 0x2801) AM_READWRITE(miniboy7_crtc6845_register_r, miniboy7_crtc6845_register_w)
|
||||
AM_RANGE(0x2800, 0x2800) AM_WRITE(miniboy7_m6845_address_w)
|
||||
AM_RANGE(0x2801, 0x2801) AM_READWRITE(miniboy7_m6845_register_r, miniboy7_m6845_register_w)
|
||||
// AM_RANGE(0x3000, 0x3001) ????? R/W
|
||||
// AM_RANGE(0x3080, 0x3083) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
// AM_RANGE(0x3800, 0x3800) ????? R
|
||||
|
@ -179,7 +179,7 @@ TODO: - Confirm that MC6850 emulation is sufficient.
|
||||
#include "machine/6850acia.h"
|
||||
#include "sound/saa1099.h"
|
||||
//Deal 'Em
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
#define MPU4VIDVERBOSE 1
|
||||
@ -191,7 +191,7 @@ TODO: - Confirm that MC6850 emulation is sufficient.
|
||||
|
||||
#define VIDEO_MASTER_CLOCK (10000000)
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
|
||||
static UINT8 m6840_irq_state;
|
||||
static UINT8 m6850_irq_state;
|
||||
@ -1469,19 +1469,19 @@ GFXDECODE_END
|
||||
|
||||
static UINT8 *dealem_videoram;
|
||||
|
||||
static WRITE8_HANDLER( dealem_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( dealem_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( dealem_crtc6845_register_r )
|
||||
static READ8_HANDLER( dealem_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( dealem_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( dealem_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -1534,7 +1534,7 @@ static PALETTE_INIT( dealem )
|
||||
|
||||
static VIDEO_START(dealem)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
}
|
||||
|
||||
static VIDEO_UPDATE(dealem)
|
||||
@ -1559,8 +1559,8 @@ static ADDRESS_MAP_START( dealem_memmap, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
|
||||
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(dealem_crtc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(dealem_crtc6845_register_r, dealem_crtc6845_register_w)
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(dealem_m6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(dealem_m6845_register_r, dealem_m6845_register_w)
|
||||
|
||||
// AM_RANGE(0x0850, 0x0850) AM_WRITE(bankswitch_w) // write bank (rom page select)
|
||||
|
||||
|
@ -95,27 +95,27 @@ val (hex): 27 20 22 04 26 00 20 20 00 07 00 00 80 00 00 00 ns
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 *murogem_videoram;
|
||||
|
||||
|
||||
static WRITE8_HANDLER( murogem_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( murogem_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( murogem_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( murogem_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( murogem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x007f) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE(murogem_crtc6845_address_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE(murogem_crtc6845_register_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE(murogem_m6845_address_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE(murogem_m6845_register_w)
|
||||
AM_RANGE(0x5000, 0x5000) AM_READ(input_port_0_r)
|
||||
AM_RANGE(0x5800, 0x5800) AM_READ(input_port_1_r)
|
||||
AM_RANGE(0x7000, 0x7000) AM_WRITE(MWA8_NOP) // sound? payout?
|
||||
@ -180,7 +180,7 @@ static PALETTE_INIT(murogem)
|
||||
|
||||
static VIDEO_START(murogem)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
}
|
||||
|
||||
static VIDEO_UPDATE(murogem)
|
||||
|
@ -66,7 +66,7 @@
|
||||
#include "deprecat.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/74123.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -83,7 +83,7 @@
|
||||
#define AUDIO_CPU_2_CLOCK (AUDIO_2_MASTER_CLOCK)
|
||||
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 *nyny_videoram_1;
|
||||
static UINT8 *nyny_videoram_2;
|
||||
static UINT8 *nyny_colorram_1;
|
||||
@ -270,15 +270,15 @@ static MACHINE_RESET( nyny )
|
||||
#define NUM_PENS (8)
|
||||
|
||||
|
||||
static WRITE8_HANDLER( nyny_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( nyny_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( nyny_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( nyny_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -415,7 +415,7 @@ static void nyny_display_enable_changed(int display_enabled)
|
||||
}
|
||||
|
||||
|
||||
static const crtc6845_interface crtc6845_intf =
|
||||
static const m6845_interface m6845_intf =
|
||||
{
|
||||
0, /* screen we are acting on */
|
||||
CRTC_CLOCK, /* the clock (pin 21) of the chip */
|
||||
@ -430,13 +430,13 @@ static const crtc6845_interface crtc6845_intf =
|
||||
static VIDEO_START( nyny )
|
||||
{
|
||||
/* configure the CRT controller */
|
||||
crtc6845 = crtc6845_config(&crtc6845_intf);
|
||||
m6845 = m6845_config(&m6845_intf);
|
||||
}
|
||||
|
||||
|
||||
static VIDEO_UPDATE( nyny )
|
||||
{
|
||||
crtc6845_update(crtc6845, bitmap, cliprect);
|
||||
m6845_update(m6845, bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -541,8 +541,8 @@ static ADDRESS_MAP_START( nyny_main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x6000, 0x7fff) AM_RAM AM_BASE(&nyny_colorram_2)
|
||||
AM_RANGE(0x8000, 0x9fff) AM_RAM
|
||||
AM_RANGE(0xa000, 0xa0ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* SRAM (coin counter, shown when holding F2) */
|
||||
AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x00fe) AM_WRITE(nyny_crtc6845_address_w)
|
||||
AM_RANGE(0xa101, 0xa101) AM_MIRROR(0x00fe) AM_WRITE(nyny_crtc6845_register_w)
|
||||
AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x00fe) AM_WRITE(nyny_m6845_address_w)
|
||||
AM_RANGE(0xa101, 0xa101) AM_MIRROR(0x00fe) AM_WRITE(nyny_m6845_register_w)
|
||||
AM_RANGE(0xa200, 0xa20f) AM_MIRROR(0x00f0) AM_READWRITE(nyny_pia_1_2_r, nyny_pia_1_2_w)
|
||||
AM_RANGE(0xa300, 0xa300) AM_MIRROR(0x00ff) AM_READWRITE(soundlatch3_r, audio_1_command_w)
|
||||
AM_RANGE(0xa400, 0xa7ff) AM_NOP
|
||||
|
@ -367,7 +367,7 @@
|
||||
#define MASTER_CLOCK 10000000 /* 10MHz */
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "sound/discrete.h"
|
||||
|
||||
@ -380,22 +380,22 @@
|
||||
* Video Hardware *
|
||||
*************************/
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
|
||||
static WRITE8_HANDLER( pmpoker_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( pmpoker_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( pmpoker_crtc6845_register_r )
|
||||
static READ8_HANDLER( pmpoker_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( pmpoker_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( pmpoker_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( pmpoker_videoram_w )
|
||||
@ -431,7 +431,7 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
|
||||
static VIDEO_START( pmpoker )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 29);
|
||||
}
|
||||
|
||||
@ -484,8 +484,8 @@ static PALETTE_INIT( pottnpkr )
|
||||
|
||||
static ADDRESS_MAP_START( pmpoker_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(pmpoker_crtc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(pmpoker_crtc6845_register_r, pmpoker_crtc6845_register_w)
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(pmpoker_m6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(pmpoker_m6845_register_r, pmpoker_m6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x0848, 0x084b) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(pmpoker_videoram_w) AM_BASE(&videoram)
|
||||
@ -496,8 +496,8 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( jokerpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) /* battery backed RAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(pmpoker_crtc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(pmpoker_crtc6845_register_r, pmpoker_crtc6845_register_w)
|
||||
AM_RANGE(0x0800, 0x0800) AM_WRITE(pmpoker_m6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_READWRITE(pmpoker_m6845_register_r, pmpoker_m6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_READWRITE(pia_0_r, pia_0_w)
|
||||
AM_RANGE(0x0848, 0x084b) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM AM_WRITE(pmpoker_videoram_w) AM_BASE(&videoram)
|
||||
|
@ -289,8 +289,8 @@ static ADDRESS_MAP_START( video_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, qix_addresslatch_w)
|
||||
AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITE(MWA8_RAM) AM_BASE(&qix_videoaddress)
|
||||
AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READ(qix_scanline_r)
|
||||
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(qix_crtc6845_address_w)
|
||||
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_crtc6845_register_r, qix_crtc6845_register_w)
|
||||
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(qix_m6845_address_w)
|
||||
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_m6845_register_r, qix_m6845_register_w)
|
||||
AM_RANGE(0xa000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -307,8 +307,8 @@ static ADDRESS_MAP_START( zoo_video_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x9400, 0x9400) AM_MIRROR(0x03fc) AM_READWRITE(qix_addresslatch_r, qix_addresslatch_w)
|
||||
AM_RANGE(0x9402, 0x9403) AM_MIRROR(0x03fc) AM_WRITE(MWA8_RAM) AM_BASE(&qix_videoaddress)
|
||||
AM_RANGE(0x9800, 0x9800) AM_MIRROR(0x03ff) AM_READ(qix_scanline_r)
|
||||
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(qix_crtc6845_address_w)
|
||||
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_crtc6845_register_r, qix_crtc6845_register_w)
|
||||
AM_RANGE(0x9c00, 0x9c00) AM_MIRROR(0x03fe) AM_WRITE(qix_m6845_address_w)
|
||||
AM_RANGE(0x9c01, 0x9c01) AM_MIRROR(0x03fe) AM_READWRITE(qix_m6845_register_r, qix_m6845_register_w)
|
||||
AM_RANGE(0xa000, 0xbfff) AM_ROMBANK(1)
|
||||
AM_RANGE(0xc000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
@ -35,7 +35,7 @@ RAM = 4116 (x11)
|
||||
#include "rescap.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/74123.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -48,7 +48,7 @@ RAM = 4116 (x11)
|
||||
#define CRTC_CLOCK (MAIN_CPU_MASTER_CLOCK / 16)
|
||||
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 *r2dtank_videoram;
|
||||
static UINT8 *r2dtank_colorram;
|
||||
static UINT8 flipscreen;
|
||||
@ -304,15 +304,15 @@ static MACHINE_RESET( r2dtank )
|
||||
#define NUM_PENS (8)
|
||||
|
||||
|
||||
static WRITE8_HANDLER( r2dtank_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( r2dtank_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( r2dtank_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( r2dtank_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -393,7 +393,7 @@ static void display_enable_changed(int display_enabled)
|
||||
}
|
||||
|
||||
|
||||
static const crtc6845_interface crtc6845_intf =
|
||||
static const m6845_interface m6845_intf =
|
||||
{
|
||||
0, /* screen we are acting on */
|
||||
CRTC_CLOCK, /* the clock (pin 21) of the chip */
|
||||
@ -408,13 +408,13 @@ static const crtc6845_interface crtc6845_intf =
|
||||
static VIDEO_START( r2dtank )
|
||||
{
|
||||
/* configure the CRT controller */
|
||||
crtc6845 = crtc6845_config(&crtc6845_intf);
|
||||
m6845 = m6845_config(&m6845_intf);
|
||||
}
|
||||
|
||||
|
||||
static VIDEO_UPDATE( r2dtank )
|
||||
{
|
||||
crtc6845_update(crtc6845, bitmap, cliprect);
|
||||
m6845_update(m6845, bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -440,8 +440,8 @@ static ADDRESS_MAP_START( r2dtank_main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x6000, 0x7fff) AM_RAM
|
||||
AM_RANGE(0x8000, 0x8003) AM_READWRITE(pia_0_r, pia_comp_0_w)
|
||||
AM_RANGE(0x8004, 0x8004) AM_READWRITE(audio_answer_r, audio_command_w)
|
||||
AM_RANGE(0xb000, 0xb000) AM_WRITE(r2dtank_crtc6845_address_w)
|
||||
AM_RANGE(0xb001, 0xb001) AM_WRITE(r2dtank_crtc6845_register_w)
|
||||
AM_RANGE(0xb000, 0xb000) AM_WRITE(r2dtank_m6845_address_w)
|
||||
AM_RANGE(0xb001, 0xb001) AM_WRITE(r2dtank_m6845_register_w)
|
||||
AM_RANGE(0xc000, 0xc007) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
|
||||
AM_RANGE(0xc800, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
@ -288,8 +288,8 @@ WRITE8_HANDLER( rockola_videoram_w );
|
||||
WRITE8_HANDLER( rockola_videoram2_w );
|
||||
WRITE8_HANDLER( rockola_colorram_w );
|
||||
WRITE8_HANDLER( rockola_charram_w );
|
||||
WRITE8_HANDLER( rockola_crtc6845_address_w );
|
||||
WRITE8_HANDLER( rockola_crtc6845_register_w );
|
||||
WRITE8_HANDLER( rockola_m6845_address_w );
|
||||
WRITE8_HANDLER( rockola_m6845_register_w );
|
||||
WRITE8_HANDLER( rockola_flipscreen_w );
|
||||
WRITE8_HANDLER( rockola_scrollx_w );
|
||||
WRITE8_HANDLER( rockola_scrolly_w );
|
||||
@ -371,8 +371,8 @@ static ADDRESS_MAP_START( sasuke_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_crtc6845_address_w)
|
||||
AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_crtc6845_register_w)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_m6845_address_w)
|
||||
AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_m6845_register_w)
|
||||
AM_RANGE(0x4000, 0x8fff) AM_ROM
|
||||
AM_RANGE(0xb000, 0xb001) AM_WRITE(sasuke_sound_w)
|
||||
AM_RANGE(0xb002, 0xb002) AM_WRITE(satansat_b002_w) /* flip screen & irq enable */
|
||||
@ -390,8 +390,8 @@ static ADDRESS_MAP_START( satansat_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_crtc6845_address_w)
|
||||
AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_crtc6845_register_w)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_m6845_address_w)
|
||||
AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_m6845_register_w)
|
||||
AM_RANGE(0x4000, 0x97ff) AM_ROM
|
||||
AM_RANGE(0xb000, 0xb001) AM_WRITE(satansat_sound_w)
|
||||
AM_RANGE(0xb002, 0xb002) AM_WRITE(satansat_b002_w) /* flip screen & irq enable */
|
||||
@ -409,8 +409,8 @@ static ADDRESS_MAP_START( vanguard_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_crtc6845_address_w)
|
||||
AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_crtc6845_register_w)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITE(rockola_m6845_address_w)
|
||||
AM_RANGE(0x3001, 0x3001) AM_WRITE(rockola_m6845_register_w)
|
||||
AM_RANGE(0x3100, 0x3102) AM_WRITE(vanguard_sound_w)
|
||||
AM_RANGE(0x3103, 0x3103) AM_WRITE(rockola_flipscreen_w)
|
||||
AM_RANGE(0x3104, 0x3104) AM_READ_PORT("IN0")
|
||||
@ -430,8 +430,8 @@ static ADDRESS_MAP_START( fantasy_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0800, 0x0bff) AM_RAM AM_WRITE(rockola_videoram_w) AM_BASE(&videoram)
|
||||
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram)
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(rockola_crtc6845_address_w)
|
||||
AM_RANGE(0x2001, 0x2001) AM_WRITE(rockola_crtc6845_register_w)
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(rockola_m6845_address_w)
|
||||
AM_RANGE(0x2001, 0x2001) AM_WRITE(rockola_m6845_register_w)
|
||||
AM_RANGE(0x2100, 0x2103) AM_WRITE(fantasy_sound_w)
|
||||
AM_RANGE(0x2104, 0x2104) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0x2105, 0x2105) AM_READ_PORT("IN1")
|
||||
@ -451,8 +451,8 @@ static ADDRESS_MAP_START( pballoon_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0c00, 0x0fff) AM_RAM AM_WRITE(rockola_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_WRITE(rockola_charram_w) AM_BASE(&rockola_charram)
|
||||
AM_RANGE(0x3000, 0x9fff) AM_ROM
|
||||
AM_RANGE(0xb000, 0xb000) AM_WRITE(rockola_crtc6845_address_w)
|
||||
AM_RANGE(0xb001, 0xb001) AM_WRITE(rockola_crtc6845_register_w)
|
||||
AM_RANGE(0xb000, 0xb000) AM_WRITE(rockola_m6845_address_w)
|
||||
AM_RANGE(0xb001, 0xb001) AM_WRITE(rockola_m6845_register_w)
|
||||
AM_RANGE(0xb100, 0xb103) AM_WRITE(fantasy_sound_w)
|
||||
AM_RANGE(0xb104, 0xb104) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0xb105, 0xb105) AM_READ_PORT("IN1")
|
||||
|
@ -21,7 +21,7 @@
|
||||
$0000-$1bff Video Memory (bit0)
|
||||
$4000-$5bff Video Memory (bit1)
|
||||
$8000-$9bff Video Memory (bit2)
|
||||
$c000-$c001 6845 CRT Controller (crtc6845)
|
||||
$c000-$c001 6845 CRT Controller (m6845)
|
||||
$c020-$c027 NVRAM
|
||||
$c044-$c047 MC6821 PIA 1 (Control input port - all input)
|
||||
$c048-$c04b MC6821 PIA 2 (Sprite data port - see machine/spiders.c)
|
||||
@ -36,7 +36,7 @@
|
||||
$0000-$1bff Video Memory (bit0)
|
||||
$4000-$5bff Video Memory (bit1)
|
||||
$8000-$9bff Video Memory (bit2)
|
||||
$c000-$c001 6845 CRT Controller (crtc6845)
|
||||
$c000-$c001 6845 CRT Controller (m6845)
|
||||
$c044-$c047 MC6821 PIA 1
|
||||
$c048-$c04b MC6821 PIA 2 (Video port)
|
||||
$c050-$c053 MC6821 PIA 3
|
||||
@ -192,7 +192,7 @@
|
||||
#include "deprecat.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/74123.h"
|
||||
#include "spiders.h"
|
||||
@ -203,7 +203,7 @@
|
||||
#define CRTC_CLOCK (MAIN_CPU_MASTER_CLOCK / 16)
|
||||
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 *spiders_ram;
|
||||
static UINT8 flipscreen;
|
||||
static UINT16 gfx_rom_address;
|
||||
@ -410,21 +410,21 @@ static MACHINE_RESET( spiders )
|
||||
#define NUM_PENS (8)
|
||||
|
||||
|
||||
static WRITE8_HANDLER( spiders_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( spiders_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( spiders_crtc6845_register_r )
|
||||
static READ8_HANDLER( spiders_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( spiders_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( spiders_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -515,7 +515,7 @@ static void display_enable_changed(int display_enabled)
|
||||
}
|
||||
|
||||
|
||||
static const crtc6845_interface crtc6845_intf =
|
||||
static const m6845_interface m6845_intf =
|
||||
{
|
||||
0, /* screen we are acting on */
|
||||
CRTC_CLOCK, /* the clock (pin 21) of the chip */
|
||||
@ -530,13 +530,13 @@ static const crtc6845_interface crtc6845_intf =
|
||||
static VIDEO_START( spiders )
|
||||
{
|
||||
/* configure the CRT controller */
|
||||
crtc6845 = crtc6845_config(&crtc6845_intf);
|
||||
m6845 = m6845_config(&m6845_intf);
|
||||
}
|
||||
|
||||
|
||||
static VIDEO_UPDATE( spiders )
|
||||
{
|
||||
crtc6845_update(crtc6845, bitmap, cliprect);
|
||||
m6845_update(m6845, bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -591,8 +591,8 @@ static READ8_HANDLER( gfx_rom_r )
|
||||
|
||||
static ADDRESS_MAP_START( spiders_main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_RAM AM_BASE(&spiders_ram)
|
||||
AM_RANGE(0xc000, 0xc000) AM_WRITE(spiders_crtc6845_address_w)
|
||||
AM_RANGE(0xc001, 0xc001) AM_READWRITE(spiders_crtc6845_register_r, spiders_crtc6845_register_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_WRITE(spiders_m6845_address_w)
|
||||
AM_RANGE(0xc001, 0xc001) AM_READWRITE(spiders_m6845_register_r, spiders_m6845_register_w)
|
||||
AM_RANGE(0xc020, 0xc027) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
|
||||
AM_RANGE(0xc044, 0xc047) AM_READWRITE(pia_1_r, pia_1_w)
|
||||
AM_RANGE(0xc048, 0xc04b) AM_READWRITE(pia_2_alt_r, pia_2_alt_w)
|
||||
|
@ -23,9 +23,9 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 *ssingles_videoram;
|
||||
static UINT8 *ssingles_colorram;
|
||||
static UINT8 prot_data;
|
||||
@ -84,7 +84,7 @@ static void update_row(mame_bitmap *bitmap, const rectangle *cliprect,
|
||||
}
|
||||
}
|
||||
|
||||
static const crtc6845_interface crtc6845_intf =
|
||||
static const m6845_interface m6845_intf =
|
||||
{
|
||||
0,
|
||||
1000000, /* ? MHz */
|
||||
@ -105,21 +105,21 @@ static WRITE8_HANDLER(ssingles_colorram_w)
|
||||
ssingles_colorram[offset]=data;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( ssingles_crtc6845_address_w )
|
||||
static WRITE8_HANDLER( ssingles_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( ssingles_crtc6845_register_w )
|
||||
static WRITE8_HANDLER( ssingles_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
static VIDEO_START(ssingles)
|
||||
{
|
||||
crtc6845 = crtc6845_config(&crtc6845_intf);
|
||||
m6845 = m6845_config(&m6845_intf);
|
||||
|
||||
{
|
||||
int i;
|
||||
@ -133,7 +133,7 @@ static VIDEO_START(ssingles)
|
||||
|
||||
static VIDEO_UPDATE( ssingles )
|
||||
{
|
||||
crtc6845_update(crtc6845, bitmap, cliprect);
|
||||
m6845_update(m6845, bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -192,8 +192,8 @@ static ADDRESS_MAP_START( ssingles_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
AM_RANGE(0x18, 0x18) AM_READ(input_port_3_r)
|
||||
AM_RANGE(0x1c, 0x1c) AM_READ(controls_r)
|
||||
AM_RANGE(0x1a, 0x1a) AM_WRITENOP //video/crt related
|
||||
AM_RANGE(0xfe, 0xfe) AM_WRITE(ssingles_crtc6845_address_w)
|
||||
AM_RANGE(0xff, 0xff) AM_WRITE(ssingles_crtc6845_register_w)
|
||||
AM_RANGE(0xfe, 0xfe) AM_WRITE(ssingles_m6845_address_w)
|
||||
AM_RANGE(0xff, 0xff) AM_WRITE(ssingles_m6845_register_w)
|
||||
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
@ -57,7 +57,7 @@ static PALETTE_INIT( tugboat )
|
||||
|
||||
|
||||
|
||||
/* see crtc6845.c. That file is only a placeholder, I process the writes here
|
||||
/* see m6845.c. That file is only a placeholder, I process the writes here
|
||||
because I need the start_addr register to handle scrolling */
|
||||
static WRITE8_HANDLER( tugboat_hd46505_0_w )
|
||||
{
|
||||
|
@ -29,8 +29,8 @@ Sound: AY-3-8912
|
||||
/* video */
|
||||
WRITE8_HANDLER( usgames_videoram_w );
|
||||
WRITE8_HANDLER( usgames_charram_w );
|
||||
WRITE8_HANDLER( usgames_crtc6845_address_w );
|
||||
WRITE8_HANDLER( usgames_crtc6845_register_w );
|
||||
WRITE8_HANDLER( usgames_m6845_address_w );
|
||||
WRITE8_HANDLER( usgames_m6845_register_w );
|
||||
VIDEO_START(usgames);
|
||||
PALETTE_INIT(usgames);
|
||||
VIDEO_UPDATE(usgames);
|
||||
@ -102,8 +102,8 @@ static ADDRESS_MAP_START( usgames_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2020, 0x2020) AM_WRITE(lamps1_w)
|
||||
AM_RANGE(0x2030, 0x2030) AM_WRITE(lamps2_w)
|
||||
|
||||
AM_RANGE(0x2040, 0x2040) AM_WRITE(usgames_crtc6845_address_w)
|
||||
AM_RANGE(0x2041, 0x2041) AM_WRITE(usgames_crtc6845_register_w)
|
||||
AM_RANGE(0x2040, 0x2040) AM_WRITE(usgames_m6845_address_w)
|
||||
AM_RANGE(0x2041, 0x2041) AM_WRITE(usgames_m6845_register_w)
|
||||
|
||||
AM_RANGE(0x2400, 0x2400) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0x2401, 0x2401) AM_WRITE(AY8910_write_port_0_w)
|
||||
@ -122,8 +122,8 @@ static ADDRESS_MAP_START( usg185_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2420, 0x2420) AM_WRITE(lamps1_w)
|
||||
AM_RANGE(0x2430, 0x2430) AM_WRITE(lamps2_w)
|
||||
|
||||
AM_RANGE(0x2440, 0x2440) AM_WRITE(usgames_crtc6845_address_w)
|
||||
AM_RANGE(0x2441, 0x2441) AM_WRITE(usgames_crtc6845_register_w)
|
||||
AM_RANGE(0x2440, 0x2440) AM_WRITE(usgames_m6845_address_w)
|
||||
AM_RANGE(0x2441, 0x2441) AM_WRITE(usgames_m6845_register_w)
|
||||
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(AY8910_control_port_0_w)
|
||||
AM_RANGE(0x2001, 0x2001) AM_WRITE(AY8910_write_port_0_w)
|
||||
|
@ -174,7 +174,7 @@ static ADDRESS_MAP_START( port_writemem, ADDRESS_SPACE_IO, 8 )
|
||||
AM_RANGE(0xe0, 0xe0) AM_WRITE(xyonix_io_w)
|
||||
AM_RANGE(0x40, 0x40) AM_WRITE(MWA8_NOP) // NMI ack?
|
||||
AM_RANGE(0x50, 0x50) AM_WRITE(xyonix_irqack_w)
|
||||
AM_RANGE(0x60, 0x61) AM_WRITE(MWA8_NOP) // crtc6845
|
||||
AM_RANGE(0x60, 0x61) AM_WRITE(MWA8_NOP) // m6845
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/* Inputs Ports **************************************************************/
|
||||
|
@ -52,9 +52,9 @@ extern UINT8 qix_cocktail_flip;
|
||||
VIDEO_START( qix );
|
||||
VIDEO_UPDATE( qix );
|
||||
|
||||
WRITE8_HANDLER( qix_crtc6845_address_w );
|
||||
READ8_HANDLER( qix_crtc6845_register_r );
|
||||
WRITE8_HANDLER( qix_crtc6845_register_w );
|
||||
WRITE8_HANDLER( qix_m6845_address_w );
|
||||
READ8_HANDLER( qix_m6845_register_r );
|
||||
WRITE8_HANDLER( qix_m6845_register_w );
|
||||
READ8_HANDLER( qix_scanline_r );
|
||||
READ8_HANDLER( qix_videoram_r );
|
||||
WRITE8_HANDLER( qix_videoram_w );
|
||||
|
@ -47,9 +47,9 @@
|
||||
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
|
||||
|
||||
@ -96,19 +96,19 @@ WRITE8_HANDLER( funworld_colorram_w )
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( funworld_crtc6845_address_w )
|
||||
WRITE8_HANDLER( funworld_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
READ8_HANDLER( funworld_crtc6845_register_r )
|
||||
READ8_HANDLER( funworld_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( funworld_crtc6845_register_w )
|
||||
WRITE8_HANDLER( funworld_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
/**** normal hardware limit ****
|
||||
@ -136,19 +136,19 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
|
||||
VIDEO_START(funworld)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 96, 29);
|
||||
}
|
||||
|
||||
VIDEO_START(magiccrd)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 112, 34);
|
||||
}
|
||||
|
||||
VIDEO_START(snookr10)
|
||||
{
|
||||
// crtc6845 = crtc6845_config(NULL);
|
||||
// m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 128, 32);
|
||||
}
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
||||
***********************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
|
||||
WRITE8_HANDLER( gdrawpkr_videoram_w )
|
||||
@ -44,24 +44,24 @@ static TILE_GET_INFO( get_bg_tile_info )
|
||||
SET_TILE_INFO(bank, code, color, 0);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( gdrawpkr_crtc6845_address_w )
|
||||
WRITE8_HANDLER( gdrawpkr_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
READ8_HANDLER( gdrawpkr_crtc6845_register_r )
|
||||
READ8_HANDLER( gdrawpkr_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( gdrawpkr_crtc6845_register_w )
|
||||
WRITE8_HANDLER( gdrawpkr_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
VIDEO_START( gdrawpkr )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 31);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "qix.h"
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ UINT8 qix_cocktail_flip;
|
||||
|
||||
|
||||
/* Local variables */
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static UINT8 vram_mask;
|
||||
static UINT8 qix_palettebank;
|
||||
static UINT8 leds;
|
||||
@ -51,7 +51,7 @@ static void qix_update_row(mame_bitmap *bitmap,
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const crtc6845_interface crtc6845_intf =
|
||||
static const m6845_interface m6845_intf =
|
||||
{
|
||||
0, /* screen we are acting on */
|
||||
QIX_CHARACTER_CLOCK, /* the clock (pin 21) of the chip */
|
||||
@ -66,7 +66,7 @@ static const crtc6845_interface crtc6845_intf =
|
||||
VIDEO_START( qix )
|
||||
{
|
||||
/* configure the CRT controller */
|
||||
crtc6845 = crtc6845_config(&crtc6845_intf);
|
||||
m6845 = m6845_config(&m6845_intf);
|
||||
|
||||
/* allocate memory for the full video RAM */
|
||||
videoram = auto_malloc(256 * 256);
|
||||
@ -95,8 +95,8 @@ static void qix_display_enable_changed(int display_enabled)
|
||||
/* on the rising edge, latch the scanline */
|
||||
if (display_enabled)
|
||||
{
|
||||
UINT16 ma = crtc6845_get_ma(crtc6845);
|
||||
UINT8 ra = crtc6845_get_ra(crtc6845);
|
||||
UINT16 ma = m6845_get_ma(m6845);
|
||||
UINT8 ra = m6845_get_ra(m6845);
|
||||
|
||||
/* RA0-RA2 goes to D0-D2 and MA5-MA9 goes to D3-D7 */
|
||||
scanline_latch = ((ma >> 2) & 0xf8) | (ra & 0x07);
|
||||
@ -292,21 +292,21 @@ static void get_pens(pen_t *pens)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_HANDLER( qix_crtc6845_address_w )
|
||||
WRITE8_HANDLER( qix_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
READ8_HANDLER( qix_crtc6845_register_r )
|
||||
READ8_HANDLER( qix_m6845_register_r )
|
||||
{
|
||||
return crtc6845_register_r(crtc6845);
|
||||
return m6845_register_r(m6845);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( qix_crtc6845_register_w )
|
||||
WRITE8_HANDLER( qix_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -362,7 +362,7 @@ static void qix_update_row(mame_bitmap *bitmap, const rectangle *cliprect,
|
||||
|
||||
VIDEO_UPDATE( qix )
|
||||
{
|
||||
crtc6845_update(crtc6845, bitmap, cliprect);
|
||||
m6845_update(m6845, bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
|
||||
|
||||
UINT8 *rockola_videoram2;
|
||||
@ -17,7 +17,7 @@ UINT8 *rockola_charram;
|
||||
static int charbank;
|
||||
static int backcolor;
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *bg_tilemap;
|
||||
static tilemap *fg_tilemap;
|
||||
|
||||
@ -115,15 +115,15 @@ WRITE8_HANDLER( rockola_charram_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( rockola_crtc6845_address_w )
|
||||
WRITE8_HANDLER( rockola_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( rockola_crtc6845_register_w )
|
||||
WRITE8_HANDLER( rockola_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ static TILE_GET_INFO( get_fg_tile_info )
|
||||
|
||||
VIDEO_START( rockola )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
@ -315,7 +315,7 @@ static TILE_GET_INFO( satansat_get_fg_tile_info )
|
||||
|
||||
VIDEO_START( satansat )
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
|
||||
bg_tilemap = tilemap_create(satansat_get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
fg_tilemap = tilemap_create(satansat_get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
@ -13,7 +13,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "twincobr.h"
|
||||
|
||||
|
||||
@ -190,12 +190,12 @@ void twincobr_flipscreen(int flip)
|
||||
|
||||
WRITE16_HANDLER( twincobr_crtc_reg_sel_w )
|
||||
{
|
||||
crtc6845_address_w(offset, data);
|
||||
// m6845_address_w(offset, data);
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( twincobr_crtc_data_w )
|
||||
{
|
||||
crtc6845_register_w(offset, data);
|
||||
// m6845_register_w(offset, data);
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( twincobr_txoffs_w )
|
||||
@ -371,12 +371,12 @@ WRITE8_HANDLER( wardner_sprite_w )
|
||||
|
||||
WRITE8_HANDLER( wardner_CRTC_reg_sel_w )
|
||||
{
|
||||
crtc6845_address_w(offset, data);
|
||||
// m6845_address_w(offset, data);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( wardner_CRTC_data_w )
|
||||
{
|
||||
crtc6845_register_w(0, data);
|
||||
// m6845_register_w(0, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "driver.h"
|
||||
#include "video/crtc6845.h"
|
||||
#include "video/m6845.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
UINT8 *usgames_videoram,*usgames_charram;
|
||||
|
||||
|
||||
static crtc6845_t *crtc6845;
|
||||
static m6845_t *m6845;
|
||||
static tilemap *usgames_tilemap;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ static TILE_GET_INFO( get_usgames_tile_info )
|
||||
|
||||
VIDEO_START(usgames)
|
||||
{
|
||||
crtc6845 = crtc6845_config(NULL);
|
||||
m6845 = m6845_config(NULL);
|
||||
usgames_tilemap = tilemap_create(get_usgames_tile_info,tilemap_scan_rows, 8, 8,64,32);
|
||||
}
|
||||
|
||||
@ -70,15 +70,15 @@ WRITE8_HANDLER( usgames_charram_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( usgames_crtc6845_address_w )
|
||||
WRITE8_HANDLER( usgames_m6845_address_w )
|
||||
{
|
||||
crtc6845_address_w(crtc6845, data);
|
||||
m6845_address_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( usgames_crtc6845_register_w )
|
||||
WRITE8_HANDLER( usgames_m6845_register_w )
|
||||
{
|
||||
crtc6845_register_w(crtc6845, data);
|
||||
m6845_register_w(m6845, data);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user