diff options
| author | 2013-04-30 06:36:06 +0000 | |
|---|---|---|
| committer | 2013-04-30 06:36:06 +0000 | |
| commit | 4bf717996f56eb03dc735c83dae5450b7fc98d75 (patch) | |
| tree | a63a55bcc180e342382e9c9a680f0c643fd05248 /src/mess | |
| parent | f35b95a00e64c63422116039aeae272029b58e51 (diff) | |
Cleanups and version bumpmame0148u4
Diffstat (limited to 'src/mess')
111 files changed, 418 insertions, 434 deletions
diff --git a/src/mess/audio/vrc6.c b/src/mess/audio/vrc6.c index 48864dc3ebc..4553dd118da 100644 --- a/src/mess/audio/vrc6.c +++ b/src/mess/audio/vrc6.c @@ -4,17 +4,17 @@ Konami VRC6 additional sound channels Emulation by R. Belmont - + References: http://wiki.nesdev.com/w/index.php/VRC6_audio - http://nesdev.com/vrcvi.txt - + http://nesdev.com/vrcvi.txt + ***************************************************************************/ #include "emu.h" #include "vrc6.h" -#define DISABLE_VRC6_SOUND // not ready yet +#define DISABLE_VRC6_SOUND // not ready yet // device type definition const device_type VRC6 = &device_creator<vrc6snd_device>; @@ -29,7 +29,7 @@ const device_type VRC6 = &device_creator<vrc6snd_device>; vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, VRC6, "VRC6 sound", tag, owner, clock), - device_sound_interface(mconfig, *this) + device_sound_interface(mconfig, *this) { } @@ -175,7 +175,7 @@ void vrc6snd_device::sound_stream_update(sound_stream &stream, stream_sample_t * { m_ticks[2]--; if (m_ticks[2] == 0) - { + { m_ticks[2] = m_sawfrql | (m_sawfrqh & 0xf)<<4; // only update on even steps @@ -199,7 +199,7 @@ void vrc6snd_device::sound_stream_update(sound_stream &stream, stream_sample_t * } // sum 2 4-bit pulses, 1 5-bit saw = unsigned 6 bit output - tmp = (INT16)(UINT8)(m_output[0] + m_output[1] + m_output[2]); + tmp = (INT16)(UINT8)(m_output[0] + m_output[1] + m_output[2]); tmp <<= 8; out[i] = tmp; @@ -316,5 +316,3 @@ WRITE8_MEMBER( vrc6snd_device::write ) } } - - diff --git a/src/mess/audio/vrc6.h b/src/mess/audio/vrc6.h index bef5383b5b2..f1d2b1192fa 100644 --- a/src/mess/audio/vrc6.h +++ b/src/mess/audio/vrc6.h @@ -57,5 +57,3 @@ extern const device_type VRC6; #endif /* __VRC6_H__ */ - - diff --git a/src/mess/drivers/bebox.c b/src/mess/drivers/bebox.c index b961fe61f1a..d0f369d83d3 100644 --- a/src/mess/drivers/bebox.c +++ b/src/mess/drivers/bebox.c @@ -159,7 +159,7 @@ WRITE_LINE_MEMBER(bebox_state::bebox_keyboard_interrupt) } } -READ8_MEMBER(bebox_state::bebox_get_out2) +READ8_MEMBER(bebox_state::bebox_get_out2) { return pit8253_get_output(machine().device("pit8254"), 2 ); } @@ -171,7 +171,7 @@ static const struct kbdc8042_interface bebox_8042_interface = DEVCB_NULL, DEVCB_DRIVER_LINE_MEMBER(bebox_state,bebox_keyboard_interrupt), DEVCB_NULL, - + DEVCB_NULL, DEVCB_DRIVER_MEMBER(bebox_state,bebox_get_out2) }; diff --git a/src/mess/drivers/bigbord2.c b/src/mess/drivers/bigbord2.c index b8fc75aabb9..743daab7190 100644 --- a/src/mess/drivers/bigbord2.c +++ b/src/mess/drivers/bigbord2.c @@ -150,7 +150,7 @@ public: DECLARE_READ8_MEMBER(memory_read_byte); DECLARE_WRITE8_MEMBER(memory_write_byte); DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); + DECLARE_WRITE8_MEMBER(io_write_byte); }; /* Status port diff --git a/src/mess/drivers/coco3.c b/src/mess/drivers/coco3.c index a36aff8b9ed..b6bb8288f79 100644 --- a/src/mess/drivers/coco3.c +++ b/src/mess/drivers/coco3.c @@ -40,7 +40,7 @@ static ADDRESS_MAP_START( coco3_mem, AS_PROGRAM, 8, coco3_state ) AM_RANGE(0xFF40, 0xFF5F) AM_READWRITE(ff40_read, ff40_write) AM_RANGE(0xFF60, 0xFF8F) AM_READWRITE(ff60_read, ff60_write) AM_RANGE(0xFF90, 0xFFDF) AM_DEVREADWRITE(GIME_TAG, gime_base_device, read, write) - + // While Tepolt and other sources say that the interrupt vectors are mapped to // the same memory accessed at $BFFx, William Astle offered evidence that this // memory on a CoCo 3 is not the same. diff --git a/src/mess/drivers/dmv.c b/src/mess/drivers/dmv.c index 1ed626ae089..5bc04533327 100644 --- a/src/mess/drivers/dmv.c +++ b/src/mess/drivers/dmv.c @@ -49,7 +49,7 @@ public: DECLARE_READ8_MEMBER(fdc_dma_r); DECLARE_WRITE8_MEMBER(fdc_dma_w); DECLARE_READ8_MEMBER(memory_read_byte); - DECLARE_WRITE8_MEMBER(memory_write_byte); + DECLARE_WRITE8_MEMBER(memory_write_byte); void fdc_irq(bool state); void fdc_drq(bool state); diff --git a/src/mess/drivers/fk1.c b/src/mess/drivers/fk1.c index c553738000f..f181c76c2f1 100644 --- a/src/mess/drivers/fk1.c +++ b/src/mess/drivers/fk1.c @@ -25,7 +25,7 @@ public: required_device<cpu_device> m_maincpu; required_device<ram_device> m_ram; - + DECLARE_WRITE8_MEMBER(fk1_ppi_1_a_w); DECLARE_WRITE8_MEMBER(fk1_ppi_1_b_w); DECLARE_WRITE8_MEMBER(fk1_ppi_1_c_w); diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c index 8da8cac8a0f..7e9f30b6bdf 100644 --- a/src/mess/drivers/fmtowns.c +++ b/src/mess/drivers/fmtowns.c @@ -1930,7 +1930,6 @@ WRITE8_MEMBER(towns_state::towns_rtc_select_w) void towns_state::rtc_hour() { - m_towns_rtc_reg[4]++; if(m_towns_rtc_reg[4] > 4 && m_towns_rtc_reg[5] == 2) { @@ -1946,7 +1945,6 @@ void towns_state::rtc_hour() void towns_state::rtc_minute() { - m_towns_rtc_reg[2]++; if(m_towns_rtc_reg[2] > 9) { diff --git a/src/mess/drivers/ip22.c b/src/mess/drivers/ip22.c index 22bb8d9716b..47cd8e729c1 100644 --- a/src/mess/drivers/ip22.c +++ b/src/mess/drivers/ip22.c @@ -1498,9 +1498,9 @@ static const struct kbdc8042_interface at8042 = DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, - + DEVCB_NULL, - DEVCB_DRIVER_MEMBER(ip22_state,ip22_get_out2) + DEVCB_DRIVER_MEMBER(ip22_state,ip22_get_out2) }; DRIVER_INIT_MEMBER(ip22_state,ip225015) @@ -1642,7 +1642,7 @@ static MACHINE_CONFIG_START( ip225015, ip22_state ) MCFG_SOUND_MODIFY( "scsi:cdrom:cdda" ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "^^^lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "^^^rspeaker", 1.0) - + MCFG_KBDC8042_ADD("kbdc", at8042) MACHINE_CONFIG_END diff --git a/src/mess/drivers/kyocera.c b/src/mess/drivers/kyocera.c index 4098df19107..9022af56acf 100644 --- a/src/mess/drivers/kyocera.c +++ b/src/mess/drivers/kyocera.c @@ -42,9 +42,9 @@ - tandy200 TCM5089 DTMF sound - international keyboard option ROMs - 10 FOR A=0 TO 255 - 20 PRINT CHR$(A); - 30 NEXT A + 10 FOR A=0 TO 255 + 20 PRINT CHR$(A); + 30 NEXT A */ diff --git a/src/mess/drivers/merlin.c b/src/mess/drivers/merlin.c index 6b38a0752c9..92835fa1a88 100644 --- a/src/mess/drivers/merlin.c +++ b/src/mess/drivers/merlin.c @@ -17,7 +17,7 @@ class merlin_state : public driver_device public: merlin_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_speaker(*this, "speaker") , + m_speaker(*this, "speaker") , m_maincpu(*this, "maincpu") { } virtual void machine_start(); diff --git a/src/mess/drivers/mini2440.c b/src/mess/drivers/mini2440.c index 7515830b241..7e30ed5983f 100644 --- a/src/mess/drivers/mini2440.c +++ b/src/mess/drivers/mini2440.c @@ -49,7 +49,7 @@ public: DECLARE_WRITE8_MEMBER(s3c2440_nand_data_w ); DECLARE_WRITE16_MEMBER(s3c2440_i2s_data_w ); DECLARE_READ32_MEMBER(s3c2440_adc_data_r ); - + }; inline void ATTR_PRINTF(3,4) mini2440_state::verboselog( int n_level, const char *s_fmt, ...) diff --git a/src/mess/drivers/mz3500.c b/src/mess/drivers/mz3500.c index ed501728952..07b46c69a6c 100644 --- a/src/mess/drivers/mz3500.c +++ b/src/mess/drivers/mz3500.c @@ -58,7 +58,7 @@ public: required_device<upd765a_device> m_fdc; required_shared_ptr<UINT8> m_video_ram; required_device<beep_device> m_beeper; - + UINT8 *m_ipl_rom; UINT8 *m_basic_rom; UINT8 *m_work_ram; diff --git a/src/mess/drivers/p8k.c b/src/mess/drivers/p8k.c index 65184af235b..037b011d6b1 100644 --- a/src/mess/drivers/p8k.c +++ b/src/mess/drivers/p8k.c @@ -110,7 +110,7 @@ public: DECLARE_READ8_MEMBER(memory_read_byte); DECLARE_WRITE8_MEMBER(memory_write_byte); DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); + DECLARE_WRITE8_MEMBER(io_write_byte); }; /*************************************************************************** diff --git a/src/mess/drivers/palmz22.c b/src/mess/drivers/palmz22.c index 5aba8f4b73a..afdd9aa59ef 100644 --- a/src/mess/drivers/palmz22.c +++ b/src/mess/drivers/palmz22.c @@ -149,9 +149,9 @@ WRITE8_MEMBER( palmz22_state::s3c2410_nand_data_w ) /* READ8_MEMBER( palmz22_state::s3c2410_nand_busy_r ) { - UINT8 data = m_nand->is_busy(); - verboselog(9, "s3c2410_nand_busy_r %02X\n", data); - return data; + UINT8 data = m_nand->is_busy(); + verboselog(9, "s3c2410_nand_busy_r %02X\n", data); + return data; } */ diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c index 34b00673653..231f83f136c 100644 --- a/src/mess/drivers/pc9801.c +++ b/src/mess/drivers/pc9801.c @@ -382,7 +382,7 @@ public: required_shared_ptr<UINT8> m_video_ram_1; required_shared_ptr<UINT8> m_video_ram_2; required_device<beep_device> m_beeper; - optional_device<ram_device> m_ram; + optional_device<ram_device> m_ram; virtual void video_start(); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mess/drivers/tsispch.c b/src/mess/drivers/tsispch.c index 4a4e9918be0..3da04d51a5d 100644 --- a/src/mess/drivers/tsispch.c +++ b/src/mess/drivers/tsispch.c @@ -207,7 +207,7 @@ WRITE8_MEMBER( tsispch_state::peripheral_w ) and (probably) the p0-to-ir0 masking of the upd77p20; there are two unknown and seemingly unused bits as well. see the top of the file for more info. - */ + */ m_paramReg = data; m_dsp->set_input_line(INPUT_LINE_RESET, BIT(data,6)?CLEAR_LINE:ASSERT_LINE); #ifdef DEBUG_PARAM diff --git a/src/mess/includes/aim65.h b/src/mess/includes/aim65.h index 11949515d87..37237085385 100644 --- a/src/mess/includes/aim65.h +++ b/src/mess/includes/aim65.h @@ -61,7 +61,7 @@ public: virtual void machine_start(); TIMER_CALLBACK_MEMBER(aim65_printer_timer); void aim65_pia(); - + DECLARE_WRITE16_MEMBER(aim65_update_ds1); DECLARE_WRITE16_MEMBER(aim65_update_ds2); DECLARE_WRITE16_MEMBER(aim65_update_ds3); diff --git a/src/mess/includes/amstr_pc.h b/src/mess/includes/amstr_pc.h index 20de12892dc..90b70b1e43c 100644 --- a/src/mess/includes/amstr_pc.h +++ b/src/mess/includes/amstr_pc.h @@ -14,7 +14,7 @@ class amstrad_pc_state : public pc_state public: amstrad_pc_state(const machine_config &mconfig, device_type type, const char *tag) : pc_state(mconfig, type, tag) - { m_mouse.x =0; m_mouse.y=0;} + { m_mouse.x =0; m_mouse.y=0;} DECLARE_READ8_MEMBER( pc1640_port60_r ); DECLARE_WRITE8_MEMBER( pc1640_port60_w ); @@ -30,12 +30,12 @@ public: DECLARE_READ8_MEMBER( pc1640_port3d0_r ); DECLARE_READ8_MEMBER( pc1640_port4278_r ); DECLARE_READ8_MEMBER( pc1640_port278_r ); - + DECLARE_DRIVER_INIT(pc1512); - DECLARE_DRIVER_INIT(pc1640); + DECLARE_DRIVER_INIT(pc1640); DECLARE_DRIVER_INIT(ppc512); DECLARE_DRIVER_INIT(pc200); - + private: struct { UINT8 x,y; //byte clipping needed @@ -47,7 +47,7 @@ private: UINT8 m_port62; UINT8 m_port65; - int m_dipstate; + int m_dipstate; }; INPUT_PORTS_EXTERN( amstrad_keyboard ); diff --git a/src/mess/includes/apple2gs.h b/src/mess/includes/apple2gs.h index efad208eb0d..dac1eaa8988 100644 --- a/src/mess/includes/apple2gs.h +++ b/src/mess/includes/apple2gs.h @@ -238,24 +238,24 @@ public: UINT8 apple2gs_xxCxxx_r(address_space &space, offs_t address); void apple2gs_xxCxxx_w(address_space &space, offs_t address, UINT8 data); void apple2gs_setup_memory(); - + DECLARE_READ8_MEMBER( gssnd_r ); DECLARE_WRITE8_MEMBER( gssnd_w ); DECLARE_READ8_MEMBER( apple2gs_00Cxxx_r ); DECLARE_READ8_MEMBER( apple2gs_01Cxxx_r ); DECLARE_READ8_MEMBER( apple2gs_E0Cxxx_r ); DECLARE_READ8_MEMBER( apple2gs_E1Cxxx_r ); - DECLARE_WRITE8_MEMBER( apple2gs_00Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_01Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E0Cxxx_w ); - DECLARE_WRITE8_MEMBER( apple2gs_E1Cxxx_w ); + DECLARE_WRITE8_MEMBER( apple2gs_00Cxxx_w ); + DECLARE_WRITE8_MEMBER( apple2gs_01Cxxx_w ); + DECLARE_WRITE8_MEMBER( apple2gs_E0Cxxx_w ); + DECLARE_WRITE8_MEMBER( apple2gs_E1Cxxx_w ); DECLARE_WRITE8_MEMBER( apple2gs_Exxxxx_w ); DECLARE_WRITE8_MEMBER( apple2gs_E004xx_w ); DECLARE_WRITE8_MEMBER( apple2gs_E02xxx_w ); DECLARE_WRITE8_MEMBER( apple2gs_E104xx_w ); DECLARE_WRITE8_MEMBER( apple2gs_E12xxx_w ); DECLARE_WRITE8_MEMBER( apple2gs_slowmem_w ); - DECLARE_READ8_MEMBER(apple2gs_bank_echo_r); + DECLARE_READ8_MEMBER(apple2gs_bank_echo_r); }; diff --git a/src/mess/includes/avigo.h b/src/mess/includes/avigo.h index 1f2e41f368e..bdbea2a00dd 100644 --- a/src/mess/includes/avigo.h +++ b/src/mess/includes/avigo.h @@ -107,7 +107,7 @@ public: virtual void palette_init(); TIMER_DEVICE_CALLBACK_MEMBER(avigo_scan_timer); TIMER_DEVICE_CALLBACK_MEMBER(avigo_1hz_timer); - + DECLARE_QUICKLOAD_LOAD_MEMBER( avigo); }; #endif /* AVIGO_H_ */ diff --git a/src/mess/includes/bbc.h b/src/mess/includes/bbc.h index 43e4196ebc1..63a8ffb2fcb 100644 --- a/src/mess/includes/bbc.h +++ b/src/mess/includes/bbc.h @@ -32,7 +32,7 @@ public: m_trom(*this, "saa505x"), m_cassette(*this, "cassette"), m_acia(*this, "acia6850"), - m_ACCCON_IRR(CLEAR_LINE), + m_ACCCON_IRR(CLEAR_LINE), m_via_system_irq(CLEAR_LINE), m_via_user_irq(CLEAR_LINE), m_acia_irq(CLEAR_LINE), @@ -374,7 +374,7 @@ protected: void MC6850_Receive_Clock(int new_clock); void BBC_Cassette_motor(unsigned char status); void bbc_update_fdq_int(int state); -public: +public: unsigned int calculate_video_address(int ma,int ra); }; diff --git a/src/mess/includes/c128.h b/src/mess/includes/c128.h index 9b9dd03fc51..1089afc0dd3 100644 --- a/src/mess/includes/c128.h +++ b/src/mess/includes/c128.h @@ -193,7 +193,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER( restore ); DECLARE_INPUT_CHANGED_MEMBER( caps_lock ); - + DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c64 ); // memory state int m_z80en; diff --git a/src/mess/includes/c64.h b/src/mess/includes/c64.h index 042bb1a980e..6cf0b902556 100644 --- a/src/mess/includes/c64.h +++ b/src/mess/includes/c64.h @@ -138,7 +138,7 @@ public: DECLARE_WRITE_LINE_MEMBER( exp_reset_w ); DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c64 ); - + // memory state int m_loram; int m_hiram; diff --git a/src/mess/includes/c65.h b/src/mess/includes/c65.h index b87d8e12338..f003c0432fb 100644 --- a/src/mess/includes/c65.h +++ b/src/mess/includes/c65.h @@ -162,7 +162,7 @@ public: DECLARE_READ8_MEMBER( c65_read_io ); DECLARE_READ8_MEMBER( c65_read_io_dc00 ); DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c65 ); - + int c64_paddle_read( device_t *device, address_space &space, int which ); void c65_nmi( ); void c65_irq( int level ); diff --git a/src/mess/includes/cgenie.h b/src/mess/includes/cgenie.h index 3aa7d6c1cf2..ab06d1a4856 100644 --- a/src/mess/includes/cgenie.h +++ b/src/mess/includes/cgenie.h @@ -85,7 +85,7 @@ public: required_device<cpu_device> m_maincpu; required_device<cassette_image_device> m_cassette; required_device<ram_device> m_ram; - + void cgenie_offset_xy(); int cgenie_get_register(int indx); void cgenie_mode_select(int mode); @@ -131,7 +131,7 @@ public: DECLARE_WRITE8_MEMBER( cgenie_index_w ); DECLARE_WRITE8_MEMBER( cgenie_register_w ); - + }; diff --git a/src/mess/includes/cosmicos.h b/src/mess/includes/cosmicos.h index 5ec6b9892ee..f631f2425d3 100644 --- a/src/mess/includes/cosmicos.h +++ b/src/mess/includes/cosmicos.h @@ -110,7 +110,7 @@ public: DECLARE_DIRECT_UPDATE_MEMBER(cosmicos_direct_update_handler); DECLARE_QUICKLOAD_LOAD_MEMBER( cosmicos ); - + void set_cdp1802_mode(int mode); void clear_input_data(); void set_ram_mode(); diff --git a/src/mess/includes/electron.h b/src/mess/includes/electron.h index cc817b31dd1..2fbdb5acea9 100644 --- a/src/mess/includes/electron.h +++ b/src/mess/includes/electron.h @@ -60,7 +60,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_cassette(*this, "cassette"), - m_beeper(*this, "beeper") { } + m_beeper(*this, "beeper") { } ULA m_ula; emu_timer *m_tape_timer; diff --git a/src/mess/includes/enterp.h b/src/mess/includes/enterp.h index 860cf5bf5ea..7d88614233c 100644 --- a/src/mess/includes/enterp.h +++ b/src/mess/includes/enterp.h @@ -64,7 +64,7 @@ public: void Nick_UpdateLPT(); void Nick_ReloadLPT(); void Nick_DoLine(); - void Nick_DoScreen(bitmap_ind16 &bm); + void Nick_DoScreen(bitmap_ind16 &bm); }; diff --git a/src/mess/includes/europc.h b/src/mess/includes/europc.h index 0eb62f77f93..8e9f71f5ea7 100644 --- a/src/mess/includes/europc.h +++ b/src/mess/includes/europc.h @@ -15,8 +15,8 @@ class europc_pc_state : public pc_state public: europc_pc_state(const machine_config &mconfig, device_type type, const char *tag) : pc_state(mconfig, type, tag), - m_jim_state(0), - m_port61(0) { } + m_jim_state(0), + m_port61(0) { } DECLARE_WRITE8_MEMBER( europc_pio_w ); DECLARE_READ8_MEMBER( europc_pio_r ); @@ -27,9 +27,9 @@ public: DECLARE_READ8_MEMBER( europc_rtc_r ); DECLARE_WRITE8_MEMBER( europc_rtc_w ); - + TIMER_CALLBACK_MEMBER(europc_rtc_timer); - + DECLARE_DRIVER_INIT(europc); void europc_rtc_set_time(); diff --git a/src/mess/includes/gb.h b/src/mess/includes/gb.h index f1b1d604dd9..3656e23bea6 100644 --- a/src/mess/includes/gb.h +++ b/src/mess/includes/gb.h @@ -214,7 +214,7 @@ protected: required_memory_region m_region_maincpu; optional_memory_bank m_rambank; // cgb required_ioport m_inputs; - optional_device<ram_device> m_ram; + optional_device<ram_device> m_ram; void gb_timer_increment(); void gb_timer_check_irq(); diff --git a/src/mess/includes/gp32.h b/src/mess/includes/gp32.h index f84e685da49..ee0e0cf1195 100644 --- a/src/mess/includes/gp32.h +++ b/src/mess/includes/gp32.h @@ -229,7 +229,7 @@ protected: void iic_resume(); void s3c240x_machine_start(); void s3c240x_machine_reset(); - inline rgb_t s3c240x_get_color_5551( UINT16 data); + inline rgb_t s3c240x_get_color_5551( UINT16 data); UINT32 s3c240x_lcd_dma_read( ); void s3c240x_lcd_render_01( ); void s3c240x_lcd_render_02( ); diff --git a/src/mess/includes/hp48.h b/src/mess/includes/hp48.h index fe9e72b6d2d..fd09d04deb9 100644 --- a/src/mess/includes/hp48.h +++ b/src/mess/includes/hp48.h @@ -110,7 +110,7 @@ public: #define HP48_IO_8(x) (m_io[(x)] | (m_io[(x)+1] << 4)) #define HP48_IO_12(x) (m_io[(x)] | (m_io[(x)+1] << 4) | (m_io[(x)+2] << 8)) #define HP48_IO_20(x) (m_io[(x)] | (m_io[(x)+1] << 4) | (m_io[(x)+2] << 8) | \ - (m_io[(x)+3] << 12) | (m_io[(x)+4] << 16)) + (m_io[(x)+3] << 12) | (m_io[(x)+4] << 16)) /*----------- defined in machine/hp48.c -----------*/ diff --git a/src/mess/includes/kc.h b/src/mess/includes/kc.h index 7b4ce9eb3d5..9f90f5cfcf2 100644 --- a/src/mess/includes/kc.h +++ b/src/mess/includes/kc.h @@ -149,7 +149,7 @@ public: TIMER_CALLBACK_MEMBER(kc_cassette_oneshot_timer); TIMER_CALLBACK_MEMBER(kc_cassette_timer_callback); TIMER_DEVICE_CALLBACK_MEMBER(kc_scanline); - + DECLARE_QUICKLOAD_LOAD_MEMBER( kc ); }; diff --git a/src/mess/includes/lviv.h b/src/mess/includes/lviv.h index 7e792a6194c..fe72bb22e10 100644 --- a/src/mess/includes/lviv.h +++ b/src/mess/includes/lviv.h @@ -56,7 +56,7 @@ public: void lviv_setup_snapshot (UINT8 * data); void dump_registers(); int lviv_verify_snapshot (UINT8 * data, UINT32 size); - DECLARE_SNAPSHOT_LOAD_MEMBER( lviv ); + DECLARE_SNAPSHOT_LOAD_MEMBER( lviv ); }; diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h index 33a1d726f53..aad7792af8f 100644 --- a/src/mess/includes/mac.h +++ b/src/mess/includes/mac.h @@ -398,7 +398,7 @@ public: DECLARE_WRITE_LINE_MEMBER(cuda_reset_w); DECLARE_WRITE_LINE_MEMBER(adb_linechange_w); - + DECLARE_WRITE_LINE_MEMBER(mac_scsi_irq); DECLARE_DIRECT_UPDATE_MEMBER(overlay_opbaseoverride); diff --git a/src/mess/includes/nascom1.h b/src/mess/includes/nascom1.h index 18dfee41fe3..4f35b2cb3e1 100644 --- a/src/mess/includes/nascom1.h +++ b/src/mess/includes/nascom1.h @@ -63,7 +63,7 @@ public: DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nascom1_cassette ); required_device<cpu_device> m_maincpu; required_device<cassette_image_device> m_cassette; - required_device<ram_device> m_ram; + required_device<ram_device> m_ram; DECLARE_SNAPSHOT_LOAD_MEMBER( nascom1 ); }; diff --git a/src/mess/includes/nc.h b/src/mess/includes/nc.h index 0e63cf18d15..94ca1749fbd 100644 --- a/src/mess/includes/nc.h +++ b/src/mess/includes/nc.h @@ -110,7 +110,7 @@ public: required_device<ram_device> m_ram; required_device<beep_device> m_beeper1; required_device<beep_device> m_beeper2; - + void nc200_video_set_backlight(int state); void nc_card_save(device_image_interface &image); int nc_card_calculate_mask(int size); diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index d673c09b77e..102d96f7202 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -249,7 +249,7 @@ static SLOT_INTERFACE_START(nes_cart) SLOT_INTERFACE_INTERNAL("gs2004", NES_GS2004) SLOT_INTERFACE_INTERNAL("gs2013", NES_GS2013) SLOT_INTERFACE_INTERNAL("tf9in1", NES_TF9IN1) - SLOT_INTERFACE_INTERNAL("3dblock", NES_3DBLOCK) // NROM + IRQ? + SLOT_INTERFACE_INTERNAL("3dblock", NES_3DBLOCK) // NROM + IRQ? SLOT_INTERFACE_INTERNAL("racermate", NES_RACERMATE) // mapper 168 SLOT_INTERFACE_INTERNAL("agci_50282", NES_AGCI_50282) SLOT_INTERFACE_INTERNAL("dreamtech01", NES_DREAMTECH01) @@ -283,7 +283,7 @@ static SLOT_INTERFACE_START(nes_cart) SLOT_INTERFACE_INTERNAL("tobidase", NES_TOBIDASE) // mapper 120 SLOT_INTERFACE_INTERNAL("mmalee2", NES_MMALEE) // mapper 55? SLOT_INTERFACE_INTERNAL("unl_2708", NES_2708) // mapper 103 - SLOT_INTERFACE_INTERNAL("unl_lh32", NES_LH32) // used by Monty no Doki Doki Daidassou FDS conversion + SLOT_INTERFACE_INTERNAL("unl_lh32", NES_LH32) // used by Monty no Doki Doki Daidassou FDS conversion SLOT_INTERFACE_INTERNAL("unl_lh10", NES_LH10) // used in Fuuun Shaolin Kyo (FDS Conversion) SLOT_INTERFACE_INTERNAL("unl_ac08", NES_AC08) // used by Green Beret FDS conversion SLOT_INTERFACE_INTERNAL("unl_bb", NES_UNL_BB) // used by a few FDS conversions diff --git a/src/mess/includes/partner.h b/src/mess/includes/partner.h index 453ff22117b..a518f8bb013 100644 --- a/src/mess/includes/partner.h +++ b/src/mess/includes/partner.h @@ -34,7 +34,7 @@ public: void partner_window_2(UINT8 bank_num, UINT16 offset,UINT8 *rom); void partner_iomap_bank(UINT8 *rom); void partner_bank_switch(); - required_device<ram_device> m_ram; + required_device<ram_device> m_ram; }; diff --git a/src/mess/includes/pc.h b/src/mess/includes/pc.h index 36b9e111c23..b992d20cb80 100644 --- a/src/mess/includes/pc.h +++ b/src/mess/includes/pc.h @@ -166,14 +166,14 @@ public: int m_turbo_cur_val; double m_turbo_off_speed; double m_turbo_on_speed; - + // keyboard void init_pc_common(void (*set_keyb_int_func)(running_machine &, int)); TIMER_CALLBACK_MEMBER( pc_keyb_timer ); void pc_keyboard(); UINT8 pc_keyb_read(); void pc_keyb_set_clock(int on); - void pc_keyb_clear(); + void pc_keyb_clear(); void (*m_pc_keyb_int_cb)(running_machine &, int); emu_timer *m_pc_keyb_timer; UINT8 m_pc_keyb_data; diff --git a/src/mess/includes/pcw.h b/src/mess/includes/pcw.h index b64ade497fc..a1b449994ca 100644 --- a/src/mess/includes/pcw.h +++ b/src/mess/includes/pcw.h @@ -28,11 +28,11 @@ class pcw_state : public driver_device public: pcw_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_screen(*this, "screen"), - m_fdc(*this, "upd765"), - m_ram(*this, RAM_TAG), - m_beeper(*this, "beeper") + m_maincpu(*this, "maincpu"), + m_screen(*this, "screen"), + m_fdc(*this, "upd765"), + m_ram(*this, RAM_TAG), + m_beeper(*this, "beeper") { } int m_boot; @@ -122,7 +122,7 @@ public: required_device<upd765a_device> m_fdc; required_device<ram_device> m_ram; required_device<beep_device> m_beeper; - + inline void pcw_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); void pcw_update_interrupt_counter(); void pcw_update_irqs(); diff --git a/src/mess/includes/pet.h b/src/mess/includes/pet.h index 97f268f0c39..2881e73c6c2 100644 --- a/src/mess/includes/pet.h +++ b/src/mess/includes/pet.h @@ -128,9 +128,9 @@ public: DECLARE_WRITE_LINE_MEMBER( pia2_irqb_w ); TIMER_DEVICE_CALLBACK_MEMBER( sync_tick ); - + DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_pet ); - + enum { SEL0 = 0, diff --git a/src/mess/includes/plus4.h b/src/mess/includes/plus4.h index 92618223736..12f51fbf372 100644 --- a/src/mess/includes/plus4.h +++ b/src/mess/includes/plus4.h @@ -120,7 +120,7 @@ public: DECLARE_WRITE_LINE_MEMBER( acia_irq_w ); DECLARE_WRITE_LINE_MEMBER( exp_irq_w ); - + DECLARE_QUICKLOAD_LOAD_MEMBER( cbm_c16 ); enum diff --git a/src/mess/includes/tandy1t.h b/src/mess/includes/tandy1t.h index d0751786485..4b4d83b3d93 100644 --- a/src/mess/includes/tandy1t.h +++ b/src/mess/includes/tandy1t.h @@ -23,18 +23,18 @@ public: DECLARE_READ8_MEMBER( tandy1000_bank_r ); DECLARE_WRITE8_MEMBER( tandy1000_bank_w ); - int tandy1000_read_eeprom(); + int tandy1000_read_eeprom(); void tandy1000_write_eeprom(UINT8 data); void tandy1000_set_bios_bank(); - - DECLARE_MACHINE_RESET(tandy1000rl); - + + DECLARE_MACHINE_RESET(tandy1000rl); + struct { UINT8 low, high; - } m_eeprom_ee[0x40]; /* only 0 to 4 used in hx, addressing seems to allow this */ - -private: + } m_eeprom_ee[0x40]; /* only 0 to 4 used in hx, addressing seems to allow this */ + +private: int m_eeprom_state; int m_eeprom_clock; UINT8 m_eeprom_oper; diff --git a/src/mess/includes/tmc1800.h b/src/mess/includes/tmc1800.h index 52a768dbbaa..cf7550e7066 100644 --- a/src/mess/includes/tmc1800.h +++ b/src/mess/includes/tmc1800.h @@ -29,7 +29,7 @@ public: m_maincpu(*this, CDP1802_TAG), m_cassette(*this, "cassette"), m_rom(*this, CDP1802_TAG), - m_run(*this, "RUN"), + m_run(*this, "RUN"), m_ram(*this, RAM_TAG), m_beeper(*this, "beeper") { } diff --git a/src/mess/includes/trs80m2.h b/src/mess/includes/trs80m2.h index 615274c8d12..a27c0e25a41 100644 --- a/src/mess/includes/trs80m2.h +++ b/src/mess/includes/trs80m2.h @@ -127,7 +127,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); DECLARE_READ8_MEMBER(io_read_byte); - DECLARE_WRITE8_MEMBER(io_write_byte); + DECLARE_WRITE8_MEMBER(io_write_byte); }; class trs80m16_state : public trs80m2_state diff --git a/src/mess/includes/tvc.h b/src/mess/includes/tvc.h index 67ff580b283..2d6b324778f 100644 --- a/src/mess/includes/tvc.h +++ b/src/mess/includes/tvc.h @@ -116,7 +116,7 @@ public: DECLARE_READ8_MEMBER(tvc_expansion_r); DECLARE_READ8_MEMBER(tvc_exp_id_r); DECLARE_WRITE8_MEMBER(tvc_expint_ack_w); - + DECLARE_QUICKLOAD_LOAD_MEMBER( tvc64); tvcexp_slot_device * m_expansions[4]; diff --git a/src/mess/includes/vc4000.h b/src/mess/includes/vc4000.h index 40163a5f60d..c13ea301e06 100644 --- a/src/mess/includes/vc4000.h +++ b/src/mess/includes/vc4000.h @@ -90,7 +90,7 @@ public: #else m_joys(*this, "JOYS"), m_config(*this, "CONFIG") { } -#endif +#endif DECLARE_WRITE8_MEMBER(vc4000_sound_ctl); DECLARE_READ8_MEMBER(vc4000_key_r); diff --git a/src/mess/includes/vidbrain.h b/src/mess/includes/vidbrain.h index 3c5ee381e9e..358bd6e7fd0 100644 --- a/src/mess/includes/vidbrain.h +++ b/src/mess/includes/vidbrain.h @@ -97,7 +97,7 @@ public: DECLARE_WRITE_LINE_MEMBER( ext_int_w ); DECLARE_WRITE_LINE_MEMBER( hblank_w ); DECLARE_READ8_MEMBER(memory_read_byte); - + IRQ_CALLBACK_MEMBER(vidbrain_int_ack); diff --git a/src/mess/includes/x1.h b/src/mess/includes/x1.h index b1cdd0663bc..43cc3314fd3 100644 --- a/src/mess/includes/x1.h +++ b/src/mess/includes/x1.h @@ -223,7 +223,7 @@ public: int priority_mixer_pri(int color); void cmt_command( UINT8 cmd ); UINT16 jis_convert(int kanji_addr); - + DECLARE_READ8_MEMBER(memory_read_byte); DECLARE_WRITE8_MEMBER(memory_write_byte); DECLARE_READ8_MEMBER(io_read_byte); diff --git a/src/mess/includes/x68k.h b/src/mess/includes/x68k.h index 7e8b87bf6d7..eca1787935a 100644 --- a/src/mess/includes/x68k.h +++ b/src/mess/includes/x68k.h @@ -382,7 +382,7 @@ private: void x68k_draw_gfx_scanline(bitmap_ind16 &bitmap, rectangle cliprect, UINT8 priority); void x68k_draw_gfx(bitmap_ind16 &bitmap,rectangle cliprect); void x68k_draw_sprites(bitmap_ind16 &bitmap, int priority, rectangle cliprect); -public: +public: required_device<cpu_device> m_maincpu; required_device<okim6258_device> m_okim6258; required_device<ram_device> m_ram; diff --git a/src/mess/machine/apple2gs.c b/src/mess/machine/apple2gs.c index d0d86a6baf8..c0150a1ac3f 100644 --- a/src/mess/machine/apple2gs.c +++ b/src/mess/machine/apple2gs.c @@ -1793,7 +1793,7 @@ WRITE8_MEMBER( apple2gs_state::apple2gs_E104xx_w ) { apple2gs_Exxxxx_w(space, of WRITE8_MEMBER( apple2gs_state::apple2gs_E12xxx_w ) { apple2gs_Exxxxx_w(space, offset + 0x12000, data, mem_mask); } WRITE8_MEMBER( apple2gs_state::apple2gs_slowmem_w ) -{ +{ m_slowmem[offset] = data; if ((offset >= 0x19e00) && (offset < 0x19fff)) @@ -1810,7 +1810,7 @@ WRITE8_MEMBER( apple2gs_state::apple2gs_slowmem_w ) // Because the bank address multiplexes on the 65816 data bus, reading a memory area // which doesn't drive the bus results in reading back the bank number. READ8_MEMBER(apple2gs_state::apple2gs_bank_echo_r) -{ +{ return m_echo_bank + (offset>>16); } diff --git a/src/mess/machine/bebox.c b/src/mess/machine/bebox.c index f472a09d845..9551ec5ab84 100644 --- a/src/mess/machine/bebox.c +++ b/src/mess/machine/bebox.c @@ -1016,7 +1016,7 @@ DRIVER_INIT_MEMBER(bebox_state,bebox) space_0.install_readwrite_bank(0, m_ram->size() - 1, 0, 0x02000000, "bank3"); space_1.install_readwrite_bank(0, m_ram->size() - 1, 0, 0x02000000, "bank3"); membank("bank3")->set_base(m_ram->pointer()); - + /* The following is a verrrry ugly hack put in to support NetBSD for * NetBSD. When NetBSD/bebox it does most of its work on CPU #0 and then * lets CPU #1 go. However, it seems that CPU #1 jumps into never-never diff --git a/src/mess/machine/cgenie.c b/src/mess/machine/cgenie.c index 89995f1a9e9..893be029851 100644 --- a/src/mess/machine/cgenie.c +++ b/src/mess/machine/cgenie.c @@ -171,7 +171,7 @@ void cgenie_state::machine_start() #define FF_BGD (FF_BGD0 | FF_BGD1 | FF_BGD2) WRITE8_MEMBER( cgenie_state::cgenie_port_ff_w ) -{ +{ int port_ff_changed = m_port_ff ^ data; m_cassette->output(data & 0x01 ? -1.0 : 1.0 ); @@ -243,7 +243,7 @@ WRITE8_MEMBER( cgenie_state::cgenie_port_ff_w ) READ8_MEMBER( cgenie_state::cgenie_port_ff_r ) -{ +{ UINT8 data = m_port_ff & ~0x01; data |= m_cass_bit; @@ -264,12 +264,12 @@ int cgenie_state::cgenie_port_xx_r( int offset ) READ8_MEMBER( cgenie_state::cgenie_psg_port_a_r ) -{ +{ return m_psg_a_inp; } READ8_MEMBER( cgenie_state::cgenie_psg_port_b_r ) -{ +{ if( m_psg_a_out < 0xd0 ) { /* comparator value */ @@ -314,7 +314,7 @@ READ8_MEMBER( cgenie_state::cgenie_psg_port_b_r ) } WRITE8_MEMBER( cgenie_state::cgenie_psg_port_a_w ) -{ +{ m_psg_a_out = data; } @@ -396,7 +396,7 @@ WRITE8_MEMBER( cgenie_state::cgenie_data_w ) } READ8_MEMBER( cgenie_state::cgenie_irq_status_r ) -{ +{ int result = m_irq_status; m_irq_status &= ~(IRQ_TIMER | IRQ_FDC); @@ -441,7 +441,7 @@ const wd17xx_interface cgenie_wd17xx_interface = }; WRITE8_MEMBER( cgenie_state::cgenie_motor_w ) -{ +{ device_t *fdc = machine().device("wd179x"); UINT8 drive = 255; @@ -514,7 +514,7 @@ int cgenie_state::cgenie_videoram_r( int offset ) } WRITE8_MEMBER( cgenie_state::cgenie_videoram_w ) -{ +{ UINT8 *videoram = m_videoram; /* write to video RAM */ if( data == videoram[offset] ) @@ -528,7 +528,7 @@ READ8_MEMBER( cgenie_state::cgenie_colorram_r ) } WRITE8_MEMBER( cgenie_state::cgenie_colorram_w ) -{ +{ /* only bits 0 to 3 */ data &= 15; /* nothing changed ? */ @@ -542,12 +542,12 @@ WRITE8_MEMBER( cgenie_state::cgenie_colorram_w ) } READ8_MEMBER( cgenie_state::cgenie_fontram_r ) -{ +{ return m_fontram[offset]; } WRITE8_MEMBER( cgenie_state::cgenie_fontram_w ) -{ +{ UINT8 *dp; if( data == m_fontram[offset] ) diff --git a/src/mess/machine/dragon.c b/src/mess/machine/dragon.c index c8ccf4bfa9d..2c2c900dd81 100644 --- a/src/mess/machine/dragon.c +++ b/src/mess/machine/dragon.c @@ -146,6 +146,6 @@ void dragon64_state::page_rom(bool romswitch) offs_t offset = romswitch ? 0x0000 // This is the 32k mode basic(64)/boot rom(alpha) : 0x8000; // This is the 64k mode basic(64)/basic rom(alpha) - m_sam->set_bank_offset(1, offset); // 0x8000-0x9FFF - m_sam->set_bank_offset(2, offset); // 0xA000-0xBFFF + m_sam->set_bank_offset(1, offset); // 0x8000-0x9FFF + m_sam->set_bank_offset(2, offset); // 0xA000-0xBFFF } diff --git a/src/mess/machine/europc.c b/src/mess/machine/europc.c index 7fed6adae0c..17ccc741cd4 100644 --- a/src/mess/machine/europc.c +++ b/src/mess/machine/europc.c @@ -212,12 +212,12 @@ READ8_MEMBER( europc_pc_state::europc_pio_r ) reg 9: reg a: reg b: 0x10 written - bit 0,1: 0 video startup mode: 0=specialadapter, 1=color40, 2=color80, 3=monochrom - bit 2: internal video on - bit 4: color - bit 6,7: clock + bit 0,1: 0 video startup mode: 0=specialadapter, 1=color40, 2=color80, 3=monochrom + bit 2: internal video on + bit 4: color + bit 6,7: clock reg c: - bit 0,1: language/country + bit 0,1: language/country reg d: xor checksum reg e: reg 0f: 01 status ok, when not 01 written diff --git a/src/mess/machine/galaxy.c b/src/mess/machine/galaxy.c index faf840d1a4b..7df71e318ab 100644 --- a/src/mess/machine/galaxy.c +++ b/src/mess/machine/galaxy.c @@ -62,7 +62,6 @@ IRQ_CALLBACK_MEMBER(galaxy_state::galaxy_irq_callback) void galaxy_state::galaxy_setup_snapshot (const UINT8 * data, UINT32 size) { - switch (size) { case GALAXY_SNAPSHOT_V1_SIZE: diff --git a/src/mess/machine/isa_ide8.c b/src/mess/machine/isa_ide8.c index 3cb53b9cab3..e56cc00fa2d 100644 --- a/src/mess/machine/isa_ide8.c +++ b/src/mess/machine/isa_ide8.c @@ -4,44 +4,44 @@ As implemented by the Vintage computer forums XT-IDE controller. -Card has jumpers for I/O base address, and ROM base address, for the time +Card has jumpers for I/O base address, and ROM base address, for the time being we'll emulate an I/O base of 0x300 and a ROM base of 0xC8000. -If the I/O address is changed then the ROM will need to be patched. +If the I/O address is changed then the ROM will need to be patched. The opensource bios is available from : http://code.google.com/p/xtideuniversalbios/ The data high register is connected to a pair of latches that have the MSB of -the 16 bit data word latched into so that 16 bit IO may be performmed, this +the 16 bit data word latched into so that 16 bit IO may be performmed, this involves the following : A Data read will read the data register first, and obtain the bottom 8 bits -of the data word, the top 8 bits will be latched at the same time these are +of the data word, the top 8 bits will be latched at the same time these are then read from the latch to the processor. -A data write will first write the top 8 bits to the latch, and then the bottom -8 bits to the normal data register, this will also transfer the top 8 bits to +A data write will first write the top 8 bits to the latch, and then the bottom +8 bits to the normal data register, this will also transfer the top 8 bits to the drive. -IDE Register XTIDE rev 1 rev 2 or modded rev 1 -Data (XTIDE Data Low) 0 0 -Error (in), Features (out) 1 8 -Sector Count 2 2 -Sector Number, -LBA bits 0...7, -LBA48 bits 24...31 3 10 -Low Cylinder, -LBA bits 8...15, -LBA48 bits 32...39 4 4 -High Cylinder, -LBA bits 16...23, -LBA48 bits 40...47 5 12 +IDE Register XTIDE rev 1 rev 2 or modded rev 1 +Data (XTIDE Data Low) 0 0 +Error (in), Features (out) 1 8 +Sector Count 2 2 +Sector Number, +LBA bits 0...7, +LBA48 bits 24...31 3 10 +Low Cylinder, +LBA bits 8...15, +LBA48 bits 32...39 4 4 +High Cylinder, +LBA bits 16...23, +LBA48 bits 40...47 5 12 Drive and Head Select, -LBA28 bits 24...27 6 6 -Status (in), Command (out) 7 14 -XTIDE Data High 8 1 -Alternative Status (in), -Device Control (out) 14 7 +LBA28 bits 24...27 6 6 +Status (in), Command (out) 7 14 +XTIDE Data High 8 1 +Alternative Status (in), +Device Control (out) 14 7 ***************************************************************************/ @@ -55,10 +55,10 @@ Device Control (out) 14 7 static READ8_DEVICE_HANDLER( ide8_r ) { - ide_controller_device *ide = (ide_controller_device *) device; - isa8_ide_device *ide8_d = downcast<isa8_ide_device *>(device->owner()); - UINT8 result = 0; - + ide_controller_device *ide = (ide_controller_device *) device; + isa8_ide_device *ide8_d = downcast<isa8_ide_device *>(device->owner()); + UINT8 result = 0; + if(offset == 0) { // Data register transfer low byte and latch high @@ -72,17 +72,17 @@ static READ8_DEVICE_HANDLER( ide8_r ) else if(offset == 14) result=ide->ide_controller_read(1, (offset & 0x07), 1); -// logerror("%s ide8_r: offset=%d, result=%2X\n",device->machine().describe_context(),offset,result); +// logerror("%s ide8_r: offset=%d, result=%2X\n",device->machine().describe_context(),offset,result); return result; } static WRITE8_DEVICE_HANDLER( ide8_w ) { - ide_controller_device *ide = (ide_controller_device *) device; - isa8_ide_device *ide8_d = downcast<isa8_ide_device *>(device->owner()); - -// logerror("%s ide8_w: offset=%d, data=%2X\n",device->machine().describe_context(),offset,data); + ide_controller_device *ide = (ide_controller_device *) device; + isa8_ide_device *ide8_d = downcast<isa8_ide_device *>(device->owner()); + +// logerror("%s ide8_w: offset=%d, data=%2X\n",device->machine().describe_context(),offset,data); if(offset == 0) { @@ -168,7 +168,7 @@ INPUT_PORTS_END ROM_START( ide8 ) ROM_REGION(0x04000,"ide8", 0) // XT-IDE universal bios from : http://code.google.com/p/xtideuniversalbios/ - ROM_LOAD("ide_xtl.bin", 0x00000, 0x03800, CRC(68801d16) SHA1(f3f5bed385d00ac444d85f492c879aa68a864160)) + ROM_LOAD("ide_xtl.bin", 0x00000, 0x03800, CRC(68801d16) SHA1(f3f5bed385d00ac444d85f492c879aa68a864160)) ROM_END //************************************************************************** @@ -234,10 +234,10 @@ void isa8_ide_device::device_start() void isa8_ide_device::device_reset() { - int base_address = ((ioport("BIOS_BASE")->read() & 0x0F) * 16 * 1024) + 0xC0000; - int io_address = ((ioport("IO_ADDRESS")->read() & 0x0F) * 0x20) + 0x200; - irq = (ioport("IRQ")->read() & 0x07); - + int base_address = ((ioport("BIOS_BASE")->read() & 0x0F) * 16 * 1024) + 0xC0000; + int io_address = ((ioport("IO_ADDRESS")->read() & 0x0F) * 0x20) + 0x200; + irq = (ioport("IRQ")->read() & 0x07); + m_isa->install_rom(this, base_address, base_address + (16*1024) -1 , 0, 0, "ide8", "ide8"); m_isa->install_device(subdevice("ide"), io_address, io_address+15, 0, 0, FUNC(ide8_r), FUNC(ide8_w) ); diff --git a/src/mess/machine/isa_ide8.h b/src/mess/machine/isa_ide8.h index c22d33e4537..67062024fc5 100644 --- a/src/mess/machine/isa_ide8.h +++ b/src/mess/machine/isa_ide8.h @@ -31,7 +31,7 @@ public: void set_latch_in(UINT8 new_latch) { data_high_in=new_latch; } UINT8 get_latch_out() { return data_high_out; } void set_latch_out(UINT8 new_latch) { data_high_out=new_latch; } - + protected: // device-level overrides @@ -41,11 +41,11 @@ protected: private: // internal state -// bool m_is_primary; - +// bool m_is_primary; + // Interupt request - UINT8 irq; - + UINT8 irq; + // Data latch for high byte in and out UINT8 data_high_in; UINT8 data_high_out; diff --git a/src/mess/machine/mac.c b/src/mess/machine/mac.c index dca53b8110b..09a0ee71199 100644 --- a/src/mess/machine/mac.c +++ b/src/mess/machine/mac.c @@ -707,7 +707,6 @@ TIMER_CALLBACK_MEMBER(mac_state::kbd_clock) void mac_state::kbd_shift_out(int data) { - if (m_kbd_comm == TRUE) { m_kbd_shift_reg = data; @@ -746,7 +745,6 @@ TIMER_CALLBACK_MEMBER(mac_state::inquiry_timeout_func) */ void mac_state::keyboard_receive(int val) { - switch (val) { case 0x10: @@ -2025,7 +2023,6 @@ READ32_MEMBER(mac_state::mac_read_id) void mac_state::mac_driver_init(model_t model) { - m_overlay = 1; m_scsi_interrupt = 0; m_model = model; diff --git a/src/mess/machine/md_rom.c b/src/mess/machine/md_rom.c index 742c50f6c2f..4df8b83e3ff 100644 --- a/src/mess/machine/md_rom.c +++ b/src/mess/machine/md_rom.c @@ -619,7 +619,7 @@ READ16_MEMBER(md_rom_chinf3_device::read) } return 0; } - + // non-protection accesses if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; diff --git a/src/mess/machine/nes_ave.c b/src/mess/machine/nes_ave.c index 170a1a03938..90784e1cbe0 100644 --- a/src/mess/machine/nes_ave.c +++ b/src/mess/machine/nes_ave.c @@ -115,11 +115,11 @@ void nes_maxi15_device::pcb_reset() iNES: mapper 34 - Notice that in this board the bankswitch regs + Notice that in this board the bankswitch regs overlaps WRAM, so that writes to the regs are then readable back in WRAM (WRAM is tested by Impossible Mission II at start) - + In MESS: Supported. -------------------------------------------------*/ @@ -127,7 +127,7 @@ void nes_maxi15_device::pcb_reset() WRITE8_MEMBER(nes_nina001_device::write_m) { LOG_MMC(("nina-001 write_m, offset: %04x, data: %02x\n", offset, data)); - + switch (offset) { case 0x1ffd: diff --git a/src/mess/machine/nes_bandai.c b/src/mess/machine/nes_bandai.c index 92ad8e81a4e..d47f45a552d 100644 --- a/src/mess/machine/nes_bandai.c +++ b/src/mess/machine/nes_bandai.c @@ -146,7 +146,7 @@ void nes_lz93d50_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); } @@ -167,7 +167,7 @@ void nes_lz93d50_24c01_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); save_item(NAME(m_i2c_mem)); @@ -192,7 +192,7 @@ void nes_fjump2_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_reg)); } @@ -256,14 +256,14 @@ WRITE8_MEMBER(nes_oekakids_device::nt_w) update_chr(); } #endif - + m_nt_access[page][offset & 0x3ff] = data; } READ8_MEMBER(nes_oekakids_device::nt_r) { int page = ((offset & 0xc00) >> 10); - + #if 0 if (offset < 0x1000 && (m_latch != (offset & 0x300) >> 8)) { @@ -271,12 +271,12 @@ READ8_MEMBER(nes_oekakids_device::nt_r) update_chr(); } #endif - + return m_nt_access[page][offset & 0x3ff]; } void nes_oekakids_device::update_chr() -{ +{ chr4_0(m_reg | m_latch, CHRRAM); chr4_4(m_reg | 0x03, CHRRAM); } @@ -332,13 +332,13 @@ void nes_lz93d50_device::device_timer(emu_timer &timer, device_timer_id id, int if (m_irq_enable) { // 16bit counter, IRQ fired when the counter goes from 1 to 0 - // after firing, the counter is *not* reloaded, but next clock - // counter wraps around from 0 to 0xffff + // after firing, the counter is *not* reloaded, but next clock + // counter wraps around from 0 to 0xffff if (!m_irq_count) m_irq_count = 0xffff; else m_irq_count--; - + if (!m_irq_count) { machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); @@ -487,14 +487,14 @@ void nes_fjump2_device::set_prg() prg16_cdef(prg_base | 0x0f); } -READ8_MEMBER(nes_fjump2_device::read_m) -{ +READ8_MEMBER(nes_fjump2_device::read_m) +{ LOG_MMC(("fjump2 read_m, offset: %04x\n", offset)); return m_battery[offset & (m_battery_size - 1)]; } -WRITE8_MEMBER(nes_fjump2_device::write_m) -{ +WRITE8_MEMBER(nes_fjump2_device::write_m) +{ LOG_MMC(("fjump2 write_m, offset: %04x, data: %02x\n", offset, data)); m_battery[offset & (m_battery_size - 1)] = data; } diff --git a/src/mess/machine/nes_bandai.h b/src/mess/machine/nes_bandai.h index 73c9bf96f03..4c596843815 100644 --- a/src/mess/machine/nes_bandai.h +++ b/src/mess/machine/nes_bandai.h @@ -69,7 +69,7 @@ public: protected: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; diff --git a/src/mess/machine/nes_bootleg.c b/src/mess/machine/nes_bootleg.c index 4cb89629923..aeb51c9167e 100644 --- a/src/mess/machine/nes_bootleg.c +++ b/src/mess/machine/nes_bootleg.c @@ -238,7 +238,7 @@ void nes_smb3p_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); } @@ -292,7 +292,7 @@ void nes_smb2j_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); } @@ -305,7 +305,7 @@ void nes_smb2j_device::pcb_reset() prg8_ab(0); prg8_cd(0); prg8_ef(9); - + m_irq_enable = 0; m_irq_count = 0; } @@ -315,7 +315,7 @@ void nes_smb2ja_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); } @@ -338,7 +338,7 @@ void nes_smb2jb_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); } @@ -903,7 +903,7 @@ READ8_MEMBER(nes_whirl2706_device::read_m) Games: Super Mario Bros. 2 Pirate (LF36) iNES: mapper 43 - + In MESS: Supported. -------------------------------------------------*/ @@ -930,33 +930,33 @@ WRITE8_MEMBER(nes_smb2j_device::write_l) { LOG_MMC(("smb2j write_l, offset: %04x, data: %02x\n", offset, data)); offset += 0x100; - - if (offset == 0x122) // $4122 - m_irq_enable = data & 3; // maybe also m_irq_count = 0?!? + + if (offset == 0x122) // $4122 + m_irq_enable = data & 3; // maybe also m_irq_count = 0?!? } WRITE8_MEMBER(nes_smb2j_device::write_h) { LOG_MMC(("smb2j write_h, offset: %04x, data: %02x\n", offset, data)); - - if (offset == 0x122) // $8122 too? + + if (offset == 0x122) // $8122 too? m_irq_enable = data & 3; } WRITE8_MEMBER(nes_smb2j_device::write_ex) { LOG_MMC(("smb2j write_ex, offset: %04x, data: %02x\n", offset, data)); - + if (offset == 2) { int temp = 0; - + // According to hardware tests if (data & 1) temp = 3; else temp = 4 + ((data & 7) >> 1); - + prg8_cd(temp); } } @@ -965,11 +965,11 @@ READ8_MEMBER(nes_smb2j_device::read_l) { LOG_MMC(("smb2j read_l, offset: %04x\n", offset)); offset += 0x100; - + if (offset >= 0x1000) return m_prg[0x10000 + (offset & 0x0fff)]; - - return ((offset + 0x4000) & 0xff00) >> 8; // open bus + + return ((offset + 0x4000) & 0xff00) >> 8; // open bus } READ8_MEMBER(nes_smb2j_device::read_m) @@ -1105,25 +1105,25 @@ WRITE8_MEMBER(nes_smb2jb_device::write_ex) } /*------------------------------------------------- - + (UNL-)09-034A - + Games: Zanac FDS conversion with two PRG chips and - no CHRROM and Volleyball FDS conversion with two PRG + no CHRROM and Volleyball FDS conversion with two PRG chips and CHRROM. Originally dumps were marked as UNL-SMB2J pcb - - iNES: - + + iNES: + In MESS: Supported. - + -------------------------------------------------*/ WRITE8_MEMBER(nes_09034a_device::write_ex) { LOG_MMC(("09-034a write_ex, offset: %04x, data: %02x\n", offset, data)); - - if (offset == 7) // $4027 + + if (offset == 7) // $4027 m_reg = data & 1; } diff --git a/src/mess/machine/nes_bootleg.h b/src/mess/machine/nes_bootleg.h index 72876f4fdcd..6f7311b8c70 100644 --- a/src/mess/machine/nes_bootleg.h +++ b/src/mess/machine/nes_bootleg.h @@ -110,7 +110,7 @@ public: private: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -163,7 +163,7 @@ class nes_smb2j_device : public nes_nrom_device public: // construction/destruction nes_smb2j_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); @@ -172,13 +172,13 @@ public: virtual DECLARE_WRITE8_MEMBER(write_ex); virtual DECLARE_WRITE8_MEMBER(write_l); virtual DECLARE_WRITE8_MEMBER(write_h); - + virtual void pcb_reset(); - + private: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -203,7 +203,7 @@ public: private: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -229,7 +229,7 @@ public: private: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -242,14 +242,14 @@ class nes_09034a_device : public nes_nrom_device public: // construction/destruction nes_09034a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual DECLARE_WRITE8_MEMBER(write_ex); virtual DECLARE_READ8_MEMBER(read_m); - + virtual void pcb_reset(); - + private: UINT8 m_reg; }; diff --git a/src/mess/machine/nes_camerica.c b/src/mess/machine/nes_camerica.c index 1e7b7af7c07..cb5bc520c16 100644 --- a/src/mess/machine/nes_camerica.c +++ b/src/mess/machine/nes_camerica.c @@ -15,7 +15,7 @@ TODO: - - check what causes flickering from PPU in Fire Hawk, Poogie and Big Nose (same PPU issue as Back to + - check what causes flickering from PPU in Fire Hawk, Poogie and Big Nose (same PPU issue as Back to Future 2&3?) - not all the Golden Five games work. investigate! diff --git a/src/mess/machine/nes_cony.c b/src/mess/machine/nes_cony.c index 40977783b4a..38bfa73ef5e 100644 --- a/src/mess/machine/nes_cony.c +++ b/src/mess/machine/nes_cony.c @@ -13,7 +13,7 @@ * UNL-YOKO TODO: fix glitches and emulate properly the variants - + ***********************************************************************************************************/ @@ -63,7 +63,7 @@ void nes_cony_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); @@ -99,7 +99,7 @@ void nes_yoko_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); diff --git a/src/mess/machine/nes_cony.h b/src/mess/machine/nes_cony.h index b733b09f1d5..1737f610a86 100644 --- a/src/mess/machine/nes_cony.h +++ b/src/mess/machine/nes_cony.h @@ -28,10 +28,10 @@ protected: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; - + UINT8 m_latch1, m_latch2; UINT8 m_low_reg[4]; UINT8 m_reg[10]; diff --git a/src/mess/machine/nes_discrete.c b/src/mess/machine/nes_discrete.c index fe4cab27de5..704e647b8df 100644 --- a/src/mess/machine/nes_discrete.c +++ b/src/mess/machine/nes_discrete.c @@ -7,15 +7,15 @@ Visit http://mamedev.org for licensing and usage restrictions. Here we emulate the following PCBs - + * PCB with IC 74x161x161x32 [mapper 70 & 152] - * PCB with IC 74x139x74 [mapper 87] + * PCB with IC 74x139x74 [mapper 87] * PCB with IC 74x377 [mapper 11] * PCB with IC 74x161x138 [mapper 38] - + TODO: - Investigating missing inputs in Crime Busters - + ***********************************************************************************************************/ diff --git a/src/mess/machine/nes_irem.c b/src/mess/machine/nes_irem.c index cf76583ebad..d00d0bd97b2 100644 --- a/src/mess/machine/nes_irem.c +++ b/src/mess/machine/nes_irem.c @@ -132,7 +132,7 @@ void nes_h3001_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); save_item(NAME(m_irq_count_latch)); @@ -162,9 +162,9 @@ void nes_h3001_device::pcb_reset() Games: Napoleon Senki iNES: mapper 77 - + This board should use 2KB of CHRRAM as NTRAM, instead - of using directly 4-screen mirroring, but for the + of using directly 4-screen mirroring, but for the moment we cheat in this way... -------------------------------------------------*/ @@ -185,7 +185,7 @@ WRITE8_MEMBER(nes_lrog017_device::write_h) Irem Holy Diver board emulation iNES: mapper 78 (shared with JF-16) - + -------------------------------------------------*/ WRITE8_MEMBER(nes_holydivr_device::write_h) @@ -284,7 +284,7 @@ void nes_h3001_device::device_timer(emu_timer &timer, device_timer_id id, int pa // after firing, the counter is *not* reloaded and does not wrap if (m_irq_count > 0) m_irq_count--; - + if (!m_irq_count) { machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); diff --git a/src/mess/machine/nes_irem.h b/src/mess/machine/nes_irem.h index dde443d8015..0380448092d 100644 --- a/src/mess/machine/nes_irem.h +++ b/src/mess/machine/nes_irem.h @@ -89,7 +89,7 @@ public: protected: UINT16 m_irq_count, m_irq_count_latch; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; diff --git a/src/mess/machine/nes_jaleco.c b/src/mess/machine/nes_jaleco.c index 1b333afaee2..86b5a21ae55 100644 --- a/src/mess/machine/nes_jaleco.c +++ b/src/mess/machine/nes_jaleco.c @@ -210,7 +210,7 @@ void nes_ss88006_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_mmc_prg_bank)); save_item(NAME(m_mmc_vrom_bank)); save_item(NAME(m_irq_enable)); @@ -430,7 +430,7 @@ void nes_ss88006_device::device_timer(emu_timer &timer, device_timer_id id, int { if (m_irq_enable) { - if (m_irq_mode & 0x08) // 4bits counter + if (m_irq_mode & 0x08) // 4bits counter { if (!(m_irq_count & 0x000f)) { @@ -440,7 +440,7 @@ void nes_ss88006_device::device_timer(emu_timer &timer, device_timer_id id, int else m_irq_count = (m_irq_count & 0xfff0) | ((m_irq_count & 0x000f) - 1); } - else if (m_irq_mode & 0x04) // 8bits counter + else if (m_irq_mode & 0x04) // 8bits counter { if (!(m_irq_count & 0x00ff)) { @@ -450,7 +450,7 @@ void nes_ss88006_device::device_timer(emu_timer &timer, device_timer_id id, int else m_irq_count = (m_irq_count & 0xff00) | ((m_irq_count & 0x00ff) - 1); } - else if (m_irq_mode & 0x02) // 12bits counter + else if (m_irq_mode & 0x02) // 12bits counter { if (!(m_irq_count & 0x0fff)) { @@ -460,7 +460,7 @@ void nes_ss88006_device::device_timer(emu_timer &timer, device_timer_id id, int else m_irq_count = (m_irq_count & 0xf000) | ((m_irq_count & 0x0fff) - 1); } - else // 16bits counter + else // 16bits counter { if (!m_irq_count) { diff --git a/src/mess/machine/nes_jaleco.h b/src/mess/machine/nes_jaleco.h index fd9971d324f..b621c38c2f8 100644 --- a/src/mess/machine/nes_jaleco.h +++ b/src/mess/machine/nes_jaleco.h @@ -147,10 +147,10 @@ protected: UINT16 m_irq_count, m_irq_count_latch; UINT8 m_irq_mode; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; - + UINT8 m_mmc_prg_bank[3]; UINT8 m_mmc_vrom_bank[8]; diff --git a/src/mess/machine/nes_kaiser.c b/src/mess/machine/nes_kaiser.c index d1309c120ac..9194a5147a3 100644 --- a/src/mess/machine/nes_kaiser.c +++ b/src/mess/machine/nes_kaiser.c @@ -19,12 +19,12 @@ The Kaiser KS7057 bootleg board is emulated in nes_mmc3_clones.c - + TODO: - - FCEUmm lists more Kaiser PCBs: - * KS7030 (for Yume Koujou Doki Doki Panic by Kaiser?) + - FCEUmm lists more Kaiser PCBs: + * KS7030 (for Yume Koujou Doki Doki Panic by Kaiser?) * KS7031 (for Dracula II?) - * KS7037 + * KS7037 but there seem to be no available dumps... ***********************************************************************************************************/ @@ -134,7 +134,7 @@ void nes_ks7032_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_latch)); save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); @@ -160,7 +160,7 @@ void nes_ks7017_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_latch)); save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); diff --git a/src/mess/machine/nes_kaiser.h b/src/mess/machine/nes_kaiser.h index 6df5cc27a8e..ea42f3d5a58 100644 --- a/src/mess/machine/nes_kaiser.h +++ b/src/mess/machine/nes_kaiser.h @@ -66,7 +66,7 @@ protected: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -109,7 +109,7 @@ private: UINT16 m_irq_count; UINT8 m_irq_status; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; diff --git a/src/mess/machine/nes_konami.c b/src/mess/machine/nes_konami.c index 2b528600705..af98dcdb5b5 100644 --- a/src/mess/machine/nes_konami.c +++ b/src/mess/machine/nes_konami.c @@ -158,7 +158,7 @@ void nes_konami_vrc4_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_mode)); save_item(NAME(m_irq_prescale)); save_item(NAME(m_irq_enable)); @@ -201,7 +201,7 @@ void nes_konami_vrc7_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_mode)); save_item(NAME(m_irq_prescale)); save_item(NAME(m_irq_enable)); @@ -367,7 +367,7 @@ void nes_konami_vrc3_device::device_timer(emu_timer &timer, device_timer_id id, { if (m_irq_enable) { - if (m_irq_mode) // 8bits mode + if (m_irq_mode) // 8bits mode { if ((m_irq_count & 0x00ff) == 0xff) { @@ -377,7 +377,7 @@ void nes_konami_vrc3_device::device_timer(emu_timer &timer, device_timer_id id, else m_irq_count = (m_irq_count & 0xff00) | ((m_irq_count & 0x00ff) + 1); } - else // 16bits mode + else // 16bits mode { if (m_irq_count == 0xffff) { @@ -455,11 +455,11 @@ void nes_konami_vrc4_device::device_timer(emu_timer &timer, device_timer_id id, { if (m_irq_enable) { - if (m_irq_mode) // cycle mode + if (m_irq_mode) // cycle mode irq_tick(); - else // scanline mode + else // scanline mode { - // A prescaler divides the passing CPU cycles by 114, 114, then 113 (and repeats that order). + // A prescaler divides the passing CPU cycles by 114, 114, then 113 (and repeats that order). // This approximates 113+2/3 CPU cycles, which is one NTSC scanline. // Since this is a CPU-based IRQ, though, it is triggered also during non visible scanlines... if (m_irq_prescale < 3) @@ -584,10 +584,10 @@ WRITE8_MEMBER(nes_konami_vrc6_device::write_h) case 0x4000: prg8_cd(data); break; - case 0x1000: // pulse 1 & global control + case 0x1000: // pulse 1 & global control m_vrc6snd->write(space, add_lines>>8, data); break; - case 0x2000: // pulse 2 + case 0x2000: // pulse 2 m_vrc6snd->write(space, (add_lines>>8) | 0x100, data); break; case 0x3000: @@ -601,7 +601,7 @@ WRITE8_MEMBER(nes_konami_vrc6_device::write_h) case 0x0c: set_nt_mirroring(PPU_MIRROR_HIGH); break; } } - else // saw + else // saw { m_vrc6snd->write(space, (add_lines>>8) | 0x200, data); } diff --git a/src/mess/machine/nes_konami.h b/src/mess/machine/nes_konami.h index 4ffee71959c..a0f3dd59afa 100644 --- a/src/mess/machine/nes_konami.h +++ b/src/mess/machine/nes_konami.h @@ -65,7 +65,7 @@ private: UINT16 m_irq_count, m_irq_count_latch; int m_irq_enable, m_irq_enable_latch; int m_irq_mode; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -95,9 +95,9 @@ protected: void irq_tick(); UINT16 m_irq_count, m_irq_count_latch; int m_irq_enable, m_irq_enable_latch; - int m_irq_mode; + int m_irq_mode; int m_irq_prescale; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; diff --git a/src/mess/machine/nes_legacy.h b/src/mess/machine/nes_legacy.h index d1265e8a26a..b4f18943a6d 100644 --- a/src/mess/machine/nes_legacy.h +++ b/src/mess/machine/nes_legacy.h @@ -42,10 +42,10 @@ public: protected: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; - + UINT8 m_latch; UINT8 *m_exram; int m_exram_enabled; diff --git a/src/mess/machine/nes_mmc1.c b/src/mess/machine/nes_mmc1.c index 3f64dc8da69..4d6ddd2914c 100644 --- a/src/mess/machine/nes_mmc1.c +++ b/src/mess/machine/nes_mmc1.c @@ -10,10 +10,10 @@ Here we emulate the Nintendo SxROM / MMC-1 PCBs + older variants without WRAM protect bit Known issues on specific mappers: - - * 001 Yoshi flashes in-game. + + * 001 Yoshi flashes in-game. * 001 Back to the Future have heavily corrupted graphics (since forever). - + ***********************************************************************************************************/ diff --git a/src/mess/machine/nes_mmc3.c b/src/mess/machine/nes_mmc3.c index b5bb7b66ec8..6205f7c01b1 100644 --- a/src/mess/machine/nes_mmc3.c +++ b/src/mess/machine/nes_mmc3.c @@ -18,11 +18,11 @@ Known issues on specific mappers: - + * 004 Mendel Palace has never worked properly * 004 Ninja Gaiden 2 has flashing bg graphics in the second level * 119 Pin Bot has glitches when the ball is in the upper half of the screen - + ***********************************************************************************************************/ diff --git a/src/mess/machine/nes_namcot.c b/src/mess/machine/nes_namcot.c index 0c037ce7c5f..5931d6b87b8 100644 --- a/src/mess/machine/nes_namcot.c +++ b/src/mess/machine/nes_namcot.c @@ -147,7 +147,7 @@ void nes_namcot340_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); @@ -175,7 +175,7 @@ void nes_namcot175_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); save_item(NAME(m_wram_enable)); @@ -205,7 +205,7 @@ void nes_namcot163_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_count)); save_item(NAME(m_wram_protect)); @@ -408,7 +408,7 @@ void nes_namcot340_device::device_timer(emu_timer &timer, device_timer_id id, in { if (m_irq_enable) { - if (m_irq_count == 0x7fff) // counter does not wrap to 0! + if (m_irq_count == 0x7fff) // counter does not wrap to 0! machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE); else m_irq_count++; diff --git a/src/mess/machine/nes_namcot.h b/src/mess/machine/nes_namcot.h index cbe788322f4..fb75d59086a 100644 --- a/src/mess/machine/nes_namcot.h +++ b/src/mess/machine/nes_namcot.h @@ -88,10 +88,10 @@ public: protected: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; - + // Namcot-163 chip contains 8K of internal ram, possibly battery backed up (not emulated yet) // was it also present in 175 & 340 chips? UINT8 *m_n163_ram; diff --git a/src/mess/machine/nes_nxrom.c b/src/mess/machine/nes_nxrom.c index 78ceee67022..c3012cb4e98 100644 --- a/src/mess/machine/nes_nxrom.c +++ b/src/mess/machine/nes_nxrom.c @@ -19,12 +19,12 @@ * Nintendo UN1ROM [mapper 94] Known issues on specific mappers: - + * 000 F1 Race requires more precise PPU timing. It currently has plenty of 1-line glitches. * 003 Firehouse Rescue has flashing graphics (same PPU issue as Back to the Future 2 & 3?) * 007 Marble Madness has small graphics corruptions * 034 Titanic 1912 (pirate BxROM) has missing gfx (same PPU issue of many Waixing titles almost for sure) - + ***********************************************************************************************************/ diff --git a/src/mess/machine/nes_pirate.c b/src/mess/machine/nes_pirate.c index fe9e5397e9e..5540f84f833 100644 --- a/src/mess/machine/nes_pirate.c +++ b/src/mess/machine/nes_pirate.c @@ -11,7 +11,7 @@ TODO: - Are the scrolling glitches (check status bar) in Magic Dragon correct? FWIW, NEStopia behaves similarly - + ***********************************************************************************************************/ @@ -429,7 +429,7 @@ void nes_cityfight_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_prg_reg)); save_item(NAME(m_prg_mode)); save_item(NAME(m_irq_enable)); diff --git a/src/mess/machine/nes_pirate.h b/src/mess/machine/nes_pirate.h index ad0c2b78698..c8236bdb047 100644 --- a/src/mess/machine/nes_pirate.h +++ b/src/mess/machine/nes_pirate.h @@ -343,10 +343,10 @@ private: UINT8 m_prg_reg, m_prg_mode; UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; - + UINT8 m_mmc_vrom_bank[8]; }; diff --git a/src/mess/machine/nes_sachen.c b/src/mess/machine/nes_sachen.c index f1739f834e0..fe0ca5b2c62 100644 --- a/src/mess/machine/nes_sachen.c +++ b/src/mess/machine/nes_sachen.c @@ -21,7 +21,7 @@ * Sachen 8259 [mapper 141 (A), 138 (B), 139 (C), 137 (D)] Known issues on specific mappers: - + * 133 Qi Wang starts with corrupted graphics (ingame seems better) diff --git a/src/mess/machine/nes_slot.c b/src/mess/machine/nes_slot.c index 9f97ab76245..781c1b76e43 100644 --- a/src/mess/machine/nes_slot.c +++ b/src/mess/machine/nes_slot.c @@ -1,6 +1,6 @@ /*********************************************************************************************************** - - + + Nintendo NES/FC cart emulation (through slot devices) @@ -9,7 +9,7 @@ 0x6000-0x7fff to read_m/write_m (here are *usually* installed NVRAM & WRAM, if any) 0x8000-0xffff to write_h (reads are directed to 4 x 8K PRG banks) Default implementations of these handlers are available here, to be rewritten by PCB-specific ones when needed. - + Additional handlers are available, but have to be manually installed at machine_start * read_ex/write_ex for address range 0x4020-0x40ff * read_h for address range 0x8000-0xffff when a cart does some protection or address scramble before reading ROM @@ -21,22 +21,22 @@ Plus a few of latch functions are available: ppu_latch (see MMC2), hblank_irq and scanline_irq (see e.g. MMC3), but these might be subject to future changes when the PPU is revisited. - + Notes: - - Differently from later systems (like SNES or MD), it is uncommon to find PRG ROMs of NES games which are not a + - Differently from later systems (like SNES or MD), it is uncommon to find PRG ROMs of NES games which are not a power of 2K, so we do not perform any mirroring by default. - A bunch of pcb types, though, come with 1.5MB of PRG (some Waixing translations) or with multiple PRG chips - having peculiar size (32K + 16K, 32K + 8K, 32K + 2K). Hence, if such a configuration is detected, we provide - a m_prg_bank_map array to handle internally PRG mirroring up to the next power of 2K, as long as the size is - a multiple of 8K (i.e. the unit chunk for standard PRG). - For the case of PRG chips which are not-multiple of 8K (e.g. UNL-MARIO2-MALEE pcb), the handling has to be + A bunch of pcb types, though, come with 1.5MB of PRG (some Waixing translations) or with multiple PRG chips + having peculiar size (32K + 16K, 32K + 8K, 32K + 2K). Hence, if such a configuration is detected, we provide + a m_prg_bank_map array to handle internally PRG mirroring up to the next power of 2K, as long as the size is + a multiple of 8K (i.e. the unit chunk for standard PRG). + For the case of PRG chips which are not-multiple of 8K (e.g. UNL-MARIO2-MALEE pcb), the handling has to be handled in the pcb-specific code! - Our open bus emulation is very sketchy, by simply returning the higher 8bits of the accessed address. This seems enough for most games (only two sets have issues with this). A slightly better implementation is almost ready to fix these two remaining cases, but I plan to revisit the whole implementation in an accurate way at a later stage - Bus conflict is implemented based on latest tests by Blargg. There is some uncertainty about AxROM behavior - (some AOROM pcbs suffers from bus conflict, some do not... since no AOROM game is known to glitch due to lack + (some AOROM pcbs suffers from bus conflict, some do not... since no AOROM game is known to glitch due to lack of bus conflict it seems safe to emulate the board without bus conflict, but eventually it would be good to differentiate the real variants) @@ -44,20 +44,20 @@ Many information about the mappers/pcbs come from the wonderful doc written by Disch. Current info (when used) are based on v0.6.1 of his docs. You can find the latest version of the doc at http://www.romhacking.net/docs/362/ - - A lot of details have been based on the researches carried on at NesDev forums (by Blargg, Quietust and many more) + + A lot of details have been based on the researches carried on at NesDev forums (by Blargg, Quietust and many more) and collected on the NesDev Wiki http://wiki.nesdev.com/ - + Particular thanks go to - Martin Freij for his work on NEStopia - Cah4e3 for his efforts on FCEUMM and the reverse engineering of pirate boards - BootGod, lidnariq and naruko for the PCB tests which made possible - + ***********************************************************************************************************/ /***************************************************************************************** - + A few Mappers suffer of hardware conflict: original dumpers have used the same mapper number for more than a kind of boards. In these cases (and only in these cases) we exploit nes.hsi to set up accordingly emulation. Games which requires this hack are the following: @@ -69,14 +69,14 @@ * 113 - HES 6-in-1 requires mirroring (check Bookyman playfield), while other games break with this (check AV Soccer) * 153 - Famicom Jump II uses a different board (or the same in a very different way) * 242 - DQ8 has no mirroring (missing graphics is due to other reasons though) - + crc_hacks have been added also to handle a few wiring settings which would require submappers: * CHR protection pins for mapper 185 * VRC-2, VRC-4 and VRC-6 line wiring - + Remember that the MMC # does not equal the mapper #. In particular, Mapper 4 is in fact MMC3, Mapper 9 is MMC2 and Mapper 10 is MMC4. Makes perfect sense, right? - + ****************************************************************************************/ @@ -170,14 +170,14 @@ void device_nes_cart_interface::prg_alloc(running_machine &machine, size_t size) m_prg_mask = ((m_prg_chunks << 1) - 1); -// printf("first mask %x!\n", m_prg_mask); +// printf("first mask %x!\n", m_prg_mask); if ((m_prg_chunks << 1) & m_prg_mask) { int mask_bits = 0, temp = (m_prg_chunks << 1), mapsize; // contrary to what happens with later systems, like e.g. SNES or MD, // only half a dozen of NES carts have PRG which is not a power of 2 // so we use this bank_map only as an exception -// printf("uneven rom!\n"); +// printf("uneven rom!\n"); // 1. redefine mask as (next power of 2)-1 for (; temp; ) @@ -186,7 +186,7 @@ void device_nes_cart_interface::prg_alloc(running_machine &machine, size_t size) temp >>= 1; } m_prg_mask = (1 << mask_bits) - 1; -// printf("new mask %x!\n", m_prg_mask); +// printf("new mask %x!\n", m_prg_mask); mapsize = (1 << mask_bits)/2; // 2. create a bank_map for banks in the range mask/2 -> mask @@ -196,7 +196,7 @@ void device_nes_cart_interface::prg_alloc(running_machine &machine, size_t size) int j; for (j = mapsize; j < (m_prg_chunks << 1); j++) m_prg_bank_map[j - mapsize] = j; - + while (j % mapsize) { int k = 0, repeat_banks; @@ -207,14 +207,14 @@ void device_nes_cart_interface::prg_alloc(running_machine &machine, size_t size) m_prg_bank_map[(j - mapsize) + l] = m_prg_bank_map[(j - mapsize) + l - repeat_banks]; j += repeat_banks; } - + // check bank map! -// for (int i = 0; i < mapsize; i++) -// { -// printf("bank %3d = %3d\t", i, m_prg_bank_map[i]); -// if ((i%8) == 7) -// printf("\n"); -// } +// for (int i = 0; i < mapsize; i++) +// { +// printf("bank %3d = %3d\t", i, m_prg_bank_map[i]); +// if ((i%8) == 7) +// printf("\n"); +// } } } } @@ -275,10 +275,10 @@ inline int device_nes_cart_interface::prg_8k_bank_num(int bank_8k) return bank_8k; // case 2: otherwise return a mirror using the bank_map! -// UINT8 temp = bank_8k; +// UINT8 temp = bank_8k; bank_8k &= m_prg_mask; bank_8k -= (m_prg_mask/2 + 1); -// printf("bank: accessed %x (top: %x), returned %x\n", temp, (m_prg_chunks << 1) - 1, m_prg_bank_map[bank_8k]); +// printf("bank: accessed %x (top: %x), returned %x\n", temp, (m_prg_chunks << 1) - 1, m_prg_bank_map[bank_8k]); return m_prg_bank_map[bank_8k]; } @@ -289,7 +289,7 @@ inline void device_nes_cart_interface::update_prg_banks(int prg_bank_start, int assert(prg_bank >= 0); assert(prg_bank < ARRAY_LENGTH(m_prg_bank)); assert(prg_bank < ARRAY_LENGTH(m_prg_bank_mem)); - + m_prg_bank_mem[prg_bank]->set_entry(m_prg_bank[prg_bank]); } } @@ -299,7 +299,7 @@ void device_nes_cart_interface::prg32(int bank) /* if there is only 16k PRG, return */ if (!(m_prg_chunks >> 1)) return; - + /* assumes that bank references a 32k chunk */ bank = prg_8k_bank_num(bank * 4); @@ -314,7 +314,7 @@ void device_nes_cart_interface::prg16_89ab(int bank) { /* assumes that bank references a 16k chunk */ bank = prg_8k_bank_num(bank * 2); - + m_prg_bank[0] = bank + 0; m_prg_bank[1] = bank + 1; update_prg_banks(0, 1); @@ -324,7 +324,7 @@ void device_nes_cart_interface::prg16_cdef(int bank) { /* assumes that bank references a 16k chunk */ bank = prg_8k_bank_num(bank * 2); - + m_prg_bank[2] = bank + 0; m_prg_bank[3] = bank + 1; update_prg_banks(2, 3); @@ -334,7 +334,7 @@ void device_nes_cart_interface::prg8_89(int bank) { /* assumes that bank references an 8k chunk */ bank = prg_8k_bank_num(bank); - + m_prg_bank[0] = bank; update_prg_banks(0, 0); } @@ -343,7 +343,7 @@ void device_nes_cart_interface::prg8_ab(int bank) { /* assumes that bank references an 8k chunk */ bank = prg_8k_bank_num(bank); - + m_prg_bank[1] = bank; update_prg_banks(1, 1); } @@ -352,7 +352,7 @@ void device_nes_cart_interface::prg8_cd(int bank) { /* assumes that bank references an 8k chunk */ bank = prg_8k_bank_num(bank); - + m_prg_bank[2] = bank; update_prg_banks(2, 2); } @@ -361,7 +361,7 @@ void device_nes_cart_interface::prg8_ef(int bank) { /* assumes that bank references an 8k chunk */ bank = prg_8k_bank_num(bank); - + m_prg_bank[3] = bank; update_prg_banks(3, 3); } @@ -370,10 +370,10 @@ void device_nes_cart_interface::prg8_ef(int bank) void device_nes_cart_interface::prg8_x(int start, int bank) { assert(start < 4); - + /* assumes that bank references an 8k chunk */ bank = prg_8k_bank_num(bank); - + m_prg_bank[start] = bank; update_prg_banks(start, start); } @@ -386,7 +386,7 @@ inline void device_nes_cart_interface::chr_sanity_check( int source ) { if (source == CHRRAM && m_vram == NULL) fatalerror("CHRRAM bankswitch with no VRAM\n"); - + if (source == CHRROM && m_vrom == NULL) fatalerror("CHRROM bankswitch with no VROM\n"); } @@ -394,7 +394,7 @@ inline void device_nes_cart_interface::chr_sanity_check( int source ) void device_nes_cart_interface::chr8(int bank, int source) { chr_sanity_check(source); - + if (source == CHRRAM) { bank &= (m_vram_chunks - 1); @@ -420,7 +420,7 @@ void device_nes_cart_interface::chr8(int bank, int source) void device_nes_cart_interface::chr4_x(int start, int bank, int source) { chr_sanity_check(source); - + if (source == CHRRAM) { bank &= ((m_vram_chunks << 1) - 1); @@ -446,7 +446,7 @@ void device_nes_cart_interface::chr4_x(int start, int bank, int source) void device_nes_cart_interface::chr2_x(int start, int bank, int source) { chr_sanity_check(source); - + if (source == CHRRAM) { bank &= ((m_vram_chunks << 2) - 1); @@ -472,7 +472,7 @@ void device_nes_cart_interface::chr2_x(int start, int bank, int source) void device_nes_cart_interface::chr1_x(int start, int bank, int source) { chr_sanity_check(source); - + if (source == CHRRAM) { bank &= ((m_vram_chunks << 3) - 1); @@ -517,16 +517,16 @@ void device_nes_cart_interface::set_nt_page(int page, int source, int bank, int base_ptr = m_ciram; break; } - + page &= 3; /* mask down to the 4 logical pages */ m_nt_src[page] = source; - + if (base_ptr != NULL) { m_nt_orig[page] = bank * 0x400; m_nt_access[page] = base_ptr + m_nt_orig[page]; } - + m_nt_writable[page] = writable; } @@ -541,21 +541,21 @@ void device_nes_cart_interface::set_nt_mirroring(int mirroring) set_nt_page(2, CIRAM, 0, 1); set_nt_page(3, CIRAM, 1, 1); break; - + case PPU_MIRROR_HORZ: set_nt_page(0, CIRAM, 0, 1); set_nt_page(1, CIRAM, 0, 1); set_nt_page(2, CIRAM, 1, 1); set_nt_page(3, CIRAM, 1, 1); break; - + case PPU_MIRROR_HIGH: set_nt_page(0, CIRAM, 1, 1); set_nt_page(1, CIRAM, 1, 1); set_nt_page(2, CIRAM, 1, 1); set_nt_page(3, CIRAM, 1, 1); break; - + case PPU_MIRROR_LOW: set_nt_page(0, CIRAM, 0, 1); set_nt_page(1, CIRAM, 0, 1); @@ -570,7 +570,7 @@ void device_nes_cart_interface::set_nt_mirroring(int mirroring) set_nt_page(2, CART_NTRAM, 2, 1); set_nt_page(3, CART_NTRAM, 3, 1); break; - + case PPU_MIRROR_NONE: default: set_nt_page(0, CIRAM, 0, 1); @@ -596,7 +596,7 @@ UINT8 device_nes_cart_interface::hi_access_rom(UINT32 offset) // Helper function for the few mappers subject to bus conflict at write. // Tests by blargg showed that in many of the boards suffering of CPU/ROM -// conflicts the behaviour can be accurately emulated by writing not the +// conflicts the behaviour can be accurately emulated by writing not the // original data, but data & rom[offset] UINT8 device_nes_cart_interface::account_bus_conflict(UINT32 offset, UINT8 data) { @@ -604,7 +604,7 @@ UINT8 device_nes_cart_interface::account_bus_conflict(UINT32 offset, UINT8 data) // so we allow to set m_bus_conflict to FALSE at loading time when necessary if (m_bus_conflict) return data & hi_access_rom(offset); - else + else return data; } @@ -616,7 +616,7 @@ UINT8 device_nes_cart_interface::account_bus_conflict(UINT32 offset, UINT8 data) WRITE8_MEMBER(device_nes_cart_interface::chr_w) { int bank = offset >> 10; - + if (m_chr_src[bank] == CHRRAM) m_chr_access[bank][offset & 0x3ff] = data; } @@ -631,10 +631,10 @@ READ8_MEMBER(device_nes_cart_interface::chr_r) WRITE8_MEMBER(device_nes_cart_interface::nt_w) { int page = ((offset & 0xc00) >> 10); - + if (!m_nt_writable[page]) return; - + m_nt_access[page][offset & 0x3ff] = data; } @@ -649,40 +649,40 @@ READ8_MEMBER(device_nes_cart_interface::nt_r) // Base memory accessors (emulating open bus // behaviour and/or WRAM accesses) // Open bus emulation is defective, but it should -// be enough for the few cases known to rely on +// be enough for the few cases known to rely on // this (more in the comments at the top of the // source) //------------------------------------------------- -READ8_MEMBER(device_nes_cart_interface::read_l) -{ - return ((offset + 0x4100) & 0xff00) >> 8; // open bus +READ8_MEMBER(device_nes_cart_interface::read_l) +{ + return ((offset + 0x4100) & 0xff00) >> 8; // open bus } -READ8_MEMBER(device_nes_cart_interface::read_m) -{ +READ8_MEMBER(device_nes_cart_interface::read_m) +{ if (m_battery) return m_battery[offset & (m_battery_size - 1)]; if (m_prgram) return m_prgram[offset & (m_prgram_size - 1)]; - - return ((offset + 0x6000) & 0xff00) >> 8; // open bus + + return ((offset + 0x6000) & 0xff00) >> 8; // open bus } -WRITE8_MEMBER(device_nes_cart_interface::write_l) -{ +WRITE8_MEMBER(device_nes_cart_interface::write_l) +{ } -WRITE8_MEMBER(device_nes_cart_interface::write_m) -{ +WRITE8_MEMBER(device_nes_cart_interface::write_m) +{ if (m_battery) m_battery[offset & (m_battery_size - 1)] = data; if (m_prgram) m_prgram[offset & (m_prgram_size - 1)] = data; } -WRITE8_MEMBER(device_nes_cart_interface::write_h) -{ +WRITE8_MEMBER(device_nes_cart_interface::write_h) +{ } @@ -743,11 +743,11 @@ void device_nes_cart_interface::pcb_start(running_machine &machine, UINT8 *ciram m_prg_bank_mem[i]->set_entry(i); m_prg_bank[i] = i; } - + // Setup CHR m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; chr8(0, m_chr_source); - + // Setup NT m_ciram = ciram_ptr; @@ -846,9 +846,9 @@ void nes_cart_slot_device::pcb_reset() /*------------------------------------------------- - + Load from xml list and identify the required slot device - + -------------------------------------------------*/ /* Include emulation of NES PCBs for softlist */ @@ -856,9 +856,9 @@ void nes_cart_slot_device::pcb_reset() /*------------------------------------------------- - + Load .unf files (UNIF boards) and identify the required slot device - + -------------------------------------------------*/ /* Include emulation of UNIF Boards for .unf files */ @@ -866,9 +866,9 @@ void nes_cart_slot_device::pcb_reset() /*------------------------------------------------- - + Load .nes files (iNES mappers) and identify the required slot devices - + -------------------------------------------------*/ /* Include emulation of iNES Mappers for .nes files */ @@ -975,10 +975,10 @@ const char * nes_cart_slot_device::get_default_card_software(const machine_confi if ((ROM[0] == 'U') && (ROM[1] == 'N') && (ROM[2] == 'I') && (ROM[3] == 'F')) slot_string = get_default_card_unif(ROM, len); - + global_free(ROM); clear(); - + return slot_string; } else @@ -1058,10 +1058,9 @@ WRITE8_MEMBER(nes_cart_slot_device::write_ex) //------------------------------------------------- void nes_partialhash(hash_collection &dest, const unsigned char *data, - unsigned long length, const char *functions) + unsigned long length, const char *functions) { if (length <= 16) return; dest.compute(&data[16], length - 16, functions); } - diff --git a/src/mess/machine/nes_slot.h b/src/mess/machine/nes_slot.h index 83e0353f7c1..ae052789887 100644 --- a/src/mess/machine/nes_slot.h +++ b/src/mess/machine/nes_slot.h @@ -12,14 +12,14 @@ enum { STD_NROM = 0, - STD_AXROM, STD_AMROM, STD_BXROM, + STD_AXROM, STD_AMROM, STD_BXROM, STD_CNROM, STD_CPROM, STD_EXROM, STD_FXROM, STD_GXROM, STD_HKROM, STD_PXROM, STD_SXROM, STD_TXROM, STD_TXSROM, - STD_TKROM, STD_TQROM, + STD_TKROM, STD_TQROM, STD_UXROM, STD_UN1ROM, UXROM_CC, - HVC_FAMBASIC, NES_QJ, PAL_ZZ, STD_EVENT, + HVC_FAMBASIC, NES_QJ, PAL_ZZ, STD_EVENT, STD_SXROM_A, STD_SOROM, STD_SOROM_A, /* Discrete components boards (by various manufacturer) */ DIS_74X161X138, DIS_74X139X74, @@ -77,7 +77,7 @@ enum TXC_22211, TXC_DUMARACING, TXC_MJBLOCK, TXC_COMMANDOS, TXC_TW, TXC_STRIKEW, /* Multigame Carts */ - BMC_64IN1NR, BMC_190IN1, BMC_A65AS, + BMC_64IN1NR, BMC_190IN1, BMC_A65AS, BMC_HIK8IN1, BMC_NOVEL1, BMC_NOVEL2, BMC_S24IN1SC03, BMC_T262, BMC_WS, BMC_SUPERBIG_7IN1, BMC_SUPERHIK_4IN1, BMC_BALLGAMES_11IN1, BMC_MARIOPARTY_7IN1, BMC_GOLD_7IN1, BMC_SUPER_700IN1, BMC_FAMILY_4646, @@ -85,10 +85,10 @@ enum BMC_15IN1, BMC_SUPERHIK_300IN1, BMC_SUPERGUN_20IN1, BMC_GOLDENCARD_6IN1, BMC_72IN1, BMC_SUPER_42IN1, BMC_76IN1, BMC_31IN1, BMC_22GAMES, BMC_20IN1, BMC_110IN1, - BMC_70IN1, BMC_800IN1, BMC_1200IN1, + BMC_70IN1, BMC_800IN1, BMC_1200IN1, BMC_GKA, BMC_GKB, BMC_VT5201, BMC_BENSHIENG, BMC_810544, BMC_NTD_03, BMC_G63IN1, BMC_FK23C, BMC_FK23CA, BMC_PJOY84, - BMC_POWERFUL_255, BMC_11160, BMC_G146, BMC_8157, BMC_830118C, + BMC_POWERFUL_255, BMC_11160, BMC_G146, BMC_8157, BMC_830118C, BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_CH001, BMC_SUPER22, BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, /* Unlicensed */ @@ -97,7 +97,7 @@ enum UNL_UXROM, UNL_MK2, UNL_XIAOZY, UNL_KOF96, UNL_SF3, UNL_RACERMATE, UNL_EDU2K, UNL_LH32, UNL_LH10, UNL_STUDYNGAME, UNL_603_5052, UNL_H2288, UNL_2708, - UNL_MALISB, UNL_BB, UNL_AC08, UNL_A9746, UNL_WORLDHERO, + UNL_MALISB, UNL_BB, UNL_AC08, UNL_A9746, UNL_WORLDHERO, UNL_43272, UNL_TF1201, UNL_CITYFIGHT, /* Bootleg boards */ BTL_SMB2JA, BTL_MARIOBABY, BTL_AISENSHINICOL, BTL_TOBIDASE, @@ -108,7 +108,7 @@ enum MAGICSERIES_MD, KASING_BOARD, FUTUREMEDIA_BOARD, FUKUTAKE_BOARD, SOMARI_SL12, HENGG_SRICH, HENGG_XHZS, HENGG_SHJY3, SUBOR_TYPE0, SUBOR_TYPE1, KAISER_KS7058, KAISER_KS7032, KAISER_KS7022, KAISER_KS7017, KAISER_KS7012, KAISER_KS7013B, KAISER_KS202, - CNE_DECATHLON, CNE_FSB, CNE_SHLZ, CONY_BOARD, YOKO_BOARD, + CNE_DECATHLON, CNE_FSB, CNE_SHLZ, CONY_BOARD, YOKO_BOARD, RCM_GS2015, RCM_GS2004, RCM_GS2013, RCM_TF9IN1, RCM_3DBLOCK, WAIXING_TYPE_A, WAIXING_TYPE_A1, WAIXING_TYPE_B, WAIXING_TYPE_C, WAIXING_TYPE_D, WAIXING_TYPE_E, WAIXING_TYPE_F, WAIXING_TYPE_G, WAIXING_TYPE_H, WAIXING_TYPE_H1, @@ -164,7 +164,7 @@ public: virtual DECLARE_READ8_MEMBER(read_h) { return 0xff; } virtual DECLARE_READ8_MEMBER(read_ex) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_l); - virtual DECLARE_WRITE8_MEMBER(write_m); + virtual DECLARE_WRITE8_MEMBER(write_m); virtual DECLARE_WRITE8_MEMBER(write_h); virtual DECLARE_WRITE8_MEMBER(write_ex) { } @@ -188,7 +188,7 @@ public: bool get_trainer() { return m_has_trainer; } void set_trainer(bool val) { m_has_trainer = val; } - void set_ce(int mask, int state) { m_ce_mask = mask; m_ce_state = state; } + void set_ce(int mask, int state) { m_ce_mask = mask; m_ce_state = state; } void set_vrc_lines(int PRG_A, int PRG_B, int CHR) { m_vrc_ls_prg_a = PRG_A; m_vrc_ls_prg_b = PRG_B; m_vrc_ls_chr = CHR; } void set_x1_005_alt(bool val) { m_x1_005_alt_mirroring = val; } void set_bus_conflict(bool val) { m_bus_conflict = val; } @@ -211,12 +211,12 @@ public: virtual void hblank_irq(int scanline, int vblank, int blanked) {} virtual void scanline_irq(int scanline, int vblank, int blanked) {} - virtual void pcb_reset() {} // many pcb expect specific PRG/CHR banking at start + virtual void pcb_reset() {} // many pcb expect specific PRG/CHR banking at start void pcb_start(running_machine &machine, UINT8 *ciram_ptr); void pcb_reg_postload(running_machine &machine); void nes_banks_restore(); - UINT8 hi_access_rom(UINT32 offset); // helper ROM access for a bunch of PCB reading 0x8000-0xffff for protection too + UINT8 hi_access_rom(UINT32 offset); // helper ROM access for a bunch of PCB reading 0x8000-0xffff for protection too UINT8 account_bus_conflict(UINT32 offset, UINT8 data); protected: @@ -228,13 +228,13 @@ protected: UINT8 *m_vram; UINT8 *m_battery; UINT8 *m_ciram; - + UINT32 m_prg_size; UINT32 m_prgram_size; UINT32 m_vrom_size; UINT32 m_vram_size; UINT32 m_battery_size; - + // these are specific of some boards but must be accessible from the driver // E.g. additional save ram for HKROM, X1-005 & X1-017 boards, or ExRAM for MMC5 UINT8 *m_mapper_sram; @@ -247,10 +247,10 @@ protected: int m_vrc_ls_prg_a; int m_vrc_ls_prg_b; int m_vrc_ls_chr; - + int m_mirroring; bool m_pcb_ctrl_mirror, m_four_screen_vram, m_has_trainer; - bool m_x1_005_alt_mirroring; // temp hack for two kind of mirroring in Taito X1-005 boards (to be replaced with pin checking) + bool m_x1_005_alt_mirroring; // temp hack for two kind of mirroring in Taito X1-005 boards (to be replaced with pin checking) bool m_bus_conflict; // PRG @@ -271,12 +271,12 @@ protected: void prg8_ef(int bank); void prg8_x(int start, int bank); - + // CHR - int m_chr_source; // global source for the 8 VROM banks + int m_chr_source; // global source for the 8 VROM banks inline void chr_sanity_check(int source); - //these were previously called chr_map. they are a quick banking structure, + //these were previously called chr_map. they are a quick banking structure, //because some of these change multiple times per scanline! int m_chr_src[8]; //defines source of base pointer int m_chr_orig[8]; //defines offset of 0x400 byte segment at base pointer @@ -305,7 +305,7 @@ protected: void chr1_6(int bank, int source) { chr1_x(6, bank, source); }; void chr1_7(int bank, int source) { chr1_x(7, bank, source); }; - + // NameTable & Mirroring //these were previously called nt_page. they are a quick banking structure for a maximum of 4K of RAM/ROM/ExRAM int m_nt_src[4]; @@ -375,7 +375,7 @@ public: virtual DECLARE_WRITE8_MEMBER(write_ex); int get_pcb_id() { return m_pcb_id; }; - + void pcb_start(UINT8 *ciram_ptr); void pcb_reset(); diff --git a/src/mess/machine/nes_somari.c b/src/mess/machine/nes_somari.c index aa7e6d54b3a..65c8dc1a9fe 100644 --- a/src/mess/machine/nes_somari.c +++ b/src/mess/machine/nes_somari.c @@ -181,7 +181,7 @@ WRITE8_MEMBER(nes_somari_device::mmc1_w) update_mirror(); update_prg(); update_chr(); - + m_count = 0; } } @@ -287,7 +287,7 @@ void nes_somari_device::update_prg() break; case SOMARI_MMC3_MODE: { - UINT8 prg_flip = (m_latch & 0x40) ? 2 : 0; + UINT8 prg_flip = (m_latch & 0x40) ? 2 : 0; prg8_x(0, m_mmc_prg_bank[0 ^ prg_flip]); prg8_x(1, m_mmc_prg_bank[1]); prg8_x(2, m_mmc_prg_bank[2 ^ prg_flip]); @@ -295,7 +295,7 @@ void nes_somari_device::update_prg() } break; case SOMARI_MMC1_MODE: -// case SOMARI_MMC1_MODE_AGAIN: +// case SOMARI_MMC1_MODE_AGAIN: { UINT8 prg_offset = m_mmc1_reg[1] & 0x10; @@ -341,7 +341,7 @@ void nes_somari_device::update_chr() } break; case SOMARI_MMC1_MODE: -// case SOMARI_MMC1_MODE_AGAIN: +// case SOMARI_MMC1_MODE_AGAIN: if (BIT(m_mmc1_reg[0], 4)) { chr4_0(m_mmc1_reg[1] & 0x1f, CHRROM); @@ -364,7 +364,7 @@ void nes_somari_device::update_mirror() set_nt_mirroring(m_mmc3_mirror_reg ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); break; case SOMARI_MMC1_MODE: -// case SOMARI_MMC1_MODE_AGAIN: +// case SOMARI_MMC1_MODE_AGAIN: switch (m_mmc1_reg[0] & 0x03) { case 0x00: set_nt_mirroring(PPU_MIRROR_LOW); break; diff --git a/src/mess/machine/nes_sunsoft.c b/src/mess/machine/nes_sunsoft.c index f86d1c71a9b..561cc50a392 100644 --- a/src/mess/machine/nes_sunsoft.c +++ b/src/mess/machine/nes_sunsoft.c @@ -18,7 +18,7 @@ TODO: - check 1-line glitches due to IRQ in Sunsoft-3 - + ***********************************************************************************************************/ @@ -124,7 +124,7 @@ void nes_sunsoft_3_device::device_start() common_start(); irq_timer = timer_alloc(TIMER_IRQ); irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - + save_item(NAME(m_irq_enable)); save_item(NAME(m_irq_toggle)); save_item(NAME(m_irq_count)); @@ -169,8 +169,8 @@ void nes_sunsoft_fme7_device::device_start() irq_timer = timer_alloc(TIMER_IRQ); // this has to be hardcoded because some some scanline code only suits NTSC... it will be fixed with PPU rewrite irq_timer->adjust(attotime::zero, 0, attotime::from_hz((21477272.724 / 12))); -// irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); - +// irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); + save_item(NAME(m_wram_bank)); save_item(NAME(m_latch)); save_item(NAME(m_irq_enable)); diff --git a/src/mess/machine/nes_sunsoft.h b/src/mess/machine/nes_sunsoft.h index 5219e866cdd..1bc5f007cb0 100644 --- a/src/mess/machine/nes_sunsoft.h +++ b/src/mess/machine/nes_sunsoft.h @@ -55,7 +55,7 @@ public: private: UINT16 m_irq_count; int m_irq_enable, m_irq_toggle; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; }; @@ -106,10 +106,10 @@ public: private: UINT16 m_irq_count; int m_irq_enable; - + static const device_timer_id TIMER_IRQ = 0; emu_timer *irq_timer; - + UINT8 m_latch; UINT8 m_wram_bank; }; diff --git a/src/mess/machine/nes_taito.c b/src/mess/machine/nes_taito.c index 6b00eba446c..600d039095a 100644 --- a/src/mess/machine/nes_taito.c +++ b/src/mess/machine/nes_taito.c @@ -13,11 +13,11 @@ * Taito TC0190FMC+PAL16R4 [mapper 48] * Taito X1-005 [mapper 80, 207] * Taito X1-017 [mapper 82] - + TODO: - Akira does not work. Investigate why! - Don Doko Don 2 freezes when you get to the first boss - + ***********************************************************************************************************/ diff --git a/src/mess/machine/nes_txc.c b/src/mess/machine/nes_txc.c index aef62df61e7..e0c501fc4de 100644 --- a/src/mess/machine/nes_txc.c +++ b/src/mess/machine/nes_txc.c @@ -14,8 +14,8 @@ * TXC Mahjong Block [mapper 172] * TXC Strike Wolf [mapper 36] * TXC Commandos (and many more) [mapper 241] - - TODO: + + TODO: - Does Commandos indeed use this board? diff --git a/src/mess/machine/nes_waixing.c b/src/mess/machine/nes_waixing.c index 0d44ab924ae..0b73da9b8c7 100644 --- a/src/mess/machine/nes_waixing.c +++ b/src/mess/machine/nes_waixing.c @@ -10,7 +10,7 @@ Here we emulate the various PCBs used by Waixing for its games TODO: - - investigate the PPU issues causing some games not to have sprites (e.g. some games using mappers 15, 164, + - investigate the PPU issues causing some games not to have sprites (e.g. some games using mappers 15, 164, 242, 249) ***********************************************************************************************************/ diff --git a/src/mess/machine/pc.c b/src/mess/machine/pc.c index d6c6a5f9d90..6f2ac3ed030 100644 --- a/src/mess/machine/pc.c +++ b/src/mess/machine/pc.c @@ -1407,7 +1407,7 @@ void pc_state::init_pc_common(void (*set_keyb_int_func)(running_machine &, int)) m_pc_keyb_int_cb = set_keyb_int_func; m_pc_keyb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pc_keyb_timer),this)); } - + void pc_state::mess_init_pc_common(void (*set_keyb_int_func)(running_machine &, int)) { if ( set_keyb_int_func != NULL ) @@ -1530,7 +1530,7 @@ MACHINE_START_MEMBER(pc_state,pcjr) { pc_int_delay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_delayed_pic8259_irq),this)); m_pcjr_watchdog = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_fdc_watchdog),this)); - pcjr_keyb.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_keyb_signal_callback),this)); + pcjr_keyb.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_keyb_signal_callback),this)); m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this)); machine().device<upd765a_device>("upd765")->set_ready_line_connected(false); @@ -1838,5 +1838,5 @@ void pc_state::pc_turbo_setup(double off_speed, double on_speed) m_turbo_cur_val = -1; m_turbo_off_speed = off_speed; m_turbo_on_speed = on_speed; - machine().scheduler().timer_pulse(attotime::from_msec(100), timer_expired_delegate(FUNC(pc_state::pc_turbo_callback),this)); + machine().scheduler().timer_pulse(attotime::from_msec(100), timer_expired_delegate(FUNC(pc_state::pc_turbo_callback),this)); } diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c index 03e27549fd3..f8bce0f2d3c 100644 --- a/src/mess/machine/primo.c +++ b/src/mess/machine/primo.c @@ -333,7 +333,7 @@ void primo_state::primo_setup_pp (UINT8* quickload_data, UINT32 quickload_size) { int i; - + UINT16 load_addr; UINT16 start_addr; diff --git a/src/mess/machine/psxcd.c b/src/mess/machine/psxcd.c index 050d30c652d..ab7b3b07218 100644 --- a/src/mess/machine/psxcd.c +++ b/src/mess/machine/psxcd.c @@ -1084,7 +1084,7 @@ void psxcd_device::start_read() return; } send_result(intr_complete); - status |= status_reading; + status |= status_reading; m_cursec=sectail=0; diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c index 8a1b74cb789..15754a62fb4 100644 --- a/src/mess/machine/rmnimbus.c +++ b/src/mess/machine/rmnimbus.c @@ -2373,7 +2373,6 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_disk_w) void rmnimbus_state::hdc_reset() { - m_nimbus_drives.reg410_in=0; m_nimbus_drives.reg410_in |= (m_scsibus->scsi_req_r() ? 0 : HDC_REQ_MASK); m_nimbus_drives.reg410_in |= (m_scsibus->scsi_cd_r() ? 0 : HDC_CD_MASK); @@ -2386,7 +2385,6 @@ void rmnimbus_state::hdc_reset() void rmnimbus_state::hdc_ctrl_write(UINT8 data) { - // If we enable the HDC interupt, and an interrupt is pending, go deal with it. if(((data & HDC_IRQ_MASK) && (~m_nimbus_drives.reg410_out & HDC_IRQ_MASK)) && ((~m_nimbus_drives.reg410_in & HDC_INT_TRIGGER)==HDC_INT_TRIGGER)) @@ -2400,7 +2398,6 @@ void rmnimbus_state::hdc_ctrl_write(UINT8 data) void rmnimbus_state::hdc_post_rw() { - if((m_nimbus_drives.reg410_in & HDC_REQ_MASK)==0) m_scsibus->scsi_ack_w(1); diff --git a/src/mess/machine/s3c44b0.c b/src/mess/machine/s3c44b0.c index 24dd3c64434..d5f4d744700 100644 --- a/src/mess/machine/s3c44b0.c +++ b/src/mess/machine/s3c44b0.c @@ -2011,8 +2011,8 @@ DEVICE_START( s3c44b0 ) s3c44b0->sda_w.resolve(s3c44b0->iface->i2c.sda_w, *device); s3c44b0->adc_data_r.resolve(s3c44b0->iface->adc.data_r, *device); s3c44b0->i2s_data_w.resolve(s3c44b0->iface->i2s.data_w, *device); - - + + s3c44b0->space = &space; s3c44b0->cpu = downcast<cpu_device *>(device->machine().device( "maincpu")); for (int i = 0; i < 6; i++) s3c44b0->pwm.timer[i] = machine.scheduler().timer_alloc(FUNC(s3c44b0_pwm_timer_exp), (void*)device); diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c index f941bc534db..daea1de0fa3 100644 --- a/src/mess/machine/sms.c +++ b/src/mess/machine/sms.c @@ -1512,7 +1512,6 @@ int sms_state::detect_tvdraw( UINT8 *rom ) int sms_state::detect_lphaser_xoffset( UINT8 *rom ) { - static const UINT8 signatures[6][16] = { /* Spacegun */ diff --git a/src/mess/machine/upd71071.c b/src/mess/machine/upd71071.c index ca7be166cfd..9b6228f588b 100644 --- a/src/mess/machine/upd71071.c +++ b/src/mess/machine/upd71071.c @@ -110,8 +110,8 @@ struct upd71071_t const upd71071_intf* intf; devcb_resolved_write_line m_out_hreq_func; devcb_resolved_write_line m_out_eop_func; - devcb_resolved_read16 m_dma_read[4]; - devcb_resolved_write16 m_dma_write[4]; + devcb_resolved_read16 m_dma_read[4]; + devcb_resolved_write16 m_dma_write[4]; devcb_resolved_write_line m_out_dack_func[4]; int m_hreq; int m_eop; diff --git a/src/mess/machine/upd71071.h b/src/mess/machine/upd71071.h index 1e87a41fcac..9a815d8819e 100644 --- a/src/mess/machine/upd71071.h +++ b/src/mess/machine/upd71071.h @@ -9,8 +9,8 @@ struct upd71071_intf int clock; devcb_write_line m_out_hreq_cb; devcb_write_line m_out_eop_cb; - devcb_read16 m_dma_read[4]; - devcb_write16 m_dma_write[4]; + devcb_read16 m_dma_read[4]; + devcb_write16 m_dma_write[4]; devcb_write_line m_out_dack_cb[4]; }; diff --git a/src/mess/machine/vtech2.c b/src/mess/machine/vtech2.c index 62a90d126b3..a56a2f9e78e 100644 --- a/src/mess/machine/vtech2.c +++ b/src/mess/machine/vtech2.c @@ -332,7 +332,7 @@ DEVICE_IMAGE_UNLOAD_MEMBER( vtech2_state, laser_cart ) } device_t *vtech2_state::laser_file() -{ +{ return machine().device(m_laser_drive ? FLOPPY_1 : FLOPPY_0); } diff --git a/src/mess/video/cgenie.c b/src/mess/video/cgenie.c index ca6f6cfa42f..bc8231d0d0e 100644 --- a/src/mess/video/cgenie.c +++ b/src/mess/video/cgenie.c @@ -57,7 +57,7 @@ void cgenie_state::cgenie_offset_xy() Write to an indexed register of the 6845 CRTC ***************************************************************************/ WRITE8_MEMBER( cgenie_state::cgenie_register_w ) -{ +{ //int addr; switch (m_crt.idx) @@ -166,7 +166,7 @@ WRITE8_MEMBER( cgenie_state::cgenie_index_w ) Read from an indexed register of the 6845 CRTC ***************************************************************************/ READ8_MEMBER( cgenie_state::cgenie_register_r ) -{ +{ return cgenie_get_register(m_crt.idx); } @@ -217,7 +217,7 @@ int cgenie_state::cgenie_get_register(int indx) Read the index register of the 6845 CRTC ***************************************************************************/ READ8_MEMBER( cgenie_state::cgenie_index_r ) -{ +{ return m_crt.idx; } diff --git a/src/mess/video/fm7.c b/src/mess/video/fm7.c index 126623ecb53..a4d0a3817b9 100644 --- a/src/mess/video/fm7.c +++ b/src/mess/video/fm7.c @@ -645,7 +645,7 @@ READ8_MEMBER(fm7_state::fm7_vram_r) return 0xff; if(m_alu.command & 0x80) // ALU active, writes to VRAM even when reading it (go figure) - { + { fm7_alu_function(offset+page); } diff --git a/src/mess/video/pc_aga.h b/src/mess/video/pc_aga.h index 971fd5ea018..acf3414cf75 100644 --- a/src/mess/video/pc_aga.h +++ b/src/mess/video/pc_aga.h @@ -44,4 +44,4 @@ DECLARE_WRITE8_HANDLER( pc200_cga_w ); DECLARE_READ16_HANDLER( pc200_cga16le_r ); DECLARE_WRITE16_HANDLER( pc200_cga16le_w ); -#endif
\ No newline at end of file +#endif diff --git a/src/mess/video/rmnimbus.c b/src/mess/video/rmnimbus.c index efb9c4d6302..86055d6a9b5 100644 --- a/src/mess/video/rmnimbus.c +++ b/src/mess/video/rmnimbus.c @@ -82,7 +82,7 @@ static void video_regdump(running_machine &machine, int ref, int params, const c */ READ16_MEMBER(rmnimbus_state::nimbus_video_io_r) -{ +{ int pc=space.device().safe_pc(); UINT16 result; @@ -242,7 +242,7 @@ UINT16 rmnimbus_state::read_reg_00A() */ WRITE16_MEMBER(rmnimbus_state::nimbus_video_io_w) -{ +{ int pc=space.device().safe_pc(); if(offset<reg028) diff --git a/src/mess/video/tx0.c b/src/mess/video/tx0.c index 31b495d8313..cb760ba5317 100644 --- a/src/mess/video/tx0.c +++ b/src/mess/video/tx0.c @@ -54,7 +54,6 @@ void tx0_state::screen_eof_tx0(screen_device &screen, bool state) */ void tx0_state::tx0_plot(int x, int y) { - /* compute pixel coordinates and plot */ x = x*crt_window_width/0777; y = y*crt_window_height/0777; diff --git a/src/mess/video/vic4567.h b/src/mess/video/vic4567.h index 1aca87cab0c..664ea89d01c 100644 --- a/src/mess/video/vic4567.h +++ b/src/mess/video/vic4567.h @@ -25,14 +25,14 @@ struct vic3_interface const char *screen; const char *cpu; - vic3_type type; + vic3_type type; devcb_read8 x_cb; devcb_read8 y_cb; - devcb_read8 button_cb; + devcb_read8 button_cb; devcb_read8 dma_read; - devcb_read8 dma_read_color; + devcb_read8 dma_read_color; devcb_write_line irq; devcb_write8 port_changed; |
