mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
nmk16spr, superfx, makedep: misc cleanup (nw)
This commit is contained in:
parent
8a280aba9c
commit
56b000344e
@ -432,6 +432,7 @@ class DriverFilter(object):
|
||||
sys.stderr.write('%s:%s: Invalid character in driver name "%s"\n' % (p, parser.input_line, text))
|
||||
sys.exit(1)
|
||||
includes.add(text)
|
||||
excludes.discard(text)
|
||||
elif text.startswith('-'):
|
||||
text = text[1:].lstrip()
|
||||
if not text:
|
||||
@ -440,6 +441,7 @@ class DriverFilter(object):
|
||||
elif not all(x in self.DRIVER_CHARS for x in text):
|
||||
sys.stderr.write('%s:%s: Invalid character in driver name "%s"\n' % (p, parser.input_line, text))
|
||||
sys.exit(1)
|
||||
includes.discard(text)
|
||||
excludes.add(text)
|
||||
elif text:
|
||||
sources.add(text)
|
||||
@ -473,7 +475,7 @@ class DriverFilter(object):
|
||||
do_parse(path)
|
||||
sys.stderr.write('%d source file(s) found\n' % (len(sources), ))
|
||||
self.sources = frozenset(sources)
|
||||
self.includes = frozenset(includes - excludes)
|
||||
self.includes = frozenset(includes)
|
||||
self.excludes = frozenset(excludes)
|
||||
|
||||
def parse_list(self, path):
|
||||
|
@ -8,9 +8,8 @@
|
||||
DEFINE_DEVICE_TYPE(SUPERFX1, superfx1_device, "superfx1", "Nintendo SuperFX 1")
|
||||
DEFINE_DEVICE_TYPE(SUPERFX2, superfx2_device, "superfx2", "Nintendo SuperFX 2")
|
||||
|
||||
superfx_device::superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpi)
|
||||
superfx_device::superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: cpu_device(mconfig, type, tag, owner, clock)
|
||||
, m_cycles_per_insn(cpi)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, 8, 32, 0)
|
||||
, m_out_irq_func(*this), m_pipeline(0), m_ramaddr(0), m_sfr(0), m_pbr(0), m_rombr(0), m_rambr(0), m_cbr(0), m_scbr(0), m_scmr(0), m_colr(0), m_por(0)
|
||||
, m_bramr(0), m_vcr(0), m_cfgr(0), m_clsr(0), m_romcl(0), m_romdr(0), m_ramcl(0), m_ramar(0), m_ramdr(0), m_sreg(nullptr), m_sreg_idx(0), m_dreg(nullptr)
|
||||
@ -19,12 +18,12 @@ superfx_device::superfx_device(const machine_config &mconfig, device_type type,
|
||||
}
|
||||
|
||||
superfx1_device::superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: superfx_device(mconfig, SUPERFX1, tag, owner, clock, 2)
|
||||
: superfx_device(mconfig, SUPERFX1, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
superfx2_device::superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: superfx_device(mconfig, SUPERFX2, tag, owner, clock, 1)
|
||||
: superfx_device(mconfig, SUPERFX2, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1453,7 +1452,7 @@ void superfx_device::execute_run()
|
||||
//printf( " r8:%04x r9:%04x r10:%04x r11:%04x r12:%04x r13:%04x r14:%04x r15:%04x\n", m_r[8], m_r[9], m_r[10], m_r[11], m_r[12], m_r[13], m_r[14], m_r[15] );
|
||||
//printf( "sfr:%04x\n", m_sfr );
|
||||
|
||||
m_icount -= m_cycles_per_insn;
|
||||
m_icount -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,9 +92,6 @@ enum
|
||||
class superfx_device : public cpu_device, public superfx_disassembler::config
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpi);
|
||||
|
||||
// configuration helpers
|
||||
auto irq() { return m_out_irq_func.bind(); }
|
||||
|
||||
@ -107,6 +104,9 @@ public:
|
||||
virtual u16 get_alt() const override;
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
@ -125,9 +125,6 @@ protected:
|
||||
// device_disasm_interface overrides
|
||||
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
|
||||
|
||||
// helpers
|
||||
int m_cycles_per_insn;
|
||||
|
||||
private:
|
||||
address_space_config m_program_config;
|
||||
|
||||
@ -219,8 +216,8 @@ public:
|
||||
|
||||
protected:
|
||||
// device_execute_interface overrides
|
||||
virtual uint32_t execute_min_cycles() const override { return m_cycles_per_insn; }
|
||||
virtual uint32_t execute_max_cycles() const override { return m_cycles_per_insn; }
|
||||
virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return (clocks + 2 - 1) / 2; }
|
||||
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 2); }
|
||||
};
|
||||
|
||||
class superfx2_device : public superfx_device
|
||||
@ -228,11 +225,6 @@ class superfx2_device : public superfx_device
|
||||
public:
|
||||
// construction/destruction
|
||||
superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device_execute_interface overrides
|
||||
virtual uint32_t execute_min_cycles() const override { return m_cycles_per_insn; }
|
||||
virtual uint32_t execute_max_cycles() const override { return m_cycles_per_insn; }
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(SUPERFX1, superfx1_device)
|
||||
|
@ -17,8 +17,8 @@ public:
|
||||
typedef device_delegate<void (u16 attr, int &flipx, int &flipy, int &code)> ext_cb_delegate;
|
||||
|
||||
// configuration
|
||||
template <typename... T> void set_colpri_callback(T &&... args) { m_colpri_cb = nmk_16bit_sprite_device::colpri_cb_delegate(std::forward<T>(args)...); }
|
||||
template <typename... T> void set_ext_callback(T &&... args) { m_ext_cb = nmk_16bit_sprite_device::ext_cb_delegate(std::forward<T>(args)...); }
|
||||
template <typename... T> void set_colpri_callback(T &&... args) { m_colpri_cb = colpri_cb_delegate(std::forward<T>(args)...); }
|
||||
template <typename... T> void set_ext_callback(T &&... args) { m_ext_cb = ext_cb_delegate(std::forward<T>(args)...); }
|
||||
void set_videoshift(int shift) { m_videoshift = shift; }
|
||||
void set_mask(int xmask, int ymask) { m_xmask = xmask, m_ymask = ymask; }
|
||||
void set_screen_size(int width, int height) { m_screen_width = width, m_screen_height = height; }
|
||||
|
Loading…
Reference in New Issue
Block a user