mirror of
https://github.com/holub/mame
synced 2025-06-22 20:38:50 +03:00
coverity, cleanup, constructor delegation (nw)
This commit is contained in:
parent
0a4ea6bfc7
commit
30e42bb986
@ -121,11 +121,11 @@ MACHINE_CONFIG_MEMBER( a2bus_pcxporter_device::device_add_mconfig )
|
|||||||
MCFG_DEVICE_DISABLE()
|
MCFG_DEVICE_DISABLE()
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
|
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
|
||||||
MCFG_PIT8253_CLK0(XTAL_14_31818MHz/12) /* heartbeat IRQ */
|
MCFG_PIT8253_CLK0(XTAL_14_31818MHz/12.0) // heartbeat IRQ
|
||||||
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
|
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
|
||||||
MCFG_PIT8253_CLK1(XTAL_14_31818MHz/12) /* dram refresh */
|
MCFG_PIT8253_CLK1(XTAL_14_31818MHz/12.0) // dram refresh
|
||||||
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(a2bus_pcxporter_device, pc_pit8253_out1_changed))
|
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(a2bus_pcxporter_device, pc_pit8253_out1_changed))
|
||||||
MCFG_PIT8253_CLK2(XTAL_14_31818MHz/12) /* pio port c pin 4, and speaker polling enough */
|
MCFG_PIT8253_CLK2(XTAL_14_31818MHz/12.0) // pio port c pin 4, and speaker polling enough
|
||||||
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(a2bus_pcxporter_device, pc_pit8253_out2_changed))
|
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(a2bus_pcxporter_device, pc_pit8253_out2_changed))
|
||||||
|
|
||||||
MCFG_DEVICE_ADD( "dma8237", PCXPORT_DMAC, XTAL_14_31818MHz/2 )
|
MCFG_DEVICE_ADD( "dma8237", PCXPORT_DMAC, XTAL_14_31818MHz/2 )
|
||||||
|
@ -57,11 +57,11 @@ MACHINE_CONFIG_MEMBER( wd7600_device::device_add_mconfig )
|
|||||||
MCFG_PIC8259_ADD("intc2", DEVWRITELINE("intc1", pic8259_device, ir2_w), GND, NOOP)
|
MCFG_PIC8259_ADD("intc2", DEVWRITELINE("intc1", pic8259_device, ir2_w), GND, NOOP)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("ctc", PIT8254, 0)
|
MCFG_DEVICE_ADD("ctc", PIT8254, 0)
|
||||||
MCFG_PIT8253_CLK0(XTAL_14_31818MHz / 12)
|
MCFG_PIT8253_CLK0(XTAL_14_31818MHz / 12.0)
|
||||||
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("intc1", pic8259_device, ir0_w))
|
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("intc1", pic8259_device, ir0_w))
|
||||||
MCFG_PIT8253_CLK1(XTAL_14_31818MHz / 12)
|
MCFG_PIT8253_CLK1(XTAL_14_31818MHz / 12.0)
|
||||||
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(wd7600_device, ctc_out1_w))
|
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(wd7600_device, ctc_out1_w))
|
||||||
MCFG_PIT8253_CLK2(XTAL_14_31818MHz / 12)
|
MCFG_PIT8253_CLK2(XTAL_14_31818MHz / 12.0)
|
||||||
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(wd7600_device, ctc_out2_w))
|
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(wd7600_device, ctc_out2_w))
|
||||||
|
|
||||||
MCFG_DS12885_ADD("rtc")
|
MCFG_DS12885_ADD("rtc")
|
||||||
|
@ -39,15 +39,15 @@ DEFINE_DEVICE_TYPE(CDP1861, cdp1861_device, "cdp1861", "RCA CDP1861")
|
|||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
cdp1861_device::cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
cdp1861_device::cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: device_t(mconfig, CDP1861, tag, owner, clock),
|
: device_t(mconfig, CDP1861, tag, owner, clock)
|
||||||
device_video_interface(mconfig, *this),
|
, device_video_interface(mconfig, *this)
|
||||||
m_write_irq(*this),
|
, m_write_irq(*this)
|
||||||
m_write_dma_out(*this),
|
, m_write_dma_out(*this)
|
||||||
m_write_efx(*this),
|
, m_write_efx(*this)
|
||||||
m_disp(0),
|
, m_disp(0)
|
||||||
m_dispon(0),
|
, m_dispon(0), m_dispoff(0)
|
||||||
m_dispoff(0),
|
, m_dmaout(CLEAR_LINE)
|
||||||
m_dmaout(CLEAR_LINE)
|
, m_int_timer(nullptr), m_efx_timer(nullptr), m_dma_timer(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,6 +124,8 @@ public:
|
|||||||
int zclip_if_less(int numverts, const vertex_t *v, vertex_t *outv, int paramcount, _BaseType clipval);
|
int zclip_if_less(int numverts, const vertex_t *v, vertex_t *outv, int paramcount, _BaseType clipval);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
poly_manager(running_machine &machine, screen_device *screen, uint8_t flags);
|
||||||
|
|
||||||
// turn this on to log the reasons for any long waits
|
// turn this on to log the reasons for any long waits
|
||||||
static constexpr bool POLY_LOG_WAITS = false;
|
static constexpr bool POLY_LOG_WAITS = false;
|
||||||
|
|
||||||
@ -263,7 +265,7 @@ private:
|
|||||||
unit_array m_unit; // array of work units
|
unit_array m_unit; // array of work units
|
||||||
|
|
||||||
// misc data
|
// misc data
|
||||||
uint8_t m_flags; // flags
|
uint8_t const m_flags; // flags
|
||||||
|
|
||||||
// buckets
|
// buckets
|
||||||
uint16_t m_unit_bucket[TOTAL_BUCKETS]; // buckets for tracking unit usage
|
uint16_t m_unit_bucket[TOTAL_BUCKETS]; // buckets for tracking unit usage
|
||||||
@ -286,16 +288,31 @@ private:
|
|||||||
|
|
||||||
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
|
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
|
||||||
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(running_machine &machine, uint8_t flags)
|
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(running_machine &machine, uint8_t flags)
|
||||||
: m_machine(machine),
|
: poly_manager(machine, nullptr, flags)
|
||||||
m_screen(nullptr),
|
{
|
||||||
m_queue(nullptr),
|
}
|
||||||
m_polygon(machine, *this),
|
|
||||||
m_object(machine, *this),
|
|
||||||
m_unit(machine, *this),
|
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
|
||||||
m_flags(flags),
|
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(screen_device &screen, uint8_t flags)
|
||||||
m_triangles(0),
|
: poly_manager(screen.machine(), &screen, flags)
|
||||||
m_quads(0),
|
{
|
||||||
m_pixels(0)
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
|
||||||
|
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(running_machine &machine, screen_device *screen, uint8_t flags)
|
||||||
|
: m_machine(machine)
|
||||||
|
, m_screen(screen)
|
||||||
|
, m_queue(nullptr)
|
||||||
|
, m_polygon(machine, *this)
|
||||||
|
, m_object(machine, *this)
|
||||||
|
, m_unit(machine, *this)
|
||||||
|
, m_flags(flags)
|
||||||
|
, m_tiles(0)
|
||||||
|
, m_triangles(0)
|
||||||
|
, m_quads(0)
|
||||||
|
, m_pixels(0)
|
||||||
{
|
{
|
||||||
#if KEEP_POLY_STATISTICS
|
#if KEEP_POLY_STATISTICS
|
||||||
memset(m_conflicts, 0, sizeof(m_conflicts));
|
memset(m_conflicts, 0, sizeof(m_conflicts));
|
||||||
@ -311,33 +328,6 @@ poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(runnin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
|
|
||||||
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(screen_device &screen, uint8_t flags)
|
|
||||||
: m_machine(screen.machine()),
|
|
||||||
m_screen(&screen),
|
|
||||||
m_queue(nullptr),
|
|
||||||
m_polygon(screen.machine(), *this),
|
|
||||||
m_object(screen.machine(), *this),
|
|
||||||
m_unit(screen.machine(), *this),
|
|
||||||
m_flags(flags),
|
|
||||||
m_triangles(0),
|
|
||||||
m_quads(0),
|
|
||||||
m_pixels(0)
|
|
||||||
{
|
|
||||||
#if KEEP_POLY_STATISTICS
|
|
||||||
memset(m_conflicts, 0, sizeof(m_conflicts));
|
|
||||||
memset(m_resolved, 0, sizeof(m_resolved));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// create the work queue
|
|
||||||
if (!(flags & FLAG_NO_WORK_QUEUE))
|
|
||||||
m_queue = osd_work_queue_alloc(WORK_QUEUE_FLAG_MULTI | WORK_QUEUE_FLAG_HIGH_FREQ);
|
|
||||||
|
|
||||||
// request a pre-save callback for synchronization
|
|
||||||
machine().save().register_presave(save_prepost_delegate(FUNC(poly_manager::presave), this));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// ~poly_manager - destructor
|
// ~poly_manager - destructor
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
* includes/ondra.h
|
* includes/ondra.h
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
#ifndef MAME_INCLUDES_ONDRA_H
|
||||||
|
#define MAME_INCLUDES_ONDRA_H
|
||||||
|
|
||||||
#ifndef ONDRA_H_
|
#pragma once
|
||||||
#define ONDRA_H_
|
|
||||||
|
|
||||||
#include "imagedev/cassette.h"
|
#include "imagedev/cassette.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
@ -15,8 +16,12 @@
|
|||||||
class ondra_state : public driver_device
|
class ondra_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ondra_state(const machine_config &mconfig, device_type type, const char *tag)
|
ondra_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||||
: driver_device(mconfig, type, tag),
|
driver_device(mconfig, type, tag),
|
||||||
|
m_video_enable(0),
|
||||||
|
m_bank1_status(0),
|
||||||
|
m_bank2_status(0),
|
||||||
|
m_nmi_check_timer(nullptr),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_cassette(*this, "cassette"),
|
m_cassette(*this, "cassette"),
|
||||||
m_ram(*this, RAM_TAG),
|
m_ram(*this, RAM_TAG),
|
||||||
@ -24,34 +29,31 @@ public:
|
|||||||
m_bank1(*this, "bank1"),
|
m_bank1(*this, "bank1"),
|
||||||
m_bank2(*this, "bank2"),
|
m_bank2(*this, "bank2"),
|
||||||
m_bank3(*this, "bank3"),
|
m_bank3(*this, "bank3"),
|
||||||
m_line0(*this, "LINE0"),
|
m_lines(*this, "LINE%u", 0),
|
||||||
m_line1(*this, "LINE1"),
|
m_nmi(*this, "NMI")
|
||||||
m_line2(*this, "LINE2"),
|
{
|
||||||
m_line3(*this, "LINE3"),
|
}
|
||||||
m_line4(*this, "LINE4"),
|
|
||||||
m_line5(*this, "LINE5"),
|
|
||||||
m_line6(*this, "LINE6"),
|
|
||||||
m_line7(*this, "LINE7"),
|
|
||||||
m_line8(*this, "LINE8"),
|
|
||||||
m_line9(*this, "LINE9"),
|
|
||||||
m_nmi(*this, "NMI") { }
|
|
||||||
|
|
||||||
uint8_t m_video_enable;
|
|
||||||
uint8_t m_bank1_status;
|
|
||||||
uint8_t m_bank2_status;
|
|
||||||
emu_timer *m_nmi_check_timer;
|
|
||||||
DECLARE_READ8_MEMBER(ondra_keyboard_r);
|
DECLARE_READ8_MEMBER(ondra_keyboard_r);
|
||||||
DECLARE_WRITE8_MEMBER(ondra_port_03_w);
|
DECLARE_WRITE8_MEMBER(ondra_port_03_w);
|
||||||
DECLARE_WRITE8_MEMBER(ondra_port_09_w);
|
DECLARE_WRITE8_MEMBER(ondra_port_09_w);
|
||||||
DECLARE_WRITE8_MEMBER(ondra_port_0a_w);
|
DECLARE_WRITE8_MEMBER(ondra_port_0a_w);
|
||||||
virtual void machine_start() override;
|
|
||||||
virtual void machine_reset() override;
|
|
||||||
virtual void video_start() override;
|
|
||||||
uint32_t screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
INTERRUPT_GEN_MEMBER(ondra_interrupt);
|
INTERRUPT_GEN_MEMBER(ondra_interrupt);
|
||||||
TIMER_CALLBACK_MEMBER(nmi_check_callback);
|
TIMER_CALLBACK_MEMBER(nmi_check_callback);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void machine_start() override;
|
||||||
|
virtual void machine_reset() override;
|
||||||
|
virtual void video_start() override;
|
||||||
|
|
||||||
|
void ondra_update_banks();
|
||||||
|
|
||||||
|
uint8_t m_video_enable;
|
||||||
|
uint8_t m_bank1_status;
|
||||||
|
uint8_t m_bank2_status;
|
||||||
|
emu_timer *m_nmi_check_timer;
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cassette_image_device> m_cassette;
|
required_device<cassette_image_device> m_cassette;
|
||||||
required_device<ram_device> m_ram;
|
required_device<ram_device> m_ram;
|
||||||
@ -59,19 +61,8 @@ protected:
|
|||||||
required_memory_bank m_bank1;
|
required_memory_bank m_bank1;
|
||||||
required_memory_bank m_bank2;
|
required_memory_bank m_bank2;
|
||||||
required_memory_bank m_bank3;
|
required_memory_bank m_bank3;
|
||||||
required_ioport m_line0;
|
required_ioport<10> m_lines;
|
||||||
required_ioport m_line1;
|
|
||||||
required_ioport m_line2;
|
|
||||||
required_ioport m_line3;
|
|
||||||
required_ioport m_line4;
|
|
||||||
required_ioport m_line5;
|
|
||||||
required_ioport m_line6;
|
|
||||||
required_ioport m_line7;
|
|
||||||
required_ioport m_line8;
|
|
||||||
required_ioport m_line9;
|
|
||||||
required_ioport m_nmi;
|
required_ioport m_nmi;
|
||||||
|
|
||||||
void ondra_update_banks();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // MAME_INCLUDES_ONDRA_H
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
Atari Orbit hardware
|
Atari Orbit hardware
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#ifndef MAME_INCLUDES_ORBIT_H
|
||||||
|
#define MAME_INCLUDES_ORBIT_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "sound/discrete.h"
|
#include "sound/discrete.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
@ -21,15 +25,39 @@
|
|||||||
class orbit_state : public driver_device
|
class orbit_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
orbit_state(const machine_config &mconfig, device_type type, const char *tag)
|
orbit_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||||
: driver_device(mconfig, type, tag),
|
driver_device(mconfig, type, tag),
|
||||||
m_playfield_ram(*this, "playfield_ram"),
|
m_playfield_ram(*this, "playfield_ram"),
|
||||||
m_sprite_ram(*this, "sprite_ram"),
|
m_sprite_ram(*this, "sprite_ram"),
|
||||||
m_discrete(*this, "discrete"),
|
m_discrete(*this, "discrete"),
|
||||||
|
m_bg_tilemap(nullptr),
|
||||||
|
m_flip_screen(0),
|
||||||
|
m_misc_flags(0),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
m_gfxdecode(*this, "gfxdecode"),
|
||||||
m_screen(*this, "screen"),
|
m_screen(*this, "screen"),
|
||||||
m_palette(*this, "palette") { }
|
m_palette(*this, "palette")
|
||||||
|
{ }
|
||||||
|
|
||||||
|
DECLARE_WRITE8_MEMBER(orbit_misc_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(orbit_playfield_w);
|
||||||
|
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||||
|
uint32_t screen_update_orbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
INTERRUPT_GEN_MEMBER(orbit_interrupt);
|
||||||
|
TIMER_CALLBACK_MEMBER(irq_off);
|
||||||
|
TIMER_DEVICE_CALLBACK_MEMBER(nmi_32v);
|
||||||
|
DECLARE_WRITE8_MEMBER(orbit_note_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(orbit_note_amp_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(orbit_noise_amp_w);
|
||||||
|
DECLARE_WRITE8_MEMBER(orbit_noise_rst_w);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void machine_start() override;
|
||||||
|
virtual void machine_reset() override;
|
||||||
|
virtual void video_start() override;
|
||||||
|
|
||||||
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
|
void update_misc_flags(address_space &space, uint8_t val);
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<uint8_t> m_playfield_ram;
|
required_shared_ptr<uint8_t> m_playfield_ram;
|
||||||
@ -49,24 +77,9 @@ public:
|
|||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
required_device<screen_device> m_screen;
|
required_device<screen_device> m_screen;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
|
|
||||||
DECLARE_WRITE8_MEMBER(orbit_misc_w);
|
|
||||||
DECLARE_WRITE8_MEMBER(orbit_playfield_w);
|
|
||||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
|
||||||
virtual void machine_start() override;
|
|
||||||
virtual void machine_reset() override;
|
|
||||||
virtual void video_start() override;
|
|
||||||
uint32_t screen_update_orbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
|
||||||
INTERRUPT_GEN_MEMBER(orbit_interrupt);
|
|
||||||
TIMER_CALLBACK_MEMBER(irq_off);
|
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(nmi_32v);
|
|
||||||
DECLARE_WRITE8_MEMBER(orbit_note_w);
|
|
||||||
DECLARE_WRITE8_MEMBER(orbit_note_amp_w);
|
|
||||||
DECLARE_WRITE8_MEMBER(orbit_noise_amp_w);
|
|
||||||
DECLARE_WRITE8_MEMBER(orbit_noise_rst_w);
|
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
|
||||||
void update_misc_flags(address_space &space, uint8_t val);
|
|
||||||
};
|
};
|
||||||
/*----------- defined in audio/orbit.c -----------*/
|
/*----------- defined in audio/orbit.c -----------*/
|
||||||
|
|
||||||
DISCRETE_SOUND_EXTERN( orbit );
|
DISCRETE_SOUND_EXTERN( orbit );
|
||||||
|
|
||||||
|
#endif // MAME_INCLUDES_ORBIT_H
|
||||||
|
@ -47,14 +47,7 @@ public:
|
|||||||
m_ieee(*this, IEEE488_TAG),
|
m_ieee(*this, IEEE488_TAG),
|
||||||
m_floppy0(*this, "mb8877:0"),
|
m_floppy0(*this, "mb8877:0"),
|
||||||
m_floppy1(*this, "mb8877:1"),
|
m_floppy1(*this, "mb8877:1"),
|
||||||
m_keyb_row0(*this, "ROW0"),
|
m_keyb_row(*this, "ROW%u", 0),
|
||||||
m_keyb_row1(*this, "ROW1"),
|
|
||||||
m_keyb_row2(*this, "ROW2"),
|
|
||||||
m_keyb_row3(*this, "ROW3"),
|
|
||||||
m_keyb_row4(*this, "ROW4"),
|
|
||||||
m_keyb_row5(*this, "ROW5"),
|
|
||||||
m_keyb_row6(*this, "ROW6"),
|
|
||||||
m_keyb_row7(*this, "ROW7"),
|
|
||||||
m_btn_reset(*this, "RESET"),
|
m_btn_reset(*this, "RESET"),
|
||||||
m_cnf(*this, "CNF"),
|
m_cnf(*this, "CNF"),
|
||||||
m_region_maincpu(*this, "maincpu"),
|
m_region_maincpu(*this, "maincpu"),
|
||||||
@ -120,14 +113,7 @@ protected:
|
|||||||
void update_acia_rxc_txc();
|
void update_acia_rxc_txc();
|
||||||
|
|
||||||
// user inputs
|
// user inputs
|
||||||
required_ioport m_keyb_row0;
|
required_ioport_array<8> m_keyb_row;
|
||||||
required_ioport m_keyb_row1;
|
|
||||||
required_ioport m_keyb_row2;
|
|
||||||
required_ioport m_keyb_row3;
|
|
||||||
required_ioport m_keyb_row4;
|
|
||||||
required_ioport m_keyb_row5;
|
|
||||||
required_ioport m_keyb_row6;
|
|
||||||
required_ioport m_keyb_row7;
|
|
||||||
required_ioport m_btn_reset;
|
required_ioport m_btn_reset;
|
||||||
|
|
||||||
// fake inputs for hardware configuration and things that need rewiring
|
// fake inputs for hardware configuration and things that need rewiring
|
||||||
|
@ -1,26 +1,42 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:David Haywood
|
// copyright-holders:David Haywood
|
||||||
|
#ifndef MAME_INCLUDES_PASS_H
|
||||||
|
#define MAME_INCLUDES_PASS_H
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
class pass_state : public driver_device
|
class pass_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
pass_state(const machine_config &mconfig, device_type type, const char *tag)
|
pass_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||||
: driver_device(mconfig, type, tag),
|
driver_device(mconfig, type, tag),
|
||||||
|
m_bg_tilemap(nullptr),
|
||||||
|
m_fg_tilemap(nullptr),
|
||||||
m_bg_videoram(*this, "bg_videoram"),
|
m_bg_videoram(*this, "bg_videoram"),
|
||||||
m_fg_videoram(*this, "fg_videoram"),
|
m_fg_videoram(*this, "fg_videoram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_gfxdecode(*this, "gfxdecode") { }
|
m_gfxdecode(*this, "gfxdecode")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_WRITE16_MEMBER(pass_bg_videoram_w);
|
||||||
|
DECLARE_WRITE16_MEMBER(pass_fg_videoram_w);
|
||||||
|
TILE_GET_INFO_MEMBER(get_pass_bg_tile_info);
|
||||||
|
TILE_GET_INFO_MEMBER(get_pass_fg_tile_info);
|
||||||
|
|
||||||
|
uint32_t screen_update_pass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void video_start() override;
|
||||||
|
|
||||||
|
private:
|
||||||
tilemap_t *m_bg_tilemap;
|
tilemap_t *m_bg_tilemap;
|
||||||
tilemap_t *m_fg_tilemap;
|
tilemap_t *m_fg_tilemap;
|
||||||
|
|
||||||
required_shared_ptr<uint16_t> m_bg_videoram;
|
required_shared_ptr<uint16_t> m_bg_videoram;
|
||||||
required_shared_ptr<uint16_t> m_fg_videoram;
|
required_shared_ptr<uint16_t> m_fg_videoram;
|
||||||
DECLARE_WRITE16_MEMBER(pass_bg_videoram_w);
|
|
||||||
DECLARE_WRITE16_MEMBER(pass_fg_videoram_w);
|
|
||||||
TILE_GET_INFO_MEMBER(get_pass_bg_tile_info);
|
|
||||||
TILE_GET_INFO_MEMBER(get_pass_fg_tile_info);
|
|
||||||
virtual void video_start() override;
|
|
||||||
uint32_t screen_update_pass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // MAME_INCLUDES_PASS_H
|
||||||
|
@ -193,14 +193,12 @@ void bfm_bd1_device::blank(int data)
|
|||||||
switch ( data & 0x03 )
|
switch ( data & 0x03 )
|
||||||
{
|
{
|
||||||
case 0x00: //blank all
|
case 0x00: //blank all
|
||||||
{
|
|
||||||
for (int i = 0; i < 15; i++)
|
for (int i = 0; i < 15; i++)
|
||||||
{
|
{
|
||||||
m_attrs[i] = AT_BLANK;
|
m_attrs[i] = AT_BLANK;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01: // blank inside window
|
case 0x01: // blank inside window
|
||||||
if ( m_window_size > 0 )
|
if ( m_window_size > 0 )
|
||||||
{
|
{
|
||||||
@ -210,6 +208,7 @@ void bfm_bd1_device::blank(int data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x02: // blank outside window
|
case 0x02: // blank outside window
|
||||||
if ( m_window_size > 0 )
|
if ( m_window_size > 0 )
|
||||||
{
|
{
|
||||||
@ -230,13 +229,12 @@ void bfm_bd1_device::blank(int data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x03: // clear blanking
|
case 0x03: // clear blanking
|
||||||
{
|
|
||||||
for (int i = 0; i < 15; i++)
|
for (int i = 0; i < 15; i++)
|
||||||
{
|
{
|
||||||
m_attrs[i] = 0;
|
m_attrs[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,9 +274,7 @@ int bfm_bd1_device::write_char(int data)
|
|||||||
switch ( data & 0xF0 )
|
switch ( data & 0xF0 )
|
||||||
{
|
{
|
||||||
case 0x80: // 0x80 - 0x8F Set display blanking
|
case 0x80: // 0x80 - 0x8F Set display blanking
|
||||||
{
|
|
||||||
blank(data&0x03);//use the blanking data
|
blank(data&0x03);//use the blanking data
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x90: // 0x90 - 0x9F Set cursor pos
|
case 0x90: // 0x90 - 0x9F Set cursor pos
|
||||||
@ -331,12 +327,12 @@ int bfm_bd1_device::write_char(int data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x03: // clr entire display
|
case 0x03: // clr entire display
|
||||||
{
|
|
||||||
memset(m_chars, 0, sizeof(m_chars));
|
memset(m_chars, 0, sizeof(m_chars));
|
||||||
memset(m_attrs, 0, sizeof(m_attrs));
|
memset(m_attrs, 0, sizeof(m_attrs));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xC0: // 0xC0 - 0xCF Set flash rate
|
case 0xC0: // 0xC0 - 0xCF Set flash rate
|
||||||
@ -396,7 +392,6 @@ void bfm_bd1_device::setdata(int segdata, int data)
|
|||||||
|
|
||||||
case 0x2C: // semicolon
|
case 0x2C: // semicolon
|
||||||
case 0x2E: // decimal point
|
case 0x2E: // decimal point
|
||||||
|
|
||||||
if( m_chars[m_pcursor_pos] & (1<<12))
|
if( m_chars[m_pcursor_pos] & (1<<12))
|
||||||
{
|
{
|
||||||
move++;
|
move++;
|
||||||
@ -435,7 +430,6 @@ void bfm_bd1_device::setdata(int segdata, int data)
|
|||||||
switch ( mode )
|
switch ( mode )
|
||||||
{
|
{
|
||||||
case 0: // rotate left
|
case 0: // rotate left
|
||||||
|
|
||||||
m_cursor_pos &= 0x0F;
|
m_cursor_pos &= 0x0F;
|
||||||
|
|
||||||
if ( change )
|
if ( change )
|
||||||
@ -448,7 +442,6 @@ void bfm_bd1_device::setdata(int segdata, int data)
|
|||||||
|
|
||||||
|
|
||||||
case 1: // Rotate right
|
case 1: // Rotate right
|
||||||
|
|
||||||
m_cursor_pos &= 0x0F;
|
m_cursor_pos &= 0x0F;
|
||||||
|
|
||||||
if ( change )
|
if ( change )
|
||||||
@ -460,7 +453,6 @@ void bfm_bd1_device::setdata(int segdata, int data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // Scroll left
|
case 2: // Scroll left
|
||||||
|
|
||||||
if ( m_cursor_pos < m_window_end )
|
if ( m_cursor_pos < m_window_end )
|
||||||
{
|
{
|
||||||
m_scroll_active = 0;
|
m_scroll_active = 0;
|
||||||
@ -498,7 +490,6 @@ void bfm_bd1_device::setdata(int segdata, int data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // Scroll right
|
case 3: // Scroll right
|
||||||
|
|
||||||
if ( m_cursor_pos > m_window_start )
|
if ( m_cursor_pos > m_window_start )
|
||||||
{
|
{
|
||||||
if ( change )
|
if ( change )
|
||||||
|
@ -338,6 +338,8 @@ int bfm_bda_device::write_char(int data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 0x03: // clr entire display
|
case 0x03: // clr entire display
|
||||||
{
|
{
|
||||||
memset(m_chars, 0, sizeof(m_chars));
|
memset(m_chars, 0, sizeof(m_chars));
|
||||||
|
@ -270,7 +270,7 @@ static void CX4_C4DoScaleRotate(int row_padding)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Clear the output RAM
|
//Clear the output RAM
|
||||||
memset(cx4.ram, 0, (w + row_padding / 4) * h / 2);
|
memset(cx4.ram, 0, (w + row_padding / 4) * unsigned(h) / 2);
|
||||||
|
|
||||||
//Calculate start position (i.e. (Ox, Oy) = (0, 0))
|
//Calculate start position (i.e. (Ox, Oy) = (0, 0))
|
||||||
//The low 12 bits are fractional, so (Cx<<12) gives us the Cx we want in
|
//The low 12 bits are fractional, so (Cx<<12) gives us the Cx we want in
|
||||||
|
@ -10,33 +10,23 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
|
||||||
#include "includes/ondra.h"
|
#include "includes/ondra.h"
|
||||||
|
|
||||||
|
#include "cpu/z80/z80.h"
|
||||||
|
|
||||||
|
|
||||||
READ8_MEMBER(ondra_state::ondra_keyboard_r)
|
READ8_MEMBER(ondra_state::ondra_keyboard_r)
|
||||||
{
|
{
|
||||||
uint8_t retVal = 0x00;
|
uint8_t retVal = 0x00;
|
||||||
double valcas = m_cassette->input();
|
|
||||||
|
|
||||||
if ( valcas < 0.00) {
|
double const valcas = m_cassette->input();
|
||||||
retVal = 0x80;
|
if (valcas < 0.00)
|
||||||
}
|
retVal |= 0x80;
|
||||||
|
|
||||||
switch ( offset & 0x0f )
|
if ((offset & 0x0f) < m_lines.size())
|
||||||
{
|
retVal |= m_lines[offset & 0x0f]->read();
|
||||||
case 0: retVal |= m_line0->read(); break;
|
else
|
||||||
case 1: retVal |= m_line1->read(); break;
|
retVal |= 0x1f;
|
||||||
case 2: retVal |= m_line2->read(); break;
|
|
||||||
case 3: retVal |= m_line3->read(); break;
|
|
||||||
case 4: retVal |= m_line4->read(); break;
|
|
||||||
case 5: retVal |= m_line5->read(); break;
|
|
||||||
case 6: retVal |= m_line6->read(); break;
|
|
||||||
case 7: retVal |= m_line7->read(); break;
|
|
||||||
case 8: retVal |= m_line8->read(); break;
|
|
||||||
case 9: retVal |= m_line9->read(); break;
|
|
||||||
default: retVal |= 0x1f; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
@ -42,14 +42,14 @@ READ8_MEMBER( osborne1_state::bank_2xxx_3xxx_r )
|
|||||||
data &= m_pia0->read(space, offset & 0x03);
|
data &= m_pia0->read(space, offset & 0x03);
|
||||||
if ((offset & 0xA00) == 0x200) // Keyboard
|
if ((offset & 0xA00) == 0x200) // Keyboard
|
||||||
{
|
{
|
||||||
if (offset & 0x01) data &= m_keyb_row0->read();
|
if (offset & 0x01) data &= m_keyb_row[0]->read();
|
||||||
if (offset & 0x02) data &= m_keyb_row1->read();
|
if (offset & 0x02) data &= m_keyb_row[1]->read();
|
||||||
if (offset & 0x04) data &= m_keyb_row3->read();
|
if (offset & 0x04) data &= m_keyb_row[3]->read();
|
||||||
if (offset & 0x08) data &= m_keyb_row4->read();
|
if (offset & 0x08) data &= m_keyb_row[4]->read();
|
||||||
if (offset & 0x10) data &= m_keyb_row5->read();
|
if (offset & 0x10) data &= m_keyb_row[5]->read();
|
||||||
if (offset & 0x20) data &= m_keyb_row2->read();
|
if (offset & 0x20) data &= m_keyb_row[2]->read();
|
||||||
if (offset & 0x40) data &= m_keyb_row6->read();
|
if (offset & 0x40) data &= m_keyb_row[6]->read();
|
||||||
if (offset & 0x80) data &= m_keyb_row7->read();
|
if (offset & 0x80) data &= m_keyb_row[7]->read();
|
||||||
}
|
}
|
||||||
if ((offset & 0xA00) == 0xA00) // Serial
|
if ((offset & 0xA00) == 0xA00) // Serial
|
||||||
{
|
{
|
||||||
|
@ -56,8 +56,10 @@ Newer version of the I/O chip ?
|
|||||||
|
|
||||||
DEFINE_DEVICE_TYPE(TC0220IOC, tc0220ioc_device, "tc0220ioc", "Taito TC0220IOC")
|
DEFINE_DEVICE_TYPE(TC0220IOC, tc0220ioc_device, "tc0220ioc", "Taito TC0220IOC")
|
||||||
|
|
||||||
tc0220ioc_device::tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
tc0220ioc_device::tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||||
: device_t(mconfig, TC0220IOC, tag, owner, clock),
|
device_t(mconfig, TC0220IOC, tag, owner, clock),
|
||||||
|
m_port(0),
|
||||||
|
m_regs{ 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||||
m_watchdog(*this, "watchdog"),
|
m_watchdog(*this, "watchdog"),
|
||||||
m_read_0_cb(*this),
|
m_read_0_cb(*this),
|
||||||
m_read_1_cb(*this),
|
m_read_1_cb(*this),
|
||||||
|
Loading…
Reference in New Issue
Block a user