summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/amigafdc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/amigafdc.cpp')
-rw-r--r--src/devices/machine/amigafdc.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp
index d71b4f458dc..81f7efd2fb5 100644
--- a/src/devices/machine/amigafdc.cpp
+++ b/src/devices/machine/amigafdc.cpp
@@ -18,7 +18,7 @@ FLOPPY_FORMATS_MEMBER( amiga_fdc::floppy_formats )
FLOPPY_ADF_FORMAT
FLOPPY_FORMATS_END
-amiga_fdc::amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+amiga_fdc::amiga_fdc(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, AMIGA_FDC, "Amiga FDC", tag, owner, clock, "amiga_fdc", __FILE__),
m_write_index(*this), floppy(nullptr), t_gen(nullptr), dsklen(0), pre_dsklen(0), dsksync(0), dskbyt(0), adkcon(0), dmacon(0), dskpt(0), dma_value(0), dma_state(0)
{
@@ -71,7 +71,7 @@ void amiga_fdc::dma_done()
state->custom_chip_w(REG_INTREQ, INTENA_SETCLR | INTENA_DSKBLK);
}
-void amiga_fdc::dma_write(UINT16 value)
+void amiga_fdc::dma_write(uint16_t value)
{
amiga_state *state = machine().driver_data<amiga_state>();
state->chip_ram_w(dskpt, value);
@@ -85,10 +85,10 @@ void amiga_fdc::dma_write(UINT16 value)
dma_done();
}
-UINT16 amiga_fdc::dma_read()
+uint16_t amiga_fdc::dma_read()
{
amiga_state *state = machine().driver_data<amiga_state>();
- UINT16 res = state->chip_ram_r(dskpt);
+ uint16_t res = state->chip_ram_r(dskpt);
dskpt += 2;
dsklen--;
@@ -347,19 +347,19 @@ void amiga_fdc::dma_check()
}
-void amiga_fdc::adkcon_set(UINT16 data)
+void amiga_fdc::adkcon_set(uint16_t data)
{
live_sync();
adkcon = data;
live_run();
}
-UINT16 amiga_fdc::adkcon_r(void)
+uint16_t amiga_fdc::adkcon_r(void)
{
return adkcon;
}
-void amiga_fdc::dsklen_w(UINT16 data)
+void amiga_fdc::dsklen_w(uint16_t data)
{
live_sync();
if(!(data & 0x8000) || (data == pre_dsklen)) {
@@ -371,38 +371,38 @@ void amiga_fdc::dsklen_w(UINT16 data)
live_run();
}
-void amiga_fdc::dskpth_w(UINT16 data)
+void amiga_fdc::dskpth_w(uint16_t data)
{
live_sync();
dskpt = (dskpt & 0xffff) | (data << 16);
live_run();
}
-void amiga_fdc::dskptl_w(UINT16 data)
+void amiga_fdc::dskptl_w(uint16_t data)
{
live_sync();
dskpt = (dskpt & 0xffff0000) | data;
live_run();
}
-UINT16 amiga_fdc::dskpth_r()
+uint16_t amiga_fdc::dskpth_r()
{
return dskpt >> 16;
}
-UINT16 amiga_fdc::dskptl_r()
+uint16_t amiga_fdc::dskptl_r()
{
return dskpt;
}
-void amiga_fdc::dsksync_w(UINT16 data)
+void amiga_fdc::dsksync_w(uint16_t data)
{
live_sync();
dsksync = data;
live_run();
}
-void amiga_fdc::dmacon_set(UINT16 data)
+void amiga_fdc::dmacon_set(uint16_t data)
{
live_sync();
dmacon = data;
@@ -410,9 +410,9 @@ void amiga_fdc::dmacon_set(UINT16 data)
live_run();
}
-UINT16 amiga_fdc::dskbytr_r()
+uint16_t amiga_fdc::dskbytr_r()
{
- UINT16 res = dskbyt;
+ uint16_t res = dskbyt;
dskbyt &= 0x7fff;
return res;
}
@@ -484,9 +484,9 @@ WRITE8_MEMBER( amiga_fdc::ciaaprb_w )
live_run();
}
-UINT8 amiga_fdc::ciaapra_r()
+uint8_t amiga_fdc::ciaapra_r()
{
- UINT8 ret = 0x3c;
+ uint8_t ret = 0x3c;
if(floppy) {
//if(!floppy->ready_r()) fixit: seems to not work well with multiple disk drives
ret &= ~0x20;
@@ -538,7 +538,7 @@ int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, co
if(transition_time == 0xffff && !when.is_never() && etime >= when)
transition_time = counter;
if(slot < 8) {
- UINT8 mask = 1 << slot;
+ uint8_t mask = 1 << slot;
if(phase_add & mask)
counter += 258;
else if(phase_sub & mask)
@@ -562,15 +562,15 @@ int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, co
int bit = transition_time != 0xffff;
if(transition_time != 0xffff) {
- static const UINT8 pha[8] = { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 };
- static const UINT8 phs[8] = { 0, 0, 0, 0, 0x1, 0x3, 0x7, 0xf };
- static const UINT8 freqa[4][8] = {
+ static const uint8_t pha[8] = { 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 };
+ static const uint8_t phs[8] = { 0, 0, 0, 0, 0x1, 0x3, 0x7, 0xf };
+ static const uint8_t freqa[4][8] = {
{ 0xf, 0x7, 0x3, 0x1, 0, 0, 0, 0 },
{ 0x7, 0x3, 0x1, 0, 0, 0, 0, 0 },
{ 0x7, 0x3, 0x1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
- static const UINT8 freqs[4][8] = {
+ static const uint8_t freqs[4][8] = {
{ 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0x1, 0x3, 0x7 },
{ 0, 0, 0, 0, 0, 0x1, 0x3, 0x7 },
@@ -624,7 +624,7 @@ bool amiga_fdc::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_devic
attotime etime = ctime+delays[slot];
if(etime > limit)
return true;
- UINT16 pre_counter = counter;
+ uint16_t pre_counter = counter;
counter += increment;
if(bit && !(pre_counter & 0x400) && (counter & 0x400))
if(write_position < ARRAY_LENGTH(write_buffer))