Allow compiling with shared libraries [O. Galibert]

Put SHLIB=1 in the main makefile, or on the command line.

The idea is to get a *way* faster link with symbols.  It works at
least on linux, with one annoying caveat: you have to be in the
build/projects/sdl/mame/gmake-linux directory to start mame
afterwards.  We're going to move some things around to be able to use
LD_LIBRARY_PATH or have it start as-is from the root.
This commit is contained in:
Olivier Galibert 2015-05-31 13:20:42 +02:00
parent 3a9d6f4b4b
commit 511762fa2d
22 changed files with 134 additions and 98 deletions

View File

@ -393,6 +393,10 @@ ifdef OPTIMIZE
PARAMS += --OPTIMIZE=$(OPTIMIZE)
endif
ifdef SHLIB
PARAMS += --SHLIB=$(SHLIB)
endif
ifdef ARCHOPTS
PARAMS += --ARCHOPTS='$(ARCHOPTS)'
endif

View File

@ -311,6 +311,21 @@ newoption {
}
newoption {
trigger = "SHLIB",
description = "Generate shared libs.",
allowed = {
{ "0", "Static libs" },
{ "1", "Shared libs" },
}
}
if _OPTIONS["SHLIB"]=="1" then
LIBTYPE = "SharedLib"
else
LIBTYPE = "StaticLib"
end
PYTHON = "python"
if _OPTIONS["PYTHON_EXECUTABLE"]~=nil then
@ -743,6 +758,12 @@ if _OPTIONS["OPTIMIZE"] then
end
end
if _OPTIONS["SHLIB"] then
buildoptions {
"-fPIC"
}
end
if _OPTIONS["SSE2"]=="1" then
buildoptions {
"-msse2",

View File

@ -2,8 +2,9 @@
-- copyright-holders:MAMEdev Team
project ("emu")
targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
uuid ("e6fa15e4-a354-4526-acef-13c8e80fcacf")
kind "StaticLib"
kind (LIBTYPE)
options {
"ForceCPP",
}
@ -358,7 +359,7 @@ function emuProject(_target, _subtarget)
project ("optional")
uuid (os.uuid("optional-" .. _target .."_" .. _subtarget))
kind "StaticLib"
kind (LIBTYPE)
targetsubdir(_target .."_" .. _subtarget)
options {
"ForceCPP",
@ -397,7 +398,7 @@ function emuProject(_target, _subtarget)
project ("bus")
uuid ("5d782c89-cf7e-4cfe-8f9f-0d4bfc16c91d")
kind "StaticLib"
kind (LIBTYPE)
targetsubdir(_target .."_" .. _subtarget)
options {
"ForceCPP",
@ -428,7 +429,7 @@ function emuProject(_target, _subtarget)
project ("dasm")
uuid ("f2d28b0a-6da5-4f78-b629-d834aa00429d")
kind "StaticLib"
kind (LIBTYPE)
targetsubdir(_target .."_" .. _subtarget)
options {
"ForceCPP",

View File

@ -2,8 +2,9 @@
-- copyright-holders:MAMEdev Team
project "utils"
targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
uuid "22489ad0-4cb2-4d91-ad81-24b0d80ca30a"
kind "StaticLib"
kind (LIBTYPE)
options {
"ForceCPP",
@ -94,8 +95,9 @@ project "utils"
project "formats"
targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
uuid "f69636b1-fcce-45ce-b09a-113e371a2d7a"
kind "StaticLib"
kind (LIBTYPE)
options {
"ForceCPP",

View File

@ -7,7 +7,7 @@ end
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
kind "StaticLib"
kind (LIBTYPE)
removeflags {
"SingleOutputDir",
@ -54,7 +54,7 @@ project ("osd_" .. _OPTIONS["osd"])
project ("ocore_" .. _OPTIONS["osd"])
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
kind "StaticLib"
kind (LIBTYPE)
options {
"ForceCPP",

View File

@ -293,8 +293,9 @@ end
project ("osd_" .. _OPTIONS["osd"])
targetsubdir(_OPTIONS["target"] .."_" .._OPTIONS["subtarget"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
kind "StaticLib"
kind (LIBTYPE)
dofile("sdl_cfg.lua")
osdmodulesbuild()
@ -361,8 +362,9 @@ project ("osd_" .. _OPTIONS["osd"])
project ("ocore_" .. _OPTIONS["osd"])
targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
kind "StaticLib"
kind (LIBTYPE)
options {
"ForceCPP",

View File

@ -90,7 +90,7 @@ end
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
kind "StaticLib"
kind (LIBTYPE)
dofile("windows_cfg.lua")
osdmodulesbuild()
@ -153,7 +153,7 @@ project ("osd_" .. _OPTIONS["osd"])
project ("ocore_" .. _OPTIONS["osd"])
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
kind "StaticLib"
kind (LIBTYPE)
options {
"ForceCPP",

View File

@ -54,7 +54,7 @@ BUSES["MIDI"] = true
function createProjects_ldplayer_ldplayer(_target, _subtarget)
project ("drvldplayer")
targetsubdir(_target .."_" .. _subtarget)
kind "StaticLib"
kind (LIBTYPE)
uuid (os.uuid("drvldplayer"))
options {

View File

@ -760,7 +760,7 @@ end
function createMAMEProjects(_target, _subtarget, _name)
project (_name)
targetsubdir(_target .."_" .. _subtarget)
kind "StaticLib"
kind (LIBTYPE)
uuid (os.uuid("drv-" .. _target .."_" .. _subtarget .. "_" .._name))
options {

View File

@ -15,7 +15,7 @@ dofile("mess.lua")
function createProjects_mame_dummy(_target, _subtarget)
project ("mame_dummy")
targetsubdir(_target .."_" .. _subtarget)
kind "StaticLib"
kind (LIBTYPE)
uuid (os.uuid("drv-mame_dummy"))
options {

View File

@ -859,7 +859,7 @@ end
function createMESSProjects(_target, _subtarget, _name)
project (_name)
targetsubdir(_target .."_" .. _subtarget)
kind "StaticLib"
kind (LIBTYPE)
uuid (os.uuid("drv-" .. _target .."_" .. _subtarget .. "_" .._name))
options {

View File

@ -78,7 +78,7 @@ BUSES["CENTRONICS"] = true
function createProjects_mame_tiny(_target, _subtarget)
project ("mame_tiny")
targetsubdir(_target .."_" .. _subtarget)
kind "StaticLib"
kind (LIBTYPE)
uuid (os.uuid("drv-mame-tiny"))
options {

View File

@ -313,7 +313,7 @@ offs_t hd6309_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *o
// read_operand
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand()
inline UINT8 hd6309_device::read_operand()
{
switch(m_addressing_mode)
{
@ -332,7 +332,7 @@ ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand()
// read_operand
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand(int ordinal)
inline UINT8 hd6309_device::read_operand(int ordinal)
{
switch(m_addressing_mode)
{
@ -356,7 +356,7 @@ ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand(int ordinal)
// write_operand
//-------------------------------------------------
ATTR_FORCE_INLINE void hd6309_device::write_operand(UINT8 data)
inline void hd6309_device::write_operand(UINT8 data)
{
switch(m_addressing_mode)
{
@ -375,7 +375,7 @@ ATTR_FORCE_INLINE void hd6309_device::write_operand(UINT8 data)
// write_operand
//-------------------------------------------------
ATTR_FORCE_INLINE void hd6309_device::write_operand(int ordinal, UINT8 data)
inline void hd6309_device::write_operand(int ordinal, UINT8 data)
{
switch(m_addressing_mode)
{
@ -398,7 +398,7 @@ ATTR_FORCE_INLINE void hd6309_device::write_operand(int ordinal, UINT8 data)
// bittest_register
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 &hd6309_device::bittest_register()
inline UINT8 &hd6309_device::bittest_register()
{
switch(m_temp_im & 0xC0)
{
@ -414,7 +414,7 @@ ATTR_FORCE_INLINE UINT8 &hd6309_device::bittest_register()
// bittest_source
//-------------------------------------------------
ATTR_FORCE_INLINE bool hd6309_device::bittest_source()
inline bool hd6309_device::bittest_source()
{
return (m_temp.b.l & (1 << ((m_temp_im >> 3) & 0x07))) ? true : false;
}
@ -424,7 +424,7 @@ ATTR_FORCE_INLINE bool hd6309_device::bittest_source()
// bittest_dest
//-------------------------------------------------
ATTR_FORCE_INLINE bool hd6309_device::bittest_dest()
inline bool hd6309_device::bittest_dest()
{
return (bittest_register() & (1 << ((m_temp_im >> 0) & 0x07))) ? true : false;
}
@ -434,7 +434,7 @@ ATTR_FORCE_INLINE bool hd6309_device::bittest_dest()
// bittest_set
//-------------------------------------------------
ATTR_FORCE_INLINE void hd6309_device::bittest_set(bool result)
inline void hd6309_device::bittest_set(bool result)
{
if (result)
bittest_register() |= (1 << ((m_temp_im >> 0) & 0x07));
@ -448,7 +448,7 @@ ATTR_FORCE_INLINE void hd6309_device::bittest_set(bool result)
// read_exgtfr_register
//-------------------------------------------------
ATTR_FORCE_INLINE m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg)
inline m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg)
{
UINT16 value = 0;
@ -486,7 +486,7 @@ ATTR_FORCE_INLINE m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_
// write_exgtfr_register
//-------------------------------------------------
ATTR_FORCE_INLINE void hd6309_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
inline void hd6309_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
{
switch(reg & 0x0F)
{
@ -517,7 +517,7 @@ ATTR_FORCE_INLINE void hd6309_device::write_exgtfr_register(UINT8 reg, m6809_bas
// tfr_read
//-------------------------------------------------
ATTR_FORCE_INLINE bool hd6309_device::tfr_read(UINT8 opcode, UINT8 arg, UINT8 &data)
inline bool hd6309_device::tfr_read(UINT8 opcode, UINT8 arg, UINT8 &data)
{
PAIR16 *reg;
@ -550,7 +550,7 @@ ATTR_FORCE_INLINE bool hd6309_device::tfr_read(UINT8 opcode, UINT8 arg, UINT8 &d
// tfr_write
//-------------------------------------------------
ATTR_FORCE_INLINE bool hd6309_device::tfr_write(UINT8 opcode, UINT8 arg, UINT8 data)
inline bool hd6309_device::tfr_write(UINT8 opcode, UINT8 arg, UINT8 data)
{
PAIR16 *reg;
@ -789,7 +789,7 @@ bool hd6309_device::divd()
// execute_one - try to execute a single instruction
//-------------------------------------------------
ATTR_FORCE_INLINE void hd6309_device::execute_one()
inline void hd6309_device::execute_one()
{
switch(pop_state())
{

View File

@ -120,7 +120,7 @@ offs_t konami_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT
// read_operand
//-------------------------------------------------
inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand()
inline UINT8 konami_cpu_device::read_operand()
{
return super::read_operand();
}
@ -130,7 +130,7 @@ inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand()
// read_operand
//-------------------------------------------------
inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand(int ordinal)
inline UINT8 konami_cpu_device::read_operand(int ordinal)
{
switch(m_addressing_mode)
{
@ -146,7 +146,7 @@ inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand(int ordinal)
// write_operand
//-------------------------------------------------
ATTR_FORCE_INLINE void konami_cpu_device::write_operand(UINT8 data)
inline void konami_cpu_device::write_operand(UINT8 data)
{
super::write_operand(data);
}
@ -157,7 +157,7 @@ ATTR_FORCE_INLINE void konami_cpu_device::write_operand(UINT8 data)
// write_operand
//-------------------------------------------------
ATTR_FORCE_INLINE void konami_cpu_device::write_operand(int ordinal, UINT8 data)
inline void konami_cpu_device::write_operand(int ordinal, UINT8 data)
{
switch(m_addressing_mode)
{
@ -173,7 +173,7 @@ ATTR_FORCE_INLINE void konami_cpu_device::write_operand(int ordinal, UINT8 data)
// ireg
//-------------------------------------------------
ATTR_FORCE_INLINE UINT16 &konami_cpu_device::ireg()
inline UINT16 &konami_cpu_device::ireg()
{
switch(m_opcode & 0x70)
{
@ -194,7 +194,7 @@ ATTR_FORCE_INLINE UINT16 &konami_cpu_device::ireg()
// read_exgtfr_register
//-------------------------------------------------
ATTR_FORCE_INLINE m6809_base_device::exgtfr_register konami_cpu_device::read_exgtfr_register(UINT8 reg)
inline m6809_base_device::exgtfr_register konami_cpu_device::read_exgtfr_register(UINT8 reg)
{
exgtfr_register result;
result.word_value = 0x00FF;
@ -217,7 +217,7 @@ ATTR_FORCE_INLINE m6809_base_device::exgtfr_register konami_cpu_device::read_exg
// write_exgtfr_register
//-------------------------------------------------
ATTR_FORCE_INLINE void konami_cpu_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
inline void konami_cpu_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
{
switch(reg & 0x07)
{
@ -287,7 +287,7 @@ template<class T> T konami_cpu_device::safe_shift_left(T value, UINT32 shift)
// lmul
//-------------------------------------------------
ATTR_FORCE_INLINE void konami_cpu_device::lmul()
inline void konami_cpu_device::lmul()
{
PAIR result;
@ -313,7 +313,7 @@ ATTR_FORCE_INLINE void konami_cpu_device::lmul()
// divx
//-------------------------------------------------
ATTR_FORCE_INLINE void konami_cpu_device::divx()
inline void konami_cpu_device::divx()
{
UINT16 result;
UINT8 remainder;
@ -357,7 +357,7 @@ void konami_cpu_device::set_lines(UINT8 data)
// execute_one - try to execute a single instruction
//-------------------------------------------------
ATTR_FORCE_INLINE void konami_cpu_device::execute_one()
inline void konami_cpu_device::execute_one()
{
switch(pop_state())
{

View File

@ -456,7 +456,7 @@ const char *m6809_base_device::inputnum_string(int inputnum)
// read_exgtfr_register
//-------------------------------------------------
ATTR_FORCE_INLINE m6809_base_device::exgtfr_register m6809_base_device::read_exgtfr_register(UINT8 reg)
m6809_base_device::exgtfr_register m6809_base_device::read_exgtfr_register(UINT8 reg)
{
exgtfr_register result;
result.byte_value = 0xFF;
@ -483,7 +483,7 @@ ATTR_FORCE_INLINE m6809_base_device::exgtfr_register m6809_base_device::read_exg
// write_exgtfr_register
//-------------------------------------------------
ATTR_FORCE_INLINE void m6809_base_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
void m6809_base_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value)
{
switch(reg & 0x0F)
{
@ -516,7 +516,7 @@ void m6809_base_device::log_illegal()
// execute_one - try to execute a single instruction
//-------------------------------------------------
ATTR_FORCE_INLINE void m6809_base_device::execute_one()
void m6809_base_device::execute_one()
{
switch(pop_state())
{

View File

@ -147,27 +147,27 @@ protected:
devcb_write_line m_lic_func; // LIC pin on the 6809E
// eat cycles
ATTR_FORCE_INLINE void eat(int cycles) { m_icount -= cycles; }
inline void eat(int cycles) { m_icount -= cycles; }
void eat_remaining();
// read a byte from given memory location
ATTR_FORCE_INLINE UINT8 read_memory(UINT16 address) { eat(1); return m_addrspace[AS_PROGRAM]->read_byte(address); }
inline UINT8 read_memory(UINT16 address) { eat(1); return m_addrspace[AS_PROGRAM]->read_byte(address); }
// write a byte to given memory location
ATTR_FORCE_INLINE void write_memory(UINT16 address, UINT8 data) { eat(1); m_addrspace[AS_PROGRAM]->write_byte(address, data); }
inline void write_memory(UINT16 address, UINT8 data) { eat(1); m_addrspace[AS_PROGRAM]->write_byte(address, data); }
// read_opcode() is like read_memory() except it is used for reading opcodes. In the case of a system
// with memory mapped I/O, this function can be used to greatly speed up emulation.
ATTR_FORCE_INLINE UINT8 read_opcode(UINT16 address) { eat(1); return m_direct->read_decrypted_byte(address); }
inline UINT8 read_opcode(UINT16 address) { eat(1); return m_direct->read_decrypted_byte(address); }
// read_opcode_arg() is identical to read_opcode() except it is used for reading opcode arguments. This
// difference can be used to support systems that use different encoding mechanisms for opcodes
// and opcode arguments.
ATTR_FORCE_INLINE UINT8 read_opcode_arg(UINT16 address) { eat(1); return m_direct->read_raw_byte(address); }
inline UINT8 read_opcode_arg(UINT16 address) { eat(1); return m_direct->read_raw_byte(address); }
// read_opcode() and bump the program counter
ATTR_FORCE_INLINE UINT8 read_opcode() { return read_opcode(m_pc.w++); }
ATTR_FORCE_INLINE UINT8 read_opcode_arg() { return read_opcode_arg(m_pc.w++); }
inline UINT8 read_opcode() { return read_opcode(m_pc.w++); }
inline UINT8 read_opcode_arg() { return read_opcode_arg(m_pc.w++); }
// state stack - implemented as a UINT32
void push_state(UINT8 state) { m_state = (m_state << 8) | state; }
@ -219,15 +219,15 @@ protected:
template<class T> T set_flags(UINT8 mask, T r);
// branch conditions
ATTR_FORCE_INLINE bool cond_hi() { return !(m_cc & CC_ZC); } // BHI/BLS
ATTR_FORCE_INLINE bool cond_cc() { return !(m_cc & CC_C); } // BCC/BCS
ATTR_FORCE_INLINE bool cond_ne() { return !(m_cc & CC_Z); } // BNE/BEQ
ATTR_FORCE_INLINE bool cond_vc() { return !(m_cc & CC_V); } // BVC/BVS
ATTR_FORCE_INLINE bool cond_pl() { return !(m_cc & CC_N); } // BPL/BMI
ATTR_FORCE_INLINE bool cond_ge() { return (m_cc & CC_N ? true : false) == (m_cc & CC_V ? true : false); } // BGE/BLT
ATTR_FORCE_INLINE bool cond_gt() { return cond_ge() && !(m_cc & CC_Z); } // BGT/BLE
ATTR_FORCE_INLINE void set_cond(bool cond) { m_cond = cond; }
ATTR_FORCE_INLINE bool branch_taken() { return m_cond; }
inline bool cond_hi() { return !(m_cc & CC_ZC); } // BHI/BLS
inline bool cond_cc() { return !(m_cc & CC_C); } // BCC/BCS
inline bool cond_ne() { return !(m_cc & CC_Z); } // BNE/BEQ
inline bool cond_vc() { return !(m_cc & CC_V); } // BVC/BVS
inline bool cond_pl() { return !(m_cc & CC_N); } // BPL/BMI
inline bool cond_ge() { return (m_cc & CC_N ? true : false) == (m_cc & CC_V ? true : false); } // BGE/BLT
inline bool cond_gt() { return cond_ge() && !(m_cc & CC_Z); } // BGT/BLE
inline void set_cond(bool cond) { m_cond = cond; }
inline bool branch_taken() { return m_cond; }
// interrupt registers
bool firq_saves_entire_state() { return false; }
@ -235,8 +235,8 @@ protected:
UINT16 entire_state_registers() { return 0xFF; }
// miscellaneous
exgtfr_register read_exgtfr_register(UINT8 reg);
void write_exgtfr_register(UINT8 reg, exgtfr_register value);
inline exgtfr_register read_exgtfr_register(UINT8 reg);
inline void write_exgtfr_register(UINT8 reg, exgtfr_register value);
bool is_register_addressing_mode();
bool is_ea_addressing_mode() { return m_addressing_mode == ADDRESSING_MODE_EA; }
UINT16 get_pending_interrupt();
@ -255,7 +255,7 @@ private:
int m_clock_divider;
// functions
void execute_one();
inline void execute_one();
const char *inputnum_string(int inputnum);
};

View File

@ -69,4 +69,8 @@ UINT16 i8xc196_device::io_r16(UINT8 adr)
return data;
}
void i8xc196_device::do_exec_partial()
{
}
#include "cpu/mcs96/i8xc196.inc"

View File

@ -23,7 +23,6 @@ public:
virtual void do_exec_full();
virtual void do_exec_partial();
virtual void next(int cycles);
virtual void io_w8(UINT8 adr, UINT8 data);
virtual void io_w16(UINT8 adr, UINT16 data);
virtual UINT8 io_r8(UINT8 adr);

View File

@ -57,6 +57,15 @@
#include "pic16c62x.h"
const device_type PIC16C620 = &device_creator<pic16c620_device>;
const device_type PIC16C620A = &device_creator<pic16c620a_device>;
const device_type PIC16C621 = &device_creator<pic16c621_device>;
const device_type PIC16C621A = &device_creator<pic16c621a_device>;
const device_type PIC16C622 = &device_creator<pic16c622_device>;
const device_type PIC16C622A = &device_creator<pic16c622a_device>;
/****************************************************************************
* Internal Memory Map
****************************************************************************/

View File

@ -23,8 +23,6 @@ const device_type MPCC68561 = &device_creator<mpcc68561_t>;
#define LOG_MPCC (1)
#if 0 // future
/***************************************************************************
IMPLEMENTATION
***************************************************************************/
@ -481,7 +479,3 @@ WRITE8_MEMBER( mpcc68561_t::reg_w )
break;
}
}
#else
#endif

View File

@ -150,7 +150,7 @@ mc6847_friend_device::mc6847_friend_device(const machine_config &mconfig, device
// to the clock
//-------------------------------------------------
ATTR_FORCE_INLINE emu_timer *mc6847_friend_device::setup_timer(device_timer_id id, double offset, double period)
inline emu_timer *mc6847_friend_device::setup_timer(device_timer_id id, double offset, double period)
{
emu_timer *timer = timer_alloc(id);
timer->adjust(
@ -228,7 +228,7 @@ void mc6847_friend_device::device_post_load(void)
// update_field_sync_timer
//-------------------------------------------------
ATTR_FORCE_INLINE void mc6847_friend_device::update_field_sync_timer(void)
void mc6847_friend_device::update_field_sync_timer(void)
{
// are we expecting field sync?
bool expected_field_sync = (m_physical_scanline < m_field_sync_falling_edge_scanline)
@ -268,7 +268,7 @@ void mc6847_friend_device::device_timer(emu_timer &timer, device_timer_id id, in
// new_frame
//-------------------------------------------------
ATTR_FORCE_INLINE void mc6847_friend_device::new_frame(void)
inline void mc6847_friend_device::new_frame(void)
{
m_physical_scanline = 0;
m_logical_scanline = 0;
@ -304,7 +304,7 @@ const char *mc6847_friend_device::scanline_zone_string(scanline_zone zone)
// change_horizontal_sync
//-------------------------------------------------
ATTR_FORCE_INLINE void mc6847_friend_device::change_horizontal_sync(bool line)
inline void mc6847_friend_device::change_horizontal_sync(bool line)
{
g_profiler.start(PROFILER_USER1);
@ -372,7 +372,7 @@ ATTR_FORCE_INLINE void mc6847_friend_device::change_horizontal_sync(bool line)
// change_field_sync
//-------------------------------------------------
ATTR_FORCE_INLINE void mc6847_friend_device::change_field_sync(bool line)
inline void mc6847_friend_device::change_field_sync(bool line)
{
/* output field sync */
if (line != m_field_sync)
@ -397,7 +397,7 @@ ATTR_FORCE_INLINE void mc6847_friend_device::change_field_sync(bool line)
// next_scanline
//-------------------------------------------------
ATTR_FORCE_INLINE void mc6847_friend_device::next_scanline(void)
inline void mc6847_friend_device::next_scanline(void)
{
/* advance to next scanline */
m_physical_scanline++;
@ -678,7 +678,7 @@ void mc6847_base_device::record_scanline_res(int scanline, INT32 start_pos, INT3
// record_body_scanline
//-------------------------------------------------
ATTR_FORCE_INLINE void mc6847_base_device::record_body_scanline(UINT16 physical_scanline, UINT16 scanline, INT32 start_pos, INT32 end_pos)
inline void mc6847_base_device::record_body_scanline(UINT16 physical_scanline, UINT16 scanline, INT32 start_pos, INT32 end_pos)
{
// sanity checks
assert(scanline < 192);
@ -780,7 +780,7 @@ void mc6847_base_device::field_sync_changed(bool line)
// border_value
//-------------------------------------------------
ATTR_FORCE_INLINE mc6847_base_device::pixel_t mc6847_base_device::border_value(UINT8 mode, const pixel_t *palette, bool is_mc6847t1)
inline mc6847_base_device::pixel_t mc6847_base_device::border_value(UINT8 mode, const pixel_t *palette, bool is_mc6847t1)
{
pixel_t result;
switch(mc6847_friend_device::border_value(mode, is_mc6847t1))

View File

@ -201,7 +201,7 @@ void gime_base_device::device_start(void)
// get_composite_color
//-------------------------------------------------
ATTR_FORCE_INLINE gime_base_device::pixel_t gime_base_device::get_composite_color(int color)
inline gime_base_device::pixel_t gime_base_device::get_composite_color(int color)
{
/* CMP colors
*
@ -313,7 +313,7 @@ ATTR_FORCE_INLINE gime_base_device::pixel_t gime_base_device::get_composite_colo
// get_rgb_color
//-------------------------------------------------
ATTR_FORCE_INLINE gime_base_device::pixel_t gime_base_device::get_rgb_color(int color)
inline gime_base_device::pixel_t gime_base_device::get_rgb_color(int color)
{
return (((color >> 4) & 2) | ((color >> 2) & 1)) * 0x550000
| (((color >> 3) & 2) | ((color >> 1) & 1)) * 0x005500
@ -543,7 +543,7 @@ void gime_base_device::reset_timer(void)
// update_memory
//-------------------------------------------------
ATTR_FORCE_INLINE void gime_base_device::update_memory(void)
inline void gime_base_device::update_memory(void)
{
for (int bank = 0; bank <= 8; bank++)
{
@ -701,7 +701,7 @@ UINT8 gime_base_device::read(offs_t offset)
// read_gime_register
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 gime_base_device::read_gime_register(offs_t offset)
inline UINT8 gime_base_device::read_gime_register(offs_t offset)
{
offset &= 0x0F;
@ -746,7 +746,7 @@ ATTR_FORCE_INLINE UINT8 gime_base_device::read_gime_register(offs_t offset)
// read_mmu_register
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 gime_base_device::read_mmu_register(offs_t offset)
inline UINT8 gime_base_device::read_mmu_register(offs_t offset)
{
return (m_mmu[offset & 0x0F] & 0x3F) | (read_floating_bus() & 0xC0);
}
@ -757,7 +757,7 @@ ATTR_FORCE_INLINE UINT8 gime_base_device::read_mmu_register(offs_t offset)
// read_palette_register
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 gime_base_device::read_palette_register(offs_t offset)
inline UINT8 gime_base_device::read_palette_register(offs_t offset)
{
// Bits 7/6 are floating, and behave oddly. On a real CoCo 3
//
@ -775,7 +775,7 @@ ATTR_FORCE_INLINE UINT8 gime_base_device::read_palette_register(offs_t offset)
// read_floating_bus
//-------------------------------------------------
ATTR_FORCE_INLINE UINT8 gime_base_device::read_floating_bus(void)
inline UINT8 gime_base_device::read_floating_bus(void)
{
return m_read_floating_bus(0);
}
@ -815,7 +815,7 @@ void gime_base_device::write(offs_t offset, UINT8 data)
// write_gime_register
//-------------------------------------------------
ATTR_FORCE_INLINE void gime_base_device::write_gime_register(offs_t offset, UINT8 data)
inline void gime_base_device::write_gime_register(offs_t offset, UINT8 data)
{
// this is needed for writes to FF95
bool timer_was_off = (m_gime_registers[0x04] == 0x00) && (m_gime_registers[0x05] == 0x00);
@ -1018,7 +1018,7 @@ ATTR_FORCE_INLINE void gime_base_device::write_gime_register(offs_t offset, UINT
// write_mmu_register
//-------------------------------------------------
ATTR_FORCE_INLINE void gime_base_device::write_mmu_register(offs_t offset, UINT8 data)
inline void gime_base_device::write_mmu_register(offs_t offset, UINT8 data)
{
offset &= 0x0F;
@ -1038,7 +1038,7 @@ ATTR_FORCE_INLINE void gime_base_device::write_mmu_register(offs_t offset, UINT8
// write_palette_register
//-------------------------------------------------
ATTR_FORCE_INLINE void gime_base_device::write_palette_register(offs_t offset, UINT8 data)
inline void gime_base_device::write_palette_register(offs_t offset, UINT8 data)
{
offset &= 0x0F;
@ -1071,7 +1071,7 @@ ATTR_FORCE_INLINE void gime_base_device::write_palette_register(offs_t offset, U
// write_sam_register
//-------------------------------------------------
ATTR_FORCE_INLINE void gime_base_device::write_sam_register(offs_t offset)
inline void gime_base_device::write_sam_register(offs_t offset)
{
/* change the SAM state */
UINT16 xorval = alter_sam_state(offset);
@ -1145,7 +1145,7 @@ void gime_base_device::recalculate_firq(void)
// John Kowalski confirms this behavior
//-------------------------------------------------
ATTR_FORCE_INLINE offs_t gime_base_device::get_video_base(void)
inline offs_t gime_base_device::get_video_base(void)
{
offs_t result;
UINT8 ff9d_mask, ff9e_mask;
@ -1282,7 +1282,7 @@ void gime_base_device::record_border_scanline(UINT16 physical_scanline)
// get_lines_per_row
//-------------------------------------------------
ATTR_FORCE_INLINE UINT16 gime_base_device::get_lines_per_row(void)
inline UINT16 gime_base_device::get_lines_per_row(void)
{
UINT16 lines_per_row;
if (m_legacy_video)
@ -1361,7 +1361,7 @@ ATTR_FORCE_INLINE UINT16 gime_base_device::get_lines_per_row(void)
//-------------------------------------------------
template<UINT8 xres, gime_base_device::get_data_func get_data, bool record_mode>
ATTR_FORCE_INLINE UINT32 gime_base_device::record_scanline_res(int scanline)
inline UINT32 gime_base_device::record_scanline_res(int scanline)
{
int column;
UINT32 base_offset = m_legacy_video ? 0 : (m_gime_registers[0x0F] & 0x7F) * 2;
@ -1639,7 +1639,7 @@ UINT32 gime_base_device::emit_dummy_samples(const scanline_record *scanline, int
// emit_mc6847_samples
//-------------------------------------------------
ATTR_FORCE_INLINE UINT32 gime_base_device::emit_mc6847_samples(const scanline_record *scanline, int sample_start, int sample_count, pixel_t *pixels, const pixel_t *palette)
inline UINT32 gime_base_device::emit_mc6847_samples(const scanline_record *scanline, int sample_start, int sample_count, pixel_t *pixels, const pixel_t *palette)
{
return super::emit_mc6847_samples<2>(
scanline->m_mode[sample_start],
@ -1659,7 +1659,7 @@ ATTR_FORCE_INLINE UINT32 gime_base_device::emit_mc6847_samples(const scanline_re
//-------------------------------------------------
template<int xscale, int bits_per_pixel>
ATTR_FORCE_INLINE UINT32 gime_base_device::emit_gime_graphics_samples(const scanline_record *scanline, int sample_start, int sample_count, pixel_t *pixels, const pixel_t *palette)
inline UINT32 gime_base_device::emit_gime_graphics_samples(const scanline_record *scanline, int sample_start, int sample_count, pixel_t *pixels, const pixel_t *palette)
{
const UINT8 *data = &scanline->m_data[sample_start];
mc6847_friend_device::emit_graphics<bits_per_pixel, xscale>(data, sample_count, pixels, 0, palette);
@ -1673,7 +1673,7 @@ ATTR_FORCE_INLINE UINT32 gime_base_device::emit_gime_graphics_samples(const scan
//-------------------------------------------------
template<int xscale>
ATTR_FORCE_INLINE UINT32 gime_base_device::emit_gime_text_samples(const scanline_record *scanline, int sample_start, int sample_count, pixel_t *pixels, const pixel_t *palette)
inline UINT32 gime_base_device::emit_gime_text_samples(const scanline_record *scanline, int sample_start, int sample_count, pixel_t *pixels, const pixel_t *palette)
{
UINT8 attribute = scanline->m_mode[sample_start];
const UINT8 *data = &scanline->m_data[sample_start];
@ -1733,7 +1733,7 @@ ATTR_FORCE_INLINE UINT32 gime_base_device::emit_gime_text_samples(const scanline
//-------------------------------------------------
template<int sample_count, gime_base_device::emit_samples_proc emit_samples>
ATTR_FORCE_INLINE void gime_base_device::render_scanline(const scanline_record *scanline, pixel_t *pixels, int min_x, int max_x, palette_resolver *resolver)
inline void gime_base_device::render_scanline(const scanline_record *scanline, pixel_t *pixels, int min_x, int max_x, palette_resolver *resolver)
{
int left_border, right_border;
int x, x2, pixel_position;
@ -1934,7 +1934,7 @@ bool gime_base_device::update_rgb(bitmap_rgb32 &bitmap, const rectangle &cliprec
// palette_resolver::palette_resolver
//-------------------------------------------------
ATTR_FORCE_INLINE gime_base_device::palette_resolver::palette_resolver(gime_base_device *gime, const pixel_t *palette)
inline gime_base_device::palette_resolver::palette_resolver(gime_base_device *gime, const pixel_t *palette)
{
m_gime = gime;
m_palette = palette;
@ -1948,7 +1948,7 @@ ATTR_FORCE_INLINE gime_base_device::palette_resolver::palette_resolver(gime_base
// palette_resolver::get_palette
//-------------------------------------------------
ATTR_FORCE_INLINE const gime_base_device::pixel_t *gime_base_device::palette_resolver::get_palette(UINT16 palette_rotation)
inline const gime_base_device::pixel_t *gime_base_device::palette_resolver::get_palette(UINT16 palette_rotation)
{
if (UNEXPECTED(m_current_resolved_palette != palette_rotation))
{
@ -1965,7 +1965,7 @@ ATTR_FORCE_INLINE const gime_base_device::pixel_t *gime_base_device::palette_res
// palette_resolver::lookup
//-------------------------------------------------
ATTR_FORCE_INLINE gime_base_device::pixel_t gime_base_device::palette_resolver::lookup(UINT8 color)
inline gime_base_device::pixel_t gime_base_device::palette_resolver::lookup(UINT8 color)
{
assert(color <= 63);
return m_palette[color];