summaryrefslogblamecommitdiffstatshomepage
path: root/src/mame/machine/namco_c139.h
blob: 025f49b572c3a691c391b9cf4bba3a68d1df6937 (plain) (tree)
1
2
3
4
5
6
7
8
9
                       
                                  

                                                                            
                                      

                                                                            

                                 


            






                                                                            













                                                                                                           
                                        
 
                            
 

                                                                         
 
                                        




                                                                      
                                                                         






                                                  
                                                  








                                                                            
                                   
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/***************************************************************************

    Namco C139 - Serial I/F Controller

***************************************************************************/
#ifndef MAME_MACHINE_NAMCO_C139_H
#define MAME_MACHINE_NAMCO_C139_H

#pragma once




//**************************************************************************
//  INTERFACE CONFIGURATION MACROS
//**************************************************************************

//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

// ======================> namco_c139_device

class namco_c139_device : public device_t,
						  public device_memory_interface
{
public:
	// construction/destruction
	namco_c139_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	// I/O operations
	void regs_map(address_map &map);

	uint16_t status_r();

	uint16_t ram_r(offs_t offset);
	void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);

	void data_map(address_map &map);
protected:
	// device-level overrides
//  virtual void device_validity_check(validity_checker &valid) const;
	virtual void device_start() override;
	virtual void device_reset() override;
	virtual space_config_vector memory_space_config() const override;
private:
	const address_space_config m_space_config;
	uint16_t* m_ram;
};


// device type definition
DECLARE_DEVICE_TYPE(NAMCO_C139, namco_c139_device)



//**************************************************************************
//  GLOBAL VARIABLES
//**************************************************************************



#endif // MAME_MACHINE_NAMCO_C139_H