summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/apple2gs.c4
-rw-r--r--src/mess/machine/bebox.c2
-rw-r--r--src/mess/machine/cgenie.c22
-rw-r--r--src/mess/machine/dragon.c4
-rw-r--r--src/mess/machine/europc.c10
-rw-r--r--src/mess/machine/galaxy.c1
-rw-r--r--src/mess/machine/isa_ide8.c76
-rw-r--r--src/mess/machine/isa_ide8.h10
-rw-r--r--src/mess/machine/mac.c3
-rw-r--r--src/mess/machine/md_rom.c2
-rw-r--r--src/mess/machine/nes_ave.c6
-rw-r--r--src/mess/machine/nes_bandai.c28
-rw-r--r--src/mess/machine/nes_bandai.h2
-rw-r--r--src/mess/machine/nes_bootleg.c52
-rw-r--r--src/mess/machine/nes_bootleg.h20
-rw-r--r--src/mess/machine/nes_camerica.c2
-rw-r--r--src/mess/machine/nes_cony.c6
-rw-r--r--src/mess/machine/nes_cony.h4
-rw-r--r--src/mess/machine/nes_discrete.c8
-rw-r--r--src/mess/machine/nes_irem.c10
-rw-r--r--src/mess/machine/nes_irem.h2
-rw-r--r--src/mess/machine/nes_jaleco.c10
-rw-r--r--src/mess/machine/nes_jaleco.h4
-rw-r--r--src/mess/machine/nes_kaiser.c12
-rw-r--r--src/mess/machine/nes_kaiser.h4
-rw-r--r--src/mess/machine/nes_konami.c20
-rw-r--r--src/mess/machine/nes_konami.h6
-rw-r--r--src/mess/machine/nes_legacy.h4
-rw-r--r--src/mess/machine/nes_mmc1.c6
-rw-r--r--src/mess/machine/nes_mmc3.c4
-rw-r--r--src/mess/machine/nes_namcot.c8
-rw-r--r--src/mess/machine/nes_namcot.h4
-rw-r--r--src/mess/machine/nes_nxrom.c4
-rw-r--r--src/mess/machine/nes_pirate.c4
-rw-r--r--src/mess/machine/nes_pirate.h4
-rw-r--r--src/mess/machine/nes_sachen.c2
-rw-r--r--src/mess/machine/nes_slot.c169
-rw-r--r--src/mess/machine/nes_slot.h42
-rw-r--r--src/mess/machine/nes_somari.c10
-rw-r--r--src/mess/machine/nes_sunsoft.c8
-rw-r--r--src/mess/machine/nes_sunsoft.h6
-rw-r--r--src/mess/machine/nes_taito.c4
-rw-r--r--src/mess/machine/nes_txc.c4
-rw-r--r--src/mess/machine/nes_waixing.c2
-rw-r--r--src/mess/machine/pc.c6
-rw-r--r--src/mess/machine/primo.c2
-rw-r--r--src/mess/machine/psxcd.c2
-rw-r--r--src/mess/machine/rmnimbus.c3
-rw-r--r--src/mess/machine/s3c44b0.c4
-rw-r--r--src/mess/machine/sms.c1
-rw-r--r--src/mess/machine/upd71071.c4
-rw-r--r--src/mess/machine/upd71071.h4
-rw-r--r--src/mess/machine/vtech2.c2
53 files changed, 317 insertions, 326 deletions
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);
}