summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/decocpu6.cpp
blob: 957c602976fa5b084e6b0a9e9380daf389c943cd (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
// license:BSD-3-Clause
// copyright-holders:David Haywood
/* apparently Deco CPU-6 used by ProGolf
 just seems to be a bitswap on the opcodes like 222, but not the same one
 not a complex scheme like CPU-7?
*/


#include "decocpu6.h"

deco_cpu6_device::deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
	m6502_device(mconfig, DECO_CPU6, "DECO CPU-6", tag, owner, clock, "decocpu6", __FILE__)
{
}

void deco_cpu6_device::device_start()
{
	mintf = new mi_decrypt;
	init();
}

void deco_cpu6_device::device_reset()
{
	m6502_device::device_reset();
}

UINT8 deco_cpu6_device::mi_decrypt::read_sync(UINT16 adr)
{
	if (adr&1)
		return BITSWAP8(direct->read_byte(adr),6,4,7,5,3,2,1,0);
	else
		return direct->read_byte(adr);
}