summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2021-06-16 18:18:56 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2021-06-16 18:18:56 +0200
commit1324317fa590acbe1fef8e987ae0cce7057fbb16 (patch)
tree17574beb87faf43988bfb233b4b7037405a1163d
parent6addf73825011f0e02d8adf80f58412240266b1d (diff)
stv.cpp: added preliminary 7-seg led support for critcrsh
-rw-r--r--src/mame/drivers/namcos2.cpp3
-rw-r--r--src/mame/drivers/stv.cpp47
-rw-r--r--src/mame/includes/stv.h13
-rw-r--r--src/mame/layout/critcrsh.lay30
4 files changed, 75 insertions, 18 deletions
diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp
index e1472c894e8..8d6d0cf7c13 100644
--- a/src/mame/drivers/namcos2.cpp
+++ b/src/mame/drivers/namcos2.cpp
@@ -24,6 +24,9 @@ known issues:
- sprite/tilemap orthogonality needed
- bad road colors in Final Lap and Suzuka series
+ Final Lap & Final Lap 2:
+ - by default, the graphics are way too bright if compared to original PCB/monitor output
+
Finest Hour:
- roz plane colors are bad in-game
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 44bdff77260..61f259ccf11 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -14,12 +14,12 @@
(per-game issues)
- stress: accesses the Sound Memory Expansion Area (0x05a80000-0x05afffff), unknown purpose;
- - smleague / finlarch: it randomly hangs / crashes,it works if you use a ridiculous MCFG_INTERLEAVE number,might need strict
- SH-2 synching or it's actually a m68k comms issue.
+ - smleague / finlarch: it randomly hangs / crashes, it works if you use a ridiculous set_maximum_quantum() number,
+ might need strict SH-2 synching or it's actually a m68k comms issue.
- groovef: ugly back screen color, caused by incorrect usage of the Color Calculation function.
- - myfairld: Apparently this game gives a black screen (either test mode and in-game mode),but let it wait for about
+ - myfairld: Apparently this game gives a black screen (either test mode and in-game mode), but let it wait for about
10 seconds and the game will load everything. This is because of a hellishly slow m68k sub-routine located at 54c2.
Likely to not be a bug but an in-game design issue.
@@ -27,11 +27,17 @@
- vfremix: when you play as Akira, there is a problem with third match: game doesn't upload all textures
and tiles and doesn't enable display, although gameplay is normal - wait a while to get back
- to title screen after losing a match
+ to title screen after losing a match (fixed?)
- vfremix: various problems with SCU DSP: Jeffry causes a black screen hang. Akira's kick sometimes
sends the opponent out of the ring from whatever position.
+ - critcrsh: has a 2 digits 7-seg LED. The current implementation works in test mode, but during gameplay it's stuck
+ on the day's best score, while according to reports it should update the number of critters you have crushed.
+ At the end of the round it outputs the number of crushed critters. Also needs ticket dispenser hookup (redemption
+ is disabled by the game by default, but can be turned on in test menu).
+ Reference video: https://www.youtube.com/watch?v=O9PyIKdSFnU
+
************************************************************************************************************************/
#include "emu.h"
@@ -50,6 +56,7 @@
#include "coreutil.h"
+#include "critcrsh.lh"
#include "segabill.lh"
#include "segabillv.lh"
@@ -142,7 +149,7 @@ void stv_state::stv_ioga_w(offs_t offset, uint8_t data)
// if (data != m_system_output)
// logerror("OUT %02x\n", data);
m_system_output = data;
- /*Why does the BIOS tests these as ACTIVE HIGH? A program bug?*/
+ /*Why does the BIOS test these as ACTIVE HIGH? A program bug?*/
machine().bookkeeping().coin_counter_w(0,~data & 0x01);
machine().bookkeeping().coin_counter_w(1,~data & 0x02);
machine().bookkeeping().coin_lockout_w(0,~data & 0x04);
@@ -182,6 +189,21 @@ uint8_t stv_state::critcrsh_ioga_r(offs_t offset)
return res;
}
+void stv_state::critcrsh_ioga_w(offs_t offset, uint8_t data)
+{
+ switch (offset * 2 + 1)
+ {
+ case 0x0b:
+ static uint8_t bcd2hex[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x58, 0x4c, 0x62, 0x49, 0x78, 0x00 }; // TODO: chip type unknown
+ m_cc_digits[0] = bcd2hex[(data & 0xf0) >> 4];
+ m_cc_digits[1] = bcd2hex[data & 0x0f];
+ break;
+ default:
+ stv_ioga_w(offset, data);
+ break;
+ }
+}
+
uint8_t stv_state::magzun_ioga_r(offs_t offset)
{
uint8_t res;
@@ -998,7 +1020,7 @@ void stv_state::stv_mem(address_map &map)
void stv_state::critcrsh_mem(address_map &map)
{
stv_mem(map);
- map(0x00400000, 0x0040003f).rw(FUNC(stv_state::critcrsh_ioga_r), FUNC(stv_state::stv_ioga_w)).umask32(0x00ff00ff);
+ map(0x00400000, 0x0040003f).rw(FUNC(stv_state::critcrsh_ioga_r), FUNC(stv_state::critcrsh_ioga_w)).umask32(0x00ff00ff);
}
void stv_state::magzun_mem(address_map &map)
@@ -1123,9 +1145,6 @@ void stv_state::stv(machine_config &config)
m_smpc_hle->dot_select_handler().set(FUNC(saturn_state::dot_select_w));
m_smpc_hle->interrupt_handler().set(m_scu, FUNC(sega_scu_device::smpc_irq_w));
- MCFG_MACHINE_START_OVERRIDE(stv_state,stv)
- MCFG_MACHINE_RESET_OVERRIDE(stv_state,stv)
-
EEPROM_93C46_16BIT(config, "eeprom"); /* Actually AK93C45F */
/* video hardware */
@@ -1267,7 +1286,7 @@ void stv_state::hopper(machine_config &config)
m_slave->set_addrmap(AS_PROGRAM, &stv_state::hopper_mem);
}
-MACHINE_RESET_MEMBER(stv_state,stv)
+void stv_state::machine_reset()
{
m_scsp_last_line = 0;
@@ -1340,8 +1359,10 @@ image_init_result stv_state::load_cart(device_image_interface &image, generic_sl
}
-MACHINE_START_MEMBER(stv_state, stv)
+void stv_state::machine_start()
{
+ m_cc_digits.resolve();
+
// save states
// save_pointer(NAME(m_scu_regs), 0x100/4);
save_item(NAME(m_en_68k));
@@ -3778,8 +3799,8 @@ GAME( 1996, batmanfr, stvbios, batmanfr, batmanfr, stv_state, init_batmanfr,
GAME( 1996, colmns97, stvbios, stv, stv, stv_state, init_colmns97, ROT0, "Sega", "Columns '97 (JET 961209 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1997, cotton2, stvbios, stv, stv, stv_state, init_cotton2, ROT0, "Success", "Cotton 2 (JUET 970902 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1998, cottonbm, stvbios, stv, stv, stv_state, init_cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1995, critcrsh, stvbios, critcrsh, critcrsh, stv_state, init_stv, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
-GAME( 1995, tatacot, critcrsh,critcrsh, critcrsh, stv_state, init_stv, ROT0, "Sega", "Tatacot (JA 951128 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+GAMEL(1995, critcrsh, stvbios, critcrsh, critcrsh, stv_state, init_stv, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS, layout_critcrsh )
+GAMEL(1995, tatacot, critcrsh,critcrsh, critcrsh, stv_state, init_stv, ROT0, "Sega", "Tatacot (JA 951128 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS, layout_critcrsh )
GAME( 1999, danchih, stvbios, stvmp, stvmp, stv_state, init_danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 2000, danchiq, stvbios, stv, stv, stv_state, init_danchiq, ROT0, "Altron", "Danchi de Quiz: Okusan Yontaku Desuyo! (J 001128 V1.200)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
GAME( 1996, diehard, stvbios, stv, stv, stv_state, init_diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h
index b9a1983e225..6b319d59d03 100644
--- a/src/mame/includes/stv.h
+++ b/src/mame/includes/stv.h
@@ -26,7 +26,8 @@ public:
m_cryptdevice(*this, "315_5881"),
m_5838crypt(*this, "315_5838"),
m_hopper(*this, "hopper"),
- m_billboard(*this, "billboard")
+ m_billboard(*this, "billboard"),
+ m_cc_digits(*this, "cc_digit%u", 0U)
{
}
@@ -88,10 +89,15 @@ public:
void init_othellos();
void init_mausuke();
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
uint8_t stv_ioga_r(offs_t offset);
void stv_ioga_w(offs_t offset, uint8_t data);
uint8_t critcrsh_ioga_r(offs_t offset);
+ void critcrsh_ioga_w(offs_t offset, uint8_t data);
uint8_t magzun_ioga_r(offs_t offset);
void magzun_ioga_w(offs_t offset, uint8_t data);
uint8_t stvmp_ioga_r(offs_t offset);
@@ -112,10 +118,6 @@ private:
void install_stvbios_speedups( void );
- DECLARE_MACHINE_START(stv);
- DECLARE_MACHINE_RESET(stv);
-
- DECLARE_MACHINE_RESET(batmanfr);
void batmanfr_sound_comms_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
optional_device<acclaim_rax_device> m_rax;
@@ -149,6 +151,7 @@ private:
optional_device<sega_315_5838_comp_device> m_5838crypt;
optional_device<ticket_dispenser_device> m_hopper;
required_device<sega_billboard_device> m_billboard;
+ output_finder<2> m_cc_digits;
uint16_t crypt_read_callback(uint32_t addr);
uint8_t pdr1_input_r();
diff --git a/src/mame/layout/critcrsh.lay b/src/mame/layout/critcrsh.lay
new file mode 100644
index 00000000000..3e57192a1e9
--- /dev/null
+++ b/src/mame/layout/critcrsh.lay
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+license: CC0
+
+Critter Crusher (STV)
+-->
+
+<mamelayout version="2">
+
+ <element name="cc_digit" defstate="0">
+ <led7seg>
+ <color red="1.0" green="0.1" blue="0.1" />
+ </led7seg>
+ </element>
+
+ <view name="Billboard">
+ <element name="cc_digit0" ref="cc_digit">
+ <bounds x="370" y="30" width="15" height="30" />
+ </element>
+
+ <element name="cc_digit1" ref="cc_digit">
+ <bounds x="400" y="30" width="15" height="30" />
+ </element>
+
+ <screen tag="screen">
+ <bounds left="0" top="100" right="800" bottom="700" />
+ </screen>
+ </view>
+
+</mamelayout>