mirror of
https://github.com/holub/mame
synced 2025-05-06 14:25:54 +03:00
Modified way device_type constants are defined in order to get unidasm compile [Miodrag Milanovic]
This commit is contained in:
parent
0a68d1afde
commit
63e8e8fe98
@ -579,3 +579,5 @@ void legacy_cpu_device::state_string_export(const device_state_entry &entry, ast
|
||||
else if (m_string_export != NULL)
|
||||
(*m_string_export)(this, entry, string);
|
||||
}
|
||||
|
||||
const device_type CPU = legacy_cpu_device_config::static_alloc_device_config;
|
||||
|
@ -466,7 +466,7 @@ protected:
|
||||
address_space_config m_space_config[3]; // array of address space configs
|
||||
};
|
||||
|
||||
const device_type CPU = legacy_cpu_device_config::static_alloc_device_config;
|
||||
extern const device_type CPU;
|
||||
|
||||
|
||||
|
||||
|
@ -199,7 +199,7 @@ public: \
|
||||
virtual device_t *alloc_device(running_machine &machine) const; \
|
||||
}; \
|
||||
\
|
||||
const device_type name = configclass::static_alloc_device_config
|
||||
extern const device_type name
|
||||
|
||||
// macro for defining the implementation needed for configuration and device classes
|
||||
#define _DEFINE_LEGACY_DEVICE(name, basename, configclass, deviceclass, baseconfigclass, basedeviceclass) \
|
||||
@ -222,7 +222,8 @@ device_config *configclass::static_alloc_device_config(const machine_config &mco
|
||||
device_t *configclass::alloc_device(running_machine &machine) const \
|
||||
{ \
|
||||
return pool_alloc(machine_get_pool(machine), deviceclass(machine, *this)); \
|
||||
}
|
||||
} \
|
||||
const device_type name = configclass::static_alloc_device_config
|
||||
|
||||
// reduced macros that are easier to use, and map to the above two macros
|
||||
#define DECLARE_LEGACY_DEVICE(name, basename) _DECLARE_LEGACY_DEVICE(name, basename, basename##_device_config, basename##_device, legacy_device_config_base, legacy_device_base)
|
||||
|
@ -572,3 +572,4 @@ 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;
|
||||
|
@ -153,7 +153,7 @@ protected:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type EEPROM = eeprom_device_config::static_alloc_device_config;
|
||||
extern const device_type EEPROM;
|
||||
|
||||
|
||||
|
||||
|
@ -559,3 +559,5 @@ 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;
|
||||
|
@ -155,7 +155,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type Z80CTC = z80ctc_device_config::static_alloc_device_config;
|
||||
extern const device_type Z80CTC;
|
||||
|
||||
|
||||
|
||||
|
@ -1405,3 +1405,5 @@ 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;
|
||||
|
@ -264,7 +264,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type Z80DART = z80dart_device_config::static_alloc_device_config;
|
||||
extern const device_type Z80DART;
|
||||
/*
|
||||
#define Z8470 DEVICE_GET_INFO_NAME(z8470)
|
||||
#define LH0081 DEVICE_GET_INFO_NAME(lh0088)
|
||||
|
@ -898,3 +898,5 @@ 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;
|
||||
|
@ -182,7 +182,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type Z80DMA = z80dma_device_config::static_alloc_device_config;
|
||||
extern const device_type Z80DMA;
|
||||
|
||||
|
||||
|
||||
|
@ -878,3 +878,5 @@ 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;
|
||||
|
@ -204,7 +204,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type Z80PIO = z80pio_device_config::static_alloc_device_config;
|
||||
extern const device_type Z80PIO;
|
||||
|
||||
|
||||
|
||||
|
@ -896,3 +896,5 @@ 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;
|
||||
|
@ -161,7 +161,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type Z80SIO = z80sio_device_config::static_alloc_device_config;
|
||||
extern const device_type Z80SIO;
|
||||
|
||||
|
||||
|
||||
|
@ -779,3 +779,5 @@ 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;
|
||||
|
@ -200,7 +200,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type Z80STI = z80sti_device_config::static_alloc_device_config;
|
||||
extern const device_type Z80STI;
|
||||
|
||||
|
||||
|
||||
|
@ -821,3 +821,5 @@ 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;
|
||||
|
@ -122,7 +122,7 @@ protected:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type SPEAKER = speaker_device_config::static_alloc_device_config;
|
||||
extern const device_type SPEAKER;
|
||||
|
||||
|
||||
|
||||
|
@ -529,3 +529,5 @@ void adpcm_state::compute_tables()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const device_type SOUND_OKIM6295 = okim6295_device_config::static_alloc_device_config;
|
||||
|
@ -168,7 +168,7 @@ protected:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type SOUND_OKIM6295 = okim6295_device_config::static_alloc_device_config;
|
||||
extern const device_type SOUND_OKIM6295;
|
||||
|
||||
|
||||
|
||||
|
@ -1169,3 +1169,5 @@ 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;
|
||||
|
@ -332,7 +332,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type TIMER = timer_device_config::static_alloc_device_config;
|
||||
extern const device_type TIMER;
|
||||
|
||||
|
||||
#endif /* __TIMER_H__ */
|
||||
|
@ -2564,3 +2564,5 @@ void screen_device::finalize_burnin()
|
||||
#define BILINEAR_FILTER 1
|
||||
|
||||
#include "rendersw.c"
|
||||
|
||||
const device_type SCREEN = screen_device_config::static_alloc_device_config;
|
||||
|
@ -269,7 +269,7 @@ private:
|
||||
|
||||
|
||||
// device type definition
|
||||
const device_type SCREEN = screen_device_config::static_alloc_device_config;
|
||||
extern const device_type SCREEN;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user