summaryrefslogtreecommitdiffstats
path: root/src/devices/machine/akiko.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/akiko.cpp')
-rw-r--r--src/devices/machine/akiko.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp
index 6a2772187f8..ed356996633 100644
--- a/src/devices/machine/akiko.cpp
+++ b/src/devices/machine/akiko.cpp
@@ -55,7 +55,7 @@ machine_config_constructor akiko_device::device_mconfig_additions() const
// akiko_device - constructor
//-------------------------------------------------
-akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, AKIKO, "CBM AKIKO", tag, owner, clock, "akiko", __FILE__),
m_c2p_input_index(0),
m_c2p_output_index(0),
@@ -177,9 +177,9 @@ void akiko_device::device_reset()
/* create the TOC table */
if ( m_cdrom != nullptr && cdrom_get_last_track(m_cdrom) )
{
- UINT8 *p;
+ uint8_t *p;
int i, addrctrl = cdrom_get_adr_control( m_cdrom, 0 );
- UINT32 discend;
+ uint32_t discend;
discend = cdrom_get_track_start(m_cdrom,cdrom_get_last_track(m_cdrom)-1);
discend += cdrom_get_toc(m_cdrom)->tracks[cdrom_get_last_track(m_cdrom)-1].frames;
@@ -187,7 +187,7 @@ void akiko_device::device_reset()
m_cdrom_numtracks = cdrom_get_last_track(m_cdrom)+3;
- m_cdrom_toc = std::make_unique<UINT8[]>(13*m_cdrom_numtracks);
+ m_cdrom_toc = std::make_unique<uint8_t[]>(13*m_cdrom_numtracks);
memset( m_cdrom_toc.get(), 0, 13*m_cdrom_numtracks);
p = m_cdrom_toc.get();
@@ -208,7 +208,7 @@ void akiko_device::device_reset()
for( i = 0; i < cdrom_get_last_track(m_cdrom); i++ )
{
- UINT32 trackpos = cdrom_get_track_start(m_cdrom,i);
+ uint32_t trackpos = cdrom_get_track_start(m_cdrom,i);
trackpos = lba_to_msf(trackpos);
addrctrl = cdrom_get_adr_control( m_cdrom, i );
@@ -241,7 +241,7 @@ void akiko_device::device_stop()
}
}
-void akiko_device::nvram_write(UINT32 data)
+void akiko_device::nvram_write(uint32_t data)
{
m_i2c_scl_out = BIT(data, 31);
m_i2c_sda_out = BIT(data, 30);
@@ -252,9 +252,9 @@ void akiko_device::nvram_write(UINT32 data)
m_sda_w(m_i2c_sda_out);
}
-UINT32 akiko_device::nvram_read()
+uint32_t akiko_device::nvram_read()
{
- UINT32 v = 0;
+ uint32_t v = 0;
if (m_i2c_scl_dir)
v |= m_i2c_scl_out << 31;
@@ -276,7 +276,7 @@ UINT32 akiko_device::nvram_read()
*
************************************/
-void akiko_device::c2p_write(UINT32 data)
+void akiko_device::c2p_write(uint32_t data)
{
m_c2p_input_buffer[m_c2p_input_index] = data;
m_c2p_input_index++;
@@ -284,9 +284,9 @@ void akiko_device::c2p_write(UINT32 data)
m_c2p_output_index = 0;
}
-UINT32 akiko_device::c2p_read()
+uint32_t akiko_device::c2p_read()
{
- UINT32 val;
+ uint32_t val;
if ( m_c2p_output_index == 0 )
{
@@ -354,7 +354,7 @@ void akiko_device::cdda_stop()
}
}
-void akiko_device::cdda_play(UINT32 lba, UINT32 num_blocks)
+void akiko_device::cdda_play(uint32_t lba, uint32_t num_blocks)
{
if (m_cdda != nullptr)
{
@@ -383,7 +383,7 @@ void akiko_device::cdda_pause(int pause)
}
}
-UINT8 akiko_device::cdda_getstatus(UINT32 *lba)
+uint8_t akiko_device::cdda_getstatus(uint32_t *lba)
{
if ( lba ) *lba = 0;
@@ -411,7 +411,7 @@ UINT8 akiko_device::cdda_getstatus(UINT32 *lba)
return 0x15; /* no audio status */
}
-void akiko_device::set_cd_status(UINT32 status)
+void akiko_device::set_cd_status(uint32_t status)
{
amiga_state *amiga = machine().driver_data<amiga_state>();
@@ -432,7 +432,7 @@ TIMER_CALLBACK_MEMBER(akiko_device::frame_proc)
if (m_cdda != nullptr)
{
- UINT8 s = cdda_getstatus(nullptr);
+ uint8_t s = cdda_getstatus(nullptr);
if ( s == 0x11 )
{
@@ -443,9 +443,9 @@ TIMER_CALLBACK_MEMBER(akiko_device::frame_proc)
}
}
-static UINT32 lba_from_triplet( UINT8 *triplet )
+static uint32_t lba_from_triplet( uint8_t *triplet )
{
- UINT32 r;
+ uint32_t r;
r = bcd_2_dec(triplet[0]) * (60*75);
r += bcd_2_dec(triplet[1]) * 75;
@@ -456,7 +456,7 @@ static UINT32 lba_from_triplet( UINT8 *triplet )
TIMER_CALLBACK_MEMBER(akiko_device::dma_proc)
{
- UINT8 buf[2352];
+ uint8_t buf[2352];
int index;
if ( (m_cdrom_dmacontrol & 0x04000000) == 0 )
@@ -470,12 +470,12 @@ TIMER_CALLBACK_MEMBER(akiko_device::dma_proc)
if ( m_cdrom_readreqmask & ( 1 << index ) )
{
amiga_state *amiga = machine().driver_data<amiga_state>();
- UINT32 track = cdrom_get_track( m_cdrom, m_cdrom_lba_cur );
- UINT32 datasize;// = cdrom_get_toc(m_cdrom)->tracks[track].datasize;
- UINT32 subsize = cdrom_get_toc( m_cdrom )->tracks[track].subsize;
+ uint32_t track = cdrom_get_track( m_cdrom, m_cdrom_lba_cur );
+ uint32_t datasize;// = cdrom_get_toc(m_cdrom)->tracks[track].datasize;
+ uint32_t subsize = cdrom_get_toc( m_cdrom )->tracks[track].subsize;
int i;
- UINT32 curmsf = lba_to_msf( m_cdrom_lba_cur );
+ uint32_t curmsf = lba_to_msf( m_cdrom_lba_cur );
memset( buf, 0, 16 );
buf[3] = m_cdrom_lba_cur - m_cdrom_lba_start;
@@ -506,7 +506,7 @@ TIMER_CALLBACK_MEMBER(akiko_device::dma_proc)
for( i = 0; i < 2352; i += 2 )
{
- UINT16 data;
+ uint16_t data;
data = buf[i];
data <<= 8;
@@ -542,11 +542,11 @@ void akiko_device::start_dma()
m_dma_timer->adjust( attotime::from_usec( CD_SECTOR_TIME / m_cdrom_speed ) );
}
-void akiko_device::setup_response( int len, UINT8 *r1 )
+void akiko_device::setup_response( int len, uint8_t *r1 )
{
int resp_addr = m_cdrom_address[1];
- UINT8 resp_csum = 0xff;
- UINT8 resp_buffer[32];
+ uint8_t resp_csum = 0xff;
+ uint8_t resp_buffer[32];
int i;
memset( resp_buffer, 0, sizeof( resp_buffer ) );
@@ -571,8 +571,8 @@ void akiko_device::setup_response( int len, UINT8 *r1 )
TIMER_CALLBACK_MEMBER( akiko_device::cd_delayed_cmd )
{
- UINT8 resp[32];
- UINT8 cddastatus;
+ uint8_t resp[32];
+ uint8_t cddastatus;
if ( m_cdrom_status[0] & 0x10000000 )
return;
@@ -612,14 +612,14 @@ TIMER_CALLBACK_MEMBER( akiko_device::cd_delayed_cmd )
void akiko_device::update_cdrom()
{
- UINT8 resp[32], cmdbuf[32];
+ uint8_t resp[32], cmdbuf[32];
if ( m_cdrom_status[0] & 0x10000000 )
return;
while ( m_cdrom_cmd_start != m_cdrom_cmd_end )
{
- UINT32 cmd_addr = m_cdrom_address[1] + 0x200 + m_cdrom_cmd_start;
+ uint32_t cmd_addr = m_cdrom_address[1] + 0x200 + m_cdrom_cmd_start;
int cmd = m_space->read_byte( cmd_addr );
memset( resp, 0, sizeof( resp ) );
@@ -658,7 +658,7 @@ void akiko_device::update_cdrom()
else if ( cmd == 0x04 ) /* seek/read/play cd multi command */
{
int i;
- UINT32 startpos, endpos;
+ uint32_t startpos, endpos;
for( i = 0; i < 13; i++ )
{
@@ -728,7 +728,7 @@ void akiko_device::update_cdrom()
}
else if ( cmd == 0x06 ) /* read subq */
{
- UINT32 lba;
+ uint32_t lba;
resp[1] = 0x00;
@@ -736,9 +736,9 @@ void akiko_device::update_cdrom()
if ( lba > 0 )
{
- UINT32 disk_pos;
- UINT32 track_pos;
- UINT32 track;
+ uint32_t disk_pos;
+ uint32_t track_pos;
+ uint32_t track;
int addrctrl;
track = cdrom_get_track(m_cdrom, lba);
@@ -791,7 +791,7 @@ void akiko_device::update_cdrom()
READ32_MEMBER( akiko_device::read )
{
- UINT32 retval;
+ uint32_t retval;
if ( LOG_AKIKO && offset < (0x30/4) )
{