- 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
This commit is contained in:
Miodrag Milanovic 2010-01-19 13:00:22 +00:00
parent e635ab33e3
commit 04875f17b7
6 changed files with 42 additions and 8 deletions

View File

@ -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);

View File

@ -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

View File

@ -30,6 +30,7 @@
/* */
/*========================================================================= */
#include "emu.h"
#include "sidvoice.h"
#include "sid.h"

View File

@ -1,3 +1,4 @@
#include "emu.h"
#include "sidvoice.h"
#include "sid.h"
#include "sidenvel.h"

View File

@ -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);
}

View File

@ -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)