From 75265e5e230644374d5525ccacb729c13cc70ab5 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 18 Dec 2007 08:09:03 +0000 Subject: [PATCH] Changes for MAME 0.122. --- .gitattributes | 2 + src/emu/cpu/m68000/m68k.h | 4 +- src/emu/cpu/m68000/m68k_in.c | 8 +- src/emu/cpu/m68000/m68kconf.h | 4 +- src/emu/cpu/m68000/m68kcpu.c | 18 +- src/emu/cpu/m68000/m68kcpu.h | 20 +- src/emu/cpu/m68000/m68kdasm.c | 12 +- src/emu/cpu/m68000/m68kmake.c | 38 ++- src/emu/cpu/m68000/m68kmame.c | 8 +- src/emu/cpu/mips/mdrc64.c | 4 +- src/emu/sndintrf.c | 4 + src/emu/sndintrf.h | 1 + src/emu/sound/m58817.c | 365 ++++++++++++++++++++++++++ src/emu/sound/m58817.h | 24 ++ src/emu/sound/scsp.c | 217 +++++++++------- src/emu/sound/sound.mak | 12 + src/mame/audio/bzone.c | 4 +- src/mame/audio/dkong.c | 477 ++++++++++++---------------------- src/mame/audio/snes.c | 8 +- src/mame/drivers/cave.c | 220 ++++------------ src/mame/drivers/dkong.c | 413 +++++++++++++++++------------ src/mame/drivers/firebeat.c | 11 +- src/mame/drivers/gotya.c | 6 + src/mame/drivers/itech32.c | 2 + src/mame/drivers/itech8.c | 4 - src/mame/drivers/ksys573.c | 18 +- src/mame/drivers/midzeus.c | 2 +- src/mame/drivers/namcoic.c | 2 +- src/mame/drivers/neodrvr.c | 196 +++++++++++--- src/mame/drivers/neogeo.c | 2 +- src/mame/drivers/peplus.c | 32 ++- src/mame/drivers/policetr.c | 4 +- src/mame/drivers/raiden2.c | 31 ++- src/mame/drivers/rpunch.c | 183 +++---------- src/mame/drivers/segas18.c | 2 +- src/mame/drivers/seta.c | 167 ++++++++++++ src/mame/drivers/stv.c | 2 + src/mame/drivers/taito_f3.c | 2 +- src/mame/drivers/tmnt.c | 8 +- src/mame/includes/dkong.h | 10 + src/mame/includes/itech8.h | 1 - src/mame/machine/bonzeadv.c | 2 +- src/mame/machine/namcos1.c | 4 +- src/mame/machine/opwolf.c | 2 +- src/mame/machine/slikshot.c | 26 -- src/mame/machine/stvcd.c | 9 + src/mame/machine/stvcd.h | 1 + src/mame/machine/tx1.c | 2 +- src/mame/mame.mak | 1 + src/mame/mamedriv.c | 4 + src/mame/video/aeroboto.c | 4 +- src/mame/video/bfm_adr2.c | 2 +- src/mame/video/bking2.c | 2 +- src/mame/video/digdug.c | 2 +- src/mame/video/dkong.c | 28 +- src/mame/video/fastfred.c | 4 +- src/mame/video/galaxian.c | 8 +- src/mame/video/mermaid.c | 4 +- src/mame/video/midzeus.c | 4 + src/mame/video/model1.c | 2 +- src/mame/video/naughtyb.c | 6 +- src/mame/video/neogeo.c | 6 + src/mame/video/pacman.c | 2 +- src/mame/video/pingpong.c | 2 +- src/mame/video/retofinv.c | 2 +- src/mame/video/taito_f2.c | 7 +- src/mame/video/taitosj.c | 4 +- src/mame/video/thepit.c | 4 +- src/mame/video/travrusa.c | 4 +- src/mame/video/vigilant.c | 2 +- src/mame/video/wiz.c | 4 +- src/mame/video/yard.c | 4 +- src/mame/video/zaccaria.c | 4 +- src/osd/windows/input.c | 4 +- src/tools/chdman.c | 2 +- src/tools/regrep.c | 6 +- src/tools/romcmp.c | 2 +- src/version.c | 2 +- 78 files changed, 1619 insertions(+), 1107 deletions(-) create mode 100644 src/emu/sound/m58817.c create mode 100644 src/emu/sound/m58817.h diff --git a/.gitattributes b/.gitattributes index c921495c58e..73dc9375d10 100644 --- a/.gitattributes +++ b/.gitattributes @@ -762,6 +762,8 @@ src/emu/sound/k053260.c svneol=native#text/plain src/emu/sound/k053260.h svneol=native#text/plain src/emu/sound/k054539.c svneol=native#text/plain src/emu/sound/k054539.h svneol=native#text/plain +src/emu/sound/m58817.c svneol=native#text/plain +src/emu/sound/m58817.h svneol=native#text/plain src/emu/sound/msm5205.c svneol=native#text/plain src/emu/sound/msm5205.h svneol=native#text/plain src/emu/sound/msm5232.c svneol=native#text/plain diff --git a/src/emu/cpu/m68000/m68k.h b/src/emu/cpu/m68000/m68k.h index b04bc518351..369adb5cc49 100644 --- a/src/emu/cpu/m68000/m68k.h +++ b/src/emu/cpu/m68000/m68k.h @@ -6,7 +6,7 @@ /* ======================================================================== */ /* * MUSASHI - * Version 3.31 + * Version 3.32 * * A portable Motorola M680x0 processor emulation engine. * Copyright 1998-2007 Karl Stenerud. All rights reserved. @@ -15,7 +15,7 @@ * copyright notice remains unaltered in the source code and any binary files * containing this code in compiled form. * - * All other lisencing terms must be negotiated with the author + * All other licensing terms must be negotiated with the author * (Karl Stenerud). * * The latest version of this code can be obtained at: diff --git a/src/emu/cpu/m68000/m68k_in.c b/src/emu/cpu/m68000/m68k_in.c index 79c957f4067..1ad3a4492e8 100644 --- a/src/emu/cpu/m68000/m68k_in.c +++ b/src/emu/cpu/m68000/m68k_in.c @@ -8,7 +8,7 @@ must fix: /* ======================================================================== */ /* * MUSASHI - * Version 3.31 + * Version 3.32 * * A portable Motorola M680x0 processor emulation engine. * Copyright 1998-2007 Karl Stenerud. All rights reserved. @@ -17,7 +17,7 @@ must fix: * copyright notice remains unaltered in the source code and any binary files * containing this code in compiled form. * - * All other lisencing terms must be negotiated with the author + * All other licensing terms must be negotiated with the author * (Karl Stenerud). * * The latest version of this code can be obtained at: @@ -141,7 +141,7 @@ typedef struct /* Opcode handler table */ -static opcode_handler_struct m68k_opcode_handler_table[] = +static const opcode_handler_struct m68k_opcode_handler_table[] = { /* function mask match 000 010 020 040 */ @@ -157,7 +157,7 @@ M68KMAKE_TABLE_FOOTER /* Build the opcode handler jump table */ void m68ki_build_opcode_table(void) { - opcode_handler_struct *ostruct; + const opcode_handler_struct *ostruct; int instr; int i; int j; diff --git a/src/emu/cpu/m68000/m68kconf.h b/src/emu/cpu/m68000/m68kconf.h index 0ad15013557..d10f5872932 100644 --- a/src/emu/cpu/m68000/m68kconf.h +++ b/src/emu/cpu/m68000/m68kconf.h @@ -3,7 +3,7 @@ /* ======================================================================== */ /* * MUSASHI - * Version 3.31 + * Version 3.32 * * A portable Motorola M680x0 processor emulation engine. * Copyright 1998-2007 Karl Stenerud. All rights reserved. @@ -12,7 +12,7 @@ * copyright notice remains unaltered in the source code and any binary files * containing this code in compiled form. * - * All other lisencing terms must be negotiated with the author + * All other licensing terms must be negotiated with the author * (Karl Stenerud). * * The latest version of this code can be obtained at: diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index d8b278c772b..01fb35f1fbd 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -3,9 +3,9 @@ /* ======================================================================== */ #if 0 -static const char* copyright_notice = +static const char copyright_notice[] = "MUSASHI\n" -"Version 3.31 (2007-07-09)\n" +"Version 3.32 (2007-12-15)\n" "A portable Motorola M680x0 processor emulation engine.\n" "Copyright 1998-2007 Karl Stenerud. All rights reserved.\n" "\n" @@ -13,7 +13,7 @@ static const char* copyright_notice = "copyright notice remains unaltered in the source code and any binary files\n" "containing this code in compiled form.\n" "\n" -"All other lisencing terms must be negotiated with the author\n" +"All other licensing terms must be negotiated with the author\n" "(Karl Stenerud).\n" "\n" "The latest version of this code can be obtained at:\n" @@ -49,7 +49,7 @@ uint m68ki_tracing = 0; uint m68ki_address_space; #ifdef M68K_LOG_ENABLE -const char* m68ki_cpu_names[] = +const char *const m68ki_cpu_names[] = { "Invalid CPU", "M68000", @@ -83,7 +83,7 @@ uint m68ki_aerr_write_mode; uint m68ki_aerr_fc; /* Used by shift & rotate instructions */ -uint8 m68ki_shift_8_table[65] = +const uint8 m68ki_shift_8_table[65] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -92,7 +92,7 @@ uint8 m68ki_shift_8_table[65] = 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -uint16 m68ki_shift_16_table[65] = +const uint16 m68ki_shift_16_table[65] = { 0x0000, 0x8000, 0xc000, 0xe000, 0xf000, 0xf800, 0xfc00, 0xfe00, 0xff00, 0xff80, 0xffc0, 0xffe0, 0xfff0, 0xfff8, 0xfffc, 0xfffe, 0xffff, 0xffff, @@ -103,7 +103,7 @@ uint16 m68ki_shift_16_table[65] = 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; -uint m68ki_shift_32_table[65] = +const uint m68ki_shift_32_table[65] = { 0x00000000, 0x80000000, 0xc0000000, 0xe0000000, 0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000, 0xff000000, 0xff800000, 0xffc00000, 0xffe00000, @@ -122,7 +122,7 @@ uint m68ki_shift_32_table[65] = /* Number of clock cycles to use for exception processing. * I used 4 for any vectors that are undocumented for processing times. */ -uint8 m68ki_exception_cycle_table[4][256] = +const uint8 m68ki_exception_cycle_table[4][256] = { { /* 000 */ 4, /* 0: Reset - Initial Stack Pointer */ @@ -418,7 +418,7 @@ uint8 m68ki_exception_cycle_table[4][256] = } }; -uint8 m68ki_ea_idx_cycle_table[64] = +const uint8 m68ki_ea_idx_cycle_table[64] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ..01.000 no memory indirect, base NULL */ diff --git a/src/emu/cpu/m68000/m68kcpu.h b/src/emu/cpu/m68000/m68kcpu.h index fe0a6ebfc5f..1af336a3407 100644 --- a/src/emu/cpu/m68000/m68kcpu.h +++ b/src/emu/cpu/m68000/m68kcpu.h @@ -4,7 +4,7 @@ /* ======================================================================== */ /* * MUSASHI - * Version 3.31 + * Version 3.32 * * A portable Motorola M680x0 processor emulation engine. * Copyright 1998-2007 Karl Stenerud. All rights reserved. @@ -13,7 +13,7 @@ * copyright notice remains unaltered in the source code and any binary files * containing this code in compiled form. * - * All other lisencing terms must be negotiated with the author + * All other licensing terms must be negotiated with the author * (Karl Stenerud). * * The latest version of this code can be obtained at: @@ -591,7 +591,7 @@ #if M68K_LOG_ENABLE #include extern FILE* M68K_LOG_FILEHANDLE - extern char* m68ki_cpu_names[]; + extern const char *const m68ki_cpu_names[]; #define M68K_DO_LOG(A) if(M68K_LOG_FILEHANDLE) fprintf A #if M68K_LOG_1010_1111 @@ -893,8 +893,8 @@ typedef struct uint cyc_movem_l; uint cyc_shift; uint cyc_reset; - uint8* cyc_instruction; - uint8* cyc_exception; + const uint8* cyc_instruction; + const uint8* cyc_exception; /* Callbacks to host */ int (*int_ack_callback)(int int_line); /* Interrupt Acknowledge */ @@ -913,12 +913,12 @@ typedef struct extern m68ki_cpu_core m68ki_cpu; extern sint m68ki_remaining_cycles; extern uint m68ki_tracing; -extern uint8 m68ki_shift_8_table[]; -extern uint16 m68ki_shift_16_table[]; -extern uint m68ki_shift_32_table[]; -extern uint8 m68ki_exception_cycle_table[][256]; +extern const uint8 m68ki_shift_8_table[]; +extern const uint16 m68ki_shift_16_table[]; +extern const uint m68ki_shift_32_table[]; +extern const uint8 m68ki_exception_cycle_table[][256]; extern uint m68ki_address_space; -extern uint8 m68ki_ea_idx_cycle_table[]; +extern const uint8 m68ki_ea_idx_cycle_table[]; extern uint m68ki_aerr_address; extern uint m68ki_aerr_write_mode; diff --git a/src/emu/cpu/m68000/m68kdasm.c b/src/emu/cpu/m68000/m68kdasm.c index 148e11f6707..2c794c1c0d0 100644 --- a/src/emu/cpu/m68000/m68kdasm.c +++ b/src/emu/cpu/m68000/m68kdasm.c @@ -3,7 +3,7 @@ /* ======================================================================== */ /* * MUSASHI - * Version 3.31 + * Version 3.32 * * A portable Motorola M680x0 processor emulation engine. * Copyright 1998-2007 Karl Stenerud. All rights reserved. @@ -12,7 +12,7 @@ * copyright notice remains unaltered in the source code and any binary files * containing this code in compiled form. * - * All other lisencing terms must be negotiated with the author + * All other licensing terms must be negotiated with the author * (Karl Stenerud). * * The latest version of this code can be obtained at: @@ -208,18 +208,18 @@ static const unsigned char* g_rawop; static uint g_rawbasepc; /* used by ops like asr, ror, addq, etc */ -static uint g_3bit_qdata_table[8] = {8, 1, 2, 3, 4, 5, 6, 7}; +static const uint g_3bit_qdata_table[8] = {8, 1, 2, 3, 4, 5, 6, 7}; -static uint g_5bit_data_table[32] = +static const uint g_5bit_data_table[32] = { 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; -static const char* g_cc[16] = +static const char *const g_cc[16] = {"t", "f", "hi", "ls", "cc", "cs", "ne", "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"}; -static const char* g_cpcc[64] = +static const char *const g_cpcc[64] = {/* 000 001 010 011 100 101 110 111 */ "f", "eq", "ogt", "oge", "olt", "ole", "ogl", "or", /* 000 */ "un", "ueq", "ugt", "uge", "ult", "ule", "ne", "t", /* 001 */ diff --git a/src/emu/cpu/m68000/m68kmake.c b/src/emu/cpu/m68000/m68kmake.c index bf4fc741748..31b06daeedf 100644 --- a/src/emu/cpu/m68000/m68kmake.c +++ b/src/emu/cpu/m68000/m68kmake.c @@ -3,7 +3,7 @@ /* ======================================================================== */ /* * MUSASHI - * Version 3.31 + * Version 3.32 * * A portable Motorola M680x0 processor emulation engine. * Copyright 1998-2007 Karl Stenerud. All rights reserved. @@ -12,7 +12,7 @@ * copyright notice remains unaltered in the source code and any binary files * containing this code in compiled form. * - * All other lisencing terms must be negotiated with the author + * All other licensing terms must be negotiated with the author * (Karl Stenerud). * * The latest version of this code can be obtained at: @@ -52,7 +52,7 @@ */ -static const char* g_version = "3.31"; +static const char g_version[] = "3.32"; /* ======================================================================== */ /* =============================== INCLUDES =============================== */ @@ -227,7 +227,6 @@ int extract_opcode_info(char* src, char* name, int* size, char* spec_proc, char* void add_replace_string(replace_struct* replace, const char* search_str, const char* replace_str); void write_body(FILE* filep, body_struct* body, replace_struct* replace); void get_base_name(char* base_name, opcode_struct* op); -void write_prototype(FILE* filep, char* base_name); void write_function_name(FILE* filep, char* base_name); void add_opcode_output_table_entry(opcode_struct* op, char* name); static int DECL_SPEC compare_nof_true_bits(const void* aptr, const void* bptr); @@ -265,7 +264,7 @@ opcode_struct g_opcode_input_table[MAX_OPCODE_INPUT_TABLE_LENGTH]; opcode_struct g_opcode_output_table[MAX_OPCODE_OUTPUT_TABLE_LENGTH]; int g_opcode_output_table_length = 0; -ea_info_struct g_ea_info_table[13] = +const ea_info_struct g_ea_info_table[13] = {/* fname ea mask match */ {"", "", 0x00, 0x00}, /* EA_MODE_NONE */ {"ai", "AY_AI", 0x38, 0x10}, /* EA_MODE_AI */ @@ -283,7 +282,7 @@ ea_info_struct g_ea_info_table[13] = }; -const char* g_cc_table[16][2] = +const char *const g_cc_table[16][2] = { { "t", "T"}, /* 0000 */ { "f", "F"}, /* 0001 */ @@ -304,7 +303,7 @@ const char* g_cc_table[16][2] = }; /* size to index translator (0 -> 0, 8 and 16 -> 1, 32 -> 2) */ -int g_size_select_table[33] = +const int g_size_select_table[33] = { 0, /* unsized */ 0, 0, 0, 0, 0, 0, 0, 1, /* 8 */ @@ -314,7 +313,7 @@ int g_size_select_table[33] = /* Extra cycles required for certain EA modes */ /* TODO: correct timings for 040 */ -int g_ea_cycle_table[13][NUM_CPUS][3] = +const int g_ea_cycle_table[13][NUM_CPUS][3] = {/* 000 010 020 040 */ {{ 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}, { 0, 0, 0}}, /* EA_MODE_NONE */ {{ 0, 4, 8}, { 0, 4, 8}, { 0, 4, 4}, { 0, 4, 4}}, /* EA_MODE_AI */ @@ -332,7 +331,7 @@ int g_ea_cycle_table[13][NUM_CPUS][3] = }; /* Extra cycles for JMP instruction (000, 010) */ -int g_jmp_cycle_table[13] = +const int g_jmp_cycle_table[13] = { 0, /* EA_MODE_NONE */ 4, /* EA_MODE_AI */ @@ -350,7 +349,7 @@ int g_jmp_cycle_table[13] = }; /* Extra cycles for JSR instruction (000, 010) */ -int g_jsr_cycle_table[13] = +const int g_jsr_cycle_table[13] = { 0, /* EA_MODE_NONE */ 4, /* EA_MODE_AI */ @@ -368,7 +367,7 @@ int g_jsr_cycle_table[13] = }; /* Extra cycles for LEA instruction (000, 010) */ -int g_lea_cycle_table[13] = +const int g_lea_cycle_table[13] = { 0, /* EA_MODE_NONE */ 4, /* EA_MODE_AI */ @@ -386,7 +385,7 @@ int g_lea_cycle_table[13] = }; /* Extra cycles for PEA instruction (000, 010) */ -int g_pea_cycle_table[13] = +const int g_pea_cycle_table[13] = { 0, /* EA_MODE_NONE */ 6, /* EA_MODE_AI */ @@ -404,7 +403,7 @@ int g_pea_cycle_table[13] = }; /* Extra cycles for MOVEM instruction (000, 010) */ -int g_movem_cycle_table[13] = +const int g_movem_cycle_table[13] = { 0, /* EA_MODE_NONE */ 0, /* EA_MODE_AI */ @@ -422,7 +421,7 @@ int g_movem_cycle_table[13] = }; /* Extra cycles for MOVES instruction (010) */ -int g_moves_cycle_table[13][3] = +const int g_moves_cycle_table[13][3] = { { 0, 0, 0}, /* EA_MODE_NONE */ { 0, 4, 6}, /* EA_MODE_AI */ @@ -440,7 +439,7 @@ int g_moves_cycle_table[13][3] = }; /* Extra cycles for CLR instruction (010) */ -int g_clr_cycle_table[13][3] = +const int g_clr_cycle_table[13][3] = { { 0, 0, 0}, /* EA_MODE_NONE */ { 0, 4, 6}, /* EA_MODE_AI */ @@ -778,16 +777,10 @@ void get_base_name(char* base_name, opcode_struct* op) sprintf(base_name+strlen(base_name), "_%s", op->spec_ea); } -/* Write the prototype of an opcode handler function */ -void write_prototype(FILE* filep, char* base_name) -{ - fprintf(filep, "void %s(void);\n", base_name); -} - /* Write the name of an opcode handler function */ void write_function_name(FILE* filep, char* base_name) { - fprintf(filep, "void %s(void)\n", base_name); + fprintf(filep, "static void %s(void)\n", base_name); } void add_opcode_output_table_entry(opcode_struct* op, char* name) @@ -870,7 +863,6 @@ void generate_opcode_handler(FILE* filep, body_struct* body, replace_struct* rep /* Set the opcode structure and write the tables, prototypes, etc */ set_opcode_struct(opinfo, op, ea_mode); get_base_name(str, op); - write_prototype(g_prototype_file, str); add_opcode_output_table_entry(op, str); write_function_name(filep, str); diff --git a/src/emu/cpu/m68000/m68kmame.c b/src/emu/cpu/m68000/m68kmame.c index 84969ed6a88..d182b2c5ebd 100644 --- a/src/emu/cpu/m68000/m68kmame.c +++ b/src/emu/cpu/m68000/m68kmame.c @@ -580,7 +580,7 @@ void m68000_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "68000"); break; case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; - case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.31"); break; + case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright 1998-2007 Karl Stenerud. All rights reserved. (2.1 fixes HJB)"); break; @@ -759,7 +759,7 @@ void m68008_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "68008"); break; case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; - case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.31"); break; + case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright 1998-2007 Karl Stenerud. All rights reserved. (2.1 fixes HJB)"); break; @@ -999,7 +999,7 @@ void m68020_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "68020"); break; case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; - case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.31"); break; + case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright 1998-2007 Karl Stenerud. All rights reserved. (2.1 fixes HJB)"); break; @@ -1240,7 +1240,7 @@ void m68040_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "68040"); break; case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Motorola 68K"); break; - case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.31"); break; + case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "3.32"); break; case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright 1998-2007 Karl Stenerud. All rights reserved. (2.1 fixes HJB)"); break; diff --git a/src/emu/cpu/mips/mdrc64.c b/src/emu/cpu/mips/mdrc64.c index 8d2d42ea1ee..81f304a20be 100644 --- a/src/emu/cpu/mips/mdrc64.c +++ b/src/emu/cpu/mips/mdrc64.c @@ -1165,7 +1165,7 @@ static void probe_printf(void) static void exception_trap(void) { if ((mips3.core->cpr[0][COP0_Cause] & 0xff) != 0) - printf("Exception: EPC=%08X Cause=%08X BadVAddr=%08X Jmp=%08X\n", mips3.core->cpr[0][COP0_EPC], mips3.core->cpr[0][COP0_Cause], mips3.core->cpr[0][COP0_BadVAddr], mips3.core->pc); + printf("Exception: EPC=%08X Cause=%08X BadVAddr=%08X Jmp=%08X\n", (UINT32)mips3.core->cpr[0][COP0_EPC], (UINT32)mips3.core->cpr[0][COP0_Cause], (UINT32)mips3.core->cpr[0][COP0_BadVAddr], mips3.core->pc); } @@ -2710,7 +2710,7 @@ static int compile_special(drc_core *drc, compiler_state *compiler, const opcode { UINT32 op = *desc->opptr.l; UINT8 opswitch = op & 63; - emit_link link1; + emit_link link1 = { 0 }; switch (opswitch) { diff --git a/src/emu/sndintrf.c b/src/emu/sndintrf.c index 52f426c64a6..7532aacfd81 100644 --- a/src/emu/sndintrf.c +++ b/src/emu/sndintrf.c @@ -164,6 +164,7 @@ void sid6581_get_info(void *token, UINT32 state, sndinfo *info); void sid8580_get_info(void *token, UINT32 state, sndinfo *info); void sp0256_get_info(void *token, UINT32 state, sndinfo *info); void s14001a_get_info(void *token, UINT32 state, sndinfo *info); +void m58817_get_info(void *token, UINT32 state, sndinfo *info); void filter_volume_get_info(void *token, UINT32 state, sndinfo *info); void filter_rc_get_info(void *token, UINT32 state, sndinfo *info); @@ -444,6 +445,9 @@ static const struct #if (HAS_SP0256) { SOUND_SP0256, sp0256_get_info }, #endif +#if (HAS_M58817) + { SOUND_M58817, m58817_get_info }, +#endif { SOUND_FILTER_VOLUME, filter_volume_get_info }, { SOUND_FILTER_RC, filter_rc_get_info }, diff --git a/src/emu/sndintrf.h b/src/emu/sndintrf.h index 746fa65ee57..67b5271642b 100644 --- a/src/emu/sndintrf.h +++ b/src/emu/sndintrf.h @@ -125,6 +125,7 @@ enum _sound_type SOUND_SID8580, SOUND_SP0256, SOUND_S14001A, + SOUND_M58817, /* filters start here */ SOUND_FILTER_VOLUME, diff --git a/src/emu/sound/m58817.c b/src/emu/sound/m58817.c new file mode 100644 index 00000000000..15b15f852e4 --- /dev/null +++ b/src/emu/sound/m58817.c @@ -0,0 +1,365 @@ +/****************************************************************************** + + M58817 interface + + Written for MAME by couriersud + + - structure from TMS5110 interface + - this is a wrapper around the TMS5110 interface + - M58817 & TMS5110 seem to be similar, however it is very probable + that they use different "coding" tables for energy, pitch + - Speech is understandable, but off + - This driver supports to use a "sample" interface instead as well + +******************************************************************************/ + +#include + +#include "sndintrf.h" +#include "streams.h" +#include "tms5110.h" +#include "m58817.h" +#include "sound/samples.h" + + +#define MAX_SAMPLE_CHUNK 10000 + +enum { + WAIT_CMD, + WAIT_WRITE, + WAIT_DONE1, + WAIT_DONE2 +} m58817_states; + +/* the state of the streamed output */ +struct m58817_info +{ + const struct M58817interface *intf; + sound_stream *stream; + void *chip; + UINT8 state; + UINT8 drq; + UINT8 nibbles[4]; + UINT8 command_latch; + INT32 count; + INT32 address; + INT32 speech_rom_bitnum; +}; + + +/* static function prototypes */ +static void m58817_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length); + +static int speech_rom_read_bit(void) +{ + struct m58817_info *info = sndti_token(SOUND_M58817, 0); + const UINT8 *table = memory_region(info->intf->rom_region); + + int r; + + if (info->speech_rom_bitnum<0) + r = 0; + else + r = (table[info->speech_rom_bitnum >> 3] >> (0x07 - (info->speech_rom_bitnum & 0x07))) & 1; + //r = (table[speech_rom_bitnum >> 3] >> ((speech_rom_bitnum & 0x07))) & 1; + info->speech_rom_bitnum++; + //printf("Byte: 0x%02x\n", speech_rom_bitnum>>3); + return r; +} + +/****************************************************************************** + + m58817_state_loop -- process commands + +******************************************************************************/ + +static void m58817_state_loop(void *chip, int data) +{ + struct m58817_info *info = chip; + int i; + switch (info->state) + { + case WAIT_CMD: + switch (data) + { + case 0x00: // reset ???? + info->count=0; + /*To be extremely accurate there should be a delays between each of + the function calls below. In real they happen with the frequency of 160 kHz. + */ + + if (info->intf->rom_region != -1) + { + tms5110_CTL_set(info->chip, TMS5110_CMD_RESET); + tms5110_PDC_set(info->chip, 0); + tms5110_PDC_set(info->chip, 1); + tms5110_PDC_set(info->chip, 0); + + tms5110_PDC_set(info->chip, 0); + tms5110_PDC_set(info->chip, 1); + tms5110_PDC_set(info->chip, 0); + + tms5110_PDC_set(info->chip, 0); + tms5110_PDC_set(info->chip, 1); + tms5110_PDC_set(info->chip, 0); + + info->speech_rom_bitnum = 0x0; + } + break; + case 0x02: // latch next nibbel + info->state=WAIT_WRITE; + break; + case 0x08: // play ???? + info->state=WAIT_DONE1; + break; + default: + logerror("m58817: unknown cmd : 0x%02x\n", data); + } + break; + case WAIT_WRITE: + info->nibbles[info->count++] = data & 0x0f; + info->state=WAIT_CMD; + break; + case WAIT_DONE1: + if (data != 0x0A) + logerror("m58817: expected 0x0A got 0x%02x\n", data); + info->address = 0; + for (i=0;icount;i++) + { + info->address |= (info->nibbles[i] << (i*4)); + } + logerror("m58817: address: 0x%04x\n", info->address); + + + if (info->intf->rom_region != -1) + { + info->speech_rom_bitnum = info->address * 8 - 1; + tms5110_CTL_set(info->chip, TMS5110_CMD_SPEAK); + tms5110_PDC_set(info->chip, 0); + tms5110_PDC_set(info->chip, 1); + tms5110_PDC_set(info->chip, 0); + } + else + { + for (i=0;iintf->sample_addr[i] == info->address) + { + sample_start(0,i,0); + break; + } + } + + info->state=WAIT_CMD; + break; + } +} + + +/****************************************************************************** + + m58817_start -- allocate buffers and reset the 5110 + +******************************************************************************/ + +static void *m58817_start(int sndindex, int clock, const void *config) +{ + static const struct M58817interface dummy = { 0 }; + struct m58817_info *info; + + info = auto_malloc(sizeof(*info)); + memset(info, 0, sizeof(*info)); + info->intf = config ? config : &dummy; + + if (info->intf->rom_region != -1) + { + info->chip = tms5110_create(sndindex); + if (!info->chip) + return NULL; + } + sndintrf_register_token(info); + + /* initialize a stream */ + if (info->intf->rom_region != -1) + { + info->stream = stream_create(0, 1, clock / 80, info, m58817_update); + tms5110_set_M0_callback(info->chip, speech_rom_read_bit ); + /* reset the 58817 */ + tms5110_reset_chip(info->chip); + } + + state_save_register_item("m58817", sndindex, info->state); + state_save_register_item("m58817", sndindex, info->drq); + state_save_register_item_array("m58817", sndindex, info->nibbles); + state_save_register_item("m58817", sndindex, info->count); + state_save_register_item("m58817", sndindex, info->address); + state_save_register_item("m58817", sndindex, info->speech_rom_bitnum); + + /* request a sound channel */ + return info; +} + + + +/****************************************************************************** + + m58817_stop -- free buffers + +******************************************************************************/ + +static void m58817_stop(void *chip) +{ + struct m58817_info *info = chip; + if (info->intf->rom_region != -1) + tms5110_destroy(info->chip); +} + + +static void m58817_reset(void *chip) +{ + struct m58817_info *info = chip; + if (info->intf->rom_region != -1) + tms5110_reset_chip(info->chip); + info->state = WAIT_CMD; + info->drq = 0; + info->command_latch = 0; + info->count=0; +} + + + +/****************************************************************************** + + m58817_CTL_w -- write Control Command to the sound chip + commands like Speech, Reset, etc., are loaded into the chip via the CTL pins + +******************************************************************************/ + +WRITE8_HANDLER( m58817_CTL_w ) +{ + struct m58817_info *info = sndti_token(SOUND_M58817, 0); + + /* bring up to date first */ + //stream_update(info->stream); + info->command_latch = data & 0x0f; +} + +/****************************************************************************** + + m58817_DRQ_w -- write to DRQ pin on the sound chip + +******************************************************************************/ + +WRITE8_HANDLER( m58817_DRQ_w ) +{ + struct m58817_info *info = sndti_token(SOUND_M58817, 0); + + /* bring up to date first */ + if (info->intf->rom_region != -1) + stream_update(info->stream); + if (!data & info->drq) + m58817_state_loop(info, info->command_latch); + info->drq = data; +} + + + +/****************************************************************************** + + m58817_status_r -- read status from the sound chip + +******************************************************************************/ + +READ8_HANDLER( m58817_status_r ) +{ + struct m58817_info *info = sndti_token(SOUND_M58817, 0); + + /* bring up to date first */ + if (info->intf->rom_region != -1) + stream_update(info->stream); + if (info->intf->rom_region != -1) + return tms5110_status_read(info->chip); + else + return sample_playing(0); +} + + + +/****************************************************************************** + + m58817_update -- update the sound chip so that it is in sync with CPU execution + +******************************************************************************/ + +static void m58817_update(void *param, stream_sample_t **inputs, stream_sample_t **_buffer, int length) +{ + struct m58817_info *info = param; + INT16 sample_data[MAX_SAMPLE_CHUNK]; + stream_sample_t *buffer = _buffer[0]; + + /* loop while we still have samples to generate */ + while (length) + { + int samples = (length > MAX_SAMPLE_CHUNK) ? MAX_SAMPLE_CHUNK : length; + int index; + + /* generate the samples and copy to the target buffer */ + tms5110_process(info->chip, sample_data, samples); + for (index = 0; index < samples; index++) + *buffer++ = sample_data[index]; + + /* account for the samples */ + length -= samples; + } +} + + + +/****************************************************************************** + + m58817_set_frequency -- adjusts the playback frequency + +******************************************************************************/ + +void m58817_set_frequency(int frequency) +{ + struct m58817_info *info = sndti_token(SOUND_M58817, 0); + stream_set_sample_rate(info->stream, frequency / 80); +} + + + + +/************************************************************************** + * Generic get_info + **************************************************************************/ + +static void m58817_set_info(void *token, UINT32 state, sndinfo *info) +{ + switch (state) + { + /* no parameters to set */ + } +} + + +void m58817_get_info(void *token, UINT32 state, sndinfo *info) +{ + switch (state) + { + /* --- the following bits of info are returned as 64-bit signed integers --- */ + + /* --- the following bits of info are returned as pointers to data or functions --- */ + case SNDINFO_PTR_SET_INFO: info->set_info = m58817_set_info; break; + case SNDINFO_PTR_START: info->start = m58817_start; break; + case SNDINFO_PTR_STOP: info->stop = m58817_stop; break; + case SNDINFO_PTR_RESET: info->reset = m58817_reset; break; + + /* --- the following bits of info are returned as NULL-terminated strings --- */ + case SNDINFO_STR_NAME: info->s = "M58817"; break; + case SNDINFO_STR_CORE_FAMILY: info->s = "Mitsubishi Speech"; break; + case SNDINFO_STR_CORE_VERSION: info->s = "1.0"; break; + case SNDINFO_STR_CORE_FILE: info->s = __FILE__; break; + case SNDINFO_STR_CORE_CREDITS: info->s = "Copyright (c) 2007, The MAME Team"; break; + } +} + diff --git a/src/emu/sound/m58817.h b/src/emu/sound/m58817.h new file mode 100644 index 00000000000..7374f2d03ef --- /dev/null +++ b/src/emu/sound/m58817.h @@ -0,0 +1,24 @@ +#ifndef m58817_h +#define m58817_h + +/* clock rate = 80 * output sample rate, */ +/* usually 640000 for 8000 Hz sample rate or */ +/* usually 800000 for 10000 Hz sample rate. */ + +#define M58817_MAX_SAMPLES 20 + +struct M58817interface +{ + int rom_region; /* set to -1 to use samples */ + int sample_addr[M58817_MAX_SAMPLES]; +}; + +WRITE8_HANDLER( m58817_CTL_w ); +WRITE8_HANDLER( m58817_DRQ_w ); + +READ8_HANDLER( m58817_status_r ); + +void m58817_set_frequency(int frequency); + +#endif + diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c index 542c53a448a..ed26a1b7217 100644 --- a/src/emu/sound/scsp.c +++ b/src/emu/sound/scsp.c @@ -2,14 +2,12 @@ Sega/Yamaha YMF292-F (SCSP = Saturn Custom Sound Processor) emulation By ElSemi MAME/M1 conversion and cleanup by R. Belmont + Additional code and bugfixes by kingshriek This chip has 32 voices. Each voice can play a sample or be part of an FM construct. Unlike traditional Yamaha FM chips, the base waveform for the FM still comes from the wavetable RAM. - Unsupported: - - FM mode (VF3 uses it, Hanagumi might late in the title song...) - ChangeLog: * November 25, 2003 (ES) Fixed buggy timers and envelope overflows. (RB) Improved sample rates other than 44100, multiple @@ -20,8 +18,10 @@ * January 8, 2005 (RB) Added ability to specify region offset for RAM. * January 26, 2007 (ES) Added on-board DSP capability * September 24, 2007 (RB+ES) Removed fake reverb. Rewrote timers and IRQ handling. - Fixed case where voice frequency is updated while looping. - Enabled DSP again. + Fixed case where voice frequency is updated while looping. + Enabled DSP again. + * December 16, 2007 (kingshriek) Many EG bug fixes, implemented effects mixer, + implemented FM. */ #include @@ -76,7 +76,7 @@ #define SDIR(slot) ((slot->udata.data[0x6]>>0x0)&0x0100) #define TL(slot) ((slot->udata.data[0x6]>>0x0)&0x00FF) -#define MDL(slot) ((slot->udata.data[0x7]>>0xB)&0x0007) +#define MDL(slot) ((slot->udata.data[0x7]>>0xC)&0x000F) #define MDXSL(slot) ((slot->udata.data[0x7]>>0x6)&0x003F) #define MDYSL(slot) ((slot->udata.data[0x7]>>0x0)&0x003F) @@ -138,6 +138,7 @@ struct _SLOT UINT8 active; //this slot is currently playing UINT8 *base; //samples base address UINT32 cur_addr; //current play address (24.8) + UINT32 nxt_addr; //next play address UINT32 step; //pitch step (24.8) struct _EG EG; //Envelope struct _LFO PLFO; //Phase LFO @@ -375,7 +376,7 @@ static void Compute_EG(struct _SCSP *SCSP,struct _SLOT *slot) int rate; if(octave&8) octave=octave-16; if(KRS(slot)!=0xf) - rate=2*(octave+KRS(slot))+((FNS(slot)>>9)&1); + rate=octave+2*KRS(slot)+((FNS(slot)>>9)&1); else rate=0; //rate=((FNS(slot)>>9)&1); @@ -443,7 +444,7 @@ static int EG_Update(struct _SLOT *slot) static UINT32 SCSP_Step(struct _SLOT *slot) { int octave=OCT(slot); - int Fn; + UINT64 Fn; Fn=(FNS_Table[FNS(slot)]); //24.8 if(octave&8) @@ -470,7 +471,8 @@ static void SCSP_StartSlot(struct _SCSP *SCSP, struct _SLOT *slot) slot->active=1; start_offset = PCM8B(slot) ? SA(slot) : SA(slot) & 0x7FFFE; slot->base=SCSP->SCSPRAM + start_offset; - slot->cur_addr=0; + slot->cur_addr=0; + slot->nxt_addr=1<step=SCSP_Step(slot); Compute_EG(SCSP,slot); slot->EG.state=ATTACK; @@ -1158,7 +1160,9 @@ INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot) { INT32 sample; int step=slot->step; - UINT32 addr; + UINT32 addr1,addr2,addr_select; // current and next sample addresses + UINT32 *addr[2] = {&addr1, &addr2}; // used for linear interpolation + UINT32 *slot_addr[2] = {&(slot->cur_addr), &(slot->nxt_addr)}; // if(SSCTL(slot)!=0) //no FM or noise yet return 0; @@ -1169,50 +1173,58 @@ INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot) step>>=SHIFT; } - if(PCM8B(slot)) - addr=slot->cur_addr>>SHIFT; - else - addr=(slot->cur_addr>>(SHIFT-1)) & 0x7fffe; -/* - if(MDL(slot)!=0 || MDXSL(slot)!=0 || MDYSL(slot)!=0) - { - INT32 smp; - smp=(SCSP->RINGBUF[(SCSP->BUFPTR+MDXSL(slot))&63]+SCSP->RINGBUF[(SCSP->BUFPTR+MDYSL(slot))&63])/2; - - smp>>=11; - addr+=smp; - if(!PCM8B(slot)) - addr&=0x7fffe; - else - addr&=0x7ffff; - } -*/ - if(addr==LSA(slot)) + if(PCM8B(slot)) { - if(LPSLNK(slot) && slot->EG.state==ATTACK) - slot->EG.state = DECAY1; + addr1=slot->cur_addr>>SHIFT; + addr2=slot->nxt_addr>>SHIFT; } - - if(PCM8B(slot)) //8 bit signed + else + { + addr1=(slot->cur_addr>>(SHIFT-1))&0x7fffe; + addr2=(slot->nxt_addr>>(SHIFT-1))&0x7fffe; + } + + /*if(MDL(slot)!=0 || MDXSL(slot)!=0 || MDYSL(slot)!=0) { - INT8 *p=(INT8 *) (slot->base+BYTE_XOR_BE((slot->cur_addr>>SHIFT))); - INT32 s; - INT32 fpart=slot->cur_addr&((1<Prev*fpart; - sample=(s>>SHIFT); - slot->Prev=p[0]<<8; + INT32 smp=(SCSP->RINGBUF[(SCSP->BUFPTR+MDXSL(slot))&63]+SCSP->RINGBUF[(SCSP->BUFPTR+MDYSL(slot))&63])/2; + INT32 cycle=LEA(slot)-LSA(slot); // cycle corresponds to 2 pi - } - else //16 bit signed - { - INT16 *p=(INT16 *) (slot->base+addr); - INT32 s; - INT32 fpart=slot->cur_addr&((1<Prev*fpart; - sample=(s>>SHIFT); - slot->Prev=p[0]; - - } + smp*=cycle; // associate cycle with full 16-bit sample range + smp>>=0x1A-MDL(slot); // ex. for MDL=0xF, sample range corresponds to +/- 64 pi (32=2^5 cycles) so shift by 11 (16-5 == 0x1A-0xF) + while(smp<0) smp+=cycle; smp%=cycle; // keep modulation sampler within a single cycle + if(!PCM8B(slot)) smp<<=1; + + addr1+=smp; addr2+=smp; + if(!PCM8B(slot)) + { + addr1&=0x7fffe; addr2&=0x7fffe; + } + else + { + addr1&=0x7ffff; addr2&=0x7ffff; + } + }*/ + + if(PCM8B(slot)) //8 bit signed + { + INT8 *p1=(signed char *) (SCSP->SCSPRAM+((SA(slot)+addr1)^1)); + INT8 *p2=(signed char *) (SCSP->SCSPRAM+((SA(slot)+addr2)^1)); + //sample=(p[0])<<8; + INT32 s; + INT32 fpart=slot->cur_addr&((1<>SHIFT); + } + else //16 bit signed (endianness?) + { + INT16 *p1=(signed short *) (slot->base+addr1); + INT16 *p2=(signed short *) (slot->base+addr2); + //sample=LE16(p[0]); + INT32 s; + INT32 fpart=slot->cur_addr&((1<>SHIFT); + } if(SBCTL(slot)&0x1) sample ^= 0x7FFF; @@ -1222,58 +1234,71 @@ INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot) if(slot->Backwards) slot->cur_addr-=step; else - slot->cur_addr+=step; - addr=slot->cur_addr>>SHIFT; - switch(LPCTL(slot)) + slot->cur_addr+=step; + slot->nxt_addr=slot->cur_addr+(1<cur_addr>>SHIFT; + addr2=slot->nxt_addr>>SHIFT; + + if(addr1>=LSA(slot) && !(slot->Backwards)) { - case 0: //no loop - if(addr>=LEA(slot)) - { - //slot->active=0; - SCSP_StopSlot(slot,0); - } - break; - case 1: //normal loop - if(addr>=LEA(slot)) - slot->cur_addr=LSA(slot)<=LEA(slot)) - { - slot->cur_addr=LEA(slot)<Backwards=1; - } - if(addrcur_addr=LEA(slot)<=LEA(slot)) //reached end, reverse till start - { - slot->cur_addr=LEA(slot)<Backwards=1; - } - if((addrBackwards))//reached start or negative - { - slot->cur_addr=LSA(slot)<Backwards=0; - } - break; + if(LPSLNK(slot) && slot->EG.state==ATTACK) + slot->EG.state = DECAY1; } + for (addr_select=0;addr_select<2;addr_select++) + { + switch(LPCTL(slot)) + { + case 0: //no loop + if(*addr[addr_select]>=LSA(slot) && *addr[addr_select]>=LEA(slot)) + { + //slot->active=0; + SCSP_StopSlot(slot,0); + } + break; + case 1: //normal loop + if(*addr[addr_select]>=LEA(slot)) + *slot_addr[addr_select]=LSA(slot)<=LSA(slot)) && !(slot->Backwards)) + { + *slot_addr[addr_select]=LEA(slot)<Backwards=1; + } + if((*addr[addr_select]<=LSA(slot) || (*slot_addr[addr_select]&0x80000000)) && slot->Backwards) + *slot_addr[addr_select]=LEA(slot)<=LEA(slot)) //reached end, reverse till start + { + *slot_addr[addr_select]=LEA(slot)<Backwards=1; + } + if((*addr[addr_select]<=LSA(slot) || (*slot_addr[addr_select]&0x80000000)) && slot->Backwards)//reached start or negative + { + *slot_addr[addr_select]=LSA(slot)<Backwards=0; + } + break; + } + } + if(ALFOS(slot)!=0) { sample=sample*ALFO_Step(&(slot->ALFO)); sample>>=SHIFT; } - if(!STWINH(slot)) - *RBUFDST=sample; - if(slot->EG.state==ATTACK) sample=(sample*EG_Update(slot))>>SHIFT; else sample=(sample*EG_TABLE[EG_Update(slot)>>(SHIFT-10)])>>SHIFT; + if(!STWINH(slot)) + *RBUFDST=sample; + return sample; } @@ -1293,27 +1318,27 @@ static void SCSP_DoMasterSamples(struct _SCSP *SCSP, int nsamples) for(sl=0;sl<32;++sl) { + RBUFDST=SCSP->RINGBUF+SCSP->BUFPTR; if(SCSP->Slots[sl].active) { struct _SLOT *slot=SCSP->Slots+sl; unsigned short Enc; signed int sample; - RBUFDST=SCSP->RINGBUF+SCSP->BUFPTR; sample=SCSP_UpdateSlot(SCSP, slot); - ++SCSP->BUFPTR; - SCSP->BUFPTR&=63; + #ifdef USEDSP - Enc=((TL(slot))<<0x0)|((IMXL(slot))<<0xd); - SCSPDSP_SetSample(&SCSP->DSP,(sample*SCSP->LPANTABLE[Enc])>>SHIFT,ISEL(slot),IMXL(slot)); + Enc=((TL(slot))<<0x0)|((IMXL(slot))<<0xd); + SCSPDSP_SetSample(&SCSP->DSP,(sample*SCSP->LPANTABLE[Enc])>>(SHIFT-2),ISEL(slot),IMXL(slot)); #endif Enc=((TL(slot))<<0x0)|((DIPAN(slot))<<0x8)|((DISDL(slot))<<0xd); { - smpl+=(sample*SCSP->LPANTABLE[Enc])>>SHIFT; - smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT; + smpl+=(sample*SCSP->LPANTABLE[Enc])>>SHIFT; + smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT; } } - + --SCSP->BUFPTR; + SCSP->BUFPTR&=63; } SCSPDSP_Step(&SCSP->DSP); diff --git a/src/emu/sound/sound.mak b/src/emu/sound/sound.mak index 34b8a47b642..28928e7e702 100644 --- a/src/emu/sound/sound.mak +++ b/src/emu/sound/sound.mak @@ -593,6 +593,18 @@ endif +#------------------------------------------------- +# Mitsubishi M58817 speech synthesizer +#------------------------------------------------- + +SOUNDDEFS += -DHAS_M58817=$(if $(filter M58817,$(SOUNDS)),1,0) + +ifneq ($(filter M58817,$(SOUNDS)),) +SOUNDOBJS += $(SOUNDOBJ)/m58817.o +endif + + + #------------------------------------------------- # VLM5030 speech synthesizer #------------------------------------------------- diff --git a/src/mame/audio/bzone.c b/src/mame/audio/bzone.c index 944aebd84de..9b055d8f90e 100644 --- a/src/mame/audio/bzone.c +++ b/src/mame/audio/bzone.c @@ -176,8 +176,6 @@ static void bzone_sound_update(void *param, stream_sample_t **inputs, stream_sam if( latch & 0x80 ) { - static double r0 = 1.0/1e12, r1 = 1.0/1e12; - /* NE5555 timer * C = 0.018u, Ra = 100k, Rb = 125k * charge time = 0.693 * (Ra + Rb) * C = 3870us @@ -201,6 +199,8 @@ static void bzone_sound_update(void *param, stream_sample_t **inputs, stream_sam motor_counter -= motor_rate; while( motor_counter <= 0 ) { + double r0, r1; + motor_counter += OUTPUT_RATE; r0 = 1.0/1e12; diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c index a55a903e266..1f7c4311349 100644 --- a/src/mame/audio/dkong.c +++ b/src/mame/audio/dkong.c @@ -6,6 +6,8 @@ #include "sound/discrete.h" #include "sound/dac.h" +#include "sound/m58817.h" + #include "includes/dkong.h" /**************************************************************** @@ -14,13 +16,19 @@ * ****************************************************************/ -#define DEBUG_SPEECH (0) +/* Set to 1 to use speech synthesizer instead of samples. + * Disabled by default since M58817 emulation is not + * complete due to missing information about coefficients. + */ + +#define RADARSC1_USE_M58817 (0) #define ACTIVELOW_PORT_BIT(P,A,D) (((P) & (~(1 << (A)))) | (((D) ^ 1) << (A))) /* Needed for dkongjr ... FIXME */ -#define I8035_T_R(N) ((portT >> (N)) & 1) -#define I8035_T_W_AL(N,D) do { portT = ACTIVELOW_PORT_BIT(portT,N,D); soundlatch2_w(0, portT); } while (0) +//#define I8035_T_R(N) ((portT >> (N)) & 1) +#define I8035_T_R(N) ((soundlatch2_r(0) >> (N)) & 1) +#define I8035_T_W_AL(N,D) do { state->portT = ACTIVELOW_PORT_BIT(state->portT,N,D); soundlatch2_w(0, state->portT); } while (0) #define I8035_P1_R() (soundlatch3_r(0)) #define I8035_P2_R() (soundlatch4_r(0)) @@ -85,29 +93,7 @@ * ****************************************************************/ -static UINT8 dkongjr_latch[10]; -static UINT8 sh_climb_count; -static UINT8 has_discrete_interface; - -static UINT8 page,mcustatus; -static double envelope,tt; -static UINT8 decay; -static UINT8 sh1_count; -static UINT8 portT; - -enum { - WAIT_CMD, - WAIT_WRITE, - WAIT_DONE1, - WAIT_DONE2 -} m58817_states; - -static UINT8 m58817_state; -static UINT8 m58817_drq; -static UINT8 m58817_nibbles[4]; -static INT32 m58817_count; -static INT32 m58817_address; /**************************************************************** * @@ -669,82 +655,82 @@ DISCRETE_SOUND_END static SOUND_START( dkong ) { - state_save_register_global(page); - state_save_register_global(mcustatus); - state_save_register_global(envelope); - state_save_register_global(tt); - state_save_register_global(decay); - state_save_register_global(sh1_count); - state_save_register_global(portT); + dkong_state *state = machine->driver_data; - has_discrete_interface = 1; + state_save_register_global(state->page); + state_save_register_global(state->mcustatus); + state_save_register_global(state->portT); + state->has_discrete_interface = 1; -} - -static SOUND_RESET( dkong ) -{ - - sh1_count = 0; - mcustatus = 0; - envelope = 0; - tt = 0; - decay = 0; - - page = 0; - - I8035_T_W_AL(0,0); - I8035_T_W_AL(1,0); - I8035_P1_W(255); - I8035_P2_W(255); } static SOUND_START( dkongjr ) { + dkong_state *state = machine->driver_data; + sound_start_dkong(machine); - state_save_register_global(sh_climb_count); - state_save_register_global_array(dkongjr_latch); + state_save_register_global(state->sh_climb_count); + state_save_register_global_array(state->dkongjr_latch); + state_save_register_global(state->envelope); + state_save_register_global(state->tt); + state_save_register_global(state->decay); - sh_climb_count = 0; - - has_discrete_interface = 0; + state->has_discrete_interface = 0; } static SOUND_START( radarsc1 ) { + dkong_state *state = machine->driver_data; + sound_start_dkong(machine); - state_save_register_global(m58817_state); - state_save_register_global(m58817_drq); - state_save_register_global_array(m58817_nibbles); - state_save_register_global(m58817_count); - state_save_register_global(m58817_address); - - has_discrete_interface = 1; + state->has_discrete_interface = 1; } -static SOUND_RESET( radarsc1 ) +static SOUND_RESET( dkong ) { + dkong_state *state = machine->driver_data; + + state->mcustatus = 0; + state->page = 0; + + I8035_T_W_AL(0,0); + I8035_T_W_AL(1,0); + I8035_P1_W(255); + I8035_P2_W(255); +} + +static SOUND_RESET( dkongjr ) +{ + dkong_state *state = machine->driver_data; + int i; + sound_reset_dkong(machine); - - m58817_state=WAIT_CMD; - m58817_drq=0; - m58817_count=0; - m58817_address=0; - + + state->envelope = 0; + state->tt = 0; + state->decay = 0; + state->sh_climb_count = 0; + + for (i=0;i<10;i++) + state->dkongjr_latch[i]=0; } /**************************************************************** * * M58817 Speech * - * Fixme: Move to src/emu/audio - * ****************************************************************/ -/* @0x510, cpu2 +/* + +http://www.freepatentsonline.com/4633500.html + + + @0x510, cpu2 10: 0000 00 00000000 ... 50 53 01010000 01010011 "scramble" 12: 007a 44 01000100 ... 00 0f 00000000 00001111 "all pilots climb up" 14: 018b 13 00010011 ... dc f0 11011100 11110000 @@ -778,175 +764,12 @@ static SOUND_RESET( radarsc1 ) 7: 20 engine trouble */ -#if DEBUG_SPEECH -static UINT8 m58817_getbit(int bitnum) -{ - const UINT8 *table = memory_region(REGION_SOUND1); - return (table[bitnum >> 3] >> (0x07 - (bitnum & 0x07))) & 1; -} - -static UINT32 m58817_getbits(int startbit, int num) -{ - int i; - UINT32 r=0; - - for (i=0;i>3); - logerror(" energy = %d ", energy); - startbit += 4; - if (energy==0) - { - logerror(" - silence\n"); - return startbit; - } - if (energy==15) - { - logerror(" - stop\n"); - return -1; /* stop ... */ - } - repeat = m58817_getbits(startbit, 1); - startbit += 1; - pitch = m58817_getbits(startbit, 6); - startbit += 6; - logerror(" pitch = %d ", pitch); - if (repeat) - { - logerror(" - repeat\n"); - return startbit; - } - if (pitch == 0) - { - logerror(" - unvoiced skip %d\n", 18); - kx = m58817_getbits(startbit, 18); - startbit += 18; - return startbit; - } - else - { - logerror(" - voiced skip %d\n", 37); - kx = m58817_getbits(startbit, 30); - startbit += 30; - kx = m58817_getbits(startbit, 7); - startbit += 7; - return startbit; - } -} - -static int m58817_dumpframe(int startbit) -{ - while (startbit>=0) - startbit=m58817_decodeframe(startbit); - logerror("\n"); - return startbit; -} -#endif - -static void m58817_sampleframe(int addr) -{ - printf("0x%x\n", addr); - switch (addr) - { - case 0x0000: /* 10 */ - sample_start (0,0,0); - break; - case 0x007a: /* 12 */ - sample_start (0,1,0); - break; - case 0x018b: /* 14 */ - sample_start (0,2,0); - break; - case 0x0320: /* 16 */ - sample_start (0,3,0); - break; - case 0x036c: /* 18 */ - sample_start (0,4,0); - break; - case 0x03c4: /* 1A */ - sample_start (0,5,0); - break; - case 0x041c: /* 1C */ - sample_start (0,6,0); - break; - case 0x0520: /* 1E */ - sample_start (0,7,0); - break; - case 0x063e: /* 20 */ - sample_start (0,8,0); - break; - } -} - -static void m58817_state_loop(int data) -{ - int i; - switch (m58817_state) - { - case WAIT_CMD: - switch (data) - { - case 0x00: // reset ???? - m58817_count=0; - break; - case 0x02: // latch next nibbel - m58817_state=WAIT_WRITE; - break; - case 0x08: // play ???? - m58817_state=WAIT_DONE1; - break; - default: - logerror("m58817: unknown cmd : 0x%02x\n", data); - } - break; - case WAIT_WRITE: - m58817_nibbles[m58817_count++] = data & 0x0f; - m58817_state=WAIT_CMD; - break; - case WAIT_DONE1: - if (data != 0x0A) - logerror("m58817: expected 0x0A got 0x%02x\n", data); - m58817_address = 0; - for (i=0;i>4) & 0x01; // FIXME 0x20 ?? - int dat = data & 0x0f; logerror("PA Write %x\n", data); - if (!drq & m58817_drq) - m58817_state_loop(dat); - m58817_drq = drq; + + m58817_CTL_w(0, data & 0x0f); + m58817_DRQ_w(0, (data>>4) & 0x01); // FIXME 0x20 ?? } /**************************************************************** @@ -977,30 +800,38 @@ static READ8_HANDLER( dkong_sh_t1_r ) static READ8_HANDLER( dkong_sh_tune_r ) { + dkong_state *state = Machine->driver_data; UINT8 *SND = memory_region(REGION_CPU2); - if ( page & 0x40 ) + + if ( state->page & 0x40 ) { - return soundlatch_r(0); + return soundlatch_r(0) & 0x0F; } else - return (SND[2048+(page & 7)*256+offset]); + return (SND[0x1000+(state->page & 7)*256+offset]); +} + +static READ8_HANDLER( dkongjr_sh_tune_r ) +{ + return soundlatch_r(0) & 0x01F; } #define TSTEP 0.001 static WRITE8_HANDLER( dkong_sh_p1_w ) { + dkong_state *state = Machine->driver_data; - if (has_discrete_interface) + if (state->has_discrete_interface) discrete_sound_w(DS_DAC,data); else { - envelope=exp(-tt); - DAC_data_w(0,(int)(data*envelope)); - if (decay) - tt+=TSTEP; + state->envelope=exp(-state->tt); + DAC_data_w(0,(int)(data*state->envelope)); + if (state->decay) + state->tt+=TSTEP; else - tt=0; + state->tt=0; } } @@ -1008,55 +839,31 @@ static WRITE8_HANDLER( dkong_sh_p1_w ) static READ8_HANDLER( radarsc1_sh_p1_r ) { int r; - r = (I8035_P1_R() & 0x80) | (M58817_status_r(0)<<6); + + r = (I8035_P1_R() & 0x80) | (m58817_status_r(0)<<6); return r; } -static WRITE8_HANDLER( radarsc1_sh_p1_w ) -{ - M58817_command_w(0,data); -} - -static WRITE8_HANDLER( radarsc1_sh_p2_w ) -{ - /* If P2.Bit7 -> external signal decay - * If P2.Bit6 -> not connected - * If P2.Bit5 -> Signal ANSN ==> Grid enable - * If P2.Bit4 -> status code to main cpu - * P2.Bit2-0 -> select the 256 byte bank for external ROM - */ - - if (has_discrete_interface) - discrete_sound_w(DS_DAC_DISCHARGE, (data & 0x80) ? 0 : 1 ); - else - decay = !(data & 0x80); - page = (data & 0x07); - mcustatus = ((~data & 0x10) >> 4); - radarsc1_ansn_w(0, (data & 0x20) >> 5); -} - static WRITE8_HANDLER( dkong_sh_p2_w ) { /* If P2.Bit7 -> is apparently an external signal decay or other output control - * If P2.Bit6 -> activates the external compressed sample ROM + * If P2.Bit6 -> activates the external compressed sample ROM (not radarsc1) + * If P2.Bit5 -> Signal ANSN ==> Grid enable (radarsc1) * If P2.Bit4 -> status code to main cpu * P2.Bit2-0 -> select the 256 byte bank for external ROM */ - if (has_discrete_interface) + dkong_state *state = Machine->driver_data; + + if (state->has_discrete_interface) discrete_sound_w(DS_DAC_DISCHARGE, (data & 0x80) ? 0 : 1 ); else - decay = !(data & 0x80); - page = (data & 0x47); - mcustatus = ((~data & 0x10) >> 4); + state->decay = !(data & 0x80); + state->mcustatus = ((~data & 0x10) >> 4); + radarsc1_ansn_w(0, (data & 0x20) >> 5); + state->page = (data & 0x47); } -static READ8_HANDLER( radarsc1_sh_tune_r ) -{ - return soundlatch_r(0); -} - - /**************************************************************** * * I/O Handlers - global @@ -1076,7 +883,9 @@ WRITE8_HANDLER( dkongjr_sh_tuneselect_w ) READ8_HANDLER( dkong_audio_status_r ) { - return mcustatus; + dkong_state *state = Machine->driver_data; + + return state->mcustatus; } WRITE8_HANDLER( dkong_audio_irq_w ) @@ -1091,7 +900,7 @@ WRITE8_HANDLER( dkong_snd_disc_w ) { dkong_state *state = Machine->driver_data; - if (!has_discrete_interface && (offset<3)) + if (!state->has_discrete_interface && (offset<3)) { logerror("dkong.c: Write to snd port %d (%d)\n", offset, data); return; @@ -1122,11 +931,11 @@ WRITE8_HANDLER( dkong_snd_disc_w ) I8035_T_W_AL(0, data & 1); break; case 6: - if (has_discrete_interface) + if (state->has_discrete_interface) discrete_sound_w(DS_SOUND6_INP,data & 1); break; case 7: - if (has_discrete_interface) + if (state->has_discrete_interface) discrete_sound_w(DS_SOUND7_INP,data & 1); break; } @@ -1140,24 +949,25 @@ WRITE8_HANDLER( dkong_sh_tuneselect_w ) WRITE8_HANDLER( dkongjr_snd_w1 ) { + dkong_state *state = Machine->driver_data; static const int sample_order[7] = {1,2,1,2,0,1,0}; - if (dkongjr_latch[offset] != data) + if (state->dkongjr_latch[offset] != data) { switch (offset) { case 0: /* climb */ - if (data && dkongjr_latch[7] == 0) + if (data && state->dkongjr_latch[7] == 0) { - sample_start (3,sample_order[sh_climb_count]+3,0); - sh_climb_count++; - if (sh_climb_count == 7) sh_climb_count = 0; + sample_start (3,sample_order[state->sh_climb_count]+3,0); + state->sh_climb_count++; + if (state->sh_climb_count == 7) state->sh_climb_count = 0; } - else if (data && dkongjr_latch[7] == 1) + else if (data && state->dkongjr_latch[7] == 1) { - sample_start (3,sample_order[sh_climb_count]+8,0); - sh_climb_count++; - if (sh_climb_count == 7) sh_climb_count = 0; + sample_start (3,sample_order[state->sh_climb_count]+8,0); + state->sh_climb_count++; + if (state->sh_climb_count == 7) state->sh_climb_count = 0; } break; case 1: /* jump */ @@ -1169,46 +979,62 @@ WRITE8_HANDLER( dkongjr_snd_w1 ) sample_stop (7); sample_start (4,1,0); break; + case 3: /* Port 3 write ==> PB 5 */ + I8035_P2_W_AL(5,data & 1); + break; +#if 0 // above verified from schematics case 3: /* roar */ if (data) sample_start (7,2,0); break; +#endif case 4: /* Port 4 write */ - I8035_T_W_AL(1, data & 1); + I8035_T_W_AL(1, data & 1); break; case 5: /* Port 5 write */ - I8035_T_W_AL(0, data & 1); + I8035_T_W_AL(0, data & 1); break; + case 6: /* Port 6 write ==> PB 4 */ + I8035_P2_W_AL(4,data & 1); + break; +#if 0 // above verified from schematics case 6: /* snapjaw */ if (data) sample_stop (7); sample_start (4,11,0); break; +#endif case 7: /* walk */ //walk = data; break; } - dkongjr_latch[offset] = data; + state->dkongjr_latch[offset] = data; } } WRITE8_HANDLER( dkongjr_snd_w2 ) { - if (dkongjr_latch[offset+8] != data) + dkong_state *state = Machine->driver_data; + if (state->dkongjr_latch[offset+8] != data) { switch (offset) { + case 0: + dkong_audio_irq_w(0, data & 1); + break; +#if 0 // above verified from schematics case 0: /* death */ if (data) sample_stop (7); sample_start (6, 6, 0); break; +#endif case 1: /* drop */ if (data) sample_start (7, 7, 0); break; } - dkongjr_latch[offset+8] = data; + state->dkongjr_latch[offset+8] = data; } } @@ -1233,11 +1059,19 @@ static ADDRESS_MAP_START( dkong_sound_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) ADDRESS_MAP_END +static ADDRESS_MAP_START( dkongjr_sound_io_map, ADDRESS_SPACE_IO, 8 ) + AM_RANGE(0x00, 0xff) AM_READ(dkongjr_sh_tune_r) + AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w) + AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w) + AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) + AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) +ADDRESS_MAP_END + static ADDRESS_MAP_START( radarsc1_sound_io_map, ADDRESS_SPACE_IO, 8 ) - AM_RANGE(0x00, 0xff) AM_READ(radarsc1_sh_tune_r) + AM_RANGE(0x00, 0xff) AM_READ(soundlatch_r) AM_RANGE(0x00, 0xff) AM_WRITE(dkong_sh_p1_w) // DAC here - AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(radarsc1_sh_p1_r, radarsc1_sh_p1_w) - AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, radarsc1_sh_p2_w) + AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(radarsc1_sh_p1_r, M58817_command_w) + AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w) AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r) AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r) ADDRESS_MAP_END @@ -1265,7 +1099,7 @@ ADDRESS_MAP_END * *************************************/ -static const char *const dkongjr_sample_names[] = +static const char *dkongjr_sample_names[] = { "*dkongjr", "jump.wav", @@ -1283,13 +1117,14 @@ static const char *const dkongjr_sample_names[] = 0 /* end of array */ }; -static const struct Samplesinterface dkongjr_samples_interface = +static struct Samplesinterface dkongjr_samples_interface = { 8, /* 8 channels */ dkongjr_sample_names }; -static const char *const radarsc1_sample_names[] = +#if !RADARSC1_USE_M58817 +static const char *radarsc1_sample_names[] = { "*radarsc1", "10.wav", @@ -1304,14 +1139,25 @@ static const char *const radarsc1_sample_names[] = 0 /* end of array */ }; -static const struct Samplesinterface radarsc1_samples_interface = +static struct Samplesinterface radarsc1_samples_interface = { 8, /* 8 channels */ radarsc1_sample_names }; +#endif -static const struct NESinterface nes_interface_1 = { REGION_CPU2 }; -static const struct NESinterface nes_interface_2 = { REGION_CPU3 }; +static struct NESinterface nes_interface_1 = { REGION_CPU2 }; +static struct NESinterface nes_interface_2 = { REGION_CPU3 }; + +static struct M58817interface m58817_interface = +{ +#if !RADARSC1_USE_M58817 + -1, +#else + REGION_SOUND1, /* Sample Rom */ +#endif + { 0x0000, 0x007a, 0x018b, 0x0320, 0x036c, 0x03c4, 0x041c, 0x0520, 0x063e } /* sample address map */ +}; /************************************* * @@ -1352,22 +1198,27 @@ MACHINE_DRIVER_START( radarsc1_audio ) MDRV_CPU_IO_MAP(radarsc1_sound_io_map, 0) MDRV_SOUND_START(radarsc1) - MDRV_SOUND_RESET(radarsc1) + MDRV_SOUND_ADD(M58817, 640000) + MDRV_SOUND_CONFIG(m58817_interface) + MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.7) + +#if !RADARSC1_USE_M58817 MDRV_SOUND_ADD(SAMPLES, 0) MDRV_SOUND_CONFIG(radarsc1_samples_interface) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 3.0) +#endif MACHINE_DRIVER_END MACHINE_DRIVER_START( dkongjr_audio ) - MDRV_CPU_ADD(I8035,I8035_CLOCK) + MDRV_CPU_ADD_TAG("sound", I8035,I8035_CLOCK) MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0) - MDRV_CPU_IO_MAP(dkong_sound_io_map, 0) + MDRV_CPU_IO_MAP(dkongjr_sound_io_map, 0) MDRV_SOUND_START(dkongjr) - MDRV_SOUND_RESET(dkong) + MDRV_SOUND_RESET(dkongjr) MDRV_SPEAKER_STANDARD_MONO("mono") MDRV_SOUND_ADD(DAC, 0) diff --git a/src/mame/audio/snes.c b/src/mame/audio/snes.c index 6f3c43b0a13..d3683e2d732 100644 --- a/src/mame/audio/snes.c +++ b/src/mame/audio/snes.c @@ -149,10 +149,10 @@ static int echo_ptr; static const int TS_CYC = CPU_RATE / SAMP_FREQ; /* Ptrs to Gaussian table */ -static const int * G1 = &gauss[ 256 ]; -static const int * G2 = &gauss[ 512 ]; -static const int * G3 = &gauss[ 255 ]; -static const int * G4 = &gauss[ -1 ]; +static const int *const G1 = &gauss[ 256 ]; +static const int *const G2 = &gauss[ 512 ]; +static const int *const G3 = &gauss[ 255 ]; +static const int *const G4 = &gauss[ -1 ]; static const int mask = 0xFF; diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c index 5699277c9d8..8a9901e682f 100644 --- a/src/mame/drivers/cave.c +++ b/src/mame/drivers/cave.c @@ -1488,7 +1488,7 @@ ADDRESS_MAP_END /* Most games use this */ static INPUT_PORTS_START( cave ) - PORT_START // IN0 - Player 1 + PORT_START_TAG("IN0") // IN0 - Player 1 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) @@ -1507,7 +1507,7 @@ static INPUT_PORTS_START( cave ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START // IN1 - Player 2 + PORT_START_TAG("IN1") // IN1 - Player 2 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) @@ -1529,14 +1529,9 @@ INPUT_PORTS_END /* Gaia Crusaders, no EEPROM. Has DIPS */ static INPUT_PORTS_START( gaia ) - PORT_START // IN0 - Player 1 + 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_INCLUDE( cave ) + + PORT_MODIFY("IN0") // IN0 - Player 1 + 2 PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) @@ -1548,7 +1543,7 @@ static INPUT_PORTS_START( gaia ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_START // IN1 - Coins + PORT_MODIFY("IN1") // IN1 - Coins PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(6) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(6) PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_LOW ) @@ -1560,12 +1555,7 @@ static INPUT_PORTS_START( gaia ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START_TAG("DSW1") // Dips bank 1 PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1") @@ -1626,7 +1616,7 @@ static INPUT_PORTS_START( gaia ) INPUT_PORTS_END static INPUT_PORTS_START( theroes ) - PORT_INCLUDE(gaia) + PORT_INCLUDE( gaia ) PORT_MODIFY("DSW1") PORT_DIPNAME( 0x04, 0x00, DEF_STR( Language ) ) PORT_DIPLOCATION("SW1:3") @@ -1652,45 +1642,9 @@ INPUT_PORTS_END /* Mazinger Z (has region stored in Eeprom) */ static INPUT_PORTS_START( mazinger ) - PORT_START // IN0 - Player 1 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + PORT_INCLUDE( cave ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(6) - PORT_SERVICE_NO_TOGGLE(0x0200, IP_ACTIVE_LOW ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // sw? exit service mode - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) // sw? enter & exit service mode - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START // IN1 - Player 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(6) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) // eeprom bit - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START // Eeprom Region + PORT_START_TAG("EEPROM") // Eeprom Region PORT_DIPNAME( 0xff, 0x31, DEF_STR( Region ) ) PORT_DIPSETTING( 0x30, DEF_STR( Japan ) ) PORT_DIPSETTING( 0x31, DEF_STR( World ) ) @@ -1698,45 +1652,9 @@ INPUT_PORTS_END /* Sailor Moon / Air Gallet (has region stored in Eeprom) */ static INPUT_PORTS_START( sailormn ) - PORT_START // IN0 - Player 1 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + PORT_INCLUDE( cave ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(6) - PORT_SERVICE_NO_TOGGLE(0x0200, IP_ACTIVE_LOW ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // sw? exit service mode - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) // sw? enter & exit service mode - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START // IN1 - Player 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(6) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) // eeprom bit - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START // Eeprom Region + PORT_START_TAG("EEPROM") // Eeprom Region PORT_DIPNAME( 0xff, 0x02, DEF_STR( Region ) ) PORT_DIPSETTING( 0x00, DEF_STR( Japan ) ) PORT_DIPSETTING( 0x01, DEF_STR( USA ) ) @@ -1746,9 +1664,20 @@ static INPUT_PORTS_START( sailormn ) PORT_DIPSETTING( 0x05, "Korea" ) INPUT_PORTS_END +/* Normal layout but with 4 buttons */ +static INPUT_PORTS_START( metmqstr ) + PORT_INCLUDE( cave ) + + PORT_MODIFY("IN0") // IN0 - Player 1 + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) + + PORT_MODIFY("IN0") // IN1 - Player 2 + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) +INPUT_PORTS_END + /* Different layout */ static INPUT_PORTS_START( guwange ) - PORT_START // IN0 - Player 1 & 2 + PORT_START_TAG("IN0") // IN0 - Player 1 & 2 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) @@ -1767,7 +1696,7 @@ static INPUT_PORTS_START( guwange ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_START // IN1 - Coins + PORT_START_TAG("IN1") // IN1 - Coins PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(6) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(6) PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_LOW ) @@ -1787,50 +1716,9 @@ static INPUT_PORTS_START( guwange ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END -/* Normal layout but with 4 buttons */ -static INPUT_PORTS_START( metmqstr ) - PORT_START // IN0 - Player 1 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(6) - PORT_SERVICE_NO_TOGGLE(0x0200, IP_ACTIVE_LOW ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) // sw? enter & exit service mode - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START // IN1 - Player 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(6) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) // eeprom bit - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) -INPUT_PORTS_END - static INPUT_PORTS_START( korokoro ) - PORT_START // IN0 + PORT_START_TAG("IN0") // IN0 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) // bit 0x0010 of leds (coin) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10) // bit 0x0020 of leds (does coin sound) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(10) // bit 0x0080 of leds @@ -1849,7 +1737,7 @@ static INPUT_PORTS_START( korokoro ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1) // service coin PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) // motor / hopper status ??? - PORT_START // IN1 + PORT_START_TAG("IN1") // IN1 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -4480,32 +4368,32 @@ static DRIVER_INIT( korokoro ) ***************************************************************************/ -GAME( 1994, pwrinst2, 0, pwrinst2, metmqstr, pwrinst2, ROT0, "Atlus/Cave", "Power Instinct 2 (USA)" , 0 ) /* 94.04.08 */ -GAME( 1994, pwrins2j, pwrinst2, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Gouketsuji Ichizoku 2 (Japan)" , 0 ) /* 94.04.08 */ -GAME( 1994, mazinger, 0, mazinger, mazinger, mazinger, ROT90, "Banpresto/Dynamic Pl. Toei Animation", "Mazinger Z" , 0 ) // region in eeprom -GAME( 1995, donpachi, 0, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (US)" , 0 ) -GAME( 1995, donpacjp, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Japan)" , 0 ) -GAME( 1995, donpackr, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Korea)" , 0 ) -GAME( 1995, donpachk, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Hong Kong)" , 0 ) -GAME( 1995, metmqstr, 0, metmqstr, metmqstr, metmqstr, ROT0, "Banpresto/Pandorabox", "Metamoqester" , 0 ) -GAME( 1995, nmaster, metmqstr, metmqstr, metmqstr, metmqstr, ROT0, "Banpresto/Pandorabox", "Oni - The Ninja Master (Japan)" , 0 ) -GAME( 1995, plegends, 0, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Power Instinct Legends (USA)" , 0 ) /* 95.06.20 */ -GAME( 1995, plegendj, plegends, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Gouketsuji Ichizoku Saikyou Densetsu (Japan)", 0 ) /* 95.06.20 */ -GAME( 1995, sailormn, 0, sailormn, sailormn, sailormn, ROT0, "Banpresto", "Pretty Soldier Sailor Moon (95/03/22B)" , 0 ) // region in eeprom -GAME( 1995, sailormo, sailormn, sailormn, sailormn, sailormn, ROT0, "Banpresto", "Pretty Soldier Sailor Moon (95/03/22)" , 0 ) // region in eeprom -GAME( 1996, agallet, 0, sailormn, sailormn, agallet, ROT270, "Banpresto / Gazelle", "Air Gallet" , 0 ) // board was taiwan, region in eeprom -GAME( 1996, hotdogst, 0, hotdogst, cave, hotdogst, ROT90, "Marble", "Hotdog Storm" , 0 ) -GAME( 1997, ddonpach, 0, ddonpach, cave, ddonpach, ROT270, "Atlus/Cave", "DoDonPachi (International)" , 0 ) -GAME( 1997, ddonpchj, ddonpach, ddonpach, cave, ddonpach, ROT270, "Atlus/Cave", "DoDonPachi (Japan)" , 0 ) -GAME( 1998, dfeveron, 0, dfeveron, cave, dfeveron, ROT270, "Cave (Nihon System license)", "Dangun Feveron (Japan)" , 0 ) -GAME( 1998, feversos, dfeveron, dfeveron, cave, feversos, ROT270, "Cave (Nihon System license)", "Fever SOS (International)" , 0 ) -GAME( 1998, esprade, 0, esprade, cave, esprade, ROT270, "Atlus/Cave", "ESP Ra.De. (International Ver 1998 4/22)", 0 ) -GAME( 1998, espradej, esprade, esprade, cave, esprade, ROT270, "Atlus/Cave", "ESP Ra.De. (Japan Ver 1998 4/21)" , 0 ) -GAME( 1998, espradeo, esprade, esprade, cave, esprade, ROT270, "Atlus/Cave", "ESP Ra.De. (Japan Ver 1998 4/14)" , 0 ) -GAME( 1998, uopoko, 0, uopoko, cave, uopoko, ROT0, "Cave (Jaleco license)", "Puzzle Uo Poko (International)" , 0 ) -GAME( 1998, uopokoj, uopoko, uopoko, cave, uopoko, ROT0, "Cave (Jaleco license)", "Puzzle Uo Poko (Japan)" , 0 ) -GAME( 1999, guwange, 0, guwange, guwange, guwange, ROT270, "Atlus/Cave", "Guwange (Japan)" , 0 ) -GAME( 1999, gaia, 0, gaia, gaia, gaia, ROT0, "Noise Factory", "Gaia Crusaders", GAME_IMPERFECT_SOUND ) // cuts out occasionally -GAME( 2001, theroes, 0, gaia, theroes, gaia, ROT0, "Primetek Investments", "Thunder Heroes", GAME_IMPERFECT_SOUND ) // cuts out occasionally +GAME( 1994, pwrinst2, 0, pwrinst2, metmqstr, pwrinst2, ROT0, "Atlus/Cave", "Power Instinct 2 (US, Ver. 94/04/08)" , 0 ) +GAME( 1994, pwrins2j, pwrinst2, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Gouketsuji Ichizoku 2 (Japan, Ver. 94/04/08)" , 0 ) +GAME( 1994, mazinger, 0, mazinger, mazinger, mazinger, ROT90, "Banpresto/Dynamic Pl. Toei Animation", "Mazinger Z (International/Japan)" , 0 ) // region in eeprom +GAME( 1995, donpachi, 0, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (US)" , 0 ) +GAME( 1995, donpacjp, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Japan)" , 0 ) +GAME( 1995, donpackr, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Korea)" , 0 ) +GAME( 1995, donpachk, donpachi, donpachi, cave, donpachi, ROT270, "Atlus/Cave", "DonPachi (Hong Kong)" , 0 ) +GAME( 1995, metmqstr, 0, metmqstr, metmqstr, metmqstr, ROT0, "Banpresto/Pandorabox", "Metamoqester (International)" , 0 ) +GAME( 1995, nmaster, metmqstr, metmqstr, metmqstr, metmqstr, ROT0, "Banpresto/Pandorabox", "Oni - The Ninja Master (Japan)" , 0 ) +GAME( 1995, plegends, 0, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Power Instinct Legends (US, Ver. 95/06/20)" , 0 ) +GAME( 1995, plegendj, plegends, pwrinst2, metmqstr, pwrins2j, ROT0, "Atlus/Cave", "Gouketsuji Ichizoku Saikyou Densetsu (Japan, Ver. 95/06/20)", 0 ) +GAME( 1995, sailormn, 0, sailormn, sailormn, sailormn, ROT0, "Banpresto", "Pretty Soldier Sailor Moon (JUEHTK, Ver. 95/03/22B)" , 0 ) // region in eeprom +GAME( 1995, sailormo, sailormn, sailormn, sailormn, sailormn, ROT0, "Banpresto", "Pretty Soldier Sailor Moon (JUEHTK, Ver. 95/03/22)" , 0 ) // region in eeprom +GAME( 1996, agallet, 0, sailormn, sailormn, agallet, ROT270, "Banpresto / Gazelle", "Air Gallet (JUEHTK)" , 0 ) // board was taiwan, region in eeprom +GAME( 1996, hotdogst, 0, hotdogst, cave, hotdogst, ROT90, "Marble", "Hotdog Storm (International)" , 0 ) +GAME( 1997, ddonpach, 0, ddonpach, cave, ddonpach, ROT270, "Atlus/Cave", "DoDonPachi (International, Master Ver. 97/02/05)" , 0 ) +GAME( 1997, ddonpchj, ddonpach, ddonpach, cave, ddonpach, ROT270, "Atlus/Cave", "DoDonPachi (Japan, Master Ver. 97/02/05)" , 0 ) +GAME( 1998, dfeveron, feversos, dfeveron, cave, dfeveron, ROT270, "Cave (Nihon System license)", "Dangun Feveron (Japan, Ver. 98/09/17)" , 0 ) +GAME( 1998, feversos, 0, dfeveron, cave, feversos, ROT270, "Cave (Nihon System license)", "Fever SOS (International, Ver. 98/09/25)" , 0 ) +GAME( 1998, esprade, 0, esprade, cave, esprade, ROT270, "Atlus/Cave", "ESP Ra.De. (International, Ver. 98/04/22)" , 0 ) +GAME( 1998, espradej, esprade, esprade, cave, esprade, ROT270, "Atlus/Cave", "ESP Ra.De. (Japan, Ver. 98/04/21)" , 0 ) +GAME( 1998, espradeo, esprade, esprade, cave, esprade, ROT270, "Atlus/Cave", "ESP Ra.De. (Japan, Ver. 98/04/14)" , 0 ) +GAME( 1998, uopoko, 0, uopoko, cave, uopoko, ROT0, "Cave (Jaleco license)", "Puzzle Uo Poko (International)" , 0 ) +GAME( 1998, uopokoj, uopoko, uopoko, cave, uopoko, ROT0, "Cave (Jaleco license)", "Puzzle Uo Poko (Japan)" , 0 ) +GAME( 1999, guwange, 0, guwange, guwange, guwange, ROT270, "Atlus/Cave", "Guwange (Japan, Master Ver. 99/06/24)" , 0 ) +GAME( 1999, gaia, 0, gaia, gaia, gaia, ROT0, "Noise Factory", "Gaia Crusaders", GAME_IMPERFECT_SOUND ) // cuts out occasionally +GAME( 2001, theroes, 0, gaia, theroes, gaia, ROT0, "Primetek Investments", "Thunder Heroes", GAME_IMPERFECT_SOUND ) // cuts out occasionally -GAME( 1999, korokoro, 0, korokoro, korokoro, korokoro, ROT0, "Takumi", "Koro Koro Quest (Japan)" , 0 ) +GAME( 1999, korokoro, 0, korokoro, korokoro, korokoro, ROT0, "Takumi", "Koro Koro Quest (Japan)" , 0 ) diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 097f79ca1c1..5239cbafb2d 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -9,9 +9,9 @@ TODO: Clarify - 8ballact: read 1507 no mapped - drakton - add dkongjr conversion +- dkong3 dma (Z80 dma) - implement 74LS259 (8bit addressable latches), 74LS175 (QUAD D FlipFlop), 74LS373 (Octal transparent latch) - Done: - when i am retired: implement 8257 DMA controller - radarscp_grid_color_w() is wrong, it probably isn't supposed to change @@ -54,6 +54,40 @@ Done: Schematics show, that these boards actually were based on TRS-02 - TKG-4 is a 2 board set. + Couriersud: 12/2007 + + - changed dkong/radarscp based games to use hardware-conformant I8035 memory maps + - Added drakton clone drktnjr on dkongjr hardware + - wrote M58817 sound driver and hooked it up + Uses tms5110 speech synthesis. LPC format is identical, however coefficients + seem to be different. Until coefficients are known, samples are used. + - moved address remapping proms to REGION_USER1 (hunchbkd & co) + - Service now adds credit + - Hooked up coin_counters + - remove GAME_NOT_WORKING GAME_WRONG_COLORS from hunchbkd + - fixed shootgal0121u4red + - dkongjr: mapped more interface lines between sound board and cpu board + - tagged all inputs, all reads use tag names + - moved more static vars into dkong_state + + General notes + + The dma8257 is responsible for copying sprite data from 0x6900 (or where ever it is located) to 0x7400 (sprite banks). + 2650 based games had a rom for address lookups. This is needed for proper operation of the 8257 code. + Where this was missing, I copied the entry from hunchbkd and marked it as BAD_DUMP. + Additional protection was done by pals. The only driver with a PAL entry is herbiedk. + I added NO_DUMP entries for the other 2650 games. + + Thanks to Mike I was able to closer analyze TKG02/03/04 schematics. The radar scope to donkey kong conversions done + should lead to the same discrete sound as TKG04 (2 board boards). However the colours are different. + Red girders are back. Until the release of TKG04, the 2 board release, schematics were largely identical with radar scope. + There were slight modifications from release to release in the analog video logic. Already at TKG2-02(03) the + darlington amplifier for the blue channel was replaced with a emitter one by leaving away (OMIT in schematics) + a resistor and transistor. Later on, TKG3-06, 4066 switches and background generation circuits for radarscope were removed. + I have added a driver configuration switch to switch between TKG4 and TKG2-01 (radarscope) palettes. + At a later stage, a TKG2-02 will be added as well. + + Donkey Kong and Donkey Kong Jr. memory map (preliminary) (DKong 3 follows) 0000-3fff ROM (Donkey Kong Jr.and Donkey Kong 3: 0000-5fff) @@ -290,7 +324,7 @@ static MACHINE_START( dkong2b ) static MACHINE_START( hunchbkd ) { - UINT8 *p = memory_region(REGION_PROMS); + UINT8 *p = memory_region(REGION_USER1); int i; dkong_state *state = Machine->driver_data; @@ -301,7 +335,7 @@ static MACHINE_START( hunchbkd ) for (i=0;i<0x200;i++) state->rev_map[i] = -1; for (i=0;i<0x200;i++) - state->rev_map[p[0x300+i]] = i; + state->rev_map[p[0x0000+i]] = i; state_save_register_global(state->hunchloopback); @@ -438,6 +472,11 @@ static void p8257_ctl_w(UINT8 data) * *************************************/ +static WRITE8_HANDLER( dkong3_coin_counter_w ) +{ + coin_counter_w(offset, data & 0x01); +} + static WRITE8_HANDLER( p8257_drq_w ) { dma8257_drq_write(0, 0, data & 0x01); @@ -446,7 +485,13 @@ static WRITE8_HANDLER( p8257_drq_w ) static READ8_HANDLER( dkong_in2_r ) { - return (readinputportbytag("IN2") & 0xBF) | (dkong_audio_status_r(0) << 6); + UINT8 r; + + r = (readinputportbytag("IN2") & 0xBF) | (dkong_audio_status_r(0) << 6); + coin_counter_w(offset, r >> 7); + if (r & 0x10) + r = (r & ~0x10) | 0x80; /* service ==> coint */ + return r; } static READ8_HANDLER( hunchbkd_mirror_r ) @@ -574,13 +619,6 @@ static WRITE8_HANDLER( dkong3_2a03_reset_w ) } } -/************************************* - * - * NVRAM handling - * - *************************************/ - - /************************************* * @@ -591,19 +629,19 @@ static WRITE8_HANDLER( dkong3_2a03_reset_w ) static ADDRESS_MAP_START( dkong_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x6000, 0x6bff) AM_RAM - AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ + AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) - AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ - AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */ - AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w) /* IN1 */ - AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ - AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* Sound signals */ - AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_audio_irq_w) /* DSW1 */ + AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ + AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_WRITE(dkong_sh_tuneselect_w) /* IN0, sound CPU intf */ + AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(radarscp_grid_color_w) /* IN1 */ + AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2 */ + AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* Sound signals */ + AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w) /* DSW0 */ AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w) AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) - AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ + AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) - AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ + AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) ADDRESS_MAP_END @@ -614,19 +652,21 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( hunchbkd_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x0fff) AM_ROM - AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* 0x7000 */ - AM_RANGE(0x1400, 0x1400) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) - AM_RANGE(0x1480, 0x1480) AM_READ(input_port_1_r) - AM_RANGE(0x1500, 0x1500) AM_READ(input_port_2_r) /* IN2/DSW2 */ - AM_RANGE(0x1580, 0x1580) AM_READWRITE(input_port_3_r, dkong_audio_irq_w) /* DSW1 */ + AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* 0x7000 */ + AM_RANGE(0x1400, 0x1400) AM_READ_PORT("IN0") AM_WRITE(dkong_sh_tuneselect_w) + AM_RANGE(0x1480, 0x1480) AM_READ_PORT("IN1") + AM_RANGE(0x1500, 0x1500) AM_READ(dkong_in2_r) /* IN2 */ + AM_RANGE(0x1500, 0x1507) AM_WRITE(dkong_snd_disc_w) /* Sound signals */ + AM_RANGE(0x1580, 0x1580) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w) /* DSW0 */ AM_RANGE(0x1582, 0x1582) AM_WRITE(dkong_flipscreen_w) - AM_RANGE(0x1584, 0x1584) AM_NOP /* Possibly still interupt enable */ - AM_RANGE(0x1585, 0x1585) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ + AM_RANGE(0x1583, 0x1583) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ + AM_RANGE(0x1584, 0x1584) AM_NOP /* Possibly still interupt enable */ + AM_RANGE(0x1585, 0x1585) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ AM_RANGE(0x1586, 0x1587) AM_WRITE(dkong_palettebank_w) - AM_RANGE(0x1600, 0x17ff) AM_RAM /* 0x6400 spriteram location */ + AM_RANGE(0x1600, 0x17ff) AM_RAM /* 0x6400 spriteram location */ AM_RANGE(0x1800, 0x1bff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) /* 0x7400 */ - AM_RANGE(0x1C00, 0x1f7f) AM_RAM /* 0x6000 */ - AM_RANGE(0x1f80, 0x1f8f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ + AM_RANGE(0x1C00, 0x1f7f) AM_RAM /* 0x6000 */ + AM_RANGE(0x1f80, 0x1f8f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ /* 0x6800 not remapped */ AM_RANGE(0x2000, 0x2fff) AM_ROM AM_RANGE(0x3000, 0x3fff) AM_READWRITE(hunchbkd_mirror_r, hunchbkd_mirror_w) @@ -639,31 +679,31 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( hunchbkd_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ(hunchbkd_port0_r) AM_RANGE(0x01, 0x01) AM_READ(hunchbkd_port1_r) - AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_4_r) + AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) ADDRESS_MAP_END static ADDRESS_MAP_START( herbiedk_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x01, 0x01) AM_READ(herbiedk_port1_r) - AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_4_r) + AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) ADDRESS_MAP_END static ADDRESS_MAP_START( spclforc_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ(spclforc_port0_r) - AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_4_r) + AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) ADDRESS_MAP_END static ADDRESS_MAP_START( eightact_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x01, 0x01) AM_READ(eightact_port1_r) - AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_4_r) + AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT)AM_READ_PORT("SENSE") AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) ADDRESS_MAP_END static ADDRESS_MAP_START( shootgal_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE(0x00, 0x00) AM_READ(shootgal_port0_r) - AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_4_r) + AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(hunchbkd_data_w) ADDRESS_MAP_END @@ -674,16 +714,18 @@ static ADDRESS_MAP_START( dkong3_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */ AM_RANGE(0x6d00, 0x6fff) AM_RAM /* ???? */ AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) - AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, soundlatch_w) - AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, soundlatch2_w) - AM_RANGE(0x7d00, 0x7d00) AM_READWRITE(input_port_2_r, soundlatch3_w) - AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong3_2a03_reset_w) + AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_WRITE(soundlatch_w) + AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(soundlatch2_w) + AM_RANGE(0x7d00, 0x7d00) AM_READ_PORT("DSW0") AM_WRITE(soundlatch3_w) + AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW1") AM_WRITE(dkong3_2a03_reset_w) + AM_RANGE(0x7e80, 0x7e80) AM_WRITE(dkong3_coin_counter_w) AM_RANGE(0x7e81, 0x7e81) AM_WRITE(dkong3_gfxbank_w) AM_RANGE(0x7e82, 0x7e82) AM_WRITE(dkong_flipscreen_w) + AM_RANGE(0x7e83, 0x7e83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w) AM_RANGE(0x7e85, 0x7e85) AM_NOP /* ==> DMA Chip */ AM_RANGE(0x7e86, 0x7e87) AM_WRITE(dkong_palettebank_w) - AM_RANGE(0x8000, 0x9fff) AM_ROM /* DK3 and bootleg DKjr only */ + AM_RANGE(0x8000, 0x9fff) AM_ROM /* DK3 and bootleg DKjr only */ ADDRESS_MAP_END static ADDRESS_MAP_START( dkong3_io_map, ADDRESS_SPACE_IO, 8 ) @@ -694,25 +736,25 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( dkongjr_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x6bff) AM_RAM - AM_RANGE(0x6c00, 0x6fff) AM_RAM /* DK3 bootleg only */ + AM_RANGE(0x6c00, 0x6fff) AM_RAM /* DK3 bootleg only */ AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */ AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */ - AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkongjr_sh_tuneselect_w) - AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, dkongjr_gfxbank_w) + AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_WRITE(dkongjr_sh_tuneselect_w) + AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(dkongjr_gfxbank_w) AM_RANGE(0x7c81, 0x7c81) AM_WRITE(dkongjr_sh_test6_w) - AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */ - AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkongjr_snd_w1) /* Sound addrs */ - AM_RANGE(0x7d80, 0x7d80) AM_READ(input_port_3_r) /* DSW1 */ - AM_RANGE(0x7d80, 0x7d81) AM_WRITE(dkongjr_snd_w2) /* Sound addrs */ + AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2 */ + AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") /* DSW0 */ + AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkongjr_snd_w1) /* Sound addrs */ + AM_RANGE(0x7d80, 0x7d81) AM_WRITE(dkongjr_snd_w2) /* Sound addrs */ AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w) AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */ AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w) AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */ AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w) - AM_RANGE(0x8000, 0x9fff) AM_ROM /* bootleg DKjr only */ - AM_RANGE(0xb000, 0xbfff) AM_ROM /* pestplce only */ - AM_RANGE(0xd000, 0xdfff) AM_ROM /* DK3 bootleg only */ + AM_RANGE(0x8000, 0x9fff) AM_ROM /* bootleg DKjr only */ + AM_RANGE(0xb000, 0xbfff) AM_ROM /* pestplce only */ + AM_RANGE(0xd000, 0xdfff) AM_ROM /* DK3 bootleg only */ ADDRESS_MAP_END @@ -800,15 +842,14 @@ static INPUT_PORTS_START( dkong_in2 ) * It should be a IPT_UNKNOWN. In fact, it will reset the game. */ PORT_START_TAG("IN2") /* IN2 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME(DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics */ - /* This may freeze or reset dkong */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics - reset */ + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics - freeze or reset */ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE ) /* not connected - held to high - used as service */ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) INPUT_PORTS_END static INPUT_PORTS_START( dkong_dsw0 ) @@ -860,18 +901,8 @@ INPUT_PORTS_END static INPUT_PORTS_START( radarscp ) PORT_INCLUDE( radarscp_in0_2 ) PORT_INCLUDE( radarscp_in1_2 ) - /* Bit 0x80 is (SERVICE OR COIN) ! - * Bit 0x01 is going to the connector and is labeled test switch - * It should be a IPT_UNUSED. In fact, it will reset the game. - */ + PORT_INCLUDE( dkong_in2 ) - PORT_MODIFY("IN2") - PORT_DIPNAME( 0x10, 0x10, "TP3" ) - PORT_DIPSETTING( 0x00, "Gnd" ) - PORT_DIPSETTING( 0x10, "Open" ) - PORT_DIPNAME( 0x20, 0x20, "TP5" ) - PORT_DIPSETTING( 0x00, "Gnd" ) - PORT_DIPSETTING( 0x20, "Open" ) PORT_INCLUDE( dkong_dsw0 ) @@ -1007,7 +1038,7 @@ static INPUT_PORTS_START( hunchbkd ) PORT_DIPSETTING( 0x08, "40000" ) PORT_DIPSETTING( 0x0c, "80000" ) - PORT_START /* Sense */ + PORT_START_TAG("SENSE") /* Sense */ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) PORT_INCLUDE( dkong_config ) @@ -1022,8 +1053,10 @@ static INPUT_PORTS_START( shootgal ) PORT_INCLUDE( dkong_in2 ) PORT_MODIFY("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1) + //PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + //PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START_TAG("DSW0") /* DSW0 */ PORT_DIPNAME( 0x01, 0x00, "1" ) @@ -1171,8 +1204,6 @@ static INPUT_PORTS_START( pestplce ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_INCLUDE( dkong_in2 ) - PORT_MODIFY("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START_TAG("DSW0") /* DSW0 */ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) @@ -1288,8 +1319,6 @@ static INPUT_PORTS_START( drakton ) PORT_INCLUDE( dkong_in1_4 ) PORT_INCLUDE( dkong_in2 ) - PORT_MODIFY("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START_TAG("DSW0") /* DSW0 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) @@ -1343,8 +1372,6 @@ static INPUT_PORTS_START( strtheat ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_INCLUDE( dkong_in2 ) - PORT_MODIFY("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_START_TAG("DSW0") /* DSW0 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) @@ -1387,59 +1414,38 @@ INPUT_PORTS_END * *************************************/ -static const gfx_layout charlayout = -{ - 8,8, /* 8*8 characters */ - RGN_FRAC(1,2), - 2, /* 2 bits per pixel */ - { RGN_FRAC(1,2), RGN_FRAC(0,2) }, /* the two bitplanes are separated */ - { 0, 1, 2, 3, 4, 5, 6, 7 }, /* pretty straightforward layout */ - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 consecutive bytes */ -}; - static const gfx_layout spritelayout = { - 16,16, /* 16*16 sprites */ - RGN_FRAC(1,4), /* 128 sprites */ - 2, /* 2 bits per pixel */ - { RGN_FRAC(1,2), RGN_FRAC(0,2) }, /* the two bitplanes are separated */ - { 0, 1, 2, 3, 4, 5, 6, 7, /* the two halves of the sprite are separated */ - RGN_FRAC(1,4)+0, RGN_FRAC(1,4)+1, RGN_FRAC(1,4)+2, RGN_FRAC(1,4)+3, RGN_FRAC(1,4)+4, RGN_FRAC(1,4)+5, RGN_FRAC(1,4)+6, RGN_FRAC(1,4)+7 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, - 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, - 16*8 /* every sprite takes 16 consecutive bytes */ + 16,16, /* 16*16 sprites */ + RGN_FRAC(1,4), /* 128 sprites */ + 2, /* 2 bits per pixel */ + { RGN_FRAC(1,2), RGN_FRAC(0,2) }, /* the two bitplanes are separated */ + { STEP8(0,1), STEP8(RGN_FRAC(1,4),1) }, /* the two halves of the sprite are separated */ + { STEP16(0,8) }, + 16*8 /* every sprite takes 16 consecutive bytes */ }; static const gfx_layout pestplce_spritelayout = { - 16,16, /* 16*16 sprites */ - 256, /* 256 sprites */ - 2, /* 2 bits per pixel */ - { 0, 256*16*16 }, /* the two bitplanes are separated */ - { 0, 1, 2, 3, 4, 5, 6, 7, /* the two halves of the sprite are separated */ - 256*16*8+0, 256*16*8+1, 256*16*8+2, 256*16*8+3, 256*16*8+4, 256*16*8+5, 256*16*8+6, 256*16*8+7 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, - 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, - 16*8 /* every sprite takes 16 consecutive bytes */ + 16,16, /* 16*16 sprites */ + RGN_FRAC(1,2), /* 256 sprites */ + 2, /* 2 bits per pixel */ + { RGN_FRAC(1,2), RGN_FRAC(0,2) }, /* the two bitplanes are separated */ + { STEP8(0,1), STEP8(RGN_FRAC(1,4),1) }, /* the two halves of the sprite are separated */ + { STEP16(0,8) }, + 16*8 /* every sprite takes 16 consecutive bytes */ }; static GFXDECODE_START( dkong ) - GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 64 ) - GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 0, 64 ) + GFXDECODE_ENTRY( REGION_GFX1, 0x0000, gfx_8x8x2_planar, 0, 64 ) + GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 0, 64 ) GFXDECODE_END static GFXDECODE_START( pestplce ) - GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 64 ) - GFXDECODE_ENTRY( REGION_GFX2, 0x0000, pestplce_spritelayout, 0, 64 ) + GFXDECODE_ENTRY( REGION_GFX1, 0x0000, gfx_8x8x2_planar, 0, 64 ) + GFXDECODE_ENTRY( REGION_GFX2, 0x0000, pestplce_spritelayout, 0, 64 ) GFXDECODE_END -/************************************* - * - * Sound interfaces - * - *************************************/ - /************************************* * @@ -1527,22 +1533,13 @@ static MACHINE_DRIVER_START( hunchbkd ) MACHINE_DRIVER_END -static MACHINE_DRIVER_START( epos ) - - MDRV_IMPORT_FROM(dkong2b) - - MDRV_CPU_MODIFY("main") - MDRV_CPU_IO_MAP(epos_readport,0) - -MACHINE_DRIVER_END - static MACHINE_DRIVER_START( dkong3 ) /* driver data */ MDRV_DRIVER_DATA(dkong_state) /* basic machine hardware */ - MDRV_CPU_ADD(Z80,8000000/2) /* 4 MHz */ + MDRV_CPU_ADD_TAG("main", Z80, 8000000/2) /* 4 MHz */ MDRV_CPU_PROGRAM_MAP(dkong3_map, 0) MDRV_CPU_IO_MAP(0, dkong3_io_map) MDRV_CPU_VBLANK_INT(nmi_line_pulse,1) @@ -1628,7 +1625,6 @@ static MACHINE_DRIVER_START( shootgal ) MDRV_CPU_IO_MAP(shootgal_io_map, 0) MACHINE_DRIVER_END - static MACHINE_DRIVER_START( dkong3b ) /* basic machine hardware */ @@ -1636,19 +1632,35 @@ static MACHINE_DRIVER_START( dkong3b ) MDRV_PALETTE_INIT(dkong3) MACHINE_DRIVER_END - static MACHINE_DRIVER_START( strtheat ) /* basic machine hardware */ - MDRV_IMPORT_FROM(epos) + MDRV_IMPORT_FROM(dkong2b) + + MDRV_CPU_MODIFY("main") + MDRV_CPU_IO_MAP(epos_readport,0) + MDRV_MACHINE_RESET(strtheat) MACHINE_DRIVER_END static MACHINE_DRIVER_START( drakton ) /* basic machine hardware */ - MDRV_IMPORT_FROM(epos) + MDRV_IMPORT_FROM(dkong2b) + + MDRV_CPU_MODIFY("main") + MDRV_CPU_IO_MAP(epos_readport,0) + MDRV_MACHINE_RESET(drakton) MACHINE_DRIVER_END +static MACHINE_DRIVER_START( drktnjr ) + /* basic machine hardware */ + MDRV_IMPORT_FROM(dkongjr) + + MDRV_CPU_MODIFY("main") + MDRV_CPU_IO_MAP(epos_readport,0) + + MDRV_MACHINE_RESET(drakton) +MACHINE_DRIVER_END /************************************* * @@ -1664,8 +1676,10 @@ ROM_START( radarscp ) ROM_LOAD( "trs2c5kc", 0x3000, 0x1000, CRC(1f0101f7) SHA1(b9f988847fdefa64dfeae06c2244215cb0d64dbe) ) /* space for diagnostic ROM */ - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "trs2s3i", 0x0000, 0x0800, CRC(78034f14) SHA1(548b44ac69f39df6687da1c0f60968009b1e0767) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) /* socket 3J is empty */ ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) @@ -1695,9 +1709,10 @@ ROM_START( radarsc1 ) ROM_LOAD( "trs01_5k", 0x3000, 0x1000, CRC(1f0101f7) SHA1(b9f988847fdefa64dfeae06c2244215cb0d64dbe) ) /* space for diagnostic ROM */ - //FIXME other drivers need to be updated - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ - ROM_LOAD( "trs015aa.bin", 0x0000, 0x0800, CRC(5166554c) SHA1(00bf501ca448929f6187598da6fdbc1ea488745a) ) + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ + ROM_LOAD( "trs015aa.bin", 0x0000, 0x0800, CRC(5166554c) SHA1(00bf501ca448929f6187598da6fdbc1ea488745a) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x0800, REGION_SOUND1, 0 ) /* speech rom */ ROM_LOAD( "trs014ha.bin", 0x0000, 0x0800, CRC(d1f1b48c) SHA1(ee5584368d2e9f7bde271f5004585b53f5ff5c3f) ) // speech rom @@ -1736,9 +1751,10 @@ ROM_START( dkong ) ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) /* space for diagnostic ROM */ - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) - ROM_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "v_5h_b.bin", 0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) ) @@ -1764,9 +1780,10 @@ ROM_START( dkongo ) ROM_LOAD( "tkg3c.5k", 0x3000, 0x1000, CRC(553b89bb) SHA1(61611df9e2748fdcd31821038dcc0e16dc933873) ) /* space for diagnostic ROM */ - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) - ROM_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "v_5h_b.bin", 0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) ) @@ -1791,9 +1808,10 @@ ROM_START( dkongjp ) ROM_LOAD( "5h.cpu", 0x2000, 0x1000, CRC(ff31ac89) SHA1(9626a9e6df0d1b0ff273dbbe986f670200f91f75) ) ROM_LOAD( "c_5k_b.bin", 0x3000, 0x1000, CRC(394d6007) SHA1(57e5ae76ef5d4a2fa9cd860b6c6be03b6d5ed5ba) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) - ROM_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "v_5h_b.bin", 0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) ) @@ -1818,9 +1836,10 @@ ROM_START( dkongjo ) ROM_LOAD( "c_5h_b.bin", 0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) ) ROM_LOAD( "c_5k_b.bin", 0x3000, 0x1000, CRC(394d6007) SHA1(57e5ae76ef5d4a2fa9cd860b6c6be03b6d5ed5ba) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) - ROM_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "v_5h_b.bin", 0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) ) @@ -1845,9 +1864,10 @@ ROM_START( dkongjo1 ) ROM_LOAD( "c_5h_b.bin", 0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) ) ROM_LOAD( "5k.bin", 0x3000, 0x1000, CRC(7961599c) SHA1(698a4c2b8d67840dca7526efb1ac0d3370a86925) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) - ROM_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "v_5h_b.bin", 0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) ) @@ -2160,8 +2180,10 @@ ROM_START( hunchbkd ) ROM_LOAD( "hb.5b", 0x4000, 0x1000, CRC(4cde80f3) SHA1(3d93d8e454b2c517971a99c5700b6e943f975a11) ) ROM_LOAD( "hb.5a", 0x6000, 0x1000, CRC(d60ef5b2) SHA1(b2b5528cb837d58ef632d7670820ad8b07e5af1b) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "hb.3h", 0x0000, 0x0800, CRC(a3c240d4) SHA1(8cb6057ca617909c73b09988ba65a1176696cb5d) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "hb.3n", 0x0000, 0x0800, CRC(443ed5ac) SHA1(febed689e03abf25452aab6eff85ea01883e929c) ) @@ -2173,11 +2195,13 @@ ROM_START( hunchbkd ) ROM_LOAD( "hb.7e", 0x1000, 0x0800, CRC(f845e8ca) SHA1(4bedbbc74a637f6d60b3b2dbf41efc7390ee9091) ) ROM_LOAD( "hb.7f", 0x1800, 0x0800, CRC(52d20fea) SHA1(e3825f75f312d1e256f78a89098e328e8f307577) ) - ROM_REGION( 0x0500, REGION_PROMS, 0 ) + ROM_REGION( 0x0300, REGION_PROMS, 0 ) ROM_LOAD( "hbprom.2e", 0x0000, 0x0100, CRC(37aab98f) SHA1(0b002ab82158854bdd4a9db05eee037711017313) ) /* palette low 4 bits (inverted) */ ROM_LOAD( "hbprom.2f", 0x0100, 0x0100, CRC(845b8dcc) SHA1(eebd0c024172e54b509f1f99d9159438d5f3a905) ) /* palette high 4 bits (inverted) */ ROM_LOAD( "hbprom.2n", 0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) ) /* character color codes on a per-column basis */ - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2190,8 +2214,10 @@ ROM_START( sbdk ) ROM_LOAD( "sb-dk.as", 0x4000, 0x1000, CRC(e6d200f3) SHA1(3787334df76e629baa9ef5362495cd3af7777358) ) ROM_LOAD( "sb-dk.5a", 0x6000, 0x1000, CRC(ca41ca56) SHA1(d862172b1cc6639d540efc140b63d1a598f75656) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "sb-dk.3h", 0x0000, 0x0800, CRC(13e60b6e) SHA1(f5dca15db0f1a225ff0116726bb055bb7b9655cc) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "sb-dk.3n", 0x0000, 0x0800, CRC(b1d76b59) SHA1(aed57ec67d80abdff1a4bfc3a713fa01c0dd15a2) ) @@ -2207,7 +2233,9 @@ ROM_START( sbdk ) ROM_LOAD( "sb.2e", 0x0000, 0x0100, CRC(4f06f789) SHA1(0b2775dd8da1c20121639871ed291a015a34e1f6) ) ROM_LOAD( "sb.2f", 0x0100, 0x0100, CRC(2c15b1b2) SHA1(7c80eb77ba47e2f4d889fc10663a0391d4329a1d) ) ROM_LOAD( "sb.2n", 0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) ) - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2220,8 +2248,10 @@ ROM_START( herbiedk ) ROM_LOAD( "5h.cpu", 0x4000, 0x1000, CRC(c0daf551) SHA1(f39058fa05ad69e839e7c0281cb1fad80cfa3134) ) ROM_LOAD( "5k.cpu", 0x6000, 0x1000, CRC(67442242) SHA1(0241281e8cc721f7fe22822f2cf168c2eed7983d) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "3i.snd", 0x0000, 0x0800, CRC(20e30406) SHA1(e2b9c6b731e53651d26455c2753a6dc3d5e9d066) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "5h.vid", 0x0000, 0x0800, CRC(ea2a2547) SHA1(ec714abe43ab86ef615e1105688bf3df209c8f5f) ) @@ -2237,7 +2267,9 @@ ROM_START( herbiedk ) ROM_LOAD( "74s287.2k", 0x0000, 0x0100, CRC(7dc0a381) SHA1(7d974b2249392160e3b800e7113d4899c3600b7f) ) /* palette high 4 bits (inverted) */ ROM_LOAD( "74s287.2j", 0x0100, 0x0100, CRC(0a440c00) SHA1(e3249a646cd8aa50739e09ae101e796ea3aac37a) ) /* palette low 4 bits (inverted) */ ROM_LOAD( "74s287.vid", 0x0200, 0x0100, CRC(5a3446cc) SHA1(158de015006e6c400cb7ee758fda7ff760eb5835) ) /* character color codes on a per-column basis */ - ROM_LOAD( "82s147.hh", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.hh", 0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, CRC(d6a04bcc) SHA1(ef1ed4311869d46dec95c2bfb31875c2f022da4f) ) @@ -2255,8 +2287,10 @@ ROM_START( herodk ) ROM_CONTINUE( 0x6000, 0x0e00 ) ROM_CONTINUE( 0x2e00, 0x0200 ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "silver.3h", 0x0000, 0x0800, CRC(67863ce9) SHA1(2b78e3d32a64cdef34afc476fed7ff0ab6a0277c) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "pnk.3n", 0x0000, 0x0800, CRC(574dfd7a) SHA1(78bbe4ea83fdaec14ca92ceae03e8a3d0877d14b) ) @@ -2272,7 +2306,9 @@ ROM_START( herodk ) ROM_LOAD( "82s129.2e", 0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) ) /* palette low 4 bits (inverted) */ ROM_LOAD( "82s129.2f", 0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) ) /* palette high 4 bits (inverted) */ ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) ) /* character color codes on a per-column basis */ - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2288,8 +2324,10 @@ ROM_START( herodku ) ROM_LOAD( "2764.8f", 0x4000, 0x1000, CRC(835e0074) SHA1(187358973f595033a4745759f554a3dfd398889b) ) ROM_CONTINUE( 0x6000, 0x1000 ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(caf57bef) SHA1(60c19c65bf312b36c68631ccea5434ad8cf0f3df) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "pnk.3n", 0x0000, 0x0800, CRC(574dfd7a) SHA1(78bbe4ea83fdaec14ca92ceae03e8a3d0877d14b) ) @@ -2305,7 +2343,9 @@ ROM_START( herodku ) ROM_LOAD( "82s129.2e", 0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) ) /* palette low 4 bits (inverted) */ ROM_LOAD( "82s129.2f", 0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) ) /* palette high 4 bits (inverted) */ ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) ) /* character color codes on a per-column basis */ - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2332,7 +2372,9 @@ ROM_START( spclforc ) ROM_LOAD( "82s126.2e", 0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) ) ROM_LOAD( "82s126.2f", 0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) ) ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) ) - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2359,7 +2401,9 @@ ROM_START( spcfrcii ) ROM_LOAD( "spfc2.2e", 0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) ) ROM_LOAD( "spfc2.2f", 0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) ) ROM_LOAD( "spfc2.2n", 0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) ) - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2375,8 +2419,10 @@ ROM_START( 8ballact ) ROM_LOAD( "8b-dk.5b", 0x4000, 0x1000, CRC(f836a962) SHA1(5a45514ea59cd92092523d116b0dc4a1f8fc46b7) ) ROM_LOAD( "8b-dk.5a", 0x6000, 0x1000, CRC(d45866d4) SHA1(5dfb121aa87bc5e6efadd9412b9f8d360c3dabd3) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "8b-dk.3h", 0x0000, 0x0800, CRC(a8752c60) SHA1(0d7d35fd271d796e884a33071b83c000b91208a0) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "8b-dk.3n", 0x0000, 0x0800, CRC(44830867) SHA1(29d34792b9193edcdac427367c360d6f01e1e094) ) @@ -2392,7 +2438,9 @@ ROM_START( 8ballact ) ROM_LOAD( "8b.2e", 0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) ) ROM_LOAD( "8b.2f", 0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) ) ROM_LOAD( "8b.2n", 0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) ) - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2425,7 +2473,9 @@ ROM_START( 8ballat2 ) ROM_LOAD( "8b.2e", 0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) ) ROM_LOAD( "8b.2f", 0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) ) ROM_LOAD( "8b.2n", 0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) ) - ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */ @@ -2437,10 +2487,39 @@ ROM_START( drakton ) ROM_LOAD( "2764.u2", 0x0000, 0x2000, CRC(d9a33205) SHA1(06dc96412e7162fd8a4f6ef4d14d1510c06b1d00) ) ROM_LOAD( "2764.u3", 0x2000, 0x2000, CRC(69583a35) SHA1(061271be4e9ddfd8dff4217f1434215ad35ba505) ) + /* one is used for dkong conversions, the other one for dkongjr conversions */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ + ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */ + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0x00 ) + + ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) + ROM_LOAD( "2716.3n", 0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) ) + ROM_LOAD( "2716.3p", 0x0800, 0x0800, CRC(46f51b68) SHA1(7d1c3a61cdd0ad471cb0064c0cbaf758325fc267) ) + + ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_DISPOSE ) + ROM_LOAD( "2716.7c", 0x0000, 0x0800, CRC(2925dc2d) SHA1(721748031714ba488191eb074643093c906e8ce2) ) + ROM_LOAD( "2716.7d", 0x0800, 0x0800, CRC(bdf6b1b4) SHA1(ea9076a2bba909bfae8a10a92d857e8f0644fc8b) ) + ROM_LOAD( "2716.7e", 0x1000, 0x0800, CRC(4d62e62f) SHA1(01e757110edcb24600a27b1505f54e3bd04b9e58) ) + ROM_LOAD( "2716.7f", 0x1800, 0x0800, CRC(81d200e5) SHA1(5eb74f319756ba3fbc6d0d918799337f911e9419) ) + + ROM_REGION( 0x0300, REGION_PROMS, 0 ) + ROM_LOAD( "82s126.2e", 0x0000, 0x0100, CRC(3ff45f76) SHA1(4068b5568f9e22e54f0df8a9e02bfed0bfb00db7) ) + ROM_LOAD( "82s126.2f", 0x0100, 0x0100, CRC(38f905be) SHA1(a963aea9a92ac95850c90c43085376cb4e06696b) ) + ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(3c343b9b) SHA1(f84f5fddcccc8499a2511877f5d706b37ddc7db8) ) +ROM_END + +/* encrypted */ +ROM_START( drktnjr ) + ROM_REGION( 0x20000, REGION_CPU1, 0 ) /* 64k for code + 4*16k for decrypted code */ + ROM_LOAD( "2764.u2", 0x0000, 0x2000, CRC(d9a33205) SHA1(06dc96412e7162fd8a4f6ef4d14d1510c06b1d00) ) + ROM_LOAD( "2764.u3", 0x2000, 0x2000, CRC(69583a35) SHA1(061271be4e9ddfd8dff4217f1434215ad35ba505) ) + ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ /* one is used for dkong conversions, the other one for dkongjr conversions */ - ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */ - ROM_LOAD( "2716.3h1", 0x0800, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) /* dkongjr */ + ROM_LOAD( "2716.3h1", 0x0000, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) /* dkongjr */ + //ROM_RELOAD( 0x0800, 0x0800 ) + //ROM_FILL( 0x0800, 0x0800, 0xFF ) ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "2716.3n", 0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) ) @@ -2464,9 +2543,10 @@ ROM_START( strtheat ) ROM_LOAD( "2764.u2", 0x0000, 0x2000, CRC(8d3e82c3) SHA1(ec26fb1c6015721da1f61eca76a4b3390d8dcc76) ) ROM_LOAD( "2764.u3", 0x2000, 0x2000, CRC(f0759e76) SHA1(e086f02d1861269194c4cd2ada71696b48ed1a1d) ) - ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(4cd17174) SHA1(5ed9b5275b0779d1ca05d6e62d3ad8a682ebde37) ) ROM_RELOAD( 0x0800, 0x0800 ) + ROM_FILL( 0x1000, 0x0800, 0xFF ) ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "2716.3n", 0x0000, 0x0800, CRC(29e57678) SHA1(cbbb980c44c7f5c45d5f0b85209658f53b7ba4a7) ) @@ -2560,7 +2640,7 @@ ROM_START( shootgal ) ROM_LOAD( "sg-01snd", 0x0000, 0x1000, CRC(644a0728) SHA1(e249fd57bc49572a2246aaf7c68a547f319f51bc) ) //sg-01-snd ROM_LOAD( "sg-01spk", 0x1000, 0x0800, CRC(aacaf730) SHA1(cd562093ab8931d165cb0877e332474fce131c67) ) //sg-01-spk - ROM_REGION( 0x2000, REGION_USER1, 0 ) // gun proms? + ROM_REGION( 0x2000, REGION_USER2, 0 ) // gun proms? ROM_LOAD( "sg-1", 0x0000, 0x0200, CRC(fda82517) SHA1(b36bac69b6f8218b280aae59133ea0d22d7a99f6) ) ROM_LOAD( "sg-2", 0x0200, 0x091d, CRC(6e065613) SHA1(26d048af5c302f921de8e2c1bc7c7bf48dc21b5a) ) @@ -2578,6 +2658,9 @@ ROM_START( shootgal ) ROM_LOAD( "sg-01-2e", 0x0000, 0x0200, CRC(34fb23ea) SHA1(6bd6de791c9e0a5f9c833c287663e9755e01c573) ) ROM_LOAD( "sg-01-2f", 0x0100, 0x0200, CRC(c29b880a) SHA1(950017a0298f91e41db9865ed8ce388f4095f6cf) ) ROM_LOAD( "sg-01-2n", 0x0200, 0x0200, CRC(e08ed788) SHA1(6982f6bcc70dbf4c75ff538a5df70da11bc89bb4) ) + + ROM_REGION( 0x0200, REGION_USER1, 0 ) + ROM_LOAD( "82s147.prm", 0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */ ROM_END /************************************* @@ -2633,7 +2716,7 @@ GAME( 1984, dkong3b, dkong3, dkong3b, dkong3b, 0, ROT90, "bootleg", "D GAME( 1984, herbiedk, huncholy, herbiedk, herbiedk, 0, ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE ) -GAME( 1983, hunchbkd, hunchbak, hunchbkd, hunchbkd, 0, ROT90, "Century Electronics", "Hunchback (DK conversion)", GAME_WRONG_COLORS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +GAME( 1983, hunchbkd, hunchbak, hunchbkd, hunchbkd, 0, ROT90, "Century Electronics", "Hunchback (DK conversion)", GAME_SUPPORTS_SAVE ) GAME( 1984, sbdk, superbik, hunchbkd, sbdk, 0, ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE ) @@ -2650,6 +2733,6 @@ GAME( 1983, pestplce, mario, pestplce, pestplce, 0, ROT180, "bootleg", "P GAME( 1985, spclforc, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) GAME( 1985, spcfrcii, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) -//FIXME: move DRIVER_INIT here -GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton", GAME_SUPPORTS_SAVE ) +GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton (DK conversion)", GAME_SUPPORTS_SAVE ) +GAME( 1984, drktnjr, drakton, drktnjr, drakton, drakton, ROT90, "Epos Corporation", "Drakton (DKJr conversion)", GAME_SUPPORTS_SAVE ) GAME( 1985, strtheat, 0, strtheat, strtheat, strtheat, ROT90, "Epos Corporation", "Street Heat - Cardinal Amusements", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index bea9ea452e2..55c991ebee0 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -850,7 +850,13 @@ static void atapi_cause_irq(void) cpunum_set_input_line(0, INPUT_LINE_IRQ4, ASSERT_LINE); } -static void atapi_init(void) +static void atapi_exit(running_machine* machine) +{ + SCSIDeleteInstance(atapi_device_data[1]); + SCSIDeleteInstance(atapi_device_data[0]); +} + +static void atapi_init(running_machine *machine) { memset(atapi_regs, 0, sizeof(atapi_regs)); @@ -866,6 +872,7 @@ static void atapi_init(void) SCSIAllocInstance( SCSI_DEVICE_CDROM, &atapi_device_data[0], 0 ); // TODO: the slave drive can be either CD-ROM, DVD-ROM or HDD SCSIAllocInstance( SCSI_DEVICE_CDROM, &atapi_device_data[1], 1 ); + add_exit_callback(machine, atapi_exit); } static void atapi_reset(void) @@ -2244,7 +2251,7 @@ static void init_firebeat(running_machine *machine) { UINT8 *rom = memory_region(REGION_USER2); - atapi_init(); + atapi_init(machine); intelflash_init(0, FLASH_FUJITSU_29F016A, NULL); intelflash_init(1, FLASH_FUJITSU_29F016A, NULL); intelflash_init(2, FLASH_FUJITSU_29F016A, NULL); diff --git a/src/mame/drivers/gotya.c b/src/mame/drivers/gotya.c index c905f57b87a..e8e770c4ffc 100644 --- a/src/mame/drivers/gotya.c +++ b/src/mame/drivers/gotya.c @@ -9,6 +9,12 @@ TODO: Emulated sound HD38882PA06 I think HD38880 is a CPU/MCU, because the game just sends it a sound command (0-0x1a) + + couriersud: + The chips above are speech synthesis chips. HD38880 is the main chip + whereas HD38882 is an eprom interface. PARCOR based. + http://www.freepatentsonline.com/4435832.html + Datasheet lists no parcor coefficients ****************************************************************************/ diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c index c1e33a20471..a2ab3e6a333 100644 --- a/src/mame/drivers/itech32.c +++ b/src/mame/drivers/itech32.c @@ -1593,6 +1593,7 @@ static MACHINE_DRIVER_START( gt3dt ) MDRV_NVRAM_HANDLER( gt3dt ) /* Make Tournament sets load/store the Timekeeper info */ MACHINE_DRIVER_END + static MACHINE_DRIVER_START( wcbowlt ) /* basic machine hardware */ @@ -1602,6 +1603,7 @@ static MACHINE_DRIVER_START( wcbowlt ) MACHINE_DRIVER_END + /************************************* * * ROM definitions diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c index e21c3736c1c..5d56c2336ee 100644 --- a/src/mame/drivers/itech8.c +++ b/src/mame/drivers/itech8.c @@ -2628,8 +2628,6 @@ static DRIVER_INIT( slikshot ) memory_install_read8_handler (0, ADDRESS_SPACE_PROGRAM, 0x0180, 0x0180, 0, 0, slikshot_z80_r); memory_install_read8_handler (0, ADDRESS_SPACE_PROGRAM, 0x01cf, 0x01cf, 0, 0, slikshot_z80_control_r); memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x01cf, 0x01cf, 0, 0, slikshot_z80_control_w); - - slikshot_set_crosshair_range(116 - 80, 116 + 80); } @@ -2638,8 +2636,6 @@ static DRIVER_INIT( sstrike ) memory_install_read8_handler (0, ADDRESS_SPACE_PROGRAM, 0x1180, 0x1180, 0, 0, slikshot_z80_r); memory_install_read8_handler (0, ADDRESS_SPACE_PROGRAM, 0x11cf, 0x11cf, 0, 0, slikshot_z80_control_r); memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x11cf, 0x11cf, 0, 0, slikshot_z80_control_w); - - slikshot_set_crosshair_range(186 - 40, 186 + 40); } diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c index 32ee7e94f86..388135ddf40 100644 --- a/src/mame/drivers/ksys573.c +++ b/src/mame/drivers/ksys573.c @@ -876,7 +876,20 @@ static WRITE32_HANDLER( atapi_w ) } } -static void atapi_init(void) +static void atapi_exit(running_machine* machine) +{ + int i; + + for( i = 0; i < 2; i++ ) + { + if( get_disk_handle( i ) != NULL ) + { + SCSIDeleteInstance( available_cdroms[ i ] ); + } + } +} + +static void atapi_init(running_machine *machine) { int i; @@ -906,6 +919,7 @@ static void atapi_init(void) available_cdroms[ i ] = NULL; } } + add_exit_callback(machine, atapi_exit); atapi_data = auto_malloc( ATAPI_DATA_SIZE ); @@ -1477,7 +1491,7 @@ static DRIVER_INIT( konami573 ) int i; psx_driver_init(); - atapi_init(); + atapi_init(machine); psx_dma_install_read_handler(5, cdrom_dma_read); psx_dma_install_write_handler(5, cdrom_dma_write); diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c index 0ee6d1f89f6..ed45dd24f2c 100644 --- a/src/mame/drivers/midzeus.c +++ b/src/mame/drivers/midzeus.c @@ -185,7 +185,7 @@ static WRITE32_HANDLER( invasn_gun_w ) if (((old_control ^ gun_control) & pmask) != 0 && (gun_control & pmask) == 0) { const rectangle *visarea = &Machine->screen[0].visarea; - static const char *names[2][2] = + static const char *const names[2][2] = { { "GUNX1", "GUNY1" }, { "GUNX2", "GUNY2" } diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c index 507dd1dd90c..61b481029aa 100644 --- a/src/mame/drivers/namcoic.c +++ b/src/mame/drivers/namcoic.c @@ -1118,7 +1118,7 @@ void namco_roz_init( int gfxbank, int maskregion ) { int i; - static tile_get_info_callback roz_info[ROZ_TILEMAP_COUNT] = + static const tile_get_info_callback roz_info[ROZ_TILEMAP_COUNT] = { roz_get_info0, roz_get_info1 diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c index 35b2c6d08a1..87db508e5aa 100644 --- a/src/mame/drivers/neodrvr.c +++ b/src/mame/drivers/neodrvr.c @@ -309,14 +309,14 @@ INPUT_PORTS_END ROM_SYSTEM_BIOS( 7, "japan-s1", "Japan MVS (Ver. 1)" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 7, "sp1.jipan.1024",0x00000, 0x020000, CRC(9fb0abe4) SHA1(18a987ce2229df79a8cf6a84f968f0e42ce4e59d) ) /* Japan, Older */ \ -// ROM_SYSTEM_BIOS( 8, "uni-bios.10","Unibios MVS (Hack, Ver. 1.0)" ) -// ROM_LOAD16_WORD_SWAP_BIOS( 8, "uni-bios.10", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9) ) /* Universe Bios v1.0 (hack) */ -// ROM_SYSTEM_BIOS( 9, "uni-bios.11","Unibios MVS (Hack, Ver. 1.1)" ) -// ROM_LOAD16_WORD_SWAP_BIOS( 9, "uni-bios.11", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7) ) /* Universe Bios v1.1 (hack) */ -// ROM_SYSTEM_BIOS(10, "debug", "Debug MVS (Hack?)" ) -// ROM_LOAD16_WORD_SWAP_BIOS(10, "neodebug.rom", 0x00000, 0x020000, CRC(698ebb7d) SHA1(081c49aa8cc7dad5939833dc1b18338321ea0a07) ) /* Debug (Development) Bios */ -// ROM_SYSTEM_BIOS(11, "asia-aes", "Asia AES" ) -// ROM_LOAD16_WORD_SWAP_BIOS(11, "aes-bios.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07) ) /* AES Console (Asia?) Bios */ +// ROM_SYSTEM_BIOS( 8, "uni-bios","Universe Bios (Hack, Ver. 2.3)" ) +// ROM_LOAD16_WORD_SWAP_BIOS( 8, "uni-bios.rom", 0x00000, 0x020000, CRC(601720ae) SHA1(1b8a72c720cdb5ee3f1d735bbcf447b09204b8d9) ) /* Universe Bios v2.3 (hack) */ +// ROM_SYSTEM_BIOS( 9, "debug", "Debug MVS (Hack?)" ) +// ROM_LOAD16_WORD_SWAP_BIOS( 9, "neodebug.rom", 0x00000, 0x020000, CRC(698ebb7d) SHA1(081c49aa8cc7dad5939833dc1b18338321ea0a07) ) /* Debug (Development) Bios */ +// ROM_SYSTEM_BIOS(10, "asia-aes", "Asia AES" ) +// ROM_LOAD16_WORD_SWAP_BIOS(10, "neo-epo.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07) ) /* AES Console (Asia?) Bios */ +// ROM_SYSTEM_BIOS(11, "jap-aes", "Japan AES" ) +// ROM_LOAD16_WORD_SWAP_BIOS(11, "neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c) ) /* AES Console (Japan) Bios */ /* note you'll have to modify the last for lines of each block to use the extra bios roms, they're hacks / homebrew / console bios roms so MAME doesn't list them by default */ @@ -404,8 +404,103 @@ INPUT_PORTS_END ROM_LOAD( "000-lo.lo", 0x00000, 0x10000, CRC(e09e253c) SHA1(2b1c719531dac9bb503f22644e6e4236b91e7cfc) ) +/*************************************************************************** + + Neo-Geo game pcb infos: + ======================= + + The Neo-Geo games for AES (home) and MVS (arcade) systems are cartridge based. + + Each cartridge consists of two pcb's: CHA and PROG. + + CHA pcb contains gfx data ('C' - rom), text layer data ('S' - rom) and sound driver ('M' - rom). + PROG pcb contains sample data ('V' - rom) and program code ('P' - rom). + + On most pcb's various custom/protection chips can also be found: + + CHA: + . NEO-273 + . NEO-CMC + . NEO-ZMC + . NEO-ZMC2 + . PRO-CT0 + . SNK-9201 + + PROG: + . ALTERA + . NEO-COMA + . NEO-PCM2 (SNK 1999) + . NEO-PCM2 (PLAYMORE 2002) + . NEO-PVC + . NEO-SMA + . PCM + + + Known pcb's: + ============ + + MVS CHA: + . NEO-MVS CHA-8M + . NEO-MVS CHA42G + . NEO-MVS CHA42G-1 + . NEO-MVS CHA42G-2 + . NEO-MVS CHA42G-3B + . NEO-MVS CHA256 + . NEO-MVS CHA256B + . NEO-MVS PSTM CHA136 + . NEO-MVS CHA512Y + . NEO-MVS CHAFIO + + MVS PROG: + . NEO-MVS PROG8M42 + . NEO-MVS PROG16 + . NEO-MVS PROG42G + . NEO-MVS PROG42G-1 + . NEO-MVS PROGGSC + . NEO-MVS PROGTOP + . NEO-MVS PROGSF1 + . NEO-MVS PROGEOP + . NEO-MVS PROGLBA - LBA-SUB (2000.2.24) + . NEO-MVS PROGBK1 + . NEO-MVS PROGBK2 + . NEO-MVS PROGBK2R + . NEO-MVS PROGBK3R + . NEO-MVS PROGBK3S + + AES CHA: + . NEO-AEG CHA-32 + . NEO-AEG CHA42G-1 + . NEO-AEG CHA42G-3 + . NEO-AEG CHA42G-4 + . NEO-AEG CHA256 + . NEO-AEG CHA256[B] + . NEO-AEG CHA256RY + . NEO-AEG CHA512Y + . NEO-AEG CHAFIO (SNK 1999.8.10) + + AES PROG: + . NEO-AEG PROG-NAM + . NEO-AEG PROG-HERO + . NEO-AEG PROG B + . NEO-AEG PROG-4A + . NEO-AEG PROG-4B + . NEO-AEG PROG16 + . NEO-AEG PROG42G-COM + . NEO-AEG PROG42G-1 + . NEO-AEG PROG4096B + . NEO-AEG PROGGS + . NEO-AEG PROGLBA + . NEO-AEG PROGRK + . NEO-AEG PROGRKB + . NEO-AEG PROGBK1Y + . NEO-AEG PROGBK2 + . NEO-AEG PROGBK3R + + The above only covers SNK / SNK-PLAYMORE pcb's. There also exists a + wide range of 'bootleg' pcb's. + +****************************************************************************/ -/******************************************************************************/ ROM_START( nam1975 ) ROM_REGION( 0x100000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) @@ -710,18 +805,18 @@ ROM_END ROM_START( superspy ) ROM_REGION( 0x100000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD16_WORD_SWAP( "011-p1.bin", 0x000000, 0x080000, CRC(c7f944b5) SHA1(da7560e09187c68f1d9f7656218497b4464c56c9) ) - ROM_LOAD16_WORD_SWAP( "011-p2.bin", 0x080000, 0x020000, CRC(811a4faf) SHA1(8169dfaf79f52d80ecec402ce1b1ab9cafb7ebdd) ) + ROM_LOAD16_WORD_SWAP( "011-sp2.bin", 0x080000, 0x020000, CRC(811a4faf) SHA1(8169dfaf79f52d80ecec402ce1b1ab9cafb7ebdd) ) NEO_SFIX_128K( "011-s1.bin", CRC(ec5fdb96) SHA1(8003028025ac7bf531e568add6ba66c02d0b7e84) ) - NEO_BIOS_AUDIO_128K( "011-m1.bin", BAD_DUMP CRC(d59d5d12) SHA1(0692b6f35c9ee3840f945703c4eb51ab83eb0714) ) + NEO_BIOS_AUDIO_128K( "011-m1.bin", CRC(6f737b5a) SHA1(d52f7b6786b6e33f09ba0cf30889082c1dfb9336) ) - ROM_REGION( 0x200000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) + ROM_REGION( 0x180000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) ROM_LOAD( "011-v11.bin", 0x000000, 0x100000, CRC(5c674d5c) SHA1(d7b9beddeb247b584cea9ca6c43ec6869809b673) ) - ROM_LOAD( "011-v12.bin", 0x100000, 0x100000, CRC(7df8898b) SHA1(23dd6df47fa51b210af800ae551295300e125106) ) + ROM_LOAD( "011-v12.bin", 0x100000, 0x080000, CRC(9f513d5a) SHA1(37b04962f0b8e2a74abd35c407337a6151dc4e95) ) - ROM_REGION( 0x100000, NEOGEO_REGION_AUDIO_DATA_2, 0 ) - ROM_LOAD( "011-v21.bin", 0x000000, 0x100000, CRC(1ebe94c7) SHA1(c186810523a7df880cb080c62aa322bbcaefca17) ) + ROM_REGION( 0x080000, NEOGEO_REGION_AUDIO_DATA_2, 0 ) + ROM_LOAD( "011-v21.bin", 0x000000, 0x080000, CRC(426cd040) SHA1(b2b45189837c8287223c2b8bd4df9525b72a3f16) ) ROM_REGION( 0x400000, NEOGEO_REGION_SPRITES, ROMREGION_DISPOSE ) ROM_LOAD16_BYTE( "011-c1.bin", 0x000000, 0x100000, CRC(cae7be57) SHA1(43b35b349594535689c358d9f324adda55e5281a) ) /* Plane 0,1 */ @@ -924,7 +1019,7 @@ ROM_START( gpilots ) ROM_LOAD16_BYTE( "020-c4.bin", 0x200001, 0x100000, CRC(edde439b) SHA1(79be7b10ecdab54c2f77062b8f5fda0e299fa982) ) ROM_END -ROM_START( joyjoy ) +ROM_START( joyjoy ) /* MVS AND AES VERSION */ ROM_REGION( 0x100000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD16_WORD_SWAP( "021-p1.bin", 0x000000, 0x080000, CRC(39c3478f) SHA1(06ebe54c9c4e14c5c31e770013d58b7162359ecc) ) @@ -1134,7 +1229,28 @@ ROM_START( socbrawl ) NEO_SFIX_128K( "031-s1.bin", CRC(4c117174) SHA1(26e52c4f628338a9aa1c159517cdf873f738fb98) ) - NEO_BIOS_AUDIO_64K( "031-m1.bin", BAD_DUMP CRC(2f38d5d3) SHA1(0fc01750277e554978e68e7e6d596f8bd6b1e178) ) + NEO_BIOS_AUDIO_128K( "031-m1.bin", CRC(3aa4e9e1) SHA1(65e53d799a0cb55b5bc55d57773e4682a72d7c2d) ) + + ROM_REGION( 0x200000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) + ROM_LOAD( "031-v1.bin", 0x000000, 0x100000, CRC(cc78497e) SHA1(895bd647150fae9b2259ef043ed681f4c4de66ea) ) + ROM_LOAD( "031-v2.bin", 0x100000, 0x100000, CRC(dda043c6) SHA1(08165a59700ab6b1e523079dd2a3549e520cc594) ) + + NO_DELTAT_REGION + + ROM_REGION( 0x300000, NEOGEO_REGION_SPRITES, ROMREGION_DISPOSE ) + ROM_LOAD16_BYTE( "031-c1.bin", 0x000000, 0x100000, CRC(bd0a4eb8) SHA1(b67988cb3e550d083e81c9bd436da55b242785ed) ) /* Plane 0,1 */ + ROM_LOAD16_BYTE( "031-c2.bin", 0x000001, 0x100000, CRC(efde5382) SHA1(e42789c8d87ee3d4549d0a903e990c03338cbbd8) ) /* Plane 2,3 */ + ROM_LOAD16_BYTE( "031-c3.bin", 0x200000, 0x080000, CRC(580f7f33) SHA1(f4f95a7c8de00e1366a723fc4cd0e8c1905af636) ) /* Plane 0,1 */ + ROM_LOAD16_BYTE( "031-c4.bin", 0x200001, 0x080000, CRC(ed297de8) SHA1(616f8fa4c86231f3e79faf9f69f8bb909cbc35f0) ) /* Plane 2,3 */ +ROM_END + +ROM_START( socbrala ) /* MVS VERSION */ + ROM_REGION( 0x100000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) + ROM_LOAD16_WORD_SWAP( "031-pg1.bin", 0x000000, 0x080000, CRC(17f034a7) SHA1(2e66c7bd93a08efe63c4894494db50bbf58f60e4) ) + + NEO_SFIX_128K( "031-s1.bin", CRC(4c117174) SHA1(26e52c4f628338a9aa1c159517cdf873f738fb98) ) + + NEO_BIOS_AUDIO_128K( "031-m1.bin", CRC(3aa4e9e1) SHA1(65e53d799a0cb55b5bc55d57773e4682a72d7c2d) ) ROM_REGION( 0x200000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) ROM_LOAD( "031-v1.bin", 0x000000, 0x100000, CRC(cc78497e) SHA1(895bd647150fae9b2259ef043ed681f4c4de66ea) ) @@ -1213,13 +1329,13 @@ ROM_START( fatfury1 ) ROM_LOAD16_BYTE( "033-c4.bin", 0x200001, 0x100000, CRC(9397476a) SHA1(a12dbb74020aeb6ebf24ec2abbfba5129cabcb7d) ) /* Plane 2,3 */ ROM_END -ROM_START( fbfrenzy ) +ROM_START( fbfrenzy ) /* MVS AND AES VERSION */ ROM_REGION( 0x100000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD16_WORD_SWAP( "034-p1.bin", 0x000000, 0x080000, CRC(cdef6b19) SHA1(97482db0dffc6d625fb41fa38449c0a74d741a72) ) NEO_SFIX_128K( "034-s1.bin", CRC(8472ed44) SHA1(42e1a9671dddd090d2a634cff986f6c73ba08b70) ) - NEO_BIOS_AUDIO_128K( "034-m1.bin", BAD_DUMP CRC(f41b16b8) SHA1(f3e1cfc4cd2c5baece176f169906aa796367d303) ) + NEO_BIOS_AUDIO_128K( "034-m1.bin", CRC(f41b16b8) SHA1(f3e1cfc4cd2c5baece176f169906aa796367d303) ) ROM_REGION( 0x200000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) ROM_LOAD( "034-v1.bin", 0x000000, 0x100000, CRC(50c9d0dd) SHA1(2b3f2875b00e5f307d274128bd73c1521a7d901b) ) @@ -1582,6 +1698,7 @@ ROM_START( androdun ) ROM_REGION( 0x100000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) ROM_LOAD( "049-v1.bin", 0x000000, 0x080000, CRC(577c85b3) SHA1(2c3072401fe73497dca0e9009ae2ba4053fe936d) ) ROM_LOAD( "049-v2.bin", 0x080000, 0x080000, CRC(e14551c4) SHA1(763a9912b9df55defb190af3f29ae034f6dd78d6) ) + /* The MVS version has only v1 rom, size 8mbit. */ NO_DELTAT_REGION @@ -1912,7 +2029,7 @@ ROM_START( fightfev ) ROM_LOAD16_WORD_SWAP( "060-p1.bin", 0x000000, 0x080000, CRC(3032041b) SHA1(4b8ed2e6f74579ea35a53e06ccac42d6905b0f51) ) ROM_LOAD16_WORD_SWAP( "060-p2.bin", 0x080000, 0x080000, CRC(b0801d5f) SHA1(085746d8f5d271d5f84ccbb7f577193c391f88d4) ) - NEO_SFIX_128K( "060-s1.bin", CRC(70727a1e) SHA1(e0d226be0578adbe7c1d41baba79e61d4d8fac39) ) + NEO_SFIX_128K( "060-s1.bin", CRC(7f012104) SHA1(f366dcc3923655dff16ec08a40d5fce22a84257d) ) NEO_BIOS_AUDIO_128K( "060-m1.bin", CRC(0b7c4e65) SHA1(999a1e784de18db3f1332b30bc425836ea6970be) ) @@ -1929,13 +2046,13 @@ ROM_START( fightfev ) ROM_LOAD16_BYTE( "060-c4.bin", 0x0400001, 0x200000, CRC(026f3b62) SHA1(d608483b70d60e7aa0e41f25a8b3fed508129eb7) ) /* Plane 2,3 */ ROM_END -ROM_START( fightfva ) +ROM_START( fightfva ) /* MVS VERSION */ ROM_REGION( 0x200000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) - ROM_LOAD16_WORD_SWAP( "060-p1a.bin", 0x0000000, 0x100000, CRC(2a104b50) SHA1(3eb663d3df7074e1cdf4c0e450a35c9cf55d8979) ) + ROM_LOAD16_WORD_SWAP( "060-p1.rom", 0x0000000, 0x100000, CRC(2a104b50) SHA1(3eb663d3df7074e1cdf4c0e450a35c9cf55d8979) ) /* there was also a copy of the 060-p1.bin with the name 060-p2.bin maybe it should be loaded over the top or this larger rom is an older revision... */ - NEO_SFIX_128K( "060-s1.bin", CRC(70727a1e) SHA1(e0d226be0578adbe7c1d41baba79e61d4d8fac39) ) + NEO_SFIX_128K( "060-s1.bin", CRC(7f012104) SHA1(f366dcc3923655dff16ec08a40d5fce22a84257d) ) NEO_BIOS_AUDIO_128K( "060-m1.bin", CRC(0b7c4e65) SHA1(999a1e784de18db3f1332b30bc425836ea6970be) ) @@ -2849,9 +2966,9 @@ ROM_START( sonicwi3 ) NEO_BIOS_AUDIO_128K( "097-m1.bin", CRC(b20e4291) SHA1(0e891ab53f9fded510295dfc7818bc59b4a9dd97) ) - ROM_REGION( 0x500000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) + ROM_REGION( 0x600000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) ROM_LOAD( "097-v1.bin", 0x000000, 0x400000, CRC(6f885152) SHA1(8175804d5c1420c5d37b733d4a8fa2aa81e59f1b) ) - ROM_LOAD( "097-v2.bin", 0x400000, 0x100000, CRC(32187ccd) SHA1(35a93de2a23bdec181c504d9c21a871bf86edee1) ) + ROM_LOAD( "097-v2.bin", 0x400000, 0x200000, CRC(3359e868) SHA1(b7efd9f1a6dab33271fe8356bcc863aeae1d3ed8) ) NO_DELTAT_REGION @@ -2928,7 +3045,7 @@ ROM_START( mosyougi ) ROM_REGION( 0x100000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD16_WORD_SWAP( "203-p1.bin", 0x000000, 0x100000, CRC(7ba70e2d) SHA1(945f472cc3e7706f613c52df18de35c986d166e7) ) - NEO_SFIX_128K( "203-s1.bin", CRC(4e132fac) SHA1(ecc5552880cc0a771121efe2a60810b70f6121ff) ) + NEO_SFIX_128K( "203-s1.bin", CRC(bfdc8309) SHA1(781337eab932a130b396a6c1080611d6f9c24c6e) ) NEO_BIOS_AUDIO_128K( "203-m1.bin", CRC(a602c2c2) SHA1(19fd5d0379244c528b58343f6cbf78b4766fb23d) ) @@ -3898,7 +4015,7 @@ ROM_END ROM_START( kof98 ) /* encrypted code + protection */ ROM_REGION( 0x600000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) - ROM_LOAD16_WORD_SWAP( "yz98-p1.160", 0x000000, 0x200000, CRC(8893df89) SHA1(0452828785110601c65f667209fc2d2926cd3751) ) + ROM_LOAD16_WORD_SWAP( "242-p1.bin", 0x000000, 0x200000, CRC(8893df89) SHA1(0452828785110601c65f667209fc2d2926cd3751) ) ROM_LOAD16_WORD_SWAP( "242-p2.bin", 0x200000, 0x400000, CRC(980aba4c) SHA1(5e735929ec6c3ca5b2efae3c7de47bcbb8ade2c5) ) NEO_SFIX_128K( "242-s1.bin", CRC(7f7b4805) SHA1(80ee6e5d0ece9c34ebca54b043a7cb33f9ff6b92) ) @@ -3926,7 +4043,7 @@ ROM_END ROM_START( kof98k ) /* encrypted code + protection, only z80 rom is different to kof98 */ ROM_REGION( 0x600000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) - ROM_LOAD16_WORD_SWAP( "yz98-p1.160", 0x000000, 0x200000, CRC(8893df89) SHA1(0452828785110601c65f667209fc2d2926cd3751) ) + ROM_LOAD16_WORD_SWAP( "242-p1.bin", 0x000000, 0x200000, CRC(8893df89) SHA1(0452828785110601c65f667209fc2d2926cd3751) ) ROM_LOAD16_WORD_SWAP( "242-p2.bin", 0x200000, 0x400000, CRC(980aba4c) SHA1(5e735929ec6c3ca5b2efae3c7de47bcbb8ade2c5) ) NEO_SFIX_128K( "242-s1.bin", CRC(7f7b4805) SHA1(80ee6e5d0ece9c34ebca54b043a7cb33f9ff6b92) ) @@ -4185,7 +4302,7 @@ ROM_START( mslugx ) ROM_LOAD16_BYTE( "250-c6.bin", 0x2000001, 0x800000, CRC(83e3e69d) SHA1(39be66287696829d243fb71b3fb8b7dc2bc3298f) ) /* Plane 0,1 */ ROM_END -ROM_START( kof99 ) /* Original Version - Encrypted Code & GFX */ +ROM_START( kof99 ) /* Original Version - Encrypted Code & GFX */ /* AES VERSION */ ROM_REGION( 0x900000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD16_WORD_SWAP( "251-sma.kc", 0x0c0000, 0x040000, CRC(6c9d0647) SHA1(2a0ce62ca6c18007e8fbe1b60475c7874ab79389) ) /* stored in the custom chip */ ROM_LOAD16_WORD_SWAP( "251-p1.bin", 0x100000, 0x400000, CRC(006e4532) SHA1(47791ab4044ad55988b1d3412d95b65b91a163c8) ) @@ -4221,7 +4338,7 @@ ROM_START( kof99 ) /* Original Version - Encrypted Code & GFX */ ROM_LOAD16_BYTE( "251-c8.bin", 0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */ ROM_END -ROM_START( kof99a ) /* Original Version - Encrypted Code & GFX */ +ROM_START( kof99a ) /* Original Version - Encrypted Code & GFX */ /* MVS VERSION */ ROM_REGION( 0x900000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD16_WORD_SWAP( "251-sma.ka", 0x0c0000, 0x040000, CRC(7766d09e) SHA1(4e0a49d1ad669a62676cb30f527c6590cde80194) ) /* stored in the custom chip */ ROM_LOAD16_WORD_SWAP( "251-p1.bin", 0x100000, 0x400000, CRC(006e4532) SHA1(47791ab4044ad55988b1d3412d95b65b91a163c8) ) @@ -5289,7 +5406,7 @@ ROM_START( pnyaa ) /* Encrypted Set */ /* MVS VERSION */ ROM_LOAD16_BYTE( "267-c2.bin", 0x0000001, 0x800000, CRC(2b67187b) SHA1(149c3efd3c444fd0d35a97fa2268102bf76be3ed) ) /* Plane 2,3 */ ROM_END -ROM_START( mslug5 ) /* Encrypted Set */ +ROM_START( mslug5 ) /* Encrypted Set */ /* MVS VERSION */ ROM_REGION( 0x800000, NEOGEO_REGION_MAIN_CPU_CARTRIDGE, 0 ) ROM_LOAD32_WORD_SWAP( "268-p1cr.bin", 0x000000, 0x400000, CRC(d0466792) SHA1(880819933d997fab398f91061e9dbccb959ae8a1) ) ROM_LOAD32_WORD_SWAP( "268-p2cr.bin", 0x000002, 0x400000, CRC(fbf6b61e) SHA1(9ec743d5988b5e3183f37f8edf45c72a8c0c893e) ) @@ -5302,11 +5419,11 @@ ROM_START( mslug5 ) /* Encrypted Set */ ROM_REGION( 0x20000, NEOGEO_REGION_FIXED_LAYER_BIOS, 0 ) ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) ) - ROM_REGION( 0x10000, NEOGEO_REGION_AUDIO_CPU_ENCRYPTED, 0 ) + ROM_REGION( 0x80000, NEOGEO_REGION_AUDIO_CPU_ENCRYPTED, 0 ) /* Encrypted, we load it here for reference and replace with decrypted ROM */ - ROM_LOAD( "268-m1.bin", 0x00000, 0x10000, CRC(58b107d0) SHA1(cc7fe66ff4f9c026cde4df06f86c848eb21f7af8) ) + ROM_LOAD( "268-m1.bin", 0x00000, 0x80000, CRC(4a5a6e0e) SHA1(df0f660f2465e1db7be5adfcaf5e88ad61a74a42) ) /* Decrypted */ - NEO_BIOS_AUDIO_64K( "268-m1_decrypted.bin", CRC(3c0655a7) SHA1(ae839d4c2b87a7aa3dd8e5caddc43eb75ee9b732) ) //Incorrect data + NEO_BIOS_AUDIO_64K( "268-m1_decrypted.bin", CRC(3c0655a7) SHA1(ae839d4c2b87a7aa3dd8e5caddc43eb75ee9b732) ) /* not a 100% match for encrypted version */ ROM_REGION( 0x1000000, NEOGEO_REGION_AUDIO_DATA_1, 0 ) /* Encrypted */ @@ -7041,7 +7158,8 @@ GAME( 1991, legendos, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Legend GAME( 1991, 2020bb, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 1)", 0 ) GAME( 1991, 2020bba, 2020bb, neogeo_s, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 2)", 0 ) GAME( 1991, 2020bbh, 2020bb, neogeo_s, neogeo, neogeo, ROT0, "SNK / Pallas", "2020 Super Baseball (set 3)", 0 ) -GAME( 1991, socbrawl, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl", 0 ) +GAME( 1991, socbrawl, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl (set 1)", 0 ) +GAME( 1991, socbrala, socbrawl, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Soccer Brawl (set 2)", 0 ) GAME( 1991, fatfury1, neogeo, neogeo, neogeo, neogeo, ROT0, "SNK", "Fatal Fury - King of Fighters / Garou Densetsu - shukumei no tatakai", 0 ) GAME( 1991, roboarmy, neogeo, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Robo Army (set 1)", 0 ) GAME( 1991, roboarma, roboarmy, neogeo_s, neogeo, neogeo, ROT0, "SNK", "Robo Army (set 2)", 0 ) @@ -7134,9 +7252,9 @@ GAME( 2004, kof2k4se, kof2002, neogeo_s, neogeo, kof2k4se, ROT0, "bootleg", "Th GAME( 2003, mslug5, neogeo, neogeo_s, neogeo, mslug5, ROT0, "SNK Playmore", "Metal Slug 5", 0 ) GAME ( 2003, ms5pcb, 0, neogeo_s, neogeo, ms5pcb, ROT0, "SNK Playmore", "Metal Slug 5 (JAMMA PCB)", 0 ) GAME( 2003, ms5plus, mslug5, neogeo_s, neogeo, ms5plus, ROT0, "bootleg", "Metal Slug 5 Plus (bootleg)",0 ) -GAME ( 2003, svcpcb, 0, neogeo_s, svcpcb, svcpcb, ROT0, "Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. -GAME ( 2003, svcpcba, svcpcb, neogeo_s, svcpcb, svcpcb, ROT0, "Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 2)" , 0 ) /* Encrypted Code */ -GAME( 2003, svc, neogeo, neogeo_s, neogeo, svc, ROT0, "Playmore", "SNK vs. CAPCOM SVC CHAOS", 0 ) +GAME ( 2003, svcpcb, 0, neogeo_s, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart. +GAME ( 2003, svcpcba, svcpcb, neogeo_s, svcpcb, svcpcb, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 2)" , 0 ) /* Encrypted Code */ +GAME( 2003, svc, neogeo, neogeo_s, neogeo, svc, ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS", 0 ) GAME( 2003, svcboot, svc, neogeo_s, neogeo, svcboot, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS (bootleg)",0 ) GAME( 2003, svcplus, svc, neogeo_s, neogeo, svcplus, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Plus (set 1, bootleg)",0 ) GAME( 2003, svcplusa, svc, neogeo_s, neogeo, svcplusa, ROT0, "bootleg", "SNK vs. CAPCOM SVC CHAOS Plus (set 2, bootleg)",0 ) @@ -7194,7 +7312,7 @@ GAME( 1997, magdrop3, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Data East Corp /* Eleven */ GAME( 2000, nitd, neogeo, neogeo, neogeo, nitd, ROT0, "Eleven / Gavaking", "Nightmare in the Dark" , 0) /* Encrypted GFX */ -GAME( 2001, nitdbl, nitd, neogeo, neogeo, neogeo, ROT0, "Eleven / Gavaking", "Nightmare in the Dark (bootleg)" , 0) +GAME( 2001, nitdbl, nitd, neogeo, neogeo, neogeo, ROT0, "bootleg", "Nightmare in the Dark (bootleg)" , 0) /* Face */ GAME( 1994, gururin, neogeo, neogeo_s, neogeo, neogeo, ROT0, "Face", "Gururin", 0 ) diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index d8ece60dc96..07a15348898 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -61,7 +61,6 @@ the language is set to Japanese, maybe the English endings are incomplete / buggy? * Graphical Glitches caused by incorrect timing? - - Ninja Combat sometimes glitches - Some raster effects are imperfect (off by a couple of lines) * Mult-cart support not implementd - the MVS can take up to 6 carts depending on the board being used @@ -76,6 +75,7 @@ can display 320x240 but most of the games seem designed to work with a width of 304, some less. * Distorted jumping sound in Nightmare in the Dark + * Ninja Combat sometimes glitches ****************************************************************************/ diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 244ac4ec24a..e720a680dc6 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -363,8 +363,8 @@ static WRITE8_HANDLER( peplus_output_bank_a_w ) output_set_value("pe_bnka7",(data >> 7) & 1); /* specific to a kind of machine */ coin_out_state = 0; - if((data >> 4) & 1) - coin_out_state = 1; + if(((data >> 4) & 1) || ((data >> 5) & 1)) + coin_out_state = 3; } static WRITE8_HANDLER( peplus_output_bank_b_w ) @@ -594,14 +594,32 @@ static READ8_HANDLER( peplus_input_bank_a_r ) last_door = activecpu_gettotalcycles(); } - if (curr_cycles - last_coin_out > 60000) { // Guessing with 60000 - if (coin_out_state == 1) { - coin_out = 0x08; - } - coin_out_state = 0; + if (curr_cycles - last_coin_out > 600000 && coin_out_state != 0) { // Guessing with 600000 + if (coin_out_state != 2) { + coin_out_state = 2; // Coin-Out Off + } else { + coin_out_state = 3; // Coin-Out On + } + last_coin_out = activecpu_gettotalcycles(); } + switch (coin_out_state) + { + case 0x00: // No Coin-Out + coin_out = 0x00; + break; + case 0x01: // First Coin-Out On + coin_out = 0x08; + break; + case 0x02: // Coin-Out Off + coin_out = 0x00; + break; + case 0x03: // Additional Coin-Out On + coin_out = 0x08; + break; + } + bank_a = (sda<<7) | bank_a | (door_open<<5) | coin_optics | coin_out; return bank_a; diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c index a061c21653a..9963736b00e 100644 --- a/src/mame/drivers/policetr.c +++ b/src/mame/drivers/policetr.c @@ -413,13 +413,13 @@ static INPUT_PORTS_START( policetr ) PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.012, 0.008, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_START_TAG("GUNY1") /* fake analog Y */ - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.002, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.05, 0.002, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_START_TAG("GUNX2") /* fake analog X */ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.012, 0.008, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2) PORT_START_TAG("GUNY2") /* fake analog Y */ - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.002, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2) + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.05, 0.002, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2) INPUT_PORTS_END diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 264ac455729..52f20e276c6 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -1417,6 +1417,32 @@ ROM_START( raiden2c ) ROM_LOAD( "r2_voi2.bin", 0x80000, 0x40000, CRC(8cf0d17e) SHA1(0fbe0b1e1ca5360c7c8329331408e3d799b4714c) ) ROM_END +ROM_START( raiden2d ) + ROM_REGION( 0x200000, REGION_USER1, 0 ) /* v30 main cpu */ + ROM_LOAD16_BYTE("seibu1", 0x000000, 0x80000, CRC(c1fc70f5) SHA1(a054f5ae9583972c406d9cf871340d5e072d71a3) ) + ROM_LOAD16_BYTE("seibu2", 0x000001, 0x80000, CRC(28d5365f) SHA1(21efe29c2d373229c2ff302d86e59c2c94fa6d03) ) + + ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* 64k code for sound Z80 */ + ROM_LOAD( "seibu5", 0x000000, 0x10000, CRC(5db9f922) SHA1(8257aab98657fe44df19d2a48d85fcf65b3d98c6) ) + + ROM_REGION( 0x020000, REGION_GFX1, ROMREGION_DISPOSE ) /* chars */ + ROM_LOAD( "seibu7", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) + + ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* background gfx */ + ROM_LOAD( "bg1", 0x000000, 0x200000, CRC(e61ad38e) SHA1(63b06cd38db946ad3fc5c1482dc863ef80b58fec) ) + ROM_LOAD( "bg2", 0x200000, 0x200000, CRC(a694a4bb) SHA1(39c2614d0effc899fe58f735604283097769df77) ) + + ROM_REGION( 0x800000, REGION_GFX3, ROMREGION_DISPOSE ) /* sprite gfx (encrypted) */ + ROM_LOAD32_WORD( "obj1", 0x000000, 0x200000, CRC(ff08ef0b) SHA1(a1858430e8171ca8bab785457ef60e151b5e5cf1) ) + ROM_LOAD32_WORD( "obj2", 0x000002, 0x200000, CRC(638eb771) SHA1(9774cc070e71668d7d1d20795502dccd21ca557b) ) + ROM_LOAD32_WORD( "obj3", 0x400000, 0x200000, CRC(897a0322) SHA1(abb2737a2446da5b364fc2d96524b43d808f4126) ) + ROM_LOAD32_WORD( "obj4", 0x400002, 0x200000, CRC(b676e188) SHA1(19cc838f1ccf9c4203cd0e5365e5d99ff3a4ff0f) ) + + ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* ADPCM samples */ + ROM_LOAD( "seibu6", 0x00000, 0x40000, CRC(fb0fca23) SHA1(4b2217b121a66c5ab6015537609cf908ffedaf86) ) + ROM_LOAD( "r2_voi2.bin", 0x80000, 0x40000, CRC(8cf0d17e) SHA1(0fbe0b1e1ca5360c7c8329331408e3d799b4714c) ) +ROM_END + /* @@ -1485,6 +1511,8 @@ ROM_START( raiden2e ) ROM_LOAD( "r2_voi2.bin", 0x80000, 0x40000, CRC(8cf0d17e) SHA1(0fbe0b1e1ca5360c7c8329331408e3d799b4714c) ) ROM_END + + /* Raiden DX sets */ /* @@ -2291,7 +2319,8 @@ GAME( 1993, raiden2, 0, raiden2, raiden2, raiden2, ROT270, "Seibu Kaih GAME( 1993, raiden2a, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 2, Metrotainment)", GAME_NOT_WORKING|GAME_NO_SOUND) GAME( 1993, raiden2b, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 3, Japan)", GAME_NOT_WORKING|GAME_NO_SOUND) GAME( 1993, raiden2c, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 4, Japan)", GAME_NOT_WORKING|GAME_NO_SOUND) -GAME( 1993, raiden2e, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (easier?)", GAME_NOT_WORKING|GAME_NO_SOUND) +GAME( 1993, raiden2d, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 5)", GAME_NOT_WORKING|GAME_NO_SOUND) +GAME( 1993, raiden2e, raiden2, raiden2, raiden2, raiden2, ROT270, "Seibu Kaihatsu", "Raiden 2 (set 6, Easy Version)", GAME_NOT_WORKING|GAME_NO_SOUND) GAME( 1993, raidndx, 0, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND) GAME( 1993, raidndxa, raidndx, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND) GAME( 1993, raidndxm, raidndx, raiden2, raidendx, raiden2, ROT270, "Seibu Kaihatsu", "Raiden DX (Metrotainment license)", GAME_NOT_WORKING|GAME_NO_SOUND) diff --git a/src/mame/drivers/rpunch.c b/src/mame/drivers/rpunch.c index f222db16fc6..f381d20dbc6 100644 --- a/src/mame/drivers/rpunch.c +++ b/src/mame/drivers/rpunch.c @@ -302,7 +302,7 @@ ADDRESS_MAP_END *************************************/ static INPUT_PORTS_START( rpunch ) - PORT_START /* c0018 lower 8 bits */ + PORT_START_TAG("P1") /* c0018 lower 8 bits */ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) @@ -311,7 +311,7 @@ static INPUT_PORTS_START( rpunch ) PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_BIT( 0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START /* c001a lower 8 bits */ + PORT_START_TAG("P2") /* c001a lower 8 bits */ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) @@ -320,19 +320,19 @@ static INPUT_PORTS_START( rpunch ) PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_BIT( 0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START /* c0018/c001a upper 8 bits */ + PORT_START_TAG("SERVICE") /* c0018/c001a upper 8 bits */ PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_SERVICE( 0x0200, IP_ACTIVE_HIGH ) - PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Hold F2 at bootup */ + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Freeze game */ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START /* c001c DIP switches */ - PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Coin_A )) + PORT_START_TAG("DSW") /* c001c DIP switches */ + PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Coin_A )) PORT_DIPLOCATION("SWA:1,2,3,4") PORT_DIPSETTING( 0x000d, DEF_STR( 3C_1C )) PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C )) PORT_DIPSETTING( 0x0005, "6 Coins/4 Credits") @@ -345,7 +345,7 @@ static INPUT_PORTS_START( rpunch ) PORT_DIPSETTING( 0x000a, DEF_STR( 1C_4C )) PORT_DIPSETTING( 0x000b, DEF_STR( 1C_5C )) PORT_DIPSETTING( 0x0004, DEF_STR( 1C_6C )) - PORT_DIPNAME( 0x00f0, 0x0000, DEF_STR( Coin_B )) + PORT_DIPNAME( 0x00f0, 0x0000, DEF_STR( Coin_B )) PORT_DIPLOCATION("SWA:5,6,7,8") PORT_DIPSETTING( 0x00d0, DEF_STR( 3C_1C )) PORT_DIPSETTING( 0x00c0, DEF_STR( 2C_1C )) PORT_DIPSETTING( 0x0050, "6 Coins/4 Credits") @@ -358,191 +358,78 @@ static INPUT_PORTS_START( rpunch ) PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_4C )) PORT_DIPSETTING( 0x00b0, DEF_STR( 1C_5C )) PORT_DIPSETTING( 0x0040, DEF_STR( 1C_6C )) - PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Difficulty )) + + + PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Difficulty )) PORT_DIPLOCATION("SWB:1,2") PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0100, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0300, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Lives )) + PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Lives )) PORT_DIPLOCATION("SWB:3") PORT_DIPSETTING( 0x0000, "2" ) PORT_DIPSETTING( 0x0400, "3" ) - PORT_DIPNAME( 0x0800, 0x0000, "Laser" ) + PORT_DIPNAME( 0x0800, 0x0000, "Laser" ) PORT_DIPLOCATION("SWB:4") PORT_DIPSETTING( 0x0000, "Manual" ) PORT_DIPSETTING( 0x0800, "Semi-Automatic" ) - PORT_DIPNAME( 0x1000, 0x0000, "Extended Play" ) + PORT_DIPNAME( 0x1000, 0x0000, "Extended Play" ) PORT_DIPLOCATION("SWB:5") PORT_DIPSETTING( 0x0000, "500000 points" ) PORT_DIPSETTING( 0x1000, DEF_STR( None ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds )) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds )) PORT_DIPLOCATION("SWB:6") PORT_DIPSETTING( 0x0000, DEF_STR( Off )) PORT_DIPSETTING( 0x2000, DEF_STR( On )) - PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Continues ) ) + PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Continues ) ) PORT_DIPLOCATION("SWB:7") PORT_DIPSETTING( 0x4000, DEF_STR( Off )) PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen )) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen )) PORT_DIPLOCATION("SWB:8") PORT_DIPSETTING( 0x0000, DEF_STR( Off )) PORT_DIPSETTING( 0x8000, DEF_STR( On )) INPUT_PORTS_END static INPUT_PORTS_START( rabiolep ) - PORT_START /* c0018 lower 8 bits */ - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_INCLUDE( rpunch ) - PORT_START /* c001a lower 8 bits */ - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START /* c0018/c001a upper 8 bits */ - PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_SERVICE( 0x0200, IP_ACTIVE_HIGH ) - PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START /* c001c DIP switches */ - PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Coin_A )) - PORT_DIPSETTING( 0x000d, DEF_STR( 3C_1C )) - PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C )) - PORT_DIPSETTING( 0x0005, "6 Coins/4 Credits") - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) - PORT_DIPSETTING( 0x0003, "5 Coins/6 Credits" ) - PORT_DIPSETTING( 0x0002, DEF_STR( 4C_5C )) - PORT_DIPSETTING( 0x0006, DEF_STR( 2C_3C )) - PORT_DIPSETTING( 0x0008, DEF_STR( 1C_2C )) - PORT_DIPSETTING( 0x0009, DEF_STR( 1C_3C )) - PORT_DIPSETTING( 0x000a, DEF_STR( 1C_4C )) - PORT_DIPSETTING( 0x000b, DEF_STR( 1C_5C )) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_6C )) - PORT_DIPNAME( 0x00f0, 0x0000, DEF_STR( Coin_B )) - PORT_DIPSETTING( 0x00d0, DEF_STR( 3C_1C )) - PORT_DIPSETTING( 0x00c0, DEF_STR( 2C_1C )) - PORT_DIPSETTING( 0x0050, "6 Coins/4 Credits") - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) - PORT_DIPSETTING( 0x0030, "5 Coins/6 Credits" ) - PORT_DIPSETTING( 0x0020, DEF_STR( 4C_5C )) - PORT_DIPSETTING( 0x0060, DEF_STR( 2C_3C )) - PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C )) - PORT_DIPSETTING( 0x0090, DEF_STR( 1C_3C )) - PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_4C )) - PORT_DIPSETTING( 0x00b0, DEF_STR( 1C_5C )) - PORT_DIPSETTING( 0x0040, DEF_STR( 1C_6C )) - PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Difficulty )) - PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0100, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x0300, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Lives )) - PORT_DIPSETTING( 0x0400, "2" ) + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Lives )) PORT_DIPLOCATION("SWB:3") PORT_DIPSETTING( 0x0000, "3" ) - PORT_DIPNAME( 0x0800, 0x0000, "Laser" ) - PORT_DIPSETTING( 0x0800, "Manual" ) + PORT_DIPSETTING( 0x0400, "2" ) + PORT_DIPNAME( 0x0800, 0x0000, "Laser" ) PORT_DIPLOCATION("SWB:4") PORT_DIPSETTING( 0x0000, "Semi-Automatic" ) - PORT_DIPNAME( 0x1000, 0x0000, "Extended Play" ) + PORT_DIPSETTING( 0x0800, "Manual" ) + PORT_DIPNAME( 0x1000, 0x0000, "Extended Play" ) PORT_DIPLOCATION("SWB:5") PORT_DIPSETTING( 0x0000, "500000 points" ) PORT_DIPSETTING( 0x1000, "300000 points" ) - PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Demo_Sounds )) + PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Demo_Sounds )) PORT_DIPLOCATION("SWB:6") PORT_DIPSETTING( 0x2000, DEF_STR( Off )) PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Continues ) ) - PORT_DIPSETTING( 0x4000, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen )) - PORT_DIPSETTING( 0x0000, DEF_STR( Off )) - PORT_DIPSETTING( 0x8000, DEF_STR( On )) INPUT_PORTS_END static INPUT_PORTS_START( svolley ) - PORT_START /* c0018 lower 8 bits */ - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_INCLUDE( rpunch ) - PORT_START /* c001a lower 8 bits */ - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0xffc0, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_MODIFY("SERVICE") + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START /* c0018/c001a upper 8 bits */ - PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0700, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START /* c001c DIP switches */ - PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Coin_A )) - PORT_DIPSETTING( 0x000d, DEF_STR( 3C_1C )) - PORT_DIPSETTING( 0x000c, DEF_STR( 2C_1C )) - PORT_DIPSETTING( 0x0005, "6 Coins/4 Credits") - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) - PORT_DIPSETTING( 0x0003, "5 Coins/6 Credits" ) - PORT_DIPSETTING( 0x0002, DEF_STR( 4C_5C )) - PORT_DIPSETTING( 0x0006, DEF_STR( 2C_3C )) - PORT_DIPSETTING( 0x0008, DEF_STR( 1C_2C )) - PORT_DIPSETTING( 0x0009, DEF_STR( 1C_3C )) - PORT_DIPSETTING( 0x000a, DEF_STR( 1C_4C )) - PORT_DIPSETTING( 0x000b, DEF_STR( 1C_5C )) - PORT_DIPSETTING( 0x0004, DEF_STR( 1C_6C )) - PORT_DIPNAME( 0x00f0, 0x0000, DEF_STR( Coin_B )) - PORT_DIPSETTING( 0x00d0, DEF_STR( 3C_1C )) - PORT_DIPSETTING( 0x00c0, DEF_STR( 2C_1C )) - PORT_DIPSETTING( 0x0050, "6 Coins/4 Credits") - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C )) - PORT_DIPSETTING( 0x0030, "5 Coins/6 Credits" ) - PORT_DIPSETTING( 0x0020, DEF_STR( 4C_5C )) - PORT_DIPSETTING( 0x0060, DEF_STR( 2C_3C )) - PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C )) - PORT_DIPSETTING( 0x0090, DEF_STR( 1C_3C )) - PORT_DIPSETTING( 0x00a0, DEF_STR( 1C_4C )) - PORT_DIPSETTING( 0x00b0, DEF_STR( 1C_5C )) - PORT_DIPSETTING( 0x0040, DEF_STR( 1C_6C )) - PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Game_Time )) + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Game_Time )) PORT_DIPLOCATION("SWB:1") PORT_DIPSETTING( 0x0100, "2 min/1 min" ) PORT_DIPSETTING( 0x0000, "3 min/1.5 min" ) - PORT_DIPNAME( 0x0600, 0x0000, "2P Starting Score" ) + PORT_DIPNAME( 0x0600, 0x0000, "2P Starting Score" ) PORT_DIPLOCATION("SWB:2,3") PORT_DIPSETTING( 0x0600, "0-0" ) PORT_DIPSETTING( 0x0400, "5-5" ) PORT_DIPSETTING( 0x0000, "7-7" ) PORT_DIPSETTING( 0x0200, "9-9" ) - PORT_DIPNAME( 0x1800, 0x0000, "1P Starting Score" ) + PORT_DIPNAME( 0x1800, 0x0000, "1P Starting Score" ) PORT_DIPLOCATION("SWB:4,5") PORT_DIPSETTING( 0x1000, "9-11" ) PORT_DIPSETTING( 0x1800, "10-10" ) PORT_DIPSETTING( 0x0800, "10-11" ) PORT_DIPSETTING( 0x0000, "11-11" ) - PORT_SERVICE( 0x2000, IP_ACTIVE_HIGH ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Demo_Sounds )) + PORT_SERVICE_DIPLOC( 0x2000, IP_ACTIVE_HIGH, "SWB:6" ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Demo_Sounds )) PORT_DIPLOCATION("SWB:7") PORT_DIPSETTING( 0x0000, DEF_STR( Off )) PORT_DIPSETTING( 0x4000, DEF_STR( On )) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen )) - PORT_DIPSETTING( 0x0000, DEF_STR( Off )) - PORT_DIPSETTING( 0x8000, DEF_STR( On )) INPUT_PORTS_END diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c index e00b4394cd5..2b6731778ae 100644 --- a/src/mame/drivers/segas18.c +++ b/src/mame/drivers/segas18.c @@ -131,7 +131,7 @@ static const struct segaic16_memory_map_entry rom_171_5987_info[] = { 0 } }; -static const struct segaic16_memory_map_entry *region_info_list[] = +static const struct segaic16_memory_map_entry *const region_info_list[] = { &rom_171_shad_info[0], &rom_171_5874_info[0], diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index a855e3ab069..d3259dc92ce 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -55,6 +55,7 @@ bootleg 9? Triple Fun (4) bootleg (Comad?) P0-100-A 93 Quiz Kokology 2 Tecmo P0-101-1 94 Pro Mahjong Kiwame Athena PO-102-A 93 Mad Shark Allumer +PO-107-A (prototype?) 94 Orbs (prototype?) American Sammy P0-114-A (SKB-001) 94 Krazy Bowl American Sammy P0-117-A (DH-01) 95 Extreme Downhill Sammy Japan P0-117-A? 95 Sokonuke Taisen Game Sammy Industries @@ -1992,6 +1993,41 @@ static ADDRESS_MAP_START( wrofaero_writemem, ADDRESS_SPACE_PROGRAM, 16 ) AM_RANGE(0xf00000, 0xf00001) AM_WRITE(MWA16_NOP ) // ? Sound IRQ Ack ADDRESS_MAP_END +/*************************************************************************** + orbs +***************************************************************************/ + +static ADDRESS_MAP_START( orbs_readmem, ADDRESS_SPACE_PROGRAM, 16 ) + AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM ) // ROM + AM_RANGE(0xf00000, 0xf0ffff) AM_READ(MRA16_RAM ) // RAM + AM_RANGE(0x100000, 0x100001) AM_READ(MRA16_NOP ) // ? + AM_RANGE(0x200000, 0x200001) AM_READ(MRA16_NOP ) // ? + AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW + AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 + AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 + AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // Coins + //AM_RANGE(0x600000, 0x60000f) AM_READ(krzybowl_input_r ) // P1 + AM_RANGE(0x8000f0, 0x8000f1) AM_READ(MRA16_RAM ) // NVRAM + AM_RANGE(0x800100, 0x8001ff) AM_READ(MRA16_RAM ) // NVRAM + AM_RANGE(0xa00000, 0xa03fff) AM_READ(seta_sound_word_r ) // Sound + AM_RANGE(0xb00000, 0xb003ff) AM_READ(MRA16_RAM ) // Palette + AM_RANGE(0xc00000, 0xc03fff) AM_READ(MRA16_RAM ) // Sprites Code + X + Attr +/**/AM_RANGE(0xd00000, 0xd00001) AM_READ(MRA16_RAM ) // ? 0x4000 +/**/AM_RANGE(0xe00000, 0xe00607) AM_READ(MRA16_RAM ) // Sprites Y +ADDRESS_MAP_END + +static ADDRESS_MAP_START( orbs_writemem, ADDRESS_SPACE_PROGRAM, 16 ) + AM_RANGE(0x000000, 0x07ffff) AM_WRITE(MWA16_ROM ) // ROM + AM_RANGE(0xf00000, 0xf0ffff) AM_WRITE(MWA16_RAM ) // RAM + AM_RANGE(0x400000, 0x400001) AM_WRITE(MWA16_NOP ) // ? + AM_RANGE(0x8000f0, 0x8000f1) AM_WRITE(MWA16_RAM ) // NVRAM + AM_RANGE(0x800100, 0x8001ff) AM_WRITE(MWA16_RAM ) // NVRAM + AM_RANGE(0xa00000, 0xa03fff) AM_WRITE(seta_sound_word_w ) // Sound + AM_RANGE(0xb00000, 0xb003ff) AM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16 ) // Palette + AM_RANGE(0xc00000, 0xc03fff) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16_2 ) // Sprites Code + X + Attr + AM_RANGE(0xd00000, 0xd00001) AM_WRITE(MWA16_RAM ) // ? 0x4000 + AM_RANGE(0xe00000, 0xe00607) AM_WRITE(MWA16_RAM) AM_BASE(&spriteram16 ) // Sprites Y +ADDRESS_MAP_END /*************************************************************************** @@ -6026,6 +6062,75 @@ static INPUT_PORTS_START( pairlove ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) INPUT_PORTS_END +/*************************************************************************** + Orbs +***************************************************************************/ + +static INPUT_PORTS_START( orbs ) + PORT_START_TAG("IN0") //Player 1 + JOY_TYPE1_1BUTTON(1) + + PORT_START_TAG("IN1") //Player 2 ?? + JOY_TYPE1_1BUTTON(2) + + PORT_START_TAG("IN2") //Coins + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(5) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) + PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x000c, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x0010, 0x0010, "Stock" ) + PORT_DIPSETTING( 0x0010, "1" ) + PORT_DIPSETTING( 0x0000, "2" ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Level_Select ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, "Timer speed" ) + PORT_DIPSETTING( 0x0040, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0000, "Fast" ) + PORT_SERVICE( 0x0080, IP_ACTIVE_LOW ) + + PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x0500, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0600, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0700, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0400, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x0300, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x2800, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x3000, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x3800, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x1800, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) + PORT_DIPNAME( 0x4000, 0x4000, "Force Coinage (Half Coinn)" ) + PORT_DIPSETTING( 0x4000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 2C_1C ) ) + PORT_DIPNAME( 0x8000, 0x8000, "Unknown 2-7" ) + PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) +INPUT_PORTS_END /*************************************************************************** Crazy Fight @@ -6277,6 +6382,14 @@ static GFXDECODE_START( tndrcade ) GFXDECODE_ENTRY( REGION_GFX1, 0, layout_planes_2roms, 512*0, 32 ) // [0] Sprites GFXDECODE_END +/*************************************************************************** + Orbs +***************************************************************************/ + +static GFXDECODE_START( orbs ) + GFXDECODE_ENTRY( REGION_GFX1, 0, layout_planes, 512*0, 32 ) // [0] Sprites +GFXDECODE_END + /*************************************************************************** Wiggie Waggle ****************************************************************************/ @@ -7148,6 +7261,40 @@ static MACHINE_DRIVER_START( kamenrid ) MDRV_SOUND_ROUTE(1, "right", 1.0) MACHINE_DRIVER_END +/*************************************************************************** + Orbs +***************************************************************************/ + +static MACHINE_DRIVER_START( orbs ) + + /* basic machine hardware */ + MDRV_CPU_ADD(M68000, 14318180) + MDRV_CPU_PROGRAM_MAP(orbs_readmem,orbs_writemem) + MDRV_CPU_VBLANK_INT(seta_interrupt_1_and_2,SETA_INTERRUPTS_NUM) + + MDRV_SCREEN_REFRESH_RATE(60) + MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) + + /* video hardware */ + MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) + MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) + MDRV_SCREEN_SIZE(64*8, 32*8) + MDRV_SCREEN_VISIBLE_AREA(1*8, 39*8-1, 1*8, 31*8-1) + MDRV_GFXDECODE(orbs) + MDRV_PALETTE_LENGTH(512) /* sprites only */ + + MDRV_VIDEO_START(seta_no_layers) + MDRV_VIDEO_UPDATE(seta_no_layers) /* just draw the sprites */ + + /* sound hardware */ + MDRV_SPEAKER_STANDARD_STEREO("left", "right") + + MDRV_SOUND_ADD(X1_010, 16000000) + MDRV_SOUND_CONFIG(seta_sound_intf) + MDRV_SOUND_ROUTE(0, "left", 1.0) + MDRV_SOUND_ROUTE(1, "right", 1.0) +MACHINE_DRIVER_END + /*************************************************************************** Krazy Bowl @@ -8609,6 +8756,25 @@ ROM_START( krzybowl ) ROM_LOAD( "fv001.006", 0x080000, 0x080000, CRC(572a15e7) SHA1(b6a3e99e14a473b78ff48d1a46b20a0862d128e9) ) ROM_END +ROM_START( orbs ) +//all eproms are socketed and labelled (handwritten) "ORBS 10\7\94" +//most of rom space is unused (filled with sound samples - same data in all roms) + + ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "orbs.u10", 0x000000, 0x080000, CRC(10f079c8) SHA1(0baf2b7e1e8be116a6fab609481c87fc7c86f305) ) + ROM_LOAD16_BYTE( "orbs.u9", 0x000001, 0x080000, CRC(f269d16f) SHA1(34f38789cb3256e334b0ac8acd9f339d14481578) ) + + ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ + ROM_LOAD( "orbs.u14", 0x000000, 0x080000, CRC(1cc76541) SHA1(d8a233212bfb9a9c686a40e470524f95b34417fa) ) + ROM_LOAD( "orbs.u13", 0x080000, 0x080000, CRC(784bdc1a) SHA1(de2c5b38561b8ba6bd800126d010b734c2751575) ) + ROM_LOAD( "orbs.u12", 0x100000, 0x080000, CRC(b8c352c2) SHA1(7d6fd1425d9d5cf6a14a1ddceba0ad10e472dfa5) ) + ROM_LOAD( "orbs.u11", 0x180000, 0x080000, CRC(58cb38ba) SHA1(1c6c5f7ccb9c81b71bc1cbad080799b97962f262) ) + + ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* Samples */ + ROM_LOAD( "orbs.u15", 0x000000, 0x080000, CRC(bc0e9fe3) SHA1(758a44d07d59af8bbc87602df25dfcdc6cb8d9b3) ) + ROM_LOAD( "orbs.u16", 0x080000, 0x080000, CRC(aecd8373) SHA1(5620bcb281a9ea4920cfe81d163827013289c5bf) ) +ROM_END + ROM_START( extdwnhl ) ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "fw001002.201", 0x000000, 0x080000, CRC(24d21924) SHA1(9914a68a578f884b06305ffcd9aeed7d83df1c7b) ) @@ -9086,6 +9252,7 @@ GAME( 1993, wrofaero, 0, wrofaero, wrofaero, 0, ROT270, "Yang Chen GAME( 1994, eightfrc, 0, eightfrc, eightfrc, eightfrc, ROT90, "Tecmo", "Eight Forces", 0 ) GAME( 1994, kiwame, 0, kiwame, kiwame, kiwame, ROT0, "Athena", "Pro Mahjong Kiwame", 0 ) GAME( 1994, krzybowl, 0, krzybowl, krzybowl, 0, ROT270, "American Sammy", "Krazy Bowl", 0 ) +GAME( 1994, orbs, 0, orbs, orbs, 0, ROT0, "American Sammy", "Orbs (10/7/94 prototype?)", 0 ) GAME( 1995, extdwnhl, 0, extdwnhl, extdwnhl, 0, ROT0, "Sammy Industries Japan", "Extreme Downhill (v1.5)", GAME_IMPERFECT_GRAPHICS ) GAME( 1995, gundhara, 0, gundhara, gundhara, 0, ROT270, "Banpresto", "Gundhara", 0 ) GAME( 1995, sokonuke, 0, extdwnhl, sokonuke, 0, ROT0, "Sammy Industries", "Sokonuke Taisen Game (Japan)", GAME_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index f82e5be6934..83f31950437 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -2704,6 +2704,8 @@ static MACHINE_START( stv ) state_save_register_global(scsp_last_line); stv_register_protection_savestates(); // machine/stvprot.c + + add_exit_callback(machine, stvcd_exit); } static MACHINE_RESET( stv ) diff --git a/src/mame/drivers/taito_f3.c b/src/mame/drivers/taito_f3.c index 1e006fdc317..9ad5dd17123 100644 --- a/src/mame/drivers/taito_f3.c +++ b/src/mame/drivers/taito_f3.c @@ -2003,7 +2003,7 @@ ROM_START( qtheater ) ROM_FILL ( 0x400000, 0x400000, 0 ) ROM_REGION(0x180000, REGION_CPU2, 0) /* 68000 sound CPU */ - ROM_LOAD16_BYTE("d95-07.32", 0x100000, 0x40000, BAD_DUMP CRC(72183273) SHA1(d21f2ec24d1a9101bb9161d5e1bc5416e498ad01) ) + ROM_LOAD16_BYTE("d95-07.32", 0x100000, 0x40000, CRC(3c201d70) SHA1(89fe4d363f4e1a847ba7d2894a2092708b287a33) ) ROM_LOAD16_BYTE("d95-08.33", 0x100001, 0x40000, CRC(01c23354) SHA1(7b332edc844b1b1c1513e879215089987645fa3f) ) ROM_REGION16_BE(0x800000, REGION_SOUND1 , ROMREGION_ERASE00 ) // V2: 4 banks, only 2 populated diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index 6eb192b7a34..08dd7879fb1 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -4351,10 +4351,10 @@ GAME( 1991, detatwin, blswhstl, detatwin, detatwin, gfx, ROT90, "Konami", " GAME( 1991, glfgreat, 0, glfgreat, glfgreat, glfgreat, ROT0, "Konami", "Golfing Greats", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1991, glfgretj, glfgreat, glfgreat, glfgreat, glfgreat, ROT0, "Konami", "Golfing Greats (Japan)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) -GAME( 1991, tmnt2, 0, tmnt2, ssridr4p, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players ver UAA)", GAME_UNEMULATED_PROTECTION ) // ver. UAA -GAME( 1991, tmnt2a, tmnt2, tmnt2, ssrid4ps, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players ver ADA)", GAME_UNEMULATED_PROTECTION ) // ver. ADA -GAME( 1991, tmht22pe, tmnt2, tmnt2, ssriders, gfx, ROT0, "Konami", "Teenage Mutant Hero Turtles - Turtles in Time (2 Players ver EBA)", GAME_UNEMULATED_PROTECTION ) // ver. EBA -GAME( 1991, tmnt22pu, tmnt2, tmnt2, ssriders, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (2 Players ver UDA)", GAME_UNEMULATED_PROTECTION ) // ver. UDA +GAME( 1991, tmnt2, 0, tmnt2, ssridr4p, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players ver UAA)", 0 ) // ver. UAA +GAME( 1991, tmnt2a, tmnt2, tmnt2, ssrid4ps, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (4 Players ver ADA)", 0 ) // ver. ADA +GAME( 1991, tmht22pe, tmnt2, tmnt2, ssriders, gfx, ROT0, "Konami", "Teenage Mutant Hero Turtles - Turtles in Time (2 Players ver EBA)", 0 ) // ver. EBA +GAME( 1991, tmnt22pu, tmnt2, tmnt2, ssriders, gfx, ROT0, "Konami", "Teenage Mutant Ninja Turtles - Turtles in Time (2 Players ver UDA)", 0 ) // ver. UDA GAME( 1993, qgakumon, 0, tmnt2, qgakumon, gfx, ROT0, "Konami", "Quiz Gakumon no Susume (Japan ver. JA2 Type L)", 0 ) diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h index be37f565cf5..163a65ae4de 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -63,6 +63,16 @@ struct _dkong_state UINT8 hardware_type; /* sound state */ + UINT8 dkongjr_latch[10]; + UINT8 sh_climb_count; + + UINT8 has_discrete_interface; + + UINT8 page,mcustatus; + + double envelope,tt; + UINT8 decay; + UINT8 portT; /* video state */ tilemap *bg_tilemap; diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index a376071bddd..dac94ad894a 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -19,7 +19,6 @@ READ8_HANDLER( slikshot_z80_r ); READ8_HANDLER( slikshot_z80_control_r ); WRITE8_HANDLER( slikshot_z80_control_w ); -void slikshot_set_crosshair_range(int miny, int maxy); VIDEO_UPDATE( slikshot ); diff --git a/src/mame/machine/bonzeadv.c b/src/mame/machine/bonzeadv.c index ded86335c52..d8e705871ef 100644 --- a/src/mame/machine/bonzeadv.c +++ b/src/mame/machine/bonzeadv.c @@ -295,7 +295,7 @@ static const struct cchip_mapping level08[] = { 0xff } }; -static const struct cchip_mapping* levelData[]= +static const struct cchip_mapping *const levelData[]= { level00, level01, diff --git a/src/mame/machine/namcos1.c b/src/mame/machine/namcos1.c index ef4349ab30a..7186e51e32e 100644 --- a/src/mame/machine/namcos1.c +++ b/src/mame/machine/namcos1.c @@ -660,7 +660,7 @@ static WRITE8_HANDLER( unknown_w ) } /* Main bankswitching routine */ -static void set_bank(int banknum, bankhandler *handler) +static void set_bank(int banknum, const bankhandler *handler) { int bankstart = (banknum & 7) * 0x2000; int cpunum = (banknum >> 3) & 1; @@ -834,7 +834,7 @@ static void namcos1_build_banks(read8_handler key_r,write8_handler key_w) MACHINE_RESET( namcos1 ) { - static bankhandler unknown_handler = { unknown_r, unknown_w, 0, NULL }; + static const bankhandler unknown_handler = { unknown_r, unknown_w, 0, NULL }; int bank; /* Point all of our bankhandlers to the error handlers */ diff --git a/src/mame/machine/opwolf.c b/src/mame/machine/opwolf.c index efd244f010b..b1c4cfdfc93 100644 --- a/src/mame/machine/opwolf.c +++ b/src/mame/machine/opwolf.c @@ -272,7 +272,7 @@ static const UINT16 level_data_06[0xcc] = 0x0300,0x4e01,0x5006,0x0042 }; -static const UINT16* level_data_lookup[] = +static const UINT16 *const level_data_lookup[] = { level_data_00, level_data_01, diff --git a/src/mame/machine/slikshot.c b/src/mame/machine/slikshot.c index 7fe346b2b81..7b0edc27c21 100644 --- a/src/mame/machine/slikshot.c +++ b/src/mame/machine/slikshot.c @@ -90,8 +90,6 @@ static int curxpos; static int last_ytotal; static UINT8 crosshair_vis; -static int crosshair_min; -static int crosshair_max; @@ -532,22 +530,6 @@ WRITE8_HANDLER( slikshot_z80_control_w ) -/************************************* - * - * slikshot_set_crosshair_range - * - * set the range for the crosshair - * - *************************************/ - -void slikshot_set_crosshair_range(int miny, int maxy) -{ - crosshair_min = miny; - crosshair_max = maxy; -} - - - /************************************* * * video_update_slikshot @@ -612,14 +594,6 @@ VIDEO_UPDATE( slikshot ) memset(ybuffer, 0, sizeof(ybuffer)); } - /* draw a crosshair (rotated) */ - if (crosshair_vis) - { -// if ((machine->gamedrv->flags & ORIENTATION_MASK) == ROT90) -// draw_crosshair(bitmap, 256 - 48, (crosshair_min + crosshair_max) / 2 - (curxpos * (crosshair_max - crosshair_min) / 0x100), cliprect, 0); -// else -// draw_crosshair(bitmap, 48, (crosshair_min + crosshair_max) / 2 + (curxpos * (crosshair_max - crosshair_min) / 0x100), cliprect, 0); - } return 0; } diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index 58e6bafdcb2..a0b442f3089 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -1550,6 +1550,15 @@ static void make_dir_current(UINT32 fad) } } +void stvcd_exit(running_machine* machine) +{ + if (curdir != (direntryT *)NULL) + { + free((void *)curdir); + curdir = (direntryT *)NULL; + } +} + static void cd_readTOC(void) { int i, ntrks, toclen, tocptr, fad; diff --git a/src/mame/machine/stvcd.h b/src/mame/machine/stvcd.h index 46d264d6d73..11ca4a5ff21 100644 --- a/src/mame/machine/stvcd.h +++ b/src/mame/machine/stvcd.h @@ -10,6 +10,7 @@ #define __STVCD_H__ void stvcd_reset(void); +void stvcd_exit(running_machine* machine); READ32_HANDLER( stvcd_r ); WRITE32_HANDLER( stvcd_w ); diff --git a/src/mame/machine/tx1.c b/src/mame/machine/tx1.c index 4cf3134049e..0b1930d7014 100644 --- a/src/mame/machine/tx1.c +++ b/src/mame/machine/tx1.c @@ -7,7 +7,7 @@ #include "driver.h" static INT16 AU_DATA; -static INT16 *AU_PTR = &AU_DATA; +static INT16 *const AU_PTR = &AU_DATA; static UINT16 inst_index; /* Internal registers and so forth */ diff --git a/src/mame/mame.mak b/src/mame/mame.mak index 2449f6055d0..c43ed934c27 100644 --- a/src/mame/mame.mak +++ b/src/mame/mame.mak @@ -287,6 +287,7 @@ SOUNDS += RF5C400 SOUNDS += SPEAKER SOUNDS += CDP1869 SOUNDS += S14001A +SOUNDS += M58817 SOUNDS += BEEP #SOUNDS += WAVE #SOUNDS += SID6581 diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c index 7d2854cddc7..3452529a4ef 100644 --- a/src/mame/mamedriv.c +++ b/src/mame/mamedriv.c @@ -950,6 +950,7 @@ const game_driver * const drivers[] = DRIVER( 8ballat2 ) /* (c) 1984 Seatongrove Ltd (Magic Eletronics USA licence) */ DRIVER( shootgal ) /* (c) 1984 Seatongrove Ltd (Zaccaria licence) */ DRIVER( drakton ) /* (c) 1984 Epos Corporation */ + DRIVER( drktnjr ) /* (c) 1984 Epos Corporation */ DRIVER( strtheat ) /* (c) 1985 Epos Corporation */ DRIVER( hunchbkd ) /* (c) 1983 Century */ DRIVER( sbdk ) /* (c) 1984 Century */ @@ -5458,6 +5459,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11 DRIVER( 2020bba ) /* 0030 (c) 1991 SNK / Pallas */ DRIVER( 2020bbh ) /* 0030 (c) 1991 SNK / Pallas */ DRIVER( socbrawl ) /* 0031 (c) 1991 SNK */ + DRIVER( socbrala ) /* 0031 (c) 1991 SNK */ DRIVER( roboarmy ) /* 0032 (c) 1991 SNK */ DRIVER( roboarma ) /* 0032 (c) 1991 SNK */ DRIVER( fatfury1 ) /* 0033 (c) 1991 SNK */ @@ -5539,6 +5541,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11 DRIVER( sonicwi3 ) /* 0097 (c) 1995 Video System Co. */ /* 0098 Idol Mahjong - final romance 2 (CD only? not confirmed, MVS might exist) */ /* 0099 Neo Pool Masters */ + /* 0160 Japanese MVS cart; No bootleg (c) 1997/1998 SNK */ DRIVER( turfmast ) /* 0200 (c) 1996 Nazca */ DRIVER( mslug ) /* 0201 (c) 1996 Nazca */ DRIVER( puzzledp ) /* 0202 (c) 1995 Taito (Visco license) */ @@ -6173,6 +6176,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11 DRIVER( raiden2a ) /* (c) 1993 Seibu Kaihatsu + Metrotainment license */ DRIVER( raiden2b ) /* (c) 1993 Seibu Kaihatsu */ DRIVER( raiden2c ) /* (c) 1993 Seibu Kaihatsu */ + DRIVER( raiden2d ) /* (c) 1993 Seibu Kaihatsu */ DRIVER( raiden2e ) /* (c) 1993 Seibu Kaihatsu */ DRIVER( raidndx ) /* (c) 1993 Seibu Kaihatsu */ DRIVER( raidndxa ) /* (c) 1993 Seibu Kaihatsu */ diff --git a/src/mame/video/aeroboto.c b/src/mame/video/aeroboto.c index cbc8801c491..29056aaf711 100644 --- a/src/mame/video/aeroboto.c +++ b/src/mame/video/aeroboto.c @@ -144,8 +144,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re VIDEO_UPDATE( aeroboto ) { - static rectangle splitrect1 = { 0, 255, 0, 39 }; - static rectangle splitrect2 = { 0, 255, 40, 255 }; + static const rectangle splitrect1 = { 0, 255, 0, 39 }; + static const rectangle splitrect2 = { 0, 255, 40, 255 }; static int sx=0, sy=0; static UINT8 ox=0, oy=0; UINT8 *src_base, *src_colptr, *src_rowptr; diff --git a/src/mame/video/bfm_adr2.c b/src/mame/video/bfm_adr2.c index d6892c4ad39..f87515ac077 100644 --- a/src/mame/video/bfm_adr2.c +++ b/src/mame/video/bfm_adr2.c @@ -212,7 +212,7 @@ VIDEO_START( adder2 ) } // video update /////////////////////////////////////////////////////////// -static rectangle visible1 = { 0, 400-1, 0, 280-1 }; //minx,maxx, miny,maxy +static const rectangle visible1 = { 0, 400-1, 0, 280-1 }; //minx,maxx, miny,maxy VIDEO_UPDATE( adder2 ) { diff --git a/src/mame/video/bking2.c b/src/mame/video/bking2.c index 688c940af62..cea0d46e1b3 100644 --- a/src/mame/video/bking2.c +++ b/src/mame/video/bking2.c @@ -284,7 +284,7 @@ VIDEO_UPDATE( bking2 ) VIDEO_EOF( bking2 ) { - static rectangle rect = { 0, 7, 0, 15 }; + static const rectangle rect = { 0, 7, 0, 15 }; int xld = 0; int yld = 0; diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c index cb9397c7482..dcd82190304 100644 --- a/src/mame/video/digdug.c +++ b/src/mame/video/digdug.c @@ -248,7 +248,7 @@ WRITE8_HANDLER( digdug_PORT_w ) ***************************************************************************/ -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 2*8, 34*8-1, 0*8, 28*8-1 diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index e7f5274c64b..f41b45f7dcb 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -547,7 +547,7 @@ WRITE8_HANDLER( radarscp_grid_color_w ) dkong_state *state = Machine->driver_data; state->grid_col = (data & 0x07) ^ 0x07; - popmessage("Gridcol: %d", state->grid_col); + //popmessage("Gridcol: %d", state->grid_col); } WRITE8_HANDLER( dkong_flipscreen_w ) @@ -662,20 +662,23 @@ INLINE double CD4049(running_machine *machine, double x) * a period of roughly 4.4 ms */ +#define RC1 (2.2e3 * 22e-6) // 22e-6; +#define RC2 (10e3 * 33e-6) +#define RC31 (18e3 * 33e-6) +#define RC32 ((18e3 + 68e3) * 33e-6) +#define RC4 (90e3 * 0.47e-6) +#define dt (1./60./(double) VTOTAL) +#define period2 (((long long)(PIXEL_CLOCK) * ( 33L * 68L )) / (long)10000000L / 3) // period/2 in pixel ... + static void radarscp_step(running_machine *machine, int line_cnt) { dkong_state *state = machine->driver_data; /* Condensator is illegible in schematics for TRS2 board. * TRS1 board states 3.3u. */ - const double RC1= 2.2e3 * 22e-6;// 22e-6; - const double RC2= 10e3 * 33e-6; - const double RC31= 18e3 * 33e-6; - const double RC32= (18e3 + 68e3) * 33e-6; - const double RC4= 90e3 * 0.47e-6; - const double dt= 1./60./(double) VTOTAL; - const int period2 = ((long long)(PIXEL_CLOCK) * ( 33L * 68L )) / (long)10000000L / 3; // period/2 in pixel ... - static double cv1=0,cv2=0,vg1=0,vg2=0,vg3=0,vg3i=0,cv3=0,cv4=0; + + static double cv1=0,cv2=0,vg1=0,vg2=0,vg3=0,cv3=0,cv4=0; + double vg3i; static int pixelcnt = 0; double diff; int sig; @@ -683,8 +686,7 @@ static void radarscp_step(running_machine *machine, int line_cnt) line_cnt += 256; if (line_cnt>511) line_cnt -= VTOTAL; - //FIXME: remove after testing - //return; + /* sound2 mixes in a 30Hz noise signal. * With the current model this has no real effect * Included for completeness @@ -693,12 +695,16 @@ static void radarscp_step(running_machine *machine, int line_cnt) line_cnt++; if (line_cnt>=512) line_cnt=512-VTOTAL; + if ( ( !(line_cnt & 0x40) && ((line_cnt+1) & 0x40) ) && (mame_rand(Machine) > RAND_MAX/2)) state->sig30Hz = (1-state->sig30Hz); + state->rflip_sig = state->snd02_enable & state->sig30Hz; sig = state->rflip_sig ^ ((line_cnt & 0x80)>>7); + if (state->hardware_type == HARDWARE_TRS01) state->rflip_sig = !state->rflip_sig; + if (sig) // 128VF diff = (0.0 - cv1); else diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c index d08251cccfb..16ea6bc05ac 100644 --- a/src/mame/video/fastfred.c +++ b/src/mame/video/fastfred.c @@ -20,13 +20,13 @@ UINT8 *fastfred_attributesram; UINT8 *imago_fg_videoram; -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 2*8, 32*8-1, 2*8, 30*8-1 }; -static rectangle spritevisibleareaflipx = +static const rectangle spritevisibleareaflipx = { 0*8, 30*8-1, 2*8, 30*8-1 diff --git a/src/mame/video/galaxian.c b/src/mame/video/galaxian.c index 32f3e9fa863..a974542b055 100644 --- a/src/mame/video/galaxian.c +++ b/src/mame/video/galaxian.c @@ -7,19 +7,19 @@ #include "driver.h" #include "includes/galaxian.h" -static rectangle _spritevisiblearea = +static const rectangle _spritevisiblearea = { 2*8+1, 32*8-1, 2*8, 30*8-1 }; -static rectangle _spritevisibleareaflipx = +static const rectangle _spritevisibleareaflipx = { 0*8, 30*8-2, 2*8, 30*8-1 }; -static rectangle* spritevisiblearea; -static rectangle* spritevisibleareaflipx; +static const rectangle* spritevisiblearea; +static const rectangle* spritevisibleareaflipx; #define STARS_COLOR_BASE (memory_region_length(REGION_PROMS)) diff --git a/src/mame/video/mermaid.c b/src/mame/video/mermaid.c index 6f736e06621..d8db0338c20 100644 --- a/src/mame/video/mermaid.c +++ b/src/mame/video/mermaid.c @@ -8,13 +8,13 @@ UINT8* mermaid_fg_scrollram; static int rougien_gfxbank1, rougien_gfxbank2; -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 0*8, 26*8-1, 2*8, 30*8-1 }; -static rectangle flip_spritevisiblearea = +static const rectangle flip_spritevisiblearea = { 6*8, 31*8-1, 2*8, 30*8-1 diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c index 7233cab913a..1050a017201 100644 --- a/src/mame/video/midzeus.c +++ b/src/mame/video/midzeus.c @@ -18,6 +18,8 @@ * *************************************/ +#define DUMP_WAVE_RAM 0 + #define WAVERAM_WIDTH 512 #define WAVERAM_HEIGHT 2048 @@ -243,6 +245,7 @@ VIDEO_START( midzeus ) static void exit_handler(running_machine *machine) { +#if DUMP_WAVE_RAM FILE *f = fopen("waveram.dmp", "w"); int bank; int i; @@ -255,6 +258,7 @@ static void exit_handler(running_machine *machine) if (i % 4 == 3) fprintf(f, "\n"); } fclose(f); +#endif poly_free(poly); } diff --git a/src/mame/video/model1.c b/src/mame/video/model1.c index d0f5eb2b184..161e74c0943 100644 --- a/src/mame/video/model1.c +++ b/src/mame/video/model1.c @@ -571,7 +571,7 @@ static struct point *fclip_clip_right(struct point *p1, struct point *p2) return pointpt++; } -static struct { +static const struct { int (*isclipped)(struct point *p); struct point *(*clip)(struct point *p1, struct point *p2); } clipfn[4] = { diff --git a/src/mame/video/naughtyb.c b/src/mame/video/naughtyb.c index 997e61dbe62..d2cb7c1f86d 100644 --- a/src/mame/video/naughtyb.c +++ b/src/mame/video/naughtyb.c @@ -26,19 +26,19 @@ static int bankreg; // true if cabinet == cocktail -AND- handling player 2 int naughtyb_cocktail; -static rectangle scrollvisiblearea = +static const rectangle scrollvisiblearea = { 2*8, 34*8-1, 0*8, 28*8-1 }; -static rectangle leftvisiblearea = +static const rectangle leftvisiblearea = { 0*8, 2*8-1, 0*8, 28*8-1 }; -static rectangle rightvisiblearea = +static const rectangle rightvisiblearea = { 34*8, 36*8-1, 0*8, 28*8-1 diff --git a/src/mame/video/neogeo.c b/src/mame/video/neogeo.c index c9329c7e436..25d8ab0208f 100644 --- a/src/mame/video/neogeo.c +++ b/src/mame/video/neogeo.c @@ -864,6 +864,12 @@ VIDEO_START( neogeo ) pens = auto_malloc(NUM_PENS * sizeof(pen_t)); neogeo_videoram = auto_malloc(0x20000); + /* clear allocated memory */ + memset(palettes[0],0x00, NUM_PENS * sizeof(UINT16)); + memset(palettes[1],0x00, NUM_PENS * sizeof(UINT16)); + memset(pens,0x00, NUM_PENS * sizeof(pen_t)); + memset(neogeo_videoram,0x00, 0x20000); + compute_rgb_weights(); create_sprite_line_timer(); create_auto_animation_timer(); diff --git a/src/mame/video/pacman.c b/src/mame/video/pacman.c index 05298e29851..9be86130a12 100644 --- a/src/mame/video/pacman.c +++ b/src/mame/video/pacman.c @@ -32,7 +32,7 @@ static int xoffsethack; UINT8 *s2650games_spriteram; UINT8 *s2650games_tileram; -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 2*8, 34*8-1, 0*8, 28*8-1 diff --git a/src/mame/video/pingpong.c b/src/mame/video/pingpong.c index 314a274429a..402e2724ad3 100644 --- a/src/mame/video/pingpong.c +++ b/src/mame/video/pingpong.c @@ -14,7 +14,7 @@ static tilemap *bg_tilemap; /* This is strange; it's unlikely that the sprites actually have a hardware */ /* clipping region, but I haven't found another way to have them masked by */ /* the characters at the top and bottom of the screen. */ -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 0*8, 32*8-1, 4*8, 29*8-1 diff --git a/src/mame/video/retofinv.c b/src/mame/video/retofinv.c index 236b81c1658..052c4ca7650 100644 --- a/src/mame/video/retofinv.c +++ b/src/mame/video/retofinv.c @@ -185,7 +185,7 @@ WRITE8_HANDLER( retofinv_gfx_ctrl_w ) static void draw_sprites(running_machine *machine, mame_bitmap *bitmap) { int offs; - static rectangle spritevisiblearea = + static const rectangle spritevisiblearea = { 2*8, 34*8-1, 0*8, 28*8-1 diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c index cb31b4ad413..04f267dcf8f 100644 --- a/src/mame/video/taito_f2.c +++ b/src/mame/video/taito_f2.c @@ -70,12 +70,17 @@ static INT32 f2_text_xoffs = 0; static int f2_tilemap_col_base = 0; static INT32 f2_game = 0; -static INT32 FOOTCHMP = 1; static UINT8 f2_tilepri[6]; // todo - move into taitoic.c static UINT8 f2_spritepri[6]; // todo - move into taitoic.c static UINT8 f2_spriteblendmode; // todo - move into taitoic.c +enum +{ + FOOTCHMP = 1 +}; + + /***********************************************************************************/ static void taitof2_core_vh_start (running_machine *machine, int sprite_type,int hide,int flip_hide,int x_offs,int y_offs, diff --git a/src/mame/video/taitosj.c b/src/mame/video/taitosj.c index 1b75dc6cac6..5a520b5484e 100644 --- a/src/mame/video/taitosj.c +++ b/src/mame/video/taitosj.c @@ -644,12 +644,12 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap) Note that the clipping is asymmetrical. This matches the real thing. I'm not sure of what should happen when the screen is flipped, though. */ - static rectangle spritevisiblearea = + static const rectangle spritevisiblearea = { 0*8+3, 32*8-1-1, 2*8, 30*8-1 }; - static rectangle spritevisibleareaflip = + static const rectangle spritevisibleareaflip = { 0*8+1, 32*8-3-1, 2*8, 30*8-1 diff --git a/src/mame/video/thepit.c b/src/mame/video/thepit.c index f8272318afc..693d6b3f6e8 100644 --- a/src/mame/video/thepit.c +++ b/src/mame/video/thepit.c @@ -23,13 +23,13 @@ static tilemap *thepit_tilemap; static UINT8 *dummy_tile; -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 2*8+1, 32*8-1, 2*8, 30*8-1 }; -static rectangle spritevisibleareaflipx = +static const rectangle spritevisibleareaflipx = { 0*8, 30*8-2, 2*8, 30*8-1 diff --git a/src/mame/video/travrusa.c b/src/mame/video/travrusa.c index 5b0cb934a7b..0254ab7fd48 100644 --- a/src/mame/video/travrusa.c +++ b/src/mame/video/travrusa.c @@ -279,12 +279,12 @@ WRITE8_HANDLER( travrusa_flipscreen_w ) static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect) { int offs; - static rectangle spritevisiblearea = + static const rectangle spritevisiblearea = { 1*8, 31*8-1, 0*8, 24*8-1 }; - static rectangle spritevisibleareaflip = + static const rectangle spritevisibleareaflip = { 1*8, 31*8-1, 8*8, 32*8-1 diff --git a/src/mame/video/vigilant.c b/src/mame/video/vigilant.c index 9b3433906d1..3d4d76064d6 100644 --- a/src/mame/video/vigilant.c +++ b/src/mame/video/vigilant.c @@ -17,7 +17,7 @@ #include "driver.h" -static rectangle bottomvisiblearea = +static const rectangle bottomvisiblearea = { 16*8, 48*8-1, 6*8, 32*8-1 diff --git a/src/mame/video/wiz.c b/src/mame/video/wiz.c index ebfe421cda4..12ce15ce2a5 100644 --- a/src/mame/video/wiz.c +++ b/src/mame/video/wiz.c @@ -9,13 +9,13 @@ #include "driver.h" -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 2*8, 32*8-1, 2*8, 30*8-1 }; -static rectangle spritevisibleareaflipx = +static const rectangle spritevisibleareaflipx = { 0*8, 30*8-1, 2*8, 30*8-1 diff --git a/src/mame/video/yard.c b/src/mame/video/yard.c index 5aafaa79b7d..02f85af12cc 100644 --- a/src/mame/video/yard.c +++ b/src/mame/video/yard.c @@ -26,13 +26,13 @@ static tilemap *bg_tilemap; #define TOTAL_COLORS(gfxn) (machine->gfx[gfxn]->total_colors * machine->gfx[gfxn]->color_granularity) #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) -static rectangle clippanel = +static const rectangle clippanel = { 26*8, 32*8-1, 1*8, 31*8-1 }; -static rectangle clippanelflip = +static const rectangle clippanelflip = { 0*8, 6*8-1, 1*8, 31*8-1 diff --git a/src/mame/video/zaccaria.c b/src/mame/video/zaccaria.c index 46342c1995c..2853605e1ee 100644 --- a/src/mame/video/zaccaria.c +++ b/src/mame/video/zaccaria.c @@ -14,12 +14,12 @@ UINT8 *zaccaria_videoram,*zaccaria_attributesram; static tilemap *bg_tilemap; -static rectangle spritevisiblearea = +static const rectangle spritevisiblearea = { 2*8+1, 29*8-1, 2*8, 30*8-1 }; -static rectangle spritevisiblearea_flipx = +static const rectangle spritevisiblearea_flipx = { 3*8+1, 30*8-1, 2*8, 30*8-1 diff --git a/src/osd/windows/input.c b/src/osd/windows/input.c index abbdfe7336f..5c7dc4d8c6f 100644 --- a/src/osd/windows/input.c +++ b/src/osd/windows/input.c @@ -2032,8 +2032,8 @@ static void rawinput_mouse_update(HANDLE device, RAWMOUSE *data) // otherwise, update it as a lightgun else { - devinfo->mouse.raw_x = normalize_absolute_axis(data->lLastX, 0, 0xffff); - devinfo->mouse.raw_y = normalize_absolute_axis(data->lLastY, 0, 0xffff); + devinfo->mouse.state.lX = normalize_absolute_axis(data->lLastX, 0, 0xffff); + devinfo->mouse.state.lY = normalize_absolute_axis(data->lLastY, 0, 0xffff); // also clear the polling function so win32_lightgun_poll isn't called devinfo->poll = NULL; diff --git a/src/tools/chdman.c b/src/tools/chdman.c index fe276d3ba90..e154b62c198 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -59,7 +59,7 @@ static chd_error chdman_compress_chd(chd_file *chd, chd_file *source, UINT32 tot GLOBAL VARIABLES ***************************************************************************/ -static const char *error_strings[] = +static const char *const error_strings[] = { "no error", "no drive interface", diff --git a/src/tools/regrep.c b/src/tools/regrep.c index 97bd2b9c17b..e45f27d76c8 100644 --- a/src/tools/regrep.c +++ b/src/tools/regrep.c @@ -88,7 +88,7 @@ static summary_file *filehash[128][128]; static summary_list lists[MAX_COMPARES]; static int list_count; -static const char *bucket_name[] = +static const char *const bucket_name[] = { "Unknown", "Games That Have Improved", @@ -112,7 +112,7 @@ static const int bucket_output_order[] = BUCKET_CONSISTENT_ERROR }; -static const char *status_text[] = +static const char *const status_text[] = { "", "Success", @@ -124,7 +124,7 @@ static const char *status_text[] = "Other Unknown Error" }; -static const char *status_color[] = +static const char *const status_color[] = { "", "bgcolor=\"#00A000\"", diff --git a/src/tools/romcmp.c b/src/tools/romcmp.c index dbef0effa7c..7e1f4305c46 100644 --- a/src/tools/romcmp.c +++ b/src/tools/romcmp.c @@ -51,7 +51,7 @@ enum { MODE_A, MODE_E, MODE_O, MODE_E12, MODE_O12, MODE_E22, MODE_O22, TOTAL_MODES }; -const char *modenames[] = +const char *const modenames[] = { " ", "[bits 0-3]", diff --git a/src/version.c b/src/version.c index cce759e05ba..d89e2ee7a90 100644 --- a/src/version.c +++ b/src/version.c @@ -9,4 +9,4 @@ ***************************************************************************/ -char build_version[] = "0.121u4 ("__DATE__")"; +const char build_version[] = "0.122 ("__DATE__")";