summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/gottlieb.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2020-11-02 12:11:43 +0100
committer Olivier Galibert <galibert@pobox.com>2020-11-02 12:12:11 +0100
commitb8c338858a101d14308c64c87b0f714db4f05326 (patch)
treea34dca21d603b98f5450d31868ce33a7e4c103b0 /src/mame/drivers/gottlieb.cpp
parentf4172ded3ec6f3b877ab813f6453d6d1907c1c00 (diff)
emumem: Simplify memory management. [O. Galibert]
API impact: - install_ram/rom/writeonly now requires a non-null pointer. If you want automatically managed ram, add it to a memory map, not in machine_start - install_*_bank now requires a memory_bank *, not a string - one can create memory banks outside of memory maps with memory_bank_creator - one can create memory shares outside of memory maps with memory_share_creator Memory maps impact: - ram ranges with overlapping addresses are not shared anymore. Use .share() - ram ranges touching each other are not merged anymore. Stay in your range Extra note: - there is no need to create a bank just to dynamically map some memory/rom. Just use install_rom/ram/writeonly
Diffstat (limited to 'src/mame/drivers/gottlieb.cpp')
-rw-r--r--src/mame/drivers/gottlieb.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp
index a55b738b653..2ca96ee42ac 100644
--- a/src/mame/drivers/gottlieb.cpp
+++ b/src/mame/drivers/gottlieb.cpp
@@ -776,9 +776,7 @@ void gottlieb_state::reactor_map(address_map &map)
void gottlieb_state::gottlieb_map(address_map &map)
{
map.global_mask(0xffff);
- map(0x0000, 0x0fff).ram().share("nvram");
- map(0x1000, 0x1fff).ram().region("maincpu", 0x1000); /* or ROM */
- map(0x2000, 0x2fff).ram().region("maincpu", 0x2000); /* or ROM */
+ map(0x0000, 0x2fff).ram().share("nvram");
map(0x3000, 0x30ff).mirror(0x0700).writeonly().share("spriteram"); /* FRSEL */
map(0x3800, 0x3bff).mirror(0x0400).ram().w(FUNC(gottlieb_state::videoram_w)).share("videoram"); /* BRSEL */
map(0x4000, 0x4fff).ram().w(FUNC(gottlieb_state::charram_w)).share("charram"); /* BOJRSEL1 */
@@ -2161,9 +2159,11 @@ ROM_END
ROM_START( krull )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION( 0x3000, "nvram", ROMREGION_ERASEFF)
ROM_LOAD( "gv-105_ram_2.c7", 0x1000, 0x1000, CRC(302feadf) SHA1(9d70de35e4f0490dc4e601070993ad146f250dea) )
ROM_LOAD( "gv-105_ram_4.c9-10", 0x2000, 0x1000, CRC(79355a60) SHA1(57ad5c904b9ac4bf7c7d828bf755bbcbba6a4fd7) )
+
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "gv-105_rom_4.c16", 0x6000, 0x2000, CRC(2b696394) SHA1(b18270f4ad97743f6ff8c4cbc93e523c77a8e794) )
ROM_LOAD( "gv-105_rom_3.c14-15", 0x8000, 0x2000, CRC(14b0ee42) SHA1(276c4008a013806b3989c529f41cbc358ec49fd6) )
ROM_LOAD( "gv-105_rom_2.c13-14", 0xa000, 0x2000, CRC(b5fad94a) SHA1(1bae895fbdd658cfb56c53cc2139282cc1e778de) )
@@ -2471,8 +2471,10 @@ ROM_END
ROM_START( 3stooges )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION( 0x3000, "nvram", ROMREGION_ERASEFF)
ROM_LOAD( "gv113ram.4", 0x2000, 0x1000, CRC(533bff2a) SHA1(58d0be8add4b02dc3e27cf6b17a05baf4304f3ce) )
+
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "gv113rom.4", 0x6000, 0x2000, CRC(8b6e52b8) SHA1(6e17e11afce92a7fa1735a724f0c0faf9375ac89) )
ROM_LOAD( "gv113rom.3", 0x8000, 0x2000, CRC(b816d8c4) SHA1(86e16888492390034ac04e3f6a9f56422575c778) )
ROM_LOAD( "gv113rom.2", 0xa000, 0x2000, CRC(b45b2a79) SHA1(7d0b19bec462ab67f518361afdf4b6982829ed07) )
@@ -2498,8 +2500,10 @@ ROM_END
ROM_START( 3stoogesa )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION( 0x3000, "nvram", ROMREGION_ERASEFF)
ROM_LOAD( "gv113ram4.bin", 0x2000, 0x1000, CRC(a00365be) SHA1(a151e1dfd8a251e6558968ea1df5a8516286d2c1) ) /* Came from PCB with low serial # */
+
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "gv113rom4.bin", 0x6000, 0x2000, CRC(a8f9d51d) SHA1(c9b18e31fea6fd01171528dd583b4d4f9b9078ed) )
ROM_LOAD( "gv113rom3.bin", 0x8000, 0x2000, CRC(60bda7b6) SHA1(7dd7633397d3ccdbd7885a5436f422f575ecd0cc) )
ROM_LOAD( "gv113rom2.bin", 0xa000, 0x2000, CRC(9bb95798) SHA1(91cf203cf59c5a96ed5de8f4c5743bd91350c16f) )
@@ -2525,8 +2529,10 @@ ROM_END
ROM_START( vidvince )
- ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_REGION( 0x3000, "nvram", ROMREGION_ERASEFF)
ROM_LOAD( "gv132_ram4_2732.c9c10", 0x2000, 0x1000, CRC(67a4927b) SHA1(41dfd13ea24bb3b0f8f917f4af5f6b33af1bc2e7) )
+
+ ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "gv132_rom4_2764.c16", 0x6000, 0x2000, CRC(3c5f39f5) SHA1(3722c30bcd60fc0c1c4ca4dd800a3654fba67599) )
ROM_LOAD( "gv132_rom3_2764.c14c15", 0x8000, 0x2000, CRC(3983cb79) SHA1(3c527ed2428b8cb86a6896a74c873317a9f7b411) )
ROM_LOAD( "gv132_rom2_2764.c13c14", 0xa000, 0x2000, CRC(0f5ebab9) SHA1(680874b9857565857375096d05203997669a7215) )