blob: f72e9f109fc0ded338118253edd080fa7811f213 (
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
|
// license:LGPL-2.1+
// copyright-holders:Michael Zapf
/****************************************************************************
Horizon Ramdisk
See horizon.c for documentation
Michael Zapf
February 2012
*****************************************************************************/
#ifndef MAME_BUS_TI99_PEB_HORIZON_H
#define MAME_BUS_TI99_PEB_HORIZON_H
#pragma once
#include "peribox.h"
#include "machine/ram.h"
namespace bus { namespace ti99 { namespace peb {
class horizon_ramdisk_device : public device_t, public device_ti99_peribox_card_interface, public device_nvram_interface
{
public:
horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
void write(offs_t offset, uint8_t data) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
void cruwrite(offs_t offset, uint8_t data) override;
DECLARE_INPUT_CHANGED_MEMBER( hs_changed );
protected:
void device_start() override;
void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
void nvram_default() override;
void nvram_read(emu_file &file) override;
void nvram_write(emu_file &file) override;
private:
void setbit(int& page, int pattern, bool set);
required_device<ram_device> m_ram;
required_device<ram_device> m_nvram;
required_device<ram_device> m_ros;
int m_select6_value;
int m_select_all;
int m_page;
int m_cru_horizon;
int m_cru_phoenix;
bool m_timode;
bool m_32k_installed;
bool m_split_mode;
bool m_rambo_mode;
bool m_hideswitch;
bool m_use_rambo;
};
} } } // end namespace bus::ti99::peb
DECLARE_DEVICE_TYPE_NS(TI99_HORIZON, bus::ti99::peb, horizon_ramdisk_device)
#endif // MAME_BUS_TI99_PEB_HORIZON_H
|