mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
Using ROM_COPY instead of multiple of the same ROM_LOAD, nwn
This commit is contained in:
parent
944f7a1d67
commit
8e7b015e3e
@ -1574,13 +1574,13 @@ ROM_START( metamrph )
|
||||
ROM_LOAD64_WORD( "224a12", 0x000004, 2*1024*1024, CRC(ca72a4b3) SHA1(a09deb6d7cb8be4edaeb78e0e676ea2d6055e9e0) )
|
||||
ROM_LOAD64_WORD( "224a13", 0x000006, 2*1024*1024, CRC(86b58feb) SHA1(5a43746e2cd3c7aca21496c092aef83e64b3ab2c) )
|
||||
|
||||
/* K053250 linescroll/zoom thingy */
|
||||
ROM_REGION( 0x40000, "gfx3", ROMREGION_ERASE00 )
|
||||
/* K053250 linescroll/zoom thingy (unpacked) */
|
||||
ROM_REGION( 0x80000, "gfx3", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_LOAD( "224a14", 0x000000, 0x40000, CRC(3c79b404) SHA1(7c6bb4cbf050f314ea0cd3e8bc6e1947d0573084) )
|
||||
|
||||
/* K053250 linescroll/zoom thingy (unpacked) */
|
||||
ROM_REGION( 0x80000, "gfx4", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_LOAD( "224a14", 0x000000, 0x40000, CRC(3c79b404) SHA1(7c6bb4cbf050f314ea0cd3e8bc6e1947d0573084) )
|
||||
/* K053250 linescroll/zoom thingy */
|
||||
ROM_REGION( 0x40000, "gfx4", ROMREGION_ERASE00 )
|
||||
ROM_COPY( "gfx3", 0x00000, 0x00000, 0x40000 )
|
||||
|
||||
/* sound data */
|
||||
ROM_REGION( 0x400000, "shared", 0 )
|
||||
@ -1617,9 +1617,12 @@ ROM_START( metamrphu )
|
||||
ROM_LOAD64_WORD( "224a13", 0x000006, 2*1024*1024, CRC(86b58feb) SHA1(5a43746e2cd3c7aca21496c092aef83e64b3ab2c) )
|
||||
|
||||
/* K053250 linescroll/zoom thingy */
|
||||
ROM_REGION( 0x80000, "gfx3", 0 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_REGION( 0x40000, "gfx3", ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "224a14", 0x000000, 0x40000, CRC(3c79b404) SHA1(7c6bb4cbf050f314ea0cd3e8bc6e1947d0573084) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx4", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_COPY( "gfx3", 0x00000, 0x00000, 0x40000 )
|
||||
|
||||
/* sound data */
|
||||
ROM_REGION( 0x400000, "shared", 0 )
|
||||
ROM_LOAD( "224a06", 0x000000, 2*1024*1024, CRC(972f6abe) SHA1(30907495fc49fe3424c092b074c1dc137aa14306) )
|
||||
@ -1655,9 +1658,12 @@ ROM_START( metamrphj )
|
||||
ROM_LOAD64_WORD( "224a13", 0x000006, 2*1024*1024, CRC(86b58feb) SHA1(5a43746e2cd3c7aca21496c092aef83e64b3ab2c) )
|
||||
|
||||
/* K053250 linescroll/zoom thingy */
|
||||
ROM_REGION( 0x80000, "gfx3", 0 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_REGION( 0x40000, "gfx3", ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "224a14", 0x000000, 0x40000, CRC(3c79b404) SHA1(7c6bb4cbf050f314ea0cd3e8bc6e1947d0573084) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx4", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_COPY( "gfx3", 0x00000, 0x00000, 0x40000 )
|
||||
|
||||
/* sound data */
|
||||
ROM_REGION( 0x400000, "shared", 0 )
|
||||
ROM_LOAD( "224a06", 0x000000, 2*1024*1024, CRC(972f6abe) SHA1(30907495fc49fe3424c092b074c1dc137aa14306) )
|
||||
|
@ -620,9 +620,12 @@ ROM_START( xexex ) /* Europe, Version AA */
|
||||
ROM_LOAD( "067_b10.rom", 0x200000, 0x100000, CRC(ee31db8d) SHA1(c41874fb8b401ea9cdd327ee6239b5925418cf7b) )
|
||||
ROM_LOAD( "067_b09.rom", 0x300000, 0x100000, CRC(88f072ef) SHA1(7ecc04dbcc29b715117e970cc96e11137a21b83a) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx3", 0 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_REGION( 0x080000, "gfx3", ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "067_b08.rom", 0x000000, 0x080000, CRC(ca816b7b) SHA1(769ce3700e41200c34adec98598c0fe371fe1e6d) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_COPY( "gfx3", 0x000000, 0x000000, 0x080000 )
|
||||
|
||||
ROM_REGION( 0x300000, "k054539", 0 )
|
||||
ROM_LOAD( "067_b06.rom", 0x000000, 0x200000, CRC(3b12fce4) SHA1(c69172d9965b8da8a539812fac92d5f1a3c80d17) )
|
||||
ROM_LOAD( "067_b07.rom", 0x200000, 0x100000, CRC(ec87fe1b) SHA1(ec9823aea5a1fc5c47c8262e15e10b28be87231c) )
|
||||
@ -652,9 +655,12 @@ ROM_START( xexexa ) /* Asia, Version AA */
|
||||
ROM_LOAD( "067_b10.rom", 0x200000, 0x100000, CRC(ee31db8d) SHA1(c41874fb8b401ea9cdd327ee6239b5925418cf7b) )
|
||||
ROM_LOAD( "067_b09.rom", 0x300000, 0x100000, CRC(88f072ef) SHA1(7ecc04dbcc29b715117e970cc96e11137a21b83a) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx3", 0 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_REGION( 0x080000, "gfx3", ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "067_b08.rom", 0x000000, 0x080000, CRC(ca816b7b) SHA1(769ce3700e41200c34adec98598c0fe371fe1e6d) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_COPY( "gfx3", 0x000000, 0x000000, 0x080000 )
|
||||
|
||||
ROM_REGION( 0x300000, "k054539", 0 )
|
||||
ROM_LOAD( "067_b06.rom", 0x000000, 0x200000, CRC(3b12fce4) SHA1(c69172d9965b8da8a539812fac92d5f1a3c80d17) )
|
||||
ROM_LOAD( "067_b07.rom", 0x200000, 0x100000, CRC(ec87fe1b) SHA1(ec9823aea5a1fc5c47c8262e15e10b28be87231c) )
|
||||
@ -684,11 +690,12 @@ ROM_START( xexexj ) /* Japan, Version AA */
|
||||
ROM_LOAD( "067_b10.rom", 0x200000, 0x100000, CRC(ee31db8d) SHA1(c41874fb8b401ea9cdd327ee6239b5925418cf7b) )
|
||||
ROM_LOAD( "067_b09.rom", 0x300000, 0x100000, CRC(88f072ef) SHA1(7ecc04dbcc29b715117e970cc96e11137a21b83a) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx3", 0 )
|
||||
ROM_REGION( 0x80000, "gfx3",ROMREGION_ERASE00 )
|
||||
ROM_LOAD( "067_b08.rom", 0x000000, 0x080000, CRC(ca816b7b) SHA1(769ce3700e41200c34adec98598c0fe371fe1e6d) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx4", 0 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_LOAD( "067_b08.rom", 0x000000, 0x080000, CRC(ca816b7b) SHA1(769ce3700e41200c34adec98598c0fe371fe1e6d) )
|
||||
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASE00 ) // NOTE: region must be 2xROM size for unpacking
|
||||
ROM_COPY( "gfx3", 0x000000, 0x000000, 0x080000 )
|
||||
|
||||
|
||||
ROM_REGION( 0x300000, "k054539", 0 )
|
||||
ROM_LOAD( "067_b06.rom", 0x000000, 0x200000, CRC(3b12fce4) SHA1(c69172d9965b8da8a539812fac92d5f1a3c80d17) )
|
||||
|
@ -8423,6 +8423,8 @@ struct _k053250_state
|
||||
UINT16 *ram, *rammax;
|
||||
UINT16 *buffer[2];
|
||||
UINT32 rommask;
|
||||
UINT8 *packed;
|
||||
UINT32 packedmask;
|
||||
int page;
|
||||
int frame, offsx, offsy;
|
||||
|
||||
@ -8507,7 +8509,7 @@ READ16_DEVICE_HANDLER( k053250_rom_r )
|
||||
{
|
||||
k053250_state *k053250 = k053250_get_safe_token(device);
|
||||
|
||||
return *(k053250->base + 0x80000 * k053250->regs[6] + 0x800 * k053250->regs[7] + (offset >> 1)) & 0x0f;
|
||||
return *(k053250->packed + 0x80000 * k053250->regs[6] + 0x800 * k053250->regs[7] + offset);
|
||||
}
|
||||
|
||||
|
||||
@ -8922,8 +8924,11 @@ static DEVICE_START( k053250 )
|
||||
k053250_state *k053250 = k053250_get_safe_token(device);
|
||||
const k053250_interface *intf = k053250_get_interface(device);
|
||||
|
||||
k053250->base = device->machine().region(intf->gfx_memory_region)->base();
|
||||
k053250->rommask = device->machine().region(intf->gfx_memory_region)->bytes();
|
||||
k053250->packed = device->machine().region(intf->gfx_memory_region)->base();
|
||||
k053250->packedmask = device->machine().region(intf->gfx_memory_region)->bytes();
|
||||
|
||||
k053250->base = device->machine().region(intf->gfx_memory_region_unpack)->base();
|
||||
k053250->rommask = device->machine().region(intf->gfx_memory_region_unpack)->bytes();
|
||||
|
||||
k053250->screen = device->machine().device<screen_device>(intf->screen);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user