summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Robbbert <Robbbert@users.noreply.github.com>2020-06-13 01:38:19 +1000
committerGravatarGravatar Robbbert <Robbbert@users.noreply.github.com>2020-06-13 01:38:19 +1000
commita61d5c48366d14ee829faf74707381d9ff65b22c (patch)
treed6b08649ae2359d9f9895fdb2b77c9ab33005b62
parentc3160390d6a519428c1e4b60b11253833fa8c281 (diff)
downloadmame-a61d5c48366d14ee829faf74707381d9ff65b22c.tar.xz
mame-a61d5c48366d14ee829faf74707381d9ff65b22c.zip
(nw) kaypro: don't use regions as ram.
-rw-r--r--src/mame/drivers/kaypro.cpp137
-rw-r--r--src/mame/includes/kaypro.h80
-rw-r--r--src/mame/machine/kaypro.cpp70
-rw-r--r--src/mame/video/kaypro.cpp70
4 files changed, 175 insertions, 182 deletions
diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp
index 99487ebf146..47343463d54 100644
--- a/src/mame/drivers/kaypro.cpp
+++ b/src/mame/drivers/kaypro.cpp
@@ -56,7 +56,7 @@
#include "speaker.h"
-uint8_t kaypro_state::kaypro484_87_r() { return 0x7f; } /* to bypass unemulated HD controller */
+u8 kaypro_state::kaypro484_87_r() { return 0x7f; } /* to bypass unemulated HD controller */
/***********************************************************
@@ -66,9 +66,9 @@ uint8_t kaypro_state::kaypro484_87_r() { return 0x7f; } /* to bypass unemulat
void kaypro_state::kaypro_map(address_map &map)
{
- map(0x0000, 0x2fff).bankr("bankr0").bankw("bankw0");
+ map(0x0000, 0x2fff).bankr("bankr").bankw("bankw");
map(0x3000, 0x3fff).bankrw("bank3");
- map(0x4000, 0xffff).ram().region("rambank", 0x4000);
+ map(0x4000, 0xffff).ram();
}
void kaypro_state::kayproii_io(address_map &map)
@@ -203,9 +203,6 @@ void kaypro_state::kayproii(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &kaypro_state::kayproii_io);
m_maincpu->set_daisy_config(kayproii_daisy_chain);
- MCFG_MACHINE_START_OVERRIDE(kaypro_state, kayproii )
- MCFG_MACHINE_RESET_OVERRIDE(kaypro_state, kaypro )
-
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER, rgb_t::green());
m_screen->set_refresh_hz(60);
@@ -215,8 +212,6 @@ void kaypro_state::kayproii(machine_config &config)
m_screen->set_screen_update(FUNC(kaypro_state::screen_update_kayproii));
m_screen->set_palette(m_palette);
- MCFG_VIDEO_START_OVERRIDE(kaypro_state, kaypro )
-
GFXDECODE(config, "gfxdecode", m_palette, gfx_kayproii);
PALETTE(config, m_palette, palette_device::MONOCHROME);
@@ -276,12 +271,17 @@ void kaypro_state::kayproii(machine_config &config)
void kaypro_state::kayproiv(machine_config &config)
{
kayproii(config);
- m_pio_s->set_clock(2500000);
m_pio_s->out_pa_callback().set(FUNC(kaypro_state::kayproiv_pio_system_w));
config.device_remove("fdc:0");
config.device_remove("fdc:1");
FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
- FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats);
+ FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+}
+
+void kaypro_state::omni2(machine_config &config)
+{
+ kayproiv(config);
+ m_screen->set_screen_update(FUNC(kaypro_state::screen_update_omni2));
}
void kaypro_state::kaypro484(machine_config &config)
@@ -292,8 +292,6 @@ void kaypro_state::kaypro484(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &kaypro_state::kaypro484_io);
m_maincpu->set_daisy_config(kaypro484_daisy_chain);
- MCFG_MACHINE_RESET_OVERRIDE(kaypro_state, kaypro )
-
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
@@ -302,8 +300,6 @@ void kaypro_state::kaypro484(machine_config &config)
m_screen->set_visarea(0,80*8-1,0,25*16-1);
m_screen->set_screen_update(FUNC(kaypro_state::screen_update_kaypro484));
- MCFG_VIDEO_START_OVERRIDE(kaypro_state, kaypro )
-
GFXDECODE(config, "gfxdecode", m_palette, gfx_kaypro484);
PALETTE(config, m_palette, FUNC(kaypro_state::kaypro_palette), 3);
@@ -390,22 +386,23 @@ void kaypro_state::kaypro284(machine_config &config)
FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", floppy_image_device::default_floppy_formats).enable_sound(true);
}
-void kaypro_state::omni2(machine_config &config)
-{
- kayproiv(config);
- m_screen->set_screen_update(FUNC(kaypro_state::screen_update_omni2));
-}
-
void kaypro_state::init_kaypro()
{
- uint8_t *main = memregion("roms")->base();
- uint8_t *ram = memregion("rambank")->base();
-
- membank("bankr0")->configure_entry(1, &main[0x0000]);
- membank("bankr0")->configure_entry(0, &ram[0x0000]);
- membank("bank3")->configure_entry(1, &main[0x3000]);
- membank("bank3")->configure_entry(0, &ram[0x3000]);
- membank("bankw0")->configure_entry(0, &ram[0x0000]);
+ m_ram = make_unique_clear<u8[]>(0x4000);
+ m_vram = make_unique_clear<u8[]>(0x1000);
+ m_dummy = std::make_unique<u8[]>(0x3000);
+
+ u8 *m = memregion("roms")->base();
+ u8 *r = m_ram.get();
+ u8 *v = m_vram.get();
+ u8 *d = m_dummy.get();
+
+ m_bankr->configure_entry(1, &m[0]);
+ m_bankr->configure_entry(0, r);
+ m_bankw->configure_entry(1, d);
+ m_bankw->configure_entry(0, r);
+ m_bank3->configure_entry(1, v);
+ m_bank3->configure_entry(0, r+0x3000);
}
@@ -420,7 +417,7 @@ void kaypro_state::init_kaypro()
// Kaypro II
ROM_START(kayproii)
/* The original board could take a 2716 or 2732 */
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "149", "81-149 for Kaypro Bd. 81-110")
ROMX_LOAD("81-149.u47", 0x0000, 0x0800, CRC(28264bc1) SHA1(a12afb11a538fc0217e569bc29633d5270dfa51b), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "149b", "81-149B for Kaypro Bd. 81-110")
@@ -437,7 +434,6 @@ ROM_START(kayproii)
ROMX_LOAD("kplus83.rom", 0x0000, 0x2000, CRC(5e9b817d) SHA1(26ea875ee3659a964cbded4ed0c82a3af42db64b), ROM_BIOS(6) )
ROM_SYSTEM_BIOS( 7, "pro8v3", "MicroCornucopia_Pro8_V3.3")
ROMX_LOAD("pro8-3.rom", 0x0000, 0x1000, CRC(f2d4c598) SHA1(269b2fddeb98db3e5eba2056ff250dff72b0561e), ROM_BIOS(7) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
ROM_REGION(0x0800, "chargen", ROMREGION_INVERT)
ROM_LOAD("81-146.u43", 0x0000, 0x0800, CRC(4cc7d206) SHA1(5cb880083b94bd8220aac1f87d537db7cfeb9013) )
@@ -445,7 +441,7 @@ ROM_END
// Kaypro IV (or 4'83)
ROM_START(kayproiv)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "232", "81-232 for Kaypro Bd. 81-240")
ROMX_LOAD("81-232.u47", 0x0000, 0x1000, CRC(4918fb91) SHA1(cd9f45cc3546bcaad7254b92c5d501c40e2ef0b2), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "roadrunner", "Highland Microkit Roadrunner 1.5")
@@ -456,7 +452,6 @@ ROM_START(kayproiv)
ROMX_LOAD("kplus83.rom", 0x0000, 0x2000, CRC(5e9b817d) SHA1(26ea875ee3659a964cbded4ed0c82a3af42db64b), ROM_BIOS(3) )
ROM_SYSTEM_BIOS( 4, "pro8v3", "MicroCornucopia_Pro8_V3.3")
ROMX_LOAD("pro8-3.rom", 0x0000, 0x1000, CRC(f2d4c598) SHA1(269b2fddeb98db3e5eba2056ff250dff72b0561e), ROM_BIOS(4) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
ROM_REGION(0x0800, "chargen", ROMREGION_INVERT)
ROM_LOAD("81-146.u43", 0x0000, 0x0800, CRC(4cc7d206) SHA1(5cb880083b94bd8220aac1f87d537db7cfeb9013) )
@@ -464,7 +459,7 @@ ROM_END
// Kaypro 10, '83 model, hard disk cable connector in the middle of the mainboard, no space for modem or RTC
ROM_START(kaypro10)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "188", "V1.9 for Kaypro Bd. 81-180")
ROMX_LOAD("81-188.u42", 0x0000, 0x1000, CRC(6cbd6aa0) SHA1(47004f8c6e17407e4f8d613c9520f9316716d9e2), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "x", "V1.7")
@@ -473,7 +468,6 @@ ROM_START(kaypro10)
ROMX_LOAD("trom34.rom", 0x0000, 0x2000, CRC(0ec6d39a) SHA1(8c2a92b8642e144452c28300bf50a00a11a060cd), ROM_BIOS(2) )
ROM_SYSTEM_BIOS( 3, "kplus83", "MICROCode Consulting KayPLUS 83")
ROMX_LOAD("kplus83.rom", 0x0000, 0x2000, CRC(5e9b817d) SHA1(26ea875ee3659a964cbded4ed0c82a3af42db64b), ROM_BIOS(3) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-187.u31", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
@@ -481,7 +475,7 @@ ROM_END
// Kaypro 10, '84 model, hard disk cable on the right hand side of the mainboard
ROM_START(kaypro1084)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "302", "V1.9E for Kaypro Bd. 81-181")
ROMX_LOAD("81-302.u42", 0x0000, 0x1000, CRC(3f9bee20) SHA1(b29114a199e70afe46511119b77a662e97b093a0), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "1.9ee", "V1.9ee")
@@ -495,14 +489,12 @@ ROM_START(kaypro1084)
ROM_SYSTEM_BIOS( 5, "kplus", "MICROCode Consulting KayPLUS 84")
ROMX_LOAD("kplus84.rom", 0x0000, 0x2000, CRC(4551905a) SHA1(48f0964edfad05b214810ae5595638245c30e5c0), ROM_BIOS(5) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-187.u31", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
ROM_START(kaypro484) // later renamed in 2X (or 2X MTC to signify the inclusion of Modem and RTC in comparison with the "old" 2X)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "292a", "81-292a for Kaypro Bd. 81-184")
ROMX_LOAD("81-292a.u34", 0x0000, 0x1000, CRC(241f27a5) SHA1(82711289d19e9b165e35324da010466d225e503a), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "turbo", "Advent Turbo ROM")
@@ -514,15 +506,13 @@ ROM_START(kaypro484) // later renamed in 2X (or 2X MTC to signify the inclusion
ROM_SYSTEM_BIOS( 4, "pro8v5", "MicroCornucopia Pro8 V5")
ROMX_LOAD("pro884v5.rom", 0x0000, 0x2000, CRC(fe0051b1) SHA1(cac429154d40e21174ae05ceb0017b62473cdebd), ROM_BIOS(4) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// Kaypro 2'84, like the 4'84, but two single sided drives, no RTC, no modem
ROM_START(kaypro284)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "292a", "81-292a for Kaypro Bd. 81-184")
ROMX_LOAD("81-292a.u34", 0x0000, 0x1000, CRC(241f27a5) SHA1(82711289d19e9b165e35324da010466d225e503a), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "turbo", "Advent Turbo ROM")
@@ -534,8 +524,6 @@ ROM_START(kaypro284)
ROM_SYSTEM_BIOS( 4, "pro8v5", "MicroCornucopia Pro8 V5")
ROMX_LOAD("pro884v5.rom", 0x0000, 0x2000, CRC(fe0051b1) SHA1(cac429154d40e21174ae05ceb0017b62473cdebd), ROM_BIOS(4) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
@@ -560,20 +548,17 @@ ROM_START(kaypro2x)
ROM_SYSTEM_BIOS( 7, "handyman", "Hitech Research Handyman") // http://content.thetechnickel.com/misc/kaypro-handyman/kaypro-4-plus-88-06.jpg
ROMX_LOAD( "handyman.bin", 0x0000, 0x8000, CRC(f020d82c) SHA1(576a6608270d4ec7cf814c9de46ecf4e2869d30a), ROM_BIOS(7) ) // fits any classic Kaypro, needs its own 16K RAM
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// Kaypro II'84 plus 88, the "KAYPRO-88" board has 128k or 256k of its own ram on it, it's a factory installed SWP CoPower 88
ROM_START(kayproiip88)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "232", "81-232 for Kaypro Bd. 81-240")
ROMX_LOAD("81-232.u47", 0x0000, 0x1000, CRC(4918fb91) SHA1(cd9f45cc3546bcaad7254b92c5d501c40e2ef0b2), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "kplus83", "MICROCode Consulting KayPLUS 83")
ROMX_LOAD("kplus83.rom", 0x0000, 0x2000, CRC(5e9b817d) SHA1(26ea875ee3659a964cbded4ed0c82a3af42db64b), ROM_BIOS(1) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
ROM_REGION(0x0800, "chargen", ROMREGION_INVERT)
ROM_LOAD("81-146.u43", 0x0000, 0x0800, CRC(4cc7d206) SHA1(5cb880083b94bd8220aac1f87d537db7cfeb9013) )
@@ -584,60 +569,52 @@ ROM_END
// Kaypro 4'84 plus 88, the "KAYPRO-88" board has 128k or 256k of its own ram on it, it's a factory installed SWP CoPower 88
ROM_START(kaypro484p88)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "292a", "292A")
ROMX_LOAD("81-292a.u34", 0x0000, 0x1000, CRC(241f27a5) SHA1(82711289d19e9b165e35324da010466d225e503a), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "kplus", "MICROCode Consulting KayPLUS 84")
ROMX_LOAD("kplus84.rom", 0x0000, 0x2000, CRC(4551905a) SHA1(48f0964edfad05b214810ae5595638245c30e5c0), ROM_BIOS(1) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// Kaypro New 2, no modem, no RTC, single DS/DD disk drive
ROM_START(kaypronew2)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "478", "V2.01 for Kaypro Bd. 81-294 (universal")
ROMX_LOAD("81-478.u42", 0x0000, 0x2000, CRC(de618380) SHA1(c8d6312e6eeb62a53e741f1ff3b878bdcb7b5aaa), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "kplus", "MICROCode Consulting KayPLUS 84")
ROMX_LOAD("kplus84.rom", 0x0000, 0x2000, CRC(4551905a) SHA1(48f0964edfad05b214810ae5595638245c30e5c0), ROM_BIOS(1) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// "Desktop" PC with two high density, 2.8MB floppy disk drivers over the monitor
ROM_START(robie)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "326", "V1.7R")
ROMX_LOAD("81-326.u34", 0x0000, 0x2000, CRC(7f0c3f68) SHA1(54b088a1b2200f9df4b9b347bbefb0115f3a4976), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "u", "V1.4")
ROMX_LOAD("robie_u.u34", 0x0000, 0x2000, CRC(da7248b5) SHA1(1dc053b3e44ead47255cc166b7b4b0adaeb3dd3d), ROM_BIOS(1) ) // rom number unknown
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// Kaypro 4X, a Robie in the standard portable Kaypro enclosure
ROM_START(kaypro4x)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_LOAD("81-326.u34", 0x0000, 0x2000, CRC(7f0c3f68) SHA1(54b088a1b2200f9df4b9b347bbefb0115f3a4976) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// Kaypro 1, equivalent to "old" 2X, before 4'84 became 2X
ROM_START(kaypro1)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_SYSTEM_BIOS( 0, "478", "V2.01 for Kaypro Bd. 81-294 (universal")
ROMX_LOAD("81-478.u42", 0x0000, 0x2000, CRC(de618380) SHA1(c8d6312e6eeb62a53e741f1ff3b878bdcb7b5aaa), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "turbo", "Advent Turbo ROM")
@@ -645,48 +622,42 @@ ROM_START(kaypro1)
ROM_SYSTEM_BIOS( 2, "kplus", "MICROCode Consulting KayPLUS 84")
ROMX_LOAD("kplus84.rom", 0x0000, 0x2000, CRC(4551905a) SHA1(48f0964edfad05b214810ae5595638245c30e5c0), ROM_BIOS(2) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen",0)
ROM_LOAD("81-235.u9", 0x0000, 0x1000, CRC(5f72da5b) SHA1(8a597000cce1a7e184abfb7bebcb564c6bf24fb7) )
ROM_END
// Omni II logic analyzer
ROM_START(omni2)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_LOAD("omni2.u47", 0x0000, 0x1000, CRC(2883f9e0) SHA1(d98c784e62853582d298bf7ca84c75872847ac9b) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x0800, "chargen", ROMREGION_INVERT)
ROM_LOAD("omni2.u43", 0x0000, 0x0800, CRC(049b3381) SHA1(46f1d4f038747ba9048b075dc617361be088f82a) )
ROM_END
// Omni 4 logic analyzer
ROM_START(omni4)
- ROM_REGION(0x4000, "roms",0)
+ ROM_REGION(0x3000, "roms",0)
ROM_LOAD("omni4.u34", 0x0000, 0x2000, CRC(f24e8521) SHA1(374f2e2b791a807f103744a22c9c8f3af55f1033) )
- ROM_REGION(0x10000, "rambank", ROMREGION_ERASEFF)
-
ROM_REGION(0x1000, "chargen", 0)
ROM_LOAD("omni4.u9", 0x0000, 0x1000, CRC(579665a6) SHA1(261fcdc5a44821de9484340cbe429110400140b4) )
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
-COMP( 1982, kayproii, 0, 0, kayproii, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro II - 2/83" , 0 )
-COMP( 1983, kayproiv, kayproii, 0, kayproiv, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro IV - 4/83" , 0 ) // model 81-004
-COMP( 1983, kaypro10, 0, 0, kaypro10, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 10 - 1983", 0 )
-COMP( 1983, kayproiip88, kayproii, 0, kayproii, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4 plus88 - 4/83" , MACHINE_NOT_WORKING ) // model 81-004 with an added 8088 daughterboard and rom
-COMP( 1984, kaypro484, 0, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4/84" , MACHINE_NOT_WORKING ) // model 81-015
-COMP( 1984, kaypro284, kaypro484, 0, kaypro284, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 2/84" , MACHINE_NOT_WORKING ) // model 81-015
-COMP( 1984, kaypro484p88, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4/84 plus88", MACHINE_NOT_WORKING ) // model 81-015 with an added 8088 daughterboard and rom
-COMP( 1984, kaypro1084, kaypro10, 0, kaypro10, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 10" , MACHINE_NOT_WORKING ) // model 81-005
-COMP( 1984, robie, 0, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro Robie" , MACHINE_NOT_WORKING )
-COMP( 1985, kaypro2x, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 2x" , MACHINE_NOT_WORKING ) // model 81-025
-COMP( 1985, kaypronew2, 0, 0, kaypronew2, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro New 2", MACHINE_NOT_WORKING )
-COMP( 1985, kaypro4x, robie, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4x" , MACHINE_NOT_WORKING )
-COMP( 1986, kaypro1, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 1", MACHINE_NOT_WORKING )
-COMP( 198?, omni2, kayproii, 0, omni2, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Omni II Logic Analyzer" , 0 )
-COMP( 198?, omni4, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Omni Logic Inc.", "Omni 4 Logic Analyzer" , MACHINE_NOT_WORKING )
+COMP( 1982, kayproii, 0, 0, kayproii, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro II - 2/83" , MACHINE_SUPPORTS_SAVE )
+COMP( 1983, kayproiv, kayproii, 0, kayproiv, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro IV - 4/83" , MACHINE_SUPPORTS_SAVE ) // model 81-004
+COMP( 1983, kaypro10, 0, 0, kaypro10, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 10 - 1983", MACHINE_SUPPORTS_SAVE )
+COMP( 1983, kayproiip88, kayproii, 0, kayproii, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4 plus88 - 4/83" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // model 81-004 with an added 8088 daughterboard and rom
+COMP( 1984, kaypro484, 0, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4/84" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // model 81-015
+COMP( 1984, kaypro284, kaypro484, 0, kaypro284, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 2/84" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // model 81-015
+COMP( 1984, kaypro484p88, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4/84 plus88", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // model 81-015 with an added 8088 daughterboard and rom
+COMP( 1984, kaypro1084, kaypro10, 0, kaypro10, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 10" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // model 81-005
+COMP( 1984, robie, 0, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro Robie" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+COMP( 1985, kaypro2x, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 2x" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // model 81-025
+COMP( 1985, kaypronew2, 0, 0, kaypronew2, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro New 2", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+COMP( 1985, kaypro4x, robie, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 4x" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+COMP( 1986, kaypro1, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Kaypro 1", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
+COMP( 198?, omni2, kayproii, 0, omni2, kaypro, kaypro_state, init_kaypro, "Non Linear Systems", "Omni II Logic Analyzer" , MACHINE_SUPPORTS_SAVE )
+COMP( 198?, omni4, kaypro484, 0, kaypro484, kaypro, kaypro_state, init_kaypro, "Omni Logic Inc.", "Omni 4 Logic Analyzer" , MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/kaypro.h b/src/mame/includes/kaypro.h
index 8b6ce15c308..e119ce1b5c7 100644
--- a/src/mame/includes/kaypro.h
+++ b/src/mame/includes/kaypro.h
@@ -39,34 +39,10 @@ public:
, m_floppy1(*this, "fdc:1")
, m_crtc(*this, "crtc")
, m_beep(*this, "beeper")
- {}
-
- DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
- uint8_t kaypro484_87_r();
- uint8_t kaypro484_system_port_r();
- uint8_t kaypro484_status_r();
- uint8_t kaypro484_videoram_r();
- void kaypro484_system_port_w(uint8_t data);
- void kaypro484_index_w(uint8_t data);
- void kaypro484_register_w(uint8_t data);
- void kaypro484_videoram_w(uint8_t data);
- uint8_t pio_system_r();
- void kayproii_pio_system_w(uint8_t data);
- void kayproiv_pio_system_w(uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
- DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
- uint8_t kaypro_videoram_r(offs_t offset);
- void kaypro_videoram_w(offs_t offset, uint8_t data);
- DECLARE_MACHINE_START(kayproii);
- DECLARE_MACHINE_RESET(kaypro);
- DECLARE_VIDEO_START(kaypro);
- void kaypro_palette(palette_device &palette) const;
- void init_kaypro();
- uint32_t screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_kaypro484(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- MC6845_UPDATE_ROW(kaypro484_update_row);
- DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
+ , m_bankr(*this, "bankr")
+ , m_bankw(*this, "bankw")
+ , m_bank3(*this, "bank3")
+ {}
void omni2(machine_config &config);
void kayproiv(machine_config &config);
@@ -75,21 +51,52 @@ public:
void kaypro484(machine_config &config);
void kaypro10(machine_config &config);
void kaypro284(machine_config &config);
+
+ void init_kaypro();
+
+private:
void kaypro484_io(address_map &map);
void kaypro_map(address_map &map);
void kayproii_io(address_map &map);
-private:
+
+ DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
+ u8 kaypro484_87_r();
+ u8 kaypro484_system_port_r();
+ u8 kaypro484_status_r();
+ u8 kaypro484_videoram_r();
+ void kaypro484_system_port_w(u8 data);
+ void kaypro484_index_w(u8 data);
+ void kaypro484_register_w(u8 data);
+ void kaypro484_videoram_w(u8 data);
+ u8 pio_system_r();
+ void kayproii_pio_system_w(u8 data);
+ void kayproiv_pio_system_w(u8 data);
+ DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
+ DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
+ u8 kaypro_videoram_r(offs_t offset);
+ void kaypro_videoram_w(offs_t offset, u8 data);
+ void machine_start() override;
+ void machine_reset() override;
+ void kaypro_palette(palette_device &palette) const;
+ uint32_t screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_kaypro484(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ MC6845_UPDATE_ROW(kaypro484_update_row);
+ DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb);
+
void mc6845_screen_configure();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- uint8_t m_mc6845_reg[32];
- uint8_t m_mc6845_ind;
- uint8_t m_framecnt;
- uint8_t *m_p_videoram;
+ u8 m_mc6845_reg[32];
+ u8 m_mc6845_ind;
+ u8 m_framecnt;
+ std::unique_ptr<u8[]> m_ram;
+ std::unique_ptr<u8[]> m_vram; // video ram
+ std::unique_ptr<u8[]> m_dummy; // black hole for write to rom
int m_centronics_busy;
bool m_is_motor_off;
- uint8_t m_fdc_rq;
- uint8_t m_system_port;
+ u8 m_fdc_rq;
+ u8 m_system_port;
uint16_t m_mc6845_video_address;
floppy_image_device *m_floppy;
@@ -105,6 +112,9 @@ private:
optional_device<floppy_connector> m_floppy1;
optional_device<mc6845_device> m_crtc;
required_device<beep_device> m_beep;
+ required_memory_bank m_bankr;
+ required_memory_bank m_bankw;
+ required_memory_bank m_bank3;
};
#endif // MAME_INCLUDES_KAYPRO_H
diff --git a/src/mame/machine/kaypro.cpp b/src/mame/machine/kaypro.cpp
index c1dbb8b60cb..f3700fa0c9c 100644
--- a/src/mame/machine/kaypro.cpp
+++ b/src/mame/machine/kaypro.cpp
@@ -21,9 +21,9 @@ WRITE_LINE_MEMBER( kaypro_state::write_centronics_busy )
m_centronics_busy = state;
}
-uint8_t kaypro_state::pio_system_r()
+u8 kaypro_state::pio_system_r()
{
- uint8_t data = 0;
+ u8 data = 0;
/* centronics busy */
data |= m_centronics_busy << 3;
@@ -34,7 +34,7 @@ uint8_t kaypro_state::pio_system_r()
return data;
}
-void kaypro_state::kayproii_pio_system_w(uint8_t data)
+void kaypro_state::kayproii_pio_system_w(u8 data)
{
/* d7 bank select
d6 disk drive motors - (0=on)
@@ -44,8 +44,9 @@ void kaypro_state::kayproii_pio_system_w(uint8_t data)
d1 drive B
d0 drive A */
- membank("bankr0")->set_entry(BIT(data, 7));
- membank("bank3")->set_entry(BIT(data, 7));
+ m_bankr->set_entry(BIT(data, 7));
+ m_bankw->set_entry(BIT(data, 7));
+ m_bank3->set_entry(BIT(data, 7));
m_is_motor_off = BIT(data, 6);
m_floppy = nullptr;
@@ -72,7 +73,7 @@ void kaypro_state::kayproii_pio_system_w(uint8_t data)
m_system_port = data;
}
-void kaypro_state::kayproiv_pio_system_w(uint8_t data)
+void kaypro_state::kayproiv_pio_system_w(u8 data)
{
kayproii_pio_system_w(data);
@@ -88,13 +89,13 @@ void kaypro_state::kayproiv_pio_system_w(uint8_t data)
************************************************************/
-uint8_t kaypro_state::kaypro484_system_port_r()
+u8 kaypro_state::kaypro484_system_port_r()
{
- uint8_t data = m_centronics_busy << 6;
+ u8 data = m_centronics_busy << 6;
return (m_system_port & 0xbf) | data;
}
-void kaypro_state::kaypro484_system_port_w(uint8_t data)
+void kaypro_state::kaypro484_system_port_w(u8 data)
{
/* d7 bank select
d6 alternate character set (write only)
@@ -105,8 +106,9 @@ void kaypro_state::kaypro484_system_port_w(uint8_t data)
d1 drive B
d0 drive A */
- membank("bankr0")->set_entry(BIT(data, 7));
- membank("bank3")->set_entry(BIT(data, 7));
+ m_bankr->set_entry(BIT(data, 7));
+ m_bankw->set_entry(BIT(data, 7));
+ m_bank3->set_entry(BIT(data, 7));
m_is_motor_off = !BIT(data, 4);
m_floppy = nullptr;
@@ -221,16 +223,29 @@ WRITE_LINE_MEMBER( kaypro_state::fdc_drq_w )
Machine
************************************************************/
-MACHINE_START_MEMBER( kaypro_state,kayproii )
+void kaypro_state::machine_start()
{
- m_pio_s->strobe_a(0);
+ if (m_pio_s)
+ m_pio_s->strobe_a(0);
+
+ save_pointer(NAME(m_vram), 0x1000);
+ save_pointer(NAME(m_ram), 0x4000);
+
+ save_item(NAME(m_mc6845_reg));
+ save_item(NAME(m_mc6845_ind));
+ save_item(NAME(m_framecnt));
+ save_item(NAME(m_centronics_busy));
+ save_item(NAME(m_is_motor_off));
+ save_item(NAME(m_fdc_rq));
+ save_item(NAME(m_system_port));
+ save_item(NAME(m_mc6845_video_address));
}
-MACHINE_RESET_MEMBER( kaypro_state,kaypro )
+void kaypro_state::machine_reset()
{
- membank("bankr0")->set_entry(1); // point at rom
- membank("bankw0")->set_entry(0); // always write to ram
- membank("bank3")->set_entry(1); // point at video ram
+ m_bankr->set_entry(1); // point at rom
+ m_bankw->set_entry(1); // always write to ram
+ m_bank3->set_entry(1); // point at video ram
m_system_port = 0x80;
m_fdc_rq = 0;
m_maincpu->reset();
@@ -251,31 +266,32 @@ MACHINE_RESET_MEMBER( kaypro_state,kaypro )
QUICKLOAD_LOAD_MEMBER(kaypro_state::quickload_cb)
{
- uint8_t *RAM = memregion("rambank")->base();
+ m_bankr->set_entry(0);
+ m_bankw->set_entry(0);
+ m_bank3->set_entry(0);
+
+ address_space& prog_space = m_maincpu->space(AS_PROGRAM);
/* Avoid loading a program if CP/M-80 is not in memory */
- if ((RAM[0] != 0xc3) || (RAM[5] != 0xc3))
+ if ((prog_space.read_byte(0) != 0xc3) || (prog_space.read_byte(5) != 0xc3))
return image_init_result::FAIL;
if (quickload_size >= 0xfd00)
return image_init_result::FAIL;
/* Load image to the TPA (Transient Program Area) */
- for (uint16_t i = 0; i < quickload_size; i++)
+ for (u16 i = 0; i < quickload_size; i++)
{
- uint8_t data;
+ u8 data;
if (image.fread( &data, 1) != 1)
return image_init_result::FAIL;
- RAM[i+0x100] = data;
+ prog_space.write_byte(i+0x100, data);
}
-
- membank("bankr0")->set_entry(0);
- membank("bank3")->set_entry(0);
- RAM[0x80]=0; RAM[0x81]=0; // clear out command tail
+ prog_space.write_byte(0x80, 0); prog_space.write_byte(0x81, 0); // clear out command tail
m_maincpu->set_pc(0x100); // start program
- m_maincpu->set_state_int(Z80_SP, 256 * RAM[7] - 300); // put the stack a bit before BDOS
+ m_maincpu->set_state_int(Z80_SP, 256 * prog_space.read_byte(7) - 300); // put the stack a bit before BDOS
return image_init_result::PASS;
}
diff --git a/src/mame/video/kaypro.cpp b/src/mame/video/kaypro.cpp
index 2af3874ffdd..f2e41fc47a1 100644
--- a/src/mame/video/kaypro.cpp
+++ b/src/mame/video/kaypro.cpp
@@ -20,7 +20,7 @@ void kaypro_state::kaypro_palette(palette_device &palette) const
palette.set_pen_color(2, rgb_t(0, 110, 0)); // low intensity green
}
-uint32_t kaypro_state::screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 kaypro_state::screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* The display consists of 80 columns and 24 rows. Each row is allocated 128 bytes of ram,
but only the first 80 are used. The total video ram therefore is 0x0c00 bytes.
@@ -29,8 +29,8 @@ uint32_t kaypro_state::screen_update_kayproii(screen_device &screen, bitmap_ind1
During the "off" period of blanking, the first half is used. Only 5 pixels are
connected from the rom to the shift register, the remaining pixels are held high. */
- uint8_t y,ra,chr,gfx;
- uint16_t sy=0,ma=0,x;
+ u8 y,ra,chr,gfx;
+ u16 sy=0,ma=0,x;
m_framecnt++;
@@ -38,7 +38,7 @@ uint32_t kaypro_state::screen_update_kayproii(screen_device &screen, bitmap_ind1
{
for (ra = 0; ra < 10; ra++)
{
- uint16_t *p = &bitmap.pix16(sy++);
+ u16 *p = &bitmap.pix16(sy++);
for (x = ma; x < ma + 80; x++)
{
@@ -46,7 +46,7 @@ uint32_t kaypro_state::screen_update_kayproii(screen_device &screen, bitmap_ind1
if (ra < 8)
{
- chr = m_p_videoram[x]^0x80;
+ chr = m_vram[x]^0x80;
/* Take care of flashing characters */
if ((chr < 0x80) && (m_framecnt & 0x08))
@@ -71,10 +71,10 @@ uint32_t kaypro_state::screen_update_kayproii(screen_device &screen, bitmap_ind1
return 0;
}
-uint32_t kaypro_state::screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+u32 kaypro_state::screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- uint8_t y,ra,chr,gfx;
- uint16_t sy=0,ma=0,x;
+ u8 y,ra,chr,gfx;
+ u16 sy=0,ma=0,x;
m_framecnt++;
@@ -82,7 +82,7 @@ uint32_t kaypro_state::screen_update_omni2(screen_device &screen, bitmap_ind16 &
{
for (ra = 0; ra < 10; ra++)
{
- uint16_t *p = &bitmap.pix16(sy++);
+ u16 *p = &bitmap.pix16(sy++);
for (x = ma; x < ma + 80; x++)
{
@@ -90,7 +90,7 @@ uint32_t kaypro_state::screen_update_omni2(screen_device &screen, bitmap_ind16 &
if (ra < 8)
{
- chr = m_p_videoram[x];
+ chr = m_vram[x];
/* Take care of flashing characters */
if ((chr > 0x7f) && (m_framecnt & 0x08))
@@ -115,7 +115,7 @@ uint32_t kaypro_state::screen_update_omni2(screen_device &screen, bitmap_ind16 &
return 0;
}
-uint32_t kaypro_state::screen_update_kaypro484(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+u32 kaypro_state::screen_update_kaypro484(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
m_framecnt++;
m_crtc->screen_update(screen, bitmap, cliprect);
@@ -138,17 +138,17 @@ uint32_t kaypro_state::screen_update_kaypro484(screen_device &screen, bitmap_rgb
MC6845_UPDATE_ROW( kaypro_state::kaypro484_update_row )
{
const rgb_t *palette = m_palette->palette()->entry_list_raw();
- uint32_t *p = &bitmap.pix32(y);
- uint16_t x;
- uint8_t gfx,fg,bg;
+ u32 *p = &bitmap.pix32(y);
+ u16 x;
+ u8 gfx,fg,bg;
for (x = 0; x < x_count; x++) // for each character
{
- uint8_t inv=0;
+ u8 inv=0;
if (x == cursor_x) inv=0xff;
- uint16_t mem = (ma + x) & 0x7ff;
- uint8_t chr = m_p_videoram[mem];
- uint8_t attr = m_p_videoram[mem | 0x800];
+ u16 mem = (ma + x) & 0x7ff;
+ u8 chr = m_vram[mem];
+ u8 attr = m_vram[mem | 0x800];
if ((attr & 3) == 3)
{
@@ -202,9 +202,9 @@ MC6845_UPDATE_ROW( kaypro_state::kaypro484_update_row )
void kaypro_state::mc6845_screen_configure()
{
- uint16_t width = m_mc6845_reg[1]*8-1; // width in pixels
- uint16_t height = m_mc6845_reg[6]*(m_mc6845_reg[9]+1)-1; // height in pixels
- uint16_t bytes = m_mc6845_reg[1]*m_mc6845_reg[6]-1; // video ram needed -1
+ u16 width = m_mc6845_reg[1]*8-1; // width in pixels
+ u16 height = m_mc6845_reg[6]*(m_mc6845_reg[9]+1)-1; // height in pixels
+ u16 bytes = m_mc6845_reg[1]*m_mc6845_reg[6]-1; // video ram needed -1
/* Resize the screen */
if ((width < 640) && (height < 400) && (bytes < 0x800)) /* bounds checking to prevent an assert or violation */
@@ -214,22 +214,22 @@ void kaypro_state::mc6845_screen_configure()
/**************************** I/O PORTS *****************************************************************/
-uint8_t kaypro_state::kaypro484_status_r()
+u8 kaypro_state::kaypro484_status_r()
{
/* Need bit 7 high or computer hangs */
return 0x80 | m_crtc->register_r();
}
-void kaypro_state::kaypro484_index_w(uint8_t data)
+void kaypro_state::kaypro484_index_w(u8 data)
{
m_mc6845_ind = data & 0x1f;
m_crtc->address_w(data);
}
-void kaypro_state::kaypro484_register_w(uint8_t data)
+void kaypro_state::kaypro484_register_w(u8 data)
{
- static const uint8_t mcmask[32]={0xff,0xff,0xff,0x0f,0x7f,0x1f,0x7f,0x7f,3,0x1f,0x7f,0x1f,0x3f,0xff,0x3f,0xff,0,0};
+ static const u8 mcmask[32]={0xff,0xff,0xff,0x0f,0x7f,0x1f,0x7f,0x7f,3,0x1f,0x7f,0x1f,0x3f,0xff,0x3f,0xff,0,0};
if (m_mc6845_ind < 16)
m_mc6845_reg[m_mc6845_ind] = data & mcmask[m_mc6845_ind]; /* save data in register */
@@ -245,27 +245,23 @@ void kaypro_state::kaypro484_register_w(uint8_t data)
m_mc6845_video_address = m_mc6845_reg[19] | ((m_mc6845_reg[18] & 0x3f) << 8); /* internal ULA address */
}
-uint8_t kaypro_state::kaypro_videoram_r(offs_t offset)
+u8 kaypro_state::kaypro_videoram_r(offs_t offset)
{
- return m_p_videoram[offset];
+ return m_vram[offset];
}
-void kaypro_state::kaypro_videoram_w(offs_t offset, uint8_t data)
+void kaypro_state::kaypro_videoram_w(offs_t offset, u8 data)
{
- m_p_videoram[offset] = data;
+ m_vram[offset] = data;
}
-uint8_t kaypro_state::kaypro484_videoram_r()
+u8 kaypro_state::kaypro484_videoram_r()
{
- return m_p_videoram[m_mc6845_video_address];
+ return m_vram[m_mc6845_video_address];
}
-void kaypro_state::kaypro484_videoram_w(uint8_t data)
+void kaypro_state::kaypro484_videoram_w(u8 data)
{
- m_p_videoram[m_mc6845_video_address] = data;
+ m_vram[m_mc6845_video_address] = data;
}
-VIDEO_START_MEMBER(kaypro_state,kaypro)
-{
- m_p_videoram = memregion("roms")->base()+0x3000;
-}