mirror of
https://github.com/holub/mame
synced 2025-07-07 19:03:29 +03:00
- atari/arcadecl.cpp, atari/cybstorm.cpp: consolidated drivers in single files
- various drivers: removed unneeded bankdev.h include
This commit is contained in:
parent
074670cd81
commit
a5c9a9e29a
@ -34,7 +34,6 @@
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/pcf8573.h"
|
||||
#include "machine/scn_pci.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "sound/beep.h"
|
||||
#include "sound/pcd3311.h"
|
||||
#include "video/saa5240.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "bus/ata/ataintf.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/6525tpi.h"
|
||||
#include "machine/mos6526.h"
|
||||
#include "machine/gayle.h"
|
||||
|
@ -122,7 +122,6 @@ MIG RAM page 2 $CE02 is the speaker/slot bitfield and $CE03 is the paddle/accele
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/applefdintf.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/ds1315.h"
|
||||
#include "machine/iwm.h"
|
||||
#include "machine/kb3600.h"
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/arm7/arm7.h"
|
||||
#include "cpu/arm7/arm7core.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/vic_pl192.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles
|
||||
// copyright-holders: Aaron Giles
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Atari Arcade Classics hardware (prototypes)
|
||||
@ -69,18 +70,193 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "arcadecl.h"
|
||||
|
||||
#include "atarimo.h"
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/eeprompar.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/watchdog.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "atarimo.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
#define MASTER_CLOCK XTAL(14'318'181)
|
||||
namespace {
|
||||
|
||||
class sparkz_state : public driver_device
|
||||
{
|
||||
public:
|
||||
sparkz_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")
|
||||
, m_oki(*this, "oki")
|
||||
, m_bitmap(*this, "bitmap")
|
||||
{ }
|
||||
|
||||
void sparkz(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<okim6295_device> m_oki;
|
||||
required_shared_ptr<uint16_t> m_bitmap;
|
||||
|
||||
private:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline_interrupt);
|
||||
void scanline_int_ack_w(uint16_t data);
|
||||
void latch_w(uint8_t data);
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
// video
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Note: this video hardware has some similarities to Shuuz & company
|
||||
The sprite offset registers are stored to 3EFF80
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video system start
|
||||
*
|
||||
*************************************/
|
||||
|
||||
const atari_motion_objects_config arcadecl_state::s_mob_config =
|
||||
{
|
||||
0, // index to which gfx system
|
||||
1, // number of motion object banks
|
||||
1, // are the entries linked?
|
||||
0, // are the entries split?
|
||||
0, // render in reverse order?
|
||||
0, // render in swapped X/Y order?
|
||||
0, // does the neighbor bit affect the next object?
|
||||
0, // pixels per SLIP entry (0 for no-slip)
|
||||
0, // pixel offset for SLIPs
|
||||
0, // maximum number of links to visit/scanline (0=all)
|
||||
|
||||
0x100, // base palette entry
|
||||
0x100, // maximum number of colors
|
||||
0, // transparent pen index
|
||||
|
||||
{{ 0x00ff,0,0,0 }}, // mask for the link
|
||||
{{ 0,0x7fff,0,0 }}, // mask for the code index
|
||||
{{ 0,0,0x000f,0 }}, // mask for the color
|
||||
{{ 0,0,0xff80,0 }}, // mask for the X position
|
||||
{{ 0,0,0,0xff80 }}, // mask for the Y position
|
||||
{{ 0,0,0,0x0070 }}, // mask for the width, in tiles*/
|
||||
{{ 0,0,0,0x0007 }}, // mask for the height, in tiles
|
||||
{{ 0,0x8000,0,0 }}, // mask for the horizontal flip
|
||||
{{ 0 }}, // mask for the vertical flip
|
||||
{{ 0 }}, // mask for the priority
|
||||
{{ 0 }}, // mask for the neighbor
|
||||
{{ 0 }}, // mask for absolute coordinates
|
||||
|
||||
{{ 0 }}, // mask for the special value
|
||||
0 // resulting value to indicate "special"
|
||||
};
|
||||
|
||||
void arcadecl_state::video_start()
|
||||
{
|
||||
m_mob->set_scroll(-12, 0x110);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Main refresh
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t arcadecl_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// start drawing
|
||||
m_mob->draw_async(cliprect);
|
||||
|
||||
// draw the playfield
|
||||
sparkz_state::screen_update(screen, bitmap, cliprect);
|
||||
|
||||
// draw and merge the MO
|
||||
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->top(); y <= rect->bottom(); y++)
|
||||
{
|
||||
uint16_t const *const mo = &mobitmap.pix(y);
|
||||
uint16_t *const pf = &bitmap.pix(y);
|
||||
for (int x = rect->left(); x <= rect->right(); x++)
|
||||
if (mo[x] != 0xffff)
|
||||
{
|
||||
// not yet verified
|
||||
pf[x] = mo[x];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Bitmap rendering
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t sparkz_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// update any dirty scanlines
|
||||
for (int y = cliprect.top(); y <= cliprect.bottom(); y++)
|
||||
{
|
||||
const uint16_t *const src = &m_bitmap[256 * y];
|
||||
uint16_t *const dst = &bitmap.pix(y);
|
||||
|
||||
// regenerate the line
|
||||
for (int x = cliprect.left() & ~1; x <= cliprect.right(); x += 2)
|
||||
{
|
||||
int const bits = src[(x - 8) / 2];
|
||||
dst[x + 0] = bits >> 8;
|
||||
dst[x + 1] = bits & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// machine
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -90,7 +266,7 @@
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(sparkz_state::scanline_interrupt)
|
||||
{
|
||||
/* generate 32V signals */
|
||||
// generate 32V signals
|
||||
if ((param & 32) == 0)
|
||||
m_maincpu->set_input_line(M68K_IRQ_4, ASSERT_LINE);
|
||||
}
|
||||
@ -102,19 +278,6 @@ void sparkz_state::scanline_int_ack_w(uint16_t data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Initialization
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void sparkz_state::machine_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Latch write
|
||||
@ -144,7 +307,7 @@ void sparkz_state::latch_w(uint8_t data)
|
||||
void sparkz_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x0fffff).rom();
|
||||
map(0x200000, 0x21ffff).ram().share("bitmap");
|
||||
map(0x200000, 0x21ffff).ram().share(m_bitmap);
|
||||
map(0x3c0000, 0x3c07ff).rw("palette", FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
|
||||
map(0x3e0000, 0x3e07ff).ram().share("mob");
|
||||
map(0x3e0800, 0x3effbf).ram();
|
||||
@ -266,7 +429,7 @@ static INPUT_PORTS_START( sparkz )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* not in "test mode" */
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE2 ) // not in "test mode"
|
||||
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("TRACKX2")
|
||||
@ -291,7 +454,7 @@ INPUT_PORTS_END
|
||||
*************************************/
|
||||
|
||||
static GFXDECODE_START( gfx_arcadecl )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 256, 16 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x4_packed_msb, 256, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -304,7 +467,9 @@ GFXDECODE_END
|
||||
|
||||
void sparkz_state::sparkz(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
static constexpr XTAL MASTER_CLOCK = 14.318181_MHz_XTAL;
|
||||
|
||||
// basic machine hardware
|
||||
M68000(config, m_maincpu, MASTER_CLOCK);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &sparkz_state::main_map);
|
||||
|
||||
@ -314,7 +479,7 @@ void sparkz_state::sparkz(machine_config &config)
|
||||
|
||||
WATCHDOG_TIMER(config, "watchdog");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
GFXDECODE(config, m_gfxdecode, "palette", gfx_arcadecl);
|
||||
palette_device &palette(PALETTE(config, "palette"));
|
||||
palette.set_format(palette_device::IRGB_1555, 512);
|
||||
@ -322,17 +487,17 @@ void sparkz_state::sparkz(machine_config &config)
|
||||
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
m_screen->set_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 */
|
||||
m_screen->set_raw(MASTER_CLOCK/2, 456, 0+12, 336+12, 262, 0, 240);
|
||||
// note: these parameters are from published specs, not derived
|
||||
// the board uses an SOS-2 chip to generate video signals
|
||||
m_screen->set_raw(MASTER_CLOCK / 2, 456, 0+12, 336+12, 262, 0, 240);
|
||||
m_screen->set_screen_update(FUNC(sparkz_state::screen_update));
|
||||
m_screen->set_palette("palette");
|
||||
//m_screen->screen_vblank().set(FUNC(sparkz_state::video_int_write_line));
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
OKIM6295(config, m_oki, MASTER_CLOCK/4/3, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
OKIM6295(config, m_oki, MASTER_CLOCK / 4 / 3, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
}
|
||||
|
||||
void arcadecl_state::arcadecl(machine_config &config)
|
||||
@ -375,6 +540,7 @@ ROM_START( sparkz )
|
||||
ROM_LOAD( "sparkzsn", 0x00000, 0x80000, CRC(87097ce2) SHA1(dc4d199b5af692d111c087af3edc01e2ac0287a8) )
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/*************************************
|
||||
|
@ -1,68 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles
|
||||
/*************************************************************************
|
||||
|
||||
Atari Arcade Classics hardware (prototypes)
|
||||
|
||||
*************************************************************************/
|
||||
#ifndef MAME_INCLUDES_ARCADECL_H
|
||||
#define MAME_INCLUDES_ARCADECL_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/timer.h"
|
||||
#include "atarimo.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "screen.h"
|
||||
|
||||
class sparkz_state : public driver_device
|
||||
{
|
||||
public:
|
||||
sparkz_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")
|
||||
, m_oki(*this, "oki")
|
||||
, m_bitmap(*this, "bitmap")
|
||||
{ }
|
||||
|
||||
void sparkz(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline_interrupt);
|
||||
void scanline_int_ack_w(uint16_t data);
|
||||
void latch_w(uint8_t data);
|
||||
virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void main_map(address_map &map);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
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;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_ARCADECL_H
|
@ -1,122 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles
|
||||
/***************************************************************************
|
||||
|
||||
Atari Arcade Classics hardware (prototypes)
|
||||
|
||||
Note: this video hardware has some similarities to Shuuz & company
|
||||
The sprite offset registers are stored to 3EFF80
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "atarimo.h"
|
||||
#include "arcadecl.h"
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video system start
|
||||
*
|
||||
*************************************/
|
||||
|
||||
const atari_motion_objects_config arcadecl_state::s_mob_config =
|
||||
{
|
||||
0, /* index to which gfx system */
|
||||
1, /* number of motion object banks */
|
||||
1, /* are the entries linked? */
|
||||
0, /* are the entries split? */
|
||||
0, /* render in reverse order? */
|
||||
0, /* render in swapped X/Y order? */
|
||||
0, /* does the neighbor bit affect the next object? */
|
||||
0, /* pixels per SLIP entry (0 for no-slip) */
|
||||
0, /* pixel offset for SLIPs */
|
||||
0, /* maximum number of links to visit/scanline (0=all) */
|
||||
|
||||
0x100, /* base palette entry */
|
||||
0x100, /* maximum number of colors */
|
||||
0, /* transparent pen index */
|
||||
|
||||
{{ 0x00ff,0,0,0 }}, /* mask for the link */
|
||||
{{ 0,0x7fff,0,0 }}, /* mask for the code index */
|
||||
{{ 0,0,0x000f,0 }}, /* mask for the color */
|
||||
{{ 0,0,0xff80,0 }}, /* mask for the X position */
|
||||
{{ 0,0,0,0xff80 }}, /* mask for the Y position */
|
||||
{{ 0,0,0,0x0070 }}, /* mask for the width, in tiles*/
|
||||
{{ 0,0,0,0x0007 }}, /* mask for the height, in tiles */
|
||||
{{ 0,0x8000,0,0 }}, /* mask for the horizontal flip */
|
||||
{{ 0 }}, /* mask for the vertical flip */
|
||||
{{ 0 }}, /* mask for the priority */
|
||||
{{ 0 }}, /* mask for the neighbor */
|
||||
{{ 0 }}, /* mask for absolute coordinates */
|
||||
|
||||
{{ 0 }}, /* mask for the special value */
|
||||
0 /* resulting value to indicate "special" */
|
||||
};
|
||||
|
||||
void arcadecl_state::video_start()
|
||||
{
|
||||
m_mob->set_scroll(-12, 0x110);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Main refresh
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t arcadecl_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// start drawing
|
||||
m_mob->draw_async(cliprect);
|
||||
|
||||
// draw the playfield
|
||||
sparkz_state::screen_update(screen, bitmap, cliprect);
|
||||
|
||||
// draw and merge the MO
|
||||
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->top(); y <= rect->bottom(); y++)
|
||||
{
|
||||
uint16_t const *const mo = &mobitmap.pix(y);
|
||||
uint16_t *const pf = &bitmap.pix(y);
|
||||
for (int x = rect->left(); x <= rect->right(); x++)
|
||||
if (mo[x] != 0xffff)
|
||||
{
|
||||
// not yet verified
|
||||
pf[x] = mo[x];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Bitmap rendering
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t sparkz_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// update any dirty scanlines
|
||||
for (int y = cliprect.top(); y <= cliprect.bottom(); y++)
|
||||
{
|
||||
const uint16_t *const src = &m_bitmap[256 * y];
|
||||
uint16_t *const dst = &bitmap.pix(y);
|
||||
|
||||
/* regenerate the line */
|
||||
for (int x = cliprect.left() & ~1; x <= cliprect.right(); x += 2)
|
||||
{
|
||||
int const bits = src[(x - 8) / 2];
|
||||
dst[x + 0] = bits >> 8;
|
||||
dst[x + 1] = bits & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "cpu/t11/t11.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "slapstic.h"
|
||||
#include "machine/timer.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles, Phil Bennett
|
||||
// copyright-holders: Aaron Giles, Phil Bennett
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Atari Cyberstorm hardware
|
||||
@ -19,13 +20,273 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "cybstorm.h"
|
||||
|
||||
#include "atarijsa.h"
|
||||
#include "atarivad.h"
|
||||
|
||||
#include "cpu/m68000/m68020.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/eeprompar.h"
|
||||
#include "machine/watchdog.h"
|
||||
#include "emupal.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class cybstorm_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cybstorm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_jsa(*this, "jsa")
|
||||
, m_vad(*this, "vad")
|
||||
, m_vadbank(*this, "vadbank")
|
||||
, m_screen(*this, "screen")
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
{ }
|
||||
|
||||
void cybstorm(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<atari_jsa_iiis_device> m_jsa;
|
||||
required_device<atari_vad_device> m_vad;
|
||||
required_device<address_map_bank_device> m_vadbank;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
uint32_t m_latch_data = 0U;
|
||||
uint8_t m_alpha_tile_bank = 0U;
|
||||
|
||||
static const atari_motion_objects_config s_mob_config;
|
||||
|
||||
void latch_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void round2(machine_config &config);
|
||||
void main_map(address_map &map);
|
||||
void vadbank_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
// video
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Tilemap callbacks
|
||||
*
|
||||
*************************************/
|
||||
|
||||
TILE_GET_INFO_MEMBER(cybstorm_state::get_alpha_tile_info)
|
||||
{
|
||||
uint16_t const data = m_vad->alpha().basemem_read(tile_index);
|
||||
int const code = ((data & 0x400) ? (m_alpha_tile_bank * 0x400) : 0) + (data & 0x3ff);
|
||||
int const color = (data >> 11) & 0x0f;
|
||||
int const opaque = data & 0x8000;
|
||||
tileinfo.set(2, code, color, opaque ? TILEMAP_PIXEL_LAYER0 : 0);
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(cybstorm_state::get_playfield_tile_info)
|
||||
{
|
||||
uint16_t const data1 = m_vad->playfield().basemem_read(tile_index);
|
||||
uint16_t const data2 = m_vad->playfield().extmem_read(tile_index) & 0xff;
|
||||
int const code = data1;
|
||||
int const color = 8 + (data2 & 0x07);
|
||||
tileinfo.set(0, code, color, data2 & 0x80 ? TILE_FLIPX : 0);
|
||||
tileinfo.category = (data2 >> 4) & 3;
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(cybstorm_state::get_playfield2_tile_info)
|
||||
{
|
||||
uint16_t const data1 = m_vad->playfield2().basemem_read(tile_index);
|
||||
uint16_t const data2 = m_vad->playfield2().extmem_read(tile_index) >> 8;
|
||||
int const code = data1;
|
||||
int const color = data2 & 0x07;
|
||||
tileinfo.set(0, code, color, data2 & 0x80 ? TILE_FLIPX : 0);
|
||||
tileinfo.category = (data2 >> 4) & 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video system start
|
||||
*
|
||||
*************************************/
|
||||
|
||||
const atari_motion_objects_config cybstorm_state::s_mob_config =
|
||||
{
|
||||
1, // index to which gfx system
|
||||
1, // number of motion object banks
|
||||
1, // are the entries linked?
|
||||
0, // are the entries split?
|
||||
1, // render in reverse order?
|
||||
0, // render in swapped X/Y order?
|
||||
0, // does the neighbor bit affect the next object?
|
||||
8, // pixels per SLIP entry (0 for no-slip)
|
||||
0, // pixel offset for SLIPs
|
||||
0, // maximum number of links to visit/scanline (0=all)
|
||||
|
||||
0x1000, // base palette entry
|
||||
0x1000, // maximum number of colors
|
||||
0, // transparent pen index
|
||||
|
||||
{{ 0x03ff,0,0,0 }}, // mask for the link
|
||||
{{ 0,0x7fff,0,0 }, { 0x3c00,0,0,0 }}, // mask for the code index
|
||||
{{ 0,0,0x000f,0 }}, // mask for the color
|
||||
{{ 0,0,0xff80,0 }}, // mask for the X position
|
||||
{{ 0,0,0,0xff80 }}, // mask for the Y position
|
||||
{{ 0,0,0,0x0070 }}, // mask for the width, in tiles*/
|
||||
{{ 0,0,0,0x0007 }}, // mask for the height, in tiles
|
||||
{{ 0,0x8000,0,0 }}, // mask for the horizontal flip
|
||||
{{ 0 }}, // mask for the vertical flip
|
||||
{{ 0,0,0x0070,0 }}, // mask for the priority
|
||||
{{ 0 }}, // mask for the neighbor
|
||||
{{ 0 }}, // mask for absolute coordinates
|
||||
|
||||
{{ 0 }}, // mask for the special value
|
||||
0, // resulting value to indicate "special"
|
||||
};
|
||||
|
||||
void cybstorm_state::video_start()
|
||||
{
|
||||
// motion objects have 256 color granularity
|
||||
m_gfxdecode->gfx(1)->set_granularity(256);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Main refresh
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t cybstorm_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_vad->mob().draw_async(cliprect);
|
||||
|
||||
// draw the playfield
|
||||
bitmap_ind8 &priority_bitmap = screen.priority();
|
||||
priority_bitmap.fill(0, cliprect);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 0, 0x00);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 1, 0x01);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 2, 0x02);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 3, 0x03);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 0, 0x80);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 1, 0x84);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 2, 0x88);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 3, 0x8c);
|
||||
|
||||
// draw and merge the MO
|
||||
bitmap_ind16 &mobitmap = m_vad->mob().bitmap();
|
||||
for (const sparse_dirty_rect *rect = m_vad->mob().first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
|
||||
for (int y = rect->top(); y <= rect->bottom(); y++)
|
||||
{
|
||||
uint16_t const *const mo = &mobitmap.pix(y);
|
||||
uint16_t *const pf = &bitmap.pix(y);
|
||||
uint8_t const *const pri = &priority_bitmap.pix(y);
|
||||
for (int x = rect->left(); x <= rect->right(); x++)
|
||||
if (mo[x])
|
||||
{
|
||||
int const mopriority = mo[x] >> atari_motion_objects_device::PRIORITY_SHIFT;
|
||||
|
||||
// upper bit of MO priority signals special rendering and doesn't draw anything
|
||||
if (mopriority & 4)
|
||||
{
|
||||
if ((mopriority & 0x3) != 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
// foreground playfield case
|
||||
if (pri[x] & 0x80)
|
||||
{
|
||||
int const pfpriority = (pri[x] >> 2) & 3;
|
||||
|
||||
if (mopriority > pfpriority)
|
||||
pf[x] = (mo[x] & atari_motion_objects_device::DATA_MASK) | 0x1000;
|
||||
}
|
||||
|
||||
// background playfield case
|
||||
else
|
||||
{
|
||||
int const pfpriority = pri[x] & 3;
|
||||
|
||||
// playfield priority 3 always wins
|
||||
if (pfpriority == 3)
|
||||
;
|
||||
|
||||
// otherwise, MOs get shown
|
||||
else
|
||||
pf[x] = (mo[x] & atari_motion_objects_device::DATA_MASK) | 0x1000;
|
||||
}
|
||||
|
||||
// don't erase yet -- we need to make another pass later
|
||||
}
|
||||
}
|
||||
|
||||
// now go back and process the upper bit of MO priority
|
||||
for (const sparse_dirty_rect *rect = m_vad->mob().first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
|
||||
for (int y = rect->top(); y <= rect->bottom(); y++)
|
||||
{
|
||||
uint16_t *const mo = &mobitmap.pix(y);
|
||||
uint16_t *const pf = &bitmap.pix(y);
|
||||
int count = 0;
|
||||
for (int x = rect->left(); x <= rect->right() || (count && x < bitmap.width()); x++)
|
||||
{
|
||||
const uint16_t START_MARKER = ((4 << atari_motion_objects_device::PRIORITY_SHIFT) | 3);
|
||||
const uint16_t END_MARKER = ((4 << atari_motion_objects_device::PRIORITY_SHIFT) | 7);
|
||||
const uint16_t MASK = ((4 << atari_motion_objects_device::PRIORITY_SHIFT) | 0x3f);
|
||||
|
||||
// TODO: Stain pixels should not overlap sprites!
|
||||
if ((mo[x] & MASK) == START_MARKER)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count)
|
||||
{
|
||||
// Only applies to PF pixels
|
||||
if ((pf[x] & 0x1000) == 0)
|
||||
{
|
||||
pf[x] |= 0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
if ((mo[x] & MASK) == END_MARKER)
|
||||
{
|
||||
count--;
|
||||
}
|
||||
|
||||
// erase behind ourselves
|
||||
mo[x] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// add the alpha on top
|
||||
m_vad->alpha().draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// machine
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -47,21 +308,15 @@ void cybstorm_state::machine_start()
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t cybstorm_state::special_port1_r()
|
||||
{
|
||||
return ioport("9F0010")->read();
|
||||
}
|
||||
|
||||
|
||||
void cybstorm_state::latch_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
{
|
||||
uint32_t oldword = m_latch_data;
|
||||
COMBINE_DATA(&m_latch_data);
|
||||
|
||||
/* bit 4 is connected to the /RESET pin on the 6502 */
|
||||
// bit 4 is connected to the /RESET pin on the 6502
|
||||
m_jsa->soundcpu().set_input_line(INPUT_LINE_RESET, m_latch_data & 0x00100000 ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
/* alpha bank is selected by the upper 4 bits */
|
||||
// alpha bank is selected by the upper 4 bits
|
||||
if ((oldword ^ m_latch_data) & 0x00e00000)
|
||||
{
|
||||
m_screen->update_partial(m_screen->vpos());
|
||||
@ -71,13 +326,6 @@ void cybstorm_state::latch_w(offs_t offset, uint32_t data, uint32_t mem_mask)
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Main CPU memory handlers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Memory maps
|
||||
@ -91,7 +339,7 @@ void cybstorm_state::main_map(address_map &map)
|
||||
map(0x3effc0, 0x3effff).rw(m_vad, FUNC(atari_vad_device::control_read), FUNC(atari_vad_device::control_write));
|
||||
map(0x3f0000, 0x3fffff).m(m_vadbank, FUNC(address_map_bank_device::amap16));
|
||||
map(0x9f0000, 0x9f0003).portr("9F0000");
|
||||
map(0x9f0010, 0x9f0013).r(FUNC(cybstorm_state::special_port1_r));
|
||||
map(0x9f0010, 0x9f0013).portr("9F0010");
|
||||
map(0x9f0031, 0x9f0031).r(m_jsa, FUNC(atari_jsa_iii_device::main_response_r));
|
||||
map(0x9f0041, 0x9f0041).w(m_jsa, FUNC(atari_jsa_iii_device::main_command_w));
|
||||
map(0x9f0050, 0x9f0053).w(FUNC(cybstorm_state::latch_w));
|
||||
@ -217,9 +465,9 @@ static const gfx_layout pflayout =
|
||||
|
||||
|
||||
static GFXDECODE_START( gfx_cybstorm )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, pflayout, 0, 16 ) /* sprites & playfield */
|
||||
GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x6_planar, 4096, 64 ) /* sprites & playfield */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, anlayout, 16384, 64 ) /* characters 8x8 */
|
||||
GFXDECODE_ENTRY( "spr_pf1", 0, pflayout, 0, 16 ) // sprites & playfield
|
||||
GFXDECODE_ENTRY( "spr_pf2", 0, gfx_8x8x6_planar, 4096, 64 ) // sprites & playfield
|
||||
GFXDECODE_ENTRY( "chars", 0, anlayout, 16384, 64 ) // characters 8x8
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -232,7 +480,7 @@ GFXDECODE_END
|
||||
|
||||
void cybstorm_state::round2(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
M68EC020(config, m_maincpu, 14.318181_MHz_XTAL);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &cybstorm_state::main_map);
|
||||
|
||||
@ -240,7 +488,7 @@ void cybstorm_state::round2(machine_config &config)
|
||||
|
||||
WATCHDOG_TIMER(config, "watchdog");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
ATARI_VAD(config, m_vad, 0, m_screen);
|
||||
m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4);
|
||||
TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(cybstorm_state::get_playfield_tile_info));
|
||||
@ -256,10 +504,10 @@ void cybstorm_state::round2(machine_config &config)
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
m_screen->set_palette("palette");
|
||||
m_screen->set_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 */
|
||||
m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240);
|
||||
m_screen->set_screen_update(FUNC(cybstorm_state::screen_update_cybstorm));
|
||||
// note: these parameters are from published specs, not derived
|
||||
// the board uses an SOS-2 chip to generate video signals
|
||||
m_screen->set_raw(14.318181_MHz_XTAL / 2, 456, 0, 336, 262, 0, 240);
|
||||
m_screen->set_screen_update(FUNC(cybstorm_state::screen_update));
|
||||
}
|
||||
|
||||
|
||||
@ -267,7 +515,7 @@ void cybstorm_state::cybstorm(machine_config &config)
|
||||
{
|
||||
round2(config);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
@ -287,20 +535,20 @@ void cybstorm_state::cybstorm(machine_config &config)
|
||||
*************************************/
|
||||
|
||||
ROM_START( cybstorm )
|
||||
ROM_REGION( 0x200000, "maincpu", 0 ) /* 6*128k for 68020 code */
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog.6a", 0x000000, 0x080000, CRC(8b112ee9) SHA1(cd8367c47c653b8a1ba236c354f009f4297d521d) )
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog.8a", 0x000001, 0x080000, CRC(36b7cec9) SHA1(c9c2ba6df1fc849200e0c66a7cbc292e8b0b22f3) )
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog2.13a", 0x000002, 0x080000, CRC(1318f2c5) SHA1(929fbe96621852a10b7072490e1e554cdb2f20d8) )
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog.16a", 0x000003, 0x080000, CRC(4ae586a8) SHA1(daa803ed38f6582677b397e744dd8f5f60cfb508) )
|
||||
ROM_REGION( 0x200000, "maincpu", 0 ) // 68020 code
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog.6a", 0x000000, 0x080000, CRC(8b112ee9) SHA1(cd8367c47c653b8a1ba236c354f009f4297d521d) )
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog.8a", 0x000001, 0x080000, CRC(36b7cec9) SHA1(c9c2ba6df1fc849200e0c66a7cbc292e8b0b22f3) )
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog2.13a", 0x000002, 0x080000, CRC(1318f2c5) SHA1(929fbe96621852a10b7072490e1e554cdb2f20d8) )
|
||||
ROM_LOAD32_BYTE( "st_11.22.prog.16a", 0x000003, 0x080000, CRC(4ae586a8) SHA1(daa803ed38f6582677b397e744dd8f5f60cfb508) )
|
||||
|
||||
ROM_REGION( 0x14000, "jsa:cpu", 0 ) /* 64k + 16k for 6502 code */
|
||||
ROM_LOAD( "st_11.22.6502", 0x010000, 0x004000, CRC(947421b2) SHA1(72b2b66122e779135f1f5af794e4d8513ccbbef6) )
|
||||
ROM_CONTINUE( 0x004000, 0x00c000 )
|
||||
ROM_REGION( 0x14000, "jsa:cpu", 0 ) // 6502 code
|
||||
ROM_LOAD( "st_11.22.6502", 0x010000, 0x004000, CRC(947421b2) SHA1(72b2b66122e779135f1f5af794e4d8513ccbbef6) )
|
||||
ROM_CONTINUE( 0x004000, 0x00c000 )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", 0 )
|
||||
ROM_LOAD( "st_11.22.csalph.6c", 0x000000, 0x020000, CRC(bafa4bbe) SHA1(c033a952fab6eb3a06c44ba7f48e58b20fe144f0) )
|
||||
ROM_REGION( 0x20000, "chars", 0 )
|
||||
ROM_LOAD( "st_11.22.csalph.6c", 0x000000, 0x020000, CRC(bafa4bbe) SHA1(c033a952fab6eb3a06c44ba7f48e58b20fe144f0) )
|
||||
|
||||
ROM_REGION( 0x400000, "gfx2", ROMREGION_INVERT )
|
||||
ROM_REGION( 0x400000, "spr_pf1", ROMREGION_INVERT )
|
||||
ROM_LOAD( "st_11.22.pf0", 0x000000, 0x080000, CRC(0cf5874c) SHA1(1d739a3fc42baa5556aa22e051c873db9357396f) )
|
||||
ROM_LOAD( "st_11.22.pf1", 0x080000, 0x080000, CRC(ee0a6a81) SHA1(7c36ccbcd51497ea8a872ddf7dabe2ceb0895408) )
|
||||
ROM_LOAD( "st_11.22.pf2", 0x100000, 0x080000, CRC(03791514) SHA1(0688b55015f8d86ee92497cb7fcdfbdbfbc492a2) )
|
||||
@ -310,51 +558,40 @@ ROM_START( cybstorm )
|
||||
ROM_LOAD( "st_11.22.pf6", 0x300000, 0x080000, CRC(58b3c0d9) SHA1(226ff2e948c5bb0ca150700a2f3426492fce79f7) )
|
||||
ROM_LOAD( "st_11.22.pf7", 0x380000, 0x080000, CRC(f84b27ca) SHA1(a7812e18e15fad9992a59b0ebd177cb848a743bb) )
|
||||
|
||||
ROM_REGION( 0xc00000, "gfx3", ROMREGION_INVERT )
|
||||
ROM_LOAD( "st_11.22.mo00",0x000000, 0x080000, CRC(216ffdb9) SHA1(7e6418da1419d82e67bef9ae314781708ed62a76) )
|
||||
ROM_LOAD( "st_11.22.mo01",0x200000, 0x080000, CRC(af15908b) SHA1(9dc8dbf0288a084891bdd646cfb7b8c97b89cf2e) )
|
||||
ROM_LOAD( "st_11.22.mo02",0x400000, 0x080000, CRC(fc066982) SHA1(bbf258ff23619234cb31b4afab4eac1681cdeae0) )
|
||||
ROM_LOAD( "st_11.22.mo03",0x600000, 0x080000, CRC(95c85715) SHA1(585cdb3cadfcd205e7dfcf846230b404093cd018) )
|
||||
ROM_LOAD( "st_11.22.mo04",0x800000, 0x080000, CRC(f53cebc8) SHA1(91280f8bf9f2fbb977f3971324134ffd8eec11b9) )
|
||||
ROM_LOAD( "st_11.22.mo05",0xa00000, 0x080000, CRC(6c696989) SHA1(1a688252faa85a380fd639950068b28de0b50cdf) )
|
||||
ROM_LOAD( "st_11.22.mo10",0x080000, 0x080000, CRC(a65b00da) SHA1(12a482e58207ac6fc2f7a47da1162a38ea902a96) )
|
||||
ROM_LOAD( "st_11.22.mo11",0x280000, 0x080000, CRC(11da3f44) SHA1(18f228524e2a00655f4e965208f99d892741d7cb) )
|
||||
ROM_LOAD( "st_11.22.mo12",0x480000, 0x080000, CRC(44257e7d) SHA1(307f350908b5f8d53495368e19a02e1042d9cb03) )
|
||||
ROM_LOAD( "st_11.22.mo13",0x680000, 0x080000, CRC(8ec4cc3e) SHA1(20e74ce2aa60cd2eb67a39b1bd8cf37454db4776) )
|
||||
ROM_LOAD( "st_11.22.mo14",0x880000, 0x080000, CRC(8f144f42) SHA1(6a35cf399775aaae50eeb35812fcf1343d9f9e1a) )
|
||||
ROM_LOAD( "st_11.22.mo15",0xa80000, 0x080000, CRC(3de4035a) SHA1(ecba9b464eb8b37a85a1c81ee4d7935a11646ed9) )
|
||||
ROM_LOAD( "st_11.22.mo20",0x100000, 0x080000, CRC(6f79ef90) SHA1(e323a7c35dac021c6b32870938dd54e865014078) )
|
||||
ROM_LOAD( "st_11.22.mo21",0x300000, 0x080000, CRC(69726b74) SHA1(31ba5ac1584ba6b63ec4a2189d531319db716690) )
|
||||
ROM_LOAD( "st_11.22.mo22",0x500000, 0x080000, CRC(5323d1f4) SHA1(65e81316467a3e5413ef480ba278a0a70e5c2f51) )
|
||||
ROM_LOAD( "st_11.22.mo23",0x700000, 0x080000, CRC(2387c947) SHA1(26d0f1ee83c5e84df4d143d6d3fd422f34d0d9af) )
|
||||
ROM_LOAD( "st_11.22.mo24",0x900000, 0x080000, CRC(2f133ccf) SHA1(a280879de200eb10e495e8ca804515c0e7d02eb9) )
|
||||
ROM_LOAD( "st_11.22.mo25",0xb00000, 0x080000, CRC(0746b2c5) SHA1(5414c3e600352cfb88d521ed3252941893afe438) )
|
||||
ROM_LOAD( "st_11.22.mo30",0x180000, 0x080000, CRC(7c0f2a9b) SHA1(82a405203356643529017201797b37efb7d1b227) )
|
||||
ROM_LOAD( "st_11.22.mo31",0x380000, 0x080000, CRC(8c21a84c) SHA1(7e84afb2b72af32af731df25fa1dd4d5f4dde7ba) )
|
||||
ROM_LOAD( "st_11.22.mo32",0x580000, 0x080000, CRC(a7382479) SHA1(c694e4ca4111252c3b23e274695ed235dd8a92e2) )
|
||||
ROM_LOAD( "st_11.22.mo33",0x780000, 0x080000, CRC(eac63276) SHA1(d72e85c46ce609b6275280c8cd73ed93aa6eddc3) )
|
||||
ROM_LOAD( "st_11.22.mo34",0x980000, 0x080000, CRC(b8b0c8b6) SHA1(f47218a4d94aa151964687a6e4c02f2b3065fdd3) )
|
||||
ROM_LOAD( "st_11.22.mo35",0xb80000, 0x080000, CRC(f0b9cf9d) SHA1(7ce30b05c1ee02346e8f568f36274b46d1ed99c4) )
|
||||
ROM_REGION( 0xc00000, "spr_pf2", ROMREGION_INVERT )
|
||||
ROM_LOAD( "st_11.22.mo00", 0x000000, 0x080000, CRC(216ffdb9) SHA1(7e6418da1419d82e67bef9ae314781708ed62a76) )
|
||||
ROM_LOAD( "st_11.22.mo01", 0x200000, 0x080000, CRC(af15908b) SHA1(9dc8dbf0288a084891bdd646cfb7b8c97b89cf2e) )
|
||||
ROM_LOAD( "st_11.22.mo02", 0x400000, 0x080000, CRC(fc066982) SHA1(bbf258ff23619234cb31b4afab4eac1681cdeae0) )
|
||||
ROM_LOAD( "st_11.22.mo03", 0x600000, 0x080000, CRC(95c85715) SHA1(585cdb3cadfcd205e7dfcf846230b404093cd018) )
|
||||
ROM_LOAD( "st_11.22.mo04", 0x800000, 0x080000, CRC(f53cebc8) SHA1(91280f8bf9f2fbb977f3971324134ffd8eec11b9) )
|
||||
ROM_LOAD( "st_11.22.mo05", 0xa00000, 0x080000, CRC(6c696989) SHA1(1a688252faa85a380fd639950068b28de0b50cdf) )
|
||||
ROM_LOAD( "st_11.22.mo10", 0x080000, 0x080000, CRC(a65b00da) SHA1(12a482e58207ac6fc2f7a47da1162a38ea902a96) )
|
||||
ROM_LOAD( "st_11.22.mo11", 0x280000, 0x080000, CRC(11da3f44) SHA1(18f228524e2a00655f4e965208f99d892741d7cb) )
|
||||
ROM_LOAD( "st_11.22.mo12", 0x480000, 0x080000, CRC(44257e7d) SHA1(307f350908b5f8d53495368e19a02e1042d9cb03) )
|
||||
ROM_LOAD( "st_11.22.mo13", 0x680000, 0x080000, CRC(8ec4cc3e) SHA1(20e74ce2aa60cd2eb67a39b1bd8cf37454db4776) )
|
||||
ROM_LOAD( "st_11.22.mo14", 0x880000, 0x080000, CRC(8f144f42) SHA1(6a35cf399775aaae50eeb35812fcf1343d9f9e1a) )
|
||||
ROM_LOAD( "st_11.22.mo15", 0xa80000, 0x080000, CRC(3de4035a) SHA1(ecba9b464eb8b37a85a1c81ee4d7935a11646ed9) )
|
||||
ROM_LOAD( "st_11.22.mo20", 0x100000, 0x080000, CRC(6f79ef90) SHA1(e323a7c35dac021c6b32870938dd54e865014078) )
|
||||
ROM_LOAD( "st_11.22.mo21", 0x300000, 0x080000, CRC(69726b74) SHA1(31ba5ac1584ba6b63ec4a2189d531319db716690) )
|
||||
ROM_LOAD( "st_11.22.mo22", 0x500000, 0x080000, CRC(5323d1f4) SHA1(65e81316467a3e5413ef480ba278a0a70e5c2f51) )
|
||||
ROM_LOAD( "st_11.22.mo23", 0x700000, 0x080000, CRC(2387c947) SHA1(26d0f1ee83c5e84df4d143d6d3fd422f34d0d9af) )
|
||||
ROM_LOAD( "st_11.22.mo24", 0x900000, 0x080000, CRC(2f133ccf) SHA1(a280879de200eb10e495e8ca804515c0e7d02eb9) )
|
||||
ROM_LOAD( "st_11.22.mo25", 0xb00000, 0x080000, CRC(0746b2c5) SHA1(5414c3e600352cfb88d521ed3252941893afe438) )
|
||||
ROM_LOAD( "st_11.22.mo30", 0x180000, 0x080000, CRC(7c0f2a9b) SHA1(82a405203356643529017201797b37efb7d1b227) )
|
||||
ROM_LOAD( "st_11.22.mo31", 0x380000, 0x080000, CRC(8c21a84c) SHA1(7e84afb2b72af32af731df25fa1dd4d5f4dde7ba) )
|
||||
ROM_LOAD( "st_11.22.mo32", 0x580000, 0x080000, CRC(a7382479) SHA1(c694e4ca4111252c3b23e274695ed235dd8a92e2) )
|
||||
ROM_LOAD( "st_11.22.mo33", 0x780000, 0x080000, CRC(eac63276) SHA1(d72e85c46ce609b6275280c8cd73ed93aa6eddc3) )
|
||||
ROM_LOAD( "st_11.22.mo34", 0x980000, 0x080000, CRC(b8b0c8b6) SHA1(f47218a4d94aa151964687a6e4c02f2b3065fdd3) )
|
||||
ROM_LOAD( "st_11.22.mo35", 0xb80000, 0x080000, CRC(f0b9cf9d) SHA1(7ce30b05c1ee02346e8f568f36274b46d1ed99c4) )
|
||||
|
||||
ROM_REGION( 0x100000, "jsa:oki1", 0 ) /* 1MB for ADPCM */
|
||||
ROM_LOAD( "st_11.22.5a", 0x000000, 0x080000, CRC(d469692c) SHA1(b7d94c042cf9f28ea65d44f5305d56459562d209) )
|
||||
ROM_REGION( 0x100000, "jsa:oki1", 0 ) // ADPCM
|
||||
ROM_LOAD( "st_11.22.5a", 0x000000, 0x080000, CRC(d469692c) SHA1(b7d94c042cf9f28ea65d44f5305d56459562d209) )
|
||||
|
||||
ROM_REGION( 0x100000, "jsa:oki2", 0 ) /* 1MB for ADPCM */
|
||||
ROM_LOAD( "st_11.22.5a", 0x000000, 0x080000, CRC(d469692c) SHA1(b7d94c042cf9f28ea65d44f5305d56459562d209) )
|
||||
ROM_REGION( 0x100000, "jsa:oki2", 0 ) // ADPCM
|
||||
ROM_LOAD( "st_11.22.5a", 0x000000, 0x080000, CRC(d469692c) SHA1(b7d94c042cf9f28ea65d44f5305d56459562d209) )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Driver initialization
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void cybstorm_state::init_cybstorm()
|
||||
{
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -363,4 +600,4 @@ void cybstorm_state::init_cybstorm()
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1993, cybstorm, 0, cybstorm, cybstorm, cybstorm_state, init_cybstorm, ROT0, "Atari Games", "Cyberstorm (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1993, cybstorm, 0, cybstorm, cybstorm, cybstorm_state, empty_init, ROT0, "Atari Games", "Cyberstorm (prototype)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -1,68 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles, Phil Bennett
|
||||
/*************************************************************************
|
||||
|
||||
Atari Cyberstorm hardware
|
||||
|
||||
*************************************************************************/
|
||||
#ifndef MAME_INCLUDES_CYBSTORM_H
|
||||
#define MAME_INCLUDES_CYBSTORM_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "atarijsa.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "atarivad.h"
|
||||
#include "screen.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
class cybstorm_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cybstorm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_jsa(*this, "jsa")
|
||||
, m_vad(*this, "vad")
|
||||
, m_vadbank(*this, "vadbank")
|
||||
, m_screen(*this, "screen")
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
{ }
|
||||
|
||||
void init_cybstorm();
|
||||
void cybstorm(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
uint32_t special_port1_r();
|
||||
void latch_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_playfield2_tile_info);
|
||||
TILEMAP_MAPPER_MEMBER(playfield_scan);
|
||||
|
||||
uint32_t screen_update_cybstorm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void round2(machine_config &config);
|
||||
void main_map(address_map &map);
|
||||
void vadbank_map(address_map &map);
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<atari_jsa_iiis_device> m_jsa;
|
||||
required_device<atari_vad_device> m_vad;
|
||||
required_device<address_map_bank_device> m_vadbank;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
uint32_t m_latch_data = 0U;
|
||||
uint8_t m_alpha_tile_bank = 0U;
|
||||
|
||||
static const atari_motion_objects_config s_mob_config;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_CYBSTORM_H
|
@ -1,218 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Aaron Giles, Phil Bennett
|
||||
/***************************************************************************
|
||||
|
||||
Atari Cyberstorm hardware
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cybstorm.h"
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Tilemap callbacks
|
||||
*
|
||||
*************************************/
|
||||
|
||||
TILE_GET_INFO_MEMBER(cybstorm_state::get_alpha_tile_info)
|
||||
{
|
||||
uint16_t data = m_vad->alpha().basemem_read(tile_index);
|
||||
int code = ((data & 0x400) ? (m_alpha_tile_bank * 0x400) : 0) + (data & 0x3ff);
|
||||
int color = (data >> 11) & 0x0f;
|
||||
int opaque = data & 0x8000;
|
||||
tileinfo.set(2, code, color, opaque ? TILEMAP_PIXEL_LAYER0 : 0);
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(cybstorm_state::get_playfield_tile_info)
|
||||
{
|
||||
uint16_t data1 = m_vad->playfield().basemem_read(tile_index);
|
||||
uint16_t data2 = m_vad->playfield().extmem_read(tile_index) & 0xff;
|
||||
int code = data1;
|
||||
int color = 8 + (data2 & 0x07);
|
||||
tileinfo.set(0, code, color, data2 & 0x80 ? TILE_FLIPX : 0);
|
||||
tileinfo.category = (data2 >> 4) & 3;
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(cybstorm_state::get_playfield2_tile_info)
|
||||
{
|
||||
uint16_t data1 = m_vad->playfield2().basemem_read(tile_index);
|
||||
uint16_t data2 = m_vad->playfield2().extmem_read(tile_index) >> 8;
|
||||
int code = data1;
|
||||
int color = data2 & 0x07;
|
||||
tileinfo.set(0, code, color, data2 & 0x80 ? TILE_FLIPX : 0);
|
||||
tileinfo.category = (data2 >> 4) & 3;
|
||||
}
|
||||
|
||||
TILEMAP_MAPPER_MEMBER(cybstorm_state::playfield_scan)
|
||||
{
|
||||
int bank = 1 - (col / (num_cols / 2));
|
||||
return bank * (num_rows * num_cols / 2) + row * (num_cols / 2) + (col % (num_cols / 2));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video system start
|
||||
*
|
||||
*************************************/
|
||||
|
||||
const atari_motion_objects_config cybstorm_state::s_mob_config =
|
||||
{
|
||||
1, /* index to which gfx system */
|
||||
1, /* number of motion object banks */
|
||||
1, /* are the entries linked? */
|
||||
0, /* are the entries split? */
|
||||
1, /* render in reverse order? */
|
||||
0, /* render in swapped X/Y order? */
|
||||
0, /* does the neighbor bit affect the next object? */
|
||||
8, /* pixels per SLIP entry (0 for no-slip) */
|
||||
0, /* pixel offset for SLIPs */
|
||||
0, /* maximum number of links to visit/scanline (0=all) */
|
||||
|
||||
0x1000, /* base palette entry */
|
||||
0x1000, /* maximum number of colors */
|
||||
0, /* transparent pen index */
|
||||
|
||||
{{ 0x03ff,0,0,0 }}, /* mask for the link */
|
||||
{{ 0,0x7fff,0,0 }, { 0x3c00,0,0,0 }}, /* mask for the code index */
|
||||
{{ 0,0,0x000f,0 }}, /* mask for the color */
|
||||
{{ 0,0,0xff80,0 }}, /* mask for the X position */
|
||||
{{ 0,0,0,0xff80 }}, /* mask for the Y position */
|
||||
{{ 0,0,0,0x0070 }}, /* mask for the width, in tiles*/
|
||||
{{ 0,0,0,0x0007 }}, /* mask for the height, in tiles */
|
||||
{{ 0,0x8000,0,0 }}, /* mask for the horizontal flip */
|
||||
{{ 0 }}, /* mask for the vertical flip */
|
||||
{{ 0,0,0x0070,0 }}, /* mask for the priority */
|
||||
{{ 0 }}, /* mask for the neighbor */
|
||||
{{ 0 }}, /* mask for absolute coordinates */
|
||||
|
||||
{{ 0 }}, /* mask for the special value */
|
||||
0, /* resulting value to indicate "special" */
|
||||
};
|
||||
|
||||
void cybstorm_state::video_start()
|
||||
{
|
||||
/* motion objects have 256 color granularity */
|
||||
m_gfxdecode->gfx(1)->set_granularity(256);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Main refresh
|
||||
*
|
||||
*************************************/
|
||||
|
||||
uint32_t cybstorm_state::screen_update_cybstorm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_vad->mob().draw_async(cliprect);
|
||||
|
||||
/* draw the playfield */
|
||||
bitmap_ind8 &priority_bitmap = screen.priority();
|
||||
priority_bitmap.fill(0, cliprect);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 0, 0x00);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 1, 0x01);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 2, 0x02);
|
||||
m_vad->playfield().draw(screen, bitmap, cliprect, 3, 0x03);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 0, 0x80);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 1, 0x84);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 2, 0x88);
|
||||
m_vad->playfield2().draw(screen, bitmap, cliprect, 3, 0x8c);
|
||||
|
||||
/* draw and merge the MO */
|
||||
bitmap_ind16 &mobitmap = m_vad->mob().bitmap();
|
||||
for (const sparse_dirty_rect *rect = m_vad->mob().first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
|
||||
for (int y = rect->top(); y <= rect->bottom(); y++)
|
||||
{
|
||||
uint16_t const *const mo = &mobitmap.pix(y);
|
||||
uint16_t *const pf = &bitmap.pix(y);
|
||||
uint8_t const *const pri = &priority_bitmap.pix(y);
|
||||
for (int x = rect->left(); x <= rect->right(); x++)
|
||||
if (mo[x])
|
||||
{
|
||||
int const mopriority = mo[x] >> atari_motion_objects_device::PRIORITY_SHIFT;
|
||||
|
||||
/* upper bit of MO priority signals special rendering and doesn't draw anything */
|
||||
if (mopriority & 4)
|
||||
{
|
||||
if ((mopriority & 0x3) != 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* foreground playfield case */
|
||||
if (pri[x] & 0x80)
|
||||
{
|
||||
int const pfpriority = (pri[x] >> 2) & 3;
|
||||
|
||||
if (mopriority > pfpriority)
|
||||
pf[x] = (mo[x] & atari_motion_objects_device::DATA_MASK) | 0x1000;
|
||||
}
|
||||
|
||||
/* background playfield case */
|
||||
else
|
||||
{
|
||||
int const pfpriority = pri[x] & 3;
|
||||
|
||||
/* playfield priority 3 always wins */
|
||||
if (pfpriority == 3)
|
||||
;
|
||||
|
||||
/* otherwise, MOs get shown */
|
||||
else
|
||||
pf[x] = (mo[x] & atari_motion_objects_device::DATA_MASK) | 0x1000;
|
||||
}
|
||||
|
||||
/* don't erase yet -- we need to make another pass later */
|
||||
}
|
||||
}
|
||||
|
||||
/* now go back and process the upper bit of MO priority */
|
||||
for (const sparse_dirty_rect *rect = m_vad->mob().first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
|
||||
for (int y = rect->top(); y <= rect->bottom(); y++)
|
||||
{
|
||||
uint16_t *const mo = &mobitmap.pix(y);
|
||||
uint16_t *const pf = &bitmap.pix(y);
|
||||
int count = 0;
|
||||
for (int x = rect->left(); x <= rect->right() || (count && x < bitmap.width()); x++)
|
||||
{
|
||||
const uint16_t START_MARKER = ((4 << atari_motion_objects_device::PRIORITY_SHIFT) | 3);
|
||||
const uint16_t END_MARKER = ((4 << atari_motion_objects_device::PRIORITY_SHIFT) | 7);
|
||||
const uint16_t MASK = ((4 << atari_motion_objects_device::PRIORITY_SHIFT) | 0x3f);
|
||||
|
||||
// TODO: Stain pixels should not overlap sprites!
|
||||
if ((mo[x] & MASK) == START_MARKER)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count)
|
||||
{
|
||||
// Only applies to PF pixels
|
||||
if ((pf[x] & 0x1000) == 0)
|
||||
{
|
||||
pf[x] |= 0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
if ((mo[x] & MASK) == END_MARKER)
|
||||
{
|
||||
count--;
|
||||
}
|
||||
|
||||
/* erase behind ourselves */
|
||||
mo[x] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* add the alpha on top */
|
||||
m_vad->alpha().draw(screen, bitmap, cliprect, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
@ -77,7 +77,6 @@
|
||||
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/discrete.h"
|
||||
#include "video/mc6845.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/bankdev.h"
|
||||
#include "cpu/m6805/m6805.h"
|
||||
|
||||
DECLARE_DEVICE_TYPE(NAMCOC65, namcoc65_device)
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/bankdev.h"
|
||||
#include "cpu/m6502/m3745x.h"
|
||||
|
||||
DECLARE_DEVICE_TYPE(NAMCOC68, namcoc68_device)
|
||||
|
@ -25,7 +25,6 @@ If the output isn't satisfactory, it prints "I/O BOARD FAILURE".
|
||||
#include "pcshare.h"
|
||||
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/ds128x.h"
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/nvram.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "machine/74157.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/tc009xlvc.h"
|
||||
#include "machine/timer.h"
|
||||
#include "machine/upd4701.h"
|
||||
|
@ -207,7 +207,6 @@ TI-86 ports:
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/ez80.h"
|
||||
#include "imagedev/snapquik.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user