summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/mc14411.cpp2
-rw-r--r--src/devices/machine/sega_scu.cpp84
-rw-r--r--src/devices/machine/sega_scu.h18
-rw-r--r--src/devices/machine/smpc.cpp118
-rw-r--r--src/devices/machine/smpc.h26
-rw-r--r--src/devices/machine/stvcd.cpp8
-rw-r--r--src/devices/machine/z80scc.cpp2
-rw-r--r--src/devices/machine/z80sio.cpp2
8 files changed, 130 insertions, 130 deletions
diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp
index 6494a12630f..d8ce720a0f3 100644
--- a/src/devices/machine/mc14411.cpp
+++ b/src/devices/machine/mc14411.cpp
@@ -56,7 +56,7 @@
***************************************************************************/
const int mc14411_device::s_counter_divider[16] = {
- ////////// X64 /////// X16 /////// X8 //////// X1 ////////
+ ////////// X64 /////// X16 /////// X8 //////// X1 ////////
3, // F1: 614.4 kHz 153.6 kHz 76800 Hz 9600 Hz
4, // F2: 460.8 kHz 115.2 kHz 57600 Hz 7200 Hz
6, // F3: 307.2 kHz 76800 Hz 36400 Hz 4800 Hz
diff --git a/src/devices/machine/sega_scu.cpp b/src/devices/machine/sega_scu.cpp
index cd2919bc266..0336ac3d5f4 100644
--- a/src/devices/machine/sega_scu.cpp
+++ b/src/devices/machine/sega_scu.cpp
@@ -2,16 +2,16 @@
// copyright-holders:Angelo Salese
/***************************************************************************
- Sega System Control Unit (c) 1995 Sega
-
- TODO:
- - make a screen_device subclass, add pixel timers & irq callbacks to it;
- - A-Bus external interrupts;
- - Pad signal (lightgun I presume);
- - Improve DMA, use DRQ model and timers, make them subdevices?
- (old DMA TODO)
- - Remove CD transfer DMA hack (tied with CD block bug(s)?)
- - Add timings(but how fast are each DMA?).
+ Sega System Control Unit (c) 1995 Sega
+
+ TODO:
+ - make a screen_device subclass, add pixel timers & irq callbacks to it;
+ - A-Bus external interrupts;
+ - Pad signal (lightgun I presume);
+ - Improve DMA, use DRQ model and timers, make them subdevices?
+ (old DMA TODO)
+ - Remove CD transfer DMA hack (tied with CD block bug(s)?)
+ - Add timings(but how fast are each DMA?).
- Add level priority & DMA status register.
***************************************************************************/
@@ -109,7 +109,7 @@ DEFINE_DEVICE_TYPE(SEGA_SCU, sega_scu_device, "sega_scu", "Sega System Control U
// LIVE DEVICE
//**************************************************************************
-//AM_RANGE(0x0000, 0x0003) src
+//AM_RANGE(0x0000, 0x0003) src
//AM_RANGE(0x0004, 0x0007) dst
//AM_RANGE(0x0008, 0x000b) size
//AM_RANGE(0x000c, 0x000f) src/dst add values
@@ -120,9 +120,9 @@ DEVICE_ADDRESS_MAP_START( regs_map, 32, sega_scu_device )
AM_RANGE(0x0000, 0x0017) AM_READWRITE(dma_lv0_r,dma_lv0_w)
AM_RANGE(0x0020, 0x0037) AM_READWRITE(dma_lv1_r,dma_lv1_w)
AM_RANGE(0x0040, 0x0057) AM_READWRITE(dma_lv2_r,dma_lv2_w)
- // Super Major League and Shin Megami Tensei - Akuma Zensho reads from there (undocumented), DMA status mirror?
- AM_RANGE(0x005c, 0x005f) AM_READ(dma_status_r)
-// AM_RANGE(0x0060, 0x0063) AM_WRITE(dma_force_stop_w)
+ // Super Major League and Shin Megami Tensei - Akuma Zensho reads from there (undocumented), DMA status mirror?
+ AM_RANGE(0x005c, 0x005f) AM_READ(dma_status_r)
+// AM_RANGE(0x0060, 0x0063) AM_WRITE(dma_force_stop_w)
AM_RANGE(0x007c, 0x007f) AM_READ(dma_status_r)
AM_RANGE(0x0080, 0x0083) AM_DEVREADWRITE("scudsp",scudsp_cpu_device, program_control_r,program_control_w)
AM_RANGE(0x0084, 0x0087) AM_DEVWRITE("scudsp", scudsp_cpu_device, program_w)
@@ -133,10 +133,10 @@ DEVICE_ADDRESS_MAP_START( regs_map, 32, sega_scu_device )
AM_RANGE(0x0098, 0x009b) AM_WRITE16(t1_mode_w,0x0000ffff)
AM_RANGE(0x00a0, 0x00a3) AM_READWRITE(irq_mask_r,irq_mask_w)
AM_RANGE(0x00a4, 0x00a7) AM_READWRITE(irq_status_r,irq_status_w)
-// AM_RANGE(0x00a8, 0x00ab) AM_WRITE(abus_irqack_w)
-// AM_RANGE(0x00b0, 0x00b7) AM_READWRITE(abus_set_r,abus_set_w)
-// AM_RANGE(0x00b8, 0x00bb) AM_READWRITE(abus_refresh_r,abus_refresh_w)
-// AM_RANGE(0x00c4, 0x00c7) AM_READWRITE(sdram_r,sdram_w)
+// AM_RANGE(0x00a8, 0x00ab) AM_WRITE(abus_irqack_w)
+// AM_RANGE(0x00b0, 0x00b7) AM_READWRITE(abus_set_r,abus_set_w)
+// AM_RANGE(0x00b8, 0x00bb) AM_READWRITE(abus_refresh_r,abus_refresh_w)
+// AM_RANGE(0x00c4, 0x00c7) AM_READWRITE(sdram_r,sdram_w)
AM_RANGE(0x00c8, 0x00cb) AM_READ(version_r) // returns 4 for stock Saturn
ADDRESS_MAP_END
@@ -146,7 +146,7 @@ ADDRESS_MAP_END
sega_scu_device::sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SEGA_SCU, tag, owner, clock),
- m_scudsp(*this, "scudsp")
+ m_scudsp(*this, "scudsp")
{
}
@@ -212,7 +212,7 @@ void sega_scu_device::device_start()
save_item(NAME(m_t0c));
save_item(NAME(m_t1s));
save_item(NAME(m_t1md));
-
+
save_item(NAME(m_dma[0].src));
save_item(NAME(m_dma[0].dst));
save_item(NAME(m_dma[0].src_add));
@@ -246,13 +246,13 @@ void sega_scu_device::device_start()
save_item(NAME(m_dma[2].indirect_mode));
save_item(NAME(m_dma[2].rup));
save_item(NAME(m_dma[2].wup));
-
+
m_hostcpu = machine().device<sh2_device>(m_hostcpu_tag);
m_hostspace = &m_hostcpu->space(AS_PROGRAM);
m_dma_timer[0] = timer_alloc(DMALV0_ID);
m_dma_timer[1] = timer_alloc(DMALV1_ID);
- m_dma_timer[2] = timer_alloc(DMALV2_ID);
+ m_dma_timer[2] = timer_alloc(DMALV2_ID);
}
@@ -264,7 +264,7 @@ void sega_scu_device::device_reset()
{
m_ism = 0xbfff;
m_ist = 0;
-
+
for(int i=0;i<3;i++)
{
m_dma[i].start_factor = 7;
@@ -287,7 +287,7 @@ void sega_scu_device::device_reset_after_children()
void sega_scu_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
-
+
switch(id)
{
case DMALV0_ID:
@@ -297,7 +297,7 @@ void sega_scu_device::device_timer(emu_timer &timer, device_timer_id id, int par
const int irqlevel = id == 0 ? 5 : 6;
const int irqvector = 0x4b - id;
const uint16_t irqmask = 1 << (11-id);
-
+
if(!(m_ism & irqmask))
m_hostcpu->set_input_line_and_vector(irqlevel, HOLD_LINE, irqvector);
else
@@ -337,7 +337,7 @@ uint32_t sega_scu_device::dma_common_r(uint8_t offset,uint8_t level)
case 0x14/4:
return 0; // DxMOD / DxRUP / DxWUP / DxFT, write only
}
-
+
// can't happen anyway
return 0;
}
@@ -362,7 +362,7 @@ void sega_scu_device::dma_common_w(uint8_t offset,uint8_t level,uint32_t data)
break;
case 0x10/4: // DxEN / DxGO
m_dma[level].enable_mask = BIT(data,8);
-
+
// check if DxGO is enabled for start factor = 7
if(m_dma[level].enable_mask == true && data & 1 && m_dma[level].start_factor == 7)
{
@@ -383,7 +383,7 @@ void sega_scu_device::dma_common_w(uint8_t offset,uint8_t level,uint32_t data)
if(m_dma[level].wup == false)
m_dma[level].index = m_dma[level].dst;
}
-
+
break;
}
}
@@ -409,7 +409,7 @@ void sega_scu_device::handle_dma_direct(uint8_t level)
if(LOG_SCU) printf("Start Add %04x Destination Add %04x\n",m_scu.src_add[dma_ch],m_scu.dst_add[dma_ch]);
}
#endif
-
+
// Game Basic, World Cup 98 and Batman Forever trips this, according to the docs the SCU can't transfer from BIOS area (can't communicate from/to that bus)
if((m_dma[level].src & 0x07f00000) == 0)
{
@@ -422,7 +422,7 @@ void sega_scu_device::handle_dma_direct(uint8_t level)
}
update_dma_status(level,true);
-
+
/* max size */
if(m_dma[level].size == 0) { m_dma[level].size = (level == 0) ? 0x00100000 : 0x1000; }
@@ -514,7 +514,7 @@ void sega_scu_device::handle_dma_indirect(uint8_t level)
if(LOG_SCU) printf("Start Add %04x Destination Add %04x\n",m_scu.src_add[dma_ch],m_scu.dst_add[dma_ch]);
}
#endif
-
+
indirect_src &=0x07ffffff;
indirect_dst &=0x07ffffff;
indirect_size &= ((level == 0) ? 0xfffff : 0x3ffff); //TODO: Guardian Heroes sets up a 0x23000 transfer for the FMV?
@@ -581,7 +581,7 @@ inline void sega_scu_device::dma_start_factor_ack(uint8_t event)
if(m_dma[i].enable_mask == true && m_dma[i].start_factor == event)
{
if(m_dma[i].indirect_mode == true) { handle_dma_indirect(i); }
- else { handle_dma_direct(i); }
+ else { handle_dma_direct(i); }
}
}
}
@@ -627,9 +627,9 @@ void sega_scu_device::check_scanline_timers(int scanline,int y_step)
{
if(m_tenb == false)
return;
-
+
int timer0_compare = (m_t0c & 0x3ff)*y_step;
-
+
// Timer 0
if(scanline == timer0_compare)
{
@@ -641,9 +641,9 @@ void sega_scu_device::check_scanline_timers(int scanline,int y_step)
else
m_ist |= (IRQ_TIMER_0);
}
-
+
// Timer 1
- // TODO: should happen after some time when hblank-in is received then counts down t1s
+ // TODO: should happen after some time when hblank-in is received then counts down t1s
if(
((m_t1md == false) && ((scanline % y_step) == 0)) ||
((m_t1md == true) && (scanline == timer0_compare)) )
@@ -684,7 +684,7 @@ WRITE32_MEMBER(sega_scu_device::irq_status_w)
{
if(mem_mask != 0xffffffff)
logerror("%s IST write %08x with %08x\n",this->tag(),data,mem_mask);
-
+
m_ist &= data;
test_pending_irqs();
}
@@ -719,7 +719,7 @@ WRITE_LINE_MEMBER(sega_scu_device::vblank_out_w)
{
if(!state)
return;
-
+
if(!(m_ism & IRQ_VBLANK_OUT))
{
m_hostcpu->set_input_line_and_vector(0xe, HOLD_LINE, 0x41);
@@ -733,7 +733,7 @@ WRITE_LINE_MEMBER(sega_scu_device::vblank_in_w)
{
if(!state)
return;
-
+
if(!(m_ism & IRQ_VBLANK_IN))
{
m_hostcpu->set_input_line_and_vector(0xf, HOLD_LINE ,0x40);
@@ -747,7 +747,7 @@ WRITE_LINE_MEMBER(sega_scu_device::hblank_in_w)
{
if(!state)
return;
-
+
if(!(m_ism & IRQ_HBLANK_IN))
{
m_hostcpu->set_input_line_and_vector(0xd, HOLD_LINE, 0x42);
@@ -761,7 +761,7 @@ WRITE_LINE_MEMBER(sega_scu_device::vdp1_end_w)
{
if(!state)
return;
-
+
if(!(m_ism & IRQ_VDP1_END))
{
m_hostcpu->set_input_line_and_vector(0x2, HOLD_LINE, 0x4d);
@@ -789,7 +789,7 @@ WRITE_LINE_MEMBER(sega_scu_device::smpc_irq_w)
{
if(!state)
return;
-
+
if(!(m_ism & IRQ_SMPC))
m_hostcpu->set_input_line_and_vector(8, HOLD_LINE, 0x47);
else
diff --git a/src/devices/machine/sega_scu.h b/src/devices/machine/sega_scu.h
index 7e82bed1a8a..519a15ed3fb 100644
--- a/src/devices/machine/sega_scu.h
+++ b/src/devices/machine/sega_scu.h
@@ -2,7 +2,7 @@
// copyright-holders:Angelo Salese
/***************************************************************************
- Sega System Control Unit (c) 1995 Sega
+ Sega System Control Unit (c) 1995 Sega
***************************************************************************/
@@ -62,7 +62,7 @@ public:
DECLARE_READ32_MEMBER(dma_lv2_r);
DECLARE_WRITE32_MEMBER(dma_lv2_w);
DECLARE_READ32_MEMBER(dma_status_r);
-
+
// Timers
DECLARE_WRITE32_MEMBER(t0_compare_w);
DECLARE_WRITE32_MEMBER(t1_setdata_w);
@@ -73,7 +73,7 @@ public:
DECLARE_WRITE32_MEMBER(irq_mask_w);
DECLARE_WRITE32_MEMBER(irq_status_w);
DECLARE_READ32_MEMBER(version_r);
-
+
DECLARE_WRITE_LINE_MEMBER(vblank_out_w);
DECLARE_WRITE_LINE_MEMBER(vblank_in_w);
DECLARE_WRITE_LINE_MEMBER(hblank_in_w);
@@ -95,7 +95,7 @@ protected:
virtual void device_reset() override;
virtual void device_reset_after_children() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
+
private:
required_device<scudsp_cpu_device> m_scudsp;
@@ -104,7 +104,7 @@ private:
DMALV1_ID,
DMALV2_ID
};
-
+
emu_timer *m_dma_timer[3];
uint32_t m_ism;
uint32_t m_ist;
@@ -113,12 +113,12 @@ private:
uint32_t m_status;
bool m_t1md;
bool m_tenb;
-
- const char *m_hostcpu_tag;
+
+ const char *m_hostcpu_tag;
sh2_device *m_hostcpu;
address_space *m_hostspace;
void test_pending_irqs();
-
+
struct {
uint32_t src; /* Source DMA lv n address*/
uint32_t dst; /* Destination DMA lv n address*/
@@ -132,7 +132,7 @@ private:
bool rup;
bool wup;
}m_dma[3];
-
+
uint32_t dma_common_r(uint8_t offset,uint8_t level);
void dma_common_w(uint8_t offset,uint8_t level,uint32_t data);
void handle_dma_direct(uint8_t level);
diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp
index 1b4f36afb2d..ae017133bcc 100644
--- a/src/devices/machine/smpc.cpp
+++ b/src/devices/machine/smpc.cpp
@@ -179,7 +179,7 @@ DEFINE_DEVICE_TYPE(SMPC_HLE, smpc_hle_device, "smpc_hle", "Sega Saturn SMPC HLE
// TODO: use DEVICE_ADDRESS_MAP once this fatalerror is fixed:
// "uplift_submaps unhandled case: range straddling slots."
static ADDRESS_MAP_START( smpc_regs, 0, 8, smpc_hle_device )
-// ADDRESS_MAP_UNMAP_HIGH
+// ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00, 0x0d) AM_WRITE(ireg_w)
AM_RANGE(0x1f, 0x1f) AM_WRITE(command_register_w)
AM_RANGE(0x20, 0x5f) AM_READ(oreg_r)
@@ -205,7 +205,7 @@ smpc_hle_device::smpc_hle_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, SMPC_HLE, tag, owner, clock),
device_memory_interface(mconfig, *this),
m_space_config("regs", ENDIANNESS_LITTLE, 8, 7, 0, nullptr, *ADDRESS_MAP_NAME(smpc_regs)),
- m_mini_nvram(*this, "smem"),
+ m_mini_nvram(*this, "smem"),
m_mshres(*this),
m_mshnmi(*this),
m_sshres(*this),
@@ -249,7 +249,7 @@ void smpc_hle_device::static_set_control_port_tags(device_t &device, const char
MACHINE_CONFIG_MEMBER(smpc_hle_device::device_add_mconfig)
MCFG_NVRAM_ADD_0FILL("smem")
-
+
// TODO: custom RTC subdevice
MACHINE_CONFIG_END
@@ -261,11 +261,11 @@ void smpc_hle_device::device_start()
{
system_time systime;
machine().base_datetime(systime);
-
-// check if SMEM has valid data via byte 4 in the array, if not then simulate a battery backup fail
+
+// check if SMEM has valid data via byte 4 in the array, if not then simulate a battery backup fail
// (-> call the RTC / Language select menu for Saturn)
m_mini_nvram->set_base(&m_smem, 5);
-
+
m_mshres.resolve_safe();
m_mshnmi.resolve_safe();
m_sshres.resolve_safe();
@@ -274,12 +274,12 @@ void smpc_hle_device::device_start()
m_syshalt.resolve_safe();
m_dotsel.resolve_safe();
m_irq_line.resolve_safe();
-
+
m_pdr1_read.resolve_safe(0xff);
m_pdr2_read.resolve_safe(0xff);
m_pdr1_write.resolve_safe();
m_pdr2_write.resolve_safe();
-
+
save_item(NAME(m_sf));
save_item(NAME(m_sr));
save_item(NAME(m_ddr1));
@@ -299,15 +299,15 @@ void smpc_hle_device::device_start()
save_item(NAME(m_pmode));
save_item(NAME(m_rtc_data));
save_item(NAME(m_smem));
-
+
m_cmd_timer = timer_alloc(COMMAND_ID);
m_rtc_timer = timer_alloc(RTC_ID);
m_intback_timer = timer_alloc(INTBACK_ID);
m_sndres_timer = timer_alloc(SNDRES_ID);
-
-// TODO: tag-ify, needed when SCU will be a device
+
+// TODO: tag-ify, needed when SCU will be a device
m_screen = machine().first_screen();
-
+
m_rtc_data[0] = DectoBCD(systime.local_time.year / 100);
m_rtc_data[1] = DectoBCD(systime.local_time.year % 100);
m_rtc_data[2] = (systime.local_time.weekday << 4) | (systime.local_time.month+1);
@@ -321,7 +321,7 @@ void smpc_hle_device::device_start()
m_ctrl1 = downcast<saturn_control_port_device *>(machine().device(m_ctrl1_tag));
m_ctrl2 = downcast<saturn_control_port_device *>(machine().device(m_ctrl2_tag));
}
-// m_has_ctrl_ports = (m_ctrl1 != nullptr && m_ctrl2 != nullptr);
+// m_has_ctrl_ports = (m_ctrl1 != nullptr && m_ctrl2 != nullptr);
}
@@ -338,10 +338,10 @@ void smpc_hle_device::device_reset()
m_ddr2 = 0;
m_pdr1_readback = 0;
m_pdr2_readback = 0;
-
+
memset(m_ireg,0,7);
memset(m_oreg,0,32);
-
+
m_cmd_timer->reset();
m_intback_timer->reset();
m_sndres_timer->reset();
@@ -349,7 +349,7 @@ void smpc_hle_device::device_reset()
m_command_in_progress = false;
m_NMI_reset = false;
m_cur_dotsel = false;
-
+
m_rtc_timer->adjust(attotime::zero, 0, attotime::from_seconds(1));
}
@@ -369,10 +369,10 @@ WRITE8_MEMBER( smpc_hle_device::ireg_w )
{
if (!(offset & 1)) // avoid writing to even bytes
return;
-
+
m_ireg[offset >> 1] = data;
-
- if(offset == 1) // check if we are under intback
+
+ if(offset == 1) // check if we are under intback
{
if(m_intback_stage)
{
@@ -385,8 +385,8 @@ WRITE8_MEMBER( smpc_hle_device::ireg_w )
else if(data & 0x80)
{
if(LOG_PAD_CMD) printf("SMPC: CONTINUE request\n");
-
- m_intback_timer->adjust(attotime::from_usec(700)); // TODO: is timing correct?
+
+ m_intback_timer->adjust(attotime::from_usec(700)); // TODO: is timing correct?
// TODO: following looks wrong here
m_oreg[31] = 0x10;
@@ -397,7 +397,7 @@ WRITE8_MEMBER( smpc_hle_device::ireg_w )
}
READ8_MEMBER( smpc_hle_device::oreg_r )
-{
+{
if (!(offset & 1)) // avoid reading to even bytes (TODO: is it 0s or 1s?)
return 0x00;
@@ -424,14 +424,14 @@ WRITE8_MEMBER( smpc_hle_device::status_flag_w )
READ8_MEMBER( smpc_hle_device::pdr1_r )
{
uint8_t res = (m_pdr1_read() & ~m_ddr1) | m_pdr1_readback;
-
+
return res;
}
READ8_MEMBER( smpc_hle_device::pdr2_r )
{
uint8_t res = (m_pdr2_read() & ~m_ddr2) | m_pdr2_readback;
-
+
return res;
}
@@ -540,26 +540,26 @@ WRITE8_MEMBER( smpc_hle_device::write )
WRITE8_MEMBER( smpc_hle_device::command_register_w )
{
-// don't send a command if previous one is still in progress
+// don't send a command if previous one is still in progress
// ST-V tries to send a sysres command if OREG31 doesn't return the ack command
if(m_command_in_progress == true)
return;
-
+
m_comreg = data & 0x1f;
-
+
if(data & 0xe0)
logerror("%s COMREG = %02x!?\n",this->tag(),data);
-
+
m_command_in_progress = true;
if(m_comreg == 0x0e || m_comreg == 0x0f)
{
/* on ST-V timing of this is pretty fussy, you get 2 credits at start-up otherwise
- * My current theory is that the PLL device can halt the whole system until the frequency change occurs.
- * (cfr. diagram on page 3 of SMPC manual)
+ * My current theory is that the PLL device can halt the whole system until the frequency change occurs.
+ * (cfr. diagram on page 3 of SMPC manual)
* I really don't think that the system can do an usable mid-frame clock switching anyway.
*/
m_syshalt(1);
-
+
m_cmd_timer->adjust(m_screen->time_until_pos(m_screen->visible_area().max_y,0));
}
else if(m_comreg == 0x10)
@@ -567,7 +567,7 @@ WRITE8_MEMBER( smpc_hle_device::command_register_w )
// copy ireg to our intback buffer
for(int i=0;i<3;i++)
m_intback_buf[i] = m_ireg[i];
-
+
// calculate the timing for intback command
int timing;
@@ -576,12 +576,12 @@ WRITE8_MEMBER( smpc_hle_device::command_register_w )
if( m_ireg[0] != 0) // non-peripheral data
timing += 8;
- // TODO: At vblank-out actually ...
+ // TODO: At vblank-out actually ...
if( m_ireg[1] & 8) // peripheral data
timing += 700;
-
+
// TODO: check against ireg2, must be 0xf0
-
+
m_cmd_timer->adjust(attotime::from_usec(timing));
}
else
@@ -607,7 +607,7 @@ void smpc_hle_device::device_timer(emu_timer &timer, device_timer_id id, int par
// enable or disable Slave SH2
m_sshres(m_comreg & 1);
break;
-
+
case 0x06: // SNDON
case 0x07: // SNDOFF
// enable or disable 68k
@@ -621,15 +621,15 @@ void smpc_hle_device::device_timer(emu_timer &timer, device_timer_id id, int par
m_oreg[31] = m_comreg;
sf_ack(true); //clear hand-shake flag (TODO: diagnostic wants this to have bit 3 high)
return;
-
-// case 0x0a: // NETLINKON
-// case 0x0b: // NETLINKOFF
-
+
+// case 0x0a: // NETLINKON
+// case 0x0b: // NETLINKOFF
+
case 0x0d: // SYSRES
// send a 1 -> 0 to device reset lines
m_sysres(1);
m_sysres(0);
-
+
// send a 1 -> 0 transition to reset line (was PULSE_LINE)
m_mshres(1);
m_mshres(0);
@@ -638,7 +638,7 @@ void smpc_hle_device::device_timer(emu_timer &timer, device_timer_id id, int par
case 0x0e: // CKCHG352
case 0x0f: // CKCHG320
m_dotsel(m_comreg & 1);
-
+
// send a NMI to Master SH2 if enabled
if(m_NMI_reset == false)
master_sh2_nmi();
@@ -647,22 +647,22 @@ void smpc_hle_device::device_timer(emu_timer &timer, device_timer_id id, int par
m_sshres(1);
// clear PLL system halt
m_syshalt(0);
-
+
// setup the new dot select
m_cur_dotsel = (m_comreg & 1) ^ 1;
break;
case 0x10: // INTBACK
resolve_intback();
- return;
-
+ return;
+
case 0x16: // SETTIME
{
for(int i=0;i<7;i++)
m_rtc_data[i] = m_ireg[i];
break;
}
-
+
case 0x17: // SETSMEM
{
for(int i=0;i<4;i++)
@@ -672,7 +672,7 @@ void smpc_hle_device::device_timer(emu_timer &timer, device_timer_id id, int par
m_smem[4] = 0xff;
break;
}
-
+
case 0x18: // NMIREQ
// NMI is unconditionally requested
master_sh2_nmi();
@@ -712,11 +712,11 @@ void smpc_hle_device::device_timer(emu_timer &timer, device_timer_id id, int par
void smpc_hle_device::resolve_intback()
{
int i;
-
+
m_command_in_progress = false;
if(m_intback_buf[0] != 0)
- {
+ {
m_oreg[0] = ((m_smem[4] & 0x80) | ((m_NMI_reset & 1) << 6));
for(i=0;i<7;i++)
@@ -725,11 +725,11 @@ void smpc_hle_device::resolve_intback()
m_oreg[8] = 0; // CTG0 / CTG1?
m_oreg[9] = m_region_code; // TODO: system region on Saturn
-
+
/*
0-11 -1-- unknown
-x-- ---- VDP2 dot select
- ---- x--- MSHNMI
+ ---- x--- MSHNMI
---- --x- SYSRES
---- ---x SOUNDRES
*/
@@ -741,7 +741,7 @@ void smpc_hle_device::resolve_intback()
1 << 2 |
0 << 1 |
0 << 0;
-
+
m_oreg[11] = 0 << 6; // CDRES
for(i=0;i<4;i++)
@@ -755,7 +755,7 @@ void smpc_hle_device::resolve_intback()
m_pmode = m_intback_buf[0]>>4;
irq_request();
-
+
// put issued command in OREG31
m_oreg[31] = 0x10; // TODO: doc says 0?
/* clear hand-shake flag */
@@ -780,7 +780,7 @@ void smpc_hle_device::intback_continue_request()
{
if( m_has_ctrl_ports == true )
read_saturn_ports();
-
+
if (m_intback_stage == 2)
{
sr_set(0x80 | m_pmode); // pad 2, no more data, echo back pad mode set by intback
@@ -793,8 +793,8 @@ void smpc_hle_device::intback_continue_request()
}
irq_request();
- m_oreg[31] = 0x10; // callback for last command issued
- sf_ack(false);
+ m_oreg[31] = 0x10; // callback for last command issued
+ sf_ack(false);
}
int smpc_hle_device::DectoBCD(int num)
@@ -940,21 +940,21 @@ void smpc_hle_device::read_saturn_ports()
for (int i = 0; i < (status1 & 0xf); i++)
{
uint8_t id = m_ctrl1->read_id(i);
-
+
m_oreg[reg_offset++] = id;
for (int j = 0; j < (id & 0xf); j++)
m_oreg[reg_offset++] = m_ctrl1->read_ctrl(j + ctrl1_offset);
ctrl1_offset += (id & 0xf);
}
-
+
m_oreg[reg_offset++] = status2;
// read ctrl2
for (int i = 0; i < (status2 & 0xf); i++)
{
uint8_t id = m_ctrl2->read_id(i);
-
+
m_oreg[reg_offset++] = id;
for (int j = 0; j < (id & 0xf); j++)
diff --git a/src/devices/machine/smpc.h b/src/devices/machine/smpc.h
index 99d857acff5..c3977db9015 100644
--- a/src/devices/machine/smpc.h
+++ b/src/devices/machine/smpc.h
@@ -28,7 +28,7 @@
#define MCFG_SMPC_HLE_PDR2_IN_CB(_devcb) \
devcb = &smpc_hle_device::set_pdr2_in_handler(*device, DEVCB_##_devcb);
-
+
#define MCFG_SMPC_HLE_PDR1_OUT_CB(_devcb) \
devcb = &smpc_hle_device::set_pdr1_out_handler(*device, DEVCB_##_devcb);
@@ -75,7 +75,7 @@ public:
smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
-// DECLARE_ADDRESS_MAP( io_map, 8);
+// DECLARE_ADDRESS_MAP( io_map, 8);
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@@ -95,11 +95,11 @@ public:
DECLARE_WRITE8_MEMBER( exle_w );
DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi_r );
- void m68k_reset_trigger();
+ void m68k_reset_trigger();
bool get_iosel(bool which);
uint8_t get_ddr(bool which);
-
-// system delegation
+
+// system delegation
template <class Object> static devcb_base &set_master_reset_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_mshres.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_master_nmi_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_mshnmi.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_slave_reset_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_sshres.set_callback(std::forward<Object>(cb)); }
@@ -109,7 +109,7 @@ public:
template <class Object> static devcb_base &set_dot_select_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_dotsel.set_callback(std::forward<Object>(cb)); }
-// PDR delegation
+// PDR delegation
template <class Object> static devcb_base &set_pdr1_in_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_pdr1_read.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_pdr2_in_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_pdr2_read.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_pdr1_out_handler(device_t &device, Object &&cb) { return downcast<smpc_hle_device &>(device).m_pdr1_write.set_callback(std::forward<Object>(cb)); }
@@ -123,7 +123,7 @@ public:
protected:
// device-level overrides
-// virtual void device_validity_check(validity_checker &valid) const override;
+// virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
@@ -147,7 +147,7 @@ private:
const char *m_ctrl1_tag;
const char *m_ctrl2_tag;
bool m_has_ctrl_ports;
-
+
bool m_sf;
bool m_cd_sf;
uint8_t m_sr;
@@ -163,8 +163,8 @@ private:
uint8_t m_comreg;
// in usec
// timing table, from manual in usec
- const uint32_t m_cmd_table_timing[0x20] =
- {
+ const uint32_t m_cmd_table_timing[0x20] =
+ {
30, 30, // MASTER ON / OFF
30, 30, // SLAVE ON / OFF
10, 10, // <unknown>
@@ -188,7 +188,7 @@ private:
void intback_continue_request();
void handle_rtc_increment();
void read_saturn_ports();
-
+
void sr_set(uint8_t data);
void sr_ack();
void sf_ack(bool cd_enable);
@@ -202,10 +202,10 @@ private:
devcb_write_line m_mshres;
devcb_write_line m_mshnmi;
devcb_write_line m_sshres;
-// devcb_write_line m_sshnmi;
+// devcb_write_line m_sshnmi;
devcb_write_line m_sndres;
devcb_write_line m_sysres;
-// devcb_write_line m_cdres;
+// devcb_write_line m_cdres;
devcb_write_line m_syshalt;
devcb_write_line m_dotsel;
devcb_read8 m_pdr1_read;
diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp
index e1cf25e6214..87b3b9e344c 100644
--- a/src/devices/machine/stvcd.cpp
+++ b/src/devices/machine/stvcd.cpp
@@ -1383,7 +1383,7 @@ void saturn_state::cd_exec_command( void )
if(cr2 == 0x0001) // MPEG card
cr2 = 0x2;
else
- cr2 = 0x4; // 0 = No CD, 1 = Audio CD, 2 Regular Data disk (not Saturn), 3 pirate disc, 4 Saturn disc
+ cr2 = 0x4; // 0 = No CD, 1 = Audio CD, 2 Regular Data disk (not Saturn), 3 pirate disc, 4 Saturn disc
cr3 = 0;
cr4 = 0;
hirqreg |= (CMOK);
@@ -1410,19 +1410,19 @@ void saturn_state::cd_exec_command( void )
cr4 = 0;
hirqreg |= (CMOK);
break;
-
+
// MPEG init
case 0x93:
hirqreg |= (CMOK|MPED);
if(cr2 == 0x0001)
hirqreg |= (MPCM);
-
+
cr1 = cd_stat;
cr2 = 0;
cr3 = 0;
cr4 = 0;
break;
-
+
default:
CDROM_LOG(("CD: Unknown command %04x\n", cr1>>8))
popmessage("CD Block unknown command %02x, contact MAMEdev",cr1>>8);
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp
index 6f294a0ddcb..ebdef5e346b 100644
--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -397,7 +397,7 @@ int z80scc_device::z80daisy_irq_ack()
}
}
- // Did we not find a vector? Get the notion of a default vector from the CPU implementation
+ // Did we not find a vector? Get the notion of a default vector from the CPU implementation
if (ret == -1 && m_cputag != nullptr)
{
// default irq vector is -1 for 68000 but 0 for z80 for example...
diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp
index ff8b0f18b84..a18be27d9c0 100644
--- a/src/devices/machine/z80sio.cpp
+++ b/src/devices/machine/z80sio.cpp
@@ -263,7 +263,7 @@ int z80sio_device::z80daisy_irq_ack()
break;
}
}
- // Did we not find a vector? Get the notion of a default vector from the CPU implementation
+ // Did we not find a vector? Get the notion of a default vector from the CPU implementation
if (ret == -1 && m_cputag != nullptr)
{
// default irq vector is -1 for 68000 but 0 for z80 for example...