pc090oj: Fix validation by (partially) adopting device_gfx_interface (nw)

This commit is contained in:
AJR 2019-05-08 16:06:59 -04:00
parent 0d2b8ad8c4
commit d5fdb47c95
7 changed files with 16 additions and 17 deletions

View File

@ -884,7 +884,7 @@ void asuka_state::bonzeadv(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_offsets(0, 8);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag(m_tc0110pcr);
m_pc090oj->set_palette(m_tc0110pcr);
TC0100SCN(config, m_tc0100scn, 0);
m_tc0100scn->set_gfx_region(1);
@ -943,7 +943,7 @@ void asuka_state::asuka(machine_config &config)
m_pc090oj->set_offsets(0, 8);
m_pc090oj->set_usebuffer(1);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag(m_tc0110pcr);
m_pc090oj->set_palette(m_tc0110pcr);
TC0100SCN(config, m_tc0100scn, 0);
m_tc0100scn->set_gfx_region(1);
@ -1014,7 +1014,7 @@ void asuka_state::cadash(machine_config &config)
m_pc090oj->set_offsets(0, 8);
m_pc090oj->set_usebuffer(1);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag(m_tc0110pcr);
m_pc090oj->set_palette(m_tc0110pcr);
TC0100SCN(config, m_tc0100scn, 0);
m_tc0100scn->set_gfx_region(1);
@ -1073,7 +1073,7 @@ void asuka_state::mofflott(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_offsets(0, 8);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag(m_tc0110pcr);
m_pc090oj->set_palette(m_tc0110pcr);
TC0100SCN(config, m_tc0100scn, 0);
m_tc0100scn->set_gfx_region(1);
@ -1140,7 +1140,7 @@ void asuka_state::eto(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_offsets(0, 8);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag(m_tc0110pcr);
m_pc090oj->set_palette(m_tc0110pcr);
TC0100SCN(config, m_tc0100scn, 0);
m_tc0100scn->set_gfx_region(1);

View File

@ -287,6 +287,7 @@ register. So what is controlling priority.
#include "video/pc080sn.h"
#include "video/pc090oj.h"
#include "audio/taitosnd.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@ -972,7 +973,7 @@ void opwolf_state::opwolf(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag("palette");
m_pc090oj->set_palette("palette");
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@ -1046,7 +1047,7 @@ void opwolf_state::opwolfb(machine_config &config) /* OSC clocks unknown for the
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag("palette");
m_pc090oj->set_palette("palette");
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();

View File

@ -164,6 +164,7 @@ Note: The 'rastsagaa' set's rom numbers were named as RSxx_37 through RSxx_42
#include "machine/watchdog.h"
#include "sound/msm5205.h"
#include "sound/ym2151.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@ -393,7 +394,7 @@ void rastan_state::rastan(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_gfx_region(1);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag("palette");
m_pc090oj->set_palette("palette");
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -692,7 +692,7 @@ void rbisland_state::rbisland(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_gfxdecode_tag(m_gfxdecode);
m_pc090oj->set_palette_tag(m_palette);
m_pc090oj->set_palette(m_palette);
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -53,6 +53,7 @@ Stephh's notes (based on the game M68000 code and some tests) :
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "sound/2203intf.h"
#include "emupal.h"
#include "speaker.h"
@ -274,7 +275,7 @@ void volfied_state::volfied(machine_config &config)
PC090OJ(config, m_pc090oj, 0);
m_pc090oj->set_gfxdecode_tag("gfxdecode");
m_pc090oj->set_palette_tag("palette");
m_pc090oj->set_palette("palette");
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -76,6 +76,7 @@ DEFINE_DEVICE_TYPE(PC090OJ, pc090oj_device, "pc090oj", "Taito PC090OJ")
pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, PC090OJ, tag, owner, clock),
device_gfx_interface(mconfig, *this),
m_ctrl(0),
m_sprite_ctrl(0),
m_ram(nullptr),
@ -84,8 +85,7 @@ pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, d
m_x_offset(0),
m_y_offset(0),
m_use_buffer(0),
m_gfxdecode(*this, finder_base::DUMMY_TAG),
m_palette(*this, finder_base::DUMMY_TAG)
m_gfxdecode(*this, finder_base::DUMMY_TAG)
{
}

View File

@ -5,16 +5,13 @@
#pragma once
#include "emupal.h"
class pc090oj_device : public device_t
class pc090oj_device : public device_t, public device_gfx_interface
{
public:
pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; }
void set_usebuffer(int use_buf) { m_use_buffer = use_buf; }
void set_offsets(int x_offset, int y_offset)
@ -57,7 +54,6 @@ private:
int m_use_buffer;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
};
DECLARE_DEVICE_TYPE(PC090OJ, pc090oj_device)