summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-10-09 15:29:22 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-10-09 15:29:22 +0000
commitd3ab17e0e35a80ee5414ed528dfeff52013a27b7 (patch)
tree3c6a983715c7e74b07ca88804d076203ef263e81 /src/emu/machine
parent3ceca447b7636056b8050661fa144b2a6fb25ea4 (diff)
Cleanups and version bump.mame0127u7
Diffstat (limited to 'src/emu/machine')
-rw-r--r--src/emu/machine/ldpr8210.c30
-rw-r--r--src/emu/machine/ldv1000.c110
-rw-r--r--src/emu/machine/ldvp931.c2
3 files changed, 71 insertions, 71 deletions
diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c
index 4fcae2a04b9..790752e367e 100644
--- a/src/emu/machine/ldpr8210.c
+++ b/src/emu/machine/ldpr8210.c
@@ -423,7 +423,7 @@ static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fie
static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap)
{
ldplayer_data *player = ld->player;
-
+
/* custom display */
if (player->pia.display)
{
@@ -431,14 +431,14 @@ static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap)
overlay_draw_group(bitmap, &player->pia.text[7], 5, OVERLAY_GROUP2_X);
overlay_draw_group(bitmap, &player->pia.text[12], 5, OVERLAY_GROUP3_X);
}
-
+
/* chapter/frame display */
else
{
/* frame display */
if (player->pia.latchdisplay & 2)
overlay_draw_group(bitmap, &player->pia.text[2], 5, OVERLAY_GROUP1_X);
-
+
/* chapter overlay */
if (player->pia.latchdisplay & 1)
overlay_draw_group(bitmap, &player->pia.text[0], 2, OVERLAY_GROUP0_X);
@@ -610,7 +610,7 @@ static READ8_HANDLER( pr8210_pia_r )
case 0x22: case 0x23: case 0x24: case 0x25: case 0x26:
result = player->pia.frame[offset - 0x20];
break;
-
+
/* (1D-1F,27) invalid read but normal */
case 0x1d: case 0x1e: case 0x1f:
case 0x27:
@@ -897,7 +897,7 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f
{
int skip = TRUE;
int x;
-
+
/* rease the background */
overlay_erase(bitmap, xstart, xstart + ((OVERLAY_X_PIXELS + 1) * count + 1) * OVERLAY_PIXEL_WIDTH);
@@ -912,7 +912,7 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f
/*-------------------------------------------------
- overlay_erase - erase the background area
+ overlay_erase - erase the background area
where the text overlay will be displayed
-------------------------------------------------*/
@@ -921,25 +921,25 @@ static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap->width);
UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap->width);
UINT32 x, y;
-
+
for (y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++)
{
UINT16 *dest = BITMAP_ADDR16(bitmap, y, xmin >> 8);
UINT16 ymin, ymax, yres;
-
+
ymax = *dest >> 8;
ymin = ymax * 3 / 8;
yres = ymin + ((ymax - ymin) * (xmin & 0xff)) / 256;
*dest = (yres << 8) | (*dest & 0xff);
dest++;
-
+
for (x = (xmin | 0xff) + 1; x < xmax; x += 0x100)
{
yres = (*dest >> 8) * 3 / 8;
*dest = (yres << 8) | (*dest & 0xff);
dest++;
}
-
+
ymax = *dest >> 8;
ymin = ymax * 3 / 8;
yres = ymin + ((ymax - ymin) * (~xmax & 0xff)) / 256;
@@ -960,12 +960,12 @@ static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap->width);
const UINT8 *chdataptr = &text_bitmap[ch & 0x3f][0];
UINT32 x, y, xx, yy;
-
+
/* iterate over pixels */
for (y = 0; y < OVERLAY_Y_PIXELS; y++)
{
UINT8 chdata = *chdataptr++;
-
+
for (x = 0; x < OVERLAY_X_PIXELS; x++, chdata <<= 1)
if (chdata & 0x80)
{
@@ -975,16 +975,16 @@ static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
{
UINT16 *dest = BITMAP_ADDR16(bitmap, OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
UINT16 ymin, ymax, yres;
-
+
ymax = 0xff;
ymin = *dest >> 8;
yres = ymin + ((ymax - ymin) * (~xmin & 0xff)) / 256;
*dest = (yres << 8) | (*dest & 0xff);
dest++;
-
+
for (xx = (xmin | 0xff) + 1; xx < xmax; xx += 0x100)
*dest++ = 0xf080;
-
+
ymax = 0xff;
ymin = *dest >> 8;
yres = ymin + ((ymax - ymin) * (xmax & 0xff)) / 256;
diff --git a/src/emu/machine/ldv1000.c b/src/emu/machine/ldv1000.c
index a30af75c888..e57f8de5733 100644
--- a/src/emu/machine/ldv1000.c
+++ b/src/emu/machine/ldv1000.c
@@ -149,14 +149,14 @@ static ADDRESS_MAP_START( ldv1000_portmap, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
-static const ppi8255_interface ppi0intf =
+static const ppi8255_interface ppi0intf =
{
NULL, ppi0_portb_r, ppi0_portc_r,
ppi0_porta_w, NULL, ppi0_portc_w
};
-static const ppi8255_interface ppi1intf =
+static const ppi8255_interface ppi1intf =
{
ppi1_porta_r, NULL, NULL,
NULL, ppi1_portb_w, ppi1_portc_w
@@ -184,7 +184,7 @@ static MACHINE_DRIVER_START( ldv1000 )
MDRV_CPU_CONFIG(daisy_chain)
MDRV_CPU_PROGRAM_MAP(ldv1000_map,0)
MDRV_CPU_IO_MAP(ldv1000_portmap,0)
-
+
MDRV_Z80CTC_ADD("ldvctc", ctcintf)
MDRV_PPI8255_ADD("ldvppi0", ppi0intf)
MDRV_PPI8255_ADD("ldvppi1", ppi1intf)
@@ -369,18 +369,18 @@ static TIMER_CALLBACK( vbi_data_fetch )
UINT8 focus_on = !(player->portb1 & 0x01);
UINT8 laser_on = (player->portb1 & 0x40);
UINT32 lines[3];
-
+
/* appears to return data in reverse order */
lines[0] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE1718);
lines[1] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE17);
lines[2] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE16);
-
+
/* fill in the details */
memset(player->vbi, 0, sizeof(player->vbi));
if (focus_on && laser_on)
{
int line;
-
+
/* loop over lines */
for (line = 0; line < 3; line++)
{
@@ -400,7 +400,7 @@ static TIMER_CALLBACK( vbi_data_fetch )
}
}
}
-
+
/* signal that data is ready and reset the readback index */
player->vbiready = TRUE;
player->vbiindex = 0;
@@ -422,7 +422,7 @@ static TIMER_DEVICE_CALLBACK( multijump_timer )
/* bit 5 of port B on PPI 1 selects the direction of slider movement */
direction = (player->portb1 & 0x20) ? 1 : -1;
ldcore_advance_slider(ld, direction);
-
+
/* update down counter and reschedule */
if (--player->counter != 0)
timer_device_adjust_oneshot(timer, MULTIJUMP_TRACK_TIME, 0);
@@ -449,11 +449,11 @@ static void ctc_interrupt(const device_config *device, int state)
static WRITE8_HANDLER( decoder_display_port_w )
{
/*
- TX/RX = /A0 (A0=0 -> TX, A0=1 -> RX)
-
- Display is 6-bit
- Decoder is 4-bit
- */
+ TX/RX = /A0 (A0=0 -> TX, A0=1 -> RX)
+
+ Display is 6-bit
+ Decoder is 4-bit
+ */
laserdisc_state *ld = find_ldv1000(machine);
ldplayer_data *player = ld->player;
@@ -463,7 +463,7 @@ static WRITE8_HANDLER( decoder_display_port_w )
player->portselect = data;
player->dispindex = 0;
}
-
+
/* writes to offset 2 constitute actual writes targeted toward the display and decoder chips */
else if (offset == 2)
{
@@ -507,7 +507,7 @@ static READ8_HANDLER( decoder_display_port_r )
static READ8_HANDLER( controller_r )
{
laserdisc_state *ld = find_ldv1000(machine);
-
+
/* note that this is a cheesy implementation; the real thing relies on exquisite timing */
UINT8 result = ld->player->command ^ 0xff;
ld->player->command = 0xff;
@@ -562,11 +562,11 @@ static READ8_DEVICE_HANDLER( ppi0_portb_r )
static READ8_DEVICE_HANDLER( ppi0_portc_r )
{
/*
- $10 = /VSYNC
- $20 = IRQ from decoder chip
- $40 = TRKG LOOP (N24-1)
- $80 = DUMP (N20-1) -- code reads the state and waits for it to change
- */
+ $10 = /VSYNC
+ $20 = IRQ from decoder chip
+ $40 = TRKG LOOP (N24-1)
+ $80 = DUMP (N20-1) -- code reads the state and waits for it to change
+ */
laserdisc_state *ld = find_ldv1000(device->machine);
ldplayer_data *player = ld->player;
UINT8 result = 0x00;
@@ -588,15 +588,15 @@ static READ8_DEVICE_HANDLER( ppi0_portc_r )
static WRITE8_DEVICE_HANDLER( ppi0_portc_w )
{
/*
- $01 = preload on up/down counters
- $02 = /MULTI JUMP TRIG
- $04 = SCAN MODE
- $08 = n/c
- */
+ $01 = preload on up/down counters
+ $02 = /MULTI JUMP TRIG
+ $04 = SCAN MODE
+ $08 = n/c
+ */
laserdisc_state *ld = find_ldv1000(device->machine);
ldplayer_data *player = ld->player;
UINT8 prev = player->portc0;
-
+
/* set the new value */
player->portc0 = data;
if (LOG_PORT_IO && ((data ^ prev) & 0x0f) != 0)
@@ -607,7 +607,7 @@ static WRITE8_DEVICE_HANDLER( ppi0_portc_w )
if (data & 0x04) printf(" SCANMODE");
printf("\n");
}
-
+
/* on the rising edge of bit 0, clock the down counter load */
if ((data & 0x01) && !(prev & 0x01))
player->counter = player->counter_start;
@@ -626,15 +626,15 @@ static WRITE8_DEVICE_HANDLER( ppi0_portc_w )
static READ8_DEVICE_HANDLER( ppi1_porta_r )
{
/*
- $01 = /FOCS LOCK
- $02 = /SPDL LOCK
- $04 = INSIDE
- $08 = OUTSIDE
- $10 = MOTOR STOP
- $20 = +5V/test point
- $40 = /INT LOCK
- $80 = 8 INCH CHK
- */
+ $01 = /FOCS LOCK
+ $02 = /SPDL LOCK
+ $04 = INSIDE
+ $08 = OUTSIDE
+ $10 = MOTOR STOP
+ $20 = +5V/test point
+ $40 = /INT LOCK
+ $80 = 8 INCH CHK
+ */
laserdisc_state *ld = find_ldv1000(device->machine);
ldplayer_data *player = ld->player;
slider_position sliderpos = ldcore_get_slider_position(ld);
@@ -664,7 +664,7 @@ static READ8_DEVICE_HANDLER( ppi1_porta_r )
result |= 0x20;
/* bit 6: /INT LOCK */
-
+
/* bit 7: 8 INCH CHK */
return result;
@@ -679,15 +679,15 @@ static READ8_DEVICE_HANDLER( ppi1_porta_r )
static WRITE8_DEVICE_HANDLER( ppi1_portb_w )
{
/*
- $01 = /FOCS ON
- $02 = /SPDL RUN
- $04 = /JUMP TRIG
- $08 = /SCAN A
- $10 = SCAN B
- $20 = SCAN C
- $40 = /LASER ON
- $80 = /SYNC ST0
- */
+ $01 = /FOCS ON
+ $02 = /SPDL RUN
+ $04 = /JUMP TRIG
+ $08 = /SCAN A
+ $10 = SCAN B
+ $20 = SCAN C
+ $40 = /LASER ON
+ $80 = /SYNC ST0
+ */
laserdisc_state *ld = find_ldv1000(device->machine);
ldplayer_data *player = ld->player;
UINT8 prev = player->portb1;
@@ -736,15 +736,15 @@ static WRITE8_DEVICE_HANDLER( ppi1_portb_w )
static WRITE8_DEVICE_HANDLER( ppi1_portc_w )
{
/*
- $01 = AUD 1
- $02 = AUD 2
- $04 = AUDIO ENABLE
- $08 = /VIDEO SQ
- $10 = COMMAND
- $20 = STATUS
- $40 = SIZE 8/12
- $80 = /LED CAV
- */
+ $01 = AUD 1
+ $02 = AUD 2
+ $04 = AUDIO ENABLE
+ $08 = /VIDEO SQ
+ $10 = COMMAND
+ $20 = STATUS
+ $40 = SIZE 8/12
+ $80 = /LED CAV
+ */
laserdisc_state *ld = find_ldv1000(device->machine);
ldplayer_data *player = ld->player;
UINT8 prev = player->portc1;
diff --git a/src/emu/machine/ldvp931.c b/src/emu/machine/ldvp931.c
index acf95513133..43be47bcb30 100644
--- a/src/emu/machine/ldvp931.c
+++ b/src/emu/machine/ldvp931.c
@@ -222,7 +222,7 @@ static void vp931_init(laserdisc_state *ld)
astring *tempstring = astring_alloc();
ldplayer_data *player = ld->player;
vp931_data_ready_func cbsave;
-
+
/* reset our state */
cbsave = player->data_ready_cb;
memset(player, 0, sizeof(*player));