mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
(MESS) Added Yamaha FB-01
I haven't been able to test if this makes the expected sounds when a midi keyboard is hooked up the midi-in port of this device.
This commit is contained in:
parent
9a575cad91
commit
938b97207f
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -7934,6 +7934,7 @@ src/mess/drivers/exelv.c svneol=native#text/plain
|
||||
src/mess/drivers/exp85.c svneol=native#text/plain
|
||||
src/mess/drivers/fanucs15.c svneol=native#text/plain
|
||||
src/mess/drivers/fanucspmg.c svneol=native#text/plain
|
||||
src/mess/drivers/fb01.c svneol=native#text/plain
|
||||
src/mess/drivers/fc100.c svneol=native#text/plain
|
||||
src/mess/drivers/fidelz80.c svneol=native#text/plain
|
||||
src/mess/drivers/fk1.c svneol=native#text/plain
|
||||
@ -8604,6 +8605,7 @@ src/mess/layout/elf2.lay svneol=native#text/xml
|
||||
src/mess/layout/esq1by22.lay svneol=native#text/xml
|
||||
src/mess/layout/esq2by40.lay svneol=native#text/xml
|
||||
src/mess/layout/et3400.lay svneol=native#text/xml
|
||||
src/mess/layout/fb01.lay svneol=native#text/xml
|
||||
src/mess/layout/fidelz80.lay svneol=native#text/xml
|
||||
src/mess/layout/gl3000s.lay svneol=native#text/xml
|
||||
src/mess/layout/glasgow.lay svneol=native#text/xml
|
||||
|
159
src/mess/drivers/fb01.c
Normal file
159
src/mess/drivers/fb01.c
Normal file
@ -0,0 +1,159 @@
|
||||
/***************************************************************************
|
||||
|
||||
Yamaha FB-01
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "video/hd44780.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/clock.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "fb01.lh"
|
||||
|
||||
|
||||
class fb01_state : public driver_device
|
||||
{
|
||||
public:
|
||||
fb01_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_upd71051(*this, "upd71051")
|
||||
, m_midi_thru(*this, "mdthru")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(write_usart_clock);
|
||||
DECLARE_WRITE_LINE_MEMBER(midi_in);
|
||||
|
||||
private:
|
||||
required_device<i8251_device> m_upd71051;
|
||||
required_device<midi_port_device> m_midi_thru;
|
||||
};
|
||||
|
||||
|
||||
static ADDRESS_MAP_START(fb01_mem, AS_PROGRAM, 8, fb01_state)
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("nvram") // 2 * 8KB S-RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START(fb01_io, AS_IO, 8, fb01_state)
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
// 00-01 YM2164
|
||||
AM_RANGE(0x00, 0x00) AM_DEVWRITE("ym2164", ym2151_device, register_w)
|
||||
AM_RANGE(0x01, 0x01) AM_DEVREADWRITE("ym2164", ym2151_device, status_r, data_w)
|
||||
|
||||
// 10-11 USART uPD71051C 4MHz & 4MHz / 8
|
||||
AM_RANGE(0x10, 0x10) AM_DEVREADWRITE("upd71051", i8251_device, data_r, data_w)
|
||||
AM_RANGE(0x11, 0x11) AM_DEVREADWRITE("upd71051", i8251_device, status_r, control_w)
|
||||
|
||||
// 20 PANEL SWITCH
|
||||
AM_RANGE(0x20, 0x20) AM_READ_PORT("PANEL")
|
||||
|
||||
// 30-31 HD44780A
|
||||
AM_RANGE(0x30, 0x30) AM_DEVREADWRITE("hd44780", hd44780_device, control_read, control_write)
|
||||
AM_RANGE(0x31, 0x31) AM_DEVREADWRITE("hd44780", hd44780_device, data_read, data_write)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( fb01 )
|
||||
PORT_START("PANEL")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("System Set Up")
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inst Select")
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inst Assign")
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inst Function")
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Voice Function")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Voice Select")
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("-1/No")
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("+1/Yes")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(fb01_state::write_usart_clock)
|
||||
{
|
||||
m_upd71051->write_txc(state);
|
||||
m_upd71051->write_rxc(state);
|
||||
}
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(fb01_state::midi_in)
|
||||
{
|
||||
m_midi_thru->write_txd(state);
|
||||
m_upd71051->write_rxd(state);
|
||||
}
|
||||
|
||||
|
||||
static HD44780_PIXEL_UPDATE(fb01_pixel_update)
|
||||
{
|
||||
if ( pos < 8 && line < 2 )
|
||||
{
|
||||
bitmap.pix16(y, line*6*8 + pos*6 + x) = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( fb01, fb01_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(fb01_mem)
|
||||
MCFG_CPU_IO_MAP(fb01_io)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", LCD)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
||||
MCFG_SCREEN_SIZE(6*16, 9)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 6*16-1, 0, 9-1)
|
||||
MCFG_DEFAULT_LAYOUT(layout_lcd)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DEFAULT_LAYOUT( layout_fb01 )
|
||||
|
||||
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
|
||||
|
||||
MCFG_HD44780_ADD("hd44780")
|
||||
MCFG_HD44780_LCD_SIZE(2, 8) // 2x8 displayed as 1x16
|
||||
MCFG_HD44780_PIXEL_UPDATE_CB(fb01_pixel_update)
|
||||
|
||||
MCFG_DEVICE_ADD("upd71051", I8251, XTAL_4MHz)
|
||||
MCFG_I8251_RXRDY_HANDLER(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) MCFG_DEVCB_XOR(1) // inverted -> Z80 INT
|
||||
MCFG_I8251_TXRDY_HANDLER(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) MCFG_DEVCB_XOR(1) // inverted -> Z80 INT
|
||||
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("mdout", midi_port_device, write_txd))
|
||||
|
||||
MCFG_DEVICE_ADD("usart_clock", CLOCK, XTAL_4MHz / 8) // 500KHz
|
||||
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(fb01_state, write_usart_clock))
|
||||
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(WRITELINE(fb01_state, midi_in))
|
||||
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
MCFG_MIDI_PORT_ADD("mdthru", midiout_slot, "midiout")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_YM2151_ADD("ym2164", XTAL_4MHz)
|
||||
MCFG_YM2151_IRQ_HANDLER(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
|
||||
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
/* ROM definition */
|
||||
ROM_START( fb01 )
|
||||
ROM_REGION( 0x8000, "maincpu", 0 )
|
||||
ROM_LOAD("fb01.ic11", 0, 0x8000, CRC(7357e9a4) SHA1(049c482d6c91b7e2846757dd0f5138e0d8b687f0))
|
||||
ROM_END
|
||||
|
||||
|
||||
/* Driver */
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
|
||||
CONS( 1986, fb01, 0, 0, fb01, fb01, driver_device, 0, "Yamaha", "FB-01", GAME_NOT_WORKING )
|
||||
|
180
src/mess/layout/fb01.lay
Normal file
180
src/mess/layout/fb01.lay
Normal file
@ -0,0 +1,180 @@
|
||||
<mamelayout version="2">
|
||||
<element name="system">
|
||||
<text string="System">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="setup">
|
||||
<text string="Setup">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="inst">
|
||||
<text string="Inst">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="select">
|
||||
<text string="Select">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="assign">
|
||||
<text string="Assign">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="function">
|
||||
<text string="Function">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="data_entry">
|
||||
<text string="Data Entry">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="voice">
|
||||
<text string="Voice">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="no">
|
||||
<text string="-1/No">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="yes">
|
||||
<text string="+1/Yes">
|
||||
<color red="1.0" green="1.0" blue="1.0" />
|
||||
</text>
|
||||
</element>
|
||||
|
||||
<element name="button" defstate="0">
|
||||
<rect>
|
||||
<bounds x="2" y="2" width="48" height="48"/>
|
||||
<color red="0.1" green="0.1" blue="0.1" />
|
||||
</rect>
|
||||
<rect state="0">
|
||||
<bounds x="0" y="0" width="48" height="48"/>
|
||||
<color red="0.25" green="0.25" blue="0.25" />
|
||||
</rect>
|
||||
<rect state="1">
|
||||
<bounds x="2" y="2" width="48" height="48"/>
|
||||
<color red="0.25" green="0.25" blue="0.25" />
|
||||
</rect>
|
||||
</element>
|
||||
|
||||
<!--
|
||||
System Inst Data Entry Data Entry
|
||||
Setup Select -1/No +1/Yes
|
||||
|
||||
Inst Inst Voice Voice
|
||||
Assign Function Function Select
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
<element name="" defstate="0">
|
||||
<text string="" state="0"
|
||||
<text string="" state="1">
|
||||
</text>
|
||||
</element>
|
||||
-->
|
||||
|
||||
<view name="View">
|
||||
<screen index="0">
|
||||
<bounds x="30" y="32" width="108" height="8" />
|
||||
</screen>
|
||||
|
||||
<bezel name="system_setup_1" element="system">
|
||||
<bounds left="200" right="249" top="0" bottom="15" />
|
||||
</bezel>
|
||||
<bezel name="system_setup_2" element="setup">
|
||||
<bounds left="200" right="249" top="16" bottom="31" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x01">
|
||||
<bounds x="203" y="34" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="inst_select_1" element="inst">
|
||||
<bounds left="250" right="299" top="0" bottom="15" />
|
||||
</bezel>
|
||||
<bezel name="inst_select_2" element="select">
|
||||
<bounds left="250" right="299" top="16" bottom="31" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x02">
|
||||
<bounds x="253" y="34" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="data_entry_no_1" element="data_entry">
|
||||
<bounds left="300" right="349" top="0" bottom="15" />
|
||||
</bezel>
|
||||
<bezel name="data_entry_no_2" element="no">
|
||||
<bounds left="300" right="349" top="16" bottom="31" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x40">
|
||||
<bounds x="303" y="34" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
<bezel nmae="data_entry_yes_1" element="data_entry">
|
||||
<bounds left="350" right="399" top="0" bottom="15" />
|
||||
</bezel>
|
||||
<bezel name="data_entry_yes_2" element="yes">
|
||||
<bounds left="350" right="399" top="16" bottom="31" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x80">
|
||||
<bounds x="353" y="34" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
|
||||
<bezel name="inst_assign_1" element="inst">
|
||||
<bounds left="200" right="249" top="64" bottom="79" />
|
||||
</bezel>
|
||||
<bezel name="inst_assign_2" element="assign">
|
||||
<bounds left="200" right="249" top="80" bottom="95" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x04">
|
||||
<bounds x="203" y="98" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="inst_function_1" element="inst">
|
||||
<bounds left="250" right="299" top="64" bottom="79" />
|
||||
</bezel>
|
||||
<bezel name="inst_function_2" element="function">
|
||||
<bounds left="250" right="299" top="80" bottom="95" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x08">
|
||||
<bounds x="253" y="98" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="voice_function_1" element="voice">
|
||||
<bounds left="300" right="349" top="64" bottom="79" />
|
||||
</bezel>
|
||||
<bezel name="voice_function_2" element="function">
|
||||
<bounds left="300" right="349" top="80" bottom="95" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x10">
|
||||
<bounds x="303" y="98" width="45" height="28" />
|
||||
</bezel>
|
||||
|
||||
<bezel name="voice_select_1" element="voice">
|
||||
<bounds left="350" right="399" top="64" bottom="79" />
|
||||
</bezel>
|
||||
<bezel name="voice_select_2" element="select">
|
||||
<bounds left="350" right="399" top="80" bottom="95" />
|
||||
</bezel>
|
||||
<bezel element="button" inputtag="PANEL" inputmask="0x20">
|
||||
<bounds x="353" y="98" width="45" height="28" />
|
||||
</bezel>
|
||||
</view>
|
||||
</mamelayout>
|
@ -350,6 +350,7 @@ cdimono1 // Philips CD-i (Mono-I board)
|
||||
// Yamaha
|
||||
mu100 // 1997 MU-100
|
||||
mu100r // 1997 MU-100 Rackable version
|
||||
fb01 // 1986 FB-01
|
||||
|
||||
// Roland
|
||||
mt32
|
||||
|
@ -2042,6 +2042,7 @@ $(MESSOBJ)/xussrpc.a: \
|
||||
|
||||
$(MESSOBJ)/yamaha.a: \
|
||||
$(MESS_DRIVERS)/ymmu100.o \
|
||||
$(MESS_DRIVERS)/fb01.o \
|
||||
|
||||
$(MESS_DRIVERS)/ymmu100.o: $(MESS_DRIVERS)/ymmu100.inc
|
||||
$(MESS_DRIVERS)/ymmu100.inc: $(MESSSRC)/drivers/ymmu100.ppm $(FILE2STR_TARGET)
|
||||
@ -2270,6 +2271,7 @@ $(MESS_DRIVERS)/elekscmp.o: $(MESS_LAYOUT)/elekscmp.lh
|
||||
$(MESS_MACHINE)/esqvfd.o: $(MESS_LAYOUT)/esq2by40.lh \
|
||||
$(MESS_LAYOUT)/esq1by22.lh
|
||||
$(MESS_DRIVERS)/et3400.o: $(MESS_LAYOUT)/et3400.lh
|
||||
$(MESS_DRIVERS)/fb01.o: $(MESS_LAYOUT)/fb01.lh
|
||||
$(MESS_DRIVERS)/fidelz80.o: $(MESS_LAYOUT)/fidelz80.lh \
|
||||
$(MESS_LAYOUT)/bridgec3.lh \
|
||||
$(MESS_LAYOUT)/vsc.lh
|
||||
|
Loading…
Reference in New Issue
Block a user