diff options
Diffstat (limited to 'src/mame/drivers/atarigt.cpp')
-rw-r--r-- | src/mame/drivers/atarigt.cpp | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index 5a57281b5c7..c3c34ea1187 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -103,7 +103,7 @@ WRITE8_MEMBER(atarigt_state::cage_irq_callback) READ32_MEMBER(atarigt_state::special_port2_r) { - int temp = ioport("SERVICE")->read(); + int temp = m_service_io->read(); temp ^= 0x0001; /* /A2DRDY always high for now */ return (temp << 16) | temp; } @@ -111,7 +111,7 @@ READ32_MEMBER(atarigt_state::special_port2_r) READ32_MEMBER(atarigt_state::special_port3_r) { - int temp = ioport("COIN")->read(); + int temp = m_coin_io->read(); if (m_video_int_state) temp ^= 0x0001; if (m_scanline_int_state) temp ^= 0x0002; return (temp << 16) | temp; @@ -121,7 +121,7 @@ READ32_MEMBER(atarigt_state::special_port3_r) inline void atarigt_state::compute_fake_pots(int *pots) { #if (HACK_TMEK_CONTROLS) - int fake = ioport("FAKE")->read(); + int fake = m_fake_io->read(); pots[0] = pots[1] = pots[2] = pots[3] = 0x80; @@ -412,12 +412,12 @@ void atarigt_state::primrage_protection_w(address_space &space, offs_t offset, u primrage_update_mode(offset); /* check for certain read sequences */ - if (m_protmode == 1 && offset >= 0xdc7800 && offset < 0xdc7800 + sizeof(m_protdata) * 2) - m_protdata[(offset - 0xdc7800) / 2] = data; + if (m_protmode == 1 && offset >= 0xdc7800 && offset < 0xdc7800 + (0x800 * 2)) + m_protdata[(offset - 0xdc7800) >> 1] = data; if (m_protmode == 2) { - int temp = (offset - 0xdc7800) / 2; + int temp = (offset - 0xdc7800) >> 1; if (LOG_PROTECTION) logerror("prot:mode 2 param = %04X\n", temp); m_protresult = temp * 0x6915 + 0x6915; } @@ -730,7 +730,7 @@ static const gfx_layout pflayout = 5, { 0, 0, 1, 2, 3 }, { RGN_FRAC(1,3)+0, RGN_FRAC(1,3)+4, 0, 4, RGN_FRAC(1,3)+8, RGN_FRAC(1,3)+12, 8, 12 }, - { 0*8, 2*8, 4*8, 6*8, 8*8, 10*8, 12*8, 14*8 }, + { STEP8(0,16) }, 16*8 }; @@ -742,7 +742,7 @@ static const gfx_layout pftoplayout = 6, { RGN_FRAC(2,3)+0, RGN_FRAC(2,3)+4, 0, 0, 0, 0 }, { 3, 2, 1, 0, 11, 10, 9, 8 }, - { 0*8, 2*8, 4*8, 6*8, 8*8, 10*8, 12*8, 14*8 }, + { STEP8(0,16) }, 16*8 }; @@ -752,9 +752,9 @@ static const gfx_layout anlayout = 8,8, RGN_FRAC(1,1), 4, - { 0, 1, 2, 3 }, - { 0, 4, 8, 12, 16, 20, 24, 28 }, - { 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8 }, + { STEP4(0,1) }, + { STEP8(0,4) }, + { STEP8(0,4*8) }, 32*8 }; @@ -811,7 +811,7 @@ MACHINE_CONFIG_START(atarigt_state::atarigt) /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarigt) - MCFG_PALETTE_ADD("palette", 32768) + MCFG_PALETTE_ADD("palette", MRAM_ENTRIES) MCFG_TILEMAP_ADD_CUSTOM("playfield", "gfxdecode", 2, atarigt_state, get_playfield_tile_info, 8,8, atarigt_playfield_scan, 128,64) MCFG_TILEMAP_ADD_STANDARD("alpha", "gfxdecode", 2, atarigt_state, get_alpha_tile_info, 8,8, SCAN_ROWS, 64, 32) @@ -869,7 +869,7 @@ ROM_START( tmek ) ROM_LOAD32_BYTE( "0042d", 0x00002, 0x20000, CRC(ef9feda4) SHA1(9fb6e91d4c22e28ced61d0d1f28f5e43191c8762) ) ROM_LOAD32_BYTE( "0041d", 0x00003, 0x20000, CRC(179da056) SHA1(5f7ddf44aab55beaf2c377b0c93279acb6273255) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "0078c", 0x000000, 0x080000, CRC(ff5b979a) SHA1(deb8ee454b6b7c7bddb2ba0c808869e45b19e55f) ) ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -924,7 +924,7 @@ ROM_START( tmek51p ) ROM_LOAD32_BYTE( "prog2", 0x00002, 0x20000, CRC(bdcf5942) SHA1(21c54694bfe1e5663e67a54afed2a0f37b0f00de) ) ROM_LOAD32_BYTE( "prog3", 0x00003, 0x20000, CRC(7b59022a) SHA1(7395063ff0ecda0453dc7d981ca0b90b8411b715) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "0078c", 0x000000, 0x080000, CRC(ff5b979a) SHA1(deb8ee454b6b7c7bddb2ba0c808869e45b19e55f) ) ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -979,7 +979,7 @@ ROM_START( tmek45 ) ROM_LOAD32_BYTE( "0042c", 0x00002, 0x20000, CRC(ba8745be) SHA1(139a3132ea2c69e37e63868402fcf10852953e9b) ) ROM_LOAD32_BYTE( "0041c", 0x00003, 0x20000, CRC(0285bc17) SHA1(346d9fcbea4b22986be04971074531bc0c014c79) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "0078b", 0x000000, 0x080000, CRC(a952771c) SHA1(49982ea864a99c07f45886ada7e2c9427a75f775) ) ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -1034,7 +1034,7 @@ ROM_START( tmek44 ) ROM_LOAD32_BYTE( "0042b", 0x00002, 0x20000, CRC(ce68a9b3) SHA1(47b7a0ac8cce3d40f3f7559ec1b137dfdeaf1d83) ) ROM_LOAD32_BYTE( "0041b", 0x00003, 0x20000, CRC(b71ec759) SHA1(d4bed4bbab2c3bd278da4cd0f53580d7f66d8152) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "0078a", 0x000000, 0x080000, CRC(314d736f) SHA1(b23946fde6ea47d6a6e3430a9df4b06d453a94c8) ) ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -1089,7 +1089,7 @@ ROM_START( tmek20 ) ROM_LOAD32_BYTE( "pgm2", 0x00002, 0x20000, CRC(ce9a77d4) SHA1(025143b59d85180286086940b05c8e5ea0b4a7fe) ) ROM_LOAD32_BYTE( "pgm3", 0x00003, 0x20000, CRC(28b0e210) SHA1(7567671beecc7d30e9d4b61cf7d3448bb1dbb072) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "0078", 0x000000, 0x080000, BAD_DUMP CRC(314d736f) SHA1(b23946fde6ea47d6a6e3430a9df4b06d453a94c8) ) // not dumped from this pcb, rom taken from another set instead ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -1144,7 +1144,7 @@ ROM_START( primrage ) ROM_LOAD32_BYTE( "136102-1042b.27l", 0x000002, 0x80000, CRC(750e8095) SHA1(4660637136b1a25169d8c43646c8b87081763987) ) ROM_LOAD32_BYTE( "136102-1041b.25l", 0x000003, 0x80000, CRC(6a90d283) SHA1(7c18c97cb5e5cdd26a52cd6bc099fbce87055311) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "136102-1078a.11a", 0x000000, 0x080000, CRC(0656435f) SHA1(f8e498171e754eb8703dad6b2351509bbb27e06b) ) ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -1230,7 +1230,7 @@ ROM_START( primrage20 ) ROM_LOAD32_BYTE( "136102-0042b.27l", 0x000002, 0x80000, CRC(cd6062b9) SHA1(2973fb561ab68cd48ec132b6720c04d10bedfd19) ) ROM_LOAD32_BYTE( "136102-0041b.25l", 0x000003, 0x80000, CRC(3008f6f0) SHA1(45aac457b4584ee3bd3561e3b2e34e49aa61fbc5) ) - ROM_REGION32_LE( 0x200000, "cageboot", 0 ) /* TMS320C31 boot ROM */ + ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) /* TMS320C31 boot ROM */ ROM_LOAD32_BYTE( "136102-0078a.11a", 0x000000, 0x080000, CRC(91df8d8f) SHA1(6d361f88de604b8f11dd9bfe85ff18bcd322862d) ) ROM_REGION32_LE( 0x1000000, "cage", 0 ) /* TMS320C31 sound ROMs */ @@ -1308,7 +1308,7 @@ WRITE32_MEMBER(atarigt_state::tmek_pf_w) void atarigt_state::init_tmek() { - m_is_primrage = 0; + m_is_primrage = false; /* setup protection */ m_protection_r = &atarigt_state::tmek_protection_r; @@ -1321,11 +1321,14 @@ void atarigt_state::init_tmek() void atarigt_state::init_primrage() { - m_is_primrage = 1; + m_is_primrage = true; /* install protection */ m_protection_r = &atarigt_state::primrage_protection_r; m_protection_w = &atarigt_state::primrage_protection_w; + + m_protdata = make_unique_clear<uint8_t[]>(0x800); + save_pointer(NAME(m_protdata), 0x800); } /************************************* |