summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-09-28 20:50:32 +0200
committer hap <happppp@users.noreply.github.com>2020-09-28 20:50:32 +0200
commit0127d425bb85dcce5f99051585780a77571b6056 (patch)
treea17ec1a5eabd2776185db699c579dbdd58119c2a
parentb16e7df42a5c3371288ae81dd9aad69c5838809a (diff)
odyssey2: sourcecode style cleanup (mostly bracket spacing)
-rw-r--r--src/devices/video/ef9340_1.cpp78
-rw-r--r--src/devices/video/ef9340_1.h4
-rw-r--r--src/devices/video/i8244.cpp146
-rw-r--r--src/devices/video/i8244.h4
-rw-r--r--src/mame/drivers/odyssey2.cpp4
5 files changed, 118 insertions, 118 deletions
diff --git a/src/devices/video/ef9340_1.cpp b/src/devices/video/ef9340_1.cpp
index b5238fb656b..f58106fb5c4 100644
--- a/src/devices/video/ef9340_1.cpp
+++ b/src/devices/video/ef9340_1.cpp
@@ -45,7 +45,7 @@ ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag,
ROM_START( ef9340_1 )
- ROM_REGION( 0xA00, "ef9340_1", 0 )
+ ROM_REGION( 0xa00, "ef9340_1", 0 )
ROM_LOAD( "charset_ef9340_1.rom", 0x0000, 0x0a00, BAD_DUMP CRC(8de85988) SHA1(f8e3892234da6626eb4302e171179ada5a51fca8) ) // taken from datasheet
ROM_END
@@ -65,10 +65,10 @@ void ef9340_1_device::device_start()
screen().register_screen_bitmap(m_tmp_bitmap);
m_line_timer = timer_alloc(TIMER_LINE);
- m_line_timer->adjust( screen().time_until_pos(0, 0), 0, screen().scan_period() );
+ m_line_timer->adjust(screen().time_until_pos(0, 0), 0, screen().scan_period());
m_blink_timer = timer_alloc(TIMER_BLINK);
- m_blink_timer->adjust( screen().time_until_pos(0, 0), 0, screen().frame_period() );
+ m_blink_timer->adjust(screen().time_until_pos(0, 0), 0, screen().frame_period());
// zerofill
m_ef9341.TA = 0;
@@ -108,7 +108,7 @@ void ef9340_1_device::device_start()
void ef9340_1_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- switch ( id )
+ switch (id)
{
case TIMER_LINE:
ef9340_scanline(screen().vpos());
@@ -130,25 +130,25 @@ void ef9340_1_device::device_timer(emu_timer &timer, device_timer_id id, int par
u16 ef9340_1_device::ef9340_get_c_addr(u8 x, u8 y)
{
- if ( ( y & 0x18 ) == 0x18 )
+ if ((y & 0x18) == 0x18)
{
- return 0x318 | ( ( x & 0x38 ) << 2 ) | ( x & 0x07 );
+ return 0x318 | ((x & 0x38) << 2) | (x & 0x07);
}
- if ( x & 0x20 )
+ if (x & 0x20)
{
- return 0x300 | ( ( y & 0x07 ) << 5 ) | ( y & 0x18 ) | ( x & 0x07 );
+ return 0x300 | ((y & 0x07) << 5) | (y & 0x18) | (x & 0x07);
}
- return ( y & 0x1f ) << 5 | ( x & 0x1f );
+ return (y & 0x1f) << 5 | (x & 0x1f);
}
void ef9340_1_device::ef9340_inc_c()
{
m_ef9340.X++;
- if ( m_ef9340.X == 40 || m_ef9340.X == 48 || m_ef9340.X == 56 || m_ef9340.X == 64 )
+ if (m_ef9340.X == 40 || m_ef9340.X == 48 || m_ef9340.X == 56 || m_ef9340.X == 64)
{
- m_ef9340.Y = ( m_ef9340.Y + 1 ) & 0x1f;
- if ( m_ef9340.Y == 24 )
+ m_ef9340.Y = (m_ef9340.Y + 1) & 0x1f;
+ if (m_ef9340.Y == 24)
{
m_ef9340.Y = 0;
}
@@ -157,27 +157,27 @@ void ef9340_1_device::ef9340_inc_c()
}
-void ef9340_1_device::ef9341_write( u8 command, u8 b, u8 data )
+void ef9340_1_device::ef9341_write(u8 command, u8 b, u8 data)
{
- LOG("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data );
+ LOG("ef9341 %s write, t%s, data %02X\n", command ? "command" : "data", b ? "B" : "A", data);
- if ( command )
+ if (command)
{
- if ( b )
+ if (b)
{
m_ef9341.TB = data;
m_ef9341.busy = true;
- switch( m_ef9341.TB & 0xE0 )
+ switch (m_ef9341.TB & 0xe0)
{
case 0x00: /* Begin row */
m_ef9340.X = 0;
- m_ef9340.Y = m_ef9341.TA & 0x1F;
+ m_ef9340.Y = m_ef9341.TA & 0x1f;
break;
case 0x20: /* Load Y */
- m_ef9340.Y = m_ef9341.TA & 0x1F;
+ m_ef9340.Y = m_ef9341.TA & 0x1f;
break;
case 0x40: /* Load X */
- m_ef9340.X = m_ef9341.TA & 0x3F;
+ m_ef9340.X = m_ef9341.TA & 0x3f;
break;
case 0x60: /* INC C */
ef9340_inc_c();
@@ -185,13 +185,13 @@ void ef9340_1_device::ef9341_write( u8 command, u8 b, u8 data )
case 0x80: /* Load M */
m_ef9340.M = m_ef9341.TA;
break;
- case 0xA0: /* Load R */
+ case 0xa0: /* Load R */
m_ef9340.R = m_ef9341.TA;
break;
- case 0xC0: /* Load Y0 */
- m_ef9340.Y0 = m_ef9341.TA & 0x3F;
+ case 0xc0: /* Load Y0 */
+ m_ef9340.Y0 = m_ef9341.TA & 0x3f;
break;
- case 0xE0: /* Not interpreted */
+ case 0xe0: /* Not interpreted */
break;
}
m_ef9341.busy = false;
@@ -203,13 +203,13 @@ void ef9340_1_device::ef9341_write( u8 command, u8 b, u8 data )
}
else
{
- if ( b )
+ if (b)
{
- u16 addr = ef9340_get_c_addr( m_ef9340.X, m_ef9340.Y ) & 0x3ff;
+ u16 addr = ef9340_get_c_addr(m_ef9340.X, m_ef9340.Y) & 0x3ff;
m_ef9341.TB = data;
m_ef9341.busy = true;
- switch ( m_ef9340.M & 0xE0 )
+ switch (m_ef9340.M & 0xe0)
{
case 0x00: /* Write */
m_ram_a[addr] = m_ef9341.TA;
@@ -232,7 +232,7 @@ void ef9340_1_device::ef9341_write( u8 command, u8 b, u8 data )
m_write_exram(a << 12 | b << 4 | slice, m_ef9341.TA);
// Increment slice number
- m_ef9340.M = ( m_ef9340.M & 0xf0) | ( ( slice + 1 ) % 10 );
+ m_ef9340.M = (m_ef9340.M & 0xf0) | ((slice + 1) % 10);
}
break;
@@ -249,15 +249,15 @@ void ef9340_1_device::ef9341_write( u8 command, u8 b, u8 data )
}
-u8 ef9340_1_device::ef9341_read( u8 command, u8 b )
+u8 ef9340_1_device::ef9341_read(u8 command, u8 b)
{
- u8 data;
+ u8 data;
- LOG("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A" );
+ LOG("ef9341 %s read, t%s\n", command ? "command" : "data", b ? "B" : "A");
- if ( command )
+ if (command)
{
- if ( b )
+ if (b)
{
data = 0;
}
@@ -268,13 +268,13 @@ u8 ef9340_1_device::ef9341_read( u8 command, u8 b )
}
else
{
- if ( b )
+ if (b)
{
- u16 addr = ef9340_get_c_addr( m_ef9340.X, m_ef9340.Y ) & 0x3ff;
+ u16 addr = ef9340_get_c_addr(m_ef9340.X, m_ef9340.Y) & 0x3ff;
data = m_ef9341.TB;
m_ef9341.busy = true;
- switch ( m_ef9340.M & 0xE0 )
+ switch (m_ef9340.M & 0xe0)
{
case 0x20: /* Read */
m_ef9341.TA = m_ram_a[addr];
@@ -287,7 +287,7 @@ u8 ef9340_1_device::ef9341_read( u8 command, u8 b )
m_ef9341.TB = m_ram_b[addr];
break;
- case 0xA0: /* Read slice */
+ case 0xa0: /* Read slice */
{
u8 a = m_ram_a[addr];
u8 b = m_ram_b[addr];
@@ -302,7 +302,7 @@ u8 ef9340_1_device::ef9341_read( u8 command, u8 b )
m_ef9341.TA = m_charset[(((a & 0x80) | (b & 0x7f)) * 10) + slice];
// Increment slice number
- m_ef9340.M = ( m_ef9340.M & 0xf0) | ( ( slice + 1 ) % 10 );
+ m_ef9340.M = (m_ef9340.M & 0xf0) | ((slice + 1) % 10);
}
break;
@@ -344,7 +344,7 @@ void ef9340_1_device::ef9340_scanline(int vpos)
bool blank = false;
bool w_parity = false;
- if ( vpos < 10 )
+ if (vpos < 10)
{
// Service row
if (m_ef9340.R & 0x08)
diff --git a/src/devices/video/ef9340_1.h b/src/devices/video/ef9340_1.h
index 75049242436..2d9a6671d27 100644
--- a/src/devices/video/ef9340_1.h
+++ b/src/devices/video/ef9340_1.h
@@ -34,8 +34,8 @@ public:
inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; }
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void ef9341_write( u8 command, u8 b, u8 data );
- u8 ef9341_read( u8 command, u8 b );
+ void ef9341_write(u8 command, u8 b, u8 data);
+ u8 ef9341_read(u8 command, u8 b);
protected:
// device-level overrides
diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp
index 83e138aa4c7..4272f3dfeac 100644
--- a/src/devices/video/i8244.cpp
+++ b/src/devices/video/i8244.cpp
@@ -135,7 +135,7 @@ void i8244_device::device_start()
memset(m_vdc.reg, 0, 0x100);
save_pointer(NAME(m_vdc.reg), 0x100);
- memset( m_collision_map, 0, sizeof( m_collision_map ) );
+ memset(m_collision_map, 0, sizeof(m_collision_map));
save_item(NAME(m_collision_map));
save_item(NAME(m_x_beam_pos));
@@ -174,13 +174,13 @@ void i8244_device::i8244_palette(palette_device &palette) const
{ 0xff, 0xff, 0xff } // I R G B
};
- palette.set_pen_colors( 0, i8244_colors );
+ palette.set_pen_colors(0, i8244_colors);
}
void i8244_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- switch ( id )
+ switch (id)
{
case TIMER_HBLANK_START:
// hblank starts (updates sound shift register)
@@ -199,25 +199,25 @@ void i8244_device::device_timer(emu_timer &timer, device_timer_id id, int param,
}
-offs_t i8244_device::fix_register_mirrors( offs_t offset )
+offs_t i8244_device::fix_register_mirrors(offs_t offset)
{
// quad x/y registers are mirrored for each quad
- if ( ( offset & 0xC2 ) == 0x40 )
+ if ((offset & 0xc2) == 0x40)
{
- offset &= ~0x0C;
+ offset &= ~0x0c;
}
// registers $A0-$AF are mirrored at $B0-$BF
- if ( ( offset & 0xE0 ) == 0xA0 )
+ if ((offset & 0xe0) == 0xa0)
{
offset &= ~0x10;
}
- return offset & 0xFF;
+ return offset & 0xff;
}
-bool i8244_device::invalid_register( offs_t offset, bool rw )
+bool i8244_device::invalid_register(offs_t offset, bool rw)
{
// object x/y/attr registers are not accessible when display is enabled
// (sprite shape registers still are)
@@ -478,28 +478,28 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
for (int scanline = cliprect.min_y; scanline <= cliprect.max_y; scanline++)
{
/* Clear collision map */
- memset( m_collision_map, 0, sizeof( m_collision_map ) );
+ memset(m_collision_map, 0, sizeof(m_collision_map));
/* Display grid if enabled */
- if ( m_vdc.s.control & 0x08 )
+ if (m_vdc.s.control & 0x08)
{
u16 color = bitswap<4>(m_vdc.s.color,6,0,1,2);
int x_grid_offset = 13;
int y_grid_offset = 24;
int width = 16;
int height = 24;
- int w = ( m_vdc.s.control & 0x80 ) ? width : 2;
+ int w = (m_vdc.s.control & 0x80) ? width : 2;
/* Draw horizontal part of the grid */
- for ( int y = 0; y < 9; y++ )
+ for (int y = 0; y < 9; y++)
{
- if ( y_grid_offset + y * height <= scanline && scanline < y_grid_offset + y * height + 3 )
+ if (y_grid_offset + y * height <= scanline && scanline < y_grid_offset + y * height + 3)
{
- for ( int i = 0; i < 9; i++ )
+ for (int i = 0; i < 9; i++)
{
- if ( BIT(m_vdc.s.hgrid[1][i] << 8 | m_vdc.s.hgrid[0][i], y) )
+ if (BIT(m_vdc.s.hgrid[1][i] << 8 | m_vdc.s.hgrid[0][i], y))
{
- for ( int k = 0; k < width + 2; k++ )
+ for (int k = 0; k < width + 2; k++)
{
int x = (x_grid_offset + i * width + k) * 2;
@@ -507,8 +507,8 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
{
if (cliprect.contains(px, scanline))
{
- m_collision_map[ px ] |= 0x20;
- bitmap.pix( scanline, px ) = color;
+ m_collision_map[px] |= 0x20;
+ bitmap.pix(scanline, px) = color;
}
}
}
@@ -518,15 +518,15 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
}
/* Draw dots part of the grid */
- if ( m_vdc.s.control & 0x40 )
+ if (m_vdc.s.control & 0x40)
{
- for ( int y = 0; y < 9; y++ )
+ for (int y = 0; y < 9; y++)
{
- if ( y_grid_offset + y * height <= scanline && scanline < y_grid_offset + y * height + 3 )
+ if (y_grid_offset + y * height <= scanline && scanline < y_grid_offset + y * height + 3)
{
- for ( int i = 0; i < 10; i++ )
+ for (int i = 0; i < 10; i++)
{
- for ( int k = 0; k < 2; k++ )
+ for (int k = 0; k < 2; k++)
{
int x = (x_grid_offset + i * width + k) * 2;
@@ -534,8 +534,8 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
{
if (cliprect.contains(px, scanline))
{
- m_collision_map[ px ] |= 0x20;
- bitmap.pix( scanline, px ) = color;
+ m_collision_map[px] |= 0x20;
+ bitmap.pix(scanline, px) = color;
}
}
}
@@ -545,15 +545,15 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
}
/* Draw vertical part of the grid */
- for( int j = 1, y = 0; y < 8; y++, j <<= 1 )
+ for (int j = 1, y = 0; y < 8; y++, j <<= 1)
{
- if ( y_grid_offset + y * height <= scanline && scanline < y_grid_offset + ( y + 1 ) * height )
+ if (y_grid_offset + y * height <= scanline && scanline < y_grid_offset + (y + 1) * height)
{
- for ( int i = 0; i < 10; i++ )
+ for (int i = 0; i < 10; i++)
{
- if ( m_vdc.s.vgrid[i] & j )
+ if (m_vdc.s.vgrid[i] & j)
{
- for ( int k = 0; k < w; k++ )
+ for (int k = 0; k < w; k++)
{
int x = (x_grid_offset + i * width + k) * 2;
@@ -561,8 +561,8 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
{
if (cliprect.contains(px, scanline))
{
- m_collision_map[ px ] |= 0x10;
- bitmap.pix( scanline, px ) = color;
+ m_collision_map[px] |= 0x10;
+ bitmap.pix(scanline, px) = color;
}
}
}
@@ -573,37 +573,37 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
}
/* Display objects if enabled */
- if ( m_vdc.s.control & 0x20 && scanline <= 242 )
+ if (m_vdc.s.control & 0x20 && scanline <= 242)
{
/* Quad objects */
- for ( int i = ARRAY_LENGTH( m_vdc.s.quad ) - 1; i >= 0; i-- )
+ for (int i = ARRAY_LENGTH(m_vdc.s.quad) - 1; i >= 0; i--)
{
int y = m_vdc.s.quad[i].single[0].y;
// Character height is always determined by the height of the 4th character
- int height = 8 - ( ( ( y >> 1 ) + m_vdc.s.quad[i].single[3].ptr ) & 7 );
+ int height = 8 - (((y >> 1) + m_vdc.s.quad[i].single[3].ptr) & 7);
if (height == 1) height = 8;
- if ( y <= scanline && scanline < y + height * 2 )
+ if (y <= scanline && scanline < y + height * 2)
{
int x = (m_vdc.s.quad[i].single[0].x + 5) * 2;
- for ( int j = 0; j < ARRAY_LENGTH( m_vdc.s.quad[0].single ); j++, x += 16 )
+ for (int j = 0; j < ARRAY_LENGTH(m_vdc.s.quad[0].single); j++, x += 16)
{
- u16 color = 8 + ( ( m_vdc.s.quad[i].single[j].color >> 1 ) & 0x07 );
- int offset = ( m_vdc.s.quad[i].single[j].ptr | ( ( m_vdc.s.quad[i].single[j].color & 0x01 ) << 8 ) ) + ( y >> 1 ) + ( ( scanline - y ) >> 1 );
- u8 chr = m_charset[ offset & 0x1FF ];
+ u16 color = 8 + ((m_vdc.s.quad[i].single[j].color >> 1) & 0x07);
+ int offset = (m_vdc.s.quad[i].single[j].ptr | ((m_vdc.s.quad[i].single[j].color & 0x01) << 8)) + (y >> 1) + ((scanline - y) >> 1);
+ u8 chr = m_charset[offset & 0x1ff];
- for ( u8 m = 0x80; m > 0; m >>= 1, x += 2 )
+ for (u8 m = 0x80; m > 0; m >>= 1, x += 2)
{
- if ( chr & m )
+ if (chr & m)
{
for (int px = x; px < x + 2; px++)
{
if (cliprect.contains(px, scanline))
{
// Check collision with self
- u8 colx = m_collision_map[ px ];
+ u8 colx = m_collision_map[px];
if (colx & 0x80)
{
colx &= ~0x80;
@@ -618,8 +618,8 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
if (m_vdc.s.collision & 0x80)
m_collision_status |= colx;
- m_collision_map[ px ] |= 0x80;
- bitmap.pix( scanline, px ) = color;
+ m_collision_map[px] |= 0x80;
+ bitmap.pix(scanline, px) = color;
}
}
}
@@ -629,29 +629,29 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
}
/* Regular foreground objects */
- for ( int i = ARRAY_LENGTH( m_vdc.s.foreground ) - 1; i >= 0; i-- )
+ for (int i = ARRAY_LENGTH(m_vdc.s.foreground) - 1; i >= 0; i--)
{
int y = m_vdc.s.foreground[i].y;
- int height = 8 - ( ( ( y >> 1 ) + m_vdc.s.foreground[i].ptr ) & 7 );
+ int height = 8 - (((y >> 1) + m_vdc.s.foreground[i].ptr) & 7);
if (height == 1) height = 8;
- if ( y <= scanline && scanline < y + height * 2 )
+ if (y <= scanline && scanline < y + height * 2)
{
- u16 color = 8 + ( ( m_vdc.s.foreground[i].color >> 1 ) & 0x07 );
- int offset = ( m_vdc.s.foreground[i].ptr | ( ( m_vdc.s.foreground[i].color & 0x01 ) << 8 ) ) + ( y >> 1 ) + ( ( scanline - y ) >> 1 );
- u8 chr = m_charset[ offset & 0x1FF ];
+ u16 color = 8 + ((m_vdc.s.foreground[i].color >> 1) & 0x07);
+ int offset = (m_vdc.s.foreground[i].ptr | ((m_vdc.s.foreground[i].color & 0x01) << 8)) + (y >> 1) + ((scanline - y) >> 1);
+ u8 chr = m_charset[offset & 0x1ff];
int x = (m_vdc.s.foreground[i].x + 5) * 2;
- for ( u8 m = 0x80; m > 0; m >>= 1, x += 2 )
+ for (u8 m = 0x80; m > 0; m >>= 1, x += 2)
{
- if ( chr & m )
+ if (chr & m)
{
for (int px = x; px < x + 2; px++)
{
if (cliprect.contains(px, scanline))
{
// Check collision with self
- u8 colx = m_collision_map[ px ];
+ u8 colx = m_collision_map[px];
if (colx & 0x80)
{
colx &= ~0x80;
@@ -666,8 +666,8 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
if (m_vdc.s.collision & 0x80)
m_collision_status |= colx;
- m_collision_map[ px ] |= 0x80;
- bitmap.pix( scanline, px ) = color;
+ m_collision_map[px] |= 0x80;
+ bitmap.pix(scanline, px) = color;
}
}
}
@@ -676,30 +676,30 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
}
/* Sprites */
- for ( int i = ARRAY_LENGTH( m_vdc.s.sprites ) - 1; i >= 0; i-- )
+ for (int i = ARRAY_LENGTH(m_vdc.s.sprites) - 1; i >= 0; i--)
{
int y = m_vdc.s.sprites[i].y;
int height = 8;
bool zoom_enable = bool(m_vdc.s.sprites[i].color & 4);
int zoom_px = zoom_enable ? 4 : 2;
- if ( y <= scanline && scanline < y + height * zoom_px )
+ if (y <= scanline && scanline < y + height * zoom_px)
{
- u16 color = 8 + ( ( m_vdc.s.sprites[i].color >> 3 ) & 0x07 );
- u8 chr = m_vdc.s.shape[i][ ( ( scanline - y ) / zoom_px ) ];
+ u16 color = 8 + ((m_vdc.s.sprites[i].color >> 3) & 0x07);
+ u8 chr = m_vdc.s.shape[i][((scanline - y) / zoom_px)];
int x = (m_vdc.s.sprites[i].x + 5) * 2;
int x_shift = 0;
- switch ( m_vdc.s.sprites[i].color & 0x03 )
+ switch (m_vdc.s.sprites[i].color & 0x03)
{
case 1: // Xg attribute set
x_shift = 1;
break;
case 2: // S attribute set
- x_shift = ( ( ( scanline - y ) / zoom_px ) & 0x01 ) ^ 0x01;
+ x_shift = (((scanline - y) / zoom_px) & 0x01) ^ 0x01;
break;
case 3: // Xg and S attributes set
- x_shift = ( ( scanline - y ) / zoom_px ) & 0x01;
+ x_shift = ((scanline - y) / zoom_px) & 0x01;
break;
default:
break;
@@ -707,9 +707,9 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
x += x_shift * (zoom_px / 2);
- for ( u8 m = 0x01; m > 0; m <<= 1, x += zoom_px )
+ for (u8 m = 0x01; m > 0; m <<= 1, x += zoom_px)
{
- if ( chr & m )
+ if (chr & m)
{
for (int px = x; px < x + zoom_px; px++)
{
@@ -718,15 +718,15 @@ u32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con
u8 mask = 1 << i;
// Check if we collide with an already drawn source object
- if (m_vdc.s.collision & m_collision_map[ px ])
+ if (m_vdc.s.collision & m_collision_map[px])
m_collision_status |= mask;
// Check if an already drawn object would collide with us
if (m_vdc.s.collision & mask)
- m_collision_status |= m_collision_map[ px ];
+ m_collision_status |= m_collision_map[px];
- m_collision_map[ px ] |= mask;
- bitmap.pix( scanline, px ) = color;
+ m_collision_map[px] |= mask;
+ bitmap.pix(scanline, px) = color;
}
}
}
@@ -783,9 +783,9 @@ void i8244_device::sound_update()
// loop sound
signal |= feedback << 23;
- m_vdc.s.shift3 = signal & 0xFF;
- m_vdc.s.shift2 = ( signal >> 8 ) & 0xFF;
- m_vdc.s.shift1 = ( signal >> 16 ) & 0xFF;
+ m_vdc.s.shift3 = signal & 0xff;
+ m_vdc.s.shift2 = (signal >> 8) & 0xff;
+ m_vdc.s.shift1 = (signal >> 16) & 0xff;
// sound interrupt
if (++m_sh_count == 24)
diff --git a/src/devices/video/i8244.h b/src/devices/video/i8244.h
index 685b75a2104..565ed13826f 100644
--- a/src/devices/video/i8244.h
+++ b/src/devices/video/i8244.h
@@ -103,8 +103,8 @@ protected:
int get_y_beam();
int get_x_beam();
- offs_t fix_register_mirrors( offs_t offset );
- bool invalid_register( offs_t offset, bool rw );
+ offs_t fix_register_mirrors(offs_t offset);
+ bool invalid_register(offs_t offset, bool rw);
/* timers */
static constexpr device_timer_id TIMER_VBLANK_START = 0;
diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp
index f09988674d8..da3a27a003b 100644
--- a/src/mame/drivers/odyssey2.cpp
+++ b/src/mame/drivers/odyssey2.cpp
@@ -420,9 +420,9 @@ u8 vpp_state::io_vpp(offs_t offset, u8 data)
{
// A2 to R/W pin
if (offset & 4)
- data &= m_ef934x->ef9341_read( offset & 0x02, offset & 0x01 );
+ data &= m_ef934x->ef9341_read(offset & 0x02, offset & 0x01);
else
- m_ef934x->ef9341_write( offset & 0x02, offset & 0x01, data );
+ m_ef934x->ef9341_write(offset & 0x02, offset & 0x01, data);
}
return data;