diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-06-17 15:19:10 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-06-17 15:19:10 +0000 |
commit | 2d035a1c6ad3555a4baefcb02937b7067ed62961 (patch) | |
tree | 9a78e771b7f3fc422dc571b767cd7109468346a0 | |
parent | 0fab88feb36eaba55fa087e5bb06350f2ad7d6cc (diff) |
Cleanups and version bump.mame0125u6
39 files changed, 175 insertions, 175 deletions
diff --git a/src/emu/cpu/drcuml.c b/src/emu/cpu/drcuml.c index c68cfa24523..a3e46bfbcf9 100644 --- a/src/emu/cpu/drcuml.c +++ b/src/emu/cpu/drcuml.c @@ -1960,7 +1960,7 @@ static const bevalidate_test bevalidate_test_list[] = TEST_ENTRY_3F(SUBB, 8, 0x8123456789abcdef, 0x0000000000000000, 0x7edcba9876543210, DRCUML_FLAG_C, DRCUML_FLAG_C | DRCUML_FLAG_S) TEST_ENTRY_3F(SUBB, 8, 0x123456789abcdef0, 0x123456789abcdef0, 0xffffffffffffffff, DRCUML_FLAG_C, DRCUML_FLAG_C) TEST_ENTRY_3F(SUBB, 8, 0x0000000000000000, 0x123456789abcdef0, 0x123456789abcdeef, DRCUML_FLAG_C, DRCUML_FLAG_Z) - + TEST_ENTRY_2(CMP, 4, 0x7fffffff, 0x6dcba987, 0) TEST_ENTRY_2(CMP, 4, 0x80000000, 0x6dcba988, DRCUML_FLAG_V) TEST_ENTRY_2(CMP, 4, 0xffffffff, 0x6dcba987, DRCUML_FLAG_S) @@ -1978,7 +1978,7 @@ static const bevalidate_test bevalidate_test_list[] = TEST_ENTRY_4(MULU, 4, 0x00000000, 0x00000000, 0x11111111, 0x00000000, DRCUML_FLAG_Z) TEST_ENTRY_4(MULU, 4, 0xea61d951, 0x37c048d0, 0x77777777, 0x77777777, DRCUML_FLAG_V) TEST_ENTRY_4(MULU, 4, 0x32323233, 0xcdcdcdcc, 0xcdcdcdcd, 0xffffffff, DRCUML_FLAG_V | DRCUML_FLAG_S) - + TEST_ENTRY_4(MULU, 8, 0x7777777777777777, 0x0000000000000000, 0x1111111111111111, 0x0000000000000007, 0) TEST_ENTRY_4(MULU, 8, 0xffffffffffffffff, 0x0000000000000000, 0x1111111111111111, 0x000000000000000f, 0) TEST_ENTRY_4(MULU, 8, 0x0000000000000000, 0x0000000000000000, 0x1111111111111111, 0x0000000000000000, DRCUML_FLAG_Z) @@ -1990,7 +1990,7 @@ static const bevalidate_test bevalidate_test_list[] = TEST_ENTRY_4(MULS, 4, 0x00000000, 0x00000000, 0x11111111, 0x00000000, DRCUML_FLAG_Z) TEST_ENTRY_4(MULS, 4, 0x9e26af38, 0xc83fb72e, 0x77777777, 0x88888888, DRCUML_FLAG_V | DRCUML_FLAG_S) TEST_ENTRY_4(MULS, 4, 0x32323233, 0x00000000, 0xcdcdcdcd, 0xffffffff, 0) - + TEST_ENTRY_4(MULS, 8, 0x7777777777777777, 0x0000000000000000, 0x1111111111111111, 0x0000000000000007, 0) TEST_ENTRY_4(MULS, 8, 0xffffffffffffffff, 0x0000000000000000, 0x1111111111111111, 0x000000000000000f, DRCUML_FLAG_V) TEST_ENTRY_4(MULS, 8, 0x0000000000000000, 0x0000000000000000, 0x1111111111111111, 0x0000000000000000, DRCUML_FLAG_Z) @@ -2125,7 +2125,7 @@ static void bevalidate_iterate_over_params(drcuml_state *drcuml, drcuml_codehand for (pscannum = 0; pscannum < pnum; pscannum++) if ((opinfo->param[pscannum].output & PIO_IN) && ptype == paramlist[pscannum].type && pindex == paramlist[pscannum].value) skip = TRUE; - + /* can't duplicate multiple dest parameters */ if (opinfo->param[pnum].output & PIO_OUT) diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c index 74d1a8f8bac..97969495ed7 100644 --- a/src/emu/cpu/mips/mips3com.c +++ b/src/emu/cpu/mips/mips3com.c @@ -113,7 +113,7 @@ void mips3com_exit(mips3_state *mips) void mips3com_reset(mips3_state *mips) { int tlbindex; - + /* initialize the state */ mips->pc = 0xbfc00000; mips->cpr[0][COP0_Status] = SR_BEV | SR_ERL; @@ -789,7 +789,7 @@ static void tlb_map_entry(mips3_state *mips, int tlbindex) mips3_tlb_entry *entry = &mips->tlb[tlbindex]; UINT32 count, vpn; int which; - + /* the ASID doesn't match the current ASID, and if the page isn't global, unmap it from the TLB */ if (!tlb_entry_matches_asid(entry, current_asid) && !tlb_entry_is_global(entry)) { @@ -817,16 +817,16 @@ static void tlb_map_entry(mips3_state *mips, int tlbindex) UINT64 lo = entry->entry_lo[which]; UINT32 pfn = (lo >> 6) & 0x00ffffff; UINT32 flags = 0; - + /* valid? */ if ((lo & 2) != 0) { flags |= VTLB_FLAG_VALID | VTLB_READ_ALLOWED | VTLB_FETCH_ALLOWED; - + /* writable? */ if ((lo & 4) != 0) flags |= VTLB_WRITE_ALLOWED; - + /* mirror the flags for user mode if the VPN is in user space */ if (effvpn < (0x80000000 >> MIPS3_MIN_PAGE_SHIFT)) flags |= (flags << 4) & (VTLB_USER_READ_ALLOWED | VTLB_USER_WRITE_ALLOWED | VTLB_USER_FETCH_ALLOWED); diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c index 225f58dfe19..8c9b380eadc 100644 --- a/src/emu/cpu/mips/mips3drc.c +++ b/src/emu/cpu/mips/mips3drc.c @@ -1586,7 +1586,7 @@ static void generate_sequence_instruction(drcuml_block *block, compiler_state *c if ((desc->flags & OPFLAG_VALIDATE_TLB) && (desc->pc < 0x80000000 || desc->pc >= 0xc0000000)) { const vtlb_entry *tlbtable = vtlb_table(mips3->vtlb); - + /* if we currently have a valid TLB read entry, we just verify */ if (tlbtable[desc->pc >> 12] & VTLB_FETCH_ALLOWED) { diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c index 6a56669d009..07eb604c19f 100644 --- a/src/emu/cpu/powerpc/ppccom.c +++ b/src/emu/cpu/powerpc/ppccom.c @@ -236,7 +236,7 @@ void ppccom_exit(powerpc_state *ppc) void ppccom_reset(powerpc_state *ppc) { int tlbindex; - + /* initialize the OEA state */ if (ppc->cap & PPCCAP_OEA) { @@ -508,7 +508,7 @@ void ppccom_execute_tlbl(powerpc_state *ppc) int isitlb = ppc->param1; vtlb_entry flags = 0; int entrynum; - + /* determine entry number; we use rand() for associativity */ entrynum = ((address >> 12) & 0x1f) | (mame_rand(Machine) & 0x20) | (isitlb ? 0x40 : 0); diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c index 6ec4a47680c..da78e66d87c 100644 --- a/src/emu/cpu/powerpc/ppcdrc.c +++ b/src/emu/cpu/powerpc/ppcdrc.c @@ -1451,7 +1451,7 @@ static void static_generate_memory_accessor(drcuml_state *drcuml, int mode, int int tlbmiss = 0; int label = 1; int ramnum; - + if (mode & MODE_USER) translate_type = iswrite ? TRANSLATE_WRITE_USER : TRANSLATE_READ_USER; else @@ -2166,7 +2166,7 @@ static void generate_sequence_instruction(drcuml_block *block, compiler_state *c if ((desc->flags & OPFLAG_VALIDATE_TLB) && (ppc->impstate->mode & MODE_DATA_TRANSLATION)) { const vtlb_entry *tlbtable = vtlb_table(ppc->vtlb); - + /* if we currently have a valid TLB read entry, we just verify */ if (tlbtable[desc->pc >> 12] != 0) { diff --git a/src/emu/cpu/vtlb.c b/src/emu/cpu/vtlb.c index 932b3b4c5a5..921cd01551b 100644 --- a/src/emu/cpu/vtlb.c +++ b/src/emu/cpu/vtlb.c @@ -48,18 +48,18 @@ struct _vtlb_state ***************************************************************************/ /*------------------------------------------------- - vtlb_alloc - allocate a new VTLB for the + vtlb_alloc - allocate a new VTLB for the given CPU -------------------------------------------------*/ vtlb_state *vtlb_alloc(int cpunum, int space, int fixed_entries, int dynamic_entries) { vtlb_state *vtlb; - + /* allocate memory for the core structure */ vtlb = malloc_or_die(sizeof(*vtlb)); memset(vtlb, 0, sizeof(*vtlb)); - + /* fill in CPU information */ vtlb->space = space; vtlb->dynamic = dynamic_entries; @@ -72,22 +72,22 @@ vtlb_state *vtlb_alloc(int cpunum, int space, int fixed_entries, int dynamic_ent assert((1 << vtlb->pageshift) > VTLB_FLAGS_MASK); assert(vtlb->translate != NULL); assert(vtlb->addrwidth > vtlb->pageshift); - + /* allocate the entry array */ vtlb->live = malloc_or_die(sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries)); memset(vtlb->live, 0, sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries)); - + /* allocate the lookup table */ vtlb->table = malloc_or_die(sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift)); memset(vtlb->table, 0, sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift)); - + /* allocate the fixed page count array */ if (fixed_entries > 0) { vtlb->fixedpages = malloc_or_die(sizeof(vtlb->fixedpages[0]) * fixed_entries); memset(vtlb->fixedpages, 0, sizeof(vtlb->fixedpages[0]) * fixed_entries); } - + return vtlb; } @@ -108,7 +108,7 @@ void vtlb_free(vtlb_state *vtlb) if (vtlb->table != NULL) free(vtlb->table); - /* and then the VTLB object itself */ + /* and then the VTLB object itself */ free(vtlb); } @@ -119,7 +119,7 @@ void vtlb_free(vtlb_state *vtlb) ***************************************************************************/ /*------------------------------------------------- - vtlb_fill - rcalled by the CPU core in + vtlb_fill - rcalled by the CPU core in response to an unmapped access -------------------------------------------------*/ @@ -133,8 +133,8 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention) printf("vtlb_fill: %08X(%X) ... ", address, intention); /* should not be called here if the entry is in the table already */ -// assert((entry & (1 << intention)) == 0); - +// assert((entry & (1 << intention)) == 0); + /* if we have no dynamic entries, we always fail */ if (vtlb->dynamic == 0) { @@ -142,7 +142,7 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention) printf("failed: no dynamic entries\n"); return FALSE; } - + /* ask the CPU core to translate for us */ taddress = address; if (!(*vtlb->translate)(vtlb->space, intention, &taddress)) @@ -151,19 +151,19 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention) printf("failed: no translation\n"); return FALSE; } - + /* if this is the first successful translation for this address, allocate a new entry */ if ((entry & VTLB_FLAGS_MASK) == 0) { int liveindex = vtlb->dynindex++ % vtlb->dynamic; - + /* if an entry already exists at this index, free it */ if (vtlb->live[liveindex] != 0) vtlb->table[vtlb->live[liveindex] - 1] = 0; - + /* claim this new entry */ vtlb->live[liveindex] = tableindex + 1; - + /* form a new blank entry */ entry = (taddress >> vtlb->pageshift) << vtlb->pageshift; entry |= VTLB_FLAG_VALID; @@ -171,7 +171,7 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention) if (PRINTF_TLB) printf("success (%08X), new entry\n", taddress); } - + /* otherwise, ensure that different intentions do not produce different addresses */ else { @@ -181,7 +181,7 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention) if (PRINTF_TLB) printf("success (%08X), existing entry\n", taddress); } - + /* add the intention to the list of valid intentions and store */ entry |= 1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK)); vtlb->table[tableindex] = entry; @@ -201,10 +201,10 @@ void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtl /* must be in range */ assert(entrynum >= 0 && entrynum < vtlb->fixed); - + if (PRINTF_TLB) printf("vtlb_load %d for %d pages at %08X == %08X\n", entrynum, numpages, address, value); - + /* if an entry already exists at this index, free it */ if (vtlb->live[liveindex] != 0) { @@ -212,7 +212,7 @@ void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtl for (pagenum = 0; pagenum < pagecount; pagenum++) vtlb->table[vtlb->live[liveindex] - 1 + pagenum] = 0; } - + /* claim this new entry */ vtlb->live[liveindex] = tableindex + 1; @@ -229,7 +229,7 @@ void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtl ***************************************************************************/ /*------------------------------------------------- - vtlb_flush_dynamic - flush all knowledge + vtlb_flush_dynamic - flush all knowledge from the dynamic part of the VTLB -------------------------------------------------*/ @@ -239,7 +239,7 @@ void vtlb_flush_dynamic(vtlb_state *vtlb) if (PRINTF_TLB) printf("vtlb_flush_dynamic\n"); - + /* loop over live entries and release them from the table */ for (liveindex = 0; liveindex < vtlb->dynamic; liveindex++) if (vtlb->live[liveindex] != 0) @@ -252,17 +252,17 @@ void vtlb_flush_dynamic(vtlb_state *vtlb) /*------------------------------------------------- - vtlb_flush_address - flush knowledge of a + vtlb_flush_address - flush knowledge of a particular address from the VTLB -------------------------------------------------*/ void vtlb_flush_address(vtlb_state *vtlb, offs_t address) { offs_t tableindex = address >> vtlb->pageshift; - + if (PRINTF_TLB) printf("vtlb_flush_address %08X\n", address); - + /* free the entry in the table; for speed, we leave the entry in the live array */ vtlb->table[tableindex] = 0; } @@ -274,7 +274,7 @@ void vtlb_flush_address(vtlb_state *vtlb, offs_t address) ***************************************************************************/ /*------------------------------------------------- - vtlb_table - return a pointer to the base of + vtlb_table - return a pointer to the base of the linear VTLB lookup table -------------------------------------------------*/ diff --git a/src/emu/video.c b/src/emu/video.c index f81ee8c1815..16336365a7a 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -353,15 +353,15 @@ void video_init(running_machine *machine) else global.snap_target = render_target_alloc(NULL, RENDER_CREATE_HIDDEN); assert(global.snap_target != NULL); - + /* if we are using the native layout, turn off all accoutrements */ if (global.snap_native) render_target_set_layer_config(global.snap_target, 0); - + /* otherwise, find the requested view and select it */ else render_target_set_view(global.snap_target, video_get_view_for_target(machine, global.snap_target, viewname, 0, 1)); - + /* extract snap resolution if present */ if (sscanf(options_get_string(mame_options(), OPTION_SNAPSIZE), "%dx%d", &global.snap_width, &global.snap_height) != 2) global.snap_width = global.snap_height = 0; @@ -2173,7 +2173,7 @@ void video_save_active_screen_snapshots(running_machine *machine) /* validate */ assert(machine != NULL); assert(machine->config != NULL); - + /* if we're native, then write one snapshot per visible screen */ if (global.snap_native) { @@ -2189,7 +2189,7 @@ void video_save_active_screen_snapshots(running_machine *machine) } } } - + /* otherwise, just write a single snapshot */ else { @@ -2501,7 +2501,7 @@ void video_avi_begin_recording(running_machine *machine, const char *name) filerr = mame_fopen(SEARCHPATH_MOVIE, name, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &tempfile); else filerr = mame_fopen_next(machine, SEARCHPATH_MOVIE, "avi", &tempfile); - + /* reset our tracking */ global.movie_frame = 0; global.movie_next_frame_time = timer_get_time(); @@ -2551,7 +2551,7 @@ static void video_avi_record_frame(running_machine *machine) avi_error avierr; profiler_mark(PROFILER_MOVIE_REC); - + /* create the bitmap */ create_snapshot_bitmap(NULL); @@ -2674,7 +2674,7 @@ int video_get_view_for_target(running_machine *machine, render_target *target, c /* make sure it's a valid view */ if (render_target_get_view_name(target, viewindex) == NULL) viewindex = 0; - + return viewindex; } diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index 2430c63633f..2e9d944af85 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -835,7 +835,7 @@ static MACHINE_DRIVER_START( crystal ) MACHINE_DRIVER_END /* - Top blade screen is 32 pixels wider + Top blade screen is 32 pixels wider */ static MACHINE_DRIVER_START( topbladv ) MDRV_IMPORT_FROM(crystal) @@ -971,8 +971,8 @@ static DRIVER_INIT(officeye) Rom[WORD_XOR_LE(0x4B2E2/2)]=0x9001; //PUSH R0 /* - Rom[WORD_XOR_LE(0x18880/2)]=0x9001; //PUSH R0 - Rom[WORD_XOR_LE(0x18882/2)]=0x9200; //PUSH SR + Rom[WORD_XOR_LE(0x18880/2)]=0x9001; //PUSH R0 + Rom[WORD_XOR_LE(0x18882/2)]=0x9200; //PUSH SR */ } diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c index ce090d116d7..a80b7354e38 100644 --- a/src/mame/drivers/darius.c +++ b/src/mame/drivers/darius.c @@ -636,7 +636,7 @@ static INPUT_PORTS_START( darius_common ) PORT_START_TAG("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index c5b8bbc3af3..8e86881a2f1 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -2831,7 +2831,7 @@ static READ8_HANDLER( hginga_input_r ) { static const char *keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" }; static const char *keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" }; - + switch( hginga_select ) { case 0x2d: @@ -4110,7 +4110,7 @@ static INPUT_PORTS_START( hanakanz ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 2 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -4152,7 +4152,7 @@ static INPUT_PORTS_START( hanakanz ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s" /* keyb 1 */ - + PORT_START_TAG("KEY5") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD) // E @@ -4338,7 +4338,7 @@ static INPUT_PORTS_START( hkagerou ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 2 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -4380,7 +4380,7 @@ static INPUT_PORTS_START( hkagerou ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s" /* keyb 1 */ - + PORT_START_TAG("KEY5") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD) // E @@ -4567,7 +4567,7 @@ static INPUT_PORTS_START( mjreach1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 2 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E @@ -4609,7 +4609,7 @@ static INPUT_PORTS_START( mjreach1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s" /* keyb 1 */ - + PORT_START_TAG("KEY5") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -4804,7 +4804,7 @@ static INPUT_PORTS_START( mjchuuka ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 2 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E @@ -4846,7 +4846,7 @@ static INPUT_PORTS_START( mjchuuka ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s" /* keyb 1 */ - + PORT_START_TAG("KEY5") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -5141,7 +5141,7 @@ static INPUT_PORTS_START( mjmyster ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 1 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -5324,7 +5324,7 @@ static INPUT_PORTS_START( hginga ) // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 2 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E @@ -5366,7 +5366,7 @@ static INPUT_PORTS_START( hginga ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // "s" /* keyb 1 */ - + PORT_START_TAG("KEY5") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -5548,7 +5548,7 @@ static INPUT_PORTS_START( hgokou ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 1 */ - + PORT_START_TAG("KEY0") /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD) // E @@ -5590,7 +5590,7 @@ static INPUT_PORTS_START( hgokou ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "s" /* keyb 2 */ - + PORT_START_TAG("KEY5") /* IN6 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E @@ -5766,7 +5766,7 @@ static INPUT_PORTS_START( mjmyornt ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 1 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -5949,7 +5949,7 @@ static INPUT_PORTS_START( mjmyuniv ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 1 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -6211,7 +6211,7 @@ static INPUT_PORTS_START( mjflove ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag /* keyb 1 */ - + PORT_START_TAG("KEY0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) // E @@ -6253,7 +6253,7 @@ static INPUT_PORTS_START( mjflove ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // "s" /* keyb 2 */ - + PORT_START_TAG("KEY5") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E @@ -6369,7 +6369,7 @@ static INPUT_PORTS_START( hparadis ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* keyb 1 */ - + PORT_START_TAG("KEY0") /* IN3 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD) // E @@ -6411,7 +6411,7 @@ static INPUT_PORTS_START( hparadis ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "s" /* keyb 2 */ - + PORT_START_TAG("KEY5") /* IN8 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2) // A PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2) // E diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index 20f6db5aeea..1691bac1070 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -551,8 +551,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( hnoridur_io_map, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE( 0x01, 0x07 ) AM_WRITE ( dynax_blitter_rev2_w ) // Blitter -// AM_RANGE( 0x10, 0x10 ) AM_WRITE ( SMH_NOP ) // CRT Controller -// AM_RANGE( 0x11, 0x11 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x10, 0x10 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x11, 0x11 ) AM_WRITE ( SMH_NOP ) // CRT Controller AM_RANGE( 0x20, 0x20 ) AM_WRITE ( hanamai_keyboard_w ) // keyboard row select AM_RANGE( 0x21, 0x21 ) AM_READ_PORT ( "IN0" ) // Coins AM_RANGE( 0x22, 0x22 ) AM_READ ( hanamai_keyboard_1_r ) // P2 @@ -756,8 +756,8 @@ static ADDRESS_MAP_START( sprtmtch_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE( 0x01, 0x07 ) AM_WRITE ( dynax_blitter_rev2_w ) // Blitter AM_RANGE( 0x10, 0x10 ) AM_READWRITE ( YM2203_status_port_0_r, YM2203_control_port_0_w ) // YM2203 AM_RANGE( 0x11, 0x11 ) AM_READWRITE ( YM2203_read_port_0_r, YM2203_write_port_0_w ) // 2 x DSW -// AM_RANGE( 0x12, 0x12 ) AM_WRITE ( SMH_NOP ) // CRT Controller -// AM_RANGE( 0x13, 0x13 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x12, 0x12 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x13, 0x13 ) AM_WRITE ( SMH_NOP ) // CRT Controller AM_RANGE( 0x20, 0x20 ) AM_READ_PORT ( "P1" ) // P1 AM_RANGE( 0x21, 0x21 ) AM_READ_PORT ( "P2" ) // P2 AM_RANGE( 0x22, 0x22 ) AM_READ_PORT ( "IN0" ) // Coins @@ -793,8 +793,8 @@ static ADDRESS_MAP_START( mjfriday_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE( 0x15, 0x15 ) AM_WRITE ( dynax_coincounter_1_w ) // AM_RANGE( 0x16, 0x17 ) AM_WRITE ( mjdialq2_layer_enable_w ) // Layers Enable AM_RANGE( 0x41, 0x47 ) AM_WRITE ( dynax_blitter_rev2_w ) // Blitter -// AM_RANGE( 0x50, 0x50 ) AM_WRITE ( SMH_NOP ) // CRT Controller -// AM_RANGE( 0x51, 0x51 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x50, 0x50 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x51, 0x51 ) AM_WRITE ( SMH_NOP ) // CRT Controller AM_RANGE( 0x60, 0x60 ) AM_WRITE ( hanamai_keyboard_w ) // keyboard row select AM_RANGE( 0x61, 0x61 ) AM_READ_PORT ( "IN0" ) // Coins AM_RANGE( 0x62, 0x62 ) AM_READ ( hanamai_keyboard_1_r ) // P2 @@ -803,7 +803,7 @@ static ADDRESS_MAP_START( mjfriday_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE( 0x67, 0x67 ) AM_READ_PORT ( "DSW1" ) // DSW AM_RANGE( 0x70, 0x70 ) AM_WRITE ( YM2413_register_port_0_w ) // YM2413 AM_RANGE( 0x71, 0x71 ) AM_WRITE ( YM2413_data_port_0_w ) // -// AM_RANGE( 0x80, 0x80 ) AM_WRITE ( SMH_NOP ) // IRQ ack? +// AM_RANGE( 0x80, 0x80 ) AM_WRITE ( SMH_NOP ) // IRQ ack? ADDRESS_MAP_END @@ -822,7 +822,7 @@ static ADDRESS_MAP_START( nanajign_io_map, ADDRESS_SPACE_IO, 8 ) AM_RANGE( 0x14, 0x14 ) AM_READ_PORT ( "DSW0" ) // DSW1 AM_RANGE( 0x15, 0x15 ) AM_READ_PORT ( "DSW1" ) // DSW2 AM_RANGE( 0x16, 0x16 ) AM_READ_PORT ( "DSW2" ) // DSW3 -// AM_RANGE( 0x20, 0x21 ) AM_WRITE ( SMH_NOP ) // CRT Controller +// AM_RANGE( 0x20, 0x21 ) AM_WRITE ( SMH_NOP ) // CRT Controller AM_RANGE( 0x31, 0x37 ) AM_WRITE ( dynax_blitter_rev2_w ) // Blitter AM_RANGE( 0x40, 0x40 ) AM_WRITE ( dynax_coincounter_0_w ) // Coin Counter AM_RANGE( 0x50, 0x50 ) AM_WRITE ( dynax_flipscreen_w ) // Flip Screen @@ -967,7 +967,7 @@ static READ8_HANDLER( mjelctrn_dsw_r ) { int dsw = (keyb & 0xc0) >> 6; static const char *dswnames[] = { "DSW2", "DSW1", "DSW3", "DSW4" }; - + return input_port_read(machine, dswnames[dsw]); } @@ -1200,7 +1200,7 @@ static WRITE8_HANDLER( tenkai_ip_w ) static READ8_HANDLER( tenkai_ip_r ) { static const char *keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" }; -// static const char *keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" }; +// static const char *keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" }; switch (offset) { @@ -3156,7 +3156,7 @@ static INPUT_PORTS_START( neruton ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18A PORT_INCLUDE( MAHJONG_KEYS ) - + /* 2008-06 FP: the following are needed to make happy the read handlers shared with mjelctrn*/ PORT_START_TAG("DSW3") PORT_START_TAG("DSW4") diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c index af06c9a76d4..eb8a6334fc7 100644 --- a/src/mame/drivers/exprraid.c +++ b/src/mame/drivers/exprraid.c @@ -289,12 +289,12 @@ static INTERRUPT_GEN( exprraid_interrupt ) if ((~input_port_read(machine, "IN2")) & 0xc0 ) { - if ( coin == 0 ) + if ( coin == 0 ) { coin = 1; cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); } - } + } else coin = 0; } diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index f7a97d7cd53..2b282115641 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -1484,7 +1484,7 @@ static TIMER_CALLBACK( keyboard_timer_callback ) static const char *keynames[] = { "KEYBOARD_P1", "KEYBOARD_P2" }; int keyboard; int i; - + for (keyboard=0; keyboard < 2; keyboard++) { UINT32 kbstate = input_port_read(machine, keynames[keyboard]); diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c index 4700ead2947..5d489def94d 100644 --- a/src/mame/drivers/firetrap.c +++ b/src/mame/drivers/firetrap.c @@ -544,9 +544,9 @@ static INTERRUPT_GEN( firetrap ) static int coin_command_pending=0; /* Check for coin IRQ */ - if (cpu_getiloops()) + if (cpu_getiloops()) { - if ((input_port_read(machine, "COIN") & 0x7) != 0x7 && !latch) + if ((input_port_read(machine, "COIN") & 0x7) != 0x7 && !latch) { coin_command_pending = ~input_port_read(machine, "COIN"); latch=1; diff --git a/src/mame/drivers/foodf.c b/src/mame/drivers/foodf.c index c2a31919874..c98c5251fd4 100644 --- a/src/mame/drivers/foodf.c +++ b/src/mame/drivers/foodf.c @@ -203,7 +203,7 @@ static WRITE16_HANDLER( digital_w ) static READ16_HANDLER( analog_r ) { static const char *portnames[] = { "STICK0_X", "STICK1_X", "STICK0_Y", "STICK1_Y" }; - + return input_port_read(machine, portnames[whichport]); } diff --git a/src/mame/drivers/funkybee.c b/src/mame/drivers/funkybee.c index becd7faa170..40c2de030d4 100644 --- a/src/mame/drivers/funkybee.c +++ b/src/mame/drivers/funkybee.c @@ -89,7 +89,7 @@ extern VIDEO_UPDATE( funkybee ); static READ8_HANDLER( funkybee_input_port_0_r ) { watchdog_reset_r(machine, 0); - return input_port_read(machine, "IN0"); + return input_port_read(machine, "IN0"); } static WRITE8_HANDLER( funkybee_coin_counter_w ) diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c index 076a8581305..b08bc25c761 100644 --- a/src/mame/drivers/gomoku.c +++ b/src/mame/drivers/gomoku.c @@ -50,7 +50,7 @@ static READ8_HANDLER( input_port_r ) { int i, res; static const char *portnames[] = { "IN0", "IN1", "DSW", "UNUSED0", "UNUSED1", "UNUSED2", "UNUSED3", "UNUSED4" }; - + res = 0; for (i = 0; i < 8; i++) res |= ((input_port_read(machine, portnames[i]) >> offset) & 1) << i; diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c index 3f25b010e8f..7a2516507ed 100644 --- a/src/mame/drivers/gstriker.c +++ b/src/mame/drivers/gstriker.c @@ -842,17 +842,17 @@ static WRITE16_HANDLER( twrldc94_prot_reg_w ) case 0x53: PC(0x0000a4c); break; // boot -> main loop /* - 68 and 62 could be sprite or sound changes, or ? - 68(),61() - if( !carry ) - { - 68(),65() - } - else - { - 62(),72() - } - */ + 68 and 62 could be sprite or sound changes, or ? + 68(),61() + if( !carry ) + { + 68(),65() + } + else + { + 62(),72() + } + */ case 0x68: PC(NULL_SUB); break; // time up doesn't block long enough for pk shootout case 0x61: PC(0x0003AF4); break; // after time up, pk shootout??? case 0x65: PC(0x0003F26); break; @@ -862,25 +862,25 @@ static WRITE16_HANDLER( twrldc94_prot_reg_w ) case 0x72: PC(0x000409E); break; // game over /* - Attract mode is pre programmed loop called from main - that runs through top11->demoplay - (NOTE: sprites for demo play are being drawn at 0x141000, - this address is used in a few places, and there's some activity - further up around 0x1410b0.) - - The loop begins with three prot calls: - one always present (may be diversion to 0x0010DC8 unreachable code - and prot cases 6a,79,6f) and two alternating calls. - The loop is 6e -> [6b|69] -> top11 -> (4 segment)playdemo - - These are the likely suspects for attract mode: - 0x0010E28 red tecmo on black - 0x0010EEC bouncing ball and player with game title - 0x00117A2 single segment demo play with player sprites at 0x140000 - 0x001120A sliding display of player photos - 0x0010DC8 unreachable code at end of attract loop with cases 6a,79,6f - - */ + Attract mode is pre programmed loop called from main + that runs through top11->demoplay + (NOTE: sprites for demo play are being drawn at 0x141000, + this address is used in a few places, and there's some activity + further up around 0x1410b0.) + + The loop begins with three prot calls: + one always present (may be diversion to 0x0010DC8 unreachable code + and prot cases 6a,79,6f) and two alternating calls. + The loop is 6e -> [6b|69] -> top11 -> (4 segment)playdemo + + These are the likely suspects for attract mode: + 0x0010E28 red tecmo on black + 0x0010EEC bouncing ball and player with game title + 0x00117A2 single segment demo play with player sprites at 0x140000 + 0x001120A sliding display of player photos + 0x0010DC8 unreachable code at end of attract loop with cases 6a,79,6f + + */ case 0x6e: PC(0x0010E28); break; // loop case 0x6b: PC(0x0010EEC); break; // attract even case 0x69: PC(0x001120A); break; // attract odd @@ -948,15 +948,15 @@ static READ16_HANDLER( twrldc94_prot_reg_r ) } /* - vgoalsoc uses a set of programmable timers. - There is a code implementation for at 00065F00 that appears to have - been RTSed out. - I'm guessing it was replaced with an external implementation. + vgoalsoc uses a set of programmable timers. + There is a code implementation for at 00065F00 that appears to have + been RTSed out. + I'm guessing it was replaced with an external implementation. - This does indicate though that the protection could be performing - other more complicated functions. + This does indicate though that the protection could be performing + other more complicated functions. - The tick count is usually set to 0x3c => it's driven off vblank? + The tick count is usually set to 0x3c => it's driven off vblank? */ //work_ram[ (0xffe900 - 0xffc00) ] #define COUNTER1_ENABLE work_ram[0x2900/2] >> 8 diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index b3f8a8b5715..8c9adbc0eae 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -275,7 +275,7 @@ static int adc1038_sars_r(running_machine *machine) static READ8_HANDLER( sysreg_r ) { static const char *portnames[] = { "IN0", "IN1", "IN2", "IN3" }; - + switch (offset) { case 0: diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c index 933b831a36b..26dbd014cd1 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -546,7 +546,7 @@ static READ16_HANDLER( wd1770_r ) static READ16_HANDLER( io_r ) { static const char *portnames[] = { "IN0", "IN1", "IN2" }; - + switch (offset) { case 0x00: diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index cc9aa69bf11..202efcf90ad 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -1606,7 +1606,7 @@ static READ8_HANDLER( coin_lockout_r ) static READ8_HANDLER( io_mirror_r ) { static const char *portnames[] = { "IN0", "IN1", "IN2", "IN3" }; - + return input_port_read(machine, portnames[offset]); } diff --git a/src/mame/drivers/hitme.c b/src/mame/drivers/hitme.c index 60dcaca4a7e..a9bb9207f89 100644 --- a/src/mame/drivers/hitme.c +++ b/src/mame/drivers/hitme.c @@ -129,7 +129,7 @@ static VIDEO_UPDATE(barricad) static UINT8 read_port_and_t0(running_machine *machine, int port) { static const char *portnames[] = { "IN0", "IN1", "IN2", "IN3" }; - + UINT8 val = input_port_read(machine, portnames[port]); if (attotime_compare(timer_get_time(), timeout_time) > 0) val ^= 0x80; diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index e05ecc2fc7d..0907bf9e34a 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -688,7 +688,7 @@ static READ8_HANDLER( sysreg_r ) { UINT8 r = 0; static const char *portnames[] = { "IN0", "IN1", "IN2" }; - + switch (offset) { case 0: diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c index cf2164e2a4e..709b16cee27 100644 --- a/src/mame/drivers/jalmah.c +++ b/src/mame/drivers/jalmah.c @@ -320,7 +320,7 @@ static void second_mcu_run(running_machine *machine) MCU_READ("KEY1", 0x0002, 0x200/2, 0x13); /*CHI*/ MCU_READ("KEY0", 0x0004, 0x200/2, 0x14); /*START1*/ -// MCU_READ("KEY0", 0x0004, 0x7b8/2, 0x03); /*START1(correct?) */ +// MCU_READ("KEY0", 0x0004, 0x7b8/2, 0x03); /*START1(correct?) */ } jm_regs[0x20c/2] = mame_rand(machine) & 0xffff; //kakumei2 diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c index 30caa53bbbd..475c2e7cb99 100644 --- a/src/mame/drivers/kinst.c +++ b/src/mame/drivers/kinst.c @@ -331,7 +331,7 @@ static READ32_HANDLER( kinst_control_r ) { UINT32 result; static const char *portnames[] = { "P1", "P2", "IN0", "IN1", "DSW" }; - + /* apply shuffling */ offset = control_map[offset / 2]; result = kinst_control[offset]; diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c index 6dcbc4dd237..644a93fd4e8 100644 --- a/src/mame/drivers/koikoi.c +++ b/src/mame/drivers/koikoi.c @@ -71,10 +71,10 @@ static READ8_HANDLER(vram_r) static READ8_HANDLER(input_r) { if(inputcnt<0) - { - return 0; + { + return 0; } - + if(!inputcnt) { int key=input_port_read(machine, "IN1"); @@ -88,17 +88,17 @@ static READ8_HANDLER(input_r) inputval=inputTab[keyval]&0x1f; inputlen=inputTab[keyval]>>5; } - + if(inputlen==++inputcnt) //return expected value { return inputval^0xff; } - + if(inputcnt>4) //end of cycle { inputcnt=-1; } - + return 0xff; //return 0^0xff } diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index a126937372c..610f8d6d78d 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -1329,14 +1329,14 @@ static MACHINE_DRIVER_START( konamigx ) MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) MDRV_SCREEN_ADD("main", RASTER) -// MDRV_SCREEN_RAW_PARAMS(6000000, 288+17+32+49, 0, 287, 224+17+8+16, 0, 223) +// MDRV_SCREEN_RAW_PARAMS(6000000, 288+17+32+49, 0, 287, 224+17+8+16, 0, 223) /* These parameters should be correct according to developer manual, - but sound and graphics of tbyahhoo's attract mode doesn't sync correctly. - (better than previous 60Hz, though) Setting refresh rate to 58Hz fixes this. - We have to check actual value written to the CCU. */ + but sound and graphics of tbyahhoo's attract mode doesn't sync correctly. + (better than previous 60Hz, though) Setting refresh rate to 58Hz fixes this. + We have to check actual value written to the CCU. */ MDRV_SCREEN_REFRESH_RATE(58) -// MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(600)) +// MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(600)) MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) MDRV_SCREEN_SIZE(64*8, 32*8) MDRV_SCREEN_VISIBLE_AREA(24, 24+288-1, 16, 16+224-1) diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c index 8da64d5dda9..6359ad4d9b6 100644 --- a/src/mame/drivers/liberate.c +++ b/src/mame/drivers/liberate.c @@ -499,12 +499,12 @@ static INTERRUPT_GEN( deco16_interrupt ) { static int latch = 0; int p = ~input_port_read(machine, "IN3"); - if ((p & 0x43) && !latch) + if ((p & 0x43) && !latch) { cpunum_set_input_line(machine, 0, DECO16_IRQ_LINE, ASSERT_LINE); latch = 1; - } - else + } + else { if (!(p & 0x43)) latch=0; diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c index be9a3b86ad2..ebcb7cb755a 100644 --- a/src/mame/drivers/megadriv.c +++ b/src/mame/drivers/megadriv.c @@ -1520,10 +1520,10 @@ INPUT_PORTS_START( ssf2ghw ) PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) -// PORT_START_TAG("RESET") /* Buttons on Genesis Console */ +// PORT_START_TAG("RESET") /* Buttons on Genesis Console */ // PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?) -// PORT_START_TAG("REGION") /* Buttons on Genesis Console */ +// PORT_START_TAG("REGION") /* Buttons on Genesis Console */ // /* Region setting for Console */ // PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) ) // PORT_DIPSETTING( 0x0000, "Use HazeMD Default Choice" ) @@ -1675,10 +1675,10 @@ INPUT_PORTS_START( aladbl ) PORT_START_TAG("IN0") /* 3rd I/O port */ -// PORT_START_TAG("RESET") /* Buttons on Genesis Console */ +// PORT_START_TAG("RESET") /* Buttons on Genesis Console */ // PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Reset Button") PORT_IMPULSE(1) // reset, resets 68k (and..?) -// PORT_START_TAG("REGION") /* Region setting for Console */ +// PORT_START_TAG("REGION") /* Region setting for Console */ // /* Region setting for Console */ // PORT_DIPNAME( 0x000f, 0x0000, DEF_STR( Region ) ) // PORT_DIPSETTING( 0x0000, "Use HazeMD Default Choice" ) diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c index a14b747f43a..e1b37c91ed2 100644 --- a/src/mame/drivers/pushman.c +++ b/src/mame/drivers/pushman.c @@ -15,7 +15,7 @@ The hardware is actually very similar to F1-Dream and Tiger Road but with a 68705 for protection. - There is a Top Tronic licensed version currently not dumped + There is a Top Tronic licensed version currently not dumped ************************************************************************** diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c index dfcb3764824..e9a4f63ec6f 100644 --- a/src/mame/drivers/segas18.c +++ b/src/mame/drivers/segas18.c @@ -324,7 +324,7 @@ static READ16_HANDLER( misc_io_r ) static const char *portnames[] = { "SERVICE", "COINAGE" }; offset &= 0x1fff; - + switch (offset & (0x3000/2)) { /* I/O chip */ diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c index 44f37e83437..d13e2b17910 100644 --- a/src/mame/drivers/segaxbd.c +++ b/src/mame/drivers/segaxbd.c @@ -1890,7 +1890,7 @@ ROM_START( smgp5 ) ROM_REGION( 0x80000, REGION_SOUND1, ROMREGION_ERASEFF ) /* Sega PCM sound data */ ROM_LOAD( "mpr12437.11", 0x00000, 0x20000, CRC(a1c7e712) SHA1(fa7fa8c39690ae5dab8b28af5aeed5ffae2cd6de) ) ROM_LOAD( "mpr12438.12", 0x20000, 0x20000, CRC(6573d46b) SHA1(c4a4a0ea35250eff28a5bfd5e9cd372f52fd1308) ) -// ROM_LOAD( "mpr12439.13", 0x40000, 0x20000, CRC(13bf6de5) SHA1(92228a05ec33d606491a1da98c4989f69cddbb49) ) // not here on this set +// ROM_LOAD( "mpr12439.13", 0x40000, 0x20000, CRC(13bf6de5) SHA1(92228a05ec33d606491a1da98c4989f69cddbb49) ) // not here on this set ROM_REGION( 0x10000, REGION_CPU4, ROMREGION_ERASE00 ) /* comms */ /* no comms? */ diff --git a/src/mame/drivers/wilytowr.c b/src/mame/drivers/wilytowr.c index d261b970ff2..8d7435a4b82 100644 --- a/src/mame/drivers/wilytowr.c +++ b/src/mame/drivers/wilytowr.c @@ -15,13 +15,13 @@ Tomasz Slanina 2008.06.14: - Addedd sound emulation - atomboy and fghtbskt req different interrupt (T1) timing than wilytowr, otherwise music/fx tempo is too fast. Maybe both tmings are wrong - must be verified on real pcb. -- Extra space in atomboy 2764 eproms is filled with garbage z80 code +- Extra space in atomboy 2764 eproms is filled with garbage z80 code (taken from one of code roms, but from different offset) - Fghtbskt has one AY, but every frame writes 0 to 2nd AY regs - probably - leftover from Wily Tower sound driver/code + leftover from Wily Tower sound driver/code - I'm not sure about sound_status write - maybe it's something else or different data (p1?) is used as status - + TODO: - Sprite positioning is wacky. The electric 'bands' that go along the pipes are drawn 2 pixels off in x/y directions. If you fix that, then the player @@ -236,7 +236,7 @@ static WRITE8_HANDLER( snd_irq_w ) static WRITE8_HANDLER( snddata_w ) { int num_ays = (sndti_exists(SOUND_AY8910, 1)) ? 2 : 1; - + if ((p2 & 0xf0) == 0xe0) AY8910_control_port_0_w(machine,0,offset); else if ((p2 & 0xf0) == 0xa0) @@ -665,7 +665,7 @@ ROM_START( wilytowr ) ROM_REGION( 0x2000, REGION_USER1, 0 ) ROM_LOAD( "wt_a-6d.bin", 0x0000, 0x1000, CRC(a5dde29b) SHA1(8f7545d2022da7c98d47112179dce717f6c3c5e2) ) - + ROM_REGION( 0x0320, REGION_PROMS, 0 ) ROM_LOAD( "wt_a-5s-.bpr", 0x0000, 0x0100, CRC(041950e7) SHA1(8276068bec3f4c5013c773033fca3cd3ed9e82ef) ) /* red */ @@ -704,7 +704,7 @@ ROM_START( atomboy ) ROM_LOAD( "wt_a-3p-b.bin", 0x8000, 0x2000, CRC(3018b840) SHA1(77df9d4f1c8d76d30c435d03d51ef9e7509fab9c) ) ROM_LOAD( "wt_a-3s-b.bin", 0xa000, 0x2000, CRC(05a251d4) SHA1(1cd9102871507ab988d5fe799024d63b93807448) ) - ROM_REGION( 0x2000, REGION_USER1, 0 ) + ROM_REGION( 0x2000, REGION_USER1, 0 ) ROM_LOAD( "wt_a-6d.bin", 0x0000, 0x1000, CRC(a5dde29b) SHA1(8f7545d2022da7c98d47112179dce717f6c3c5e2) ) ROM_REGION( 0x0320, REGION_PROMS, 0 ) @@ -745,7 +745,7 @@ ROM_START( atomboya ) ROM_LOAD( "wt_a-3p.bin", 0x4000, 0x1000, CRC(7299f362) SHA1(5ba309d789df8432c08d67e4f9e8bf6c447fc425) ) ROM_LOAD( "wt_a-3s.bin", 0x5000, 0x1000, CRC(9b37d50d) SHA1(a08d4a7654b815cb652be66dbaa097011327f5d5) ) - ROM_REGION( 0x1000, REGION_USER1, 0 ) + ROM_REGION( 0x1000, REGION_USER1, 0 ) ROM_LOAD( "wt_a-6d.bin", 0x0000, 0x1000, CRC(a5dde29b) SHA1(8f7545d2022da7c98d47112179dce717f6c3c5e2) ) ROM_REGION( 0x0320, REGION_PROMS, 0 ) @@ -765,7 +765,7 @@ ROM_START( fghtbskt ) ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* 8039 */ ROM_LOAD( "fb07.0b", 0x0000, 0x1000, CRC(50432dbd) SHA1(35a2218ed243bde47dbe06b5a11a65502ba734ea) ) - + ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) ROM_LOAD( "fb08.12f", 0x0000, 0x1000, CRC(271cd7b8) SHA1(00cfeb6ba429cf6cc59d6542dea8de2ca79155ed) ) ROM_FILL( 0x1000, 0x1000, 0 ) @@ -789,7 +789,7 @@ ROM_START( fghtbskt ) ROM_LOAD( "fb03.40a", 0x4000, 0x2000, CRC(c71269ed) SHA1(71cc6f43877b28d50beb744587c189dabbbaa067) ) ROM_LOAD( "fb04.39a", 0x6000, 0x2000, CRC(02ddc42d) SHA1(9d40967071f674592c174b5a5470db56a5f99adf) ) ROM_LOAD( "fb05.38a", 0x8000, 0x2000, CRC(72ea6b49) SHA1(e081a1cad5abf373a2489169b5c86ee63dcf5823) ) - + ROM_REGION( 0x2000, REGION_USER1, 0 ) ROM_LOAD( "fb06.12a", 0x0000, 0x2000, CRC(bea3df99) SHA1(18b795f8626b22f6a1620e04c23f4967c3122c89) ) @@ -797,8 +797,8 @@ ROM_START( fghtbskt ) ROM_LOAD( "fb_r.9e", 0x0000, 0x0100, CRC(c5cdc8ba) SHA1(3fcef3ebe0dda72dfa35e042ff611758c345d749) ) ROM_LOAD( "fb_g.10e", 0x0100, 0x0100, CRC(1460c936) SHA1(f99a544c83931de098a6cfac391f63ae43f5cdd0) ) ROM_LOAD( "fb_b.11e", 0x0200, 0x0100, CRC(fca5bf0e) SHA1(5846f43aa2906cac58e300fdab197b99f896e3ef) ) - - + + ROM_END static DRIVER_INIT( wilytowr ) diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c index 8d8c952684f..03814335086 100644 --- a/src/mame/machine/decocass.c +++ b/src/mame/machine/decocass.c @@ -205,7 +205,7 @@ READ8_HANDLER( decocass_input_r ) { UINT8 data = 0xff; static const char *portnames[] = { "IN0", "IN1", "IN2" }; - + switch (offset & 7) { case 0: case 1: case 2: diff --git a/src/mame/machine/galaxold.c b/src/mame/machine/galaxold.c index 4a1f718c6d0..b5d7fe55247 100644 --- a/src/mame/machine/galaxold.c +++ b/src/mame/machine/galaxold.c @@ -249,14 +249,14 @@ WRITE8_HANDLER( _4in1_bank_w ) READ8_HANDLER( _4in1_input_port_1_r ) { static const char *portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" }; - + return (input_port_read(machine, "IN1") & ~0xc0) | (input_port_read(machine, portnames[_4in1_bank]) & 0xc0); } READ8_HANDLER( _4in1_input_port_2_r ) { static const char *portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" }; - + return (input_port_read(machine, "DSW0") & 0x04) | (input_port_read(machine, portnames[_4in1_bank]) & ~0xc4); } diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c index 4cbec468cf4..79679842dcd 100644 --- a/src/mame/video/itech8.c +++ b/src/mame/video/itech8.c @@ -460,7 +460,7 @@ READ8_HANDLER( itech8_blitter_r ) { int result = blitter_data[offset / 2]; static const char *portnames[] = { "AN_C", "AN_D", "AN_E", "AN_F" }; - + /* debugging */ if (FULL_LOGGING) logerror("%04x:blitter_r(%02x)\n", activecpu_get_previouspc(), offset / 2); diff --git a/src/mame/video/lordgun.c b/src/mame/video/lordgun.c index ebdbd4b416c..d3c5edd01b4 100644 --- a/src/mame/video/lordgun.c +++ b/src/mame/video/lordgun.c @@ -192,7 +192,7 @@ static const char *gunnames[] = { "LIGHT0_X", "LIGHT1_X", "LIGHT0_Y", "LIGHT1_Y" static void lorddgun_calc_gun_scr(running_machine *machine, int i) { int x = input_port_read(machine, gunnames[i]) - 0x3c; - + if ( (x < 0) || (x > sizeof(lordgun_gun_x_table)/sizeof(lordgun_gun_x_table[0])) ) x = 0; diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 396bfe5dc9b..5c19b1a6026 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -850,7 +850,7 @@ static void set_starting_view(running_machine *machine, int index, win_window_in // choose non-auto over auto if (strcmp(view, "auto") == 0 && strcmp(defview, "auto") != 0) view = defview; - + // query the video system to help us pick a view viewindex = video_get_view_for_target(machine, window->target, view, index, video_config.numscreens); diff --git a/src/version.c b/src/version.c index cfb473fc80c..22faa05e067 100644 --- a/src/version.c +++ b/src/version.c @@ -9,4 +9,4 @@ ***************************************************************************/ -const char build_version[] = "0.125u5 ("__DATE__")"; +const char build_version[] = "0.125u6 ("__DATE__")"; |