mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Final round of struct/union/enum normalization.
This commit is contained in:
parent
91f928d6cd
commit
1a30184903
@ -204,10 +204,10 @@ struct alpha8201_state
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* The opcode table now is a combination of cycle counts and function pointers */
|
/* The opcode table now is a combination of cycle counts and function pointers */
|
||||||
typedef struct {
|
struct s_opcode {
|
||||||
unsigned cycles;
|
unsigned cycles;
|
||||||
void (*function) (alpha8201_state *cpustate);
|
void (*function) (alpha8201_state *cpustate);
|
||||||
} s_opcode;
|
};
|
||||||
|
|
||||||
|
|
||||||
#define PC pc.w.l
|
#define PC pc.w.l
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
STRUCTURES & TYPEDEFS
|
STRUCTURES & TYPEDEFS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef struct _am29000_state
|
struct am29000_state
|
||||||
{
|
{
|
||||||
INT32 icount;
|
INT32 icount;
|
||||||
UINT32 pc;
|
UINT32 pc;
|
||||||
@ -136,7 +136,7 @@ typedef struct _am29000_state
|
|||||||
address_space *data;
|
address_space *data;
|
||||||
direct_read_data *datadirect;
|
direct_read_data *datadirect;
|
||||||
address_space *io;
|
address_space *io;
|
||||||
} am29000_state;
|
};
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -61,11 +61,11 @@
|
|||||||
STRUCTS
|
STRUCTS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef struct _op_info
|
struct op_info
|
||||||
{
|
{
|
||||||
void (*opcode)(am29000_state *);
|
void (*opcode)(am29000_state *);
|
||||||
UINT32 flags;
|
UINT32 flags;
|
||||||
} op_info;
|
};
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -61,14 +61,13 @@
|
|||||||
The X value shows where the data word is located, and the Y value is the
|
The X value shows where the data word is located, and the Y value is the
|
||||||
address of the next instruction.
|
address of the next instruction.
|
||||||
*/
|
*/
|
||||||
enum _format_type {branch, shiftl, shiftr, multiply, store, swap, one_address, two_address};
|
enum format_type {branch, shiftl, shiftr, multiply, store, swap, one_address, two_address};
|
||||||
typedef enum _format_type format_type;
|
|
||||||
|
|
||||||
typedef struct instr_desc
|
struct instr_desc
|
||||||
{
|
{
|
||||||
const char *mnemonic;
|
const char *mnemonic;
|
||||||
format_type format; /* -> X and Y are format */
|
format_type format; /* -> X and Y are format */
|
||||||
} instr_desc;
|
};
|
||||||
|
|
||||||
static const instr_desc instructions[16] =
|
static const instr_desc instructions[16] =
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
TYPE DEFINITIONS
|
TYPE DEFINITIONS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef struct _cop400_opcode_map cop400_opcode_map;
|
struct cop400_opcode_map;
|
||||||
|
|
||||||
struct cop400_state
|
struct cop400_state
|
||||||
{
|
{
|
||||||
@ -151,7 +151,7 @@ struct cop400_state
|
|||||||
|
|
||||||
typedef void (*cop400_opcode_func) (cop400_state *cpustate, UINT8 opcode);
|
typedef void (*cop400_opcode_func) (cop400_state *cpustate, UINT8 opcode);
|
||||||
|
|
||||||
struct _cop400_opcode_map {
|
struct cop400_opcode_map {
|
||||||
unsigned cycles;
|
unsigned cycles;
|
||||||
cop400_opcode_func function;
|
cop400_opcode_func function;
|
||||||
};
|
};
|
||||||
|
@ -73,30 +73,27 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* CKI bonding options */
|
/* CKI bonding options */
|
||||||
enum _cop400_cki_bond {
|
enum cop400_cki_bond {
|
||||||
COP400_CKI_DIVISOR_4 = 4,
|
COP400_CKI_DIVISOR_4 = 4,
|
||||||
COP400_CKI_DIVISOR_8 = 8,
|
COP400_CKI_DIVISOR_8 = 8,
|
||||||
COP400_CKI_DIVISOR_16 = 16,
|
COP400_CKI_DIVISOR_16 = 16,
|
||||||
COP400_CKI_DIVISOR_32 = 32
|
COP400_CKI_DIVISOR_32 = 32
|
||||||
};
|
};
|
||||||
typedef enum _cop400_cki_bond cop400_cki_bond;
|
|
||||||
|
|
||||||
/* CKO bonding options */
|
/* CKO bonding options */
|
||||||
enum _cop400_cko_bond {
|
enum cop400_cko_bond {
|
||||||
COP400_CKO_OSCILLATOR_OUTPUT = 0,
|
COP400_CKO_OSCILLATOR_OUTPUT = 0,
|
||||||
COP400_CKO_RAM_POWER_SUPPLY,
|
COP400_CKO_RAM_POWER_SUPPLY,
|
||||||
COP400_CKO_HALT_IO_PORT,
|
COP400_CKO_HALT_IO_PORT,
|
||||||
COP400_CKO_SYNC_INPUT,
|
COP400_CKO_SYNC_INPUT,
|
||||||
COP400_CKO_GENERAL_PURPOSE_INPUT
|
COP400_CKO_GENERAL_PURPOSE_INPUT
|
||||||
};
|
};
|
||||||
typedef enum _cop400_cko_bond cop400_cko_bond;
|
|
||||||
|
|
||||||
/* microbus bonding options */
|
/* microbus bonding options */
|
||||||
enum _cop400_microbus {
|
enum cop400_microbus {
|
||||||
COP400_MICROBUS_DISABLED = 0,
|
COP400_MICROBUS_DISABLED = 0,
|
||||||
COP400_MICROBUS_ENABLED
|
COP400_MICROBUS_ENABLED
|
||||||
};
|
};
|
||||||
typedef enum _cop400_microbus cop400_microbus;
|
|
||||||
|
|
||||||
/* interface */
|
/* interface */
|
||||||
struct cop400_interface
|
struct cop400_interface
|
||||||
|
@ -34,12 +34,11 @@ enum dataType { DT_BYTE,
|
|||||||
DT_DOUBLE_WORD,
|
DT_DOUBLE_WORD,
|
||||||
DT_LONG_WORD };
|
DT_LONG_WORD };
|
||||||
|
|
||||||
struct _typed_pointer
|
struct typed_pointer
|
||||||
{
|
{
|
||||||
void* addr;
|
void* addr;
|
||||||
char data_type;
|
char data_type;
|
||||||
};
|
};
|
||||||
typedef struct _typed_pointer typed_pointer;
|
|
||||||
|
|
||||||
//#define ADDRESS(X) (X<<1)
|
//#define ADDRESS(X) (X<<1)
|
||||||
#define BITS(CUR,MASK) (Dsp56kOpMask(CUR,MASK))
|
#define BITS(CUR,MASK) (Dsp56kOpMask(CUR,MASK))
|
||||||
|
@ -285,7 +285,7 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
/* Delay information */
|
/* Delay information */
|
||||||
struct _delay
|
struct delay_info
|
||||||
{
|
{
|
||||||
INT32 delay_cmd;
|
INT32 delay_cmd;
|
||||||
UINT32 delay_pc;
|
UINT32 delay_pc;
|
||||||
@ -315,7 +315,7 @@ struct hyperstone_state
|
|||||||
UINT8 timer_int_pending;
|
UINT8 timer_int_pending;
|
||||||
emu_timer *timer;
|
emu_timer *timer;
|
||||||
|
|
||||||
struct _delay delay;
|
delay_info delay;
|
||||||
|
|
||||||
device_irq_acknowledge_callback irq_callback;
|
device_irq_acknowledge_callback irq_callback;
|
||||||
legacy_cpu_device *device;
|
legacy_cpu_device *device;
|
||||||
|
@ -39,8 +39,7 @@
|
|||||||
#define cS 4
|
#define cS 4
|
||||||
#define cL 6
|
#define cL 6
|
||||||
|
|
||||||
typedef struct _f8_Regs f8_Regs;
|
struct f8_Regs
|
||||||
struct _f8_Regs
|
|
||||||
{
|
{
|
||||||
UINT16 pc0; /* program counter 0 */
|
UINT16 pc0; /* program counter 0 */
|
||||||
UINT16 pc1; /* program counter 1 */
|
UINT16 pc1; /* program counter 1 */
|
||||||
|
@ -15,7 +15,7 @@ Martin Poupe's site can be found at http://prg.rkk.cz/~mpoupe/
|
|||||||
#include "hcd62121.h"
|
#include "hcd62121.h"
|
||||||
|
|
||||||
|
|
||||||
struct _hcd62121_state
|
struct hcd62121_state
|
||||||
{
|
{
|
||||||
UINT32 prev_pc;
|
UINT32 prev_pc;
|
||||||
UINT16 sp;
|
UINT16 sp;
|
||||||
@ -36,8 +36,6 @@ struct _hcd62121_state
|
|||||||
int icount;
|
int icount;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _hcd62121_state hcd62121_state;
|
|
||||||
|
|
||||||
|
|
||||||
/* From the battery check routine at 20:e874 it looks like
|
/* From the battery check routine at 20:e874 it looks like
|
||||||
bit 3 of the flag register should be the Zero flag. */
|
bit 3 of the flag register should be the Zero flag. */
|
||||||
|
@ -22,12 +22,11 @@ extern int i386_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, int mode)
|
|||||||
|
|
||||||
|
|
||||||
/* I86 registers */
|
/* I86 registers */
|
||||||
typedef union
|
union i8086basicregs
|
||||||
{ /* eight general registers */
|
{ /* eight general registers */
|
||||||
UINT16 w[8]; /* viewed as 16 bits registers */
|
UINT16 w[8]; /* viewed as 16 bits registers */
|
||||||
UINT8 b[16]; /* or as 8 bit registers */
|
UINT8 b[16]; /* or as 8 bit registers */
|
||||||
}
|
};
|
||||||
i8086basicregs;
|
|
||||||
|
|
||||||
struct i8086_state
|
struct i8086_state
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ DECLARE_LEGACY_CPU_DEVICE(I860, i860);
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* i860 state. */
|
/* i860 state. */
|
||||||
typedef struct {
|
struct i860_state_t {
|
||||||
/* Integer registers (32 x 32-bits). */
|
/* Integer registers (32 x 32-bits). */
|
||||||
UINT32 iregs[32];
|
UINT32 iregs[32];
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ typedef struct {
|
|||||||
UINT32 ppc;
|
UINT32 ppc;
|
||||||
int icount;
|
int icount;
|
||||||
|
|
||||||
} i860_state_t;
|
};
|
||||||
|
|
||||||
INLINE i860_state_t *get_safe_token(device_t *device)
|
INLINE i860_state_t *get_safe_token(device_t *device)
|
||||||
{
|
{
|
||||||
|
@ -58,11 +58,11 @@ static const UINT32 s_flags[] = {
|
|||||||
_OVER,0 ,0 ,0
|
_OVER,0 ,0 ,0
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct lr35902dasm
|
||||||
{
|
{
|
||||||
UINT8 mnemonic;
|
UINT8 mnemonic;
|
||||||
const char *arguments;
|
const char *arguments;
|
||||||
} lr35902dasm;
|
};
|
||||||
|
|
||||||
static const lr35902dasm mnemonic_cb[256] = {
|
static const lr35902dasm mnemonic_cb[256] = {
|
||||||
{zRLC,"b"}, {zRLC,"c"}, {zRLC,"d"}, {zRLC,"e"},
|
{zRLC,"b"}, {zRLC,"c"}, {zRLC,"d"}, {zRLC,"e"},
|
||||||
|
@ -120,8 +120,7 @@ z: xxxx address bits a19 .. a16 for memory accesses with a15 1 ?
|
|||||||
|
|
||||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||||
|
|
||||||
typedef struct _m4510_Regs m4510_Regs;
|
struct m4510_Regs {
|
||||||
struct _m4510_Regs {
|
|
||||||
void (*const *insn)(m4510_Regs *); /* pointer to the function pointer table */
|
void (*const *insn)(m4510_Regs *); /* pointer to the function pointer table */
|
||||||
PAIR ppc; /* previous program counter */
|
PAIR ppc; /* previous program counter */
|
||||||
PAIR pc; /* program counter */
|
PAIR pc; /* program counter */
|
||||||
|
@ -48,8 +48,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The 6502 registers.
|
* The 6502 registers.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
typedef struct _m6502_Regs m6502_Regs;
|
struct m6502_Regs
|
||||||
struct _m6502_Regs
|
|
||||||
{
|
{
|
||||||
UINT8 subtype; /* currently selected cpu sub type */
|
UINT8 subtype; /* currently selected cpu sub type */
|
||||||
void (*const *insn)(m6502_Regs *); /* pointer to the function pointer table */
|
void (*const *insn)(m6502_Regs *); /* pointer to the function pointer table */
|
||||||
|
@ -56,8 +56,7 @@ addresses take place.
|
|||||||
|
|
||||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||||
|
|
||||||
typedef struct _m6509_Regs m6509_Regs;
|
struct m6509_Regs {
|
||||||
struct _m6509_Regs {
|
|
||||||
UINT8 subtype; /* currently selected cpu sub type */
|
UINT8 subtype; /* currently selected cpu sub type */
|
||||||
void (*const *insn)(m6509_Regs *); /* pointer to the function pointer table */
|
void (*const *insn)(m6509_Regs *); /* pointer to the function pointer table */
|
||||||
PAIR ppc; /* previous program counter */
|
PAIR ppc; /* previous program counter */
|
||||||
|
@ -55,8 +55,7 @@
|
|||||||
|
|
||||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||||
|
|
||||||
typedef struct _m65ce02_Regs m65ce02_Regs;
|
struct m65ce02_Regs {
|
||||||
struct _m65ce02_Regs {
|
|
||||||
void (*const *insn)(m65ce02_Regs *); /* pointer to the function pointer table */
|
void (*const *insn)(m65ce02_Regs *); /* pointer to the function pointer table */
|
||||||
PAIR ppc; /* previous program counter */
|
PAIR ppc; /* previous program counter */
|
||||||
PAIR pc; /* program counter */
|
PAIR pc; /* program counter */
|
||||||
|
@ -529,8 +529,7 @@ typedef class _m68ki_cpu_core m68ki_cpu_core;
|
|||||||
/* =============================== PROTOTYPES ============================= */
|
/* =============================== PROTOTYPES ============================= */
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
|
|
||||||
typedef union _fp_reg fp_reg;
|
union fp_reg
|
||||||
union _fp_reg
|
|
||||||
{
|
{
|
||||||
UINT64 i;
|
UINT64 i;
|
||||||
double f;
|
double f;
|
||||||
|
@ -91,11 +91,11 @@ static const UINT32 s_flags[] = {
|
|||||||
0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
struct minxdasm {
|
||||||
UINT8 mnemonic;
|
UINT8 mnemonic;
|
||||||
UINT8 argument1;
|
UINT8 argument1;
|
||||||
UINT8 argument2;
|
UINT8 argument2;
|
||||||
} minxdasm;
|
};
|
||||||
|
|
||||||
static const minxdasm mnemonic[256] = {
|
static const minxdasm mnemonic[256] = {
|
||||||
/* 00 - 0F */
|
/* 00 - 0F */
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#define MIPS3_CAUSE_READ_CYCLES 250
|
#define MIPS3_CAUSE_READ_CYCLES 250
|
||||||
|
|
||||||
/* MIPS flavors */
|
/* MIPS flavors */
|
||||||
enum _mips3_flavor
|
enum mips3_flavor
|
||||||
{
|
{
|
||||||
/* MIPS III variants */
|
/* MIPS III variants */
|
||||||
MIPS3_TYPE_MIPS_III,
|
MIPS3_TYPE_MIPS_III,
|
||||||
@ -48,7 +48,6 @@ enum _mips3_flavor
|
|||||||
MIPS3_TYPE_QED5271,
|
MIPS3_TYPE_QED5271,
|
||||||
MIPS3_TYPE_RM7000
|
MIPS3_TYPE_RM7000
|
||||||
};
|
};
|
||||||
typedef enum _mips3_flavor mips3_flavor;
|
|
||||||
|
|
||||||
/* TLB bits */
|
/* TLB bits */
|
||||||
#define TLB_GLOBAL 0x01
|
#define TLB_GLOBAL 0x01
|
||||||
@ -176,7 +175,7 @@ struct mips3_tlb_entry
|
|||||||
|
|
||||||
|
|
||||||
/* forward declaration of implementation-specific state */
|
/* forward declaration of implementation-specific state */
|
||||||
typedef struct _mips3imp_state mips3imp_state;
|
struct mips3imp_state;
|
||||||
|
|
||||||
|
|
||||||
/* MIPS3 state */
|
/* MIPS3 state */
|
||||||
|
@ -179,7 +179,7 @@ struct compiler_state
|
|||||||
|
|
||||||
|
|
||||||
/* MIPS3 registers */
|
/* MIPS3 registers */
|
||||||
struct _mips3imp_state
|
struct mips3imp_state
|
||||||
{
|
{
|
||||||
/* core state */
|
/* core state */
|
||||||
drc_cache * cache; /* pointer to the DRC code cache */
|
drc_cache * cache; /* pointer to the DRC code cache */
|
||||||
|
@ -34,29 +34,29 @@ struct mn102_info
|
|||||||
UINT16 psw;
|
UINT16 psw;
|
||||||
UINT16 mdr;
|
UINT16 mdr;
|
||||||
|
|
||||||
struct _simple_timer {
|
struct {
|
||||||
UINT8 mode;
|
UINT8 mode;
|
||||||
UINT8 base;
|
UINT8 base;
|
||||||
UINT8 cur;
|
UINT8 cur;
|
||||||
} simple_timer[NUM_TIMERS_8BIT];
|
} simple_timer[NUM_TIMERS_8BIT];
|
||||||
|
|
||||||
emu_timer *timer_timers[NUM_TIMERS_8BIT];
|
emu_timer *timer_timers[NUM_TIMERS_8BIT];
|
||||||
|
|
||||||
struct _prescaler {
|
struct {
|
||||||
UINT8 cycles;
|
UINT8 cycles;
|
||||||
UINT8 mode;
|
UINT8 mode;
|
||||||
} prescaler[NUM_PRESCALERS];
|
} prescaler[NUM_PRESCALERS];
|
||||||
|
|
||||||
struct _dma {
|
struct {
|
||||||
UINT32 adr;
|
UINT32 adr;
|
||||||
UINT32 count;
|
UINT32 count;
|
||||||
UINT16 iadr;
|
UINT16 iadr;
|
||||||
UINT8 ctrll, ctrlh, irq;
|
UINT8 ctrll, ctrlh, irq;
|
||||||
} dma[8];
|
} dma[8];
|
||||||
|
|
||||||
struct _serial {
|
struct {
|
||||||
UINT8 ctrll, ctrlh;
|
UINT8 ctrll, ctrlh;
|
||||||
UINT8 buf;
|
UINT8 buf;
|
||||||
} serial[2];
|
} serial[2];
|
||||||
|
|
||||||
UINT8 ddr[8];
|
UINT8 ddr[8];
|
||||||
|
@ -86,13 +86,13 @@ static const char *const PIC16C5xFormats[] = {
|
|||||||
|
|
||||||
#define MAX_OPS (((sizeof(PIC16C5xFormats) / sizeof(PIC16C5xFormats[0])) - 1) / PTRS_PER_FORMAT)
|
#define MAX_OPS (((sizeof(PIC16C5xFormats) / sizeof(PIC16C5xFormats[0])) - 1) / PTRS_PER_FORMAT)
|
||||||
|
|
||||||
typedef struct opcode {
|
struct PIC16C5xOpcode {
|
||||||
word mask; /* instruction mask */
|
word mask; /* instruction mask */
|
||||||
word bits; /* constant bits */
|
word bits; /* constant bits */
|
||||||
word extcode; /* value that gets extension code */
|
word extcode; /* value that gets extension code */
|
||||||
const char *parse; /* how to parse bits */
|
const char *parse; /* how to parse bits */
|
||||||
const char *fmt; /* instruction format */
|
const char *fmt; /* instruction format */
|
||||||
} PIC16C5xOpcode;
|
};
|
||||||
|
|
||||||
static PIC16C5xOpcode Op[MAX_OPS+1];
|
static PIC16C5xOpcode Op[MAX_OPS+1];
|
||||||
static int OpInizialized = 0;
|
static int OpInizialized = 0;
|
||||||
|
@ -96,13 +96,13 @@ static const char *const PIC16C62xFormats[] = {
|
|||||||
|
|
||||||
#define MAX_OPS (((sizeof(PIC16C62xFormats) / sizeof(PIC16C62xFormats[0])) - 1) / PTRS_PER_FORMAT)
|
#define MAX_OPS (((sizeof(PIC16C62xFormats) / sizeof(PIC16C62xFormats[0])) - 1) / PTRS_PER_FORMAT)
|
||||||
|
|
||||||
typedef struct opcode {
|
struct PIC16C62xOpcode {
|
||||||
word mask; /* instruction mask */
|
word mask; /* instruction mask */
|
||||||
word bits; /* constant bits */
|
word bits; /* constant bits */
|
||||||
word extcode; /* value that gets extension code */
|
word extcode; /* value that gets extension code */
|
||||||
const char *parse; /* how to parse bits */
|
const char *parse; /* how to parse bits */
|
||||||
const char *fmt; /* instruction format */
|
const char *fmt; /* instruction format */
|
||||||
} PIC16C62xOpcode;
|
};
|
||||||
|
|
||||||
static PIC16C62xOpcode Op[MAX_OPS+1];
|
static PIC16C62xOpcode Op[MAX_OPS+1];
|
||||||
static int OpInizialized = 0;
|
static int OpInizialized = 0;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#define PPCCAP_604_MMU 0x100 /* TRUE if we have 604-class MMU features */
|
#define PPCCAP_604_MMU 0x100 /* TRUE if we have 604-class MMU features */
|
||||||
|
|
||||||
/* PowerPC flavors */
|
/* PowerPC flavors */
|
||||||
enum _powerpc_flavor
|
enum powerpc_flavor
|
||||||
{
|
{
|
||||||
PPC_MODEL_403GA = 0x00200000,
|
PPC_MODEL_403GA = 0x00200000,
|
||||||
PPC_MODEL_403GB = 0x00200100,
|
PPC_MODEL_403GB = 0x00200100,
|
||||||
@ -75,7 +75,6 @@ enum _powerpc_flavor
|
|||||||
PPC_MODEL_MPC8241 = 0x80811014, /* "Kahlua Lt" */
|
PPC_MODEL_MPC8241 = 0x80811014, /* "Kahlua Lt" */
|
||||||
PPC_MODEL_MPC8245 = 0x80811014, /* "Kahlua II" */
|
PPC_MODEL_MPC8245 = 0x80811014, /* "Kahlua II" */
|
||||||
};
|
};
|
||||||
typedef enum _powerpc_flavor powerpc_flavor;
|
|
||||||
|
|
||||||
|
|
||||||
/* exception types */
|
/* exception types */
|
||||||
@ -504,7 +503,7 @@ struct ppc4xx_spu_state
|
|||||||
|
|
||||||
|
|
||||||
/* forward declaration of implementation-specific state */
|
/* forward declaration of implementation-specific state */
|
||||||
typedef struct _ppcimp_state ppcimp_state;
|
struct ppcimp_state;
|
||||||
|
|
||||||
|
|
||||||
/* PowerPC state */
|
/* PowerPC state */
|
||||||
|
@ -158,7 +158,7 @@ struct compiler_state
|
|||||||
|
|
||||||
|
|
||||||
/* PowerPC implementation state */
|
/* PowerPC implementation state */
|
||||||
struct _ppcimp_state
|
struct ppcimp_state
|
||||||
{
|
{
|
||||||
/* core state */
|
/* core state */
|
||||||
drc_cache * cache; /* pointer to the DRC code cache */
|
drc_cache * cache; /* pointer to the DRC code cache */
|
||||||
|
@ -440,9 +440,7 @@ extern const device_type CXD8606CQ;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _DasmPSXCPU_state DasmPSXCPU_state;
|
struct DasmPSXCPU_state
|
||||||
|
|
||||||
struct _DasmPSXCPU_state
|
|
||||||
{
|
{
|
||||||
UINT32 pc;
|
UINT32 pc;
|
||||||
int delayr;
|
int delayr;
|
||||||
|
@ -153,7 +153,7 @@ union ACCUMULATOR_REG
|
|||||||
INT16 w[4];
|
INT16 w[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _rspimp_state rspimp_state;
|
struct rspimp_state;
|
||||||
struct rsp_state
|
struct rsp_state
|
||||||
{
|
{
|
||||||
const rsp_config *config;
|
const rsp_config *config;
|
||||||
|
@ -100,7 +100,7 @@ struct compiler_state
|
|||||||
code_label labelnum; /* index for local labels */
|
code_label labelnum; /* index for local labels */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _rspimp_state
|
struct rspimp_state
|
||||||
{
|
{
|
||||||
/* core state */
|
/* core state */
|
||||||
drc_cache * cache; /* pointer to the DRC code cache */
|
drc_cache * cache; /* pointer to the DRC code cache */
|
||||||
|
@ -552,7 +552,7 @@ static const struct {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _opcode_sel
|
enum opcode_sel
|
||||||
{
|
{
|
||||||
Complete=-1,
|
Complete=-1,
|
||||||
Illegal,
|
Illegal,
|
||||||
@ -570,9 +570,8 @@ enum _opcode_sel
|
|||||||
OpcodeE,
|
OpcodeE,
|
||||||
OpcodeF
|
OpcodeF
|
||||||
};
|
};
|
||||||
typedef enum _opcode_sel opcode_sel;
|
|
||||||
|
|
||||||
enum _opcode_adr
|
enum opcode_adr
|
||||||
{
|
{
|
||||||
AdrNone,
|
AdrNone,
|
||||||
AdrAF, AdrA, AdrB, AdrCount,
|
AdrAF, AdrA, AdrB, AdrCount,
|
||||||
@ -584,7 +583,6 @@ enum _opcode_adr
|
|||||||
FieldP, FieldWP, FieldXS, FieldX, FieldS, FieldM, FieldB, FieldW, FieldA,
|
FieldP, FieldWP, FieldXS, FieldX, FieldS, FieldM, FieldB, FieldW, FieldA,
|
||||||
AdrImmCount
|
AdrImmCount
|
||||||
};
|
};
|
||||||
typedef enum _opcode_adr opcode_adr;
|
|
||||||
|
|
||||||
struct OPCODE
|
struct OPCODE
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "se3208.h"
|
#include "se3208.h"
|
||||||
|
|
||||||
|
|
||||||
static struct _DisSE3208
|
static struct
|
||||||
{
|
{
|
||||||
UINT32 PC;
|
UINT32 PC;
|
||||||
UINT32 SR;
|
UINT32 SR;
|
||||||
|
@ -88,8 +88,7 @@ struct DMA_OP
|
|||||||
bool active;
|
bool active;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _SHARC_REGS SHARC_REGS;
|
struct SHARC_REGS
|
||||||
struct _SHARC_REGS
|
|
||||||
{
|
{
|
||||||
UINT32 pc;
|
UINT32 pc;
|
||||||
SHARC_REG r[16];
|
SHARC_REG r[16];
|
||||||
|
@ -65,11 +65,11 @@ static const UINT32 s_flags[] = {
|
|||||||
0, 0, 0
|
0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct sm8500dasm
|
||||||
{
|
{
|
||||||
UINT8 mnemonic;
|
UINT8 mnemonic;
|
||||||
UINT8 arguments;
|
UINT8 arguments;
|
||||||
} sm8500dasm;
|
};
|
||||||
|
|
||||||
static const char *const sm8500_cond[16] = {
|
static const char *const sm8500_cond[16] = {
|
||||||
"F", "LT", "LE", "ULE", "OV", "MI", "Z", "C",
|
"F", "LT", "LE", "ULE", "OV", "MI", "Z", "C",
|
||||||
|
@ -10,22 +10,22 @@
|
|||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "tlcs90.h"
|
#include "tlcs90.h"
|
||||||
|
|
||||||
typedef enum { UNKNOWN, NOP, EX, EXX, LD, LDW, LDA, LDI, LDIR, LDD, LDDR, CPI, CPIR, CPD, CPDR, PUSH, POP, JP, JR, CALL, CALLR, RET, RETI, HALT, DI, EI, SWI, DAA, CPL, NEG, LDAR, RCF, SCF, CCF, TSET, BIT, SET, RES, INC, DEC, INCX, DECX, INCW, DECW, ADD, ADC, SUB, SBC, AND, XOR, OR, CP, RLC, RRC, RL, RR, SLA, SRA, SLL, SRL, RLD, RRD, DJNZ, MUL, DIV } _e_op;
|
enum _e_op { UNKNOWN, NOP, EX, EXX, LD, LDW, LDA, LDI, LDIR, LDD, LDDR, CPI, CPIR, CPD, CPDR, PUSH, POP, JP, JR, CALL, CALLR, RET, RETI, HALT, DI, EI, SWI, DAA, CPL, NEG, LDAR, RCF, SCF, CCF, TSET, BIT, SET, RES, INC, DEC, INCX, DECX, INCW, DECW, ADD, ADC, SUB, SBC, AND, XOR, OR, CP, RLC, RRC, RL, RR, SLA, SRA, SLL, SRL, RLD, RRD, DJNZ, MUL, DIV };
|
||||||
typedef UINT8 e_op;
|
typedef UINT8 e_op;
|
||||||
static const char *const op_names[] = { "??", "nop", "ex", "exx", "ld", "ldw", "lda", "ldi", "ldir", "ldd", "lddr", "cpi", "cpir", "cpd", "cpdr", "push", "pop", "jp", "jr", "call", "callr", "ret", "reti", "halt", "di", "ei", "swi", "daa", "cpl", "neg", "ldar", "rcf", "scf", "ccf", "tset", "bit", "set", "res", "inc", "dec", "incx", "decx", "incw", "decw", "add", "adc", "sub", "sbc", "and", "xor", "or", "cp", "rlc", "rrc", "rl", "rr", "sla", "sra", "sll", "srl", "rld", "rrd", "djnz", "mul", "div" };
|
static const char *const op_names[] = { "??", "nop", "ex", "exx", "ld", "ldw", "lda", "ldi", "ldir", "ldd", "lddr", "cpi", "cpir", "cpd", "cpdr", "push", "pop", "jp", "jr", "call", "callr", "ret", "reti", "halt", "di", "ei", "swi", "daa", "cpl", "neg", "ldar", "rcf", "scf", "ccf", "tset", "bit", "set", "res", "inc", "dec", "incx", "decx", "incw", "decw", "add", "adc", "sub", "sbc", "and", "xor", "or", "cp", "rlc", "rrc", "rl", "rr", "sla", "sra", "sll", "srl", "rld", "rrd", "djnz", "mul", "div" };
|
||||||
|
|
||||||
typedef enum {
|
enum e_mode {
|
||||||
MODE_NONE, MODE_BIT8, MODE_CC,
|
MODE_NONE, MODE_BIT8, MODE_CC,
|
||||||
MODE_I8, MODE_D8, MODE_R8,
|
MODE_I8, MODE_D8, MODE_R8,
|
||||||
MODE_I16, MODE_D16, MODE_R16,
|
MODE_I16, MODE_D16, MODE_R16,
|
||||||
MODE_MI16, MODE_MR16, MODE_MR16D8, MODE_MR16R8,
|
MODE_MI16, MODE_MR16, MODE_MR16D8, MODE_MR16R8,
|
||||||
MODE_R16D8, MODE_R16R8
|
MODE_R16D8, MODE_R16R8
|
||||||
} e_mode;
|
};
|
||||||
ALLOW_SAVE_TYPE(e_mode); // allow save_item on a non-fundamental type
|
ALLOW_SAVE_TYPE(e_mode); // allow save_item on a non-fundamental type
|
||||||
|
|
||||||
typedef UINT16 e_r;
|
typedef UINT16 e_r;
|
||||||
|
|
||||||
typedef struct
|
struct t90_Regs
|
||||||
{
|
{
|
||||||
PAIR prvpc,pc,sp,af,bc,de,hl,ix,iy;
|
PAIR prvpc,pc,sp,af,bc,de,hl,ix,iy;
|
||||||
PAIR af2,bc2,de2,hl2;
|
PAIR af2,bc2,de2,hl2;
|
||||||
@ -59,7 +59,7 @@ typedef struct
|
|||||||
|
|
||||||
UINT32 addr;
|
UINT32 addr;
|
||||||
|
|
||||||
} t90_Regs;
|
};
|
||||||
|
|
||||||
INLINE t90_Regs *get_safe_token(device_t *device)
|
INLINE t90_Regs *get_safe_token(device_t *device)
|
||||||
{
|
{
|
||||||
@ -1280,7 +1280,7 @@ INT2 P82 Rising Edge -
|
|||||||
|
|
||||||
*************************************************************************************************************/
|
*************************************************************************************************************/
|
||||||
|
|
||||||
typedef enum { INTSWI = 0, INTNMI, INTWD, INT0, INTT0, INTT1, INTT2, INTT3, INTT4, INT1, INTT5, INT2, INTRX, INTTX, INTMAX } e_irq;
|
enum e_irq { INTSWI = 0, INTNMI, INTWD, INT0, INTT0, INTT1, INTT2, INTT3, INTT4, INT1, INTT5, INT2, INTRX, INTTX, INTMAX };
|
||||||
DECLARE_ENUM_OPERATORS(e_irq)
|
DECLARE_ENUM_OPERATORS(e_irq)
|
||||||
|
|
||||||
INLINE void leave_halt(t90_Regs *cpustate)
|
INLINE void leave_halt(t90_Regs *cpustate)
|
||||||
|
@ -13,7 +13,7 @@ CPU_DISASSEMBLE( t90 );
|
|||||||
|
|
||||||
#define T90_IOBASE 0xffc0
|
#define T90_IOBASE 0xffc0
|
||||||
|
|
||||||
typedef enum
|
enum e_ir
|
||||||
{
|
{
|
||||||
T90_P0=T90_IOBASE, T90_P1, T90_P01CR_IRFL, T90_IRFH, T90_P2, T90_P2CR, T90_P3, T90_P3CR,
|
T90_P0=T90_IOBASE, T90_P1, T90_P01CR_IRFL, T90_IRFH, T90_P2, T90_P2CR, T90_P3, T90_P3CR,
|
||||||
T90_P4, T90_P4CR, T90_P5, T90_SMMOD, T90_P6, T90_P7, T90_P67CR, T90_SMCR,
|
T90_P4, T90_P4CR, T90_P5, T90_SMMOD, T90_P6, T90_P7, T90_P67CR, T90_SMCR,
|
||||||
@ -21,6 +21,6 @@ typedef enum
|
|||||||
T90_TCLK, T90_TFFCR, T90_TMOD, T90_TRUN, T90_CAP1L, T90_CAP1H, T90_CAP2L, T90_CAL2H,
|
T90_TCLK, T90_TFFCR, T90_TMOD, T90_TRUN, T90_CAP1L, T90_CAP1H, T90_CAP2L, T90_CAL2H,
|
||||||
T90_TREG4L, T90_TREG4H, T90_TREG5L, T90_TREG5H, T90_T4MOD, T90_T4FFCR, T90_INTEL, T90_INTEH,
|
T90_TREG4L, T90_TREG4H, T90_TREG5L, T90_TREG5H, T90_T4MOD, T90_T4FFCR, T90_INTEL, T90_INTEH,
|
||||||
T90_DMAEH, T90_SCMOD, T90_SCCR, T90_SCBUF, T90_BX, T90_BY, T90_ADREG, T90_ADMOD
|
T90_DMAEH, T90_SCMOD, T90_SCCR, T90_SCBUF, T90_BX, T90_BY, T90_ADREG, T90_ADMOD
|
||||||
} e_ir;
|
};
|
||||||
|
|
||||||
#endif /* __TLCS90_H__ */
|
#endif /* __TLCS90_H__ */
|
||||||
|
@ -156,13 +156,13 @@ static const char *const TMS32010Formats[] = {
|
|||||||
|
|
||||||
#define MAX_OPS (((sizeof(TMS32010Formats) / sizeof(TMS32010Formats[0])) - 1) / PTRS_PER_FORMAT)
|
#define MAX_OPS (((sizeof(TMS32010Formats) / sizeof(TMS32010Formats[0])) - 1) / PTRS_PER_FORMAT)
|
||||||
|
|
||||||
typedef struct opcode {
|
struct TMS32010Opcode {
|
||||||
word mask; /* instruction mask */
|
word mask; /* instruction mask */
|
||||||
word bits; /* constant bits */
|
word bits; /* constant bits */
|
||||||
word extcode; /* value that gets extension code */
|
word extcode; /* value that gets extension code */
|
||||||
const char *parse; /* how to parse bits */
|
const char *parse; /* how to parse bits */
|
||||||
const char *fmt; /* instruction format */
|
const char *fmt; /* instruction format */
|
||||||
} TMS32010Opcode;
|
};
|
||||||
|
|
||||||
static TMS32010Opcode Op[MAX_OPS+1];
|
static TMS32010Opcode Op[MAX_OPS+1];
|
||||||
static int OpInizialized = 0;
|
static int OpInizialized = 0;
|
||||||
|
@ -76,8 +76,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _tms32010_state tms32010_state; /* Page 3-6 shows all registers */
|
struct tms32010_state
|
||||||
struct _tms32010_state
|
|
||||||
{
|
{
|
||||||
/******************** CPU Internal Registers *******************/
|
/******************** CPU Internal Registers *******************/
|
||||||
UINT16 PC;
|
UINT16 PC;
|
||||||
|
@ -316,13 +316,13 @@ static const char *const TMS32025Formats[] = {
|
|||||||
|
|
||||||
#define MAX_OPS (((sizeof(TMS32025Formats) / sizeof(TMS32025Formats[0])) - 1) / PTRS_PER_FORMAT)
|
#define MAX_OPS (((sizeof(TMS32025Formats) / sizeof(TMS32025Formats[0])) - 1) / PTRS_PER_FORMAT)
|
||||||
|
|
||||||
typedef struct opcode {
|
struct TMS32025Opcode {
|
||||||
word mask; /* instruction mask */
|
word mask; /* instruction mask */
|
||||||
word bits; /* constant bits */
|
word bits; /* constant bits */
|
||||||
word extcode; /* value that gets extension code */
|
word extcode; /* value that gets extension code */
|
||||||
const char *parse; /* how to parse bits */
|
const char *parse; /* how to parse bits */
|
||||||
const char *fmt; /* instruction format */
|
const char *fmt; /* instruction format */
|
||||||
} TMS32025Opcode;
|
};
|
||||||
|
|
||||||
static TMS32025Opcode Op[MAX_OPS+1];
|
static TMS32025Opcode Op[MAX_OPS+1];
|
||||||
static int OpInizialized = 0;
|
static int OpInizialized = 0;
|
||||||
|
@ -137,9 +137,7 @@ Table 3-2. TMS32025/26 Memory Blocks
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _tms32025_state tms32025_state; /* Page 3-6 (45) shows all registers */
|
struct tms32025_state
|
||||||
struct _tms32025_state
|
|
||||||
|
|
||||||
{
|
{
|
||||||
/******************** CPU Internal Registers *******************/
|
/******************** CPU Internal Registers *******************/
|
||||||
UINT16 PREVPC; /* previous program counter */
|
UINT16 PREVPC; /* previous program counter */
|
||||||
@ -198,15 +196,13 @@ struct tms32025_opcode
|
|||||||
void (*function)(tms32025_state *);
|
void (*function)(tms32025_state *);
|
||||||
};
|
};
|
||||||
/* opcode table entry (Opcode CE has sub-opcodes) */
|
/* opcode table entry (Opcode CE has sub-opcodes) */
|
||||||
typedef struct _tms32025_opcode_CE tms32025_opcode_CE;
|
struct tms32025_opcode_CE
|
||||||
struct _tms32025_opcode_CE
|
|
||||||
{
|
{
|
||||||
UINT8 cycles;
|
UINT8 cycles;
|
||||||
void (*function)(tms32025_state *);
|
void (*function)(tms32025_state *);
|
||||||
};
|
};
|
||||||
/* opcode table entry (Opcode Dx has sub-opcodes) */
|
/* opcode table entry (Opcode Dx has sub-opcodes) */
|
||||||
typedef struct _tms32025_opcode_Dx tms32025_opcode_Dx;
|
struct tms32025_opcode_Dx
|
||||||
struct _tms32025_opcode_Dx
|
|
||||||
{
|
{
|
||||||
UINT8 cycles;
|
UINT8 cycles;
|
||||||
void (*function)(tms32025_state *);
|
void (*function)(tms32025_state *);
|
||||||
|
@ -29,8 +29,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* TMS34010 State */
|
/* TMS34010 State */
|
||||||
typedef struct _XY XY;
|
struct XY
|
||||||
struct _XY
|
|
||||||
{
|
{
|
||||||
#ifdef LSB_FIRST
|
#ifdef LSB_FIRST
|
||||||
INT16 x;
|
INT16 x;
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||||
|
|
||||||
typedef struct _tms7000_state tms7000_state;
|
struct tms7000_state;
|
||||||
|
|
||||||
/* Private prototypes */
|
/* Private prototypes */
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ static UINT16 bcd_sub( UINT16 a, UINT16 b);
|
|||||||
#define PULLBYTE(b) b = RM(pSP); pSP--
|
#define PULLBYTE(b) b = RM(pSP); pSP--
|
||||||
#define PULLWORD(w) w.b.l = RM(pSP); pSP--; w.b.h = RM(pSP); pSP--
|
#define PULLWORD(w) w.b.l = RM(pSP); pSP--; w.b.h = RM(pSP); pSP--
|
||||||
|
|
||||||
struct _tms7000_state
|
struct tms7000_state
|
||||||
{
|
{
|
||||||
PAIR pc; /* Program counter */
|
PAIR pc; /* Program counter */
|
||||||
UINT8 sp; /* Stack Pointer */
|
UINT8 sp; /* Stack Pointer */
|
||||||
|
@ -73,12 +73,12 @@ enum
|
|||||||
sd_11_15 = 0x200 /* bits 11-15 should be cleared in lwpi, limi, idle, rset, rtwp, ckon, ckof, lrex */
|
sd_11_15 = 0x200 /* bits 11-15 should be cleared in lwpi, limi, idle, rset, rtwp, ckon, ckof, lrex */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct description_t
|
struct description_t
|
||||||
{
|
{
|
||||||
const char *mnemonic;
|
const char *mnemonic;
|
||||||
format_t format;
|
format_t format;
|
||||||
int flags;
|
int flags;
|
||||||
} description_t;
|
};
|
||||||
|
|
||||||
|
|
||||||
enum opcodes {
|
enum opcodes {
|
||||||
|
@ -257,7 +257,7 @@ Other references can be found on spies.com:
|
|||||||
*/
|
*/
|
||||||
#define USE_16_BIT_ACCESSORS ((TMS99XX_MODEL == TI990_10_ID) || (TMS99XX_MODEL == TMS9900_ID) || (TMS99XX_MODEL == TMS9940_ID) || (IS_99000))
|
#define USE_16_BIT_ACCESSORS ((TMS99XX_MODEL == TI990_10_ID) || (TMS99XX_MODEL == TMS9900_ID) || (TMS99XX_MODEL == TMS9940_ID) || (IS_99000))
|
||||||
|
|
||||||
typedef struct _tms99xx_state tms99xx_state;
|
struct tms99xx_state;
|
||||||
|
|
||||||
INLINE void execute(tms99xx_state *cpustate, UINT16 opcode);
|
INLINE void execute(tms99xx_state *cpustate, UINT16 opcode);
|
||||||
|
|
||||||
@ -394,13 +394,13 @@ a ST_MASK */
|
|||||||
#define R14 28
|
#define R14 28
|
||||||
#define R15 30
|
#define R15 30
|
||||||
|
|
||||||
typedef struct map_file_t
|
struct map_file_t
|
||||||
{
|
{
|
||||||
UINT16 L[3], B[3]; /* actual registers */
|
UINT16 L[3], B[3]; /* actual registers */
|
||||||
UINT32 limit[3], bias[3]; /* equivalent in a more convenient form */
|
UINT32 limit[3], bias[3]; /* equivalent in a more convenient form */
|
||||||
} map_file_t;
|
};
|
||||||
|
|
||||||
struct _tms99xx_state
|
struct tms99xx_state
|
||||||
{
|
{
|
||||||
/* "actual" tms9900 registers : */
|
/* "actual" tms9900 registers : */
|
||||||
UINT16 WP; /* Workspace pointer */
|
UINT16 WP; /* Workspace pointer */
|
||||||
|
@ -109,7 +109,7 @@ static const char opname[][5] =
|
|||||||
"*int"
|
"*int"
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _tms99xx_config
|
struct tms99xx_config
|
||||||
{
|
{
|
||||||
devcb_write8 external_callback;
|
devcb_write8 external_callback;
|
||||||
devcb_read8 irq_level;
|
devcb_read8 irq_level;
|
||||||
@ -117,7 +117,7 @@ typedef struct _tms99xx_config
|
|||||||
devcb_write_line clock_out;
|
devcb_write_line clock_out;
|
||||||
devcb_write_line wait_line;
|
devcb_write_line wait_line;
|
||||||
devcb_write_line holda_line;
|
devcb_write_line holda_line;
|
||||||
} tms99xx_config;
|
};
|
||||||
|
|
||||||
#define TMS99xx_CONFIG(name) \
|
#define TMS99xx_CONFIG(name) \
|
||||||
const tms99xx_config(name) =
|
const tms99xx_config(name) =
|
||||||
@ -270,20 +270,20 @@ private:
|
|||||||
typedef void (tms99xx_device::*ophandler)(void);
|
typedef void (tms99xx_device::*ophandler)(void);
|
||||||
|
|
||||||
// Opcode list entry
|
// Opcode list entry
|
||||||
typedef struct _tms_instruction
|
struct tms_instruction
|
||||||
{
|
{
|
||||||
UINT16 opcode;
|
UINT16 opcode;
|
||||||
int id;
|
int id;
|
||||||
int format;
|
int format;
|
||||||
microprogram prog; // Microprogram
|
microprogram prog; // Microprogram
|
||||||
} tms_instruction;
|
};
|
||||||
|
|
||||||
// Lookup table entry
|
// Lookup table entry
|
||||||
typedef struct _lookup_entry
|
struct lookup_entry
|
||||||
{
|
{
|
||||||
struct _lookup_entry *next_digit;
|
lookup_entry *next_digit;
|
||||||
const tms_instruction *entry;
|
const tms_instruction *entry;
|
||||||
} lookup_entry;
|
};
|
||||||
|
|
||||||
// Pointer to the lookup table
|
// Pointer to the lookup table
|
||||||
lookup_entry* m_command_lookup_table;
|
lookup_entry* m_command_lookup_table;
|
||||||
|
@ -61,14 +61,14 @@ DECLARE_LEGACY_CPU_DEVICE(TI990_10L, ti990_10l);
|
|||||||
structure with the parameters ti990_10_reset wants.
|
structure with the parameters ti990_10_reset wants.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct ti990_10reset_param
|
struct ti990_10reset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
ti99xx_rset_func rset_callback;
|
ti99xx_rset_func rset_callback;
|
||||||
ti99xx_lrex_func lrex_callback;
|
ti99xx_lrex_func lrex_callback;
|
||||||
ti99xx_ckon_ckof_func ckon_ckof_callback;
|
ti99xx_ckon_ckof_func ckon_ckof_callback;
|
||||||
ti99xx_error_interrupt_func error_interrupt_callback;
|
ti99xx_error_interrupt_func error_interrupt_callback;
|
||||||
} ti990_10reset_param;
|
};
|
||||||
|
|
||||||
/* accessor for the internal ROM */
|
/* accessor for the internal ROM */
|
||||||
extern READ16_HANDLER(ti990_10_internal_r);
|
extern READ16_HANDLER(ti990_10_internal_r);
|
||||||
@ -87,10 +87,10 @@ DECLARE_LEGACY_CPU_DEVICE(TMS9900L, tms9900l);
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms9900_reset.
|
structure with optional parameters for tms9900_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms9900reset_param
|
struct tms9900reset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms9900reset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -99,10 +99,10 @@ typedef struct tms9900reset_param
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms9940_reset.
|
structure with optional parameters for tms9940_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms9940reset_param
|
struct tms9940reset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms9940reset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -111,10 +111,10 @@ DECLARE_LEGACY_CPU_DEVICE(TMS9980L, tms9980al);
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms9980a_reset.
|
structure with optional parameters for tms9980a_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms9980areset_param
|
struct tms9980areset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms9980areset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -123,10 +123,10 @@ typedef struct tms9980areset_param
|
|||||||
/*//
|
/*//
|
||||||
structure with optional parameters for tms9985_reset.
|
structure with optional parameters for tms9985_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms9985reset_param
|
struct tms9985reset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms9985reset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -135,10 +135,10 @@ typedef struct tms9985reset_param
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms9989_reset.
|
structure with optional parameters for tms9989_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms9989reset_param
|
struct tms9989reset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms9989reset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ DECLARE_LEGACY_CPU_DEVICE(TMS9995L, tms9995l);
|
|||||||
/*
|
/*
|
||||||
structure with the parameters tms9995_reset wants.
|
structure with the parameters tms9995_reset wants.
|
||||||
*/
|
*/
|
||||||
typedef struct tms9995reset_param
|
struct tms9995reset_param
|
||||||
{
|
{
|
||||||
/* auto_wait_state : a non-zero value makes tms9995 generate a wait state automatically on each
|
/* auto_wait_state : a non-zero value makes tms9995 generate a wait state automatically on each
|
||||||
memory access */
|
memory access */
|
||||||
@ -159,7 +159,7 @@ typedef struct tms9995reset_param
|
|||||||
disabled. This chip is used by the ti99/8 so that internal RAM does
|
disabled. This chip is used by the ti99/8 so that internal RAM does
|
||||||
not prevent the mapper from working correctly. */
|
not prevent the mapper from working correctly. */
|
||||||
int is_mp9537;
|
int is_mp9537;
|
||||||
} tms9995reset_param;
|
};
|
||||||
|
|
||||||
/* accessor for the first 252 bytes of internal RAM */
|
/* accessor for the first 252 bytes of internal RAM */
|
||||||
extern READ8_HANDLER(tms9995_internal1_r);
|
extern READ8_HANDLER(tms9995_internal1_r);
|
||||||
@ -175,10 +175,10 @@ extern WRITE8_HANDLER(tms9995_internal2_w);
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms99000_reset.
|
structure with optional parameters for tms99000_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms99000reset_param
|
struct tms99000reset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms99000reset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -187,10 +187,10 @@ typedef struct tms99000reset_param
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms99105a_reset.
|
structure with optional parameters for tms99105a_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms99105areset_param
|
struct tms99105areset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms99105areset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -199,10 +199,10 @@ typedef struct tms99105areset_param
|
|||||||
/*
|
/*
|
||||||
structure with optional parameters for tms99110a_reset.
|
structure with optional parameters for tms99110a_reset.
|
||||||
*/
|
*/
|
||||||
typedef struct tms99110areset_param
|
struct tms99110areset_param
|
||||||
{
|
{
|
||||||
ti99xx_idle_func idle_callback;
|
ti99xx_idle_func idle_callback;
|
||||||
} tms99110areset_param;
|
};
|
||||||
|
|
||||||
|
|
||||||
unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom, const UINT8 *opram);
|
unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom, const UINT8 *opram);
|
||||||
|
@ -60,7 +60,7 @@ enum
|
|||||||
Configuration for the TMS9995. The connections are provided by the
|
Configuration for the TMS9995. The connections are provided by the
|
||||||
main board which contains the processor.
|
main board which contains the processor.
|
||||||
*/
|
*/
|
||||||
typedef struct _tms9995_config
|
struct tms9995_config
|
||||||
{
|
{
|
||||||
devcb_write8 external_callback;
|
devcb_write8 external_callback;
|
||||||
devcb_write_line iaq_line;
|
devcb_write_line iaq_line;
|
||||||
@ -69,7 +69,7 @@ typedef struct _tms9995_config
|
|||||||
devcb_write_line holda_line;
|
devcb_write_line holda_line;
|
||||||
int mode;
|
int mode;
|
||||||
int overflow;
|
int overflow;
|
||||||
} tms9995_config;
|
};
|
||||||
|
|
||||||
#define TMS9995_CONFIG(name) \
|
#define TMS9995_CONFIG(name) \
|
||||||
const tms9995_config(name) =
|
const tms9995_config(name) =
|
||||||
@ -283,14 +283,14 @@ private:
|
|||||||
|
|
||||||
// ============== Prefetch support =====================
|
// ============== Prefetch support =====================
|
||||||
|
|
||||||
typedef struct _decoded_instruction
|
struct decoded_instruction
|
||||||
{
|
{
|
||||||
UINT16 IR;
|
UINT16 IR;
|
||||||
UINT16 command;
|
UINT16 command;
|
||||||
const UINT8* program;
|
const UINT8* program;
|
||||||
bool byteop;
|
bool byteop;
|
||||||
int state;
|
int state;
|
||||||
} decoded_instruction;
|
};
|
||||||
|
|
||||||
int m_instindex;
|
int m_instindex;
|
||||||
|
|
||||||
@ -312,20 +312,20 @@ private:
|
|||||||
typedef void (tms9995_device::*ophandler)(void);
|
typedef void (tms9995_device::*ophandler)(void);
|
||||||
|
|
||||||
// Opcode list entry
|
// Opcode list entry
|
||||||
typedef struct _tms_instruction
|
struct tms_instruction
|
||||||
{
|
{
|
||||||
UINT16 opcode;
|
UINT16 opcode;
|
||||||
int id;
|
int id;
|
||||||
int format;
|
int format;
|
||||||
microprogram prog; // Microprogram
|
microprogram prog; // Microprogram
|
||||||
} tms_instruction;
|
};
|
||||||
|
|
||||||
// Lookup table entry
|
// Lookup table entry
|
||||||
typedef struct _lookup_entry
|
struct lookup_entry
|
||||||
{
|
{
|
||||||
struct _lookup_entry *next_digit;
|
lookup_entry *next_digit;
|
||||||
const tms_instruction *entry;
|
const tms_instruction *entry;
|
||||||
} lookup_entry;
|
};
|
||||||
|
|
||||||
// Pointer to the lookup table; the entry point for searching the command
|
// Pointer to the lookup table; the entry point for searching the command
|
||||||
lookup_entry* m_command_lookup_table;
|
lookup_entry* m_command_lookup_table;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#ifndef __UNSP_H__
|
#ifndef __UNSP_H__
|
||||||
#define __UNSP_H__
|
#define __UNSP_H__
|
||||||
|
|
||||||
typedef struct _unspimp_state unspimp_state;
|
struct unspimp_state;
|
||||||
struct unsp_state
|
struct unsp_state
|
||||||
{
|
{
|
||||||
UINT16 r[16];
|
UINT16 r[16];
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* VTLB state */
|
/* VTLB state */
|
||||||
struct _vtlb_state
|
struct vtlb_state
|
||||||
{
|
{
|
||||||
cpu_device * cpudevice; /* CPU device */
|
cpu_device * cpudevice; /* CPU device */
|
||||||
address_spacenum space; /* address space */
|
address_spacenum space; /* address space */
|
||||||
|
@ -43,7 +43,7 @@ typedef UINT32 vtlb_entry;
|
|||||||
|
|
||||||
|
|
||||||
/* opaque structure describing VTLB state */
|
/* opaque structure describing VTLB state */
|
||||||
typedef struct _vtlb_state vtlb_state;
|
struct vtlb_state;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ struct data_range_t
|
|||||||
|
|
||||||
|
|
||||||
/* the code logging context */
|
/* the code logging context */
|
||||||
struct _x86log_context
|
struct x86log_context
|
||||||
{
|
{
|
||||||
astring filename; /* name of the file */
|
astring filename; /* name of the file */
|
||||||
FILE * file; /* file we are logging to */
|
FILE * file; /* file we are logging to */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
TYPE DEFINITIONS
|
TYPE DEFINITIONS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef struct _x86log_context x86log_context;
|
struct x86log_context;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,10 +73,10 @@ static const char *const s_mnemonic[] = {
|
|||||||
"slp" ,"sra" ,"srl" ,"sub" ,"tst" ,"tstio","xor "
|
"slp" ,"sra" ,"srl" ,"sub" ,"tst" ,"tstio","xor "
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
struct z80dasm {
|
||||||
UINT8 mnemonic;
|
UINT8 mnemonic;
|
||||||
const char *arguments;
|
const char *arguments;
|
||||||
} z80dasm;
|
};
|
||||||
|
|
||||||
static const z80dasm mnemonic_xx_cb[256]= {
|
static const z80dasm mnemonic_xx_cb[256]= {
|
||||||
{zRLC,"b=Y"}, {zRLC,"c=Y"}, {zRLC,"d=Y"}, {zRLC,"e=Y"},
|
{zRLC,"b=Y"}, {zRLC,"c=Y"}, {zRLC,"d=Y"}, {zRLC,"e=Y"},
|
||||||
|
@ -65,11 +65,11 @@ static const UINT32 s_flags[] =
|
|||||||
0 ,0 ,0 ,0 ,0
|
0 ,0 ,0 ,0 ,0
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct z80dasm
|
||||||
{
|
{
|
||||||
UINT8 mnemonic;
|
UINT8 mnemonic;
|
||||||
const char *arguments;
|
const char *arguments;
|
||||||
} z80dasm;
|
};
|
||||||
|
|
||||||
static const z80dasm mnemonic_xx_cb[256] =
|
static const z80dasm mnemonic_xx_cb[256] =
|
||||||
{
|
{
|
||||||
|
@ -56,8 +56,7 @@
|
|||||||
|
|
||||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||||
|
|
||||||
typedef union _z8000_reg_file z8000_reg_file;
|
union z8000_reg_file
|
||||||
union _z8000_reg_file
|
|
||||||
{
|
{
|
||||||
UINT8 B[16]; /* RL0,RH0,RL1,RH1...RL7,RH7 */
|
UINT8 B[16]; /* RL0,RH0,RL1,RH1...RL7,RH7 */
|
||||||
UINT16 W[16]; /* R0,R1,R2...R15 */
|
UINT16 W[16]; /* R0,R1,R2...R15 */
|
||||||
@ -65,8 +64,7 @@ union _z8000_reg_file
|
|||||||
UINT64 Q[4]; /* RQ0,RQ4,..RQ12 */
|
UINT64 Q[4]; /* RQ0,RQ4,..RQ12 */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* In z8000cpu.h: typedef struct _z8000_state z8000_state; */
|
struct z8000_state
|
||||||
struct _z8000_state
|
|
||||||
{
|
{
|
||||||
UINT32 op[4]; /* opcodes/data of current instruction */
|
UINT32 op[4]; /* opcodes/data of current instruction */
|
||||||
UINT32 ppc; /* previous program counter */
|
UINT32 ppc; /* previous program counter */
|
||||||
|
@ -189,25 +189,25 @@
|
|||||||
#define GET_DSP16 UINT32 dsp16 = addr_add(cpustate, cpustate->pc, (INT16)get_operand(cpustate, 1))
|
#define GET_DSP16 UINT32 dsp16 = addr_add(cpustate, cpustate->pc, (INT16)get_operand(cpustate, 1))
|
||||||
#define GET_ADDR(o) UINT32 addr = (UINT32)get_addr_operand(cpustate, o)
|
#define GET_ADDR(o) UINT32 addr = (UINT32)get_addr_operand(cpustate, o)
|
||||||
|
|
||||||
typedef struct _z8000_state z8000_state;
|
struct z8000_state;
|
||||||
|
|
||||||
/* structure for the opcode definition table */
|
/* structure for the opcode definition table */
|
||||||
typedef struct {
|
struct Z8000_init {
|
||||||
int beg, end, step;
|
int beg, end, step;
|
||||||
int size, cycles;
|
int size, cycles;
|
||||||
void (*opcode)(z8000_state *cpustate);
|
void (*opcode)(z8000_state *cpustate);
|
||||||
const char *dasm;
|
const char *dasm;
|
||||||
UINT32 dasmflags;
|
UINT32 dasmflags;
|
||||||
} Z8000_init;
|
};
|
||||||
|
|
||||||
/* structure for the opcode execution table / disassembler */
|
/* structure for the opcode execution table / disassembler */
|
||||||
typedef struct {
|
struct Z8000_exec {
|
||||||
void (*opcode)(z8000_state *cpustate);
|
void (*opcode)(z8000_state *cpustate);
|
||||||
int cycles;
|
int cycles;
|
||||||
int size;
|
int size;
|
||||||
const char *dasm;
|
const char *dasm;
|
||||||
UINT32 dasmflags;
|
UINT32 dasmflags;
|
||||||
} Z8000_exec;
|
};
|
||||||
|
|
||||||
/* opcode execution table */
|
/* opcode execution table */
|
||||||
extern Z8000_exec *z8000_exec;
|
extern Z8000_exec *z8000_exec;
|
||||||
|
@ -26,8 +26,7 @@
|
|||||||
TYPE DEFINITIONS
|
TYPE DEFINITIONS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* typedef struct _text_buffer text_buffer; -- declared in textbuf.h */
|
struct text_buffer
|
||||||
struct _text_buffer
|
|
||||||
{
|
{
|
||||||
char * buffer;
|
char * buffer;
|
||||||
INT32 * lineoffs;
|
INT32 * lineoffs;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
TYPE DEFINITIONS
|
TYPE DEFINITIONS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef struct _text_buffer text_buffer;
|
struct text_buffer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ struct shadow_table_data
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* typedef struct _palette_private palette_private; */
|
|
||||||
struct palette_private
|
struct palette_private
|
||||||
{
|
{
|
||||||
bitmap_format format; /* format assumed for palette data */
|
bitmap_format format; /* format assumed for palette data */
|
||||||
@ -57,7 +56,6 @@ struct palette_private
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* typedef struct _colortable_t colortable_t; */
|
|
||||||
class colortable_t
|
class colortable_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -24,7 +24,7 @@ struct hash_info
|
|||||||
const char *extrainfo;
|
const char *extrainfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _hash_file hash_file;
|
struct hash_file;
|
||||||
|
|
||||||
typedef void (*hashfile_error_func)(const char *message);
|
typedef void (*hashfile_error_func)(const char *message);
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ const hash_info *hashfile_lookup(hash_file *hashfile, const hash_collection *has
|
|||||||
TYPE DEFINITIONS
|
TYPE DEFINITIONS
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
struct _hash_file
|
struct hash_file
|
||||||
{
|
{
|
||||||
emu_file *file;
|
emu_file *file;
|
||||||
object_pool *pool;
|
object_pool *pool;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "formats/cassimg.h"
|
#include "formats/cassimg.h"
|
||||||
|
|
||||||
|
|
||||||
enum _cassette_state
|
enum cassette_state
|
||||||
{
|
{
|
||||||
/* this part of the state is controlled by the UI */
|
/* this part of the state is controlled by the UI */
|
||||||
CASSETTE_STOPPED = 0,
|
CASSETTE_STOPPED = 0,
|
||||||
@ -33,8 +33,6 @@ enum _cassette_state
|
|||||||
CASSETTE_MASK_DRVSTATE = 12
|
CASSETTE_MASK_DRVSTATE = 12
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum _cassette_state cassette_state;
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
TYPE DEFINITIONS
|
TYPE DEFINITIONS
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _TTL74181_state TTL74181_state;
|
struct TTL74181_state
|
||||||
struct _TTL74181_state
|
|
||||||
{
|
{
|
||||||
UINT8 inputs[TTL74181_INPUT_TOTAL];
|
UINT8 inputs[TTL74181_INPUT_TOTAL];
|
||||||
UINT8 outputs[TTL74181_OUTPUT_TOTAL];
|
UINT8 outputs[TTL74181_OUTPUT_TOTAL];
|
||||||
|
@ -29,9 +29,7 @@ enum pic8259_state_t
|
|||||||
STATE_READY
|
STATE_READY
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct pic8259 pic8259_t;
|
struct pic8259_t
|
||||||
|
|
||||||
struct pic8259
|
|
||||||
{
|
{
|
||||||
devcb_resolved_write_line out_int_func;
|
devcb_resolved_write_line out_int_func;
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
MCFG_DEVICE_CONFIG(_intf)
|
MCFG_DEVICE_CONFIG(_intf)
|
||||||
|
|
||||||
|
|
||||||
typedef struct _SCSICB_interface SCSICB_interface;
|
struct SCSICB_interface
|
||||||
struct _SCSICB_interface
|
|
||||||
{
|
{
|
||||||
void (*line_change_cb)(device_t *, UINT8 line, UINT8 state);
|
void (*line_change_cb)(device_t *, UINT8 line, UINT8 state);
|
||||||
|
|
||||||
|
@ -50,13 +50,13 @@ enum
|
|||||||
CLASS DEFINITION
|
CLASS DEFINITION
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef struct _tms9901_interface
|
struct tms9901_interface
|
||||||
{
|
{
|
||||||
int interrupt_mask; // a bit for each input pin whose state is always notified to the TMS9901 core
|
int interrupt_mask; // a bit for each input pin whose state is always notified to the TMS9901 core
|
||||||
devcb_read8 read_handler; // 4*8 bits, to be selected using the offset (0-3)
|
devcb_read8 read_handler; // 4*8 bits, to be selected using the offset (0-3)
|
||||||
devcb_write_line write_handler[16]; // 16 Pn outputs
|
devcb_write_line write_handler[16]; // 16 Pn outputs
|
||||||
devcb_write8 interrupt_callback; // called when interrupt bus state changes
|
devcb_write8 interrupt_callback; // called when interrupt bus state changes
|
||||||
} tms9901_interface;
|
};
|
||||||
|
|
||||||
class tms9901_device : public device_t
|
class tms9901_device : public device_t
|
||||||
{
|
{
|
||||||
|
@ -42,13 +42,13 @@
|
|||||||
|
|
||||||
extern const device_type TMS9902;
|
extern const device_type TMS9902;
|
||||||
|
|
||||||
typedef struct _tms9902_interface
|
struct tms9902_interface
|
||||||
{
|
{
|
||||||
devcb_write_line int_callback;
|
devcb_write_line int_callback;
|
||||||
devcb_write_line rcv_callback;
|
devcb_write_line rcv_callback;
|
||||||
devcb_write8 xmit_callback;
|
devcb_write8 xmit_callback;
|
||||||
devcb_write8 ctrl_callback;
|
devcb_write8 ctrl_callback;
|
||||||
} tms9902_interface;
|
};
|
||||||
|
|
||||||
class tms9902_device : public device_t
|
class tms9902_device : public device_t
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
|
|
||||||
// forward references
|
// forward references
|
||||||
typedef struct _wav_file wav_file;
|
struct wav_file;
|
||||||
|
|
||||||
|
|
||||||
// structure describing an indexed mixer
|
// structure describing an indexed mixer
|
||||||
|
@ -81,11 +81,11 @@ static const double DRTimes[64]={100000/*infinity*/,100000/*infinity*/,118200.0,
|
|||||||
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
|
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
|
||||||
static INT32 EG_TABLE[0x400];
|
static INT32 EG_TABLE[0x400];
|
||||||
|
|
||||||
enum _STATE {ATTACK,DECAY1,DECAY2,RELEASE};
|
enum STATE {ATTACK,DECAY1,DECAY2,RELEASE};
|
||||||
struct _EG
|
struct EG_t
|
||||||
{
|
{
|
||||||
int volume; //
|
int volume; //
|
||||||
_STATE state;
|
STATE state;
|
||||||
int step;
|
int step;
|
||||||
//step vals
|
//step vals
|
||||||
int AR; //Attack
|
int AR; //Attack
|
||||||
@ -97,7 +97,7 @@ struct _EG
|
|||||||
UINT8 LPLINK;
|
UINT8 LPLINK;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _SLOT
|
struct SLOT
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
@ -111,9 +111,9 @@ struct _SLOT
|
|||||||
UINT32 nxt_addr; //next play address
|
UINT32 nxt_addr; //next play address
|
||||||
UINT32 step; //pitch step (24.8)
|
UINT32 step; //pitch step (24.8)
|
||||||
UINT8 Backwards; //the wave is playing backwards
|
UINT8 Backwards; //the wave is playing backwards
|
||||||
struct _EG EG; //Envelope
|
EG_t EG; //Envelope
|
||||||
struct _LFO PLFO; //Phase LFO
|
LFO_t PLFO; //Phase LFO
|
||||||
struct _LFO ALFO; //Amplitude LFO
|
LFO_t ALFO; //Amplitude LFO
|
||||||
int slot;
|
int slot;
|
||||||
int cur_sample; //current ADPCM sample
|
int cur_sample; //current ADPCM sample
|
||||||
int cur_quant; //current ADPCM step
|
int cur_quant; //current ADPCM step
|
||||||
@ -155,8 +155,7 @@ struct _SLOT
|
|||||||
#define SCITMA 6
|
#define SCITMA 6
|
||||||
#define SCITMB 7
|
#define SCITMB 7
|
||||||
|
|
||||||
typedef struct _AICA aica_state;
|
struct aica_state
|
||||||
struct _AICA
|
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
@ -165,7 +164,7 @@ struct _AICA
|
|||||||
} udata;
|
} udata;
|
||||||
UINT16 IRQL, IRQR;
|
UINT16 IRQL, IRQR;
|
||||||
UINT16 EFSPAN[0x48];
|
UINT16 EFSPAN[0x48];
|
||||||
struct _SLOT Slots[64];
|
SLOT Slots[64];
|
||||||
signed short RINGBUF[64];
|
signed short RINGBUF[64];
|
||||||
unsigned char BUFPTR;
|
unsigned char BUFPTR;
|
||||||
unsigned char *AICARAM;
|
unsigned char *AICARAM;
|
||||||
@ -200,7 +199,7 @@ struct _AICA
|
|||||||
|
|
||||||
int ARTABLE[64], DRTABLE[64];
|
int ARTABLE[64], DRTABLE[64];
|
||||||
|
|
||||||
struct _AICADSP DSP;
|
AICADSP DSP;
|
||||||
device_t *device;
|
device_t *device;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -341,7 +340,7 @@ static int Get_RR(aica_state *AICA,int base,int R)
|
|||||||
return AICA->DRTABLE[Rate];
|
return AICA->DRTABLE[Rate];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Compute_EG(aica_state *AICA,struct _SLOT *slot)
|
static void Compute_EG(aica_state *AICA,SLOT *slot)
|
||||||
{
|
{
|
||||||
int octave=(OCT(slot)^8)-8;
|
int octave=(OCT(slot)^8)-8;
|
||||||
int rate;
|
int rate;
|
||||||
@ -358,9 +357,9 @@ static void Compute_EG(aica_state *AICA,struct _SLOT *slot)
|
|||||||
slot->EG.DL=0x1f-DL(slot);
|
slot->EG.DL=0x1f-DL(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AICA_StopSlot(struct _SLOT *slot,int keyoff);
|
static void AICA_StopSlot(SLOT *slot,int keyoff);
|
||||||
|
|
||||||
static int EG_Update(struct _SLOT *slot)
|
static int EG_Update(SLOT *slot)
|
||||||
{
|
{
|
||||||
switch(slot->EG.state)
|
switch(slot->EG.state)
|
||||||
{
|
{
|
||||||
@ -408,7 +407,7 @@ static int EG_Update(struct _SLOT *slot)
|
|||||||
return (slot->EG.volume>>EG_SHIFT)<<(SHIFT-10);
|
return (slot->EG.volume>>EG_SHIFT)<<(SHIFT-10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 AICA_Step(struct _SLOT *slot)
|
static UINT32 AICA_Step(SLOT *slot)
|
||||||
{
|
{
|
||||||
int octave=(OCT(slot)^8)-8+SHIFT-10;
|
int octave=(OCT(slot)^8)-8+SHIFT-10;
|
||||||
UINT32 Fn=FNS(slot) + (0x400);
|
UINT32 Fn=FNS(slot) + (0x400);
|
||||||
@ -420,7 +419,7 @@ static UINT32 AICA_Step(struct _SLOT *slot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void Compute_LFO(struct _SLOT *slot)
|
static void Compute_LFO(SLOT *slot)
|
||||||
{
|
{
|
||||||
if(PLFOS(slot)!=0)
|
if(PLFOS(slot)!=0)
|
||||||
AICALFO_ComputeStep(&(slot->PLFO),LFOF(slot),PLFOWS(slot),PLFOS(slot),0);
|
AICALFO_ComputeStep(&(slot->PLFO),LFOF(slot),PLFOWS(slot),PLFOS(slot),0);
|
||||||
@ -450,7 +449,7 @@ INLINE signed short DecodeADPCM(int *PrevSignal, unsigned char Delta, int *PrevQ
|
|||||||
return *PrevSignal;
|
return *PrevSignal;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AICA_StartSlot(aica_state *AICA, struct _SLOT *slot)
|
static void AICA_StartSlot(aica_state *AICA, SLOT *slot)
|
||||||
{
|
{
|
||||||
UINT64 start_offset;
|
UINT64 start_offset;
|
||||||
|
|
||||||
@ -480,7 +479,7 @@ static void AICA_StartSlot(aica_state *AICA, struct _SLOT *slot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AICA_StopSlot(struct _SLOT *slot,int keyoff)
|
static void AICA_StopSlot(SLOT *slot,int keyoff)
|
||||||
{
|
{
|
||||||
if(keyoff /*&& slot->EG.state!=RELEASE*/)
|
if(keyoff /*&& slot->EG.state!=RELEASE*/)
|
||||||
{
|
{
|
||||||
@ -628,7 +627,7 @@ static void AICA_Init(device_t *device, aica_state *AICA, const aica_interface *
|
|||||||
|
|
||||||
static void AICA_UpdateSlotReg(aica_state *AICA,int s,int r)
|
static void AICA_UpdateSlotReg(aica_state *AICA,int s,int r)
|
||||||
{
|
{
|
||||||
struct _SLOT *slot=AICA->Slots+s;
|
SLOT *slot=AICA->Slots+s;
|
||||||
int sl;
|
int sl;
|
||||||
switch(r&0x7f)
|
switch(r&0x7f)
|
||||||
{
|
{
|
||||||
@ -638,7 +637,7 @@ static void AICA_UpdateSlotReg(aica_state *AICA,int s,int r)
|
|||||||
{
|
{
|
||||||
for(sl=0;sl<64;++sl)
|
for(sl=0;sl<64;++sl)
|
||||||
{
|
{
|
||||||
struct _SLOT *s2=AICA->Slots+sl;
|
SLOT *s2=AICA->Slots+sl;
|
||||||
{
|
{
|
||||||
if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/)
|
if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/)
|
||||||
{
|
{
|
||||||
@ -848,7 +847,7 @@ static void AICA_UpdateRegR(aica_state *AICA, int reg)
|
|||||||
case 0x11:
|
case 0x11:
|
||||||
{
|
{
|
||||||
int slotnum = MSLC(AICA);
|
int slotnum = MSLC(AICA);
|
||||||
struct _SLOT *slot=AICA->Slots + slotnum;
|
SLOT *slot=AICA->Slots + slotnum;
|
||||||
UINT16 LP = 0;
|
UINT16 LP = 0;
|
||||||
if (!(AFSEL(AICA)))
|
if (!(AFSEL(AICA)))
|
||||||
{
|
{
|
||||||
@ -877,7 +876,7 @@ static void AICA_UpdateRegR(aica_state *AICA, int reg)
|
|||||||
case 0x15:
|
case 0x15:
|
||||||
{
|
{
|
||||||
int slotnum = MSLC(AICA);
|
int slotnum = MSLC(AICA);
|
||||||
struct _SLOT *slot=AICA->Slots+slotnum;
|
SLOT *slot=AICA->Slots+slotnum;
|
||||||
unsigned int CA = 0;
|
unsigned int CA = 0;
|
||||||
|
|
||||||
if (PCMS(slot) == 0) // 16-bit samples
|
if (PCMS(slot) == 0) // 16-bit samples
|
||||||
@ -1036,7 +1035,7 @@ static void AICA_TimersAddTicks(aica_state *AICA, int ticks)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
INLINE INT32 AICA_UpdateSlot(aica_state *AICA, struct _SLOT *slot)
|
INLINE INT32 AICA_UpdateSlot(aica_state *AICA, SLOT *slot)
|
||||||
{
|
{
|
||||||
INT32 sample;
|
INT32 sample;
|
||||||
int step=slot->step;
|
int step=slot->step;
|
||||||
@ -1211,7 +1210,7 @@ static void AICA_DoMasterSamples(aica_state *AICA, int nsamples)
|
|||||||
// mix slots' direct output
|
// mix slots' direct output
|
||||||
for(sl=0;sl<64;++sl)
|
for(sl=0;sl<64;++sl)
|
||||||
{
|
{
|
||||||
struct _SLOT *slot=AICA->Slots+sl;
|
SLOT *slot=AICA->Slots+sl;
|
||||||
RBUFDST=AICA->RINGBUF+AICA->BUFPTR;
|
RBUFDST=AICA->RINGBUF+AICA->BUFPTR;
|
||||||
if(AICA->Slots[sl].active)
|
if(AICA->Slots[sl].active)
|
||||||
{
|
{
|
||||||
|
@ -53,14 +53,14 @@ static INT32 UNPACK(UINT16 val)
|
|||||||
return uval;
|
return uval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void aica_dsp_init(struct _AICADSP *DSP)
|
void aica_dsp_init(AICADSP *DSP)
|
||||||
{
|
{
|
||||||
memset(DSP,0,sizeof(struct _AICADSP));
|
memset(DSP,0,sizeof(AICADSP));
|
||||||
DSP->RBL=0x8000;
|
DSP->RBL=0x8000;
|
||||||
DSP->Stopped=1;
|
DSP->Stopped=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void aica_dsp_step(struct _AICADSP *DSP)
|
void aica_dsp_step(AICADSP *DSP)
|
||||||
{
|
{
|
||||||
INT32 ACC=0; //26 bit
|
INT32 ACC=0; //26 bit
|
||||||
INT32 SHIFTED=0; //24 bit
|
INT32 SHIFTED=0; //24 bit
|
||||||
@ -326,7 +326,7 @@ void aica_dsp_step(struct _AICADSP *DSP)
|
|||||||
// fclose(f);
|
// fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aica_dsp_setsample(struct _AICADSP *DSP,INT32 sample,int SEL,int MXL)
|
void aica_dsp_setsample(AICADSP *DSP,INT32 sample,int SEL,int MXL)
|
||||||
{
|
{
|
||||||
//DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/;
|
//DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/;
|
||||||
DSP->MIXS[SEL]+=sample;
|
DSP->MIXS[SEL]+=sample;
|
||||||
@ -334,7 +334,7 @@ void aica_dsp_setsample(struct _AICADSP *DSP,INT32 sample,int SEL,int MXL)
|
|||||||
// int a=1;
|
// int a=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void aica_dsp_start(struct _AICADSP *DSP)
|
void aica_dsp_start(AICADSP *DSP)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
DSP->Stopped=0;
|
DSP->Stopped=0;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#define __AICADSP_H__
|
#define __AICADSP_H__
|
||||||
|
|
||||||
//the DSP Context
|
//the DSP Context
|
||||||
struct _AICADSP
|
struct AICADSP
|
||||||
{
|
{
|
||||||
//Config
|
//Config
|
||||||
UINT16 *AICARAM;
|
UINT16 *AICARAM;
|
||||||
@ -32,9 +32,9 @@ struct _AICADSP
|
|||||||
int LastStep;
|
int LastStep;
|
||||||
};
|
};
|
||||||
|
|
||||||
void aica_dsp_init(struct _AICADSP *DSP);
|
void aica_dsp_init(AICADSP *DSP);
|
||||||
void aica_dsp_setsample(struct _AICADSP *DSP, INT32 sample, INT32 SEL, INT32 MXL);
|
void aica_dsp_setsample(AICADSP *DSP, INT32 sample, INT32 SEL, INT32 MXL);
|
||||||
void aica_dsp_step(struct _AICADSP *DSP);
|
void aica_dsp_step(AICADSP *DSP);
|
||||||
void aica_dsp_start(struct _AICADSP *DSP);
|
void aica_dsp_start(AICADSP *DSP);
|
||||||
|
|
||||||
#endif /* __AICADSP_H__ */
|
#endif /* __AICADSP_H__ */
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#define LFO_SHIFT 8
|
#define LFO_SHIFT 8
|
||||||
|
|
||||||
struct _LFO
|
struct LFO_t
|
||||||
{
|
{
|
||||||
unsigned short phase;
|
unsigned short phase;
|
||||||
UINT32 phase_step;
|
UINT32 phase_step;
|
||||||
@ -103,7 +103,7 @@ static void AICALFO_Init(running_machine &machine)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE signed int AICAPLFO_Step(struct _LFO *LFO)
|
INLINE signed int AICAPLFO_Step(LFO_t *LFO)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ INLINE signed int AICAPLFO_Step(struct _LFO *LFO)
|
|||||||
return p<<(SHIFT-LFO_SHIFT);
|
return p<<(SHIFT-LFO_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE signed int AICAALFO_Step(struct _LFO *LFO)
|
INLINE signed int AICAALFO_Step(LFO_t *LFO)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
LFO->phase+=LFO->phase_step;
|
LFO->phase+=LFO->phase_step;
|
||||||
@ -128,7 +128,7 @@ INLINE signed int AICAALFO_Step(struct _LFO *LFO)
|
|||||||
return p<<(SHIFT-LFO_SHIFT);
|
return p<<(SHIFT-LFO_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AICALFO_ComputeStep(struct _LFO *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO)
|
static void AICALFO_ComputeStep(LFO_t *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO)
|
||||||
{
|
{
|
||||||
float step=(float) LFOFreq[LFOF]*256.0/(float)44100.0;
|
float step=(float) LFOFreq[LFOF]*256.0/(float)44100.0;
|
||||||
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
|
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
|
||||||
|
@ -103,7 +103,7 @@ class DISCRETE_CLASS_NAME(dss_inverter_osc): public discrete_base_node, public d
|
|||||||
DISCRETE_CLASS_CONSTRUCTOR(dss_inverter_osc, base)
|
DISCRETE_CLASS_CONSTRUCTOR(dss_inverter_osc, base)
|
||||||
DISCRETE_CLASS_DESTRUCTOR(dss_inverter_osc)
|
DISCRETE_CLASS_DESTRUCTOR(dss_inverter_osc)
|
||||||
public:
|
public:
|
||||||
typedef struct
|
struct description
|
||||||
{
|
{
|
||||||
double vB;
|
double vB;
|
||||||
double vOutLow;
|
double vOutLow;
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
double vInRise; // voltage that triggers the gate input to go high (vGate) on rise
|
double vInRise; // voltage that triggers the gate input to go high (vGate) on rise
|
||||||
double clamp; // voltage is clamped to -clamp ... vb+clamp if clamp>= 0;
|
double clamp; // voltage is clamped to -clamp ... vb+clamp if clamp>= 0;
|
||||||
int options; // bitmaped options
|
int options; // bitmaped options
|
||||||
} description;
|
};
|
||||||
enum {
|
enum {
|
||||||
IS_TYPE1 = 0x00,
|
IS_TYPE1 = 0x00,
|
||||||
IS_TYPE2 = 0x01,
|
IS_TYPE2 = 0x01,
|
||||||
|
@ -4177,7 +4177,7 @@ enum discrete_node_type
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
typedef struct _discrete_sound_block discrete_block;
|
struct discrete_block;
|
||||||
class discrete_node_base_factory;
|
class discrete_node_base_factory;
|
||||||
class discrete_task;
|
class discrete_task;
|
||||||
class discrete_base_node;
|
class discrete_base_node;
|
||||||
@ -4202,7 +4202,7 @@ typedef dynamic_array_t<discrete_task *> task_list_t;
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
struct _discrete_sound_block
|
struct discrete_block
|
||||||
{
|
{
|
||||||
int node; /* Output node number */
|
int node; /* Output node number */
|
||||||
discrete_node_base_factory *factory;
|
discrete_node_base_factory *factory;
|
||||||
|
@ -30,7 +30,7 @@ added external port callback, and functions to set the volume of the channels
|
|||||||
#define KDAC_A_PCM_MAX (2) /* Channels per chip */
|
#define KDAC_A_PCM_MAX (2) /* Channels per chip */
|
||||||
|
|
||||||
|
|
||||||
typedef struct kdacApcm
|
struct KDAC_A_PCM
|
||||||
{
|
{
|
||||||
UINT8 vol[KDAC_A_PCM_MAX][2]; /* volume for the left and right channel */
|
UINT8 vol[KDAC_A_PCM_MAX][2]; /* volume for the left and right channel */
|
||||||
UINT32 addr[KDAC_A_PCM_MAX];
|
UINT32 addr[KDAC_A_PCM_MAX];
|
||||||
@ -48,7 +48,7 @@ typedef struct kdacApcm
|
|||||||
sound_stream * stream;
|
sound_stream * stream;
|
||||||
const k007232_interface *intf;
|
const k007232_interface *intf;
|
||||||
UINT32 fncode[0x200];
|
UINT32 fncode[0x200];
|
||||||
} KDAC_A_PCM;
|
};
|
||||||
|
|
||||||
|
|
||||||
#define BASE_SHIFT (12)
|
#define BASE_SHIFT (12)
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
//????
|
//????
|
||||||
#define MULTIPCM_CLOCKDIV (180.0)
|
#define MULTIPCM_CLOCKDIV (180.0)
|
||||||
|
|
||||||
struct _Sample
|
struct Sample_t
|
||||||
{
|
{
|
||||||
unsigned int Start;
|
unsigned int Start;
|
||||||
unsigned int Loop;
|
unsigned int Loop;
|
||||||
@ -48,12 +48,12 @@ struct _Sample
|
|||||||
unsigned char AM;
|
unsigned char AM;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _STATE {ATTACK,DECAY1,DECAY2,RELEASE};
|
enum STATE {ATTACK,DECAY1,DECAY2,RELEASE};
|
||||||
ALLOW_SAVE_TYPE(_STATE); // allow save_item on a non-fundamental type
|
ALLOW_SAVE_TYPE(STATE); // allow save_item on a non-fundamental type
|
||||||
struct _EG
|
struct EG_t
|
||||||
{
|
{
|
||||||
int volume; //
|
int volume; //
|
||||||
_STATE state;
|
STATE state;
|
||||||
int step;
|
int step;
|
||||||
//step vals
|
//step vals
|
||||||
int AR; //Attack
|
int AR; //Attack
|
||||||
@ -63,7 +63,7 @@ struct _EG
|
|||||||
int DL; //Decay level
|
int DL; //Decay level
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _LFO
|
struct LFO_t
|
||||||
{
|
{
|
||||||
unsigned short phase;
|
unsigned short phase;
|
||||||
UINT32 phase_step;
|
UINT32 phase_step;
|
||||||
@ -72,12 +72,12 @@ struct _LFO
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct _SLOT
|
struct SLOT
|
||||||
{
|
{
|
||||||
unsigned char Num;
|
unsigned char Num;
|
||||||
unsigned char Regs[8];
|
unsigned char Regs[8];
|
||||||
int Playing;
|
int Playing;
|
||||||
struct _Sample *Sample;
|
Sample_t *Sample;
|
||||||
unsigned int Base;
|
unsigned int Base;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
unsigned int step;
|
unsigned int step;
|
||||||
@ -85,17 +85,16 @@ struct _SLOT
|
|||||||
unsigned int DstTL;
|
unsigned int DstTL;
|
||||||
int TLStep;
|
int TLStep;
|
||||||
signed int Prev;
|
signed int Prev;
|
||||||
struct _EG EG;
|
EG_t EG;
|
||||||
struct _LFO PLFO; //Phase lfo
|
LFO_t PLFO; //Phase lfo
|
||||||
struct _LFO ALFO; //AM lfo
|
LFO_t ALFO; //AM lfo
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _MultiPCM MultiPCM;
|
struct MultiPCM
|
||||||
struct _MultiPCM
|
|
||||||
{
|
{
|
||||||
sound_stream * stream;
|
sound_stream * stream;
|
||||||
struct _Sample Samples[0x200]; //Max 512 samples
|
Sample_t Samples[0x200]; //Max 512 samples
|
||||||
struct _SLOT Slots[28];
|
SLOT Slots[28];
|
||||||
unsigned int CurSlot;
|
unsigned int CurSlot;
|
||||||
unsigned int Address;
|
unsigned int Address;
|
||||||
unsigned int BankR,BankL;
|
unsigned int BankR,BankL;
|
||||||
@ -150,7 +149,7 @@ static int TLSteps[2];
|
|||||||
|
|
||||||
#define EG_SHIFT 16
|
#define EG_SHIFT 16
|
||||||
|
|
||||||
static int EG_Update(struct _SLOT *slot)
|
static int EG_Update(SLOT *slot)
|
||||||
{
|
{
|
||||||
switch(slot->EG.state)
|
switch(slot->EG.state)
|
||||||
{
|
{
|
||||||
@ -202,7 +201,7 @@ static unsigned int Get_RATE(unsigned int *Steps,unsigned int rate,unsigned int
|
|||||||
return Steps[r];
|
return Steps[r];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EG_Calc(MultiPCM *ptChip,struct _SLOT *slot)
|
static void EG_Calc(MultiPCM *ptChip,SLOT *slot)
|
||||||
{
|
{
|
||||||
int octave=((slot->Regs[3]>>4)-1)&0xf;
|
int octave=((slot->Regs[3]>>4)-1)&0xf;
|
||||||
int rate;
|
int rate;
|
||||||
@ -284,7 +283,7 @@ static void LFO_Init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE signed int PLFO_Step(struct _LFO *LFO)
|
INLINE signed int PLFO_Step(LFO_t *LFO)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
LFO->phase+=LFO->phase_step;
|
LFO->phase+=LFO->phase_step;
|
||||||
@ -293,7 +292,7 @@ INLINE signed int PLFO_Step(struct _LFO *LFO)
|
|||||||
return p<<(SHIFT-LFO_SHIFT);
|
return p<<(SHIFT-LFO_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE signed int ALFO_Step(struct _LFO *LFO)
|
INLINE signed int ALFO_Step(LFO_t *LFO)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
LFO->phase+=LFO->phase_step;
|
LFO->phase+=LFO->phase_step;
|
||||||
@ -302,7 +301,7 @@ INLINE signed int ALFO_Step(struct _LFO *LFO)
|
|||||||
return p<<(SHIFT-LFO_SHIFT);
|
return p<<(SHIFT-LFO_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LFO_ComputeStep(MultiPCM *ptChip,struct _LFO *LFO,UINT32 LFOF,UINT32 LFOS,int ALFO)
|
static void LFO_ComputeStep(MultiPCM *ptChip,LFO_t *LFO,UINT32 LFOF,UINT32 LFOS,int ALFO)
|
||||||
{
|
{
|
||||||
float step=(float) LFOFreq[LFOF]*256.0/(float) ptChip->Rate;
|
float step=(float) LFOFreq[LFOF]*256.0/(float) ptChip->Rate;
|
||||||
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
|
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
|
||||||
@ -320,7 +319,7 @@ static void LFO_ComputeStep(MultiPCM *ptChip,struct _LFO *LFO,UINT32 LFOF,UINT32
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void WriteSlot(MultiPCM *ptChip,struct _SLOT *slot,int reg,unsigned char data)
|
static void WriteSlot(MultiPCM *ptChip,SLOT *slot,int reg,unsigned char data)
|
||||||
{
|
{
|
||||||
slot->Regs[reg]=data;
|
slot->Regs[reg]=data;
|
||||||
|
|
||||||
@ -333,7 +332,7 @@ static void WriteSlot(MultiPCM *ptChip,struct _SLOT *slot,int reg,unsigned char
|
|||||||
//according to YMF278 sample write causes some base params written to the regs (envelope+lfos)
|
//according to YMF278 sample write causes some base params written to the regs (envelope+lfos)
|
||||||
//the game should never change the sample while playing.
|
//the game should never change the sample while playing.
|
||||||
{
|
{
|
||||||
struct _Sample *Sample=ptChip->Samples+slot->Regs[1];
|
Sample_t *Sample=ptChip->Samples+slot->Regs[1];
|
||||||
WriteSlot(ptChip,slot,6,Sample->LFOVIB);
|
WriteSlot(ptChip,slot,6,Sample->LFOVIB);
|
||||||
WriteSlot(ptChip,slot,7,Sample->AM);
|
WriteSlot(ptChip,slot,7,Sample->AM);
|
||||||
}
|
}
|
||||||
@ -441,7 +440,7 @@ static STREAM_UPDATE( MultiPCM_update )
|
|||||||
signed int smpr=0;
|
signed int smpr=0;
|
||||||
for(sl=0;sl<28;++sl)
|
for(sl=0;sl<28;++sl)
|
||||||
{
|
{
|
||||||
struct _SLOT *slot=ptChip->Slots+sl;
|
SLOT *slot=ptChip->Slots+sl;
|
||||||
if(slot->Playing)
|
if(slot->Playing)
|
||||||
{
|
{
|
||||||
unsigned int vol=(slot->TL>>SHIFT)|(slot->Pan<<7);
|
unsigned int vol=(slot->TL>>SHIFT)|(slot->Pan<<7);
|
||||||
|
@ -48,11 +48,11 @@ typedef UINT8 boolean;
|
|||||||
#define QUEUE_SIZE 0x2000
|
#define QUEUE_SIZE 0x2000
|
||||||
#define QUEUE_MAX (QUEUE_SIZE-1)
|
#define QUEUE_MAX (QUEUE_SIZE-1)
|
||||||
|
|
||||||
typedef struct queue_s
|
struct queue_t
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
unsigned char reg,val;
|
unsigned char reg,val;
|
||||||
} queue_t;
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ typedef struct queue_s
|
|||||||
/* CHANNEL TYPE DEFINITIONS */
|
/* CHANNEL TYPE DEFINITIONS */
|
||||||
|
|
||||||
/* Square Wave */
|
/* Square Wave */
|
||||||
typedef struct square_s
|
struct square_t
|
||||||
{
|
{
|
||||||
uint8 regs[4];
|
uint8 regs[4];
|
||||||
int vbl_length;
|
int vbl_length;
|
||||||
@ -96,10 +96,10 @@ typedef struct square_s
|
|||||||
uint8 adder;
|
uint8 adder;
|
||||||
uint8 env_vol;
|
uint8 env_vol;
|
||||||
boolean enabled;
|
boolean enabled;
|
||||||
} square_t;
|
};
|
||||||
|
|
||||||
/* Triangle Wave */
|
/* Triangle Wave */
|
||||||
typedef struct triangle_s
|
struct triangle_t
|
||||||
{
|
{
|
||||||
uint8 regs[4]; /* regs[1] unused */
|
uint8 regs[4]; /* regs[1] unused */
|
||||||
int linear_length;
|
int linear_length;
|
||||||
@ -110,10 +110,10 @@ typedef struct triangle_s
|
|||||||
uint8 adder;
|
uint8 adder;
|
||||||
boolean counter_started;
|
boolean counter_started;
|
||||||
boolean enabled;
|
boolean enabled;
|
||||||
} triangle_t;
|
};
|
||||||
|
|
||||||
/* Noise Wave */
|
/* Noise Wave */
|
||||||
typedef struct noise_s
|
struct noise_t
|
||||||
{
|
{
|
||||||
uint8 regs[4]; /* regs[1] unused */
|
uint8 regs[4]; /* regs[1] unused */
|
||||||
int cur_pos;
|
int cur_pos;
|
||||||
@ -123,10 +123,10 @@ typedef struct noise_s
|
|||||||
float env_phase;
|
float env_phase;
|
||||||
uint8 env_vol;
|
uint8 env_vol;
|
||||||
boolean enabled;
|
boolean enabled;
|
||||||
} noise_t;
|
};
|
||||||
|
|
||||||
/* DPCM Wave */
|
/* DPCM Wave */
|
||||||
typedef struct dpcm_s
|
struct dpcm_t
|
||||||
{
|
{
|
||||||
uint8 regs[4];
|
uint8 regs[4];
|
||||||
uint32 address;
|
uint32 address;
|
||||||
@ -139,10 +139,10 @@ typedef struct dpcm_s
|
|||||||
boolean irq_occurred;
|
boolean irq_occurred;
|
||||||
address_space *memory;
|
address_space *memory;
|
||||||
signed char vol;
|
signed char vol;
|
||||||
} dpcm_t;
|
};
|
||||||
|
|
||||||
/* APU type */
|
/* APU type */
|
||||||
typedef struct apu
|
struct apu_t
|
||||||
{
|
{
|
||||||
/* Sound channels */
|
/* Sound channels */
|
||||||
square_t squ[2];
|
square_t squ[2];
|
||||||
@ -169,7 +169,7 @@ typedef struct apu
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int step_mode;
|
int step_mode;
|
||||||
} apu_t;
|
};
|
||||||
|
|
||||||
/* CONSTANTS */
|
/* CONSTANTS */
|
||||||
|
|
||||||
|
@ -111,11 +111,11 @@ static const double DRTimes[64]={100000/*infinity*/,100000/*infinity*/,118200.0,
|
|||||||
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
|
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
|
||||||
static INT32 EG_TABLE[0x400];
|
static INT32 EG_TABLE[0x400];
|
||||||
|
|
||||||
enum _STATE {ATTACK,DECAY1,DECAY2,RELEASE};
|
enum STATE {ATTACK,DECAY1,DECAY2,RELEASE};
|
||||||
struct _EG
|
struct EG_t
|
||||||
{
|
{
|
||||||
int volume; //
|
int volume; //
|
||||||
_STATE state;
|
STATE state;
|
||||||
int step;
|
int step;
|
||||||
//step vals
|
//step vals
|
||||||
int AR; //Attack
|
int AR; //Attack
|
||||||
@ -128,7 +128,7 @@ struct _EG
|
|||||||
UINT8 LPLINK;
|
UINT8 LPLINK;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _SLOT
|
struct SLOT
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
@ -141,9 +141,9 @@ struct _SLOT
|
|||||||
UINT32 cur_addr; //current play address (24.8)
|
UINT32 cur_addr; //current play address (24.8)
|
||||||
UINT32 nxt_addr; //next play address
|
UINT32 nxt_addr; //next play address
|
||||||
UINT32 step; //pitch step (24.8)
|
UINT32 step; //pitch step (24.8)
|
||||||
struct _EG EG; //Envelope
|
EG_t EG; //Envelope
|
||||||
struct _LFO PLFO; //Phase LFO
|
LFO_t PLFO; //Phase LFO
|
||||||
struct _LFO ALFO; //Amplitude LFO
|
LFO_t ALFO; //Amplitude LFO
|
||||||
int slot;
|
int slot;
|
||||||
signed short Prev; //Previous sample (for interpolation)
|
signed short Prev; //Previous sample (for interpolation)
|
||||||
};
|
};
|
||||||
@ -182,7 +182,7 @@ struct scsp_state
|
|||||||
UINT16 data[0x30/2];
|
UINT16 data[0x30/2];
|
||||||
UINT8 datab[0x30];
|
UINT8 datab[0x30];
|
||||||
} udata;
|
} udata;
|
||||||
struct _SLOT Slots[32];
|
SLOT Slots[32];
|
||||||
signed short RINGBUF[128];
|
signed short RINGBUF[128];
|
||||||
unsigned char BUFPTR;
|
unsigned char BUFPTR;
|
||||||
#if FM_DELAY
|
#if FM_DELAY
|
||||||
@ -224,7 +224,7 @@ struct scsp_state
|
|||||||
|
|
||||||
int ARTABLE[64], DRTABLE[64];
|
int ARTABLE[64], DRTABLE[64];
|
||||||
|
|
||||||
struct _SCSPDSP DSP;
|
SCSPDSP DSP;
|
||||||
devcb_resolved_write_line main_irq;
|
devcb_resolved_write_line main_irq;
|
||||||
|
|
||||||
device_t *device;
|
device_t *device;
|
||||||
@ -389,7 +389,7 @@ static int Get_RR(scsp_state *scsp,int base,int R)
|
|||||||
return scsp->DRTABLE[Rate];
|
return scsp->DRTABLE[Rate];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Compute_EG(scsp_state *scsp,struct _SLOT *slot)
|
static void Compute_EG(scsp_state *scsp,SLOT *slot)
|
||||||
{
|
{
|
||||||
int octave=(OCT(slot)^8)-8;
|
int octave=(OCT(slot)^8)-8;
|
||||||
int rate;
|
int rate;
|
||||||
@ -407,9 +407,9 @@ static void Compute_EG(scsp_state *scsp,struct _SLOT *slot)
|
|||||||
slot->EG.EGHOLD=EGHOLD(slot);
|
slot->EG.EGHOLD=EGHOLD(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SCSP_StopSlot(struct _SLOT *slot,int keyoff);
|
static void SCSP_StopSlot(SLOT *slot,int keyoff);
|
||||||
|
|
||||||
static int EG_Update(struct _SLOT *slot)
|
static int EG_Update(SLOT *slot)
|
||||||
{
|
{
|
||||||
switch(slot->EG.state)
|
switch(slot->EG.state)
|
||||||
{
|
{
|
||||||
@ -459,7 +459,7 @@ static int EG_Update(struct _SLOT *slot)
|
|||||||
return (slot->EG.volume>>EG_SHIFT)<<(SHIFT-10);
|
return (slot->EG.volume>>EG_SHIFT)<<(SHIFT-10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 SCSP_Step(struct _SLOT *slot)
|
static UINT32 SCSP_Step(SLOT *slot)
|
||||||
{
|
{
|
||||||
int octave=(OCT(slot)^8)-8+SHIFT-10;
|
int octave=(OCT(slot)^8)-8+SHIFT-10;
|
||||||
UINT32 Fn=FNS(slot)+(1 << 10);
|
UINT32 Fn=FNS(slot)+(1 << 10);
|
||||||
@ -476,7 +476,7 @@ static UINT32 SCSP_Step(struct _SLOT *slot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void Compute_LFO(struct _SLOT *slot)
|
static void Compute_LFO(SLOT *slot)
|
||||||
{
|
{
|
||||||
if(PLFOS(slot)!=0)
|
if(PLFOS(slot)!=0)
|
||||||
LFO_ComputeStep(&(slot->PLFO),LFOF(slot),PLFOWS(slot),PLFOS(slot),0);
|
LFO_ComputeStep(&(slot->PLFO),LFOF(slot),PLFOWS(slot),PLFOS(slot),0);
|
||||||
@ -484,7 +484,7 @@ static void Compute_LFO(struct _SLOT *slot)
|
|||||||
LFO_ComputeStep(&(slot->ALFO),LFOF(slot),ALFOWS(slot),ALFOS(slot),1);
|
LFO_ComputeStep(&(slot->ALFO),LFOF(slot),ALFOWS(slot),ALFOS(slot),1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SCSP_StartSlot(scsp_state *scsp, struct _SLOT *slot)
|
static void SCSP_StartSlot(scsp_state *scsp, SLOT *slot)
|
||||||
{
|
{
|
||||||
UINT32 start_offset;
|
UINT32 start_offset;
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ static void SCSP_StartSlot(scsp_state *scsp, struct _SLOT *slot)
|
|||||||
// printf("StartSlot[%p]: SA %x PCM8B %x LPCTL %x ALFOS %x STWINH %x TL %x EFSDL %x\n", slot, SA(slot), PCM8B(slot), LPCTL(slot), ALFOS(slot), STWINH(slot), TL(slot), EFSDL(slot));
|
// printf("StartSlot[%p]: SA %x PCM8B %x LPCTL %x ALFOS %x STWINH %x TL %x EFSDL %x\n", slot, SA(slot), PCM8B(slot), LPCTL(slot), ALFOS(slot), STWINH(slot), TL(slot), EFSDL(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SCSP_StopSlot(struct _SLOT *slot,int keyoff)
|
static void SCSP_StopSlot(SLOT *slot,int keyoff)
|
||||||
{
|
{
|
||||||
if(keyoff /*&& slot->EG.state!=RELEASE*/)
|
if(keyoff /*&& slot->EG.state!=RELEASE*/)
|
||||||
{
|
{
|
||||||
@ -657,7 +657,7 @@ static void SCSP_Init(device_t *device, scsp_state *scsp, const scsp_interface *
|
|||||||
|
|
||||||
static void SCSP_UpdateSlotReg(scsp_state *scsp,int s,int r)
|
static void SCSP_UpdateSlotReg(scsp_state *scsp,int s,int r)
|
||||||
{
|
{
|
||||||
struct _SLOT *slot=scsp->Slots+s;
|
SLOT *slot=scsp->Slots+s;
|
||||||
int sl;
|
int sl;
|
||||||
switch(r&0x3f)
|
switch(r&0x3f)
|
||||||
{
|
{
|
||||||
@ -667,7 +667,7 @@ static void SCSP_UpdateSlotReg(scsp_state *scsp,int s,int r)
|
|||||||
{
|
{
|
||||||
for(sl=0;sl<32;++sl)
|
for(sl=0;sl<32;++sl)
|
||||||
{
|
{
|
||||||
struct _SLOT *s2=scsp->Slots+sl;
|
SLOT *s2=scsp->Slots+sl;
|
||||||
{
|
{
|
||||||
if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/)
|
if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/)
|
||||||
{
|
{
|
||||||
@ -863,7 +863,7 @@ static void SCSP_UpdateRegR(scsp_state *scsp, int reg)
|
|||||||
// MSLC | CA |SGC|EG
|
// MSLC | CA |SGC|EG
|
||||||
// f e d c b a 9 8 7 6 5 4 3 2 1 0
|
// f e d c b a 9 8 7 6 5 4 3 2 1 0
|
||||||
unsigned char MSLC=(scsp->udata.data[0x8/2]>>11)&0x1f;
|
unsigned char MSLC=(scsp->udata.data[0x8/2]>>11)&0x1f;
|
||||||
struct _SLOT *slot=scsp->Slots + MSLC;
|
SLOT *slot=scsp->Slots + MSLC;
|
||||||
unsigned int SGC = (slot->EG.state) & 3;
|
unsigned int SGC = (slot->EG.state) & 3;
|
||||||
unsigned int CA = (slot->cur_addr>>(SHIFT+12)) & 0xf;
|
unsigned int CA = (slot->cur_addr>>(SHIFT+12)) & 0xf;
|
||||||
unsigned int EG = (0x1f - (slot->EG.volume>>(EG_SHIFT+5))) & 0x1f;
|
unsigned int EG = (0x1f - (slot->EG.volume>>(EG_SHIFT+5))) & 0x1f;
|
||||||
@ -953,7 +953,7 @@ static unsigned short SCSP_r16(scsp_state *scsp, unsigned int addr)
|
|||||||
|
|
||||||
#define REVSIGN(v) ((~v)+1)
|
#define REVSIGN(v) ((~v)+1)
|
||||||
|
|
||||||
INLINE INT32 SCSP_UpdateSlot(scsp_state *scsp, struct _SLOT *slot)
|
INLINE INT32 SCSP_UpdateSlot(scsp_state *scsp, SLOT *slot)
|
||||||
{
|
{
|
||||||
INT32 sample;
|
INT32 sample;
|
||||||
int step=slot->step;
|
int step=slot->step;
|
||||||
@ -1135,7 +1135,7 @@ static void SCSP_DoMasterSamples(scsp_state *scsp, int nsamples)
|
|||||||
#endif
|
#endif
|
||||||
if(scsp->Slots[sl].active)
|
if(scsp->Slots[sl].active)
|
||||||
{
|
{
|
||||||
struct _SLOT *slot=scsp->Slots+sl;
|
SLOT *slot=scsp->Slots+sl;
|
||||||
unsigned short Enc;
|
unsigned short Enc;
|
||||||
signed int sample;
|
signed int sample;
|
||||||
|
|
||||||
@ -1165,7 +1165,7 @@ static void SCSP_DoMasterSamples(scsp_state *scsp, int nsamples)
|
|||||||
|
|
||||||
for(i=0;i<16;++i)
|
for(i=0;i<16;++i)
|
||||||
{
|
{
|
||||||
struct _SLOT *slot=scsp->Slots+i;
|
SLOT *slot=scsp->Slots+i;
|
||||||
if(EFSDL(slot))
|
if(EFSDL(slot))
|
||||||
{
|
{
|
||||||
unsigned short Enc=((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
|
unsigned short Enc=((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
|
||||||
|
@ -53,14 +53,14 @@ static INT32 UNPACK(UINT16 val)
|
|||||||
return uval;
|
return uval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SCSPDSP_Init(struct _SCSPDSP *DSP)
|
void SCSPDSP_Init(SCSPDSP *DSP)
|
||||||
{
|
{
|
||||||
memset(DSP,0,sizeof(struct _SCSPDSP));
|
memset(DSP,0,sizeof(SCSPDSP));
|
||||||
DSP->RBL=0x8000;
|
DSP->RBL=0x8000;
|
||||||
DSP->Stopped=1;
|
DSP->Stopped=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SCSPDSP_Step(struct _SCSPDSP *DSP)
|
void SCSPDSP_Step(SCSPDSP *DSP)
|
||||||
{
|
{
|
||||||
INT32 ACC=0; //26 bit
|
INT32 ACC=0; //26 bit
|
||||||
INT32 SHIFTED=0; //24 bit
|
INT32 SHIFTED=0; //24 bit
|
||||||
@ -330,7 +330,7 @@ void SCSPDSP_Step(struct _SCSPDSP *DSP)
|
|||||||
// fclose(f);
|
// fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SCSPDSP_SetSample(struct _SCSPDSP *DSP,INT32 sample,int SEL,int MXL)
|
void SCSPDSP_SetSample(SCSPDSP *DSP,INT32 sample,int SEL,int MXL)
|
||||||
{
|
{
|
||||||
//DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/;
|
//DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/;
|
||||||
DSP->MIXS[SEL]+=sample;
|
DSP->MIXS[SEL]+=sample;
|
||||||
@ -338,7 +338,7 @@ void SCSPDSP_SetSample(struct _SCSPDSP *DSP,INT32 sample,int SEL,int MXL)
|
|||||||
// int a=1;
|
// int a=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SCSPDSP_Start(struct _SCSPDSP *DSP)
|
void SCSPDSP_Start(SCSPDSP *DSP)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
DSP->Stopped=0;
|
DSP->Stopped=0;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#define __SCSPDSP_H__
|
#define __SCSPDSP_H__
|
||||||
|
|
||||||
//the DSP Context
|
//the DSP Context
|
||||||
struct _SCSPDSP
|
struct SCSPDSP
|
||||||
{
|
{
|
||||||
//Config
|
//Config
|
||||||
UINT16 *SCSPRAM;
|
UINT16 *SCSPRAM;
|
||||||
@ -32,9 +32,9 @@ struct _SCSPDSP
|
|||||||
int LastStep;
|
int LastStep;
|
||||||
};
|
};
|
||||||
|
|
||||||
void SCSPDSP_Init(struct _SCSPDSP *DSP);
|
void SCSPDSP_Init(SCSPDSP *DSP);
|
||||||
void SCSPDSP_SetSample(struct _SCSPDSP *DSP, INT32 sample, INT32 SEL, INT32 MXL);
|
void SCSPDSP_SetSample(SCSPDSP *DSP, INT32 sample, INT32 SEL, INT32 MXL);
|
||||||
void SCSPDSP_Step(struct _SCSPDSP *DSP);
|
void SCSPDSP_Step(SCSPDSP *DSP);
|
||||||
void SCSPDSP_Start(struct _SCSPDSP *DSP);
|
void SCSPDSP_Start(SCSPDSP *DSP);
|
||||||
|
|
||||||
#endif /* __SCSPDSP_H__ */
|
#endif /* __SCSPDSP_H__ */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#define LFO_SHIFT 8
|
#define LFO_SHIFT 8
|
||||||
|
|
||||||
struct _LFO
|
struct LFO_t
|
||||||
{
|
{
|
||||||
unsigned short phase;
|
unsigned short phase;
|
||||||
UINT32 phase_step;
|
UINT32 phase_step;
|
||||||
@ -107,7 +107,7 @@ static void LFO_Init(running_machine &machine)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE signed int PLFO_Step(struct _LFO *LFO)
|
INLINE signed int PLFO_Step(LFO_t *LFO)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
LFO->phase+=LFO->phase_step;
|
LFO->phase+=LFO->phase_step;
|
||||||
@ -119,7 +119,7 @@ INLINE signed int PLFO_Step(struct _LFO *LFO)
|
|||||||
return p<<(SHIFT-LFO_SHIFT);
|
return p<<(SHIFT-LFO_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE signed int ALFO_Step(struct _LFO *LFO)
|
INLINE signed int ALFO_Step(LFO_t *LFO)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
LFO->phase+=LFO->phase_step;
|
LFO->phase+=LFO->phase_step;
|
||||||
@ -131,7 +131,7 @@ INLINE signed int ALFO_Step(struct _LFO *LFO)
|
|||||||
return p<<(SHIFT-LFO_SHIFT);
|
return p<<(SHIFT-LFO_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LFO_ComputeStep(struct _LFO *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO)
|
static void LFO_ComputeStep(LFO_t *LFO,UINT32 LFOF,UINT32 LFOWS,UINT32 LFOS,int ALFO)
|
||||||
{
|
{
|
||||||
float step=(float) LFOFreq[LFOF]*256.0/(float)44100;
|
float step=(float) LFOFreq[LFOF]*256.0/(float)44100;
|
||||||
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
|
LFO->phase_step=(unsigned int) ((float) (1<<LFO_SHIFT)*step);
|
||||||
|
@ -53,7 +53,7 @@ static void MixerInit(int threeVoiceAmplify)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INLINE void syncEm(_SID6581 *This)
|
INLINE void syncEm(SID6581_t *This)
|
||||||
{
|
{
|
||||||
int sync1 = (This->optr1.modulator->cycleLenCount <= 0);
|
int sync1 = (This->optr1.modulator->cycleLenCount <= 0);
|
||||||
int sync2 = (This->optr2.modulator->cycleLenCount <= 0);
|
int sync2 = (This->optr2.modulator->cycleLenCount <= 0);
|
||||||
@ -96,9 +96,9 @@ INLINE void syncEm(_SID6581 *This)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sidEmuFillBuffer(_SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen )
|
void sidEmuFillBuffer(SID6581_t *This, stream_sample_t *buffer, UINT32 bufferLen )
|
||||||
{
|
{
|
||||||
//void* fill16bitMono( SID6581 *This, void* buffer, UINT32 numberOfSamples )
|
//void* fill16bitMono( SID6581_t *This, void* buffer, UINT32 numberOfSamples )
|
||||||
|
|
||||||
for ( ; bufferLen > 0; bufferLen-- )
|
for ( ; bufferLen > 0; bufferLen-- )
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@ void sidEmuFillBuffer(_SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen
|
|||||||
|
|
||||||
/* Reset. */
|
/* Reset. */
|
||||||
|
|
||||||
int sidEmuReset(_SID6581 *This)
|
int sidEmuReset(SID6581_t *This)
|
||||||
{
|
{
|
||||||
sidClearOperator( &This->optr1 );
|
sidClearOperator( &This->optr1 );
|
||||||
enveEmuResetOperator( &This->optr1 );
|
enveEmuResetOperator( &This->optr1 );
|
||||||
@ -208,7 +208,7 @@ static void filterTableInit(running_machine &machine)
|
|||||||
filterResTable[15] = resDyMax;
|
filterResTable[15] = resDyMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sid6581_init (_SID6581 *This)
|
void sid6581_init (SID6581_t *This)
|
||||||
{
|
{
|
||||||
This->optr1.sid=This;
|
This->optr1.sid=This;
|
||||||
This->optr2.sid=This;
|
This->optr2.sid=This;
|
||||||
@ -245,7 +245,7 @@ void sid6581_init (_SID6581 *This)
|
|||||||
sidEmuReset(This);
|
sidEmuReset(This);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sid6581_port_w (_SID6581 *This, int offset, int data)
|
void sid6581_port_w (SID6581_t *This, int offset, int data)
|
||||||
{
|
{
|
||||||
offset &= 0x1f;
|
offset &= 0x1f;
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ void sid6581_port_w (_SID6581 *This, int offset, int data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int sid6581_port_r (running_machine &machine, _SID6581 *This, int offset)
|
int sid6581_port_r (running_machine &machine, SID6581_t *This, int offset)
|
||||||
{
|
{
|
||||||
int data;
|
int data;
|
||||||
/* SIDPLAY reads last written at a sid address value */
|
/* SIDPLAY reads last written at a sid address value */
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "sidvoice.h"
|
#include "sidvoice.h"
|
||||||
|
|
||||||
/* private area */
|
/* private area */
|
||||||
typedef struct __SID6581
|
struct SID6581_t
|
||||||
{
|
{
|
||||||
device_t *device;
|
device_t *device;
|
||||||
sound_stream *mixer_channel; // mame stream/ mixer channel
|
sound_stream *mixer_channel; // mame stream/ mixer channel
|
||||||
@ -54,15 +54,15 @@ typedef struct __SID6581
|
|||||||
|
|
||||||
sidOperator optr1, optr2, optr3;
|
sidOperator optr1, optr2, optr3;
|
||||||
int optr3_outputmask;
|
int optr3_outputmask;
|
||||||
} _SID6581;
|
};
|
||||||
|
|
||||||
void sid6581_init (_SID6581 *This);
|
void sid6581_init (SID6581_t *This);
|
||||||
|
|
||||||
int sidEmuReset(_SID6581 *This);
|
int sidEmuReset(SID6581_t *This);
|
||||||
|
|
||||||
int sid6581_port_r (running_machine &machine, _SID6581 *This, int offset);
|
int sid6581_port_r (running_machine &machine, SID6581_t *This, int offset);
|
||||||
void sid6581_port_w (_SID6581 *This, int offset, int data);
|
void sid6581_port_w (SID6581_t *This, int offset, int data);
|
||||||
|
|
||||||
void sidEmuFillBuffer(_SID6581 *This, stream_sample_t *buffer, UINT32 bufferLen );
|
void sidEmuFillBuffer(SID6581_t *This, stream_sample_t *buffer, UINT32 bufferLen );
|
||||||
|
|
||||||
#endif /* __SID_H__ */
|
#endif /* __SID_H__ */
|
||||||
|
@ -12,18 +12,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static _SID6581 *get_sid(device_t *device)
|
static SID6581_t *get_sid(device_t *device)
|
||||||
{
|
{
|
||||||
assert(device != NULL);
|
assert(device != NULL);
|
||||||
assert((device->type() == SID6581) || (device->type() == SID8580));
|
assert((device->type() == SID6581) || (device->type() == SID8580));
|
||||||
return (_SID6581 *) downcast<sid6581_device *>(device)->token();
|
return (SID6581_t *) downcast<sid6581_device *>(device)->token();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static STREAM_UPDATE( sid_update )
|
static STREAM_UPDATE( sid_update )
|
||||||
{
|
{
|
||||||
_SID6581 *sid = (_SID6581 *) param;
|
SID6581_t *sid = (SID6581_t *) param;
|
||||||
sidEmuFillBuffer(sid, outputs[0], samples);
|
sidEmuFillBuffer(sid, outputs[0], samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ static STREAM_UPDATE( sid_update )
|
|||||||
|
|
||||||
static void sid_start(device_t *device, SIDTYPE sidtype)
|
static void sid_start(device_t *device, SIDTYPE sidtype)
|
||||||
{
|
{
|
||||||
_SID6581 *sid = get_sid(device);
|
SID6581_t *sid = get_sid(device);
|
||||||
const sid6581_interface *iface = (const sid6581_interface*) device->static_config();
|
const sid6581_interface *iface = (const sid6581_interface*) device->static_config();
|
||||||
assert(iface);
|
assert(iface);
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ static void sid_start(device_t *device, SIDTYPE sidtype)
|
|||||||
|
|
||||||
static DEVICE_RESET( sid )
|
static DEVICE_RESET( sid )
|
||||||
{
|
{
|
||||||
_SID6581 *sid = get_sid(device);
|
SID6581_t *sid = get_sid(device);
|
||||||
sidEmuReset(sid);
|
sidEmuReset(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,13 +90,13 @@ sid6581_device::sid6581_device(const machine_config &mconfig, const char *tag, d
|
|||||||
: device_t(mconfig, SID6581, "SID6581", tag, owner, clock),
|
: device_t(mconfig, SID6581, "SID6581", tag, owner, clock),
|
||||||
device_sound_interface(mconfig, *this)
|
device_sound_interface(mconfig, *this)
|
||||||
{
|
{
|
||||||
m_token = global_alloc_array_clear(UINT8, sizeof(_SID6581));
|
m_token = global_alloc_array_clear(UINT8, sizeof(SID6581));
|
||||||
}
|
}
|
||||||
sid6581_device::sid6581_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
|
sid6581_device::sid6581_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
|
||||||
: device_t(mconfig, type, name, tag, owner, clock),
|
: device_t(mconfig, type, name, tag, owner, clock),
|
||||||
device_sound_interface(mconfig, *this)
|
device_sound_interface(mconfig, *this)
|
||||||
{
|
{
|
||||||
m_token = global_alloc_array_clear(UINT8, sizeof(_SID6581));
|
m_token = global_alloc_array_clear(UINT8, sizeof(SID6581));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -21,19 +21,19 @@ struct sw_storage
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct __SID6581;
|
struct SID6581_t;
|
||||||
|
|
||||||
typedef struct _sidOperator
|
struct sidOperator
|
||||||
{
|
{
|
||||||
struct __SID6581 *sid;
|
SID6581_t *sid;
|
||||||
UINT8 reg[7];
|
UINT8 reg[7];
|
||||||
UINT32 SIDfreq;
|
UINT32 SIDfreq;
|
||||||
UINT16 SIDpulseWidth;
|
UINT16 SIDpulseWidth;
|
||||||
UINT8 SIDctrl;
|
UINT8 SIDctrl;
|
||||||
UINT8 SIDAD, SIDSR;
|
UINT8 SIDAD, SIDSR;
|
||||||
|
|
||||||
struct _sidOperator* carrier;
|
sidOperator* carrier;
|
||||||
struct _sidOperator* modulator;
|
sidOperator* modulator;
|
||||||
int sync;
|
int sync;
|
||||||
|
|
||||||
UINT16 pulseIndex, newPulseIndex;
|
UINT16 pulseIndex, newPulseIndex;
|
||||||
@ -55,8 +55,8 @@ typedef struct _sidOperator
|
|||||||
UINT16 cycleLen, cycleLenPnt;
|
UINT16 cycleLen, cycleLenPnt;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
INT8(*outProc)(struct _sidOperator *);
|
INT8(*outProc)(sidOperator *);
|
||||||
void(*waveProc)(struct _sidOperator *);
|
void(*waveProc)(sidOperator *);
|
||||||
|
|
||||||
#if defined(DIRECT_FIXPOINT)
|
#if defined(DIRECT_FIXPOINT)
|
||||||
cpuLword waveStep, waveStepAdd;
|
cpuLword waveStep, waveStepAdd;
|
||||||
@ -80,7 +80,7 @@ typedef struct _sidOperator
|
|||||||
|
|
||||||
UINT8 ADSRctrl;
|
UINT8 ADSRctrl;
|
||||||
// int gateOnCtrl, gateOffCtrl;
|
// int gateOnCtrl, gateOffCtrl;
|
||||||
UINT16 (*ADSRproc)(struct _sidOperator *);
|
UINT16 (*ADSRproc)(sidOperator *);
|
||||||
|
|
||||||
#ifdef SID_FPUENVE
|
#ifdef SID_FPUENVE
|
||||||
float fenveStep, fenveStepAdd;
|
float fenveStep, fenveStepAdd;
|
||||||
@ -93,7 +93,7 @@ typedef struct _sidOperator
|
|||||||
#endif
|
#endif
|
||||||
UINT8 enveVol, enveSusVol;
|
UINT8 enveVol, enveSusVol;
|
||||||
UINT16 enveShortAttackCount;
|
UINT16 enveShortAttackCount;
|
||||||
} sidOperator;
|
};
|
||||||
|
|
||||||
typedef INT8 (*ptr2sidFunc)(sidOperator *);
|
typedef INT8 (*ptr2sidFunc)(sidOperator *);
|
||||||
typedef UINT16 (*ptr2sidUwordFunc)(sidOperator *);
|
typedef UINT16 (*ptr2sidUwordFunc)(sidOperator *);
|
||||||
|
@ -176,10 +176,10 @@ extern const device_type NCR7496_NEW;
|
|||||||
extern const device_type GAMEGEAR_NEW;
|
extern const device_type GAMEGEAR_NEW;
|
||||||
extern const device_type SEGAPSG_NEW;
|
extern const device_type SEGAPSG_NEW;
|
||||||
|
|
||||||
typedef struct _sn76496_config
|
struct sn76496_config
|
||||||
{
|
{
|
||||||
devcb_write_line ready;
|
devcb_write_line ready;
|
||||||
} sn76496_config;
|
};
|
||||||
|
|
||||||
class sn76496_base_device : public device_t, public device_sound_interface
|
class sn76496_base_device : public device_t, public device_sound_interface
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ extern const device_type TMC0285N;
|
|||||||
extern const device_type TMS5200N;
|
extern const device_type TMS5200N;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _tms52xx_config
|
struct tms52xx_config
|
||||||
{
|
{
|
||||||
devcb_write_line irq_func; // IRQ callback function, active low, i.e. state=0 (TODO: change to ASSERT/CLEAR)
|
devcb_write_line irq_func; // IRQ callback function, active low, i.e. state=0 (TODO: change to ASSERT/CLEAR)
|
||||||
devcb_write_line readyq_func; // Ready callback function, active low, i.e. state=0
|
devcb_write_line readyq_func; // Ready callback function, active low, i.e. state=0
|
||||||
@ -130,7 +130,7 @@ typedef struct _tms52xx_config
|
|||||||
devcb_write8 load_address; // speech ROM load address callback
|
devcb_write8 load_address; // speech ROM load address callback
|
||||||
devcb_write8 read_and_branch; // speech ROM read and branch callback
|
devcb_write8 read_and_branch; // speech ROM read and branch callback
|
||||||
|
|
||||||
} tms52xx_config;
|
};
|
||||||
|
|
||||||
// Change back from 5220n to 5220 when all client drivers will be converted
|
// Change back from 5220n to 5220 when all client drivers will be converted
|
||||||
class tms52xx_device : public device_t, public device_sound_interface
|
class tms52xx_device : public device_t, public device_sound_interface
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "osdcore.h"
|
#include "osdcore.h"
|
||||||
#include "sound/wavwrite.h"
|
#include "sound/wavwrite.h"
|
||||||
|
|
||||||
struct _wav_file
|
struct wav_file
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
UINT32 total_offs;
|
UINT32 total_offs;
|
||||||
@ -16,7 +16,7 @@ wav_file *wav_open(const char *filename, int sample_rate, int channels)
|
|||||||
UINT16 align, temp16;
|
UINT16 align, temp16;
|
||||||
|
|
||||||
/* allocate memory for the wav struct */
|
/* allocate memory for the wav struct */
|
||||||
wav = (wav_file *) osd_malloc(sizeof(struct _wav_file));
|
wav = (wav_file *) osd_malloc(sizeof(wav_file));
|
||||||
if (!wav)
|
if (!wav)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#ifndef __WAVWRITE_H__
|
#ifndef __WAVWRITE_H__
|
||||||
#define __WAVWRITE_H__
|
#define __WAVWRITE_H__
|
||||||
|
|
||||||
typedef struct _wav_file wav_file;
|
struct wav_file;
|
||||||
|
|
||||||
wav_file *wav_open(const char *filename, int sample_rate, int channels);
|
wav_file *wav_open(const char *filename, int sample_rate, int channels);
|
||||||
void wav_close(wav_file*wavptr);
|
void wav_close(wav_file*wavptr);
|
||||||
|
@ -13,7 +13,7 @@ typedef void (*STATUS_CHANGE_HANDLER)(void *chip, UINT8 status_bits);
|
|||||||
|
|
||||||
|
|
||||||
/* DELTA-T (adpcm type B) struct */
|
/* DELTA-T (adpcm type B) struct */
|
||||||
typedef struct deltat_adpcm_state { /* AT: rearranged and tigntened structure */
|
struct YM_DELTAT { /* AT: rearranged and tigntened structure */
|
||||||
UINT8 *memory;
|
UINT8 *memory;
|
||||||
INT32 *output_pointer;/* pointer of output pointers */
|
INT32 *output_pointer;/* pointer of output pointers */
|
||||||
INT32 *pan; /* pan : &output_pointer[pan] */
|
INT32 *pan; /* pan : &output_pointer[pan] */
|
||||||
@ -69,7 +69,7 @@ typedef struct deltat_adpcm_state { /* AT: rearranged and tigntened structur
|
|||||||
|
|
||||||
UINT8 reg[16]; /* adpcm registers */
|
UINT8 reg[16]; /* adpcm registers */
|
||||||
UINT8 emulation_mode; /* which chip we're emulating */
|
UINT8 emulation_mode; /* which chip we're emulating */
|
||||||
}YM_DELTAT;
|
};
|
||||||
|
|
||||||
/*void YM_DELTAT_BRDY_callback(YM_DELTAT *DELTAT);*/
|
/*void YM_DELTAT_BRDY_callback(YM_DELTAT *DELTAT);*/
|
||||||
|
|
||||||
|
@ -71,6 +71,8 @@
|
|||||||
#define VERBOSE 0
|
#define VERBOSE 0
|
||||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||||
|
|
||||||
|
struct YMF278BChip;
|
||||||
|
|
||||||
struct YMF278BSlot
|
struct YMF278BSlot
|
||||||
{
|
{
|
||||||
INT16 wave; /* wavetable number */
|
INT16 wave; /* wavetable number */
|
||||||
@ -110,10 +112,10 @@ struct YMF278BSlot
|
|||||||
INT8 env_preverb;
|
INT8 env_preverb;
|
||||||
|
|
||||||
int num; /* slot number (for debug only) */
|
int num; /* slot number (for debug only) */
|
||||||
struct _YMF278BChip *chip; /* pointer back to parent chip */
|
YMF278BChip *chip; /* pointer back to parent chip */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _YMF278BChip
|
struct YMF278BChip
|
||||||
{
|
{
|
||||||
UINT8 pcmregs[256];
|
UINT8 pcmregs[256];
|
||||||
YMF278BSlot slots[24];
|
YMF278BSlot slots[24];
|
||||||
@ -151,7 +153,7 @@ typedef struct _YMF278BChip
|
|||||||
INT32 mix_level[8];
|
INT32 mix_level[8];
|
||||||
|
|
||||||
sound_stream * stream;
|
sound_stream * stream;
|
||||||
} YMF278BChip;
|
};
|
||||||
|
|
||||||
INLINE YMF278BChip *get_safe_token(device_t *device)
|
INLINE YMF278BChip *get_safe_token(device_t *device)
|
||||||
{
|
{
|
||||||
|
@ -38,13 +38,12 @@
|
|||||||
#define UI_MENU_PROCESS_CUSTOM_ONLY 4
|
#define UI_MENU_PROCESS_CUSTOM_ONLY 4
|
||||||
|
|
||||||
/* options for ui_menu_reset */
|
/* options for ui_menu_reset */
|
||||||
enum _ui_menu_reset_options
|
enum ui_menu_reset_options
|
||||||
{
|
{
|
||||||
UI_MENU_RESET_SELECT_FIRST,
|
UI_MENU_RESET_SELECT_FIRST,
|
||||||
UI_MENU_RESET_REMEMBER_POSITION,
|
UI_MENU_RESET_REMEMBER_POSITION,
|
||||||
UI_MENU_RESET_REMEMBER_REF
|
UI_MENU_RESET_REMEMBER_REF
|
||||||
};
|
};
|
||||||
typedef enum _ui_menu_reset_options ui_menu_reset_options;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ const int MAX_FRAMESKIP = FRAMESKIP_LEVELS - 2;
|
|||||||
// forward references
|
// forward references
|
||||||
class render_target;
|
class render_target;
|
||||||
class screen_device;
|
class screen_device;
|
||||||
typedef struct _avi_file avi_file;
|
struct avi_file;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,21 +11,19 @@
|
|||||||
#include "machine/devhelpr.h"
|
#include "machine/devhelpr.h"
|
||||||
|
|
||||||
|
|
||||||
enum _huc6270_v_state {
|
enum huc6270_v_state {
|
||||||
HUC6270_VSW,
|
HUC6270_VSW,
|
||||||
HUC6270_VDS,
|
HUC6270_VDS,
|
||||||
HUC6270_VDW,
|
HUC6270_VDW,
|
||||||
HUC6270_VCR
|
HUC6270_VCR
|
||||||
};
|
};
|
||||||
typedef enum _huc6270_v_state huc6270_v_state;
|
|
||||||
|
|
||||||
enum _huc6270_h_state {
|
enum huc6270_h_state {
|
||||||
HUC6270_HDS,
|
HUC6270_HDS,
|
||||||
HUC6270_HDW,
|
HUC6270_HDW,
|
||||||
HUC6270_HDE,
|
HUC6270_HDE,
|
||||||
HUC6270_HSW
|
HUC6270_HSW
|
||||||
};
|
};
|
||||||
typedef enum _huc6270_h_state huc6270_h_state;
|
|
||||||
|
|
||||||
|
|
||||||
#define MCFG_HUC6270_ADD( _tag, _intrf ) \
|
#define MCFG_HUC6270_ADD( _tag, _intrf ) \
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* forward definitions */
|
/* forward definitions */
|
||||||
typedef struct _polygon_info polygon_info;
|
struct polygon_info;
|
||||||
|
|
||||||
|
|
||||||
/* tri_extent describes start/end points for a scanline */
|
/* tri_extent describes start/end points for a scanline */
|
||||||
@ -112,8 +112,7 @@ struct quad_work_unit
|
|||||||
|
|
||||||
|
|
||||||
/* work_unit is a union of the two types */
|
/* work_unit is a union of the two types */
|
||||||
typedef union _work_unit work_unit;
|
union work_unit
|
||||||
union _work_unit
|
|
||||||
{
|
{
|
||||||
work_unit_shared shared; /* shared data */
|
work_unit_shared shared; /* shared data */
|
||||||
tri_work_unit tri; /* triangle work unit */
|
tri_work_unit tri; /* triangle work unit */
|
||||||
@ -122,7 +121,7 @@ union _work_unit
|
|||||||
|
|
||||||
|
|
||||||
/* polygon_info describes a single polygon, which includes the poly_params */
|
/* polygon_info describes a single polygon, which includes the poly_params */
|
||||||
struct _polygon_info
|
struct polygon_info
|
||||||
{
|
{
|
||||||
poly_manager * poly; /* pointer back to the poly manager */
|
poly_manager * poly; /* pointer back to the poly manager */
|
||||||
void * dest; /* pointer to the destination we are rendering to */
|
void * dest; /* pointer to the destination we are rendering to */
|
||||||
@ -137,7 +136,7 @@ struct _polygon_info
|
|||||||
|
|
||||||
|
|
||||||
/* full poly manager description */
|
/* full poly manager description */
|
||||||
struct _poly_manager
|
struct poly_manager
|
||||||
{
|
{
|
||||||
/* queue management */
|
/* queue management */
|
||||||
osd_work_queue * queue; /* work queue */
|
osd_work_queue * queue; /* work queue */
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* opaque reference to the poly manager */
|
/* opaque reference to the poly manager */
|
||||||
typedef struct _poly_manager poly_manager;
|
struct poly_manager;
|
||||||
|
|
||||||
|
|
||||||
/* input vertex data */
|
/* input vertex data */
|
||||||
|
@ -1393,8 +1393,8 @@ static const UINT8 dither_matrix_2x2[16] =
|
|||||||
*
|
*
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
typedef struct _voodoo_state voodoo_state;
|
struct voodoo_state;
|
||||||
typedef struct poly_extra_data poly_extra_data;
|
struct poly_extra_data;
|
||||||
|
|
||||||
|
|
||||||
struct rgba
|
struct rgba
|
||||||
@ -1407,8 +1407,7 @@ struct rgba
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef union _voodoo_reg voodoo_reg;
|
union voodoo_reg
|
||||||
union _voodoo_reg
|
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
UINT32 u;
|
UINT32 u;
|
||||||
@ -1722,8 +1721,7 @@ struct banshee_info
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* typedef struct _voodoo_state voodoo_state; -- declared above */
|
struct voodoo_state
|
||||||
struct _voodoo_state
|
|
||||||
{
|
{
|
||||||
UINT8 index; /* index of board */
|
UINT8 index; /* index of board */
|
||||||
device_t *device; /* pointer to our containing device */
|
device_t *device; /* pointer to our containing device */
|
||||||
|
@ -84,7 +84,7 @@ static cassette_image *cassette_init(const struct CassetteFormat *format, void *
|
|||||||
{
|
{
|
||||||
cassette_image *cassette;
|
cassette_image *cassette;
|
||||||
|
|
||||||
cassette = (cassette_image *)malloc(sizeof(struct _cassette_image));
|
cassette = (cassette_image *)malloc(sizeof(cassette_image));
|
||||||
if (!cassette)
|
if (!cassette)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ struct CassetteInfo
|
|||||||
size_t sample_count;
|
size_t sample_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _cassette_image
|
struct cassette_image
|
||||||
{
|
{
|
||||||
const struct CassetteFormat *format;
|
const struct CassetteFormat *format;
|
||||||
struct io_generic io;
|
struct io_generic io;
|
||||||
@ -106,8 +106,6 @@ struct _cassette_image
|
|||||||
size_t sample_count;
|
size_t sample_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _cassette_image cassette_image;
|
|
||||||
|
|
||||||
struct CassetteFormat
|
struct CassetteFormat
|
||||||
{
|
{
|
||||||
const char *extensions;
|
const char *extensions;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#define TRACK_DIRTY 0x02
|
#define TRACK_DIRTY 0x02
|
||||||
|
|
||||||
|
|
||||||
struct _floppy_image
|
struct floppy_image_legacy
|
||||||
{
|
{
|
||||||
struct io_generic io;
|
struct io_generic io;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ struct _floppy_image
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct _floppy_params
|
struct floppy_params
|
||||||
{
|
{
|
||||||
int param;
|
int param;
|
||||||
int value;
|
int value;
|
||||||
@ -77,7 +77,7 @@ static floppy_image_legacy *floppy_init(void *fp, const struct io_procs *procs,
|
|||||||
{
|
{
|
||||||
floppy_image_legacy *floppy;
|
floppy_image_legacy *floppy;
|
||||||
|
|
||||||
floppy = (floppy_image_legacy *)malloc(sizeof(struct _floppy_image));
|
floppy = (floppy_image_legacy *)malloc(sizeof(floppy_image));
|
||||||
if (!floppy)
|
if (!floppy)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
typedef enum
|
enum floperr_t
|
||||||
{
|
{
|
||||||
FLOPPY_ERROR_SUCCESS, /* no error */
|
FLOPPY_ERROR_SUCCESS, /* no error */
|
||||||
FLOPPY_ERROR_INTERNAL, /* fatal internal error */
|
FLOPPY_ERROR_INTERNAL, /* fatal internal error */
|
||||||
@ -53,10 +53,9 @@ typedef enum
|
|||||||
FLOPPY_ERROR_NOSPACE,
|
FLOPPY_ERROR_NOSPACE,
|
||||||
FLOPPY_ERROR_PARAMOUTOFRANGE,
|
FLOPPY_ERROR_PARAMOUTOFRANGE,
|
||||||
FLOPPY_ERROR_PARAMNOTSPECIFIED
|
FLOPPY_ERROR_PARAMNOTSPECIFIED
|
||||||
}
|
};
|
||||||
floperr_t;
|
|
||||||
|
|
||||||
typedef struct _floppy_image floppy_image_legacy;
|
struct floppy_image_legacy;
|
||||||
|
|
||||||
struct FloppyCallbacks
|
struct FloppyCallbacks
|
||||||
{
|
{
|
||||||
|
@ -169,7 +169,7 @@ struct avi_stream
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct _avi_file
|
struct avi_file
|
||||||
{
|
{
|
||||||
/* shared data */
|
/* shared data */
|
||||||
osd_file * file; /* pointer to open file */
|
osd_file * file; /* pointer to open file */
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user