mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
even more cleanup and encapsulation (nw)
This commit is contained in:
parent
74365c6033
commit
18f8fd523c
@ -42,21 +42,24 @@
|
||||
class accomm_state : public driver_device
|
||||
{
|
||||
public:
|
||||
accomm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_beeper(*this, "beeper"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_via(*this, "via6522"),
|
||||
m_acia(*this, "acia"),
|
||||
m_acia_clock(*this, "acia_clock"),
|
||||
m_adlc(*this, "mc6854"),
|
||||
m_vram(*this, "vram"),
|
||||
m_keybd1(*this, "LINE1.%u", 0),
|
||||
m_keybd2(*this, "LINE2.%u", 0),
|
||||
m_ch00rom_enabled(true)
|
||||
accomm_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_beeper(*this, "beeper"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_via(*this, "via6522"),
|
||||
m_acia(*this, "acia"),
|
||||
m_acia_clock(*this, "acia_clock"),
|
||||
m_adlc(*this, "mc6854"),
|
||||
m_vram(*this, "vram"),
|
||||
m_keybd1(*this, "LINE1.%u", 0),
|
||||
m_keybd2(*this, "LINE2.%u", 0),
|
||||
m_ch00rom_enabled(true)
|
||||
{ }
|
||||
|
||||
void accomm(machine_config &config);
|
||||
|
||||
protected:
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ch00switch_w);
|
||||
@ -72,9 +75,6 @@ public:
|
||||
DECLARE_PALETTE_INIT(accomm);
|
||||
INTERRUPT_GEN_MEMBER(vbl_int);
|
||||
|
||||
void accomm(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
virtual void machine_start() override;
|
||||
void main_map(address_map &map);
|
||||
|
@ -23,15 +23,16 @@ TODO:
|
||||
class albazc_state : public driver_device
|
||||
{
|
||||
public:
|
||||
albazc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
albazc_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_spriteram1(*this, "spriteram1"),
|
||||
m_spriteram2(*this, "spriteram2"),
|
||||
m_spriteram3(*this, "spriteram3"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_hopper(*this, "hopper") { }
|
||||
m_hopper(*this, "hopper")
|
||||
{ }
|
||||
|
||||
void hanaroku(machine_config &config);
|
||||
|
||||
|
@ -35,17 +35,18 @@ protected:
|
||||
DECLARE_WRITE16_MEMBER(mmu_io_w);
|
||||
DECLARE_FLOPPY_FORMATS(floppy_formats);
|
||||
|
||||
void altos486_io(address_map &map);
|
||||
void altos486_mem(address_map &map);
|
||||
void altos486_z80_io(address_map &map);
|
||||
void altos486_z80_mem(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<i80186_cpu_device> m_maincpu;
|
||||
required_shared_ptr<uint16_t> m_ram;
|
||||
required_memory_region m_rom;
|
||||
|
||||
bool m_sys_mode;
|
||||
uint8_t m_prot[256];
|
||||
uint16_t m_viol[16];
|
||||
void altos486_io(address_map &map);
|
||||
void altos486_mem(address_map &map);
|
||||
void altos486_z80_io(address_map &map);
|
||||
void altos486_z80_mem(address_map &map);
|
||||
};
|
||||
|
||||
READ8_MEMBER(altos486_state::read_rmx_ack)
|
||||
|
@ -87,13 +87,13 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void arcadecl_state::update_interrupts()
|
||||
void sparkz_state::update_interrupts()
|
||||
{
|
||||
m_maincpu->set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
void arcadecl_state::scanline_update(screen_device &screen, int scanline)
|
||||
void sparkz_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
/* generate 32V signals */
|
||||
if ((scanline & 32) == 0)
|
||||
@ -108,7 +108,7 @@ void arcadecl_state::scanline_update(screen_device &screen, int scanline)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_RESET_MEMBER(arcadecl_state,arcadecl)
|
||||
void sparkz_state::machine_reset()
|
||||
{
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*m_screen, 32);
|
||||
@ -122,7 +122,7 @@ MACHINE_RESET_MEMBER(arcadecl_state,arcadecl)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE16_MEMBER(arcadecl_state::latch_w)
|
||||
WRITE16_MEMBER(sparkz_state::latch_w)
|
||||
{
|
||||
/* bit layout in this register:
|
||||
|
||||
@ -146,7 +146,7 @@ WRITE16_MEMBER(arcadecl_state::latch_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
ADDRESS_MAP_START(arcadecl_state::main_map)
|
||||
ADDRESS_MAP_START(sparkz_state::main_map)
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x200000, 0x21ffff) AM_RAM AM_SHARE("bitmap")
|
||||
AM_RANGE(0x3c0000, 0x3c07ff) AM_DEVREADWRITE8("palette", palette_device, read8, write8, 0xff00) AM_SHARE("palette")
|
||||
@ -318,14 +318,12 @@ GFXDECODE_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_CONFIG_START(arcadecl_state::arcadecl)
|
||||
MACHINE_CONFIG_START(sparkz_state::sparkz)
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", arcadecl_state, video_int_gen)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(arcadecl_state,arcadecl)
|
||||
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sparkz_state, video_int_gen)
|
||||
|
||||
MCFG_EEPROM_2804_ADD("eeprom")
|
||||
MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
|
||||
@ -338,19 +336,14 @@ MACHINE_CONFIG_START(arcadecl_state::arcadecl)
|
||||
MCFG_PALETTE_FORMAT(IRRRRRGGGGGBBBBB)
|
||||
MCFG_PALETTE_MEMBITS(8)
|
||||
|
||||
MCFG_ATARI_MOTION_OBJECTS_ADD("mob", "screen", arcadecl_state::s_mob_config)
|
||||
MCFG_ATARI_MOTION_OBJECTS_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
/* note: these parameters are from published specs, not derived */
|
||||
/* the board uses an SOS-2 chip to generate video signals */
|
||||
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0+12, 336+12, 262, 0, 240)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(arcadecl_state, screen_update_arcadecl)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(sparkz_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(arcadecl_state,arcadecl)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
@ -358,9 +351,11 @@ MACHINE_CONFIG_START(arcadecl_state::arcadecl)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(arcadecl_state::sparkz)
|
||||
arcadecl(config);
|
||||
MCFG_DEVICE_REMOVE("mob")
|
||||
MACHINE_CONFIG_START(arcadecl_state::arcadecl)
|
||||
sparkz(config);
|
||||
|
||||
MCFG_ATARI_MOTION_OBJECTS_ADD("mob", "screen", arcadecl_state::s_mob_config)
|
||||
MCFG_ATARI_MOTION_OBJECTS_GFXDECODE("gfxdecode")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -405,4 +400,4 @@ ROM_END
|
||||
*************************************/
|
||||
|
||||
GAME( 1992, arcadecl, 0, arcadecl, arcadecl, arcadecl_state, 0, ROT0, "Atari Games", "Arcade Classics (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1992, sparkz, 0, sparkz, sparkz, arcadecl_state, 0, ROT0, "Atari Games", "Sparkz (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1992, sparkz, 0, sparkz, sparkz, sparkz_state, 0, ROT0, "Atari Games", "Sparkz (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -233,6 +233,47 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_DRIVER_INIT(bfcobra);
|
||||
void bfcobra(machine_config &config);
|
||||
|
||||
protected:
|
||||
DECLARE_READ8_MEMBER(chipset_r);
|
||||
DECLARE_WRITE8_MEMBER(chipset_w);
|
||||
DECLARE_WRITE8_MEMBER(rombank_w);
|
||||
DECLARE_READ8_MEMBER(fdctrl_r);
|
||||
DECLARE_READ8_MEMBER(fddata_r);
|
||||
DECLARE_WRITE8_MEMBER(fdctrl_w);
|
||||
DECLARE_READ8_MEMBER(int_latch_r);
|
||||
DECLARE_READ8_MEMBER(meter_r);
|
||||
DECLARE_WRITE8_MEMBER(meter_w);
|
||||
DECLARE_READ8_MEMBER(latch_r);
|
||||
DECLARE_WRITE8_MEMBER(latch_w);
|
||||
DECLARE_READ8_MEMBER(upd_r);
|
||||
DECLARE_WRITE8_MEMBER(upd_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(z80_acia_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(m6809_data_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(data_acia_tx_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_bfcobra(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(timer_irq);
|
||||
INTERRUPT_GEN_MEMBER(vblank_gen);
|
||||
void RunBlit(address_space &space);
|
||||
void update_irqs();
|
||||
void reset_fdc();
|
||||
void exec_w_phase(uint8_t data);
|
||||
void init_ram();
|
||||
void command_phase(struct fdc_t &fdc, uint8_t data);
|
||||
inline uint8_t* blitter_get_addr(uint32_t addr);
|
||||
inline void z80_bank(int num, int data);
|
||||
|
||||
void m6809_prog_map(address_map &map);
|
||||
void ramdac_map(address_map &map);
|
||||
void z80_io_map(address_map &map);
|
||||
void z80_prog_map(address_map &map);
|
||||
|
||||
private:
|
||||
uint8_t m_bank_data[4];
|
||||
std::unique_ptr<uint8_t[]> m_work_ram;
|
||||
std::unique_ptr<uint8_t[]> m_video_ram;
|
||||
@ -259,37 +300,6 @@ public:
|
||||
uint8_t m_col6bit[256];
|
||||
struct bf_blitter_t m_blitter;
|
||||
struct fdc_t m_fdc;
|
||||
DECLARE_READ8_MEMBER(chipset_r);
|
||||
DECLARE_WRITE8_MEMBER(chipset_w);
|
||||
DECLARE_WRITE8_MEMBER(rombank_w);
|
||||
DECLARE_READ8_MEMBER(fdctrl_r);
|
||||
DECLARE_READ8_MEMBER(fddata_r);
|
||||
DECLARE_WRITE8_MEMBER(fdctrl_w);
|
||||
DECLARE_READ8_MEMBER(int_latch_r);
|
||||
DECLARE_READ8_MEMBER(meter_r);
|
||||
DECLARE_WRITE8_MEMBER(meter_w);
|
||||
DECLARE_READ8_MEMBER(latch_r);
|
||||
DECLARE_WRITE8_MEMBER(latch_w);
|
||||
DECLARE_READ8_MEMBER(upd_r);
|
||||
DECLARE_WRITE8_MEMBER(upd_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(z80_acia_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(m6809_data_irq);
|
||||
DECLARE_WRITE_LINE_MEMBER(data_acia_tx_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
|
||||
DECLARE_DRIVER_INIT(bfcobra);
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_bfcobra(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(timer_irq);
|
||||
INTERRUPT_GEN_MEMBER(vblank_gen);
|
||||
void RunBlit(address_space &space);
|
||||
void update_irqs();
|
||||
void reset_fdc();
|
||||
void exec_w_phase(uint8_t data);
|
||||
void init_ram();
|
||||
void command_phase(struct fdc_t &fdc, uint8_t data);
|
||||
inline uint8_t* blitter_get_addr(uint32_t addr);
|
||||
inline void z80_bank(int num, int data);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<acia6850_device> m_acia6850_0;
|
||||
@ -298,11 +308,6 @@ public:
|
||||
required_device<upd7759_device> m_upd7759;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<meters_device> m_meters;
|
||||
void bfcobra(machine_config &config);
|
||||
void m6809_prog_map(address_map &map);
|
||||
void ramdac_map(address_map &map);
|
||||
void z80_io_map(address_map &map);
|
||||
void z80_prog_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/bfm_ad5.h"
|
||||
#include "includes/bfm_sc4.h"
|
||||
#include "machine/mcf5206e.h"
|
||||
#include "machine/bfm_sc45_helper.h"
|
||||
#include "speaker.h"
|
||||
|
@ -121,46 +121,28 @@ Optional (on expansion card) (Viper)
|
||||
class bfm_sc1_state : public driver_device
|
||||
{
|
||||
public:
|
||||
bfm_sc1_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
bfm_sc1_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_reel0(*this, "reel0"),
|
||||
m_reel1(*this, "reel1"),
|
||||
m_reel2(*this, "reel2"),
|
||||
m_reel3(*this, "reel3"),
|
||||
m_reel4(*this, "reel4"),
|
||||
m_reel5(*this, "reel5"),
|
||||
m_reels(*this, "reel%u", 0U),
|
||||
m_upd7759(*this, "upd"),
|
||||
m_vfd0(*this, "vfd0"),
|
||||
m_meters(*this, "meters") { }
|
||||
m_meters(*this, "meters")
|
||||
{ }
|
||||
|
||||
int m_mmtr_latch;
|
||||
int m_triac_latch;
|
||||
int m_vfd_latch; //initialized but not used
|
||||
int m_irq_status;
|
||||
int m_optic_pattern;
|
||||
DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel4_optic_cb) { if (state) m_optic_pattern |= 0x10; else m_optic_pattern &= ~0x10; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel5_optic_cb) { if (state) m_optic_pattern |= 0x20; else m_optic_pattern &= ~0x20; }
|
||||
int m_acia_status;
|
||||
int m_locked;
|
||||
int m_is_timer_enabled;
|
||||
int m_coin_inhibits; //initialized but not used
|
||||
int m_mux1_outputlatch;
|
||||
int m_mux1_datalo;
|
||||
int m_mux1_datahi;
|
||||
int m_mux1_input;
|
||||
int m_mux2_outputlatch;
|
||||
int m_mux2_datalo;
|
||||
int m_mux2_datahi;
|
||||
int m_mux2_input;
|
||||
uint8_t m_sc1_Inputs[64];
|
||||
uint8_t m_codec_data[256];
|
||||
DECLARE_DRIVER_INIT(toppoker);
|
||||
DECLARE_DRIVER_INIT(lotse_bank0);
|
||||
DECLARE_DRIVER_INIT(nocrypt_bank0);
|
||||
DECLARE_DRIVER_INIT(lotse);
|
||||
DECLARE_DRIVER_INIT(clatt);
|
||||
DECLARE_DRIVER_INIT(rou029);
|
||||
DECLARE_DRIVER_INIT(nocrypt);
|
||||
void scorpion1_adder2(machine_config &config);
|
||||
void scorpion1(machine_config &config);
|
||||
void scorpion1_viper(machine_config &config);
|
||||
|
||||
int m_defaultbank;
|
||||
protected:
|
||||
template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
|
||||
DECLARE_WRITE8_MEMBER(bankswitch_w);
|
||||
DECLARE_READ8_MEMBER(irqlatch_r);
|
||||
DECLARE_WRITE8_MEMBER(reel12_w);
|
||||
@ -193,41 +175,51 @@ public:
|
||||
|
||||
void save_state();
|
||||
|
||||
DECLARE_DRIVER_INIT(toppoker);
|
||||
DECLARE_DRIVER_INIT(lotse_bank0);
|
||||
DECLARE_DRIVER_INIT(nocrypt_bank0);
|
||||
DECLARE_DRIVER_INIT(lotse);
|
||||
DECLARE_DRIVER_INIT(clatt);
|
||||
DECLARE_DRIVER_INIT(rou029);
|
||||
DECLARE_DRIVER_INIT(nocrypt);
|
||||
virtual void machine_reset() override;
|
||||
INTERRUPT_GEN_MEMBER(timer_irq);
|
||||
void sc1_common_init(int reels, int decrypt, int defaultbank);
|
||||
void Scorpion1_SetSwitchState(int strobe, int data, int state);
|
||||
int sc1_find_project_string( );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<stepper_device> m_reel0;
|
||||
required_device<stepper_device> m_reel1;
|
||||
required_device<stepper_device> m_reel2;
|
||||
required_device<stepper_device> m_reel3;
|
||||
required_device<stepper_device> m_reel4;
|
||||
required_device<stepper_device> m_reel5;
|
||||
optional_device<upd7759_device> m_upd7759;
|
||||
optional_device<bfm_bd1_device> m_vfd0;
|
||||
required_device<meters_device> m_meters;
|
||||
void scorpion1_adder2(machine_config &config);
|
||||
void scorpion1(machine_config &config);
|
||||
void scorpion1_viper(machine_config &config);
|
||||
int sc1_find_project_string();
|
||||
|
||||
void sc1_adder2(address_map &map);
|
||||
void sc1_base(address_map &map);
|
||||
void sc1_viper(address_map &map);
|
||||
|
||||
private:
|
||||
int m_mmtr_latch;
|
||||
int m_triac_latch;
|
||||
int m_vfd_latch; //initialized but not used
|
||||
int m_irq_status;
|
||||
int m_optic_pattern;
|
||||
|
||||
int m_acia_status;
|
||||
int m_locked;
|
||||
int m_is_timer_enabled;
|
||||
int m_coin_inhibits; //initialized but not used
|
||||
int m_mux1_outputlatch;
|
||||
int m_mux1_datalo;
|
||||
int m_mux1_datahi;
|
||||
int m_mux1_input;
|
||||
int m_mux2_outputlatch;
|
||||
int m_mux2_datalo;
|
||||
int m_mux2_datahi;
|
||||
int m_mux2_input;
|
||||
uint8_t m_sc1_Inputs[64];
|
||||
uint8_t m_codec_data[256];
|
||||
|
||||
int m_defaultbank;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device_array<stepper_device, 6> m_reels;
|
||||
optional_device<upd7759_device> m_upd7759;
|
||||
optional_device<bfm_bd1_device> m_vfd0;
|
||||
required_device<meters_device> m_meters;
|
||||
};
|
||||
|
||||
#define VFD_RESET 0x20
|
||||
#define VFD_CLOCK1 0x80
|
||||
#define VFD_DATA 0x40
|
||||
|
||||
#define MASTER_CLOCK (XTAL(4'000'000))
|
||||
static constexpr XTAL MASTER_CLOCK = 4_MHz_XTAL;
|
||||
|
||||
|
||||
void bfm_sc1_state::save_state()
|
||||
@ -315,11 +307,11 @@ WRITE8_MEMBER(bfm_sc1_state::reel12_w)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reel0->update((data>>4)&0x0f);
|
||||
m_reel1->update( data &0x0f);
|
||||
m_reels[0]->update((data>>4)&0x0f);
|
||||
m_reels[1]->update( data &0x0f);
|
||||
}
|
||||
awp_draw_reel(machine(),"reel1", *m_reel0);
|
||||
awp_draw_reel(machine(),"reel2", *m_reel1);
|
||||
awp_draw_reel(machine(),"reel1", *m_reels[0]);
|
||||
awp_draw_reel(machine(),"reel2", *m_reels[1]);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -332,22 +324,22 @@ WRITE8_MEMBER(bfm_sc1_state::reel34_w)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reel2->update((data>>4)&0x0f);
|
||||
m_reel3->update( data &0x0f);
|
||||
m_reels[2]->update((data>>4)&0x0f);
|
||||
m_reels[3]->update( data &0x0f);
|
||||
}
|
||||
awp_draw_reel(machine(),"reel3", *m_reel2);
|
||||
awp_draw_reel(machine(),"reel4", *m_reel3);
|
||||
awp_draw_reel(machine(),"reel3", *m_reels[2]);
|
||||
awp_draw_reel(machine(),"reel4", *m_reels[3]);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WRITE8_MEMBER(bfm_sc1_state::reel56_w)
|
||||
{
|
||||
m_reel4->update((data>>4)&0x0f);
|
||||
m_reel5->update( data &0x0f);
|
||||
m_reels[4]->update((data>>4)&0x0f);
|
||||
m_reels[5]->update( data &0x0f);
|
||||
|
||||
awp_draw_reel(machine(),"reel5", *m_reel4);
|
||||
awp_draw_reel(machine(),"reel6", *m_reel5);
|
||||
awp_draw_reel(machine(),"reel5", *m_reels[4]);
|
||||
awp_draw_reel(machine(),"reel6", *m_reels[5]);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -1102,17 +1094,17 @@ MACHINE_CONFIG_START(bfm_sc1_state::scorpion1)
|
||||
MCFG_DEFAULT_LAYOUT(layout_sc1_vfd)
|
||||
|
||||
MCFG_STARPOINT_48STEP_ADD("reel0")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel0_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel_optic_cb<0>))
|
||||
MCFG_STARPOINT_48STEP_ADD("reel1")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel1_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel_optic_cb<1>))
|
||||
MCFG_STARPOINT_48STEP_ADD("reel2")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel2_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel_optic_cb<2>))
|
||||
MCFG_STARPOINT_48STEP_ADD("reel3")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel3_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel_optic_cb<3>))
|
||||
MCFG_STARPOINT_48STEP_ADD("reel4")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel4_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel_optic_cb<4>))
|
||||
MCFG_STARPOINT_48STEP_ADD("reel5")
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel5_optic_cb))
|
||||
MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(bfm_sc1_state, reel_optic_cb<5>))
|
||||
|
||||
MCFG_DEVICE_ADD("meters", METERS, 0)
|
||||
MCFG_METERS_NUMBER(8)
|
||||
@ -1154,12 +1146,12 @@ void bfm_sc1_state::sc1_common_init(int reels, int decrypt, int defaultbank)
|
||||
// setup n default 96 half step reels ///////////////////////////////////////////
|
||||
/*switch (reels)
|
||||
{
|
||||
case 6: m_reel5->configure(&starpoint_interface_48step);
|
||||
case 5: m_reel4->configure(&starpoint_interface_48step);
|
||||
case 4: m_reel3->configure(&starpoint_interface_48step);
|
||||
case 3: m_reel2->configure(&starpoint_interface_48step);
|
||||
case 2: m_reel1->configure(&starpoint_interface_48step);
|
||||
case 1: m_reel0->configure(&starpoint_interface_48step);
|
||||
case 6: m_reels[5]->configure(&starpoint_interface_48step);
|
||||
case 5: m_reels[4]->configure(&starpoint_interface_48step);
|
||||
case 4: m_reels[3]->configure(&starpoint_interface_48step);
|
||||
case 3: m_reels[2]->configure(&starpoint_interface_48step);
|
||||
case 2: m_reels[1]->configure(&starpoint_interface_48step);
|
||||
case 1: m_reels[0]->configure(&starpoint_interface_48step);
|
||||
}*/
|
||||
if (decrypt) bfm_decode_mainrom(machine(),"maincpu", m_codec_data); // decode main rom
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -83,7 +83,8 @@ public:
|
||||
m_sc0_vram(*this, "sc0_vram"),
|
||||
m_sc0_attr(*this, "sc0_attr"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode") { }
|
||||
m_gfxdecode(*this, "gfxdecode")
|
||||
{ }
|
||||
|
||||
void vvillage(machine_config &config);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "superbug.lh"
|
||||
|
||||
#define MASTER_CLOCK (XTAL(12'096'000))
|
||||
static constexpr XTAL MASTER_CLOCK = 12.096_MHz_XTAL;
|
||||
|
||||
|
||||
void firetrk_state::set_service_mode(int enable)
|
||||
|
@ -24,8 +24,8 @@ TODO:
|
||||
#include "quizshow.lh"
|
||||
|
||||
|
||||
#define MASTER_CLOCK XTAL(12'096'000)
|
||||
#define PIXEL_CLOCK (MASTER_CLOCK/2)
|
||||
static constexpr XTAL MASTER_CLOCK = 12.096_MHz_XTAL;
|
||||
static constexpr XTAL PIXEL_CLOCK = MASTER_CLOCK / 2;
|
||||
|
||||
#define HTOTAL ((32+8+4+1) * 8)
|
||||
#define HBEND (0)
|
||||
|
@ -20,10 +20,10 @@ Possibly related to ADP hardware? The HD63484 video board is definitely absent h
|
||||
class stellafr_state : public driver_device
|
||||
{
|
||||
public:
|
||||
stellafr_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_duart(*this, "duart")
|
||||
stellafr_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_duart(*this, "duart")
|
||||
{ }
|
||||
|
||||
void stellafr(machine_config &config);
|
||||
|
@ -62,6 +62,8 @@ public:
|
||||
void superslave(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
void superslave_io(address_map &map);
|
||||
void superslave_mem(address_map &map);
|
||||
|
||||
@ -82,9 +84,6 @@ private:
|
||||
required_device<rs232_port_device> m_rs232d;
|
||||
required_memory_region m_rom;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
uint8_t m_memctrl;
|
||||
uint8_t m_cmd;
|
||||
};
|
||||
|
@ -81,6 +81,7 @@ protected:
|
||||
void dsp_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void tomcat_map(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<tms5220_device> m_tms;
|
||||
int m_control_num;
|
||||
|
@ -271,7 +271,7 @@ GFXDECODE_END
|
||||
MACHINE_CONFIG_START(tunhunt_state::tunhunt)
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6502, XTAL(12'096'000)/6) /* ??? */
|
||||
MCFG_CPU_ADD("maincpu", M6502, 12.096_MHz_XTAL/6) /* ??? */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(tunhunt_state, irq0_line_hold, 4*60) /* 48V, 112V, 176V, 240V */
|
||||
|
||||
@ -292,12 +292,12 @@ MACHINE_CONFIG_START(tunhunt_state::tunhunt)
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("pokey1", POKEY, XTAL(12'096'000)/10)
|
||||
MCFG_SOUND_ADD("pokey1", POKEY, 12.096_MHz_XTAL/10)
|
||||
MCFG_POKEY_ALLPOT_R_CB(IOPORT("DSW"))
|
||||
MCFG_POKEY_OUTPUT_RC(RES_K(1), CAP_U(0.047), 5.0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
|
||||
MCFG_SOUND_ADD("pokey2", POKEY, XTAL(12'096'000)/10)
|
||||
MCFG_SOUND_ADD("pokey2", POKEY, 12.096_MHz_XTAL/10)
|
||||
MCFG_POKEY_POT0_R_CB(IOPORT("IN1"))
|
||||
MCFG_POKEY_POT1_R_CB(IOPORT("IN2"))
|
||||
MCFG_POKEY_POT2_R_CB(READ8(tunhunt_state, dsw2_0r))
|
||||
|
@ -137,7 +137,6 @@ MACHINE_CONFIG_START(zorba_state::zorba)
|
||||
MCFG_CPU_ADD("maincpu", Z80, 24_MHz_XTAL / 6)
|
||||
MCFG_CPU_PROGRAM_MAP(zorba_mem)
|
||||
MCFG_CPU_IO_MAP(zorba_io)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(zorba_state, zorba)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green())
|
||||
@ -268,7 +267,7 @@ MACHINE_CONFIG_END
|
||||
// Initialise/reset
|
||||
//-------------------------------------------------
|
||||
|
||||
DRIVER_INIT_MEMBER( zorba_state, zorba )
|
||||
void zorba_state::machine_start()
|
||||
{
|
||||
uint8_t *main = memregion("maincpu")->base();
|
||||
|
||||
@ -291,7 +290,7 @@ DRIVER_INIT_MEMBER( zorba_state, zorba )
|
||||
m_printer_select = 0;
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER( zorba_state, zorba )
|
||||
void zorba_state::machine_reset()
|
||||
{
|
||||
m_uart2->write_cts(0); // always asserted
|
||||
|
||||
@ -561,8 +560,8 @@ ROM_START( zorba )
|
||||
ROM_LOAD( "74ls288.u77", 0x0040, 0x0020, CRC(946e03b0) SHA1(24240bdd7bdf507a5b51628fb36ad1266fc53a28) BAD_DUMP ) // looks like bad dump of address decode PROM
|
||||
ROM_END
|
||||
|
||||
COMP( 1984?, zorba, 0, 0, zorba, zorba, zorba_state, zorba, "Modular Micros", "Zorba (Modular Micros)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1984?, zorba, 0, 0, zorba, zorba, zorba_state, 0, "Modular Micros", "Zorba (Modular Micros)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
// Undumped versions (see startup screen notes at top of file)
|
||||
// COMP( 1983, zorbat, zorba, 0, zorba, zorba, zorba_state, zorba, "Telcon Industries", "Zorba (Telcon Industries)", MACHINE_NOT_WORKING )
|
||||
// COMP( 1984, zorbag, zorba, 0, zorba, zorba, zorba_state, zorba, "Gemini Electronics", "Zorba (Gemini Electronics)", MACHINE_NOT_WORKING )
|
||||
// COMP( 1983, zorbat, zorba, 0, zorba, zorba, zorba_state, 0, "Telcon Industries", "Zorba (Telcon Industries)", MACHINE_NOT_WORKING )
|
||||
// COMP( 1984, zorbag, zorba, 0, zorba, zorba, zorba_state, 0, "Gemini Electronics", "Zorba (Gemini Electronics)", MACHINE_NOT_WORKING )
|
||||
|
@ -5,36 +5,58 @@
|
||||
Atari Arcade Classics hardware (prototypes)
|
||||
|
||||
*************************************************************************/
|
||||
#ifndef MAME_INCLUDES_ARCADECL_H
|
||||
#define MAME_INCLUDES_ARCADECL_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/atarigen.h"
|
||||
#include "video/atarimo.h"
|
||||
#include "sound/okim6295.h"
|
||||
|
||||
class arcadecl_state : public atarigen_state
|
||||
class sparkz_state : public atarigen_state
|
||||
{
|
||||
public:
|
||||
arcadecl_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: atarigen_state(mconfig, type, tag),
|
||||
m_oki(*this, "oki"),
|
||||
m_mob(*this, "mob"),
|
||||
m_bitmap(*this, "bitmap") { }
|
||||
sparkz_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: atarigen_state(mconfig, type, tag)
|
||||
, m_oki(*this, "oki")
|
||||
, m_bitmap(*this, "bitmap")
|
||||
{ }
|
||||
|
||||
required_device<okim6295_device> m_oki;
|
||||
optional_device<atari_motion_objects_device> m_mob;
|
||||
required_shared_ptr<uint16_t> m_bitmap;
|
||||
void sparkz(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
virtual void update_interrupts() override;
|
||||
virtual void scanline_update(screen_device &screen, int scanline) override;
|
||||
DECLARE_WRITE16_MEMBER(latch_w);
|
||||
DECLARE_DRIVER_INIT(sparkz);
|
||||
DECLARE_MACHINE_START(arcadecl);
|
||||
DECLARE_MACHINE_RESET(arcadecl);
|
||||
DECLARE_VIDEO_START(arcadecl);
|
||||
uint32_t screen_update_arcadecl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void arcadecl_bitmap_render(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void main_map(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_shared_ptr<uint16_t> m_bitmap;
|
||||
};
|
||||
|
||||
|
||||
class arcadecl_state : public sparkz_state
|
||||
{
|
||||
public:
|
||||
arcadecl_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: sparkz_state(mconfig, type, tag)
|
||||
, m_mob(*this, "mob")
|
||||
{ }
|
||||
|
||||
void arcadecl(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) override;
|
||||
|
||||
private:
|
||||
required_device<atari_motion_objects_device> m_mob;
|
||||
|
||||
static const atari_motion_objects_config s_mob_config;
|
||||
void sparkz(machine_config &config);
|
||||
void arcadecl(machine_config &config);
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_ARCADECL_H
|
||||
|
@ -1,24 +1,31 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
#ifndef MAME_INCLUDES_BFM_AD5_H
|
||||
#define MAME_INCLUDES_BFM_AD5_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "includes/bfm_sc4.h"
|
||||
|
||||
|
||||
class adder5_state : public driver_device
|
||||
{
|
||||
public:
|
||||
adder5_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu")
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
{ }
|
||||
|
||||
DECLARE_DRIVER_INIT(ad5);
|
||||
void bfm_ad5(machine_config &config);
|
||||
void ad5_map(address_map &map);
|
||||
protected:
|
||||
|
||||
protected:
|
||||
INTERRUPT_GEN_MEMBER(ad5_fake_timer_int);
|
||||
void ad5_map(address_map &map);
|
||||
|
||||
private:
|
||||
// devices
|
||||
required_device<cpu_device> m_maincpu;
|
||||
public:
|
||||
DECLARE_DRIVER_INIT(ad5);
|
||||
INTERRUPT_GEN_MEMBER(ad5_fake_timer_int);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_BFM_AD5_H
|
||||
|
@ -5,6 +5,10 @@
|
||||
Atari Liberator hardware
|
||||
|
||||
*************************************************************************/
|
||||
#ifndef MAME_INCLUDES_LIBERATR_H
|
||||
#define MAME_INCLUDES_LIBERATR_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/74259.h"
|
||||
@ -17,18 +21,27 @@ class liberatr_state : public driver_device
|
||||
{
|
||||
public:
|
||||
liberatr_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_earom(*this, "earom"),
|
||||
m_earom_data(0),
|
||||
m_earom_control(0),
|
||||
m_outlatch(*this, "outlatch"),
|
||||
m_screen(*this, "screen"),
|
||||
m_base_ram(*this, "base_ram"),
|
||||
m_planet_frame(*this, "planet_frame"),
|
||||
m_xcoord(*this, "xcoord"),
|
||||
m_ycoord(*this, "ycoord"),
|
||||
m_bitmapram(*this, "bitmapram"),
|
||||
m_colorram(*this, "colorram") { }
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_earom(*this, "earom")
|
||||
, m_earom_data(0)
|
||||
, m_earom_control(0)
|
||||
, m_outlatch(*this, "outlatch")
|
||||
, m_screen(*this, "screen")
|
||||
, m_base_ram(*this, "base_ram")
|
||||
, m_planet_frame(*this, "planet_frame")
|
||||
, m_xcoord(*this, "xcoord")
|
||||
, m_ycoord(*this, "ycoord")
|
||||
, m_bitmapram(*this, "bitmapram")
|
||||
, m_colorram(*this, "colorram")
|
||||
{ }
|
||||
|
||||
void liberat2(machine_config &config);
|
||||
void liberatr(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(output_latch_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(start_led_1_w);
|
||||
@ -52,43 +65,10 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( earom_w );
|
||||
DECLARE_WRITE8_MEMBER( earom_control_w );
|
||||
|
||||
void liberat2(machine_config &config);
|
||||
void liberatr(machine_config &config);
|
||||
void liberat2_map(address_map &map);
|
||||
void liberatr_map(address_map &map);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
// vector and early raster EAROM interface
|
||||
required_device<er2055_device> m_earom;
|
||||
uint8_t m_earom_data;
|
||||
uint8_t m_earom_control;
|
||||
|
||||
required_device<ls259_device> m_outlatch;
|
||||
|
||||
struct planet;
|
||||
|
||||
void init_planet(planet &liberatr_planet, uint8_t *planet_rom);
|
||||
void get_pens(pen_t *pens);
|
||||
void draw_planet(bitmap_rgb32 &bitmap, pen_t *pens);
|
||||
void draw_bitmap(bitmap_rgb32 &bitmap, pen_t *pens);
|
||||
|
||||
required_device<screen_device> m_screen;
|
||||
required_shared_ptr<uint8_t> m_base_ram;
|
||||
required_shared_ptr<uint8_t> m_planet_frame;
|
||||
required_shared_ptr<uint8_t> m_xcoord;
|
||||
required_shared_ptr<uint8_t> m_ycoord;
|
||||
required_shared_ptr<uint8_t> m_bitmapram;
|
||||
required_shared_ptr<uint8_t> m_colorram;
|
||||
|
||||
uint8_t m_trackball_offset;
|
||||
uint8_t m_ctrld;
|
||||
uint8_t m_videoram[0x10000];
|
||||
|
||||
bool m_planet_select;
|
||||
|
||||
// The following structure describes the (up to 32) line segments
|
||||
// that make up one horizontal line (latitude) for one display frame of the planet.
|
||||
// Note: this and the following structure is only used to collect the
|
||||
@ -120,7 +100,35 @@ protected:
|
||||
uint8_t *frames[256];
|
||||
};
|
||||
|
||||
void init_planet(planet &liberatr_planet, uint8_t *planet_rom);
|
||||
void get_pens(pen_t *pens);
|
||||
void draw_planet(bitmap_rgb32 &bitmap, pen_t *pens);
|
||||
void draw_bitmap(bitmap_rgb32 &bitmap, pen_t *pens);
|
||||
|
||||
// vector and early raster EAROM interface
|
||||
required_device<er2055_device> m_earom;
|
||||
uint8_t m_earom_data;
|
||||
uint8_t m_earom_control;
|
||||
|
||||
required_device<ls259_device> m_outlatch;
|
||||
|
||||
required_device<screen_device> m_screen;
|
||||
required_shared_ptr<uint8_t> m_base_ram;
|
||||
required_shared_ptr<uint8_t> m_planet_frame;
|
||||
required_shared_ptr<uint8_t> m_xcoord;
|
||||
required_shared_ptr<uint8_t> m_ycoord;
|
||||
required_shared_ptr<uint8_t> m_bitmapram;
|
||||
required_shared_ptr<uint8_t> m_colorram;
|
||||
|
||||
uint8_t m_trackball_offset;
|
||||
uint8_t m_ctrld;
|
||||
uint8_t m_videoram[0x10000];
|
||||
|
||||
bool m_planet_select;
|
||||
|
||||
// The following array collects the 2 different planet
|
||||
// descriptions, which are selected by planetbit
|
||||
planet m_planets[2];
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_LIBERATR_H
|
||||
|
@ -35,18 +35,18 @@
|
||||
class pcw16_state : public driver_device
|
||||
{
|
||||
public:
|
||||
pcw16_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_flash0(*this, "flash0"),
|
||||
m_flash1(*this, "flash1"),
|
||||
m_fdc(*this, "fdc"),
|
||||
m_uart2(*this, "ns16550_2"),
|
||||
m_beeper(*this, "beeper"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_keyboard(*this, "at_keyboard"),
|
||||
m_region_rom(*this, "maincpu"),
|
||||
m_io_extra(*this, "EXTRA")
|
||||
pcw16_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_flash0(*this, "flash0"),
|
||||
m_flash1(*this, "flash1"),
|
||||
m_fdc(*this, "fdc"),
|
||||
m_uart2(*this, "ns16550_2"),
|
||||
m_beeper(*this, "beeper"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_keyboard(*this, "at_keyboard"),
|
||||
m_region_rom(*this, "maincpu"),
|
||||
m_io_extra(*this, "EXTRA")
|
||||
{ }
|
||||
|
||||
void pcw16(machine_config &config);
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Stefan Jokisch
|
||||
#ifndef MAME_INCLUDES_SPRINT4_H
|
||||
#define MAME_INCLUDES_SPRINT4_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/watchdog.h"
|
||||
#include "sound/discrete.h"
|
||||
@ -13,16 +17,57 @@ public:
|
||||
TIMER_NMI
|
||||
};
|
||||
|
||||
sprint4_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
sprint4_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_watchdog(*this, "watchdog"),
|
||||
m_discrete(*this, "discrete"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_videoram(*this, "videoram") { }
|
||||
m_videoram(*this, "videoram")
|
||||
{ }
|
||||
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(get_lever);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(get_wheel);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(get_collision);
|
||||
void sprint4(machine_config &config);
|
||||
|
||||
protected:
|
||||
DECLARE_READ8_MEMBER(wram_r);
|
||||
DECLARE_READ8_MEMBER(analog_r);
|
||||
DECLARE_READ8_MEMBER(coin_r);
|
||||
DECLARE_READ8_MEMBER(collision_r);
|
||||
DECLARE_READ8_MEMBER(options_r);
|
||||
DECLARE_WRITE8_MEMBER(wram_w);
|
||||
DECLARE_WRITE8_MEMBER(collision_reset_w);
|
||||
DECLARE_WRITE8_MEMBER(da_latch_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp3_w);
|
||||
DECLARE_WRITE8_MEMBER(video_ram_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_1_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_2_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_3_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_4_w);
|
||||
DECLARE_WRITE8_MEMBER(bang_w);
|
||||
DECLARE_WRITE8_MEMBER(attract_w);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
DECLARE_PALETTE_INIT(sprint4);
|
||||
|
||||
TILE_GET_INFO_MEMBER(tile_info);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
|
||||
TIMER_CALLBACK_MEMBER(nmi_callback);
|
||||
|
||||
void sprint4_cpu_map(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<watchdog_timer_device> m_watchdog;
|
||||
required_device<discrete_device> m_discrete;
|
||||
@ -41,42 +86,6 @@ public:
|
||||
tilemap_t* m_playfield;
|
||||
bitmap_ind16 m_helper;
|
||||
emu_timer *m_nmi_timer;
|
||||
|
||||
DECLARE_READ8_MEMBER(wram_r);
|
||||
DECLARE_READ8_MEMBER(analog_r);
|
||||
DECLARE_READ8_MEMBER(coin_r);
|
||||
DECLARE_READ8_MEMBER(collision_r);
|
||||
DECLARE_READ8_MEMBER(options_r);
|
||||
DECLARE_WRITE8_MEMBER(wram_w);
|
||||
DECLARE_WRITE8_MEMBER(collision_reset_w);
|
||||
DECLARE_WRITE8_MEMBER(da_latch_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(lamp3_w);
|
||||
DECLARE_WRITE8_MEMBER(video_ram_w);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(get_lever);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(get_wheel);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(get_collision);
|
||||
DECLARE_WRITE8_MEMBER(screech_1_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_2_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_3_w);
|
||||
DECLARE_WRITE8_MEMBER(screech_4_w);
|
||||
DECLARE_WRITE8_MEMBER(bang_w);
|
||||
DECLARE_WRITE8_MEMBER(attract_w);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
DECLARE_PALETTE_INIT(sprint4);
|
||||
|
||||
TILE_GET_INFO_MEMBER(tile_info);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
|
||||
TIMER_CALLBACK_MEMBER(nmi_callback);
|
||||
|
||||
void sprint4(machine_config &config);
|
||||
void sprint4_cpu_map(address_map &map);
|
||||
protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_SPRINT4_H
|
||||
|
@ -13,8 +13,8 @@
|
||||
class sprint8_state : public driver_device
|
||||
{
|
||||
public:
|
||||
sprint8_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
sprint8_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
|
@ -1,12 +1,17 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Phil Stroffolino, David Haywood
|
||||
#ifndef MAME_INCLUDES_TUNHUNT_H
|
||||
#define MAME_INCLUDES_TUNHUNT_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
class tunhunt_state : public driver_device
|
||||
{
|
||||
public:
|
||||
tunhunt_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
tunhunt_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
@ -14,22 +19,12 @@ public:
|
||||
m_workram(*this, "workram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_generic_paletteram_8(*this, "paletteram") { }
|
||||
m_generic_paletteram_8(*this, "paletteram")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_shared_ptr<uint8_t> m_workram;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_generic_paletteram_8;
|
||||
|
||||
uint8_t m_control;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
bitmap_ind16 m_tmpbitmap;
|
||||
void tunhunt(machine_config &config);
|
||||
|
||||
protected:
|
||||
DECLARE_WRITE8_MEMBER(control_w);
|
||||
DECLARE_READ8_MEMBER(button_r);
|
||||
DECLARE_WRITE8_MEMBER(videoram_w);
|
||||
@ -49,7 +44,23 @@ public:
|
||||
void draw_motion_object(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_box(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_shell(bitmap_ind16 &bitmap, const rectangle &cliprect, int picture_code,
|
||||
int hposition,int vstart,int vstop,int vstretch,int hstretch);
|
||||
void tunhunt(machine_config &config);
|
||||
void main_map(address_map &map);
|
||||
int hposition,int vstart,int vstop,int vstretch,int hstretch);
|
||||
void main_map(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_shared_ptr<uint8_t> m_workram;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_generic_paletteram_8;
|
||||
|
||||
uint8_t m_control;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
bitmap_ind16 m_tmpbitmap;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_TUNHUNT_H
|
||||
|
@ -5,6 +5,10 @@
|
||||
Atari Wolf Pack (prototype) driver
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef MAME_INCLUDES_WOLFPACK_H
|
||||
#define MAME_INCLUDES_WOLFPACK_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sound/s14001a.h"
|
||||
#include "screen.h"
|
||||
@ -17,8 +21,8 @@ public:
|
||||
TIMER_PERIODIC
|
||||
};
|
||||
|
||||
wolfpack_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
wolfpack_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_alpha_num_ram(*this, "alpha_num_ram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_s14001a(*this, "speech"),
|
||||
@ -27,32 +31,10 @@ public:
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
|
||||
// devices, pointers
|
||||
required_shared_ptr<uint8_t> m_alpha_num_ram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<s14001a_device> m_s14001a;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
bool m_collision;
|
||||
unsigned m_current_index;
|
||||
uint8_t m_video_invert;
|
||||
uint8_t m_ship_reflect;
|
||||
uint8_t m_pt_pos_select;
|
||||
uint8_t m_pt_horz;
|
||||
uint8_t m_pt_pic;
|
||||
uint8_t m_ship_h;
|
||||
uint8_t m_torpedo_pic;
|
||||
uint8_t m_ship_size;
|
||||
uint8_t m_ship_h_precess;
|
||||
uint8_t m_ship_pic;
|
||||
uint8_t m_torpedo_h;
|
||||
uint8_t m_torpedo_v;
|
||||
std::unique_ptr<uint8_t[]> m_LFSR;
|
||||
bitmap_ind16 m_helper;
|
||||
emu_timer *m_periodic_timer;
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(dial_r);
|
||||
void wolfpack(machine_config &config);
|
||||
|
||||
protected:
|
||||
DECLARE_READ8_MEMBER(misc_r);
|
||||
DECLARE_WRITE8_MEMBER(high_explo_w);
|
||||
DECLARE_WRITE8_MEMBER(sonar_ping_w);
|
||||
@ -79,13 +61,13 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(ship_pic_w);
|
||||
DECLARE_WRITE8_MEMBER(torpedo_h_w);
|
||||
DECLARE_WRITE8_MEMBER(torpedo_v_w);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(dial_r);
|
||||
DECLARE_WRITE8_MEMBER(word_w);
|
||||
DECLARE_WRITE8_MEMBER(start_speech_w);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
DECLARE_PALETTE_INIT(wolfpack);
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
@ -96,8 +78,34 @@ public:
|
||||
void draw_pt(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_water(palette_device &palette, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void wolfpack(machine_config &config);
|
||||
void main_map(address_map &map);
|
||||
protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
private:
|
||||
// devices, pointers
|
||||
required_shared_ptr<uint8_t> m_alpha_num_ram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<s14001a_device> m_s14001a;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
bool m_collision;
|
||||
unsigned m_current_index;
|
||||
uint8_t m_video_invert;
|
||||
uint8_t m_ship_reflect;
|
||||
uint8_t m_pt_pos_select;
|
||||
uint8_t m_pt_horz;
|
||||
uint8_t m_pt_pic;
|
||||
uint8_t m_ship_h;
|
||||
uint8_t m_torpedo_pic;
|
||||
uint8_t m_ship_size;
|
||||
uint8_t m_ship_h_precess;
|
||||
uint8_t m_ship_pic;
|
||||
uint8_t m_torpedo_h;
|
||||
uint8_t m_torpedo_v;
|
||||
std::unique_ptr<uint8_t[]> m_LFSR;
|
||||
bitmap_ind16 m_helper;
|
||||
emu_timer *m_periodic_timer;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_WOLFPACK_H
|
||||
|
@ -42,9 +42,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
DECLARE_DRIVER_INIT(zorba);
|
||||
DECLARE_MACHINE_RESET(zorba);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(printer_type);
|
||||
void zorba(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
void zorba_io(address_map &map);
|
||||
void zorba_mem(address_map &map);
|
||||
|
||||
// Memory banking control
|
||||
DECLARE_READ8_MEMBER(ram_r);
|
||||
@ -78,11 +84,7 @@ public:
|
||||
// Printer port glue
|
||||
DECLARE_WRITE_LINE_MEMBER(printer_fault_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(printer_select_w);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(printer_type);
|
||||
|
||||
void zorba(machine_config &config);
|
||||
void zorba_io(address_map &map);
|
||||
void zorba_mem(address_map &map);
|
||||
private:
|
||||
required_ioport m_config_port;
|
||||
|
||||
|
@ -54,10 +54,9 @@ const atari_motion_objects_config arcadecl_state::s_mob_config =
|
||||
0 /* resulting value to indicate "special" */
|
||||
};
|
||||
|
||||
VIDEO_START_MEMBER(arcadecl_state,arcadecl)
|
||||
void arcadecl_state::video_start()
|
||||
{
|
||||
if (m_mob != nullptr)
|
||||
m_mob->set_scroll(-12, 0x110);
|
||||
m_mob->set_scroll(-12, 0x110);
|
||||
}
|
||||
|
||||
|
||||
@ -68,32 +67,29 @@ VIDEO_START_MEMBER(arcadecl_state,arcadecl)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t arcadecl_state::screen_update_arcadecl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t arcadecl_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// start drawing
|
||||
if (m_mob != nullptr)
|
||||
m_mob->draw_async(cliprect);
|
||||
m_mob->draw_async(cliprect);
|
||||
|
||||
// draw the playfield
|
||||
arcadecl_bitmap_render(bitmap, cliprect);
|
||||
sparkz_state::screen_update(screen, bitmap, cliprect);
|
||||
|
||||
// draw and merge the MO
|
||||
if (m_mob != nullptr)
|
||||
{
|
||||
bitmap_ind16 &mobitmap = m_mob->bitmap();
|
||||
for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
|
||||
for (int y = rect->min_y; y <= rect->max_y; y++)
|
||||
{
|
||||
uint16_t *mo = &mobitmap.pix16(y);
|
||||
uint16_t *pf = &bitmap.pix16(y);
|
||||
for (int x = rect->min_x; x <= rect->max_x; x++)
|
||||
if (mo[x] != 0xffff)
|
||||
{
|
||||
// not yet verified
|
||||
pf[x] = mo[x];
|
||||
}
|
||||
}
|
||||
}
|
||||
bitmap_ind16 &mobitmap = m_mob->bitmap();
|
||||
for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
|
||||
for (int y = rect->min_y; y <= rect->max_y; y++)
|
||||
{
|
||||
uint16_t *mo = &mobitmap.pix16(y);
|
||||
uint16_t *pf = &bitmap.pix16(y);
|
||||
for (int x = rect->min_x; x <= rect->max_x; x++)
|
||||
if (mo[x] != 0xffff)
|
||||
{
|
||||
// not yet verified
|
||||
pf[x] = mo[x];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -105,22 +101,22 @@ uint32_t arcadecl_state::screen_update_arcadecl(screen_device &screen, bitmap_in
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void arcadecl_state::arcadecl_bitmap_render(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t sparkz_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
/* update any dirty scanlines */
|
||||
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||
// update any dirty scanlines
|
||||
for (int y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||
{
|
||||
const uint16_t *src = &m_bitmap[256 * y];
|
||||
uint16_t *dst = &bitmap.pix16(y);
|
||||
const uint16_t *const src = &m_bitmap[256 * y];
|
||||
uint16_t *const dst = &bitmap.pix16(y);
|
||||
|
||||
/* regenerate the line */
|
||||
for (x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
|
||||
for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2)
|
||||
{
|
||||
int bits = src[(x - 8) / 2];
|
||||
dst[x + 0] = bits >> 8;
|
||||
dst[x + 1] = bits & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user