summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/pdp1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/pdp1.cpp')
-rw-r--r--src/mame/drivers/pdp1.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index 97a642cdebd..859b5d3e4b8 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -277,7 +277,7 @@ static const gfx_layout fontlayout =
black. Grey levels follow an exponential law, so that decrementing the
color index periodically will simulate the remanence of a cathode ray tube.
*/
-static const UINT8 pdp1_colors[] =
+static const uint8_t pdp1_colors[] =
{
0x00,0x00,0x00, /* black */
0xFF,0xFF,0xFF, /* white */
@@ -287,14 +287,14 @@ static const UINT8 pdp1_colors[] =
0x80,0x80,0x80 /* light gray */
};
-static const UINT8 pdp1_palette[] =
+static const uint8_t pdp1_palette[] =
{
pen_panel_bg, pen_panel_caption,
pen_typewriter_bg, pen_black,
pen_typewriter_bg, pen_red
};
-static const UINT8 total_colors_needed = pen_crt_num_levels + sizeof(pdp1_colors) / 3;
+static const uint8_t total_colors_needed = pen_crt_num_levels + sizeof(pdp1_colors) / 3;
static GFXDECODE_START( pdp1 )
GFXDECODE_ENTRY( "gfx1", 0, fontlayout, pen_crt_num_levels + sizeof(pdp1_colors) / 3, 3 )
@@ -311,7 +311,7 @@ PALETTE_INIT_MEMBER(pdp1_state, pdp1)
const double update_period = 1./refresh_rate;
double decay_1, decay_2;
double cur_level_1, cur_level_2;
- UINT8 i, r, g, b;
+ uint8_t i, r, g, b;
/* initialize CRT palette */
@@ -516,7 +516,7 @@ void pdp1_state::pdp1_machine_stop()
*/
void pdp1_state::machine_start()
{
- UINT8 *dst;
+ uint8_t *dst;
static const unsigned char fontdata6x8[pdp1_fontdata_size] =
{ /* ASCII characters */
@@ -667,7 +667,7 @@ class pdp1_readtape_image_device : public device_t,
{
public:
// construction/destruction
- pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// image-level overrides
virtual iodevice_t image_type() const override { return IO_PUNCHTAPE; }
@@ -689,7 +689,7 @@ protected:
const device_type PDP1_READTAPE = &device_creator<pdp1_readtape_image_device>;
-pdp1_readtape_image_device::pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pdp1_readtape_image_device::pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PDP1_READTAPE, "PDP1 Tape Reader", tag, owner, clock, "pdp1_readtape_image", __FILE__),
device_image_interface(mconfig, *this)
{
@@ -700,7 +700,7 @@ class pdp1_punchtape_image_device : public device_t,
{
public:
// construction/destruction
- pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// image-level overrides
virtual iodevice_t image_type() const override { return IO_PUNCHTAPE; }
@@ -722,7 +722,7 @@ protected:
const device_type PDP1_PUNCHTAPE = &device_creator<pdp1_punchtape_image_device>;
-pdp1_punchtape_image_device::pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pdp1_punchtape_image_device::pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PDP1_PUNCHTAPE, "PDP1 Tape Puncher", tag, owner, clock, "pdp1_punchtape_image", __FILE__),
device_image_interface(mconfig, *this)
{
@@ -734,7 +734,7 @@ class pdp1_printer_image_device : public device_t,
{
public:
// construction/destruction
- pdp1_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pdp1_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// image-level overrides
virtual iodevice_t image_type() const override { return IO_PRINTER; }
@@ -756,7 +756,7 @@ protected:
const device_type PDP1_PRINTER = &device_creator<pdp1_printer_image_device>;
-pdp1_printer_image_device::pdp1_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pdp1_printer_image_device::pdp1_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PDP1_PRINTER, "PDP1 Typewriter", tag, owner, clock, "pdp1_printer_image", __FILE__),
device_image_interface(mconfig, *this)
{
@@ -767,7 +767,7 @@ class pdp1_cylinder_image_device : public device_t,
{
public:
// construction/destruction
- pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// image-level overrides
virtual iodevice_t image_type() const override { return IO_CYLINDER; }
@@ -789,7 +789,7 @@ protected:
const device_type PDP1_CYLINDER = &device_creator<pdp1_cylinder_image_device>;
-pdp1_cylinder_image_device::pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+pdp1_cylinder_image_device::pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PDP1_CYLINDER, "PDP1 Cylinder", tag, owner, clock, "pdp1_cylinder_image", __FILE__),
device_image_interface(mconfig, *this)
{
@@ -845,7 +845,7 @@ void pdp1_readtape_image_device::call_unload()
/*
Read a byte from perforated tape
*/
-int pdp1_state::tape_read(UINT8 *reply)
+int pdp1_state::tape_read(uint8_t *reply)
{
if (m_tape_reader.fd && (m_tape_reader.fd->fread(reply, 1) == 1))
return 0; /* unit OK */
@@ -888,7 +888,7 @@ void pdp1_state::begin_tape_read( int binary, int nac)
TIMER_CALLBACK_MEMBER(pdp1_state::reader_callback)
{
int not_ready;
- UINT8 data;
+ uint8_t data;
if (m_tape_reader.rc)
{
@@ -1053,7 +1053,7 @@ void pdp1_punchtape_image_device::call_unload()
/*
Write a byte to perforated tape
*/
-void pdp1_state::tape_write(UINT8 data)
+void pdp1_state::tape_write(uint8_t data)
{
if (m_tape_puncher.fd)
m_tape_puncher.fd->fwrite(& data, 1);
@@ -1163,7 +1163,7 @@ void pdp1_printer_image_device::call_unload()
/*
Write a character to typewriter
*/
-void pdp1_state::typewriter_out(UINT8 data)
+void pdp1_state::typewriter_out(uint8_t data)
{
if (LOG_IOT_EXTRA)
logerror("typewriter output %o\n", data);
@@ -1515,10 +1515,10 @@ static void iot_dba(device_t *device, int op2, int nac, int mb, int *io, int ac)
/*
Read a word from drum
*/
-UINT32 pdp1_state::drum_read(int field, int position)
+uint32_t pdp1_state::drum_read(int field, int position)
{
int offset = (field*4096+position)*3;
- UINT8 buf[3];
+ uint8_t buf[3];
if (m_parallel_drum.fd && (!m_parallel_drum.fd->fseek(offset, SEEK_SET)) && (m_parallel_drum.fd->fread( buf, 3) == 3))
return ((buf[0] << 16) | (buf[1] << 8) | buf[2]) & 0777777;
@@ -1529,10 +1529,10 @@ UINT32 pdp1_state::drum_read(int field, int position)
/*
Write a word to drum
*/
-void pdp1_state::drum_write(int field, int position, UINT32 data)
+void pdp1_state::drum_write(int field, int position, uint32_t data)
{
int offset = (field*4096+position)*3;
- UINT8 buf[3];
+ uint8_t buf[3];
if (m_parallel_drum.fd)
{
@@ -1803,8 +1803,8 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
{
m_maincpu->pulse_start_clear(); /* pulse Start Clear line */
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
- m_maincpu->set_state_int(PDP1_SBM, (UINT64)0);
- m_maincpu->set_state_int(PDP1_OV, (UINT64)0);
+ m_maincpu->set_state_int(PDP1_SBM, (uint64_t)0);
+ m_maincpu->set_state_int(PDP1_OV, (uint64_t)0);
m_maincpu->set_state_int(PDP1_PC, m_maincpu->state_int(PDP1_TA));
m_maincpu->set_state_int(PDP1_RUN, 1);
}
@@ -1813,14 +1813,14 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
m_maincpu->pulse_start_clear(); /* pulse Start Clear line */
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
m_maincpu->set_state_int(PDP1_SBM, 1);
- m_maincpu->set_state_int(PDP1_OV, (UINT64)0);
+ m_maincpu->set_state_int(PDP1_OV, (uint64_t)0);
m_maincpu->set_state_int(PDP1_PC, m_maincpu->state_int(PDP1_TA));
m_maincpu->set_state_int(PDP1_RUN, 1);
}
if (control_transitions & pdp1_stop)
{
- m_maincpu->set_state_int(PDP1_RUN, (UINT64)0);
- m_maincpu->set_state_int(PDP1_RIM, (UINT64)0); /* bug : we stop after reading an even-numbered word
+ m_maincpu->set_state_int(PDP1_RUN, (uint64_t)0);
+ m_maincpu->set_state_int(PDP1_RIM, (uint64_t)0); /* bug : we stop after reading an even-numbered word
(i.e. data), whereas a real pdp-1 stops after reading
an odd-numbered word (i.e. dio instruciton) */
}
@@ -1856,8 +1856,8 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
| (m_maincpu->state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */
/*m_maincpu->set_state_int(PDP1_MA, m_maincpu->state_int(PDP1_PC));*/
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
- m_maincpu->set_state_int(PDP1_OV, (UINT64)0); /* right??? */
- m_maincpu->set_state_int(PDP1_RUN, (UINT64)0);
+ m_maincpu->set_state_int(PDP1_OV, (uint64_t)0); /* right??? */
+ m_maincpu->set_state_int(PDP1_RUN, (uint64_t)0);
m_maincpu->set_state_int(PDP1_RIM, 1);
}
if (control_transitions & pdp1_reader)