From 57335569de785146f8d33dd6bddfce795c5c31f1 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Wed, 28 Jan 2015 04:32:34 -0500 Subject: tx1.c: reduce tagmap lookups (nw) --- src/mame/drivers/tx1.c | 42 ++++++++++++------------ src/mame/includes/tx1.h | 14 ++++++++ src/mame/video/tx1.c | 85 +++++++++++++++++++++++-------------------------- 3 files changed, 75 insertions(+), 66 deletions(-) diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c index bb6150dab9c..b620f409d5d 100644 --- a/src/mame/drivers/tx1.c +++ b/src/mame/drivers/tx1.c @@ -795,17 +795,17 @@ ROM_START( tx1 ) ROM_REGION( 0x10000, "audio_cpu", 0 ) ROM_LOAD( "8411-136027-157.11", 0x00000, 0x2000, CRC(10ae3075) SHA1(69c5f62f2473aba848383eed3cecf15e273d86ca) ) - ROM_REGION( 0x20000, "char_tiles", 0 ) + ROM_REGION( 0x8000, "char_tiles", 0 ) ROM_LOAD( "8411-136027-156.204", 0x0000, 0x4000, CRC(60f3c616) SHA1(59c4361891e4274e27e6279c919e8fd6803af7cf) ) ROM_LOAD( "8411-136027-155.174", 0x4000, 0x4000, CRC(e59a6b72) SHA1(c10efa77ab421ac60b97227a8d547f50f8415670) ) - ROM_REGION( 0x40000, "obj_tiles", 0 ) + ROM_REGION( 0x10000, "obj_tiles", 0 ) ROM_LOAD( "8411-136027-114.203", 0x0000, 0x4000, CRC(fc91328b) SHA1(e57fd2056b65d37cf2e1f0af56616c6555df3006) ) ROM_LOAD( "8411-136027-116.258", 0x4000, 0x4000, CRC(5745f671) SHA1(6e471633cd6de9926b3361a84430c088e1f6a097) ) ROM_LOAD( "8411-136027-115.173", 0x8000, 0x4000, CRC(720e5873) SHA1(151d9063c35b26f5876cf94bdf0c2665ec701bbd) ) ROM_LOAD( "8411-136027-117.232", 0xc000, 0x4000, CRC(3c68d0bc) SHA1(2dbaf2a268b90214fd61c016ac945d4371057826) ) - ROM_REGION( 0x40000, "gfx3", 0 ) + ROM_REGION( 0x6000, "road", 0 ) ROM_LOAD( "8411-136027-146.56", 0x0000, 0x2000, CRC(5635b8c1) SHA1(5cc9437a2ff0843f1917f2451852d4561c240b24) ) ROM_LOAD( "8411-136027-147.66", 0x2000, 0x2000, CRC(03d83cf8) SHA1(5c0cfc6bf02ad2b3f37e1ceb493f69eb9829ab1e) ) ROM_LOAD( "8411-136027-148.76", 0x4000, 0x2000, CRC(ad56013a) SHA1(ae3a91f58f30daff334754476db33ad1d12569fc) ) @@ -816,11 +816,11 @@ ROM_START( tx1 ) ROM_LOAD16_BYTE( "136027-143.ic223", 0x8000, 0x0200, CRC(22c77af6) SHA1(1be8585b95316b4fc5712cdaef699e676320cd4d) ) ROM_LOAD16_BYTE( "136027-142.ic213", 0x8001, 0x0200, CRC(f6b8b70b) SHA1(b79374acf11d71db1e4ad3c494ac5f500a52677b) ) - ROM_REGION( 0x50000, "obj_map", 0 ) + ROM_REGION( 0x8000, "obj_map", 0 ) ROM_LOAD( "8411-136027-119.106", 0x0000, 0x4000, CRC(88eec0fb) SHA1(81d7a69dc1a4b3b81d7f28d97a3f80697cdcc6eb) ) ROM_LOAD( "8411-136027-120.73", 0x4000, 0x4000, CRC(407cbe65) SHA1(e1c11b65f3c6abde6d55afeaffdb39cdd6d66377) ) - ROM_REGION( 0x50000, "user3", 0 ) + ROM_REGION( 0x6000, "obj_luts", 0 ) ROM_LOAD( "8411-136027-113.48", 0x0000, 0x2000, CRC(4b3d7956) SHA1(fc2432dd69f3be7007d4fd6f7c86c7c19453b1ba) ) ROM_LOAD( "8411-136027-118.281", 0x2000, 0x4000, CRC(de418dc7) SHA1(1233e2f7499ec5a73a40ee336d3fe26c06187784) ) @@ -882,17 +882,17 @@ ROM_START( tx1jb ) ROM_REGION( 0x10000, "audio_cpu", 0 ) ROM_LOAD( "tx1_22h.ic9", 0x00000, 0x2000, CRC(66376232) SHA1(b8a026dae47173e7760eea4f52e67e525ad1b70b) ) - ROM_REGION( 0x20000, "char_tiles", 0 ) + ROM_REGION( 0x8000, "char_tiles", 0 ) ROM_LOAD( "tx1_21a.ic204", 0x0000, 0x4000, CRC(cd3441ad) SHA1(8e6597b3177b8aaa34ed3373d85fc4b6231e1333) ) ROM_LOAD( "tx1_20a.ic174", 0x4000, 0x4000, CRC(dbe595fc) SHA1(1ed2f775f0a1b46a2ffbc056eb4ef732ed546d3c) ) - ROM_REGION( 0x40000, "obj_tiles", 0 ) + ROM_REGION( 0x10000, "obj_tiles", 0 ) ROM_LOAD( "tx1_16b.ic203", 0x0000, 0x4000, CRC(1141c965) SHA1(4b90c1428bcbd72d0449c064856a5596269b3fc6) ) ROM_LOAD( "tx1_18b.ic258", 0x4000, 0x4000, CRC(0ad36d68) SHA1(fd5a65c56557c1bc9c0f3916f15f62500b52bfe0) ) ROM_LOAD( "tx1_15b.ic173", 0x8000, 0x4000, CRC(30d1a8d5) SHA1(b4c585b7b8a8920bb3949d643e9e10c17d4009a0) ) ROM_LOAD( "tx1_17b.ic232", 0xc000, 0x4000, CRC(364bb354) SHA1(a26581ca1088b979285471e2c6595048df84d75e) ) - ROM_REGION( 0x40000, "gfx3", 0 ) + ROM_REGION( 0x6000, "road", 0 ) ROM_LOAD( "tx1_5a.ic56", 0x0000, 0x2000, CRC(5635b8c1) SHA1(5cc9437a2ff0843f1917f2451852d4561c240b24) ) ROM_LOAD( "tx1_6a.ic66", 0x2000, 0x2000, CRC(03d83cf8) SHA1(5c0cfc6bf02ad2b3f37e1ceb493f69eb9829ab1e) ) ROM_LOAD( "tx1_7a.ic76", 0x4000, 0x2000, CRC(ad56013a) SHA1(ae3a91f58f30daff334754476db33ad1d12569fc) ) @@ -903,11 +903,11 @@ ROM_START( tx1jb ) ROM_LOAD16_BYTE( "xb02b.ic223", 0x8000, 0x0200, CRC(22c77af6) SHA1(1be8585b95316b4fc5712cdaef699e676320cd4d) ) ROM_LOAD16_BYTE( "xb01b.ic213", 0x8001, 0x0200, CRC(f6b8b70b) SHA1(b79374acf11d71db1e4ad3c494ac5f500a52677b) ) - ROM_REGION( 0x50000, "obj_map", 0 ) + ROM_REGION( 0x8000, "obj_map", 0 ) ROM_LOAD( "tx1_14b.ic106", 0x0000, 0x4000, CRC(68c63d6e) SHA1(110e02b99c44d31041be588bd14642e26890ecbd) ) ROM_LOAD( "tx1_13b.ic73", 0x4000, 0x4000, CRC(b0c581b2) SHA1(20926bc15e7c97045b219b828acfcdd99b8712a6) ) - ROM_REGION( 0x50000, "user3", 0 ) + ROM_REGION( 0x6000, "obj_luts", 0 ) ROM_LOAD( "tx1_12b.ic48", 0x0000, 0x2000, CRC(4b3d7956) SHA1(fc2432dd69f3be7007d4fd6f7c86c7c19453b1ba) ) ROM_LOAD( "tx1_19b.ic281", 0x2000, 0x4000, CRC(cb250de6) SHA1(4bf3006986fb8cbb3dd4fa988e6471633614e4bb) ) @@ -963,17 +963,17 @@ ROM_START( tx1jc ) ROM_REGION( 0x10000, "audio_cpu", 0 ) /* Label was missing */ ROM_LOAD( "8411-136027-157.11", 0x00000, 0x2000, CRC(10ae3075) SHA1(69c5f62f2473aba848383eed3cecf15e273d86ca) ) /* Unconfirmed TC013A or the later TC013B */ - ROM_REGION( 0x20000, "char_tiles", 0 ) + ROM_REGION( 0x8000, "char_tiles", 0 ) ROM_LOAD( "tx1_21a.ic204", 0x0000, 0x4000, CRC(cd3441ad) SHA1(8e6597b3177b8aaa34ed3373d85fc4b6231e1333) ) ROM_LOAD( "tx1_20a.ic174", 0x4000, 0x4000, CRC(dbe595fc) SHA1(1ed2f775f0a1b46a2ffbc056eb4ef732ed546d3c) ) - ROM_REGION( 0x40000, "obj_tiles", 0 ) + ROM_REGION( 0x10000, "obj_tiles", 0 ) ROM_LOAD( "tx1_16b.ic203", 0x0000, 0x4000, CRC(1141c965) SHA1(4b90c1428bcbd72d0449c064856a5596269b3fc6) ) ROM_LOAD( "tx1_18b.ic258", 0x4000, 0x4000, CRC(0ad36d68) SHA1(fd5a65c56557c1bc9c0f3916f15f62500b52bfe0) ) ROM_LOAD( "tx1_15b.ic173", 0x8000, 0x4000, CRC(30d1a8d5) SHA1(b4c585b7b8a8920bb3949d643e9e10c17d4009a0) ) ROM_LOAD( "tx1_17b.ic232", 0xc000, 0x4000, CRC(364bb354) SHA1(a26581ca1088b979285471e2c6595048df84d75e) ) - ROM_REGION( 0x40000, "gfx3", 0 ) + ROM_REGION( 0x6000, "road", 0 ) ROM_LOAD( "tx1_5a.ic56", 0x0000, 0x2000, CRC(5635b8c1) SHA1(5cc9437a2ff0843f1917f2451852d4561c240b24) ) ROM_LOAD( "tx1_6a.ic66", 0x2000, 0x2000, CRC(03d83cf8) SHA1(5c0cfc6bf02ad2b3f37e1ceb493f69eb9829ab1e) ) ROM_LOAD( "tx1_7a.ic76", 0x4000, 0x2000, CRC(ad56013a) SHA1(ae3a91f58f30daff334754476db33ad1d12569fc) ) @@ -984,11 +984,11 @@ ROM_START( tx1jc ) ROM_LOAD16_BYTE( "xb02b.ic223", 0x8000, 0x0200, CRC(22c77af6) SHA1(1be8585b95316b4fc5712cdaef699e676320cd4d) ) ROM_LOAD16_BYTE( "xb01b.ic213", 0x8001, 0x0200, CRC(f6b8b70b) SHA1(b79374acf11d71db1e4ad3c494ac5f500a52677b) ) - ROM_REGION( 0x50000, "obj_map", 0 ) + ROM_REGION( 0x8000, "obj_map", 0 ) ROM_LOAD( "tx1_14b.ic106", 0x0000, 0x4000, CRC(68c63d6e) SHA1(110e02b99c44d31041be588bd14642e26890ecbd) ) ROM_LOAD( "tx1_13b.ic73", 0x4000, 0x4000, CRC(b0c581b2) SHA1(20926bc15e7c97045b219b828acfcdd99b8712a6) ) - ROM_REGION( 0x50000, "user3", 0 ) + ROM_REGION( 0x6000, "obj_luts", 0 ) ROM_LOAD( "tx1_12b.ic48", 0x0000, 0x2000, CRC(4b3d7956) SHA1(fc2432dd69f3be7007d4fd6f7c86c7c19453b1ba) ) ROM_LOAD( "tx1_19b.ic281", 0x2000, 0x4000, CRC(cb250de6) SHA1(4bf3006986fb8cbb3dd4fa988e6471633614e4bb) ) @@ -1072,7 +1072,7 @@ ROM_START( buggyboy ) ROM_LOAD( "bug25.157", 0x2c000, 0x4000, CRC(80c4e045) SHA1(be3b537d3ed3ee74fc51059aa744dca4d63431f6) ) ROM_RELOAD( 0x38000, 0x4000 ) - ROM_REGION( 0x40000, "road", 0 ) + ROM_REGION( 0x8000, "road", 0 ) ROM_LOAD( "bug12.58", 0x0000, 0x2000, CRC(bd34d55c) SHA1(05a719a6eff5af3aaaa1e0ee783b18597582ed64) ) ROM_LOAD( "bug11.57", 0x2000, 0x2000, CRC(a44d43eb) SHA1(c4d68c7e123506acaa6adc353579cac19ecb3a9d) ) ROM_LOAD( "bb3.137", 0x4000, 0x0200, CRC(ad76f3fb) SHA1(bf96f903b32e009a2592df0f28cc3e20b039f4d4) ) @@ -1086,13 +1086,13 @@ ROM_START( buggyboy ) ROM_LOAD16_BYTE( "bb1.245", 0x8000, 0x0200, CRC(0ddbd36d) SHA1(7a08901a350c315d46ab8d0aa881db384b9f37d2) ) ROM_LOAD16_BYTE( "bb2.220", 0x8001, 0x0200, CRC(71d47de1) SHA1(2da9aeb3f2ebb1114631c8042a37c4f4c18e741b) ) - ROM_REGION( 0x100000, "obj_map", 0 ) + ROM_REGION( 0x10000, "obj_map", 0 ) ROM_LOAD( "bug16.210", 0x0000, 0x4000, CRC(8b64409e) SHA1(1fb4c6923e6a9e1f2a63a2c335b63e2bdc44b61f) ) ROM_LOAD( "bug14.209", 0x4000, 0x4000, CRC(4e765282) SHA1(f7d69d39823a8b33bd0e5b1bd78a5d68a293e221) ) ROM_LOAD( "bug17.182", 0x8000, 0x4000, CRC(a5d84df6) SHA1(4e33ef0bee383e0d47b0c679cd2a54edb7ca0e3e) ) ROM_LOAD( "bug15.181", 0xc000, 0x4000, CRC(d519de10) SHA1(535d05e11af65be65f3d9924b0c48faf8dcfd1bf) ) - ROM_REGION( 0x10000, "obj_luts", 0 ) + ROM_REGION( 0x6000, "obj_luts", 0 ) ROM_LOAD( "bug13.124", 0x0000, 0x2000, CRC(53604d7a) SHA1(bfa304cd885162ece7a5f54988d9880fc541eb3a) ) ROM_LOAD( "bug18.156", 0x2000, 0x4000, CRC(e58321a6) SHA1(81be87d3c6046bb375c74362dc940f0269b39d1d) ) @@ -1161,7 +1161,7 @@ ROM_START( buggyboyjr ) ROM_LOAD( "bug30s.145", 0x20000, 0x8000, CRC(11d8e2a8) SHA1(9bf198229a12d331e8e7352b7ee3f39f6891f517) ) ROM_LOAD( "bug23s.142", 0x28000, 0x8000, CRC(015db5d8) SHA1(39ef8b44f2eb9399fb1555cffa6763e06d59c181) ) - ROM_REGION( 0x40000, "road", 0 ) + ROM_REGION( 0x8000, "road", 0 ) ROM_LOAD( "bug11s.225",0x0000, 0x4000, CRC(771af4e1) SHA1(a42b164dd0567c78c0d308ee48d63e5a284897bb) ) ROM_LOAD( "bb3s.195", 0x4000, 0x0200, CRC(2ab3d5ff) SHA1(9f8359cb4ba2e7d15dbb9dc21cd71c0902cd2153) ) ROM_LOAD( "bb4s.193", 0x4200, 0x0200, CRC(630f68a4) SHA1(d730f050353c688f81d090e33e00cd35e7b7b6fa) ) @@ -1174,11 +1174,11 @@ ROM_START( buggyboyjr ) ROM_LOAD16_BYTE( "bb1.163", 0x8000, 0x0200, CRC(0ddbd36d) SHA1(7a08901a350c315d46ab8d0aa881db384b9f37d2) ) ROM_LOAD16_BYTE( "bb2.162", 0x8001, 0x0200, CRC(71d47de1) SHA1(2da9aeb3f2ebb1114631c8042a37c4f4c18e741b) ) - ROM_REGION( 0x100000, "obj_map", 0 ) + ROM_REGION( 0x10000, "obj_map", 0 ) ROM_LOAD( "bug16s.139", 0x0000, 0x8000, CRC(1903a9ad) SHA1(526c404c15e3f04b4afb27dee66e9deb0a6b9704) ) ROM_LOAD( "bug17s.140", 0x8000, 0x8000, CRC(82cabdd4) SHA1(94324fcf83c373621fc40553473ae3cb552ab704) ) - ROM_REGION( 0x10000, "obj_luts", 0 ) + ROM_REGION( 0x6000, "obj_luts", 0 ) ROM_LOAD( "bug13.32", 0x0000, 0x2000, CRC(53604d7a) SHA1(bfa304cd885162ece7a5f54988d9880fc541eb3a) ) ROM_LOAD( "bug18s.141", 0x2000, 0x4000, CRC(67786327) SHA1(32cc1f5bc654497c968ddcd4af29720c6d659482) ) diff --git a/src/mame/includes/tx1.h b/src/mame/includes/tx1.h index 88ef4d11d84..5fda28bd3b4 100644 --- a/src/mame/includes/tx1.h +++ b/src/mame/includes/tx1.h @@ -107,6 +107,12 @@ public: m_objram(*this, "objram"), m_rcram(*this, "rcram"), m_z80_ram(*this, "z80_ram"), + m_char_tiles(*this, "char_tiles"), + m_obj_tiles(*this, "obj_tiles"), + m_road_rom(*this, "road"), + m_obj_map(*this, "obj_map"), + m_obj_luts(*this, "obj_luts"), + m_proms(*this, "proms"), m_screen(*this, "screen") { } required_device m_maincpu; @@ -117,6 +123,14 @@ public: required_shared_ptr m_objram; required_shared_ptr m_rcram; required_shared_ptr m_z80_ram; + + required_region_ptr m_char_tiles; + required_region_ptr m_obj_tiles; + required_region_ptr m_road_rom; + required_region_ptr m_obj_map; + required_region_ptr m_obj_luts; + required_region_ptr m_proms; + required_device m_screen; emu_timer *m_interrupt_timer; diff --git a/src/mame/video/tx1.c b/src/mame/video/tx1.c index adf459ff656..8c095f842cb 100644 --- a/src/mame/video/tx1.c +++ b/src/mame/video/tx1.c @@ -113,7 +113,7 @@ enum PALETTE_INIT_MEMBER(tx1_state,tx1) { - const UINT8 *color_prom = memregion("proms")->base(); + const UINT8 *const color_prom = &m_proms[0]; int i; static const res_net_info tx1_net_info = @@ -233,11 +233,10 @@ void tx1_state::tx1_draw_char(UINT8 *bitmap) UINT16 *tx1_vram = m_vram; INT32 x, y; UINT32 scroll_x; - UINT8 *chars, *gfx2; /* 2bpp characters */ - chars = memregion("char_tiles")->base(); - gfx2 = chars + 0x4000; + const UINT8 *const chars = &m_char_tiles[0]; + const UINT8 *const gfx2 = &m_char_tiles[0x4000]; /* X scroll value is the last word in char RAM */ scroll_x = tx1_vram[0xfff] & 0x3ff; @@ -414,17 +413,15 @@ void tx1_state::tx1_draw_road(UINT8 *bitmap) UINT8 pix[2][4][3]; /* Road slice map ROMs */ - const UINT8 *const gfx3 = memregion("gfx3")->base(); - const UINT8 *const rom_a = gfx3; - const UINT8 *const rom_b = gfx3 + 0x2000; - const UINT8 *const rom_c = gfx3 + 0x4000; + const UINT8 *const rom_a = &m_road_rom[0]; + const UINT8 *const rom_b = &m_road_rom[0x2000]; + const UINT8 *const rom_c = &m_road_rom[0x4000]; /* Pixel data */ - const UINT8 *const proms = memregion("proms")->base(); - const UINT8 *const prom_a = proms + 0x1100; - const UINT8 *const prom_b = proms + 0x1300; - const UINT8 *const prom_c = proms + 0x1500; - const UINT8 *const vprom = proms + 0x1700; + const UINT8 *const prom_a = &m_proms[0x1100]; + const UINT8 *const prom_b = &m_proms[0x1300]; + const UINT8 *const prom_c = &m_proms[0x1500]; + const UINT8 *const vprom = &m_proms[0x1700]; rva9_8 = (tx1_vregs.flags & 3) << 8; rva7 = !BIT(tx1_vregs.flags, TX1_RDFLAG_RVA7) << 7; @@ -855,18 +852,17 @@ void tx1_state::tx1_draw_objects(UINT8 *bitmap) UINT32 offs; /* The many lookup table ROMs */ - const UINT8 *const ic48 = memregion("user3")->base(); - const UINT8 *const ic281 = ic48 + 0x2000; + const UINT8 *const ic48 = &m_obj_luts[0]; + const UINT8 *const ic281 = &m_obj_luts[0x2000]; - const UINT8 *const proms = memregion("proms")->base(); - const UINT8 *const ic190 = proms + 0xc00; - const UINT8 *const ic162 = proms + 0xe00; - const UINT8 *const ic25 = proms + 0x1000; + const UINT8 *const ic190 = &m_proms[0xc00]; + const UINT8 *const ic162 = &m_proms[0xe00]; + const UINT8 *const ic25 = &m_proms[0x1000]; - const UINT8 *const ic106 = memregion("obj_map")->base(); - const UINT8 *const ic73 = ic106 + 0x4000; + const UINT8 *const ic106 = &m_obj_map[0]; + const UINT8 *const ic73 = &m_obj_map[0x4000]; - const UINT8 *const pixdata_rgn = memregion("obj_tiles")->base(); + const UINT8 *const pixdata_rgn = &m_obj_tiles[0]; for (offs = 0x0; offs <= 0x300; offs += 8) { @@ -995,7 +991,7 @@ void tx1_state::tx1_draw_objects(UINT8 *bitmap) dataend |= ic106_data & 0x40; /* Retrieve data for an 8x8 tile */ - ic73_data = ic73[rom_addr2]; + ic73_data = ic73[rom_addr2 & 0x3fff]; /* This is the data from the LUT pair */ lut_data = (ic106_data << 8) | ic73_data; @@ -1130,7 +1126,7 @@ void tx1_state::screen_eof_tx1(screen_device &screen, bool state) void tx1_state::tx1_combine_layers(bitmap_ind16 &bitmap, int screen) { int x, y; - UINT8 *chr_pal = memregion("proms")->base() + 0x900; + UINT8 *chr_pal = &m_proms[0x900]; int x_offset = screen * 256; @@ -1256,7 +1252,7 @@ UINT32 tx1_state::screen_update_tx1_right(screen_device &screen, bitmap_ind16 &b PALETTE_INIT_MEMBER(tx1_state,buggyboy) { - const UINT8 *color_prom = memregion("proms")->base(); + const UINT8 *const color_prom = &m_proms[0]; int i; for (i = 0; i < 0x100; i++) @@ -1301,13 +1297,12 @@ void tx1_state::buggyboy_draw_char(UINT8 *bitmap, bool wide) UINT16 *buggyboy_vram = m_vram; INT32 x, y; UINT32 scroll_x, scroll_y; - UINT8 *chars, *gfx2; UINT32 total_width; UINT32 x_mask; /* 2bpp characters */ - chars = memregion("char_tiles")->base(); - gfx2 = memregion("char_tiles")->base() + 0x4000; + const UINT8 *const chars = &m_char_tiles[0]; + const UINT8 *const gfx2 = &m_char_tiles[0x4000]; /* X/Y scroll values are the last word in char RAM */ if (wide) @@ -1449,10 +1444,10 @@ void tx1_state::buggyboy_get_roadpix(int screen, int ls161, UINT8 rva0_6, UINT8 UINT8 d1 = 0; /* ROM/PROM lookup tables */ - const UINT8 *rom = memregion("road")->base(); - const UINT8 *prom0 = rom + 0x4000; - const UINT8 *prom1 = rom + 0x4200; - const UINT8 *prom2 = rom + 0x4400; + const UINT8 *const rom = &m_road_rom[0]; + const UINT8 *const prom0 = &m_road_rom[0x4000]; + const UINT8 *const prom1 = &m_road_rom[0x4200]; + const UINT8 *const prom2 = &m_road_rom[0x4400]; /* Latch road reverse bit */ *_rorev = !( (rom_en && rom_flip) || (!rom_en && (ls161 & 0x4000)) ); @@ -1543,8 +1538,8 @@ void tx1_state::buggyboy_draw_road(UINT8 *bitmap) UINT32 rva20_6; /* ROM/PROM lookup tables */ - const UINT8 *rcols = (UINT8*)(memregion("proms")->base() + 0x1500); - const UINT8 *vprom = memregion("road")->base() + 0x4600; + const UINT8 *const rcols = &m_proms[0x1500]; + const UINT8 *const vprom = &m_road_rom[0x4600]; /* Extract constant values */ tcmd = ((vregs.scol & 0xc000) >> 12) | ((vregs.scol & 0x00c0) >> 6); @@ -2170,8 +2165,8 @@ void tx1_state::buggybjr_draw_road(UINT8 *bitmap) UINT32 rva20_6; /* ROM/PROM lookup tables */ - const UINT8 *rcols = (UINT8*)(memregion("proms")->base() + 0x1500); - const UINT8 *vprom = memregion("road")->base() + 0x4600; + const UINT8 *const rcols = &m_proms[0x1500]; + const UINT8 *const vprom = &m_road_rom[0x4600]; /* Extract constant values */ tcmd = ((vregs.scol & 0xc000) >> 12) | ((vregs.scol & 0x00c0) >> 6); @@ -2577,17 +2572,17 @@ void tx1_state::buggyboy_draw_objs(UINT8 *bitmap, bool wide) UINT32 x_stride; /* The many lookup table ROMs */ - const UINT8 *const bug13 = (UINT8*)memregion("obj_luts")->base(); - const UINT8 *const bug18s = bug13 + 0x2000; - const UINT8 *const bb8 = (UINT8*)memregion("proms")->base() + 0x1600; + const UINT8 *const bug13 = &m_obj_luts[0]; + const UINT8 *const bug18s = &m_obj_luts[0x2000]; + const UINT8 *const bb8 = &m_proms[0x1600]; - const UINT8 *const bug16s = (UINT8*)memregion("obj_map")->base(); - const UINT8 *const bug17s = bug16s + 0x8000; + const UINT8 *const bug16s = &m_obj_map[0]; + const UINT8 *const bug17s = &m_obj_map[0x8000]; - const UINT8 *const bb9o = (UINT8*)memregion("proms")->base() + 0x500; - const UINT8 *const bb9e = bb9o + 0x800; + const UINT8 *const bb9o = &m_proms[0x500]; + const UINT8 *const bb9e = &m_proms[0xd00]; - const UINT8 *const pixdata_rgn = (UINT8*)memregion("obj_tiles")->base(); + const UINT8 *const pixdata_rgn = &m_obj_tiles[0]; if (wide) { @@ -2927,7 +2922,7 @@ WRITE16_MEMBER(tx1_state::buggyboy_scolst_w) void tx1_state::bb_combine_layers(bitmap_ind16 &bitmap, int screen) { - UINT8 *chr_pal = memregion("proms")->base() + 0x400; + UINT8 *chr_pal = &m_proms[0x400]; UINT32 bmp_stride; UINT32 x_offset; UINT32 y; -- cgit v1.2.3