misc cleanup (nw)

This commit is contained in:
Vas Crabb 2018-06-28 13:32:51 +10:00
parent b8f7bce7e2
commit 85a16dfb9d
7 changed files with 42 additions and 13 deletions

View File

@ -32,8 +32,8 @@ class decwriter_state : public driver_device
{ {
public: public:
// constructor // constructor
decwriter_state(const machine_config &mconfig, device_type type, const char *tag) decwriter_state(const machine_config &mconfig, device_type type, const char *tag) :
: driver_device(mconfig, type, tag), driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"), m_maincpu(*this, "maincpu"),
m_speaker(*this, "beeper"), m_speaker(*this, "beeper"),
m_usart(*this, "usart"), m_usart(*this, "usart"),

View File

@ -110,7 +110,7 @@ MACHINE_CONFIG_START(vt220_state::vt220)
MCFG_DEVICE_ADD("maincpu", I8051, XTAL(11'059'200)) // from schematic for earlier version MCFG_DEVICE_ADD("maincpu", I8051, XTAL(11'059'200)) // from schematic for earlier version
MCFG_DEVICE_PROGRAM_MAP(vt220_mem) MCFG_DEVICE_PROGRAM_MAP(vt220_mem)
MCFG_DEVICE_IO_MAP(vt220_io) MCFG_DEVICE_IO_MAP(vt220_io)
MCFG_MCS51_PORT_P1_IN_CB(NOOP) // ??? MCFG_MCS51_PORT_P1_IN_CB(CONSTANT(0)) // ???
MCFG_DEVICE_ADD("duart", SCN2681, XTAL(3'686'400)) MCFG_DEVICE_ADD("duart", SCN2681, XTAL(3'686'400))
MCFG_MC68681_IRQ_CALLBACK(INPUTLINE("maincpu", MCS51_INT1_LINE)) MCFG_MC68681_IRQ_CALLBACK(INPUTLINE("maincpu", MCS51_INT1_LINE))

View File

@ -5,6 +5,10 @@
Diet Go Go Diet Go Go
*************************************************************************/ *************************************************************************/
#ifndef MAME_INCLUDES_DIETGO_H
#define MAME_INCLUDES_DIETGO_H
#pragma once
#include "cpu/h6280/h6280.h" #include "cpu/h6280/h6280.h"
#include "video/decospr.h" #include "video/decospr.h"
@ -51,3 +55,5 @@ private:
void dietgo_map(address_map &map); void dietgo_map(address_map &map);
void sound_map(address_map &map); void sound_map(address_map &map);
}; };
#endif // MAME_INCLUDES_DIETGO_H

View File

@ -5,6 +5,10 @@
King of Boxer - Ring King King of Boxer - Ring King
*************************************************************************/ *************************************************************************/
#ifndef MAME_INCLUDES_KINGOBOX_H
#define MAME_INCLUDES_KINGOBOX_H
#pragma once
#include "machine/gen_latch.h" #include "machine/gen_latch.h"
#include "machine/input_merger.h" #include "machine/input_merger.h"
@ -13,8 +17,8 @@
class kingofb_state : public driver_device class kingofb_state : public driver_device
{ {
public: public:
kingofb_state(const machine_config &mconfig, device_type type, const char *tag) kingofb_state(const machine_config &mconfig, device_type type, const char *tag) :
: driver_device(mconfig, type, tag), driver_device(mconfig, type, tag),
m_scroll_y(*this, "scroll_y"), m_scroll_y(*this, "scroll_y"),
m_videoram(*this, "videoram"), m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"), m_colorram(*this, "colorram"),
@ -28,7 +32,8 @@ public:
m_nmigate(*this, "nmigate"), m_nmigate(*this, "nmigate"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"), m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch") { } m_soundlatch(*this, "soundlatch")
{ }
/* memory pointers */ /* memory pointers */
required_shared_ptr<uint8_t> m_scroll_y; required_shared_ptr<uint8_t> m_scroll_y;
@ -92,3 +97,5 @@ public:
void ringking_sprite_map(address_map &map); void ringking_sprite_map(address_map &map);
void ringking_video_map(address_map &map); void ringking_video_map(address_map &map);
}; };
#endif // MAME_INCLUDES_KINGOBOX_H

View File

@ -5,6 +5,11 @@
Pocket Gal Deluxe Pocket Gal Deluxe
*************************************************************************/ *************************************************************************/
#ifndef MAME_INCLUDES_PKTGALDX_H
#define MAME_INCLUDES_PKTGALDX_H
#pragma once
#include "sound/okim6295.h" #include "sound/okim6295.h"
#include "video/decospr.h" #include "video/decospr.h"
#include "video/deco16ic.h" #include "video/deco16ic.h"
@ -14,8 +19,8 @@
class pktgaldx_state : public driver_device class pktgaldx_state : public driver_device
{ {
public: public:
pktgaldx_state(const machine_config &mconfig, device_type type, const char *tag) pktgaldx_state(const machine_config &mconfig, device_type type, const char *tag) :
: driver_device(mconfig, type, tag), driver_device(mconfig, type, tag),
m_deco104(*this, "ioprot104"), m_deco104(*this, "ioprot104"),
m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf1_rowscroll(*this, "pf1_rowscroll"),
m_pf2_rowscroll(*this, "pf2_rowscroll"), m_pf2_rowscroll(*this, "pf2_rowscroll"),
@ -28,7 +33,8 @@ public:
m_deco_tilegen1(*this, "tilegen1"), m_deco_tilegen1(*this, "tilegen1"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"), m_palette(*this, "palette"),
m_decrypted_opcodes(*this, "decrypted_opcodes") { } m_decrypted_opcodes(*this, "decrypted_opcodes")
{ }
optional_device<deco104_device> m_deco104; optional_device<deco104_device> m_deco104;
@ -68,3 +74,5 @@ public:
void pktgaldb_map(address_map &map); void pktgaldb_map(address_map &map);
void pktgaldx_map(address_map &map); void pktgaldx_map(address_map &map);
}; };
#endif // MAME_INCLUDES_PKTGALDX_H

View File

@ -1,5 +1,9 @@
// license:BSD-3-Clause // license:BSD-3-Clause
// copyright-holders:David Haywood // copyright-holders:David Haywood
#ifndef MAME_INCLUDES_POKECHMP_H
#define MAME_INCLUDES_POKECHMP_H
#pragma once
#include "machine/gen_latch.h" #include "machine/gen_latch.h"
#include "emupal.h" #include "emupal.h"
@ -7,15 +11,16 @@
class pokechmp_state : public driver_device class pokechmp_state : public driver_device
{ {
public: public:
pokechmp_state(const machine_config &mconfig, device_type type, const char *tag) pokechmp_state(const machine_config &mconfig, device_type type, const char *tag) :
: driver_device(mconfig, type, tag), driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"), m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"), m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"), m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"), m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"), m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"), m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch") { } m_soundlatch(*this, "soundlatch")
{ }
required_shared_ptr<uint8_t> m_videoram; required_shared_ptr<uint8_t> m_videoram;
tilemap_t *m_bg_tilemap; tilemap_t *m_bg_tilemap;
@ -41,3 +46,5 @@ public:
void pokechmp_oki_map(address_map &map); void pokechmp_oki_map(address_map &map);
void pokechmp_sound_map(address_map &map); void pokechmp_sound_map(address_map &map);
}; };
#endif // MAME_INCLUDES_POKECHMP_H

View File

@ -25,7 +25,7 @@
downcast<deco_146_base_device &>(*device).set_interface_scramble(a9,a8,a7,a6,a5,a4,a3,a2,a1,a0); downcast<deco_146_base_device &>(*device).set_interface_scramble(a9,a8,a7,a6,a5,a4,a3,a2,a1,a0);
#define MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE \ #define MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE \
downcast<deco_146_base_device &>(*device).set_interface_scramble(0,1,2,3,4,5,6,7,8,9); downcast<deco_146_base_device &>(*device).set_interface_scramble_reverse();
#define MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE \ #define MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE \
downcast<deco_146_base_device &>(*device).set_interface_scramble_interleave(); downcast<deco_146_base_device &>(*device).set_interface_scramble_interleave();
@ -98,6 +98,7 @@ public:
m_external_addrswap[1] = a1; m_external_addrswap[1] = a1;
m_external_addrswap[0] = a0; m_external_addrswap[0] = a0;
} }
void set_interface_scramble_reverse() { set_interface_scramble(0,1,2,3,4,5,6,7,8,9); }
void set_interface_scramble_interleave() { set_interface_scramble(4, 5, 3, 6, 2, 7, 1, 8, 0, 9); } void set_interface_scramble_interleave() { set_interface_scramble(4, 5, 3, 6, 2, 7, 1, 8, 0, 9); }
void set_use_magic_read_address_xor(bool use_xor) { m_magic_read_address_xor_enabled = use_xor; } void set_use_magic_read_address_xor(bool use_xor) { m_magic_read_address_xor_enabled = use_xor; }