mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
c140.cpp, c45.cpp, namco_c139.cpp : Remove MCFG_s (#3736)
* c140.cpp, c45.cpp, namco_c139.cpp : Remove MCFG_s c45.cpp : Add region_ptr tceptor.cpp : Minor cleanup namcona1.cpp : Fix spacing, Minor cleanups namcos2.cpp : Device'd C116 emulation namco_c116.cpp : Add notes from namcos2.cpp * More remove MCFG for C116 namcoic.cpp : Move Namco NB-2 hardware specific ROZ Bankswitch into namconb1.cpp namconb1.cpp : Minor cleanups
This commit is contained in:
parent
4e5169fd0b
commit
194562b0aa
@ -7,19 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_C140_ADD(tag, clock) \
|
||||
MCFG_DEVICE_ADD((tag), C140, (clock))
|
||||
|
||||
#define MCFG_C140_REPLACE(tag, clock) \
|
||||
MCFG_DEVICE_REPLACE((tag), C140, (clock))
|
||||
|
||||
#define MCFG_C140_BANK_TYPE(type) \
|
||||
downcast<c140_device &>(*device).set_bank_type((c140_device::C140_TYPE::type));
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
|
@ -141,10 +141,12 @@ better notes (complete chip lists) for each board still needed
|
||||
class gal3_state : public namcos2_shared_state
|
||||
{
|
||||
public:
|
||||
gal3_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: namcos2_shared_state(mconfig, type, tag) ,
|
||||
gal3_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
namcos2_shared_state(mconfig, type, tag) ,
|
||||
m_rso_shared_ram(*this, "rso_shared_ram"),
|
||||
m_generic_paletteram_16(*this, "paletteram") { }
|
||||
m_generic_paletteram_16(*this, "paletteram"),
|
||||
m_c140_16a(*this, "c140_16a"),
|
||||
m_c140_16g(*this, "c140_16g") { }
|
||||
|
||||
void gal3(machine_config &config);
|
||||
|
||||
@ -152,6 +154,8 @@ private:
|
||||
uint16_t m_namcos21_video_enable;
|
||||
required_shared_ptr<uint16_t> m_rso_shared_ram;
|
||||
optional_shared_ptr<uint16_t> m_generic_paletteram_16;
|
||||
required_device<c140_device> m_c140_16a;
|
||||
required_device<c140_device> m_c140_16g;
|
||||
uint32_t m_led_mst;
|
||||
uint32_t m_led_slv;
|
||||
DECLARE_READ32_MEMBER(led_mst_r);
|
||||
@ -459,11 +463,11 @@ void gal3_state::sound_cpu_map(address_map &map)
|
||||
map(0x110000, 0x113fff).ram();
|
||||
/// AM_RANGE(0x120000, 0x120003) AM_RAM //2ieme byte
|
||||
/// AM_RANGE(0x200000, 0x20017f) AM_RAM //C140
|
||||
map(0x200000, 0x2037ff).rw("c140_16a", FUNC(c140_device::c140_r), FUNC(c140_device::c140_w)).umask16(0x00ff); //C140///////////
|
||||
map(0x200000, 0x2037ff).rw(m_c140_16a, FUNC(c140_device::c140_r), FUNC(c140_device::c140_w)).umask16(0x00ff); //C140///////////
|
||||
/// AM_RANGE(0x201000, 0x20117f) AM_RAM //C140
|
||||
/// AM_RANGE(0x202000, 0x20217f) AM_RAM //C140
|
||||
/// AM_RANGE(0x203000, 0x20317f) AM_RAM //C140
|
||||
map(0x204000, 0x2047ff).rw("c140_16g", FUNC(c140_device::c140_r), FUNC(c140_device::c140_w)).umask16(0x00ff); //C140
|
||||
map(0x204000, 0x2047ff).rw(m_c140_16g, FUNC(c140_device::c140_r), FUNC(c140_device::c140_w)).umask16(0x00ff); //C140
|
||||
/// AM_RANGE(0x090000, 0xffffff) AM_RAM
|
||||
}
|
||||
|
||||
@ -655,15 +659,15 @@ MACHINE_CONFIG_START(gal3_state::gal3)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140_16g", 8000000/374)
|
||||
MCFG_C140_BANK_TYPE(SYSTEM21) //to be verified
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
C140(config, m_c140_16g, 8000000/374);
|
||||
m_c140_16g->set_bank_type(c140_device::C140_TYPE::SYSTEM21); //to be verified
|
||||
m_c140_16g->add_route(0, "lspeaker", 0.50);
|
||||
m_c140_16g->add_route(1, "rspeaker", 0.50);
|
||||
|
||||
MCFG_C140_ADD("c140_16a", 8000000/374)
|
||||
MCFG_C140_BANK_TYPE(SYSTEM21)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
C140(config, m_c140_16a, 8000000/374);
|
||||
m_c140_16a->set_bank_type(c140_device::C140_TYPE::SYSTEM21);
|
||||
m_c140_16a->add_route(0, "lspeaker", 0.50);
|
||||
m_c140_16a->add_route(1, "rspeaker", 0.50);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/*
|
||||
|
@ -607,8 +607,8 @@ MACHINE_CONFIG_START(namcofl_state::namcofl)
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namcofl)
|
||||
|
||||
MCFG_DEVICE_ADD("c116", NAMCO_C116, 0)
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
NAMCO_C116(config, m_c116, 0);
|
||||
m_c116->set_palette(m_palette);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namcofl_state,namcofl)
|
||||
|
||||
|
@ -917,9 +917,9 @@ static const gfx_layout shape_layout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_namcona1 )
|
||||
GFXDECODE_RAM( "cgram", 0, cg_layout_8bpp, 0, 0x2000/256 )
|
||||
GFXDECODE_RAM( "cgram", 0, cg_layout_4bpp, 0, 0x2000/16 )
|
||||
GFXDECODE_RAM( nullptr, 0, shape_layout, 0, 0x2000/2 )
|
||||
GFXDECODE_RAM( "cgram", 0, cg_layout_8bpp, 0, 0x2000/256 )
|
||||
GFXDECODE_RAM( "cgram", 0, cg_layout_4bpp, 0, 0x2000/16 )
|
||||
GFXDECODE_RAM( nullptr, 0, shape_layout, 0, 0x2000/2 )
|
||||
GFXDECODE_END
|
||||
|
||||
/***************************************************************************/
|
||||
@ -991,10 +991,10 @@ MACHINE_CONFIG_START(namcona1_state::namcona1)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", 44100)
|
||||
MCFG_C140_BANK_TYPE(ASIC219)
|
||||
MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
|
||||
MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
|
||||
C140(config, m_c140, 44100);
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::ASIC219);
|
||||
m_c140->add_route(0, "lspeaker", 1.00);
|
||||
m_c140->add_route(1, "rspeaker", 1.00);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(namcona2_state::namcona2)
|
||||
|
@ -727,7 +727,7 @@ void namconb1_state::namconb2_am(address_map &map)
|
||||
map(0x800000, 0x807fff).rw(m_c116, FUNC(namco_c116_device::read), FUNC(namco_c116_device::write));
|
||||
map(0x900008, 0x90000f).ram().share("spritebank32");
|
||||
map(0x940000, 0x94000f).ram().share("tilebank32");
|
||||
map(0x980000, 0x98000f).rw(FUNC(namconb1_state::c169_roz_bank_r), FUNC(namconb1_state::c169_roz_bank_w));
|
||||
map(0x980000, 0x98000f).ram().w(FUNC(namconb1_state::rozbank32_w)).share("rozbank32");
|
||||
map(0xa00000, 0xa007ff).rw(m_eeprom, FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write));
|
||||
map(0xc00000, 0xc0001f).r(FUNC(namconb1_state::custom_key_r)).nopw();
|
||||
map(0xf00000, 0xf0001f).rw(FUNC(namconb1_state::namconb2_cpureg_r), FUNC(namconb1_state::namconb2_cpureg_w));
|
||||
@ -1058,7 +1058,7 @@ GFXDECODE_END /* gfxdecodeinfo2 */
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
MACHINE_RESET_MEMBER(namconb1_state, namconb)
|
||||
void namconb1_state::machine_reset()
|
||||
{
|
||||
m_pos_irq_level = 0;
|
||||
m_unk_irq_level = 0;
|
||||
@ -1077,7 +1077,6 @@ MACHINE_CONFIG_START(namconb1_state::namconb1)
|
||||
MCFG_DEVICE_IO_MAP(namcoc75_io)
|
||||
|
||||
MCFG_EEPROM_2816_ADD("eeprom")
|
||||
MCFG_MACHINE_RESET_OVERRIDE(namconb1_state, namconb)
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", namconb1_state, scantimer, "screen", 0, 1)
|
||||
|
||||
@ -1097,8 +1096,8 @@ MACHINE_CONFIG_START(namconb1_state::namconb1)
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
|
||||
MCFG_DEVICE_ADD("c116", NAMCO_C116, 0)
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
NAMCO_C116(config, m_c116, 0);
|
||||
m_c116->set_palette(m_palette);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namconb1_state,namconb1)
|
||||
|
||||
@ -1112,42 +1111,14 @@ MACHINE_CONFIG_START(namconb1_state::namconb1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(namconb1_state::namconb2)
|
||||
MCFG_DEVICE_ADD("maincpu", M68EC020, MASTER_CLOCK/2)
|
||||
namconb1(config);
|
||||
MCFG_DEVICE_MODIFY("maincpu")
|
||||
MCFG_DEVICE_PROGRAM_MAP(namconb2_am)
|
||||
|
||||
MCFG_DEVICE_ADD("mcu", NAMCO_C75, MASTER_CLOCK/3)
|
||||
MCFG_DEVICE_PROGRAM_MAP(namcoc75_am)
|
||||
MCFG_DEVICE_IO_MAP(namcoc75_io)
|
||||
|
||||
MCFG_EEPROM_2816_ADD("eeprom")
|
||||
MCFG_MACHINE_RESET_OVERRIDE(namconb1_state, namconb)
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", namconb1_state, scantimer, "screen", 0, 1)
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_irq0", namconb1_state, mcu_irq0_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_irq2", namconb1_state, mcu_irq2_cb, attotime::from_hz(60))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("mcu_adc", namconb1_state, mcu_adc_cb, attotime::from_hz(60))
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(59.7)
|
||||
MCFG_SCREEN_SIZE(NAMCONB1_HTOTAL, NAMCONB1_VTOTAL)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, NAMCONB1_HBSTART-1, 0, NAMCONB1_VBSTART-1)
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namconb1_state, screen_update_namconb2)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namconb2)
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
|
||||
MCFG_DEVICE_ADD("c116", NAMCO_C116, 0)
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
MCFG_DEVICE_ADD("c352", C352, MASTER_CLOCK/2, 288)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
|
||||
//MCFG_SOUND_ROUTE(2, "lspeaker", 1.00) // Second DAC not present.
|
||||
//MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
|
||||
MCFG_DEVICE_REPLACE("gfxdecode", GFXDECODE, "palette", gfx_namconb2)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(namconb1_state::machbrkr)
|
||||
|
@ -1072,8 +1072,8 @@ MACHINE_CONFIG_START(namcos1_state::ns1)
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
|
||||
MCFG_DEVICE_ADD("c116", NAMCO_C116, 0)
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
NAMCO_C116(config, m_c116, 0);
|
||||
m_c116->set_palette(m_palette);
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
|
@ -31,7 +31,7 @@ known issues:
|
||||
- sprite size bit is bogus during splash screen
|
||||
|
||||
Final Lap 3:
|
||||
- uses unaligned 32x32 sprites, which aren't handled correctly in video/namcos2.c yet
|
||||
- uses unaligned 32x32 sprites, which aren't handled correctly in video/namcos2.cpp yet
|
||||
|
||||
Suzuka 8 Hours II
|
||||
- some sprite cropping issues
|
||||
@ -458,7 +458,6 @@ $a00000 checks have been seen on the Final Lap boards.
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/ym2151.h"
|
||||
#include "sound/c140.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include "finallap.lh"
|
||||
@ -603,7 +602,7 @@ void namcos2_state::namcos2_68k_default_cpu_board_am(address_map &map)
|
||||
map(0x200000, 0x3fffff).rom().region("data_rom", 0);
|
||||
map(0x400000, 0x41ffff).rw(FUNC(namcos2_state::c123_tilemap_videoram_r), FUNC(namcos2_state::c123_tilemap_videoram_w));
|
||||
map(0x420000, 0x42003f).rw(FUNC(namcos2_state::c123_tilemap_control_r), FUNC(namcos2_state::c123_tilemap_control_w));
|
||||
map(0x440000, 0x44ffff).rw(FUNC(namcos2_state::paletteram_word_r), FUNC(namcos2_state::paletteram_word_w)).share("paletteram");
|
||||
map(0x440000, 0x44ffff).rw(m_c116, FUNC(namco_c116_device::read), FUNC(namco_c116_device::write)).umask16(0x00ff).cswidth(16);
|
||||
map(0x460000, 0x460fff).mirror(0xf000).rw(FUNC(namcos2_state::dpram_word_r), FUNC(namcos2_state::dpram_word_w));
|
||||
map(0x480000, 0x483fff).rw(m_sci, FUNC(namco_c139_device::ram_r), FUNC(namco_c139_device::ram_w));
|
||||
map(0x4a0000, 0x4a000f).m(m_sci, FUNC(namco_c139_device::regs_map));
|
||||
@ -764,7 +763,7 @@ void namcos2_state::sound_default_am(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x3fff).bankr("bank6"); /* banked */
|
||||
map(0x4000, 0x4001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
|
||||
map(0x5000, 0x6fff).rw("c140", FUNC(c140_device::c140_r), FUNC(c140_device::c140_w));
|
||||
map(0x5000, 0x6fff).rw(m_c140, FUNC(c140_device::c140_r), FUNC(c140_device::c140_w));
|
||||
map(0x7000, 0x77ff).rw(FUNC(namcos2_state::dpram_byte_r), FUNC(namcos2_state::dpram_byte_w)).share("dpram");
|
||||
map(0x7800, 0x7fff).rw(FUNC(namcos2_state::dpram_byte_r), FUNC(namcos2_state::dpram_byte_w)); /* mirror */
|
||||
map(0x8000, 0x9fff).ram();
|
||||
@ -1705,6 +1704,15 @@ via software as INT1
|
||||
/* */
|
||||
/*************************************************************/
|
||||
|
||||
void namcos2_state::configure_c116_standard(machine_config &config)
|
||||
{
|
||||
PALETTE(config, m_palette, 0x2000);
|
||||
m_palette->enable_shadows();
|
||||
|
||||
NAMCO_C116(config, m_c116, 0);
|
||||
m_c116->set_palette(m_palette);
|
||||
}
|
||||
|
||||
void namcos2_state::configure_c148_standard(machine_config &config)
|
||||
{
|
||||
NAMCO_C148(config, m_master_intc, 0, m_maincpu, true);
|
||||
@ -1761,7 +1769,7 @@ MACHINE_CONFIG_START(namcos2_state::base)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -1770,18 +1778,17 @@ MACHINE_CONFIG_START(namcos2_state::base)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namcos2)
|
||||
configure_c116_standard(config);
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_namcos2)
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
|
||||
@ -1792,10 +1799,9 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(namcos2_state::base2)
|
||||
base(config);
|
||||
|
||||
MCFG_C140_REPLACE("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
m_c140->reset_routes();
|
||||
m_c140->add_route(0, "lspeaker", 1.0);
|
||||
m_c140->add_route(1, "rspeaker", 1.0);
|
||||
MACHINE_CONFIG_END
|
||||
/* end */
|
||||
|
||||
@ -1808,10 +1814,9 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(namcos2_state::base3)
|
||||
base(config);
|
||||
|
||||
MCFG_C140_REPLACE("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.45)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.45)
|
||||
m_c140->reset_routes();
|
||||
m_c140->add_route(0, "lspeaker", 0.45);
|
||||
m_c140->add_route(1, "rspeaker", 0.45);
|
||||
|
||||
MCFG_DEVICE_REPLACE("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
@ -1842,7 +1847,7 @@ MACHINE_CONFIG_START(namcos2_state::gollygho)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -1851,18 +1856,17 @@ MACHINE_CONFIG_START(namcos2_state::gollygho)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namcos2)
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_namcos2)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
configure_c116_standard(config);
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
|
||||
@ -1893,7 +1897,7 @@ MACHINE_CONFIG_START(namcos2_state::finallap)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -1902,23 +1906,22 @@ MACHINE_CONFIG_START(namcos2_state::finallap)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_finallap)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_finallap)
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_finallap)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
configure_c116_standard(config);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namcos2_state, finallap)
|
||||
|
||||
MCFG_NAMCO_C45_ROAD_ADD("c45_road")
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
NAMCO_C45_ROAD(config, m_c45_road, 0);
|
||||
m_c45_road->set_palette(m_palette);
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
|
||||
@ -1956,7 +1959,7 @@ MACHINE_CONFIG_START(namcos2_state::sgunner)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -1965,20 +1968,19 @@ MACHINE_CONFIG_START(namcos2_state::sgunner)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_sgunner)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sgunner)
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_sgunner)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
configure_c116_standard(config);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namcos2_state, sgunner)
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
|
||||
@ -2014,7 +2016,7 @@ MACHINE_CONFIG_START(namcos2_state::sgunner2)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -2023,20 +2025,19 @@ MACHINE_CONFIG_START(namcos2_state::sgunner2)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_sgunner)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sgunner)
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_sgunner)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
configure_c116_standard(config);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namcos2_state, sgunner)
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
|
||||
@ -2067,7 +2068,7 @@ MACHINE_CONFIG_START(namcos2_state::luckywld)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -2076,23 +2077,22 @@ MACHINE_CONFIG_START(namcos2_state::luckywld)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_luckywld)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_luckywld)
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_luckywld)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
configure_c116_standard(config);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namcos2_state, luckywld)
|
||||
|
||||
MCFG_NAMCO_C45_ROAD_ADD("c45_road")
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
NAMCO_C45_ROAD(config, m_c45_road, 0);
|
||||
m_c45_road->set_palette(m_palette);
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
|
||||
@ -2123,7 +2123,7 @@ MACHINE_CONFIG_START(namcos2_state::metlhawk)
|
||||
MCFG_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE( (49152000.0 / 8) / (384 * 264) )
|
||||
@ -2132,20 +2132,19 @@ MACHINE_CONFIG_START(namcos2_state::metlhawk)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_metlhawk)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_metlhawk)
|
||||
MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, "palette", gfx_metlhawk)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 0x2000)
|
||||
MCFG_PALETTE_ENABLE_SHADOWS()
|
||||
configure_c116_standard(config);
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(namcos2_state, metlhawk)
|
||||
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", C140_SOUND_CLOCK) /* 21.333kHz */
|
||||
MCFG_C140_BANK_TYPE(SYSTEM2)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
C140(config, m_c140, C140_SOUND_CLOCK); /* 21.333kHz */
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM2);
|
||||
m_c140->add_route(0, "lspeaker", 0.75);
|
||||
m_c140->add_route(1, "rspeaker", 0.75);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, YM2151_SOUND_CLOCK) /* 3.579545MHz */
|
||||
// MCFG_YM2151_IRQ_HANDLER(INPUTLINE("audiocpu", 1))
|
||||
|
@ -528,7 +528,6 @@ Filter Board
|
||||
#include "cpu/tms32025/tms32025.h"
|
||||
#include "sound/ym2151.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/c140.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
@ -1537,7 +1536,7 @@ void namcos21_state::sound_map(address_map &map)
|
||||
map(0x0000, 0x3fff).bankr("bank6"); /* banked */
|
||||
map(0x3000, 0x3003).nopw(); /* ? */
|
||||
map(0x4000, 0x4001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
|
||||
map(0x5000, 0x6fff).rw("c140", FUNC(c140_device::c140_r), FUNC(c140_device::c140_w));
|
||||
map(0x5000, 0x6fff).rw(m_c140, FUNC(c140_device::c140_r), FUNC(c140_device::c140_w));
|
||||
map(0x7000, 0x77ff).rw(FUNC(namcos21_state::namcos2_dualportram_byte_r), FUNC(namcos21_state::namcos2_dualportram_byte_w)).share("mpdualportram");
|
||||
map(0x7800, 0x7fff).rw(FUNC(namcos21_state::namcos2_dualportram_byte_r), FUNC(namcos21_state::namcos2_dualportram_byte_w)); /* mirror */
|
||||
map(0x8000, 0x9fff).ram();
|
||||
@ -1958,7 +1957,7 @@ MACHINE_CONFIG_START(namcos21_state::namcos21)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_namcos21)
|
||||
MCFG_PALETTE_ADD("palette", NAMCOS21_NUM_COLORS)
|
||||
@ -1969,10 +1968,10 @@ MACHINE_CONFIG_START(namcos21_state::namcos21)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", 8000000/374)
|
||||
MCFG_C140_BANK_TYPE(SYSTEM21)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
C140(config, m_c140, 8000000/374);
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM21);
|
||||
m_c140->add_route(0, "lspeaker", 0.50);
|
||||
m_c140->add_route(1, "rspeaker", 0.50);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, 3579580)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.30)
|
||||
@ -2015,7 +2014,7 @@ MACHINE_CONFIG_START(namcos21_state::driveyes)
|
||||
MCFG_DEVICE_ADD("gearbox", NAMCOIO_GEARBOX, 0)
|
||||
|
||||
configure_c148_standard(config);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS_NAMCO480I
|
||||
@ -2031,10 +2030,10 @@ MACHINE_CONFIG_START(namcos21_state::driveyes)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", 8000000/374)
|
||||
MCFG_C140_BANK_TYPE(SYSTEM21)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
C140(config, m_c140, 8000000/374);
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM21);
|
||||
m_c140->add_route(0, "lspeaker", 0.50);
|
||||
m_c140->add_route(1, "rspeaker", 0.50);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, 3579580)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.30)
|
||||
@ -2072,7 +2071,7 @@ MACHINE_CONFIG_START(namcos21_state::winrun)
|
||||
|
||||
configure_c148_standard(config);
|
||||
NAMCO_C148(config, m_gpu_intc, 0, "gpu", false);
|
||||
MCFG_NAMCO_C139_ADD("sci")
|
||||
NAMCO_C139(config, m_sci, 0);
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
|
||||
|
||||
@ -2085,8 +2084,6 @@ MACHINE_CONFIG_START(namcos21_state::winrun)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(namcos21_state, screen_update_winrun)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfxdecode_device::empty)
|
||||
|
||||
MCFG_PALETTE_ADD("palette", NAMCOS21_NUM_COLORS)
|
||||
MCFG_PALETTE_FORMAT(XBRG)
|
||||
|
||||
@ -2095,10 +2092,10 @@ MACHINE_CONFIG_START(namcos21_state::winrun)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
MCFG_C140_ADD("c140", 8000000/374)
|
||||
MCFG_C140_BANK_TYPE(SYSTEM21)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
|
||||
C140(config, m_c140, 8000000/374);
|
||||
m_c140->set_bank_type(c140_device::C140_TYPE::SYSTEM21);
|
||||
m_c140->add_route(0, "lspeaker", 0.50);
|
||||
m_c140->add_route(1, "rspeaker", 0.50);
|
||||
|
||||
MCFG_DEVICE_ADD("ymsnd", YM2151, 3579580)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.30)
|
||||
|
@ -357,8 +357,8 @@ MACHINE_CONFIG_START(tceptor_state::tceptor)
|
||||
MCFG_PALETTE_INDIRECT_ENTRIES(1024)
|
||||
MCFG_PALETTE_INIT_OWNER(tceptor_state, tceptor)
|
||||
|
||||
MCFG_NAMCO_C45_ROAD_ADD("c45_road")
|
||||
MCFG_GFX_PALETTE("palette")
|
||||
NAMCO_C45_ROAD(config, m_c45_road, 0);
|
||||
m_c45_road->set_palette(m_palette);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60.606060)
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "namcos2.h"
|
||||
#include "machine/timer.h"
|
||||
#include "video/namco_c116.h"
|
||||
|
||||
#define NAMCOFL_HTOTAL (288) /* wrong */
|
||||
#define NAMCOFL_HBSTART (288)
|
||||
@ -25,7 +24,6 @@ class namcofl_state : public namcos2_shared_state
|
||||
public:
|
||||
namcofl_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
namcos2_shared_state(mconfig, type, tag),
|
||||
m_c116(*this,"c116"),
|
||||
m_in0(*this, "IN0"),
|
||||
m_in1(*this, "IN1"),
|
||||
m_in2(*this, "IN2"),
|
||||
@ -41,7 +39,6 @@ public:
|
||||
void init_finalapr();
|
||||
|
||||
private:
|
||||
required_device<namco_c116_device> m_c116;
|
||||
required_ioport m_in0;
|
||||
required_ioport m_in1;
|
||||
required_ioport m_in2;
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "namcos2.h"
|
||||
#include "machine/eeprompar.h"
|
||||
#include "machine/timer.h"
|
||||
#include "video/namco_c116.h"
|
||||
|
||||
#define NAMCONB1_HTOTAL (288) /* wrong */
|
||||
#define NAMCONB1_HBSTART (288)
|
||||
@ -31,7 +30,6 @@ class namconb1_state : public namcos2_shared_state
|
||||
public:
|
||||
namconb1_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
namcos2_shared_state(mconfig, type, tag),
|
||||
m_c116(*this, "c116"),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_p1(*this, "P1"),
|
||||
m_p2(*this, "P2"),
|
||||
@ -44,6 +42,7 @@ public:
|
||||
m_light1_y(*this, "LIGHT1_Y"),
|
||||
m_spritebank32(*this, "spritebank32"),
|
||||
m_tilebank32(*this, "tilebank32"),
|
||||
m_rozbank32(*this, "rozbank32"),
|
||||
m_namconb_shareram(*this, "namconb_share") { }
|
||||
|
||||
void namconb1(machine_config &config);
|
||||
@ -63,7 +62,6 @@ public:
|
||||
void init_gslgr94u();
|
||||
|
||||
private:
|
||||
required_device<namco_c116_device> m_c116;
|
||||
required_device<eeprom_parallel_28xx_device> m_eeprom;
|
||||
required_ioport m_p1;
|
||||
required_ioport m_p2;
|
||||
@ -76,6 +74,7 @@ private:
|
||||
optional_ioport m_light1_y;
|
||||
required_shared_ptr<uint32_t> m_spritebank32;
|
||||
optional_shared_ptr<uint32_t> m_tilebank32;
|
||||
optional_shared_ptr<uint32_t> m_rozbank32;
|
||||
required_shared_ptr<uint16_t> m_namconb_shareram;
|
||||
|
||||
uint8_t m_vbl_irq_level;
|
||||
@ -108,8 +107,9 @@ private:
|
||||
DECLARE_READ8_MEMBER(dac1_r);
|
||||
DECLARE_READ8_MEMBER(dac0_r);
|
||||
|
||||
DECLARE_WRITE32_MEMBER(rozbank32_w);
|
||||
virtual void machine_start() override;
|
||||
DECLARE_MACHINE_RESET(namconb);
|
||||
virtual void machine_reset() override;
|
||||
DECLARE_VIDEO_START(namconb1);
|
||||
DECLARE_VIDEO_START(machbrkr);
|
||||
DECLARE_VIDEO_START(outfxies);
|
||||
|
@ -15,7 +15,9 @@
|
||||
#include "machine/namco_c139.h"
|
||||
#include "machine/namco_c148.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/c140.h"
|
||||
#include "video/c45.h"
|
||||
#include "video/namco_c116.h"
|
||||
|
||||
#include "cpu/m6502/m3745x.h"
|
||||
#include "emupal.h"
|
||||
@ -109,7 +111,9 @@ public:
|
||||
, m_dspmaster(*this, "dspmaster")
|
||||
, m_dspslave(*this, "dspslave")
|
||||
, m_gametype(0)
|
||||
, m_c140(*this, "c140")
|
||||
, m_c68(*this, "c68")
|
||||
, m_c116(*this, "c116")
|
||||
, m_master_intc(*this, "master_intc")
|
||||
, m_slave_intc(*this, "slave_intc")
|
||||
, m_sci(*this, "sci")
|
||||
@ -134,7 +138,9 @@ public:
|
||||
int m_gametype;
|
||||
|
||||
protected:
|
||||
optional_device<c140_device> m_c140;
|
||||
optional_device<m37450_device> m_c68;
|
||||
optional_device<namco_c116_device> m_c116;
|
||||
optional_device<namco_c148_device> m_master_intc;
|
||||
optional_device<namco_c148_device> m_slave_intc;
|
||||
optional_device<namco_c139_device> m_sci;
|
||||
@ -198,8 +204,6 @@ protected:
|
||||
void c169_roz_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri);
|
||||
DECLARE_READ16_MEMBER( c169_roz_control_r );
|
||||
DECLARE_WRITE16_MEMBER( c169_roz_control_w );
|
||||
DECLARE_READ16_MEMBER( c169_roz_bank_r );
|
||||
DECLARE_WRITE16_MEMBER( c169_roz_bank_w );
|
||||
DECLARE_READ16_MEMBER( c169_roz_videoram_r );
|
||||
DECLARE_WRITE16_MEMBER( c169_roz_videoram_w );
|
||||
|
||||
@ -221,7 +225,6 @@ protected:
|
||||
|
||||
static const int ROZ_TILEMAP_COUNT = 2;
|
||||
tilemap_t *m_c169_roz_tilemap[ROZ_TILEMAP_COUNT];
|
||||
uint16_t m_c169_roz_bank[0x10/2];
|
||||
uint16_t m_c169_roz_control[0x20/2];
|
||||
optional_shared_ptr<uint16_t> m_c169_roz_videoram;
|
||||
int m_c169_roz_gfxbank;
|
||||
@ -275,7 +278,7 @@ protected:
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
optional_device<cpu_device> m_slave;
|
||||
optional_device<cpu_device> m_mcu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
optional_device<gfxdecode_device> m_gfxdecode;
|
||||
optional_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
};
|
||||
@ -286,13 +289,13 @@ public:
|
||||
namcos2_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
namcos2_shared_state(mconfig, type, tag),
|
||||
m_dpram(*this, "dpram"),
|
||||
m_paletteram(*this, "paletteram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_rozram(*this, "rozram"),
|
||||
m_roz_ctrl(*this, "rozctrl"),
|
||||
m_c45_road(*this, "c45_road")
|
||||
{ }
|
||||
|
||||
void configure_c116_standard(machine_config &config);
|
||||
void configure_c148_standard(machine_config &config);
|
||||
void metlhawk(machine_config &config);
|
||||
void gollygho(machine_config &config);
|
||||
@ -365,25 +368,20 @@ private:
|
||||
|
||||
TILE_GET_INFO_MEMBER( roz_tile_info );
|
||||
|
||||
DECLARE_READ16_MEMBER( paletteram_word_r );
|
||||
DECLARE_WRITE16_MEMBER( paletteram_word_w );
|
||||
DECLARE_WRITE16_MEMBER( rozram_word_w );
|
||||
DECLARE_READ16_MEMBER( gfx_ctrl_r );
|
||||
DECLARE_WRITE16_MEMBER( gfx_ctrl_w );
|
||||
|
||||
void draw_sprite_init();
|
||||
void update_palette();
|
||||
void apply_clip( rectangle &clip, const rectangle &cliprect );
|
||||
void draw_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int control );
|
||||
void draw_sprites_metalhawk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
|
||||
uint16_t get_palette_register( int which );
|
||||
|
||||
int get_pos_irq_scanline() { return (get_palette_register(5) - 32) & 0xff; }
|
||||
int get_pos_irq_scanline() { return (m_c116->get_reg(5) - 32) & 0xff; }
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(screen_scanline);
|
||||
|
||||
required_shared_ptr<uint8_t> m_dpram; /* 2Kx8 */
|
||||
required_shared_ptr<uint16_t> m_paletteram;
|
||||
optional_shared_ptr<uint16_t> m_spriteram;
|
||||
optional_shared_ptr<uint16_t> m_rozram;
|
||||
optional_shared_ptr<uint16_t> m_roz_ctrl;
|
||||
|
@ -8,8 +8,8 @@
|
||||
class tceptor_state : public driver_device
|
||||
{
|
||||
public:
|
||||
tceptor_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
tceptor_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_mcu(*this, "mcu"),
|
||||
@ -45,12 +45,9 @@ private:
|
||||
int m_sprite32;
|
||||
int m_bg;
|
||||
tilemap_t *m_tx_tilemap;
|
||||
tilemap_t *m_bg1_tilemap;
|
||||
tilemap_t *m_bg2_tilemap;
|
||||
int32_t m_bg1_scroll_x;
|
||||
int32_t m_bg1_scroll_y;
|
||||
int32_t m_bg2_scroll_x;
|
||||
int32_t m_bg2_scroll_y;
|
||||
tilemap_t *m_bg_tilemap[2];
|
||||
int32_t m_bg_scroll_x[2];
|
||||
int32_t m_bg_scroll_y[2];
|
||||
bitmap_ind16 m_temp_bitmap;
|
||||
std::unique_ptr<uint16_t[]> m_sprite_ram_buffered;
|
||||
std::unique_ptr<uint8_t[]> m_decoded_16;
|
||||
|
@ -17,9 +17,6 @@
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_NAMCO_C139_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, NAMCO_C139, 0)
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
@ -823,7 +823,6 @@ void namcos2_shared_state::c169_roz_init(int gfxbank, const char *maskregion, c1
|
||||
16,16,
|
||||
256,256);
|
||||
|
||||
save_item(NAME(m_c169_roz_bank));
|
||||
save_item(NAME(m_c169_roz_control));
|
||||
}
|
||||
|
||||
@ -996,20 +995,6 @@ WRITE16_MEMBER( namcos2_shared_state::c169_roz_control_w )
|
||||
COMBINE_DATA(&m_c169_roz_control[offset]);
|
||||
}
|
||||
|
||||
READ16_MEMBER( namcos2_shared_state::c169_roz_bank_r )
|
||||
{
|
||||
return m_c169_roz_bank[offset];
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( namcos2_shared_state::c169_roz_bank_w )
|
||||
{
|
||||
uint16_t old_data = m_c169_roz_bank[offset];
|
||||
COMBINE_DATA(&m_c169_roz_bank[offset]);
|
||||
if (m_c169_roz_bank[offset] != old_data)
|
||||
for (auto & elem : m_c169_roz_tilemap)
|
||||
elem->mark_all_dirty();
|
||||
}
|
||||
|
||||
READ16_MEMBER( namcos2_shared_state::c169_roz_videoram_r )
|
||||
{
|
||||
return m_c169_roz_videoram[offset];
|
||||
|
@ -77,15 +77,16 @@ void namco_c45_road_device::map(address_map &map)
|
||||
// namco_c45_road_device -- constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, NAMCO_C45_ROAD, tag, owner, clock),
|
||||
device_gfx_interface(mconfig, *this, gfxinfo),
|
||||
device_memory_interface(mconfig, *this),
|
||||
m_space_config("c45", ENDIANNESS_BIG, 16, 17, 0, address_map_constructor(FUNC(namco_c45_road_device::map), this)),
|
||||
m_tmapram(*this, "tmapram"),
|
||||
m_tileram(*this, "tileram"),
|
||||
m_lineram(*this, "lineram"),
|
||||
m_transparent_color(~0)
|
||||
namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, NAMCO_C45_ROAD, tag, owner, clock),
|
||||
device_gfx_interface(mconfig, *this, gfxinfo),
|
||||
device_memory_interface(mconfig, *this),
|
||||
m_space_config("c45", ENDIANNESS_BIG, 16, 17, 0, address_map_constructor(FUNC(namco_c45_road_device::map), this)),
|
||||
m_tmapram(*this, "tmapram"),
|
||||
m_tileram(*this, "tileram"),
|
||||
m_lineram(*this, "lineram"),
|
||||
m_clut(*this, "clut"),
|
||||
m_transparent_color(~0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -232,9 +233,6 @@ void namco_c45_road_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect
|
||||
|
||||
void namco_c45_road_device::device_start()
|
||||
{
|
||||
if (memregion("clut") != nullptr)
|
||||
m_clut = memregion("clut")->base();
|
||||
|
||||
// create a tilemap for the road
|
||||
m_tilemap = &machine().tilemap().create(*this, tilemap_get_info_delegate(FUNC(namco_c45_road_device::get_road_info), this),
|
||||
TILEMAP_SCAN_ROWS, ROAD_TILE_SIZE, ROAD_TILE_SIZE, ROAD_COLS, ROAD_ROWS);
|
||||
|
@ -6,14 +6,6 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_NAMCO_C45_ROAD_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, NAMCO_C45_ROAD, 0)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -63,7 +55,7 @@ private:
|
||||
required_shared_ptr<uint16_t> m_tmapram;
|
||||
required_shared_ptr<uint16_t> m_tileram;
|
||||
required_shared_ptr<uint16_t> m_lineram;
|
||||
uint8_t * m_clut;
|
||||
optional_region_ptr<uint8_t> m_clut;
|
||||
tilemap_t * m_tilemap;
|
||||
pen_t m_transparent_color;
|
||||
};
|
||||
|
@ -122,6 +122,8 @@ READ8_MEMBER(namco_c116_device::read)
|
||||
return m_regs[reg] & 0xff;
|
||||
else
|
||||
return m_regs[reg] >> 8;
|
||||
/* registers 6,7: unmapped? */
|
||||
//if (reg > 0x6) return 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,13 +147,29 @@ WRITE8_MEMBER(namco_c116_device::write)
|
||||
RAM = &m_ram_b[0];
|
||||
break;
|
||||
default: // case 0x1800 (internal registers)
|
||||
{
|
||||
{ /* notes from namcos2.cpp */
|
||||
/* registers 0-3: clipping */
|
||||
|
||||
/* register 4: ? */
|
||||
/* sets using it:
|
||||
assault: $0020
|
||||
burnforc: $0130 after titlescreen
|
||||
dirtfoxj: $0108 at game start
|
||||
finalap1/2/3: $00C0
|
||||
finehour: $0168 after titlescreen
|
||||
fourtrax: $00E8 and $00F0
|
||||
luckywld: $00E8 at titlescreen, $00A0 in game and $0118 if in tunnel
|
||||
suzuka8h1/2: $00E8 and $00A0 */
|
||||
|
||||
/* register 5: POSIRQ scanline (only 8 bits used) */
|
||||
|
||||
/* registers 6,7: nothing? */
|
||||
int reg = (offset & 0xf) >> 1;
|
||||
if (offset & 1)
|
||||
m_regs[reg] = (m_regs[reg] & 0xff00) | data;
|
||||
else
|
||||
m_regs[reg] = (m_regs[reg] & 0x00ff) | (data << 8);
|
||||
//printf("reg%d = %d\n", reg, m_regs[reg]);
|
||||
//logerror("reg%d = %d\n", reg, m_regs[reg]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -385,12 +385,12 @@ void namcona1_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c
|
||||
|
||||
if( color&8 )
|
||||
{
|
||||
palbase = ((color>>4)&0xf) * 0x10 + ((color & 0xf00) >> 8);
|
||||
palbase = (color&0xf0) | ((color & 0xf00) >> 8);
|
||||
bpp4 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
palbase = (color>>4)&0xf;
|
||||
palbase = (color&0xf0)>>4;
|
||||
bpp4 = 0;
|
||||
}
|
||||
|
||||
|
@ -8,20 +8,6 @@
|
||||
#include "machine/namcoic.h"
|
||||
|
||||
|
||||
static inline uint8_t
|
||||
nth_byte16( const uint16_t *pSource, int which )
|
||||
{
|
||||
uint16_t data = pSource[which/2];
|
||||
if( which&1 )
|
||||
{
|
||||
return data&0xff;
|
||||
}
|
||||
else
|
||||
{
|
||||
return data>>8;
|
||||
}
|
||||
} /* nth_byte16 */
|
||||
|
||||
/* nth_word32 is a general-purpose utility function, which allows us to
|
||||
* read from 32-bit aligned memory as if it were an array of 16 bit words.
|
||||
*/
|
||||
@ -82,7 +68,7 @@ void namconb1_state::NB2TilemapCB_outfxies(uint16_t code, int *tile, int *mask )
|
||||
|
||||
void namconb1_state::NB2RozCB_machbrkr(uint16_t code, int *tile, int *mask, int which )
|
||||
{
|
||||
int bank = nth_byte16(&m_c169_roz_bank[which * 8 / 2], (code >> 11) & 0x7);
|
||||
int bank = nth_byte32(&m_rozbank32[which * 8 / 4], (code >> 11) & 0x7);
|
||||
int mangle = (code & 0x7ff) | (bank << 11);
|
||||
*tile = mangle;
|
||||
*mask = mangle;
|
||||
@ -92,7 +78,7 @@ void namconb1_state::NB2RozCB_machbrkr(uint16_t code, int *tile, int *mask, int
|
||||
void namconb1_state::NB2RozCB_outfxies(uint16_t code, int *tile, int *mask, int which )
|
||||
{
|
||||
/* the pixmap index is mangled, the transparency bitmask index is not */
|
||||
int bank = nth_byte16(&m_c169_roz_bank[which * 8 / 2], (code >> 11) & 0x7);
|
||||
int bank = nth_byte32(&m_rozbank32[which * 8 / 4], (code >> 11) & 0x7);
|
||||
int mangle = (code & 0x7ff) | (bank << 11);
|
||||
*mask = mangle;
|
||||
mangle = bitswap<19>(mangle & 0x7ffff, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 4, 5, 6, 3, 2, 1, 0);
|
||||
@ -163,6 +149,15 @@ VIDEO_START_MEMBER(namconb1_state,namconb1)
|
||||
|
||||
/****************************************************************************************************/
|
||||
|
||||
WRITE32_MEMBER(namconb1_state::rozbank32_w)
|
||||
{
|
||||
uint32_t old_data = m_rozbank32[offset];
|
||||
COMBINE_DATA(&m_rozbank32[offset]);
|
||||
if (m_rozbank32[offset] != old_data)
|
||||
for (auto & elem : m_c169_roz_tilemap)
|
||||
elem->mark_all_dirty();
|
||||
}
|
||||
|
||||
uint32_t namconb1_state::screen_update_namconb2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
/* compute window for custom screen blanking */
|
||||
|
@ -290,92 +290,6 @@ WRITE16_MEMBER( namcos2_state::rozram_word_w )
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
uint16_t namcos2_state::get_palette_register( int which )
|
||||
{
|
||||
const uint16_t *source = &m_paletteram[0x3000/2];
|
||||
return ((source[which*2]&0xff)<<8) | (source[which*2+1]&0xff);
|
||||
}
|
||||
|
||||
READ16_MEMBER( namcos2_state::paletteram_word_r )
|
||||
{
|
||||
if( (offset&0x1800) == 0x1800 )
|
||||
{
|
||||
/* palette register */
|
||||
offset &= 0x180f;
|
||||
|
||||
/* registers 6,7: unmapped? */
|
||||
if (offset > 0x180b) return 0xff;
|
||||
}
|
||||
return m_paletteram[offset];
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( namcos2_state::paletteram_word_w )
|
||||
{
|
||||
if( (offset&0x1800) == 0x1800 )
|
||||
{
|
||||
/* palette register */
|
||||
offset &= 0x180f;
|
||||
|
||||
if( ACCESSING_BITS_0_7 ) data&=0xff;
|
||||
else data>>=8;
|
||||
|
||||
switch (offset) {
|
||||
/* registers 0-3: clipping */
|
||||
|
||||
/* register 4: ? */
|
||||
/* sets using it:
|
||||
assault: $0020
|
||||
burnforc: $0130 after titlescreen
|
||||
dirtfoxj: $0108 at game start
|
||||
finalap1/2/3: $00C0
|
||||
finehour: $0168 after titlescreen
|
||||
fourtrax: $00E8 and $00F0
|
||||
luckywld: $00E8 at titlescreen, $00A0 in game and $0118 if in tunnel
|
||||
suzuka8h1/2: $00E8 and $00A0 */
|
||||
case 0x1808: case 0x1809:
|
||||
// if (data^m_paletteram[offset]) printf("%04X\n",data<<((~offset&1)<<3)|m_paletteram[offset^1]<<((offset&1)<<3));
|
||||
break;
|
||||
|
||||
/* register 5: POSIRQ scanline (only 8 bits used) */
|
||||
/*case 0x180a:*/ case 0x180b:
|
||||
//if (data^m_paletteram[offset]) {
|
||||
m_paletteram[offset] = data;
|
||||
//}
|
||||
break;
|
||||
|
||||
/* registers 6,7: nothing? */
|
||||
default: break;
|
||||
}
|
||||
|
||||
m_paletteram[offset] = data;
|
||||
}
|
||||
else
|
||||
{
|
||||
COMBINE_DATA(&m_paletteram[offset]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void
|
||||
namcos2_state::update_palette()
|
||||
{
|
||||
int bank;
|
||||
for( bank=0; bank<0x20; bank++ )
|
||||
{
|
||||
int pen = bank*256;
|
||||
int offset = ((pen & 0x1800) << 2) | (pen & 0x07ff);
|
||||
int i;
|
||||
for( i=0; i<256; i++ )
|
||||
{
|
||||
int r = m_paletteram[offset | 0x0000] & 0x00ff;
|
||||
int g = m_paletteram[offset | 0x0800] & 0x00ff;
|
||||
int b = m_paletteram[offset | 0x1000] & 0x00ff;
|
||||
m_palette->set_pen_color(pen++,rgb_t(r,g,b));
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
void namcos2_state::draw_sprite_init()
|
||||
@ -399,10 +313,10 @@ void namcos2_state::video_start()
|
||||
|
||||
void namcos2_state::apply_clip( rectangle &clip, const rectangle &cliprect )
|
||||
{
|
||||
clip.min_x = get_palette_register(0) - 0x4a;
|
||||
clip.max_x = get_palette_register(1) - 0x4a - 1;
|
||||
clip.min_y = get_palette_register(2) - 0x21;
|
||||
clip.max_y = get_palette_register(3) - 0x21 - 1;
|
||||
clip.min_x = m_c116->get_reg(0) - 0x4a;
|
||||
clip.max_x = m_c116->get_reg(1) - 0x4a - 1;
|
||||
clip.min_y = m_c116->get_reg(2) - 0x21;
|
||||
clip.max_y = m_c116->get_reg(3) - 0x21 - 1;
|
||||
/* intersect with master clip rectangle */
|
||||
clip &= cliprect;
|
||||
}
|
||||
@ -412,7 +326,6 @@ uint32_t namcos2_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
|
||||
rectangle clip;
|
||||
int pri;
|
||||
|
||||
update_palette();
|
||||
bitmap.fill(m_palette->black_pen(), cliprect );
|
||||
apply_clip( clip, cliprect );
|
||||
|
||||
@ -454,7 +367,6 @@ uint32_t namcos2_state::screen_update_finallap(screen_device &screen, bitmap_ind
|
||||
rectangle clip;
|
||||
int pri;
|
||||
|
||||
update_palette();
|
||||
bitmap.fill(m_palette->black_pen(), cliprect );
|
||||
apply_clip( clip, cliprect );
|
||||
|
||||
@ -503,7 +415,6 @@ uint32_t namcos2_state::screen_update_luckywld(screen_device &screen, bitmap_ind
|
||||
rectangle clip;
|
||||
int pri;
|
||||
|
||||
update_palette();
|
||||
bitmap.fill(m_palette->black_pen(), cliprect );
|
||||
apply_clip( clip, cliprect );
|
||||
|
||||
@ -536,7 +447,6 @@ uint32_t namcos2_state::screen_update_sgunner(screen_device &screen, bitmap_ind1
|
||||
rectangle clip;
|
||||
int pri;
|
||||
|
||||
update_palette();
|
||||
bitmap.fill(m_palette->black_pen(), cliprect );
|
||||
apply_clip( clip, cliprect );
|
||||
|
||||
@ -568,7 +478,6 @@ uint32_t namcos2_state::screen_update_metlhawk(screen_device &screen, bitmap_ind
|
||||
rectangle clip;
|
||||
int pri;
|
||||
|
||||
update_palette();
|
||||
bitmap.fill(m_palette->black_pen(), cliprect );
|
||||
apply_clip( clip, cliprect );
|
||||
|
||||
|
@ -182,11 +182,7 @@ WRITE8_MEMBER(tceptor_state::tceptor_bg_ram_w)
|
||||
{
|
||||
m_bg_ram[offset] = data;
|
||||
|
||||
offset /= 2;
|
||||
if (offset < 0x800)
|
||||
m_bg1_tilemap->mark_tile_dirty(offset);
|
||||
else
|
||||
m_bg2_tilemap->mark_tile_dirty(offset - 0x800);
|
||||
m_bg_tilemap[offset >> 12]->mark_tile_dirty((offset & 0xfff) >> 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tceptor_state::tceptor_bg_scroll_w)
|
||||
@ -194,27 +190,27 @@ WRITE8_MEMBER(tceptor_state::tceptor_bg_scroll_w)
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
m_bg1_scroll_x &= 0xff;
|
||||
m_bg1_scroll_x |= data << 8;
|
||||
m_bg_scroll_x[0] &= 0xff;
|
||||
m_bg_scroll_x[0] |= data << 8;
|
||||
break;
|
||||
case 1:
|
||||
m_bg1_scroll_x &= 0xff00;
|
||||
m_bg1_scroll_x |= data;
|
||||
m_bg_scroll_x[0] &= 0xff00;
|
||||
m_bg_scroll_x[0] |= data;
|
||||
break;
|
||||
case 2:
|
||||
m_bg1_scroll_y = data;
|
||||
m_bg_scroll_y[0] = data;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
m_bg2_scroll_x &= 0xff;
|
||||
m_bg2_scroll_x |= data << 8;
|
||||
m_bg_scroll_x[1] &= 0xff;
|
||||
m_bg_scroll_x[1] |= data << 8;
|
||||
break;
|
||||
case 5:
|
||||
m_bg2_scroll_x &= 0xff00;
|
||||
m_bg2_scroll_x |= data;
|
||||
m_bg_scroll_x[1] &= 0xff00;
|
||||
m_bg_scroll_x[1] |= data;
|
||||
break;
|
||||
case 6:
|
||||
m_bg2_scroll_y = data;
|
||||
m_bg_scroll_y[1] = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -385,14 +381,14 @@ void tceptor_state::video_start()
|
||||
m_tx_tilemap->set_scrolly(0, 0);
|
||||
m_tx_tilemap->configure_groups(*m_gfxdecode->gfx(0), 7);
|
||||
|
||||
m_bg1_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tceptor_state::get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
m_bg2_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tceptor_state::get_bg2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
m_bg_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tceptor_state::get_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
m_bg_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(tceptor_state::get_bg2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
|
||||
save_pointer(NAME(m_sprite_ram_buffered), 0x200 / 2);
|
||||
save_item(NAME(m_bg1_scroll_x));
|
||||
save_item(NAME(m_bg1_scroll_y));
|
||||
save_item(NAME(m_bg2_scroll_x));
|
||||
save_item(NAME(m_bg2_scroll_y));
|
||||
save_item(NAME(m_bg_scroll_x[0]));
|
||||
save_item(NAME(m_bg_scroll_y[0]));
|
||||
save_item(NAME(m_bg_scroll_x[1]));
|
||||
save_item(NAME(m_bg_scroll_y[1]));
|
||||
}
|
||||
|
||||
|
||||
@ -502,21 +498,21 @@ uint32_t tceptor_state::screen_update_tceptor(screen_device &screen, bitmap_ind1
|
||||
{
|
||||
rectangle rect;
|
||||
int pri;
|
||||
int bg_center = 144 - ((((m_bg1_scroll_x + m_bg2_scroll_x ) & 0x1ff) - 288) / 2);
|
||||
int bg_center = 144 - ((((m_bg_scroll_x[0] + m_bg_scroll_x[1] ) & 0x1ff) - 288) / 2);
|
||||
|
||||
// left background
|
||||
rect = cliprect;
|
||||
rect.max_x = bg_center;
|
||||
m_bg1_tilemap->set_scrollx(0, m_bg1_scroll_x + 12);
|
||||
m_bg1_tilemap->set_scrolly(0, m_bg1_scroll_y + 20); //32?
|
||||
m_bg1_tilemap->draw(screen, bitmap, rect, 0, 0);
|
||||
m_bg_tilemap[0]->set_scrollx(0, m_bg_scroll_x[0] + 12);
|
||||
m_bg_tilemap[0]->set_scrolly(0, m_bg_scroll_y[0] + 20); //32?
|
||||
m_bg_tilemap[0]->draw(screen, bitmap, rect, 0, 0);
|
||||
|
||||
// right background
|
||||
rect.min_x = bg_center;
|
||||
rect.max_x = cliprect.max_x;
|
||||
m_bg2_tilemap->set_scrollx(0, m_bg2_scroll_x + 20);
|
||||
m_bg2_tilemap->set_scrolly(0, m_bg2_scroll_y + 20); // 32?
|
||||
m_bg2_tilemap->draw(screen, bitmap, rect, 0, 0);
|
||||
m_bg_tilemap[1]->set_scrollx(0, m_bg_scroll_x[1] + 20);
|
||||
m_bg_tilemap[1]->set_scrolly(0, m_bg_scroll_y[1] + 20); // 32?
|
||||
m_bg_tilemap[1]->draw(screen, bitmap, rect, 0, 0);
|
||||
|
||||
for (pri = 0; pri < 8; pri++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user