mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
- 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:
parent
e635ab33e3
commit
04875f17b7
@ -53,8 +53,6 @@ typedef UINT32 DWORD;
|
|||||||
#include "v30mz.h"
|
#include "v30mz.h"
|
||||||
#include "nec.h"
|
#include "nec.h"
|
||||||
|
|
||||||
extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom);
|
|
||||||
|
|
||||||
/* NEC registers */
|
/* NEC registers */
|
||||||
typedef union
|
typedef union
|
||||||
{ /* eight general registers */
|
{ /* eight general registers */
|
||||||
@ -62,6 +60,18 @@ typedef union
|
|||||||
UINT8 b[16]; /* or as 8 bit registers */
|
UINT8 b[16]; /* or as 8 bit registers */
|
||||||
} necbasicregs;
|
} 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;
|
typedef struct _v30mz_state v30mz_state;
|
||||||
struct _v30mz_state
|
struct _v30mz_state
|
||||||
{
|
{
|
||||||
@ -91,8 +101,12 @@ struct _v30mz_state
|
|||||||
UINT32 ea;
|
UINT32 ea;
|
||||||
UINT16 eo;
|
UINT16 eo;
|
||||||
UINT16 e16;
|
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)
|
INLINE v30mz_state *get_safe_token(running_device *device)
|
||||||
{
|
{
|
||||||
assert(device != NULL);
|
assert(device != NULL);
|
||||||
@ -920,13 +934,17 @@ static void set_irq_line(v30mz_state *cpustate, int irqline, int state)
|
|||||||
|
|
||||||
static CPU_DISASSEMBLE( nec )
|
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)
|
static void nec_init(running_device *device, cpu_irq_callback irqcallback, int type)
|
||||||
{
|
{
|
||||||
v30mz_state *cpustate = get_safe_token(device);
|
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->regs.w);
|
||||||
state_save_register_device_item_array(device, 0, cpustate->sregs);
|
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->CarryVal);
|
||||||
state_save_register_device_item(device, 0, cpustate->ParityVal);
|
state_save_register_device_item(device, 0, cpustate->ParityVal);
|
||||||
|
|
||||||
|
cpustate->config = config;
|
||||||
cpustate->irq_callback = irqcallback;
|
cpustate->irq_callback = irqcallback;
|
||||||
cpustate->device = device;
|
cpustate->device = device;
|
||||||
cpustate->program = device->space(AS_PROGRAM);
|
cpustate->program = device->space(AS_PROGRAM);
|
||||||
|
@ -91,6 +91,12 @@
|
|||||||
#include "state.h"
|
#include "state.h"
|
||||||
|
|
||||||
// the running machine
|
// the running machine
|
||||||
|
#ifdef MESS
|
||||||
|
#include "mess.h"
|
||||||
|
#include "uimess.h"
|
||||||
|
#include "image.h"
|
||||||
|
#include "messdrv.h"
|
||||||
|
#endif /* MESS */
|
||||||
#include "mame.h"
|
#include "mame.h"
|
||||||
|
|
||||||
// video-related
|
// video-related
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/*========================================================================= */
|
/*========================================================================= */
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
#include "sidvoice.h"
|
#include "sidvoice.h"
|
||||||
#include "sid.h"
|
#include "sid.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "emu.h"
|
||||||
#include "sidvoice.h"
|
#include "sidvoice.h"
|
||||||
#include "sid.h"
|
#include "sid.h"
|
||||||
#include "sidenvel.h"
|
#include "sidenvel.h"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
static STREAM_UPDATE( wave_sound_update )
|
static STREAM_UPDATE( wave_sound_update )
|
||||||
{
|
{
|
||||||
#ifdef MESS
|
#ifdef MESS
|
||||||
running_device *image = param;
|
const device_config *image = (const device_config *)param;
|
||||||
cassette_image *cassette;
|
cassette_image *cassette;
|
||||||
cassette_state state;
|
cassette_state state;
|
||||||
double time_index;
|
double time_index;
|
||||||
@ -33,7 +33,7 @@ static STREAM_UPDATE( wave_sound_update )
|
|||||||
|
|
||||||
state = cassette_get_state(image);
|
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))))
|
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 )
|
static DEVICE_START( wave )
|
||||||
{
|
{
|
||||||
running_device *image = NULL;
|
const device_config *image = NULL;
|
||||||
|
|
||||||
assert( device != NULL );
|
assert( device != NULL );
|
||||||
assert( device->baseconfig().static_config != NULL );
|
assert( device->static_config != NULL );
|
||||||
|
|
||||||
#ifdef MESS
|
#ifdef MESS
|
||||||
image = device->machine->device( (const char *)device->baseconfig().static_config );
|
image = device->machine->device( (const char *)device->static_config );
|
||||||
#endif
|
#endif
|
||||||
stream_create(device, 0, 2, device->machine->sample_rate, (void *)image, wave_sound_update);
|
stream_create(device, 0, 2, device->machine->sample_rate, (void *)image, wave_sound_update);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "mess.h"
|
#include "mess.h"
|
||||||
#include "uimess.h"
|
#include "uimess.h"
|
||||||
#include "inputx.h"
|
#include "inputx.h"
|
||||||
|
#include "messopts.h"
|
||||||
#endif /* MESS */
|
#endif /* MESS */
|
||||||
|
|
||||||
#include <ctype.h>
|
#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 show_warnings = TRUE;
|
||||||
int state;
|
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,
|
/* disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
|
||||||
or if we are debugging */
|
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)
|
if (!first_time || (str > 0 && str < 60*5) || machine->gamedrv == &GAME_NAME(empty) || (machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user