summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/bbc/exp/magazzino.cpp
blob: d6cdf5cfc6953d801cd1943eaa0c48db896487d1 (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
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************

    Magazzino Parametrico from EVM Computer

    This is an unknown unit that connects to the Compact expansion port. The
    contents of the unit are encased in epoxy so exact contents are unknown.
    The unit maps a ROM into bank 1, called Magazzino, so is clearly for the
    Prodest PC 128S Italian market. Seems to require an accompanying floppy
    to be usable, but is MIA.

**********************************************************************/

#include "emu.h"
#include "magazzino.h"


namespace {

class bbc_magazzino_device : public device_t, public device_bbc_exp_interface
{
public:
	bbc_magazzino_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
		: device_t(mconfig, BBC_MAGAZZINO, tag, owner, clock)
		, device_bbc_exp_interface(mconfig, *this)
		, m_rom(*this, "rom")
	{
	}

protected:
	// device_t overrides
	virtual void device_start() override ATTR_COLD { }

	// optional information overrides
	virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;

	virtual uint8_t rom_r(offs_t offset) override
	{
		return m_rom[offset];
	}

private:
	required_region_ptr<uint8_t> m_rom;
};


//-------------------------------------------------
//  rom_region - device-specific ROM region
//-------------------------------------------------

ROM_START(magazzino)
	ROM_REGION(0x8000, "rom", ROMREGION_ERASEFF)
	ROM_LOAD("magazzino-2.01.rom", 0x4000, 0x4000, CRC(89f7ee4c) SHA1(0d1959ff6456453842134be9b1a3dd2ee72ae884))
ROM_END

const tiny_rom_entry *bbc_magazzino_device::device_rom_region() const
{
	return ROM_NAME(magazzino);
}

} // anonymous namespace


DEFINE_DEVICE_TYPE_PRIVATE(BBC_MAGAZZINO, device_bbc_exp_interface, bbc_magazzino_device, "bbc_magazzino", "Magazzino Parametrico")