mirror of
https://github.com/holub/mame
synced 2025-04-16 21:44:32 +03:00
- jailbrek.cpp: dumped PALs and added PCB info for jailbrekb [Guru]
- thedeep.cpp, welltris.cpp: used finder for memory bank and other minor cleanups
This commit is contained in:
parent
3d4a2fa983
commit
c444dd44cf
@ -4585,8 +4585,6 @@ files {
|
||||
MAME_DIR .. "src/mame/includes/taotaido.h",
|
||||
MAME_DIR .. "src/mame/video/taotaido.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/welltris.cpp",
|
||||
MAME_DIR .. "src/mame/includes/welltris.h",
|
||||
MAME_DIR .. "src/mame/video/welltris.cpp",
|
||||
}
|
||||
|
||||
createMAMEProjects(_target, _subtarget, "wing")
|
||||
@ -5146,8 +5144,6 @@ files {
|
||||
MAME_DIR .. "src/mame/drivers/tecnodar.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/thayers.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/thedeep.cpp",
|
||||
MAME_DIR .. "src/mame/includes/thedeep.h",
|
||||
MAME_DIR .. "src/mame/video/thedeep.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/tickee.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/tmspoker.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/triviaquiz.cpp",
|
||||
|
@ -264,7 +264,7 @@ void jailbrek_state::machine_reset()
|
||||
void jailbrek_state::jailbrek(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
KONAMI1(config, m_maincpu, MASTER_CLOCK/12);
|
||||
KONAMI1(config, m_maincpu, MASTER_CLOCK/12); // the bootleg uses a standard M6809 with separate decryption logic
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &jailbrek_state::jailbrek_map);
|
||||
m_maincpu->set_periodic_int(FUNC(jailbrek_state::interrupt_nmi), attotime::from_hz(500)); /* ? */
|
||||
|
||||
@ -357,41 +357,69 @@ ROM_START( manhatan )
|
||||
ROM_CONTINUE( 0x0000, 0x2000 )
|
||||
ROM_END
|
||||
|
||||
/*
|
||||
Jail Break Bootleg Chip Locations Map (Not to scale)
|
||||
|
||||
|--------------------------------------------|
|
||||
/***************************************************************************
|
||||
|
||||
Jail Break Bootleg
|
||||
Hardware Info by Guru
|
||||
|
||||
PCB Number: A3001
|
||||
Note none of the Jail Break bootleg PCBs have numbers/letters along the edge of the PCB.
|
||||
These have been added so that chip locations can be documented.
|
||||
|--------------------------------------------------------------------------------------------------------------|
|
||||
A |VOL LM324 LS32 LS04 LS157 PAL16R4 LS669 LS669 LS32 LS86 LS04 LS109 |
|
||||
| |
|
||||
A | |
|
||||
B |C1182H LS32 LS374 LS670 LS374 LS86 LS109 LS08 LS10 LS74 LS04 18MHz|
|
||||
| |
|
||||
B | |
|
||||
C | LS00 LS283 LS174 LS670 LS374 LS86 LS374 LS92 LS11 LS107 LS74 LS32 |
|
||||
| |
|
||||
C | |
|
||||
D | LS07 LS138 DSW3 82S129.D6 LS257 LS244 LS374 LS86 LS161 LS161 LS04 |
|
||||
| |
|
||||
D | |
|
||||
E |1 LS253 DSW1 LS174 LS367 82S129.E6 LS257 LS374 LS374 LS85 LS161 LS257 6264 LS161|
|
||||
|8 |
|
||||
F |W LS253 DSW2 LS244 LS14 5.F6 LS374 LS374 LS374 LS161 LS257 6264 LS161|
|
||||
|A |--------------| |
|
||||
G |Y LS253 LS08 | VLM5030 | 4.G6 6264 PAL16R6 LS374 LS161 LS257 6264 LS08 |
|
||||
| |--------------| |
|
||||
H | LS253 76489 3.579545 LS175 3.H6 LS10 LS367 LS32 LS283 LS161 LS257 6264 LS32 |
|
||||
| MHz |
|
||||
I | 82S123.I2 LS374 LS367 LS139 2.I6 LS244 LS367 LS283 LS32 LS257 LS273 LS257|
|
||||
| |
|
||||
E |-| |
|
||||
J | 82S123.J2 LS373 LS138 DIP28 LS244 LS367 LS245 LS04 LS139 LS174 LS257|
|
||||
| |
|
||||
|-| |
|
||||
F | |
|
||||
| <=- Edge Connector |
|
||||
G | |
|
||||
|-| |
|
||||
| |
|
||||
H |-| |
|
||||
| |
|
||||
I | |
|
||||
| |
|
||||
J | |
|
||||
| |
|
||||
K | |
|
||||
| |
|
||||
L | |
|
||||
| |
|
||||
|--------------------------------------------|
|
||||
1 2 3 4 5 6 7 8 9 1 1 1 1 1
|
||||
0 1 2 3 4
|
||||
*/
|
||||
K | LS74 LS86 LS244 PAL16L8 LS245 1.K6 PAL16L8 LS367 LS273 LS74 LS367 LS157 LS04 |
|
||||
| |-------------| |
|
||||
L | LS74 LS04 LS245 LS273 | MC6809 | LS74 LS367 6116 LS245 LS174 LS125 LS175 LS21 |
|
||||
| |-------------| |
|
||||
|--------------------------------------------------------------------------------------------------------------|
|
||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
||||
|
||||
Notes: (All ICs shown)
|
||||
6809 - Clock input 1.5000MHz [18/12]
|
||||
VLM5030 - Sanyo VLM5030 Speech IC. Clock input 3.579545MHz
|
||||
76489 - Texas Instruments SN76489A Digital Complex Sound Generator. Clock input 1.5000MHz [18/12]
|
||||
HSync - 15.6609kHz
|
||||
VSync - 57.5772Hz
|
||||
1.K6 - 27C256 (main program)
|
||||
2.I6 - 27C128 (speech data for VLM5030)
|
||||
3.H6 - 27C256 (background character data)
|
||||
4.G6 - 27C256 (sprite data)
|
||||
5.F6 - 27C256 (sprite data)
|
||||
82S123.I2 - 32x8-bit bipolar PROM (blue color PROM)
|
||||
82S123.J2 - 32x8-bit bipolar PROM (red and green color PROM)
|
||||
82S129.D6 - 256x4-bit bipolar PROM (character lookup table)
|
||||
82S129.E6 - 256x4-bit bipolar PROM (sprite lookup table)
|
||||
6264 - 8kBx8-bit SRAM
|
||||
6116 - 2kBx8-bit SRAM
|
||||
C1182H - NEC uPC1182H Audio Power Amplifier
|
||||
LM324 - LM324 Quad Operational Amplifier
|
||||
DIP28 - Unpopulated DIP28 position (no socket)
|
||||
PAL16R6.G9 - sprites not shown when removed
|
||||
PAL16R4.A7 - black screen when removed, coin/start works and game plays blind
|
||||
PAL16L8.K8 - no boot when removed, only static startup garbage shown
|
||||
PAL16L8.K4 - no boot when removed, only static startup garbage shown
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( jailbrekb )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
@ -413,11 +441,11 @@ ROM_START( jailbrekb )
|
||||
ROM_REGION( 0x2000, "vlm", 0 ) /* speech rom */
|
||||
ROM_LOAD( "2.i6", 0x0000, 0x2000, CRC(d91d15e3) SHA1(475fe50aafbf8f2fb79880ef0e2c25158eda5270) )
|
||||
|
||||
ROM_REGION( 0x0004, "plds", 0 )
|
||||
ROM_LOAD( "k4.bin", 0x0000, 0x0001, NO_DUMP ) /* PAL16L8 */
|
||||
ROM_LOAD( "a7.bin", 0x0000, 0x0001, NO_DUMP ) /* PAL16R4 */
|
||||
ROM_LOAD( "g9.bin", 0x0000, 0x0001, NO_DUMP ) /* PAL16R6 */
|
||||
ROM_LOAD( "k8.bin", 0x0000, 0x0001, NO_DUMP ) /* PAL16L8 */
|
||||
ROM_REGION( 0x800, "plds", 0 )
|
||||
ROM_LOAD( "pal16l8.k4", 0x000, 0x104, CRC(96e993c6) SHA1(bd6fd8a039fbf8c890c5ce6cea0fcc7649719b51) )
|
||||
ROM_LOAD( "pal16r4.a7", 0x200, 0x104, CRC(3d074375) SHA1(8b2c8143e3540e265213a2d521e350ab71e1b26b) )
|
||||
ROM_LOAD( "pal16r6.g9", 0x400, 0x104, CRC(b6c4f22d) SHA1(d445b1c806dd1bcbdd07c9fa8c5483e0d03496aa) )
|
||||
ROM_LOAD( "pal16l8.k8", 0x600, 0x104, CRC(38783f49) SHA1(101621b378bb9b5faad7d8e3acdbaa42b5045d45) )
|
||||
ROM_END
|
||||
|
||||
GAME( 1986, jailbrek, 0, jailbrek, jailbrek, jailbrek_state, empty_init, ROT0, "Konami", "Jail Break", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -21,10 +21,33 @@ Video Chips : L7B0073 DATA EAST MXC 06 8746
|
||||
XTAL : 12.000MHz, 8.000MHz
|
||||
|
||||
|
||||
[ 1 Horizontally Scrolling Layer ]
|
||||
|
||||
Size : 512 x 512
|
||||
Tiles: 16 x 16 x 4.
|
||||
|
||||
In addition to a global x & y scroll register each tile-wide column
|
||||
has its own y scroll register.
|
||||
|
||||
[ 1 Fixed Layer ]
|
||||
|
||||
Size : 256 x 256
|
||||
Tiles: 8 x 8 x 2.
|
||||
|
||||
[ 128? sprites ]
|
||||
|
||||
Sprites tiles are 16 x 16 x 4. Each sprite has a height and width
|
||||
specified (1,2,4, or 8 tiles).
|
||||
|
||||
A sprite of width N uses N consecutive sprites: the first one specifies
|
||||
all the data (position,flip), the following ones only the tile code and
|
||||
color for that column (tile codes in each column are consecutive).
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
- The MCU handles coins and the bank switching of the roms for the main cpu.
|
||||
It additionally provides some z80 code that is copied to ram.
|
||||
- The MCU handles coins and the bank switching of the ROMs for the main CPU.
|
||||
It additionally provides some z80 code that is copied to RAM.
|
||||
|
||||
- One ROM (FI-1) is not used.
|
||||
|
||||
@ -34,15 +57,162 @@ NOTE: There is manual for Run Deep which is (c) 1988 by World Games. Is Cream Co
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/thedeep.h"
|
||||
|
||||
#include "video/decbac06.h"
|
||||
#include "video/decmxc06.h"
|
||||
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "cpu/mcs51/mcs51.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/ymopn.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class thedeep_state : public driver_device
|
||||
{
|
||||
public:
|
||||
thedeep_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_tilegen(*this, "tilegen"),
|
||||
m_spritegen(*this, "spritegen"),
|
||||
m_coins(*this, "COINS"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_textram(*this, "textram"),
|
||||
m_mainbank(*this, "mainbank")
|
||||
{ }
|
||||
|
||||
void thedeep(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<i8751_device> m_mcu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<deco_bac06_device> m_tilegen;
|
||||
required_device<deco_mxc06_device> m_spritegen;
|
||||
required_ioport m_coins;
|
||||
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_textram;
|
||||
required_memory_bank m_mainbank;
|
||||
|
||||
uint8_t m_nmi_enable;
|
||||
tilemap_t *m_text_tilemap;
|
||||
|
||||
// protection MCU
|
||||
uint8_t mcu_p0_r();
|
||||
void mcu_p1_w(uint8_t data);
|
||||
uint8_t mcu_p2_r();
|
||||
void mcu_p2_w(uint8_t data);
|
||||
void mcu_p3_w(uint8_t data);
|
||||
|
||||
uint8_t m_maincpu_to_mcu;
|
||||
uint8_t m_mcu_to_maincpu;
|
||||
uint8_t m_mcu_p2;
|
||||
uint8_t m_mcu_p3;
|
||||
uint8_t m_coin_result;
|
||||
|
||||
uint8_t protection_r();
|
||||
void protection_w(uint8_t data);
|
||||
uint8_t e004_r();
|
||||
void nmi_w(uint8_t data);
|
||||
void e100_w(uint8_t data);
|
||||
|
||||
void textram_w(offs_t offset, uint8_t data);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
|
||||
void palette(palette_device &palette) const;
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
|
||||
|
||||
void audio_map(address_map &map);
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Callbacks for the TileMap code
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
TILE_GET_INFO_MEMBER(thedeep_state::get_tile_info)
|
||||
{
|
||||
uint8_t code = m_textram[ tile_index * 2 + 0 ];
|
||||
uint8_t color = m_textram[ tile_index * 2 + 1 ];
|
||||
tileinfo.set(2,
|
||||
code + (color << 8),
|
||||
(color & 0xf0) >> 4,
|
||||
0);
|
||||
}
|
||||
|
||||
void thedeep_state::textram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_textram[offset] = data;
|
||||
m_text_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Palette Init
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void thedeep_state::palette(palette_device &palette) const
|
||||
{
|
||||
uint8_t const *const color_prom = memregion("proms")->base();
|
||||
for (int i = 0; i < 512; i++)
|
||||
palette.set_pen_color(i, pal4bit(color_prom[0x400 + i] >> 0), pal4bit(color_prom[0x400 + i] >> 4), pal4bit(color_prom[0x200 + i] >> 0));
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Video Init
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void thedeep_state::video_start()
|
||||
{
|
||||
m_text_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(thedeep_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 0x20, 0x20);
|
||||
|
||||
m_text_tilemap->set_transparent_pen(0);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Screen Drawing
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
uint32_t thedeep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
|
||||
m_tilegen->deco_bac06_pf_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
m_spritegen->draw_sprites(screen, bitmap, cliprect, m_gfxdecode->gfx(0), reinterpret_cast<uint16_t *>(m_spriteram.target()), 0x400 / 2);
|
||||
m_text_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Main CPU
|
||||
@ -59,7 +229,7 @@ void thedeep_state::nmi_w(uint8_t data)
|
||||
|
||||
void thedeep_state::machine_start()
|
||||
{
|
||||
membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
|
||||
m_mainbank->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
|
||||
|
||||
save_item(NAME(m_nmi_enable));
|
||||
save_item(NAME(m_maincpu_to_mcu));
|
||||
@ -84,7 +254,7 @@ void thedeep_state::protection_w(uint8_t data)
|
||||
uint8_t thedeep_state::e004_r()
|
||||
{
|
||||
// 7654321- unused?
|
||||
// -------0 coin status from mcu ready
|
||||
// -------0 coin status from MCU ready
|
||||
|
||||
uint8_t data = m_coin_result;
|
||||
|
||||
@ -96,13 +266,13 @@ uint8_t thedeep_state::e004_r()
|
||||
void thedeep_state::e100_w(uint8_t data)
|
||||
{
|
||||
if (data != 1)
|
||||
logerror("pc %04x: e100 = %02x\n", m_maincpu->pc(),data);
|
||||
logerror("pc %04x: e100 = %02x\n", m_maincpu->pc(), data);
|
||||
}
|
||||
|
||||
void thedeep_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x7fff).rom();
|
||||
map(0x8000, 0xbfff).bankr("bank1"); // ROM (banked)
|
||||
map(0x8000, 0xbfff).bankr(m_mainbank); // ROM (banked)
|
||||
map(0xc000, 0xcfff).ram();
|
||||
map(0xd000, 0xdfff).ram(); // RAM (MCU data copied here)
|
||||
map(0xe000, 0xe000).rw(FUNC(thedeep_state::protection_r), FUNC(thedeep_state::protection_w));
|
||||
@ -111,13 +281,13 @@ void thedeep_state::main_map(address_map &map)
|
||||
map(0xe009, 0xe009).portr("e009"); // P2
|
||||
map(0xe00a, 0xe00a).portr("e00a"); // DSW1
|
||||
map(0xe00b, 0xe00b).portr("e00b"); // DSW2
|
||||
map(0xe00c, 0xe00c).w(m_soundlatch, FUNC(generic_latch_8_device::write)); // To Sound CPU
|
||||
map(0xe00c, 0xe00c).w("soundlatch", FUNC(generic_latch_8_device::write)); // To sound CPU
|
||||
map(0xe100, 0xe100).w(FUNC(thedeep_state::e100_w)); // ?
|
||||
map(0xe200, 0xe207).w(m_tilegen, FUNC(deco_bac06_device::pf_control0_8bit_w));
|
||||
map(0xe210, 0xe217).w(m_tilegen, FUNC(deco_bac06_device::pf_control1_8bit_swap_w));
|
||||
map(0xe400, 0xe7ff).ram().share(m_spriteram); // Sprites
|
||||
map(0xe800, 0xefff).ram().w(FUNC(thedeep_state::textram_w)).share(m_textram); // Text Layer
|
||||
map(0xf000, 0xf7ff).rw(m_tilegen, FUNC(deco_bac06_device::pf_data_8bit_swap_r), FUNC(deco_bac06_device::pf_data_8bit_swap_w)); // Background Layer
|
||||
map(0xe800, 0xefff).ram().w(FUNC(thedeep_state::textram_w)).share(m_textram); // Text layer
|
||||
map(0xf000, 0xf7ff).rw(m_tilegen, FUNC(deco_bac06_device::pf_data_8bit_swap_r), FUNC(deco_bac06_device::pf_data_8bit_swap_w)); // Background layer
|
||||
map(0xf800, 0xf83f).rw(m_tilegen, FUNC(deco_bac06_device::pf_colscroll_8bit_swap_r), FUNC(deco_bac06_device::pf_colscroll_8bit_swap_w));
|
||||
map(0xf840, 0xffff).ram();
|
||||
}
|
||||
@ -133,7 +303,7 @@ void thedeep_state::audio_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x07ff).ram();
|
||||
map(0x0800, 0x0801).w("ymsnd", FUNC(ym2203_device::write)); //
|
||||
map(0x3000, 0x3000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); // From Main CPU
|
||||
map(0x3000, 0x3000).r("soundlatch", FUNC(generic_latch_8_device::read)); // From main CPU
|
||||
map(0x8000, 0xffff).rom();
|
||||
}
|
||||
|
||||
@ -163,7 +333,7 @@ void thedeep_state::mcu_p1_w(uint8_t data)
|
||||
// -----21- bank
|
||||
// -------0 flip screen
|
||||
|
||||
membank("bank1")->set_entry((data >> 1) & 0x03);
|
||||
m_mainbank->set_entry((data >> 1) & 0x03);
|
||||
|
||||
flip_screen_set(!BIT(data, 0));
|
||||
m_tilegen->set_flip_screen(!BIT(data, 0));
|
||||
@ -245,7 +415,7 @@ static INPUT_PORTS_START( thedeep )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW1:5") /* Listed as "NOT USED - ALWAYS OFF" */
|
||||
PORT_DIPNAME( 0x10, 0x10, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW1:5") // Listed as "NOT USED - ALWAYS OFF"
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Start Stage" ) PORT_DIPLOCATION("SW1:6")
|
||||
@ -274,7 +444,7 @@ static INPUT_PORTS_START( thedeep )
|
||||
PORT_DIPSETTING( 0x30, "50k 70k" )
|
||||
PORT_DIPSETTING( 0x20, "60k 80k" )
|
||||
PORT_DIPSETTING( 0x10, "80k 100k" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) /* Listed as "Unused" in the manual */
|
||||
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" ) // Listed as "Unused" in the manual
|
||||
PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -308,9 +478,9 @@ static const gfx_layout layout_16x16x4 =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_thedeep )
|
||||
GFXDECODE_ENTRY( "sprites", 0, layout_16x16x4, 0x080, 8 ) // [0] Sprites
|
||||
GFXDECODE_ENTRY( "bg_gfx", 0, layout_16x16x4, 0x100, 16 ) // [1] Background Layer
|
||||
GFXDECODE_ENTRY( "text", 0, layout_8x8x2, 0x000, 16 ) // [2] Text Layer
|
||||
GFXDECODE_ENTRY( "sprites", 0, layout_16x16x4, 0x080, 8 )
|
||||
GFXDECODE_ENTRY( "bg_gfx", 0, layout_16x16x4, 0x100, 16 )
|
||||
GFXDECODE_ENTRY( "text", 0, layout_8x8x2, 0x000, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -336,17 +506,17 @@ TIMER_DEVICE_CALLBACK_MEMBER(thedeep_state::interrupt)
|
||||
|
||||
void thedeep_state::thedeep(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
Z80(config, m_maincpu, 12_MHz_XTAL / 2); /* verified on pcb */
|
||||
// basic machine hardware
|
||||
Z80(config, m_maincpu, 12_MHz_XTAL / 2); // verified on PCB
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &thedeep_state::main_map);
|
||||
|
||||
TIMER(config, "scantimer", 0).configure_scanline(FUNC(thedeep_state::interrupt), "screen", 0, 1);
|
||||
|
||||
R65C02(config, m_audiocpu, 12_MHz_XTAL / 8); /* verified on pcb */
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &thedeep_state::audio_map);
|
||||
/* IRQ by YM2203, NMI by when sound latch written by main cpu */
|
||||
r65c02_device &audiocpu(R65C02(config, "audiocpu", 12_MHz_XTAL / 8)); // verified on PCB
|
||||
audiocpu.set_addrmap(AS_PROGRAM, &thedeep_state::audio_map);
|
||||
// IRQ by YM2203, NMI by when sound latch written by main CPU
|
||||
|
||||
// needs a tight sync with the mcu
|
||||
// needs a tight sync with the MCU
|
||||
config.set_perfect_quantum(m_maincpu);
|
||||
|
||||
// Intel C8751H-88 @ 8 MHz
|
||||
@ -357,7 +527,7 @@ void thedeep_state::thedeep(machine_config &config)
|
||||
m_mcu->port_out_cb<2>().set(FUNC(thedeep_state::mcu_p2_w));
|
||||
m_mcu->port_out_cb<3>().set(FUNC(thedeep_state::mcu_p3_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
@ -367,7 +537,7 @@ void thedeep_state::thedeep(machine_config &config)
|
||||
screen.set_palette(m_palette);
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_palette, gfx_thedeep);
|
||||
PALETTE(config, m_palette, FUNC(thedeep_state::thedeep_palette), 512);
|
||||
PALETTE(config, m_palette, FUNC(thedeep_state::palette), 512);
|
||||
|
||||
DECO_MXC06(config, m_spritegen, 0);
|
||||
|
||||
@ -376,13 +546,13 @@ void thedeep_state::thedeep(machine_config &config)
|
||||
m_tilegen->set_gfxdecode_tag(m_gfxdecode);
|
||||
m_tilegen->set_thedeep_kludge(); // TODO: this game wants TILE_FLIPX always set. Investigate why.
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
|
||||
generic_latch_8_device &soundlatch(GENERIC_LATCH_8(config, "soundlatch"));
|
||||
soundlatch.data_pending_callback().set_inputline("audiocpu", INPUT_LINE_NMI);
|
||||
|
||||
ym2203_device &ym(YM2203(config, "ymsnd", XTAL(12'000'000)/4)); /* verified on pcb */
|
||||
ym2203_device &ym(YM2203(config, "ymsnd", 12_MHz_XTAL / 4)); // verified on PCB
|
||||
ym.irq_handler().set_inputline("audiocpu", 0);
|
||||
ym.add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
}
|
||||
@ -397,68 +567,71 @@ void thedeep_state::thedeep(machine_config &config)
|
||||
|
||||
|
||||
ROM_START( thedeep )
|
||||
ROM_REGION( 0x20000, "maincpu", 0 ) /* Z80 Code */
|
||||
ROM_REGION( 0x20000, "maincpu", 0 ) // Z80 code
|
||||
ROM_LOAD( "dp-10.rom", 0x00000, 0x08000, CRC(7480b7a5) SHA1(ac6f121873a70c8077576322c201b7089c7b8a91) )
|
||||
ROM_LOAD( "dp-09.rom", 0x10000, 0x10000, CRC(c630aece) SHA1(809916a1ba1c8e0af4c228b0f26ac638e2abf81e) )
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 65C02 Code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) // 65C02 code
|
||||
ROM_LOAD( "dp-12.rom", 0x8000, 0x8000, CRC(c4e848c4) SHA1(d2dec5c8d7d59703f5485cab9124bf4f835fe728) )
|
||||
|
||||
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 Code */
|
||||
ROM_REGION( 0x1000, "mcu", 0 ) // i8751 code
|
||||
ROM_LOAD( "dp-14", 0x0000, 0x1000, CRC(0b886dad) SHA1(487192764342f8b0a320d20a378bf94f84592da9) ) // 1xxxxxxxxxxx = 0xFF
|
||||
|
||||
ROM_REGION( 0x40000, "sprites", 0 ) /* Sprites */
|
||||
ROM_REGION( 0x40000, "sprites", 0 )
|
||||
ROM_LOAD( "dp-08.rom", 0x00000, 0x10000, CRC(c5624f6b) SHA1(a3c0b13cddae760f30c7344d718cd69cad990054) )
|
||||
ROM_LOAD( "dp-07.rom", 0x10000, 0x10000, CRC(c76768c1) SHA1(e41ace1cb06ebe7f676b3b179b7dd01d00cf4d6a) )
|
||||
ROM_LOAD( "dp-06.rom", 0x20000, 0x10000, CRC(98adea78) SHA1(6a1af70de995a0a5e42fd395dd9454b7e2d9cb82) )
|
||||
ROM_LOAD( "dp-05.rom", 0x30000, 0x10000, CRC(76ea7dd1) SHA1(c29abb44a1182b47da749eeeb2db025ae3f28ea7) )
|
||||
|
||||
ROM_REGION( 0x40000, "bg_gfx", 0 ) /* 16x16x4 Background Layer */
|
||||
ROM_REGION( 0x40000, "bg_gfx", 0 ) // 16x16x4
|
||||
ROM_LOAD( "dp-03.rom", 0x00000, 0x10000, CRC(6bf5d819) SHA1(74079632d7c88ec22010c1a5bece0e36847fdab9) )
|
||||
ROM_LOAD( "dp-01.rom", 0x10000, 0x10000, CRC(e56be2fe) SHA1(25acc0f6d9cb5a727c9bac3e80aeb85a4727ddb0) )
|
||||
ROM_LOAD( "dp-04.rom", 0x20000, 0x10000, CRC(4db02c3c) SHA1(6284541372dec1113570cef31ca3c1a202fb4add) )
|
||||
ROM_LOAD( "dp-02.rom", 0x30000, 0x10000, CRC(1add423b) SHA1(b565340d719044ba2c428aab74f43f5a7cf7e2a3) )
|
||||
|
||||
ROM_REGION( 0x4000, "text", 0 ) /* 8x8x2 Text Layer */
|
||||
ROM_REGION( 0x4000, "text", 0 ) // 8x8x2
|
||||
ROM_LOAD( "dp-11.rom", 0x0000, 0x4000, CRC(196e23d1) SHA1(ed14e63fccb3e5dce462d9b8155e78749eaf9b3b) )
|
||||
|
||||
ROM_REGION( 0x600, "proms", 0 ) /* Colors */
|
||||
ROM_REGION( 0x600, "proms", 0 ) // Colors
|
||||
ROM_LOAD( "fi-1", 0x000, 0x200, CRC(f31efe09) SHA1(808c90fe02ed7b4000967c331b8773c4168b8a97) ) // FIXED BITS (xxxxxx0xxxxxx0x0)
|
||||
ROM_LOAD( "fi-2", 0x200, 0x200, CRC(f305c8d5) SHA1(f82c709dc75a3c681d6f0ebf2702cb90110b1f0c) ) // FIXED BITS (0000xxxx)
|
||||
ROM_LOAD( "fi-3", 0x400, 0x200, CRC(f61a9686) SHA1(24082f60b72268d240ceca6999bdf18872625cd2) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( rundeep )
|
||||
ROM_REGION( 0x20000, "maincpu", 0 ) /* Z80 Code */
|
||||
ROM_REGION( 0x20000, "maincpu", 0 ) // Z80 code
|
||||
ROM_LOAD( "3", 0x00000, 0x08000, CRC(c9c9e194) SHA1(e9552c3321585f0902f29b55a7de8e2316885713) )
|
||||
ROM_LOAD( "9", 0x10000, 0x10000, CRC(931f4e67) SHA1(f4942c5f0fdbcd6cdb96ddbbf2015f938b56b466) )
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 65C02 Code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) // 65C02 code
|
||||
ROM_LOAD( "dp-12.rom", 0x8000, 0x8000, CRC(c4e848c4) SHA1(d2dec5c8d7d59703f5485cab9124bf4f835fe728) )
|
||||
|
||||
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 Code */
|
||||
ROM_REGION( 0x1000, "mcu", 0 ) // i8751 code
|
||||
ROM_LOAD( "dp-14", 0x0000, 0x1000, CRC(0b886dad) SHA1(487192764342f8b0a320d20a378bf94f84592da9) ) // 1xxxxxxxxxxx = 0xFF
|
||||
|
||||
ROM_REGION( 0x40000, "sprites", 0 ) /* Sprites */
|
||||
ROM_REGION( 0x40000, "sprites", 0 )
|
||||
ROM_LOAD( "dp-08.rom", 0x00000, 0x10000, CRC(c5624f6b) SHA1(a3c0b13cddae760f30c7344d718cd69cad990054) )
|
||||
ROM_LOAD( "dp-07.rom", 0x10000, 0x10000, CRC(c76768c1) SHA1(e41ace1cb06ebe7f676b3b179b7dd01d00cf4d6a) )
|
||||
ROM_LOAD( "dp-06.rom", 0x20000, 0x10000, CRC(98adea78) SHA1(6a1af70de995a0a5e42fd395dd9454b7e2d9cb82) )
|
||||
ROM_LOAD( "dp-05.rom", 0x30000, 0x10000, CRC(76ea7dd1) SHA1(c29abb44a1182b47da749eeeb2db025ae3f28ea7) )
|
||||
|
||||
ROM_REGION( 0x40000, "bg_gfx", 0 ) /* 16x16x4 Background Layer */
|
||||
ROM_REGION( 0x40000, "bg_gfx", 0 ) // 16x16x4
|
||||
ROM_LOAD( "dp-03.rom", 0x00000, 0x10000, CRC(6bf5d819) SHA1(74079632d7c88ec22010c1a5bece0e36847fdab9) )
|
||||
ROM_LOAD( "dp-01.rom", 0x10000, 0x10000, CRC(e56be2fe) SHA1(25acc0f6d9cb5a727c9bac3e80aeb85a4727ddb0) )
|
||||
ROM_LOAD( "dp-04.rom", 0x20000, 0x10000, CRC(4db02c3c) SHA1(6284541372dec1113570cef31ca3c1a202fb4add) )
|
||||
ROM_LOAD( "dp-02.rom", 0x30000, 0x10000, CRC(1add423b) SHA1(b565340d719044ba2c428aab74f43f5a7cf7e2a3) )
|
||||
|
||||
ROM_REGION( 0x4000, "text", 0 ) /* 8x8x2 Text Layer */
|
||||
ROM_REGION( 0x4000, "text", 0 ) // 8x8x2
|
||||
ROM_LOAD( "11", 0x0000, 0x4000, CRC(5d29e4b9) SHA1(608345291062e9ce329ebe9a8c1e65d52e358785) )
|
||||
|
||||
ROM_REGION( 0x600, "proms", 0 ) /* Colors */
|
||||
ROM_REGION( 0x600, "proms", 0 ) // Colors
|
||||
ROM_LOAD( "fi-1", 0x000, 0x200, CRC(f31efe09) SHA1(808c90fe02ed7b4000967c331b8773c4168b8a97) ) // FIXED BITS (xxxxxx0xxxxxx0x0)
|
||||
ROM_LOAD( "fi-2", 0x200, 0x200, CRC(f305c8d5) SHA1(f82c709dc75a3c681d6f0ebf2702cb90110b1f0c) ) // FIXED BITS (0000xxxx)
|
||||
ROM_LOAD( "fi-3", 0x400, 0x200, CRC(f61a9686) SHA1(24082f60b72268d240ceca6999bdf18872625cd2) )
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
GAME( 1987, thedeep, 0, thedeep, thedeep, thedeep_state, empty_init, ROT270, "Woodplace Inc.", "The Deep (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1988, rundeep, thedeep, thedeep, thedeep, thedeep_state, empty_init, ROT270, "Cream Co., Ltd.", "Run Deep", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -313,23 +313,183 @@ TODO:
|
||||
*******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/welltris.h"
|
||||
|
||||
#include "video/vsystem_gga.h"
|
||||
#include "video/vsystem_spr2.h"
|
||||
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "sound/ymopn.h"
|
||||
#include "video/vsystem_gga.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
namespace {
|
||||
|
||||
#define WELLTRIS_4P_HACK 0
|
||||
|
||||
class welltris_state : public driver_device
|
||||
{
|
||||
public:
|
||||
welltris_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_spr_old(*this, "vsystem_spr_old"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_pixelram(*this, "pixelram"),
|
||||
m_charvideoram(*this, "charvideoram"),
|
||||
m_soundbank(*this, "soundbank")
|
||||
{ }
|
||||
|
||||
void quiz18k(machine_config &config);
|
||||
void welltris(machine_config &config);
|
||||
|
||||
void init_quiz18k();
|
||||
void init_welltris();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<vsystem_spr2_device> m_spr_old;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
|
||||
required_shared_ptr<uint16_t> m_spriteram;
|
||||
required_shared_ptr<uint16_t> m_pixelram;
|
||||
required_shared_ptr<uint16_t> m_charvideoram;
|
||||
required_memory_bank m_soundbank;
|
||||
|
||||
tilemap_t *m_char_tilemap;
|
||||
uint8_t m_gfxbank[2];
|
||||
uint16_t m_charpalettebank;
|
||||
uint16_t m_spritepalettebank;
|
||||
uint16_t m_pixelpalettebank;
|
||||
int m_scrollx;
|
||||
int m_scrolly;
|
||||
|
||||
void sound_bankswitch_w(uint8_t data);
|
||||
void palette_bank_w(offs_t offset, uint8_t data);
|
||||
void gfxbank_w(offs_t offset, uint8_t data);
|
||||
void scrollreg_w(offs_t offset, uint16_t data);
|
||||
void charvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void setbank(int num, int bank);
|
||||
void main_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void sound_port_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
void welltris_state::setbank(int num, int bank)
|
||||
{
|
||||
if (m_gfxbank[num] != bank)
|
||||
{
|
||||
m_gfxbank[num] = bank;
|
||||
m_char_tilemap->mark_all_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Not really enough evidence here
|
||||
|
||||
void welltris_state::palette_bank_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_charpalettebank != (data & 0x03))
|
||||
{
|
||||
m_charpalettebank = (data & 0x03);
|
||||
m_char_tilemap->mark_all_dirty();
|
||||
}
|
||||
|
||||
flip_screen_set(data & 0x80);
|
||||
|
||||
m_spritepalettebank = (data & 0x20) >> 5;
|
||||
m_pixelpalettebank = (data & 0x08) >> 3;
|
||||
}
|
||||
|
||||
void welltris_state::gfxbank_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
setbank(0, (data & 0xf0) >> 4);
|
||||
setbank(1, data & 0x0f);
|
||||
}
|
||||
|
||||
void welltris_state::scrollreg_w(offs_t offset, uint16_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_scrollx = data - 14; break;
|
||||
case 1: m_scrolly = data + 0; break;
|
||||
}
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(welltris_state::get_tile_info)
|
||||
{
|
||||
uint16_t code = m_charvideoram[tile_index];
|
||||
int bank = (code & 0x1000) >> 12;
|
||||
|
||||
tileinfo.set(0,
|
||||
(code & 0x0fff) + (m_gfxbank[bank] << 12),
|
||||
((code & 0xe000) >> 13) + (8 * m_charpalettebank),
|
||||
0);
|
||||
}
|
||||
|
||||
void welltris_state::charvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_charvideoram[offset]);
|
||||
m_char_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void welltris_state::video_start()
|
||||
{
|
||||
m_char_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(welltris_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
|
||||
m_char_tilemap->set_transparent_pen(15);
|
||||
|
||||
save_item(NAME(m_gfxbank));
|
||||
save_item(NAME(m_charpalettebank));
|
||||
save_item(NAME(m_spritepalettebank));
|
||||
save_item(NAME(m_pixelpalettebank));
|
||||
save_item(NAME(m_scrollx));
|
||||
save_item(NAME(m_scrolly));
|
||||
}
|
||||
|
||||
void welltris_state::draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int y = 0; y < 256; y++) {
|
||||
for (int x = 0; x < 512 / 2; x++) {
|
||||
int pixdata = m_pixelram[(x & 0xff) + (y & 0xff) * 256];
|
||||
|
||||
bitmap.pix(y, (x * 2) + 0) = (pixdata >> 8) + (0x100 * m_pixelpalettebank) + 0x400;
|
||||
bitmap.pix(y, (x * 2) + 1) = (pixdata & 0xff) + (0x100 * m_pixelpalettebank) + 0x400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t welltris_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_char_tilemap->set_scrollx(0, m_scrollx);
|
||||
m_char_tilemap->set_scrolly(0, m_scrolly);
|
||||
|
||||
draw_background(bitmap, cliprect);
|
||||
m_char_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void welltris_state::sound_bankswitch_w(uint8_t data)
|
||||
{
|
||||
membank("soundbank")->set_entry(data & 0x03);
|
||||
m_soundbank->set_entry(data & 0x03);
|
||||
}
|
||||
|
||||
|
||||
@ -337,21 +497,21 @@ void welltris_state::main_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0x03ffff).rom();
|
||||
map(0x100000, 0x17ffff).rom();
|
||||
map(0x800000, 0x81ffff).ram().share("pixelram"); /* Graph_1 & 2*/
|
||||
map(0xff8000, 0xffbfff).ram(); /* work */
|
||||
map(0xffc000, 0xffc3ff).ram().share("spriteram"); /* Sprite */
|
||||
map(0xffd000, 0xffdfff).ram().w(FUNC(welltris_state::charvideoram_w)).share("charvideoram"); /* Char */
|
||||
map(0xffe000, 0xffefff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); /* Palette */
|
||||
map(0xfff000, 0xfff001).portr("P1"); /* Bottom Controls */
|
||||
map(0xfff000, 0xfff001).w(FUNC(welltris_state::palette_bank_w));
|
||||
map(0xfff002, 0xfff003).portr("P2"); /* Top Controls */
|
||||
map(0xfff002, 0xfff003).w(FUNC(welltris_state::gfxbank_w));
|
||||
map(0xfff004, 0xfff005).portr("P3"); /* Left Side Ctrls */
|
||||
map(0x800000, 0x81ffff).ram().share(m_pixelram); // graph_1 & 2
|
||||
map(0xff8000, 0xffbfff).ram(); // work
|
||||
map(0xffc000, 0xffc3ff).ram().share(m_spriteram);
|
||||
map(0xffd000, 0xffdfff).ram().w(FUNC(welltris_state::charvideoram_w)).share(m_charvideoram);
|
||||
map(0xffe000, 0xffefff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
|
||||
map(0xfff000, 0xfff001).portr("P1"); // bottom controls
|
||||
map(0xfff001, 0xfff001).w(FUNC(welltris_state::palette_bank_w));
|
||||
map(0xfff002, 0xfff003).portr("P2"); // top controls
|
||||
map(0xfff003, 0xfff003).w(FUNC(welltris_state::gfxbank_w));
|
||||
map(0xfff004, 0xfff005).portr("P3"); // left side controls
|
||||
map(0xfff004, 0xfff007).w(FUNC(welltris_state::scrollreg_w));
|
||||
map(0xfff006, 0xfff007).portr("P4"); /* Right Side Ctrls */
|
||||
map(0xfff008, 0xfff009).portr("SYSTEM"); /* Bit 5 Tested at start of irq 1 */
|
||||
map(0xfff009, 0xfff009).w(m_soundlatch, FUNC(generic_latch_8_device::write));
|
||||
map(0xfff00a, 0xfff00b).portr("EXTRA"); /* P3+P4 Coin + Start Buttons */
|
||||
map(0xfff006, 0xfff007).portr("P4"); // right side controls
|
||||
map(0xfff008, 0xfff009).portr("SYSTEM"); // bit 5 tested at start of IRQ 1 */
|
||||
map(0xfff009, 0xfff009).w("soundlatch", FUNC(generic_latch_8_device::write));
|
||||
map(0xfff00a, 0xfff00b).portr("EXTRA"); // P3+P4 coin + start buttons
|
||||
map(0xfff00c, 0xfff00d).portr("DSW1");
|
||||
map(0xfff00e, 0xfff00f).portr("DSW2");
|
||||
map(0xfff00c, 0xfff00f).w("gga", FUNC(vsystem_gga_device::write)).umask16(0x00ff);
|
||||
@ -361,7 +521,7 @@ void welltris_state::sound_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x77ff).rom();
|
||||
map(0x7800, 0x7fff).ram();
|
||||
map(0x8000, 0xffff).bankr("soundbank");
|
||||
map(0x8000, 0xffff).bankr(m_soundbank);
|
||||
}
|
||||
|
||||
void welltris_state::sound_port_map(address_map &map)
|
||||
@ -369,8 +529,8 @@ void welltris_state::sound_port_map(address_map &map)
|
||||
map.global_mask(0xff);
|
||||
map(0x00, 0x00).w(FUNC(welltris_state::sound_bankswitch_w));
|
||||
map(0x08, 0x0b).rw("ymsnd", FUNC(ym2610_device::read), FUNC(ym2610_device::write));
|
||||
map(0x10, 0x10).r(m_soundlatch, FUNC(generic_latch_8_device::read));
|
||||
map(0x18, 0x18).w(m_soundlatch, FUNC(generic_latch_8_device::acknowledge_w));
|
||||
map(0x10, 0x10).r("soundlatch", FUNC(generic_latch_8_device::read));
|
||||
map(0x18, 0x18).w("soundlatch", FUNC(generic_latch_8_device::acknowledge_w));
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( welltris )
|
||||
@ -379,10 +539,10 @@ static INPUT_PORTS_START( welltris )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Test (used to go through tests in service mode) */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) /* Tested at start of irq 1 */
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service (adds a coin) */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) /* pending sound command */
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // Test (used to go through tests in service mode)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) // Tested at start of IRQ 1
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service (adds a coin)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // pending sound command
|
||||
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
@ -512,7 +672,7 @@ static INPUT_PORTS_START( welltris )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0008, DEF_STR( On ) )
|
||||
#if WELLTRIS_4P_HACK
|
||||
/* again might be handy if a real 4 player version shows up */
|
||||
// again might be handy if a real 4 player version shows up
|
||||
PORT_DIPNAME( 0x0010, 0x0010, "DIPSW 2-5 (see notes)" )
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
@ -527,7 +687,7 @@ static INPUT_PORTS_START( welltris )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
#endif
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) /* Flip Screen Not Currently Supported */
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) ) // Flip screen not currently supported
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
|
||||
@ -542,7 +702,7 @@ static INPUT_PORTS_START( quiz18k )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* pending sound command */
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // pending sound command
|
||||
|
||||
PORT_START("P1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
|
||||
@ -600,7 +760,7 @@ static INPUT_PORTS_START( quiz18k )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) /* Flip Screen Not Currently Supported */
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) // Flip screen not currently supported
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
|
||||
@ -651,45 +811,45 @@ static const gfx_layout spritelayout =
|
||||
};
|
||||
|
||||
static GFXDECODE_START( gfx_welltris )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 16* 0, 4*16 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 16*96, 2*16 )
|
||||
GFXDECODE_ENTRY( "chars", 0, charlayout, 16* 0, 4*16 )
|
||||
GFXDECODE_ENTRY( "sprites", 0, spritelayout, 16*96, 2*16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
void welltris_state::init_welltris()
|
||||
{
|
||||
#if WELLTRIS_4P_HACK
|
||||
/* A Hack which shows 4 player mode in code which is disabled */
|
||||
uint16_t *RAM = (uint16_t *)memregion("maincpu")->base();
|
||||
RAM[0xB91C/2] = 0x4e71;
|
||||
RAM[0xB91E/2] = 0x4e71;
|
||||
// A Hack which shows 4 player mode in code which is disabled
|
||||
uint16_t *ram = (uint16_t *)memregion("maincpu")->base();
|
||||
ram[0xb91c / 2] = 0x4e71;
|
||||
ram[0xb91e / 2] = 0x4e71;
|
||||
#endif
|
||||
}
|
||||
|
||||
void welltris_state::machine_start()
|
||||
{
|
||||
membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x8000);
|
||||
m_soundbank->configure_entries(0, 4, memregion("audiocpu")->base(), 0x8000);
|
||||
}
|
||||
|
||||
void welltris_state::welltris(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M68000(config, m_maincpu, 20000000/2); /* 10 MHz */
|
||||
// basic machine hardware
|
||||
M68000(config, m_maincpu, 20000000 / 2); // 10 MHz
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &welltris_state::main_map);
|
||||
m_maincpu->set_vblank_int("screen", FUNC(welltris_state::irq1_line_hold));
|
||||
|
||||
Z80(config, m_audiocpu, 8000000/2); /* 4 MHz ??? */
|
||||
Z80(config, m_audiocpu, 8000000 / 2); // 4 MHz ???
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &welltris_state::sound_map);
|
||||
m_audiocpu->set_addrmap(AS_IO, &welltris_state::sound_port_map); /* IRQs are triggered by the YM2610 */
|
||||
m_audiocpu->set_addrmap(AS_IO, &welltris_state::sound_port_map); // IRQs are triggered by the YM2610
|
||||
|
||||
/* video hardware */
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
m_screen->set_refresh_hz(60);
|
||||
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
m_screen->set_size(512, 256);
|
||||
m_screen->set_visarea(15, 367-1, 8, 248-1);
|
||||
m_screen->set_screen_update(FUNC(welltris_state::screen_update));
|
||||
m_screen->set_palette("palette");
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
||||
screen.set_size(512, 256);
|
||||
screen.set_visarea(15, 367-1, 8, 248-1);
|
||||
screen.set_screen_update(FUNC(welltris_state::screen_update));
|
||||
screen.set_palette("palette");
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, "palette", gfx_welltris);
|
||||
PALETTE(config, "palette").set_format(palette_device::xRGB_555, 2048);
|
||||
@ -701,12 +861,12 @@ void welltris_state::welltris(machine_config &config)
|
||||
m_spr_old->set_pritype(-1);
|
||||
m_spr_old->set_gfxdecode_tag(m_gfxdecode);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
GENERIC_LATCH_8(config, m_soundlatch);
|
||||
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
|
||||
m_soundlatch->set_separate_acknowledge(true);
|
||||
generic_latch_8_device &soundlatch(GENERIC_LATCH_8(config, "soundlatch"));
|
||||
soundlatch.data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
|
||||
soundlatch.set_separate_acknowledge(true);
|
||||
|
||||
ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000));
|
||||
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
|
||||
@ -719,8 +879,8 @@ void welltris_state::quiz18k(machine_config &config)
|
||||
{
|
||||
welltris(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
m_screen->set_visarea(15, 335-1, 0, 224-1);
|
||||
// basic machine hardware
|
||||
subdevice<screen_device>("screen")->set_visarea(15, 335-1, 0, 224-1);
|
||||
|
||||
m_spr_old->set_offsets(6, 1);
|
||||
}
|
||||
@ -728,85 +888,86 @@ void welltris_state::quiz18k(machine_config &config)
|
||||
|
||||
|
||||
ROM_START( welltris )
|
||||
ROM_REGION( 0x180000, "maincpu", 0 ) /* 68000 code */
|
||||
ROM_REGION( 0x180000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "j2u.8", 0x000000, 0x20000, CRC(7488fe94) SHA1(41874366e2ab763cd827ff712b76ea2da0f9af6a) )
|
||||
ROM_LOAD16_BYTE( "j1u.7", 0x000001, 0x20000, CRC(571413ac) SHA1(5eb9387efb9c1597005abff4d79f4b32aa7c93b2) )
|
||||
/* Space */
|
||||
// Space
|
||||
ROM_LOAD16_BYTE( "lh532j10.10", 0x100000, 0x40000, CRC(1187c665) SHA1(c6c55016e46805694348b386e521a3ef1a443621) )
|
||||
ROM_LOAD16_BYTE( "lh532j11.9", 0x100001, 0x40000, CRC(18eda9e5) SHA1(c01d1dc6bfde29797918490947c89440b58d5372) )
|
||||
|
||||
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 128k for the audio CPU + banks */
|
||||
ROM_REGION( 0x20000, "audiocpu", 0 ) // 128k for the audio CPU + banks
|
||||
ROM_LOAD( "3.144", 0x00000, 0x20000, CRC(ae8f763e) SHA1(255419e02189c2e156c1fbcb0cd4aedd14ed8ffa) )
|
||||
|
||||
ROM_REGION( 0x0a0000, "gfx1", 0 ) /* CHAR Tiles */
|
||||
ROM_REGION( 0x0a0000, "chars", 0 )
|
||||
ROM_LOAD( "lh534j12.77", 0x000000, 0x80000, CRC(b61a8b74) SHA1(e17f7355375bdc166ef8131f7de9dbda5453f570) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 ) /* SPRITE Tiles */
|
||||
ROM_REGION( 0x80000, "sprites", 0 )
|
||||
ROM_LOAD( "046.93", 0x000000, 0x40000, CRC(31d96d77) SHA1(5613ef9e9e38406b4e64fc8983ea50b57613923e) )
|
||||
ROM_LOAD( "048.94", 0x040000, 0x40000, CRC(bb4643da) SHA1(38d54f8c3dba09b528df05d748ab5bdf5d028453) )
|
||||
|
||||
ROM_REGION( 0x100000, "ymsnd:adpcma", 0 ) /* sound samples */
|
||||
ROM_REGION( 0x100000, "ymsnd:adpcma", 0 )
|
||||
ROM_LOAD( "lh534j09.123", 0x00000, 0x80000, CRC(6c2ce9a5) SHA1(a4011ecfb505191c9934ba374933cd11b331d55a) )
|
||||
ROM_LOAD( "lh534j10.124", 0x80000, 0x80000, CRC(e3682221) SHA1(3e1cda07cf451955dc473eabe007854e5148ae27) )
|
||||
|
||||
ROM_REGION( 0x080000, "ymsnd:adpcmb", 0 ) /* sound samples */
|
||||
ROM_REGION( 0x080000, "ymsnd:adpcmb", 0 )
|
||||
ROM_LOAD( "lh534j11.126", 0x00000, 0x80000, CRC(bf85fb0d) SHA1(358f91bbff2d3260f83b5a0422c0d985d1735cef) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( welltrisj )
|
||||
ROM_REGION( 0x180000, "maincpu", 0 ) /* 68000 code */
|
||||
ROM_REGION( 0x180000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "j2.8", 0x000000, 0x20000, CRC(68ec5691) SHA1(8615415c5c98aa9caa0878a8251da7985f050f94) )
|
||||
ROM_LOAD16_BYTE( "j1.7", 0x000001, 0x20000, CRC(1598ea2c) SHA1(e9150c3ab9b5c0eb9a5fee3e071358f92a005078) )
|
||||
/* Space */
|
||||
// Space
|
||||
ROM_LOAD16_BYTE( "lh532j10.10", 0x100000, 0x40000, CRC(1187c665) SHA1(c6c55016e46805694348b386e521a3ef1a443621) )
|
||||
ROM_LOAD16_BYTE( "lh532j11.9", 0x100001, 0x40000, CRC(18eda9e5) SHA1(c01d1dc6bfde29797918490947c89440b58d5372) )
|
||||
|
||||
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 128k for the audio CPU + banks */
|
||||
ROM_REGION( 0x20000, "audiocpu", 0 ) // 128k for the audio CPU + banks
|
||||
ROM_LOAD( "3.144", 0x00000, 0x20000, CRC(ae8f763e) SHA1(255419e02189c2e156c1fbcb0cd4aedd14ed8ffa) )
|
||||
|
||||
ROM_REGION( 0x0a0000, "gfx1", 0 ) /* CHAR Tiles */
|
||||
ROM_REGION( 0x0a0000, "chars", 0 )
|
||||
ROM_LOAD( "lh534j12.77", 0x000000, 0x80000, CRC(b61a8b74) SHA1(e17f7355375bdc166ef8131f7de9dbda5453f570) )
|
||||
|
||||
ROM_REGION( 0x80000, "gfx2", 0 ) /* SPRITE Tiles */
|
||||
ROM_REGION( 0x80000, "sprites", 0 )
|
||||
ROM_LOAD( "046.93", 0x000000, 0x40000, CRC(31d96d77) SHA1(5613ef9e9e38406b4e64fc8983ea50b57613923e) )
|
||||
ROM_LOAD( "048.94", 0x040000, 0x40000, CRC(bb4643da) SHA1(38d54f8c3dba09b528df05d748ab5bdf5d028453) )
|
||||
|
||||
ROM_REGION( 0x100000, "ymsnd:adpcma", 0 ) /* sound samples */
|
||||
ROM_REGION( 0x100000, "ymsnd:adpcma", 0 )
|
||||
ROM_LOAD( "lh534j09.123", 0x00000, 0x80000, CRC(6c2ce9a5) SHA1(a4011ecfb505191c9934ba374933cd11b331d55a) )
|
||||
ROM_LOAD( "lh534j10.124", 0x80000, 0x80000, CRC(e3682221) SHA1(3e1cda07cf451955dc473eabe007854e5148ae27) )
|
||||
|
||||
ROM_REGION( 0x080000, "ymsnd:adpcmb", 0 ) /* sound samples */
|
||||
ROM_REGION( 0x080000, "ymsnd:adpcmb", 0 )
|
||||
ROM_LOAD( "lh534j11.126", 0x00000, 0x80000, CRC(bf85fb0d) SHA1(358f91bbff2d3260f83b5a0422c0d985d1735cef) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( quiz18k )
|
||||
ROM_REGION( 0x180000, "maincpu", 0 ) /* 68000 code */
|
||||
ROM_REGION( 0x180000, "maincpu", 0 ) // 68000 code
|
||||
ROM_LOAD16_BYTE( "1-ic8.bin", 0x000000, 0x20000, CRC(10a64336) SHA1(d63c0752385e1d66b09a7197e267dcd0e5e93be8) )
|
||||
ROM_LOAD16_BYTE( "2-ic7.bin", 0x000001, 0x20000, CRC(8b21b431) SHA1(278238ab4a5d11577c5ab3c7462b429f510a1d50) )
|
||||
/* Space */
|
||||
// Space
|
||||
ROM_LOAD16_BYTE( "ic10.bin", 0x100000, 0x40000, CRC(501453a3) SHA1(d127f417f1c52333e478ac397fbe8a2f223b1ce7) )
|
||||
ROM_LOAD16_BYTE( "ic9.bin", 0x100001, 0x40000, CRC(99b6840f) SHA1(8409a33c64729066bfed6e49dcd84f30906274cb) )
|
||||
|
||||
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 128k for the audio CPU + banks */
|
||||
ROM_REGION( 0x20000, "audiocpu", 0 ) // 128k for the audio CPU + banks
|
||||
ROM_LOAD( "3-ic144.bin", 0x00000, 0x20000, CRC(72d372e3) SHA1(d077e34947de1050b68d76506cc8926b06a94a76) )
|
||||
|
||||
ROM_REGION( 0x180000, "gfx1", 0 ) /* CHAR Tiles */
|
||||
ROM_REGION( 0x180000, "chars", 0 )
|
||||
ROM_LOAD( "ic77.bin", 0x000000, 0x80000, CRC(af3b6fd1) SHA1(d22f7cf62a94ae3a2dcb0236630e9ac88d5e528b) )
|
||||
ROM_LOAD( "ic78.bin", 0x080000, 0x80000, CRC(44bbdef3) SHA1(cd91eaf98602ef3448f49c8287591aa845afb874) )
|
||||
ROM_LOAD( "ic79.bin", 0x100000, 0x80000, CRC(d721e169) SHA1(33ec819c4e7b4dbab41756af9eca857107d96c8b) )
|
||||
|
||||
ROM_REGION( 0x100000, "gfx2", 0 ) /* SPRITE Tiles */
|
||||
ROM_REGION( 0x100000, "sprites", 0 )
|
||||
ROM_LOAD( "ic93.bin", 0x000000, 0x80000, CRC(4d387c5e) SHA1(e77aea06b9b2dc8ada5618aaf83bb80f63670363) )
|
||||
ROM_LOAD( "ic94.bin", 0x080000, 0x80000, CRC(6be2f164) SHA1(6a3ca63d6238d587a50718d2a6c76f01932c76c3) )
|
||||
|
||||
ROM_REGION( 0x140000, "ymsnd:adpcma", 0 ) /* sound samples */
|
||||
ROM_REGION( 0x140000, "ymsnd:adpcma", 0 )
|
||||
ROM_LOAD( "ic123.bin", 0x00000, 0x80000, CRC(ee4995cf) SHA1(1b47938ddc87709f8d118b86fe62602972c77ced) )
|
||||
ROM_LOAD( "ic124.bin", 0x80000, 0x40000, CRC(076f58c3) SHA1(bd78f39b85b2697e733896705355e21b8d2a141d) )
|
||||
|
||||
ROM_REGION( 0x040000, "ymsnd:adpcmb", 0 ) /* sound samples */
|
||||
ROM_REGION( 0x040000, "ymsnd:adpcmb", 0 )
|
||||
ROM_LOAD( "ic126.bin", 0x00000, 0x40000, CRC(7a92fbc9) SHA1(c13be1e84fc8e74c85d25d3357e078bc9e264682) )
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
GAME( 1991, welltris, 0, welltris, welltris, welltris_state, init_welltris, ROT0, "Video System Co.", "Welltris (World?, 2 players)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -1,91 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Luca Elia
|
||||
#ifndef MAME_INCLUDES_THEDEEP_H
|
||||
#define MAME_INCLUDES_THEDEEP_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cpu/mcs51/mcs51.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "machine/timer.h"
|
||||
#include "video/decbac06.h"
|
||||
#include "video/decmxc06.h"
|
||||
#include "emupal.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
class thedeep_state : public driver_device
|
||||
{
|
||||
public:
|
||||
thedeep_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_tilegen(*this, "tilegen"),
|
||||
m_spritegen(*this, "spritegen"),
|
||||
m_soundlatch(*this, "soundlatch"),
|
||||
m_coins(*this, "COINS"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_textram(*this, "textram")
|
||||
{ }
|
||||
|
||||
void thedeep(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<i8751_device> m_mcu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<deco_bac06_device> m_tilegen;
|
||||
required_device<deco_mxc06_device> m_spritegen;
|
||||
required_device<generic_latch_8_device> m_soundlatch;
|
||||
required_ioport m_coins;
|
||||
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
required_shared_ptr<uint8_t> m_textram;
|
||||
|
||||
int m_nmi_enable;
|
||||
tilemap_t *m_text_tilemap;
|
||||
|
||||
// protection mcu
|
||||
uint8_t mcu_p0_r();
|
||||
void mcu_p1_w(uint8_t data);
|
||||
uint8_t mcu_p2_r();
|
||||
void mcu_p2_w(uint8_t data);
|
||||
void mcu_p3_w(uint8_t data);
|
||||
|
||||
uint8_t m_maincpu_to_mcu;
|
||||
uint8_t m_mcu_to_maincpu;
|
||||
uint8_t m_mcu_p2;
|
||||
uint8_t m_mcu_p3;
|
||||
int m_coin_result;
|
||||
|
||||
uint8_t protection_r();
|
||||
void protection_w(uint8_t data);
|
||||
uint8_t e004_r();
|
||||
void nmi_w(uint8_t data);
|
||||
void e100_w(uint8_t data);
|
||||
|
||||
void textram_w(offs_t offset, uint8_t data);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
|
||||
void thedeep_palette(palette_device &palette) const;
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
|
||||
|
||||
void audio_map(address_map &map);
|
||||
void main_map(address_map &map);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_THEDEEP_H
|
@ -1,74 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
#ifndef MAME_INCLUDES_WELLTRIS_H
|
||||
#define MAME_INCLUDES_WELLTRIS_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/gen_latch.h"
|
||||
#include "video/vsystem_spr2.h"
|
||||
#include "screen.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
class welltris_state : public driver_device
|
||||
{
|
||||
public:
|
||||
welltris_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_spr_old(*this, "vsystem_spr_old"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_soundlatch(*this, "soundlatch"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_pixelram(*this, "pixelram"),
|
||||
m_charvideoram(*this, "charvideoram")
|
||||
{ }
|
||||
|
||||
void quiz18k(machine_config &config);
|
||||
void welltris(machine_config &config);
|
||||
|
||||
void init_quiz18k();
|
||||
void init_welltris();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<vsystem_spr2_device> m_spr_old;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<generic_latch_8_device> m_soundlatch;
|
||||
|
||||
required_shared_ptr<uint16_t> m_spriteram;
|
||||
required_shared_ptr<uint16_t> m_pixelram;
|
||||
required_shared_ptr<uint16_t> m_charvideoram;
|
||||
|
||||
tilemap_t *m_char_tilemap;
|
||||
uint8_t m_gfxbank[2];
|
||||
uint16_t m_charpalettebank;
|
||||
uint16_t m_spritepalettebank;
|
||||
uint16_t m_pixelpalettebank;
|
||||
int m_scrollx;
|
||||
int m_scrolly;
|
||||
|
||||
void sound_bankswitch_w(uint8_t data);
|
||||
void palette_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void gfxbank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
void scrollreg_w(offs_t offset, uint16_t data);
|
||||
void charvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void setbank(int num, int bank);
|
||||
void main_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void sound_port_map(address_map &map);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_WELLTRIS_H
|
@ -1,100 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Luca Elia
|
||||
/***************************************************************************
|
||||
|
||||
-= Run Deep / The Deep =-
|
||||
|
||||
driver by Luca Elia (l.elia@tin.it)
|
||||
|
||||
[ 1 Horizontally Scrolling Layer ]
|
||||
|
||||
Size : 512 x 512
|
||||
Tiles: 16 x 16 x 4.
|
||||
|
||||
In addition to a global x & y scroll register each tile-wide column
|
||||
has its own y scroll register.
|
||||
|
||||
[ 1 Fixed Layer ]
|
||||
|
||||
Size : 256 x 256
|
||||
Tiles: 8 x 8 x 2.
|
||||
|
||||
[ 128? sprites ]
|
||||
|
||||
Sprites tiles are 16 x 16 x 4. Each sprite has a height and width
|
||||
specified (1,2,4, or 8 tiles).
|
||||
|
||||
A sprite of width N uses N consecutive sprites: the first one specifies
|
||||
all the data (position,flip), the following ones only the tile code and
|
||||
color for that column (tile codes in each column are consecutive).
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/thedeep.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Callbacks for the TileMap code
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
TILE_GET_INFO_MEMBER(thedeep_state::get_tile_info)
|
||||
{
|
||||
uint8_t code = m_textram[ tile_index * 2 + 0 ];
|
||||
uint8_t color = m_textram[ tile_index * 2 + 1 ];
|
||||
tileinfo.set(2,
|
||||
code + (color << 8),
|
||||
(color & 0xf0) >> 4,
|
||||
0);
|
||||
}
|
||||
|
||||
void thedeep_state::textram_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
m_textram[offset] = data;
|
||||
m_text_tilemap->mark_tile_dirty(offset / 2);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Palette Init
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void thedeep_state::thedeep_palette(palette_device &palette) const
|
||||
{
|
||||
uint8_t const *const color_prom = memregion("proms")->base();
|
||||
for (int i = 0; i < 512; i++)
|
||||
palette.set_pen_color(i, pal4bit(color_prom[0x400 + i] >> 0), pal4bit(color_prom[0x400 + i] >> 4), pal4bit(color_prom[0x200 + i] >> 0));
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Video Init
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void thedeep_state::video_start()
|
||||
{
|
||||
m_text_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(thedeep_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 0x20, 0x20);
|
||||
|
||||
m_text_tilemap->set_transparent_pen(0);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Screen Drawing
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
uint32_t thedeep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
|
||||
m_tilegen->deco_bac06_pf_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
m_spritegen->draw_sprites(screen, bitmap, cliprect, m_gfxdecode->gfx(0), reinterpret_cast<uint16_t *>(m_spriteram.target()), 0x400/2);
|
||||
m_text_tilemap->draw(screen, bitmap, cliprect, 0,0);
|
||||
return 0;
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
#include "emu.h"
|
||||
#include "includes/welltris.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
|
||||
void welltris_state::setbank(int num, int bank)
|
||||
{
|
||||
if (m_gfxbank[num] != bank)
|
||||
{
|
||||
m_gfxbank[num] = bank;
|
||||
m_char_tilemap->mark_all_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Not really enough evidence here */
|
||||
|
||||
void welltris_state::palette_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
if (m_charpalettebank != (data & 0x03))
|
||||
{
|
||||
m_charpalettebank = (data & 0x03);
|
||||
m_char_tilemap->mark_all_dirty();
|
||||
}
|
||||
|
||||
flip_screen_set(data & 0x80);
|
||||
|
||||
m_spritepalettebank = (data & 0x20) >> 5;
|
||||
m_pixelpalettebank = (data & 0x08) >> 3;
|
||||
}
|
||||
}
|
||||
|
||||
void welltris_state::gfxbank_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
setbank(0, (data & 0xf0) >> 4);
|
||||
setbank(1, data & 0x0f);
|
||||
}
|
||||
}
|
||||
|
||||
void welltris_state::scrollreg_w(offs_t offset, uint16_t data)
|
||||
{
|
||||
switch (offset) {
|
||||
case 0: m_scrollx = data - 14; break;
|
||||
case 1: m_scrolly = data + 0; break;
|
||||
}
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(welltris_state::get_tile_info)
|
||||
{
|
||||
uint16_t code = m_charvideoram[tile_index];
|
||||
int bank = (code & 0x1000) >> 12;
|
||||
|
||||
tileinfo.set(0,
|
||||
(code & 0x0fff) + (m_gfxbank[bank] << 12),
|
||||
((code & 0xe000) >> 13) + (8 * m_charpalettebank),
|
||||
0);
|
||||
}
|
||||
|
||||
void welltris_state::charvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
COMBINE_DATA(&m_charvideoram[offset]);
|
||||
m_char_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
void welltris_state::video_start()
|
||||
{
|
||||
m_char_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(welltris_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
|
||||
m_char_tilemap->set_transparent_pen(15);
|
||||
|
||||
save_item(NAME(m_gfxbank));
|
||||
save_item(NAME(m_charpalettebank));
|
||||
save_item(NAME(m_spritepalettebank));
|
||||
save_item(NAME(m_pixelpalettebank));
|
||||
save_item(NAME(m_scrollx));
|
||||
save_item(NAME(m_scrolly));
|
||||
}
|
||||
|
||||
void welltris_state::draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int y = 0; y < 256; y++) {
|
||||
for (int x = 0; x < 512 / 2; x++) {
|
||||
int pixdata = m_pixelram[(x & 0xff) + (y & 0xff) * 256];
|
||||
|
||||
bitmap.pix(y, (x * 2) + 0) = (pixdata >> 8) + (0x100 * m_pixelpalettebank) + 0x400;
|
||||
bitmap.pix(y, (x * 2) + 1) = (pixdata & 0xff) + (0x100 * m_pixelpalettebank) + 0x400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t welltris_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_char_tilemap->set_scrollx(0, m_scrollx);
|
||||
m_char_tilemap->set_scrolly(0, m_scrolly);
|
||||
|
||||
draw_background(bitmap, cliprect);
|
||||
m_char_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||
m_spr_old->turbofrc_draw_sprites(m_spriteram, m_spriteram.bytes(), m_spritepalettebank, bitmap, cliprect, screen.priority(), 0);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user