summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2021-05-31 03:56:22 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2021-05-31 03:56:22 +1000
commitb8c237f9b5a65a2d61a5dd4ebcc3a224728bef82 (patch)
tree868829cc944627bc7b6d8908bb7ebb02ffbe2720 /src/mame/includes
parent1f26f20fc9a44e3f5a41d9ed768d8ca91049b22b (diff)
mbee: prepare for new software list.
Diffstat (limited to 'src/mame/includes')
-rw-r--r--src/mame/includes/mbee.h99
1 files changed, 59 insertions, 40 deletions
diff --git a/src/mame/includes/mbee.h b/src/mame/includes/mbee.h
index 9b9382c9abd..91f11882d41 100644
--- a/src/mame/includes/mbee.h
+++ b/src/mame/includes/mbee.h
@@ -11,6 +11,8 @@
#pragma once
#include "bus/centronics/ctronics.h"
+#include "bus/generic/carts.h"
+#include "bus/generic/slot.h"
#include "cpu/z80/z80.h"
#include "machine/z80daisy.h"
@@ -50,7 +52,8 @@ public:
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
, m_rtc(*this, "rtc")
- , m_pak(*this, "pak")
+ , m_p_pak(*this, "pakrom")
+ , m_pak(*this, "pakrom")
, m_telcom(*this, "telcom")
, m_basic(*this, "basic")
, m_io_x7(*this, "X.7")
@@ -60,6 +63,7 @@ public:
, m_screen(*this, "screen")
, m_bankr(*this, "bankr%d", 0)
, m_bankw(*this, "bankw%d", 0)
+ , m_pakrom(*this, "pak%u", 0U)
{ }
void mbee56(machine_config &config);
@@ -70,7 +74,9 @@ public:
void mbeett(machine_config &config);
void mbeeic(machine_config &config);
void mbeepc(machine_config &config);
+ void mbeepc2(machine_config &config);
void mbee128p(machine_config &config);
+ void remove_carts(machine_config &config);
void init_mbee() { m_features = 0x00; };
void init_mbeett() { m_features = 0x0d; };
@@ -83,38 +89,48 @@ public:
void init_mbee256() { m_features = 0x2d; };
private:
- void port04_w(uint8_t data);
- void port06_w(uint8_t data);
- uint8_t port07_r();
- uint8_t port08_r();
- void port08_w(uint8_t data);
- void port0a_w(uint8_t data);
- void port0b_w(uint8_t data);
- uint8_t port18_r();
- uint8_t port1c_r();
- void port1c_w(uint8_t data);
- void port50_w(uint8_t data);
- uint8_t telcom_low_r();
- uint8_t telcom_high_r();
- uint8_t speed_low_r();
- uint8_t speed_high_r();
- void m6545_index_w(uint8_t data);
- void m6545_data_w(uint8_t data);
- uint8_t video_low_r(offs_t offset);
- uint8_t video_high_r(offs_t offset);
- void video_low_w(offs_t offset, uint8_t data);
- void video_high_w(offs_t offset, uint8_t data);
- void pio_port_b_w(uint8_t data);
- uint8_t pio_port_b_r();
+ void port04_w(u8 data);
+ void port06_w(u8 data);
+ u8 port07_r();
+ u8 port08_r();
+ void port08_w(u8 data);
+ void port0a_w(u8 data);
+ void port0b_w(u8 data);
+ u8 port18_r();
+ u8 port1c_r();
+ void port1c_w(u8 data);
+ void port50_w(u8 data);
+ u8 telcom_low_r();
+ u8 telcom_high_r();
+ u8 speed_low_r();
+ u8 speed_high_r();
+ void m6545_index_w(u8 data);
+ void m6545_data_w(u8 data);
+ u8 video_low_r(offs_t offset);
+ u8 video_high_r(offs_t offset);
+ void video_low_w(offs_t offset, u8 data);
+ void video_high_w(offs_t offset, u8 data);
+ void pio_port_b_w(u8 data);
+ u8 pio_port_b_r();
DECLARE_WRITE_LINE_MEMBER(pio_ardy);
DECLARE_WRITE_LINE_MEMBER(crtc_vs);
- uint8_t fdc_status_r();
- void fdc_motor_w(uint8_t data);
+ u8 fdc_status_r();
+ u8 pakrom_r(offs_t);
+ void fdc_motor_w(u8 data);
void standard_palette(palette_device &palette) const;
void premium_palette(palette_device &palette) const;
uint32_t screen_update_mbee(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(newkb_timer);
+ image_init_result load_cart(device_image_interface &image, generic_slot_device *slot, u8);
DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak0_load) { return load_cart(image, m_pakrom[0], 0); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak1_load) { return load_cart(image, m_pakrom[1], 1); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak2_load) { return load_cart(image, m_pakrom[2], 2); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak3_load) { return load_cart(image, m_pakrom[3], 3); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak4_load) { return load_cart(image, m_pakrom[4], 4); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak5_load) { return load_cart(image, m_pakrom[5], 5); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak6_load) { return load_cart(image, m_pakrom[6], 6); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pak7_load) { return load_cart(image, m_pakrom[7], 7); }
WRITE_LINE_MEMBER(rtc_irq_w);
WRITE_LINE_MEMBER(fdc_intrq_w);
WRITE_LINE_MEMBER(fdc_drq_w);
@@ -146,25 +162,26 @@ private:
bool m_b7_rtc = 0;
bool m_b7_vs = 0;
bool m_b2 = 0;
- uint8_t m_framecnt = 0;
- uint8_t m_08 = 0;
- uint8_t m_0a = 0;
- uint8_t m_0b = 0;
- uint8_t m_1c = 0;
- uint8_t m_newkb_was_pressed[15] = { 0, };
- uint8_t m_newkb_q[20] = { 0, };
- uint8_t m_newkb_q_pos = 0;
- uint8_t m_sy6545_reg[32] = { 0, };
- uint8_t m_sy6545_ind = 0;
- uint8_t m_fdc_rq = 0;
- uint8_t m_bank_array[33] = { 0, };
+ u8 m_framecnt = 0;
+ u8 m_08 = 0;
+ u8 m_0a = 0;
+ u8 m_0b = 0;
+ u8 m_1c = 0;
+ u8 m_newkb_was_pressed[15] = { 0, };
+ u8 m_newkb_q[20] = { 0, };
+ u8 m_newkb_q_pos = 0;
+ u8 m_sy6545_reg[32] = { 0, };
+ u8 m_sy6545_ind = 0;
+ u8 m_fdc_rq = 0;
+ u8 m_bank_array[33] = { 0, };
+ bool m_pakrom_extended[8] = { 0, };
std::unique_ptr<u8[]> m_dummy; // black hole for writes to rom
std::unique_ptr<u8[]> m_ram; // main banked-switch ram, 128/256/pp
std::unique_ptr<u8[]> m_vram; // video ram, all models
std::unique_ptr<u8[]> m_pram; // pcg ram, all models
std::unique_ptr<u8[]> m_cram; // colour ram, all except mbee
std::unique_ptr<u8[]> m_aram; // attribute ram, ppc/128/256/pp/tt
- void setup_banks(uint8_t data, bool first_time, uint8_t b_mask);
+ void setup_banks(u8 data, bool first_time, u8 b_mask);
void oldkb_scan(uint16_t param);
void oldkb_matrix_r(uint16_t offs);
required_device<z80_device> m_maincpu;
@@ -178,7 +195,8 @@ private:
optional_device<floppy_connector> m_floppy0;
optional_device<floppy_connector> m_floppy1;
optional_device<mc146818_device> m_rtc;
- optional_memory_bank m_pak;
+ optional_region_ptr<u8> m_p_pak;
+ optional_memory_region m_pak;
optional_memory_bank m_telcom;
optional_memory_bank m_basic;
optional_ioport m_io_x7;
@@ -188,6 +206,7 @@ private:
required_device<screen_device> m_screen;
optional_memory_bank_array<16> m_bankr;
optional_memory_bank_array<16> m_bankw;
+ optional_device_array<generic_slot_device, 8> m_pakrom;
};
#endif // MAME_INCLUDES_MBEE_H