diff options
author | 2008-10-09 15:29:22 +0000 | |
---|---|---|
committer | 2008-10-09 15:29:22 +0000 | |
commit | d3ab17e0e35a80ee5414ed528dfeff52013a27b7 (patch) | |
tree | 3c6a983715c7e74b07ca88804d076203ef263e81 | |
parent | 3ceca447b7636056b8050661fa144b2a6fb25ea4 (diff) |
Cleanups and version bump.mame0127u7
-rw-r--r-- | src/emu/cpu/nec/nec.c | 12 | ||||
-rw-r--r-- | src/emu/devintrf.c | 4 | ||||
-rw-r--r-- | src/emu/machine/ldpr8210.c | 30 | ||||
-rw-r--r-- | src/emu/machine/ldv1000.c | 110 | ||||
-rw-r--r-- | src/emu/machine/ldvp931.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/8080bw.c | 14 | ||||
-rw-r--r-- | src/mame/drivers/gpworld.c | 6 | ||||
-rw-r--r-- | src/mame/drivers/m72.c | 10 | ||||
-rw-r--r-- | src/mame/drivers/neodrvr.c | 28 | ||||
-rw-r--r-- | src/mame/drivers/snesb.c | 36 | ||||
-rw-r--r-- | src/mame/machine/snes.c | 18 | ||||
-rw-r--r-- | src/mame/machine/snesdsp2.c | 70 | ||||
-rw-r--r-- | src/mame/machine/snesobc1.c | 2 | ||||
-rw-r--r-- | src/mame/video/taito_f3.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
15 files changed, 169 insertions, 179 deletions
diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c index 9ede717a298..296edb02801 100644 --- a/src/emu/cpu/nec/nec.c +++ b/src/emu/cpu/nec/nec.c @@ -114,11 +114,6 @@ typedef UINT32 DWORD; #include "nec.h" #include "necintrf.h" -/* enabling USE_SPEED_HACK will break lothb2 (m72.c) protection. It may cause issues - * on any system requiring close sync between two processors */ - -#define USE_SPEED_HACK (0) - /* default configuration */ static const nec_config default_config = { @@ -869,12 +864,7 @@ OP( 0xe7, i_outax ) { UINT8 port = FETCH; write_port_word(port, I.regs.w[AW]); OP( 0xe8, i_call_d16 ) { UINT32 tmp; FETCHWORD(tmp); PUSH(I.ip); I.ip = (WORD)(I.ip+(INT16)tmp); CHANGE_PC; nec_ICount-=24; } OP( 0xe9, i_jmp_d16 ) { UINT32 tmp; FETCHWORD(tmp); I.ip = (WORD)(I.ip+(INT16)tmp); CHANGE_PC; nec_ICount-=15; } OP( 0xea, i_jmp_far ) { UINT32 tmp,tmp1; FETCHWORD(tmp); FETCHWORD(tmp1); I.sregs[PS] = (WORD)tmp1; I.ip = (WORD)tmp; CHANGE_PC; nec_ICount-=27; } -OP( 0xeb, i_jmp_d8 ) { int tmp = (int)((INT8)FETCH); nec_ICount-=12; -#if USE_SPEED_HACK - if (tmp==-2 && I.no_interrupt==0 && (I.pending_irq==0) && nec_ICount>0) nec_ICount%=12; /* cycle skip */ -#endif - I.ip = (WORD)(I.ip+tmp); -} +OP( 0xeb, i_jmp_d8 ) { int tmp = (int)((INT8)FETCH); nec_ICount-=12; I.ip = (WORD)(I.ip+tmp); } OP( 0xec, i_inaldx ) { I.regs.b[AL] = read_port_byte(I.regs.w[DW]); CLKS(8,8,5);} OP( 0xed, i_inaxdx ) { I.regs.w[AW] = read_port_word(I.regs.w[DW]); CLKW(12,12,7,12,8,5,I.regs.w[DW]); } OP( 0xee, i_outdxal ) { write_port_byte(I.regs.w[DW], I.regs.b[AL]); CLKS(8,8,3); } diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c index 09b95c9575f..ee2f8dca287 100644 --- a/src/emu/devintrf.c +++ b/src/emu/devintrf.c @@ -176,7 +176,7 @@ void device_list_remove(device_config **listheadptr, device_type type, const cha /*------------------------------------------------- - device_build_tag - build a tag that combines + device_build_tag - build a tag that combines the device's name and the given tag -------------------------------------------------*/ @@ -195,7 +195,7 @@ const char *device_build_tag(astring *dest, const char *devicetag, const char *t /*------------------------------------------------- - device_inherit_tag - build a tag with the same + device_inherit_tag - build a tag with the same device prefix as the source tag -------------------------------------------------*/ diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c index 4fcae2a04b9..790752e367e 100644 --- a/src/emu/machine/ldpr8210.c +++ b/src/emu/machine/ldpr8210.c @@ -423,7 +423,7 @@ static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fie static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap) { ldplayer_data *player = ld->player; - + /* custom display */ if (player->pia.display) { @@ -431,14 +431,14 @@ static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap) overlay_draw_group(bitmap, &player->pia.text[7], 5, OVERLAY_GROUP2_X); overlay_draw_group(bitmap, &player->pia.text[12], 5, OVERLAY_GROUP3_X); } - + /* chapter/frame display */ else { /* frame display */ if (player->pia.latchdisplay & 2) overlay_draw_group(bitmap, &player->pia.text[2], 5, OVERLAY_GROUP1_X); - + /* chapter overlay */ if (player->pia.latchdisplay & 1) overlay_draw_group(bitmap, &player->pia.text[0], 2, OVERLAY_GROUP0_X); @@ -610,7 +610,7 @@ static READ8_HANDLER( pr8210_pia_r ) case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: result = player->pia.frame[offset - 0x20]; break; - + /* (1D-1F,27) invalid read but normal */ case 0x1d: case 0x1e: case 0x1f: case 0x27: @@ -897,7 +897,7 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f { int skip = TRUE; int x; - + /* rease the background */ overlay_erase(bitmap, xstart, xstart + ((OVERLAY_X_PIXELS + 1) * count + 1) * OVERLAY_PIXEL_WIDTH); @@ -912,7 +912,7 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f /*------------------------------------------------- - overlay_erase - erase the background area + overlay_erase - erase the background area where the text overlay will be displayed -------------------------------------------------*/ @@ -921,25 +921,25 @@ static void overlay_erase(bitmap_t *bitmap, float xstart, float xend) UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap->width); UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap->width); UINT32 x, y; - + for (y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++) { UINT16 *dest = BITMAP_ADDR16(bitmap, y, xmin >> 8); UINT16 ymin, ymax, yres; - + ymax = *dest >> 8; ymin = ymax * 3 / 8; yres = ymin + ((ymax - ymin) * (xmin & 0xff)) / 256; *dest = (yres << 8) | (*dest & 0xff); dest++; - + for (x = (xmin | 0xff) + 1; x < xmax; x += 0x100) { yres = (*dest >> 8) * 3 / 8; *dest = (yres << 8) | (*dest & 0xff); dest++; } - + ymax = *dest >> 8; ymin = ymax * 3 / 8; yres = ymin + ((ymax - ymin) * (~xmax & 0xff)) / 256; @@ -960,12 +960,12 @@ static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart) UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap->width); const UINT8 *chdataptr = &text_bitmap[ch & 0x3f][0]; UINT32 x, y, xx, yy; - + /* iterate over pixels */ for (y = 0; y < OVERLAY_Y_PIXELS; y++) { UINT8 chdata = *chdataptr++; - + for (x = 0; x < OVERLAY_X_PIXELS; x++, chdata <<= 1) if (chdata & 0x80) { @@ -975,16 +975,16 @@ static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart) { UINT16 *dest = BITMAP_ADDR16(bitmap, OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8); UINT16 ymin, ymax, yres; - + ymax = 0xff; ymin = *dest >> 8; yres = ymin + ((ymax - ymin) * (~xmin & 0xff)) / 256; *dest = (yres << 8) | (*dest & 0xff); dest++; - + for (xx = (xmin | 0xff) + 1; xx < xmax; xx += 0x100) *dest++ = 0xf080; - + ymax = 0xff; ymin = *dest >> 8; yres = ymin + ((ymax - ymin) * (xmax & 0xff)) / 256; diff --git a/src/emu/machine/ldv1000.c b/src/emu/machine/ldv1000.c index a30af75c888..e57f8de5733 100644 --- a/src/emu/machine/ldv1000.c +++ b/src/emu/machine/ldv1000.c @@ -149,14 +149,14 @@ static ADDRESS_MAP_START( ldv1000_portmap, ADDRESS_SPACE_IO, 8 ) ADDRESS_MAP_END -static const ppi8255_interface ppi0intf = +static const ppi8255_interface ppi0intf = { NULL, ppi0_portb_r, ppi0_portc_r, ppi0_porta_w, NULL, ppi0_portc_w }; -static const ppi8255_interface ppi1intf = +static const ppi8255_interface ppi1intf = { ppi1_porta_r, NULL, NULL, NULL, ppi1_portb_w, ppi1_portc_w @@ -184,7 +184,7 @@ static MACHINE_DRIVER_START( ldv1000 ) MDRV_CPU_CONFIG(daisy_chain) MDRV_CPU_PROGRAM_MAP(ldv1000_map,0) MDRV_CPU_IO_MAP(ldv1000_portmap,0) - + MDRV_Z80CTC_ADD("ldvctc", ctcintf) MDRV_PPI8255_ADD("ldvppi0", ppi0intf) MDRV_PPI8255_ADD("ldvppi1", ppi1intf) @@ -369,18 +369,18 @@ static TIMER_CALLBACK( vbi_data_fetch ) UINT8 focus_on = !(player->portb1 & 0x01); UINT8 laser_on = (player->portb1 & 0x40); UINT32 lines[3]; - + /* appears to return data in reverse order */ lines[0] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE1718); lines[1] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE17); lines[2] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE16); - + /* fill in the details */ memset(player->vbi, 0, sizeof(player->vbi)); if (focus_on && laser_on) { int line; - + /* loop over lines */ for (line = 0; line < 3; line++) { @@ -400,7 +400,7 @@ static TIMER_CALLBACK( vbi_data_fetch ) } } } - + /* signal that data is ready and reset the readback index */ player->vbiready = TRUE; player->vbiindex = 0; @@ -422,7 +422,7 @@ static TIMER_DEVICE_CALLBACK( multijump_timer ) /* bit 5 of port B on PPI 1 selects the direction of slider movement */ direction = (player->portb1 & 0x20) ? 1 : -1; ldcore_advance_slider(ld, direction); - + /* update down counter and reschedule */ if (--player->counter != 0) timer_device_adjust_oneshot(timer, MULTIJUMP_TRACK_TIME, 0); @@ -449,11 +449,11 @@ static void ctc_interrupt(const device_config *device, int state) static WRITE8_HANDLER( decoder_display_port_w ) { /* - TX/RX = /A0 (A0=0 -> TX, A0=1 -> RX) - - Display is 6-bit - Decoder is 4-bit - */ + TX/RX = /A0 (A0=0 -> TX, A0=1 -> RX) + + Display is 6-bit + Decoder is 4-bit + */ laserdisc_state *ld = find_ldv1000(machine); ldplayer_data *player = ld->player; @@ -463,7 +463,7 @@ static WRITE8_HANDLER( decoder_display_port_w ) player->portselect = data; player->dispindex = 0; } - + /* writes to offset 2 constitute actual writes targeted toward the display and decoder chips */ else if (offset == 2) { @@ -507,7 +507,7 @@ static READ8_HANDLER( decoder_display_port_r ) static READ8_HANDLER( controller_r ) { laserdisc_state *ld = find_ldv1000(machine); - + /* note that this is a cheesy implementation; the real thing relies on exquisite timing */ UINT8 result = ld->player->command ^ 0xff; ld->player->command = 0xff; @@ -562,11 +562,11 @@ static READ8_DEVICE_HANDLER( ppi0_portb_r ) static READ8_DEVICE_HANDLER( ppi0_portc_r ) { /* - $10 = /VSYNC - $20 = IRQ from decoder chip - $40 = TRKG LOOP (N24-1) - $80 = DUMP (N20-1) -- code reads the state and waits for it to change - */ + $10 = /VSYNC + $20 = IRQ from decoder chip + $40 = TRKG LOOP (N24-1) + $80 = DUMP (N20-1) -- code reads the state and waits for it to change + */ laserdisc_state *ld = find_ldv1000(device->machine); ldplayer_data *player = ld->player; UINT8 result = 0x00; @@ -588,15 +588,15 @@ static READ8_DEVICE_HANDLER( ppi0_portc_r ) static WRITE8_DEVICE_HANDLER( ppi0_portc_w ) { /* - $01 = preload on up/down counters - $02 = /MULTI JUMP TRIG - $04 = SCAN MODE - $08 = n/c - */ + $01 = preload on up/down counters + $02 = /MULTI JUMP TRIG + $04 = SCAN MODE + $08 = n/c + */ laserdisc_state *ld = find_ldv1000(device->machine); ldplayer_data *player = ld->player; UINT8 prev = player->portc0; - + /* set the new value */ player->portc0 = data; if (LOG_PORT_IO && ((data ^ prev) & 0x0f) != 0) @@ -607,7 +607,7 @@ static WRITE8_DEVICE_HANDLER( ppi0_portc_w ) if (data & 0x04) printf(" SCANMODE"); printf("\n"); } - + /* on the rising edge of bit 0, clock the down counter load */ if ((data & 0x01) && !(prev & 0x01)) player->counter = player->counter_start; @@ -626,15 +626,15 @@ static WRITE8_DEVICE_HANDLER( ppi0_portc_w ) static READ8_DEVICE_HANDLER( ppi1_porta_r ) { /* - $01 = /FOCS LOCK - $02 = /SPDL LOCK - $04 = INSIDE - $08 = OUTSIDE - $10 = MOTOR STOP - $20 = +5V/test point - $40 = /INT LOCK - $80 = 8 INCH CHK - */ + $01 = /FOCS LOCK + $02 = /SPDL LOCK + $04 = INSIDE + $08 = OUTSIDE + $10 = MOTOR STOP + $20 = +5V/test point + $40 = /INT LOCK + $80 = 8 INCH CHK + */ laserdisc_state *ld = find_ldv1000(device->machine); ldplayer_data *player = ld->player; slider_position sliderpos = ldcore_get_slider_position(ld); @@ -664,7 +664,7 @@ static READ8_DEVICE_HANDLER( ppi1_porta_r ) result |= 0x20; /* bit 6: /INT LOCK */ - + /* bit 7: 8 INCH CHK */ return result; @@ -679,15 +679,15 @@ static READ8_DEVICE_HANDLER( ppi1_porta_r ) static WRITE8_DEVICE_HANDLER( ppi1_portb_w ) { /* - $01 = /FOCS ON - $02 = /SPDL RUN - $04 = /JUMP TRIG - $08 = /SCAN A - $10 = SCAN B - $20 = SCAN C - $40 = /LASER ON - $80 = /SYNC ST0 - */ + $01 = /FOCS ON + $02 = /SPDL RUN + $04 = /JUMP TRIG + $08 = /SCAN A + $10 = SCAN B + $20 = SCAN C + $40 = /LASER ON + $80 = /SYNC ST0 + */ laserdisc_state *ld = find_ldv1000(device->machine); ldplayer_data *player = ld->player; UINT8 prev = player->portb1; @@ -736,15 +736,15 @@ static WRITE8_DEVICE_HANDLER( ppi1_portb_w ) static WRITE8_DEVICE_HANDLER( ppi1_portc_w ) { /* - $01 = AUD 1 - $02 = AUD 2 - $04 = AUDIO ENABLE - $08 = /VIDEO SQ - $10 = COMMAND - $20 = STATUS - $40 = SIZE 8/12 - $80 = /LED CAV - */ + $01 = AUD 1 + $02 = AUD 2 + $04 = AUDIO ENABLE + $08 = /VIDEO SQ + $10 = COMMAND + $20 = STATUS + $40 = SIZE 8/12 + $80 = /LED CAV + */ laserdisc_state *ld = find_ldv1000(device->machine); ldplayer_data *player = ld->player; UINT8 prev = player->portc1; diff --git a/src/emu/machine/ldvp931.c b/src/emu/machine/ldvp931.c index acf95513133..43be47bcb30 100644 --- a/src/emu/machine/ldvp931.c +++ b/src/emu/machine/ldvp931.c @@ -222,7 +222,7 @@ static void vp931_init(laserdisc_state *ld) astring *tempstring = astring_alloc(); ldplayer_data *player = ld->player; vp931_data_ready_func cbsave; - + /* reset our state */ cbsave = player->data_ready_cb; memset(player, 0, sizeof(*player)); diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 71fce68098d..3f09180427a 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -318,17 +318,17 @@ static INPUT_PORTS_START( astropal ) PORT_DIPSETTING( 0x02, "4" ) PORT_DIPSETTING( 0x03, "5" ) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) /* never read */ - + PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - + /* PORT_START("IN2") - never read */ PORT_START("IN3") @@ -339,13 +339,13 @@ static INPUT_PORTS_START( astropal ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* Dummy port for cocktail mode (not used) */ INVADERS_CAB_TYPE_PORT PORT_MODIFY(INVADERS_CAB_TYPE_PORT_TAG) PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - + INPUT_PORTS_END static MACHINE_DRIVER_START( astropal ) diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c index af68cd86f99..8b4f59b0667 100644 --- a/src/mame/drivers/gpworld.c +++ b/src/mame/drivers/gpworld.c @@ -230,9 +230,9 @@ static READ8_HANDLER( pedal_in ) { if (brake_gas) return input_port_read(machine, "INACCEL"); - + return input_port_read(machine, "INBRAKE"); - + } /* WRITES */ @@ -340,7 +340,7 @@ static INPUT_PORTS_START( gpworld ) PORT_START("INBRAKE") PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1) - + PORT_START("DSW1") PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index a75b093f287..e08bd328c6c 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -558,7 +558,7 @@ static TIMER_CALLBACK( delayed_ram16_w ) UINT16 *ram = ptr; ram[offset] = val; - + if (!stepping) { stepping = 1; @@ -1674,9 +1674,9 @@ static WRITE8_HANDLER( m72_mcu_data_w ) else val = (protection_ram[offset/2] & 0xff00) | (data&0xff); if (offset == 6 && data == 0xfe) - /* Hack - The v30 overshoots and will not see the unlock written to offset 6 - * We thus delay the lock, i.e. storing an unconditional branch to 6 - * here. This is highly time critical ... */ + /* Hack - The v30 overshoots and will not see the unlock written to offset 6 + * We thus delay the lock, i.e. storing an unconditional branch to 6 + * here. This is highly time critical ... */ timer_set(ATTOTIME_IN_USEC(10), protection_ram, ((offset >>1 ) << 16) | val, delayed_ram16_w); else timer_call_after_resynch( protection_ram, ((offset >>1 ) << 16) | val, delayed_ram16_w); @@ -1742,7 +1742,7 @@ MACHINE_DRIVER_END static MACHINE_DRIVER_START( m72_8751 ) MDRV_IMPORT_FROM(m72) - + MDRV_CPU_ADD("mcu",I8751, 16000000) MDRV_CPU_PROGRAM_MAP(mcu_map,0) MDRV_CPU_DATA_MAP(mcu_data_map,0) diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c index 669c8158a5c..3c7fc468912 100644 --- a/src/mame/drivers/neodrvr.c +++ b/src/mame/drivers/neodrvr.c @@ -637,20 +637,20 @@ INPUT_PORTS_END /* - Missing (undumped) sets: - . Rage of the Dragons (AES) - . Last Blade 2 (early revisions) ? - . Power Spikes II (early revisions) ? - . Metal Slug 3 (rev. Mar/17/2000 1:36) - . Metal Slug 4 (AES) - . Metal Slug 5 (PCB) - . 98 Best 44 + Missing (undumped) sets: + . Rage of the Dragons (AES) + . Last Blade 2 (early revisions) ? + . Power Spikes II (early revisions) ? + . Metal Slug 3 (rev. Mar/17/2000 1:36) + . Metal Slug 4 (AES) + . Metal Slug 5 (PCB) + . 98 Best 44 - Redump required: - . All set with BAD_DUMP roms - . Sets which have a p1h + Redump required: + . All set with BAD_DUMP roms + . Sets which have a p1h - All rom labels need to be reverified + All rom labels need to be reverified */ @@ -6445,8 +6445,8 @@ ROM_END /* - Most bootleg sets are incomplete (missing 'C', 'V' and 'M' roms). - Verification required. + Most bootleg sets are incomplete (missing 'C', 'V' and 'M' roms). + Verification required. */ diff --git a/src/mame/drivers/snesb.c b/src/mame/drivers/snesb.c index 3bfc6aa66c0..dcc4a54c874 100644 --- a/src/mame/drivers/snesb.c +++ b/src/mame/drivers/snesb.c @@ -15,7 +15,7 @@ TODO: - ffight2b - dipswitches ($7eadd7 ?) - - sblast2b - dipswicthes + - sblast2b - dipswicthes - kiinstb - fix gfx glitches, missing texts @@ -146,10 +146,10 @@ static READ8_HANDLER(sb2b_6a6xxx_r) case 0x94b: return 0x3a; case 0xd1a: return 0xc5; case 0xfb7: return 0x47; - } - + } + logerror("Unknown protection read read %x @ %x\n",offset, activecpu_get_pc()); - + return 0; } @@ -631,25 +631,25 @@ static DRIVER_INIT( ffight2b ) DRIVER_INIT_CALL(snes); } - + static const UINT8 data_substitution0[] = {0x88,0x02,0x2a,0x08,0x28,0xaa,0x8a,0x0a,0xa2,0x00,0x80,0xa0,0x22,0xa8,0x82,0x20,}; static const UINT8 data_substitution1[] = {0x44,0x01,0x51,0x40,0x50,0x55,0x45,0x41,0x15,0x00,0x04,0x14,0x11,0x54,0x05,0x10,}; -static const UINT8 address_substitution_low[] = +static const UINT8 address_substitution_low[] = { 0x32,0x35,0x3a,0x28,0x2a,0x0c,0x36,0x38,0x29,0x39,0x04,0x2c,0x21,0x23,0x3d,0x2d, 0x3c,0x02,0x17,0x31,0x00,0x2e,0x0a,0x2f,0x25,0x26,0x27,0x30,0x33,0x01,0x18,0x19, 0x10,0x11,0x24,0x16,0x1b,0x0d,0x0e,0x12,0x13,0x05,0x22,0x34,0x1c,0x06,0x07,0x37, 0x08,0x3b,0x09,0x14,0x15,0x1d,0x0b,0x0f,0x1e,0x1f,0x2b,0x1a,0x03,0x20,0x3f,0x3e, -}; - -static const UINT8 address_substitution_high[] = +}; + +static const UINT8 address_substitution_high[] = { 0x1b,0x15,0x08,0x1f,0x06,0x02,0x13,0x0a,0x1d,0x04,0x0e,0x00,0x17,0x0c,0x11,0x19, 0x16,0x0d,0x1c,0x07,0x10,0x03,0x1a,0x0b,0x12,0x05,0x0f,0x18,0x1e,0x01,0x14,0x09, 0x2b,0x25,0x28,0x2f,0x26,0x22,0x23,0x2a,0x2d,0x24,0x2e,0x20,0x27,0x2c,0x21,0x29 }; - + DRIVER_INIT( sblast2b ) { int i, cipherText, plainText, newAddress; @@ -660,7 +660,7 @@ DRIVER_INIT( sblast2b ) cipherText = src[i]; plainText = data_substitution0[cipherText&0xf]|data_substitution1[cipherText>>4]; newAddress = (address_substitution_high[i>>15]<<15)|(i&0x7fc0)|(address_substitution_low[i&0x3f]); - + if(newAddress<0x10000) { plainText = BITSWAP8(plainText, 6,3,5,4,2,0,7,1) ^ 0xff; @@ -670,7 +670,7 @@ DRIVER_INIT( sblast2b ) { plainText = BITSWAP8(plainText, 4,0,7,6,3,1,2,5) ^ 0xff; } - else + else if(newAddress<0x30000) { plainText = BITSWAP8(plainText, 5,7,6,1,4,3,0,2); @@ -682,19 +682,19 @@ DRIVER_INIT( sblast2b ) } dst[newAddress] = plainText; } - + /* boot vector */ dst[0xfffc]=0xc0; dst[0xfffd]=0x7a; - + /* protection checks */ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x75bd37, 0x75bd37, 0, 0, sb2b_75bd37_r); memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6a6000, 0x6a6fff, 0, 0, sb2b_6a6xxx_r); - + /* extra inputs */ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x770071, 0x770071, 0, 0, sb2b_770071_r); memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x770079, 0x770079, 0, 0, sb2b_770079_r); - + /* handler to read boot code */ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x007000, 0x007fff, 0, 0, sb2b_7xxx_r); @@ -765,12 +765,12 @@ ROM_START( sblast2b ) ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) ) ROM_REGION(0x800, "user6", ROMREGION_ERASEFF) - + ROM_REGION( 0x180000, "user7", ROMREGION_DISPOSE ) ROM_LOAD( "1.bin", 0x000000, 0x0080000, CRC(bea10c40) SHA1(d9cc65267b9b57145d714f2c17b436c1fb21513f) ) ROM_LOAD( "2.bin", 0x080000, 0x0080000, CRC(57d2b6e9) SHA1(1a7b347101f67b254e2f86294d501b0669431644) ) ROM_LOAD( "3.bin", 0x100000, 0x0080000, CRC(9e63a5ce) SHA1(1d18606fbb28b55a921fc37e1af1aff4caae9003) ) - + ROM_END GAME( 199?, kinstb, 0, kinstb, kinstb, kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index 3f86dc0e1c8..a133ce0850e 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -158,7 +158,7 @@ static TIMER_CALLBACK( snes_scanline_tick ) /* Start of VBlank */ if( snes_ppu.beam.current_vert == snes_ppu.beam.last_visible_line ) { - if(!(snes_ram[INIDISP]&0x80)) + if(!(snes_ram[INIDISP]&0x80)) { program_write_byte(OAMADDL, snes_ppu.oam.saved_address_low ); /* Reset oam address */ program_write_byte(OAMADDH, snes_ppu.oam.saved_address_high ); @@ -1103,7 +1103,7 @@ WRITE8_HANDLER( snes_w_io ) /* There are at least 4 different kind of boards for SNES carts, which we denote with mode_20, mode_21, mode_22 and mode_25. Below is a layout of the memory for each of -them. Notice we mirror ROM at loading time where necessary (e.g. banks 0x80 to 0xff +them. Notice we mirror ROM at loading time where necessary (e.g. banks 0x80 to 0xff at address 0x8000 for mode_20). MODE_20 @@ -1124,8 +1124,8 @@ address | | | | | | | MODE_22 is the same, but banks 0x40 to 0x7e at address 0x000 to 0x7fff contain ROM (of course mirrored also at 0xc0 to 0xff). Mode 22 is quite similar to the board SHVC-2P3B. -It is used also in SDD-1 games (only for the first blocks of data). DSP data & status -can be either at banks 0x20 to 0x40 at address 0x8000 or at banks 0x60 to 0x6f at address +It is used also in SDD-1 games (only for the first blocks of data). DSP data & status +can be either at banks 0x20 to 0x40 at address 0x8000 or at banks 0x60 to 0x6f at address 0x0000. @@ -1404,7 +1404,7 @@ WRITE8_HANDLER( snes_w_bank2 ) } else logerror("Attempt to write to reserved address: %X\n", offset + 0x300000); - } + } /* some dsp1 games use these banks 0x30 to 0x3f at address 0x8000 */ else if ((snes_cart.mode == SNES_MODE_20) && (has_addon_chip == HAS_DSP1)) DSP1_setDr(data); @@ -1463,7 +1463,7 @@ WRITE8_HANDLER( snes_w_bank6 ) { if (offset < 0x300000) snes_w_bank1(machine, offset, data); - else + else snes_w_bank2(machine, offset - 0x300000, data); } else /* Mode 25 has SRAM not mirrored from lower banks */ @@ -1472,7 +1472,7 @@ WRITE8_HANDLER( snes_w_bank6 ) { if (offset < 0x300000) snes_w_bank1(machine, offset, data); - else + else snes_w_bank2(machine, offset - 0x300000, data); } else if ((offset >= 0x300000) && (snes_cart.sram > 0)) @@ -1482,7 +1482,7 @@ WRITE8_HANDLER( snes_w_bank6 ) snes_ram[0xb06000 + (offset & mask)] = data; } else /* Area in 0x6000-0x8000 && offset < 0x300000 is Reserved! */ - logerror("Attempt to write to reserved address: %X\n", offset + 0x800000); + logerror("Attempt to write to reserved address: %X\n", offset + 0x800000); } } else if ((snes_cart.mode == SNES_MODE_20) && (has_addon_chip == HAS_DSP1) && (offset >= 0x200000)) @@ -1585,7 +1585,7 @@ static void snes_init_ram(running_machine *machine) case HAS_DSP2: DSP2_reset(); break; - + case HAS_OBC1: obc1_init(); break; diff --git a/src/mame/machine/snesdsp2.c b/src/mame/machine/snesdsp2.c index 060e32ccc30..6ebfaadcba6 100644 --- a/src/mame/machine/snesdsp2.c +++ b/src/mame/machine/snesdsp2.c @@ -31,7 +31,7 @@ int DSP2_op0dinlen = 0; //convert bitmap to bitplane tile -void DSP2_op01( void ) +void DSP2_op01( void ) { //op01 size is always 32 bytes input and output //the hardware does strange things if you vary the size @@ -43,7 +43,7 @@ void DSP2_op01( void ) int j; //process 8 blocks of 4 bytes each - for (j = 0; j < 8; j++) + for (j = 0; j < 8; j++) { c0 = *p1++; c1 = *p1++; @@ -95,7 +95,7 @@ void DSP2_op03( void ) } //replace bitmap using transparent color -void DSP2_op05( void ) +void DSP2_op05( void ) { UINT8 color; // Overlay bitmap with transparency. @@ -131,7 +131,7 @@ void DSP2_op05( void ) color = DSP2_op05transparent & 0x0f; - for (n = 0; n < DSP2_op05len; n++) + for (n = 0; n < DSP2_op05len; n++) { c1 = *p1++; c2 = *p2++; @@ -141,20 +141,20 @@ void DSP2_op05( void ) } //reverse bitmap -void DSP2_op06( void ) +void DSP2_op06( void ) { // Input: // size // bitmap int i, j; - for (i = 0, j = DSP2_op06len - 1; i < DSP2_op06len; i++, j--) + for (i = 0, j = DSP2_op06len - 1; i < DSP2_op06len; i++, j--) { DSP2_output[j] = (DSP2_parameters[i] << 4) | (DSP2_parameters[i] >> 4); } } //multiply -void DSP2_op09( void ) +void DSP2_op09( void ) { UINT32 r = 0; DSP2_out_count = 4; @@ -170,7 +170,7 @@ void DSP2_op09( void ) } //scale bitmap -void DSP2_op0d( void ) +void DSP2_op0d( void ) { // Bit accurate hardware algorithm - uses fixed point math // This should match the DSP2 Op0D output exactly @@ -190,21 +190,21 @@ void DSP2_op0d( void ) UINT32 pixloc; // match size of multiplier int i, j; UINT8 pixelarray[512]; - if (DSP2_op0dinlen <= DSP2_op0doutlen) + if (DSP2_op0dinlen <= DSP2_op0doutlen) { multiplier = 0x10000; // In our self defined fixed point 0x10000 == 1 - } - else + } + else { multiplier = (DSP2_op0dinlen << 17) / ((DSP2_op0doutlen << 1) + 1); } pixloc = 0; - for (i = 0; i < DSP2_op0doutlen * 2; i++) + for (i = 0; i < DSP2_op0doutlen * 2; i++) { j = pixloc >> 16; - if (j & 1) + if (j & 1) pixelarray[i] = (DSP2_parameters[j >> 1] & 0x0f); else pixelarray[i] = (DSP2_parameters[j >> 1] & 0xf0) >> 4; @@ -212,14 +212,14 @@ void DSP2_op0d( void ) pixloc += multiplier; } - for (i = 0; i < DSP2_op0doutlen; i++) + for (i = 0; i < DSP2_op0doutlen; i++) { DSP2_output[i] = (pixelarray[i << 1] << 4) | pixelarray[(i << 1) + 1]; } } -void DSP2_reset( void ) +void DSP2_reset( void ) { DSP2_waiting_for_command = 1; DSP2_in_count = 0; @@ -239,10 +239,10 @@ void DSP2_reset( void ) DSP2_op0dinlen = 0; } -UINT8 DSP2_read( void ) +UINT8 DSP2_read( void ) { UINT8 r = 0xff; - if (DSP2_out_count) + if (DSP2_out_count) { r = DSP2_output[DSP2_out_index++]; DSP2_out_index &= 511; @@ -252,15 +252,15 @@ UINT8 DSP2_read( void ) return r; } -void DSP2_write(UINT8 data) +void DSP2_write(UINT8 data) { - if(DSP2_waiting_for_command) + if(DSP2_waiting_for_command) { DSP2_command = data; DSP2_in_index = 0; DSP2_waiting_for_command = 0; - switch (data) + switch (data) { case 0x01: DSP2_in_count = 32; break; case 0x03: DSP2_in_count = 1; break; @@ -273,35 +273,35 @@ void DSP2_write(UINT8 data) case 0x0f: DSP2_in_count = 0; break; } } - else + else { DSP2_parameters[DSP2_in_index++] = data; DSP2_in_index &= 511; } - if (DSP2_in_count == DSP2_in_index) + if (DSP2_in_count == DSP2_in_index) { DSP2_waiting_for_command = 1; DSP2_out_index = 0; - switch (DSP2_command) + switch (DSP2_command) { - case 0x01: + case 0x01: DSP2_out_count = 32; DSP2_op01(); break; - case 0x03: + case 0x03: DSP2_op03(); break; case 0x05: - if (DSP2_op05haslen) + if (DSP2_op05haslen) { DSP2_op05haslen = 0; DSP2_out_count = DSP2_op05len; DSP2_op05(); - } - else + } + else { DSP2_op05len = DSP2_parameters[0]; DSP2_in_index = 0; @@ -313,13 +313,13 @@ void DSP2_write(UINT8 data) break; case 0x06: - if (DSP2_op06haslen) + if (DSP2_op06haslen) { DSP2_op06haslen = 0; DSP2_out_count = DSP2_op06len; DSP2_op06(); - } - else + } + else { DSP2_op06len = DSP2_parameters[0]; DSP2_in_index = 0; @@ -338,13 +338,13 @@ void DSP2_write(UINT8 data) break; case 0x0d: - if (DSP2_op0dhaslen) + if (DSP2_op0dhaslen) { DSP2_op0dhaslen = 0; DSP2_out_count = DSP2_op0doutlen; DSP2_op0d(); - } - else + } + else { DSP2_op0dinlen = DSP2_parameters[0]; DSP2_op0doutlen = DSP2_parameters[1]; @@ -356,7 +356,7 @@ void DSP2_write(UINT8 data) } break; - case 0x0f: + case 0x0f: break; } } diff --git a/src/mame/machine/snesobc1.c b/src/mame/machine/snesobc1.c index a8479be1945..c7f1076f03b 100644 --- a/src/mame/machine/snesobc1.c +++ b/src/mame/machine/snesobc1.c @@ -57,7 +57,7 @@ WRITE8_HANDLER( obc1_write ) UINT16 address = offset & 0x1fff; UINT8 temp; - switch(address) + switch(address) { case 0x1ff0: snes_ram[obc1_offset + (obc1_address << 2) + 0] = data; diff --git a/src/mame/video/taito_f3.c b/src/mame/video/taito_f3.c index 2e14cc18068..48741e9ca4d 100644 --- a/src/mame/video/taito_f3.c +++ b/src/mame/video/taito_f3.c @@ -752,12 +752,12 @@ VIDEO_START( f3 ) int chk_trans_or_opa=0; UINT8 extra_mask = ((extra_planes << 4) | 0x0f); UINT8 *dp = pf_gfx->gfxdata + c * pf_gfx->char_modulo; - + for (y = 0;y < pf_gfx->height;y++) { for (x = 0;x < pf_gfx->width;x++) { - if(!(dp[x] & extra_mask)) + if(!(dp[x] & extra_mask)) chk_trans_or_opa|=2; else chk_trans_or_opa|=1; diff --git a/src/version.c b/src/version.c index 59464ae47ae..a4c147c5dc0 100644 --- a/src/version.c +++ b/src/version.c @@ -9,4 +9,4 @@ ***************************************************************************/ -const char build_version[] = "0.127u6 ("__DATE__")"; +const char build_version[] = "0.127u7 ("__DATE__")"; |