summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/peb/forti.h
blob: 991014799e73189db97f6631c68c6b7c1d9d648f (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
// license:LGPL-2.1+
// copyright-holders:Michael Zapf
/*******************************************************************************
    FORTi Sound card

    4 x TMS9919 sound generators
    4 sound outputs; may be coupled to two stereo outputs

    Michael Zapf
    March 2020

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

#ifndef MAME_BUS_TI99_PEB_FORTI_H
#define MAME_BUS_TI99_PEB_FORTI_H

#pragma once

#include "peribox.h"
#include "sound/sn76496.h"
#include "speaker.h"

namespace bus::ti99::peb {

class forti_device : public device_t, public device_ti99_peribox_card_interface
{
public:
	forti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
	void write(offs_t offset, uint8_t data) override;
	void readz(offs_t offset, uint8_t *value) override;
	void crureadz(offs_t offset, uint8_t *value) override { }
	void cruwrite(offs_t offset, uint8_t data) override { }

	void ready_sound(int state);

private:
	void device_start() override ATTR_COLD;
	void device_reset() override ATTR_COLD;
	void device_add_mconfig(machine_config &config) override;

	// TODO: Replace by TMS9919 when available
	required_device<sn94624_device> m_generator1;
	required_device<sn94624_device> m_generator2;
	required_device<sn94624_device> m_generator3;
	required_device<sn94624_device> m_generator4;
};

} // end namespace bus::ti99::peb

DECLARE_DEVICE_TYPE_NS(TI99_FORTI, bus::ti99::peb, forti_device)

#endif // MAME_BUS_TI99_PEB_FORTI_H