summaryrefslogtreecommitdiffstats
path: root/src/devices/machine/wozfdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/wozfdc.cpp')
-rw-r--r--src/devices/machine/wozfdc.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp
index d85b8110e82..22a76b941fe 100644
--- a/src/devices/machine/wozfdc.cpp
+++ b/src/devices/machine/wozfdc.cpp
@@ -44,17 +44,17 @@ const tiny_rom_entry *wozfdc_device::device_rom_region() const
// LIVE DEVICE
//**************************************************************************
-wozfdc_device::wozfdc_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) :
+wozfdc_device::wozfdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source)
{
}
-diskii_fdc::diskii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+diskii_fdc::diskii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
wozfdc_device(mconfig, DISKII_FDC, "Apple Disk II floppy controller", tag, owner, clock, "d2fdc", __FILE__)
{
}
-appleiii_fdc::appleiii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+appleiii_fdc::appleiii_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
wozfdc_device(mconfig, DISKII_FDC, "Apple III floppy controller", tag, owner, clock, "a3fdc", __FILE__)
{
}
@@ -313,17 +313,17 @@ void wozfdc_device::control(int offset)
}
}
-UINT64 wozfdc_device::time_to_cycles(const attotime &tm)
+uint64_t wozfdc_device::time_to_cycles(const attotime &tm)
{
// Clock is falling edges of the ~2Mhz clock
// The 1021800 must be the controlling 6502's speed
- UINT64 cycles = tm.as_ticks(clock()*2);
+ uint64_t cycles = tm.as_ticks(clock()*2);
cycles = (cycles+1) >> 1;
return cycles;
}
-attotime wozfdc_device::cycles_to_time(UINT64 cycles)
+attotime wozfdc_device::cycles_to_time(uint64_t cycles)
{
return attotime::from_ticks(cycles*2+1, clock()*2);
}
@@ -347,9 +347,9 @@ void wozfdc_device::lss_sync()
attotime next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles-1)) : attotime::never;
- UINT64 cycles_limit = time_to_cycles(machine().time());
- UINT64 cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1);
- UINT64 cycles_next_flux_down = cycles_next_flux != UINT64(-1) ? cycles_next_flux+1 : UINT64(-1);
+ uint64_t cycles_limit = time_to_cycles(machine().time());
+ uint64_t cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : uint64_t(-1);
+ uint64_t cycles_next_flux_down = cycles_next_flux != uint64_t(-1) ? cycles_next_flux+1 : uint64_t(-1);
if(cycles >= cycles_next_flux && cycles < cycles_next_flux_down)
address &= ~0x10;
@@ -357,14 +357,14 @@ void wozfdc_device::lss_sync()
address |= 0x10;
while(cycles < cycles_limit) {
- UINT64 cycles_next_trans = cycles_limit;
+ uint64_t cycles_next_trans = cycles_limit;
if(cycles_next_trans > cycles_next_flux && cycles < cycles_next_flux)
cycles_next_trans = cycles_next_flux;
if(cycles_next_trans > cycles_next_flux_down && cycles < cycles_next_flux_down)
cycles_next_trans = cycles_next_flux_down;
while(cycles < cycles_next_trans) {
- UINT8 opcode = m_rom_p6[address];
+ uint8_t opcode = m_rom_p6[address];
if(mode_write) {
if((write_line_active && !(address & 0x80)) ||
@@ -413,8 +413,8 @@ void wozfdc_device::lss_sync()
else if(cycles == cycles_next_flux_down) {
address |= 0x10;
next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles)) : attotime::never;
- cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1);
- cycles_next_flux_down = cycles_next_flux != UINT64(-1) ? cycles_next_flux+1 : UINT64(-1);
+ cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : uint64_t(-1);
+ cycles_next_flux_down = cycles_next_flux != uint64_t(-1) ? cycles_next_flux+1 : uint64_t(-1);
}
}
}