src/mess/machine/special.c
| r2093 | r2094 | |
| 1 | | /***************************************************************************
|
| 2 | | |
| 3 | | Specialist machine driver by Miodrag Milanovic
|
| 4 | | |
| 5 | | 20/03/2008 Cassette support
|
| 6 | | 15/03/2008 Preliminary driver.
|
| 7 | |
|
| 8 | | ****************************************************************************/
|
| 9 | | |
| 10 | | |
| 11 | | #include "driver.h"
|
| 12 | | #include "cpu/i8085/i8085.h"
|
| 13 | | #include "sound/dac.h"
|
| 14 | | #include "devices/cassette.h"
|
| 15 | | #include "machine/8255ppi.h"
|
| 16 | | |
| 17 | | |
| 18 | | UINT8 specimx_color;
|
| 19 | | UINT8 *specimx_colorram;
|
| 20 | | |
| 21 | | static int specialist_8255_porta;
|
| 22 | | static int specialist_8255_portb;
|
| 23 | | static int specialist_8255_portc;
|
| 24 | | |
| 25 | | /* Driver initialization */
|
| 26 | | DRIVER_INIT(special)
|
| 27 | | {
|
| 28 | | /* set initialy ROM to be visible on first bank */
|
| 29 | | UINT8 *RAM = memory_region(REGION_CPU1);
|
| 30 | | memset(RAM,0x0000,0x3000); // make frist page empty by default
|
| 31 | | memory_configure_bank(1, 1, 2, RAM, 0x0000);
|
| 32 | | memory_configure_bank(1, 0, 2, RAM, 0xc000);
|
| 33 | | }
|
| 34 | | |
| 35 | | DRIVER_INIT(specimx)
|
| 36 | | {
|
| 37 | | memset(mess_ram,0,256*1024);
|
| 38 | | }
|
| 39 | | |
| 40 | | READ8_HANDLER (specialist_8255_porta_r )
|
| 41 | | {
|
| 42 | | if (readinputport(0)!=0xff) return 0xfe;
|
| 43 | | if (readinputport(1)!=0xff) return 0xfd;
|
| 44 | | if (readinputport(2)!=0xff) return 0xfb;
|
| 45 | | if (readinputport(3)!=0xff) return 0xf7;
|
| 46 | | if (readinputport(4)!=0xff) return 0xef;
|
| 47 | | if (readinputport(5)!=0xff) return 0xdf;
|
| 48 | | if (readinputport(6)!=0xff) return 0xbf;
|
| 49 | | if (readinputport(7)!=0xff) return 0x7f;
|
| 50 | | return 0xff;
|
| 51 | | }
|
| 52 | | |
| 53 | | READ8_HANDLER (specialist_8255_portb_r )
|
| 54 | | {
|
| 55 | |
|
| 56 | | int dat = 0;
|
| 57 | | double level;
|
| 58 | |
|
| 59 | | if ((specialist_8255_porta & 0x01)==0) dat ^= (readinputport(0) ^ 0xff);
|
| 60 | | if ((specialist_8255_porta & 0x02)==0) dat ^= (readinputport(1) ^ 0xff);
|
| 61 | | if ((specialist_8255_porta & 0x04)==0) dat ^= (readinputport(2) ^ 0xff);
|
| 62 | | if ((specialist_8255_porta & 0x08)==0) dat ^= (readinputport(3) ^ 0xff);
|
| 63 | | if ((specialist_8255_porta & 0x10)==0) dat ^= (readinputport(4) ^ 0xff);
|
| 64 | | if ((specialist_8255_porta & 0x20)==0) dat ^= (readinputport(5) ^ 0xff);
|
| 65 | | if ((specialist_8255_porta & 0x40)==0) dat ^= (readinputport(6) ^ 0xff);
|
| 66 | | if ((specialist_8255_porta & 0x80)==0) dat ^= (readinputport(7) ^ 0xff);
|
| 67 | | if ((specialist_8255_portc & 0x01)==0) dat ^= (readinputport(8) ^ 0xff);
|
| 68 | | if ((specialist_8255_portc & 0x02)==0) dat ^= (readinputport(9) ^ 0xff);
|
| 69 | | if ((specialist_8255_portc & 0x04)==0) dat ^= (readinputport(10) ^ 0xff);
|
| 70 | | if ((specialist_8255_portc & 0x08)==0) dat ^= (readinputport(11) ^ 0xff);
|
| 71 | |
|
| 72 | | dat = (dat << 2) ^0xff;
|
| 73 | | if (readinputport(12)!=0xff) dat ^= 0x02;
|
| 74 | | |
| 75 | | level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0));
|
| 76 | | if (level >= 0) { |
| 77 | | dat ^= 0x01;
|
| 78 | | } |
| 79 | | return dat & 0xff;
|
| 80 | | }
|
| 81 | | |
| 82 | | READ8_HANDLER (specialist_8255_portc_r )
|
| 83 | | {
|
| 84 | | if (readinputport(8)!=0xff) return 0x0e;
|
| 85 | | if (readinputport(9)!=0xff) return 0x0d;
|
| 86 | | if (readinputport(10)!=0xff) return 0x0b;
|
| 87 | | if (readinputport(11)!=0xff) return 0x07;
|
| 88 | | return 0x0f;
|
| 89 | | }
|
| 90 | | |
| 91 | | WRITE8_HANDLER (specialist_8255_porta_w )
|
| 92 | | {
|
| 93 | | specialist_8255_porta = data;
|
| 94 | | }
|
| 95 | | |
| 96 | | WRITE8_HANDLER (specialist_8255_portb_w )
|
| 97 | | {
|
| 98 | | specialist_8255_portb = data;
|
| 99 | | }
|
| 100 | | WRITE8_HANDLER (specialist_8255_portc_w )
|
| 101 | | { |
| 102 | | specialist_8255_portc = data;
|
| 103 | |
|
| 104 | | cassette_output(image_from_devtype_and_index(IO_CASSETTE, 0),data & 0x80 ? 1 : -1);
|
| 105 | | |
| 106 | | DAC_data_w(0,data & 0x20); //beeper
|
| 107 | |
|
| 108 | | }
|
| 109 | | |
| 110 | | static const ppi8255_interface specialist_ppi8255_interface =
|
| 111 | | {
|
| 112 | | 1,
|
| 113 | | {specialist_8255_porta_r},
|
| 114 | | {specialist_8255_portb_r},
|
| 115 | | {specialist_8255_portc_r},
|
| 116 | | {specialist_8255_porta_w},
|
| 117 | | {specialist_8255_portb_w},
|
| 118 | | {specialist_8255_portc_w}
|
| 119 | | };
|
| 120 | | |
| 121 | | static TIMER_CALLBACK( special_reset )
|
| 122 | | {
|
| 123 | | memory_set_bank(1, 0);
|
| 124 | | }
|
| 125 | | |
| 126 | | |
| 127 | | MACHINE_RESET( special )
|
| 128 | | {
|
| 129 | | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, special_reset);
|
| 130 | | memory_set_bank(1, 1);
|
| 131 | | |
| 132 | | ppi8255_init(&specialist_ppi8255_interface);
|
| 133 | | }
|
| 134 | | |
| 135 | | READ8_HANDLER( specialist_keyboard_r )
|
| 136 | | {
|
| 137 | | return ppi8255_0_r(machine, (offset & 3));
|
| 138 | | }
|
| 139 | | |
| 140 | | WRITE8_HANDLER( specialist_keyboard_w )
|
| 141 | | {
|
| 142 | | ppi8255_0_w(machine, (offset & 3) , data );
|
| 143 | | }
|
| 144 | | |
| 145 | | |
| 146 | | /*
|
| 147 | | Specialist MX
|
| 148 | | */
|
| 149 | | |
| 150 | | WRITE8_HANDLER( video_memory_w )
|
| 151 | | {
|
| 152 | | mess_ram[0x9000 + offset] = data;
|
| 153 | | specimx_colorram[offset] = specimx_color;
|
| 154 | | }
|
| 155 | | |
| 156 | | WRITE8_HANDLER (specimx_video_color_w )
|
| 157 | | { |
| 158 | | specimx_color = data;
|
| 159 | | }
|
| 160 | | |
| 161 | | READ8_HANDLER (specimx_video_color_r )
|
| 162 | | {
|
| 163 | | return specimx_color;
|
| 164 | | }
|
| 165 | | |
| 166 | | |
| 167 | | void specimx_set_bank(int i) {
|
| 168 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xffbf, 0, 0, SMH_BANK3);
|
| 169 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0xffc0, 0xffdf, 0, 0, SMH_BANK4);
|
| 170 | | memory_set_bankptr(4, mess_ram + 0xffc0);
|
| 171 | | switch(i) {
|
| 172 | | case 0 :
|
| 173 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x8fff, 0, 0, SMH_BANK1);
|
| 174 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0xbfff, 0, 0, video_memory_w);
|
| 175 | |
|
| 176 | | memory_set_bankptr(1, mess_ram);
|
| 177 | | memory_set_bankptr(2, mess_ram + 0x9000);
|
| 178 | | memory_set_bankptr(3, mess_ram + 0xc000); |
| 179 | | break;
|
| 180 | | case 1 :
|
| 181 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x8fff, 0, 0, SMH_BANK1);
|
| 182 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0xbfff, 0, 0, SMH_BANK2);
|
| 183 | |
|
| 184 | | memory_set_bankptr(1, mess_ram + 0x10000);
|
| 185 | | memory_set_bankptr(2, mess_ram + 0x19000);
|
| 186 | | memory_set_bankptr(3, mess_ram + 0x1c000); |
| 187 | | break;
|
| 188 | | case 2 :
|
| 189 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x8fff, 0, 0, SMH_UNMAP);
|
| 190 | | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0xbfff, 0, 0, SMH_UNMAP);
|
| 191 | |
|
| 192 | | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x10000);
|
| 193 | | memory_set_bankptr(2, memory_region(REGION_CPU1) + 0x19000);
|
| 194 | | memory_set_bankptr(3, mess_ram + 0xc000);
|
| 195 | | break;
|
| 196 | | }
|
| 197 | | }
|
| 198 | | WRITE8_HANDLER( specimx_select_bank )
|
| 199 | | {
|
| 200 | | specimx_set_bank(offset);
|
| 201 | | }
|
| 202 | | |
| 203 | | MACHINE_RESET( specimx )
|
| 204 | | {
|
| 205 | | ppi8255_init(&specialist_ppi8255_interface);
|
| 206 | | specimx_set_bank(2); // Initiali load ROM disk
|
| 207 | | specimx_color = 0x70;
|
| 208 | | }
|
| 209 | | |
| 210 | | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Specialist machine driver by Miodrag Milanovic |
| 4 | |
| 5 | 20/03/2008 Cassette support |
| 6 | 15/03/2008 Preliminary driver. |
| 7 | |
| 8 | ****************************************************************************/ |
| 9 | |
| 10 | |
| 11 | #include "driver.h" |
| 12 | #include "cpu/i8085/i8085.h" |
| 13 | #include "sound/dac.h" |
| 14 | #include "devices/cassette.h" |
| 15 | #include "machine/8255ppi.h" |
| 16 | |
| 17 | |
| 18 | UINT8 specimx_color; |
| 19 | UINT8 *specimx_colorram; |
| 20 | |
| 21 | static int specialist_8255_porta; |
| 22 | static int specialist_8255_portb; |
| 23 | static int specialist_8255_portc; |
| 24 | |
| 25 | /* Driver initialization */ |
| 26 | DRIVER_INIT(special) |
| 27 | { |
| 28 | /* set initialy ROM to be visible on first bank */ |
| 29 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 30 | memset(RAM,0x0000,0x3000); // make frist page empty by default |
| 31 | memory_configure_bank(1, 1, 2, RAM, 0x0000); |
| 32 | memory_configure_bank(1, 0, 2, RAM, 0xc000); |
| 33 | } |
| 34 | |
| 35 | DRIVER_INIT(specimx) |
| 36 | { |
| 37 | memset(mess_ram,0,256*1024); |
| 38 | } |
| 39 | |
| 40 | READ8_HANDLER (specialist_8255_porta_r ) |
| 41 | { |
| 42 | if (readinputport(0)!=0xff) return 0xfe; |
| 43 | if (readinputport(1)!=0xff) return 0xfd; |
| 44 | if (readinputport(2)!=0xff) return 0xfb; |
| 45 | if (readinputport(3)!=0xff) return 0xf7; |
| 46 | if (readinputport(4)!=0xff) return 0xef; |
| 47 | if (readinputport(5)!=0xff) return 0xdf; |
| 48 | if (readinputport(6)!=0xff) return 0xbf; |
| 49 | if (readinputport(7)!=0xff) return 0x7f; |
| 50 | return 0xff; |
| 51 | } |
| 52 | |
| 53 | READ8_HANDLER (specialist_8255_portb_r ) |
| 54 | { |
| 55 | |
| 56 | int dat = 0; |
| 57 | double level; |
| 58 | |
| 59 | if ((specialist_8255_porta & 0x01)==0) dat ^= (readinputport(0) ^ 0xff); |
| 60 | if ((specialist_8255_porta & 0x02)==0) dat ^= (readinputport(1) ^ 0xff); |
| 61 | if ((specialist_8255_porta & 0x04)==0) dat ^= (readinputport(2) ^ 0xff); |
| 62 | if ((specialist_8255_porta & 0x08)==0) dat ^= (readinputport(3) ^ 0xff); |
| 63 | if ((specialist_8255_porta & 0x10)==0) dat ^= (readinputport(4) ^ 0xff); |
| 64 | if ((specialist_8255_porta & 0x20)==0) dat ^= (readinputport(5) ^ 0xff); |
| 65 | if ((specialist_8255_porta & 0x40)==0) dat ^= (readinputport(6) ^ 0xff); |
| 66 | if ((specialist_8255_porta & 0x80)==0) dat ^= (readinputport(7) ^ 0xff); |
| 67 | if ((specialist_8255_portc & 0x01)==0) dat ^= (readinputport(8) ^ 0xff); |
| 68 | if ((specialist_8255_portc & 0x02)==0) dat ^= (readinputport(9) ^ 0xff); |
| 69 | if ((specialist_8255_portc & 0x04)==0) dat ^= (readinputport(10) ^ 0xff); |
| 70 | if ((specialist_8255_portc & 0x08)==0) dat ^= (readinputport(11) ^ 0xff); |
| 71 | |
| 72 | dat = (dat << 2) ^0xff; |
| 73 | if (readinputport(12)!=0xff) dat ^= 0x02; |
| 74 | |
| 75 | level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)); |
| 76 | if (level >= 0) { |
| 77 | dat ^= 0x01; |
| 78 | } |
| 79 | return dat & 0xff; |
| 80 | } |
| 81 | |
| 82 | READ8_HANDLER (specialist_8255_portc_r ) |
| 83 | { |
| 84 | if (readinputport(8)!=0xff) return 0x0e; |
| 85 | if (readinputport(9)!=0xff) return 0x0d; |
| 86 | if (readinputport(10)!=0xff) return 0x0b; |
| 87 | if (readinputport(11)!=0xff) return 0x07; |
| 88 | return 0x0f; |
| 89 | } |
| 90 | |
| 91 | WRITE8_HANDLER (specialist_8255_porta_w ) |
| 92 | { |
| 93 | specialist_8255_porta = data; |
| 94 | } |
| 95 | |
| 96 | WRITE8_HANDLER (specialist_8255_portb_w ) |
| 97 | { |
| 98 | specialist_8255_portb = data; |
| 99 | } |
| 100 | WRITE8_HANDLER (specialist_8255_portc_w ) |
| 101 | { |
| 102 | specialist_8255_portc = data; |
| 103 | |
| 104 | cassette_output(image_from_devtype_and_index(IO_CASSETTE, 0),data & 0x80 ? 1 : -1); |
| 105 | |
| 106 | DAC_data_w(0,data & 0x20); //beeper |
| 107 | |
| 108 | } |
| 109 | |
| 110 | static const ppi8255_interface specialist_ppi8255_interface = |
| 111 | { |
| 112 | 1, |
| 113 | {specialist_8255_porta_r}, |
| 114 | {specialist_8255_portb_r}, |
| 115 | {specialist_8255_portc_r}, |
| 116 | {specialist_8255_porta_w}, |
| 117 | {specialist_8255_portb_w}, |
| 118 | {specialist_8255_portc_w} |
| 119 | }; |
| 120 | |
| 121 | static TIMER_CALLBACK( special_reset ) |
| 122 | { |
| 123 | memory_set_bank(1, 0); |
| 124 | } |
| 125 | |
| 126 | |
| 127 | MACHINE_RESET( special ) |
| 128 | { |
| 129 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, special_reset); |
| 130 | memory_set_bank(1, 1); |
| 131 | |
| 132 | ppi8255_init(&specialist_ppi8255_interface); |
| 133 | } |
| 134 | |
| 135 | READ8_HANDLER( specialist_keyboard_r ) |
| 136 | { |
| 137 | return ppi8255_0_r(machine, (offset & 3)); |
| 138 | } |
| 139 | |
| 140 | WRITE8_HANDLER( specialist_keyboard_w ) |
| 141 | { |
| 142 | ppi8255_0_w(machine, (offset & 3) , data ); |
| 143 | } |
| 144 | |
| 145 | |
| 146 | /* |
| 147 | Specialist MX |
| 148 | */ |
| 149 | |
| 150 | WRITE8_HANDLER( video_memory_w ) |
| 151 | { |
| 152 | mess_ram[0x9000 + offset] = data; |
| 153 | specimx_colorram[offset] = specimx_color; |
| 154 | } |
| 155 | |
| 156 | WRITE8_HANDLER (specimx_video_color_w ) |
| 157 | { |
| 158 | specimx_color = data; |
| 159 | } |
| 160 | |
| 161 | READ8_HANDLER (specimx_video_color_r ) |
| 162 | { |
| 163 | return specimx_color; |
| 164 | } |
| 165 | |
| 166 | |
| 167 | void specimx_set_bank(int i) { |
| 168 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xffbf, 0, 0, SMH_BANK3); |
| 169 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0xffc0, 0xffdf, 0, 0, SMH_BANK4); |
| 170 | memory_set_bankptr(4, mess_ram + 0xffc0); |
| 171 | switch(i) { |
| 172 | case 0 : |
| 173 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x8fff, 0, 0, SMH_BANK1); |
| 174 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0xbfff, 0, 0, video_memory_w); |
| 175 | |
| 176 | memory_set_bankptr(1, mess_ram); |
| 177 | memory_set_bankptr(2, mess_ram + 0x9000); |
| 178 | memory_set_bankptr(3, mess_ram + 0xc000); |
| 179 | break; |
| 180 | case 1 : |
| 181 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x8fff, 0, 0, SMH_BANK1); |
| 182 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0xbfff, 0, 0, SMH_BANK2); |
| 183 | |
| 184 | memory_set_bankptr(1, mess_ram + 0x10000); |
| 185 | memory_set_bankptr(2, mess_ram + 0x19000); |
| 186 | memory_set_bankptr(3, mess_ram + 0x1c000); |
| 187 | break; |
| 188 | case 2 : |
| 189 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x8fff, 0, 0, SMH_UNMAP); |
| 190 | memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x9000, 0xbfff, 0, 0, SMH_UNMAP); |
| 191 | |
| 192 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x10000); |
| 193 | memory_set_bankptr(2, memory_region(REGION_CPU1) + 0x19000); |
| 194 | memory_set_bankptr(3, mess_ram + 0xc000); |
| 195 | break; |
| 196 | } |
| 197 | } |
| 198 | WRITE8_HANDLER( specimx_select_bank ) |
| 199 | { |
| 200 | specimx_set_bank(offset); |
| 201 | } |
| 202 | |
| 203 | MACHINE_RESET( specimx ) |
| 204 | { |
| 205 | ppi8255_init(&specialist_ppi8255_interface); |
| 206 | specimx_set_bank(2); // Initiali load ROM disk |
| 207 | specimx_color = 0x70; |
| 208 | } |
| 209 | |
| 210 | |
src/mess/drivers/orao.c
| r2093 | r2094 | |
| 1 | | /***************************************************************************
|
| 2 | | |
| 3 | | Orao driver by Miodrag Milanovic
|
| 4 | | |
| 5 | | 01/03/2008 Updated to work with latest SVN code
|
| 6 | | 23/02/2008 Sound support added.
|
| 7 | | 22/02/2008 Preliminary driver.
|
| 8 | | |
| 9 | | Driver is based on work of Josip Perusanec
|
| 10 | |
|
| 11 | | ****************************************************************************/
|
| 12 | | |
| 13 | | #include "driver.h"
|
| 14 | | #include "cpu/m6502/m6502.h"
|
| 15 | | #include "sound/dac.h"
|
| 16 | | #include "includes/orao.h"
|
| 17 | | #include "devices/cassette.h"
|
| 18 | | #include "formats/orao_cas.h"
|
| 19 | | |
| 20 | | /* Address maps */
|
| 21 | | static ADDRESS_MAP_START(orao_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 22 | | AM_RANGE( 0x0000, 0x5fff ) AM_RAM AM_BASE(&orao_memory)
|
| 23 | | AM_RANGE( 0x6000, 0x7fff ) AM_RAM // video ram
|
| 24 | | AM_RANGE( 0x8000, 0x9fff ) AM_READWRITE( orao_io_r, orao_io_w )
|
| 25 | | AM_RANGE( 0xa000, 0xafff ) AM_RAM // extension
|
| 26 | | AM_RANGE( 0xb000, 0xbfff ) AM_RAM // DOS
|
| 27 | | AM_RANGE( 0xc000, 0xdfff ) AM_ROM
|
| 28 | | AM_RANGE( 0xe000, 0xffff ) AM_ROM
|
| 29 | | ADDRESS_MAP_END
|
| 30 | | |
| 31 | | |
| 32 | | /* Input ports */
|
| 33 | | INPUT_PORTS_START( orao )
|
| 34 | | PORT_START /* line 0 */
|
| 35 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 36 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
| 37 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
| 38 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 39 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Righ") PORT_CODE(KEYCODE_RIGHT)
|
| 40 | | PORT_START /* line 1 */
|
| 41 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 42 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
|
| 43 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL)
|
| 44 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_RCONTROL)
|
| 45 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 46 | | PORT_START /* line 2 */
|
| 47 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 48 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
|
| 49 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
|
| 50 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3)
|
| 51 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 52 | | PORT_START /* line 3 */
|
| 53 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 54 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 55 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 56 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 57 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 58 | | PORT_START /* line 4 */
|
| 59 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 60 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 61 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 62 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 63 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 64 | | PORT_START /* line 5 */
|
| 65 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 66 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
|
| 67 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
|
| 68 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 69 | | PORT_START /* line 6 */
|
| 70 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 71 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 72 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
|
| 73 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 74 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 75 | | PORT_START /* line 7 */
|
| 76 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 77 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 78 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 79 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 80 | | PORT_START /* line 8 */
|
| 81 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 82 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 83 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
|
| 84 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
|
| 85 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 86 | | PORT_START /* line 9 */
|
| 87 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 88 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 89 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 90 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 91 | | PORT_START /* line 10 */
|
| 92 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 93 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 94 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
|
| 95 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 96 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 97 | | PORT_START /* line 11 */
|
| 98 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 99 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
|
| 100 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 101 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 102 | | PORT_START /* line 12 */
|
| 103 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 104 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 105 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 106 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 107 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 108 | | PORT_START /* line 13 */
|
| 109 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 110 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
|
| 111 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
|
| 112 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 113 | | PORT_START /* line 14 */
|
| 114 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 115 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 116 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 117 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 118 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 119 | | PORT_START /* line 15 */
|
| 120 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 121 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
|
| 122 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 123 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 124 | | PORT_START /* line 16 */
|
| 125 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ch") PORT_CODE(KEYCODE_COLON)
|
| 126 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cj") PORT_CODE(KEYCODE_QUOTE)
|
| 127 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Zh") PORT_CODE(KEYCODE_SLASH)
|
| 128 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_TILDE) |
| 129 | | PORT_START /* line 17 */
|
| 130 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 131 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_BACKSPACE)
|
| 132 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_BACKSLASH)
|
| 133 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 134 | | PORT_START /* line 18 */
|
| 135 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
|
| 136 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dj") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 137 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Sh") PORT_CODE(KEYCODE_OPENBRACE)
|
| 138 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_EQUALS) |
| 139 | | PORT_START /* line 19 */
|
| 140 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 141 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
|
| 142 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
|
| 143 | | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 144 | | |
| 145 | | INPUT_PORTS_END
|
| 146 | |
|
| 147 | | /* Machine driver */
|
| 148 | | static MACHINE_DRIVER_START( orao )
|
| 149 | | /* basic machine hardware */
|
| 150 | | MDRV_CPU_ADD_TAG("main", M6502, 1000000) |
| 151 | | MDRV_CPU_PROGRAM_MAP(orao_mem, 0)
|
| 152 | | MDRV_MACHINE_RESET( orao )
|
| 153 | |
|
| 154 | | /* video hardware */ |
| 155 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 156 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 157 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 158 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 159 | | MDRV_SCREEN_SIZE(256, 256)
|
| 160 | | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
|
| 161 | | MDRV_PALETTE_LENGTH(2)
|
| 162 | | MDRV_PALETTE_INIT(black_and_white)
|
| 163 | | |
| 164 | | MDRV_VIDEO_START(orao)
|
| 165 | | MDRV_VIDEO_UPDATE(orao)
|
| 166 | | |
| 167 | | /* audio hardware */
|
| 168 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 169 | | MDRV_SOUND_ADD(DAC, 0)
|
| 170 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.00)
|
| 171 | | MDRV_SOUND_ADD(WAVE, 0)
|
| 172 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 173 | | MACHINE_DRIVER_END
|
| 174 | |
|
| 175 | | /* ROM definition */
|
| 176 | | ROM_START( orao )
|
| 177 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 178 | | ROM_LOAD( "bas12.rom", 0xc000, 0x2000, CRC(42ae6f69) SHA1(b9d4a544fae13a9c492af027545178addd557111) )
|
| 179 | | ROM_LOAD( "crt12.rom", 0xe000, 0x2000, CRC(94ebdc94) SHA1(3959d717f96558823ccc806c842d2fb5ab0c3890) )
|
| 180 | | ROM_END
|
| 181 | | |
| 182 | | ROM_START( orao103 )
|
| 183 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 184 | | ROM_LOAD( "bas13.rom", 0xc000, 0x2000, CRC(35daf5da) SHA1(499c5a4bd930c26ec6226623c2793b4c7f771658) )
|
| 185 | | ROM_LOAD( "crt13.rom", 0xe000, 0x2000, CRC(e7076014) SHA1(0e213287b0b520440af6a2a6297788a9356818c2) ) |
| 186 | | ROM_END
|
| 187 | | |
| 188 | | static void orao_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
|
| 189 | | {
|
| 190 | | /* cassette */
|
| 191 | | switch(state)
|
| 192 | | {
|
| 193 | | /* --- the following bits of info are returned as 64-bit signed integers --- */
|
| 194 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break;
|
| 195 | | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
|
| 196 | | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)orao_cassette_formats; break;
|
| 197 | | |
| 198 | | default: cassette_device_getinfo(devclass, state, info); break;
|
| 199 | | }
|
| 200 | | }
|
| 201 | | |
| 202 | | SYSTEM_CONFIG_START(orao)
|
| 203 | | CONFIG_DEVICE(orao_cassette_getinfo)
|
| 204 | | SYSTEM_CONFIG_END
|
| 205 | | /* Driver */
|
| 206 | |
|
| 207 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 208 | | COMP( 1984, orao, 0, 0, orao, orao, orao, orao, "PEL Varazdin", "Orao 102", 0)
|
| 209 | | COMP( 1985, orao103, orao, 0, orao, orao, orao103, orao, "PEL Varazdin", "Orao 103", 0)
|
| 210 | | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Orao driver by Miodrag Milanovic |
| 4 | |
| 5 | 01/03/2008 Updated to work with latest SVN code |
| 6 | 23/02/2008 Sound support added. |
| 7 | 22/02/2008 Preliminary driver. |
| 8 | |
| 9 | Driver is based on work of Josip Perusanec |
| 10 | |
| 11 | ****************************************************************************/ |
| 12 | |
| 13 | #include "driver.h" |
| 14 | #include "cpu/m6502/m6502.h" |
| 15 | #include "sound/dac.h" |
| 16 | #include "includes/orao.h" |
| 17 | #include "devices/cassette.h" |
| 18 | #include "formats/orao_cas.h" |
| 19 | |
| 20 | /* Address maps */ |
| 21 | static ADDRESS_MAP_START(orao_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 22 | AM_RANGE( 0x0000, 0x5fff ) AM_RAM AM_BASE(&orao_memory) |
| 23 | AM_RANGE( 0x6000, 0x7fff ) AM_RAM // video ram |
| 24 | AM_RANGE( 0x8000, 0x9fff ) AM_READWRITE( orao_io_r, orao_io_w ) |
| 25 | AM_RANGE( 0xa000, 0xafff ) AM_RAM // extension |
| 26 | AM_RANGE( 0xb000, 0xbfff ) AM_RAM // DOS |
| 27 | AM_RANGE( 0xc000, 0xdfff ) AM_ROM |
| 28 | AM_RANGE( 0xe000, 0xffff ) AM_ROM |
| 29 | ADDRESS_MAP_END |
| 30 | |
| 31 | |
| 32 | /* Input ports */ |
| 33 | INPUT_PORTS_START( orao ) |
| 34 | PORT_START /* line 0 */ |
| 35 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 36 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 37 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 38 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 39 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Righ") PORT_CODE(KEYCODE_RIGHT) |
| 40 | PORT_START /* line 1 */ |
| 41 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 42 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 43 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) |
| 44 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_RCONTROL) |
| 45 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 46 | PORT_START /* line 2 */ |
| 47 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 48 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 49 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 50 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 51 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 52 | PORT_START /* line 3 */ |
| 53 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 54 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 55 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) |
| 56 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 57 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 58 | PORT_START /* line 4 */ |
| 59 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 60 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 61 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 62 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 63 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 64 | PORT_START /* line 5 */ |
| 65 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 66 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 67 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 68 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 69 | PORT_START /* line 6 */ |
| 70 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 71 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 72 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 73 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 74 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 75 | PORT_START /* line 7 */ |
| 76 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 77 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 78 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 79 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 80 | PORT_START /* line 8 */ |
| 81 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 82 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 83 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 84 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 85 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 86 | PORT_START /* line 9 */ |
| 87 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 88 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 89 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 90 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 91 | PORT_START /* line 10 */ |
| 92 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 93 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 94 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 95 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 96 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 97 | PORT_START /* line 11 */ |
| 98 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 99 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 100 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 101 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 102 | PORT_START /* line 12 */ |
| 103 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 104 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 105 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 106 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 107 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 108 | PORT_START /* line 13 */ |
| 109 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 110 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 111 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 112 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 113 | PORT_START /* line 14 */ |
| 114 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 115 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 116 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 117 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 118 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 119 | PORT_START /* line 15 */ |
| 120 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 121 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 122 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 123 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 124 | PORT_START /* line 16 */ |
| 125 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ch") PORT_CODE(KEYCODE_COLON) |
| 126 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cj") PORT_CODE(KEYCODE_QUOTE) |
| 127 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Zh") PORT_CODE(KEYCODE_SLASH) |
| 128 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_TILDE) |
| 129 | PORT_START /* line 17 */ |
| 130 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 131 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_BACKSPACE) |
| 132 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_BACKSLASH) |
| 133 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 134 | PORT_START /* line 18 */ |
| 135 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 136 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dj") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 137 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Sh") PORT_CODE(KEYCODE_OPENBRACE) |
| 138 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_EQUALS) |
| 139 | PORT_START /* line 19 */ |
| 140 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 141 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 142 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 143 | PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 144 | |
| 145 | INPUT_PORTS_END |
| 146 | |
| 147 | /* Machine driver */ |
| 148 | static MACHINE_DRIVER_START( orao ) |
| 149 | /* basic machine hardware */ |
| 150 | MDRV_CPU_ADD_TAG("main", M6502, 1000000) |
| 151 | MDRV_CPU_PROGRAM_MAP(orao_mem, 0) |
| 152 | MDRV_MACHINE_RESET( orao ) |
| 153 | |
| 154 | /* video hardware */ |
| 155 | MDRV_SCREEN_ADD("main", RASTER) |
| 156 | MDRV_SCREEN_REFRESH_RATE(50) |
| 157 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 158 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 159 | MDRV_SCREEN_SIZE(256, 256) |
| 160 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1) |
| 161 | MDRV_PALETTE_LENGTH(2) |
| 162 | MDRV_PALETTE_INIT(black_and_white) |
| 163 | |
| 164 | MDRV_VIDEO_START(orao) |
| 165 | MDRV_VIDEO_UPDATE(orao) |
| 166 | |
| 167 | /* audio hardware */ |
| 168 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 169 | MDRV_SOUND_ADD(DAC, 0) |
| 170 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.00) |
| 171 | MDRV_SOUND_ADD(WAVE, 0) |
| 172 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 173 | MACHINE_DRIVER_END |
| 174 | |
| 175 | /* ROM definition */ |
| 176 | ROM_START( orao ) |
| 177 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 178 | ROM_LOAD( "bas12.rom", 0xc000, 0x2000, CRC(42ae6f69) SHA1(b9d4a544fae13a9c492af027545178addd557111) ) |
| 179 | ROM_LOAD( "crt12.rom", 0xe000, 0x2000, CRC(94ebdc94) SHA1(3959d717f96558823ccc806c842d2fb5ab0c3890) ) |
| 180 | ROM_END |
| 181 | |
| 182 | ROM_START( orao103 ) |
| 183 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 184 | ROM_LOAD( "bas13.rom", 0xc000, 0x2000, CRC(35daf5da) SHA1(499c5a4bd930c26ec6226623c2793b4c7f771658) ) |
| 185 | ROM_LOAD( "crt13.rom", 0xe000, 0x2000, CRC(e7076014) SHA1(0e213287b0b520440af6a2a6297788a9356818c2) ) |
| 186 | ROM_END |
| 187 | |
| 188 | static void orao_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 189 | { |
| 190 | /* cassette */ |
| 191 | switch(state) |
| 192 | { |
| 193 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 194 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 195 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 196 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)orao_cassette_formats; break; |
| 197 | |
| 198 | default: cassette_device_getinfo(devclass, state, info); break; |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | SYSTEM_CONFIG_START(orao) |
| 203 | CONFIG_DEVICE(orao_cassette_getinfo) |
| 204 | SYSTEM_CONFIG_END |
| 205 | /* Driver */ |
| 206 | |
| 207 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 208 | COMP( 1984, orao, 0, 0, orao, orao, orao, orao, "PEL Varazdin", "Orao 102", 0) |
| 209 | COMP( 1985, orao103, orao, 0, orao, orao, orao103, orao, "PEL Varazdin", "Orao 103", 0) |
| 210 | |
src/mess/drivers/galeb.c
| r2093 | r2094 | |
| 1 | | /***************************************************************************
|
| 2 | | |
| 3 | | Galeb driver by Miodrag Milanovic
|
| 4 | | |
| 5 | | 01/03/2008 Updated to work with latest SVN code
|
| 6 | | 23/02/2008 Sound support added.
|
| 7 | | 22/02/2008 Preliminary driver.
|
| 8 | | |
| 9 | | Driver is based on work of Josip Perusanec
|
| 10 | |
|
| 11 | | ****************************************************************************/
|
| 12 | | |
| 13 | | |
| 14 | | #include "driver.h"
|
| 15 | | #include "cpu/m6502/m6502.h"
|
| 16 | | #include "sound/dac.h"
|
| 17 | | #include "includes/galeb.h"
|
| 18 | | |
| 19 | | GFXDECODE_START( galeb )
|
| 20 | | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, galeb_charlayout, 0, 1 )
|
| 21 | | GFXDECODE_END
|
| 22 | | |
| 23 | | /* Address maps */
|
| 24 | | static ADDRESS_MAP_START(galeb_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 25 | | AM_RANGE( 0x0000, 0x1fff ) AM_RAM // RAM
|
| 26 | | AM_RANGE( 0xbfe0, 0xbfe7 ) AM_READ ( galeb_keyboard_r ) |
| 27 | | AM_RANGE( 0xbfe0, 0xbfe0 ) AM_WRITE( galeb_speaker_w ) |
| 28 | | AM_RANGE( 0xb000, 0xb3ff ) AM_RAM // video ram |
| 29 | | AM_RANGE( 0xc000, 0xc7ff ) AM_ROM // BASIC 01 ROM
|
| 30 | | AM_RANGE( 0xc800, 0xcfff ) AM_ROM // BASIC 02 ROM
|
| 31 | | AM_RANGE( 0xd000, 0xd7ff ) AM_ROM // BASIC 03 ROM
|
| 32 | | AM_RANGE( 0xd800, 0xdfff ) AM_ROM // BASIC 04 ROM
|
| 33 | | AM_RANGE( 0xf000, 0xf7ff ) AM_ROM // Monitor ROM
|
| 34 | | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM
|
| 35 | | ADDRESS_MAP_END
|
| 36 | | |
| 37 | | /* Input ports */
|
| 38 | | INPUT_PORTS_START( galeb )
|
| 39 | | PORT_START /* line 0 */
|
| 40 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)
|
| 41 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 42 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
|
| 43 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC)
|
| 44 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 45 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL)
|
| 46 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_LCONTROL)
|
| 47 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GR") PORT_CODE(KEYCODE_LALT)
|
| 48 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GR") PORT_CODE(KEYCODE_RALT)
|
| 49 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 50 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 51 | | PORT_START /* line 1 */
|
| 52 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_TILDE)
|
| 53 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down - Up") PORT_CODE(KEYCODE_DOWN)
|
| 54 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_COLON)
|
| 55 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
|
| 56 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 57 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
|
| 58 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 59 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Z)
|
| 60 | | PORT_START /* line 2 */
|
| 61 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dj") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 62 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left - Right") PORT_CODE(KEYCODE_LEFT)
|
| 63 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_EQUALS)
|
| 64 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 65 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH)
|
| 66 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
|
| 67 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 68 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
|
| 69 | | PORT_START /* line 3 */
|
| 70 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Sh") PORT_CODE(KEYCODE_OPENBRACE)
|
| 71 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
|
| 72 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cj") PORT_CODE(KEYCODE_QUOTE)
|
| 73 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 74 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Zh") PORT_CODE(KEYCODE_BACKSLASH)
|
| 75 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 76 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 77 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
|
| 78 | | PORT_START /* line 4 */
|
| 79 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
|
| 80 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 81 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ch") PORT_CODE(KEYCODE_COLON)
|
| 82 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
|
| 83 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 84 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 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("V") PORT_CODE(KEYCODE_V)
|
| 87 | | PORT_START /* line 5 */
|
| 88 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 89 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 90 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 91 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
|
| 92 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
|
| 93 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 94 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 95 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
|
| 96 | | PORT_START /* line 6 */
|
| 97 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 98 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 99 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
|
| 100 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
|
| 101 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 102 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Y)
|
| 103 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 104 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 105 | | PORT_START /* line 7 */
|
| 106 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
|
| 107 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 108 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 109 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
|
| 110 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
|
| 111 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 112 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 113 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 114 | | INPUT_PORTS_END
|
| 115 | |
|
| 116 | | /* Machine driver */
|
| 117 | | static MACHINE_DRIVER_START( galeb )
|
| 118 | | /* basic machine hardware */
|
| 119 | | MDRV_CPU_ADD_TAG("main", M6502, 1000000) |
| 120 | | MDRV_CPU_PROGRAM_MAP(galeb_mem, 0) |
| 121 | | MDRV_MACHINE_RESET( galeb )
|
| 122 | |
|
| 123 | | /* video hardware */
|
| 124 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 125 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 126 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 127 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 128 | | MDRV_SCREEN_SIZE(48*8, 16*8)
|
| 129 | | MDRV_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 16*8-1)
|
| 130 | | MDRV_GFXDECODE( galeb )
|
| 131 | | |
| 132 | | MDRV_PALETTE_LENGTH(2)
|
| 133 | | MDRV_PALETTE_INIT(black_and_white)
|
| 134 | |
|
| 135 | | MDRV_VIDEO_START(galeb)
|
| 136 | | MDRV_VIDEO_UPDATE(galeb)
|
| 137 | | |
| 138 | | /* audio hardware */
|
| 139 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 140 | | MDRV_SOUND_ADD(DAC, 0)
|
| 141 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.00)
|
| 142 | | MACHINE_DRIVER_END
|
| 143 | |
|
| 144 | | /* ROM definition */
|
| 145 | | ROM_START( galeb )
|
| 146 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 147 | | ROM_LOAD( "bas01.rom", 0xc000, 0x0800, CRC(9b19ed58) SHA1(ebfc27af8dbabfb233f9888e6a0a0dfc87ae1691) )
|
| 148 | | ROM_LOAD( "bas02.rom", 0xc800, 0x0800, CRC(3f320a84) SHA1(4ea082b4269dca6152426b1f720c7508122d3cb7) )
|
| 149 | | ROM_LOAD( "bas03.rom", 0xd000, 0x0800, CRC(f122ad10) SHA1(3c7c1dd67268230d179a00b0f8b35be80c2b7035) )
|
| 150 | | ROM_LOAD( "bas04.rom", 0xd800, 0x0800, CRC(b5372a83) SHA1(f93b73d98b943c6791f46617418fb5e4238d75bd) )
|
| 151 | | ROM_LOAD( "exmd.rom", 0xf000, 0x0800, CRC(1bcb1375) SHA1(fda3361d238720a3d309644093da9832d5aff661) ) |
| 152 | | ROM_LOAD( "makbug.rom",0xf800, 0x0800, CRC(91e38e79) SHA1(2b6439a09a470cda9c81b9d453c6380b99716989) )
|
| 153 | | ROM_REGION(0x0800, REGION_GFX1,0)
|
| 154 | | ROM_LOAD ("chrgen.bin", 0x0000, 0x0800, CRC(409a800e) SHA1(0efe429dd6c0568032636e691d9865a623afeb55))
|
| 155 | | |
| 156 | | ROM_END
|
| 157 | | |
| 158 | | /* Driver */
|
| 159 | |
|
| 160 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 161 | | COMP( 1981, galeb, 0, 0, galeb, galeb, galeb, NULL, "PEL Varazdin", "Galeb", 0)
|
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Galeb driver by Miodrag Milanovic |
| 4 | |
| 5 | 01/03/2008 Updated to work with latest SVN code |
| 6 | 23/02/2008 Sound support added. |
| 7 | 22/02/2008 Preliminary driver. |
| 8 | |
| 9 | Driver is based on work of Josip Perusanec |
| 10 | |
| 11 | ****************************************************************************/ |
| 12 | |
| 13 | |
| 14 | #include "driver.h" |
| 15 | #include "cpu/m6502/m6502.h" |
| 16 | #include "sound/dac.h" |
| 17 | #include "includes/galeb.h" |
| 18 | |
| 19 | GFXDECODE_START( galeb ) |
| 20 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, galeb_charlayout, 0, 1 ) |
| 21 | GFXDECODE_END |
| 22 | |
| 23 | /* Address maps */ |
| 24 | static ADDRESS_MAP_START(galeb_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 25 | AM_RANGE( 0x0000, 0x1fff ) AM_RAM // RAM |
| 26 | AM_RANGE( 0xbfe0, 0xbfe7 ) AM_READ ( galeb_keyboard_r ) |
| 27 | AM_RANGE( 0xbfe0, 0xbfe0 ) AM_WRITE( galeb_speaker_w ) |
| 28 | AM_RANGE( 0xb000, 0xb3ff ) AM_RAM // video ram |
| 29 | AM_RANGE( 0xc000, 0xc7ff ) AM_ROM // BASIC 01 ROM |
| 30 | AM_RANGE( 0xc800, 0xcfff ) AM_ROM // BASIC 02 ROM |
| 31 | AM_RANGE( 0xd000, 0xd7ff ) AM_ROM // BASIC 03 ROM |
| 32 | AM_RANGE( 0xd800, 0xdfff ) AM_ROM // BASIC 04 ROM |
| 33 | AM_RANGE( 0xf000, 0xf7ff ) AM_ROM // Monitor ROM |
| 34 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM |
| 35 | ADDRESS_MAP_END |
| 36 | |
| 37 | /* Input ports */ |
| 38 | INPUT_PORTS_START( galeb ) |
| 39 | PORT_START /* line 0 */ |
| 40 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE) |
| 41 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 42 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 43 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) |
| 44 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 45 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_RCONTROL) |
| 46 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_LCONTROL) |
| 47 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GR") PORT_CODE(KEYCODE_LALT) |
| 48 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GR") PORT_CODE(KEYCODE_RALT) |
| 49 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 50 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) |
| 51 | PORT_START /* line 1 */ |
| 52 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_TILDE) |
| 53 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down - Up") PORT_CODE(KEYCODE_DOWN) |
| 54 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_COLON) |
| 55 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 56 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 57 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 58 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 59 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Z) |
| 60 | PORT_START /* line 2 */ |
| 61 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dj") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 62 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left - Right") PORT_CODE(KEYCODE_LEFT) |
| 63 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_EQUALS) |
| 64 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 65 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| 66 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 67 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 68 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 69 | PORT_START /* line 3 */ |
| 70 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Sh") PORT_CODE(KEYCODE_OPENBRACE) |
| 71 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 72 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Cj") PORT_CODE(KEYCODE_QUOTE) |
| 73 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 74 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Zh") PORT_CODE(KEYCODE_BACKSLASH) |
| 75 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 76 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 77 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 78 | PORT_START /* line 4 */ |
| 79 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 80 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 81 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ch") PORT_CODE(KEYCODE_COLON) |
| 82 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 83 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 84 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 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("V") PORT_CODE(KEYCODE_V) |
| 87 | PORT_START /* line 5 */ |
| 88 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 89 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 90 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 91 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 92 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 93 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 94 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 95 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 96 | PORT_START /* line 6 */ |
| 97 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 98 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 99 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 100 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 101 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 102 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Y) |
| 103 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 104 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 105 | PORT_START /* line 7 */ |
| 106 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 107 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 108 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 109 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 110 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 111 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 112 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 113 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 114 | INPUT_PORTS_END |
| 115 | |
| 116 | /* Machine driver */ |
| 117 | static MACHINE_DRIVER_START( galeb ) |
| 118 | /* basic machine hardware */ |
| 119 | MDRV_CPU_ADD_TAG("main", M6502, 1000000) |
| 120 | MDRV_CPU_PROGRAM_MAP(galeb_mem, 0) |
| 121 | MDRV_MACHINE_RESET( galeb ) |
| 122 | |
| 123 | /* video hardware */ |
| 124 | MDRV_SCREEN_ADD("main", RASTER) |
| 125 | MDRV_SCREEN_REFRESH_RATE(50) |
| 126 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 127 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 128 | MDRV_SCREEN_SIZE(48*8, 16*8) |
| 129 | MDRV_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 16*8-1) |
| 130 | MDRV_GFXDECODE( galeb ) |
| 131 | |
| 132 | MDRV_PALETTE_LENGTH(2) |
| 133 | MDRV_PALETTE_INIT(black_and_white) |
| 134 | |
| 135 | MDRV_VIDEO_START(galeb) |
| 136 | MDRV_VIDEO_UPDATE(galeb) |
| 137 | |
| 138 | /* audio hardware */ |
| 139 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 140 | MDRV_SOUND_ADD(DAC, 0) |
| 141 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.00) |
| 142 | MACHINE_DRIVER_END |
| 143 | |
| 144 | /* ROM definition */ |
| 145 | ROM_START( galeb ) |
| 146 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 147 | ROM_LOAD( "bas01.rom", 0xc000, 0x0800, CRC(9b19ed58) SHA1(ebfc27af8dbabfb233f9888e6a0a0dfc87ae1691) ) |
| 148 | ROM_LOAD( "bas02.rom", 0xc800, 0x0800, CRC(3f320a84) SHA1(4ea082b4269dca6152426b1f720c7508122d3cb7) ) |
| 149 | ROM_LOAD( "bas03.rom", 0xd000, 0x0800, CRC(f122ad10) SHA1(3c7c1dd67268230d179a00b0f8b35be80c2b7035) ) |
| 150 | ROM_LOAD( "bas04.rom", 0xd800, 0x0800, CRC(b5372a83) SHA1(f93b73d98b943c6791f46617418fb5e4238d75bd) ) |
| 151 | ROM_LOAD( "exmd.rom", 0xf000, 0x0800, CRC(1bcb1375) SHA1(fda3361d238720a3d309644093da9832d5aff661) ) |
| 152 | ROM_LOAD( "makbug.rom",0xf800, 0x0800, CRC(91e38e79) SHA1(2b6439a09a470cda9c81b9d453c6380b99716989) ) |
| 153 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 154 | ROM_LOAD ("chrgen.bin", 0x0000, 0x0800, CRC(409a800e) SHA1(0efe429dd6c0568032636e691d9865a623afeb55)) |
| 155 | |
| 156 | ROM_END |
| 157 | |
| 158 | /* Driver */ |
| 159 | |
| 160 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 161 | COMP( 1981, galeb, 0, 0, galeb, galeb, galeb, NULL, "PEL Varazdin", "Galeb", 0) |
src/mess/drivers/special.c
| r2093 | r2094 | |
| 1 | | /***************************************************************************
|
| 2 | | |
| 3 | | Specialist driver by Miodrag Milanovic
|
| 4 | | |
| 5 | | 20/03/2008 Cassette support
|
| 6 | | 15/03/2008 Preliminary driver.
|
| 7 | |
|
| 8 | | ****************************************************************************/
|
| 9 | | |
| 10 | | |
| 11 | | #include "driver.h"
|
| 12 | | #include "cpu/i8085/i8085.h"
|
| 13 | | #include "includes/special.h"
|
| 14 | | #include "machine/8255ppi.h"
|
| 15 | | #include "sound/dac.h"
|
| 16 | | #include "devices/cassette.h"
|
| 17 | | #include "formats/rk_cas.h"
|
| 18 | | |
| 19 | | /* Address maps */
|
| 20 | | static ADDRESS_MAP_START(specialist_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 21 | | AM_RANGE( 0x0000, 0x2fff ) AM_RAMBANK(1) // First bank
|
| 22 | | AM_RANGE( 0x3000, 0x8fff ) AM_RAM // RAM |
| 23 | | AM_RANGE( 0x9000, 0xbfff ) AM_RAM AM_BASE(&specialist_video_ram) // Video RAM
|
| 24 | | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM
|
| 25 | | AM_RANGE( 0xf000, 0xf700 ) AM_NOP
|
| 26 | | AM_RANGE( 0xf800, 0xffff ) AM_READWRITE(specialist_keyboard_r,specialist_keyboard_w) // 8255 for keyboard
|
| 27 | | ADDRESS_MAP_END
|
| 28 | | |
| 29 | | |
| 30 | | static ADDRESS_MAP_START(specimx_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 31 | | AM_RANGE( 0x0000, 0x8fff ) AM_READWRITE(SMH_BANK1, SMH_BANK1)
|
| 32 | | AM_RANGE( 0x9000, 0xbfff ) AM_READWRITE(SMH_BANK2, SMH_BANK2)
|
| 33 | | AM_RANGE( 0xc000, 0xffbf ) AM_READWRITE(SMH_BANK3, SMH_BANK3)
|
| 34 | | AM_RANGE( 0xffc0, 0xffdf ) AM_READWRITE(SMH_BANK4, SMH_BANK4)
|
| 35 | | AM_RANGE( 0xffe0, 0xffe3 ) AM_READWRITE(specialist_keyboard_r,specialist_keyboard_w) // 8255 for keyboard
|
| 36 | | AM_RANGE( 0xffe4, 0xffe7 ) AM_RAM //external 8255
|
| 37 | | AM_RANGE( 0xfff8, 0xfff8 ) AM_READWRITE(specimx_video_color_r,specimx_video_color_w) |
| 38 | | AM_RANGE( 0xfffc, 0xfffe ) AM_WRITE(specimx_select_bank)
|
| 39 | | ADDRESS_MAP_END
|
| 40 | | |
| 41 | | /* Input ports */
|
| 42 | | INPUT_PORTS_START( special )
|
| 43 | | PORT_START /* line 0 */
|
| 44 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
|
| 45 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)
|
| 46 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 47 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON)
|
| 48 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 49 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 50 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 51 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 52 | | PORT_START /* line 1 */
|
| 53 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
|
| 54 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_SLASH)
|
| 55 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_BACKSLASH)
|
| 56 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 57 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 58 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) |
| 59 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 60 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 61 | | PORT_START /* line 2 */
|
| 62 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
| 63 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
|
| 64 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 65 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 66 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 67 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) |
| 68 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 69 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 70 | | PORT_START /* line 3 */
|
| 71 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12)
|
| 72 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE)
|
| 73 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 74 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 75 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 76 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) |
| 77 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 78 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 79 | | PORT_START /* line 4 */
|
| 80 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
| 81 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
|
| 82 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 83 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
|
| 84 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 85 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) |
| 86 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 87 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 88 | | |
| 89 | | PORT_START /* line 5 */
|
| 90 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 91 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
|
| 92 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 93 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 94 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 95 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) |
| 96 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 97 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 98 | | PORT_START /* line 6 */
|
| 99 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
|
| 100 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 101 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 102 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 103 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 104 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6)
|
| 105 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 106 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 107 | | PORT_START /* line 7 */
|
| 108 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
|
| 109 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
|
| 110 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
|
| 111 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 112 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 113 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 114 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 115 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 116 | | PORT_START /* line 8 */
|
| 117 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 118 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
|
| 119 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 120 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 121 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 122 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 123 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 124 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 125 | | PORT_START /* line 9 */
|
| 126 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
| 127 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 128 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
|
| 129 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 130 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 131 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 132 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 133 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 134 | | PORT_START /* line 10 */
|
| 135 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
|
| 136 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS)
|
| 137 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
|
| 138 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
|
| 139 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 140 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 141 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 142 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 143 | | PORT_START /* line 11 */
|
| 144 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT)
|
| 145 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT)
|
| 146 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
|
| 147 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 148 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
|
| 149 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_TILDE) |
| 150 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 151 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 152 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 153 | | PORT_START /* line 12 */
|
| 154 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 155 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 156 | | PORT_BIT(0xFE, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 157 | | INPUT_PORTS_END
|
| 158 | |
|
| 159 | | INPUT_PORTS_START( specimx )
|
| 160 | | PORT_START /* line 0 */
|
| 161 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
|
| 162 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)
|
| 163 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 164 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON)
|
| 165 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 166 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 167 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 168 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 169 | | PORT_START /* line 1 */
|
| 170 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
|
| 171 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH)
|
| 172 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
|
| 173 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 174 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 175 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) |
| 176 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 177 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 178 | | PORT_START /* line 2 */
|
| 179 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
| 180 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
|
| 181 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 182 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 183 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 184 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) |
| 185 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 186 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 187 | | PORT_START /* line 3 */
|
| 188 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
|
| 189 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE)
|
| 190 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 191 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 192 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 193 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) |
| 194 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 195 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 196 | | PORT_START /* line 4 */
|
| 197 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
| 198 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
|
| 199 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 200 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
|
| 201 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 202 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) |
| 203 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 204 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 205 | | |
| 206 | | PORT_START /* line 5 */
|
| 207 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 208 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
|
| 209 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 210 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 211 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 212 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 213 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 214 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 215 | | PORT_START /* line 6 */
|
| 216 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 217 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 218 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 219 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 220 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 221 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4)
|
| 222 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 223 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 224 | | PORT_START /* line 7 */
|
| 225 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 226 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
|
| 227 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
|
| 228 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 229 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 230 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 231 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 232 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 233 | | PORT_START /* line 8 */
|
| 234 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 235 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
|
| 236 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 237 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 238 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 239 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 240 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 241 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 242 | | PORT_START /* line 9 */
|
| 243 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
| 244 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 245 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
|
| 246 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 247 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 248 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 249 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 250 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 251 | | PORT_START /* line 10 */
|
| 252 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
|
| 253 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS)
|
| 254 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
|
| 255 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
|
| 256 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 257 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) |
| 258 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 259 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 260 | | PORT_START /* line 11 */
|
| 261 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT)
|
| 262 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT)
|
| 263 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
|
| 264 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 265 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
|
| 266 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_TILDE) |
| 267 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 268 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 269 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 270 | | PORT_START /* line 12 */
|
| 271 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 272 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 273 | | PORT_BIT(0xFE, IP_ACTIVE_LOW, IPT_UNUSED)
|
| 274 | | INPUT_PORTS_END
|
| 275 | | |
| 276 | | /* Machine driver */
|
| 277 | | static MACHINE_DRIVER_START( special )
|
| 278 | | /* basic machine hardware */
|
| 279 | | MDRV_CPU_ADD(8080, 2000000)
|
| 280 | | MDRV_CPU_PROGRAM_MAP(specialist_mem, 0) |
| 281 | | MDRV_MACHINE_RESET( special )
|
| 282 | |
|
| 283 | | /* video hardware */
|
| 284 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 285 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 286 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 287 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 288 | | MDRV_SCREEN_SIZE(384, 256)
|
| 289 | | MDRV_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1)
|
| 290 | | MDRV_PALETTE_LENGTH(2)
|
| 291 | | MDRV_PALETTE_INIT(black_and_white)
|
| 292 | | |
| 293 | | MDRV_VIDEO_START(special)
|
| 294 | | MDRV_VIDEO_UPDATE(special)
|
| 295 | | |
| 296 | | /* audio hardware */
|
| 297 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 298 | | MDRV_SOUND_ADD(DAC, 0)
|
| 299 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
| 300 | | MDRV_SOUND_ADD(WAVE, 0)
|
| 301 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 302 | | MACHINE_DRIVER_END
|
| 303 | | |
| 304 | | |
| 305 | | static MACHINE_DRIVER_START( specimx )
|
| 306 | | MDRV_CPU_ADD(8080, 2000000)
|
| 307 | | MDRV_CPU_PROGRAM_MAP(specimx_mem, 0)
|
| 308 | | MDRV_MACHINE_RESET( specimx )
|
| 309 | |
|
| 310 | | /* video hardware */
|
| 311 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 312 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 313 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 314 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 315 | | MDRV_SCREEN_SIZE(384, 256)
|
| 316 | | MDRV_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1)
|
| 317 | | MDRV_PALETTE_LENGTH(16)
|
| 318 | | MDRV_PALETTE_INIT( specimx )
|
| 319 | | |
| 320 | | MDRV_VIDEO_START(specimx)
|
| 321 | | MDRV_VIDEO_UPDATE(specimx)
|
| 322 | | |
| 323 | | /* audio hardware */
|
| 324 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 325 | | MDRV_SOUND_ADD(DAC, 0)
|
| 326 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
| 327 | | MDRV_SOUND_ADD(WAVE, 0)
|
| 328 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 329 | | MACHINE_DRIVER_END
|
| 330 | |
|
| 331 | | /* ROM definition */
|
| 332 | | ROM_START( special )
|
| 333 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 334 | | ROM_SYSTEM_BIOS(0, "1st", "1st rev.")
|
| 335 | | ROMX_LOAD( "special1.rom", 0xc000, 0x1000, CRC(217414BD) SHA1(345cd1410fbca8f75421d12d1419f27f81cd35d6), ROM_BIOS(1))
|
| 336 | | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.")
|
| 337 | | ROMX_LOAD( "special2.rom", 0xc000, 0x1000, CRC(FEDFBC37) SHA1(b79474833bbf558c39493dec3e8eabf9885c7c7c), ROM_BIOS(2))
|
| 338 | | ROM_SYSTEM_BIOS(2, "3rd", "3rd rev.")
|
| 339 | | ROMX_LOAD( "special3.rom", 0xc000, 0x1400, CRC(85F08629) SHA1(69b00b897a32087133076886d0d9d83ed5944469), ROM_BIOS(3))
|
| 340 | | ROM_SYSTEM_BIOS(3, "7th", "7th rev.") |
| 341 | | ROMX_LOAD( "special7.rom", 0xc000, 0x2000, CRC(FBE3438A) SHA1(83ca8f77f908d1c2f5c486c27d587d738bdde922), ROM_BIOS(4))
|
| 342 | | ROM_END
|
| 343 | | |
| 344 | | ROM_START( lik )
|
| 345 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 346 | | ROM_SYSTEM_BIOS(0, "1st", "1st rev.")
|
| 347 | | ROMX_LOAD( "lik.rom", 0xc000, 0x3000, CRC(705BB3A0) SHA1(f90b009ec9d3303bbda228714dd24de057e744b6), ROM_BIOS(1))
|
| 348 | | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.")
|
| 349 | | ROMX_LOAD( "lik2.rom", 0xc000, 0x3000, CRC(71820E43) SHA1(a85b4fc33b1ea96a1b8fe0c791f1aab8e967bb44), ROM_BIOS(2))
|
| 350 | | ROM_END
|
| 351 | | |
| 352 | | ROM_START( specimx )
|
| 353 | | ROM_REGION( 0x1b800, REGION_CPU1, ROMREGION_ERASEFF )
|
| 354 | | ROM_LOAD( "specimx.rom", 0x10000, 0xb800, CRC(DB68F9B1) SHA1(c79888449f8a605267ec3e10dcc8e6e6f43b3a95))
|
| 355 | | ROM_END
|
| 356 | | |
| 357 | | static void special_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
|
| 358 | | {
|
| 359 | | /* cassette */
|
| 360 | | switch(state)
|
| 361 | | {
|
| 362 | | /* --- the following bits of info are returned as 64-bit signed integers --- */
|
| 363 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break;
|
| 364 | | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
|
| 365 | | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rks_cassette_formats; break;
|
| 366 | | |
| 367 | | default: cassette_device_getinfo(devclass, state, info); break;
|
| 368 | | }
|
| 369 | | }
|
| 370 | | |
| 371 | | SYSTEM_CONFIG_START(special)
|
| 372 | | CONFIG_DEVICE(special_cassette_getinfo)
|
| 373 | | SYSTEM_CONFIG_END
|
| 374 | |
|
| 375 | | SYSTEM_CONFIG_START(specimx)
|
| 376 | | CONFIG_RAM_DEFAULT(256 * 1024)
|
| 377 | | CONFIG_DEVICE(special_cassette_getinfo)
|
| 378 | | SYSTEM_CONFIG_END
|
| 379 | | |
| 380 | | /* Driver */
|
| 381 | |
|
| 382 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 383 | | COMP( 1985, special, 0, 0, special, special, special, special, "", "Specialist", 0)
|
| 384 | | COMP( 1985, lik, special,0, special, special, special, special, "", "Lik", 0)
|
| 385 | | COMP( 1985, specimx, special,0, specimx, specimx, specimx, specimx, "", "Specialist MX", 0)
|
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Specialist driver by Miodrag Milanovic |
| 4 | |
| 5 | 20/03/2008 Cassette support |
| 6 | 15/03/2008 Preliminary driver. |
| 7 | |
| 8 | ****************************************************************************/ |
| 9 | |
| 10 | |
| 11 | #include "driver.h" |
| 12 | #include "cpu/i8085/i8085.h" |
| 13 | #include "includes/special.h" |
| 14 | #include "machine/8255ppi.h" |
| 15 | #include "sound/dac.h" |
| 16 | #include "devices/cassette.h" |
| 17 | #include "formats/rk_cas.h" |
| 18 | |
| 19 | /* Address maps */ |
| 20 | static ADDRESS_MAP_START(specialist_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 21 | AM_RANGE( 0x0000, 0x2fff ) AM_RAMBANK(1) // First bank |
| 22 | AM_RANGE( 0x3000, 0x8fff ) AM_RAM // RAM |
| 23 | AM_RANGE( 0x9000, 0xbfff ) AM_RAM AM_BASE(&specialist_video_ram) // Video RAM |
| 24 | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM |
| 25 | AM_RANGE( 0xf000, 0xf700 ) AM_NOP |
| 26 | AM_RANGE( 0xf800, 0xffff ) AM_READWRITE(specialist_keyboard_r,specialist_keyboard_w) // 8255 for keyboard |
| 27 | ADDRESS_MAP_END |
| 28 | |
| 29 | |
| 30 | static ADDRESS_MAP_START(specimx_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 31 | AM_RANGE( 0x0000, 0x8fff ) AM_READWRITE(SMH_BANK1, SMH_BANK1) |
| 32 | AM_RANGE( 0x9000, 0xbfff ) AM_READWRITE(SMH_BANK2, SMH_BANK2) |
| 33 | AM_RANGE( 0xc000, 0xffbf ) AM_READWRITE(SMH_BANK3, SMH_BANK3) |
| 34 | AM_RANGE( 0xffc0, 0xffdf ) AM_READWRITE(SMH_BANK4, SMH_BANK4) |
| 35 | AM_RANGE( 0xffe0, 0xffe3 ) AM_READWRITE(specialist_keyboard_r,specialist_keyboard_w) // 8255 for keyboard |
| 36 | AM_RANGE( 0xffe4, 0xffe7 ) AM_RAM //external 8255 |
| 37 | AM_RANGE( 0xfff8, 0xfff8 ) AM_READWRITE(specimx_video_color_r,specimx_video_color_w) |
| 38 | AM_RANGE( 0xfffc, 0xfffe ) AM_WRITE(specimx_select_bank) |
| 39 | ADDRESS_MAP_END |
| 40 | |
| 41 | /* Input ports */ |
| 42 | INPUT_PORTS_START( special ) |
| 43 | PORT_START /* line 0 */ |
| 44 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 45 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE) |
| 46 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 47 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 48 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 49 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 50 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 51 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 52 | PORT_START /* line 1 */ |
| 53 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END) |
| 54 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_SLASH) |
| 55 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_BACKSLASH) |
| 56 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 57 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 58 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) |
| 59 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 60 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 61 | PORT_START /* line 2 */ |
| 62 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 63 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 64 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 65 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 66 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 67 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) |
| 68 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 69 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 70 | PORT_START /* line 3 */ |
| 71 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12) |
| 72 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE) |
| 73 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 74 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 75 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 76 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) |
| 77 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 78 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 79 | PORT_START /* line 4 */ |
| 80 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 81 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 82 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 83 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 84 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 85 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) |
| 86 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 87 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 88 | |
| 89 | PORT_START /* line 5 */ |
| 90 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 91 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 92 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 93 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 94 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 95 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) |
| 96 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 97 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 98 | PORT_START /* line 6 */ |
| 99 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 100 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 101 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 102 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 103 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 104 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) |
| 105 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 106 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 107 | PORT_START /* line 7 */ |
| 108 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) |
| 109 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 110 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 111 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 112 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 113 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 114 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 115 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 116 | PORT_START /* line 8 */ |
| 117 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 118 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 119 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 120 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 121 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 122 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 123 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 124 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 125 | PORT_START /* line 9 */ |
| 126 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 127 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 128 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 129 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 130 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 131 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 132 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 133 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 134 | PORT_START /* line 10 */ |
| 135 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 136 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) |
| 137 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 138 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 139 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 140 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 141 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 142 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 143 | PORT_START /* line 11 */ |
| 144 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT) |
| 145 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT) |
| 146 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 147 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 148 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 149 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_TILDE) |
| 150 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 151 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 152 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 153 | PORT_START /* line 12 */ |
| 154 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) |
| 155 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 156 | PORT_BIT(0xFE, IP_ACTIVE_LOW, IPT_UNUSED) |
| 157 | INPUT_PORTS_END |
| 158 | |
| 159 | INPUT_PORTS_START( specimx ) |
| 160 | PORT_START /* line 0 */ |
| 161 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 162 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE) |
| 163 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 164 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 165 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 166 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 167 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 168 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 169 | PORT_START /* line 1 */ |
| 170 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END) |
| 171 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| 172 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 173 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 174 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 175 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) |
| 176 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 177 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 178 | PORT_START /* line 2 */ |
| 179 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 180 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 181 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 182 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 183 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 184 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) |
| 185 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 186 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 187 | PORT_START /* line 3 */ |
| 188 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) |
| 189 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE) |
| 190 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 191 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 192 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 193 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) |
| 194 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 195 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 196 | PORT_START /* line 4 */ |
| 197 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 198 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 199 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 200 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 201 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 202 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) |
| 203 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 204 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 205 | |
| 206 | PORT_START /* line 5 */ |
| 207 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 208 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 209 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 210 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 211 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 212 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 213 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 214 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 215 | PORT_START /* line 6 */ |
| 216 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 217 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 218 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 219 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 220 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 221 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 222 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 223 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 224 | PORT_START /* line 7 */ |
| 225 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 226 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 227 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 228 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 229 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 230 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 231 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 232 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 233 | PORT_START /* line 8 */ |
| 234 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 235 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 236 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 237 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 238 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 239 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 240 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 241 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 242 | PORT_START /* line 9 */ |
| 243 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 244 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 245 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 246 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 247 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 248 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 249 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 250 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 251 | PORT_START /* line 10 */ |
| 252 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 253 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) |
| 254 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 255 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 256 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 257 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10") PORT_CODE(KEYCODE_F10) |
| 258 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 259 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 260 | PORT_START /* line 11 */ |
| 261 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT) |
| 262 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT) |
| 263 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 264 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 265 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 266 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_TILDE) |
| 267 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 268 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) |
| 269 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 270 | PORT_START /* line 12 */ |
| 271 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) |
| 272 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 273 | PORT_BIT(0xFE, IP_ACTIVE_LOW, IPT_UNUSED) |
| 274 | INPUT_PORTS_END |
| 275 | |
| 276 | /* Machine driver */ |
| 277 | static MACHINE_DRIVER_START( special ) |
| 278 | /* basic machine hardware */ |
| 279 | MDRV_CPU_ADD(8080, 2000000) |
| 280 | MDRV_CPU_PROGRAM_MAP(specialist_mem, 0) |
| 281 | MDRV_MACHINE_RESET( special ) |
| 282 | |
| 283 | /* video hardware */ |
| 284 | MDRV_SCREEN_ADD("main", RASTER) |
| 285 | MDRV_SCREEN_REFRESH_RATE(50) |
| 286 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 287 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 288 | MDRV_SCREEN_SIZE(384, 256) |
| 289 | MDRV_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1) |
| 290 | MDRV_PALETTE_LENGTH(2) |
| 291 | MDRV_PALETTE_INIT(black_and_white) |
| 292 | |
| 293 | MDRV_VIDEO_START(special) |
| 294 | MDRV_VIDEO_UPDATE(special) |
| 295 | |
| 296 | /* audio hardware */ |
| 297 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 298 | MDRV_SOUND_ADD(DAC, 0) |
| 299 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 300 | MDRV_SOUND_ADD(WAVE, 0) |
| 301 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 302 | MACHINE_DRIVER_END |
| 303 | |
| 304 | |
| 305 | static MACHINE_DRIVER_START( specimx ) |
| 306 | MDRV_CPU_ADD(8080, 2000000) |
| 307 | MDRV_CPU_PROGRAM_MAP(specimx_mem, 0) |
| 308 | MDRV_MACHINE_RESET( specimx ) |
| 309 | |
| 310 | /* video hardware */ |
| 311 | MDRV_SCREEN_ADD("main", RASTER) |
| 312 | MDRV_SCREEN_REFRESH_RATE(50) |
| 313 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 314 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 315 | MDRV_SCREEN_SIZE(384, 256) |
| 316 | MDRV_SCREEN_VISIBLE_AREA(0, 384-1, 0, 256-1) |
| 317 | MDRV_PALETTE_LENGTH(16) |
| 318 | MDRV_PALETTE_INIT( specimx ) |
| 319 | |
| 320 | MDRV_VIDEO_START(specimx) |
| 321 | MDRV_VIDEO_UPDATE(specimx) |
| 322 | |
| 323 | /* audio hardware */ |
| 324 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 325 | MDRV_SOUND_ADD(DAC, 0) |
| 326 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 327 | MDRV_SOUND_ADD(WAVE, 0) |
| 328 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 329 | MACHINE_DRIVER_END |
| 330 | |
| 331 | /* ROM definition */ |
| 332 | ROM_START( special ) |
| 333 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 334 | ROM_SYSTEM_BIOS(0, "1st", "1st rev.") |
| 335 | ROMX_LOAD( "special1.rom", 0xc000, 0x1000, CRC(217414BD) SHA1(345cd1410fbca8f75421d12d1419f27f81cd35d6), ROM_BIOS(1)) |
| 336 | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.") |
| 337 | ROMX_LOAD( "special2.rom", 0xc000, 0x1000, CRC(FEDFBC37) SHA1(b79474833bbf558c39493dec3e8eabf9885c7c7c), ROM_BIOS(2)) |
| 338 | ROM_SYSTEM_BIOS(2, "3rd", "3rd rev.") |
| 339 | ROMX_LOAD( "special3.rom", 0xc000, 0x1400, CRC(85F08629) SHA1(69b00b897a32087133076886d0d9d83ed5944469), ROM_BIOS(3)) |
| 340 | ROM_SYSTEM_BIOS(3, "7th", "7th rev.") |
| 341 | ROMX_LOAD( "special7.rom", 0xc000, 0x2000, CRC(FBE3438A) SHA1(83ca8f77f908d1c2f5c486c27d587d738bdde922), ROM_BIOS(4)) |
| 342 | ROM_END |
| 343 | |
| 344 | ROM_START( lik ) |
| 345 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 346 | ROM_SYSTEM_BIOS(0, "1st", "1st rev.") |
| 347 | ROMX_LOAD( "lik.rom", 0xc000, 0x3000, CRC(705BB3A0) SHA1(f90b009ec9d3303bbda228714dd24de057e744b6), ROM_BIOS(1)) |
| 348 | ROM_SYSTEM_BIOS(1, "2nd", "2nd rev.") |
| 349 | ROMX_LOAD( "lik2.rom", 0xc000, 0x3000, CRC(71820E43) SHA1(a85b4fc33b1ea96a1b8fe0c791f1aab8e967bb44), ROM_BIOS(2)) |
| 350 | ROM_END |
| 351 | |
| 352 | ROM_START( specimx ) |
| 353 | ROM_REGION( 0x1b800, REGION_CPU1, ROMREGION_ERASEFF ) |
| 354 | ROM_LOAD( "specimx.rom", 0x10000, 0xb800, CRC(DB68F9B1) SHA1(c79888449f8a605267ec3e10dcc8e6e6f43b3a95)) |
| 355 | ROM_END |
| 356 | |
| 357 | static void special_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 358 | { |
| 359 | /* cassette */ |
| 360 | switch(state) |
| 361 | { |
| 362 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 363 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 364 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 365 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rks_cassette_formats; break; |
| 366 | |
| 367 | default: cassette_device_getinfo(devclass, state, info); break; |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | SYSTEM_CONFIG_START(special) |
| 372 | CONFIG_DEVICE(special_cassette_getinfo) |
| 373 | SYSTEM_CONFIG_END |
| 374 | |
| 375 | SYSTEM_CONFIG_START(specimx) |
| 376 | CONFIG_RAM_DEFAULT(256 * 1024) |
| 377 | CONFIG_DEVICE(special_cassette_getinfo) |
| 378 | SYSTEM_CONFIG_END |
| 379 | |
| 380 | /* Driver */ |
| 381 | |
| 382 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 383 | COMP( 1985, special, 0, 0, special, special, special, special, "", "Specialist", 0) |
| 384 | COMP( 1985, lik, special,0, special, special, special, special, "", "Lik", 0) |
| 385 | COMP( 1985, specimx, special,0, specimx, specimx, specimx, specimx, "", "Specialist MX", 0) |
src/mess/drivers/mikro80.c
| r2093 | r2094 | |
| 1 | | /***************************************************************************
|
| 2 | | |
| 3 | | MIKRO80 driver by Miodrag Milanovic
|
| 4 | | |
| 5 | | 10/03/2008 Preliminary driver.
|
| 6 | |
|
| 7 | | ****************************************************************************/
|
| 8 | | |
| 9 | | |
| 10 | | #include "driver.h"
|
| 11 | | #include "cpu/i8085/i8085.h"
|
| 12 | | #include "includes/mikro80.h"
|
| 13 | | #include "devices/cassette.h"
|
| 14 | | #include "formats/rk_cas.h"
|
| 15 | | |
| 16 | | |
| 17 | | GFXDECODE_START( mikro80 )
|
| 18 | | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, mikro80_charlayout, 0, 1 )
|
| 19 | | GFXDECODE_END
|
| 20 | | |
| 21 | | /* Address maps */
|
| 22 | | static ADDRESS_MAP_START(mikro80_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 23 | | AM_RANGE( 0x0000, 0x07ff ) AM_RAMBANK(1) // First bank
|
| 24 | | AM_RANGE( 0x0800, 0xdfff ) AM_RAM // RAM
|
| 25 | | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM AM_BASE(&mikro80_cursor_ram)// Video RAM
|
| 26 | | AM_RANGE( 0xe800, 0xefff ) AM_RAM AM_BASE(&mikro80_video_ram) // Video RAM
|
| 27 | | AM_RANGE( 0xd000, 0xf7ff ) AM_RAM // RAM
|
| 28 | | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM
|
| 29 | | ADDRESS_MAP_END
|
| 30 | | |
| 31 | | static ADDRESS_MAP_START( mikro80_io , ADDRESS_SPACE_IO, 8)
|
| 32 | | AM_RANGE( 0x01, 0x01) AM_READWRITE ( mikro80_tape_r, mikro80_tape_w )
|
| 33 | | AM_RANGE( 0x04, 0x07) AM_READWRITE ( mikro80_keyboard_r, mikro80_keyboard_w )
|
| 34 | | ADDRESS_MAP_END
|
| 35 | | |
| 36 | | /* Input ports */
|
| 37 | | INPUT_PORTS_START( mikro80 )
|
| 38 | | PORT_START /* line 0 */
|
| 39 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
|
| 40 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
|
| 41 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 42 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 43 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 44 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 45 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
|
| 46 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 47 | | PORT_START /* line 1 */
|
| 48 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
|
| 49 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 50 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 51 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_INSERT)
|
| 52 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 53 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 54 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_EQUALS)
|
| 55 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 56 | | PORT_START /* line 2 */
|
| 57 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 58 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH)
|
| 59 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_QUOTE)
|
| 60 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 61 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 62 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 63 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 64 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 65 | | PORT_START /* line 3 */
|
| 66 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 67 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 68 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 69 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 70 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 71 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 72 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 73 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 74 | | PORT_START /* line 4 */
|
| 75 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 76 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
|
| 77 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 78 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 79 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 80 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 81 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 82 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 83 | | PORT_START /* line 5 */
|
| 84 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 85 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 86 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 87 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 88 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 89 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 90 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
|
| 91 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 92 | | PORT_START /* line 6 */
|
| 93 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 94 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
|
| 95 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
|
| 96 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 97 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 98 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<>") PORT_CODE(KEYCODE_MINUS)
|
| 99 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 100 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 101 | | PORT_START /* line 7 */
|
| 102 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
| 103 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
| 104 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
| 105 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 106 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 107 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 108 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
|
| 109 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 110 | | PORT_START /* line 8 */
|
| 111 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT)
|
| 112 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_RALT)
|
| 113 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) |
| 114 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) |
| 115 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 116 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 117 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 118 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 119 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 120 | | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 121 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 122 | | INPUT_PORTS_END
|
| 123 | |
|
| 124 | | /* Machine driver */
|
| 125 | | static MACHINE_DRIVER_START( mikro80 )
|
| 126 | | /* basic machine hardware */
|
| 127 | | MDRV_CPU_ADD(8080, 2000000)
|
| 128 | | MDRV_CPU_PROGRAM_MAP(mikro80_mem, 0) |
| 129 | | MDRV_CPU_IO_MAP(mikro80_io, 0)
|
| 130 | | MDRV_MACHINE_RESET( mikro80 )
|
| 131 | |
|
| 132 | | /* video hardware */
|
| 133 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 134 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 135 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 136 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 137 | | MDRV_SCREEN_SIZE(64*8, 32*8)
|
| 138 | | MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 32*8-1)
|
| 139 | | MDRV_PALETTE_LENGTH(2)
|
| 140 | | MDRV_PALETTE_INIT(black_and_white)
|
| 141 | | MDRV_GFXDECODE( mikro80 )
|
| 142 | | |
| 143 | | MDRV_VIDEO_START(mikro80)
|
| 144 | | MDRV_VIDEO_UPDATE(mikro80) |
| 145 | | |
| 146 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 147 | | MDRV_SOUND_ADD(WAVE, 0)
|
| 148 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 149 | | |
| 150 | | MACHINE_DRIVER_END
|
| 151 | |
|
| 152 | | static void mikro80_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
|
| 153 | | {
|
| 154 | | /* cassette */
|
| 155 | | switch(state)
|
| 156 | | {
|
| 157 | | /* --- the following bits of info are returned as 64-bit signed integers --- */
|
| 158 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break;
|
| 159 | | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
|
| 160 | | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rk8_cassette_formats; break;
|
| 161 | | |
| 162 | | default: cassette_device_getinfo(devclass, state, info); break;
|
| 163 | | }
|
| 164 | | }
|
| 165 | | |
| 166 | | SYSTEM_CONFIG_START(mikro80)
|
| 167 | | CONFIG_DEVICE(mikro80_cassette_getinfo)
|
| 168 | | SYSTEM_CONFIG_END
|
| 169 | |
|
| 170 | | /* ROM definition */
|
| 171 | | |
| 172 | | ROM_START( mikro80 )
|
| 173 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 174 | | ROM_LOAD( "mikro80.rom", 0xf800, 0x0800, CRC(63a4b72a) SHA1(6bd3e396539a15e2ccffa7486cae06ef6ddd1d03) )
|
| 175 | | ROM_REGION(0x0800, REGION_GFX1,0)
|
| 176 | | ROM_LOAD ("mikro80.fnt", 0x0000, 0x0800, CRC(43eb72bb) SHA1(761319cc6747661b33e84aa449cec83800543b5b) )
|
| 177 | | ROM_END
|
| 178 | | |
| 179 | | /* Driver */
|
| 180 | |
|
| 181 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 182 | | COMP( 1983, mikro80, 0, 0, mikro80, mikro80, mikro80, mikro80, "", "Mikro-80", 0)
|
| 1 | /*************************************************************************** |
| 2 | |
| 3 | MIKRO80 driver by Miodrag Milanovic |
| 4 | |
| 5 | 10/03/2008 Preliminary driver. |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | |
| 10 | #include "driver.h" |
| 11 | #include "cpu/i8085/i8085.h" |
| 12 | #include "includes/mikro80.h" |
| 13 | #include "devices/cassette.h" |
| 14 | #include "formats/rk_cas.h" |
| 15 | |
| 16 | |
| 17 | GFXDECODE_START( mikro80 ) |
| 18 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, mikro80_charlayout, 0, 1 ) |
| 19 | GFXDECODE_END |
| 20 | |
| 21 | /* Address maps */ |
| 22 | static ADDRESS_MAP_START(mikro80_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 23 | AM_RANGE( 0x0000, 0x07ff ) AM_RAMBANK(1) // First bank |
| 24 | AM_RANGE( 0x0800, 0xdfff ) AM_RAM // RAM |
| 25 | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM AM_BASE(&mikro80_cursor_ram)// Video RAM |
| 26 | AM_RANGE( 0xe800, 0xefff ) AM_RAM AM_BASE(&mikro80_video_ram) // Video RAM |
| 27 | AM_RANGE( 0xd000, 0xf7ff ) AM_RAM // RAM |
| 28 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM |
| 29 | ADDRESS_MAP_END |
| 30 | |
| 31 | static ADDRESS_MAP_START( mikro80_io , ADDRESS_SPACE_IO, 8) |
| 32 | AM_RANGE( 0x01, 0x01) AM_READWRITE ( mikro80_tape_r, mikro80_tape_w ) |
| 33 | AM_RANGE( 0x04, 0x07) AM_READWRITE ( mikro80_keyboard_r, mikro80_keyboard_w ) |
| 34 | ADDRESS_MAP_END |
| 35 | |
| 36 | /* Input ports */ |
| 37 | INPUT_PORTS_START( mikro80 ) |
| 38 | PORT_START /* line 0 */ |
| 39 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 40 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 41 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 42 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 43 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 44 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 45 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 46 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 47 | PORT_START /* line 1 */ |
| 48 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 49 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 50 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 51 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_INSERT) |
| 52 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 53 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 54 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_EQUALS) |
| 55 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 56 | PORT_START /* line 2 */ |
| 57 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 58 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| 59 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_QUOTE) |
| 60 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 61 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 62 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 63 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 64 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 65 | PORT_START /* line 3 */ |
| 66 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 67 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 68 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 69 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 70 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 71 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 72 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 73 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 74 | PORT_START /* line 4 */ |
| 75 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 76 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 77 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 78 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 79 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 80 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 81 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 82 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 83 | PORT_START /* line 5 */ |
| 84 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 85 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 86 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 87 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 88 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 89 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 90 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 91 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 92 | PORT_START /* line 6 */ |
| 93 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 94 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 95 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 96 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 97 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 98 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<>") PORT_CODE(KEYCODE_MINUS) |
| 99 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 100 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 101 | PORT_START /* line 7 */ |
| 102 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 103 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 104 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 105 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 106 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 107 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 108 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 109 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 110 | PORT_START /* line 8 */ |
| 111 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) |
| 112 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_RALT) |
| 113 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) |
| 114 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) |
| 115 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) |
| 116 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 117 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 118 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 119 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 120 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 121 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 122 | INPUT_PORTS_END |
| 123 | |
| 124 | /* Machine driver */ |
| 125 | static MACHINE_DRIVER_START( mikro80 ) |
| 126 | /* basic machine hardware */ |
| 127 | MDRV_CPU_ADD(8080, 2000000) |
| 128 | MDRV_CPU_PROGRAM_MAP(mikro80_mem, 0) |
| 129 | MDRV_CPU_IO_MAP(mikro80_io, 0) |
| 130 | MDRV_MACHINE_RESET( mikro80 ) |
| 131 | |
| 132 | /* video hardware */ |
| 133 | MDRV_SCREEN_ADD("main", RASTER) |
| 134 | MDRV_SCREEN_REFRESH_RATE(50) |
| 135 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 136 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 137 | MDRV_SCREEN_SIZE(64*8, 32*8) |
| 138 | MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 32*8-1) |
| 139 | MDRV_PALETTE_LENGTH(2) |
| 140 | MDRV_PALETTE_INIT(black_and_white) |
| 141 | MDRV_GFXDECODE( mikro80 ) |
| 142 | |
| 143 | MDRV_VIDEO_START(mikro80) |
| 144 | MDRV_VIDEO_UPDATE(mikro80) |
| 145 | |
| 146 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 147 | MDRV_SOUND_ADD(WAVE, 0) |
| 148 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 149 | |
| 150 | MACHINE_DRIVER_END |
| 151 | |
| 152 | static void mikro80_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 153 | { |
| 154 | /* cassette */ |
| 155 | switch(state) |
| 156 | { |
| 157 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 158 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 159 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 160 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rk8_cassette_formats; break; |
| 161 | |
| 162 | default: cassette_device_getinfo(devclass, state, info); break; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | SYSTEM_CONFIG_START(mikro80) |
| 167 | CONFIG_DEVICE(mikro80_cassette_getinfo) |
| 168 | SYSTEM_CONFIG_END |
| 169 | |
| 170 | /* ROM definition */ |
| 171 | |
| 172 | ROM_START( mikro80 ) |
| 173 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 174 | ROM_LOAD( "mikro80.rom", 0xf800, 0x0800, CRC(63a4b72a) SHA1(6bd3e396539a15e2ccffa7486cae06ef6ddd1d03) ) |
| 175 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 176 | ROM_LOAD ("mikro80.fnt", 0x0000, 0x0800, CRC(43eb72bb) SHA1(761319cc6747661b33e84aa449cec83800543b5b) ) |
| 177 | ROM_END |
| 178 | |
| 179 | /* Driver */ |
| 180 | |
| 181 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 182 | COMP( 1983, mikro80, 0, 0, mikro80, mikro80, mikro80, mikro80, "", "Mikro-80", 0) |
src/mess/drivers/ut88.c
| r2093 | r2094 | |
| 1 | | /***************************************************************************
|
| 2 | | |
| 3 | | UT88 driver by Miodrag Milanovic
|
| 4 | | |
| 5 | | 09/03/2008 Keyboard fixed, sound added.
|
| 6 | | 06/03/2008 Preliminary driver.
|
| 7 | |
|
| 8 | | ****************************************************************************/
|
| 9 | | |
| 10 | | |
| 11 | | #include "driver.h"
|
| 12 | | #include "cpu/i8085/i8085.h"
|
| 13 | | #include "includes/ut88.h"
|
| 14 | | #include "sound/dac.h"
|
| 15 | | #include "devices/cassette.h"
|
| 16 | | #include "formats/rk_cas.h"
|
| 17 | | #include "ut88mini.lh"
|
| 18 | | |
| 19 | | GFXDECODE_START( ut88 )
|
| 20 | | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, ut88_charlayout, 0, 1 )
|
| 21 | | GFXDECODE_END
|
| 22 | | |
| 23 | | /* Address maps */
|
| 24 | | static ADDRESS_MAP_START(ut88mini_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 25 | | ADDRESS_MAP_UNMAP_HIGH
|
| 26 | | AM_RANGE( 0x0000, 0x03ff ) AM_ROM // System ROM
|
| 27 | | AM_RANGE( 0xc000, 0xc3ff ) AM_RAM // RAM
|
| 28 | | AM_RANGE( 0x9000, 0x9fff ) AM_WRITE(ut88mini_write_led) // 7seg LED |
| 29 | | ADDRESS_MAP_END
|
| 30 | | |
| 31 | | static ADDRESS_MAP_START(ut88_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 32 | | AM_RANGE( 0x0000, 0x07ff ) AM_RAMBANK(1) // First bank
|
| 33 | | AM_RANGE( 0x0800, 0xdfff ) AM_RAM // RAM
|
| 34 | | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM // Video RAM (not used)
|
| 35 | | AM_RANGE( 0xe800, 0xefff ) AM_RAM AM_BASE(&ut88_video_ram) // Video RAM
|
| 36 | | AM_RANGE( 0xf400, 0xf7ff ) AM_RAM // System RAM
|
| 37 | | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM
|
| 38 | | ADDRESS_MAP_END
|
| 39 | | |
| 40 | | static ADDRESS_MAP_START( ut88mini_io , ADDRESS_SPACE_IO, 8) |
| 41 | | AM_RANGE( 0xA0, 0xA0) AM_READ ( ut88mini_keyboard_r )
|
| 42 | | AM_RANGE( 0xA1, 0xA1) AM_READ ( ut88_tape_r )
|
| 43 | | ADDRESS_MAP_END
|
| 44 | | |
| 45 | | static ADDRESS_MAP_START( ut88_io , ADDRESS_SPACE_IO, 8)
|
| 46 | | AM_RANGE( 0x04, 0x07) AM_READWRITE ( ut88_keyboard_r, ut88_keyboard_w )
|
| 47 | | AM_RANGE( 0xA1, 0xA1) AM_READWRITE ( ut88_tape_r, ut88_sound_w )
|
| 48 | | ADDRESS_MAP_END
|
| 49 | | |
| 50 | | /* Input ports */
|
| 51 | | INPUT_PORTS_START( ut88 )
|
| 52 | | PORT_START /* line 0 */
|
| 53 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
|
| 54 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
|
| 55 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 56 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 57 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 58 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 59 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
|
| 60 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 61 | | PORT_START /* line 1 */
|
| 62 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
|
| 63 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 64 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 65 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_INSERT)
|
| 66 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 67 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 68 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_EQUALS)
|
| 69 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 70 | | PORT_START /* line 2 */
|
| 71 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
|
| 72 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH)
|
| 73 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_QUOTE)
|
| 74 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 75 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 76 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 77 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
|
| 78 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 79 | | PORT_START /* line 3 */
|
| 80 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 81 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 82 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
|
| 83 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
|
| 84 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 85 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 86 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
|
| 87 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 88 | | PORT_START /* line 4 */
|
| 89 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
|
| 90 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
|
| 91 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
|
| 92 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
|
| 93 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 94 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 95 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
|
| 96 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 97 | | PORT_START /* line 5 */
|
| 98 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
|
| 99 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
|
| 100 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
|
| 101 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
|
| 102 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 103 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 104 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
|
| 105 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 106 | | PORT_START /* line 6 */
|
| 107 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
|
| 108 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
|
| 109 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
|
| 110 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
|
| 111 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 112 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<>") PORT_CODE(KEYCODE_MINUS)
|
| 113 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
|
| 114 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 115 | | PORT_START /* line 7 */
|
| 116 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
| 117 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
| 118 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
| 119 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
| 120 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 121 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 122 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
|
| 123 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 124 | | PORT_START /* line 8 */
|
| 125 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT)
|
| 126 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_RALT)
|
| 127 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) |
| 128 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) |
| 129 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
| 130 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT)
|
| 131 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 132 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 133 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 134 | | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 135 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED)
|
| 136 | | INPUT_PORTS_END
|
| 137 | | |
| 138 | | INPUT_PORTS_START( ut88mini )
|
| 139 | | PORT_START /* line 0 */
|
| 140 | | PORT_BIT(0x00, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
|
| 141 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
|
| 142 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
|
| 143 | | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
|
| 144 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 145 | | PORT_BIT(0x05, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 146 | | PORT_BIT(0x06, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
|
| 147 | | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
|
| 148 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
|
| 149 | | PORT_BIT(0x09, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
|
| 150 | | PORT_BIT(0x0A, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
|
| 151 | | PORT_BIT(0x0B, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 152 | | PORT_BIT(0x0C, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 153 | | PORT_BIT(0x0D, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 154 | | PORT_BIT(0x0E, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
|
| 155 | | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
|
| 156 | | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE)
|
| 157 | | INPUT_PORTS_END
|
| 158 | |
|
| 159 | | /* Machine driver */
|
| 160 | | static MACHINE_DRIVER_START( ut88 )
|
| 161 | | /* basic machine hardware */
|
| 162 | | MDRV_CPU_ADD(8080, 2000000)
|
| 163 | | MDRV_CPU_PROGRAM_MAP(ut88_mem, 0) |
| 164 | | MDRV_CPU_IO_MAP(ut88_io, 0)
|
| 165 | | MDRV_MACHINE_RESET( ut88 )
|
| 166 | |
|
| 167 | | /* video hardware */
|
| 168 | | MDRV_SCREEN_ADD("main", RASTER)
|
| 169 | | MDRV_SCREEN_REFRESH_RATE(50)
|
| 170 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
| 171 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
| 172 | | MDRV_SCREEN_SIZE(64*8, 28*8)
|
| 173 | | MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 28*8-1)
|
| 174 | | MDRV_PALETTE_LENGTH(2)
|
| 175 | | MDRV_PALETTE_INIT(black_and_white)
|
| 176 | | MDRV_GFXDECODE( ut88 )
|
| 177 | | |
| 178 | | MDRV_VIDEO_START(ut88)
|
| 179 | | MDRV_VIDEO_UPDATE(ut88)
|
| 180 | | |
| 181 | | /* audio hardware */
|
| 182 | | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 183 | | MDRV_SOUND_ADD(DAC, 0)
|
| 184 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
| 185 | | MDRV_SOUND_ADD(WAVE, 0)
|
| 186 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 187 | | MACHINE_DRIVER_END
|
| 188 | | |
| 189 | | static MACHINE_DRIVER_START( ut88mini )
|
| 190 | | /* basic machine hardware */
|
| 191 | | MDRV_CPU_ADD(8080, 2000000)
|
| 192 | | MDRV_CPU_PROGRAM_MAP(ut88mini_mem, 0) |
| 193 | | MDRV_CPU_IO_MAP(ut88mini_io, 0)
|
| 194 | | MDRV_MACHINE_START(ut88mini)
|
| 195 | | MDRV_MACHINE_RESET( ut88mini )
|
| 196 | | |
| 197 | | /* video hardware */ |
| 198 | | MDRV_DEFAULT_LAYOUT(layout_ut88mini) |
| 199 | | MACHINE_DRIVER_END
|
| 200 | | |
| 201 | | static void ut88_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
|
| 202 | | {
|
| 203 | | /* cassette */
|
| 204 | | switch(state)
|
| 205 | | {
|
| 206 | | /* --- the following bits of info are returned as 64-bit signed integers --- */
|
| 207 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break;
|
| 208 | | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
|
| 209 | | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rku_cassette_formats; break;
|
| 210 | | |
| 211 | | default: cassette_device_getinfo(devclass, state, info); break;
|
| 212 | | }
|
| 213 | | }
|
| 214 | | |
| 215 | | SYSTEM_CONFIG_START(ut88)
|
| 216 | | CONFIG_DEVICE(ut88_cassette_getinfo)
|
| 217 | | SYSTEM_CONFIG_END
|
| 218 | |
|
| 219 | | /* ROM definition */
|
| 220 | | ROM_START( ut88 )
|
| 221 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 222 | | ROM_LOAD( "ut88.rom", 0xf800, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) )
|
| 223 | | ROM_REGION(0x0800, REGION_GFX1,0)
|
| 224 | | ROM_LOAD ("ut88.fnt", 0x0000, 0x0800, CRC(874b4d29) SHA1(357efbb295cd9e47fa97d4d03f4f1859a915b5c3) ) |
| 225 | | ROM_END
|
| 226 | | |
| 227 | | ROM_START( ut88mini )
|
| 228 | | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
|
| 229 | | ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(CE9213EE) )
|
| 230 | | ROM_END
|
| 231 | | /* Driver */
|
| 232 | |
|
| 233 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */
|
| 234 | | COMP( 1989, ut88mini, 0, 0, ut88mini, ut88mini, ut88, ut88, "", "UT-88 mini", 0)
|
| 235 | | COMP( 1989, ut88, ut88mini,0, ut88, ut88, ut88, ut88, "", "UT-88", 0)
|
| 236 | | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | UT88 driver by Miodrag Milanovic |
| 4 | |
| 5 | 09/03/2008 Keyboard fixed, sound added. |
| 6 | 06/03/2008 Preliminary driver. |
| 7 | |
| 8 | ****************************************************************************/ |
| 9 | |
| 10 | |
| 11 | #include "driver.h" |
| 12 | #include "cpu/i8085/i8085.h" |
| 13 | #include "includes/ut88.h" |
| 14 | #include "sound/dac.h" |
| 15 | #include "devices/cassette.h" |
| 16 | #include "formats/rk_cas.h" |
| 17 | #include "ut88mini.lh" |
| 18 | |
| 19 | GFXDECODE_START( ut88 ) |
| 20 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, ut88_charlayout, 0, 1 ) |
| 21 | GFXDECODE_END |
| 22 | |
| 23 | /* Address maps */ |
| 24 | static ADDRESS_MAP_START(ut88mini_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 25 | ADDRESS_MAP_UNMAP_HIGH |
| 26 | AM_RANGE( 0x0000, 0x03ff ) AM_ROM // System ROM |
| 27 | AM_RANGE( 0xc000, 0xc3ff ) AM_RAM // RAM |
| 28 | AM_RANGE( 0x9000, 0x9fff ) AM_WRITE(ut88mini_write_led) // 7seg LED |
| 29 | ADDRESS_MAP_END |
| 30 | |
| 31 | static ADDRESS_MAP_START(ut88_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 32 | AM_RANGE( 0x0000, 0x07ff ) AM_RAMBANK(1) // First bank |
| 33 | AM_RANGE( 0x0800, 0xdfff ) AM_RAM // RAM |
| 34 | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM // Video RAM (not used) |
| 35 | AM_RANGE( 0xe800, 0xefff ) AM_RAM AM_BASE(&ut88_video_ram) // Video RAM |
| 36 | AM_RANGE( 0xf400, 0xf7ff ) AM_RAM // System RAM |
| 37 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM |
| 38 | ADDRESS_MAP_END |
| 39 | |
| 40 | static ADDRESS_MAP_START( ut88mini_io , ADDRESS_SPACE_IO, 8) |
| 41 | AM_RANGE( 0xA0, 0xA0) AM_READ ( ut88mini_keyboard_r ) |
| 42 | AM_RANGE( 0xA1, 0xA1) AM_READ ( ut88_tape_r ) |
| 43 | ADDRESS_MAP_END |
| 44 | |
| 45 | static ADDRESS_MAP_START( ut88_io , ADDRESS_SPACE_IO, 8) |
| 46 | AM_RANGE( 0x04, 0x07) AM_READWRITE ( ut88_keyboard_r, ut88_keyboard_w ) |
| 47 | AM_RANGE( 0xA1, 0xA1) AM_READWRITE ( ut88_tape_r, ut88_sound_w ) |
| 48 | ADDRESS_MAP_END |
| 49 | |
| 50 | /* Input ports */ |
| 51 | INPUT_PORTS_START( ut88 ) |
| 52 | PORT_START /* line 0 */ |
| 53 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 54 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 55 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 56 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 57 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 58 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 59 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 60 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 61 | PORT_START /* line 1 */ |
| 62 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 63 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 64 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 65 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_INSERT) |
| 66 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 67 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 68 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_EQUALS) |
| 69 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 70 | PORT_START /* line 2 */ |
| 71 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 72 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| 73 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_QUOTE) |
| 74 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 75 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 76 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 77 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 78 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 79 | PORT_START /* line 3 */ |
| 80 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 81 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 82 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 83 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 84 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 85 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 86 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 87 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 88 | PORT_START /* line 4 */ |
| 89 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 90 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 91 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 92 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 93 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 94 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 95 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 96 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 97 | PORT_START /* line 5 */ |
| 98 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 99 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 100 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 101 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 102 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 103 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 104 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 105 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 106 | PORT_START /* line 6 */ |
| 107 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 108 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 109 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 110 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 111 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 112 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<>") PORT_CODE(KEYCODE_MINUS) |
| 113 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 114 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 115 | PORT_START /* line 7 */ |
| 116 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 117 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 118 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 119 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 120 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 121 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 122 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 123 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 124 | PORT_START /* line 8 */ |
| 125 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) |
| 126 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_RALT) |
| 127 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) |
| 128 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) |
| 129 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) |
| 130 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 131 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 132 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 133 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 134 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 135 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 136 | INPUT_PORTS_END |
| 137 | |
| 138 | INPUT_PORTS_START( ut88mini ) |
| 139 | PORT_START /* line 0 */ |
| 140 | PORT_BIT(0x00, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 141 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 142 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 143 | PORT_BIT(0x03, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 144 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 145 | PORT_BIT(0x05, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 146 | PORT_BIT(0x06, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 147 | PORT_BIT(0x07, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 148 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 149 | PORT_BIT(0x09, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 150 | PORT_BIT(0x0A, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 151 | PORT_BIT(0x0B, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 152 | PORT_BIT(0x0C, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 153 | PORT_BIT(0x0D, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 154 | PORT_BIT(0x0E, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 155 | PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 156 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| 157 | INPUT_PORTS_END |
| 158 | |
| 159 | /* Machine driver */ |
| 160 | static MACHINE_DRIVER_START( ut88 ) |
| 161 | /* basic machine hardware */ |
| 162 | MDRV_CPU_ADD(8080, 2000000) |
| 163 | MDRV_CPU_PROGRAM_MAP(ut88_mem, 0) |
| 164 | MDRV_CPU_IO_MAP(ut88_io, 0) |
| 165 | MDRV_MACHINE_RESET( ut88 ) |
| 166 | |
| 167 | /* video hardware */ |
| 168 | MDRV_SCREEN_ADD("main", RASTER) |
| 169 | MDRV_SCREEN_REFRESH_RATE(50) |
| 170 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 171 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 172 | MDRV_SCREEN_SIZE(64*8, 28*8) |
| 173 | MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 28*8-1) |
| 174 | MDRV_PALETTE_LENGTH(2) |
| 175 | MDRV_PALETTE_INIT(black_and_white) |
| 176 | MDRV_GFXDECODE( ut88 ) |
| 177 | |
| 178 | MDRV_VIDEO_START(ut88) |
| 179 | MDRV_VIDEO_UPDATE(ut88) |
| 180 | |
| 181 | /* audio hardware */ |
| 182 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 183 | MDRV_SOUND_ADD(DAC, 0) |
| 184 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 185 | MDRV_SOUND_ADD(WAVE, 0) |
| 186 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 187 | MACHINE_DRIVER_END |
| 188 | |
| 189 | static MACHINE_DRIVER_START( ut88mini ) |
| 190 | /* basic machine hardware */ |
| 191 | MDRV_CPU_ADD(8080, 2000000) |
| 192 | MDRV_CPU_PROGRAM_MAP(ut88mini_mem, 0) |
| 193 | MDRV_CPU_IO_MAP(ut88mini_io, 0) |
| 194 | MDRV_MACHINE_START(ut88mini) |
| 195 | MDRV_MACHINE_RESET( ut88mini ) |
| 196 | |
| 197 | /* video hardware */ |
| 198 | MDRV_DEFAULT_LAYOUT(layout_ut88mini) |
| 199 | MACHINE_DRIVER_END |
| 200 | |
| 201 | static void ut88_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 202 | { |
| 203 | /* cassette */ |
| 204 | switch(state) |
| 205 | { |
| 206 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 207 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 208 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 209 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rku_cassette_formats; break; |
| 210 | |
| 211 | default: cassette_device_getinfo(devclass, state, info); break; |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | SYSTEM_CONFIG_START(ut88) |
| 216 | CONFIG_DEVICE(ut88_cassette_getinfo) |
| 217 | SYSTEM_CONFIG_END |
| 218 | |
| 219 | /* ROM definition */ |
| 220 | ROM_START( ut88 ) |
| 221 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 222 | ROM_LOAD( "ut88.rom", 0xf800, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) ) |
| 223 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 224 | ROM_LOAD ("ut88.fnt", 0x0000, 0x0800, CRC(874b4d29) SHA1(357efbb295cd9e47fa97d4d03f4f1859a915b5c3) ) |
| 225 | ROM_END |
| 226 | |
| 227 | ROM_START( ut88mini ) |
| 228 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 229 | ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(CE9213EE) ) |
| 230 | ROM_END |
| 231 | /* Driver */ |
| 232 | |
| 233 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 234 | COMP( 1989, ut88mini, 0, 0, ut88mini, ut88mini, ut88, ut88, "", "UT-88 mini", 0) |
| 235 | COMP( 1989, ut88, ut88mini,0, ut88, ut88, ut88, ut88, "", "UT-88", 0) |
| 236 | |