summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/includes
diff options
context:
space:
mode:
author Wilbert Pol <wilbertpol@users.noreply.github.com>2015-08-11 22:25:48 +0200
committer Wilbert Pol <wilbertpol@users.noreply.github.com>2015-08-11 22:52:45 +0200
commit0381d9c416177e1be03a92c869e7eb8513de63e9 (patch)
treed63b799c0314b8b2d9bc678fc75184aec783831e /src/mess/includes
parent9bac43a8a487b95c752476653c46d5259454f88a (diff)
cybiko.c: reduce tagmap lookups (nw)
Diffstat (limited to 'src/mess/includes')
-rw-r--r--src/mess/includes/cybiko.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mess/includes/cybiko.h b/src/mess/includes/cybiko.h
index f7ac742808f..7bf4e0834de 100644
--- a/src/mess/includes/cybiko.h
+++ b/src/mess/includes/cybiko.h
@@ -51,13 +51,14 @@ class cybiko_state : public driver_device
public:
cybiko_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_crtc(*this, "hd66421"),
- m_speaker(*this, "speaker"),
- m_rtc(*this, "rtc"),
- m_ram(*this, RAM_TAG),
- m_flash1(*this, "flash1"),
- m_nvram(*this, "nvram")
+ m_maincpu(*this, "maincpu"),
+ m_crtc(*this, "hd66421"),
+ m_speaker(*this, "speaker"),
+ m_rtc(*this, "rtc"),
+ m_ram(*this, RAM_TAG),
+ m_flash1(*this, "flash1"),
+ m_nvram(*this, "nvram"),
+ m_input(*this, "A")
{ }
DECLARE_READ16_MEMBER(serflash_r);
@@ -92,6 +93,7 @@ public:
required_device<ram_device> m_ram;
optional_device<at45db041_device> m_flash1;
required_device<nvram_device> m_nvram;
+ optional_ioport_array<15> m_input;
DECLARE_DRIVER_INIT(cybikoxt);
DECLARE_DRIVER_INIT(cybiko);
virtual void machine_start();
color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ .highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ .highlight .sc { color: #4e9a06 } /* Literal.String.Char */ .highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ .highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ .highlight .se { color: #4e9a06 } /* Literal.String.Escape */ .highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ .highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ .highlight .sx { color: #4e9a06 } /* Literal.String.Other */ .highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ .highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ .highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ .highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #000000 } /* Name.Function.Magic */ .highlight .vc { color: #000000 } /* Name.Variable.Class */ .highlight .vg { color: #000000 } /* Name.Variable.Global */ .highlight .vi { color: #000000 } /* Name.Variable.Instance */ .highlight .vm { color: #000000 } /* Name.Variable.Magic */ .highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
/***************************************************************************

    dirom.h

    Interface to a rom, either through a memory map or a region

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

#pragma once

#ifndef __EMU_H__
#error Dont include this file directly; include emu.h instead.
#endif

#ifndef __DIROM_H__
#define __DIROM_H__

class device_rom_interface : public device_memory_interface
{
public:
	device_rom_interface(const machine_config &mconfig, device_t &device, uint8_t addrwidth, endianness_t endian = ENDIANNESS_LITTLE, uint8_t datawidth = 8);
	virtual ~device_rom_interface();

	inline uint8_t read_byte(offs_t byteaddress) { return m_rom_direct->read_byte(byteaddress); }
	inline uint16_t read_word(offs_t byteaddress) { return m_rom_direct->read_word(byteaddress); }
	inline uint32_t read_dword(offs_t byteaddress) { return m_rom_direct->read_dword(byteaddress); }
	inline uint64_t read_qword(offs_t byteaddress) { return m_rom_direct->read_qword(byteaddress); }

	void set_rom(const void *base, uint32_t size);
	void set_rom_bank(int bank);

protected:
	virtual void rom_bank_updated() = 0;

private:
	const address_space_config m_rom_config;
	direct_read_data *m_rom_direct;

	memory_bank *m_bank;
	int m_cur_bank, m_bank_count;

	virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
	virtual void interface_pre_start() override;

	DECLARE_READ8_MEMBER(z8_r);
	DECLARE_READ16_MEMBER(z16_r);
	DECLARE_READ32_MEMBER(z32_r);
	DECLARE_READ64_MEMBER(z64_r);

	void reset_bank();
};

#endif