summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/svision.h (follow)
Commit message (Expand)AuthorAgeFilesLines
* Revert "- Removed MACHINE/SOUND/VIDEO _START/_RESET macros. This has the side... Vas Crabb2018-05-161-1/+1
* - Removed MACHINE/SOUND/VIDEO _START/_RESET macros. This has the side effect ... MooglyGuy2018-05-161-1/+1
* Removed DRIVER_INIT-related macros, made driver init entry in GAME/COMP/CONS ... MooglyGuy2018-05-131-2/+2
* API change: Memory maps are now methods of the owner class [O. Galibert] Olivier Galibert2018-02-121-0/+2
* mismatched include guard comments (nw) hap2018-02-051-1/+1
* Bulk replace convention for include guards in src/mame/includes/ files: angelosa2018-02-051-2/+2
* API Change: Machine configs are now a method of the owner class, and the prot... Olivier Galibert2018-01-171-0/+5
* Remove timer_device from emu.h and move it out of src/emu (nw) AJR2017-10-011-0/+1
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-6/+6
* reverting: Miodrag Milanovic2016-01-201-1/+1
* tags are now strings (nw) Miodrag Milanovic2016-01-161-1/+1
* overrides in drivers (nw) Miodrag Milanovic2015-12-061-2/+2
* move mess into mame (nw) Miodrag Milanovic2015-09-301-0/+92
(nw)' href='/mame/commit/src/mame/includes/tceptor.h?id=d2fd2856a7261992067f708299c3e7a37b9425f8'>d2fd2856a72
46bf65e8191


eab7b082057
e3aae75004d


ddb290d5f61


b465f20f89a
cf5a34ce49c
293c6bd627f

b465f20f89a
ddb290d5f61




8409f7d3233



194562b0aa8


e4238fb654d
ddb290d5f61


8409f7d3233
49b16af8c99

7dabd8b5245








3541b5c3513



8d44c54f681
3541b5c3513
9532f488fc3
49b16af8c99
a237076eb8c
a3e4a45f1a5
d2fd2856a72
fec65e0b576
46bf65e8191

5800f74cd6d


9e020f8a89b


f1f0591f43f
a237076eb8c
b888b8c4eda
3ac43e01873


3380ccb4021





ddb290d5f61

e3aae75004d
c5219643162





eab7b082057
82348086bcb

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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
                       
                        




                               
                             
                        
                      
                   
                   
                    
 


                                          

                                                                                         
                                            
                                                    

                                       
                                        



                                                            
                                                  
                                              
                                          
                                                


                                            
 


                                             


                                   
                                              
                                                           

                                             
                                                    




                                                       



                                


                                   
                                   


                                                          
                                   

                                             








                                                   



                                                   
                                                  
                                         
 
                                                          
                                                
                                                      
                                                  
 

                                  


                                                


                                              
                                                      
                                                                                                               
                                                         


                                                 





                                                                                                

                                                            
 





                                           
  

                                 
// license:BSD-3-Clause
// copyright-holders:BUT
#ifndef MAME_INCLUDES_TCEPTOR_H
#define MAME_INCLUDES_TCEPTOR_H

#pragma once

#include "cpu/m6502/m65c02.h"
#include "sound/namco.h"
#include "video/c45.h"
#include "emupal.h"
#include "screen.h"
#include "tilemap.h"

class tceptor_state : public driver_device
{
public:
	tceptor_state(const machine_config &mconfig, device_type type, const char *tag) :
		driver_device(mconfig, type, tag),
		m_maincpu(*this, "maincpu"),
		m_audiocpu(*this, "audiocpu%u", 1U),
		m_subcpu(*this, "sub"),
		m_mcu(*this, "mcu"),
		m_cus30(*this, "namco"),
		m_tile_ram(*this, "tile_ram"),
		m_tile_attr(*this, "tile_attr"),
		m_bg_ram(*this, "bg_ram"),
		m_m68k_shared_ram(*this, "m68k_shared_ram"),
		m_sprite_ram(*this, "sprite_ram"),
		m_c45_road(*this, "c45_road"),
		m_screen(*this, "screen"),
		m_gfxdecode(*this, "gfxdecode"),
		m_palette(*this, "palette"),
		m_shutter(*this, "shutter")
	{ }

	void tceptor(machine_config &config);

private:
	uint8_t m_m6809_irq_enable;
	uint8_t m_m68k_irq_enable;
	uint8_t m_mcu_irq_enable;
	required_device<cpu_device> m_maincpu;
	required_device_array<m65c02_device, 2> m_audiocpu;
	required_device<cpu_device> m_subcpu;
	required_device<cpu_device> m_mcu;
	required_device<namco_cus30_device> m_cus30;
	required_shared_ptr<uint8_t> m_tile_ram;
	required_shared_ptr<uint8_t> m_tile_attr;
	required_shared_ptr<uint8_t> m_bg_ram;
	required_shared_ptr<uint8_t> m_m68k_shared_ram;
	required_shared_ptr<uint16_t> m_sprite_ram;
	int m_sprite16;
	int m_sprite32;
	int m_bg;
	tilemap_t *m_tx_tilemap;
	tilemap_t *m_bg_tilemap[2];
	int32_t m_bg_scroll_x[2];
	int32_t m_bg_scroll_y[2];
	bitmap_ind16 m_temp_bitmap;
	std::unique_ptr<uint16_t[]> m_sprite_ram_buffered;
	std::unique_ptr<uint8_t[]> m_decoded_16;
	std::unique_ptr<uint8_t[]> m_decoded_32;
	int m_is_mask_spr[1024/16];
	DECLARE_READ8_MEMBER(m68k_shared_r);
	DECLARE_WRITE8_MEMBER(m68k_shared_w);
	DECLARE_WRITE8_MEMBER(m6809_irq_enable_w);
	DECLARE_WRITE8_MEMBER(m6809_irq_disable_w);
	DECLARE_WRITE16_MEMBER(m68k_irq_enable_w);
	DECLARE_WRITE8_MEMBER(mcu_irq_enable_w);
	DECLARE_WRITE8_MEMBER(mcu_irq_disable_w);
	DECLARE_READ8_MEMBER(dsw0_r);
	DECLARE_READ8_MEMBER(dsw1_r);
	DECLARE_READ8_MEMBER(input0_r);
	DECLARE_READ8_MEMBER(input1_r);
	DECLARE_WRITE8_MEMBER(tceptor_tile_ram_w);
	DECLARE_WRITE8_MEMBER(tceptor_tile_attr_w);
	DECLARE_WRITE8_MEMBER(tceptor_bg_ram_w);
	DECLARE_WRITE8_MEMBER(tceptor_bg_scroll_w);
	DECLARE_WRITE8_MEMBER(tceptor2_shutter_w);
	void tile_mark_dirty(int offset);

	required_device<namco_c45_road_device> m_c45_road;
	required_device<screen_device> m_screen;
	required_device<gfxdecode_device> m_gfxdecode;
	required_device<palette_device> m_palette;

	output_finder<> m_shutter;

	TILE_GET_INFO_MEMBER(get_tx_tile_info);
	TILE_GET_INFO_MEMBER(get_bg1_tile_info);
	TILE_GET_INFO_MEMBER(get_bg2_tile_info);
	virtual void machine_start() override;
	virtual void machine_reset() override;
	virtual void video_start() override;
	void tceptor_palette(palette_device &palette);
	uint32_t screen_update_tceptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	DECLARE_WRITE_LINE_MEMBER(screen_vblank_tceptor);
	INTERRUPT_GEN_MEMBER(m6809_vb_interrupt);
	INTERRUPT_GEN_MEMBER(m68k_vb_interrupt);
	INTERRUPT_GEN_MEMBER(mcu_vb_interrupt);
	inline int get_tile_addr(int tile_index);
	void decode_bg(const char * region);
	void decode_sprite(int gfx_index, const gfx_layout *layout, const void *data);
	void decode_sprite16(const char * region);
	void decode_sprite32(const char * region);
	void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int sprite_priority);
	inline uint8_t fix_input0(uint8_t in1, uint8_t in2);
	inline uint8_t fix_input1(uint8_t in1, uint8_t in2);

	void m6502_a_map(address_map &map);
	void m6502_b_map(address_map &map);
	void m6809_map(address_map &map);
	void m68k_map(address_map &map);
	void mcu_io_map(address_map &map);
	void mcu_map(address_map &map);
};

#endif // MAME_INCLUDES_TCEPTOR_H