Details, details (nw)

* It's generally not a great idea to do integer ops on bool - it implicitly casts to/from int and may perform poorly
* Get rid of required ram_device in atari 8-bit common state - it isn't required/used by bartop52
* Get rid of bogus RAM device in bartop52
* Restore some authors' stylistic choices
* Make some stuff more consistent
This commit is contained in:
Vas Crabb 2018-09-01 17:58:02 +10:00
parent 24790c95ce
commit 0a7bff1417
22 changed files with 46 additions and 46 deletions

View File

@ -468,8 +468,8 @@ MACHINE_CONFIG_START(mpcb828_device::device_add_mconfig)
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, mpcb828_device, screen_update)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(DEVICE_SELF, mpcb828_device, vblank))
RAM(config, "sram").set_default_size("128K").set_default_value(0);
RAM(config, "vram").set_default_size("2560K").set_default_value(0);
RAM(config, "sram").set_default_size("128KiB").set_default_value(0);
RAM(config, "vram").set_default_size("2560KiB").set_default_value(0);
MCFG_DEVICE_ADD("dsp", TMS32030, 1) // 30_MHz_XTAL
MCFG_TMS3203X_HOLDA_CB(WRITELINE(DEVICE_SELF, mpcb828_device, holda))
@ -498,8 +498,8 @@ MACHINE_CONFIG_START(mpcb849_device::device_add_mconfig)
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, mpcb849_device, screen_update)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(DEVICE_SELF, device_srx_card_interface, irq3))
RAM(config, "sram").set_default_size("128K").set_default_value(0);
RAM(config, "vram").set_default_size("5120K").set_default_value(0); // size is a guess
RAM(config, "sram").set_default_size("128KiB").set_default_value(0);
RAM(config, "vram").set_default_size("5120KiB").set_default_value(0); // size is a guess
MCFG_DEVICE_ADD("dsp", TMS32030, 1) // 30_MHz_XTAL
MCFG_TMS3203X_HOLDA_CB(WRITELINE(DEVICE_SELF, mpcb828_device, holda))
@ -549,7 +549,7 @@ MACHINE_CONFIG_START(msmt094_device::device_add_mconfig)
MCFG_TMS3203X_HOLDA_CB(WRITELINE(DEVICE_SELF, msmt094_device, holda))
MCFG_DEVICE_ADDRESS_MAP(0, dsp1_map)
RAM(config, "ram").set_default_size("6M").set_default_value(0);
RAM(config, "ram").set_default_size("6MiB").set_default_value(0);
//MCFG_DEVICE_ADD("dsp2", TMS32030, 40_MHz_XTAL)
//MCFG_DEVICE_ADD("dsp3", TMS32030, 40_MHz_XTAL)
@ -568,8 +568,8 @@ MACHINE_CONFIG_START(mpcb896_device::device_add_mconfig)
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, mpcb896_device, screen_update)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(DEVICE_SELF, device_srx_card_interface, irq3))
RAM(config, "sram").set_default_size("256K").set_default_value(0);
RAM(config, "vram").set_default_size("18M").set_default_value(0);
RAM(config, "sram").set_default_size("256KiB").set_default_value(0);
RAM(config, "vram").set_default_size("18MiB").set_default_value(0);
MCFG_DEVICE_ADD("ramdac0", BT457, 164'609'300)
MCFG_DEVICE_ADD("ramdac1", BT457, 164'609'300)

View File

@ -597,11 +597,14 @@ void ptm6840_device::timeout(int idx)
{
case 0:
case 2:
if (m_control_reg[idx] & COUNT_MODE_8BIT) {
m_hightime ^= true;
if (m_control_reg[idx] & COUNT_MODE_8BIT)
{
m_hightime = !m_hightime;
m_output[idx] = m_hightime;
m_out_cb[idx](m_output[idx]);
} else {
}
else
{
m_output[idx] = m_output[idx] ^ 1;
m_out_cb[idx](m_output[idx]);
}

View File

@ -87,9 +87,9 @@ WRITE16_MEMBER(nereid_device::ctrl_w)
m_palette[m_index] = rgb_t(m_red, m_green, m_blue);
break;
case NEREID_READ_STROBE:
m_red = (m_palette[m_index]).r();
m_green = (m_palette[m_index]).g();
m_blue = (m_palette[m_index]).b();
m_red = m_palette[m_index].r();
m_green = m_palette[m_index].g();
m_blue = m_palette[m_index].b();
break;
case NEREID_PLANE_MASK:
m_plane_mask = data;

View File

@ -1455,14 +1455,14 @@ void napple2_state::apple2(machine_config &config)
{
apple2_common(config);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("48K").set_extra_options("4K,8K,12K,16K,20K,24K,32K,36K,48K").set_default_value(0);
RAM(config, RAM_TAG).set_default_size("48K").set_extra_options("4K,8K,12K,16K,20K,24K,32K,36K,48K").set_default_value(0x00);
}
void napple2_state::apple2p(machine_config &config)
{
apple2_common(config);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("48K").set_extra_options("16K,32K,48K").set_default_value(0);
RAM(config, RAM_TAG).set_default_size("48K").set_extra_options("16K,32K,48K").set_default_value(0x00);
}
void napple2_state::space84(machine_config &config)

View File

@ -3997,7 +3997,7 @@ MACHINE_CONFIG_START(apple2e_state::apple2e)
DS1315(config, m_ds1315, 0).read_backing().set(FUNC(apple2e_state::nsc_backing_r));
/* RAM */
RAM(config, m_ram).set_default_size("64K").set_default_value(0);
RAM(config, m_ram).set_default_size("64K").set_default_value(0x00);
/* 0000 banking */
ADDRESS_MAP_BANK(config, A2_0000_TAG).set_map(&apple2e_state::r0000bank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x200);

View File

@ -4599,7 +4599,7 @@ MACHINE_CONFIG_START( apple2gs_state::apple2gs )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
/* RAM */
RAM(config, m_ram).set_default_size("2M").set_extra_options("1M,3M,4M,5M,6M,7M,8M").set_default_value(0);
RAM(config, m_ram).set_default_size("2M").set_extra_options("1M,3M,4M,5M,6M,7M,8M").set_default_value(0x00);
/* C100 banking */
ADDRESS_MAP_BANK(config, A2GS_C100_TAG).set_map(&apple2gs_state::c100bank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x200);
@ -4705,7 +4705,7 @@ MACHINE_CONFIG_START( apple2gs_state::apple2gsr1 )
apple2gs(config);
// 256K on board + 1M in the expansion slot was common for ROM 01
m_ram->set_default_size("1280K").set_extra_options("256K,512K,768K,1M,2M,3M,4M,5M,6M,7M,8M").set_default_value(0);
m_ram->set_default_size("1280K").set_extra_options("256K,512K,768K,1M,2M,3M,4M,5M,6M,7M,8M").set_default_value(0x00);
MCFG_DEVICE_REPLACE(A2GS_ADBMCU_TAG, M50740, A2GS_MASTER_CLOCK/8)
MCFG_M5074X_PORT0_READ_CALLBACK(READ8(*this, apple2gs_state, adbmicro_p0_in))

View File

@ -1802,7 +1802,7 @@ void aristmk4_state::aristmk4(machine_config &config)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_aristmk4);
PALETTE(config, m_palette, 512);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(aristmk4_state::aristmk4_palette));
m_palette->set_init(DEVICE_SELF, FUNC(aristmk4_state::aristmk4_palette));
i8255_device &ppi(I8255A(config, "ppi8255_0"));
ppi.in_pa_callback().set(FUNC(aristmk4_state::pa1_r));
@ -1876,7 +1876,7 @@ void aristmk4_state::lions_palette(palette_device &palette)
void aristmk4_state::_86lions(machine_config &config)
{
aristmk4(config);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(aristmk4_state::lions_palette));
m_palette->set_init(DEVICE_SELF, FUNC(aristmk4_state::lions_palette));
}
ROM_START( 3bagflvt )

View File

@ -249,8 +249,8 @@
class a400_state : public atari_common_state
{
public:
a400_state(const machine_config &mconfig, device_type type, const char *tag)
: atari_common_state(mconfig, type, tag),
a400_state(const machine_config &mconfig, device_type type, const char *tag) :
atari_common_state(mconfig, type, tag),
m_ram(*this, RAM_TAG),
m_pia(*this, "pia"),
m_dac(*this, "dac"),
@ -259,7 +259,8 @@ public:
m_8000(*this, "8000"),
m_a000(*this, "a000"),
m_cart(*this, "cartleft"),
m_cart2(*this, "cartright") { }
m_cart2(*this, "cartright")
{ }
void atari_common_nodac(machine_config &config);
void atari_common(machine_config &config);

View File

@ -765,7 +765,7 @@ MACHINE_CONFIG_START(atom_state::atom)
MCFG_GENERIC_LOAD(atom_state, cart_load)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("32K").set_extra_options("2K,4K,6K,8K,10K,12K").set_default_value(0);
RAM(config, RAM_TAG).set_default_size("32K").set_extra_options("2K,4K,6K,8K,10K,12K").set_default_value(0x00);
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("rom_list","atom_rom")

View File

@ -250,7 +250,7 @@ MACHINE_CONFIG_START(b2m_state::b2m)
MCFG_SOFTWARE_LIST_ADD("flop_list","b2m")
/* internal ram */
RAM(config, RAM_TAG).set_default_size("128K").set_default_value(0);
RAM(config, RAM_TAG).set_default_size("128K").set_default_value(0x00);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(b2m_state::b2mrom)

View File

@ -449,7 +449,7 @@ void bagman_state::bagman_base(machine_config &config)
GFXDECODE(config, m_gfxdecode, "palette", gfx_bagman);
PALETTE(config, m_palette, 64);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(bagman_state::palette_init_bagman));
m_palette->set_init(DEVICE_SELF, FUNC(bagman_state::palette_init_bagman));
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -162,8 +162,6 @@ MACHINE_CONFIG_START(bartop52_state::a5200)
MCFG_POKEY_INTERRUPT_CB(bartop52_state, interrupt_cb)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
RAM(config, m_ram).set_default_size("16K");
MACHINE_CONFIG_END
ROM_START(barbball)

View File

@ -840,7 +840,7 @@ MACHINE_CONFIG_START(bbc_state::bbca)
MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("maincpu", M6502_IRQ_LINE))
/* internal ram */
RAM(config, m_ram).set_default_size("16K").set_extra_options("32K").set_default_value(0);
RAM(config, m_ram).set_default_size("16K").set_extra_options("32K").set_default_value(0x00);
MCFG_MACHINE_START_OVERRIDE(bbc_state, bbca)
MCFG_MACHINE_RESET_OVERRIDE(bbc_state, bbca)
@ -926,7 +926,7 @@ MACHINE_CONFIG_START(bbc_state::bbcb)
MCFG_MACHINE_RESET_OVERRIDE(bbc_state, bbcb)
/* internal ram */
m_ram->set_default_size("32K").set_default_value(0);
m_ram->set_default_size("32K").set_default_value(0x00);
/* speech hardware */
MCFG_DEVICE_ADD("vsm", SPEECHROM, 0)
@ -1312,7 +1312,7 @@ MACHINE_CONFIG_START(bbc_state::bbcm)
MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("maincpu", M6502_IRQ_LINE))
/* internal ram */
RAM(config, RAM_TAG).set_default_size("32K").set_default_value(0);
RAM(config, RAM_TAG).set_default_size("32K").set_default_value(0x00);
MCFG_MACHINE_START_OVERRIDE(bbc_state, bbcm)
MCFG_MACHINE_RESET_OVERRIDE(bbc_state, bbcm)

View File

@ -528,7 +528,7 @@ void beezer_state::beezer(machine_config &config)
m_screen->set_palette(m_palette);
PALETTE(config, m_palette, 16);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(beezer_state::palette_init));
m_palette->set_init(DEVICE_SELF, FUNC(beezer_state::palette_init));
// sound hardware
MC6809(config, m_audiocpu, XTAL(4'000'000));

View File

@ -78,7 +78,7 @@ void emate_state::emate(machine_config &config)
screen.set_screen_update(FUNC(emate_state::screen_update));
palette_device &palette(PALETTE(config, "palette", 16));
palette.set_init(DEVICE_SELF_OWNER, FUNC(emate_state::palette_init));
palette.set_init(DEVICE_SELF, FUNC(emate_state::palette_init));
RAM(config, m_ram);
m_ram->set_default_size("2M");

View File

@ -618,7 +618,7 @@ void goldngam_state::base(machine_config &config)
GFXDECODE(config, "gfxdecode", "palette", gfx_goldngam);
PALETTE(config, "palette", 512).set_init(DEVICE_SELF_OWNER, FUNC(goldngam_state::palette_init));
PALETTE(config, "palette", 512).set_init(DEVICE_SELF, FUNC(goldngam_state::palette_init));
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -362,7 +362,7 @@ void gts3a_state::gts3a(machine_config &config)
screen.set_visarea(0, 127, 0, 31);
PALETTE(config, m_palette, 2);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(gts3a_state::palette_init));
m_palette->set_init(DEVICE_SELF, FUNC(gts3a_state::palette_init));
mc6845_device &crtc(MC6845(config, "crtc", XTAL(3'579'545) / 2));
crtc.set_screen("screen");

View File

@ -1048,7 +1048,7 @@ void mac_state::mac512ke_base(machine_config &config)
m_screen->set_palette(m_palette);
PALETTE(config, m_palette, 2);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(mac_state::palette_init_mac));
m_palette->set_init(DEVICE_SELF, FUNC(mac_state::palette_init_mac));
MCFG_VIDEO_START_OVERRIDE(mac_state,mac)
@ -1182,7 +1182,7 @@ void mac_state::macprtb(machine_config &config)
m_screen->set_screen_update(FUNC(mac_state::screen_update_macprtb));
PALETTE(config, m_palette, 2);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(mac_state::palette_init_mac));
m_palette->set_init(DEVICE_SELF, FUNC(mac_state::palette_init_mac));
MCFG_VIDEO_START_OVERRIDE(mac_state,macprtb)
@ -1408,7 +1408,7 @@ void mac_state::macse30(machine_config &config)
m_screen->set_palette(m_palette);
PALETTE(config, m_palette, 2);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(mac_state::palette_init_mac));
m_palette->set_init(DEVICE_SELF, FUNC(mac_state::palette_init_mac));
MCFG_VIDEO_START_OVERRIDE(mac_state,mac)
@ -1438,7 +1438,7 @@ void mac_state::macpb140(machine_config &config)
m_screen->set_screen_update(FUNC(mac_state::screen_update_macpb140));
PALETTE(config, m_palette, 2);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(mac_state::palette_init_mac));
m_palette->set_init(DEVICE_SELF, FUNC(mac_state::palette_init_mac));
MCFG_VIDEO_START_OVERRIDE(mac_state,macprtb)
@ -1484,7 +1484,7 @@ void mac_state::macpb160(machine_config &config)
m_screen->set_screen_update(FUNC(mac_state::screen_update_macpb160));
PALETTE(config, m_palette, 16);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(mac_state::palette_init_macgsc));
m_palette->set_init(DEVICE_SELF, FUNC(mac_state::palette_init_macgsc));
MCFG_VIDEO_START_OVERRIDE(mac_state,macprtb)

View File

@ -371,7 +371,7 @@ MACHINE_CONFIG_START(maxaflex_state::maxaflex)
MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
RAM(config, m_ram).set_default_size("16K");
RAM(config, RAM_TAG).set_default_size("16K");
MACHINE_CONFIG_END

View File

@ -3548,7 +3548,7 @@ void pacman_state::pacman(machine_config &config, bool latch)
PALETTE(config, m_palette, 128*4);
m_palette->set_indirect_entries(32);
m_palette->set_init(DEVICE_SELF_OWNER, FUNC(pacman_state::palette_init_pacman));
m_palette->set_init(DEVICE_SELF, FUNC(pacman_state::palette_init_pacman));
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);

View File

@ -32,7 +32,6 @@ public:
atari_common_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_ram(*this, RAM_TAG)
, m_gtia(*this, "gtia")
, m_antic(*this, "antic")
, m_screen(*this, "screen")
@ -52,7 +51,6 @@ protected:
POKEY_KEYBOARD_CB_MEMBER(a800_keyboard);
required_device<cpu_device> m_maincpu;
required_device<ram_device> m_ram;
required_device<gtia_device> m_gtia;
required_device<antic_device> m_antic;
required_device<screen_device> m_screen;