diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-07-28 09:35:36 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-07-28 09:35:36 +0000 |
commit | 27fed1ec97c24877a1b44e114d7b9776cb776e8c (patch) | |
tree | 93eb6d00131b30c475d9d60b51f1f97c09e3b98d /src/mame/drivers/fantland.c | |
parent | 1b8118822915833267718cf56b24e5218b676ca4 (diff) |
Changed the way memory regions are referenced. Instead of a single
integer value, regions are now referred to by a region class and
a region tag. The class specifies the type of region (one of CPU,
gfx, sound, user, disk, prom, pld) while the tag uniquely specifies
the region. This change required updating all the ROM region
definitions in the project to specify the class/tag instead of
region number.
Updated the core memory_region_* functions to accept a class/tag
pair. Added new memory_region_next() function to allow for iteration
over all memory regions of a given class. Added new function
memory_region_class_name() to return the name for a given CPU
memory region class.
Changed the auto-binding behavior of CPU regions. Previously, the
first CPU would auto-bind to REGION_CPU1 (that is, any ROM references
would automatically assume that they lived in the corresponding
region). Now, each CPU automatically binds to the RGNCLASS_CPU region
with the same tag as the CPU itself. This behavior required ensuring
that all previous REGION_CPU* regions were changed to RGNCLASS_CPU
with the same tag as the CPU.
Introduced a new auto-binding mechanism for sound cores. This works
similarly to the CPU binding. Each sound core that requires a memory
region now auto-binds to the RGNCLASS_SOUND with the same tag as the
sound core. In almost all cases, this allowed for the removal of the
explicit region item in the sound configuration, which in turn
allowed for many sound configurations to removed altogether.
Updated the expression engine's memory reference behavior. A recent
update expanded the scope of memory references to allow for referencing
data in non-active CPU spaces, in memory regions, and in EEPROMs.
However, this previous update required an index, which is no longer
appropriate for regions and will become increasingly less appropriate
for CPUs over time. Instead, a new syntax is supported, of the form:
"[tag.][space]size@addr", where 'tag' is an optional tag for the CPU
or memory region you wish to access, followed by a period as a
separator; 'space' is the memory address space or region class you
wish to access (p/d/i for program/data/I/O spaces; o for opcode space;
r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for
EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword.
Cleaned up ROM definition flags and removed some ugly hacks that had
existed previously. Expanded to support up to 256 BIOSes. Updated
ROM_COPY to support specifying class/tag for the source region.
Updated the address map AM_REGION macro to support specifying a
class/tag for the region.
Updated debugger windows to display the CPU and region tags where
appropriate.
Updated -listxml to output region class and tag for each ROM entry.
Diffstat (limited to 'src/mame/drivers/fantland.c')
-rw-r--r-- | src/mame/drivers/fantland.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c index a09635eb85f..a9970de28c1 100644 --- a/src/mame/drivers/fantland.c +++ b/src/mame/drivers/fantland.c @@ -343,8 +343,8 @@ static void borntofi_adpcm_int(running_machine *machine, int voice) if (!borntofi_adpcm[voice].playing) return; - rom = memory_region( machine, REGION_SOUND1 ); - len = memory_region_length( machine, REGION_SOUND1 ) * 2; + rom = memory_region( machine, RGNCLASS_SOUND, "adpcm" ); + len = memory_region_length( machine, RGNCLASS_SOUND, "adpcm" ) * 2; start = borntofi_adpcm[voice].addr[0] + borntofi_adpcm[voice].nibble; stop = borntofi_adpcm[voice].addr[1]; @@ -781,7 +781,7 @@ static const gfx_layout layout16x16x6 = }; static GFXDECODE_START( fantland ) - GFXDECODE_ENTRY( REGION_GFX1, 0, layout16x16x6, 0, 4 ) // [0] Sprites + GFXDECODE_ENTRY( "gfx1", 0, layout16x16x6, 0, 4 ) // [0] Sprites GFXDECODE_END /*************************************************************************** @@ -1023,19 +1023,19 @@ Fantasy.05, 06, 07 was read as if it was a 27c040 ***************************************************************************/ ROM_START( fantland ) - ROM_REGION( 0x100000, REGION_CPU1, 0 ) // Main CPU + ROM_REGION( 0x100000, RGNCLASS_CPU, "main", 0 ) // Main CPU ROM_LOAD16_BYTE( "fantasyl.ev2", 0x00000, 0x20000, CRC(f5bdca0e) SHA1(d05cf6f68d4d1a3dcc0171f7cf220c4920bd47bb) ) ROM_LOAD16_BYTE( "fantasyl.od2", 0x00001, 0x20000, CRC(9db35023) SHA1(81e2accd67dcf8563a68b2c4e35526f23a40150c) ) - ROM_COPY( REGION_CPU1, 0x00000, 0x40000, 0x40000 ) + ROM_COPY( RGNCLASS_CPU, "main", 0x00000, 0x40000, 0x40000 ) ROM_LOAD16_BYTE( "fantasyl.ev1", 0xe0000, 0x10000, CRC(70e0ee30) SHA1(5253213da56b3f97e2811f2b10927d0e542447f0) ) ROM_LOAD16_BYTE( "fantasyl.od1", 0xe0001, 0x10000, CRC(577b4bd7) SHA1(1f08202d99c3e39e0dd1ed4947b928b695a5b411) ) - ROM_REGION( 0x100000, REGION_CPU2, 0 ) // Sound CPU + ROM_REGION( 0x100000, RGNCLASS_CPU, "audio", 0 ) // Sound CPU ROM_LOAD( "fantasyl.s2", 0x80000, 0x20000, CRC(f23837d8) SHA1(4048784f759781e50ae445ea61f1ca908e8e6ac1) ) // samples (8 bit unsigned) ROM_LOAD( "fantasyl.s1", 0xc0000, 0x20000, CRC(1a324a69) SHA1(06f6877af6cd19bfaac8a4ea8057ef8faee276f5) ) - ROM_COPY( REGION_CPU2, 0xc0000, 0xe0000, 0x20000 ) + ROM_COPY( RGNCLASS_CPU, "audio", 0xc0000, 0xe0000, 0x20000 ) - ROM_REGION( 0x480000, REGION_GFX1, ROMREGION_DISPOSE ) // Sprites + ROM_REGION( 0x480000, RGNCLASS_GFX, "gfx1", ROMREGION_DISPOSE ) // Sprites ROMX_LOAD( "fantasyl.m00", 0x000000, 0x80000, CRC(82d819ff) SHA1(2b5b0759de8260eaa84ddded9dc2d12a6e0f5ec9) , ROM_GROUPWORD | ROM_SKIP(1) ) ROMX_LOAD( "fantasyl.m01", 0x0c0000, 0x80000, CRC(70a94139) SHA1(689fbfa267d60821cde13d5dc2dfe1dea67b434a) , ROM_GROUPWORD | ROM_SKIP(1) ) ROMX_LOAD( "fantasyl.05", 0x000002, 0x80000, CRC(62b9a00b) SHA1(ecd18e5e7a5e3535956fb693d2f7e35d2bb7ede9) , ROM_SKIP(2) ) @@ -1052,19 +1052,19 @@ ROM_END /* this dump had several roms half size however they all appear to be data & gfx roms, the main program looks ok */ ROM_START( fantlnda ) - ROM_REGION( 0x100000, REGION_CPU1, 0 ) // Main CPU + ROM_REGION( 0x100000, RGNCLASS_CPU, "main", 0 ) // Main CPU ROM_LOAD16_BYTE( "fantasyl.ev2", 0x00000, 0x20000, CRC(f5bdca0e) SHA1(d05cf6f68d4d1a3dcc0171f7cf220c4920bd47bb) ) // 04.bin (was first half only) ROM_LOAD16_BYTE( "fantasyl.od2", 0x00001, 0x20000, CRC(9db35023) SHA1(81e2accd67dcf8563a68b2c4e35526f23a40150c) ) // 03.bin (was first half only) - ROM_COPY( REGION_CPU1, 0x00000, 0x40000, 0x40000 ) + ROM_COPY( RGNCLASS_CPU, "main", 0x00000, 0x40000, 0x40000 ) ROM_LOAD16_BYTE( "02.bin", 0xe0000, 0x10000, CRC(8b835eed) SHA1(6a6b3fe116145f685b91dcd5301165f17973697c) ) ROM_LOAD16_BYTE( "01.bin", 0xe0001, 0x10000, CRC(4fa3eb8b) SHA1(56da42a4e2972a696ef28811116cbc20bb5ba3e8) ) - ROM_REGION( 0x100000, REGION_CPU2, 0 ) // Sound CPU + ROM_REGION( 0x100000, RGNCLASS_CPU, "audio", 0 ) // Sound CPU ROM_LOAD( "fantasyl.s2", 0x80000, 0x20000, CRC(f23837d8) SHA1(4048784f759781e50ae445ea61f1ca908e8e6ac1) ) // 05.bin (was first half only) ROM_LOAD( "fantasyl.s1", 0xc0000, 0x20000, CRC(1a324a69) SHA1(06f6877af6cd19bfaac8a4ea8057ef8faee276f5) ) // 06.bin (was first half only) - ROM_COPY( REGION_CPU2, 0xc0000, 0xe0000, 0x20000 ) + ROM_COPY( RGNCLASS_CPU, "audio", 0xc0000, 0xe0000, 0x20000 ) - ROM_REGION( 0x480000, REGION_GFX1, ROMREGION_DISPOSE ) // Sprites + ROM_REGION( 0x480000, RGNCLASS_GFX, "gfx1", ROMREGION_DISPOSE ) // Sprites ROMX_LOAD( "fantasyl.m00", 0x000000, 0x80000, CRC(82d819ff) SHA1(2b5b0759de8260eaa84ddded9dc2d12a6e0f5ec9) , ROM_GROUPWORD | ROM_SKIP(1) ) ROMX_LOAD( "fantasyl.m01", 0x0c0000, 0x80000, CRC(70a94139) SHA1(689fbfa267d60821cde13d5dc2dfe1dea67b434a) , ROM_GROUPWORD | ROM_SKIP(1) ) ROMX_LOAD( "fantasyl.05", 0x000002, 0x80000, CRC(62b9a00b) SHA1(ecd18e5e7a5e3535956fb693d2f7e35d2bb7ede9) , ROM_SKIP(2) ) @@ -1084,19 +1084,19 @@ ROM_END ***************************************************************************/ ROM_START( galaxygn ) - ROM_REGION( 0x100000, REGION_CPU1, 0 ) // Main CPU + ROM_REGION( 0x100000, RGNCLASS_CPU, "main", 0 ) // Main CPU ROM_LOAD( "gg03.bin", 0x10000, 0x10000, CRC(9e469189) SHA1(07e5d36ca9665bdd13e3bb4241d34b9042371b79) ) ROM_LOAD( "gg02.bin", 0x20000, 0x10000, CRC(b87a438f) SHA1(96c39cc4d51a2fc0779f148971220117967173c0) ) ROM_LOAD( "gg01.bin", 0xf0000, 0x10000, CRC(ad0e5b29) SHA1(f9a7ebce9f47a009af213e4e10811bb1c26f891a) ) - ROM_COPY( REGION_CPU1,0xf0000, 0x70000, 0x10000 ) + ROM_COPY( RGNCLASS_CPU, "main",0xf0000, 0x70000, 0x10000 ) - ROM_REGION( 0x100000, REGION_CPU2, 0 ) // Sound CPU + ROM_REGION( 0x100000, RGNCLASS_CPU, "audio", 0 ) // Sound CPU ROM_LOAD( "gg20.bin", 0xc0000, 0x10000, CRC(f5c65a85) SHA1(a094fa9531ea4e68ec0a448568e7d4b2307c8185) ) - ROM_COPY( REGION_CPU2, 0xc0000, 0xd0000, 0x10000 ) - ROM_COPY( REGION_CPU2, 0xc0000, 0xe0000, 0x10000 ) - ROM_COPY( REGION_CPU2, 0xc0000, 0xf0000, 0x10000 ) + ROM_COPY( RGNCLASS_CPU, "audio", 0xc0000, 0xd0000, 0x10000 ) + ROM_COPY( RGNCLASS_CPU, "audio", 0xc0000, 0xe0000, 0x10000 ) + ROM_COPY( RGNCLASS_CPU, "audio", 0xc0000, 0xf0000, 0x10000 ) - ROM_REGION( 0x1b0000, REGION_GFX1, ROMREGION_DISPOSE ) // Sprites + ROM_REGION( 0x1b0000, RGNCLASS_GFX, "gfx1", ROMREGION_DISPOSE ) // Sprites ROMX_LOAD( "gg54.bin", 0x000000, 0x10000, CRC(b3621119) SHA1(66ade772077e57f872ef1c8f45e244f4006023f0) , ROM_SKIP(2) ) ROMX_LOAD( "gg38.bin", 0x000001, 0x10000, CRC(52b70f3e) SHA1(65f11d5700337d6d9b6325ff70c86d076e1bdc26) , ROM_SKIP(2) ) ROMX_LOAD( "gg22.bin", 0x000002, 0x10000, CRC(ea49fee4) SHA1(29ae3e5dfade421a5e97efe5be1cb17862fdcea1) , ROM_SKIP(2) ) @@ -1205,17 +1205,17 @@ Notes: */ ROM_START( borntofi ) - ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* V20 */ + ROM_REGION( 0x100000, RGNCLASS_CPU, "main", 0 ) /* V20 */ ROM_LOAD( "3.bin", 0x10000, 0x10000, CRC(5f07f4a2) SHA1(240864d1d5d9e26d229bc21aa39ee03f4bd25814) ) ROM_LOAD( "2.bin", 0x20000, 0x10000, CRC(5d2b3395) SHA1(ac87f352f380b67802c26232824663063549ac7b) ) ROM_LOAD( "1.bin", 0xf0000, 0x10000, CRC(0a5e2f32) SHA1(5167a85329e5ea35c686af85e44d62227cf5800e) ) - ROM_COPY( REGION_CPU1, 0xf0000, 0x70000, 0x10000 ) + ROM_COPY( RGNCLASS_CPU, "main", 0xf0000, 0x70000, 0x10000 ) - ROM_REGION( 0x100000, REGION_CPU2, 0 ) /* 8088 */ + ROM_REGION( 0x100000, RGNCLASS_CPU, "audio", 0 ) /* 8088 */ ROM_LOAD( "5.bin", 0xf8000, 0x08000, CRC(b5d587ce) SHA1(07687abd264ec80a6eb473cb3f3ab97ec6b365a2) ) - ROM_COPY( REGION_CPU2, 0xf8000, 0x08000, 0x08000 ) + ROM_COPY( RGNCLASS_CPU, "audio", 0xf8000, 0x08000, 0x08000 ) - ROM_REGION( 0xc0000, REGION_SOUND1, 0 ) /* m5205 samples */ + ROM_REGION( 0xc0000, RGNCLASS_SOUND, "adpcm", 0 ) /* m5205 samples */ ROM_LOAD( "6.bin", 0x00000, 0x10000, CRC(731c523b) SHA1(b649a838ce70d5af607f8b9faf8b012e2ff1104b) ) ROM_LOAD( "7.bin", 0x10000, 0x10000, CRC(a0cbdf10) SHA1(d33c157aceb52683db36d2f666f1e2d952654633) ) ROM_LOAD( "8.bin", 0x20000, 0x10000, CRC(82fa8592) SHA1(81510160d645a3496131255c11c94fe47bb75988) ) @@ -1229,7 +1229,7 @@ ROM_START( borntofi ) ROM_LOAD( "16.bin", 0xa0000, 0x10000, CRC(edab01a9) SHA1(ce9c6b48807c9b312067b27928d27b4532319c60) ) ROM_LOAD( "17.bin", 0xb0000, 0x10000, CRC(ea361ea5) SHA1(a2b38a250ab477226da5d56bd07ea3b2f3aa9625) ) - ROM_REGION( 0x1e0000, REGION_GFX1,0 ) /* gfx */ + ROM_REGION( 0x1e0000, RGNCLASS_GFX, "gfx1",0 ) /* gfx */ ROMX_LOAD( "22.bin", 0x000002, 0x10000, CRC(a3afc57f) SHA1(2713fa4b6ad571748f47d25c72a0d40d80f8fcf6), ROM_SKIP(2) ) ROMX_LOAD( "38.bin", 0x000001, 0x10000, CRC(1c64d329) SHA1(6bb82143de07548b90bc7ba70d12fd0959e56545), ROM_SKIP(2) ) ROMX_LOAD( "54.bin", 0x000000, 0x10000, CRC(56209405) SHA1(e1f5fd709cde965c400f94837a34d5b414e0118e), ROM_SKIP(2) ) @@ -1301,15 +1301,15 @@ Hardware info by f205v ***************************************************************************/ ROM_START( wheelrun ) - ROM_REGION( 0x100000, REGION_CPU1, 0 ) // V20 + ROM_REGION( 0x100000, RGNCLASS_CPU, "main", 0 ) // V20 ROM_LOAD( "4.4", 0x30000, 0x10000, CRC(359303df) SHA1(583b70f65b775e99856ffda61334be3b85046ed1) ) ROM_LOAD( "3.3", 0x70000, 0x10000, CRC(c28d0b31) SHA1(add8c4ffe529755c101b72a3b0530e796948876b) ) - ROM_COPY( REGION_CPU1, 0x70000, 0xf0000, 0x10000 ) + ROM_COPY( RGNCLASS_CPU, "main", 0x70000, 0xf0000, 0x10000 ) - ROM_REGION( 0x100000, REGION_CPU2, 0 ) // Z80 + ROM_REGION( 0x100000, RGNCLASS_CPU, "audio", 0 ) // Z80 ROM_LOAD( "1.1", 0x00000, 0x10000, CRC(67b5f31f) SHA1(5553b132077686221fb7a21a0246fd55cb443332) ) // 1xxxxxxxxxxxxxxx = 0xFF - ROM_REGION( 0xc0000, REGION_GFX1,0 ) // gfx + ROM_REGION( 0xc0000, RGNCLASS_GFX, "gfx1",0 ) // gfx ROMX_LOAD( "7.7", 0x00000, 0x10000, CRC(e0e5ff64) SHA1(e2ed5ea5b75ed627a9d305864196160267cad438), ROM_SKIP(2) ) ROMX_LOAD( "11.11", 0x00001, 0x10000, CRC(ce9718fb) SHA1(ade47deedd5d0c927fdf8626aa1b0fac470f03a0), ROM_SKIP(2) ) ROMX_LOAD( "15.15", 0x00002, 0x10000, CRC(f6665f31) SHA1(e308a049697622bcda9d3c630e061d30c2b70687), ROM_SKIP(2) ) @@ -1326,7 +1326,7 @@ ROM_START( wheelrun ) ROMX_LOAD( "14.14", 0x90001, 0x10000, CRC(e592302f) SHA1(d4f668d259ec649e3126db27d990a2e5fa9cad8d), ROM_SKIP(2) ) ROMX_LOAD( "18.18", 0x90002, 0x10000, CRC(6bd42d8e) SHA1(0745428a54da85707d4435f20cc2094576a95e5b), ROM_SKIP(2) ) // 1111xxxxxxxxxxxx = 0x00 - ROM_REGION( 0x144, REGION_PLDS,0 ) // pals + ROM_REGION( 0x144, RGNCLASS_PLDS, "plds",0 ) // pals ROM_LOAD( "pal16r6cn.pal3", 0x000, 0x104, NO_DUMP ) ROM_LOAD( "pal16r6cn.pal4", 0x000, 0x104, NO_DUMP ) ROM_LOAD( "pal16r6cn.pal5", 0x000, 0x104, NO_DUMP ) |