Skip to content

Commit fd4e40c

Browse files
author
mamedev
committed
MAME 0.116
1 parent 6e15e17 commit fd4e40c

File tree

1,308 files changed

+8092
-9749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,308 files changed

+8092
-9749
lines changed

src/emu/cpu/adsp2100/2100ops.c

+2
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ static void wr_px(INT32 val) { adsp2100.px = val; }
375375
static void wr_ifc(INT32 val)
376376
{
377377
adsp2100.ifc = val;
378+
#if (HAS_ADSP2181)
378379
if (chip_type >= CHIP_TYPE_ADSP2181)
379380
{
380381
/* clear timer */
@@ -395,6 +396,7 @@ static void wr_ifc(INT32 val)
395396
if (val & 0x8000) adsp2100.irq_latch[ADSP2181_IRQ2] = 1;
396397
}
397398
else
399+
#endif
398400
{
399401
/* clear timer */
400402
if (val & 0x002) adsp2100.irq_latch[ADSP2101_IRQ0] = 0;

src/emu/cpu/adsp2100/adsp2100.c

+22-13
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ static void check_irqs(void)
453453
{
454454
UINT8 check;
455455

456+
#if (HAS_ADSP2181)
456457
if (chip_type >= CHIP_TYPE_ADSP2181)
457458
{
458459
/* check IRQ2 */
@@ -502,7 +503,9 @@ static void check_irqs(void)
502503
if (check && adsp2181_generate_irq(ADSP2181_TIMER, 9))
503504
return;
504505
}
505-
else if (chip_type >= CHIP_TYPE_ADSP2101)
506+
else
507+
#endif
508+
if (chip_type >= CHIP_TYPE_ADSP2101)
506509
{
507510
/* check IRQ2 */
508511
check = (adsp2100.icntl & 4) ? adsp2100.irq_latch[ADSP2101_IRQ2] : adsp2100.irq_state[ADSP2101_IRQ2];
@@ -587,6 +590,7 @@ static void adsp2100_get_context(void *dst)
587590
}
588591

589592

593+
#if (HAS_ADSP2100)
590594
static void adsp2100_set_context(void *src)
591595
{
592596
/* copy the context */
@@ -602,6 +606,7 @@ static void adsp2100_set_context(void *src)
602606
/* check for IRQs */
603607
check_irqs();
604608
}
609+
#endif
605610

606611

607612

@@ -1929,8 +1934,8 @@ static void adsp21xx_get_info(UINT32 state, cpuinfo *info)
19291934

19301935
/* --- the following bits of info are returned as pointers to data or functions --- */
19311936
case CPUINFO_PTR_SET_INFO: /* set per CPU */ break;
1937+
case CPUINFO_PTR_SET_CONTEXT: /* set per CPU */ break;
19321938
case CPUINFO_PTR_GET_CONTEXT: info->getcontext = adsp2100_get_context; break;
1933-
case CPUINFO_PTR_SET_CONTEXT: info->setcontext = adsp2100_set_context; break;
19341939
case CPUINFO_PTR_INIT: info->init = adsp2100_init; break;
19351940
case CPUINFO_PTR_RESET: info->reset = adsp2100_reset; break;
19361941
case CPUINFO_PTR_EXIT: info->exit = adsp2100_exit; break;
@@ -2059,6 +2064,17 @@ static void adsp21xx_get_info(UINT32 state, cpuinfo *info)
20592064
}
20602065
}
20612066

2067+
void adsp21xx_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
2068+
{
2069+
/* see how many words we need to copy */
2070+
int pagelen = (srcdata[(3)] + 1) * 8;
2071+
int i;
2072+
for (i = 0; i < pagelen; i++)
2073+
{
2074+
UINT32 opcode = (srcdata[(i*4+0)] << 16) | (srcdata[(i*4+1)] << 8) | srcdata[(i*4+2)];
2075+
dstdata[i] = opcode;
2076+
}
2077+
}
20622078

20632079
#if (HAS_ADSP2100)
20642080
/**************************************************************************
@@ -2219,14 +2235,7 @@ static void adsp2104_set_context(void *src)
22192235

22202236
void adsp2104_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
22212237
{
2222-
/* see how many words we need to copy */
2223-
int pagelen = (srcdata[(3)] + 1) * 8;
2224-
int i;
2225-
for (i = 0; i < pagelen; i++)
2226-
{
2227-
UINT32 opcode = (srcdata[(i*4+0)] << 16) | (srcdata[(i*4+1)] << 8) | srcdata[(i*4+2)];
2228-
dstdata[i] = opcode;
2229-
}
2238+
adsp21xx_load_boot_data(srcdata, dstdata);
22302239
}
22312240

22322241
static void adsp2104_set_info(UINT32 state, cpuinfo *info)
@@ -2314,7 +2323,7 @@ static void adsp2105_set_context(void *src)
23142323

23152324
void adsp2105_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
23162325
{
2317-
adsp2104_load_boot_data(srcdata, dstdata);
2326+
adsp21xx_load_boot_data(srcdata, dstdata);
23182327
}
23192328

23202329
static void adsp2105_set_info(UINT32 state, cpuinfo *info)
@@ -2396,7 +2405,7 @@ static void adsp2115_set_context(void *src)
23962405

23972406
void adsp2115_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
23982407
{
2399-
adsp2104_load_boot_data(srcdata, dstdata);
2408+
adsp21xx_load_boot_data(srcdata, dstdata);
24002409
}
24012410

24022411
static void adsp2115_set_info(UINT32 state, cpuinfo *info)
@@ -2484,7 +2493,7 @@ static void adsp2181_set_context(void *src)
24842493

24852494
void adsp2181_load_boot_data(UINT8 *srcdata, UINT32 *dstdata)
24862495
{
2487-
adsp2104_load_boot_data(srcdata, dstdata);
2496+
adsp21xx_load_boot_data(srcdata, dstdata);
24882497
}
24892498

24902499
static void adsp2181_set_info(UINT32 state, cpuinfo *info)

src/emu/cpu/adsp2100/adsp2100.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,17 @@ enum
5656
PUBLIC FUNCTIONS
5757
***************************************************************************/
5858

59-
#if (HAS_ADSP2100)
6059
#define ADSP2100_IRQ0 0 /* IRQ0 */
6160
#define ADSP2100_SPORT1_RX 0 /* SPORT1 receive IRQ */
6261
#define ADSP2100_IRQ1 1 /* IRQ1 */
6362
#define ADSP2100_SPORT1_TX 1 /* SPORT1 transmit IRQ */
6463
#define ADSP2100_IRQ2 2 /* IRQ2 */
6564
#define ADSP2100_IRQ3 3 /* IRQ3 */
6665

66+
#if (HAS_ADSP2100)
6767
extern void adsp2100_get_info(UINT32 state, cpuinfo *info);
6868
#endif
6969

70-
#if (HAS_ADSP2101)
7170
/**************************************************************************
7271
* ADSP2101 section
7372
**************************************************************************/
@@ -81,6 +80,7 @@ extern void adsp2100_get_info(UINT32 state, cpuinfo *info);
8180
#define ADSP2101_SPORT0_TX 4 /* SPORT0 transmit IRQ */
8281
#define ADSP2101_TIMER 5 /* internal timer IRQ */
8382

83+
#if (HAS_ADSP2101)
8484
extern void adsp2101_get_info(UINT32 state, cpuinfo *info);
8585
#endif
8686

src/emu/cpu/alph8201/alph8201.c

-1
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,6 @@ static void alpha8xxx_get_info(UINT32 state, cpuinfo *info)
946946
case CPUINFO_PTR_INIT: info->init = ALPHA8201_init; break;
947947
case CPUINFO_PTR_RESET: info->reset = ALPHA8201_reset; break;
948948
case CPUINFO_PTR_EXIT: info->exit = ALPHA8201_exit; break;
949-
case CPUINFO_PTR_EXECUTE: info->execute = ALPHA8201_execute; break;
950949
case CPUINFO_PTR_BURN: info->burn = NULL; break;
951950
#ifdef MAME_DEBUG
952951
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ALPHA8201_dasm; break;

src/emu/cpu/cpu.mak

+6-6
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,14 @@ CPUDEFS += -DHAS_PENTIUM=$(if $(filter PENTIUM,$(CPUS)),1,0)
567567
CPUDEFS += -DHAS_MEDIAGX=$(if $(filter MEDIAGX,$(CPUS)),1,0)
568568

569569
ifneq ($(filter I86 I88 I186 I188,$(CPUS)),)
570-
OBJDIRS += $(CPUOBJ)/i86
570+
OBJDIRS += $(CPUOBJ)/i86 $(CPUOBJ)/i386
571571
CPUOBJS += $(CPUOBJ)/i86/i86.o
572572
DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
573573
endif
574574

575575

576576
ifneq ($(filter I286,$(CPUS)),)
577-
OBJDIRS += $(CPUOBJ)/i86
577+
OBJDIRS += $(CPUOBJ)/i86 $(CPUOBJ)/i386
578578
CPUOBJS += $(CPUOBJ)/i86/i286.o
579579
DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
580580
endif
@@ -737,7 +737,7 @@ $(CPUOBJ)/pic16c5x/pic16c5x.o: $(CPUSRC)/pic16c5x/pic16c5x.c \
737737
CPUDEFS += -DHAS_R3000=$(if $(filter R3000,$(CPUS)),1,0)
738738

739739
ifneq ($(filter R3000,$(CPUS)),)
740-
OBJDIRS += $(CPUOBJ)/r3000
740+
OBJDIRS += $(CPUOBJ)/mips
741741
CPUOBJS += $(CPUOBJ)/mips/r3000.o
742742
DBGOBJS += $(CPUOBJ)/mips/r3kdasm.o
743743
endif
@@ -1094,13 +1094,13 @@ CPUDEFS += -DHAS_V30MZ=$(if $(filter V30MZ,$(CPUS)),1,0)
10941094
CPUDEFS += -DHAS_V33=$(if $(filter V33,$(CPUS)),1,0)
10951095

10961096
ifneq ($(filter V20 V30 V33,$(CPUS)),)
1097-
OBJDIRS += $(CPUOBJ)/nec
1097+
OBJDIRS += $(CPUOBJ)/nec $(CPUOBJ)/i386
10981098
CPUOBJS += $(CPUOBJ)/nec/nec.o
10991099
DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
11001100
endif
11011101

11021102
ifneq ($(filter V30MZ,$(CPUS)),)
1103-
OBJDIRS += $(CPUOBJ)/v30mz
1103+
OBJDIRS += $(CPUOBJ)/v30mz $(CPUOBJ)/i386
11041104
CPUOBJS += $(CPUOBJ)/v30mz/v30mz.o
11051105
DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
11061106
endif
@@ -1572,7 +1572,7 @@ $(CPUOBJ)/z80/z80.o: $(CPUSRC)/z80/z80.c \
15721572
CPUDEFS += -DHAS_Z180=$(if $(filter Z180,$(CPUS)),1,0)
15731573

15741574
ifneq ($(filter Z180,$(CPUS)),)
1575-
OBJDIRS += $(CPUOBJ)/z180
1575+
OBJDIRS += $(CPUOBJ)/z180 $(CPUOBJ)/z80
15761576
CPUOBJS += $(CPUOBJ)/z180/z180.o $(CPUOBJ)/z80/z80daisy.o
15771577
DBGOBJS += $(CPUOBJ)/z180/z180dasm.o
15781578
endif

src/emu/cpu/i8051/i8051.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -1546,9 +1546,11 @@ INLINE UINT8 check_interrupts(void)
15461546
case V_RITI:
15471547
// no flags are cleared, TI and RI remain set until reset by software
15481548
break;
1549+
#if (HAS_I8052 || HAS_I8752)
15491550
case V_TF2:
15501551
// no flags are cleared according to manual
15511552
break;
1553+
#endif
15521554
}
15531555

15541556
//Clear vars.. (these are part of the 8051 structure for speed, so we don't have to dynamically allocate space each time)
@@ -2209,7 +2211,7 @@ INLINE void update_serial(int cyc)
22092211
/****************************************************************************
22102212
* 8752 Section
22112213
****************************************************************************/
2212-
#if (HAS_I8752)
2214+
#if (HAS_I8052 || HAS_I8752)
22132215
void i8752_init (int index, int clock, const void *config, int (*irqcallback)(int)) { i8051_init(index, clock, config, irqcallback); }
22142216
void i8752_reset (void)
22152217
{
@@ -2493,6 +2495,7 @@ void i8051_get_info(UINT32 state, cpuinfo *info)
24932495
}
24942496
}
24952497

2498+
#if (HAS_I8052)
24962499
void i8052_get_info(UINT32 state, cpuinfo *info)
24972500
{
24982501
switch (state)
@@ -2509,7 +2512,9 @@ void i8052_get_info(UINT32 state, cpuinfo *info)
25092512
default: i8051_get_info(state, info); break;
25102513
}
25112514
}
2515+
#endif
25122516

2517+
#if (HAS_I8751)
25132518
void i8751_get_info(UINT32 state, cpuinfo *info)
25142519
{
25152520
switch (state)
@@ -2519,7 +2524,9 @@ void i8751_get_info(UINT32 state, cpuinfo *info)
25192524
default: i8051_get_info(state, info); break;
25202525
}
25212526
}
2527+
#endif
25222528

2529+
#if (HAS_I8752)
25232530
void i8752_get_info(UINT32 state, cpuinfo *info)
25242531
{
25252532
switch (state)
@@ -2536,4 +2543,4 @@ void i8752_get_info(UINT32 state, cpuinfo *info)
25362543
default: i8051_get_info(state, info); break;
25372544
}
25382545
}
2539-
2546+
#endif

src/emu/cpu/jaguar/jaguar.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,9 @@ static void init_tables(void)
380380

381381
/* allocate the mirror table */
382382
if (!mirror_table)
383-
mirror_table = malloc(65536 * sizeof(mirror_table[0]));
383+
mirror_table = malloc_or_die(65536 * sizeof(mirror_table[0]));
384384

385385
/* fill in the mirror table */
386-
if (mirror_table)
387386
for (i = 0; i < 65536; i++)
388387
mirror_table[i] = ((i >> 15) & 0x0001) | ((i >> 13) & 0x0002) |
389388
((i >> 11) & 0x0004) | ((i >> 9) & 0x0008) |
@@ -396,10 +395,9 @@ static void init_tables(void)
396395

397396
/* allocate the condition table */
398397
if (!condition_table)
399-
condition_table = malloc(32 * 8 * sizeof(condition_table[0]));
398+
condition_table = malloc_or_die(32 * 8 * sizeof(condition_table[0]));
400399

401400
/* fill in the condition table */
402-
if (condition_table)
403401
for (i = 0; i < 8; i++)
404402
for (j = 0; j < 32; j++)
405403
{

src/emu/cpu/m6502/6502dasm.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -740,12 +740,10 @@ static unsigned internal_m6502_dasm(const struct op6502_info *opinfo, char *buff
740740
return (pc - PC) | flags;
741741
}
742742

743-
#if (HAS_M6502)
744743
unsigned m6502_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
745744
{
746745
return internal_m6502_dasm(op6502, buffer, pc, oprom, opram);
747746
}
748-
#endif
749747

750748
#if (HAS_M65SC02)
751749
unsigned m65sc02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
@@ -754,7 +752,7 @@ unsigned m65sc02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *
754752
}
755753
#endif
756754

757-
#if (HAS_M65C02)
755+
#if (HAS_M65C02||HAS_M65SC02||HAS_DECO16)
758756
unsigned m65c02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
759757
{
760758
return internal_m6502_dasm(op65c02, buffer, pc, oprom, opram);

src/emu/cpu/m6502/m6502.c

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
/* 10.March 2000 PeT added 6502 set overflow input line */
2525
/* 13.September 2000 PeT N2A03 jmp indirect */
2626

27+
#if ((HAS_M65SC02 || HAS_DECO16) && !HAS_M65C02)
28+
#undef HAS_M65C02
29+
#define HAS_M65C02 1
30+
#endif
31+
2732
#include "debugger.h"
2833
#include "m6502.h"
2934
#include "ops02.h"

src/emu/cpu/m6502/m6509.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void m6509_get_info(UINT32 state, cpuinfo *info)
372372
case CPUINFO_PTR_EXECUTE: info->execute = m6509_execute; break;
373373
case CPUINFO_PTR_BURN: info->burn = NULL; break;
374374
#ifdef MAME_DEBUG
375-
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6510_dasm; break;
375+
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6502_dasm; break;
376376
#endif
377377
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6502_ICount; break;
378378
case CPUINFO_PTR_INTERNAL_MEMORY_MAP: info->internal_map = construct_map_m6509_mem; break;

src/emu/cpu/m6800/6800tbl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ subb_ex,cmpb_ex,sbcb_ex,illegal,andb_ex,bitb_ex,ldb_ex, stb_ex,
284284
eorb_ex,adcb_ex,orb_ex, addb_ex,illegal,illegal,ldx_ex, stx_ex
285285
};
286286

287-
#if (HAS_M6803)
287+
#if (HAS_M6801||HAS_M6803)
288288
static void (*m6803_insn[0x100])(void) = {
289289
illegal,nop, illegal,illegal,lsrd, asld, tap, tpa,
290290
inx, dex, clv, sev, clc, sec, cli, sei,

src/emu/cpu/m6800/m6800.c

+3
Original file line numberDiff line numberDiff line change
@@ -1658,6 +1658,9 @@ void hd63701_trap_pc(void)
16581658
TAKE_TRAP;
16591659
}
16601660

1661+
static READ8_HANDLER( m6803_internal_registers_r );
1662+
static WRITE8_HANDLER( m6803_internal_registers_w );
1663+
16611664
READ8_HANDLER( hd63701_internal_registers_r )
16621665
{
16631666
return m6803_internal_registers_r(offset);

src/emu/cpu/mips/mips3drc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static void mips3_reset(int bigendian, int mips4, UINT32 prid)
452452
RM7000 = 0x2700
453453
*/
454454

455-
#if (HAS_R4600)
455+
#if (HAS_R4600||HAS_R4650)
456456
static void r4600be_reset(void)
457457
{
458458
mips3_reset(1, 0, 0x2000);

src/emu/cpu/powerpc/drc_ops.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -3740,7 +3740,9 @@ static UINT32 recompile_dsa(drc_core *drc, UINT32 op)
37403740

37413741
return RECOMPILE_SUCCESSFUL_CP(1,4);
37423742
}
3743+
#endif /* HAS_PPC602 */
37433744

3745+
#if (HAS_PPC602 || HAS_MPC8240)
37443746
static UINT32 recompile_tlbli(drc_core *drc, UINT32 op)
37453747
{
37463748
return RECOMPILE_SUCCESSFUL_CP(1,4);
@@ -3750,5 +3752,5 @@ static UINT32 recompile_tlbld(drc_core *drc, UINT32 op)
37503752
{
37513753
return RECOMPILE_SUCCESSFUL_CP(1,4);
37523754
}
3753-
#endif /* HAS_PPC602 */
3755+
#endif
37543756

src/emu/cpu/powerpc/ppcdrc.c

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#if (HAS_PPC603)
2020
static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqcallback)(int));
2121
static void ppcdrc603_exit(void);
22+
#endif
23+
#if (HAS_PPC603 || HAS_MPC8240)
2224
static void ppcdrc603_reset(void);
2325
static int ppcdrc603_execute(int cycles);
2426
static void ppcdrc603_set_irq_line(int irqline, int state);
@@ -1207,7 +1209,9 @@ static void ppcdrc603_exit(void)
12071209
#endif
12081210
drc_exit(ppc.drc);
12091211
}
1212+
#endif
12101213

1214+
#if (HAS_PPC603 || HAS_MPC8240)
12111215
static void ppcdrc603_reset(void)
12121216
{
12131217
ppc.pc = ppc.npc = 0xfff00100;

0 commit comments

Comments
 (0)