summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/nscsi_hd.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 13:13:17 +0200
commitddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch)
treea70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/machine/nscsi_hd.cpp
parent333bff8de64dfaeb98134000412796b4fdef970b (diff)
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/machine/nscsi_hd.cpp')
-rw-r--r--src/devices/machine/nscsi_hd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/devices/machine/nscsi_hd.cpp b/src/devices/machine/nscsi_hd.cpp
index d7d3ccb5e5b..a2179e34a77 100644
--- a/src/devices/machine/nscsi_hd.cpp
+++ b/src/devices/machine/nscsi_hd.cpp
@@ -5,12 +5,12 @@
const device_type NSCSI_HARDDISK = &device_creator<nscsi_harddisk_device>;
-nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
nscsi_full_device(mconfig, NSCSI_HARDDISK, "SCSI HARDDISK", tag, owner, clock, "scsi_harddisk", __FILE__), harddisk(nullptr), lba(0), cur_lba(0), blocks(0), bytes_per_sector(0)
{
}
-nscsi_harddisk_device::nscsi_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) :
+nscsi_harddisk_device::nscsi_harddisk_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) :
nscsi_full_device(mconfig, type, name, tag, owner, clock, shortname, source), harddisk(nullptr), lba(0), cur_lba(0), blocks(0), bytes_per_sector(0)
{
}
@@ -50,7 +50,7 @@ machine_config_constructor nscsi_harddisk_device::device_mconfig_additions() con
return MACHINE_CONFIG_NAME(scsi_harddisk);
}
-UINT8 nscsi_harddisk_device::scsi_get_data(int id, int pos)
+uint8_t nscsi_harddisk_device::scsi_get_data(int id, int pos)
{
if(id != 2)
return nscsi_full_device::scsi_get_data(id, pos);
@@ -65,7 +65,7 @@ UINT8 nscsi_harddisk_device::scsi_get_data(int id, int pos)
return block[pos % bytes_per_sector];
}
-void nscsi_harddisk_device::scsi_put_data(int id, int pos, UINT8 data)
+void nscsi_harddisk_device::scsi_put_data(int id, int pos, uint8_t data)
{
if(id != 2) {
nscsi_full_device::scsi_put_data(id, pos, data);
@@ -194,7 +194,7 @@ void nscsi_harddisk_device::scsi_command()
scsi_cmdbuf[pos++] = 0x00; // WP, cache
hard_disk_info *info = hard_disk_get_info(harddisk);
- UINT32 dsize = info->cylinders * info->heads * info->sectors - 1;
+ uint32_t dsize = info->cylinders * info->heads * info->sectors - 1;
scsi_cmdbuf[pos++] = 0x08; // Block descriptor length
scsi_cmdbuf[pos++] = 0x00;
scsi_cmdbuf[pos++] = (dsize>>16) & 0xff;
@@ -265,8 +265,8 @@ void nscsi_harddisk_device::scsi_command()
scsi_cmdbuf[pos++] = 0x00; // RPL
scsi_cmdbuf[pos++] = 0x00; // Rotational offset
scsi_cmdbuf[pos++] = 0x00; // Reserved
- scsi_cmdbuf[pos++] = UINT8(10000 >> 8); // Medium rotation rate
- scsi_cmdbuf[pos++] = UINT8(10000); // Medium rotation rate
+ scsi_cmdbuf[pos++] = uint8_t(10000 >> 8); // Medium rotation rate
+ scsi_cmdbuf[pos++] = uint8_t(10000); // Medium rotation rate
scsi_cmdbuf[pos++] = 0x00; // Reserved
scsi_cmdbuf[pos++] = 0x00; // Reserved
break;
@@ -323,7 +323,7 @@ void nscsi_harddisk_device::scsi_command()
logerror("%s: command READ CAPACITY\n", tag());
hard_disk_info *info = hard_disk_get_info(harddisk);
- UINT32 size = info->cylinders * info->heads * info->sectors - 1;
+ uint32_t size = info->cylinders * info->heads * info->sectors - 1;
scsi_cmdbuf[0] = (size>>24) & 0xff;
scsi_cmdbuf[1] = (size>>16) & 0xff;