diff options
Diffstat (limited to 'src/mame/drivers/suna8.cpp')
-rw-r--r-- | src/mame/drivers/suna8.cpp | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/mame/drivers/suna8.cpp b/src/mame/drivers/suna8.cpp index cee556043a0..cf0abc02232 100644 --- a/src/mame/drivers/suna8.cpp +++ b/src/mame/drivers/suna8.cpp @@ -240,7 +240,7 @@ rom13: 0?, 1y, 2n, 3n ?,?,?,? (palettes) 8?, 9n?,an, bn y,y,?,? (player anims) cn, dy, en, fn y,y,n,n */ - static const uint8_t swaptable[0x50] = + static constexpr uint8_t swaptable[0x50] = { 1,1,1,1,0,0,1,1, 0,0,0,0,0,0,0,0, // 8000-ffff not used 1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0, @@ -259,12 +259,12 @@ rom13: 0?, 1y, 2n, 3n ?,?,?,? (palettes) /* Opcodes */ for (int i = 0; i < 0x8000; i++) { - static const uint8_t swaptable[32] = + static constexpr uint8_t swaptable[32] = { 1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1, 1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,0 }; - static const uint8_t xortable[32] = + static constexpr uint8_t xortable[32] = { 0x04,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x04,0x45,0x00,0x04,0x00,0x04,0x00,0x00, 0x04,0x45,0x00,0x04,0x00,0x04,0x00,0x00,0x04,0x04,0x00,0x04,0x00,0x04,0x00,0x00 @@ -283,7 +283,7 @@ rom13: 0?, 1y, 2n, 3n ?,?,?,? (palettes) /* Data */ for (int i = 0; i < 0x8000; i++) { - static const uint8_t swaptable[8] = { 1,1,0,1,0,1,1,0 }; + static constexpr uint8_t swaptable[8] = { 1,1,0,1,0,1,1,0 }; if (swaptable[(i & 0x7000) >> 12]) RAM[i] = bitswap<8>(RAM[i], 5,6,7,4,3,2,1,0) ^ 0x41; @@ -318,7 +318,7 @@ void suna8_state::init_starfigh() memcpy(decrypt, RAM, size); for (int i = 0; i < 0x50000; i++) { - static const uint8_t swaptable[0x50] = + static constexpr uint8_t swaptable[0x50] = { 1,1,1,1, 1,1,0,0, 0,0,0,0, 0,0,0,0, // 8000-ffff not used 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -337,12 +337,12 @@ void suna8_state::init_starfigh() /* Opcodes */ for (int i = 0; i < 0x8000; i++) { - static const uint8_t swaptable[32] = + static constexpr uint8_t swaptable[32] = { 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; - static const uint8_t xortable[32] = + static constexpr uint8_t xortable[32] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x41,0x01,0x00,0x00,0x00,0x00, 0x01,0x01,0x41,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 @@ -361,7 +361,7 @@ void suna8_state::init_starfigh() /* Data */ for (int i = 0; i < 0x8000; i++) { - static const uint8_t swaptable[8] = { 1,1,0,1,0,1,1,0 }; + static constexpr uint8_t swaptable[8] = { 1,1,0,1,0,1,1,0 }; if (swaptable[(i & 0x7000) >> 12]) RAM[i] = bitswap<8>(RAM[i], 5,6,7,4,3,2,1,0) ^ 0x45; @@ -401,7 +401,7 @@ void suna8_state::init_sparkman() memcpy(decrypt, RAM, size); for (int i = 0; i < 0x50000; i++) { - static const uint8_t swaptable[0x50] = + static constexpr uint8_t swaptable[0x50] = { 1,1,1,1, 0,0,1,1, 0,0,0,0, 0,0,0,0, // 8000-ffff not used 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -420,12 +420,12 @@ void suna8_state::init_sparkman() /* Opcodes */ for (int i = 0; i < 0x8000; i++) { - static const uint8_t swaptable[32] = + static constexpr uint8_t swaptable[32] = { 0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1, 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0 }; - static const uint8_t xortable[32] = + static constexpr uint8_t xortable[32] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00 @@ -444,7 +444,7 @@ void suna8_state::init_sparkman() /* Data */ for (int i = 0; i < 0x8000; i++) { - static const uint8_t swaptable[8] = { 1,1,1,0,1,1,0,1 }; + static constexpr uint8_t swaptable[8] = { 1,1,1,0,1,1,0,1 }; if (swaptable[(i & 0x7000) >> 12]) RAM[i] = bitswap<8>(RAM[i], 5,6,7,4,3,2,1,0) ^ 0x44; @@ -1900,8 +1900,7 @@ void suna8_state::hardhead(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_suna8); - PALETTE(config, m_palette, 256); - m_palette->set_format(PALETTE_FORMAT_RRRRGGGGBBBBxxxx); + PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 256); m_palette->set_endianness(ENDIANNESS_BIG); MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text) @@ -1957,8 +1956,7 @@ void suna8_state::rranger(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_suna8); - PALETTE(config, m_palette, 256); - m_palette->set_format(PALETTE_FORMAT_RRRRGGGGBBBBxxxx); + PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 256); m_palette->set_endianness(ENDIANNESS_BIG); MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_text) @@ -2025,8 +2023,7 @@ void suna8_state::brickzn11(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_suna8); - PALETTE(config, m_palette, 256 * 2); // 2 x Palette RAM - m_palette->set_format(PALETTE_FORMAT_RRRRGGGGBBBBxxxx); + PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 256 * 2); // 2 x palette RAM m_palette->set_endianness(ENDIANNESS_BIG); MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_brickzn) @@ -2099,8 +2096,8 @@ void suna8_state::hardhea2(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(suna8_state::hardhea2_interrupt), "screen", 0, 1); MCFG_MACHINE_RESET_OVERRIDE(suna8_state,hardhea2) - m_palette->set_entries(256); - m_palette->set_format(PALETTE_FORMAT_RRRRGGGGBBBBxxxx); + + m_palette->set_format(palette_device::RGBx_444, 256); m_palette->set_endianness(ENDIANNESS_BIG); } @@ -2140,8 +2137,7 @@ void suna8_state::starfigh(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_suna8); - PALETTE(config, m_palette, 256); - m_palette->set_format(PALETTE_FORMAT_RRRRGGGGBBBBxxxx); + PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 256); m_palette->set_endianness(ENDIANNESS_BIG); MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_starfigh) @@ -2193,8 +2189,7 @@ void suna8_state::sparkman(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_suna8_x2); // 2 sprite "chips" - PALETTE(config, m_palette, 512); - m_palette->set_format(PALETTE_FORMAT_RRRRGGGGBBBBxxxx); + PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 512); m_palette->set_endianness(ENDIANNESS_BIG); MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_sparkman) |