excellent/lastbank.cpp: bump main CPU to /2 clock

This commit is contained in:
angelosa 2024-09-02 19:04:54 +02:00
parent 68d5a2bfca
commit d9251c8275
4 changed files with 29 additions and 33 deletions

View File

@ -102,7 +102,7 @@ void tc0090lvc_device::cpu_map(address_map &map)
void tc0090lvc_device::vram_map(address_map &map)
{
map(0x010000, 0x01ffff).readonly().share("vram");
// note, the way tiles are addressed suggests that 0x0000-0x3fff of this might be usable,
// NOTE: the way tiles are addressed suggests that 0x0000-0x3fff of this might be usable,
// but we don't map it anywhere, so the first tiles are always blank at the moment.
map(0x014000, 0x01ffff).lw8(NAME([this] (offs_t offset, u8 data) { vram_w(offset + 0x4000, data); }));
map(0x040000, 0x05ffff).ram().share("bitmap_ram");

View File

@ -285,7 +285,7 @@ uint8_t dblcrown_state::key_pending_r()
*/
void dblcrown_state::output_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, BIT(data, 4)); /* Coin In counter pulse */
machine().bookkeeping().coin_counter_w(0, BIT(data, 4));
m_hopper->motor_w(BIT(data, 3));
machine().bookkeeping().coin_lockout_global_w(!BIT(data, 2));
}
@ -495,7 +495,7 @@ static INPUT_PORTS_START( dblcrown )
PORT_DIPSETTING( 0x20, "1 Coin/50 Credits" )
PORT_DIPSETTING( 0x10, "1 Coin/100 Credits" )
PORT_DIPSETTING( 0x00, "1 Coin/500 Credits" )
// TODO: game will error blink if On at payout time
// TODO: game will error blink if On at payout time
PORT_DIPNAME( 0x80, 0x80, "Hopper Status?" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )

View File

@ -13,8 +13,8 @@ Undumped games on similar hardware (ES-9402 or ES-9410):
* Miracle Seven - Heaven's Gate Turbo
* Ukiyo Box
TODO:
- lastbank: sprites should be clip masked during gameplay (verify);
- fever13: GFX ROM dump;
- fever13: OKI sound volume overdrives a lot;
- hookup hopper device;
@ -78,7 +78,7 @@ private:
template <uint8_t Player> uint8_t key_matrix_r();
void key_select_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(irq_scanline);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
void audio_map(address_map &map);
void tc0091lvc_map(address_map &map);
};
@ -562,10 +562,9 @@ static INPUT_PORTS_START( fever13 )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::irq_scanline)
TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::scanline_cb)
{
int const scanline = param;
@ -582,19 +581,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::irq_scanline)
void lastbank_state::lastbank(machine_config &config)
{
// basic machine hardware
TC0091LVC(config, m_maincpu, 14.318181_MHz_XTAL / 4);
constexpr XTAL MASTER_CLOCK = 14.318181_MHz_XTAL;
// NOTE: too slow with /4, cfr. animation of official ringing the bell during gameplay
TC0091LVC(config, m_maincpu, MASTER_CLOCK / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &lastbank_state::main_map);
m_maincpu->set_tilemap_xoffs(0,192); // TODO: correct?
TIMER(config, "scantimer").configure_scanline(FUNC(lastbank_state::irq_scanline), "screen", 0, 1);
TIMER(config, "scantimer").configure_scanline(FUNC(lastbank_state::scanline_cb), "screen", 0, 1);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
z80_device &audiocpu(Z80(config, "audiocpu", 14.318181_MHz_XTAL / 4));
z80_device &audiocpu(Z80(config, "audiocpu", MASTER_CLOCK / 4));
audiocpu.set_addrmap(AS_PROGRAM, &lastbank_state::audio_map);
audiocpu.set_addrmap(AS_IO, &lastbank_state::audio_io);
// yes, we have no interrupts
config.set_perfect_quantum(m_maincpu);

View File

@ -1,24 +1,20 @@
// license:BSD-3-Clause
// copyright-holders: Angelo Salese
/**************************************************************************************************
/***************************************************************************
Fruit Dream (c) 1993 Nippon Data Kiki / Star Fish
Gemcrush (c) 1996 Star Fish
Fruit Dream (c) 1993 Nippon Data Kiki / Star Fish
Gemcrush (c) 1996 Star Fish
Uses a TC0091LVC, a variant of the one used on Taito L HW
driver by Angelo Salese
TODO:
- inputs are grossly mapped, lack of any input test doesn't help at all;
- lamps?
- service mode?
- nvram?
- dfruit: has an X on top-left corner after POST, is it supposed to be disabled somehow?
Uses a TC0091LVC, a variant of the one used on Taito L HW
TODO:
- inputs are grossly mapped, lack of any input test doesn't help at all;
- lamps?
- service mode?
- nvram?
- dfruit: (possible bug) has an X on top-left corner after POST,
is it supposed to be disabled somehow?
***************************************************************************/
**************************************************************************************************/
#include "emu.h"
@ -50,8 +46,8 @@ private:
void output_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_callback);
void program_map(address_map &map);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
void main_map(address_map &map);
void tc0091lvc_map(address_map &map);
};
@ -75,7 +71,7 @@ void dfruit_state::tc0091lvc_map(address_map &map)
map(0xff08, 0xff08).rw(m_maincpu, FUNC(tc0091lvc_device::rom_bank_r), FUNC(tc0091lvc_device::rom_bank_w));
}
void dfruit_state::program_map(address_map &map)
void dfruit_state::main_map(address_map &map)
{
tc0091lvc_map(map);
map(0xa000, 0xa003).rw("i8255", FUNC(i8255_device::read), FUNC(i8255_device::write));
@ -257,7 +253,7 @@ static INPUT_PORTS_START( gemcrush )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::scanline_callback)
TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::scanline_cb)
{
int scanline = param;
@ -291,9 +287,9 @@ void dfruit_state::dfruit(machine_config &config)
// basic machine hardware
TC0091LVC(config, m_maincpu, MASTER_CLOCK / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &dfruit_state::program_map);
m_maincpu->set_addrmap(AS_PROGRAM, &dfruit_state::main_map);
TIMER(config, "scantimer").configure_scanline(FUNC(dfruit_state::scanline_callback), "screen", 0, 1);
TIMER(config, "scantimer").configure_scanline(FUNC(dfruit_state::scanline_cb), "screen", 0, 1);
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));