summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2010-01-19 13:00:22 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2010-01-19 13:00:22 +0000
commit04875f17b77f02ba4cfd8da073870c1de8cbf500 (patch)
tree13069e5ab725829a4684ed08fd01f5c7b6fb97a6
parente635ab33e33509a9a3857ce4f0688054743c467c (diff)
- Added MESS dependent code missing in emu.h
- Fixed compiling CPU core of V30MZ (only used by MESS) - Fixed MESS dependent code of wave.c - Added include of emu.h in sid (used only by MESS) no whatsnew needed
-rw-r--r--src/emu/cpu/v30mz/v30mz.c25
-rw-r--r--src/emu/emu.h6
-rw-r--r--src/emu/sound/sidenvel.c1
-rw-r--r--src/emu/sound/sidvoice.c1
-rw-r--r--src/emu/sound/wave.c10
-rw-r--r--src/emu/ui.c7
6 files changed, 42 insertions, 8 deletions
diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c
index 16f4c90ea68..117f9507fc4 100644
--- a/src/emu/cpu/v30mz/v30mz.c
+++ b/src/emu/cpu/v30mz/v30mz.c
@@ -53,8 +53,6 @@ typedef UINT32 DWORD;
#include "v30mz.h"
#include "nec.h"
-extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom);
-
/* NEC registers */
typedef union
{ /* eight general registers */
@@ -62,6 +60,18 @@ typedef union
UINT8 b[16]; /* or as 8 bit registers */
} necbasicregs;
+typedef struct _nec_config nec_config;
+struct _nec_config
+{
+ const UINT8* v25v35_decryptiontable; // internal decryption table
+};
+
+/* default configuration */
+static const nec_config default_config =
+{
+ NULL
+};
+
typedef struct _v30mz_state v30mz_state;
struct _v30mz_state
{
@@ -91,8 +101,12 @@ struct _v30mz_state
UINT32 ea;
UINT16 eo;
UINT16 e16;
+
+ const nec_config *config;
};
+extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config *config);
+
INLINE v30mz_state *get_safe_token(running_device *device)
{
assert(device != NULL);
@@ -920,13 +934,17 @@ static void set_irq_line(v30mz_state *cpustate, int irqline, int state)
static CPU_DISASSEMBLE( nec )
{
- return necv_dasm_one(buffer, pc, oprom);
+ v30mz_state *cpustate = get_safe_token(device);
+
+ return necv_dasm_one(buffer, pc, oprom, cpustate->config);
}
static void nec_init(running_device *device, cpu_irq_callback irqcallback, int type)
{
v30mz_state *cpustate = get_safe_token(device);
+ const nec_config *config = &default_config;
+
state_save_register_device_item_array(device, 0, cpustate->regs.w);
state_save_register_device_item_array(device, 0, cpustate->sregs);
@@ -946,6 +964,7 @@ static void nec_init(running_device *device, cpu_irq_callback irqcallback, int t
state_save_register_device_item(device, 0, cpustate->CarryVal);
state_save_register_device_item(device, 0, cpustate->ParityVal);
+ cpustate->config = config;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
diff --git a/src/emu/emu.h b/src/emu/emu.h
index 9563db0ac6a..39772d2dd97 100644
--- a/src/emu/emu.h
+++ b/src/emu/emu.h
@@ -91,6 +91,12 @@
#include "state.h"
// the running machine
+#ifdef MESS
+#include "mess.h"
+#include "uimess.h"
+#include "image.h"
+#include "messdrv.h"
+#endif /* MESS */
#include "mame.h"
// video-related
diff --git a/src/emu/sound/sidenvel.c b/src/emu/sound/sidenvel.c
index d27158783f1..732aa3feba8 100644
--- a/src/emu/sound/sidenvel.c
+++ b/src/emu/sound/sidenvel.c
@@ -30,6 +30,7 @@
/* */
/*========================================================================= */
+#include "emu.h"
#include "sidvoice.h"
#include "sid.h"
diff --git a/src/emu/sound/sidvoice.c b/src/emu/sound/sidvoice.c
index e6b77f0f517..32387b569bc 100644
--- a/src/emu/sound/sidvoice.c
+++ b/src/emu/sound/sidvoice.c
@@ -1,3 +1,4 @@
+#include "emu.h"
#include "sidvoice.h"
#include "sid.h"
#include "sidenvel.h"
diff --git a/src/emu/sound/wave.c b/src/emu/sound/wave.c
index 4d82a83c34a..3a051957cd5 100644
--- a/src/emu/sound/wave.c
+++ b/src/emu/sound/wave.c
@@ -22,7 +22,7 @@
static STREAM_UPDATE( wave_sound_update )
{
#ifdef MESS
- running_device *image = param;
+ const device_config *image = (const device_config *)param;
cassette_image *cassette;
cassette_state state;
double time_index;
@@ -33,7 +33,7 @@ static STREAM_UPDATE( wave_sound_update )
state = cassette_get_state(image);
- state &= CASSETTE_MASK_UISTATE | CASSETTE_MASK_MOTOR | CASSETTE_MASK_SPEAKER;
+ state = (cassette_state)(state & (CASSETTE_MASK_UISTATE | CASSETTE_MASK_MOTOR | CASSETTE_MASK_SPEAKER));
if (image_exists(image) && (ALWAYS_PLAY_SOUND || (state == (CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED))))
{
@@ -62,13 +62,13 @@ static STREAM_UPDATE( wave_sound_update )
static DEVICE_START( wave )
{
- running_device *image = NULL;
+ const device_config *image = NULL;
assert( device != NULL );
- assert( device->baseconfig().static_config != NULL );
+ assert( device->static_config != NULL );
#ifdef MESS
- image = device->machine->device( (const char *)device->baseconfig().static_config );
+ image = device->machine->device( (const char *)device->static_config );
#endif
stream_create(device, 0, 2, device->machine->sample_rate, (void *)image, wave_sound_update);
}
diff --git a/src/emu/ui.c b/src/emu/ui.c
index bd789ef613a..2fda06a054c 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -26,6 +26,7 @@
#include "mess.h"
#include "uimess.h"
#include "inputx.h"
+#include "messopts.h"
#endif /* MESS */
#include <ctype.h>
@@ -240,6 +241,12 @@ int ui_display_startup_screens(running_machine *machine, int first_time, int sho
int show_warnings = TRUE;
int state;
+#ifdef MESS
+ show_warnings = !options_get_bool(mame_options(), OPTION_SKIP_WARNINGS);
+ if (!show_warnings)
+ show_disclaimer = FALSE;
+#endif /* MESS */
+
/* disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
or if we are debugging */
if (!first_time || (str > 0 && str < 60*5) || machine->gamedrv == &GAME_NAME(empty) || (machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)