src/mess/machine/mikrosha.c
| r0 | r2813 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Mikrosha machine driver by Miodrag Milanovic |
| 4 | |
| 5 | 06/03/2008 Preliminary driver. |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | |
| 10 | #include "driver.h" |
| 11 | #include "deprecat.h" |
| 12 | #include "cpu/i8085/i8085.h" |
| 13 | #include "devices/cassette.h" |
| 14 | #include "machine/8255ppi.h" |
| 15 | #include "machine/8257dma.h" |
| 16 | #include "video/i8275.h" |
| 17 | #include "includes/mikrosha.h" |
| 18 | |
| 19 | static int mikrosha_keyboard_mask; |
| 20 | |
| 21 | |
| 22 | /* Driver initialization */ |
| 23 | DRIVER_INIT(mikrosha) |
| 24 | { |
| 25 | /* set initialy ROM to be visible on first bank */ |
| 26 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 27 | memset(RAM,0x0000,0x1000); // make frist page empty by default |
| 28 | memory_configure_bank(1, 1, 2, RAM, 0x0000); |
| 29 | memory_configure_bank(1, 0, 2, RAM, 0xf800); |
| 30 | } |
| 31 | |
| 32 | READ8_HANDLER (mikrosha_8255_porta_r2 ) |
| 33 | { |
| 34 | UINT8 key = 0xff; |
| 35 | if ((mikrosha_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); } |
| 36 | if ((mikrosha_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); } |
| 37 | if ((mikrosha_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); } |
| 38 | if ((mikrosha_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); } |
| 39 | if ((mikrosha_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); } |
| 40 | if ((mikrosha_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); } |
| 41 | if ((mikrosha_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); } |
| 42 | if ((mikrosha_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); } |
| 43 | return key; |
| 44 | } |
| 45 | |
| 46 | READ8_HANDLER (mikrosha_8255_portc_r2 ) |
| 47 | { |
| 48 | double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)); |
| 49 | UINT8 dat = input_port_read(machine,"LINE8"); |
| 50 | if (level < 0) { |
| 51 | dat ^= 0x10; |
| 52 | } |
| 53 | return dat; |
| 54 | } |
| 55 | |
| 56 | WRITE8_HANDLER (mikrosha_8255_portb_w2 ) |
| 57 | { |
| 58 | mikrosha_keyboard_mask = data ^ 0xff; |
| 59 | } |
| 60 | |
| 61 | const ppi8255_interface mikrosha_ppi8255_interface_1 = |
| 62 | { |
| 63 | mikrosha_8255_porta_r2, |
| 64 | NULL, |
| 65 | mikrosha_8255_portc_r2, |
| 66 | NULL, |
| 67 | mikrosha_8255_portb_w2, |
| 68 | NULL, |
| 69 | }; |
| 70 | |
| 71 | I8275_DMA_REQUEST(mikrosha_video_dma_request) { |
| 72 | dma8257_drq_write(0, 2, state); |
| 73 | } |
| 74 | |
| 75 | const i8275_interface mikrosha_i8275_interface = { |
| 76 | "main", |
| 77 | 6, |
| 78 | mikrosha_video_dma_request, |
| 79 | NULL, |
| 80 | mikrosha_display_pixels |
| 81 | }; |
| 82 | |
| 83 | static UINT8 mikrosha_dma_read_byte(int channel, offs_t offset) |
| 84 | { |
| 85 | UINT8 result; |
| 86 | cpuintrf_push_context(0); |
| 87 | result = program_read_byte(offset); |
| 88 | cpuintrf_pop_context(); |
| 89 | return result; |
| 90 | } |
| 91 | |
| 92 | static void mikrosha_write_video(UINT8 data) |
| 93 | { |
| 94 | i8275_dack_set_data((device_config*)device_list_find_by_tag( Machine->config->devicelist, I8275, "i8275" ),data); |
| 95 | } |
| 96 | |
| 97 | static const struct dma8257_interface mikrosha_dma = |
| 98 | { |
| 99 | 0, |
| 100 | XTAL_16MHz / 9, |
| 101 | |
| 102 | mikrosha_dma_read_byte, |
| 103 | 0, |
| 104 | |
| 105 | { 0, 0, 0, 0 }, |
| 106 | { 0, 0, mikrosha_write_video, 0 }, |
| 107 | { 0, 0, 0, 0 } |
| 108 | }; |
| 109 | |
| 110 | static TIMER_CALLBACK( mikrosha_reset ) |
| 111 | { |
| 112 | memory_set_bank(1, 0); |
| 113 | } |
| 114 | |
| 115 | MACHINE_RESET( mikrosha ) |
| 116 | { |
| 117 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, mikrosha_reset); |
| 118 | memory_set_bank(1, 1); |
| 119 | |
| 120 | mikrosha_keyboard_mask = 0; |
| 121 | dma8257_init(1); |
| 122 | dma8257_config(0, &mikrosha_dma); |
| 123 | dma8257_reset(); |
| 124 | } |
src/mess/machine/apogee.c
| r0 | r2813 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Apogee BK-01 driver by Miodrag Milanovic |
| 4 | |
| 5 | 05/06/2008 Preliminary driver. |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | |
| 10 | #include "driver.h" |
| 11 | #include "deprecat.h" |
| 12 | #include "cpu/i8085/i8085.h" |
| 13 | #include "devices/cassette.h" |
| 14 | #include "machine/8255ppi.h" |
| 15 | #include "machine/8257dma.h" |
| 16 | #include "video/i8275.h" |
| 17 | #include "includes/apogee.h" |
| 18 | |
| 19 | static int apogee_keyboard_mask; |
| 20 | |
| 21 | |
| 22 | /* Driver initialization */ |
| 23 | DRIVER_INIT(apogee) |
| 24 | { |
| 25 | /* set initialy ROM to be visible on first bank */ |
| 26 | UINT8 *RAM = memory_region(REGION_CPU1); |
| 27 | memset(RAM,0x0000,0x1000); // make frist page empty by default |
| 28 | memory_configure_bank(1, 1, 2, RAM, 0x0000); |
| 29 | memory_configure_bank(1, 0, 2, RAM, 0xf800); |
| 30 | } |
| 31 | |
| 32 | READ8_HANDLER (apogee_8255_portb_r2 ) |
| 33 | { |
| 34 | UINT8 key = 0xff; |
| 35 | if ((apogee_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); } |
| 36 | if ((apogee_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); } |
| 37 | if ((apogee_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); } |
| 38 | if ((apogee_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); } |
| 39 | if ((apogee_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); } |
| 40 | if ((apogee_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); } |
| 41 | if ((apogee_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); } |
| 42 | if ((apogee_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); } |
| 43 | return key; |
| 44 | } |
| 45 | |
| 46 | READ8_HANDLER (apogee_8255_portc_r2 ) |
| 47 | { |
| 48 | double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)); |
| 49 | UINT8 dat = input_port_read(machine,"LINE8"); |
| 50 | if (level < 0) { |
| 51 | dat ^= 0x10; |
| 52 | } |
| 53 | return dat; |
| 54 | } |
| 55 | |
| 56 | WRITE8_HANDLER (apogee_8255_porta_w2 ) |
| 57 | { |
| 58 | apogee_keyboard_mask = data ^ 0xff; |
| 59 | } |
| 60 | |
| 61 | const ppi8255_interface apogee_ppi8255_interface_1 = |
| 62 | { |
| 63 | NULL, |
| 64 | apogee_8255_portb_r2, |
| 65 | apogee_8255_portc_r2, |
| 66 | apogee_8255_porta_w2, |
| 67 | NULL, |
| 68 | NULL, |
| 69 | }; |
| 70 | |
| 71 | I8275_DMA_REQUEST(apogee_video_dma_request) { |
| 72 | dma8257_drq_write(0, 2, state); |
| 73 | } |
| 74 | |
| 75 | const i8275_interface apogee_i8275_interface = { |
| 76 | "main", |
| 77 | 6, |
| 78 | apogee_video_dma_request, |
| 79 | NULL, |
| 80 | apogee_display_pixels |
| 81 | }; |
| 82 | |
| 83 | static UINT8 apogee_dma_read_byte(int channel, offs_t offset) |
| 84 | { |
| 85 | UINT8 result; |
| 86 | cpuintrf_push_context(0); |
| 87 | result = program_read_byte(offset); |
| 88 | cpuintrf_pop_context(); |
| 89 | return result; |
| 90 | } |
| 91 | |
| 92 | static void apogee_write_video(UINT8 data) |
| 93 | { |
| 94 | i8275_dack_set_data((device_config*)device_list_find_by_tag( Machine->config->devicelist, I8275, "i8275" ),data); |
| 95 | } |
| 96 | |
| 97 | static const struct dma8257_interface apogee_dma = |
| 98 | { |
| 99 | 0, |
| 100 | XTAL_16MHz / 9, |
| 101 | |
| 102 | apogee_dma_read_byte, |
| 103 | 0, |
| 104 | |
| 105 | { 0, 0, 0, 0 }, |
| 106 | { 0, 0, apogee_write_video, 0 }, |
| 107 | { 0, 0, 0, 0 } |
| 108 | }; |
| 109 | |
| 110 | static TIMER_CALLBACK( apogee_reset ) |
| 111 | { |
| 112 | memory_set_bank(1, 0); |
| 113 | } |
| 114 | |
| 115 | MACHINE_RESET( apogee ) |
| 116 | { |
| 117 | timer_set(ATTOTIME_IN_USEC(1), NULL, 0, apogee_reset); |
| 118 | memory_set_bank(1, 1); |
| 119 | |
| 120 | apogee_keyboard_mask = 0; |
| 121 | dma8257_init(1); |
| 122 | dma8257_config(0, &apogee_dma); |
| 123 | dma8257_reset(); |
| 124 | } |
src/mess/formats/rk_cas.c
| r2812 | r2813 | |
| 14 | 14 | #define RK_HEADER_LEN 256 |
| 15 | 15 | |
| 16 | 16 | #define RK_SIZE_20 20 |
| 17 | #define RK_SIZE_22 22 |
| 17 | 18 | #define RK_SIZE_60 60 |
| 18 | 19 | |
| 19 | 20 | static int data_size; |
| r2812 | r2813 | |
| 60 | 61 | return (RK_HEADER_LEN * 8 * 2 + 8*2 + caslen * 8 * 2) * RK_SIZE_20; |
| 61 | 62 | } |
| 62 | 63 | |
| 64 | static int rk22_cas_to_wav_size( const UINT8 *casdata, int caslen ) { |
| 65 | data_size = caslen; |
| 66 | return (RK_HEADER_LEN * 8 * 2 + 8*2 + caslen * 8 * 2) * RK_SIZE_22; |
| 67 | } |
| 68 | |
| 63 | 69 | static int rk60_cas_to_wav_size( const UINT8 *casdata, int caslen ) { |
| 64 | 70 | data_size = caslen; |
| 65 | 71 | return (RK_HEADER_LEN * 8 * 2 + 8*2 + caslen * 8 * 2) * RK_SIZE_60; |
| r2812 | r2813 | |
| 81 | 87 | return p - buffer; |
| 82 | 88 | } |
| 83 | 89 | |
| 90 | static int rk22_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) { |
| 91 | int i; |
| 92 | INT16 * p = buffer; |
| 93 | |
| 94 | for (i=0; i<RK_HEADER_LEN; i++) { |
| 95 | p = rk_output_byte (p, 0x00, RK_SIZE_22 ); |
| 96 | } |
| 97 | |
| 98 | p = rk_output_byte (p, 0xE6, RK_SIZE_22); |
| 99 | |
| 100 | for (i=0; i<data_size; i++) |
| 101 | p = rk_output_byte (p, bytes[i], RK_SIZE_22); |
| 102 | |
| 103 | return p - buffer; |
| 104 | } |
| 105 | |
| 84 | 106 | static int rk60_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) { |
| 85 | 107 | int i; |
| 86 | 108 | INT16 * p = buffer; |
| r2812 | r2813 | |
| 97 | 119 | return p - buffer; |
| 98 | 120 | } |
| 99 | 121 | |
| 100 | | |
| 101 | | |
| 102 | 122 | static const struct CassetteLegacyWaveFiller rk20_legacy_fill_wave = { |
| 103 | 123 | rk20_cas_fill_wave, /* fill_wave */ |
| 104 | 124 | -1, /* chunk_size */ |
| r2812 | r2813 | |
| 109 | 129 | 0 /* trailer_samples */ |
| 110 | 130 | }; |
| 111 | 131 | |
| 112 | | |
| 113 | | |
| 114 | 132 | static casserr_t rk20_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) { |
| 115 | 133 | return cassette_legacy_identify( cassette, opts, &rk20_legacy_fill_wave ); |
| 116 | 134 | } |
| r2812 | r2813 | |
| 119 | 137 | return cassette_legacy_construct( cassette, &rk20_legacy_fill_wave ); |
| 120 | 138 | } |
| 121 | 139 | |
| 140 | static const struct CassetteLegacyWaveFiller rk22_legacy_fill_wave = { |
| 141 | rk22_cas_fill_wave, /* fill_wave */ |
| 142 | -1, /* chunk_size */ |
| 143 | 0, /* chunk_samples */ |
| 144 | rk22_cas_to_wav_size, /* chunk_sample_calc */ |
| 145 | RK_WAV_FREQUENCY, /* sample_frequency */ |
| 146 | 0, /* header_samples */ |
| 147 | 0 /* trailer_samples */ |
| 148 | }; |
| 149 | |
| 150 | static casserr_t rk22_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) { |
| 151 | return cassette_legacy_identify( cassette, opts, &rk22_legacy_fill_wave ); |
| 152 | } |
| 153 | |
| 154 | static casserr_t rk22_cassette_load( cassette_image *cassette ) { |
| 155 | return cassette_legacy_construct( cassette, &rk22_legacy_fill_wave ); |
| 156 | } |
| 157 | |
| 122 | 158 | static const struct CassetteLegacyWaveFiller rk60_legacy_fill_wave = { |
| 123 | 159 | rk60_cas_fill_wave, /* fill_wave */ |
| 124 | 160 | -1, /* chunk_size */ |
| r2812 | r2813 | |
| 172 | 208 | NULL |
| 173 | 209 | }; |
| 174 | 210 | |
| 211 | static const struct CassetteFormat rka_cassette_format = { |
| 212 | "rka", |
| 213 | rk20_cassette_identify, |
| 214 | rk20_cassette_load, |
| 215 | NULL |
| 216 | }; |
| 217 | |
| 218 | static const struct CassetteFormat rkm_cassette_format = { |
| 219 | "rkm", |
| 220 | rk22_cassette_identify, |
| 221 | rk22_cassette_load, |
| 222 | NULL |
| 223 | }; |
| 175 | 224 | CASSETTE_FORMATLIST_START(rku_cassette_formats) |
| 176 | 225 | CASSETTE_FORMAT(rku_cassette_format) |
| 177 | 226 | CASSETTE_FORMATLIST_END |
| r2812 | r2813 | |
| 191 | 240 | CASSETTE_FORMATLIST_START(rkr_cassette_formats) |
| 192 | 241 | CASSETTE_FORMAT(rkr_cassette_format) |
| 193 | 242 | CASSETTE_FORMATLIST_END |
| 243 | |
| 244 | CASSETTE_FORMATLIST_START(rka_cassette_formats) |
| 245 | CASSETTE_FORMAT(rka_cassette_format) |
| 246 | CASSETTE_FORMATLIST_END |
| 247 | |
| 248 | CASSETTE_FORMATLIST_START(rkm_cassette_formats) |
| 249 | CASSETTE_FORMAT(rkm_cassette_format) |
| 250 | CASSETTE_FORMATLIST_END |
src/mess/drivers/mikrosha.c
| r0 | r2813 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Mikrosha driver by Miodrag Milanovic |
| 4 | |
| 5 | 05/06/2008 Preliminary driver. |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | |
| 10 | #include "driver.h" |
| 11 | #include "cpu/i8085/i8085.h" |
| 12 | #include "machine/8255ppi.h" |
| 13 | #include "machine/8257dma.h" |
| 14 | #include "video/i8275.h" |
| 15 | #include "devices/cassette.h" |
| 16 | #include "formats/rk_cas.h" |
| 17 | #include "includes/mikrosha.h" |
| 18 | |
| 19 | /* Address maps */ |
| 20 | static ADDRESS_MAP_START(mikrosha_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 21 | AM_RANGE( 0x0000, 0x0fff ) AM_RAMBANK(1) // First bank |
| 22 | AM_RANGE( 0x1000, 0x7fff ) AM_RAM // RAM |
| 23 | AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) AM_MIRROR(0x07fc) |
| 24 | //AM_RANGE( 0xc800, 0xc803 ) AM_DEVREADWRITE(PPI8255, "ppi8255_2", ppi8255_r, ppi8255_w) AM_MIRROR(0x07fc) |
| 25 | AM_RANGE( 0xd000, 0xd001 ) AM_DEVREADWRITE(I8275, "i8275", i8275_r, i8275_w) AM_MIRROR(0x07fe) // video |
| 26 | //AM_RANGE( 0xd800, 0xd603 ) AM_MIRROR(0x07fc) // Timer |
| 27 | AM_RANGE( 0xf800, 0xffff ) AM_WRITE(dma8257_0_w) // DMA |
| 28 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM |
| 29 | ADDRESS_MAP_END |
| 30 | |
| 31 | /* Input ports */ |
| 32 | INPUT_PORTS_START( mikrosha ) |
| 33 | PORT_START_TAG("LINE0") |
| 34 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 35 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 36 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 37 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 38 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS) |
| 39 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 40 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 41 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 42 | PORT_START_TAG("LINE1") |
| 43 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 44 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 45 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 46 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 47 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 48 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 49 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 50 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 51 | PORT_START_TAG("LINE2") |
| 52 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) |
| 53 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 54 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 55 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS) |
| 56 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 57 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 58 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 59 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 60 | PORT_START_TAG("LINE3") |
| 61 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL) |
| 62 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 63 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 64 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE) |
| 65 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 66 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 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("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 69 | PORT_START_TAG("LINE4") |
| 70 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 71 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgUp") PORT_CODE(KEYCODE_PGUP) |
| 72 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 73 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<") PORT_CODE(KEYCODE_COMMA) |
| 74 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 75 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 76 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 77 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) |
| 78 | PORT_START_TAG("LINE5") |
| 79 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 80 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END) |
| 81 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 82 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 83 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 84 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 85 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 86 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 87 | PORT_START_TAG("LINE6") |
| 88 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 89 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Center") PORT_CODE(KEYCODE_F3) |
| 90 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 91 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP) |
| 92 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 93 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 94 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 95 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 96 | PORT_START_TAG("LINE7") |
| 97 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 98 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgDn") PORT_CODE(KEYCODE_PGDN) |
| 99 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 100 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH) |
| 101 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 102 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 103 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 104 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back") PORT_CODE(KEYCODE_BACKSPACE) |
| 105 | PORT_START_TAG("LINE8") |
| 106 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 107 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 108 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 109 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 110 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 111 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
| 112 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 113 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 114 | INPUT_PORTS_END |
| 115 | |
| 116 | /* Machine driver */ |
| 117 | static MACHINE_DRIVER_START( mikrosha ) |
| 118 | /* basic machine hardware */ |
| 119 | MDRV_CPU_ADD(8080, XTAL_16MHz / 9) |
| 120 | MDRV_CPU_PROGRAM_MAP(mikrosha_mem, 0) |
| 121 | MDRV_MACHINE_RESET( mikrosha ) |
| 122 | |
| 123 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) |
| 124 | MDRV_DEVICE_CONFIG( mikrosha_ppi8255_interface_1 ) |
| 125 | |
| 126 | //MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) |
| 127 | //MDRV_DEVICE_CONFIG( mikrosha_ppi8255_interface_2 ) |
| 128 | |
| 129 | MDRV_DEVICE_ADD( "i8275", I8275 ) |
| 130 | MDRV_DEVICE_CONFIG(mikrosha_i8275_interface) |
| 131 | /* video hardware */ |
| 132 | MDRV_SCREEN_ADD("main", RASTER) |
| 133 | MDRV_SCREEN_REFRESH_RATE(50) |
| 134 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 135 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 136 | MDRV_SCREEN_SIZE(78*6, 30*10) |
| 137 | MDRV_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1) |
| 138 | MDRV_PALETTE_LENGTH(3) |
| 139 | MDRV_PALETTE_INIT(mikrosha) |
| 140 | |
| 141 | MDRV_VIDEO_START(generic_bitmapped) |
| 142 | MDRV_VIDEO_UPDATE(mikrosha) |
| 143 | |
| 144 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 145 | MDRV_SOUND_ADD(WAVE, 0) |
| 146 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 147 | MACHINE_DRIVER_END |
| 148 | |
| 149 | static void mikrosha_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 150 | { |
| 151 | /* cassette */ |
| 152 | switch(state) |
| 153 | { |
| 154 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 155 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 156 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 157 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rkm_cassette_formats; break; |
| 158 | |
| 159 | default: cassette_device_getinfo(devclass, state, info); break; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | /* ROM definition */ |
| 164 | ROM_START( mikrosha ) |
| 165 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 166 | ROM_LOAD( "mikrosha.rom", 0xf800, 0x0800, CRC(86A83556)) |
| 167 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 168 | ROM_LOAD ("mikrosha.fnt", 0x0000, 0x0800, CRC(B315DA1C)) |
| 169 | ROM_END |
| 170 | |
| 171 | SYSTEM_CONFIG_START(mikrosha) |
| 172 | CONFIG_DEVICE(mikrosha_cassette_getinfo); |
| 173 | SYSTEM_CONFIG_END |
| 174 | |
| 175 | /* Driver */ |
| 176 | |
| 177 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 178 | COMP( 1987, mikrosha, radio86,0, mikrosha, mikrosha, mikrosha, mikrosha, "Lianozovo Electromechanical Factory", "Mikrosha", 0) |
src/mess/drivers/apogee.c
| r0 | r2813 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Apogee BK-01 driver by Miodrag Milanovic |
| 4 | |
| 5 | 05/06/2008 Preliminary driver. |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | |
| 10 | #include "driver.h" |
| 11 | #include "cpu/i8085/i8085.h" |
| 12 | #include "machine/8255ppi.h" |
| 13 | #include "machine/8257dma.h" |
| 14 | #include "video/i8275.h" |
| 15 | #include "devices/cassette.h" |
| 16 | #include "formats/rk_cas.h" |
| 17 | #include "includes/apogee.h" |
| 18 | |
| 19 | /* Address maps */ |
| 20 | static ADDRESS_MAP_START(apogee_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 21 | AM_RANGE( 0x0000, 0x0fff ) AM_RAMBANK(1) // First bank |
| 22 | AM_RANGE( 0x1000, 0xebff ) AM_RAM // RAM |
| 23 | //AM_RANGE( 0xec00, 0xecff ) AM_RAM // Timer |
| 24 | AM_RANGE( 0xed00, 0xed03 ) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) AM_MIRROR(0x00fc) |
| 25 | //AM_RANGE( 0xee00, 0xee03 ) AM_DEVREADWRITE(PPI8255, "ppi8255_2", ppi8255_r, ppi8255_w) AM_MIRROR(0x00fc) |
| 26 | AM_RANGE( 0xef00, 0xef01 ) AM_DEVREADWRITE(I8275, "i8275", i8275_r, i8275_w) AM_MIRROR(0x00fe) // video |
| 27 | AM_RANGE( 0xf000, 0xf0ff ) AM_WRITE(dma8257_0_w) // DMA |
| 28 | AM_RANGE( 0xf000, 0xffff ) AM_ROM // System ROM |
| 29 | ADDRESS_MAP_END |
| 30 | |
| 31 | /* Input ports */ |
| 32 | INPUT_PORTS_START( apogee ) |
| 33 | PORT_START_TAG("LINE0") |
| 34 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 35 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgUp") PORT_CODE(KEYCODE_PGUP) |
| 36 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL) |
| 37 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_5_PAD) |
| 38 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END) |
| 39 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT) |
| 40 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgDn") PORT_CODE(KEYCODE_PGDN) |
| 41 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 42 | PORT_START_TAG("LINE1") |
| 43 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) |
| 44 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 45 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 46 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back") PORT_CODE(KEYCODE_BACKSPACE) |
| 47 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 48 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 49 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 50 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 51 | PORT_START_TAG("LINE2") |
| 52 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 53 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 54 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 55 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 56 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 57 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 58 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 59 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 60 | PORT_START_TAG("LINE3") |
| 61 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 62 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 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("+") PORT_CODE(KEYCODE_COLON) |
| 65 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<") PORT_CODE(KEYCODE_COMMA) |
| 66 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 67 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP) |
| 68 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH) |
| 69 | PORT_START_TAG("LINE4") |
| 70 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 71 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 72 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 73 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 74 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 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("F") PORT_CODE(KEYCODE_F) |
| 77 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 78 | PORT_START_TAG("LINE5") |
| 79 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 80 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 81 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 82 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 83 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 84 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 85 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 86 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 87 | PORT_START_TAG("LINE6") |
| 88 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 89 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 90 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 91 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 92 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 93 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 94 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 95 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 96 | PORT_START_TAG("LINE7") |
| 97 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 98 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 99 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 100 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 101 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 102 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 103 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) |
| 104 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 105 | PORT_START_TAG("LINE8") |
| 106 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 107 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 108 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 109 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 110 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 111 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 112 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 113 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
| 114 | INPUT_PORTS_END |
| 115 | |
| 116 | /* Machine driver */ |
| 117 | static MACHINE_DRIVER_START( apogee ) |
| 118 | /* basic machine hardware */ |
| 119 | MDRV_CPU_ADD(8080, XTAL_16MHz / 9) |
| 120 | MDRV_CPU_PROGRAM_MAP(apogee_mem, 0) |
| 121 | MDRV_MACHINE_RESET( apogee ) |
| 122 | |
| 123 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) |
| 124 | MDRV_DEVICE_CONFIG( apogee_ppi8255_interface_1 ) |
| 125 | |
| 126 | //MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) |
| 127 | //MDRV_DEVICE_CONFIG( apogee_ppi8255_interface_2 ) |
| 128 | |
| 129 | MDRV_DEVICE_ADD( "i8275", I8275 ) |
| 130 | MDRV_DEVICE_CONFIG(apogee_i8275_interface) |
| 131 | /* video hardware */ |
| 132 | MDRV_SCREEN_ADD("main", RASTER) |
| 133 | MDRV_SCREEN_REFRESH_RATE(50) |
| 134 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 135 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 136 | MDRV_SCREEN_SIZE(78*6, 30*10) |
| 137 | MDRV_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1) |
| 138 | MDRV_PALETTE_LENGTH(3) |
| 139 | MDRV_PALETTE_INIT(apogee) |
| 140 | |
| 141 | MDRV_VIDEO_START(generic_bitmapped) |
| 142 | MDRV_VIDEO_UPDATE(apogee) |
| 143 | |
| 144 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 145 | MDRV_SOUND_ADD(WAVE, 0) |
| 146 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 147 | MACHINE_DRIVER_END |
| 148 | |
| 149 | static void apogee_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 150 | { |
| 151 | /* cassette */ |
| 152 | switch(state) |
| 153 | { |
| 154 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 155 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 156 | case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE: info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break; |
| 157 | case MESS_DEVINFO_PTR_CASSETTE_FORMATS: info->p = (void *)rka_cassette_formats; break; |
| 158 | |
| 159 | default: cassette_device_getinfo(devclass, state, info); break; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | /* ROM definition */ |
| 164 | ROM_START( apogee ) |
| 165 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF ) |
| 166 | ROM_LOAD( "apogee.rom", 0xf000, 0x1000, CRC(a47383a7)) |
| 167 | ROM_REGION(0x0800, REGION_GFX1,0) |
| 168 | ROM_LOAD ("apogee.fnt", 0x0000, 0x0800, CRC(fe5867f0)) |
| 169 | ROM_END |
| 170 | |
| 171 | SYSTEM_CONFIG_START(apogee) |
| 172 | CONFIG_DEVICE(apogee_cassette_getinfo); |
| 173 | SYSTEM_CONFIG_END |
| 174 | |
| 175 | /* Driver */ |
| 176 | |
| 177 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 178 | COMP( 1989, apogee, radio86,0, apogee, apogee,apogee, apogee, "Zavod BRA", "Apogee BK-01", 0) |