Skip to content

Commit

Permalink
merging 12 cleanup (1/2)
Browse files Browse the repository at this point in the history
Co-authored-by: 12Me21 <12Me21.mc@gmail.com>
  • Loading branch information
y-ack and 12Me21 committed Mar 28, 2024
1 parent 63d0306 commit aec6263
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 203 deletions.
38 changes: 13 additions & 25 deletions src/mame/taito/taito_f3.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class taito_f3_state : public driver_device
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_eeprom(*this, "eeprom"),
m_textram(*this, "textram", 0x2000, ENDIANNESS_BIG),
m_spriteram(*this, "spriteram", 0x10000, ENDIANNESS_BIG),
m_pf_ram(*this, "pf_ram", 0xc000, ENDIANNESS_BIG),
m_textram(*this, "textram", 0x2000, ENDIANNESS_BIG),
m_charram(*this, "charram", 0x2000, ENDIANNESS_BIG),
m_line_ram(*this, "line_ram", 0x10000, ENDIANNESS_BIG),
m_pf_ram(*this, "pf_ram", 0xc000, ENDIANNESS_BIG),
m_pivot_ram(*this, "pivot_ram", 0x10000, ENDIANNESS_BIG),
m_input(*this, "IN.%u", 0),
m_dial(*this, "DIAL.%u", 0),
Expand Down Expand Up @@ -153,12 +153,14 @@ class taito_f3_state : public driver_device
required_device<palette_device> m_palette;
optional_device<eeprom_serial_base_device> m_eeprom;

memory_share_creator<u16> m_textram;
memory_share_creator<u16> m_spriteram;
memory_share_creator<u16> m_pf_ram;
memory_share_creator<u16> m_textram;
memory_share_creator<u16> m_charram;
memory_share_creator<u16> m_line_ram;
memory_share_creator<u16> m_pf_ram;
memory_share_creator<u16> m_pivot_ram;
u16 m_control_0[8]{};
u16 m_control_1[8]{};

optional_ioport_array<6> m_input;
optional_ioport_array<2> m_dial;
Expand Down Expand Up @@ -270,7 +272,7 @@ class taito_f3_state : public driver_device
bool blend_select_v{false};
bool blend_select(const u8 *line_flags, int x) override { return blend_select_v; };
// mosaic enable in 6400
u16 pivot_enable{0}; // 7000
u16 pivot_enable{0}; // 7000 - what is in this word ?
// mix info from 7200
bool use_pix() const { return pivot_control & 0xa0; };

Expand Down Expand Up @@ -326,8 +328,6 @@ class taito_f3_state : public driver_device
u8 fx_6400{0}; // unemulated other effects
// 6600
u16 bg_palette{0}; // unemulated, needs investigation, bad name?
// 7000
// pivot_enable here // what is in this word?
// 7200
pivot_inf pivot;
sprite_inf sp[NUM_SPRITEGROUPS];
Expand All @@ -337,22 +337,10 @@ class taito_f3_state : public driver_device
bool mix_line(mixable *gfx, mix_pix *z, pri_mode *pri, const f3_line_inf &line, const clip_plane_inf &range);
void render_line(pen_t *dst, const mix_pix (&z)[432]);

// void blend_s(u8 blend_mode, bool sel, u8 prio, const u8 *blendvals, pri_alpha &pri_alp, u32 &dst, u32 src);
// void blend_o(u8 blend_mode, bool sel, u8 prio, const u8 *blendvals, pri_alpha &pri_alp, u32 &dst, u32 src);
// void blend_d(u8 blend_mode, bool sel, u8 prio, const u8 *blendvals, pri_alpha &pri_alp, u32 &dst, u32 src);
// void blend_dispatch(u8 blend_mode, bool sel, u8 prio, const u8 *blendvals, pri_alpha &pri_alp, u32 &dst, u32 src);

// virtual void draw_line(pen_t* dst, f3_line_inf &line, int xs, int xe, sprite_inf* sp);
// virtual void draw_line(pen_t* dst, f3_line_inf &line, int xs, int xe, playfield_inf* pf);
// virtual void draw_line(pen_t* dst, f3_line_inf &line, int xs, int xe, pivot_inf* pv);

int m_game = 0;
tilemap_t *m_tilemap[8] = {nullptr};
tilemap_t *m_pixel_layer = nullptr;
tilemap_t *m_vram_layer = nullptr;
//std::unique_ptr<u16[]> m_spriteram16_buffered;
u16 m_control_0[8]{};
u16 m_control_1[8]{};
bool m_flipscreen = false;
bool m_extend = false;
u8 m_sprite_extra_planes = 0;
Expand All @@ -374,20 +362,20 @@ class taito_f3_state : public driver_device
//f3_line_inf m_line_inf;
const F3config *m_game_config = nullptr;

u16 pf_ram_r(offs_t offset);
void pf_ram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void control_0_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void control_1_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 spriteram_r(offs_t offset);
void spriteram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 pf_ram_r(offs_t offset);
void pf_ram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 textram_r(offs_t offset);
void textram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 charram_r(offs_t offset);
void charram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 pivot_r(offs_t offset);
void pivot_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 lineram_r(offs_t offset);
void lineram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
u16 pivot_r(offs_t offset);
void pivot_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void control_0_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void control_1_w(offs_t offset, u16 data, u16 mem_mask = ~0);

template<unsigned Layer> TILE_GET_INFO_MEMBER(get_tile_info);
TILE_GET_INFO_MEMBER(get_tile_info_text);
Expand Down
Loading

0 comments on commit aec6263

Please sign in to comment.