summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2017-10-21 15:27:33 -0400
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2017-10-21 15:27:36 -0400
commit4f89dd28b70c4335fb040f0198c4b5c1ca2b6de0 (patch)
tree011486e8a24eae976c077c1a8c4cfc978afda28c
parentc3192b25abbc5ef87bea4cdcd37a86ea91a6e9ac (diff)
downloadmame-4f89dd28b70c4335fb040f0198c4b5c1ca2b6de0.zip
mame-4f89dd28b70c4335fb040f0198c4b5c1ca2b6de0.tar.bz2
seibucats.cpp: Revise my old notes; some address map findings (nw)
-rw-r--r--src/mame/drivers/seibucats.cpp171
1 files changed, 109 insertions, 62 deletions
diff --git a/src/mame/drivers/seibucats.cpp b/src/mame/drivers/seibucats.cpp
index b71e3ad..5dcaddb 100644
--- a/src/mame/drivers/seibucats.cpp
+++ b/src/mame/drivers/seibucats.cpp
@@ -2,44 +2,61 @@
// copyright-holders:Angelo Salese
/******************************************************************************************************************************************************
- Seibu CATS E-Touch Mahjong Series (c) 2001 Seibu Kaihatsu
-
- TODO:
- - Needs OBJ ROMs dump to progress;
- - DVD hookup;
- - EEPROM (prolly tied to area 0xa20000 here);
- - inputs & touchscreen;
- - is sound working?
- - unknown area read at 0x600;
- - verify interrupt table;
- - Any other port lingering in the 0x400-0x7ff area?
-
-=======================================================================================================================================================
- Here is an excessively detailed list of the significant devices on the main board, including all those worth emulating and many that aren't:
-
- * Intel i386DX CPU (U0169; lower right corner). Contrary to my expectations, Seibu seems to have stuck by its x86 tradition instead of switching to the
- SH-2 with its built-in DMA, as they did in Fever Soccer.
- * SEI600 SB08-1513 custom DMA chip (U0154; above i386DX). This is currently emulated as part of the driver for the SPI system, where it handles the
- tilemap and palette DMA. E Jong Sakurasou, having only sprites, abandoned the tilemap DMA channel, but it may have been repurposed here.
- * RISE11 custom sprite chip (U0336; upper right corner). No surprises here; Raiden Fighters Jet, E Jong Sakurasou and Fever Soccer all use this with
- or without encryption.
- * Yamaha YMF721-S General MIDI OPL4-ML2 (U0274; to right of UARTs). MAME surprisingly lacks an emulation of this chip.
- * Yamaha YMZ280B-F PCMD8 (U0722; middle of board). Also used in E Jong Sakurasou.
- * NEC D71051GB UART x2 (U1133, U1134; lined up with DB9 ports).
- * MAXZ32 Serial Line Driver x2 (U1138, U1141; between UARTs and DB9 ports).
- * JRC 6355E Real Time Clock (U0513, above YMF721). I emulated this chip for Fever Soccer.
- * ST93C46AF Serial EEPROM (U0512; towards left center of board).
- * Yamaha YAC516-M DAC x2 (U0848, U085; below first row of batteries).
- * Xilinx XC9536 CPLDs "DVDMJ11" (U0235), "DVDMJ12" (U0236), XC9572 "DVDMJ13" (U1024).
- * Toshiba TA7252AP power amplifier (U0847; at left edge, next to AUDIO-IN).
- * JRC 4560 operational amplifier x2 (U0850, U087; amid battery jungle)
- * NEC UPC1830GT filter video chroma (U0935; towards lower left).
- * JRC 2246 video switch x3 (U1015, U1017, U1022; near bottom, above more batteries).
- * LM1881 Video Sync Separator (U1020).
- * RAM area A (U0230, U0231; between SEI600 and RISE11) = either 2x Toshiba TC551664BJ-15 or 2x Winbond W26010AJ-15.
- * RAM area B (U067, U062, U0326, U0327; to left of RISE11) = either 4x G-Link GLT725608-15J3 or 4x Cypress CY7C199-15VC (Ver1.3 board).
- * RAM area C (U0727, U0728) = either 2x BSI B562LV1024SC-70 or 1x Hitachi HM628512ALFP-7. The latter leaves U0727 unpopulated, revealing a label for
- a MX23C8000M mask ROM.
+ Seibu CATS E-Touch Mahjong Series (c) 2001 Seibu Kaihatsu
+
+ CPU and system control devices:
+ - Intel i386DX (U0169; lower right corner)
+ - SEI600 SB08-1513 custom DMA chip (U0154; above i386DX)
+ - Xilinx XC9536 CPLDs "DVDMJ11" (U0235), "DVDMJ12" (U0236), XC9572 "DVDMJ13" (U1024)
+
+ Graphics:
+ - RISE11 custom sprite chip (U0336; upper right corner)
+ - NEC UPC1830GT filter video chroma (U0935; towards lower left)
+ - JRC 2246 video switch x3 (U1015, U1017, U1022; near bottom, above more batteries)
+ - LM1881 Video Sync Separator (U1020)
+ - There is no tilemap hardware. The SEI600 tilemap DMA channel does not appear to have been reused for anything.
+
+ RAM:
+ - RAM area A (U0230, U0231; between SEI600 and RISE11) = either 2x Toshiba TC551664BJ-15 or 2x Winbond W26010AJ-15.
+ - RAM area B (U067, U062, U0326, U0327; to left of RISE11) = either 4x G-Link GLT725608-15J3 or 4x Cypress CY7C199-15VC (Ver1.3 board).
+ - RAM area C (U0727, U0728) = either 2x BSI B562LV1024SC-70 or 1x Hitachi HM628512ALFP-7.
+ The latter leaves U0727 unpopulated, revealing a label for a MX23C8000M mask ROM. There is no onboard ROM.
+
+ ROM:
+ - Program ROMs: MX27C40000C-12 or MBM27C4001-12Z or TMS27C040-10 x4 (U011, U015-U017 = "PRG0-PRG3" on ROM board)
+ - Sprite ROMs: MX29F8100MC-12 or "MX29F1610" x4 (U0231-U0234 = "OBJ1-OBJ4" on ROM board).
+ Only three ROMs appear to be populated on any game. This means sprites should be 6bpp, even though they could potentially have been 8bpp.
+
+ EEPROM/NVRAM:
+ - ST93C46AF Serial EEPROM (U0512; towards left center of board)
+ - Toshiba TC55257DFL-70L (U0144 on ROM board) with Maxell CR2032 battery (BT011 on ROM board).
+ The ROM board type used by Marumie Network lacks NVRAM and RTC; their locations are not populated on Pakkun Ball TV.
+
+ RTC:
+ - JRC 6355E/NJU6355 Real Time Clock (U0513, above YMF721)
+ - JRC 6355E/NJU6355 Real Time Clock (U0150 on ROM board)
+
+ Serial ports:
+ - NEC uPD71051GB USART x2 (U1133, U1134; lined up with DB9 ports)
+ - MAXZ32 Serial Line Driver x2 (U1138, U1141; between USARTs and DB9 ports)
+ - Two DB9 ports, one marked "DVD" and the other "Touch Panel." The latter also uses a separate 2-pin Molex power connector (CN114).
+
+ Sound and linear miscellany:
+ - Yamaha YMF721-S General MIDI OPL4-ML2 (U0274; to right of USARTs)
+ - Yamaha YMZ280B-F PCMD8 (U0722; middle of board)
+ - Yamaha YAC516-M DAC x2 (U0848, U085; below first row of batteries)
+ - JRC 4560 operational amplifier x2 (U0850, U087)
+ - Toshiba TA7252AP power amplifier (U0847; at left edge, next to AUDIO-IN)
+
+ TODO:
+ - Needs OBJ ROMs dump to progress;
+ - DVD drive (Toshiba SD-B100);
+ - RS-232 hookup for touchscreen;
+ - RTC and NVRAM;
+ - mahjong keyboard inputs (and JAMMA adapter for some games);
+ - emulate YMF721-S or at least do something about MIDI sound;
+ - verify interrupt table;
+ - Any other port lingering in the 0x400-0x7ff area?
******************************************************************************************************************************************************/
@@ -48,6 +65,10 @@
#include "includes/seibuspi.h"
#include "cpu/i386/i386.h"
+//#include "bus/rs232/rs232.h"
+#include "machine/i8251.h"
+//#include "machine/microtch.h"
+//#include "machine/rtc4543.h"
#include "sound/ymz280b.h"
#include "screen.h"
#include "speaker.h"
@@ -69,19 +90,20 @@ class seibucats_state : public seibuspi_state
{
public:
seibucats_state(const machine_config &mconfig, device_type type, const char *tag)
- : seibuspi_state(mconfig, type, tag),
- m_ymz(*this, "ymz")
+ : seibuspi_state(mconfig, type, tag)
{
}
- required_device <ymz280b_device> m_ymz;
// screen updates
// uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
// IRQ_CALLBACK_MEMBER(spi_irq_callback);
// INTERRUPT_GEN_MEMBER(spi_interrupt);
-
- DECLARE_READ8_MEMBER( sound_r );
-
+
+ DECLARE_READ16_MEMBER(input_mux_r);
+ DECLARE_WRITE16_MEMBER(input_select_w);
+ DECLARE_WRITE16_MEMBER(output_latch_w);
+ DECLARE_WRITE16_MEMBER(aux_rtc_w);
+
protected:
// driver_device overrides
virtual void machine_start() override;
@@ -91,39 +113,56 @@ protected:
private:
-
+ uint16_t m_input_select;
};
-READ8_MEMBER( seibucats_state::sound_r )
+READ16_MEMBER(seibucats_state::input_mux_r)
+{
+ // TODO: mahjong keyboard is read from here
+ return m_eeprom->do_read() << 14;
+}
+
+WRITE16_MEMBER(seibucats_state::input_select_w)
+{
+ // Note that this is active high in ejsakura but active low here
+ m_input_select = data;
+}
+
+WRITE16_MEMBER(seibucats_state::output_latch_w)
+{
+ m_eeprom->di_write((data & 0x8000) ? 1 : 0);
+ m_eeprom->clk_write((data & 0x4000) ? ASSERT_LINE : CLEAR_LINE);
+ m_eeprom->cs_write((data & 0x2000) ? ASSERT_LINE : CLEAR_LINE);
+}
+
+WRITE16_MEMBER(seibucats_state::aux_rtc_w)
{
- if(offset == 0)
- return m_ymz->read(space,0);
-
-// printf("read unknown device\n");
- return machine().rand();
}
static ADDRESS_MAP_START( seibucats_map, AS_PROGRAM, 32, seibucats_state )
// TODO: map devices
AM_RANGE(0x00000010, 0x00000013) AM_READ8(spi_status_r, 0x000000ff)
+ AM_RANGE(0x00000400, 0x00000403) AM_WRITE16(input_select_w, 0x0000ffff)
+ AM_RANGE(0x00000404, 0x00000407) AM_WRITE16(output_latch_w, 0x0000ffff)
AM_RANGE(0x00000484, 0x00000487) AM_WRITE(palette_dma_start_w)
AM_RANGE(0x00000490, 0x00000493) AM_WRITE(video_dma_length_w)
AM_RANGE(0x00000494, 0x00000497) AM_WRITE(video_dma_address_w)
AM_RANGE(0x00000560, 0x00000563) AM_WRITE16(sprite_dma_start_w, 0xffff0000)
-
- AM_RANGE(0x00000408, 0x0000040f) AM_DEVWRITE8("ymz", ymz280b_device, write, 0x000000ff)
- AM_RANGE(0x00000600, 0x00000607) AM_READ8( sound_r, 0x0000ffff) //AM_DEVREAD8("ymz", ymz280b_device, read, 0x000000ff)
+
+ AM_RANGE(0x00000600, 0x00000607) AM_READ16(input_mux_r, 0x0000ffff)
AM_RANGE(0x00000000, 0x0003ffff) AM_RAM AM_SHARE("mainram")
AM_RANGE(0x00200000, 0x003fffff) AM_ROM AM_REGION("ipl", 0) AM_WRITENOP // emjjoshi attempts to write there?
// following are likely to be Seibu CATS specific
- AM_RANGE(0x01200000, 0x01200007) AM_NOP // address/data 8-bit r/w
- AM_RANGE(0x01200100, 0x01200103) AM_WRITENOP
- AM_RANGE(0x01200104, 0x01200107) AM_READNOP
- AM_RANGE(0x01200200, 0x01200203) AM_READNOP
- AM_RANGE(0x01200204, 0x01200207) AM_NOP
- AM_RANGE(0x01200300, 0x01200303) AM_READNOP
- AM_RANGE(0x01200304, 0x01200307) AM_NOP
+ AM_RANGE(0x01200000, 0x01200007) AM_DEVREADWRITE8("ymz", ymz280b_device, read, write, 0x000000ff)
+ AM_RANGE(0x01200100, 0x01200107) AM_WRITENOP // YMF721-S MIDI data
+ AM_RANGE(0x01200104, 0x01200107) AM_READNOP // YMF721-S MIDI status
+ AM_RANGE(0x01200200, 0x01200203) AM_DEVREADWRITE8("usart1", i8251_device, data_r, data_w, 0x000000ff)
+ AM_RANGE(0x01200204, 0x01200207) AM_DEVREADWRITE8("usart1", i8251_device, status_r, control_w, 0x000000ff)
+ AM_RANGE(0x01200300, 0x01200303) AM_DEVREADWRITE8("usart2", i8251_device, data_r, data_w, 0x000000ff)
+ AM_RANGE(0x01200304, 0x01200307) AM_DEVREADWRITE8("usart2", i8251_device, status_r, control_w, 0x000000ff)
+ AM_RANGE(0xa0000000, 0xa1ffffff) AM_NOP // NVRAM on ROM board
+ AM_RANGE(0xa2000000, 0xa2000003) AM_WRITE16(aux_rtc_w, 0x0000ffff)
AM_RANGE(0xffe00000, 0xffffffff) AM_ROM AM_REGION("ipl", 0)
ADDRESS_MAP_END
@@ -208,6 +247,7 @@ GFXDECODE_END
void seibucats_state::machine_start()
{
+ save_item(NAME(m_input_select));
}
void seibucats_state::machine_reset()
@@ -234,7 +274,14 @@ static MACHINE_CONFIG_START( seibucats )
MCFG_CPU_PROGRAM_MAP(seibucats_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt)
MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(seibuspi_state, spi_irq_callback)
-
+
+ MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
+
+ //MCFG_JRC6355E_ADD("rtc", XTAL_32_768kHz)
+
+ MCFG_DEVICE_ADD("usart1", I8251, 0)
+ MCFG_DEVICE_ADD("usart2", I8251, 0)
+
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
// MCFG_SCREEN_UPDATE_DRIVER(seibucats_state, screen_update)