mirror of
https://github.com/holub/mame
synced 2025-04-17 22:13:04 +03:00
untangle some drivers from st0016_state now that it's a device (nw)
This commit is contained in:
parent
afaa880c42
commit
774b2021ab
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -5581,6 +5581,7 @@ src/mame/drivers/sigmab98.c svneol=native#text/plain
|
||||
src/mame/drivers/silkroad.c svneol=native#text/plain
|
||||
src/mame/drivers/silvmil.c svneol=native#text/plain
|
||||
src/mame/drivers/simpl156.c svneol=native#text/plain
|
||||
src/mame/drivers/simple_st0016.c svneol=native#text/plain
|
||||
src/mame/drivers/simpsons.c svneol=native#text/plain
|
||||
src/mame/drivers/skeetsht.c svneol=native#text/plain
|
||||
src/mame/drivers/skimaxx.c svneol=native#text/plain
|
||||
@ -5641,7 +5642,6 @@ src/mame/drivers/sspeedr.c svneol=native#text/plain
|
||||
src/mame/drivers/ssrj.c svneol=native#text/plain
|
||||
src/mame/drivers/sstrangr.c svneol=native#text/plain
|
||||
src/mame/drivers/ssv.c svneol=native#text/plain
|
||||
src/mame/drivers/st0016.c svneol=native#text/plain
|
||||
src/mame/drivers/st_mp100.c svneol=native#text/plain
|
||||
src/mame/drivers/st_mp200.c svneol=native#text/plain
|
||||
src/mame/drivers/stactics.c svneol=native#text/plain
|
||||
@ -6398,6 +6398,7 @@ src/mame/includes/sidearms.h svneol=native#text/plain
|
||||
src/mame/includes/sidepckt.h svneol=native#text/plain
|
||||
src/mame/includes/silkroad.h svneol=native#text/plain
|
||||
src/mame/includes/simpl156.h svneol=native#text/plain
|
||||
src/mame/includes/simple_st0016.h svneol=native#text/plain
|
||||
src/mame/includes/simpsons.h svneol=native#text/plain
|
||||
src/mame/includes/skullxbo.h svneol=native#text/plain
|
||||
src/mame/includes/skydiver.h svneol=native#text/plain
|
||||
@ -6437,7 +6438,6 @@ src/mame/includes/ssozumo.h svneol=native#text/plain
|
||||
src/mame/includes/sspeedr.h svneol=native#text/plain
|
||||
src/mame/includes/ssrj.h svneol=native#text/plain
|
||||
src/mame/includes/ssv.h svneol=native#text/plain
|
||||
src/mame/includes/st0016.h svneol=native#text/plain
|
||||
src/mame/includes/stactics.h svneol=native#text/plain
|
||||
src/mame/includes/stadhero.h svneol=native#text/plain
|
||||
src/mame/includes/starcrus.h svneol=native#text/plain
|
||||
@ -7858,7 +7858,6 @@ src/mame/video/ssozumo.c svneol=native#text/plain
|
||||
src/mame/video/sspeedr.c svneol=native#text/plain
|
||||
src/mame/video/ssrj.c svneol=native#text/plain
|
||||
src/mame/video/ssv.c svneol=native#text/plain
|
||||
src/mame/video/st0016.c svneol=native#text/plain
|
||||
src/mame/video/st0020.c svneol=native#text/plain
|
||||
src/mame/video/st0020.h svneol=native#text/plain
|
||||
src/mame/video/stactics.c svneol=native#text/plain
|
||||
|
@ -96,16 +96,15 @@ To do:
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/st0016.h"
|
||||
#include "machine/st0016.h"
|
||||
#include "video/st0020.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
class darkhors_state : public st0016_state
|
||||
class darkhors_state : public driver_device
|
||||
{
|
||||
public:
|
||||
darkhors_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: st0016_state(mconfig, type, tag),
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_tmapram(*this, "tmapram"),
|
||||
m_tmapscroll(*this, "tmapscroll"),
|
||||
m_tmapram2(*this, "tmapram2"),
|
||||
@ -158,6 +157,8 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(darkhors_irq);
|
||||
void draw_sprites_darkhors(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
WRITE8_MEMBER(st0016_rom_bank_w); // temp?
|
||||
};
|
||||
|
||||
|
||||
@ -1046,6 +1047,13 @@ static ADDRESS_MAP_START( st0016_mem, AS_PROGRAM, 8, darkhors_state )
|
||||
AM_RANGE(0xf000, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
// common rombank? should go in machine/st0016 with larger address space exposed?
|
||||
WRITE8_MEMBER(darkhors_state::st0016_rom_bank_w)
|
||||
{
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000));
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( st0016_io, AS_IO, 8, darkhors_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
//AM_RANGE(0x00, 0xbf) AM_READ(st0016_vregs_r) AM_WRITE(st0016_vregs_w)
|
||||
|
@ -57,15 +57,17 @@ KISEKAE -- info
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/st0016.h"
|
||||
#include "includes/st0016.h"
|
||||
|
||||
|
||||
class macs_state : public st0016_state
|
||||
class macs_state : public driver_device
|
||||
{
|
||||
public:
|
||||
macs_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: st0016_state(mconfig, type, tag),
|
||||
m_ram2(*this, "ram2") { }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_ram2(*this, "ram2"),
|
||||
m_maincpu(*this,"maincpu")
|
||||
|
||||
{ }
|
||||
|
||||
UINT8 m_mux_data;
|
||||
UINT8 m_rev;
|
||||
@ -80,6 +82,11 @@ public:
|
||||
DECLARE_DRIVER_INIT(kisekaem);
|
||||
DECLARE_DRIVER_INIT(macs2);
|
||||
DECLARE_MACHINE_RESET(macs);
|
||||
|
||||
UINT32 screen_update_macs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
optional_device<st0016_cpu_device> m_maincpu;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -142,7 +149,7 @@ WRITE8_MEMBER(macs_state::macs_rom_bank_w)
|
||||
{
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000) + macs_cart_slot*0x400000 );
|
||||
|
||||
m_st0016_rom_bank=data;
|
||||
// m_st0016_rom_bank=data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(macs_state::macs_output_w)
|
||||
@ -469,6 +476,10 @@ static INPUT_PORTS_START( macs_h )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
UINT32 macs_state::screen_update_macs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return m_maincpu->update(screen,bitmap,cliprect);
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( macs, macs_state )
|
||||
@ -487,10 +498,8 @@ static MACHINE_CONFIG_START( macs, macs_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(128*8, 128*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 128*8-1, 0*8, 128*8-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(st0016_state, screen_update_st0016)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(macs_state, screen_update_macs)
|
||||
MCFG_SCREEN_PALETTE("maincpu:palette")
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(st0016_state,st0016)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -1,6 +1,13 @@
|
||||
/*******************************************
|
||||
|
||||
Seta custom ST-0016 chip based games.
|
||||
driver by Tomasz Slanina
|
||||
|
||||
this is for 'simple' games using the chip
|
||||
where the chip is providing the maincpu
|
||||
video, and sound functionality of the game
|
||||
rather than acting as a sub-cpu
|
||||
|
||||
********************************************
|
||||
|
||||
Todo:
|
||||
@ -13,11 +20,10 @@ Dips verified for Neratte Chu (nratechu) from manual
|
||||
#include "cpu/v810/v810.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/st0016.h"
|
||||
#include "includes/st0016.h"
|
||||
#include "includes/simple_st0016.h"
|
||||
#include "machine/st0016.h"
|
||||
|
||||
|
||||
UINT32 st0016_rom_bank;
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -71,7 +77,7 @@ WRITE8_MEMBER(st0016_state::mux_select_w)
|
||||
WRITE8_MEMBER(st0016_state::st0016_rom_bank_w)
|
||||
{
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000));
|
||||
st0016_rom_bank=data;
|
||||
// st0016_rom_bank=data;
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( st0016_io, AS_IO, 8, st0016_state )
|
||||
@ -389,6 +395,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(st0016_state::st0016_int)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
UINT32 st0016_state::screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return m_maincpu->update(screen,bitmap,cliprect);
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( st0016, st0016_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu",ST0016_CPU,8000000) /* 8 MHz ? */
|
||||
@ -406,7 +418,7 @@ static MACHINE_CONFIG_START( st0016, st0016_state )
|
||||
MCFG_SCREEN_PALETTE("maincpu:palette")
|
||||
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(st0016_state,st0016)
|
||||
// MCFG_VIDEO_START_OVERRIDE(st0016_state,st0016)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -106,18 +106,19 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "machine/st0016.h"
|
||||
#include "cpu/mips/r3000.h"
|
||||
#include "includes/st0016.h"
|
||||
|
||||
|
||||
class speglsht_state : public st0016_state
|
||||
class speglsht_state : public driver_device
|
||||
{
|
||||
public:
|
||||
speglsht_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: st0016_state(mconfig, type, tag),
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_shared(*this, "shared"),
|
||||
m_framebuffer(*this, "framebuffer"),
|
||||
m_cop_ram(*this, "cop_ram"),
|
||||
m_palette(*this, "palette")
|
||||
m_palette(*this, "palette"),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_subcpu(*this, "sub")
|
||||
{ }
|
||||
|
||||
required_shared_ptr<UINT8> m_shared;
|
||||
@ -136,7 +137,10 @@ public:
|
||||
DECLARE_VIDEO_START(speglsht);
|
||||
UINT32 screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<st0016_cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_subcpu;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(st0016_rom_bank_w);
|
||||
};
|
||||
|
||||
|
||||
@ -153,6 +157,13 @@ static ADDRESS_MAP_START( st0016_mem, AS_PROGRAM, 8, speglsht_state )
|
||||
AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("shared")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
// common rombank? should go in machine/st0016 with larger address space exposed?
|
||||
WRITE8_MEMBER(speglsht_state::st0016_rom_bank_w)
|
||||
{
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000));
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( st0016_io, AS_IO, 8, speglsht_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
//AM_RANGE(0x00, 0xbf) AM_READ(st0016_vregs_r) AM_WRITE(st0016_vregs_w)
|
||||
@ -333,7 +344,7 @@ MACHINE_RESET_MEMBER(speglsht_state,speglsht)
|
||||
VIDEO_START_MEMBER(speglsht_state,speglsht)
|
||||
{
|
||||
m_bitmap = auto_bitmap_ind16_alloc(machine(), 512, 5122 );
|
||||
VIDEO_START_CALL_MEMBER(st0016);
|
||||
// VIDEO_START_CALL_MEMBER(st0016);
|
||||
}
|
||||
|
||||
#define PLOT_PIXEL_RGB(x,y,r,g,b) if(y>=0 && x>=0 && x<512 && y<512) \
|
||||
|
@ -39,7 +39,6 @@ This is not a bug (real machine behaves the same).
|
||||
#include "emu.h"
|
||||
#include "machine/st0016.h"
|
||||
#include "cpu/mips/r3000.h"
|
||||
#include "includes/st0016.h"
|
||||
|
||||
#define DEBUG_CHAR
|
||||
|
||||
@ -62,13 +61,15 @@ This is not a bug (real machine behaves the same).
|
||||
|
||||
#define SPRITE_DATA_GRANULARITY 0x80
|
||||
|
||||
class srmp5_state : public st0016_state
|
||||
class srmp5_state : public driver_device
|
||||
{
|
||||
public:
|
||||
srmp5_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: st0016_state(mconfig, type, tag),
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette")
|
||||
m_palette(*this, "palette"),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_subcpu(*this, "sub")
|
||||
|
||||
{ }
|
||||
|
||||
@ -110,6 +111,10 @@ public:
|
||||
UINT32 screen_update_srmp5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<st0016_cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_subcpu;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(st0016_rom_bank_w);
|
||||
};
|
||||
|
||||
|
||||
@ -398,6 +403,13 @@ READ8_MEMBER(srmp5_state::cmd_stat8_r)
|
||||
return m_cmd_stat;
|
||||
}
|
||||
|
||||
// common rombank? should go in machine/st0016 with larger address space exposed?
|
||||
WRITE8_MEMBER(srmp5_state::st0016_rom_bank_w)
|
||||
{
|
||||
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000));
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( st0016_io, AS_IO, 8, srmp5_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
//AM_RANGE(0x00, 0xbf) AM_READ(st0016_vregs_r) AM_WRITE(st0016_vregs_w)
|
||||
@ -560,7 +572,7 @@ static MACHINE_CONFIG_START( srmp5, srmp5_state )
|
||||
#ifdef DEBUG_CHAR
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", srmp5 )
|
||||
#endif
|
||||
MCFG_VIDEO_START_OVERRIDE(st0016_state,st0016)
|
||||
//MCFG_VIDEO_START_OVERRIDE(st0016_state,st0016)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -12,7 +12,7 @@ public:
|
||||
{ }
|
||||
|
||||
int mux_port;
|
||||
UINT32 m_st0016_rom_bank;
|
||||
// UINT32 m_st0016_rom_bank;
|
||||
|
||||
optional_device<st0016_cpu_device> m_maincpu;
|
||||
DECLARE_READ8_MEMBER(mux_r);
|
@ -1791,7 +1791,7 @@ $(MAMEOBJ)/seta.a: \
|
||||
$(DRIVERS)/srmp6.o \
|
||||
$(DRIVERS)/ssv.o $(VIDEO)/ssv.o \
|
||||
$(VIDEO)/st0020.o \
|
||||
$(MACHINE)/st0016.o $(DRIVERS)/st0016.o $(VIDEO)/st0016.o \
|
||||
$(MACHINE)/st0016.o $(DRIVERS)/simple_st0016.o \
|
||||
$(VIDEO)/seta001.o \
|
||||
|
||||
$(MAMEOBJ)/sigma.a: \
|
||||
|
@ -1,17 +0,0 @@
|
||||
/************************************
|
||||
Seta custom ST-0016 chip
|
||||
driver by Tomasz Slanina
|
||||
************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/st0016.h"
|
||||
|
||||
UINT32 st0016_state::screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return m_maincpu->update(screen,bitmap,cliprect);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(st0016_state, st0016)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user