summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/psxcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/psxcd.h')
-rw-r--r--src/mame/machine/psxcd.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/mame/machine/psxcd.h b/src/mame/machine/psxcd.h
index 4049cdf1d3a..509817eab1e 100644
--- a/src/mame/machine/psxcd.h
+++ b/src/mame/machine/psxcd.h
@@ -21,7 +21,7 @@
class psxcd_device : public cdrom_image_device
{
public:
- psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<psxcd_device &>(device).m_irq_handler.set_callback(object); }
@@ -30,7 +30,7 @@ public:
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ8_MEMBER( read );
- void start_dma(UINT8 *mainram, UINT32 size);
+ void start_dma(uint8_t *mainram, uint32_t size);
protected:
virtual void device_start() override;
@@ -40,17 +40,17 @@ protected:
virtual const tiny_rom_entry *device_rom_region() const override;
private:
- void write_command(UINT8 byte);
+ void write_command(uint8_t byte);
typedef void (psxcd_device::*cdcmd)();
struct command_result
{
- UINT8 data[32], sz, res;
+ uint8_t data[32], sz, res;
command_result *next;
};
union CDPOS {
- UINT8 b[4];
- UINT32 w;
+ uint8_t b[4];
+ uint32_t w;
};
void cdcmd_sync();
@@ -86,40 +86,40 @@ private:
void cdcmd_illegal1d();
static const cdcmd cmd_table[31];
- void illegalcmd(UINT8 cmd);
+ void illegalcmd(uint8_t cmd);
void cmd_complete(command_result *res);
- void send_result(UINT8 res, UINT8 *data=nullptr, int sz=0, int delay=default_irq_delay, UINT8 errcode = 0);
- command_result *prepare_result(UINT8 res, UINT8 *data=nullptr, int sz=0, UINT8 errcode = 0);
+ void send_result(uint8_t res, uint8_t *data=nullptr, int sz=0, int delay=default_irq_delay, uint8_t errcode = 0);
+ command_result *prepare_result(uint8_t res, uint8_t *data=nullptr, int sz=0, uint8_t errcode = 0);
void start_read();
void start_play();
void stop_read();
void read_sector();
void play_sector();
- UINT32 sub_loc(CDPOS src1, CDPOS src2);
- int add_system_event(int type, UINT64 t, command_result *ptr);
+ uint32_t sub_loc(CDPOS src1, CDPOS src2);
+ int add_system_event(int type, uint64_t t, command_result *ptr);
- UINT8 bcd_to_decimal(const UINT8 bcd) { return ((bcd>>4)*10)+(bcd&0xf); }
- UINT8 decimal_to_bcd(const UINT8 dec) { return ((dec/10)<<4)|(dec%10); }
- UINT32 msf_to_lba_ps(UINT32 msf) { msf = msf_to_lba(msf); return (msf>150)?(msf-150):msf; }
- UINT32 lba_to_msf_ps(UINT32 lba) { return lba_to_msf_alt(lba+150); }
+ uint8_t bcd_to_decimal(const uint8_t bcd) { return ((bcd>>4)*10)+(bcd&0xf); }
+ uint8_t decimal_to_bcd(const uint8_t dec) { return ((dec/10)<<4)|(dec%10); }
+ uint32_t msf_to_lba_ps(uint32_t msf) { msf = msf_to_lba(msf); return (msf>150)?(msf-150):msf; }
+ uint32_t lba_to_msf_ps(uint32_t lba) { return lba_to_msf_alt(lba+150); }
static const unsigned int sector_buffer_size=16, default_irq_delay=16000; //480; //8000; //2000<<2;
static const unsigned int raw_sector_size=2352;
- UINT8 cmdbuf[64], mode, secbuf[sector_buffer_size][raw_sector_size];
- UINT8 filter_file, filter_channel, lastsechdr[8], status;
+ uint8_t cmdbuf[64], mode, secbuf[sector_buffer_size][raw_sector_size];
+ uint8_t filter_file, filter_channel, lastsechdr[8], status;
int rdp;
- UINT8 m_cursec, sectail;
- UINT16 m_transcurr;
- UINT8 m_transbuf[raw_sector_size];
+ uint8_t m_cursec, sectail;
+ uint16_t m_transcurr;
+ uint8_t m_transbuf[raw_sector_size];
command_result *res_queue, *m_int1;
struct {
- UINT8 sr, ir, imr;
+ uint8_t sr, ir, imr;
struct {
- UINT8 ll, lr, rl, rr;
+ uint8_t ll, lr, rl, rr;
} vol;
} m_regs;
@@ -141,11 +141,11 @@ private:
bool open, m_mute, m_dmaload;
device_timer_id next_read_event;
- INT64 next_sector_t;
+ int64_t next_sector_t;
unsigned int autopause_sector, start_read_delay, read_sector_cycles, preread_delay;
- UINT32 m_param_count;
- UINT32 m_sysclock;
+ uint32_t m_param_count;
+ uint32_t m_sysclock;
emu_timer *m_timers[MAX_PSXCD_TIMERS];
bool m_timerinuse[MAX_PSXCD_TIMERS];