src/mess/machine/special.c
| r0 | r2013 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Specialist machine driver by Miodrag Milanovic
|
| 4 | |
| 5 | 15/03/2008 Preliminary driver.
|
| 6 |
|
| 7 | ****************************************************************************/
|
| 8 | |
| 9 | |
| 10 | #include "driver.h"
|
| 11 | #include "cpu/i8085/i8085.h"
|
| 12 | #include "sound/dac.h"
|
| 13 | #include "devices/cassette.h"
|
| 14 | #include "machine/8255ppi.h"
|
| 15 | |
| 16 | |
| 17 | static int specialist_8255_porta;
|
| 18 | static int specialist_8255_portb;
|
| 19 | static int specialist_8255_portc;
|
| 20 | |
| 21 | /* Driver initialization */
|
| 22 | DRIVER_INIT(special)
|
| 23 | {
|
| 24 | |
| 25 | }
|
| 26 | |
| 27 | READ8_HANDLER (specialist_8255_porta_r )
|
| 28 | {
|
| 29 | if (readinputport(0)!=0xff) return 0xfe;
|
| 30 | if (readinputport(1)!=0xff) return 0xfd;
|
| 31 | if (readinputport(2)!=0xff) return 0xfb;
|
| 32 | if (readinputport(3)!=0xff) return 0xf7;
|
| 33 | if (readinputport(4)!=0xff) return 0xef;
|
| 34 | if (readinputport(5)!=0xff) return 0xdf;
|
| 35 | if (readinputport(6)!=0xff) return 0xbf;
|
| 36 | if (readinputport(7)!=0xff) return 0x7f;
|
| 37 | return 0xff;
|
| 38 | }
|
| 39 | |
| 40 | READ8_HANDLER (specialist_8255_portb_r )
|
| 41 | {
|
| 42 |
|
| 43 | int dat = 0;
|
| 44 |
|
| 45 | if ((specialist_8255_porta & 0x01)==0) dat ^= (readinputport(0) ^ 0xff);
|
| 46 | if ((specialist_8255_porta & 0x02)==0) dat ^= (readinputport(1) ^ 0xff);
|
| 47 | if ((specialist_8255_porta & 0x04)==0) dat ^= (readinputport(2) ^ 0xff);
|
| 48 | if ((specialist_8255_porta & 0x08)==0) dat ^= (readinputport(3) ^ 0xff);
|
| 49 | if ((specialist_8255_porta & 0x10)==0) dat ^= (readinputport(4) ^ 0xff);
|
| 50 | if ((specialist_8255_porta & 0x20)==0) dat ^= (readinputport(5) ^ 0xff);
|
| 51 | if ((specialist_8255_porta & 0x40)==0) dat ^= (readinputport(6) ^ 0xff);
|
| 52 | if ((specialist_8255_porta & 0x80)==0) dat ^= (readinputport(7) ^ 0xff);
|
| 53 | if ((specialist_8255_portc & 0x01)==0) dat ^= (readinputport(8) ^ 0xff);
|
| 54 | if ((specialist_8255_portc & 0x02)==0) dat ^= (readinputport(9) ^ 0xff);
|
| 55 | if ((specialist_8255_portc & 0x04)==0) dat ^= (readinputport(10) ^ 0xff);
|
| 56 | if ((specialist_8255_portc & 0x08)==0) dat ^= (readinputport(11) ^ 0xff);
|
| 57 |
|
| 58 | dat = (dat << 2) ^0xff;
|
| 59 | if (readinputport(12)!=0xff) dat ^= 0x02;
|
| 60 | return dat & 0xff;
|
| 61 | }
|
| 62 | |
| 63 | READ8_HANDLER (specialist_8255_portc_r )
|
| 64 | {
|
| 65 | if (readinputport(8)!=0xff) return 0x0e;
|
| 66 | if (readinputport(9)!=0xff) return 0x0d;
|
| 67 | if (readinputport(10)!=0xff) return 0x0b;
|
| 68 | if (readinputport(11)!=0xff) return 0x07;
|
| 69 | return 0x0f;
|
| 70 | }
|
| 71 | |
| 72 | WRITE8_HANDLER (specialist_8255_porta_w )
|
| 73 | {
|
| 74 | specialist_8255_porta = data;
|
| 75 | }
|
| 76 | |
| 77 | WRITE8_HANDLER (specialist_8255_portb_w )
|
| 78 | {
|
| 79 | specialist_8255_portb = data;
|
| 80 | }
|
| 81 | WRITE8_HANDLER (specialist_8255_portc_w )
|
| 82 | {
|
| 83 | specialist_8255_portc = data;
|
| 84 | }
|
| 85 | |
| 86 | static const ppi8255_interface specialist_ppi8255_interface =
|
| 87 | {
|
| 88 | 1,
|
| 89 | {specialist_8255_porta_r},
|
| 90 | {specialist_8255_portb_r},
|
| 91 | {specialist_8255_portc_r},
|
| 92 | {specialist_8255_porta_w},
|
| 93 | {specialist_8255_portb_w},
|
| 94 | {specialist_8255_portc_w}
|
| 95 | };
|
| 96 | |
| 97 | MACHINE_RESET( special )
|
| 98 | {
|
| 99 | ppi8255_init(&specialist_ppi8255_interface);
|
| 100 | }
|
| 101 | |
| 102 | |
| 103 | READ8_HANDLER( specialist_keyboard_r )
|
| 104 | {
|
| 105 | return ppi8255_0_r(machine, (offset & 3));
|
| 106 | }
|
| 107 | |
| 108 | WRITE8_HANDLER( specialist_keyboard_w )
|
| 109 | {
|
| 110 | ppi8255_0_w(machine, (offset & 3) , data );
|
| 111 | }
|
src/mess/drivers/special.c
| r0 | r2013 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Specialist driver by Miodrag Milanovic
|
| 4 | |
| 5 | 15/03/2008 Preliminary driver.
|
| 6 |
|
| 7 | ****************************************************************************/
|
| 8 | |
| 9 | |
| 10 | #include "driver.h"
|
| 11 | #include "cpu/i8085/i8085.h"
|
| 12 | #include "includes/special.h"
|
| 13 | #include "machine/8255ppi.h"
|
| 14 | |
| 15 | /* Address maps */
|
| 16 | static ADDRESS_MAP_START(specialist_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 17 | AM_RANGE( 0x0000, 0x8fff ) AM_RAM // RAM
|
| 18 | AM_RANGE( 0x9000, 0xbfff ) AM_RAM // Video RAM
|
| 19 | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM
|
| 20 | AM_RANGE( 0xf000, 0xf700 ) AM_NOP
|
| 21 | AM_RANGE( 0xf800, 0xffff ) AM_READWRITE(specialist_keyboard_r,specialist_keyboard_w) // 8255 for keyboard
|
| 22 | ADDRESS_MAP_END
|
| 23 | |
| 24 | /* Input ports */
|
| 25 | INPUT_PORTS_START( special )
|
| 26 | PORT_START /* line 0 */
|
| 27 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
|
| 28 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)
|
| 29 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 30 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON)
|
| 31 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 32 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 33 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 34 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 35 | PORT_START /* line 1 */
|
| 36 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
|
| 37 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_SLASH)
|
| 38 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_BACKSLASH)
|
| 39 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 40 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 41 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) |
| 42 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 43 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 44 | PORT_START /* line 2 */
|
| 45 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
| 46 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
|
| 47 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 48 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 49 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 50 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) |
| 51 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 52 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 53 | PORT_START /* line 3 */
|
| 54 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12)
|
| 55 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE)
|
| 56 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 57 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 58 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 59 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) |
| 60 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 61 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 62 | PORT_START /* line 4 */
|
| 63 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
| 64 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
|
| 65 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 66 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
|
| 67 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 68 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) |
| 69 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 70 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 71 | |
| 72 | PORT_START /* line 5 */
|
| 73 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 74 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
|
| 75 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 76 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 77 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 78 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) |
| 79 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 80 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 81 | PORT_START /* line 6 */
|
| 82 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
|
| 83 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 84 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 85 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 86 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 87 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6)
|
| 88 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 89 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 90 | PORT_START /* line 7 */
|
| 91 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
|
| 92 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
|
| 93 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
|
| 94 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 95 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 96 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 97 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 98 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 99 | PORT_START /* line 8 */
|
| 100 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 101 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
|
| 102 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 103 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 104 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 105 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 106 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 107 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 108 | PORT_START /* line 9 */
|
| 109 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
| 110 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 111 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
|
| 112 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 113 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 114 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 115 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 116 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 117 | PORT_START /* line 10 */
|
| 118 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
|
| 119 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS)
|
| 120 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
|
| 121 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
|
| 122 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 123 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 124 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 125 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 126 | PORT_START /* line 11 */
|
| 127 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT)
|
| 128 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT)
|
| 129 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
|
| 130 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 131 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
|
| 132 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_TILDE) |
| 133 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 134 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 135 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 136 | PORT_START /* line 12 */
|
| 137 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 138 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 139 | PORT_BIT(0xFE, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 140 | INPUT_PORTS_END
|
| 141 |
|
| 142 | /* Machine driver */
|
| 143 | static MACHINE_DRIVER_START( special )
|
| 144 | /* basic machine hardware */
|
| 145 | MDRV_CPU_ADD(8080, 2000000)
|
| 146 | MDRV_CPU_PROGRAM_MAP(specialist_mem, 0) |
| 147 | MDRV_MACHINE_RESET( special )
|
| 148 |
|
| 149 | /* video hardware */
|
| 150 | MDRV_SCREEN_ADD("main", RASTER)
|
| 151 | MDRV_SCREEN_REFRESH_RATE(50)
|
| 152 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 153 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 154 | MDRV_SCREEN_SIZE(384, 256)
|
| 155 | MDRV_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1)
|
| 156 | MDRV_PALETTE_LENGTH(2)
|
| 157 | MDRV_PALETTE_INIT(black_and_white)
|
| 158 | |
| 159 | MDRV_VIDEO_START(special)
|
| 160 | MDRV_VIDEO_UPDATE(special)
|
| 161 | MACHINE_DRIVER_END
|
| 162 | |
| 163 |
|
| 164 | /* ROM definition */
|
| 165 | ROM_START( special )
|
| 166 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 167 | ROM_SYSTEM_BIOS(0, "1st", "1st rev.")
|
| 168 | ROMX_LOAD( "special1.rom", 0xc000, 0x1000, CRC(217414BD) , ROM_BIOS(1))
|
| 169 | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.")
|
| 170 | ROMX_LOAD( "special2.rom", 0xc000, 0x1000, CRC(FEDFBC37) , ROM_BIOS(2))
|
| 171 | ROM_SYSTEM_BIOS(2, "3rd", "3rd rev.")
|
| 172 | ROMX_LOAD( "special3.rom", 0xc000, 0x1400, CRC(85F08629) , ROM_BIOS(3))
|
| 173 | ROM_SYSTEM_BIOS(3, "7th", "7th rev.") |
| 174 | ROMX_LOAD( "special7.rom", 0xc000, 0x2000, CRC(FBE3438A) , ROM_BIOS(4))
|
| 175 | |
| 176 | ROM_END
|
| 177 | |
| 178 | ROM_START( lik )
|
| 179 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 180 | ROM_SYSTEM_BIOS(0, "1st", "1st rev.")
|
| 181 | ROMX_LOAD( "lik.rom", 0xc000, 0x3000, CRC(705BB3A0) , ROM_BIOS(1))
|
| 182 | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.")
|
| 183 | ROMX_LOAD( "lik2.rom", 0xc000, 0x3000, CRC(71820E43) , ROM_BIOS(2))
|
| 184 | ROM_END
|
| 185 | |
| 186 | /* Driver */
|
| 187 |
|
| 188 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 189 | COMP( 1985, special, 0, 0, special, special, special, NULL, "", "Special", 0)
|
| 190 | COMP( 1985, lik, special, 0, special, special, special, NULL, "", "Lik", 0)
|
src/mess/drivers/ut88.c
| r2012 | r2013 | |
| 14 | 14 | #include "sound/dac.h"
|
| 15 | 15 | #include "devices/cassette.h"
|
| 16 | 16 | #include "formats/rk_cas.h"
|
| 17 | #include "ut88mini.lh"
|
| 17 | 18 | |
| 18 | 19 | GFXDECODE_START( ut88 )
|
| 19 | 20 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, ut88_charlayout, 0, 1 )
|
| 20 | 21 | GFXDECODE_END
|
| 21 | |
|
| 22 |
|
| 22 | 23 | /* Address maps */
|
| 24 | static ADDRESS_MAP_START(ut88mini_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 25 | AM_RANGE( 0x0000, 0x0fff ) AM_ROM // System ROM
|
| 26 | AM_RANGE( 0x1000, 0x8fff ) AM_RAM // RAM
|
| 27 | AM_RANGE( 0x9000, 0x9fff ) AM_WRITE(ut88mini_write_led) // 7seg LED
|
| 28 | AM_RANGE( 0xA000, 0xffff ) AM_RAM // RAM
|
| 29 | ADDRESS_MAP_END
|
| 30 | |
| 23 | 31 | static ADDRESS_MAP_START(ut88_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 24 | 32 | AM_RANGE( 0x0000, 0xf7ff ) AM_RAM // RAM
|
| 25 | 33 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM
|
| 26 | 34 | ADDRESS_MAP_END
|
| 27 | 35 | |
| 36 | static ADDRESS_MAP_START( ut88mini_io , ADDRESS_SPACE_IO, 8) |
| 37 | AM_RANGE( 0xA0, 0xA0) AM_READ ( ut88mini_keyboard_r )
|
| 38 | AM_RANGE( 0xA1, 0xA1) AM_READ ( ut88_tape_r )
|
| 39 | ADDRESS_MAP_END
|
| 40 | |
| 28 | 41 | static ADDRESS_MAP_START( ut88_io , ADDRESS_SPACE_IO, 8)
|
| 29 | 42 | AM_RANGE( 0x04, 0x07) AM_READWRITE ( ut88_keyboard_r, ut88_keyboard_w )
|
| 30 | 43 | AM_RANGE( 0xA1, 0xA1) AM_READWRITE ( ut88_tape_r, ut88_sound_w )
|
| r2012 | r2013 | |
| 117 | 130 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 118 | 131 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 119 | 132 | INPUT_PORTS_END
|
| 133 | |
| 134 | INPUT_PORTS_START( ut88mini )
|
| 135 | PORT_START /* line 0 */
|
| 136 | PORT_BIT(0x00, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
|
| 137 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
|
| 138 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 139 | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 140 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 141 | PORT_BIT(0x05, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 142 | PORT_BIT(0x06, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
|
| 143 | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
|
| 144 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 145 | PORT_BIT(0x09, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 146 | PORT_BIT(0x0A, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 147 | PORT_BIT(0x0B, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 148 | PORT_BIT(0x0C, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 149 | PORT_BIT(0x0D, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 150 | PORT_BIT(0x0E, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 151 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 152 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE)
|
| 153 | INPUT_PORTS_END
|
| 120 | 154 |
|
| 121 | 155 | /* Machine driver */
|
| 122 | 156 | static MACHINE_DRIVER_START( ut88 )
|
| 123 | | /* basic machine hardware */
|
| 157 | /* basic machine hardware */
|
| 124 | 158 | MDRV_CPU_ADD(8080, 2000000)
|
| 125 | 159 | MDRV_CPU_PROGRAM_MAP(ut88_mem, 0) |
| 126 | 160 | MDRV_CPU_IO_MAP(ut88_io, 0)
|
| 127 | 161 | MDRV_MACHINE_RESET( ut88 )
|
| 128 | 162 |
|
| 129 | 163 | /* video hardware */
|
| 130 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 131 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 132 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 133 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 134 | | MDRV_SCREEN_SIZE(48*8, 28*8)
|
| 135 | | MDRV_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 28*8-1)
|
| 136 | | MDRV_PALETTE_LENGTH(2)
|
| 137 | | MDRV_PALETTE_INIT(black_and_white)
|
| 138 | | MDRV_GFXDECODE( ut88 )
|
| 164 | MDRV_SCREEN_ADD("main", RASTER)
|
| 165 | MDRV_SCREEN_REFRESH_RATE(50)
|
| 166 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 167 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 168 | MDRV_SCREEN_SIZE(64*8, 28*8)
|
| 169 | MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 28*8-1)
|
| 170 | MDRV_PALETTE_LENGTH(2)
|
| 171 | MDRV_PALETTE_INIT(black_and_white)
|
| 172 | MDRV_GFXDECODE( ut88 )
|
| 139 | 173 | |
| 140 | 174 | MDRV_VIDEO_START(ut88)
|
| 141 | 175 | MDRV_VIDEO_UPDATE(ut88)
|
| 142 | 176 | |
| 143 | 177 | /* audio hardware */
|
| 144 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 145 | | MDRV_SOUND_ADD(DAC, 0)
|
| 146 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
| 147 | | MDRV_SOUND_ADD(WAVE, 0)
|
| 148 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 178 | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 179 | MDRV_SOUND_ADD(DAC, 0)
|
| 180 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
| 181 | MDRV_SOUND_ADD(WAVE, 0)
|
| 182 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 149 | 183 | MACHINE_DRIVER_END
|
| 150 | 184 | |
| 185 | static MACHINE_DRIVER_START( ut88mini )
|
| 186 | /* basic machine hardware */
|
| 187 | MDRV_CPU_ADD(8080, 2000000)
|
| 188 | MDRV_CPU_PROGRAM_MAP(ut88mini_mem, 0) |
| 189 | MDRV_CPU_IO_MAP(ut88mini_io, 0)
|
| 190 | MDRV_MACHINE_START(ut88mini)
|
| 191 | MDRV_MACHINE_RESET( ut88mini )
|
| 192 | |
| 193 | /* video hardware */
|
| 194 | MDRV_SCREEN_ADD("main", RASTER)
|
| 195 | MDRV_SCREEN_REFRESH_RATE(60)
|
| 196 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
|
| 197 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
| 198 | MDRV_SCREEN_SIZE(640, 480)
|
| 199 | MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
|
| 200 | MDRV_PALETTE_LENGTH(4)
|
| 201 | |
| 202 | MDRV_DEFAULT_LAYOUT(layout_ut88mini) |
| 203 | MACHINE_DRIVER_END
|
| 204 | |
| 151 | 205 | static void ut88_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
|
| 152 | 206 | {
|
| 153 | 207 | /* cassette */
|
| r2012 | r2013 | |
| 168 | 222 |
|
| 169 | 223 | /* ROM definition */
|
| 170 | 224 | ROM_START( ut88 )
|
| 171 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 172 | | ROM_LOAD( "ut88.rom", 0xf800, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) )
|
| 225 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 226 | ROM_LOAD( "ut88.rom", 0xf800, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) )
|
| 173 | 227 | ROM_REGION(0x0800, REGION_GFX1,0)
|
| 174 | 228 | ROM_LOAD ("ut88.fnt", 0x0000, 0x0800, CRC(874b4d29) SHA1(357efbb295cd9e47fa97d4d03f4f1859a915b5c3) ) |
| 175 | 229 | ROM_END
|
| 176 | 230 | |
| 231 | ROM_START( ut88mini )
|
| 232 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 233 | ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(CE9213EE) )
|
| 234 | ROM_END
|
| 177 | 235 | /* Driver */
|
| 178 | 236 |
|
| 179 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 180 | | COMP( 1989, ut88, 0, 0, ut88, ut88, ut88, ut88, "", "UT-88", 0)
|
| 237 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 238 | COMP( 1989, ut88mini, 0, 0, ut88mini, ut88mini, ut88, ut88, "", "UT-88 mini", 0)
|
| 239 | COMP( 1989, ut88, ut88mini,0, ut88, ut88, ut88, ut88, "", "UT-88", 0)
|
| 240 | |