summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.gitattributes5
-rw-r--r--src/mame/drivers/jclub2.c14
-rw-r--r--src/mame/drivers/macs.c25
-rw-r--r--src/mame/drivers/simple_st0016.c (renamed from src/mame/drivers/st0016.c)20
-rw-r--r--src/mame/drivers/speglsht.c21
-rw-r--r--src/mame/drivers/srmp5.c22
-rw-r--r--src/mame/includes/simple_st0016.h (renamed from src/mame/includes/st0016.h)2
-rw-r--r--src/mame/mame.mak2
-rw-r--r--src/mame/video/st0016.c17
9 files changed, 81 insertions, 47 deletions
diff --git a/.gitattributes b/.gitattributes
index 7e6c1bdb8ab..be895f146b2 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -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
diff --git a/src/mame/drivers/jclub2.c b/src/mame/drivers/jclub2.c
index 3580982b329..ba40c2b1359 100644
--- a/src/mame/drivers/jclub2.c
+++ b/src/mame/drivers/jclub2.c
@@ -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)
diff --git a/src/mame/drivers/macs.c b/src/mame/drivers/macs.c
index 49b0308cd32..dba470bad97 100644
--- a/src/mame/drivers/macs.c
+++ b/src/mame/drivers/macs.c
@@ -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
diff --git a/src/mame/drivers/st0016.c b/src/mame/drivers/simple_st0016.c
index e9fefb44be0..333add2a653 100644
--- a/src/mame/drivers/st0016.c
+++ b/src/mame/drivers/simple_st0016.c
@@ -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
diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c
index ba0805a0e89..7c9ce6ffffc 100644
--- a/src/mame/drivers/speglsht.c
+++ b/src/mame/drivers/speglsht.c
@@ -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) \
diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c
index c3775c88e57..1544844ae14 100644
--- a/src/mame/drivers/srmp5.c
+++ b/src/mame/drivers/srmp5.c
@@ -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
diff --git a/src/mame/includes/st0016.h b/src/mame/includes/simple_st0016.h
index 087114188c6..0d8a225546a 100644
--- a/src/mame/includes/st0016.h
+++ b/src/mame/includes/simple_st0016.h
@@ -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);
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index de0d79f3fd7..06c3643e999 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -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: \
diff --git a/src/mame/video/st0016.c b/src/mame/video/st0016.c
deleted file mode 100644
index 637db1fd19c..00000000000
--- a/src/mame/video/st0016.c
+++ /dev/null
@@ -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)
-{
-}
-