summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/psikyo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/psikyo.h')
-rw-r--r--src/mame/includes/psikyo.h82
1 files changed, 34 insertions, 48 deletions
diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h
index a46f8897df7..8c00c43e865 100644
--- a/src/mame/includes/psikyo.h
+++ b/src/mame/includes/psikyo.h
@@ -11,7 +11,6 @@
#pragma once
#include "machine/gen_latch.h"
-#include "video/bufsprite.h"
#include "sound/okim6295.h"
#include "emupal.h"
#include "screen.h"
@@ -23,6 +22,7 @@ class psikyo_state : public driver_device
public:
psikyo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
+ , m_spriteram(*this, "spriteram")
, m_vram(*this, "vram_%u", 0)
, m_vregs(*this, "vregs")
, m_bootleg_spritebuffer(*this, "boot_spritebuf")
@@ -39,13 +39,12 @@ public:
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
- , m_spriteram(*this, "spriteram")
{
- std::fill(std::begin(m_old_linescroll), std::end(m_old_linescroll), ~u32(0));
+ std::fill(std::begin(m_old_linescroll), std::end(m_old_linescroll), 0);
}
void sngkace(machine_config &config);
- void s1945n(machine_config &config);
+ void s1945jn(machine_config &config);
void gunbird(machine_config &config);
void s1945(machine_config &config);
void s1945bl(machine_config &config);
@@ -63,9 +62,11 @@ public:
private:
/* memory pointers */
- required_shared_ptr_array<u32, 2> m_vram;
- required_shared_ptr<u32> m_vregs;
- optional_shared_ptr<u32> m_bootleg_spritebuffer;
+ required_shared_ptr<uint32_t> m_spriteram;
+ required_shared_ptr_array<uint32_t, 2> m_vram;
+ required_shared_ptr<uint32_t> m_vregs;
+ optional_shared_ptr<uint32_t> m_bootleg_spritebuffer;
+ std::unique_ptr<uint32_t[]> m_spritebuf[2];
required_memory_region m_spritelut;
optional_memory_bank m_audiobank;
@@ -75,44 +76,32 @@ private:
optional_ioport m_in_coin;
/* video-related */
- struct sprite_t
- {
- u8 gfx;
- u32 code,color;
- bool flipx,flipy;
- s32 x,y;
- u32 zoomx,zoomy;
- u32 primask;
- };
-
- tilemap_t *m_tilemap[2][4];
- u8 m_tilemap_bank[2];
- bool m_ka302c_banking;
- u32 m_old_linescroll[2];
- std::unique_ptr<sprite_t[]> m_spritelist;
- struct sprite_t *m_sprite_ptr_pre;
- u16 m_sprite_ctrl;
+ tilemap_t *m_tilemap[2][4];
+ int m_tilemap_bank[2];
+ int m_ka302c_banking;
+ int m_old_linescroll[2];
/* game-specific */
// 1945 MCU
- int m_mcu_status;
- u8 m_s1945_mcu_direction;
- u8 m_s1945_mcu_latch1;
- u8 m_s1945_mcu_latch2;
- u8 m_s1945_mcu_inlatch;
- u8 m_s1945_mcu_index;
- u8 m_s1945_mcu_latching;
- u8 m_s1945_mcu_mode;
- u8 m_s1945_mcu_control;
- u8 m_s1945_mcu_bctrl;
- const u8 *m_s1945_mcu_table;
+ int m_mcu_status;
+ uint8_t m_s1945_mcu_direction;
+ uint8_t m_s1945_mcu_latch1;
+ uint8_t m_s1945_mcu_latch2;
+ uint8_t m_s1945_mcu_inlatch;
+ uint8_t m_s1945_mcu_index;
+ uint8_t m_s1945_mcu_latching;
+ uint8_t m_s1945_mcu_mode;
+ uint8_t m_s1945_mcu_control;
+ uint8_t m_s1945_mcu_bctrl;
+ const uint8_t *m_s1945_mcu_table;
DECLARE_READ32_MEMBER(sngkace_input_r);
DECLARE_READ32_MEMBER(gunbird_input_r);
DECLARE_WRITE32_MEMBER(s1945_mcu_w);
DECLARE_READ32_MEMBER(s1945_mcu_r);
DECLARE_READ32_MEMBER(s1945_input_r);
- DECLARE_WRITE8_MEMBER(s1945bl_okibank_w);
+ DECLARE_READ32_MEMBER(s1945bl_oki_r);
+ DECLARE_WRITE32_MEMBER(s1945bl_oki_w);
template<int Shift> DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
template<int Layer> DECLARE_WRITE32_MEMBER(vram_w);
@@ -121,16 +110,14 @@ private:
virtual void machine_reset() override;
DECLARE_VIDEO_START(sngkace);
DECLARE_VIDEO_START(psikyo);
- u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- u32 screen_update_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE_LINE_MEMBER(screen_vblank);
- DECLARE_WRITE_LINE_MEMBER(screen_vblank_bootleg);
- void switch_bgbanks(u8 tmap, u8 bank);
- void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void get_sprites();
- void get_sprites_bootleg();
- u16 tilemap_width(u8 size);
- void s1945_mcu_init();
+ uint32_t screen_update_psikyo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ uint32_t screen_update_psikyo_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_WRITE_LINE_MEMBER(screen_vblank_psikyo);
+ void psikyo_switch_banks( int tmap, int bank );
+ void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int trans_pen );
+ void draw_sprites_bootleg( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int trans_pen );
+ int tilemap_width( int size );
+ void s1945_mcu_init( );
/* devices */
required_device<cpu_device> m_maincpu;
@@ -140,7 +127,6 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- required_device<buffered_spriteram32_device> m_spriteram;
void gunbird_map(address_map &map);
void gunbird_sound_io_map(address_map &map);
@@ -150,7 +136,7 @@ private:
void s1945_map(address_map &map);
void s1945_sound_io_map(address_map &map);
void s1945bl_oki_map(address_map &map);
- void s1945n_map(address_map &map);
+ void s1945jn_map(address_map &map);
void sngkace_map(address_map &map);
void sngkace_sound_io_map(address_map &map);
void sngkace_sound_map(address_map &map);