summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mt735.cpp
blob: a8dad4eaca122d76bf5a010150f4df586bc0e398 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// license:BSD-3-Clause
// copyright-holders:Cowering, Olivier Galibert
/*
  Brother MT735 thermal printer
*/


#include "emu.h"
#include "cpu/m68000/m68000.h"

class mt735_state : public driver_device
{
public:
	mt735_state(const machine_config &mconfig, device_type type, const char *tag);

	void mt735(machine_config &config);

private:
	required_device<m68000_device> m_cpu;

	DECLARE_READ8_MEMBER(p4_r);
	DECLARE_READ8_MEMBER(p5_r);

	virtual void machine_start() override;
	virtual void machine_reset() override;
	void mt735_map(address_map &map);
};

mt735_state::mt735_state(const machine_config &mconfig, device_type type, const char *tag) :
	driver_device(mconfig, type, tag),
	m_cpu(*this, "maincpu")
{
}

void mt735_state::machine_start()
{
}

void mt735_state::machine_reset()
{
}

READ8_MEMBER(mt735_state::p4_r)
{
	logerror("p4_r (%06x)\n", m_cpu->pc());
	return 0xe0;
}

READ8_MEMBER(mt735_state::p5_r)
{
	logerror("p5_r (%06x)\n", m_cpu->pc());
	return 0x00;
}

void mt735_state::mt735_map(address_map &map)
{
	map(0x000000, 0x03ffff).rom().region("maincpu", 0);
	map(0x278000, 0x287fff).ram();
	map(0x400000, 0x4fffff).ram();
	map(0xff8004, 0xff8004).r(FUNC(mt735_state::p4_r));
	map(0xff8005, 0xff8005).r(FUNC(mt735_state::p5_r));
}

static INPUT_PORTS_START( mt735 )
INPUT_PORTS_END

MACHINE_CONFIG_START(mt735_state::mt735)
	MCFG_DEVICE_ADD("maincpu", M68000, XTAL(48'000'000)/6)
	MCFG_DEVICE_PROGRAM_MAP(mt735_map)
MACHINE_CONFIG_END

ROM_START( mt735 )
	ROM_REGION( 0x40000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "spg_m_e_ic103.bin", 0, 0x20000, CRC(1ab58bc9) SHA1(c10d50f38819c037d28435b77e09f2b6923e8369) )
	ROM_LOAD16_BYTE( "spg_m_o_ic102.bin", 1, 0x20000, CRC(84d8446b) SHA1(b1cedd8b09556eb8118f79b012aeec5b61e3ff32) )
ROM_END

COMP( ????, mt735, 0, 0, mt735, mt735, mt735_state, empty_init, "Brother", "MT735", MACHINE_NOT_WORKING|MACHINE_NO_SOUND )