summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/msx_cart/superloderunner.h
blob: bd763ca2c08cb2aecb854c905613aeffd2a38add (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
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol
#ifndef MAME_BUS_MSX_CART_SUPERLODERUNNER_H
#define MAME_BUS_MSX_CART_SUPERLODERUNNER_H

#pragma once

#include "bus/msx_cart/cartridge.h"


DECLARE_DEVICE_TYPE(MSX_CART_SUPERLODERUNNER, msx_cart_superloderunner_device)


class msx_cart_superloderunner_device : public device_t, public msx_cart_interface
{
public:
	msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	virtual void initialize_cartridge() override;

	virtual uint8_t read_cart(offs_t offset) override;

protected:
	// device-level overrides
	virtual void device_start() override;
	virtual void device_post_load() override;

	void restore_banks();

private:
	void banking(uint8_t data);

	uint8_t m_selected_bank;
	uint8_t *m_bank_base;
};


#endif // MAME_BUS_MSX_CART_SUPERLODERUNNER_H