diff options
Diffstat (limited to 'src/mame/drivers/tx0.cpp')
-rw-r--r-- | src/mame/drivers/tx0.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/mame/drivers/tx0.cpp b/src/mame/drivers/tx0.cpp index 6a6b98a2ce6..551085c58e7 100644 --- a/src/mame/drivers/tx0.cpp +++ b/src/mame/drivers/tx0.cpp @@ -17,7 +17,7 @@ */ DRIVER_INIT_MEMBER(tx0_state,tx0) { - UINT8 *dst; + uint8_t *dst; static const unsigned char fontdata6x8[tx0_fontdata_size] = { /* ASCII characters */ @@ -204,7 +204,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 tx0_colors[] = +static const uint8_t tx0_colors[] = { 0x00,0x00,0x00, /* black */ 0xFF,0xFF,0xFF, /* white */ @@ -214,14 +214,14 @@ static const UINT8 tx0_colors[] = 0x80,0x80,0x80 /* light gray */ }; -static const UINT8 tx0_palette[] = +static const uint8_t tx0_palette[] = { pen_panel_bg, pen_panel_caption, /* captions */ pen_typewriter_bg, pen_black, /* black typing in typewriter */ pen_typewriter_bg, pen_red /* red typing in typewriter */ }; -static const UINT8 total_colors_needed = pen_crt_num_levels + sizeof(tx0_colors) / 3; +static const uint8_t total_colors_needed = pen_crt_num_levels + sizeof(tx0_colors) / 3; static GFXDECODE_START( tx0 ) GFXDECODE_ENTRY( "gfx1", 0, fontlayout, pen_crt_num_levels + sizeof(tx0_colors) / 3, 3 ) @@ -244,7 +244,7 @@ PALETTE_INIT_MEMBER(tx0_state, tx0) double cut_level = .02; #endif #endif - UINT8 i, r, g, b; + uint8_t i, r, g, b; /* initialize CRT palette */ @@ -357,7 +357,7 @@ class tx0_readtape_image_device : public device_t, { public: // construction/destruction - tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tx0_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; } @@ -379,7 +379,7 @@ protected: const device_type TX0_READTAPE = &device_creator<tx0_readtape_image_device>; -tx0_readtape_image_device::tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tx0_readtape_image_device::tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TX0_READTAPE, "TX0 Tape Reader", tag, owner, clock, "tx0_readtape_image", __FILE__), device_image_interface(mconfig, *this) { @@ -390,7 +390,7 @@ class tx0_punchtape_image_device : public device_t, { public: // construction/destruction - tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tx0_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; } @@ -412,7 +412,7 @@ protected: const device_type TX0_PUNCHTAPE = &device_creator<tx0_punchtape_image_device>; -tx0_punchtape_image_device::tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tx0_punchtape_image_device::tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TX0_PUNCHTAPE, "TX0 Tape Puncher", tag, owner, clock, "tx0_punchtape_image", __FILE__), device_image_interface(mconfig, *this) { @@ -424,7 +424,7 @@ class tx0_printer_image_device : public device_t, { public: // construction/destruction - tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tx0_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; } @@ -446,7 +446,7 @@ protected: const device_type TX0_PRINTER = &device_creator<tx0_printer_image_device>; -tx0_printer_image_device::tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tx0_printer_image_device::tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TX0_PRINTER, "TX0 Typewriter", tag, owner, clock, "tx0_printer_image", __FILE__), device_image_interface(mconfig, *this) { @@ -457,7 +457,7 @@ class tx0_magtape_image_device : public device_t, { public: // construction/destruction - tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tx0_magtape_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_MAGTAPE; } @@ -479,7 +479,7 @@ protected: const device_type TX0_MAGTAPE = &device_creator<tx0_magtape_image_device>; -tx0_magtape_image_device::tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +tx0_magtape_image_device::tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, TX0_MAGTAPE, "TX0 Magnetic Tape", tag, owner, clock, "tx0_magtape_image", __FILE__), device_image_interface(mconfig, *this) { @@ -538,7 +538,7 @@ void tx0_readtape_image_device::call_unload() /* Read a byte from perforated tape */ -int tx0_state::tape_read(UINT8 *reply) +int tx0_state::tape_read(uint8_t *reply) { if (m_tape_reader.fd && (m_tape_reader.fd->fread(reply, 1) == 1)) return 0; /* unit OK */ @@ -549,7 +549,7 @@ int tx0_state::tape_read(UINT8 *reply) /* Write a byte to perforated tape */ -void tx0_state::tape_write(UINT8 data) +void tx0_state::tape_write(uint8_t data) { if (m_tape_puncher.fd) m_tape_puncher.fd->fwrite(& data, 1); @@ -582,7 +582,7 @@ void tx0_state::begin_tape_read(int binary) TIMER_CALLBACK_MEMBER(tx0_state::reader_callback) { int not_ready; - UINT8 data; + uint8_t data; int ac; if (m_tape_reader.rc) @@ -724,7 +724,7 @@ void tx0_printer_image_device::call_unload() /* Write a character to typewriter */ -void tx0_state::typewriter_out(UINT8 data) +void tx0_state::typewriter_out(uint8_t data) { tx0_typewriter_drawchar(data); if (m_typewriter.fd) @@ -887,7 +887,7 @@ void tx0_magtape_image_device::call_unload() void tx0_state::magtape_callback() { - UINT8 buf = 0; + uint8_t buf = 0; int lr; switch (m_magtape.state) @@ -1074,7 +1074,7 @@ void tx0_state::magtape_callback() difference... MAME seems to assume that I/O errors never happen, whereas it is really easy to cause one by deconnecting an external drive the image is located on!!! */ - UINT64 offs; + uint64_t offs; offs = m_magtape.img->ftell(); if (m_magtape.img->fseek( 0, SEEK_END) || (offs != m_magtape.img->ftell())) { /* I/O error */ @@ -1463,18 +1463,18 @@ INTERRUPT_GEN_MEMBER(tx0_state::tx0_interrupt) } if (control_transitions & tx0_stop) { - m_maincpu->set_state_int(TX0_RUN, (UINT64)0); - m_maincpu->set_state_int(TX0_RIM, (UINT64)0); + m_maincpu->set_state_int(TX0_RUN, (uint64_t)0); + m_maincpu->set_state_int(TX0_RIM, (uint64_t)0); } if (control_transitions & tx0_restart) { m_maincpu->set_state_int(TX0_RUN, 1); - m_maincpu->set_state_int(TX0_RIM, (UINT64)0); + m_maincpu->set_state_int(TX0_RIM, (uint64_t)0); } if (control_transitions & tx0_read_in) { /* set cpu to read instructions from perforated tape */ m_maincpu->pulse_reset(); - m_maincpu->set_state_int(TX0_RUN, (UINT64)0); + m_maincpu->set_state_int(TX0_RUN, (uint64_t)0); m_maincpu->set_state_int(TX0_RIM, 1); } if (control_transitions & tx0_toggle_dn) @@ -1493,7 +1493,7 @@ INTERRUPT_GEN_MEMBER(tx0_state::tx0_interrupt) { if (m_tsr_index >= 2) { - UINT32 cm_sel = (UINT32) m_maincpu->state_int(TX0_CM_SEL); + uint32_t cm_sel = (uint32_t) m_maincpu->state_int(TX0_CM_SEL); m_maincpu->set_state_int(TX0_CM_SEL, cm_sel ^ (1 << (m_tsr_index - 2))); } } @@ -1501,7 +1501,7 @@ INTERRUPT_GEN_MEMBER(tx0_state::tx0_interrupt) { if (m_tsr_index >= 2) { - UINT32 lr_sel = (UINT32) m_maincpu->state_int(TX0_LR_SEL); + uint32_t lr_sel = (uint32_t) m_maincpu->state_int(TX0_LR_SEL); m_maincpu->set_state_int(TX0_LR_SEL, (lr_sel ^ (1 << (m_tsr_index - 2)))); } } @@ -1590,7 +1590,7 @@ MACHINE_CONFIG_END ROM_START(tx0_64kw) /*CPU memory space*/ - ROM_REGION(0x10000 * sizeof(UINT32),"maincpu",ROMREGION_ERASEFF) + ROM_REGION(0x10000 * sizeof(uint32_t),"maincpu",ROMREGION_ERASEFF) /* Note this computer has no ROM... */ ROM_REGION(tx0_fontdata_size, "gfx1", ROMREGION_ERASEFF) @@ -1599,7 +1599,7 @@ ROM_END ROM_START(tx0_8kw) /*CPU memory space*/ - ROM_REGION(0x2000 * sizeof(UINT32),"maincpu",ROMREGION_ERASEFF) + ROM_REGION(0x2000 * sizeof(uint32_t),"maincpu",ROMREGION_ERASEFF) /* Note this computer has no ROM... */ ROM_REGION(tx0_fontdata_size, "gfx1", ROMREGION_ERASEFF) |