dms5000: Add a few things to this skeleton (nw)

This commit is contained in:
AJR 2018-05-14 11:40:47 -04:00
parent 5c3d3a9b6d
commit af7ad4eaba

View File

@ -10,6 +10,8 @@
#include "emu.h"
#include "cpu/i86/i86.h"
#include "machine/74259.h"
//#include "machine/z80sio.h"
#include "screen.h"
@ -20,26 +22,42 @@ public:
: driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu") { }
void dms5000(machine_config &config);
private:
DECLARE_READ8_MEMBER(status_r);
DECLARE_WRITE8_MEMBER(brightness_w);
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_dms5000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
void dms5000(machine_config &config);
void dms5000_io(address_map &map);
void dms5000_mem(address_map &map);
};
READ8_MEMBER(dms5000_state::status_r)
{
return 1;
}
WRITE8_MEMBER(dms5000_state::brightness_w)
{
}
void dms5000_state::dms5000_mem(address_map &map)
{
map.unmap_value_high();
map(0x00000, 0x1ffff).ram();
map(0x40000, 0x4ffff).ram();
map(0xfc000, 0xfffff).rom().region("user1", 0);
}
void dms5000_state::dms5000_io(address_map &map)
{
map.unmap_value_high();
map(0x20, 0x2f).r(this, FUNC(dms5000_state::status_r)).umask16(0xff00);
map(0x40, 0x4f).w("cntlatch", FUNC(ls259_device::write_d0)).umask16(0x00ff);
map(0x50, 0x57).w(this, FUNC(dms5000_state::brightness_w)).umask16(0x00ff);
}
/* Input ports */
@ -66,6 +84,7 @@ MACHINE_CONFIG_START(dms5000_state::dms5000)
MCFG_DEVICE_PROGRAM_MAP(dms5000_mem)
MCFG_DEVICE_IO_MAP(dms5000_io)
MCFG_DEVICE_ADD("cntlatch", LS259, 0) // V34
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)