summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ut88.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ut88.cpp')
-rw-r--r--src/mame/drivers/ut88.cpp296
1 files changed, 0 insertions, 296 deletions
diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp
deleted file mode 100644
index 5571a30bf86..00000000000
--- a/src/mame/drivers/ut88.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:Miodrag Milanovic
-/***************************************************************************
-
- UT88 driver by Miodrag Milanovic
-
- 09/03/2008 Keyboard fixed, sound added.
- 06/03/2008 Preliminary driver.
-
-UT88MINI
-********
-Need instructions...
-When started you enter a one-key command, followed by whatever parameters
-are needed.
-
-Pressing 1 will allow entry of bytes into RAM.
-
-Command 3 does a test of the display, however the rest are a mystery.
-
-Paste facility was tested but doesn't work, because keyboard response is
-too slow.
-
-****************************************************************************/
-
-#include "emu.h"
-#include "includes/ut88.h"
-
-#include "formats/rk_cas.h"
-#include "ut88mini.lh"
-#include "screen.h"
-#include "speaker.h"
-
-
-/* Address maps */
-void ut88mini_state::mem_map(address_map &map)
-{
- map.unmap_value_high();
- map(0x0000, 0x03ff).rom(); // System ROM
- map(0xc000, 0xc3ff).ram(); // RAM
- map(0x9000, 0x9fff).w(FUNC(ut88mini_state::led_w)); // 7seg LED
-}
-
-void ut88_state::mem_map(address_map &map)
-{
- map(0x0000, 0xdfff).ram().share("mainram");
- map(0xe000, 0xe7ff).ram(); // Video RAM (not used)
- map(0xe800, 0xefff).ram().share("videoram"); // Video RAM
- map(0xf400, 0xf7ff).ram(); // System RAM
- map(0xf800, 0xffff).rom().region("maincpu",0); // System ROM
-}
-
-void ut88mini_state::io_map(address_map &map)
-{
- map(0xA0, 0xA0).r(FUNC(ut88mini_state::keyboard_r));
- map(0xA1, 0xA1).r(FUNC(ut88mini_state::tape_r));
-}
-
-void ut88_state::io_map(address_map &map)
-{
- map(0x04, 0x07).rw(FUNC(ut88_state::keyboard_r), FUNC(ut88_state::keyboard_w));
- map(0xA1, 0xA1).rw(FUNC(ut88_state::tape_r), FUNC(ut88_state::sound_w));
-}
-
-/* Input ports */
-static INPUT_PORTS_START( ut88 )
- PORT_START("LINE0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR(0xA4)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(':') PORT_CHAR('*')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE2")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('@')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE3")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE4")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE5")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE6")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('^')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<>") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('_')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE7")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-
- PORT_START("LINE8")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( ut88mini )
- PORT_START("LINE0")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
-
- PORT_START("LINE1")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
- PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
-
- PORT_START("LINE2")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR('V')
-INPUT_PORTS_END
-
-const gfx_layout charlayout =
-{
- 8, 8, /* 8x8 characters */
- 256, /* 256 characters */
- 1, /* 1 bits per pixel */
- {0}, /* no bitplanes; 1 bit per pixel */
- {0, 1, 2, 3, 4, 5, 6, 7},
- {0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8},
- 8*8 /* size of one char */
-};
-
-static GFXDECODE_START( gfx_ut88 )
- GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 )
-GFXDECODE_END
-
-u32 ut88_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- for (u8 y = 0; y < 28; y++)
- {
- for (u8 x = 0; x < 64; x++)
- {
- u8 code = m_vram[x + y*64] & 0x7f;
- u8 attr = m_vram[x+1 + y*64] & 0x80;
- m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, code | attr, 0, 0,0, x*8,y*8);
- }
- }
- return 0;
-}
-
-/* Machine driver */
-void ut88_state::ut88(machine_config &config)
-{
- /* basic machine hardware */
- I8080(config, m_maincpu, 2000000);
- m_maincpu->set_addrmap(AS_PROGRAM, &ut88_state::mem_map);
- m_maincpu->set_addrmap(AS_IO, &ut88_state::io_map);
-
- /* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(50);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(64*8, 28*8);
- screen.set_visarea(0, 64*8-1, 0, 28*8-1);
- screen.set_screen_update(FUNC(ut88_state::screen_update));
- screen.set_palette(m_palette);
-
- PALETTE(config, m_palette, palette_device::MONOCHROME);
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_ut88);
-
- /* audio hardware */
- SPEAKER(config, "speaker").front_center();
- DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
-
- /* Devices */
- I8255A(config, m_ppi);
- m_ppi->out_pa_callback().set(FUNC(ut88_state::ppi_porta_w));
- m_ppi->in_pb_callback().set(FUNC(ut88_state::ppi_portb_r));
- m_ppi->in_pc_callback().set(FUNC(ut88_state::ppi_portc_r));
-
- CASSETTE(config, m_cassette);
- m_cassette->set_formats(rku_cassette_formats);
- m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
- m_cassette->add_route(ALL_OUTPUTS, "speaker", 0.05);
- m_cassette->set_interface("ut88_cass");
-
- SOFTWARE_LIST(config, "cass_list").set_original("ut88");
-}
-
-void ut88mini_state::ut88mini(machine_config &config)
-{
- /* basic machine hardware */
- I8080(config, m_maincpu, 2000000);
- m_maincpu->set_addrmap(AS_PROGRAM, &ut88mini_state::mem_map);
- m_maincpu->set_addrmap(AS_IO, &ut88mini_state::io_map);
-
- /* video hardware */
- config.set_default_layout(layout_ut88mini);
- TIMER(config, "display_timer").configure_periodic(FUNC(ut88mini_state::display_timer), attotime::from_hz(60));
-
- /* Cassette */
- SPEAKER(config, "speaker").front_center();
-
- CASSETTE(config, m_cassette);
- m_cassette->set_formats(rku_cassette_formats);
- m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED);
- m_cassette->add_route(ALL_OUTPUTS, "speaker", 0.05);
- m_cassette->set_interface("ut88_cass");
-
- //SOFTWARE_LIST(config, "cass_list").set_original("ut88"); // no suitable software in the list
-}
-
-/* ROM definition */
-ROM_START( ut88 )
- ROM_REGION( 0x0800, "maincpu", 0 )
- ROM_LOAD( "ut88.rom", 0x0000, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) )
-
- ROM_REGION( 0x0800, "chargen",0 )
- ROM_LOAD( "ut88.fnt", 0x0000, 0x0800, CRC(874b4d29) SHA1(357efbb295cd9e47fa97d4d03f4f1859a915b5c3) )
-ROM_END
-
-ROM_START( ut88mini )
- ROM_REGION( 0x0400, "maincpu", 0 )
- ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(ce9213ee) SHA1(16b71b3051a800386d664dbcc5983b783475d0c6) ) // DD10,DD11 (0x200 each)
- ROM_FILL(0x71,1,0x7e) // show content of ram address
-
- ROM_REGION( 0x0200, "proms", 0 )
- ROM_LOAD( "ut88key1.dd15", 0x0000, 0x0100, CRC(ecfe42c7) SHA1(d7f10bbb05934150c1a258db1c8b4eb65771af59) )
- ROM_LOAD( "ut88key2.dd16", 0x0100, 0x0100, CRC(96324d23) SHA1(9dca3f639fc29d87df56505b3dde668ef2849da3) )
-ROM_END
-
-/* Driver */
-
-/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-COMP( 1989, ut88mini, 0, 0, ut88mini, ut88mini, ut88mini_state, empty_init, "<unknown>", "UT-88 mini", MACHINE_SUPPORTS_SAVE )
-COMP( 1989, ut88, ut88mini, 0, ut88, ut88, ut88_state, empty_init, "<unknown>", "UT-88", MACHINE_SUPPORTS_SAVE )