summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2010-10-19 05:52:41 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2010-10-19 05:52:41 +0000
commitcf6927cb9f328c197cc7137495b43646d2f2be09 (patch) (github)
tree3836ca68756493954a57b6a63c0b29c24bf7ea68
parent05421623da5cd8014428679caba4195bf9f11038 (diff)
downloadmame-cf6927cb9f328c197cc7137495b43646d2f2be09.tar.bz2
mame-cf6927cb9f328c197cc7137495b43646d2f2be09.zip
Fix MT04065: tiny (and ldplayer) don't link.
This needs an unfortunate hack with a dummy driver added to seed references to the devices that are only otherwise referenced by libemu.a. Also removed SOUNDS += CUSTOM since such a sound device no longer exists.
-rw-r--r--.gitattributes1
-rw-r--r--src/emu/drivers/emudummy.c67
-rw-r--r--src/ldplayer/ldplayer.mak1
-rw-r--r--src/mame/mame.mak8
-rw-r--r--src/mame/tiny.mak2
5 files changed, 77 insertions, 2 deletions
diff --git a/.gitattributes b/.gitattributes
index 7226ac76423..706ca65df44 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -612,6 +612,7 @@ src/emu/drawgfxm.h svneol=native#text/plain
src/emu/driver.c svneol=native#text/plain
src/emu/driver.h svneol=native#text/plain
src/emu/drivers/empty.c svneol=native#text/plain
+src/emu/drivers/emudummy.c svneol=native#text/plain
src/emu/drivers/xtal.h svneol=native#text/plain
src/emu/eigccppc.h svneol=native#text/plain
src/emu/eigccx86.h svneol=native#text/plain
diff --git a/src/emu/drivers/emudummy.c b/src/emu/drivers/emudummy.c
new file mode 100644
index 00000000000..9f2f4923b94
--- /dev/null
+++ b/src/emu/drivers/emudummy.c
@@ -0,0 +1,67 @@
+/***************************************************************************
+
+ emudummy.c
+
+ Dummy driver file that references CPU devices which are in turn
+ referenced by devices in libemu.a.
+
+ The reason we need this is due to link ordering issues with gcc
+ if the actual drivers being linked don't reference these CPU
+ devices. Since we link libcpu first, if libemu needs stuff from
+ libcpu that wasn't previously referenced, it will fail the link.
+
+****************************************************************************
+
+ Copyright Aaron Giles
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name 'MAME' nor the names of its contributors may be
+ used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+***************************************************************************/
+
+#include "emu.h"
+#include "cpu/mcs48/mcs48.h"
+#include "cpu/z80/z80.h"
+
+
+MACHINE_CONFIG_START( __dummy, driver_device )
+ MDRV_CPU_ADD("dummy1", I8049, 1000000)
+ MDRV_CPU_ADD("dummy2", I8748, 1000000)
+ MDRV_CPU_ADD("dummy3", Z80, 1000000)
+MACHINE_CONFIG_END
+
+
+ROM_START( __dummy )
+ ROM_REGION( 0x1000, "dummy1", ROMREGION_ERASEFF )
+ ROM_REGION( 0x1000, "dummy2", ROMREGION_ERASEFF )
+ ROM_REGION( 0x1000, "dummy3", ROMREGION_ERASEFF )
+ROM_END
+
+
+GAME( 1900, __dummy, 0, __dummy, 0, 0, ROT0, "(none)", "Dummy", GAME_NO_SOUND )
+
+
diff --git a/src/ldplayer/ldplayer.mak b/src/ldplayer/ldplayer.mak
index 713a05f0463..1825a356258 100644
--- a/src/ldplayer/ldplayer.mak
+++ b/src/ldplayer/ldplayer.mak
@@ -45,6 +45,7 @@ SOUNDS += WAVE
DRVLIBS = \
$(LDPOBJ)/ldpdriv.o \
+ $(EMUDRIVERS)/emudummy.o \
$(LDPOBJ)/ldplayer.o \
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index 7694ea1b1ca..60f09620fe8 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -124,12 +124,13 @@ CPUS += SCMP
CPUS += MN10200
CPUS += COSMAC
+
+
#-------------------------------------------------
# specify available sound cores; some of these are
# only for MESS and so aren't included
#-------------------------------------------------
-SOUNDS += CUSTOM
SOUNDS += SAMPLES
SOUNDS += DAC
SOUNDS += DMADAC
@@ -227,6 +228,8 @@ SOUNDS += MOS656X
SOUNDS += S2636
#SOUNDS += ASC
+
+
#-------------------------------------------------
# this is the list of driver libraries that
# comprise MAME plus mamedriv.o which contains
@@ -1673,6 +1676,8 @@ $(MAMEOBJ)/misc.a: \
$(DRIVERS)/wldarrow.o \
$(DRIVERS)/xyonix.o $(VIDEO)/xyonix.o \
+
+
#-------------------------------------------------
# layout dependencies
#-------------------------------------------------
@@ -1901,6 +1906,7 @@ $(DRIVERS)/wecleman.o: $(LAYOUT)/wecleman.lh
$(DRIVERS)/zac2650.o: $(LAYOUT)/tinv2650.lh
+
#-------------------------------------------------
# misc dependencies
#-------------------------------------------------
diff --git a/src/mame/tiny.mak b/src/mame/tiny.mak
index dd11a7308b0..fc4e4f26613 100644
--- a/src/mame/tiny.mak
+++ b/src/mame/tiny.mak
@@ -48,7 +48,6 @@ CPUS += M680X0
# drivers referenced in tiny.c.
#-------------------------------------------------
-SOUNDS += CUSTOM
SOUNDS += SAMPLES
SOUNDS += DAC
SOUNDS += DISCRETE
@@ -71,6 +70,7 @@ SOUNDS += CEM3394
DRVLIBS = \
$(MAMEOBJ)/tiny.o \
+ $(EMUDRIVERS)/emudummy.o \
$(MACHINE)/ticket.o \
$(DRIVERS)/carpolo.o $(MACHINE)/carpolo.o $(VIDEO)/carpolo.o \
$(DRIVERS)/circus.o $(AUDIO)/circus.o $(VIDEO)/circus.o \