summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/special.cpp2
-rw-r--r--src/mame/includes/special.h12
-rw-r--r--src/mame/machine/special.cpp17
3 files changed, 11 insertions, 20 deletions
diff --git a/src/mame/drivers/special.cpp b/src/mame/drivers/special.cpp
index e01bb3f4b5e..f5cb7d7ef24 100644
--- a/src/mame/drivers/special.cpp
+++ b/src/mame/drivers/special.cpp
@@ -14,6 +14,7 @@ Notes:
- Special, specialp, lik, erik: At the first prompt, press Enter for the Monitor. All other keys just beep.
- Specimx: Press Enter to go into a ramdisk File Manager. Press F3 to load a tape (which errors).
+ If you had loaded a disk, press F6 to boot it.
- Specimx -bios 1 and 2 don't set a colour, so a default has been chosen instead of a black screen.
- Specimx -bios 1 lists a number of programs on the ramdisk, but most of them don't work.
@@ -564,6 +565,7 @@ void special_state::specimx(machine_config &config)
m_pit->out_handler<1>().set("custom", FUNC(specimx_sound_device::set_input_ch1));
m_pit->set_clk<2>(2000000);
m_pit->out_handler<2>().set("custom", FUNC(specimx_sound_device::set_input_ch2));
+ TIMER(config, m_pit_timer).configure_generic(FUNC(special_state::pit_timer));
m_ppi->in_pb_callback().set(FUNC(special_state::specimx_portb_r));
m_ppi->out_pc_callback().set(FUNC(special_state::specimx_portc_w));
diff --git a/src/mame/includes/special.h b/src/mame/includes/special.h
index 8349b36d95d..4a3ee5c5ba1 100644
--- a/src/mame/includes/special.h
+++ b/src/mame/includes/special.h
@@ -22,6 +22,7 @@
#include "formats/smx_dsk.h"
#include "formats/rk_cas.h"
#include "machine/wd_fdc.h"
+#include "machine/timer.h"
#include "machine/ram.h"
#include "emupal.h"
@@ -50,6 +51,7 @@ public:
, m_bank6(*this, "bank6")
, m_io_keyboard(*this, "LINE%u", 0U)
, m_palette(*this, "palette")
+ , m_pit_timer(*this, "pit_timer")
{ }
void special(machine_config &config);
@@ -61,15 +63,7 @@ public:
void init_erik();
void init_special();
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
private:
- enum
- {
- TIMER_PIT8253_GATES
- };
-
// specimx
void specimx_select_bank(offs_t offset, uint8_t data);
void video_memory_w(offs_t offset, uint8_t data);
@@ -96,6 +90,7 @@ private:
void porta_w(uint8_t data);
void portb_w(uint8_t data);
void portc_w(uint8_t data);
+ TIMER_DEVICE_CALLBACK_MEMBER(pit_timer);
void erik_palette(palette_device &palette) const;
void specimx_palette(palette_device &palette) const;
@@ -144,6 +139,7 @@ private:
optional_memory_bank m_bank6;
required_ioport_array<13> m_io_keyboard;
required_device<palette_device> m_palette;
+ optional_device<timer_device> m_pit_timer; // specimx only
};
#endif // MAME_INCLUDES_SPECIAL_H
diff --git a/src/mame/machine/special.cpp b/src/mame/machine/special.cpp
index ed8e36e7033..58f3fdcb5f1 100644
--- a/src/mame/machine/special.cpp
+++ b/src/mame/machine/special.cpp
@@ -113,18 +113,11 @@ void special_state::specimx_portc_w(uint8_t data)
m_dac->write(BIT(data, 5)); //beeper
}
-void special_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+TIMER_DEVICE_CALLBACK_MEMBER(special_state::pit_timer)
{
- switch (id)
- {
- case TIMER_PIT8253_GATES:
- m_pit->write_gate0(0);
- m_pit->write_gate1(0);
- m_pit->write_gate2(0);
- break;
- default:
- throw emu_fatalerror("Unknown id in special_state::device_timer");
- }
+ m_pit->write_gate0(0);
+ m_pit->write_gate1(0);
+ m_pit->write_gate2(0);
}
@@ -325,7 +318,7 @@ void special_state::machine_reset()
{
m_specimx_color = 0xF0; // default for -bios 1/2, since they don't have colour
specimx_set_bank(2, 0); // Initial load ROM disk
- timer_set(attotime::zero, TIMER_PIT8253_GATES);
+ m_pit_timer->adjust(attotime::zero);
}
}