src/mess/video/orion.c
| r0 | r2276 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Orion video driver by Miodrag Milanovic
|
| 4 | |
| 5 | 02/04/2008 Preliminary driver.
|
| 6 |
|
| 7 | ****************************************************************************/
|
| 8 | |
| 9 | |
| 10 | #include "driver.h"
|
| 11 | |
| 12 | |
| 13 | VIDEO_START( orion128 )
|
| 14 | {
|
| 15 | }
|
| 16 |
|
| 17 | extern UINT8 orion128_video_mode;
|
| 18 | extern UINT8 orion128_video_page; |
| 19 | |
| 20 | VIDEO_UPDATE( orion128 )
|
| 21 | {
|
| 22 | UINT8 code1,code2,color;
|
| 23 | int y, x,b;
|
| 24 | |
| 25 | int part1addr = (3-orion128_video_page) * 0x4000;
|
| 26 | int part2addr = (3-orion128_video_page) * 0x4000 + 0x10000;
|
| 27 | for (x = 0; x < 48; x++)
|
| 28 | {
|
| 29 | for (y = 0; y < 256; y++)
|
| 30 | {
|
| 31 | code1 = mess_ram[part1addr + y + x*256];
|
| 32 | code2 = mess_ram[part2addr + y + x*256];
|
| 33 | color = 0;
|
| 34 | for (b = 7; b >= 0; b--)
|
| 35 | { |
| 36 | switch(orion128_video_mode) {
|
| 37 | case 0 : color = ((code1 >> b) & 0x01) ? 10 : 0; break;
|
| 38 | case 1 : color = ((code1 >> b) & 0x01) ? 17 : 16; break;
|
| 39 | case 4 : |
| 40 | case 6 :
|
| 41 | case 7 :
|
| 42 | color = ((code1 >> b) & 0x01) ? (code2 & 0x0f) : (code2 >> 4); break; |
| 43 | }
|
| 44 | *BITMAP_ADDR16(bitmap, y, x*8+(7-b)) = color;
|
| 45 | }
|
| 46 | } |
| 47 | }
|
| 48 |
|
| 49 | return 0;
|
| 50 | }
|
| 51 | |
| 52 | const rgb_t orion128_palette[18] = {
|
| 53 | MAKE_RGB(0x00, 0x00, 0x00), // 0
|
| 54 | MAKE_RGB(0x00, 0x00, 0xc0), // 1
|
| 55 | MAKE_RGB(0x00, 0xc0, 0x00), // 2 |
| 56 | MAKE_RGB(0x00, 0xc0, 0xc0), // 3 |
| 57 | MAKE_RGB(0xc0, 0x00, 0x00), // 4 |
| 58 | MAKE_RGB(0xc0, 0x00, 0xc0), // 5 |
| 59 | MAKE_RGB(0xc0, 0xc0, 0x00), // 6 |
| 60 | MAKE_RGB(0xc0, 0xc0, 0xc0), // 7 |
| 61 | MAKE_RGB(0x80, 0x80, 0x80), // 8 |
| 62 | MAKE_RGB(0x00, 0x00, 0xff), // 9 |
| 63 | MAKE_RGB(0x00, 0xff, 0x00), // A |
| 64 | MAKE_RGB(0x00, 0xff, 0xff), // B |
| 65 | MAKE_RGB(0xff, 0x00, 0x00), // C |
| 66 | MAKE_RGB(0xff, 0x00, 0xff), // D |
| 67 | MAKE_RGB(0xff, 0xff, 0x00), // E |
| 68 | MAKE_RGB(0xff, 0xff, 0xff), // F |
| 69 | MAKE_RGB(0xc8, 0xb4, 0x28), // 10 |
| 70 | MAKE_RGB(0x32, 0xfa, 0xfa) // 11 |
| 71 | };
|
| 72 | |
| 73 | PALETTE_INIT( orion128 )
|
| 74 | {
|
| 75 | palette_set_colors(machine, 0, orion128_palette, ARRAY_LENGTH(orion128_palette));
|
| 76 | }
|
| 77 | |
src/mess/machine/orion.c
| r0 | r2276 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Orion machine driver by Miodrag Milanovic
|
| 4 | |
| 5 | 02/04/2008 Preliminary driver.
|
| 6 |
|
| 7 | ****************************************************************************/
|
| 8 | |
| 9 | |
| 10 | #include "driver.h"
|
| 11 | #include "cpu/i8085/i8085.h"
|
| 12 | #include "devices/cassette.h"
|
| 13 | #include "devices/basicdsk.h"
|
| 14 | #include "machine/8255ppi.h"
|
| 15 | #include "machine/wd17xx.h"
|
| 16 | |
| 17 | UINT8 romdisk_lsb,romdisk_msb;
|
| 18 | UINT8 orion_keyboard_line;
|
| 19 | UINT8 orion128_video_mode;
|
| 20 | UINT8 orion128_video_page;
|
| 21 | UINT8 orion128_dispatcher;
|
| 22 | UINT8 orion128_memory_page;
|
| 23 | |
| 24 | READ8_HANDLER (orion_romdisk_porta_r )
|
| 25 | {
|
| 26 | UINT8 *romdisk = memory_region(REGION_CPU1) + 0x10000; |
| 27 | switch(readinputport(9)) {
|
| 28 | case 3 : return romdisk[romdisk_msb*256+romdisk_lsb];
|
| 29 | case 1 : return romdisk[romdisk_msb*256+romdisk_lsb+0x10000];
|
| 30 | }
|
| 31 | return 0xff;
|
| 32 | }
|
| 33 | |
| 34 | WRITE8_HANDLER (orion_romdisk_portb_w )
|
| 35 | {
|
| 36 | romdisk_lsb = data;
|
| 37 | }
|
| 38 | |
| 39 | WRITE8_HANDLER (orion_romdisk_portc_w )
|
| 40 | { |
| 41 | romdisk_msb = data;
|
| 42 | }
|
| 43 | |
| 44 | READ8_HANDLER (orion_keyboard_portb_r )
|
| 45 | { |
| 46 | return readinputport(orion_keyboard_line);
|
| 47 | }
|
| 48 | |
| 49 | READ8_HANDLER (orion_keyboard_portc_r )
|
| 50 | {
|
| 51 | return readinputport(8); |
| 52 | }
|
| 53 | |
| 54 | WRITE8_HANDLER (orion_keyboard_porta_w )
|
| 55 | {
|
| 56 | switch (data ^ 0xff) {
|
| 57 | case 0x01 : orion_keyboard_line = 0;break;
|
| 58 | case 0x02 : orion_keyboard_line = 1;break;
|
| 59 | case 0x04 : orion_keyboard_line = 2;break;
|
| 60 | case 0x08 : orion_keyboard_line = 3;break;
|
| 61 | case 0x10 : orion_keyboard_line = 4;break;
|
| 62 | case 0x20 : orion_keyboard_line = 5;break;
|
| 63 | case 0x40 : orion_keyboard_line = 6;break;
|
| 64 | case 0x80 : orion_keyboard_line = 7;break;
|
| 65 | }
|
| 66 | }
|
| 67 | |
| 68 | static const ppi8255_interface orion128_ppi8255_interface =
|
| 69 | {
|
| 70 | 2,
|
| 71 | {orion_romdisk_porta_r, NULL, },
|
| 72 | {NULL, orion_keyboard_portb_r},
|
| 73 | {NULL, orion_keyboard_portc_r},
|
| 74 | {NULL, orion_keyboard_porta_w},
|
| 75 | {orion_romdisk_portb_w, NULL, },
|
| 76 | {orion_romdisk_portc_w, NULL, }
|
| 77 | };
|
| 78 | |
| 79 | /* Driver initialization */
|
| 80 | DRIVER_INIT( orion128 )
|
| 81 | {
|
| 82 | memset(mess_ram,0,256*1024);
|
| 83 | }
|
| 84 | |
| 85 | |
| 86 | MACHINE_START( orion128 )
|
| 87 | {
|
| 88 | wd17xx_init(machine, WD_TYPE_1793, NULL , NULL);
|
| 89 | wd17xx_set_density (DEN_FM_HI);
|
| 90 | }
|
| 91 | |
| 92 | READ8_HANDLER ( orion128_system_r ) |
| 93 | {
|
| 94 | return ppi8255_1_r(machine, offset & 3);
|
| 95 | }
|
| 96 | |
| 97 | WRITE8_HANDLER ( orion128_system_w ) |
| 98 | {
|
| 99 | ppi8255_1_w(machine, offset & 3, data);
|
| 100 | }
|
| 101 | |
| 102 | READ8_HANDLER ( orion128_romdisk_r ) |
| 103 | {
|
| 104 | return ppi8255_0_r(machine, offset & 3);
|
| 105 | }
|
| 106 | |
| 107 | WRITE8_HANDLER ( orion128_romdisk_w ) |
| 108 | {
|
| 109 | ppi8255_0_w(machine, offset & 3, data);
|
| 110 | }
|
| 111 | |
| 112 | WRITE8_HANDLER ( orion128_video_mode_w )
|
| 113 | {
|
| 114 | orion128_video_mode = data;
|
| 115 | }
|
| 116 | |
| 117 | WRITE8_HANDLER ( orion128_video_page_w )
|
| 118 | {
|
| 119 | orion128_video_page = data & 3;
|
| 120 | }
|
| 121 | |
| 122 | WRITE8_HANDLER ( orion128_dispatcher_w )
|
| 123 | {
|
| 124 | orion128_dispatcher = data;
|
| 125 | }
|
| 126 | |
| 127 | WRITE8_HANDLER ( orion128_memory_page_w )
|
| 128 | { |
| 129 | if (data >3) {
|
| 130 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0xefff, 0, 0, SMH_UNMAP);
|
| 131 | return;
|
| 132 | }
|
| 133 | if (data!=orion128_memory_page ) {
|
| 134 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0xefff, 0, 0, SMH_BANK1);
|
| 135 | memory_set_bankptr(1, mess_ram + (data & 3) * 0x10000);
|
| 136 | orion128_memory_page = (data & 3);
|
| 137 | }
|
| 138 | }
|
| 139 | |
| 140 | MACHINE_RESET ( orion128 ) |
| 141 | {
|
| 142 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0xefff, 0, 0, SMH_UNMAP);
|
| 143 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0xf800); |
| 144 |
|
| 145 | wd17xx_reset();
|
| 146 | ppi8255_init(&orion128_ppi8255_interface);
|
| 147 | orion_keyboard_line = 0;
|
| 148 | orion128_video_page = 0;
|
| 149 | orion128_video_mode = 0;
|
| 150 | orion128_memory_page = -1;
|
| 151 | }
|
| 152 | |
| 153 | |
| 154 | DEVICE_IMAGE_LOAD( orion_floppy )
|
| 155 | {
|
| 156 | int size;
|
| 157 | |
| 158 | if (! image_has_been_created(image))
|
| 159 | {
|
| 160 | size = image_length(image);
|
| 161 | |
| 162 | switch (size)
|
| 163 | {
|
| 164 | case 800*1024:
|
| 165 | break;
|
| 166 | default:
|
| 167 | return INIT_FAIL;
|
| 168 | }
|
| 169 | }
|
| 170 | else
|
| 171 | return INIT_FAIL;
|
| 172 | |
| 173 | if (device_load_basicdsk_floppy (image) != INIT_PASS)
|
| 174 | return INIT_FAIL;
|
| 175 | |
| 176 | basicdsk_set_geometry (image, 80, 2, 5, 1024, 1, 0, FALSE);
|
| 177 | return INIT_PASS;
|
| 178 | }
|
| 179 | |
| 180 | WRITE8_HANDLER ( orion_disk_control_w )
|
| 181 | {
|
| 182 | wd17xx_set_side(((data & 0x10) >> 4) ^ 1);
|
| 183 | wd17xx_set_drive(data & 3); |
| 184 | }
|
| 185 | |
| 186 | READ8_HANDLER ( orion128_floppy_r )
|
| 187 | {
|
| 188 | switch(offset) {
|
| 189 | case 0x0 :
|
| 190 | case 0x10 : return wd17xx_status_r(machine,0);
|
| 191 | case 0x1 :
|
| 192 | case 0x11 : return wd17xx_track_r(machine,0);
|
| 193 | case 0x2 :
|
| 194 | case 0x12 : return wd17xx_sector_r(machine,0);
|
| 195 | case 0x3 :
|
| 196 | case 0x13 : return wd17xx_data_r(machine,0);
|
| 197 | }
|
| 198 | return 0xff;
|
| 199 | }
|
| 200 | |
| 201 | WRITE8_HANDLER ( orion128_floppy_w )
|
| 202 | {
|
| 203 | switch(offset) {
|
| 204 | case 0x0 :
|
| 205 | case 0x10 : wd17xx_command_w(machine,0,data); break;
|
| 206 | case 0x1 :
|
| 207 | case 0x11 : wd17xx_track_w(machine,0,data);break;
|
| 208 | case 0x2 :
|
| 209 | case 0x12 : wd17xx_sector_w(machine,0,data);break;
|
| 210 | case 0x3 :
|
| 211 | case 0x13 : wd17xx_data_w(machine,0,data);break;
|
| 212 | case 0x4 : |
| 213 | case 0x14 : |
| 214 | case 0x20 : orion_disk_control_w(machine, offset, data);break;
|
| 215 | }
|
| 216 | }
|
src/mess/drivers/orion.c
| r0 | r2276 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Orion driver by Miodrag Milanovic
|
| 4 | |
| 5 | 02/04/2008 Preliminary driver.
|
| 6 |
|
| 7 | ****************************************************************************/
|
| 8 | |
| 9 | |
| 10 | #include "driver.h"
|
| 11 | #include "cpu/i8085/i8085.h"
|
| 12 | #include "includes/orion.h"
|
| 13 | #include "devices/basicdsk.h"
|
| 14 | |
| 15 | /* Address maps */
|
| 16 | static ADDRESS_MAP_START(orion128_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 17 | ADDRESS_MAP_UNMAP_HIGH
|
| 18 | AM_RANGE( 0x0000, 0xefff ) AM_READWRITE(SMH_BANK1, SMH_BANK1)
|
| 19 | AM_RANGE( 0xf000, 0xf3ff ) AM_RAM
|
| 20 | AM_RANGE( 0xf400, 0xf4ff ) AM_READWRITE(orion128_system_r,orion128_system_w) // Keyboard and cassette
|
| 21 | AM_RANGE( 0xf500, 0xf5ff ) AM_READWRITE(orion128_romdisk_r,orion128_romdisk_w) |
| 22 | AM_RANGE( 0xf700, 0xf7ff ) AM_READWRITE(orion128_floppy_r,orion128_floppy_w) |
| 23 | AM_RANGE( 0xf800, 0xffff ) AM_ROM
|
| 24 | AM_RANGE( 0xf800, 0xf8ff ) AM_WRITE (orion128_video_mode_w)
|
| 25 | AM_RANGE( 0xf900, 0xf9ff ) AM_WRITE (orion128_memory_page_w)
|
| 26 | AM_RANGE( 0xfa00, 0xfaff ) AM_WRITE (orion128_video_page_w) |
| 27 | AM_RANGE( 0xfb00, 0xfbff ) AM_WRITE (orion128_dispatcher_w)
|
| 28 | ADDRESS_MAP_END
|
| 29 | |
| 30 | |
| 31 | static ADDRESS_MAP_START( orion128_io , ADDRESS_SPACE_IO, 8)
|
| 32 | ADDRESS_MAP_GLOBAL_MASK(0xff)
|
| 33 | ADDRESS_MAP_UNMAP_HIGH
|
| 34 | AM_RANGE( 0xf8, 0xf8) AM_WRITE ( orion128_video_mode_w )
|
| 35 | AM_RANGE( 0xf9, 0xf9) AM_WRITE ( orion128_memory_page_w )
|
| 36 | AM_RANGE( 0xfa, 0xfa) AM_WRITE ( orion128_memory_page_w )
|
| 37 | AM_RANGE( 0xfb, 0xfb) AM_WRITE ( orion128_dispatcher_w )
|
| 38 | ADDRESS_MAP_END
|
| 39 | |
| 40 | /* Input ports */
|
| 41 | INPUT_PORTS_START( orion128 )
|
| 42 | PORT_START /* line 0 */
|
| 43 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
|
| 44 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
|
| 45 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
|
| 46 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
|
| 47 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 48 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 49 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
|
| 50 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 51 | PORT_START /* line 1 */
|
| 52 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
|
| 53 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
|
| 54 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
|
| 55 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back") PORT_CODE(KEYCODE_BACKSPACE)
|
| 56 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 57 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 58 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
| 59 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 60 | PORT_START /* line 2 */
|
| 61 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
|
| 62 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
|
| 63 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 64 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 65 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 66 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 67 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
|
| 68 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
|
| 69 | PORT_START /* line 3 */
|
| 70 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 71 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 72 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS)
|
| 73 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_COLON)
|
| 74 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<") PORT_CODE(KEYCODE_COMMA) |
| 75 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 76 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP)
|
| 77 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH)
|
| 78 | PORT_START /* line 4 */
|
| 79 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE)
|
| 80 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 81 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
|
| 82 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
|
| 83 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 84 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 85 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 86 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 87 | PORT_START /* line 5 */
|
| 88 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 89 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
|
| 90 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
|
| 91 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 92 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 93 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 94 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 95 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 96 | PORT_START /* line 6 */
|
| 97 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
|
| 98 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
|
| 99 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 100 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 101 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 102 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 103 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 104 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
|
| 105 | PORT_START /* line 7 */
|
| 106 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
|
| 107 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
|
| 108 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 109 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
|
| 110 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 111 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 112 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE)
|
| 113 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 114 | PORT_START /* line 8 */
|
| 115 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 116 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 117 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 118 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 119 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 120 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 121 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 122 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL)
|
| 123 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL)
|
| 124 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT)
|
| 125 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_RALT)
|
| 126 | PORT_START /* port 9 */
|
| 127 | PORT_CONFNAME(0x01, 0x01, "ROM Disk")
|
| 128 | PORT_CONFSETTING(0x01, "Installed") |
| 129 | PORT_CONFSETTING(0x00, "Not installed") |
| 130 | PORT_CONFNAME(0x02, 0x02, "ROM Disk version")
|
| 131 | PORT_CONFSETTING(0x02, "Version 4")
|
| 132 | PORT_CONFSETTING(0x00, "Version 1")
|
| 133 | INPUT_PORTS_END
|
| 134 |
|
| 135 | /* Machine driver */
|
| 136 | static MACHINE_DRIVER_START( orion128 )
|
| 137 | MDRV_CPU_ADD(8080, 2000000)
|
| 138 | MDRV_CPU_PROGRAM_MAP(orion128_mem, 0) |
| 139 | MDRV_CPU_IO_MAP(orion128_io, 0)
|
| 140 | |
| 141 | MDRV_MACHINE_START( orion128 )
|
| 142 | MDRV_MACHINE_RESET( orion128 )
|
| 143 |
|
| 144 | /* video hardware */
|
| 145 | MDRV_SCREEN_ADD("main", RASTER)
|
| 146 | MDRV_SCREEN_REFRESH_RATE(50)
|
| 147 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 148 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 149 | MDRV_SCREEN_SIZE(384, 256)
|
| 150 | MDRV_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1)
|
| 151 | |
| 152 | MDRV_PALETTE_LENGTH(18)
|
| 153 | MDRV_PALETTE_INIT( orion128 )
|
| 154 | |
| 155 | |
| 156 | MDRV_VIDEO_START(orion128)
|
| 157 | MDRV_VIDEO_UPDATE(orion128)
|
| 158 | MACHINE_DRIVER_END
|
| 159 | |
| 160 | static void orion_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
|
| 161 | {
|
| 162 | /* floppy */
|
| 163 | switch(state)
|
| 164 | {
|
| 165 | /* --- the following bits of info are returned as 64-bit signed integers --- */
|
| 166 | case MESS_DEVINFO_INT_COUNT: info->i = 4; break;
|
| 167 | |
| 168 | /* --- the following bits of info are returned as pointers to data or functions --- */
|
| 169 | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(orion_floppy); break;
|
| 170 | |
| 171 | /* --- the following bits of info are returned as NULL-terminated strings --- */
|
| 172 | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "odi,img"); break;
|
| 173 | |
| 174 | default: legacybasicdsk_device_getinfo(devclass, state, info); break;
|
| 175 | }
|
| 176 | }
|
| 177 |
|
| 178 | SYSTEM_CONFIG_START(orion128)
|
| 179 | CONFIG_RAM_DEFAULT(256 * 1024)
|
| 180 | CONFIG_DEVICE(orion_floppy_getinfo);
|
| 181 | SYSTEM_CONFIG_END
|
| 182 |
|
| 183 | /* ROM definition */
|
| 184 | |
| 185 | ROM_START( orion128 )
|
| 186 | ROM_REGION( 0x30000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 187 | ROM_SYSTEM_BIOS(0,"ver 1","Version 1")
|
| 188 | ROMX_LOAD( "m2rk.bin", 0xf800, 0x0800, CRC(2025C234), ROM_BIOS(1))
|
| 189 | ROM_SYSTEM_BIOS(1,"ver 2","Version 2")
|
| 190 | ROMX_LOAD( "m2_2rk.bin", 0xf800, 0x0800, CRC(FC662351), ROM_BIOS(2)) |
| 191 | ROM_LOAD( "romdisk4.bin", 0x10000, 0xdb90, CRC(D4CB4C93)) |
| 192 | ROM_LOAD( "romdisk1.bin", 0x20000, 0xd800, CRC(61C22EEC))
|
| 193 | ROM_END
|
| 194 | |
| 195 | /* Driver */
|
| 196 |
|
| 197 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 198 | COMP( 1983, orion128, 0, 0, orion128, orion128, orion128, orion128, "", "Orion 128", 0)
|