mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
jaleco/tetrisp2.cpp: Added dumps of additional games and improved video emulation. [Windy Fairy]
Dumped hard disk for Stepping Stage 3. [Jordan/JBEAN] New systems marked not working --------------------------------- VJ Visual & Music Slap (Ver 1.1) [Shiz] VJ Dash (Ver 1.0) [Shiz]
This commit is contained in:
parent
41db949ae3
commit
5a546932e2
@ -9,10 +9,11 @@ SMSC FDC37C93x Plug and Play Compatible Ultra I/O Controller
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/isa/isa.h"
|
||||
#include "machine/ds128x.h"
|
||||
#include "machine/fdc37c93x.h"
|
||||
|
||||
#include "formats/naslite_dsk.h"
|
||||
#include "formats/pc_dsk.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(FDC37C93X, fdc37c93x_device, "fdc37c93x", "SMSC FDC37C93X")
|
||||
|
||||
fdc37c93x_device::fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
|
@ -7,24 +7,19 @@ fdc37c93x.h
|
||||
SMSC FDC37C93x Plug and Play Compatible Ultra I/O Controller
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAME_MACHINE_FDC37C93X_H
|
||||
#define MAME_MACHINE_FDC37C93X_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/8042kbdc.h"
|
||||
// floppy disk controller
|
||||
#include "machine/upd765.h"
|
||||
#include "bus/isa/isa.h"
|
||||
#include "imagedev/floppy.h"
|
||||
#include "formats/pc_dsk.h"
|
||||
#include "formats/naslite_dsk.h"
|
||||
// parallel port
|
||||
#include "machine/pc_lpt.h"
|
||||
// serial port
|
||||
#include "machine/8042kbdc.h"
|
||||
#include "machine/ds128x.h"
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/pc_lpt.h"
|
||||
#include "machine/upd765.h"
|
||||
|
||||
// make sure that pckeybrd.cpp 8042kbdc.cpp are present in project
|
||||
|
||||
class fdc37c93x_device : public device_t, public device_isa16_card_interface
|
||||
{
|
||||
|
@ -109,8 +109,6 @@ void i82371sb_isa_device::device_add_mconfig(machine_config &config)
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||
|
||||
ISA16(config, m_isabus, 0);
|
||||
m_isabus->set_memspace(":maincpu", AS_PROGRAM);
|
||||
m_isabus->set_iospace(":maincpu", AS_IO);
|
||||
m_isabus->irq3_callback().set(FUNC(i82371sb_isa_device::pc_irq3_w));
|
||||
m_isabus->irq4_callback().set(FUNC(i82371sb_isa_device::pc_irq4_w));
|
||||
m_isabus->irq5_callback().set(FUNC(i82371sb_isa_device::pc_irq5_w));
|
||||
@ -132,13 +130,21 @@ void i82371sb_isa_device::device_add_mconfig(machine_config &config)
|
||||
m_isabus->iochck_callback().set(FUNC(i82371sb_isa_device::iochck_w));
|
||||
}
|
||||
|
||||
void i82371sb_isa_device::device_config_complete()
|
||||
{
|
||||
m_isabus->set_memspace(m_maincpu, AS_PROGRAM);
|
||||
m_isabus->set_iospace(m_maincpu, AS_IO);
|
||||
|
||||
pci_device::device_config_complete();
|
||||
}
|
||||
|
||||
i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
pci_device(mconfig, I82371SB_ISA, tag, owner, clock),
|
||||
m_smi_callback(*this),
|
||||
m_nmi_callback(*this),
|
||||
m_stpclk_callback(*this),
|
||||
m_boot_state_hook(*this),
|
||||
m_maincpu(*this, ":maincpu"),
|
||||
m_maincpu(*this, finder_base::DUMMY_TAG),
|
||||
m_pic8259_master(*this, "pic8259_master"),
|
||||
m_pic8259_slave(*this, "pic8259_slave"),
|
||||
m_dma8237_1(*this, "dma8237_1"),
|
||||
@ -966,11 +972,17 @@ void i82371sb_ide_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
BUS_MASTER_IDE_CONTROLLER(config, m_ide1).options(ata_devices, "hdd", nullptr, false);
|
||||
m_ide1->irq_handler().set(FUNC(i82371sb_ide_device::primary_int));
|
||||
m_ide1->set_bus_master_space(":maincpu", AS_PROGRAM);
|
||||
|
||||
BUS_MASTER_IDE_CONTROLLER(config, m_ide2).options(ata_devices, "cdrom", nullptr, false);
|
||||
m_ide2->irq_handler().set(FUNC(i82371sb_ide_device::secondary_int));
|
||||
m_ide2->set_bus_master_space(":maincpu", AS_PROGRAM);
|
||||
}
|
||||
|
||||
void i82371sb_ide_device::device_config_complete()
|
||||
{
|
||||
m_ide1->set_bus_master_space(m_maincpu, AS_PROGRAM);
|
||||
m_ide2->set_bus_master_space(m_maincpu, AS_PROGRAM);
|
||||
|
||||
pci_device::device_config_complete();
|
||||
}
|
||||
|
||||
i82371sb_ide_device::i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
@ -982,6 +994,7 @@ i82371sb_ide_device::i82371sb_ide_device(const machine_config &mconfig, const ch
|
||||
, sidetim(0)
|
||||
, m_irq_pri_callback(*this)
|
||||
, m_irq_sec_callback(*this)
|
||||
, m_maincpu(*this, finder_base::DUMMY_TAG)
|
||||
, m_ide1(*this, "ide1")
|
||||
, m_ide2(*this, "ide2")
|
||||
{
|
||||
|
@ -9,16 +9,16 @@
|
||||
#include "pci.h"
|
||||
#include "machine/pci-ide.h"
|
||||
|
||||
#include "bus/ata/ataintf.h"
|
||||
#include "bus/isa/isa.h"
|
||||
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/ds128x.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/pit8253.h"
|
||||
|
||||
#include "bus/ata/ataintf.h"
|
||||
|
||||
#include "sound/spkrdev.h"
|
||||
#include "machine/ram.h"
|
||||
#include "bus/isa/isa.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#include "machine/am9517a.h"
|
||||
@ -26,6 +26,13 @@
|
||||
|
||||
class i82371sb_isa_device : public pci_device {
|
||||
public:
|
||||
template <typename T>
|
||||
i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag)
|
||||
: i82371sb_isa_device(mconfig, tag, owner, clock)
|
||||
{
|
||||
set_cpu_tag(std::forward<T>(cpu_tag));
|
||||
}
|
||||
|
||||
i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
auto smi() { return m_smi_callback.bind(); }
|
||||
@ -33,6 +40,9 @@ public:
|
||||
auto stpclk() { return m_stpclk_callback.bind(); }
|
||||
auto boot_state_hook() { return m_boot_state_hook.bind(); }
|
||||
|
||||
template <typename T>
|
||||
void set_cpu_tag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(pc_pirqa_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(pc_pirqb_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(pc_pirqc_w);
|
||||
@ -57,10 +67,10 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(pc_irq15_w);
|
||||
|
||||
protected:
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_config_complete() override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual void reset_all_mappings() override;
|
||||
virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
|
||||
@ -210,16 +220,26 @@ DECLARE_DEVICE_TYPE(I82371SB_ISA, i82371sb_isa_device)
|
||||
|
||||
class i82371sb_ide_device : public pci_device {
|
||||
public:
|
||||
template <typename T>
|
||||
i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag)
|
||||
: i82371sb_ide_device(mconfig, tag, owner, clock)
|
||||
{
|
||||
set_cpu_tag(std::forward<T>(cpu_tag));
|
||||
}
|
||||
|
||||
i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
auto irq_pri() { return m_irq_pri_callback.bind(); }
|
||||
auto irq_sec() { return m_irq_sec_callback.bind(); }
|
||||
|
||||
template <typename T>
|
||||
void set_cpu_tag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); }
|
||||
|
||||
protected:
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_config_complete() override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual void reset_all_mappings() override;
|
||||
virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
|
||||
@ -262,6 +282,7 @@ private:
|
||||
devcb_write_line m_irq_pri_callback;
|
||||
devcb_write_line m_irq_sec_callback;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<bus_master_ide_controller_device> m_ide1;
|
||||
required_device<bus_master_ide_controller_device> m_ide2;
|
||||
};
|
||||
|
@ -105,7 +105,7 @@ class bus_master_ide_controller_device : public ide_controller_32_device
|
||||
{
|
||||
public:
|
||||
bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
template <typename T> void set_bus_master_space(T &&bmtag, int bmspace) { m_dma_space.set_tag(std::forward<T>(bmtag), bmspace); }
|
||||
template <typename... T> void set_bus_master_space(T &&... args) { m_dma_space.set_tag(std::forward<T>(args)...); }
|
||||
template <bool R> void set_bus_master_space(const address_space_finder<R> &finder) { m_dma_space.set_tag(finder); }
|
||||
|
||||
template <typename T> bus_master_ide_controller_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false)
|
||||
|
@ -33,7 +33,8 @@ uint8_t cvs_base_state::collision_r()
|
||||
|
||||
uint8_t cvs_base_state::collision_clear()
|
||||
{
|
||||
m_collision_register = 0;
|
||||
if (!machine().side_effects_disabled())
|
||||
m_collision_register = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -57,15 +58,15 @@ void cvs_base_state::init_stars()
|
||||
for (int x = 511; x >= 0; x--)
|
||||
{
|
||||
generator <<= 1;
|
||||
int const bit1 = (~generator >> 17) & 1;
|
||||
int const bit2 = (generator >> 5) & 1;
|
||||
int const bit1 = BIT(~generator, 17);
|
||||
int const bit2 = BIT(generator, 5);
|
||||
|
||||
if (bit1 ^ bit2)
|
||||
generator |= 1;
|
||||
|
||||
if (((~generator >> 16) & 1) && (generator & 0xfe) == 0xfe)
|
||||
if (BIT(~generator, 16) && (generator & 0xfe) == 0xfe)
|
||||
{
|
||||
if(((~(generator >> 12)) & 0x01) && ((~(generator >> 13)) & 0x01))
|
||||
if (BIT(~generator, 12) && BIT(~generator, 13))
|
||||
{
|
||||
if (m_total_stars < CVS_MAX_STARS)
|
||||
{
|
||||
@ -88,7 +89,7 @@ void cvs_base_state::update_stars(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
uint8_t x = (m_stars[offs].x + m_stars_scroll) >> 1;
|
||||
uint8_t y = m_stars[offs].y + ((m_stars_scroll + m_stars[offs].x) >> 9);
|
||||
|
||||
if ((y & 1) ^ ((x >> 4) & 1))
|
||||
if (BIT(y, 0) ^ BIT(x, 4))
|
||||
{
|
||||
if (flip_screen_x())
|
||||
x = ~x;
|
||||
|
@ -24,39 +24,22 @@
|
||||
|
||||
class cvs_base_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cvs_base_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_bullet_ram(*this, "bullet_ram")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_s2636(*this, "s2636%u", 0U)
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
, m_screen(*this, "screen")
|
||||
, m_palette(*this, "palette")
|
||||
, m_video_ram(*this, "video_ram", 0x400, ENDIANNESS_BIG)
|
||||
, m_color_ram(*this, "color_ram", 0x400, ENDIANNESS_BIG)
|
||||
, m_ram_view(*this, "video_color_ram_view")
|
||||
{ }
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
|
||||
// memory pointers
|
||||
required_shared_ptr<uint8_t> m_bullet_ram;
|
||||
|
||||
// video-related
|
||||
static constexpr uint8_t CVS_MAX_STARS = 250;
|
||||
static constexpr int8_t CVS_S2636_Y_OFFSET = -5;
|
||||
static constexpr int8_t CVS_S2636_X_OFFSET = -26;
|
||||
static inline constexpr uint8_t CVS_MAX_STARS = 250;
|
||||
static inline constexpr int8_t CVS_S2636_Y_OFFSET = -5;
|
||||
static inline constexpr int8_t CVS_S2636_X_OFFSET = -26;
|
||||
|
||||
struct cvs_star
|
||||
{
|
||||
int x = 0, y = 0, code = 0;
|
||||
};
|
||||
|
||||
cvs_star m_stars[CVS_MAX_STARS]{};
|
||||
bitmap_ind16 m_collision_background = 0;
|
||||
// memory pointers
|
||||
required_shared_ptr<uint8_t> m_bullet_ram;
|
||||
|
||||
// video-related
|
||||
cvs_star m_stars[CVS_MAX_STARS];
|
||||
bitmap_ind16 m_collision_background;
|
||||
uint8_t m_collision_register = 0U;
|
||||
uint16_t m_total_stars = 0U;
|
||||
int32_t m_stars_scroll = 0U;
|
||||
@ -74,6 +57,22 @@ protected:
|
||||
|
||||
memory_view m_ram_view;
|
||||
|
||||
cvs_base_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_bullet_ram(*this, "bullet_ram")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_s2636(*this, "s2636%u", 0U)
|
||||
, m_gfxdecode(*this, "gfxdecode")
|
||||
, m_screen(*this, "screen")
|
||||
, m_palette(*this, "palette")
|
||||
, m_video_ram(*this, "video_ram", 0x400, ENDIANNESS_BIG)
|
||||
, m_color_ram(*this, "color_ram", 0x400, ENDIANNESS_BIG)
|
||||
, m_ram_view(*this, "video_color_ram_view")
|
||||
{ }
|
||||
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(write_s2650_flag);
|
||||
uint8_t collision_r();
|
||||
uint8_t collision_clear();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,20 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Luca Elia
|
||||
#ifndef MAME_JALECO_TETRISP2_H
|
||||
#define MAME_JALECO_TETRISP2_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/gen_latch.h"
|
||||
#include "jaleco_ms32_sysctrl.h"
|
||||
#include "ms32_sprite.h"
|
||||
|
||||
#include "machine/gen_latch.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
class tetrisp2_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -214,6 +222,8 @@ public:
|
||||
, m_vj_paletteram_m(*this, "paletteram2")
|
||||
, m_vj_paletteram_r(*this, "paletteram3")
|
||||
, m_soundlatch(*this, "soundlatch")
|
||||
, m_soundvr(*this, "SOUND_VR%u", 1)
|
||||
, m_rscreen(*this, "rscreen")
|
||||
{ }
|
||||
|
||||
void stepstag(machine_config &config);
|
||||
@ -223,6 +233,10 @@ public:
|
||||
|
||||
DECLARE_VIDEO_START(stepstag);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
u16 stepstag_coins_r();
|
||||
u16 vj_upload_idx = 0;
|
||||
@ -230,7 +244,7 @@ private:
|
||||
void stepstag_b00000_w(u16 data);
|
||||
void stepstag_b20000_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void stepstag_main2pc_w(u16 data);
|
||||
u16 unknown_read_0xc00000();
|
||||
u16 stepstag_sprite_status_status_r();
|
||||
u16 unknown_read_0xffff00();
|
||||
u16 stepstag_pc2main_r();
|
||||
void stepstag_soundlatch_word_w(u16 data);
|
||||
@ -241,20 +255,33 @@ private:
|
||||
void stepstag_palette_mid_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void stepstag_palette_right_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
|
||||
TILE_GET_INFO_MEMBER(stepstag_get_tile_info_fg);
|
||||
void stepstag_spriteram1_updated_w(u16 data);
|
||||
void stepstag_spriteram2_updated_w(u16 data);
|
||||
void stepstag_spriteram3_updated_w(u16 data);
|
||||
void adv7176a_w(u16 data);
|
||||
|
||||
u16 stepstag_soundvolume_r();
|
||||
|
||||
u32 screen_update_stepstag_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_stepstag_mid(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_stepstag_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_stepstag_main(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
// inline int mypal(int x);
|
||||
|
||||
u32 screen_update_vjdash_main(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_vjdash_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_vjdash_mid(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_vjdash_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
u32 screen_update_nop(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void stepstag_map(address_map &map);
|
||||
void stepstag_sub_map(address_map &map);
|
||||
void vjdash_map(address_map &map);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(field_cb);
|
||||
DECLARE_WRITE_LINE_MEMBER(field_cb);
|
||||
void setup_non_sysctrl_screen(machine_config &config, screen_device *screen, const XTAL xtal);
|
||||
|
||||
void convert_yuv422_to_rgb888(palette_device *paldev, u16 *palram,u32 offset);
|
||||
|
||||
required_device<cpu_device> m_subcpu;
|
||||
optional_device<ms32_sprite_device> m_vj_sprite_l;
|
||||
optional_device<ms32_sprite_device> m_vj_sprite_m;
|
||||
@ -268,5 +295,19 @@ private:
|
||||
optional_shared_ptr<u16> m_vj_paletteram_m;
|
||||
optional_shared_ptr<u16> m_vj_paletteram_r;
|
||||
required_device<generic_latch_16_device> m_soundlatch;
|
||||
void convert_yuv422_to_rgb888(palette_device *paldev, u16 *palram,u32 offset);
|
||||
optional_ioport_array<2> m_soundvr;
|
||||
required_device<screen_device> m_rscreen;
|
||||
|
||||
std::unique_ptr<uint16_t[]> m_spriteram1_data;
|
||||
std::unique_ptr<uint16_t[]> m_spriteram2_data;
|
||||
std::unique_ptr<uint16_t[]> m_spriteram3_data;
|
||||
|
||||
uint8_t m_adv7176a_sclock;
|
||||
uint8_t m_adv7176a_sdata;
|
||||
uint8_t m_adv7176a_state;
|
||||
uint8_t m_adv7176a_byte;
|
||||
uint8_t m_adv7176a_shift;
|
||||
uint16_t m_adv7176a_subaddr;
|
||||
};
|
||||
|
||||
#endif // MAME_JALECO_TETRISP2_H
|
||||
|
@ -34,7 +34,6 @@ To Do:
|
||||
|
||||
#include "emu.h"
|
||||
#include "tetrisp2.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(tetrisp2_state::flipscreen_w)
|
||||
@ -156,7 +155,10 @@ TILE_GET_INFO_MEMBER(tetrisp2_state::get_tile_info_fg)
|
||||
|
||||
void tetrisp2_state::tetrisp2_vram_fg_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_vram_fg[offset]);
|
||||
// VJ and Stepping Stage write to the upper byte here to display ASCII text,
|
||||
// other usages in those games outside of ASCII text write a full 16-bit value.
|
||||
m_vram_fg[offset] = data;
|
||||
|
||||
m_tilemap_fg->mark_tile_dirty(offset/2);
|
||||
}
|
||||
|
||||
@ -350,8 +352,9 @@ static void tetrisp2_draw_sprites(BitmapClass &bitmap, bitmap_ind8 &bitmap_pri,
|
||||
if (disable || !xzoom || !yzoom)
|
||||
continue;
|
||||
|
||||
u32 primask = 0;
|
||||
if (priority_ram)
|
||||
{
|
||||
u32 primask = 0;
|
||||
if (priority_ram[(pri | 0x0a00 | 0x1500) / 2] & 0x38) primask |= 1 << 0;
|
||||
if (priority_ram[(pri | 0x0a00 | 0x1400) / 2] & 0x38) primask |= 1 << 1;
|
||||
if (priority_ram[(pri | 0x0a00 | 0x1100) / 2] & 0x38) primask |= 1 << 2;
|
||||
@ -360,17 +363,15 @@ static void tetrisp2_draw_sprites(BitmapClass &bitmap, bitmap_ind8 &bitmap_pri,
|
||||
if (priority_ram[(pri | 0x0a00 | 0x0400) / 2] & 0x38) primask |= 1 << 5;
|
||||
if (priority_ram[(pri | 0x0a00 | 0x0100) / 2] & 0x38) primask |= 1 << 6;
|
||||
if (priority_ram[(pri | 0x0a00 | 0x0000) / 2] & 0x38) primask |= 1 << 7;
|
||||
|
||||
chip->prio_zoom_transpen(bitmap,cliprect,
|
||||
code,
|
||||
color,
|
||||
flipx, flipy,
|
||||
sx,sy,
|
||||
tx, ty, xsize, ysize,
|
||||
xzoom, yzoom, bitmap_pri,primask, 0);
|
||||
|
||||
}
|
||||
|
||||
chip->prio_zoom_transpen(bitmap,cliprect,
|
||||
code,
|
||||
color,
|
||||
flipx, flipy,
|
||||
sx,sy,
|
||||
tx, ty, xsize, ysize,
|
||||
xzoom, yzoom, bitmap_pri,primask, 0);
|
||||
|
||||
} /* end sprite loop */
|
||||
}
|
||||
@ -638,25 +639,10 @@ u32 rocknms_state::screen_update_rocknms_right(screen_device &screen, bitmap_rgb
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
// Temporary hack for stpestag: unaltered ASCII bytes are written in the most significant byte
|
||||
// of code_hi, one of the CPUs probably reads them and writes the actual tile codes somewhere.
|
||||
TILE_GET_INFO_MEMBER(stepstag_state::stepstag_get_tile_info_fg)
|
||||
{
|
||||
u16 const code_hi = m_vram_fg[ 2 * tile_index ] >> 8;
|
||||
u16 const code_lo = m_vram_fg[ 2 * tile_index ] & 0xf;
|
||||
//logerror("tile_idx[$%2x]=$%3x, palette=$%2x\n", tile_index, code_hi, code_lo);////
|
||||
if (m_vram_fg[2 * tile_index + 1] != 0)
|
||||
logerror("VRAM ASCII Haut-Mot Non-Zero!!!\n");/////////
|
||||
tileinfo.set(2,
|
||||
code_hi,
|
||||
code_lo,
|
||||
0);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(stepstag_state,stepstag)
|
||||
{
|
||||
m_tilemap_bg = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(stepstag_state::get_tile_info_bg)), TILEMAP_SCAN_ROWS, 16,16, NX_0,NY_0);
|
||||
m_tilemap_fg = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(stepstag_state::stepstag_get_tile_info_fg)), TILEMAP_SCAN_ROWS, 8,8, NX_1,NY_1);
|
||||
m_tilemap_fg = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(stepstag_state::get_tile_info_fg)), TILEMAP_SCAN_ROWS, 8,8, NX_1,NY_1);
|
||||
m_tilemap_rot = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(stepstag_state::get_tile_info_rot)), TILEMAP_SCAN_ROWS, 16,16, NX_0*2,NY_0*2);
|
||||
m_tilemap_bg->set_transparent_pen(0);
|
||||
m_tilemap_fg->set_transparent_pen(0);
|
||||
@ -672,54 +658,32 @@ u32 stepstag_state::screen_update_stepstag_left(screen_device &screen, bitmap_rg
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, m_priority.get(),
|
||||
m_spriteram1, m_spriteram1.bytes(), m_vj_sprite_l);
|
||||
bitmap, screen.priority(), cliprect, nullptr,
|
||||
m_spriteram1_data.get(), 0x400, m_vj_sprite_l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_stepstag_mid(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// Text sprites on the middle screen might only be displayed when the service switch is toggled.
|
||||
// There's a relay with the RGBS wires main PCB going into it that seems to click based on the service switch.
|
||||
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, m_priority.get(),
|
||||
m_spriteram2, m_spriteram2.bytes(), m_vj_sprite_m);
|
||||
bitmap, screen.priority(), cliprect, nullptr,
|
||||
m_spriteram2_data.get(), 0x400, m_vj_sprite_m);
|
||||
|
||||
// m_tilemap_rot->draw(screen, bitmap, cliprect, 0, 1 << 1);
|
||||
// m_tilemap_bg->draw(screen, bitmap, cliprect, 0, 1 << 0);
|
||||
m_tilemap_fg->draw(screen, bitmap, cliprect, 0, 1 << 2);
|
||||
m_tilemap_bg->set_scrollx(0, (((m_scroll_bg[0] + 0x0014) + m_scroll_bg[2]) & 0xffff));
|
||||
m_tilemap_bg->set_scrolly(0, (((m_scroll_bg[3] + 0x0000) + m_scroll_bg[5]) & 0xffff));
|
||||
|
||||
return 0;
|
||||
}
|
||||
m_tilemap_fg->set_scrollx(0, m_scroll_fg[2]);
|
||||
m_tilemap_fg->set_scrolly(0, m_scroll_fg[5]);
|
||||
|
||||
u32 stepstag_state::screen_update_stepstag_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, m_priority.get(),
|
||||
m_spriteram3, m_spriteram3.bytes(), m_vj_sprite_r);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_stepstag_main(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
/* Black background color */
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
m_tilemap_bg->set_scrollx(0, (((m_scroll_bg[ 0 ] + 0x0014) + m_scroll_bg[ 2 ] ) & 0xffff));
|
||||
m_tilemap_bg->set_scrolly(0, (((m_scroll_bg[ 3 ] + 0x0000) + m_scroll_bg[ 5 ] ) & 0xffff));
|
||||
|
||||
m_tilemap_fg->set_scrollx(0, m_scroll_fg[ 2 ]);
|
||||
m_tilemap_fg->set_scrolly(0, m_scroll_fg[ 5 ]);
|
||||
|
||||
m_tilemap_rot->set_scrollx(0, (m_rotregs[ 0 ] - m_rot_ofsx));
|
||||
m_tilemap_rot->set_scrolly(0, (m_rotregs[ 2 ] - m_rot_ofsy));
|
||||
m_tilemap_rot->set_scrollx(0, (m_rotregs[0] - m_rot_ofsx));
|
||||
m_tilemap_rot->set_scrolly(0, (m_rotregs[2] - m_rot_ofsy));
|
||||
|
||||
int asc_pri = 0, scr_pri = 0, rot_pri = 0;
|
||||
|
||||
@ -766,28 +730,35 @@ u32 stepstag_state::screen_update_stepstag_main(screen_device &screen, bitmap_in
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_stepstag_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, nullptr,
|
||||
m_spriteram3_data.get(), 0x400, m_vj_sprite_r);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Stepping Stage encodes palette as YUV422.
|
||||
// Convert them on the fly
|
||||
void stepstag_state::convert_yuv422_to_rgb888(palette_device *paldev, u16 *palram, u32 offset)
|
||||
{
|
||||
u8 u = palram[offset/4*4+0] & 0xff;
|
||||
u8 y1 = palram[offset/4*4+1] & 0xff;
|
||||
u8 v = palram[offset/4*4+2] & 0xff;
|
||||
//u8 y2 = palram[offset/4*4+3] & 0xff;
|
||||
double bf = y1+1.772*(u - 128);
|
||||
double gf = y1-0.334*(u - 128) - 0.714 * (v - 128);
|
||||
double rf = y1+1.772*(v - 128);
|
||||
// clamp to 0-255 range
|
||||
rf = std::min(rf,255.0);
|
||||
rf = std::max(rf,0.0);
|
||||
gf = std::min(gf,255.0);
|
||||
gf = std::max(gf,0.0);
|
||||
bf = std::min(bf,255.0);
|
||||
bf = std::max(bf,0.0);
|
||||
u8 const u = palram[offset/4*4 + 0] & 0xff;
|
||||
u8 const y1 = palram[offset/4*4 + 1] & 0xff;
|
||||
u8 const v = palram[offset/4*4 + 2] & 0xff;
|
||||
//u8 const y2 = palram[offset/4*4 + 3] & 0xff;
|
||||
|
||||
u8 r = (u8)rf;
|
||||
u8 g = (u8)gf;
|
||||
u8 b = (u8)bf;
|
||||
double const bf = y1 + (1.772 * (u - 128));
|
||||
double const gf = y1 - (0.334 * (u - 128)) - (0.714 * (v - 128));
|
||||
double const rf = y1 + (1.402 * (v - 128));
|
||||
|
||||
// clamp to 0-255 range
|
||||
u8 const r = u8(std::clamp(rf, 0.0, 255.0));
|
||||
u8 const g = u8(std::clamp(gf, 0.0, 255.0));
|
||||
u8 const b = u8(std::clamp(bf, 0.0, 255.0));
|
||||
|
||||
paldev->set_pen_color(offset/4, r, g, b);
|
||||
}
|
||||
@ -809,3 +780,106 @@ void stepstag_state::stepstag_palette_right_w(offs_t offset, u16 data, u16 mem_m
|
||||
COMBINE_DATA(&m_vj_paletteram_r[offset]);
|
||||
convert_yuv422_to_rgb888(m_vj_palette_r,m_vj_paletteram_r,offset);
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_vjdash_main(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// Black background color
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
m_tilemap_bg->set_scrollx(0, (((m_scroll_bg[0] + 0x0014) + m_scroll_bg[2]) & 0xffff));
|
||||
m_tilemap_bg->set_scrolly(0, (((m_scroll_bg[3] + 0x0000) + m_scroll_bg[5]) & 0xffff));
|
||||
|
||||
m_tilemap_fg->set_scrollx(0, m_scroll_fg[2]);
|
||||
m_tilemap_fg->set_scrolly(0, m_scroll_fg[5]);
|
||||
|
||||
m_tilemap_rot->set_scrollx(0, (m_rotregs[0] - m_rot_ofsx));
|
||||
m_tilemap_rot->set_scrolly(0, (m_rotregs[2] - m_rot_ofsy));
|
||||
|
||||
int asc_pri = 0, scr_pri = 0, rot_pri = 0;
|
||||
|
||||
if ((m_priority[0x2b00 / 2] & 0x00ff) == 0x0034)
|
||||
asc_pri++;
|
||||
else
|
||||
rot_pri++;
|
||||
|
||||
if ((m_priority[0x2e00 / 2] & 0x00ff) == 0x0034)
|
||||
asc_pri++;
|
||||
else
|
||||
scr_pri++;
|
||||
|
||||
if ((m_priority[0x3a00 / 2] & 0x00ff) == 0x000c)
|
||||
scr_pri++;
|
||||
else
|
||||
rot_pri++;
|
||||
|
||||
if (rot_pri == 0)
|
||||
m_tilemap_rot->draw(screen, bitmap, cliprect, 0, 1 << 1);
|
||||
else if (scr_pri == 0)
|
||||
m_tilemap_bg->draw(screen, bitmap, cliprect, 0, 1 << 0);
|
||||
else if (asc_pri == 0)
|
||||
m_tilemap_fg->draw(screen, bitmap, cliprect, 0, 1 << 2);
|
||||
|
||||
if (rot_pri == 1)
|
||||
m_tilemap_rot->draw(screen, bitmap, cliprect, 0, 1 << 1);
|
||||
else if (scr_pri == 1)
|
||||
m_tilemap_bg->draw(screen, bitmap, cliprect, 0, 1 << 0);
|
||||
else if (asc_pri == 1)
|
||||
m_tilemap_fg->draw(screen, bitmap, cliprect, 0, 1 << 2);
|
||||
|
||||
if (rot_pri == 2)
|
||||
m_tilemap_rot->draw(screen, bitmap, cliprect, 0, 1 << 1);
|
||||
else if (scr_pri == 2)
|
||||
m_tilemap_bg->draw(screen, bitmap, cliprect, 0, 1 << 0);
|
||||
else if (asc_pri == 2)
|
||||
m_tilemap_fg->draw(screen, bitmap, cliprect, 0, 1 << 2);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, m_priority.get(),
|
||||
m_spriteram, m_spriteram.bytes(), m_sprite);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_vjdash_left(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, nullptr,
|
||||
m_spriteram1_data.get(), 0x400, m_vj_sprite_l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_vjdash_mid(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, nullptr,
|
||||
m_spriteram2_data.get(), 0x400, m_vj_sprite_m);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_vjdash_right(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
|
||||
tetrisp2_draw_sprites(
|
||||
bitmap, screen.priority(), cliprect, nullptr,
|
||||
m_spriteram3_data.get(), 0x400, m_vj_sprite_r);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 stepstag_state::screen_update_nop(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
screen.priority().fill(0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ license:CC0-1.0
|
||||
<screen tag="lscreen">
|
||||
<bounds x="0" y="0" width="9" height="13.2" />
|
||||
</screen>
|
||||
<screen tag="screen">
|
||||
<screen tag="mscreen">
|
||||
<bounds x="9.1" y="0" width="16" height="13.2" />
|
||||
</screen>
|
||||
<screen tag="rscreen">
|
||||
|
@ -21321,7 +21321,9 @@ tetrisp2 // (c) 1997 Jaleco (World v2.8)
|
||||
tetrisp2a // (c) 1997 Jaleco (World v2.7)
|
||||
tetrisp2j // (c) 1997 Jaleco (Japan v2.2)
|
||||
tetrisp2ja // (c) 1997 Jaleco (Japan v2.1)
|
||||
vjdash // (c) 1999 Jaleco
|
||||
vjdash // (c) 1999 Jaleco (v1.0)
|
||||
vjdasha // (c) 1999 Jaleco (v1.2)
|
||||
vjslap // (c) 1999 Jaleco
|
||||
|
||||
@source:jpm/guab.cpp
|
||||
crisscrs // (c) 1986
|
||||
|
@ -18,21 +18,22 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "machine/pci.h"
|
||||
#include "machine/pci-ide.h"
|
||||
#include "machine/i82439hx.h"
|
||||
#include "machine/i82439tx.h"
|
||||
#include "machine/i82371sb.h"
|
||||
#include "video/mga2064w.h"
|
||||
#include "video/virge_pci.h"
|
||||
|
||||
#include "bus/isa/isa_cards.h"
|
||||
#include "bus/rs232/hlemouse.h"
|
||||
#include "bus/rs232/null_modem.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "bus/rs232/sun_kbd.h"
|
||||
#include "bus/rs232/terminal.h"
|
||||
#include "cpu/i386/i386.h"
|
||||
#include "machine/fdc37c93x.h"
|
||||
#include "machine/i82371sb.h"
|
||||
#include "machine/i82439hx.h"
|
||||
#include "machine/i82439tx.h"
|
||||
#include "machine/pci-ide.h"
|
||||
#include "machine/pci.h"
|
||||
#include "video/mga2064w.h"
|
||||
#include "video/virge_pci.h"
|
||||
|
||||
|
||||
namespace {
|
||||
@ -533,11 +534,11 @@ void pcipc_state::pcipc(machine_config &config)
|
||||
PCI_ROOT(config, "pci", 0);
|
||||
I82439HX(config, "pci:00.0", 0, "maincpu", 256*1024*1024);
|
||||
|
||||
i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0));
|
||||
i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0, "maincpu"));
|
||||
isa.boot_state_hook().set(FUNC(pcipc_state::boot_state_phoenix_ver40_rev6_w));
|
||||
isa.smi().set_inputline("maincpu", INPUT_LINE_SMI);
|
||||
|
||||
i82371sb_ide_device &ide(I82371SB_IDE(config, "pci:07.1", 0));
|
||||
i82371sb_ide_device &ide(I82371SB_IDE(config, "pci:07.1", 0, "maincpu"));
|
||||
ide.irq_pri().set("pci:07.0", FUNC(i82371sb_isa_device::pc_irq14_w));
|
||||
ide.irq_sec().set("pci:07.0", FUNC(i82371sb_isa_device::pc_mirq0_w));
|
||||
// MGA2064W(config, "pci:12.0", 0);
|
||||
@ -573,7 +574,7 @@ void pcipc_state::pcipctx(machine_config &config)
|
||||
PCI_ROOT(config, "pci", 0);
|
||||
I82439TX(config, "pci:00.0", 0, "maincpu", 256*1024*1024);
|
||||
|
||||
i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0));
|
||||
i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0, "maincpu"));
|
||||
isa.boot_state_hook().set(FUNC(pcipc_state::boot_state_award_w));
|
||||
// IDE_PCI(config, "pci:07.1", 0, 0x80867010, 0x03, 0x00000000);
|
||||
MGA2064W(config, "pci:12.0", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user