diff options
Diffstat (limited to 'src/mame/includes/jedi.h')
-rw-r--r-- | src/mame/includes/jedi.h | 70 |
1 files changed, 45 insertions, 25 deletions
diff --git a/src/mame/includes/jedi.h b/src/mame/includes/jedi.h index fb57669942d..269918dda19 100644 --- a/src/mame/includes/jedi.h +++ b/src/mame/includes/jedi.h @@ -13,8 +13,10 @@ #include "machine/gen_latch.h" #include "machine/x2212.h" #include "sound/tms5220.h" +#include "emupal.h" #include "screen.h" +#define DEBUG_GFXDECODE 0 // GFX layout for debug /* oscillators and clocks */ #define JEDI_MAIN_CPU_OSC (XTAL(10'000'000)) @@ -31,47 +33,57 @@ public: jedi_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_backgroundram(*this, "backgroundram"), - m_paletteram(*this, "paletteram"), m_foregroundram(*this, "foregroundram"), m_spriteram(*this, "spriteram"), m_smoothing_table(*this, "smoothing_table"), + m_tx_gfx(*this, "tx_gfx"), + m_bg_gfx(*this, "bg_gfx"), + m_spr_gfx(*this, "spr_gfx"), + m_proms(*this, "proms"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_soundlatch(*this, "soundlatch"), m_sacklatch(*this, "sacklatch"), m_tms(*this, "tms"), m_novram(*this, "novram12%c", 'b'), - m_screen(*this, "screen") +#ifdef DEBUG_GFXDECODE + m_gfxdecode(*this, "gfxdecode"), +#endif + m_palette(*this, "palette"), + m_screen(*this, "screen"), + m_mainbank(*this, "mainbank") { } DECLARE_CUSTOM_INPUT_MEMBER(jedi_audio_comm_stat_r); void jedi(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: - DECLARE_WRITE8_MEMBER(main_irq_ack_w); - DECLARE_WRITE8_MEMBER(rom_banksel_w); + void main_irq_ack_w(u8 data); + void rom_banksel_w(u8 data); DECLARE_WRITE_LINE_MEMBER(coin_counter_left_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_right_w); DECLARE_READ8_MEMBER(novram_data_r); DECLARE_WRITE8_MEMBER(novram_data_w); - DECLARE_WRITE8_MEMBER(novram_recall_w); - DECLARE_WRITE8_MEMBER(novram_store_w); - DECLARE_WRITE8_MEMBER(jedi_vscroll_w); - DECLARE_WRITE8_MEMBER(jedi_hscroll_w); - DECLARE_WRITE8_MEMBER(irq_ack_w); + void novram_recall_w(offs_t offset, u8 data); + void novram_store_w(u8 data); + void vscroll_w(offs_t offset, u8 data); + void hscroll_w(offs_t offset, u8 data); + void irq_ack_w(u8 data); DECLARE_WRITE_LINE_MEMBER(audio_reset_w); - DECLARE_READ8_MEMBER(audio_comm_stat_r); - DECLARE_WRITE8_MEMBER(speech_strobe_w); - DECLARE_READ8_MEMBER(speech_ready_r); - DECLARE_WRITE8_MEMBER(speech_reset_w); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; + u8 audio_comm_stat_r(); + void speech_strobe_w(offs_t offset, u8 data); + u8 speech_ready_r(); + void speech_reset_w(u8 data); DECLARE_WRITE_LINE_MEMBER(foreground_bank_w); DECLARE_WRITE_LINE_MEMBER(video_off_w); - uint32_t screen_update_jedi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(generate_interrupt); - void get_pens(pen_t *pens); + static rgb_t jedi_IRGB_3333(u32 raw); void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_background_and_text(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -84,13 +96,16 @@ private: emu_timer *m_interrupt_timer; /* video state */ - required_shared_ptr<uint8_t> m_backgroundram; - required_shared_ptr<uint8_t> m_paletteram; - required_shared_ptr<uint8_t> m_foregroundram; - required_shared_ptr<uint8_t> m_spriteram; - required_shared_ptr<uint8_t> m_smoothing_table; - uint32_t m_vscroll; - uint32_t m_hscroll; + required_shared_ptr<u8> m_backgroundram; + required_shared_ptr<u8> m_foregroundram; + required_shared_ptr<u8> m_spriteram; + required_shared_ptr<u8> m_smoothing_table; + required_region_ptr<u8> m_tx_gfx; + required_region_ptr<u8> m_bg_gfx; + required_region_ptr<u8> m_spr_gfx; + required_region_ptr<u8> m_proms; + u32 m_vscroll; + u32 m_hscroll; bool m_foreground_bank; bool m_video_off; @@ -100,7 +115,12 @@ private: required_device<generic_latch_8_device> m_sacklatch; required_device<tms5220_device> m_tms; required_device_array<x2212_device, 2> m_novram; +#ifdef DEBUG_GFXDECODE + required_device<gfxdecode_device> m_gfxdecode; +#endif + required_device<palette_device> m_palette; required_device<screen_device> m_screen; + required_memory_bank m_mainbank; }; #endif // MAME_INCLUDES_JEDI_H |