summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine')
-rw-r--r--src/emu/machine/hdc9234.c14
-rw-r--r--src/emu/machine/hdc9234.h2
-rw-r--r--src/emu/machine/mos6530n.c2
-rw-r--r--src/emu/machine/mos6530n.h2
-rw-r--r--src/emu/machine/pci9050.c28
-rw-r--r--src/emu/machine/pci9050.h8
-rw-r--r--src/emu/machine/ti99_hd.c110
-rw-r--r--src/emu/machine/ti99_hd.h48
-rw-r--r--src/emu/machine/vrc4373.h18
-rw-r--r--src/emu/machine/z80pio.c6
10 files changed, 119 insertions, 119 deletions
diff --git a/src/emu/machine/hdc9234.c b/src/emu/machine/hdc9234.c
index f3b6077db3f..c77783e463c 100644
--- a/src/emu/machine/hdc9234.c
+++ b/src/emu/machine/hdc9234.c
@@ -240,7 +240,7 @@ enum
{
GEN_TIMER = 1,
COM_TIMER /*,
- LIVE_TIMER */
+ LIVE_TIMER */
};
/*
@@ -1820,7 +1820,7 @@ void hdc9234_device::live_run()
the requested data are read.
limit: if unlimited (attotime::never), run up to the end of the track and wait there
otherwise, used to replay the read/write operation up to the point where the event happened
-
+
THIS IS THE FLOPPY-ONLY LIVE_RUN
*/
void hdc9234_device::live_run_until(attotime limit)
@@ -2632,12 +2632,12 @@ void hdc9234_device::live_run_until(attotime limit)
the requested data are read.
limit: if unlimited (attotime::never), run up to the end of the track and wait there
otherwise, used to replay the read/write operation up to the point where the event happened
-
+
THIS IS THE HARDDISK-ONLY LIVE_RUN
*/
void hdc9234_device::live_run_hd_until(attotime limit)
{
-// int slot = 0;
+// int slot = 0;
logerror("%s: live_run_hd\n", tag());
if (m_live_state.state == IDLE || m_live_state.next_state != -1)
@@ -2656,7 +2656,7 @@ void hdc9234_device::live_run_hd_until(attotime limit)
{
case SEARCH_IDAM:
break;
- }
+ }
return;
}
}
@@ -3411,8 +3411,8 @@ void hdc9234_device::device_timer(emu_timer &timer, device_timer_id id, int para
process_command();
break;
/* case LIVE_TIMER:
- live_run();
- break; */
+ live_run();
+ break; */
}
}
diff --git a/src/emu/machine/hdc9234.h b/src/emu/machine/hdc9234.h
index a933f6b1959..8317545c552 100644
--- a/src/emu/machine/hdc9234.h
+++ b/src/emu/machine/hdc9234.h
@@ -227,7 +227,7 @@ private:
// Analyses the track until the given time
void live_run_until(attotime limit);
-
+
// Same for hard disks
void live_run_hd_until(attotime limit);
diff --git a/src/emu/machine/mos6530n.c b/src/emu/machine/mos6530n.c
index 70af89279bd..64e13126a1c 100644
--- a/src/emu/machine/mos6530n.c
+++ b/src/emu/machine/mos6530n.c
@@ -247,7 +247,7 @@ void mos6530_t::update_pb()
}
else
{
- m_out_pb_cb(data);
+ m_out_pb_cb(data);
}
}
diff --git a/src/emu/machine/mos6530n.h b/src/emu/machine/mos6530n.h
index 88cd4a56558..22be75989b4 100644
--- a/src/emu/machine/mos6530n.h
+++ b/src/emu/machine/mos6530n.h
@@ -46,7 +46,7 @@
//**************************************************************************
#define MCFG_MOS6530n_IRQ_CB(_write) \
- devcb = &mos6530_t::set_irq_wr_callback(*device, DEVCB_##_write);
+ devcb = &mos6530_t::set_irq_wr_callback(*device, DEVCB_##_write);
#define MCFG_MOS6530n_IN_PA_CB(_read) \
devcb = &mos6530_t::set_pa_rd_callback(*device, DEVCB_##_read);
diff --git a/src/emu/machine/pci9050.c b/src/emu/machine/pci9050.c
index 258118df1fd..ed8e58e2497 100644
--- a/src/emu/machine/pci9050.c
+++ b/src/emu/machine/pci9050.c
@@ -1,9 +1,9 @@
/*********************************************************************
pci9050.c - PLX PCI9050 PCI to 4x Local Bus Bridge
-
- by R. Belmont
-
+
+ by R. Belmont
+
PCI spaces:
0 - (config memory) not used
1 - (config I/O) config regs
@@ -11,12 +11,12 @@
3 - local bus 2 window
4 - local bus 3 window
5 - local bus 4 window
-
+
PCI9050 is located, mapped, and initialized at BFC00700.
-
- The boot ROM then copies ROM to RAM, jumps to RAM, and starts trying to
+
+ The boot ROM then copies ROM to RAM, jumps to RAM, and starts trying to
access Zeus 2 video through the mapped windows.
-
+
*********************************************************************/
#include "pci9050.h"
@@ -66,12 +66,12 @@ void pci9050_device::device_start()
pci_device::device_start();
- add_map(0x100, M_MEM, FUNC(pci9050_device::map)); // map 0 is our config registers, mem space
- add_map(0x100, M_IO, FUNC(pci9050_device::map)); // map 1 is our config registers, i/o space
+ add_map(0x100, M_MEM, FUNC(pci9050_device::map)); // map 0 is our config registers, mem space
+ add_map(0x100, M_IO, FUNC(pci9050_device::map)); // map 1 is our config registers, i/o space
for(int i=0; i<4; i++)
if(m_names[i])
- // add_map(0, M_MEM | M_DISABLED, m_maps[i], m_names[i], m_devices[i]);
+ // add_map(0, M_MEM | M_DISABLED, m_maps[i], m_names[i], m_devices[i]);
add_map(0, M_MEM | M_DISABLED, trampolines[i], m_names[i]);
else
add_map(0, M_MEM | M_DISABLED, FUNC(pci9050_device::empty));
@@ -119,8 +119,8 @@ void pci9050_device::remap_local(int id)
int size = 2 << lsize;
if(csbase & 0x0fffffff & ~(size-1)) {
logerror("PCI9050 local bus %d disabled due to unimplemented post-decode remapping\n", id);
- // set_map_flags(id+2, M_MEM | M_DISABLED);
- // return;
+ // set_map_flags(id+2, M_MEM | M_DISABLED);
+ // return;
}
UINT32 mask = ~(size - 1);
@@ -131,8 +131,8 @@ void pci9050_device::remap_local(int id)
if((lasrr & mask) != mask) {
logerror("PCI9050 local bus %d disabled due to unimplemented pci mirroring\n", id);
- // set_map_flags(id+2, M_MEM | M_DISABLED);
- // return;
+ // set_map_flags(id+2, M_MEM | M_DISABLED);
+ // return;
}
set_map_size(id+2, size);
diff --git a/src/emu/machine/pci9050.h b/src/emu/machine/pci9050.h
index 88167adbb03..556290ad81c 100644
--- a/src/emu/machine/pci9050.h
+++ b/src/emu/machine/pci9050.h
@@ -1,9 +1,9 @@
/*********************************************************************
pci9050.h - PLX PCI9050 PCI to 4x Local Bus Bridge
-
- by R. Belmont
-
+
+ by R. Belmont
+
*********************************************************************/
#ifndef _PCI9050_H
@@ -17,7 +17,7 @@
#define MCFG_PCI9050_SET_MAP(id, map) \
downcast<pci9050_device *>(device)->set_map(id, ADDRESS_MAP_NAME(map), #map, owner);
-class pci9050_device :
+class pci9050_device :
public pci_device
{
public:
diff --git a/src/emu/machine/ti99_hd.c b/src/emu/machine/ti99_hd.c
index 87946c42990..96627f0978d 100644
--- a/src/emu/machine/ti99_hd.c
+++ b/src/emu/machine/ti99_hd.c
@@ -11,7 +11,7 @@
References:
[1] ST225 OEM Manual, Seagate
-
+
**************************************************************************/
#include "emu.h"
@@ -31,7 +31,7 @@
#define GAP4 340
#define SYNC 13
-enum
+enum
{
INDEX_TM = 0,
SPINUP_TM,
@@ -47,7 +47,7 @@ enum
mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source),
- device_slot_card_interface(mconfig, *this)
+ device_slot_card_interface(mconfig, *this)
{
}
@@ -56,7 +56,7 @@ void mfm_harddisk_device::device_start()
m_index_timer = timer_alloc(INDEX_TM);
m_spinup_timer = timer_alloc(SPINUP_TM);
m_seek_timer = timer_alloc(SEEK_TM);
-
+
// MFM drives have a revolution rate of 3600 rpm (i.e. 60/sec)
m_index_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
@@ -112,12 +112,12 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int
case STEP_MOVING:
// Head has reached final position
// Check whether we have a new delta
- if (m_track_delta == 0)
+ if (m_track_delta == 0)
{
// Start the settle timer
m_step_phase = STEP_SETTLE;
m_seek_timer->adjust(attotime::from_usec(16800));
- logerror("%s: Arrived at target track %d, settling ...\n", tag(), m_current_cylinder);
+ logerror("%s: Arrived at target track %d, settling ...\n", tag(), m_current_cylinder);
}
break;
case STEP_SETTLE:
@@ -126,7 +126,7 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int
else
{
// Seek completed
- logerror("%s: Settling done at cylinder %d, seek complete\n", tag(), m_current_cylinder);
+ logerror("%s: Settling done at cylinder %d, seek complete\n", tag(), m_current_cylinder);
m_seek_complete = true;
m_seek_complete_cb(this, ASSERT_LINE);
m_step_phase = STEP_COLLECT;
@@ -136,11 +136,11 @@ void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int
}
}
-void mfm_harddisk_device::head_move()
+void mfm_harddisk_device::head_move()
{
int steps = m_track_delta;
- if (steps < 0) steps = -steps;
- logerror("%s: Moving head by %d step(s) %s\n", tag(), steps, (m_track_delta<0)? "outward" : "inward");
+ if (steps < 0) steps = -steps;
+ logerror("%s: Moving head by %d step(s) %s\n", tag(), steps, (m_track_delta<0)? "outward" : "inward");
int disttime = steps*200;
m_step_phase = STEP_MOVING;
@@ -153,72 +153,72 @@ void mfm_harddisk_device::head_move()
m_track_delta = 0;
}
-void mfm_harddisk_device::direction_in_w(line_state line)
+void mfm_harddisk_device::direction_in_w(line_state line)
{
m_seek_inward = (line == ASSERT_LINE);
logerror("%s: Setting seek direction %s\n", tag(), m_seek_inward? "inward" : "outward");
}
/*
- According to the specs [1]:
-
- "4.3.1 BUFFERED SEEK: To minimize access time, pulses may be issued at an
- accelerated rate and buffered in a counter. Initiation of a seek starts
- immediately after the first pulse is received. Head motion occurs during
- pulse accumulation, and the seek is completed following receipt of all pulses."
-
- "8.1.3 SEEKING: Upon receiving a Step pulse, the MPU (microprocessor unit)
+ According to the specs [1]:
+
+ "4.3.1 BUFFERED SEEK: To minimize access time, pulses may be issued at an
+ accelerated rate and buffered in a counter. Initiation of a seek starts
+ immediately after the first pulse is received. Head motion occurs during
+ pulse accumulation, and the seek is completed following receipt of all pulses."
+
+ "8.1.3 SEEKING: Upon receiving a Step pulse, the MPU (microprocessor unit)
pauses for 250 usec to allow for additional pulses before executing the seek
- operation. Every incoming pulse resets the 250 usec timer. The seek will
- not begin until the last pulse is received."
-
- WTF? Oh come on, Seagate, be consistent at least in a single document.
-
- ================================
-
- Step behaviour:
- During all waiting times, further step_w invocations increase the counter
-
- - Leading edge increments the counter c and sets the timer to 250us (mode=collect)
- - When the timer expires (mode=collect):
+ operation. Every incoming pulse resets the 250 usec timer. The seek will
+ not begin until the last pulse is received."
+
+ WTF? Oh come on, Seagate, be consistent at least in a single document.
+
+ ================================
+
+ Step behaviour:
+ During all waiting times, further step_w invocations increase the counter
+
+ - Leading edge increments the counter c and sets the timer to 250us (mode=collect)
+ - When the timer expires (mode=collect):
(1)- Calculate the stepping time: time = c*200us; save the counter
- - Start the timer (mode=move)
- - When the timer expires (mode=move)
- - Add the track delta to the current track position
- - Subtract the delta from the current counter
- - When the counter is not zero (pulses arrived in the meantime), go to (1)
- - When the counter is zero, set the timer to 16.8 ms (mode=settle)
- - When the timer expires (mode=settle)
- - When the counter is not zero, go to (1)
- - When the counter is zero, signal seek_complete; done
-
+ - Start the timer (mode=move)
+ - When the timer expires (mode=move)
+ - Add the track delta to the current track position
+ - Subtract the delta from the current counter
+ - When the counter is not zero (pulses arrived in the meantime), go to (1)
+ - When the counter is zero, set the timer to 16.8 ms (mode=settle)
+ - When the timer expires (mode=settle)
+ - When the counter is not zero, go to (1)
+ - When the counter is zero, signal seek_complete; done
+
Step timing:
- per track = 20 ms max, full seek: 150 ms max (615 tracks); both including settling time
- We assume t(1) = 17; t(615)=140
- t(i) = s+d*i
- s=(615*t(1)-t(615))/614
- d=t(1)-s
- s=16800 us, d=200 us
-*/
-
-void mfm_harddisk_device::step_w(line_state line)
+ per track = 20 ms max, full seek: 150 ms max (615 tracks); both including settling time
+ We assume t(1) = 17; t(615)=140
+ t(i) = s+d*i
+ s=(615*t(1)-t(615))/614
+ d=t(1)-s
+ s=16800 us, d=200 us
+*/
+
+void mfm_harddisk_device::step_w(line_state line)
{
// Leading edge
if (line == ASSERT_LINE && m_step_line == CLEAR_LINE)
{
- if (m_seek_complete)
+ if (m_seek_complete)
{
- m_step_phase = STEP_COLLECT;
+ m_step_phase = STEP_COLLECT;
m_seek_complete = false;
m_seek_complete_cb(this, CLEAR_LINE);
}
// Counter will be adjusted according to the direction (+-1)
- m_track_delta += (m_seek_inward)? +1 : -1;
+ m_track_delta += (m_seek_inward)? +1 : -1;
logerror("%s: Got seek pulse; track delta %d\n", tag(), m_track_delta);
- if (m_track_delta < -670 || m_track_delta > 670)
+ if (m_track_delta < -670 || m_track_delta > 670)
{
- logerror("%s: Excessive step pulses - doing auto-truncation\n", tag());
+ logerror("%s: Excessive step pulses - doing auto-truncation\n", tag());
m_autotruncation = true;
}
m_seek_timer->adjust(attotime::from_usec(250));
diff --git a/src/emu/machine/ti99_hd.h b/src/emu/machine/ti99_hd.h
index b31f5420fb3..bdeb80c8118 100644
--- a/src/emu/machine/ti99_hd.h
+++ b/src/emu/machine/ti99_hd.h
@@ -18,7 +18,7 @@
#include "imagedev/harddriv.h"
class mfm_harddisk_device : public harddisk_image_device,
- public device_slot_card_interface
+ public device_slot_card_interface
{
public:
mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
@@ -30,34 +30,34 @@ public:
void setup_seek_complete_cb(seek_complete_cb cb);
// Active low lines. We're using ASSERT=0 / CLEAR=1
- line_state ready_r() { return m_ready? ASSERT_LINE : CLEAR_LINE; }
- line_state seek_complete_r() { return m_seek_complete? ASSERT_LINE : CLEAR_LINE; } ;
- line_state trk00_r() { return m_current_cylinder==0? ASSERT_LINE : CLEAR_LINE; }
+ line_state ready_r() { return m_ready? ASSERT_LINE : CLEAR_LINE; }
+ line_state seek_complete_r() { return m_seek_complete? ASSERT_LINE : CLEAR_LINE; } ;
+ line_state trk00_r() { return m_current_cylinder==0? ASSERT_LINE : CLEAR_LINE; }
// Step
- void step_w(line_state line);
- void direction_in_w(line_state line);
-
+ void step_w(line_state line);
+ void direction_in_w(line_state line);
+
protected:
- void device_start();
- void device_reset();
- emu_timer *m_index_timer, *m_spinup_timer, *m_seek_timer;
- index_pulse_cb m_index_pulse_cb;
- seek_complete_cb m_seek_complete_cb;
- void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+ void device_start();
+ void device_reset();
+ emu_timer *m_index_timer, *m_spinup_timer, *m_seek_timer;
+ index_pulse_cb m_index_pulse_cb;
+ seek_complete_cb m_seek_complete_cb;
+ void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
- bool m_ready;
- int m_current_cylinder;
- int m_track_delta;
- int m_step_phase;
- bool m_seek_complete;
- bool m_seek_inward;
- //bool m_seeking;
- bool m_autotruncation;
- line_state m_step_line; // keep the last state
-
- void head_move();
+ bool m_ready;
+ int m_current_cylinder;
+ int m_track_delta;
+ int m_step_phase;
+ bool m_seek_complete;
+ bool m_seek_inward;
+ //bool m_seeking;
+ bool m_autotruncation;
+ line_state m_step_line; // keep the last state
+
+ void head_move();
};
class mfm_hd_generic_device : public mfm_harddisk_device
diff --git a/src/emu/machine/vrc4373.h b/src/emu/machine/vrc4373.h
index 51c774d4f9a..b620e9f6d20 100644
--- a/src/emu/machine/vrc4373.h
+++ b/src/emu/machine/vrc4373.h
@@ -45,15 +45,15 @@
#define NREG_PCIEN (0x074/4)
#define NREG_PMIR (0x078/4)
-#define DMA_BUSY 0x80000000
-#define DMA_INT_EN 0x40000000
-#define DMA_RW 0x20000000
-#define DMA_GO 0x10000000
-#define DMA_SUS 0x08000000
-#define DMA_INC 0x04000000
-#define DMA_MIO 0x02000000
-#define DMA_RST 0x01000000
-#define DMA_BLK_SIZE 0x000fffff
+#define DMA_BUSY 0x80000000
+#define DMA_INT_EN 0x40000000
+#define DMA_RW 0x20000000
+#define DMA_GO 0x10000000
+#define DMA_SUS 0x08000000
+#define DMA_INC 0x04000000
+#define DMA_MIO 0x02000000
+#define DMA_RST 0x01000000
+#define DMA_BLK_SIZE 0x000fffff
class vrc4373_device : public pci_host_device {
diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c
index b53b3fe6158..ea5da25e221 100644
--- a/src/emu/machine/z80pio.c
+++ b/src/emu/machine/z80pio.c
@@ -11,9 +11,9 @@
/*
- TODO:
+ TODO:
- - if port A is bidirectional, port B does not issue interrupts in bit mode
+ - if port A is bidirectional, port B does not issue interrupts in bit mode
*/
@@ -255,7 +255,7 @@ void z80pio_device::check_interrupts()
for (int index = PORT_A; index < PORT_COUNT; index++)
{
if (LOG) logerror("Z80PIO '%s' Port %c IE %s IP %s IUS %s\n", tag(), 'A' + index, m_port[index].m_ie ? "1":"0", m_port[index].m_ip ? "1":"0", m_port[index].m_ius ? "1":"0");
-
+
if (!ius && m_port[index].m_ie && m_port[index].m_ip)
{
state = ASSERT_LINE;