diff options
| author | 2013-03-19 07:22:20 +0000 | |
|---|---|---|
| committer | 2013-03-19 07:22:20 +0000 | |
| commit | 0e1f5ad25b25df7c2ec707ec45c544288eb3c683 (patch) | |
| tree | eeef04fdf999692be30c25457fb9b329e1dbfdde /src/mess | |
| parent | 86614c802b9d611d83520fdb43388ae51d31f553 (diff) | |
Cleanups and version bumpmame0148u2
Diffstat (limited to 'src/mess')
111 files changed, 876 insertions, 896 deletions
diff --git a/src/mess/audio/channelf.c b/src/mess/audio/channelf.c index 8c806a1b004..09cd7786dfd 100644 --- a/src/mess/audio/channelf.c +++ b/src/mess/audio/channelf.c @@ -16,9 +16,9 @@ channelf_sound_device::channelf_sound_device(const machine_config &mconfig, cons m_envelope(0), m_sample_counter(0), m_forced_ontime(0), - m_min_ontime(0) + m_min_ontime(0) { - + } //------------------------------------------------- diff --git a/src/mess/audio/channelf.h b/src/mess/audio/channelf.h index 9bdbb628c16..339e26ca1c0 100644 --- a/src/mess/audio/channelf.h +++ b/src/mess/audio/channelf.h @@ -12,7 +12,7 @@ class channelf_sound_device : public device_t, { public: channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + void sound_w(int mode); protected: // device-level overrides diff --git a/src/mess/audio/special.c b/src/mess/audio/special.c index 8afb2c6a915..d5d13c96f32 100644 --- a/src/mess/audio/special.c +++ b/src/mess/audio/special.c @@ -24,10 +24,10 @@ const device_type SPECIMX = &device_creator<specimx_sound_device>; specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SPECIMX, "Specialist MX Custom", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_mixer_channel(NULL) + device_sound_interface(mconfig, *this), + m_mixer_channel(NULL) { - memset(m_specimx_input, 0, sizeof(int)*3); + memset(m_specimx_input, 0, sizeof(int)*3); } @@ -79,10 +79,8 @@ void specimx_sound_device::sound_stream_update(sound_stream &stream, stream_samp void specimx_sound_device::set_input(int index, int state) { if (m_mixer_channel!=NULL) - { + { m_mixer_channel->update(); } m_specimx_input[index] = state; } - - diff --git a/src/mess/audio/svision.c b/src/mess/audio/svision.c index fa9673c63e7..0913c08dd57 100644 --- a/src/mess/audio/svision.c +++ b/src/mess/audio/svision.c @@ -22,8 +22,8 @@ const device_type SVISION = &device_creator<svision_sound_device>; svision_sound_device::svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SVISION, "Super Vision Custom", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_mixer_channel(NULL) + device_sound_interface(mconfig, *this), + m_mixer_channel(NULL) { } @@ -263,4 +263,3 @@ void svision_sound_device::soundport_w(int which, int offset, int data) break; } } - diff --git a/src/mess/audio/vc4000.c b/src/mess/audio/vc4000.c index 587891a46e8..80736eeecb1 100644 --- a/src/mess/audio/vc4000.c +++ b/src/mess/audio/vc4000.c @@ -12,11 +12,11 @@ const device_type VC4000 = &device_creator<vc4000_sound_device>; vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, VC4000, "VC 4000 Custom", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_channel(NULL), - m_size(0), - m_pos(0), - m_level(0) + device_sound_interface(mconfig, *this), + m_channel(NULL), + m_size(0), + m_pos(0), + m_level(0) { memset(m_reg, 0, sizeof(UINT8)*1); } diff --git a/src/mess/audio/wswan.c b/src/mess/audio/wswan.c index b3cdbf33181..e5d442efbdc 100644 --- a/src/mess/audio/wswan.c +++ b/src/mess/audio/wswan.c @@ -25,25 +25,25 @@ const device_type WSWAN = &device_creator<wswan_sound_device>; wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, WSWAN, "WonderSwan Custom", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_channel(NULL), - m_sweep_step(0), - m_sweep_time(0), - m_sweep_count(0), - m_noise_type(0), - m_noise_reset(0), - m_noise_enable(0), - m_sample_address(0), - m_audio2_voice(0), - m_audio3_sweep(0), - m_audio4_noise(0), - m_mono(0), - m_voice_data(0), - m_output_volume(0), - m_external_stereo(0), - m_external_speaker(0), - m_noise_shift(0), - m_master_volume(0) + device_sound_interface(mconfig, *this), + m_channel(NULL), + m_sweep_step(0), + m_sweep_time(0), + m_sweep_count(0), + m_noise_type(0), + m_noise_reset(0), + m_noise_enable(0), + m_sample_address(0), + m_audio2_voice(0), + m_audio3_sweep(0), + m_audio4_noise(0), + m_mono(0), + m_voice_data(0), + m_output_volume(0), + m_external_stereo(0), + m_external_speaker(0), + m_noise_shift(0), + m_master_volume(0) { } @@ -246,5 +246,3 @@ WRITE8_MEMBER( wswan_sound_device::wswan_sound_port_w ) break; } } - - diff --git a/src/mess/drivers/a7800.c b/src/mess/drivers/a7800.c index f59091d5c31..df500ed4f8f 100644 --- a/src/mess/drivers/a7800.c +++ b/src/mess/drivers/a7800.c @@ -33,7 +33,7 @@ Colorburst/Hue = 180 degrees 2013/02/27 Robert Tuccitto Palette rebuild due to misaligned - data references. Corrected PAL color sequence order. + data references. Corrected PAL color sequence order. ***************************************************************************/ diff --git a/src/mess/drivers/abc80x.c b/src/mess/drivers/abc80x.c index e1668e08fdd..ab9f320343e 100644 --- a/src/mess/drivers/abc80x.c +++ b/src/mess/drivers/abc80x.c @@ -1093,7 +1093,7 @@ void abc802_state::machine_reset() // 50/60 Hz m_dart->cts_w(1, BIT(config, 3)); // 0 = 50Hz, 1 = 60Hz - + m_dfd_in = 0; } @@ -1174,7 +1174,7 @@ void abc806_state::machine_reset() // 50/60 Hz m_dart->cts_w(1, 0); // 0 = 50Hz, 1 = 60Hz - + m_dfd_in = 0; } diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c index bdf8cb6079e..e3faca5dd9a 100644 --- a/src/mess/drivers/apple2.c +++ b/src/mess/drivers/apple2.c @@ -637,7 +637,7 @@ static SLOT_INTERFACE_START(apple2_cards) SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */ SLOT_INTERFACE("zipdrive", A2BUS_ZIPDRIVE) /* ZIP Technologies IDE card */ SLOT_INTERFACE("echoiiplus", A2BUS_ECHOPLUS) /* Street Electronics Echo Plus (Echo II + Mockingboard clone) */ - SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ + SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ SLOT_INTERFACE_END static SLOT_INTERFACE_START(apple2eaux_cards) diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c index a82caffd378..ad81429f7c2 100644 --- a/src/mess/drivers/apple2gs.c +++ b/src/mess/drivers/apple2gs.c @@ -308,10 +308,10 @@ static SLOT_INTERFACE_START(apple2_cards) SLOT_INTERFACE("vulcan", A2BUS_VULCAN) /* AE Vulcan IDE card */ SLOT_INTERFACE("zipdrive", A2BUS_ZIPDRIVE) /* ZIP Technologies IDE card */ SLOT_INTERFACE("echoiiplus", A2BUS_ECHOPLUS) /* Street Electronics Echo Plus (Echo II + Mockingboard clone) */ -// SLOT_INTERFACE("mdturbo", A2BUS_UDRIVE_TURBO) /* ///SHH Systeme MicroDrive Turbo IDE card */ +// SLOT_INTERFACE("mdturbo", A2BUS_UDRIVE_TURBO) /* ///SHH Systeme MicroDrive Turbo IDE card */ // SLOT_INTERFACE("softcard", A2BUS_SOFTCARD) /* Microsoft SoftCard */ // appears not to be IIgs compatible? - SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ + SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ SLOT_INTERFACE_END static MACHINE_CONFIG_START( apple2gs, apple2gs_state ) diff --git a/src/mess/drivers/besta.c b/src/mess/drivers/besta.c index b3594516f58..8303f6911da 100644 --- a/src/mess/drivers/besta.c +++ b/src/mess/drivers/besta.c @@ -2,7 +2,7 @@ Besta-88 and Besta-90 engineering workstations. - Derived (OEMd?) from Force Computers' SYS68K series. + Derived (OEMd?) from Force Computers' SYS68K series. ****************************************************************************/ @@ -56,14 +56,14 @@ READ8_MEMBER( besta_state::mpcc_reg_r ) UINT8 ret; if (!(offset == 0 && !m_mpcc_regs[0])) { - DBG_LOG(1,"mpcc_reg_r",("(%d) = %02X at %s\n", offset, + DBG_LOG(1,"mpcc_reg_r",("(%d) = %02X at %s\n", offset, (offset > 31 ? -1 : m_mpcc_regs[offset]), machine.describe_context())); } switch (offset) { - case 0: /* r_stat aka ... */ + case 0: /* r_stat aka ... */ return (m_term_data) ? 0x80 : 0; - case 2: /* r_data aka ... */ + case 2: /* r_data aka ... */ ret = m_term_data; m_term_data = 0; return ret; @@ -96,18 +96,18 @@ WRITE8_MEMBER( besta_state::kbd_put ) #endif static ADDRESS_MAP_START(besta_mem, AS_PROGRAM, 32, besta_state) - AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_SHARE("p_ram") // local bus DRAM, 4MB -// AM_RANGE(0x08010000, 0x08011fff) AM_RAM // unknown -- accessed by cp31dssp - AM_RANGE(0xff000000, 0xff00ffff) AM_ROM AM_REGION("user1",0) // actual mapping is up to 0xff03ffff - AM_RANGE(0xff040000, 0xff07ffff) AM_RAM // onboard SRAM -// 68561 MPCC (console) -// AM_RANGE(0xff800000, 0xff80001f) AM_DEVREADWRITE8("mpcc", mpcc68561_t, reg_r, reg_w, 0xffffffff) + AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_SHARE("p_ram") // local bus DRAM, 4MB +// AM_RANGE(0x08010000, 0x08011fff) AM_RAM // unknown -- accessed by cp31dssp + AM_RANGE(0xff000000, 0xff00ffff) AM_ROM AM_REGION("user1",0) // actual mapping is up to 0xff03ffff + AM_RANGE(0xff040000, 0xff07ffff) AM_RAM // onboard SRAM +// 68561 MPCC (console) +// AM_RANGE(0xff800000, 0xff80001f) AM_DEVREADWRITE8("mpcc", mpcc68561_t, reg_r, reg_w, 0xffffffff) AM_RANGE(0xff800000, 0xff80001f) AM_READWRITE8(mpcc_reg_r, mpcc_reg_w, 0xffffffff) -// AM_RANGE(0xff800200, 0xff800xxx) // 68230 PIT2 -// AM_RANGE(0xff800400, 0xff800xxx) // ??? -- shows up in cp31dssp log -// AM_RANGE(0xff800800, 0xff800xxx) // BIM -// AM_RANGE(0xff800a00, 0xff800xxx) // 62421 RTC -// AM_RANGE(0xff800c00, 0xff800xxx) // 68230 PIT +// AM_RANGE(0xff800200, 0xff800xxx) // 68230 PIT2 +// AM_RANGE(0xff800400, 0xff800xxx) // ??? -- shows up in cp31dssp log +// AM_RANGE(0xff800800, 0xff800xxx) // BIM +// AM_RANGE(0xff800a00, 0xff800xxx) // 62421 RTC +// AM_RANGE(0xff800c00, 0xff800xxx) // 68230 PIT ADDRESS_MAP_END /* Input ports */ @@ -119,9 +119,9 @@ void besta_state::machine_reset() { UINT8* user1 = memregion("user1")->base(); - memcpy((UINT8*)m_p_ram.target(),user1,0x10000); // not really what happens but... - memset(m_mpcc_regs, sizeof(m_mpcc_regs), 0); // should initialize to defined values - m_mpcc_regs[8] = 0x80; // always ready to transmit + memcpy((UINT8*)m_p_ram.target(),user1,0x10000); // not really what happens but... + memset(m_mpcc_regs, sizeof(m_mpcc_regs), 0); // should initialize to defined values + m_mpcc_regs[8] = 0x80; // always ready to transmit machine().device("maincpu")->reset(); } @@ -139,7 +139,7 @@ static MACHINE_CONFIG_START( besta, besta_state ) MCFG_CPU_PROGRAM_MAP(besta_mem) #if 0 - MCFG_MPCC68561_ADD("mpcc", XTAL_25MHz, line_cb_t()); // confirm internal oscillator frequency + MCFG_MPCC68561_ADD("mpcc", XTAL_25MHz, line_cb_t()); // confirm internal oscillator frequency #endif MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf) MACHINE_CONFIG_END @@ -147,7 +147,7 @@ MACHINE_CONFIG_END /* ROM definition */ ROM_START( besta88 ) - ROM_REGION32_BE( 0x10000, "user1", ROMREGION_ERASEFF ) + ROM_REGION32_BE( 0x10000, "user1", ROMREGION_ERASEFF ) ROM_SYSTEM_BIOS(0, "cp31dbg", "CP31 Debug") ROMX_LOAD( "cp31dbgboot.27c512", 0x0000, 0x10000, CRC(9bf057de) SHA1(b13cb16042e4c6ca63ae26058a78259c0849d0b6), ROM_BIOS(1)) diff --git a/src/mess/drivers/c64.c b/src/mess/drivers/c64.c index 7d03b68254c..95051563b6a 100644 --- a/src/mess/drivers/c64.c +++ b/src/mess/drivers/c64.c @@ -1034,7 +1034,7 @@ void c64_state::machine_reset() m_sid->reset(); m_cia1->reset(); m_cia2->reset(); - + m_iec->reset(); m_exp->reset(); m_user->reset(); diff --git a/src/mess/drivers/casloopy.c b/src/mess/drivers/casloopy.c index 21089d15d7c..ccc3567fe4f 100644 --- a/src/mess/drivers/casloopy.c +++ b/src/mess/drivers/casloopy.c @@ -13,13 +13,13 @@ the idea is to understand the HW enough to extract the SH-1 internal BIOS data via a trojan; - ASM notes: - - first vector is almost certainly VBR value. - - [VBR + 0x2c] irq for i/o? - - [VBR + 0x140] points to an internal BIOS routine, at 0x6238 - (Nigaoe Artist has a direct 0x648c instead) - - 0x0604 is probably a BRA -2 / NOP (some games puts that as a null irq vector) - - Nigaoe Artist jumps to 0x668 at some point. + ASM notes: + - first vector is almost certainly VBR value. + - [VBR + 0x2c] irq for i/o? + - [VBR + 0x140] points to an internal BIOS routine, at 0x6238 + (Nigaoe Artist has a direct 0x648c instead) + - 0x0604 is probably a BRA -2 / NOP (some games puts that as a null irq vector) + - Nigaoe Artist jumps to 0x668 at some point. =============================================================================== @@ -379,7 +379,7 @@ WRITE16_MEMBER(casloopy_state::sh7021_w) sh7021_regs[0x7e/2]&=0xfffe; } -// printf("%08x %04x\n",sh7021_regs[offset],0x05ffff00+offset*2); +// printf("%08x %04x\n",sh7021_regs[offset],0x05ffff00+offset*2); } READ8_MEMBER(casloopy_state::casloopy_bitmap_r) @@ -402,7 +402,7 @@ static ADDRESS_MAP_START( casloopy_map, AS_PROGRAM, 32, casloopy_state ) AM_RANGE(0x04058000, 0x04058007) AM_READWRITE16(casloopy_vregs_r,casloopy_vregs_w,0xffffffff) AM_RANGE(0x0405b000, 0x0405b00f) AM_RAM AM_SHARE("vregs") // RGB555 brightness control plus scrolling AM_RANGE(0x05ffff00, 0x05ffffff) AM_READWRITE16(sh7021_r,sh7021_w,0xffffffff) -// AM_RANGE(0x05ffff00, 0x05ffffff) - SH7021 internal i/o +// AM_RANGE(0x05ffff00, 0x05ffffff) - SH7021 internal i/o AM_RANGE(0x06000000, 0x061fffff) AM_ROM AM_REGION("rom_cart",0) AM_RANGE(0x07000000, 0x070003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb) AM_RANGE(0x09000000, 0x0907ffff) AM_RAM AM_SHARE("wram") @@ -482,10 +482,10 @@ static MACHINE_CONFIG_START( casloopy, casloopy_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(8000000, 444, 0, 256, 263, 0, 224) -// MCFG_SCREEN_REFRESH_RATE(60) -// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) -// MCFG_SCREEN_SIZE(444, 263) -// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) +// MCFG_SCREEN_REFRESH_RATE(60) +// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) +// MCFG_SCREEN_SIZE(444, 263) +// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) MCFG_SCREEN_UPDATE_DRIVER(casloopy_state, screen_update_casloopy) MCFG_PALETTE_LENGTH(512) diff --git a/src/mess/drivers/cat.c b/src/mess/drivers/cat.c index 2444e9bc725..17d5b15681f 100644 --- a/src/mess/drivers/cat.c +++ b/src/mess/drivers/cat.c @@ -93,7 +93,7 @@ Scott Kim - responsible for fonts on swyft and cat Ralph Voorhees - Model construction and mockups (swyft 'flat cat') Cat HLSL stuff: -*scanlines: +*scanlines: the cat has somewhat visible and fairly close scanlines with very little fuzziness try hlsl options: hlsl_prescale_x 4 @@ -937,7 +937,7 @@ static void duart_tx(device_t *device, int channel, UINT8 data) * IP2: KTOBF (IP2 changes state 0->1 or 1->0 on the rising edge of KTOBF using a d-latch; KTOBF is a 6.5536ms-period squarewave generated by one of the gate arrays, i need to check with a scope to see whether it is a single spike/pulse every 6.5536ms or if from the gate array it inverts every 6.5536ms, documentation isn't 100% clear but I suspect the former) [uses the Delta IP2 state change detection feature to generate an interrupt; I'm not sure if IP2 is used as a counter clock source but given the beep frequency of the real unit i very much doubt it, 6.5536ms is too slow] * IP3: RG ("ring" input) * IP4: Centronics BUSY - * IP5: DSR + * IP5: DSR */ static UINT8 duart_input(device_t *device) { diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c index 7e0e2d8f572..cc95d7c300b 100644 --- a/src/mess/drivers/cbm2.c +++ b/src/mess/drivers/cbm2.c @@ -364,19 +364,19 @@ READ8_MEMBER( cbm2_state::ext_read ) if (!casseg1) { - data = m_ram->pointer()[offset & 0xffff]; + data = m_ram->pointer()[offset & 0xffff]; } if (!casseg2) { - data = m_ram->pointer()[0x10000 | (offset & 0xffff)]; + data = m_ram->pointer()[0x10000 | (offset & 0xffff)]; } if (!casseg3 && (m_ram->size() > 0x20000)) { - data = m_ram->pointer()[0x20000 | (offset & 0xffff)]; + data = m_ram->pointer()[0x20000 | (offset & 0xffff)]; } if (!casseg4 && (m_ram->size() > 0x30000)) { - data = m_ram->pointer()[0x30000 | (offset & 0xffff)]; + data = m_ram->pointer()[0x30000 | (offset & 0xffff)]; } return data; @@ -402,19 +402,19 @@ WRITE8_MEMBER( cbm2_state::ext_write ) if (!casseg1) { - m_ram->pointer()[offset & 0xffff] = data; + m_ram->pointer()[offset & 0xffff] = data; } if (!casseg2) { - m_ram->pointer()[0x10000 | (offset & 0xffff)] = data; + m_ram->pointer()[0x10000 | (offset & 0xffff)] = data; } if (!casseg3 && (m_ram->size() > 0x20000)) { - m_ram->pointer()[0x20000 | (offset & 0xffff)] = data; + m_ram->pointer()[0x20000 | (offset & 0xffff)] = data; } if (!casseg4 && (m_ram->size() > 0x30000)) { - m_ram->pointer()[0x30000 | (offset & 0xffff)] = data; + m_ram->pointer()[0x30000 | (offset & 0xffff)] = data; } #endif @@ -1755,8 +1755,8 @@ WRITE8_MEMBER( cbm2_state::ext_tpi_pb_w ) bit description - 0 - 1 _BUSY2 + 0 + 1 _BUSY2 2 3 4 @@ -1862,8 +1862,8 @@ WRITE8_MEMBER( cbm2_state::ext_cia_pb_w ) bit description - 0 - 1 _BUSY2 + 0 + 1 _BUSY2 2 3 4 diff --git a/src/mess/drivers/clcd.c b/src/mess/drivers/clcd.c index 6be06b90cde..388f054a751 100644 --- a/src/mess/drivers/clcd.c +++ b/src/mess/drivers/clcd.c @@ -62,7 +62,7 @@ public: DECLARE_WRITE8_MEMBER(ramwrite_w) { // this area might be shared between rom & ram or it might be ram only -// printf( "ram write:%04x %02x\n", offset, data ); +// printf( "ram write:%04x %02x\n", offset, data ); } // these seem to control what appears in the memory space at various addresses. @@ -70,64 +70,64 @@ public: DECLARE_WRITE8_MEMBER(fa00_w) { -// printf( "fa00\n" ); +// printf( "fa00\n" ); } DECLARE_WRITE8_MEMBER(fa80_w) { -// printf( "fa80\n" ); +// printf( "fa80\n" ); } DECLARE_WRITE8_MEMBER(fb00_w) { -// printf( "fb00\n" ); +// printf( "fb00\n" ); } DECLARE_WRITE8_MEMBER(fb80_w) { -// printf( "fb80\n" ); +// printf( "fb80\n" ); } DECLARE_WRITE8_MEMBER(fc00_w) { -// printf( "fc00\n" ); +// printf( "fc00\n" ); } DECLARE_WRITE8_MEMBER(fc80_w) { -// printf( "fc80\n" ); +// printf( "fc80\n" ); } DECLARE_WRITE8_MEMBER(fd00_w) { -// printf( "fd00\n" ); +// printf( "fd00\n" ); } DECLARE_WRITE8_MEMBER(fd80_w) { -// printf( "fd80\n" ); +// printf( "fd80\n" ); } DECLARE_WRITE8_MEMBER(fe00_w) { -// printf( "fe00\n" ); +// printf( "fe00\n" ); } DECLARE_WRITE8_MEMBER(fe80_w) { -// printf( "fe80\n" ); +// printf( "fe80\n" ); } DECLARE_WRITE8_MEMBER(rombank_w) { -// printf( "rom bank %02x\n", data); +// printf( "rom bank %02x\n", data); // this might be for ram banking membank("bankedroms")->set_entry(0); } DECLARE_WRITE8_MEMBER(ff80_w) { -// printf( "ff80:%02x %02x\n", offset, data ); +// printf( "ff80:%02x %02x\n", offset, data ); } WRITE8_MEMBER( via0_pa_w ) diff --git a/src/mess/drivers/craft.c b/src/mess/drivers/craft.c index ec6483d96db..d70adaaea19 100644 --- a/src/mess/drivers/craft.c +++ b/src/mess/drivers/craft.c @@ -76,9 +76,9 @@ public: DECLARE_DRIVER_INIT(craft); virtual void machine_reset(); UINT32 screen_update_craft(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); -#if ENABLE_VERBOSE_LOG +#if ENABLE_VERBOSE_LOG inline void verboselog(int n_level, const char *s_fmt, ...); -#endif +#endif }; void craft_state::machine_start() diff --git a/src/mess/drivers/dectalk.c b/src/mess/drivers/dectalk.c index cd16dae0617..1c439e102ee 100644 --- a/src/mess/drivers/dectalk.c +++ b/src/mess/drivers/dectalk.c @@ -179,7 +179,7 @@ better; in reality, it's big advantage was it made far fewer stupid stress-placement mistakes because it did a much better job of understanding prefixes and suffixes. -Dave Conroy +Dave Conroy */ /* There are 3 things on the pins. Serial I/O. The telephone line. Power. @@ -202,7 +202,7 @@ and use the telephone pins as a transformer-coupled audio output. This is what we used to do in the lab all the time. -dgc (dg(no!spam)cx@mac.com) +dgc (dg(no!spam)cx@mac.com) */ // USE_LOOSE_TIMING makes the cpu interleave much lower and boosts it on fifo and flag writes by the 68k and semaphore sets by the dsp @@ -792,9 +792,9 @@ TIMER_CALLBACK_MEMBER(dectalk_state::outfifo_read_cb) // also it doesn't work well, the setup menu is badly corrupt /*device_t *duart = machine().device("duart68681"); if (machine.input().code_pressed(KEYCODE_F1)) - duart68681_rx_break(duart, 1, 1); + duart68681_rx_break(duart, 1, 1); else - duart68681_rx_break(duart, 1, 0);*/ + duart68681_rx_break(duart, 1, 0);*/ } /* Driver init: stuff that needs setting up which isn't directly affected by reset */ @@ -886,7 +886,7 @@ ROM_START( dectalk ) ROM_LOAD16_BYTE("23-098e5.e15", 0x38001, 0x4000, CRC(3d8910e7) SHA1(01921e77b46c2d4845023605239c45ffa4a35872)) // Label: "SP8510098E5" @ E15 /* the undumped 1.8 or 2.0 (beta?) version likely has roms: - 23-091e5.e22, 23-092e5.e21, 23-093e5.e20, 23-094e5.e19, + 23-091e5.e22, 23-092e5.e21, 23-093e5.e20, 23-094e5.e19, 23-099e5.e8, 23-100e5.e7, 23-101e5.e6, 23-102e5.e5 and shares the 23-103e5 thru 106e5, and 095e5 thru 098e5 roms with the 2.0 version above diff --git a/src/mess/drivers/fp200.c b/src/mess/drivers/fp200.c index 2bc4b3e2ebd..375b86b17e8 100644 --- a/src/mess/drivers/fp200.c +++ b/src/mess/drivers/fp200.c @@ -1,15 +1,15 @@ /*************************************************************************** - FP-200 (c) 1982 Casio + FP-200 (c) 1982 Casio - preliminary driver by Angelo Salese + preliminary driver by Angelo Salese - TODO: - - What's the LCDC type? Custom? - - Why RAM isn't recognized? Perhaps RAM is back-upped and needs default - data? - - Unless I've missed something in the schems, this one shouldn't have any - sound capability. + TODO: + - What's the LCDC type? Custom? + - Why RAM isn't recognized? Perhaps RAM is back-upped and needs default + data? + - Unless I've missed something in the schems, this one shouldn't have any + sound capability. ***************************************************************************/ @@ -129,11 +129,11 @@ UINT32 fp200_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, /* else if(m_lcd.attr[x/8+yoffs*20] == 0x40) { - UINT8 vram,pix; + UINT8 vram,pix; - vram = m_lcd.vram[x/8+yoffs*20]; - pix = (vram) >> (7-(yoffs & 7)) & 1; - bitmap.pix16(y,x) = pix; + vram = m_lcd.vram[x/8+yoffs*20]; + pix = (vram) >> (7-(yoffs & 7)) & 1; + bitmap.pix16(y,x) = pix; }*/ } } @@ -159,11 +159,11 @@ UINT32 fp200_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, } /*else if(m_lcd.attr[x/8+yoffs*20] == 0x40) { - UINT8 vram,pix; + UINT8 vram,pix; - vram = m_lcd.vram[x/8+yoffs*20]; - pix = (vram) >> (7-(yoffs & 7)) & 1; - bitmap.pix16(y,x) = pix; + vram = m_lcd.vram[x/8+yoffs*20]; + pix = (vram) >> (7-(yoffs & 7)) & 1; + bitmap.pix16(y,x) = pix; }*/ } } @@ -175,7 +175,7 @@ UINT32 fp200_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, /* [1] DDDD DDDD vram data/attr (left half) [2] DDDD DDDD vram data/attr (right half) -[8] SSSS --YY Status code (1=vram type/0xb=attr type) / upper part of Y address +[8] SSSS --YY Status code (1=vram type/0xb=attr type) / upper part of Y address [9] YYYY XXXX lower part of Y address / X address */ UINT8 fp200_state::read_lcd_attr(UINT16 X, UINT16 Y) @@ -262,7 +262,7 @@ void fp200_state::write_lcd_attr(UINT16 X, UINT16 Y,UINT8 data) return; //if(data != 0x60) - // printf("%d %d %02x\n",X,Y,data); + // printf("%d %d %02x\n",X,Y,data); m_lcd.attr[base_offs] = data; } @@ -316,9 +316,9 @@ WRITE8_MEMBER(fp200_state::fp200_lcd_w) READ8_MEMBER(fp200_state::fp200_keyb_r) { const char *const keynames[16] = { "KEY0", "KEY1", "KEY2", "KEY3", - "KEY4", "KEY5", "KEY6", "KEY7", - "KEY8", "KEY9", "UNUSED", "UNUSED", - "UNUSED", "UNUSED", "UNUSED", "UNUSED"}; + "KEY4", "KEY5", "KEY6", "KEY7", + "KEY8", "KEY9", "UNUSED", "UNUSED", + "UNUSED", "UNUSED", "UNUSED", "UNUSED"}; UINT8 res; if(offset == 0) @@ -452,7 +452,7 @@ static INPUT_PORTS_START( fp200 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("; / +") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, fp200_state,keyb_irq, 0) PORT_START("KEY4") -// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) //PORT_TOGGLE PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, fp200_state,keyb_irq, 0) +// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) //PORT_TOGGLE PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, fp200_state,keyb_irq, 0) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("INS / DEL") PORT_CODE(KEYCODE_INSERT) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, fp200_state,keyb_irq, 0) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("HOME / CLS") PORT_CODE(KEYCODE_HOME) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, fp200_state,keyb_irq, 0) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PF0 / PF5") PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, fp200_state,keyb_irq, 0) diff --git a/src/mess/drivers/gb.c b/src/mess/drivers/gb.c index 05e63e637fe..c6476eef7d2 100644 --- a/src/mess/drivers/gb.c +++ b/src/mess/drivers/gb.c @@ -662,8 +662,8 @@ static SLOT_INTERFACE_START(gb_cart) SLOT_INTERFACE_INTERNAL("rom_digimon", GB_ROM_DIGIMON) SLOT_INTERFACE_INTERNAL("rom_rock8", GB_ROM_ROCKMAN8) SLOT_INTERFACE_INTERNAL("rom_sm3sp", GB_ROM_SM3SP) -// SLOT_INTERFACE_INTERNAL("rom_dkong5", GB_ROM_DKONG5) -// SLOT_INTERFACE_INTERNAL("rom_unk01", GB_ROM_UNK01) +// SLOT_INTERFACE_INTERNAL("rom_dkong5", GB_ROM_DKONG5) +// SLOT_INTERFACE_INTERNAL("rom_unk01", GB_ROM_UNK01) SLOT_INTERFACE_END static SLOT_INTERFACE_START(megaduck_cart) diff --git a/src/mess/drivers/mmodular.c b/src/mess/drivers/mmodular.c index ef9650b9269..cda1358fced 100644 --- a/src/mess/drivers/mmodular.c +++ b/src/mess/drivers/mmodular.c @@ -243,10 +243,10 @@ WRITE8_MEMBER(polgar_state::write_polgar_IO) m_lcdc->write(space, BIT(data,0), lcd_char); } - if (BIT(data,2) || BIT(data,3)) - machine().device<beep_device>("beep")->set_state(1); - else - machine().device<beep_device>("beep")->set_state(0); + if (BIT(data,2) || BIT(data,3)) + machine().device<beep_device>("beep")->set_state(1); + else + machine().device<beep_device>("beep")->set_state(0); if (BIT(data,7) && BIT(data, 4)) { for (i = 0;i < 8;i++) @@ -411,12 +411,12 @@ WRITE8_MEMBER(polgar_state::milano_write_LED) WRITE8_MEMBER(polgar_state::megaiv_write_LED) { - if (BIT(data,7)) - machine().device<beep_device>("beep")->set_state(1); - else - machine().device<beep_device>("beep")->set_state(0); - output_set_led_value(102,BIT(data,1)?1:0); - output_set_led_value(107,BIT(data,6)?1:0); + if (BIT(data,7)) + machine().device<beep_device>("beep")->set_state(1); + else + machine().device<beep_device>("beep")->set_state(0); + output_set_led_value(102,BIT(data,1)?1:0); + output_set_led_value(107,BIT(data,6)?1:0); // logerror("LEDs FUNC = %02x found = %d\n",data,found); logerror("LED mask %d\n",data); @@ -474,14 +474,14 @@ if ((data & 0xa1) == 0xa1) { found = 1; } -if (BIT(data,7)) - machine().device<beep_device>("beep")->set_state(1); -else - machine().device<beep_device>("beep")->set_state(0); -if (BIT(data,1)) - machine().device<beep_device>("beep")->set_state(1); -else - machine().device<beep_device>("beep")->set_state(0); +if (BIT(data,7)) + machine().device<beep_device>("beep")->set_state(1); +else + machine().device<beep_device>("beep")->set_state(0); +if (BIT(data,1)) + machine().device<beep_device>("beep")->set_state(1); +else + machine().device<beep_device>("beep")->set_state(0); // logerror("LEDs FUNC = %02x found = %d\n",data,found); if (!found) { logerror("unknown LED mask %d\n",data); @@ -723,10 +723,10 @@ READ32_MEMBER(polgar_state::read_keys_BPL32) WRITE8_MEMBER(polgar_state::beep_academy) { - if (!BIT(data,7)) - machine().device<beep_device>("beep")->set_state(1); - else - machine().device<beep_device>("beep")->set_state(0); + if (!BIT(data,7)) + machine().device<beep_device>("beep")->set_state(1); + else + machine().device<beep_device>("beep")->set_state(0); } WRITE8_MEMBER(polgar_state::megaiv_IO) @@ -903,10 +903,10 @@ void polgar_state::write_IOenable(unsigned char data,address_space &space) logerror("Write to IOENBL data: %08x\n",data); - if (BIT(data,2) || BIT(data,3)) - speaker->set_state(1); - else - speaker->set_state(0); + if (BIT(data,2) || BIT(data,3)) + speaker->set_state(1); + else + speaker->set_state(0); } } diff --git a/src/mess/drivers/mod8.c b/src/mess/drivers/mod8.c index bc9aaf1a508..a074bf79116 100644 --- a/src/mess/drivers/mod8.c +++ b/src/mess/drivers/mod8.c @@ -90,7 +90,7 @@ IRQ_CALLBACK_MEMBER(mod8_state::mod8_irq_callback) void mod8_state::machine_reset() { - machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mod8_state::mod8_irq_callback),this)); + machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mod8_state::mod8_irq_callback),this)); } WRITE8_MEMBER( mod8_state::kbd_put ) diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c index 720ccdc28fa..e9d9efce4a9 100644 --- a/src/mess/drivers/nes.c +++ b/src/mess/drivers/nes.c @@ -568,7 +568,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( famicom, nes ) MCFG_DEVICE_REMOVE( "nes_slot" ) - MCFG_NES_CARTRIDGE_ADD("nes_slot", nes_crt_interface, nes_cart, NULL, NULL) // here we need a non-mandatory cart... + MCFG_NES_CARTRIDGE_ADD("nes_slot", nes_crt_interface, nes_cart, NULL, NULL) // here we need a non-mandatory cart... MCFG_NES_CARTRIDGE_NOT_MANDATORY MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, nes_floppy_interface) diff --git a/src/mess/drivers/ng_aes.c b/src/mess/drivers/ng_aes.c index 58866950e8c..202437817f9 100644 --- a/src/mess/drivers/ng_aes.c +++ b/src/mess/drivers/ng_aes.c @@ -1692,21 +1692,21 @@ ROM_START( aes ) ROM_SYSTEM_BIOS( 2, "uni-bios23", "Universe Bios (Ver. 2.3)" ) ROMX_LOAD( "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(3) ) /* Universe Bios v2.3 (hack) */ ROM_SYSTEM_BIOS( 3, "uni-bios30", "Universe Bios (Ver. 3.0)" ) - ROMX_LOAD("uni-bios-30.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(4)) /* Universe Bios v3.0 */ + ROMX_LOAD("uni-bios-30.rom", 0x00000, 0x020000, CRC(a97c89a9) SHA1(97a5eff3b119062f10e31ad6f04fe4b90d366e7f), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(4)) /* Universe Bios v3.0 */ ROM_SYSTEM_BIOS( 4, "uni-bios10", "Universe Bios (Ver. 1.0)" ) - ROMX_LOAD("uni-bios-10.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(5)) /* Universe Bios v1.0 */ + ROMX_LOAD("uni-bios-10.rom", 0x00000, 0x020000, CRC(0ce453a0) SHA1(3b4c0cd26c176fc6b26c3a2f95143dd478f6abf9), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(5)) /* Universe Bios v1.0 */ ROM_SYSTEM_BIOS( 5, "uni-bios11", "Universe Bios (Ver. 1.1)" ) - ROMX_LOAD("uni-bios-11.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(6)) /* Universe Bios v1.1 */ + ROMX_LOAD("uni-bios-11.rom", 0x00000, 0x020000, CRC(5dda0d84) SHA1(4153d533c02926a2577e49c32657214781ff29b7), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(6)) /* Universe Bios v1.1 */ ROM_SYSTEM_BIOS( 6, "uni-bios12", "Universe Bios (Ver. 1.2)" ) - ROMX_LOAD("uni-bios-12.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(7)) /* Universe Bios v1.2 */ + ROMX_LOAD("uni-bios-12.rom", 0x00000, 0x020000, CRC(4fa698e9) SHA1(682e13ec1c42beaa2d04473967840c88fd52c75a), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(7)) /* Universe Bios v1.2 */ ROM_SYSTEM_BIOS( 7, "uni-bios13", "Universe Bios (Ver. 1.3)" ) - ROMX_LOAD("uni-bios-13.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(8)) /* Universe Bios v1.3 */ + ROMX_LOAD("uni-bios-13.rom", 0x00000, 0x020000, CRC(b24b44a0) SHA1(eca8851d30557b97c309a0d9f4a9d20e5b14af4e), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(8)) /* Universe Bios v1.3 */ ROM_SYSTEM_BIOS( 8, "uni-bios20", "Universe Bios (Ver. 2.0)" ) - ROMX_LOAD("uni-bios-20.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(9)) /* Universe Bios v2.0 */ + ROMX_LOAD("uni-bios-20.rom", 0x00000, 0x020000, CRC(0c12c2ad) SHA1(37bcd4d30f3892078b46841d895a6eff16dc921e), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(9)) /* Universe Bios v2.0 */ ROM_SYSTEM_BIOS( 9, "uni-bios21", "Universe Bios (Ver. 2.1)" ) - ROMX_LOAD("uni-bios-21.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(10)) /* Universe Bios v2.1 */ + ROMX_LOAD("uni-bios-21.rom", 0x00000, 0x020000, CRC(8dabf76b) SHA1(c23732c4491d966cf0373c65c83c7a4e88f0082c), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(10)) /* Universe Bios v2.1 */ ROM_SYSTEM_BIOS( 10, "uni-bios22", "Universe Bios (Ver. 2.2)" ) - ROMX_LOAD("uni-bios-22.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(11)) /* Universe Bios v2.2 */ + ROMX_LOAD("uni-bios-22.rom", 0x00000, 0x020000, CRC(2d50996a) SHA1(5241a4fb0c63b1a23fd1da8efa9c9a9bd3b4279c), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(11)) /* Universe Bios v2.2 */ ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF ) diff --git a/src/mess/drivers/ob68k1a.c b/src/mess/drivers/ob68k1a.c index 0f4ece25381..a9ba2d5a3bb 100644 --- a/src/mess/drivers/ob68k1a.c +++ b/src/mess/drivers/ob68k1a.c @@ -326,8 +326,8 @@ void ob68k1a_state::machine_reset() // initialize COM8116 com8116_w(program, 0, 0xee); -// m_dbrg->stt_w(program, 0, 0x01); -// m_dbrg->str_w(program, 0, 0x01); +// m_dbrg->stt_w(program, 0, 0x01); +// m_dbrg->str_w(program, 0, 0x01); // set reset vector void *ram = program.get_write_ptr(0); diff --git a/src/mess/drivers/odyssey2.c b/src/mess/drivers/odyssey2.c index 92c49a0ce6e..23cf3393033 100644 --- a/src/mess/drivers/odyssey2.c +++ b/src/mess/drivers/odyssey2.c @@ -246,24 +246,24 @@ INPUT_PORTS_END const UINT8 odyssey2_colors[] = { /* Background,Grid Dim */ - 0x00,0x00,0x00, /* Black */ // i r g b - 0x1A,0x37,0xBE, /* Blue - Calibrated To Real VideoPac */ // i r g B - 0x00,0x6D,0x07, /* Green - Calibrated To Real VideoPac */ // i r G b - 0x2A,0xAA,0xBE, /* Blue-Green - Calibrated To Real VideoPac */ // i r G B - 0x79,0x00,0x00, /* Red - Calibrated To Real VideoPac */ // i R g b - 0x94,0x30,0x9F, /* Violet - Calibrated To Real VideoPac */ // i R g B - 0x77,0x67,0x0B, /* Khaki - Calibrated To Real VideoPac */ // i R g B - 0xCE,0xCE,0xCE, /* Lt Grey */ // i R G B + 0x00,0x00,0x00, /* Black */ // i r g b + 0x1A,0x37,0xBE, /* Blue - Calibrated To Real VideoPac */ // i r g B + 0x00,0x6D,0x07, /* Green - Calibrated To Real VideoPac */ // i r G b + 0x2A,0xAA,0xBE, /* Blue-Green - Calibrated To Real VideoPac */ // i r G B + 0x79,0x00,0x00, /* Red - Calibrated To Real VideoPac */ // i R g b + 0x94,0x30,0x9F, /* Violet - Calibrated To Real VideoPac */ // i R g B + 0x77,0x67,0x0B, /* Khaki - Calibrated To Real VideoPac */ // i R g B + 0xCE,0xCE,0xCE, /* Lt Grey */ // i R G B /* Background,Grid Bright */ - 0x67,0x67,0x67, /* Grey - Calibrated To Real VideoPac */ // I R g B - 0x5C,0x80,0xF6, /* Lt Blue - Calibrated To Real VideoPac */ // I R g B - 0x56,0xC4,0x69, /* Lt Green - Calibrated To Real VideoPac */ // I R g B - 0x77,0xE6,0xEB, /* Lt Blue-Green - Calibrated To Real VideoPac */ // I R g b - 0xC7,0x51,0x51, /* Lt Red - Calibrated To Real VideoPac */ // I R g b - 0xDC,0x84,0xE8, /* Lt Violet - Calibrated To Real VideoPac */ // I R g B - 0xC6,0xB8,0x6A, /* Lt Yellow - Calibrated To Real VideoPac */ // I R G b - 0xFF,0xFF,0xFF, /* White */ // I R G B + 0x67,0x67,0x67, /* Grey - Calibrated To Real VideoPac */ // I R g B + 0x5C,0x80,0xF6, /* Lt Blue - Calibrated To Real VideoPac */ // I R g B + 0x56,0xC4,0x69, /* Lt Green - Calibrated To Real VideoPac */ // I R g B + 0x77,0xE6,0xEB, /* Lt Blue-Green - Calibrated To Real VideoPac */ // I R g b + 0xC7,0x51,0x51, /* Lt Red - Calibrated To Real VideoPac */ // I R g b + 0xDC,0x84,0xE8, /* Lt Violet - Calibrated To Real VideoPac */ // I R g B + 0xC6,0xB8,0x6A, /* Lt Yellow - Calibrated To Real VideoPac */ // I R G b + 0xFF,0xFF,0xFF, /* White */ // I R G B }; @@ -280,23 +280,23 @@ void g7400_state::palette_init() { const UINT8 g7400_colors[] = { - 0x00,0x00,0x00, // Black - 0x1A,0x37,0xBE, // Blue - 0x00,0x6D,0x07, // Green - 0x2A,0xAA,0xBE, // Blue-Green - 0x79,0x00,0x00, // Red - 0x94,0x30,0x9F, // Violet - 0x77,0x67,0x0B, // Khaki - 0xCE,0xCE,0xCE, // Lt Grey - - 0x67,0x67,0x67, // Grey - 0x5C,0x80,0xF6, // Lt Blue - 0x56,0xC4,0x69, // Lt Green - 0x77,0xE6,0xEB, // Lt Blue-Green - 0xC7,0x51,0x51, // Lt Red - 0xDC,0x84,0xE8, // Lt Violet - 0xC6,0xB8,0x6A, // Lt Yellow - 0xff,0xff,0xff // White + 0x00,0x00,0x00, // Black + 0x1A,0x37,0xBE, // Blue + 0x00,0x6D,0x07, // Green + 0x2A,0xAA,0xBE, // Blue-Green + 0x79,0x00,0x00, // Red + 0x94,0x30,0x9F, // Violet + 0x77,0x67,0x0B, // Khaki + 0xCE,0xCE,0xCE, // Lt Grey + + 0x67,0x67,0x67, // Grey + 0x5C,0x80,0xF6, // Lt Blue + 0x56,0xC4,0x69, // Lt Green + 0x77,0xE6,0xEB, // Lt Blue-Green + 0xC7,0x51,0x51, // Lt Red + 0xDC,0x84,0xE8, // Lt Violet + 0xC6,0xB8,0x6A, // Lt Yellow + 0xff,0xff,0xff // White }; @@ -976,4 +976,3 @@ COMP( 1979, videopac, odyssey2, 0, videopac, odyssey2, odyssey2_state, odys COMP( 1983, g7400, odyssey2, 0, g7400, odyssey2, odyssey2_state, odyssey2, "Philips", "Videopac Plus G7400", GAME_IMPERFECT_GRAPHICS ) COMP( 1983, jopac, odyssey2, 0, g7400, odyssey2, odyssey2_state, odyssey2, "Brandt", "Jopac JO7400", GAME_IMPERFECT_GRAPHICS ) COMP( 1983, odyssey3, odyssey2, 0, odyssey3, odyssey2, odyssey2_state, odyssey2, "Maganvox", "Odyssey 3 Command Center (prototype)", GAME_IMPERFECT_GRAPHICS ) - diff --git a/src/mess/drivers/pc4.c b/src/mess/drivers/pc4.c index f6f8299f32b..1149b84b590 100644 --- a/src/mess/drivers/pc4.c +++ b/src/mess/drivers/pc4.c @@ -192,7 +192,7 @@ void pc4_state::machine_start() m_blink_timer = timer_alloc(BLINKING_TIMER); m_blink_timer->adjust(attotime::from_msec(409), 0, attotime::from_msec(409)); - for (int i=0; i<8; i++) + for (int i=0; i<8; i++) { io_port[i] = ioport(bitnames[i]); } diff --git a/src/mess/drivers/pet.c b/src/mess/drivers/pet.c index c2808dcada8..0725a9491ce 100644 --- a/src/mess/drivers/pet.c +++ b/src/mess/drivers/pet.c @@ -1795,7 +1795,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( cbm8296, pet80, cbm8296_state ) MCFG_MACHINE_START_OVERRIDE(cbm8296_state, cbm8296) MCFG_MACHINE_RESET_OVERRIDE(cbm8296_state, cbm8296) - + MCFG_CPU_MODIFY(M6502_TAG) MCFG_CPU_PROGRAM_MAP(cbm8296_mem) diff --git a/src/mess/drivers/thomson.c b/src/mess/drivers/thomson.c index b7c9db17a2f..1e5a03118a1 100644 --- a/src/mess/drivers/thomson.c +++ b/src/mess/drivers/thomson.c @@ -565,7 +565,7 @@ INPUT_PORTS_END static WRITE_LINE_DEVICE_HANDLER(thomson_index_callback) { - device->machine().driver_data<thomson_state>()->thomson_index_callback(device, state); + device->machine().driver_data<thomson_state>()->thomson_index_callback(device, state); } diff --git a/src/mess/drivers/vic10.c b/src/mess/drivers/vic10.c index 07783d18018..03496be5e95 100644 --- a/src/mess/drivers/vic10.c +++ b/src/mess/drivers/vic10.c @@ -586,7 +586,7 @@ void vic10_state::machine_start() void vic10_state::machine_reset() { m_maincpu->reset(); - + m_vic->reset(); m_sid->reset(); m_cia->reset(); diff --git a/src/mess/includes/c65.h b/src/mess/includes/c65.h index aa8084ac063..e335d30058f 100644 --- a/src/mess/includes/c65.h +++ b/src/mess/includes/c65.h @@ -103,7 +103,7 @@ public: UINT8 *m_io_ram_w_ptr; UINT8 *m_io_ram_r_ptr; c64_cart_t m_cart; - int m_nmilevel; int m_charset_select; + int m_nmilevel; int m_charset_select; int m_c64mode; UINT8 m_6511_port; UINT8 m_keyline; diff --git a/src/mess/includes/channelf.h b/src/mess/includes/channelf.h index 461db0dea57..e3e21990128 100644 --- a/src/mess/includes/channelf.h +++ b/src/mess/includes/channelf.h @@ -29,7 +29,7 @@ class channelf_state : public driver_device public: channelf_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_custom(*this,"custom") { } + m_custom(*this,"custom") { } DECLARE_READ8_MEMBER(channelf_port_0_r); DECLARE_READ8_MEMBER(channelf_port_1_r); diff --git a/src/mess/includes/fidelz80.h b/src/mess/includes/fidelz80.h index da2e72231eb..d098a78d0b3 100644 --- a/src/mess/includes/fidelz80.h +++ b/src/mess/includes/fidelz80.h @@ -17,11 +17,11 @@ class fidelz80_state : public driver_device public: fidelz80_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speech(*this, "speech"), - m_beep(*this, BEEPER_TAG), - m_i8041(*this, "mcu"), - m_i8243(*this, "i8243") + m_maincpu(*this, "maincpu"), + m_speech(*this, "speech"), + m_beep(*this, BEEPER_TAG), + m_i8041(*this, "mcu"), + m_i8243(*this, "i8243") { } required_device<cpu_device> m_maincpu; diff --git a/src/mess/includes/mikromik.h b/src/mess/includes/mikromik.h index 3c82d06e2a5..b852a410672 100644 --- a/src/mess/includes/mikromik.h +++ b/src/mess/includes/mikromik.h @@ -26,9 +26,9 @@ #define I8275_TAG "ic59" #define UPD7201_TAG "ic11" #define UPD7220_TAG "ic101" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" -#define RS232_C_TAG "rs232c" +#define RS232_A_TAG "rs232a" +#define RS232_B_TAG "rs232b" +#define RS232_C_TAG "rs232c" class mm1_state : public driver_device { diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index 0bc97034aeb..518f5f2197e 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -144,7 +144,7 @@ public: ioport_port *m_io_zapper2_y; ioport_port *m_io_paddle; - optional_device<nes_cart_slot_device> m_cartslot; //mandatory + optional_device<nes_cart_slot_device> m_cartslot; //mandatory private: /* devices */ diff --git a/src/mess/includes/ob68k1a.h b/src/mess/includes/ob68k1a.h index 1b33a8a8d03..785fcd8633f 100644 --- a/src/mess/includes/ob68k1a.h +++ b/src/mess/includes/ob68k1a.h @@ -19,8 +19,8 @@ #define MC6850_0_TAG "u34" #define MC6850_1_TAG "u26" #define COM8116_TAG "u56" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" +#define RS232_A_TAG "rs232a" +#define RS232_B_TAG "rs232b" class ob68k1a_state : public driver_device { diff --git a/src/mess/includes/osi.h b/src/mess/includes/osi.h index c7fe1ce7f07..295c346ba9d 100644 --- a/src/mess/includes/osi.h +++ b/src/mess/includes/osi.h @@ -93,7 +93,7 @@ class c1p_state : public sb2m600_state public: c1p_state(const machine_config &mconfig, device_type type, const char *tag) : sb2m600_state(mconfig, type, tag), - m_beep(*this, BEEPER_TAG) + m_beep(*this, BEEPER_TAG) { } required_device<beep_device> m_beep; diff --git a/src/mess/includes/pet.h b/src/mess/includes/pet.h index b99e292d500..8f0d1ceac79 100644 --- a/src/mess/includes/pet.h +++ b/src/mess/includes/pet.h @@ -24,8 +24,8 @@ #define M6520_2_TAG "b8" #define MC6845_TAG "ub13" #define SCREEN_TAG "screen" -#define PLA1_TAG "ue6" -#define PLA2_TAG "ue5" +#define PLA1_TAG "ue6" +#define PLA2_TAG "ue5" class pet_state : public driver_device { diff --git a/src/mess/includes/prof80.h b/src/mess/includes/prof80.h index 13be84c0888..681d44851f9 100644 --- a/src/mess/includes/prof80.h +++ b/src/mess/includes/prof80.h @@ -18,8 +18,8 @@ #define Z80_TAG "z1" #define UPD765_TAG "z38" #define UPD1990A_TAG "z43" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" +#define RS232_A_TAG "rs232a" +#define RS232_B_TAG "rs232b" // ------------------------------------------------------------------------ diff --git a/src/mess/includes/psion.h b/src/mess/includes/psion.h index 49de76d7799..f2db7fe48ad 100644 --- a/src/mess/includes/psion.h +++ b/src/mess/includes/psion.h @@ -22,13 +22,13 @@ class psion_state : public driver_device public: psion_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_lcdc(*this, "hd44780"), - m_beep(*this, BEEPER_TAG), - m_pack1(*this, "pack1"), - m_pack2(*this, "pack2"), - m_sys_register(*this, "sys_register"), - m_ram(*this, "ram"){ } + m_maincpu(*this, "maincpu"), + m_lcdc(*this, "hd44780"), + m_beep(*this, BEEPER_TAG), + m_pack1(*this, "pack1"), + m_pack2(*this, "pack2"), + m_sys_register(*this, "sys_register"), + m_ram(*this, "ram"){ } required_device<cpu_device> m_maincpu; required_device<hd44780_device> m_lcdc; diff --git a/src/mess/includes/special.h b/src/mess/includes/special.h index 2c0004995c5..7e47e02f1ba 100644 --- a/src/mess/includes/special.h +++ b/src/mess/includes/special.h @@ -158,7 +158,7 @@ extern const rgb_t specimx_palette[16]; /*----------- defined in audio/special.c -----------*/ class specimx_sound_device : public device_t, - public device_sound_interface + public device_sound_interface { public: specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -172,10 +172,10 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); public: - void set_input(int index, int state); + void set_input(int index, int state); private: - sound_stream *m_mixer_channel; + sound_stream *m_mixer_channel; int m_specimx_input[3]; }; diff --git a/src/mess/includes/studio2.h b/src/mess/includes/studio2.h index 45d012b5e6e..2d336198113 100644 --- a/src/mess/includes/studio2.h +++ b/src/mess/includes/studio2.h @@ -22,12 +22,12 @@ class studio2_state : public driver_device public: studio2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, CDP1802_TAG), - m_speaker(*this, BEEPER_TAG), - m_vdc(*this, CDP1861_TAG), - m_clear(*this, "CLEAR"), - m_a(*this, "A"), - m_b(*this, "B") + m_maincpu(*this, CDP1802_TAG), + m_speaker(*this, BEEPER_TAG), + m_vdc(*this, CDP1861_TAG), + m_clear(*this, "CLEAR"), + m_a(*this, "A"), + m_b(*this, "B") { } required_device<cosmac_device> m_maincpu; diff --git a/src/mess/includes/super80.h b/src/mess/includes/super80.h index 33d6ac23851..fac8471470c 100644 --- a/src/mess/includes/super80.h +++ b/src/mess/includes/super80.h @@ -120,4 +120,4 @@ MC6845_UPDATE_ROW( super80v_update_row ); /*----------- defined in machine/super80.c -----------*/ extern const z80pio_interface super80_pio_intf; -QUICKLOAD_LOAD( super80 );
\ No newline at end of file +QUICKLOAD_LOAD( super80 ); diff --git a/src/mess/includes/svision.h b/src/mess/includes/svision.h index 143fb9c40e4..1906b4041fb 100644 --- a/src/mess/includes/svision.h +++ b/src/mess/includes/svision.h @@ -100,21 +100,21 @@ enum SVISION_NOISE_Type struct SVISION_NOISE { - SVISION_NOISE() : - on(0), - right(0), - left(0), - play(0), - type(SVISION_NOISE_Type7Bit), - state(0), - volume(0), - count(0), - step(0.0), - pos(0.0), - value(0) - { - memset(reg, 0, sizeof(UINT8)*3); - } + SVISION_NOISE() : + on(0), + right(0), + left(0), + play(0), + type(SVISION_NOISE_Type7Bit), + state(0), + volume(0), + count(0), + step(0.0), + pos(0.0), + value(0) + { + memset(reg, 0, sizeof(UINT8)*3); + } UINT8 reg[3]; int on, right, left, play; @@ -128,19 +128,19 @@ struct SVISION_NOISE struct SVISION_DMA { - SVISION_DMA() : - on(0), - right(0), - left(0), - ca14to16(0), - start(0), - size(0), - pos(0.0), - step(0.0), - finished(0) - { - memset(reg, 0, sizeof(UINT8)*5); - } + SVISION_DMA() : + on(0), + right(0), + left(0), + ca14to16(0), + start(0), + size(0), + pos(0.0), + step(0.0), + finished(0) + { + memset(reg, 0, sizeof(UINT8)*5); + } UINT8 reg[5]; int on, right, left; @@ -152,16 +152,16 @@ struct SVISION_DMA struct SVISION_CHANNEL { - SVISION_CHANNEL() : - on(0), - waveform(0), - volume(0), - pos(0), - size(0), - count(0) - { - memset(reg, 0, sizeof(UINT8)*4); - } + SVISION_CHANNEL() : + on(0), + waveform(0), + volume(0), + pos(0), + size(0), + count(0) + { + memset(reg, 0, sizeof(UINT8)*4); + } UINT8 reg[4]; int on; @@ -175,7 +175,7 @@ struct SVISION_CHANNEL // ======================> svision_sound_device class svision_sound_device : public device_t, - public device_sound_interface + public device_sound_interface { public: svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -189,13 +189,13 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); public: - DECLARE_WRITE8_MEMBER( svision_sounddma_w ); - DECLARE_WRITE8_MEMBER( svision_noise_w ); - + DECLARE_WRITE8_MEMBER( svision_sounddma_w ); + DECLARE_WRITE8_MEMBER( svision_noise_w ); + public: - int *dma_finished(); - void sound_decrement(); - void soundport_w(int which, int offset, int data); + int *dma_finished(); + void sound_decrement(); + void soundport_w(int which, int offset, int data); private: sound_stream *m_mixer_channel; diff --git a/src/mess/includes/vc4000.h b/src/mess/includes/vc4000.h index b416562f97a..040f1ccae4f 100644 --- a/src/mess/includes/vc4000.h +++ b/src/mess/includes/vc4000.h @@ -160,13 +160,13 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); public: - void soundport_w(int mode, int data); + void soundport_w(int mode, int data); private: sound_stream *m_channel; UINT8 m_reg[1]; int m_size; - int m_pos; + int m_pos; unsigned m_level; }; diff --git a/src/mess/includes/wswan.h b/src/mess/includes/wswan.h index cdea374b396..a1d1afb8465 100644 --- a/src/mess/includes/wswan.h +++ b/src/mess/includes/wswan.h @@ -191,15 +191,15 @@ void wswan_refresh_scanline( running_machine &machine ); struct CHAN { - CHAN() : - freq(0), - period(0), - pos(0), - vol_left(0), - vol_right(0), - on(0), - signal(0) { } - + CHAN() : + freq(0), + period(0), + pos(0), + vol_left(0), + vol_right(0), + on(0), + signal(0) { } + UINT16 freq; /* frequency */ UINT32 period; /* period */ UINT32 pos; /* position */ @@ -227,10 +227,10 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); public: - DECLARE_WRITE8_MEMBER( wswan_sound_port_w ); + DECLARE_WRITE8_MEMBER( wswan_sound_port_w ); private: - void wswan_ch_set_freq( CHAN *ch, UINT16 freq ); + void wswan_ch_set_freq( CHAN *ch, UINT16 freq ); private: sound_stream *m_channel; diff --git a/src/mess/includes/xerox820.h b/src/mess/includes/xerox820.h index 7522323f379..db4e426afe5 100644 --- a/src/mess/includes/xerox820.h +++ b/src/mess/includes/xerox820.h @@ -114,7 +114,7 @@ class bigboard_state : public xerox820_state public: bigboard_state(const machine_config &mconfig, device_type type, const char *tag) : xerox820_state(mconfig, type, tag), - m_beeper(*this, BEEPER_TAG) + m_beeper(*this, BEEPER_TAG) { } required_device<beep_device> m_beeper; diff --git a/src/mess/machine/3c505.c b/src/mess/machine/3c505.c index bc0eaccd28f..b7954077d71 100644 --- a/src/mess/machine/3c505.c +++ b/src/mess/machine/3c505.c @@ -400,7 +400,7 @@ void threecom3c505_device::data_buffer_fifo::reset() m_count = 0; } -int threecom3c505_device::data_buffer_fifo::put(const UINT8 data[], const int length) +int threecom3c505_device::data_buffer_fifo::put(const UINT8 data[], const int length) { UINT16 next_index = (m_put_index + 1) % m_size; @@ -659,11 +659,11 @@ void threecom3c505_device::do_receive_command() // preset receive response PCB memcpy(&m_response, &m_rcv_response, sizeof(m_rcv_response)); -// m_response.command = CMD_RECEIVE_PACKET_COMPLETE; // 0x38 -// m_response.length = 16; -// m_response.data.rcv_resp.buf_ofs = htole16(0); -// m_response.data.rcv_resp.buf_seg = htole16(0); -// m_response.data.rcv_resp.buf_len = htole16(buf_len); +// m_response.command = CMD_RECEIVE_PACKET_COMPLETE; // 0x38 +// m_response.length = 16; +// m_response.data.rcv_resp.buf_ofs = htole16(0); +// m_response.data.rcv_resp.buf_seg = htole16(0); +// m_response.data.rcv_resp.buf_len = htole16(buf_len); // htole16 and friends are not portable beyond Linux. It's named differently on *BSD and differently again on OS X. Avoid! m_response.data.rcv_resp.pkt_len = uint16_to_le(m_rx_data_buffer.get_length()); @@ -1129,7 +1129,7 @@ UINT8 threecom3c505_device::read_command_port() case CMD_TRANSMIT_PACKET_18_COMPLETE: m_netstat.tot_xmit++; - if (!send(m_tx_data_buffer.get_data(), m_tx_data_buffer.get_length())) + if (!send(m_tx_data_buffer.get_data(), m_tx_data_buffer.get_length())) { // FIXME: failed to send the Ethernet packet LOG(("read_command_port(): !!! failed to send Ethernet packet")); @@ -1216,7 +1216,7 @@ void threecom3c505_device::write_data_port(UINT8 data) } } else if (m_command_buffer[0] == CMD_TRANSMIT_PACKET || // - m_command_buffer[0] == CMD_TRANSMIT_PACKET_18) + m_command_buffer[0] == CMD_TRANSMIT_PACKET_18) { if (!m_tx_data_buffer.append(data)) { diff --git a/src/mess/machine/68561mpcc.c b/src/mess/machine/68561mpcc.c index 487b4d4abd4..ef29f95a98d 100644 --- a/src/mess/machine/68561mpcc.c +++ b/src/mess/machine/68561mpcc.c @@ -19,9 +19,9 @@ const device_type MPCC68561 = &device_creator<mpcc68561_t>; PARAMETERS ***************************************************************************/ -#define LOG_MPCC (1) +#define LOG_MPCC (1) -#if 0 // future +#if 0 // future /*************************************************************************** IMPLEMENTATION @@ -253,10 +253,10 @@ void mpcc68561_t::putreg(int ch, UINT8 data) switch (reg) { - case 0: // command register + case 0: // command register switch ((data >> 3) & 7) { - case 1: // select high registers (handled elsewhere) + case 1: // select high registers (handled elsewhere) break; case 2: // reset external and status IRQs @@ -268,7 +268,7 @@ void mpcc68561_t::putreg(int ch, UINT8 data) updateirqs(); break; - case 0: // nothing + case 0: // nothing case 3: // send SDLC abort case 4: // enable IRQ on next Rx byte case 6: // reset errors @@ -279,7 +279,7 @@ void mpcc68561_t::putreg(int ch, UINT8 data) } break; - case 1: // Tx/Rx IRQ and data transfer mode defintion + case 1: // Tx/Rx IRQ and data transfer mode defintion pChan->extIRQEnable = (data & 1); pChan->txIRQEnable = (data & 2) ? 1 : 0; pChan->rxIRQEnable = (data >> 3) & 3; @@ -301,7 +301,7 @@ void mpcc68561_t::putreg(int ch, UINT8 data) if (pChan->txEnable) { - pChan->reg_val[0] |= 0x04; // Tx empty + pChan->reg_val[0] |= 0x04; // Tx empty } break; @@ -317,10 +317,10 @@ void mpcc68561_t::putreg(int ch, UINT8 data) // channel reset command switch ((data>>6) & 3) { - case 0: // do nothing + case 0: // do nothing break; - case 1: // reset channel B + case 1: // reset channel B resetchannel(0); break; @@ -339,14 +339,14 @@ void mpcc68561_t::putreg(int ch, UINT8 data) } break; - case 10: // misc transmitter/receiver control bits - case 11: // clock mode control - case 12: // lower byte of baud rate gen - case 13: // upper byte of baud rate gen + case 10: // misc transmitter/receiver control bits + case 11: // clock mode control + case 12: // lower byte of baud rate gen + case 13: // upper byte of baud rate gen break; - case 14: // misc control bits - if (data & 0x01) // baud rate generator enable? + case 14: // misc control bits + if (data & 0x01) // baud rate generator enable? { int brconst = pChan->reg_val[13]<<8 | pChan->reg_val[14]; int rate = clock() / brconst; @@ -355,7 +355,7 @@ void mpcc68561_t::putreg(int ch, UINT8 data) } break; - case 15: // external/status interrupt control + case 15: // external/status interrupt control pChan->baudIRQEnable = (data & 2) ? 1 : 0; pChan->DCDEnable = (data & 8) ? 1 : 0; pChan->CTSEnable = (data & 0x20) ? 1 : 0; @@ -469,10 +469,10 @@ WRITE8_MEMBER( mpcc68561_t::reg_w ) if (pChan->reg_val[14] & 0x10) { pChan->rxData = data; - pChan->reg_val[0] |= 0x01; // Rx character available + pChan->reg_val[0] |= 0x01; // Rx character available } - pChan->reg_val[1] |= 0x01; // All sent - pChan->reg_val[0] |= 0x04; // Tx empty + pChan->reg_val[1] |= 0x01; // All sent + pChan->reg_val[0] |= 0x04; // Tx empty pChan->txUnderrun = 1; pChan->txIRQPending = 1; updateirqs(); diff --git a/src/mess/machine/68561mpcc.h b/src/mess/machine/68561mpcc.h index 591278df9d8..2d446a5ab5b 100644 --- a/src/mess/machine/68561mpcc.h +++ b/src/mess/machine/68561mpcc.h @@ -11,8 +11,8 @@ #ifndef __68561MPCC_H__ #define __68561MPCC_H__ -#define MCFG_MPCC68561_ADD(_tag, _clock, _intrq_cb) \ - MCFG_DEVICE_ADD(_tag, MPCC68561, _clock) \ +#define MCFG_MPCC68561_ADD(_tag, _clock, _intrq_cb) \ + MCFG_DEVICE_ADD(_tag, MPCC68561, _clock) \ downcast<mpcc68561_t *>(device)->set_intrq_cb(_intrq_cb); class mpcc68561_t : public device_t diff --git a/src/mess/machine/a2mockingboard.c b/src/mess/machine/a2mockingboard.c index 0c896f19d3a..9bbf80bd375 100644 --- a/src/mess/machine/a2mockingboard.c +++ b/src/mess/machine/a2mockingboard.c @@ -563,4 +563,3 @@ void a2bus_echoplus_device::write_c0nx(address_space &space, UINT8 offset, UINT8 break; } } - diff --git a/src/mess/machine/a2scsi.c b/src/mess/machine/a2scsi.c index ac0005d893a..a6599b10ca2 100644 --- a/src/mess/machine/a2scsi.c +++ b/src/mess/machine/a2scsi.c @@ -34,7 +34,7 @@ const device_type A2BUS_SCSI = &device_creator<a2bus_scsi_device>; #define SCSI_ROM_REGION "scsi_rom" -#define SCSI_BUS_TAG "scsibus" +#define SCSI_BUS_TAG "scsibus" #define SCSI_5380_TAG "scsibus:7:ncr5380" static const ncr5380n_interface ncr5380_interface = @@ -157,20 +157,20 @@ UINT8 a2bus_scsi_device::read_c0nx(address_space &space, UINT8 offset) case 5: case 6: case 7: -// printf("Read 5380 @ %x\n", offset); +// printf("Read 5380 @ %x\n", offset); return m_ncr5380->read(space, offset); break; - case 8: // read and DACK + case 8: // read and DACK return m_ncr5380->dma_r(); case 9: // our SCSI ID (normally 0x80 = 7) return (1<<7); - case 0xa: // RAM/ROM bank + case 0xa: // RAM/ROM bank return m_bank; - case 0xe: // DRQ status in bit 7 + case 0xe: // DRQ status in bit 7 return m_drq; default: @@ -198,11 +198,11 @@ void a2bus_scsi_device::write_c0nx(address_space &space, UINT8 offset, UINT8 dat case 5: case 6: case 7: -// printf("%02x to 5380 reg %x\n", data, offset); +// printf("%02x to 5380 reg %x\n", data, offset); m_ncr5380->write(space, offset, data); break; - case 8: // write and DACK + case 8: // write and DACK m_ncr5380->dma_w(data); break; @@ -224,23 +224,23 @@ void a2bus_scsi_device::write_c0nx(address_space &space, UINT8 offset, UINT8 dat m_rambank = ((data>>4) & 0x7) * 0x400; m_rombank = (data & 0xf) * 0x400; m_bank = data; -// printf("RAM bank to %x, ROM bank to %x\n", m_rambank, m_rombank); - m_816block = false; // does this reset block mode? +// printf("RAM bank to %x, ROM bank to %x\n", m_rambank, m_rombank); + m_816block = false; // does this reset block mode? break; - case 0xb: // reset 5380 -// printf("Resetting SCSI: %02x at %x\n", data, space.device().safe_pc()); + case 0xb: // reset 5380 +// printf("Resetting SCSI: %02x at %x\n", data, space.device().safe_pc()); m_ncr5380->reset(); m_816block = false; break; - case 0xc: // set IIgs block mode DMA + case 0xc: // set IIgs block mode DMA printf("%02x to block-mode DMA mode\n", data); m_816block = true; break; - case 0xd: // set Mac-style pseudo-DMA -// printf("%02x to pseudo-DMA mode\n", data); + case 0xd: // set Mac-style pseudo-DMA +// printf("%02x to pseudo-DMA mode\n", data); m_816block = false; break; @@ -263,7 +263,7 @@ UINT8 a2bus_scsi_device::read_cnxx(address_space &space, UINT8 offset) void a2bus_scsi_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data) { // there are writes to cn0A, possibly misguided C0nA (bank select?) writes? -// printf("Write %02x to cn%02x (PC=%x)\n", data, offset, space.device().safe_pc()); +// printf("Write %02x to cn%02x (PC=%x)\n", data, offset, space.device().safe_pc()); } /*------------------------------------------------- @@ -276,7 +276,7 @@ UINT8 a2bus_scsi_device::read_c800(address_space &space, UINT16 offset) // bankswitched ROM at cc00-cfff if (offset < 0x400) { -// printf("Read RAM at %x = %02x\n", offset+m_rambank, m_ram[offset + m_rambank]); +// printf("Read RAM at %x = %02x\n", offset+m_rambank, m_ram[offset + m_rambank]); if (m_816block) { return m_ncr5380->dma_r(); @@ -297,7 +297,7 @@ void a2bus_scsi_device::write_c800(address_space &space, UINT16 offset, UINT8 da { if (offset < 0x400) { -// printf("%02x to RAM at %x\n", data, offset+m_rambank); +// printf("%02x to RAM at %x\n", data, offset+m_rambank); if (m_816block) { m_ncr5380->dma_w(data); diff --git a/src/mess/machine/a2ssc.c b/src/mess/machine/a2ssc.c index 5a0a648b494..5c5c13e39a1 100644 --- a/src/mess/machine/a2ssc.c +++ b/src/mess/machine/a2ssc.c @@ -26,7 +26,7 @@ const device_type A2BUS_SSC = &device_creator<a2bus_ssc_device>; #define SSC_ROM_REGION "ssc_rom" #define SSC_ACIA_TAG "ssc_acia" -#define SSC_RS232_TAG "ssc_rs232" +#define SSC_RS232_TAG "ssc_rs232" static SLOT_INTERFACE_START( rs232_devices ) SLOT_INTERFACE("serial_terminal", SERIAL_TERMINAL) diff --git a/src/mess/machine/a2zipdrive.c b/src/mess/machine/a2zipdrive.c index c3bdefe2a73..41a3e2db693 100644 --- a/src/mess/machine/a2zipdrive.c +++ b/src/mess/machine/a2zipdrive.c @@ -1,20 +1,20 @@ /********************************************************************* - - a2zipdrive.c + + a2zipdrive.c ZIP Technologies ZipDrive IDE card - + NOTE: No known dump exists of the formatter utility and the format of the custom partition record (block 0) that the card expects has not yet been determined, so this is largely untested and will work only with a drive dump from real h/w. - + PLEASE use it only on a backup copy of said dump and contact MESSdev if you have one! - + Partition block format: +0000: ASCII "Zip Technologies" - + *********************************************************************/ #include "a2zipdrive.h" @@ -119,9 +119,9 @@ UINT8 a2bus_zipdrivebase_device::read_c0nx(address_space &space, UINT8 offset) case 7: return ide_controller_r(m_ide, 0x1f0+offset, 1); - case 8: // data port + case 8: // data port m_lastdata = ide_controller_r(m_ide, 0x1f0, 2); -// printf("%04x @ IDE data\n", m_lastdata); +// printf("%04x @ IDE data\n", m_lastdata); return m_lastdata&0xff; case 9: @@ -144,7 +144,7 @@ void a2bus_zipdrivebase_device::write_c0nx(address_space &space, UINT8 offset, U { switch (offset) { - case 0: + case 0: case 1: case 2: case 3: @@ -152,17 +152,17 @@ void a2bus_zipdrivebase_device::write_c0nx(address_space &space, UINT8 offset, U case 5: case 6: case 7: -// printf("%02x to IDE controller @ %x\n", data, offset); +// printf("%02x to IDE controller @ %x\n", data, offset); ide_controller_w(m_ide, 0x1f0+offset, 1, data); break; case 8: -// printf("%02x to IDE data lo\n", data); +// printf("%02x to IDE data lo\n", data); m_lastdata = data; break; case 9: -// printf("%02x to IDE data hi\n", data); +// printf("%02x to IDE data hi\n", data); m_lastdata &= 0x00ff; m_lastdata |= (data << 8); ide_controller_w(m_ide, 0x1f0, 2, m_lastdata); @@ -196,4 +196,3 @@ UINT8 a2bus_zipdrivebase_device::read_c800(address_space &space, UINT16 offset) return m_rom[offset+0x1800]; } - diff --git a/src/mess/machine/a2zipdrive.h b/src/mess/machine/a2zipdrive.h index ac0006639ec..593987d623f 100644 --- a/src/mess/machine/a2zipdrive.h +++ b/src/mess/machine/a2zipdrive.h @@ -3,9 +3,9 @@ a2zipdrive.h ZIP Technologies ZipDrive IDE card - + See important NOTE at the top of a2zipdrive.c! - + *********************************************************************/ #ifndef __A2BUS_ZIPDRIVE__ diff --git a/src/mess/machine/apollo.c b/src/mess/machine/apollo.c index 78e546d85dc..f8264aaa3db 100644 --- a/src/mess/machine/apollo.c +++ b/src/mess/machine/apollo.c @@ -440,7 +440,7 @@ READ8_MEMBER(apollo_state::apollo_dma_read_byte){ { SLOG1(("dma read byte at offset %x+%03x = %02x", page_offset, offset, data)); } -// logerror(" %02x", data); +// logerror(" %02x", data); return data; } @@ -460,7 +460,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_write_byte){ { SLOG1(("dma write byte at offset %x+%03x = %02x", page_offset, offset , data)); } -// logerror(" %02x", data); +// logerror(" %02x", data); } READ8_MEMBER(apollo_state::apollo_dma_read_word){ diff --git a/src/mess/machine/c1551.c b/src/mess/machine/c1551.c index 7a0cbb57a5d..d2c2d197877 100644 --- a/src/mess/machine/c1551.c +++ b/src/mess/machine/c1551.c @@ -480,7 +480,7 @@ void c1551_device::device_reset() m_maincpu->reset(); m_tpi0->reset(); - + m_exp->reset(); // initialize gate array diff --git a/src/mess/machine/c1571.c b/src/mess/machine/c1571.c index 97121f98b00..7e22b45aee6 100644 --- a/src/mess/machine/c1571.c +++ b/src/mess/machine/c1571.c @@ -817,7 +817,7 @@ static MACHINE_CONFIG_FRAGMENT( c1571cr ) MCFG_VIA6522_ADD(M6522_1_TAG, XTAL_16MHz/16, via1_intf) //MCFG_MOS5710_ADD(M5710_TAG, XTAL_16MHz/16, 0) - + MCFG_WD1770x_ADD(WD1770_TAG, XTAL_16MHz/2) MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, c1571_floppy_interface) diff --git a/src/mess/machine/c64_ieee488.c b/src/mess/machine/c64_ieee488.c index b2685edccf7..63585540bba 100644 --- a/src/mess/machine/c64_ieee488.c +++ b/src/mess/machine/c64_ieee488.c @@ -156,7 +156,7 @@ static const tpi6525_interface tpi_intf = static MACHINE_CONFIG_FRAGMENT( c64_ieee488 ) MCFG_TPI6525_ADD(MOS6525_TAG, tpi_intf) - + MCFG_CBM_IEEE488_ADD(NULL) MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD() MACHINE_CONFIG_END diff --git a/src/mess/machine/c64_midi_maplin.c b/src/mess/machine/c64_midi_maplin.c index 4f34a03d6e3..6fbf4405807 100644 --- a/src/mess/machine/c64_midi_maplin.c +++ b/src/mess/machine/c64_midi_maplin.c @@ -15,7 +15,7 @@ // MACROS/CONSTANTS //************************************************************************** -#define MC6850_TAG "mc6850" +#define MC6850_TAG "mc6850" @@ -48,7 +48,7 @@ WRITE_LINE_MEMBER( c64_maplin_midi_cartridge_device::tx_out ) static ACIA6850_INTERFACE( acia_intf ) { 500000, - 0, // rx clock (we manually clock rx) + 0, // rx clock (we manually clock rx) DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_maplin_midi_cartridge_device, rx_in), DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_maplin_midi_cartridge_device, tx_out), DEVCB_NULL, @@ -69,8 +69,8 @@ SLOT_INTERFACE_END WRITE_LINE_MEMBER( c64_maplin_midi_cartridge_device::midi_rx_w ) { m_rx_state = state; - - for (int i = 0; i < 16; i++) // divider is set to 64 + + for (int i = 0; i < 16; i++) // divider is set to 64 { m_acia->rx_clock_in(); } @@ -92,7 +92,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; diff --git a/src/mess/machine/c64_midi_namesoft.c b/src/mess/machine/c64_midi_namesoft.c index 453a639571b..11309ac68df 100644 --- a/src/mess/machine/c64_midi_namesoft.c +++ b/src/mess/machine/c64_midi_namesoft.c @@ -15,7 +15,7 @@ // MACROS/CONSTANTS //************************************************************************** -#define MC6850_TAG "mc6850" +#define MC6850_TAG "mc6850" @@ -48,7 +48,7 @@ WRITE_LINE_MEMBER( c64_namesoft_midi_cartridge_device::tx_out ) static ACIA6850_INTERFACE( acia_intf ) { 500000, - 0, // rx clock (we manually clock rx) + 0, // rx clock (we manually clock rx) DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_namesoft_midi_cartridge_device, rx_in), DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_namesoft_midi_cartridge_device, tx_out), DEVCB_NULL, @@ -69,8 +69,8 @@ SLOT_INTERFACE_END WRITE_LINE_MEMBER( c64_namesoft_midi_cartridge_device::midi_rx_w ) { m_rx_state = state; - - for (int i = 0; i < 16; i++) // divider is set to 16 + + for (int i = 0; i < 16; i++) // divider is set to 16 { m_acia->rx_clock_in(); } @@ -92,7 +92,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; diff --git a/src/mess/machine/c64_midi_passport.c b/src/mess/machine/c64_midi_passport.c index 8aed258f633..8a49ebffa8a 100644 --- a/src/mess/machine/c64_midi_passport.c +++ b/src/mess/machine/c64_midi_passport.c @@ -15,8 +15,8 @@ // MACROS/CONSTANTS //************************************************************************** -#define MC6840_TAG "mc6840" -#define MC6850_TAG "mc6850" +#define MC6840_TAG "mc6840" +#define MC6850_TAG "mc6850" @@ -71,7 +71,7 @@ WRITE_LINE_MEMBER( c64_passport_midi_cartridge_device::tx_out ) static ACIA6850_INTERFACE( acia_intf ) { 500000, - 0, // rx clock (we manually clock rx) + 0, // rx clock (we manually clock rx) DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_passport_midi_cartridge_device, rx_in), DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_passport_midi_cartridge_device, tx_out), DEVCB_NULL, @@ -92,8 +92,8 @@ SLOT_INTERFACE_END WRITE_LINE_MEMBER( c64_passport_midi_cartridge_device::midi_rx_w ) { m_rx_state = state; - - for (int i = 0; i < 16; i++) // divider is set to 16 + + for (int i = 0; i < 16; i++) // divider is set to 16 { m_acia->rx_clock_in(); } @@ -115,7 +115,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; @@ -246,7 +246,7 @@ void c64_passport_midi_cartridge_device::c64_cd_w(address_space &space, offs_t o case 0x30: // Drum sync SET break; - + case 0x38: // Drum sync CLEAR break; diff --git a/src/mess/machine/c64_midi_sci.c b/src/mess/machine/c64_midi_sci.c index 4835915b892..1edb8fcf7d7 100644 --- a/src/mess/machine/c64_midi_sci.c +++ b/src/mess/machine/c64_midi_sci.c @@ -15,7 +15,7 @@ // MACROS/CONSTANTS //************************************************************************** -#define MC6850_TAG "mc6850" +#define MC6850_TAG "mc6850" @@ -48,7 +48,7 @@ WRITE_LINE_MEMBER( c64_sequential_midi_cartridge_device::tx_out ) static ACIA6850_INTERFACE( acia_intf ) { 500000, - 0, // rx clock (we manually clock rx) + 0, // rx clock (we manually clock rx) DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_sequential_midi_cartridge_device, rx_in), DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_sequential_midi_cartridge_device, tx_out), DEVCB_NULL, @@ -69,8 +69,8 @@ SLOT_INTERFACE_END WRITE_LINE_MEMBER( c64_sequential_midi_cartridge_device::midi_rx_w ) { m_rx_state = state; - - for (int i = 0; i < 16; i++) // divider is set to 16 + + for (int i = 0; i < 16; i++) // divider is set to 16 { m_acia->rx_clock_in(); } @@ -92,7 +92,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; diff --git a/src/mess/machine/c64_midi_siel.c b/src/mess/machine/c64_midi_siel.c index 035f37e55d9..b936406359a 100644 --- a/src/mess/machine/c64_midi_siel.c +++ b/src/mess/machine/c64_midi_siel.c @@ -15,7 +15,7 @@ // MACROS/CONSTANTS //************************************************************************** -#define MC6850_TAG "mc6850" +#define MC6850_TAG "mc6850" @@ -48,7 +48,7 @@ WRITE_LINE_MEMBER( c64_siel_midi_cartridge_device::tx_out ) static ACIA6850_INTERFACE( acia_intf ) { XTAL_2MHz, - 0, // rx clock (we manually clock rx) + 0, // rx clock (we manually clock rx) DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_siel_midi_cartridge_device, rx_in), DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_siel_midi_cartridge_device, tx_out), DEVCB_NULL, @@ -69,8 +69,8 @@ SLOT_INTERFACE_END WRITE_LINE_MEMBER( c64_siel_midi_cartridge_device::midi_rx_w ) { m_rx_state = state; - - for (int i = 0; i < 64; i++) // divider is set to 64 + + for (int i = 0; i < 64; i++) // divider is set to 64 { m_acia->rx_clock_in(); } @@ -92,7 +92,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; diff --git a/src/mess/machine/c64_tdos.c b/src/mess/machine/c64_tdos.c index dade459fc2c..7d58930e990 100644 --- a/src/mess/machine/c64_tdos.c +++ b/src/mess/machine/c64_tdos.c @@ -95,8 +95,8 @@ static MC6852_INTERFACE( ssda_intf ) static MACHINE_CONFIG_FRAGMENT( c64_tdos ) MCFG_MC6852_ADD(MC68A52P_TAG, XTAL_6_5MHz, ssda_intf) - - MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD() + + MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD() MACHINE_CONFIG_END diff --git a/src/mess/machine/c64_vic1011.c b/src/mess/machine/c64_vic1011.c index e796723c2ba..77954218905 100644 --- a/src/mess/machine/c64_vic1011.c +++ b/src/mess/machine/c64_vic1011.c @@ -93,18 +93,18 @@ void c64_vic1011_device::device_start() UINT8 c64_vic1011_device::c64_pb_r(address_space &space, offs_t offset) { /* - + bit description - + 0 Sin - 1 - 2 - 3 + 1 + 2 + 3 4 DCDin - 5 + 5 6 CTS 7 DSR - + */ UINT8 data = 0; @@ -125,18 +125,18 @@ UINT8 c64_vic1011_device::c64_pb_r(address_space &space, offs_t offset) void c64_vic1011_device::c64_pb_w(address_space &space, offs_t offset, UINT8 data) { /* - + bit description - - 0 + + 0 1 RTS 2 DTR - 3 - 4 + 3 + 4 5 DCDout - 6 - 7 - + 6 + 7 + */ m_rs232->rts_w(BIT(data, 1)); diff --git a/src/mess/machine/c64user.h b/src/mess/machine/c64user.h index 7fcdc2ec7f3..3088e901552 100644 --- a/src/mess/machine/c64user.h +++ b/src/mess/machine/c64user.h @@ -73,12 +73,12 @@ public: c64_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); template<class _reset> void set_reset_callback(_reset reset) { m_write_reset.set_callback(reset); } - + template<class _cnt, class _sp> void set_cia1_callbacks(_cnt cnt, _sp sp) { m_write_cnt1.set_callback(cnt); m_write_sp1.set_callback(sp); } - + template<class _cnt, class _sp, class _flag> void set_cia2_callbacks(_cnt cnt, _sp sp, _flag flag) { m_write_cnt2.set_callback(cnt); m_write_sp2.set_callback(sp); diff --git a/src/mess/machine/cococart.c b/src/mess/machine/cococart.c index a8b149472cc..da10ee3669d 100644 --- a/src/mess/machine/cococart.c +++ b/src/mess/machine/cococart.c @@ -50,7 +50,7 @@ void cococart_slot_device::device_start() { for(int i=0; i<TIMER_POOL; i++ ) { - m_cart_line.timer[i] = timer_alloc(TIMER_CART); + m_cart_line.timer[i] = timer_alloc(TIMER_CART); m_nmi_line.timer[i] = timer_alloc(TIMER_NMI); m_halt_line.timer[i] = timer_alloc(TIMER_HALT); } @@ -294,7 +294,7 @@ void cococart_slot_device::cart_set_line(cococart_line line, cococart_line_value break; case COCOCART_LINE_SOUND_ENABLE: - // do nothing for now + // do nothing for now break; } } diff --git a/src/mess/machine/gb_mbc.c b/src/mess/machine/gb_mbc.c index 2704823acc7..29ae1320fbb 100644 --- a/src/mess/machine/gb_mbc.c +++ b/src/mess/machine/gb_mbc.c @@ -132,7 +132,7 @@ void gb_rom_mbc_device::shared_reset() m_ram_bank = 0; m_ram_enable = 0; m_mode = 0; - + has_rumble = FALSE; has_timer = FALSE; has_battery = FALSE; @@ -173,7 +173,7 @@ void gb_rom_mbc6_device::device_reset() m_bank_6000 = 3; // correct default? m_latch1 = 0; // correct default? m_latch2 = 0; // correct default? - + m_latch_bank = 2; // correct default? m_latch_bank2 = 3; // correct default? m_ram_bank = 0; @@ -212,7 +212,7 @@ void gb_rom_sintax_device::device_start() void gb_rom_sintax_device::device_reset() { - shared_reset(); + shared_reset(); m_sintax_mode = 0; m_currentxor = 0; m_xor2 = 0; @@ -709,18 +709,18 @@ READ8_MEMBER(gb_rom_chongwu_device::read_rom) void gb_rom_sintax_device::set_xor_for_bank(UINT8 bank) { - switch (bank & 0x0f) + switch (bank & 0x0f) { - case 0x00: case 0x04: case 0x08: case 0x0c: + case 0x00: case 0x04: case 0x08: case 0x0c: m_currentxor = m_xor2; break; - case 0x01: case 0x05: case 0x09: case 0x0d: + case 0x01: case 0x05: case 0x09: case 0x0d: m_currentxor = m_xor3; break; - case 0x02: case 0x06: case 0x0a: case 0x0e: + case 0x02: case 0x06: case 0x0a: case 0x0e: m_currentxor = m_xor4; break; - case 0x03: case 0x07: case 0x0b: case 0x0f: + case 0x03: case 0x07: case 0x0b: case 0x0f: m_currentxor = m_xor5; break; } @@ -739,10 +739,10 @@ WRITE8_MEMBER(gb_rom_sintax_device::write_bank) if (offset < 0x2000) m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; else if (offset < 0x3000) - { + { set_xor_for_bank(data); - switch (m_sintax_mode & 0x0f) + switch (m_sintax_mode & 0x0f) { case 0x0d: data = BITSWAP8(data, 1,0,7,6,5,4,3,2); @@ -767,8 +767,8 @@ WRITE8_MEMBER(gb_rom_sintax_device::write_bank) data = BITSWAP8(data, 2,3,0,1,6,7,4,5); // 5 and 6 unconfirmed break; } - m_latch_bank2 = (m_latch_bank2 & 0x100) | data; - } + m_latch_bank2 = (m_latch_bank2 & 0x100) | data; + } else if (offset < 0x4000) { m_latch_bank2 = (m_latch_bank2 & 0xff) | ((data & 0x01) << 8); @@ -785,13 +785,13 @@ WRITE8_MEMBER(gb_rom_sintax_device::write_bank) if (!m_sintax_mode) { m_sintax_mode = data; - write_bank(space, 0x2000, 1); //force a fake bank switch + write_bank(space, 0x2000, 1); //force a fake bank switch } -// printf("sintax mode %x\n", m_sintax_mode & 0xf); +// printf("sintax mode %x\n", m_sintax_mode & 0xf); } else if (offset >= 0x7000) { - switch ((offset & 0x00f0) >> 4) + switch ((offset & 0x00f0) >> 4) { case 2: m_xor2 = data; @@ -803,14 +803,14 @@ WRITE8_MEMBER(gb_rom_sintax_device::write_bank) m_xor4 = data; break; case 5: - m_xor5 = data; + m_xor5 = data; break; } - - if (m_currentxor == 0) - set_xor_for_bank(4); + + if (m_currentxor == 0) + set_xor_for_bank(4); } - + } READ8_MEMBER(gb_rom_sintax_device::read_ram) @@ -828,15 +828,15 @@ WRITE8_MEMBER(gb_rom_sintax_device::write_ram) } /* - + Further MBC5 variants to emulate: - + Digimon 2 & Digimon 4 (Yong Yong) - + Digimon 2 writes at $2000 to select latch2 (data must be divided by 2, and 0 becomes 1), then writes to $2400 a series of values that the patched version does not write... Digimon 4 seems to share part of the $2000 behavior, but does not write to $2400... - + */ // MBC5 variant used by Digimon 2 (and maybe 4?) @@ -855,29 +855,29 @@ WRITE8_MEMBER(gb_rom_digimon_device::write_bank) m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; else if (offset == 0x2000) { -// printf("written $02 %X at %X\n", data, offset); +// printf("written $02 %X at %X\n", data, offset); if (!data) data++; m_latch_bank2 = data/2; } else if (offset < 0x3000) { -// printf("written $03 %X at %X\n", data, offset); +// printf("written $03 %X at %X\n", data, offset); } else if (offset < 0x4000) { -// printf("written $04 %X at %X\n", data, offset); +// printf("written $04 %X at %X\n", data, offset); } else if (offset < 0x6000) { -// printf("written $05-$06 %X at %X\n", data, offset); +// printf("written $05-$06 %X at %X\n", data, offset); data &= 0x0f; if (has_rumble) data &= 0x7; m_ram_bank = data; } -// else -// printf("written $07 %X at %X\n", data, offset); +// else +// printf("written $07 %X at %X\n", data, offset); } READ8_MEMBER(gb_rom_digimon_device::read_ram) @@ -917,7 +917,7 @@ WRITE8_MEMBER(gb_rom_rockman8_device::write_bank) data = 1; if (data > 0xf) data -= 8; - + m_latch_bank2 = data; } } @@ -946,15 +946,15 @@ WRITE8_MEMBER(gb_rom_rockman8_device::write_ram) // 9th --> 0x0b // 10th --> 0x0c // 11th --> 0x0d -// 12th --> 0x0f +// 12th --> 0x0f // 13th --> 0x13 -// writing data to 0x2000-0x2fff switches bank according to the table below +// writing data to 0x2000-0x2fff switches bank according to the table below // (the value values corresponding to table[0x0f] is not confirmed, choices // 0,1,2,3,8,c,f freeze the game, while 4,5,6,7,b,d,0x13 work with glitches) static UINT8 smb3_table1[0x20] = { - 0x00,0x04,0x01,0x05, 0x02,0x06,0x03,0x05, 0x08,0x0c,0x03,0x0d, 0x03,0x0b,0x0b,0x08 /* original doc here put 0x0f (i.e. 11th unique bank) */, + 0x00,0x04,0x01,0x05, 0x02,0x06,0x03,0x05, 0x08,0x0c,0x03,0x0d, 0x03,0x0b,0x0b,0x08 /* original doc here put 0x0f (i.e. 11th unique bank) */, 0x05,0x06,0x0b,0x0d, 0x08,0x06,0x13,0x0b, 0x08,0x05,0x05,0x08, 0x0b,0x0d,0x06,0x05 }; @@ -975,7 +975,7 @@ READ8_MEMBER(gb_rom_sm3sp_device::read_rom) WRITE8_MEMBER(gb_rom_sm3sp_device::write_bank) { -// printf("write 0x%x at %x\n", data, offset); +// printf("write 0x%x at %x\n", data, offset); if (offset < 0x2000) return; else if (offset < 0x3000) @@ -992,20 +992,20 @@ WRITE8_MEMBER(gb_rom_sm3sp_device::write_bank) // 5bits only data &= 0x1f; - + m_latch_bank2 = smb3_table1[data]; if (m_mode) { switch (m_latch_bank2) { - case 0x02: m_latch_bank2 = 4; break; - case 0x03: m_latch_bank2 = 6; break; - case 0x04: m_latch_bank2 = 2; break; - case 0x05: m_latch_bank2 = 3; break; - case 0x06: m_latch_bank2 = 5; break; - case 0x0b: m_latch_bank2 = 0xd; break; - case 0x0c: m_latch_bank2 = 0xb; break; - case 0x0d: m_latch_bank2 = 0xc; break; + case 0x02: m_latch_bank2 = 4; break; + case 0x03: m_latch_bank2 = 6; break; + case 0x04: m_latch_bank2 = 2; break; + case 0x05: m_latch_bank2 = 3; break; + case 0x06: m_latch_bank2 = 5; break; + case 0x0b: m_latch_bank2 = 0xd; break; + case 0x0c: m_latch_bank2 = 0xb; break; + case 0x0d: m_latch_bank2 = 0xc; break; case 0x00: case 0x01: @@ -1019,14 +1019,14 @@ WRITE8_MEMBER(gb_rom_sm3sp_device::write_bank) } else if (offset < 0x5000) { -// printf("write $5 %X at %X\n", data, offset); +// printf("write $5 %X at %X\n", data, offset); //maybe rumble?? } else if (offset < 0x6000) { -// printf("write mode %x\n", data); +// printf("write mode %x\n", data); m_mode = BIT(data, 5); -// write_bank(space, 0x2000, 1); +// write_bank(space, 0x2000, 1); } } diff --git a/src/mess/machine/gb_mbc.h b/src/mess/machine/gb_mbc.h index 2d8ea0a1b26..7299d5ca48e 100644 --- a/src/mess/machine/gb_mbc.h +++ b/src/mess/machine/gb_mbc.h @@ -17,10 +17,10 @@ public: virtual void device_start() { shared_start(); }; virtual void device_reset() { shared_reset(); }; virtual void device_config_complete() { m_shortname = "gb_rom_mbc_base"; } - + void shared_start(); void shared_reset(); - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_ram); @@ -191,13 +191,13 @@ class gb_rom_sintax_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_sintax_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "gb_rom_sintax"; } void set_xor_for_bank(UINT8 bank); - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -215,12 +215,12 @@ class gb_rom_chongwu_device : public gb_rom_mbc5_device public: // construction/destruction gb_rom_chongwu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "gb_rom_chongwu"; } - + virtual DECLARE_READ8_MEMBER(read_rom); UINT8 m_protection_checked; }; @@ -232,12 +232,12 @@ class gb_rom_digimon_device : public gb_rom_mbc5_device public: // construction/destruction gb_rom_digimon_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() { shared_start(); }; virtual void device_reset() { shared_reset(); }; virtual void device_config_complete() { m_shortname = "gb_rom_digimon"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -250,12 +250,12 @@ class gb_rom_rockman8_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_rockman8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() { shared_start(); }; virtual void device_reset() { shared_reset(); }; virtual void device_config_complete() { m_shortname = "gb_rom_rockman8"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -270,12 +270,12 @@ class gb_rom_sm3sp_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_sm3sp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() { shared_start(); }; virtual void device_reset() { shared_reset(); }; virtual void device_config_complete() { m_shortname = "gb_rom_sm3sp"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); diff --git a/src/mess/machine/gb_rom.c b/src/mess/machine/gb_rom.c index 4937fb641be..e11e997ec6e 100644 --- a/src/mess/machine/gb_rom.c +++ b/src/mess/machine/gb_rom.c @@ -98,7 +98,7 @@ void gb_rom_device::shared_reset() m_ram_bank = 0; m_latch_bank = 0; m_latch_bank2 = 1; - + has_rumble = FALSE; has_timer = FALSE; has_battery = FALSE; @@ -142,7 +142,7 @@ void megaduck_rom_device::device_reset() m_ram_bank = 0; m_latch_bank = 0; m_latch_bank2 = 1; - + has_rumble = FALSE; has_timer = FALSE; has_battery = FALSE; diff --git a/src/mess/machine/gb_rom.h b/src/mess/machine/gb_rom.h index 1953824b584..66cb2bb4b68 100644 --- a/src/mess/machine/gb_rom.h +++ b/src/mess/machine/gb_rom.h @@ -18,10 +18,10 @@ public: virtual void device_start() { shared_start(); }; virtual void device_reset() { shared_reset(); }; virtual void device_config_complete() { m_shortname = "gb_rom"; } - + void shared_start(); void shared_reset(); - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_ram); @@ -131,7 +131,7 @@ public: virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "megaduck_rom"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); diff --git a/src/mess/machine/gb_slot.c b/src/mess/machine/gb_slot.c index 122c9425536..c136f97f966 100644 --- a/src/mess/machine/gb_slot.c +++ b/src/mess/machine/gb_slot.c @@ -392,7 +392,7 @@ bool base_gb_cart_slot_device::call_load() if (strncmp((const char*)(ROM + 0x134), "DONKEYKONGLAND 2", 16) == 0 || strncmp((const char*)(ROM + 0x134), "DONKEYKONGLAND 3", 16) == 0) m_sgb_hack = 1; - + return IMAGE_INIT_PASS; } @@ -545,8 +545,8 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) } if (count == 4876) { -// printf("Niutoude!\n"); -// type = GB_MBC_NIUTOUDE; +// printf("Niutoude!\n"); +// type = GB_MBC_NIUTOUDE; } if (count == 4138 || count == 4125) { @@ -556,7 +556,7 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) type = GB_MBC_SINTAX; } } - + /* Check if we're dealing with the multigame variant of the MBC1 mapper */ if (type == GB_MBC_MBC1) { diff --git a/src/mess/machine/gb_slot.h b/src/mess/machine/gb_slot.h index b0915de5901..fe7ff000afa 100644 --- a/src/mess/machine/gb_slot.h +++ b/src/mess/machine/gb_slot.h @@ -147,7 +147,7 @@ public: virtual DECLARE_READ8_MEMBER(read_ram); virtual DECLARE_WRITE8_MEMBER(write_ram); - + protected: // Donkey Kong Land 2 + 3 store SGB border tiles differently... this will be hopefully be removed when SGB is properly emulated! int m_sgb_hack; diff --git a/src/mess/machine/isa_com.c b/src/mess/machine/isa_com.c index ee3b438045e..c6e35ea6216 100644 --- a/src/mess/machine/isa_com.c +++ b/src/mess/machine/isa_com.c @@ -29,22 +29,22 @@ static const ins8250_interface genpc_com_interface[2]= DEVCB_NULL, DEVCB_NULL }/*, - { - DEVCB_DEVICE_LINE_MEMBER("serport2", serial_port_device, tx), - DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, dtr_w), - DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, rts_w), - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_1), - DEVCB_NULL, - DEVCB_NULL - }, - { - DEVCB_DEVICE_LINE_MEMBER("serport3", serial_port_device, tx), - DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, dtr_w), - DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, rts_w), - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_2), - DEVCB_NULL, - DEVCB_NULL - }*/ + { + DEVCB_DEVICE_LINE_MEMBER("serport2", serial_port_device, tx), + DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, dtr_w), + DEVCB_DEVICE_LINE_MEMBER("serport2", rs232_port_device, rts_w), + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_1), + DEVCB_NULL, + DEVCB_NULL + }, + { + DEVCB_DEVICE_LINE_MEMBER("serport3", serial_port_device, tx), + DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, dtr_w), + DEVCB_DEVICE_LINE_MEMBER("serport3", rs232_port_device, rts_w), + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa8_com_device, pc_com_interrupt_2), + DEVCB_NULL, + DEVCB_NULL + }*/ }; static const rs232_port_interface serport_config[2] = @@ -63,20 +63,20 @@ static const rs232_port_interface serport_config[2] = DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, ri_w), DEVCB_DEVICE_LINE_MEMBER("uart_1", ins8250_uart_device, cts_w) }/*, - { - DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, rx_w), - DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, dcd_w), - DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, dsr_w), - DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, ri_w), - DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, cts_w) - }, - { - DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, rx_w), - DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, dcd_w), - DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, dsr_w), - DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, ri_w), - DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, cts_w) - }*/ + { + DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, rx_w), + DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, dcd_w), + DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, dsr_w), + DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, ri_w), + DEVCB_DEVICE_LINE_MEMBER("uart_2", ins8250_uart_device, cts_w) + }, + { + DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, rx_w), + DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, dcd_w), + DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, dsr_w), + DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, ri_w), + DEVCB_DEVICE_LINE_MEMBER("uart_3", ins8250_uart_device, cts_w) + }*/ }; static SLOT_INTERFACE_START(isa_com) @@ -143,8 +143,8 @@ void isa8_com_device::device_start() set_isa_device(); m_isa->install_device(0x03f8, 0x03ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_0")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_0")) ); m_isa->install_device(0x02f8, 0x02ff, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_1")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_1")) ); -// m_isa->install_device(0x03e8, 0x03ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_2")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_2")) ); -// m_isa->install_device(0x02e8, 0x02ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_3")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_3")) ); +// m_isa->install_device(0x03e8, 0x03ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_2")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_2")) ); +// m_isa->install_device(0x02e8, 0x02ef, 0, 0, read8_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_3")), write8_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_3")) ); } //------------------------------------------------- @@ -158,12 +158,12 @@ void isa8_com_device::device_reset() static MACHINE_CONFIG_FRAGMENT( com_at_config ) MCFG_NS16450_ADD( "uart_0", genpc_com_interface[0], XTAL_1_8432MHz ) /* Verified: IBM P/N 6320947 Serial/Parallel card uses an NS16450N */ MCFG_NS16450_ADD( "uart_1", genpc_com_interface[1], XTAL_1_8432MHz ) -// MCFG_NS16450_ADD( "uart_2", genpc_com_interface[2], XTAL_1_8432MHz ) -// MCFG_NS16450_ADD( "uart_3", genpc_com_interface[3], XTAL_1_8432MHz ) +// MCFG_NS16450_ADD( "uart_2", genpc_com_interface[2], XTAL_1_8432MHz ) +// MCFG_NS16450_ADD( "uart_3", genpc_com_interface[3], XTAL_1_8432MHz ) MCFG_RS232_PORT_ADD( "serport0", serport_config[0], isa_com, "microsoft_mouse", NULL ) MCFG_RS232_PORT_ADD( "serport1", serport_config[1], isa_com, NULL, NULL ) -// MCFG_RS232_PORT_ADD( "serport2", serport_config[2], isa_com, NULL, NULL ) -// MCFG_RS232_PORT_ADD( "serport3", serport_config[3], isa_com, NULL, NULL ) +// MCFG_RS232_PORT_ADD( "serport2", serport_config[2], isa_com, NULL, NULL ) +// MCFG_RS232_PORT_ADD( "serport3", serport_config[3], isa_com, NULL, NULL ) MACHINE_CONFIG_END //************************************************************************** diff --git a/src/mess/machine/kc_rom.h b/src/mess/machine/kc_rom.h index 1149ca44f4f..1bf555ac9d5 100644 --- a/src/mess/machine/kc_rom.h +++ b/src/mess/machine/kc_rom.h @@ -29,7 +29,7 @@ protected: virtual void device_reset(); virtual void device_config_complete() { m_shortname = "kc_8k"; } virtual const rom_entry *device_rom_region() const; - + // kcexp_interface overrides virtual UINT8 module_id_r() { return 0xfb; } virtual void control_w(UINT8 data); diff --git a/src/mess/machine/mbee.c b/src/mess/machine/mbee.c index 0618f542cd9..739a93f0fee 100644 --- a/src/mess/machine/mbee.c +++ b/src/mess/machine/mbee.c @@ -853,4 +853,4 @@ QUICKLOAD_LOAD( mbee_z80bin ) } return IMAGE_INIT_PASS; -}
\ No newline at end of file +} diff --git a/src/mess/machine/md_rom.c b/src/mess/machine/md_rom.c index 96bcc2dd742..fcee9a946d5 100644 --- a/src/mess/machine/md_rom.c +++ b/src/mess/machine/md_rom.c @@ -764,7 +764,7 @@ WRITE16_MEMBER(md_rom_lion3_device::write) { if (offset >= 0x600000/2 && offset < 0x700000/2) { -// printf("protection write, offset %d data %d\n", offset & 0x7, data); +// printf("protection write, offset %d data %d\n", offset & 0x7, data); switch (offset & 0x7) { case 0x0: @@ -802,7 +802,7 @@ WRITE16_MEMBER(md_rom_lion3_device::write) | (BIT(m_reg[0], 0) << 7); break; } - + } if (offset >= 0x700000/2) m_bank = data & 0xff; @@ -974,7 +974,7 @@ READ16_MEMBER(md_rom_smw64_device::read) { // 0x000000-0x0fffff: lower 512KB ROM (up to 0x07ffff) + mirror // 0x600000-0x6fffff: internal hardware (up to 0x67ffff) + mirror - // Namely, + // Namely, // * 60xxx = bank1 of the upper 512KB ROM // * 61xxx = bank2 of the upper 512KB ROM // * 62xxx = alternate 4KB chunks of 0x0000 ~ 0xffff @@ -1004,30 +1004,30 @@ READ16_MEMBER(md_rom_smw64_device::read) case 0x0: case 0x2: case 0x4: - return m_reg[offset/2]; // DATA1, DATA2, DATA3 + return m_reg[offset/2]; // DATA1, DATA2, DATA3 case 0x1: case 0x3: case 0x5: - return m_reg[offset/2] + 1; // DATA1+1, DATA2+1, DATA3+1 + return m_reg[offset/2] + 1; // DATA1+1, DATA2+1, DATA3+1 case 0x6: - return m_reg[2] + 2; // DATA3+2 + return m_reg[2] + 2; // DATA3+2 case 0x7: - return m_reg[2] + 3; // DATA3+3 + return m_reg[2] + 3; // DATA3+3 } } if ((offset >= 0x670000/2) && (offset < 0x680000/2)) { UINT16 data = (m_ctrl[1] & 0x80) ? ((m_ctrl[2] & 0x40) ? (m_reg[4] & m_reg[5]) : (m_reg[4] ^ 0xff)) : 0x0000; - if (offset & 0x1) // odd offset, return lower 7 bits of the above + if (offset & 0x1) // odd offset, return lower 7 bits of the above return data & 0x7f; - else // even offset, return whole data above, but also update the regs if CTRL3 has 0x80 set + else // even offset, return whole data above, but also update the regs if CTRL3 has 0x80 set { - if (m_ctrl[2] & 0x80) // update regs if CTRL3 has bit7 set + if (m_ctrl[2] & 0x80) // update regs if CTRL3 has bit7 set { if (m_ctrl[2] & 0x20) - m_reg[2] = (m_reg[5] << 2) & 0xfc; // DATA3 + m_reg[2] = (m_reg[5] << 2) & 0xfc; // DATA3 else - m_reg[0] = ((m_reg[4] << 1) ^ m_reg[3]) & 0xfe; // DATA1 + m_reg[0] = ((m_reg[4] << 1) ^ m_reg[3]) & 0xfe; // DATA1 } return data; } @@ -1038,7 +1038,7 @@ READ16_MEMBER(md_rom_smw64_device::read) WRITE16_MEMBER(md_rom_smw64_device::write) { // 0x600000-0x6fffff: internal hardware (up to 0x67ffff) + mirror - // Namely, + // Namely, // * 62xxx/63xxx = unknown/unmapped // * 65xxx/66xxx = unknown/unmapped // * remaining ranges = CTRL/DATA @@ -1047,35 +1047,35 @@ WRITE16_MEMBER(md_rom_smw64_device::write) if (offset & 1) { if ((m_ctrl[0] & 7) == 0) - m_reg[0] = ((m_reg[0] ^ m_reg[3]) ^ data) & 0xfe; // DATA1 + m_reg[0] = ((m_reg[0] ^ m_reg[3]) ^ data) & 0xfe; // DATA1 if ((m_ctrl[0] & 7) == 1) - m_reg[1] = data & 0xfe; // DATA2 + m_reg[1] = data & 0xfe; // DATA2 if ((m_ctrl[0] & 7) == 7) - m_latch1 = 8 + ((data & 0x1c) >> 2); // ROM BANKSWITCH $61 - m_reg[3] = data; // DATA4 + m_latch1 = 8 + ((data & 0x1c) >> 2); // ROM BANKSWITCH $61 + m_reg[3] = data; // DATA4 } else - m_ctrl[0] = data; // CTRL1 + m_ctrl[0] = data; // CTRL1 } if ((offset >= 0x610000/2) && (offset < 0x620000/2)) { if (offset & 1) - m_ctrl[1] = data; // CTRL2 + m_ctrl[1] = data; // CTRL2 } if ((offset >= 0x640000/2) && (offset < 0x650000/2)) { if (offset & 1) - m_reg[5] = data; // DATA6 + m_reg[5] = data; // DATA6 else - m_reg[4] = data; // DATA5 + m_reg[4] = data; // DATA5 } if ((offset >= 0x670000/2) && (offset < 0x680000/2)) { if (!(offset & 1)) { - m_ctrl[2] = data; // CTRL3 + m_ctrl[2] = data; // CTRL3 if (m_ctrl[1] & 0x80) - m_latch0 = 8 + ((data & 0x1c) >> 2); // ROM BANKSWITCH $60 + m_latch0 = 8 + ((data & 0x1c) >> 2); // ROM BANKSWITCH $60 } } } @@ -1174,12 +1174,12 @@ READ16_MEMBER(md_rom_radica_device::read_a13) /*------------------------------------------------- BEGGAR PRINCE - This game uses cart which is the same as SEGA_SRAM + This game uses cart which is the same as SEGA_SRAM + bankswitch mechanism for first 256KB of the image: depending on bit7 of the value written at 0xe00/2, - accesses to 0x00000-0x3ffff go to the first 256KB + accesses to 0x00000-0x3ffff go to the first 256KB of ROM, or to the second to last 256KB chunk (usually - mapped to 0x380000-0x3bffff). SRAM is mapped at + mapped to 0x380000-0x3bffff). SRAM is mapped at the end of ROM. -------------------------------------------------*/ @@ -1199,7 +1199,7 @@ READ16_MEMBER(md_rom_beggarp_device::read) WRITE16_MEMBER(md_rom_beggarp_device::write) { if (offset >= 0x0e00/2 && offset < 0x0f00/2) - m_mode = BIT(data, 7); + m_mode = BIT(data, 7); if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active && !m_nvram_readonly) m_nvram[offset & 0x3fff] = data; @@ -1212,7 +1212,7 @@ WRITE16_MEMBER(md_rom_beggarp_device::write_a13) /* unsure if this is actually supposed to toggle or just switch on? yet to encounter game that uses this */ m_nvram_active = BIT(data, 0); m_nvram_readonly = BIT(data, 1); - + // since a lot of generic carts ends up here if loaded from fullpath // we turn on nvram (with m_nvram_handlers_installed) only if they toggle it on by writing here! if (m_nvram_active) @@ -1221,11 +1221,11 @@ WRITE16_MEMBER(md_rom_beggarp_device::write_a13) } /*------------------------------------------------- - LEGEND OF WUKONG - This game uses cart which is the same as SEGA_SRAM + LEGEND OF WUKONG + This game uses cart which is the same as SEGA_SRAM + bankswitch mechanism for last 128KB of the image: first 2MB of ROM is loaded in 0-0x200000 and - mirrored in 0x200000-0x400000, but depending on + mirrored in 0x200000-0x400000, but depending on bit7 of the value written at 0xe00/2 accesses to 0x200000-0x21ffff go either to the "physical" address (i.e. last 128K of ROM) or to the "memory" address @@ -1238,7 +1238,7 @@ READ16_MEMBER(md_rom_wukong_device::read) return m_nvram[offset - m_nvram_start/2]; // here can access both last 128K of the ROM and the first 128K, depending of bit7 of m_mode - if (offset >= 0x200000/2 && offset < 0x220000/2) + if (offset >= 0x200000/2 && offset < 0x220000/2) return !m_mode ? m_rom[offset] : m_rom[offset & 0xffff]; else if (offset < 0x400000/2) return m_rom[offset & 0xfffff]; @@ -1248,7 +1248,7 @@ READ16_MEMBER(md_rom_wukong_device::read) WRITE16_MEMBER(md_rom_wukong_device::write) { - if (offset < 0x100000/2) // it actually writes to 0xe00/2 + if (offset < 0x100000/2) // it actually writes to 0xe00/2 m_mode = BIT(data, 7); if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active && !m_nvram_readonly) @@ -1262,11 +1262,10 @@ WRITE16_MEMBER(md_rom_wukong_device::write_a13) /* unsure if this is actually supposed to toggle or just switch on? yet to encounter game that uses this */ m_nvram_active = BIT(data, 0); m_nvram_readonly = BIT(data, 1); - + // since a lot of generic carts ends up here if loaded from fullpath // we turn on nvram (with m_nvram_handlers_installed) only if they toggle it on by writing here! if (m_nvram_active) m_nvram_handlers_installed = 1; } } - diff --git a/src/mess/machine/md_rom.h b/src/mess/machine/md_rom.h index 08a7041c2fa..cbae06b70cd 100644 --- a/src/mess/machine/md_rom.h +++ b/src/mess/machine/md_rom.h @@ -90,15 +90,15 @@ class md_rom_cm2in1_device : public md_std_rom_device public: // construction/destruction md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "md_rom_cm2in1"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); - + private: int m_base; }; @@ -287,10 +287,10 @@ class md_rom_pokea_device : public md_std_rom_device public: // construction/destruction md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_pokea"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read_a13); }; @@ -419,16 +419,16 @@ class md_rom_smw64_device : public md_std_rom_device public: // construction/destruction md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "md_rom_smw64"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: UINT32 m_latch0, m_latch1; UINT16 m_reg[6]; @@ -537,12 +537,12 @@ class md_rom_beggarp_device : public md_std_rom_device public: // construction/destruction md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "md_rom_beggarp"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -559,17 +559,17 @@ class md_rom_wukong_device : public md_std_rom_device public: // construction/destruction md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "md_rom_wukong"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); virtual DECLARE_WRITE16_MEMBER(write_a13); - + private: UINT8 m_mode; }; diff --git a/src/mess/machine/md_slot.c b/src/mess/machine/md_slot.c index b6a3a4d9950..0f83aac451b 100644 --- a/src/mess/machine/md_slot.c +++ b/src/mess/machine/md_slot.c @@ -640,7 +640,7 @@ void base_md_cart_slot_device::setup_nvram() case BEGGARP: m_cart->m_nvram_start = 0x400000; m_cart->m_nvram_end = m_cart->m_nvram_start + 0xffff; - m_cart->nvram_alloc(machine(), 0x8000); // 32K mirrored + m_cart->nvram_alloc(machine(), 0x8000); // 32K mirrored m_cart->m_nvram_active = 1; break; case WUKONG: diff --git a/src/mess/machine/md_slot.h b/src/mess/machine/md_slot.h index 40700fce9fa..a49c17ec121 100644 --- a/src/mess/machine/md_slot.h +++ b/src/mess/machine/md_slot.h @@ -162,11 +162,11 @@ public: // slot interface overrides virtual const char * get_default_card_software(const machine_config &config, emu_options &options); - + int load_list(); int load_nonlist(); int get_cart_type(UINT8 *ROM, UINT32 len); - + void setup_custom_mappers(); void setup_nvram(); void set_must_be_loaded(bool _must_be_loaded) { m_must_be_loaded = _must_be_loaded; } @@ -182,7 +182,7 @@ public: // TODO: this only needs to be public because megasvp copies rom into memory region, so we need to rework that code... //private: - + int m_type; device_md_cart_interface* m_cart; bool m_must_be_loaded; diff --git a/src/mess/machine/ncr5380n.c b/src/mess/machine/ncr5380n.c index 0d595877c28..e54a469949a 100644 --- a/src/mess/machine/ncr5380n.c +++ b/src/mess/machine/ncr5380n.c @@ -3,11 +3,11 @@ ncr5380n.c Implementation of the NCR 5380, aka the Zilog Z5380 - + TODO: - IRQs (Apple doesn't use 'em) - Target mode - + *********************************************************************/ #include "emu.h" @@ -93,7 +93,7 @@ void ncr5380n_device::device_config_complete() void ncr5380n_device::reset_soft() { state = IDLE; - scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); // clear any signals we're driving + scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); // clear any signals we're driving scsi_bus->ctrl_wait(scsi_refid, S_ALL, S_ALL); status = 0; drq = false; @@ -113,13 +113,13 @@ void ncr5380n_device::scsi_ctrl_changed() { UINT32 ctrl = scsi_bus->ctrl_r(); -// printf("scsi_ctrl_changed: lines now %x\n", ctrl); +// printf("scsi_ctrl_changed: lines now %x\n", ctrl); -/* if ((ctrl & (S_PHASE_MASK|S_SEL|S_BSY)) != last_phase) - { - printf("phase now %d, SEL %x BSY %x\n", ctrl & S_PHASE_MASK, ctrl & S_SEL, ctrl & S_BSY); - last_phase = (S_PHASE_MASK|S_SEL|S_BSY); - }*/ +/* if ((ctrl & (S_PHASE_MASK|S_SEL|S_BSY)) != last_phase) + { + printf("phase now %d, SEL %x BSY %x\n", ctrl & S_PHASE_MASK, ctrl & S_SEL, ctrl & S_BSY); + last_phase = (S_PHASE_MASK|S_SEL|S_BSY); + }*/ // recalculate phase match m_busstatus &= ~BAS_PHASEMATCH; @@ -133,7 +133,7 @@ void ncr5380n_device::scsi_ctrl_changed() // if BSY drops or the phase goes mismatch, that terminates the DMA if ((!(ctrl & S_BSY)) || !(m_busstatus & BAS_PHASEMATCH)) { -// printf("BSY dropped or phase mismatch during DMA, ending DMA\n"); +// printf("BSY dropped or phase mismatch during DMA, ending DMA\n"); m_mode &= ~MODE_DMA; m_busstatus |= BAS_ENDOFDMA; drq_clear(); @@ -178,7 +178,7 @@ void ncr5380n_device::step(bool timeout) int win; for(win=7; win>=0 && !(data & (1<<win)); win--); -// printf("data %02x win %02x scsi_id %02x\n", data, win, scsi_id); +// printf("data %02x win %02x scsi_id %02x\n", data, win, scsi_id); if(win != scsi_id) { scsi_bus->data_w(scsi_refid, 0); scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); @@ -270,21 +270,21 @@ void ncr5380n_device::recv_byte() void ncr5380n_device::function_bus_complete() { state = IDLE; -// istatus |= I_FUNCTION|I_BUS; +// istatus |= I_FUNCTION|I_BUS; check_irq(); } void ncr5380n_device::function_complete() { state = IDLE; -// istatus |= I_FUNCTION; +// istatus |= I_FUNCTION; check_irq(); } void ncr5380n_device::bus_complete() { state = IDLE; -// istatus |= I_BUS; +// istatus |= I_BUS; check_irq(); } @@ -327,7 +327,7 @@ WRITE8_MEMBER(ncr5380n_device::icmd_w) // asserting to drive the data bus? if ((data & IC_DBUS) && !(m_icommand & IC_DBUS)) { -// printf("%s: driving data bus with %02x\n", tag(), m_outdata); +// printf("%s: driving data bus with %02x\n", tag(), m_outdata); scsi_bus->data_w(scsi_refid, m_outdata); delay(2); } @@ -345,7 +345,7 @@ WRITE8_MEMBER(ncr5380n_device::icmd_w) (data & IC_SEL ? S_SEL : 0) | (data & IC_ATN ? S_ATN : 0); -// printf("%s: changing control lines %04x\n", tag(), newdata); +// printf("%s: changing control lines %04x\n", tag(), newdata); scsi_bus->ctrl_w(scsi_refid, newdata, S_RST|S_ACK|S_BSY|S_SEL|S_ATN); } @@ -360,22 +360,22 @@ READ8_MEMBER(ncr5380n_device::mode_r) WRITE8_MEMBER(ncr5380n_device::mode_w) { -// printf("%s: mode_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); +// printf("%s: mode_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); // arbitration bit being set? if ((data & MODE_ARBITRATE) && !(m_mode & MODE_ARBITRATE)) { - // if SEL is selected and the assert SEL bit in the initiator + // if SEL is selected and the assert SEL bit in the initiator // command register is clear, fail if ((scsi_bus->ctrl_r() & S_SEL) && !(m_icommand & IC_SEL)) { -// printf("arbitration lost, ctrl = %x, m_icommand&IC_SEL = %x\n", scsi_bus->ctrl_r(), m_icommand & IC_SEL); +// printf("arbitration lost, ctrl = %x, m_icommand&IC_SEL = %x\n", scsi_bus->ctrl_r(), m_icommand & IC_SEL); m_icommand &= ~IC_ARBITRATION; m_icommand |= IC_ARBLOST; } else { seq = 0; -// state = DISC_SEL_ARBITRATION; +// state = DISC_SEL_ARBITRATION; arbitrate(); } } @@ -385,13 +385,13 @@ WRITE8_MEMBER(ncr5380n_device::mode_w) READ8_MEMBER(ncr5380n_device::command_r) { -// logerror("%s: command_r %02x (%08x)\n", tag(), m_tcommand, space.device().safe_pc()); +// logerror("%s: command_r %02x (%08x)\n", tag(), m_tcommand, space.device().safe_pc()); return m_tcommand; } WRITE8_MEMBER(ncr5380n_device::command_w) { -// printf("%s: command_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); +// printf("%s: command_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); m_tcommand = data; // recalculate phase match @@ -425,7 +425,7 @@ void ncr5380n_device::check_irq() READ8_MEMBER(ncr5380n_device::status_r) { UINT32 ctrl = scsi_bus->ctrl_r(); - UINT8 res = status | + UINT8 res = status | (ctrl & S_RST ? ST_RST : 0) | (ctrl & S_BSY ? ST_BSY : 0) | (ctrl & S_REQ ? ST_REQ : 0) | @@ -434,7 +434,7 @@ READ8_MEMBER(ncr5380n_device::status_r) (ctrl & S_INP ? ST_IO : 0) | (ctrl & S_SEL ? ST_SEL : 0); -// printf("%s: status_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); +// printf("%s: status_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); return res; } @@ -449,7 +449,7 @@ READ8_MEMBER(ncr5380n_device::busandstatus_r) (ctrl & S_ATN ? BAS_ATN : 0) | (ctrl & S_ACK ? BAS_ACK : 0); -// printf("%s: busandstatus_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); +// printf("%s: busandstatus_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); return res; } @@ -477,7 +477,7 @@ READ8_MEMBER(ncr5380n_device::resetparityirq_r) WRITE8_MEMBER(ncr5380n_device::startdmainitrx_w) { -// printf("%02x to start dma initiator Rx\n", data); +// printf("%02x to start dma initiator Rx\n", data); recv_byte(); } @@ -509,7 +509,7 @@ UINT8 ncr5380n_device::dma_r() void ncr5380n_device::drq_set() { - if(!drq) + if(!drq) { drq = true; m_busstatus |= BAS_DMAREQUEST; @@ -520,7 +520,7 @@ void ncr5380n_device::drq_set() void ncr5380n_device::drq_clear() { - if(drq) + if(drq) { drq = false; m_busstatus &= ~BAS_DMAREQUEST; @@ -598,4 +598,3 @@ WRITE8_MEMBER(ncr5380n_device::write) break; } } - diff --git a/src/mess/machine/ncr5380n.h b/src/mess/machine/ncr5380n.h index 68ad91b9e87..43675e9838a 100644 --- a/src/mess/machine/ncr5380n.h +++ b/src/mess/machine/ncr5380n.h @@ -142,7 +142,7 @@ private: enum { BUS_BUSY, BUS_FREE_WAIT, BUS_FREE }; enum { - ST_RST = 0x80, + ST_RST = 0x80, ST_BSY = 0x40, ST_REQ = 0x20, ST_MSG = 0x10, @@ -151,7 +151,7 @@ private: ST_SEL = 0x02, ST_DBP = 0x01, - BAS_ENDOFDMA = 0x80, + BAS_ENDOFDMA = 0x80, BAS_DMAREQUEST = 0x40, BAS_PARITYERROR = 0x20, BAS_IRQACTIVE = 0x10, @@ -160,25 +160,25 @@ private: BAS_ATN = 0x02, BAS_ACK = 0x01, - IC_RST = 0x80, - IC_ARBITRATION = 0x40, - IC_ARBLOST = 0x20, - IC_ACK = 0x10, - IC_BSY = 0x08, - IC_SEL = 0x04, - IC_ATN = 0x02, - IC_DBUS = 0x01, - IC_PHASEMASK = 0x9e, - IC_WRITEMASK = 0x9f, - - MODE_BLOCKDMA = 0x80, - MODE_TARGET = 0x40, - MODE_PARITYCHK = 0x20, - MODE_PARITYIRQ = 0x10, - MODE_EOPIRQ = 0x08, - MODE_BSYIRQ = 0x04, - MODE_DMA = 0x02, - MODE_ARBITRATE = 0x01, + IC_RST = 0x80, + IC_ARBITRATION = 0x40, + IC_ARBLOST = 0x20, + IC_ACK = 0x10, + IC_BSY = 0x08, + IC_SEL = 0x04, + IC_ATN = 0x02, + IC_DBUS = 0x01, + IC_PHASEMASK = 0x9e, + IC_WRITEMASK = 0x9f, + + MODE_BLOCKDMA = 0x80, + MODE_TARGET = 0x40, + MODE_PARITYCHK = 0x20, + MODE_PARITYIRQ = 0x10, + MODE_EOPIRQ = 0x08, + MODE_BSYIRQ = 0x04, + MODE_DMA = 0x02, + MODE_ARBITRATE = 0x01, }; enum { DMA_NONE, DMA_IN, DMA_OUT }; diff --git a/src/mess/machine/ne1000.c b/src/mess/machine/ne1000.c index 71abec95905..4fcce641d5d 100644 --- a/src/mess/machine/ne1000.c +++ b/src/mess/machine/ne1000.c @@ -131,4 +131,3 @@ ioport_constructor ne1000_device::device_input_ports() const { return INPUT_PORTS_NAME(ne1000); } - diff --git a/src/mess/machine/nes_slot.c b/src/mess/machine/nes_slot.c index 4f66fb6382c..a7b41927894 100644 --- a/src/mess/machine/nes_slot.c +++ b/src/mess/machine/nes_slot.c @@ -163,12 +163,12 @@ void nes_cart_slot_device::device_start() void nes_cart_slot_device::device_config_complete() { // inherit a copy of the static data -// const nes_cart_interface *intf = reinterpret_cast<const nes_cart_interface *>(static_config()); -// if (intf != NULL) -// { -// *static_cast<nes_cart_interface *>(this) = *intf; -// } - +// const nes_cart_interface *intf = reinterpret_cast<const nes_cart_interface *>(static_config()); +// if (intf != NULL) +// { +// *static_cast<nes_cart_interface *>(this) = *intf; +// } + // set brief and instance name update_names(); } @@ -214,18 +214,18 @@ static const struct nes_cart_lines nes_cart_lines_table[] = static int nes_cart_get_line( const char *feature ) { const struct nes_cart_lines *nes_line = &nes_cart_lines_table[0]; - + if (feature == NULL) return 128; - + while (nes_line->tag) { if (strcmp(nes_line->tag, feature) == 0) break; - + nes_line++; } - + return nes_line->line; } @@ -237,51 +237,51 @@ bool nes_cart_slot_device::call_load() { if (m_cart) { - UINT32 vram_size = 0, prgram_size = 0, battery_size = 0, mapper_ram_size = 0, mapper_bram_size = 0; // helper for regions to alloc at the end + UINT32 vram_size = 0, prgram_size = 0, battery_size = 0, mapper_ram_size = 0, mapper_bram_size = 0; // helper for regions to alloc at the end if (software_entry() == NULL) { const char *mapinfo = NULL; int mapint1 = 0, mapint2 = 0, mapint3 = 0, mapint4 = 0; char magic[4]; - + /* Check first 4 bytes of the image to decide if it is UNIF or iNES */ /* Unfortunately, many .unf files have been released as .nes, so we cannot rely on extensions only */ memset(magic, '\0', sizeof(magic)); fread(magic, 4); - + if ((magic[0] == 'N') && (magic[1] == 'E') && (magic[2] == 'S')) /* If header starts with 'NES' it is iNES */ { UINT32 prg_size, vrom_size; UINT8 header[0x10]; UINT8 mapper, local_options; bool ines20 = FALSE, has_trainer = FALSE, prg16k; - + // check if the image is recognized by nes.hsi mapinfo = hashfile_extrainfo(*this); - + // image_extrainfo() resets the file position back to start. fseek(0, SEEK_SET); // read out the header fread(&header, 0x10); - + // SETUP step 1: getting PRG, VROM, VRAM sizes prg16k = (header[4] == 1); prg_size = prg16k ? 2 * 0x4000 : header[4] * 0x4000; vrom_size = header[5] * 0x2000; vram_size = 0x4000; - + // SETUP step 2: getting PCB and other settings mapper = (header[6] & 0xf0) >> 4; local_options = header[6] & 0x0f; - + switch (header[7] & 0xc) { case 0x4: case 0xc: // probably the header got corrupted: don't trust upper bits for mapper break; - + case 0x8: // it's iNES 2.0 format ines20 = TRUE; case 0x0: @@ -289,7 +289,7 @@ bool nes_cart_slot_device::call_load() mapper |= header[7] & 0xf0; break; } - + // use info from nes.hsi if available! if (mapinfo) { @@ -313,7 +313,7 @@ bool nes_cart_slot_device::call_load() { logerror("NES: No extrainfo found\n"); } - + // use extended iNES2.0 info if available! if (ines20) { @@ -322,7 +322,7 @@ bool nes_cart_slot_device::call_load() prg_size += ((header[9] & 0x0f) << 8) * 0x4000; vrom_size += ((header[9] & 0xf0) << 4) * 0x2000; } - + // SETUP step 3: storing the info needed for emulation m_pcb_id = nes_get_mmc_id(machine(), mapper); m_cart->set_mirroring(BIT(local_options, 0) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); @@ -330,7 +330,7 @@ bool nes_cart_slot_device::call_load() battery_size = NES_BATTERY_SIZE; // with original iNES format we can only support 8K WRAM battery has_trainer = BIT(local_options, 2) ? TRUE : FALSE; m_cart->set_four_screen_vram(BIT(local_options, 3)); - + if (ines20) { // PRGRAM/BWRAM (not fully supported, also due to lack of 2.0 files) @@ -353,7 +353,7 @@ bool nes_cart_slot_device::call_load() // so its size has been added recently to the iNES format spec, but almost no image uses it prgram_size = header[8] ? header[8] * 0x2000 : 0x2000; } - + // a few mappers correspond to multiple PCBs, so we need a few additional checks and tweaks switch (m_pcb_id) { @@ -485,7 +485,7 @@ bool nes_cart_slot_device::call_load() break; //FIXME: we also have to fix Action 52 PRG loading somewhere... } - + // SETUP step 4: logging what we have found if (!ines20) { @@ -516,17 +516,17 @@ bool nes_cart_slot_device::call_load() logerror("-- CHR WRAM: %d\n", (header[11] & 0xf0) >> 4); logerror("-- TV System: %s\n", (header[12] & 2) ? "Both NTSC and PAL" : (header[12] & 1) ? "PAL" : "NTSC"); } - + // SETUP step 5: allocate pointers for PRG/VROM if (prg_size) m_cart->prg_alloc(machine(), prg_size); if (vrom_size) m_cart->vrom_alloc(machine(), vrom_size); - + if (has_trainer) fread(&m_cart->m_prgram[0x1000], 0x200); - - + + // SETUP step 6: at last load the data! // Read in the program chunks if (prg16k) @@ -540,7 +540,7 @@ bool nes_cart_slot_device::call_load() { FILE *prgout; char outname[255]; - + sprintf(outname, "%s.prg", filename()); prgout = fopen(outname, "wb"); if (prgout) @@ -548,21 +548,21 @@ bool nes_cart_slot_device::call_load() fwrite(m_cart->get_prg_base(), 1, 0x4000 * m_cart->get_prg_size(), prgout); mame_printf_error("Created PRG chunk\n"); } - + fclose(prgout); } #endif - + // Read in any chr chunks if (m_cart->get_vrom_size()) fread(m_cart->get_vrom_base(), m_cart->get_vrom_size()); - + #if SPLIT_CHR if (state->m_chr_chunks > 0) { FILE *chrout; char outname[255]; - + sprintf(outname, "%s.chr", filename()); chrout= fopen(outname, "wb"); if (chrout) @@ -584,29 +584,29 @@ bool nes_cart_slot_device::call_load() char magic2[4]; char unif_mapr[32]; // here we should store MAPR chunks bool mapr_chunk_found = FALSE, small_prg = FALSE; - + // allocate space to temporarily store PRG & CHR banks UINT8 *temp_prg = auto_alloc_array(machine(), UINT8, 256 * 0x4000); UINT8 *temp_chr = auto_alloc_array(machine(), UINT8, 256 * 0x2000); UINT8 temp_byte = 0; - + fread(&buffer, 4); unif_ver = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); logerror("Loaded game in UNIF format, version %d\n", unif_ver); - + if (size <= 0x20) { logerror("%s only contains the UNIF header and no data.\n", filename()); return IMAGE_INIT_FAIL; } - + do { fseek(read_length, SEEK_SET); - + memset(magic2, '\0', sizeof(magic2)); fread(&magic2, 4); - + /* We first run through the whole image to find a [MAPR] chunk. This is needed because, unfortunately, the MAPR chunk is not always the first chunk (see Super 24-in-1). When such a chunk is found, we set mapr_chunk_found=1 and @@ -619,11 +619,11 @@ bool nes_cart_slot_device::call_load() logerror("[MAPR] chunk found: "); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + if (chunk_length <= 0x20) fread(&unif_mapr, chunk_length); logerror("%s\n", unif_mapr); - + /* now that we found the MAPR chunk, we can go back to load other chunks */ fseek(0x20, SEEK_SET); read_length = 0x20; @@ -633,7 +633,7 @@ bool nes_cart_slot_device::call_load() logerror("Skip this chunk. We need a [MAPR] chunk before anything else.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } } @@ -647,7 +647,7 @@ bool nes_cart_slot_device::call_load() logerror("[MAPR] chunk found (in the 2nd run). Already loaded.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'R') && (magic2[1] == 'E') && (magic2[2] == 'A') && (magic2[3] == 'D')) @@ -655,7 +655,7 @@ bool nes_cart_slot_device::call_load() logerror("[READ] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'N') && (magic2[1] == 'A') && (magic2[2] == 'M') && (magic2[3] == 'E')) @@ -663,7 +663,7 @@ bool nes_cart_slot_device::call_load() logerror("[NAME] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'W') && (magic2[1] == 'R') && (magic2[2] == 'T') && (magic2[3] == 'R')) @@ -671,7 +671,7 @@ bool nes_cart_slot_device::call_load() logerror("[WRTR] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'T') && (magic2[1] == 'V') && (magic2[2] == 'C') && (magic2[3] == 'I')) @@ -679,10 +679,10 @@ bool nes_cart_slot_device::call_load() logerror("[TVCI] chunk found.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + fread(&temp_byte, 1); logerror("Television Standard : %s\n", (temp_byte == 0) ? "NTSC" : (temp_byte == 1) ? "PAL" : "Does not matter"); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'T') && (magic2[1] == 'V') && (magic2[2] == 'S') && (magic2[3] == 'C')) // is this the same as TVCI?? @@ -690,7 +690,7 @@ bool nes_cart_slot_device::call_load() logerror("[TVSC] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'D') && (magic2[1] == 'I') && (magic2[2] == 'N') && (magic2[3] == 'F')) @@ -698,7 +698,7 @@ bool nes_cart_slot_device::call_load() logerror("[DINF] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'C') && (magic2[1] == 'T') && (magic2[2] == 'R') && (magic2[3] == 'L')) @@ -706,7 +706,7 @@ bool nes_cart_slot_device::call_load() logerror("[CTRL] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'B') && (magic2[1] == 'A') && (magic2[2] == 'T') && (magic2[3] == 'R')) @@ -714,7 +714,7 @@ bool nes_cart_slot_device::call_load() logerror("[BATR] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'V') && (magic2[1] == 'R') && (magic2[2] == 'O') && (magic2[3] == 'R')) @@ -722,7 +722,7 @@ bool nes_cart_slot_device::call_load() logerror("[VROR] chunk found. No support yet.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'M') && (magic2[1] == 'I') && (magic2[2] == 'R') && (magic2[3] == 'R')) @@ -730,9 +730,9 @@ bool nes_cart_slot_device::call_load() logerror("[MIRR] chunk found.\n"); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + fread(&mirror, 1); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'P') && (magic2[1] == 'C') && (magic2[2] == 'K')) @@ -740,7 +740,7 @@ bool nes_cart_slot_device::call_load() logerror("[PCK%c] chunk found. No support yet.\n", magic2[3]); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'C') && (magic2[1] == 'C') && (magic2[2] == 'K')) @@ -748,7 +748,7 @@ bool nes_cart_slot_device::call_load() logerror("[CCK%c] chunk found. No support yet.\n", magic2[3]); fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); - + read_length += (chunk_length + 8); } else if ((magic2[0] == 'P') && (magic2[1] == 'R') && (magic2[2] == 'G')) @@ -757,7 +757,7 @@ bool nes_cart_slot_device::call_load() fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); prg_size += chunk_length; - + if (chunk_length / 0x4000) logerror("It consists of %d 16K-blocks.\n", chunk_length / 0x4000); else @@ -765,10 +765,10 @@ bool nes_cart_slot_device::call_load() small_prg = TRUE; logerror("This chunk is smaller than 16K: the emulation might have issues. Please report this file to the MESS forums.\n"); } - + /* Read in the program chunks */ fread(&temp_prg[prg_start], chunk_length); - + prg_start += chunk_length; read_length += (chunk_length + 8); } @@ -778,12 +778,12 @@ bool nes_cart_slot_device::call_load() fread(&buffer, 4); chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); vrom_size += chunk_length; - + logerror("It consists of %d 8K-blocks.\n", chunk_length / 0x2000); - + /* Read in the vrom chunks */ fread(&temp_chr[chr_start], chunk_length); - + chr_start += chunk_length; read_length += (chunk_length + 8); } @@ -794,32 +794,32 @@ bool nes_cart_slot_device::call_load() } } } while (size > read_length); - + if (!mapr_chunk_found) { auto_free(machine(), temp_prg); auto_free(machine(), temp_chr); fatalerror("UNIF should have a [MAPR] chunk to work. Check if your image has been corrupted\n"); } - + if (!prg_start) { auto_free(machine(), temp_prg); auto_free(machine(), temp_chr); fatalerror("No PRG found. Please report the problem at MESS Board.\n"); } - + // SETUP step 2: getting PCB and other settings int pcb_id = 0, battery = 0, prgram = 0, vram_chunks = 0; unif_mapr_setup(unif_mapr, &pcb_id, &battery, &prgram, &vram_chunks); - + // SETUP step 3: storing the info needed for emulation m_pcb_id = pcb_id; if (battery) battery_size = NES_BATTERY_SIZE; // we should allow for smaller battery! prgram_size = prgram * 0x2000; vram_size = vram_chunks * 0x2000; - + m_cart->set_four_screen_vram(0); switch (mirror) { @@ -849,13 +849,13 @@ bool nes_cart_slot_device::call_load() m_cart->set_mirroring(PPU_MIRROR_HORZ); break; } - + // SETUP step 4: logging what we have found logerror("-- Board %s\n", unif_mapr); logerror("-- PRG 0x%x (%d x 16k chunks)\n", prg_size, prg_size / 0x4000); logerror("-- VROM 0x%x (%d x 8k chunks)\n", vrom_size, vrom_size / 0x2000); logerror("-- VRAM 0x%x (%d x 8k chunks)\n", vram_size, vram_size / 0x2000); - + // SETUP steps 5/6: allocate pointers for PRG/VROM and load the data! if (prg_size == 0x4000) { @@ -868,10 +868,10 @@ bool nes_cart_slot_device::call_load() m_cart->prg_alloc(machine(), prg_size); memcpy(m_cart->get_prg_base(), temp_prg, prg_size); } - + if (small_prg) // This is not supported yet, so warn users about this mame_printf_error("Loaded UNIF file with non-16k PRG chunk. This is not supported in MESS yet."); - + if (vrom_size) { m_cart->vrom_alloc(machine(), vrom_size); @@ -882,7 +882,7 @@ bool nes_cart_slot_device::call_load() { FILE *prgout; char outname[255]; - + sprintf(outname, "%s.prg", filename()); prgout = fopen(outname, "wb"); if (prgout) @@ -890,17 +890,17 @@ bool nes_cart_slot_device::call_load() fwrite(m_cart->get_prg_base(), 1, 0x4000 * m_cart->get_prg_size(), prgout); mame_printf_error("Created PRG chunk\n"); } - + fclose(prgout); } #endif - + #if SPLIT_CHR if (state->m_chr_chunks > 0) { FILE *chrout; char outname[255]; - + sprintf(outname, "%s.chr", filename()); chrout= fopen(outname, "wb"); if (chrout) @@ -929,47 +929,47 @@ bool nes_cart_slot_device::call_load() UINT32 vrom_size = get_software_region_length("chr"); UINT32 vram_size = get_software_region_length("vram"); vram_size += get_software_region_length("vram2"); - + // validate the xml fields if (!prg_size) fatalerror("No PRG entry for this software! Please check if the xml list got corrupted\n"); if (prg_size < 0x8000) fatalerror("PRG entry is too small! Please check if the xml list got corrupted\n"); - + // SETUP step 2: getting PCB and other settings if (get_feature("pcb")) m_pcb_id = nes_get_pcb_id(machine(), get_feature("pcb")); else m_pcb_id = NO_BOARD; - + // SETUP step 3: storing the info needed for emulation if (m_pcb_id == STD_TVROM || m_pcb_id == STD_DRROM || m_pcb_id == IREM_LROG017) m_cart->set_four_screen_vram(1); else m_cart->set_four_screen_vram(0); - + if (get_software_region("bwram") != NULL) battery_size = get_software_region_length("bwram"); - + if (m_pcb_id == BANDAI_LZ93EX) { // allocate the 24C01 or 24C02 EEPROM battery_size += 0x2000; } - + if (m_pcb_id == BANDAI_DATACH) { // allocate the 24C01 and 24C02 EEPROM battery_size += 0x4000; } - + if (get_software_region("wram") != NULL) prgram_size = get_software_region_length("wram"); if (get_software_region("mapper_ram") != NULL) mapper_ram_size = get_software_region_length("mapper_ram"); if (get_software_region("mapper_bram") != NULL) mapper_bram_size = get_software_region_length("mapper_bram"); - + if (get_feature("mirroring")) { const char *mirroring = get_feature("mirroring"); @@ -984,7 +984,7 @@ bool nes_cart_slot_device::call_load() } else m_cart->set_mirroring(PPU_MIRROR_NONE); - + /* Check for pins in specific boards which require them */ if (m_pcb_id == STD_CNROM) { @@ -999,13 +999,13 @@ bool nes_cart_slot_device::call_load() m_ce_state |= !strcmp(get_feature("chr-pin27"), "CE") ? 0x02 : 0; } } - + if (m_pcb_id == TAITO_X1_005 && get_feature("x1-pin17") != NULL && get_feature("x1-pin31") != NULL) { if (!strcmp(get_feature("x1-pin17"), "CIRAM A10") && !strcmp(get_feature("x1-pin31"), "NC")) m_pcb_id = TAITO_X1_005_A; } - + if (m_pcb_id == KONAMI_VRC2) { m_vrc_ls_prg_a = nes_cart_get_line(get_feature("vrc2-pin3")); @@ -1013,34 +1013,34 @@ bool nes_cart_slot_device::call_load() m_vrc_ls_chr = (nes_cart_get_line(get_feature("vrc2-pin21")) != 10) ? 1 : 0; // mame_printf_error("VRC-2, pin3: A%d, pin4: A%d, pin21: %s\n", state->m_vrc_ls_prg_a, state->m_vrc_ls_prg_b, state->m_vrc_ls_chr ? "NC" : "A10"); } - + if (m_pcb_id == KONAMI_VRC4) { m_vrc_ls_prg_a = nes_cart_get_line(get_feature("vrc4-pin3")); m_vrc_ls_prg_b = nes_cart_get_line(get_feature("vrc4-pin4")); // mame_printf_error("VRC-4, pin3: A%d, pin4: A%d\n", state->m_vrc_ls_prg_a, state->m_vrc_ls_prg_b); } - + if (m_pcb_id == KONAMI_VRC6) { m_vrc_ls_prg_a = nes_cart_get_line(get_feature("vrc6-pin9")); m_vrc_ls_prg_b = nes_cart_get_line(get_feature("vrc6-pin10")); // mame_printf_error("VRC-6, pin9: A%d, pin10: A%d\n", state->m_vrc_ls_prg_a, state->m_vrc_ls_prg_b); } - + /* Check for other misc board variants */ if (m_pcb_id == STD_SOROM) { if (get_feature("mmc1_type") != NULL && !strcmp(get_feature("mmc1_type"), "MMC1A")) m_pcb_id = STD_SOROM_A; // in MMC1-A PRG RAM is always enabled } - + if (m_pcb_id == STD_SXROM) { if (get_feature("mmc1_type") != NULL && !strcmp(get_feature("mmc1_type"), "MMC1A")) m_pcb_id = STD_SXROM_A; // in MMC1-A PRG RAM is always enabled } - + if (m_pcb_id == STD_NXROM || m_pcb_id == SUNSOFT_DCS) { if (get_software_region("minicart") != NULL) // check for dual minicart @@ -1049,7 +1049,7 @@ bool nes_cart_slot_device::call_load() // we shall load somewhere the minicart, but we still do not support this } } - + // SETUP step 4: logging what we have found logerror("Loaded game from softlist:\n"); logerror("-- PCB: %s", get_feature("pcb")); @@ -1060,7 +1060,7 @@ bool nes_cart_slot_device::call_load() logerror("-- VRAM 0x%x (%d x 8k chunks)\n", vram_size, vram_size / 0x2000); logerror("-- PRG NVWRAM: %d\n", m_cart->get_battery_size()); logerror("-- PRG WRAM: %d\n", m_cart->get_prgram_size()); - + // SETUP steps 5/6: allocate pointers for PRG/VROM and load the data! m_cart->prg_alloc(machine(), prg_size); memcpy(m_cart->get_prg_base(), get_software_region("prg"), prg_size); @@ -1070,7 +1070,7 @@ bool nes_cart_slot_device::call_load() memcpy(m_cart->get_vrom_base(), get_software_region("chr"), vrom_size); } } - + // Allocate the remaining pointer, when needed if (vram_size) m_cart->vram_alloc(machine(), vram_size); @@ -1078,7 +1078,7 @@ bool nes_cart_slot_device::call_load() m_cart->prgram_alloc(machine(), prgram_size); if (mapper_ram_size) m_cart->mapper_ram_alloc(machine(), mapper_ram_size); - + // Attempt to load a battery file for this ROM // A few boards have internal RAM with a battery (MMC6, Taito X1-005 & X1-017, etc.) if (battery_size || mapper_bram_size) @@ -1096,12 +1096,12 @@ bool nes_cart_slot_device::call_load() m_cart->mapper_bram_alloc(machine(), mapper_bram_size); memcpy(m_cart->get_mapper_bram_base(), temp_nvram + battery_size, mapper_bram_size); } - + if (temp_nvram) auto_free(machine(), temp_nvram); } } - + return IMAGE_INIT_PASS; } @@ -1122,7 +1122,7 @@ void nes_cart_slot_device::call_unload() memcpy(temp_nvram, m_cart->get_battery_base(), m_cart->get_battery_size()); if (m_cart->get_mapper_bram_size()) memcpy(temp_nvram + m_cart->get_battery_size(), m_cart->get_mapper_bram_base(), m_cart->get_mapper_bram_size()); - + battery_save(temp_nvram, tot_size); if (temp_nvram) auto_free(machine(), temp_nvram); @@ -1230,4 +1230,3 @@ nes_rom_device::nes_rom_device(const machine_config &mconfig, device_type type, void nes_rom_device::device_start() { } - diff --git a/src/mess/machine/nes_slot.h b/src/mess/machine/nes_slot.h index 5c5a86e0ed3..f7ab5fb601f 100644 --- a/src/mess/machine/nes_slot.h +++ b/src/mess/machine/nes_slot.h @@ -153,7 +153,7 @@ public: //private: - device_nes_cart_interface* m_cart; + device_nes_cart_interface* m_cart; int m_pcb_id; bool m_must_be_loaded; }; @@ -197,12 +197,12 @@ public: virtual void device_config_complete() { m_shortname = "nes_rom"; } // nescart_interface overrides -// virtual DECLARE_READ8_MEMBER(read_l); -// virtual DECLARE_READ8_MEMBER(read_m); -// virtual DECLARE_READ8_MEMBER(read_h); -// virtual DECLARE_WRITE8_MEMBER(write_l); -// virtual DECLARE_WRITE8_MEMBER(write_m); -// virtual DECLARE_WRITE8_MEMBER(write_h); +// virtual DECLARE_READ8_MEMBER(read_l); +// virtual DECLARE_READ8_MEMBER(read_m); +// virtual DECLARE_READ8_MEMBER(read_h); +// virtual DECLARE_WRITE8_MEMBER(write_l); +// virtual DECLARE_WRITE8_MEMBER(write_m); +// virtual DECLARE_WRITE8_MEMBER(write_h); }; // device type definition diff --git a/src/mess/machine/nes_unif.c b/src/mess/machine/nes_unif.c index 08d963ba7fc..cf801d6ac85 100644 --- a/src/mess/machine/nes_unif.c +++ b/src/mess/machine/nes_unif.c @@ -160,14 +160,14 @@ const unif *nes_unif_lookup( const char *board ) void unif_mapr_setup( const char *board, int *pcb_id, int *battery, int *prgram, int *vram_chunks ) { - const unif *unif_board = nes_unif_lookup(board); + const unif *unif_board = nes_unif_lookup(board); if (unif_board == NULL) fatalerror("Unknown UNIF board %s.\n", board); - + *pcb_id = unif_board->board_idx; - *battery = unif_board->nvwram; // we should implement battery banks based on the size of this... - *prgram = unif_board->wram; // we should implement WRAM banks based on the size of this... - + *battery = unif_board->nvwram; // we should implement battery banks based on the size of this... + *prgram = unif_board->wram; // we should implement WRAM banks based on the size of this... + if (unif_board->chrram <= CHRRAM_8) *vram_chunks = 1; else if (unif_board->chrram == CHRRAM_16) diff --git a/src/mess/machine/pet_64k.c b/src/mess/machine/pet_64k.c index 1b9b1c4f9fa..1381a533e7d 100644 --- a/src/mess/machine/pet_64k.c +++ b/src/mess/machine/pet_64k.c @@ -181,7 +181,7 @@ void pet_64k_expansion_device::pet_bd_w(address_space &space, offs_t offset, UIN case pet_expansion_slot_device::SELE: if (!BIT(m_ctrl, 6) || !BIT(offset, 11)) { - write_ram(offset, data); + write_ram(offset, data); sel = pet_expansion_slot_device::SEL_NONE; } break; diff --git a/src/mess/machine/petexp.h b/src/mess/machine/petexp.h index e21481ef7bc..0ac796f876a 100644 --- a/src/mess/machine/petexp.h +++ b/src/mess/machine/petexp.h @@ -72,7 +72,7 @@ public: UINT8 dma_bd_r(offs_t offset); void dma_bd_w(offs_t offset, UINT8 data); int phi2(); - + enum { SEL_NONE = -1, diff --git a/src/mess/machine/sns_bsx.c b/src/mess/machine/sns_bsx.c index 63750525839..9cf584c2ce9 100644 --- a/src/mess/machine/sns_bsx.c +++ b/src/mess/machine/sns_bsx.c @@ -64,7 +64,7 @@ void sns_rom_bsx_device::device_start() m_cart_regs[7] = 0x80; m_cart_regs[8] = 0x80; access_update(); - + save_item(NAME(m_cart_regs)); save_item(NAME(access_00_1f)); save_item(NAME(access_80_9f)); @@ -77,7 +77,7 @@ void sns_rom_bsx_device::device_start() } void sns_rom_bsx_device::device_reset() -{ +{ memset(m_pram, 0xff, sizeof(m_pram)); } @@ -104,7 +104,7 @@ void sns_rom_bsmempak_device::device_reset() m_command = 0; m_write_old = 0; m_write_new = 0; - + m_flash_enable = 0; m_read_enable = 0; m_write_enable = 0; diff --git a/src/mess/machine/sns_rom.c b/src/mess/machine/sns_rom.c index 61d43edeaca..a2af182741d 100644 --- a/src/mess/machine/sns_rom.c +++ b/src/mess/machine/sns_rom.c @@ -309,17 +309,17 @@ WRITE8_MEMBER( sns_rom_pokemon_device::chip_write ) } -// Tekken 2: It accesses the protection in a very strange way, always reading/writing the same data $f0 times, -// because each access must be repeated a couple of times to be registered (typically around 7-30 times) +// Tekken 2: It accesses the protection in a very strange way, always reading/writing the same data $f0 times, +// because each access must be repeated a couple of times to be registered (typically around 7-30 times) // They probably used a microcontroller here. -// The protection itself is accessed in banks $80-$bf. Accessing (read/write, doesn't matter) adress lines +// The protection itself is accessed in banks $80-$bf. Accessing (read/write, doesn't matter) adress lines // A8,A9,A10 in these banks in a certain sequence makes the mc return a 4bit value. [d4s] // Details on a possible algorythm behind the sequence of accesses were provided by nocash. Thanks! void sns_rom_tekken2_device::update_prot(UINT32 offset) { // accesses to [80-bf][8000-87ff] ranges update the protection value offset &= 0x7ff; - + switch (offset & 0x700) { case 0x000: @@ -328,22 +328,22 @@ void sns_rom_tekken2_device::update_prot(UINT32 offset) case 0x100: // used for read access break; - case 0x200: // BIT 0 + case 0x200: // BIT 0 m_prot |= 1; break; - case 0x300: // BIT 1 + case 0x300: // BIT 1 m_prot |= 2; break; - case 0x400: // BIT 2 + case 0x400: // BIT 2 m_prot |= 4; break; - case 0x500: // BIT 3 + case 0x500: // BIT 3 m_prot |= 8; break; - case 0x600: // DIRECTION + case 0x600: // DIRECTION m_prot |= 0x10; break; - case 0x700: // FUNCTION + case 0x700: // FUNCTION m_prot |= 0x20; break; } @@ -355,18 +355,18 @@ READ8_MEMBER( sns_rom_tekken2_device::chip_read ) if ((offset & 0x700) == 0x100) { - if (BIT(m_prot, 5)) // FUNCTION = 1 means Shift + if (BIT(m_prot, 5)) // FUNCTION = 1 means Shift { - if (BIT(m_prot, 4)) // DIRECTION = 1 means Right + if (BIT(m_prot, 4)) // DIRECTION = 1 means Right return (m_prot & 0x0f) >> 1; - else // DIRECTION = 0 means Left + else // DIRECTION = 0 means Left return (m_prot & 0x0f) << 1; } - else // FUNCTION = 0 means Add/Sub + else // FUNCTION = 0 means Add/Sub { - if (BIT(m_prot, 4)) // DIRECTION = 1 means Minus + if (BIT(m_prot, 4)) // DIRECTION = 1 means Minus return (m_prot & 0x0f) - 1; - else // DIRECTION = 0 means Plus + else // DIRECTION = 0 means Plus return (m_prot & 0x0f) + 1; } } @@ -380,7 +380,7 @@ WRITE8_MEMBER( sns_rom_tekken2_device::chip_write ) } -// Soul Blade: Adresses $xxx0-$xxx3 in banks $80-$bf always read $55, $0f, $aa, $f0. +// Soul Blade: Adresses $xxx0-$xxx3 in banks $80-$bf always read $55, $0f, $aa, $f0. // Banks $c0-$ff return open bus. READ8_MEMBER( sns_rom_soulblad_device::chip_read ) { @@ -407,7 +407,7 @@ READ8_MEMBER( sns_rom_soulblad_device::chip_read ) // Multicart pirate banking emulation // LoROM games, writes to [ff][ff00-ffff] control bankswitch -// The actual banks depends on the last 8bits of the address accessed. +// The actual banks depends on the last 8bits of the address accessed. // Type 1: bits0-4 of the address are used as base bank (256KB chunks) READ8_MEMBER(sns_rom_mcpirate1_device::read_l) @@ -424,7 +424,7 @@ READ8_MEMBER(sns_rom_mcpirate1_device::read_h) WRITE8_MEMBER( sns_rom_mcpirate1_device::chip_write ) { m_base_bank = offset & 0x1f; -// printf("offset %X data %X bank %X\n", offset, data, m_base_bank); +// printf("offset %X data %X bank %X\n", offset, data, m_base_bank); } // Type 2: bits0-3 & bit5 of the address are used as base bank (256KB chunks) @@ -442,7 +442,7 @@ READ8_MEMBER(sns_rom_mcpirate2_device::read_h) WRITE8_MEMBER( sns_rom_mcpirate2_device::chip_write ) { m_base_bank = (offset & 0x0f) | ((offset & 0x20) >> 1); -// printf("offset %X data %X bank %X\n", offset, data, m_base_bank); +// printf("offset %X data %X bank %X\n", offset, data, m_base_bank); } // Korean 20 in 1 collection with NES games @@ -488,7 +488,7 @@ WRITE8_MEMBER( sns_rom_20col_device::chip_write ) // [19] mario bros - 9b // [20] popeye - 9c m_base_bank = data & 0xdf; -// printf("offset %X data %X bank %X\n", offset, data, m_base_bank); +// printf("offset %X data %X bank %X\n", offset, data, m_base_bank); } @@ -502,7 +502,7 @@ READ8_MEMBER( sns_rom_banana_device::chip_read ) WRITE8_MEMBER( sns_rom_banana_device::chip_write ) { -// printf("write addr %X data %X\n", offset, data); +// printf("write addr %X data %X\n", offset, data); m_latch[0xf] = data; } @@ -515,5 +515,3 @@ WRITE8_MEMBER( sns_rom_bugs_device::chip_write ) { m_latch[offset & 0xff] = data; } - - diff --git a/src/mess/machine/sns_rom.h b/src/mess/machine/sns_rom.h index 2cded87bfbe..4170945e016 100644 --- a/src/mess/machine/sns_rom.h +++ b/src/mess/machine/sns_rom.h @@ -30,16 +30,16 @@ class sns_rom_obc1_device : public sns_rom_device public: // construction/destruction sns_rom_obc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "sns_rom_obc1"; } - + // additional reading and writing virtual DECLARE_READ8_MEMBER(chip_read); virtual DECLARE_WRITE8_MEMBER(chip_write); - + int m_address; int m_offset; int m_shift; @@ -74,12 +74,12 @@ class sns_rom_tekken2_device : public sns_rom_device public: // construction/destruction sns_rom_tekken2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "sns_rom_tekken2"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(chip_read); // protection device virtual DECLARE_WRITE8_MEMBER(chip_write); // protection device @@ -98,10 +98,10 @@ class sns_rom_soulblad_device : public sns_rom_device public: // construction/destruction sns_rom_soulblad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "sns_rom_soulblad"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(chip_read); // protection device }; @@ -113,12 +113,12 @@ class sns_rom_mcpirate1_device : public sns_rom_device public: // construction/destruction sns_rom_mcpirate1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "sns_rom_mcpirate1"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_l); virtual DECLARE_READ8_MEMBER(read_h); @@ -133,12 +133,12 @@ class sns_rom_mcpirate2_device : public sns_rom_device public: // construction/destruction sns_rom_mcpirate2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "sns_rom_mcpirate2"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_l); virtual DECLARE_READ8_MEMBER(read_h); @@ -153,11 +153,11 @@ class sns_rom_20col_device : public sns_rom_device public: // construction/destruction sns_rom_20col_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "sns_rom_20col"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_l); virtual DECLARE_READ8_MEMBER(read_h); @@ -172,12 +172,12 @@ class sns_rom_banana_device : public sns_rom_device public: // construction/destruction sns_rom_banana_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides -// virtual void device_start(); -// virtual void device_reset(); +// virtual void device_start(); +// virtual void device_reset(); virtual void device_config_complete() { m_shortname = "sns_rom_banana"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(chip_read); // protection device virtual DECLARE_WRITE8_MEMBER(chip_write); // protection device @@ -191,12 +191,12 @@ class sns_rom_bugs_device : public sns_rom_device public: // construction/destruction sns_rom_bugs_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_config_complete() { m_shortname = "sns_rom_bugslife"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(chip_read); // protection device virtual DECLARE_WRITE8_MEMBER(chip_write); // protection device diff --git a/src/mess/machine/sns_rom21.c b/src/mess/machine/sns_rom21.c index f6a746e299d..646d0c16a19 100644 --- a/src/mess/machine/sns_rom21.c +++ b/src/mess/machine/sns_rom21.c @@ -50,15 +50,15 @@ void sns_rom21_srtc_device::device_start() { save_item(NAME(m_mode)); save_item(NAME(m_index)); -// save_item(NAME(m_rtc_ram)); +// save_item(NAME(m_rtc_ram)); } void sns_rom21_srtc_device::device_reset() { m_mode = RTCM_Read; m_index = -1; -// memset(m_rtc_ram, 0, sizeof(m_rtc_ram)); - +// memset(m_rtc_ram, 0, sizeof(m_rtc_ram)); + // at this stage, rtc_ram is not yet allocated. this will be fixed when converting RTC to be a separate device. // update_time(); } diff --git a/src/mess/machine/sns_sdd1.c b/src/mess/machine/sns_sdd1.c index 166cd6bb1ae..c0487ee26d4 100644 --- a/src/mess/machine/sns_sdd1.c +++ b/src/mess/machine/sns_sdd1.c @@ -442,17 +442,17 @@ void sns_rom_sdd1_device::device_reset() { m_sdd1_enable = 0x00; m_xfer_enable = 0x00; - + m_mmc[0] = 0 << 20; m_mmc[1] = 1 << 20; m_mmc[2] = 2 << 20; m_mmc[3] = 3 << 20; - + for(int i = 0; i < 8; i++) { m_dma[i].addr = 0; m_dma[i].size = 0; - } + } } /*------------------------------------------------- @@ -604,4 +604,3 @@ WRITE8_MEMBER( sns_rom_sdd1_device::write_ram ) { m_nvram[offset & 0x1fff] = data; } - diff --git a/src/mess/machine/sns_sfx.c b/src/mess/machine/sns_sfx.c index 2be51bf9ec5..bc7be0b1baf 100644 --- a/src/mess/machine/sns_sfx.c +++ b/src/mess/machine/sns_sfx.c @@ -152,4 +152,3 @@ WRITE8_MEMBER( sns_rom_superfx_device::write_ram ) if (superfx_access_ram(m_superfx)) sfx_ram[offset & 0xfffff] = data; } - diff --git a/src/mess/machine/sns_slot.c b/src/mess/machine/sns_slot.c index 7a47da01a06..61d65403f1b 100644 --- a/src/mess/machine/sns_slot.c +++ b/src/mess/machine/sns_slot.c @@ -23,7 +23,7 @@ Notes about add-on detection and handling (useful for future addition of st018, cx4, etc.) =============================================================================================== - When loading from softlist, m_type would be enough to take care of add-on chips, because + When loading from softlist, m_type would be enough to take care of add-on chips, because the ones needing a CPU dump have it in the zipfile. However, to support these games also from fullpath, both with files having DSP data appended to the .sfc and with older dumps missing DSP data, a second variable is present in the SNES slot: m_addon. @@ -32,15 +32,15 @@ ones containing DSP dump as device roms, so it gets m_type as the main device should be used and if m_addon is ADDON_DSP* or ADDON_ST*, then it checks if the DSP data is appended or if m_type has to be switched to legacy type - - call_load needs to detect faulty dumps too, to alloc m_addon_bios and copy the data from - the correct place, so if m_addon is ADDON_DSP* or ADDON_ST* it checks whether DSP data is - appended or not: if it is, this data is copied to m_addon_bios; if not, then we are in + - call_load needs to detect faulty dumps too, to alloc m_addon_bios and copy the data from + the correct place, so if m_addon is ADDON_DSP* or ADDON_ST* it checks whether DSP data is + appended or not: if it is, this data is copied to m_addon_bios; if not, then we are in the legacy device case and data is copied from the device rom - After the cart has been loaded and emulation has started, only m_type is needed to later + After the cart has been loaded and emulation has started, only m_type is needed to later handlers installation and cart accesses - Also notice that, from softlist, DSP1, 1B, 2, 3 are treated as the same device, because they - all have the same I/O and the only difference (i.e. the DSP data) comes from the zipfile itself. + Also notice that, from softlist, DSP1, 1B, 2, 3 are treated as the same device, because they + all have the same I/O and the only difference (i.e. the DSP data) comes from the zipfile itself. OTOH, to support faulty dumps missing DSP content, we need separate legacy devices... @@ -808,13 +808,13 @@ void base_sns_cart_slot_device::setup_addon_from_fullpath() } break; } - + // otherwise, we need to use the legacy versions including DSP dump in device romset if (!m_cart->get_addon_bios_size()) { astring region(m_cart->device().tag(), ":addon"); UINT8 *ROM = NULL; - + switch (m_addon) { case ADDON_DSP1: @@ -853,8 +853,8 @@ void base_sns_cart_slot_device::setup_addon_from_fullpath() memcpy(m_cart->get_addon_bios_base(), ROM, 0x11000); break; } - } - + } + } void base_sns_cart_slot_device::setup_nvram() @@ -1041,7 +1041,7 @@ const char * base_sns_cart_slot_device::get_default_card_software(const machine_ if (type == SNES_DSP_MODE21) type = SNES_DSP1_MODE21_LEG; else - type = SNES_DSP1_LEG; + type = SNES_DSP1_LEG; } break; case ADDON_DSP1B: diff --git a/src/mess/machine/sns_slot.h b/src/mess/machine/sns_slot.h index 9c4189d7686..51f2aa708d0 100644 --- a/src/mess/machine/sns_slot.h +++ b/src/mess/machine/sns_slot.h @@ -107,12 +107,12 @@ public: virtual ~device_sns_cart_interface(); // reading and writing - virtual DECLARE_READ8_MEMBER(read_l) { return 0xff; } // ROM access in range [00-7f] - virtual DECLARE_READ8_MEMBER(read_h) { return 0xff; } // ROM access in range [80-ff] - virtual DECLARE_READ8_MEMBER(read_ram) { UINT32 mask = m_nvram_size - 1; return m_nvram[offset & mask]; } // NVRAM access - virtual DECLARE_WRITE8_MEMBER(write_l) {} // used by carts with subslots - virtual DECLARE_WRITE8_MEMBER(write_h) {} // used by carts with subslots - virtual DECLARE_WRITE8_MEMBER(write_ram) { UINT32 mask = m_nvram_size - 1; m_nvram[offset & mask] = data; return; } // NVRAM access + virtual DECLARE_READ8_MEMBER(read_l) { return 0xff; } // ROM access in range [00-7f] + virtual DECLARE_READ8_MEMBER(read_h) { return 0xff; } // ROM access in range [80-ff] + virtual DECLARE_READ8_MEMBER(read_ram) { UINT32 mask = m_nvram_size - 1; return m_nvram[offset & mask]; } // NVRAM access + virtual DECLARE_WRITE8_MEMBER(write_l) {} // used by carts with subslots + virtual DECLARE_WRITE8_MEMBER(write_h) {} // used by carts with subslots + virtual DECLARE_WRITE8_MEMBER(write_ram) { UINT32 mask = m_nvram_size - 1; m_nvram[offset & mask] = data; return; } // NVRAM access virtual DECLARE_READ8_MEMBER(chip_read) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(chip_write) {} @@ -194,7 +194,7 @@ public: virtual DECLARE_READ8_MEMBER(chip_read); virtual DECLARE_WRITE8_MEMBER(chip_write); - // in order to support legacy dumps + add-on CPU dump appended at the end of the file, we + // in order to support legacy dumps + add-on CPU dump appended at the end of the file, we // check if the required data is present and update bank map accordingly void setup_addon_from_fullpath(); diff --git a/src/mess/machine/sns_spc7110.c b/src/mess/machine/sns_spc7110.c index 7fd037f26df..713a2ad4d5f 100644 --- a/src/mess/machine/sns_spc7110.c +++ b/src/mess/machine/sns_spc7110.c @@ -61,7 +61,7 @@ void sns_rom_spc7110_device::spc7110_start() m_r480a = 0x00; m_r480b = 0x00; m_r480c = 0x00; - + m_r4811 = 0x00; m_r4812 = 0x00; m_r4813 = 0x00; @@ -70,11 +70,11 @@ void sns_rom_spc7110_device::spc7110_start() m_r4816 = 0x00; m_r4817 = 0x00; m_r4818 = 0x00; - + m_r481x = 0x00; m_r4814_latch = 0; m_r4815_latch = 0; - + m_r4820 = 0x00; m_r4821 = 0x00; m_r4822 = 0x00; @@ -91,7 +91,7 @@ void sns_rom_spc7110_device::spc7110_start() m_r482d = 0x00; m_r482e = 0x00; m_r482f = 0x00; - + m_r4830 = 0x00; m_r4831 = 0; m_dx_offset = spc7110_datarom_addr(0 * 0x100000, 0x200000); // we would need the rom length here... @@ -100,7 +100,7 @@ void sns_rom_spc7110_device::spc7110_start() m_r4833 = 2; m_fx_offset = spc7110_datarom_addr(2 * 0x100000, 0x200000); // we would need the rom length here... m_r4834 = 0x00; - + m_r4840 = 0x00; m_r4841 = 0x00; m_r4842 = 0x00; @@ -167,19 +167,19 @@ void sns_rom_spc7110_device::device_start() void sns_rom_spc7110rtc_device::device_start() { spc7110_start(); - + // RTC m_rtc_state = RTCS_Inactive; m_rtc_mode = RTCM_Linear; m_rtc_index = 0; m_rtc_offset = 0; - + // at this stage, rtc_ram is not yet allocated. this will be fixed when converting RTC to be a separate device. // spc7110_update_time(0); // set basetime for RTC machine().current_datetime(m_rtc_basetime); - + save_item(NAME(m_rtc_state)); save_item(NAME(m_rtc_mode)); save_item(NAME(m_rtc_index)); @@ -936,7 +936,7 @@ void sns_rom_spc7110_device::spc7110_update_time(UINT8 offset) system_time curtime; machine().current_datetime(curtime); INT64 diff = curtime.time - m_rtc_basetime.time - offset; -// printf("diff %llx\n", diff); +// printf("diff %llx\n", diff); bool update = TRUE; // TEST: can we go beyond 24hrs of rounding?!? I doubt it will ever go beyond 3600, but I could be wrong... @@ -984,37 +984,37 @@ void sns_rom_spc7110_device::spc7110_update_time(UINT8 offset) UINT8 days = spc7110_months[month % 12]; // check for feb 29th - if (days == 28) + if (days == 28) { bool leap = FALSE; - if ((year % 4) == 0) + if ((year % 4) == 0) { if(year % 100 || !(year % 400)) leap = TRUE; } - if (leap) + if (leap) days++; } // are we below end of month? - if (day < days) + if (day < days) continue; // otherwise we have to increase month! day = 0; month++; // are we below end of year? - if (month < 12) + if (month < 12) continue; // otherwise we have to increase year! month = 0; year++; } - + day++; month++; year %= 100; - + m_rtc_ram[0] = second % 10; m_rtc_ram[1] = second / 10; m_rtc_ram[2] = minute % 10; @@ -1608,14 +1608,14 @@ READ8_MEMBER(sns_rom_spc7110_device::read_l) { if (offset < 0x400000) return m_rom[rom_bank_map[offset / 0x8000] * 0x8000 + (offset & 0x7fff)]; - + return 0xff; } READ8_MEMBER(sns_rom_spc7110_device::read_h) { UINT16 address = offset & 0xfffff; - + if (offset < 0x400000) return m_rom[rom_bank_map[offset / 0x8000] * 0x8000 + (offset & 0x7fff)]; else @@ -1634,7 +1634,7 @@ READ8_MEMBER(sns_rom_spc7110_device::read_h) break; } } - + return 0xff; } @@ -1648,4 +1648,3 @@ WRITE8_MEMBER( sns_rom_spc7110_device::write_ram ) { m_ram[offset & 0x1fff] = data; } - diff --git a/src/mess/machine/sns_upd.c b/src/mess/machine/sns_upd.c index 09c115556d2..f78a5ade6fc 100644 --- a/src/mess/machine/sns_upd.c +++ b/src/mess/machine/sns_upd.c @@ -237,7 +237,7 @@ READ8_MEMBER( sns_rom_setadsp_device::chip_read ) { if (offset >= 0x600000 && offset < 0x680000 && (offset & 0xffff) < 0x4000) m_upd96050->snesdsp_read((offset & 0x01) ? FALSE : TRUE); - + if (offset >= 0x680000 && offset < 0x700000 && (offset & 0xffff) < 0x8000) { UINT16 address = offset & 0xffff; @@ -518,4 +518,3 @@ const rom_entry *sns_rom_seta11dsp_legacy_device::device_rom_region() const { return ROM_NAME( snes_st011 ); } - diff --git a/src/mess/machine/sns_upd.h b/src/mess/machine/sns_upd.h index 4726ab587ce..f937aa0a10c 100644 --- a/src/mess/machine/sns_upd.h +++ b/src/mess/machine/sns_upd.h @@ -119,7 +119,7 @@ class sns_rom20_necdsp1_legacy_device : public sns_rom20_necdsp_device public: // construction/destruction sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "dsp1leg"; } virtual machine_config_constructor device_mconfig_additions() const; @@ -131,7 +131,7 @@ class sns_rom20_necdsp1b_legacy_device : public sns_rom20_necdsp_device public: // construction/destruction sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "dsp1bleg"; } virtual machine_config_constructor device_mconfig_additions() const; @@ -143,7 +143,7 @@ class sns_rom20_necdsp2_legacy_device : public sns_rom20_necdsp_device public: // construction/destruction sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "dsp2leg"; } virtual machine_config_constructor device_mconfig_additions() const; @@ -155,7 +155,7 @@ class sns_rom20_necdsp3_legacy_device : public sns_rom20_necdsp_device public: // construction/destruction sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "dsp3leg"; } virtual machine_config_constructor device_mconfig_additions() const; @@ -167,7 +167,7 @@ class sns_rom20_necdsp4_legacy_device : public sns_rom20_necdsp_device public: // construction/destruction sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "dsp4leg"; } virtual machine_config_constructor device_mconfig_additions() const; @@ -179,7 +179,7 @@ class sns_rom21_necdsp1_legacy_device : public sns_rom21_necdsp_device public: // construction/destruction sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "dsp1leg_hi"; } virtual machine_config_constructor device_mconfig_additions() const; @@ -191,7 +191,7 @@ class sns_rom_seta10dsp_legacy_device : public sns_rom_setadsp_device public: // construction/destruction sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "seta10leg"; } virtual machine_config_constructor device_mconfig_additions() const; diff --git a/src/mess/machine/super80.c b/src/mess/machine/super80.c index a694b932ee9..8f25391b1f4 100644 --- a/src/mess/machine/super80.c +++ b/src/mess/machine/super80.c @@ -253,4 +253,4 @@ QUICKLOAD_LOAD( super80 ) } return IMAGE_INIT_PASS; -}
\ No newline at end of file +} diff --git a/src/mess/machine/tandy2kb.c b/src/mess/machine/tandy2kb.c index 3212774f62d..530914ead2e 100644 --- a/src/mess/machine/tandy2kb.c +++ b/src/mess/machine/tandy2kb.c @@ -259,8 +259,8 @@ tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, //------------------------------------------------- void tandy2k_keyboard_device::device_config_complete() -{ - m_shortname = "tandy2kb"; +{ + m_shortname = "tandy2kb"; // inherit a copy of the static data const tandy2k_keyboard_interface *intf = reinterpret_cast<const tandy2k_keyboard_interface *>(static_config()); diff --git a/src/mess/machine/thomflop.c b/src/mess/machine/thomflop.c index bbcc47d0ba4..6f4103ebabd 100644 --- a/src/mess/machine/thomflop.c +++ b/src/mess/machine/thomflop.c @@ -1937,4 +1937,3 @@ void thomson_state::thomson_index_callback(device_t *device, int state) break; } } - diff --git a/src/mess/machine/thomson.c b/src/mess/machine/thomson.c index 3ebccf4cff9..312bca1d5e4 100644 --- a/src/mess/machine/thomson.c +++ b/src/mess/machine/thomson.c @@ -480,8 +480,8 @@ WRITE8_MEMBER( thomson_state::to7_timer_port_out ) thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ thom_set_caps_led( (data & 8) ? 1 : 0 ) ; /* bit 3: keyboard led */ thom_set_border_color( ((data & 0x10) ? 1 : 0) | /* bits 4-6: border color */ - ((data & 0x20) ? 2 : 0) | - ((data & 0x40) ? 4 : 0) ); + ((data & 0x20) ? 2 : 0) | + ((data & 0x40) ? 4 : 0) ); } @@ -1571,9 +1571,9 @@ WRITE8_MEMBER( thomson_state::to770_timer_port_out ) thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ thom_set_caps_led( (data & 8) ? 1 : 0 ) ; /* bit 3: keyboard led */ thom_set_border_color( ((data & 0x10) ? 1 : 0) | /* 4-bit border color */ - ((data & 0x20) ? 2 : 0) | - ((data & 0x40) ? 4 : 0) | - ((data & 0x04) ? 0 : 8) ); + ((data & 0x20) ? 2 : 0) | + ((data & 0x40) ? 4 : 0) | + ((data & 0x04) ? 0 : 8) ); } diff --git a/src/mess/machine/ti99/mecmouse.h b/src/mess/machine/ti99/mecmouse.h index 5481134d92d..895ffe07830 100644 --- a/src/mess/machine/ti99/mecmouse.h +++ b/src/mess/machine/ti99/mecmouse.h @@ -30,7 +30,7 @@ protected: virtual void device_reset(void); virtual ioport_constructor device_input_ports() const; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - + private: int m_last_select; bool m_read_y_axis; diff --git a/src/mess/machine/ti99/ti_fdc.h b/src/mess/machine/ti99/ti_fdc.h index b3fd1a8fe7e..5d1361e8a18 100644 --- a/src/mess/machine/ti99/ti_fdc.h +++ b/src/mess/machine/ti99/ti_fdc.h @@ -37,7 +37,7 @@ protected: virtual const rom_entry *device_rom_region() const; virtual machine_config_constructor device_mconfig_additions() const; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - + private: void handle_hold(void); void set_all_geometries(floppy_type_t type); diff --git a/src/mess/machine/vic1011.c b/src/mess/machine/vic1011.c index 03640c6d5e5..6ca9048db7e 100644 --- a/src/mess/machine/vic1011.c +++ b/src/mess/machine/vic1011.c @@ -93,18 +93,18 @@ void vic1011_device::device_start() UINT8 vic1011_device::vic20_pb_r(address_space &space, offs_t offset) { /* - + bit description - + 0 Sin - 1 - 2 - 3 + 1 + 2 + 3 4 DCDin - 5 + 5 6 CTS 7 DSR - + */ UINT8 data = 0; @@ -125,18 +125,18 @@ UINT8 vic1011_device::vic20_pb_r(address_space &space, offs_t offset) void vic1011_device::vic20_pb_w(address_space &space, offs_t offset, UINT8 data) { /* - + bit description - - 0 + + 0 1 RTS 2 DTR - 3 - 4 + 3 + 4 5 DCDout - 6 - 7 - + 6 + 7 + */ m_rs232->rts_w(BIT(data, 1)); diff --git a/src/mess/mess.lst b/src/mess/mess.lst index 8b20eb049b6..dcd2ac05ebd 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2205,4 +2205,3 @@ nd80z binbug dg680 besta88 - diff --git a/src/mess/video/crt.c b/src/mess/video/crt.c index 557b4b7ef17..9340ad87d53 100644 --- a/src/mess/video/crt.c +++ b/src/mess/video/crt.c @@ -50,14 +50,14 @@ const device_type CRT = &device_creator<crt_device>; crt_device::crt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, CRT, "CRT Video", tag, owner, clock), - m_list(NULL), - m_list_head(NULL), - m_decay_counter(0), - m_num_intensity_levels(0), - m_window_offset_x(0), - m_window_offset_y(0), - m_window_width(0), - m_window_height(0) + m_list(NULL), + m_list_head(NULL), + m_decay_counter(0), + m_num_intensity_levels(0), + m_window_offset_x(0), + m_window_offset_y(0), + m_window_width(0), + m_window_height(0) { } diff --git a/src/mess/video/crt.h b/src/mess/video/crt.h index eb8f0d3a7c7..22bce59a399 100644 --- a/src/mess/video/crt.h +++ b/src/mess/video/crt.h @@ -33,10 +33,10 @@ struct crt_interface struct crt_point { - crt_point() : - intensity(0), - next(0) {} - + crt_point() : + intensity(0), + next(0) {} + int intensity; /* current intensity of the pixel */ /* a node is not in the list when (intensity == -1) */ int next; /* index of next pixel in list */ @@ -55,23 +55,23 @@ protected: virtual void device_start(); public: - void plot(int x, int y); - void eof(); - void update(bitmap_ind16 &bitmap); + void plot(int x, int y); + void eof(); + void update(bitmap_ind16 &bitmap); private: crt_point *m_list; /* array of (crt_window_width*crt_window_height) point */ int *m_list_head; /* head of the list of lit pixels (index in the array) */ - /* keep a separate list for each display line (makes the video code slightly faster) */ + /* keep a separate list for each display line (makes the video code slightly faster) */ int m_decay_counter; /* incremented each frame (tells for how many frames the CRT has decayed between two screen refresh) */ /* CRT window */ int m_num_intensity_levels; int m_window_offset_x; - int m_window_offset_y; + int m_window_offset_y; int m_window_width; - int m_window_height; + int m_window_height; }; extern const device_type CRT; diff --git a/src/mess/video/crtc_ega.c b/src/mess/video/crtc_ega.c index dad20909cd8..ad2daba6c4b 100644 --- a/src/mess/video/crtc_ega.c +++ b/src/mess/video/crtc_ega.c @@ -739,9 +739,9 @@ void crtc_ega_device::device_reset() m_vert_blank_start = 0; m_line_counter = 0; m_raster_counter = 0; - m_horiz_pix_total = 0; + m_horiz_pix_total = 0; m_vert_pix_total = 0; - m_max_visible_x = 0; + m_max_visible_x = 0; m_max_visible_y = 0; m_hsync_on_pos = 0; m_vsync_on_pos = 0; |
