summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/osborne1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/osborne1.h')
-rw-r--r--src/mame/includes/osborne1.h75
1 files changed, 52 insertions, 23 deletions
diff --git a/src/mame/includes/osborne1.h b/src/mame/includes/osborne1.h
index c972e777e16..d3fc9e14a4b 100644
--- a/src/mame/includes/osborne1.h
+++ b/src/mame/includes/osborne1.h
@@ -5,7 +5,6 @@
* includes/osborne1.h
*
****************************************************************************/
-
#ifndef MAME_INCLUDES_OSBORNE1_H
#define MAME_INCLUDES_OSBORNE1_H
@@ -39,10 +38,10 @@ public:
m_ram(*this, RAM_TAG),
m_screen(*this, "screen"),
m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_speaker(*this, "speaker"),
m_pia0(*this, "pia_0"),
m_pia1(*this, "pia_1"),
+ m_gfxdecode(*this, "gfxdecode"),
+ m_speaker(*this, "speaker"),
m_acia(*this, "acia"),
m_fdc(*this, "mb8877"),
m_ieee(*this, IEEE488_TAG),
@@ -58,27 +57,27 @@ public:
m_p_chargen(*this, "chargen"),
m_video_timer(nullptr),
m_tilemap(nullptr),
- m_acia_rxc_txc_timer(nullptr)
+ m_acia_rxc_txc_timer(nullptr),
+ m_mem_cache(nullptr)
{
}
void osborne1(machine_config &config);
- void init_osborne1();
-
DECLARE_INPUT_CHANGED_MEMBER(reset_key);
protected:
+ virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
- void osborne1nv_io(address_map &map);
+ void osborne1_base(machine_config &config);
- required_device<ram_device> m_ram;
- required_device<screen_device> m_screen;
- required_device<z80_device> m_maincpu;
+ void osborne1_mem(address_map &map);
+ void osborne1_op(address_map &map);
+ void osborne1_io(address_map &map);
+ void osborne1nv_io(address_map &map);
-private:
DECLARE_WRITE8_MEMBER(bank_0xxx_w);
DECLARE_WRITE8_MEMBER(bank_1xxx_w);
DECLARE_READ8_MEMBER(bank_2xxx_3xxx_r);
@@ -88,6 +87,18 @@ private:
DECLARE_WRITE8_MEMBER(bankswitch_w);
DECLARE_WRITE_LINE_MEMBER(irqack_w);
+ bool rom_mode() const { return 0 != m_rom_mode; }
+ u8 scroll_x() const { return m_scroll_x; }
+
+ template <int Width, unsigned Scale> void draw_rows(uint16_t col, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ required_device<ram_device> m_ram;
+ required_device<screen_device> m_screen;
+ required_device<z80_device> m_maincpu;
+ required_device<pia6821_device> m_pia0;
+ required_device<pia6821_device> m_pia1;
+
+private:
DECLARE_READ8_MEMBER(ieee_pia_pb_r);
DECLARE_WRITE8_MEMBER(ieee_pia_pb_w);
DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func);
@@ -103,18 +114,12 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<speaker_sound_device> m_speaker;
- required_device<pia6821_device> m_pia0;
- required_device<pia6821_device> m_pia1;
required_device<acia6850_device> m_acia;
required_device<mb8877_device> m_fdc;
required_device<ieee488_device> m_ieee;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
- void osborne1_mem(address_map &map);
- void osborne1_op(address_map &map);
- void osborne1_io(address_map &map);
-
TIMER_CALLBACK_MEMBER(video_callback);
TIMER_CALLBACK_MEMBER(acia_rxc_txc_callback);
@@ -140,7 +145,6 @@ private:
required_region_ptr<u8> m_p_chargen;
// configuration (reloaded on reset)
- u8 m_screen_pac;
u8 m_acia_rxc_txc_div;
u8 m_acia_rxc_txc_p_low;
u8 m_acia_rxc_txc_p_high;
@@ -156,17 +160,42 @@ private:
u8 m_scroll_y;
u8 m_beep_state;
emu_timer *m_video_timer;
- bitmap_ind16 m_bitmap;
tilemap_t *m_tilemap;
- // SCREEN-PAC registers
- u8 m_resolution;
- u8 m_hc_left;
-
// serial state
u8 m_acia_irq_state;
u8 m_acia_rxc_txc_state;
emu_timer *m_acia_rxc_txc_timer;
+
+ memory_access_cache<0, 0, ENDIANNESS_LITTLE> *m_mem_cache;
+};
+
+
+class osborne1sp_state : public osborne1_state
+{
+public:
+ osborne1sp_state(const machine_config &mconfig, device_type type, const char *tag) :
+ osborne1_state(mconfig, type, tag)
+ {
+ }
+
+ void osborne1sp(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ void osborne1sp_mem(address_map &map);
+
+ DECLARE_READ8_MEMBER(bank_2xxx_3xxx_r);
+ DECLARE_WRITE8_MEMBER(bank_2xxx_3xxx_w);
+
+private:
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ // SCREEN-PAC registers
+ u8 m_resolution;
+ u8 m_hc_left;
};