diff options
author | 2013-12-22 21:17:17 +0000 | |
---|---|---|
committer | 2013-12-22 21:17:17 +0000 | |
commit | 452bae2722a623a444355075ebc159ce0370a08a (patch) | |
tree | 19138fa17f6b2bcbb098391996aa496e3140c441 /src/mess/includes/poisk1.h | |
parent | 2279ff026a565b7802566a7dc7d33c883424b00c (diff) |
(mess) mega Soviet clone patch [shattered]
- moves ec184*, iskr103* and mc1502 out of pc.c
- moves CGA font upload support to a subclass
- adds new drivers: poisk1, ec1847, pk88
- adds a skeleton of native iskr103* keyboard
i8089: implement remaining instructions and support execution from "io" space. [Carl]
(mess) isbc-215g: add intel isbc-215g hdd controller, read only for now [Carl]
(mess) isbc: add hdd support to isbc2861 (nw)
Diffstat (limited to 'src/mess/includes/poisk1.h')
-rw-r--r-- | src/mess/includes/poisk1.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/mess/includes/poisk1.h b/src/mess/includes/poisk1.h new file mode 100644 index 00000000000..87f97c8ab47 --- /dev/null +++ b/src/mess/includes/poisk1.h @@ -0,0 +1,100 @@ +/***************************************************************************** + * + * includes/poisk1.h + * + ****************************************************************************/ + +#ifndef POISK1_H_ +#define POISK1_H_ + +#include "imagedev/cassette.h" +#include "machine/i8255.h" +#include "machine/isa.h" +#include "machine/pic8259.h" +#include "machine/pit8253.h" +#include "machine/ram.h" +#include "machine/xsu_cards.h" +#include "sound/speaker.h" + +#define POISK1_UPDATE_ROW(name) \ + void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride) + +class p1_state : public driver_device +{ +public: + p1_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_pic8259(*this, "pic8259"), + m_pit8253(*this, "pit8253"), + m_ppi8255n1(*this, "ppi8255n1"), + m_ppi8255n2(*this, "ppi8255n2"), + m_isabus(*this, "isa"), + m_speaker(*this, "speaker"), + m_cassette(*this, "cassette"), + m_ram(*this, RAM_TAG) { } + + required_device<cpu_device> m_maincpu; + required_device<pic8259_device> m_pic8259; + required_device<pit8253_device> m_pit8253; + required_device<i8255_device> m_ppi8255n1; + required_device<i8255_device> m_ppi8255n2; + required_device<isa8_device> m_isabus; + required_device<speaker_sound_device> m_speaker; + required_device<cassette_image_device> m_cassette; + required_device<ram_device> m_ram; + + DECLARE_DRIVER_INIT(poisk1); + DECLARE_MACHINE_START(poisk1); + DECLARE_MACHINE_RESET(poisk1); + + IRQ_CALLBACK_MEMBER(p1_irq_callback); + + virtual void palette_init(); + virtual void video_start(); + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void set_palette_luts(); + POISK1_UPDATE_ROW(cga_gfx_2bpp_update_row); + POISK1_UPDATE_ROW(cga_gfx_1bpp_update_row); + POISK1_UPDATE_ROW(poisk1_gfx_1bpp_update_row); + + DECLARE_WRITE_LINE_MEMBER(p1_pit8253_out2_changed); + DECLARE_WRITE_LINE_MEMBER(p1_speaker_set_spkrdata); + UINT8 m_p1_spkrdata; + UINT8 m_p1_input; + + UINT8 m_kbpoll_mask; + + struct + { + UINT8 trap[4]; + UINT8 *videoram_base; + UINT8 *videoram; + UINT8 mode_control_6a; + UINT8 color_select_68; + UINT8 palette_lut_2bpp[4]; + int stride; + void *update_row(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride); + } m_video; + + DECLARE_READ8_MEMBER(p1_trap_r); + DECLARE_WRITE8_MEMBER(p1_trap_w); + DECLARE_READ8_MEMBER(p1_cga_r); + DECLARE_WRITE8_MEMBER(p1_cga_w); + DECLARE_WRITE8_MEMBER(p1_vram_w); + + DECLARE_READ8_MEMBER(p1_ppi_r); + DECLARE_WRITE8_MEMBER(p1_ppi_w); + DECLARE_WRITE8_MEMBER(p1_ppi_porta_w); + DECLARE_READ8_MEMBER(p1_ppi_porta_r); + DECLARE_READ8_MEMBER(p1_ppi_portb_r); + DECLARE_READ8_MEMBER(p1_ppi_portc_r); + DECLARE_WRITE8_MEMBER(p1_ppi_portc_w); + DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w); + DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w); + DECLARE_READ8_MEMBER(p1_ppi2_portc_r); + + const char *m_cputag; +}; + +#endif /* POISK1_H_ */ |