summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2012-12-02 22:11:07 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2012-12-02 22:11:07 +0000
commitd73ec8ec793fef1b1ae64a42aa6b7c55edd6c8da (patch)
tree98cecb77a8289c410f1a1c65a1760149df195471 /src
parent52a53172747c5cf03ca819a6eafb685e1ca59111 (diff)
(MESS) Mirage: lots of documentation from the schematics, added preliminary LED hookup [R. Belmont]
(MESS) New games added as GAME_NOT_WORKING ------------------------------------------ Yamaha MU-100 [Guru, R. Belmont, O. Galibert]
Diffstat (limited to 'src')
-rw-r--r--src/mess/drivers/mirage.c160
-rw-r--r--src/mess/drivers/ymmu100.c124
-rw-r--r--src/mess/layout/mirage.lay35
-rw-r--r--src/mess/mess.lst3
-rw-r--r--src/mess/mess.mak5
5 files changed, 264 insertions, 63 deletions
diff --git a/src/mess/drivers/mirage.c b/src/mess/drivers/mirage.c
index 7c94f651fd5..2567bce690a 100644
--- a/src/mess/drivers/mirage.c
+++ b/src/mess/drivers/mirage.c
@@ -17,49 +17,27 @@
e800-e803: WD1770 FDC
ec00-ecef: ES5503 "DOC" sound chip
f000-ffff: boot ROM
-
-LED patterns
-
- 80
- _____
- | | 40
-04 | 02 |
- _____
- | | 20
-08 | |
- _____
- 10
- 76543210
-PORT A: 111xyzzz
-
-PA4/PA5 are the "enable" for the two LEDs
-
-7seg Display Bits
-'0' %11111100 $FC
-'1' %01100000 $60
-'2' %11011010 $DA
-'3' %11110010 $F2
-'4' %01100110 $66
-'5' %10110110 $B6
-'6' %10111110 $BE
-'7' %11100000 $E0
-'8' %11111110 $FE
-'9' %11100110 $E6
-'A' %11101110 $EE
-'b' %00111110 $3E
-'C' %10011100 $9C
-'d' %01111010 $7A
-'E' %10011110 $9E
-'F' %10001110 $8E
-'L' %00011100 $1C
-'n' %00101010 $2A
-'o' %00111010 $3A
-'P' %11001110 $CE
-'r' %00001010 $0A
-'U' %01111100 $7C
-'c' %00011010 $1A
-'u' %01111000 $38
-
+
+ NMI: IRQ from WD1772
+ IRQ: DRQ from WD1772 wire-ORed with IRQ from ES5503 wire-ORed with IRQ from VIA6522
+ FIRQ: IRQ from 6850 UART
+
+ LED / switch matrix:
+
+ A B C D E F G DP
+ ROW 0: LOAD UPPER LOAD LOWER SAMPLE UPPER PLAY SEQ LOAD SEQ SAVE SEQ REC SEQ SAMPLE LOWER
+ ROW 1: 3 6 9 5 8 0 2 Enter
+ ROW 2: 1 4 7 up arrow PARAM dn arrow VALUE CANCEL
+ L. AN: SEG A SEG B SEG C SEG D SEG E SEG F SEG G SEG DP (decimal point)
+ R. AN: SEG A SEG B SEG C SEG D SEG E SEG F SEG G SEG DP
+
+ Column number in VIA port A bits 0-2 is converted to discrete lines by a 74LS145.
+ Port A bit 3 is right anode, bit 4 is left anode
+ ROW 0 is read on VIA port A bit 5, ROW 1 in port A bit 6, and ROW 2 in port A bit 7.
+
+ Keyboard models talk to the R6500 through the VIA shifter: CA2 is handshake, CB1 is shift clock, CB2 is shift data.
+ This is unconnected on the rackmount version.
+
***************************************************************************/
@@ -74,6 +52,8 @@ PA4/PA5 are the "enable" for the two LEDs
#include "formats/ipf_dsk.h"
#include "sound/es5503.h"
+#include "mirage.lh"
+
class mirage_state : public driver_device
{
public:
@@ -105,6 +85,11 @@ public:
DECLARE_READ8_MEMBER(mirage_via_read_cb1);
DECLARE_READ8_MEMBER(mirage_via_read_ca2);
DECLARE_READ8_MEMBER(mirage_via_read_cb2);
+
+ DECLARE_WRITE_LINE_MEMBER(acia_irq_w);
+
+ UINT8 m_l_segs, m_r_segs;
+ int m_l_hi, m_r_hi;
};
FLOPPY_FORMATS_MEMBER( mirage_state::floppy_formats )
@@ -115,6 +100,11 @@ static SLOT_INTERFACE_START( ensoniq_floppies )
SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
SLOT_INTERFACE_END
+WRITE_LINE_MEMBER(mirage_state::acia_irq_w)
+{
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, state ? CLEAR_LINE : ASSERT_LINE);
+}
+
void mirage_state::fdc_intrq_w(bool state)
{
m_maincpu->set_input_line(INPUT_LINE_NMI, state);
@@ -122,16 +112,17 @@ void mirage_state::fdc_intrq_w(bool state)
void mirage_state::fdc_drq_w(bool state)
{
- m_maincpu->set_input_line(M6809_FIRQ_LINE, state);
+ m_maincpu->set_input_line(M6809_IRQ_LINE, state);
}
static void mirage_doc_irq(device_t *device, int state)
{
+// m_maincpu->set_input_line(M6809_IRQ_LINE, state);
}
static UINT8 mirage_adc_read(device_t *device)
{
- return 0x80;
+ return 0x00;
}
void mirage_state::video_start()
@@ -163,9 +154,55 @@ static ADDRESS_MAP_START( mirage_map, AS_PROGRAM, 8, mirage_state )
ADDRESS_MAP_END
// port A: front panel
+// bits 0-2: column select from 0-7
+// bits 3/4 = right and left LED enable
+// bits 5/6/7 keypad rows 0/1/2 return
WRITE8_MEMBER(mirage_state::mirage_via_write_porta)
{
-// printf("PORT A: %02x\n", data);
+ UINT8 seg = data & 7;
+ static const int segconv[8] =
+ {
+ 16, 8, 32, 2, 1, 64, 128, 4
+ };
+
+// printf("PA: %02x (PC=%x)\n", data, m_maincpu->pc());
+
+ // left LED selected?
+ if ((data & 0x10) == 0x10)
+ {
+ // if the segment number is lower than last time, we've
+ // started a new refresh cycle
+ if ((seg < m_l_hi) || (seg == 0))
+ {
+ m_l_segs = segconv[seg];
+ }
+ else
+ {
+ m_l_segs |= segconv[seg];
+ }
+
+ m_l_hi = seg;
+ output_set_digit_value(0, m_l_segs);
+// printf("L LED: seg %d (hi %d conv %02x, %02x)\n", seg, m_l_hi, segconv[seg], m_l_segs);
+ }
+ // right LED selected?
+ if ((data & 0x08) == 0x08)
+ {
+ // if the segment number is lower than last time, we've
+ // started a new refresh cycle
+ if ((seg < m_r_hi) || (seg == 0))
+ {
+ m_r_segs = segconv[seg];
+ }
+ else
+ {
+ m_r_segs |= segconv[seg];
+ }
+
+ m_r_hi = seg;
+ output_set_digit_value(1, m_r_segs);
+// printf("R LED: seg %d (hi %d conv %02x, %02x)\n", seg, m_r_hi, segconv[seg], m_r_segs);
+ }
}
// port B:
@@ -197,7 +234,7 @@ READ8_MEMBER(mirage_state::mirage_via_read_porta)
}
// port B:
-// bit 6: IN FDC disk loaded
+// bit 6: IN FDC disk ready
// bit 5: IN 5503 sync (?)
READ8_MEMBER(mirage_state::mirage_via_read_portb)
{
@@ -231,14 +268,14 @@ READ8_MEMBER(mirage_state::mirage_via_read_cb2)
const via6522_interface mirage_via =
{
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_read_porta),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_read_portb),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_read_ca1),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_read_cb1),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_read_ca2),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_read_cb2),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_write_porta),
- DEVCB_DRIVER_MEMBER(mirage_state,mirage_via_write_portb),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_read_porta),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_read_portb),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_read_ca1),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_read_cb1),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_read_ca2),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_read_cb2),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_write_porta),
+ DEVCB_DRIVER_MEMBER(mirage_state, mirage_via_write_portb),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
@@ -255,19 +292,14 @@ static ACIA6850_INTERFACE( mirage_acia6850_interface )
DEVCB_NULL, // cts in
DEVCB_NULL, // rts out
DEVCB_NULL, // dcd in
- DEVCB_NULL
- // DEVCB_CPU_INPUT_LINE("maincpu", M6809_FIRQ_LINE)
+ DEVCB_DRIVER_LINE_MEMBER(mirage_state, acia_irq_w)
};
static MACHINE_CONFIG_START( mirage, mirage_state )
MCFG_CPU_ADD("maincpu", M6809E, 4000000)
MCFG_CPU_PROGRAM_MAP(mirage_map)
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_UPDATE_DRIVER(mirage_state, screen_update_mirage)
- MCFG_SCREEN_SIZE(320, 240)
- MCFG_SCREEN_VISIBLE_AREA(0, 319, 1, 239)
+ MCFG_DEFAULT_LAYOUT( layout_mirage )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_ES5503_ADD("es5503", 7000000, 2, mirage_doc_irq, mirage_adc_read)
@@ -305,7 +337,9 @@ DRIVER_INIT_MEMBER(mirage_state,mirage)
floppy->ss_w(0);
}
+
+ m_l_hi = m_r_hi = 9;
+ m_l_segs = m_r_segs = 0;
}
CONS( 1984, enmirage, 0, 0, mirage, mirage, mirage_state, mirage, "Ensoniq", "Ensoniq Mirage", GAME_NOT_WORKING )
-
diff --git a/src/mess/drivers/ymmu100.c b/src/mess/drivers/ymmu100.c
new file mode 100644
index 00000000000..37e4af9fe52
--- /dev/null
+++ b/src/mess/drivers/ymmu100.c
@@ -0,0 +1,124 @@
+/*************************************************************************************
+
+ Yamaha MU-100 : 32-voice polyphonic/multitimbral General MIDI/GS/XG tone module
+ Preliminary driver by R. Belmont
+
+ CPU: Hitachi H8S/2655 (HD6432655F), strapped for mode 4 (24-bit address, 16-bit data, no internal ROM)
+ Sound ASIC: Yamaha XS725A0
+ RAM: 1 MSM51008 (1 meg * 1 bit = 128KBytes)
+
+ I/O ports from service manual:
+
+ Port 1:
+ 0 - LCD data, SW data, LED 1
+ 1 - LCD data, SW data, LED 2
+ 2 - LCD data, SW data, LED 3
+ 3 - LCD data, SW data, LED 4
+ 4 - LCD data, SW data, LED 5
+ 5 - LCD data, SW strobe data
+ 6 - LCD data, SW strobe data
+ 7 - LCD data, SW data, LED 6
+
+ Port 2:
+ 0 - (out) LCD control RS
+ 1 - (out) LCD control R/W
+ 2 - (out) LCD control E
+ 3 - (out) LCD contrast A
+ 4 - (out) LCD contrast B
+ 5 - (out) LCD contrast C
+ 6 - (out) 1 MHz clock for serial
+ 7 - NC
+
+ Port 3:
+ 4 - (out) A/D gain control 1
+ 5 - (out) A/D gain control 2
+
+ Port 5:
+ 3 - (out) Reset signal for rotary encoder
+
+ Port 6:
+ 1 - NC
+ 2 - (out) PB select (SW1)
+ 3 - (out) PB select (SW2)
+ 4 - (out) reset PB
+ 5 - (out) reset SWP30 (sound chip)
+ 6 - NC
+ 7 - (in) Plug detection for A/D input
+
+ Port A:
+ 5 - (in) Off Line Detection
+ 6 - (out) Signal for rotary encoder (REB)
+ 7 - (out) Signal for rotary encoder (REA)
+
+ Port F:
+ 0 - (out) LED,SW Strobe data latch
+ 1 - (out) SW data read control
+ 2 - (out) PB select (SW4)
+
+ Port G:
+ 0 - (out) PB select (SW3)
+
+ Analog input channels:
+ 0 - level input R
+ 2 - level output L
+ 4 - host SW type switch position
+ 6 - battery voltage
+ 7 - model check (GND for MU100)
+
+**************************************************************************************/
+
+#include "emu.h"
+#include "cpu/h83002/h8.h"
+
+static INPUT_PORTS_START( mu100 )
+INPUT_PORTS_END
+
+class mu100_state : public driver_device
+{
+public:
+ mu100_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu")
+ { }
+
+ required_device<cpu_device> m_maincpu;
+
+ DECLARE_READ8_MEMBER(adc7_r);
+};
+
+static ADDRESS_MAP_START( mu100_map, AS_PROGRAM, 16, mu100_state )
+ AM_RANGE(0x000000, 0x1fffff) AM_ROM AM_REGION("maincpu", 0)
+ AM_RANGE(0x200000, 0x21ffff) AM_RAM // 128K work RAM
+ADDRESS_MAP_END
+
+// model detect. pulled to GND (0) on MU100.
+READ8_MEMBER(mu100_state::adc7_r)
+{
+ return 0;
+}
+
+static ADDRESS_MAP_START( mu100_iomap, AS_IO, 8, mu100_state )
+ AM_RANGE(H8_ADC_7_H, H8_ADC_7_L) AM_READ(adc7_r)
+ADDRESS_MAP_END
+
+static MACHINE_CONFIG_START( mu100, mu100_state )
+ MCFG_CPU_ADD( "maincpu", H8S2655, XTAL_16MHz )
+ MCFG_CPU_PROGRAM_MAP( mu100_map )
+ MCFG_CPU_IO_MAP( mu100_iomap )
+
+ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
+MACHINE_CONFIG_END
+
+ROM_START( mu100 )
+ ROM_REGION( 0x200000, "maincpu", 0 )
+ ROM_LOAD16_WORD_SWAP( "xu50720.ic11", 0x000000, 0x200000, CRC(1126a8a4) SHA1(e90b8bd9d14297da26ba12f4d9a4f2d22cd7d34a) )
+
+ ROM_REGION( 0x2800000, "waverom", 0 )
+ ROM_LOAD32_WORD( "sx518b0.ic34", 0x000000, 0x400000, CRC(2550d44f) SHA1(fd3cce228c7d389a2fde25c808a5b26080588cba) )
+ ROM_LOAD32_WORD( "sx743b0.ic35", 0x000002, 0x400000, CRC(a9109a6c) SHA1(a67bb49378a38a2d809bd717d286e18bc6496db0) )
+ ROM_LOAD32_WORD( "xt445a0-828.ic36", 0x800000, 0x1000000, CRC(d4483a43) SHA1(5bfd0762dea8598eda19db20251dac20e31fa02c) )
+ ROM_LOAD32_WORD( "xt461a0-829.ic37", 0x800002, 0x1000000, CRC(c5af4501) SHA1(1c88de197c36382311053add8b19a5740802cb78) )
+ROM_END
+
+CONS( 1997, mu100, 0, 0, mu100, mu100, driver_device, 0, "Yamaha", "MU100", GAME_NOT_WORKING )
+
diff --git a/src/mess/layout/mirage.lay b/src/mess/layout/mirage.lay
new file mode 100644
index 00000000000..58d6102dee0
--- /dev/null
+++ b/src/mess/layout/mirage.lay
@@ -0,0 +1,35 @@
+<!-- mirage.lay -->
+<!-- 2012-12-01: Initial version. [R. Belmont] -->
+
+<mamelayout version="2">
+
+ <element name="digit" defstate="0">
+ <led7seg>
+ <color red="0.85" green="0.87" blue="0.36" />
+ </led7seg>
+ </element>
+
+ <element name="background">
+ <rect>
+ <bounds left="0" top="0" right="1" bottom="1" />
+ <color red="0.0" green="0.0" blue="0.0" />
+ </rect>
+ </element>
+
+ <view name="Default Layout">
+
+ <!-- Background -->
+ <backdrop element="background">
+ <bounds left="0" top="0" right="42" bottom="28" />
+ </backdrop>
+
+ <!-- LEDs -->
+ <bezel name="digit0" element="digit">
+ <bounds left="2" top="0" right="20" bottom="23" />
+ </bezel>
+ <bezel name="digit1" element="digit">
+ <bounds left="22" top="0" right="40" bottom="23" />
+ </bezel>
+ </view>
+
+</mamelayout>
diff --git a/src/mess/mess.lst b/src/mess/mess.lst
index fee2b8e1835..483de6c072b 100644
--- a/src/mess/mess.lst
+++ b/src/mess/mess.lst
@@ -332,6 +332,9 @@ neocdz // NeoGeo CDZ
// Philips
cdimono1 // Philips CD-i (Mono-I board)
+// Yamaha
+mu100 // 1997 MU-100
+
//***************COMPUTERS**************************************************
// Acorn
diff --git a/src/mess/mess.mak b/src/mess/mess.mak
index 44f6a58b3b9..c88d154413d 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -405,6 +405,7 @@ DRVLIBS += \
$(MESSOBJ)/wang.a \
$(MESSOBJ)/wavemate.a \
$(MESSOBJ)/xerox.a \
+ $(MESSOBJ)/yamaha.a \
$(MESSOBJ)/zpa.a \
$(MESSOBJ)/zvt.a \
$(MESSOBJ)/shared.a \
@@ -1953,6 +1954,9 @@ $(MESSOBJ)/xerox.a: \
$(MESS_DRIVERS)/xerox820.o \
$(MESS_DRIVERS)/bigbord2.o \
+$(MESSOBJ)/yamaha.a: \
+ $(MESS_DRIVERS)/ymmu100.o \
+
$(MESSOBJ)/zpa.a: \
$(MESS_DRIVERS)/iq151.o \
$(MESS_MACHINE)/iq151cart.o \
@@ -2198,6 +2202,7 @@ $(MESS_DRIVERS)/mekd2.o: $(MESS_LAYOUT)/mekd2.lh
$(MESS_DRIVERS)/mephisto.o: $(MESS_LAYOUT)/mephisto.lh
$(MESS_DRIVERS)/merlin.o: $(MESS_LAYOUT)/merlin.lh
$(MESS_DRIVERS)/mikrolab.o: $(MESS_LAYOUT)/mikrolab.lh
+$(MESS_DRIVERS)/mirage.o: $(MESS_LAYOUT)/mirage.lh
$(MESS_DRIVERS)/mk1.o: $(MESS_LAYOUT)/mk1.lh
$(MESS_DRIVERS)/mk14.o: $(MESS_LAYOUT)/mk14.lh
$(MESS_DRIVERS)/mk2.o: $(MESS_LAYOUT)/mk2.lh