summaryrefslogblamecommitdiffstatshomepage
path: root/src/mame/video/k007121.h
blob: 3231a4750e8e700ae3c46fddca0e77dc171ea39f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                                          


                            
            
 



                                      
                                                                                                        
 
                                                                         
 
                                      



                                                                                  
                                                                                                                                                                                                                                                                                        


                                 

                                             
 

                         
                                
                              
                                                  

  
                                            



                                         
                                            
                                                                          
 
                              
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli,Acho A. Tang, R. Belmont
#ifndef MAME_VIDEO_K007121_H
#define MAME_VIDEO_K007121_H

#pragma once


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

	void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }

	uint8_t ctrlram_r(int offset);
	DECLARE_WRITE8_MEMBER( ctrl_w );

	/* shall we move source in the interface? */
	/* also notice that now we directly pass *gfx[chip] instead of **gfx !! */
	void sprites_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, device_palette_interface &palette, const uint8_t *source, int base_color, int global_x_offset, int bank_base, bitmap_ind8 &priority_bitmap, uint32_t pri_mask, bool is_flakatck = false );

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

private:
	// internal state
	uint8_t    m_ctrlram[8];
	int      m_flipscreen;
	required_device<palette_device> m_palette;
};

DECLARE_DEVICE_TYPE(K007121, k007121_device)

#define MCFG_K007121_ADD(_tag) \
	MCFG_DEVICE_ADD(_tag, K007121, 0)

#define MCFG_K007121_PALETTE(_palette_tag) \
	downcast<k007121_device &>(*device).set_palette_tag(_palette_tag);

#endif // MAME_VIDEO_K007121_H