src/mess/machine/74145.c
| r4357 | r4358 | |
| 53 | 53 | typedef struct _ttl74145_t ttl74145_t; |
| 54 | 54 | struct _ttl74145_t |
| 55 | 55 | { |
| 56 | devcb_resolved_write_line output_line_0; |
| 57 | devcb_resolved_write_line output_line_1; |
| 58 | devcb_resolved_write_line output_line_2; |
| 59 | devcb_resolved_write_line output_line_3; |
| 60 | devcb_resolved_write_line output_line_4; |
| 61 | devcb_resolved_write_line output_line_5; |
| 62 | devcb_resolved_write_line output_line_6; |
| 63 | devcb_resolved_write_line output_line_7; |
| 64 | devcb_resolved_write_line output_line_8; |
| 65 | devcb_resolved_write_line output_line_9; |
| 66 | |
| 56 | 67 | /* decoded number */ |
| 57 | 68 | int number; |
| 58 | 69 | }; |
| 59 | 70 | |
| 60 | 71 | |
| 72 | /***************************************************************************** |
| 73 | GLOBAL VARIABLES |
| 74 | *****************************************************************************/ |
| 75 | |
| 76 | const ttl74145_interface default_ttl74145 = |
| 77 | { |
| 78 | DEVCB_NULL, |
| 79 | DEVCB_NULL, |
| 80 | DEVCB_NULL, |
| 81 | DEVCB_NULL, |
| 82 | DEVCB_NULL, |
| 83 | DEVCB_NULL, |
| 84 | DEVCB_NULL, |
| 85 | DEVCB_NULL, |
| 86 | DEVCB_NULL, |
| 87 | DEVCB_NULL |
| 88 | }; |
| 89 | |
| 90 | |
| 61 | 91 | /*************************************************************************** |
| 62 | 92 | IMPLEMENTATION |
| 63 | 93 | ***************************************************************************/ |
| r4357 | r4358 | |
| 66 | 96 | { |
| 67 | 97 | assert(device != NULL); |
| 68 | 98 | assert(device->token != NULL); |
| 99 | assert(device->type == TTL74145); |
| 69 | 100 | |
| 70 | 101 | return (ttl74145_t *)device->token; |
| 71 | 102 | } |
| r4357 | r4358 | |
| 81 | 112 | /* call output callbacks if the number changed */ |
| 82 | 113 | if (new_number != ttl74145->number) |
| 83 | 114 | { |
| 84 | | const ttl74145_interface *i = device->static_config; |
| 85 | | |
| 86 | | if (i != NULL) |
| 87 | | { |
| 88 | | if (i->output_line_0) i->output_line_0(device, new_number == 0); |
| 89 | | if (i->output_line_1) i->output_line_1(device, new_number == 1); |
| 90 | | if (i->output_line_2) i->output_line_2(device, new_number == 2); |
| 91 | | if (i->output_line_3) i->output_line_3(device, new_number == 3); |
| 92 | | if (i->output_line_4) i->output_line_4(device, new_number == 4); |
| 93 | | if (i->output_line_5) i->output_line_5(device, new_number == 5); |
| 94 | | if (i->output_line_6) i->output_line_6(device, new_number == 6); |
| 95 | | if (i->output_line_7) i->output_line_7(device, new_number == 7); |
| 96 | | if (i->output_line_8) i->output_line_8(device, new_number == 8); |
| 97 | | if (i->output_line_9) i->output_line_9(device, new_number == 9); |
| 98 | | } |
| 115 | devcb_call_write_line(&ttl74145->output_line_0, new_number == 0); |
| 116 | devcb_call_write_line(&ttl74145->output_line_1, new_number == 1); |
| 117 | devcb_call_write_line(&ttl74145->output_line_2, new_number == 2); |
| 118 | devcb_call_write_line(&ttl74145->output_line_3, new_number == 3); |
| 119 | devcb_call_write_line(&ttl74145->output_line_4, new_number == 4); |
| 120 | devcb_call_write_line(&ttl74145->output_line_5, new_number == 5); |
| 121 | devcb_call_write_line(&ttl74145->output_line_6, new_number == 6); |
| 122 | devcb_call_write_line(&ttl74145->output_line_7, new_number == 7); |
| 123 | devcb_call_write_line(&ttl74145->output_line_8, new_number == 8); |
| 124 | devcb_call_write_line(&ttl74145->output_line_9, new_number == 9); |
| 99 | 125 | } |
| 100 | 126 | |
| 101 | 127 | /* update state */ |
| r4357 | r4358 | |
| 117 | 143 | |
| 118 | 144 | static DEVICE_START( ttl74145 ) |
| 119 | 145 | { |
| 146 | const ttl74145_interface *intf = device->static_config; |
| 120 | 147 | ttl74145_t *ttl74145 = get_safe_token(device); |
| 121 | 148 | |
| 122 | 149 | /* validate arguments */ |
| 123 | | assert(device != NULL); |
| 124 | | assert(device->tag != NULL); |
| 150 | assert(device->static_config != NULL); |
| 125 | 151 | |
| 126 | 152 | /* initialize with 0 */ |
| 127 | 153 | ttl74145->number = 0; |
| 128 | 154 | |
| 155 | /* resolve callbacks */ |
| 156 | devcb_resolve_write_line(&ttl74145->output_line_0, &intf->output_line_0, device); |
| 157 | devcb_resolve_write_line(&ttl74145->output_line_1, &intf->output_line_1, device); |
| 158 | devcb_resolve_write_line(&ttl74145->output_line_2, &intf->output_line_2, device); |
| 159 | devcb_resolve_write_line(&ttl74145->output_line_3, &intf->output_line_3, device); |
| 160 | devcb_resolve_write_line(&ttl74145->output_line_4, &intf->output_line_4, device); |
| 161 | devcb_resolve_write_line(&ttl74145->output_line_5, &intf->output_line_5, device); |
| 162 | devcb_resolve_write_line(&ttl74145->output_line_6, &intf->output_line_6, device); |
| 163 | devcb_resolve_write_line(&ttl74145->output_line_7, &intf->output_line_7, device); |
| 164 | devcb_resolve_write_line(&ttl74145->output_line_8, &intf->output_line_8, device); |
| 165 | devcb_resolve_write_line(&ttl74145->output_line_9, &intf->output_line_9, device); |
| 166 | |
| 129 | 167 | /* register for state saving */ |
| 130 | 168 | state_save_register_item(device->machine, "ttl74145", device->tag, 0, ttl74145->number); |
| 131 | 169 | } |
| r4357 | r4358 | |
| 165 | 203 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 166 | 204 | case DEVINFO_STR_NAME: strcpy(info->s, "TTL74145"); break; |
| 167 | 205 | case DEVINFO_STR_FAMILY: strcpy(info->s, "TTL74145"); break; |
| 168 | | case DEVINFO_STR_VERSION: strcpy(info->s, "1.1"); break; |
| 206 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.2"); break; |
| 169 | 207 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 170 | 208 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MESS Team"); break; |
| 171 | 209 | } |
src/mess/machine/74145.h
| r4357 | r4358 | |
| 1 | | /***************************************************************************** |
| 2 | | * |
| 3 | | * machine/74145.h |
| 4 | | * |
| 5 | | ****************************************************************************/ |
| 1 | /*************************************************************************** |
| 6 | 2 | |
| 7 | | #ifndef __TTL74145_H__ |
| 8 | | #define __TTL74145_H__ |
| 3 | TTL74145 |
| 9 | 4 | |
| 5 | BCD-to-Decimal decoder |
| 10 | 6 | |
| 11 | | /*************************************************************************** |
| 12 | | MACROS |
| 13 | 7 | ***************************************************************************/ |
| 14 | 8 | |
| 15 | | #define TTL74145 DEVICE_GET_INFO_NAME(ttl74145) |
| 9 | #ifndef __TTL74145_H__ |
| 10 | #define __TTL74145_H__ |
| 16 | 11 | |
| 12 | #include "devcb.h" |
| 17 | 13 | |
| 14 | |
| 18 | 15 | /*************************************************************************** |
| 19 | 16 | TYPE DEFINITIONS |
| 20 | 17 | ***************************************************************************/ |
| 21 | 18 | |
| 22 | | typedef void (*ttl74145_output_line_func)(const device_config *device, int state); |
| 23 | | #define TTL74145_OUTPUT_LINE(name) void name(const device_config *device, int state ) |
| 24 | | |
| 25 | | |
| 26 | | /* interface */ |
| 27 | 19 | typedef struct _ttl74145_interface ttl74145_interface; |
| 28 | 20 | struct _ttl74145_interface |
| 29 | 21 | { |
| 30 | | /* outputs */ |
| 31 | | ttl74145_output_line_func output_line_0; |
| 32 | | ttl74145_output_line_func output_line_1; |
| 33 | | ttl74145_output_line_func output_line_2; |
| 34 | | ttl74145_output_line_func output_line_3; |
| 35 | | ttl74145_output_line_func output_line_4; |
| 36 | | ttl74145_output_line_func output_line_5; |
| 37 | | ttl74145_output_line_func output_line_6; |
| 38 | | ttl74145_output_line_func output_line_7; |
| 39 | | ttl74145_output_line_func output_line_8; |
| 40 | | ttl74145_output_line_func output_line_9; |
| 22 | devcb_write_line output_line_0; |
| 23 | devcb_write_line output_line_1; |
| 24 | devcb_write_line output_line_2; |
| 25 | devcb_write_line output_line_3; |
| 26 | devcb_write_line output_line_4; |
| 27 | devcb_write_line output_line_5; |
| 28 | devcb_write_line output_line_6; |
| 29 | devcb_write_line output_line_7; |
| 30 | devcb_write_line output_line_8; |
| 31 | devcb_write_line output_line_9; |
| 41 | 32 | }; |
| 42 | 33 | |
| 43 | 34 | |
| r4357 | r4358 | |
| 57 | 48 | DEVICE CONFIGURATION MACROS |
| 58 | 49 | ***************************************************************************/ |
| 59 | 50 | |
| 60 | | #define MDRV_TTL74145_ADD(_tag) \ |
| 61 | | MDRV_DEVICE_ADD(_tag, TTL74145, 0) |
| 51 | #define TTL74145 DEVICE_GET_INFO_NAME(ttl74145) |
| 62 | 52 | |
| 63 | | #define MDRV_TTL74145_CONFIG(_intrf) \ |
| 64 | | MDRV_DEVICE_CONFIG(_intrf) |
| 53 | #define MDRV_TTL74145_ADD(_tag, _intf) \ |
| 54 | MDRV_DEVICE_ADD(_tag, TTL74145, 0) \ |
| 55 | MDRV_DEVICE_CONFIG(_intf) |
| 65 | 56 | |
| 66 | 57 | |
| 58 | /*************************************************************************** |
| 59 | DEFAULT INTERFACES |
| 60 | ***************************************************************************/ |
| 61 | |
| 62 | extern const ttl74145_interface default_ttl74145; |
| 63 | |
| 64 | |
| 67 | 65 | #endif /* __TTL74145_H__ */ |
src/mess/machine/sym1.c
| r4357 | r4358 | |
| 33 | 33 | ******************************************************************************/ |
| 34 | 34 | |
| 35 | 35 | |
| 36 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_0_w) |
| 36 | static WRITE_LINE_DEVICE_HANDLER( sym1_74145_output_0_w ) |
| 37 | 37 | { |
| 38 | 38 | if (state) timer_adjust_oneshot(led_update, LED_REFRESH_DELAY, 0); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | |
| 42 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_1_w) |
| 42 | static WRITE_LINE_DEVICE_HANDLER( sym1_74145_output_1_w ) |
| 43 | 43 | { |
| 44 | 44 | if (state) timer_adjust_oneshot(led_update, LED_REFRESH_DELAY, 1); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
| 48 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_2_w) |
| 48 | static WRITE_LINE_DEVICE_HANDLER( sym1_74145_output_2_w ) |
| 49 | 49 | { |
| 50 | 50 | if (state) timer_adjust_oneshot(led_update, LED_REFRESH_DELAY, 2); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
| 54 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_3_w) |
| 54 | static WRITE_LINE_DEVICE_HANDLER( sym1_74145_output_3_w ) |
| 55 | 55 | { |
| 56 | 56 | if (state) timer_adjust_oneshot(led_update, LED_REFRESH_DELAY, 3); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
| 60 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_4_w) |
| 60 | static WRITE_LINE_DEVICE_HANDLER( sym1_74145_output_4_w ) |
| 61 | 61 | { |
| 62 | 62 | if (state) timer_adjust_oneshot(led_update, LED_REFRESH_DELAY, 4); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | |
| 66 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_5_w) |
| 66 | static WRITE_LINE_DEVICE_HANDLER( sym1_74145_output_5_w ) |
| 67 | 67 | { |
| 68 | 68 | if (state) timer_adjust_oneshot(led_update, LED_REFRESH_DELAY, 5); |
| 69 | 69 | } |
| r4357 | r4358 | |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
| 78 | | /* The speaker is connected to output 6 of the 74145 */ |
| 79 | | static TTL74145_OUTPUT_LINE(sym1_74145_output_6_w) |
| 80 | | { |
| 81 | | const device_config *speaker = devtag_get_device(device->machine, SOUND, "speaker"); |
| 82 | | speaker_level_w(speaker, state); |
| 83 | | } |
| 84 | | |
| 85 | | |
| 86 | 78 | static UINT8 sym1_riot_a_r(const device_config *device, UINT8 olddata) |
| 87 | 79 | { |
| 88 | 80 | int data = 0x7f; |
| r4357 | r4358 | |
| 138 | 130 | riot_port_b = data; |
| 139 | 131 | |
| 140 | 132 | /* first 4 pins are connected to the 74145 */ |
| 141 | | ttl74145_w( (device_config*)devtag_get_device(device->machine, TTL74145, "ttl74145"), 0, data & 0x0f); |
| 133 | ttl74145_w(devtag_get_device(device->machine, TTL74145, "ttl74145"), 0, data & 0x0f); |
| 142 | 134 | } |
| 143 | 135 | |
| 144 | 136 | |
| r4357 | r4358 | |
| 153 | 145 | |
| 154 | 146 | const ttl74145_interface sym1_ttl74145_intf = |
| 155 | 147 | { |
| 156 | | sym1_74145_output_0_w, /* connected to DS0 */ |
| 157 | | sym1_74145_output_1_w, /* connected to DS1 */ |
| 158 | | sym1_74145_output_2_w, /* connected to DS2 */ |
| 159 | | sym1_74145_output_3_w, /* connected to DS3 */ |
| 160 | | sym1_74145_output_4_w, /* connected to DS4 */ |
| 161 | | sym1_74145_output_5_w, /* connected to DS5 */ |
| 162 | | sym1_74145_output_6_w, /* connected to the speaker */ |
| 163 | | NULL, /* not connected */ |
| 164 | | NULL, /* not connected */ |
| 165 | | NULL /* not connected */ |
| 148 | DEVCB_LINE(sym1_74145_output_0_w), /* connected to DS0 */ |
| 149 | DEVCB_LINE(sym1_74145_output_1_w), /* connected to DS1 */ |
| 150 | DEVCB_LINE(sym1_74145_output_2_w), /* connected to DS2 */ |
| 151 | DEVCB_LINE(sym1_74145_output_3_w), /* connected to DS3 */ |
| 152 | DEVCB_LINE(sym1_74145_output_4_w), /* connected to DS4 */ |
| 153 | DEVCB_LINE(sym1_74145_output_5_w), /* connected to DS5 */ |
| 154 | DEVCB_DEVICE_LINE(SOUND, "speaker", speaker_level_w), |
| 155 | DEVCB_NULL, /* not connected */ |
| 156 | DEVCB_NULL, /* not connected */ |
| 157 | DEVCB_NULL /* not connected */ |
| 166 | 158 | }; |
| 167 | 159 | |
| 168 | 160 | |
src/mess/drivers/acrnsys1.c
| r4357 | r4358 | |
| 8 | 8 | |
| 9 | 9 | ******************************************************************************/ |
| 10 | 10 | |
| 11 | | /* Core includes */ |
| 12 | 11 | #include "driver.h" |
| 13 | 12 | #include "cpu/m6502/m6502.h" |
| 14 | | |
| 15 | | /* Components */ |
| 16 | 13 | #include "machine/ins8154.h" |
| 17 | 14 | #include "machine/74145.h" |
| 18 | | |
| 19 | | /* Layout */ |
| 20 | 15 | #include "acrnsys1.lh" |
| 21 | 16 | |
| 22 | 17 | |
| 23 | | static UINT8 key_digit; |
| 18 | /*************************************************************************** |
| 19 | KEYBOARD HANDLING |
| 20 | ***************************************************************************/ |
| 24 | 21 | |
| 25 | | |
| 26 | 22 | static READ8_DEVICE_HANDLER( ins8154_b1_port_a_r ) |
| 27 | 23 | { |
| 28 | | UINT8 data; |
| 29 | | static const char *const keynames[] = { "keyboard_0", "keyboard_1", "keyboard_2", "keyboard_3", |
| 30 | | "keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7" }; |
| 24 | const device_config *ttl74145 = devtag_get_device(device->machine, TTL74145, "ic8_7445"); |
| 25 | UINT8 key_line = ttl74145_r(ttl74145, 0, 0); |
| 31 | 26 | |
| 32 | | data = input_port_read(device->machine, keynames[key_digit]); |
| 33 | | logerror("Reading %02x from row %d\n", data, key_digit); |
| 34 | | return data; |
| 27 | switch (key_line) |
| 28 | { |
| 29 | case 1 << 0: return input_port_read(device->machine, "keyboard_0"); |
| 30 | case 1 << 1: return input_port_read(device->machine, "keyboard_1"); |
| 31 | case 1 << 2: return input_port_read(device->machine, "keyboard_2"); |
| 32 | case 1 << 3: return input_port_read(device->machine, "keyboard_3"); |
| 33 | case 1 << 4: return input_port_read(device->machine, "keyboard_4"); |
| 34 | case 1 << 5: return input_port_read(device->machine, "keyboard_5"); |
| 35 | case 1 << 6: return input_port_read(device->machine, "keyboard_6"); |
| 36 | case 1 << 7: return input_port_read(device->machine, "keyboard_7"); |
| 37 | } |
| 38 | |
| 39 | /* should never reach this */ |
| 40 | return 0xff; |
| 35 | 41 | } |
| 36 | 42 | |
| 37 | 43 | static WRITE8_DEVICE_HANDLER( ins8154_b1_port_a_w ) |
| 38 | 44 | { |
| 39 | | ttl74145_w((device_config*)devtag_get_device(device->machine, TTL74145, "ttl74145"), 0, data & 0x07); |
| 45 | ttl74145_w(devtag_get_device(device->machine, TTL74145, "ic8_7445"), 0, data & 0x07); |
| 40 | 46 | } |
| 41 | 47 | |
| 42 | | static WRITE8_DEVICE_HANDLER( acrnsys1_led_segment_w ) |
| 43 | | { |
| 44 | | logerror("led %d segment data: %02x\n", key_digit, data); |
| 45 | 48 | |
| 46 | | output_set_digit_value(key_digit + 0, data); |
| 47 | | } |
| 49 | /*************************************************************************** |
| 50 | LED DISPLAY |
| 51 | ***************************************************************************/ |
| 48 | 52 | |
| 49 | | static const ins8154_interface ins8154_b1 = |
| 53 | static WRITE8_DEVICE_HANDLER( acrnsys1_led_segment_w ) |
| 50 | 54 | { |
| 51 | | ins8154_b1_port_a_r, |
| 52 | | NULL, |
| 53 | | ins8154_b1_port_a_w, |
| 54 | | acrnsys1_led_segment_w, |
| 55 | | NULL |
| 56 | | }; |
| 55 | const device_config *ttl74145 = devtag_get_device(device->machine, TTL74145, "ic8_7445"); |
| 56 | UINT8 key_line = ttl74145_r(ttl74145, 0, 0); |
| 57 | 57 | |
| 58 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_0_w ) { if (state) key_digit = 0; } |
| 59 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_1_w ) { if (state) key_digit = 1; } |
| 60 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_2_w ) { if (state) key_digit = 2; } |
| 61 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_3_w ) { if (state) key_digit = 3; } |
| 62 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_4_w ) { if (state) key_digit = 4; } |
| 63 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_5_w ) { if (state) key_digit = 5; } |
| 64 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_6_w ) { if (state) key_digit = 6; } |
| 65 | | static TTL74145_OUTPUT_LINE ( acrnsys1_7445_output_7_w ) { if (state) key_digit = 7; } |
| 66 | | |
| 67 | | static const ttl74145_interface ic8_7445 = |
| 68 | | { |
| 69 | | acrnsys1_7445_output_0_w, /* digit and keyboard column 0 */ |
| 70 | | acrnsys1_7445_output_1_w, /* digit and keyboard column 1 */ |
| 71 | | acrnsys1_7445_output_2_w, /* digit and keyboard column 2 */ |
| 72 | | acrnsys1_7445_output_3_w, /* digit and keyboard column 3 */ |
| 73 | | acrnsys1_7445_output_4_w, /* digit and keyboard column 4 */ |
| 74 | | acrnsys1_7445_output_5_w, /* digit and keyboard column 5 */ |
| 75 | | acrnsys1_7445_output_6_w, /* digit and keyboard column 6 */ |
| 76 | | acrnsys1_7445_output_7_w, /* digit and keyboard column 7 */ |
| 77 | | NULL, /* not connected */ |
| 78 | | NULL, /* not connected */ |
| 79 | | }; |
| 80 | | |
| 81 | | static DRIVER_INIT( acrnsys1 ) |
| 82 | | { |
| 58 | output_set_digit_value(key_line, data); |
| 83 | 59 | } |
| 84 | 60 | |
| 85 | | static MACHINE_RESET( acrnsys1 ) |
| 86 | | { |
| 87 | | } |
| 88 | 61 | |
| 62 | /*************************************************************************** |
| 63 | ADDRESS MAPS |
| 64 | ***************************************************************************/ |
| 89 | 65 | |
| 90 | | /****************************************************************************** |
| 91 | | Memory Maps |
| 92 | | ******************************************************************************/ |
| 93 | | |
| 94 | | |
| 95 | 66 | static ADDRESS_MAP_START( acrnsys1_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 96 | 67 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 97 | 68 | AM_RANGE(0x0e00, 0x0e7f) AM_MIRROR(0x100) AM_DEVREADWRITE(INS8154, "b1", ins8154_r, ins8154_w) |
| r4357 | r4358 | |
| 100 | 71 | ADDRESS_MAP_END |
| 101 | 72 | |
| 102 | 73 | |
| 74 | /*************************************************************************** |
| 75 | INPUT PORTS |
| 76 | ***************************************************************************/ |
| 103 | 77 | |
| 104 | | /****************************************************************************** |
| 105 | | Input Ports |
| 106 | | ******************************************************************************/ |
| 107 | | |
| 108 | | |
| 109 | 78 | static INPUT_PORTS_START( acrnsys1 ) |
| 110 | 79 | PORT_START("keyboard_0") |
| 111 | 80 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| r4357 | r4358 | |
| 171 | 140 | INPUT_PORTS_END |
| 172 | 141 | |
| 173 | 142 | |
| 143 | /*************************************************************************** |
| 144 | MACHINE DRIVERS |
| 145 | ***************************************************************************/ |
| 174 | 146 | |
| 175 | | /****************************************************************************** |
| 176 | | Machine Drivers |
| 177 | | ******************************************************************************/ |
| 147 | static const ins8154_interface ins8154_b1 = |
| 148 | { |
| 149 | ins8154_b1_port_a_r, |
| 150 | NULL, |
| 151 | ins8154_b1_port_a_w, |
| 152 | acrnsys1_led_segment_w, |
| 153 | NULL |
| 154 | }; |
| 178 | 155 | |
| 179 | | |
| 180 | 156 | static MACHINE_DRIVER_START( acrnsys1 ) |
| 181 | 157 | /* basic machine hardware */ |
| 182 | 158 | MDRV_CPU_ADD("maincpu", M6502, 1008000) /* 1.008 MHz */ |
| 183 | 159 | MDRV_CPU_PROGRAM_MAP(acrnsys1_map, 0) |
| 184 | 160 | |
| 185 | | MDRV_MACHINE_RESET(acrnsys1) |
| 186 | | |
| 187 | 161 | MDRV_DEFAULT_LAYOUT(layout_acrnsys1) |
| 188 | 162 | |
| 189 | 163 | /* devices */ |
| 190 | 164 | MDRV_INS8154_ADD("b1", ins8154_b1) |
| 191 | | MDRV_TTL74145_ADD("ttl74145") |
| 192 | | MDRV_TTL74145_CONFIG(ic8_7445) |
| 165 | MDRV_TTL74145_ADD("ic8_7445", default_ttl74145) |
| 193 | 166 | MACHINE_DRIVER_END |
| 194 | 167 | |
| 195 | 168 | |
| 169 | /*************************************************************************** |
| 170 | ROM DEFINITIONS |
| 171 | ***************************************************************************/ |
| 196 | 172 | |
| 197 | | /****************************************************************************** |
| 198 | | ROM Definitions |
| 199 | | ******************************************************************************/ |
| 200 | | |
| 201 | | |
| 202 | 173 | ROM_START( acrnsys1 ) |
| 203 | 174 | ROM_REGION(0x10000, "maincpu", 0) |
| 204 | 175 | ROM_LOAD("acrnsys1.bin", 0xfe00, 0x0200, CRC(43dcfc16) SHA1(b987354c55beb5e2ced761970c3339b895a8c09d)) |
| r4357 | r4358 | |
| 208 | 179 | ROM_END |
| 209 | 180 | |
| 210 | 181 | |
| 182 | /*************************************************************************** |
| 183 | GAME DRIVERS |
| 184 | ***************************************************************************/ |
| 211 | 185 | |
| 212 | | /****************************************************************************** |
| 213 | | System Config |
| 214 | | ******************************************************************************/ |
| 215 | | |
| 216 | | |
| 217 | | static SYSTEM_CONFIG_START( acrnsys1 ) |
| 218 | | SYSTEM_CONFIG_END |
| 219 | | |
| 220 | | |
| 221 | | |
| 222 | | /****************************************************************************** |
| 223 | | Drivers |
| 224 | | ******************************************************************************/ |
| 225 | | |
| 226 | | |
| 227 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 228 | | COMP( 1978, acrnsys1, 0, 0, acrnsys1, acrnsys1, acrnsys1, acrnsys1, "Acorn", "System 1", GAME_NOT_WORKING ) |
| 186 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 187 | COMP( 1978, acrnsys1, 0, 0, acrnsys1, acrnsys1, 0, 0, "Acorn", "System 1", GAME_NOT_WORKING ) |