added wildfire 7seg decoder

This commit is contained in:
hap 2015-02-25 01:34:25 +01:00
parent f09190e7f3
commit dc1214c9ee
2 changed files with 26 additions and 2 deletions

View File

@ -36,7 +36,7 @@
// S2000 has a hardcoded 7seg table, that (unlike S2200) is officially
// uncustomizable, but wildfire proves to be an exception to that rule.
#define MCFG_AMI_S2000_7SEG_DECODER(_pla) \
#define MCFG_AMI_S2000_7SEG_DECODER(_ptr) \
amis2000_base_device::set_7seg_table(*device, _ptr);

View File

@ -16,7 +16,7 @@
- sound emulation could still be improved
- when the game strobes a led faster, it should appear brighter, for example when
the ball hits one of the bumpers
- some 7segs digits are wrong (mcu on-die decoder is customizable?)
- 7seg decoder is guessed
- MCU clock is unknown
***************************************************************************/
@ -278,11 +278,35 @@ void wildfire_state::machine_start()
save_item(NAME(m_q3));
}
// LED segments A-G
enum
{
lA = 0x40,
lB = 0x20,
lC = 0x10,
lD = 0x08,
lE = 0x04,
lF = 0x02,
lG = 0x01
};
static const UINT8 wildfire_7seg_table[0x10] =
{
0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b, // 0-9 unaltered
0x77, // A -> unused?
lA+lB+lE+lF+lG, // b -> P
0x4e, // C -> unused?
lD+lE+lF, // d -> L
0x4f, // E -> unused?
lG // F -> -
};
static MACHINE_CONFIG_START( wildfire, wildfire_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", AMI_S2152, MASTER_CLOCK)
MCFG_AMI_S2000_7SEG_DECODER(wildfire_7seg_table)
MCFG_AMI_S2000_READ_I_CB(IOPORT("IN1"))
MCFG_AMI_S2000_WRITE_D_CB(WRITE8(wildfire_state, write_d))
MCFG_AMI_S2000_WRITE_A_CB(WRITE16(wildfire_state, write_a))