summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/m68000/68307bus.c
blob: 801c75deb6d61e3e06bd35ddeee2ecf8c277616b (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
/* 68307 MBUS module */

#include "emu.h"
#include "m68kcpu.h"


READ16_HANDLER( m68307_internal_mbus_r )
{
	m68ki_cpu_core *m68k = m68k_get_safe_token(&space->device());
	m68307_mbus* mbus = m68k->m68307MBUS;
	assert(mbus != NULL);

	if (mbus)
	{
		int pc = cpu_get_pc(&space->device());


		switch (offset<<1)
		{
			case m68307BUS_MBSR:
				logerror("%08x m68307_internal_mbus_r %08x, (%04x) (MBSR - Status Register)\n", pc, offset*2,mem_mask);
				return space->machine().rand();

			default:
				logerror("%08x m68307_internal_mbus_r %08x, (%04x)\n", pc, offset*2,mem_mask);
				return 0x0000;
		}
	}

	return 0xffff;
}

WRITE16_HANDLER( m68307_internal_mbus_w )
{
	m68ki_cpu_core *m68k = m68k_get_safe_token(&space->device());
	m68307_mbus* mbus = m68k->m68307MBUS;
	assert(mbus != NULL);

	if (mbus)
	{
		int pc = cpu_get_pc(&space->device());
		logerror("%08x m68307_internal_mbus_w %08x, %04x (%04x)\n", pc, offset*2,data,mem_mask);
	}
}

void m68307_mbus::reset(void)
{

}