Move device definitions out of the bottom of the file. They can be

declared with other variables at the top.
This commit is contained in:
Aaron Giles 2010-09-19 20:57:20 +00:00
parent 2dd1a7191f
commit 499a0d4161
19 changed files with 128 additions and 52 deletions

View File

@ -45,6 +45,14 @@
#include "asap.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type ASAP = asap_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
//**************************************************************************
@ -1745,7 +1753,3 @@ void asap_device::trapf()
{
generate_exception(EXCEPTION_TRAPF);
}
const device_type ASAP = asap_device_config::static_alloc_device_config;

View File

@ -15,9 +15,17 @@ The timer seems to follow these rules:
#include "6532riot.h"
/***************************************************************************
CONSTANTS
***************************************************************************/
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type RIOT6532 = riot6532_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
//**************************************************************************
enum
{
@ -574,5 +582,3 @@ void riot6532_device::device_reset()
m_timerstate = TIMER_IDLE;
timer_adjust_oneshot(m_timer, attotime_never, 0);
}
const device_type RIOT6532 = riot6532_device_config::static_alloc_device_config;

View File

@ -14,6 +14,13 @@
#define LOG (0)
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type TTL74123 = ttl74123_device_config::static_alloc_device_config;
//**************************************************************************
// DEVICE CONFIGURATION
//**************************************************************************
@ -340,5 +347,3 @@ void ttl74123_device::reset_w()
{
set_output();
}
const device_type TTL74123 = ttl74123_device_config::static_alloc_device_config;

View File

@ -40,6 +40,15 @@
#include "emu.h"
#include "7474.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type MACHINE_TTL7474 = ttl7474_device_config::static_alloc_device_config;
//**************************************************************************
// DEVICE CONFIGURATION
//**************************************************************************
@ -319,5 +328,3 @@ void ttl7474_device::init()
m_last_clock = 1;
m_last_output = -1;
}
const device_type MACHINE_TTL7474 = ttl7474_device_config::static_alloc_device_config;

View File

@ -20,6 +20,7 @@
// GLOBAL VARIABLES
//**************************************************************************
const device_type AT28C16 = at28c16_device_config::static_alloc_device_config;
static ADDRESS_MAP_START( at28c16_map8, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x081f) AM_RAM
@ -333,7 +334,3 @@ TIMER_CALLBACK( at28c16_device::write_finished )
{
reinterpret_cast<at28c16_device *>(ptr)->m_last_write = -1;
}
const device_type AT28C16 = at28c16_device_config::static_alloc_device_config;

View File

@ -24,6 +24,8 @@
// GLOBAL VARIABLES
//**************************************************************************
const device_type EEPROM = eeprom_device_config::static_alloc_device_config;
const eeprom_interface eeprom_interface_93C46 =
{
6, // address bits 6
@ -594,5 +596,3 @@ bool eeprom_device::command_match(const char *buf, const char *cmd, int len)
}
return (*cmd==0);
}
const device_type EEPROM = eeprom_device_config::static_alloc_device_config;

View File

@ -55,6 +55,7 @@ INLINE void ATTR_PRINTF( 3, 4 ) verboselog( running_device *device, int n_level,
// GLOBAL VARIABLES
//**************************************************************************
const device_type I2CMEM = i2cmem_device_config::static_alloc_device_config;
static ADDRESS_MAP_START( i2cmem_map8, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x0fff) AM_RAM
@ -603,5 +604,3 @@ int i2cmem_device::data_offset()
{
return ( ( ( m_devsel << 7 ) & 0xff00 ) | ( m_byteaddr & 0xff ) ) & address_mask();
}
const device_type I2CMEM = i2cmem_device_config::static_alloc_device_config;

View File

@ -14,6 +14,13 @@
#include "mb3773.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type MB3773 = mb3773_device_config::static_alloc_device_config;
//**************************************************************************
// DEVICE CONFIGURATION
@ -151,7 +158,3 @@ TIMER_CALLBACK( mb3773_device::watchdog_timeout )
{
reinterpret_cast<mb3773_device *>(ptr)->m_machine.schedule_soft_reset();
}
const device_type MB3773 = mb3773_device_config::static_alloc_device_config;

View File

@ -26,6 +26,14 @@
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type Z80CTC = z80ctc_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
//**************************************************************************
@ -559,5 +567,3 @@ WRITE_LINE_DEVICE_HANDLER( z80ctc_trg0_w ) { downcast<z80ctc_device *>(device)->
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg1_w ) { downcast<z80ctc_device *>(device)->trigger(1, state); }
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg2_w ) { downcast<z80ctc_device *>(device)->trigger(2, state); }
WRITE_LINE_DEVICE_HANDLER( z80ctc_trg3_w ) { downcast<z80ctc_device *>(device)->trigger(3, state); }
const device_type Z80CTC = z80ctc_device_config::static_alloc_device_config;

View File

@ -43,6 +43,19 @@
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type Z80DART = z80dart_device_config::static_alloc_device_config;
const device_type Z80SIO0 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO1 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO2 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO3 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO4 = z80dart_device_config::static_alloc_device_config; // FIXME
//**************************************************************************
// CONSTANTS
//**************************************************************************
@ -1488,10 +1501,3 @@ WRITE8_DEVICE_HANDLER( z80dart_ba_cd_w )
else
z80dart_d_w(device, channel, data);
}
const device_type Z80DART = z80dart_device_config::static_alloc_device_config;
const device_type Z80SIO0 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO1 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO2 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO3 = z80dart_device_config::static_alloc_device_config; // FIXME
const device_type Z80SIO4 = z80dart_device_config::static_alloc_device_config; // FIXME

View File

@ -27,6 +27,13 @@
#include "cpu/z80/z80daisy.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type Z80DMA = z80dma_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
@ -897,5 +904,3 @@ WRITE8_DEVICE_HANDLER( z80dma_w ) { downcast<z80dma_device *>(device)->write(dat
WRITE_LINE_DEVICE_HANDLER( z80dma_rdy_w ) { downcast<z80dma_device *>(device)->rdy_w(state); }
WRITE_LINE_DEVICE_HANDLER( z80dma_wait_w ) { downcast<z80dma_device *>(device)->wait_w(state); }
WRITE_LINE_DEVICE_HANDLER( z80dma_bai_w ) { downcast<z80dma_device *>(device)->bai_w(state); }
const device_type Z80DMA = z80dma_device_config::static_alloc_device_config;

View File

@ -12,6 +12,13 @@
#include "cpu/z80/z80daisy.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type Z80PIO = z80pio_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
@ -878,5 +885,3 @@ WRITE8_DEVICE_HANDLER( z80pio_ba_cd_w )
BIT(offset, 0) ? z80pio_c_w(device, index, data) : z80pio_d_w(device, index, data);
}
const device_type Z80PIO = z80pio_device_config::static_alloc_device_config;

View File

@ -24,6 +24,14 @@
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type Z80SIO = z80sio_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
//**************************************************************************
@ -898,5 +906,3 @@ WRITE8_DEVICE_HANDLER( z80sio_ba_cd_w )
case 3: z80sio_c_w(device, 1, data); break;
}
}
const device_type Z80SIO = z80sio_device_config::static_alloc_device_config;

View File

@ -34,6 +34,14 @@
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type Z80STI = z80sti_device_config::static_alloc_device_config;
//**************************************************************************
// CONSTANTS
//**************************************************************************
@ -779,5 +787,3 @@ WRITE_LINE_DEVICE_HANDLER( z80sti_i4_w ) { downcast<z80sti_device *>(device)->gp
WRITE_LINE_DEVICE_HANDLER( z80sti_i5_w ) { downcast<z80sti_device *>(device)->gpip_input(5, state); }
WRITE_LINE_DEVICE_HANDLER( z80sti_i6_w ) { downcast<z80sti_device *>(device)->gpip_input(6, state); }
WRITE_LINE_DEVICE_HANDLER( z80sti_i7_w ) { downcast<z80sti_device *>(device)->gpip_input(7, state); }
const device_type Z80STI = z80sti_device_config::static_alloc_device_config;

View File

@ -37,6 +37,14 @@
/***************************************************************************
DEVICE DEFINITIONS
***************************************************************************/
const device_type SPEAKER = speaker_device_config::static_alloc_device_config;
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@ -777,5 +785,3 @@ const char *sound_get_user_gain_name(running_machine *machine, int index)
speaker_device *speaker = index_to_input(machine, index, inputnum);
return (speaker != NULL) ? speaker->input_name(inputnum) : 0;
}
const device_type SPEAKER = speaker_device_config::static_alloc_device_config;

View File

@ -13,10 +13,14 @@
#include "streams.h"
#include "asc.h"
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
const device_type ASC = asc_device_config::static_alloc_device_config;
//**************************************************************************
// DEVICE CONFIGURATION
//**************************************************************************
@ -186,5 +190,3 @@ void asc_device::write(UINT16 offset, UINT8 data)
}
}
const device_type ASC = asc_device_config::static_alloc_device_config;

View File

@ -44,6 +44,9 @@
// GLOBAL VARIABLES
//**************************************************************************
// devices
const device_type OKIM6295 = okim6295_device_config::static_alloc_device_config;
// ADPCM state and tables
bool adpcm_state::s_tables_computed = false;
const INT8 adpcm_state::s_index_shift[8] = { -1, -1, -1, -1, 2, 4, 6, 8 };
@ -542,5 +545,3 @@ void adpcm_state::compute_tables()
}
}
}
const device_type OKIM6295 = okim6295_device_config::static_alloc_device_config;

View File

@ -35,6 +35,14 @@
/***************************************************************************
DEVICE DEFINITIONS
***************************************************************************/
const device_type TIMER = timer_device_config::static_alloc_device_config;
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@ -1265,5 +1273,3 @@ void timer_device::scanline_timer_callback(int scanline)
// adjust the timer
timer_adjust_oneshot(m_timer, m_screen->time_until_pos(next_vpos), 0);
}
const device_type TIMER = timer_device_config::static_alloc_device_config;

View File

@ -71,6 +71,14 @@
/***************************************************************************
DEVICE DEFINITIONS
***************************************************************************/
const device_type SCREEN = screen_device_config::static_alloc_device_config;
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@ -2653,5 +2661,3 @@ void screen_device::finalize_burnin()
#define BILINEAR_FILTER 1
#include "rendersw.c"
const device_type SCREEN = screen_device_config::static_alloc_device_config;