src/lib/formats/x07_cas.c
| r0 | r14873 | |
| 1 | /******************************************************************** |
| 2 | |
| 3 | Support for Canon X-07 cassette images |
| 4 | |
| 5 | ********************************************************************/ |
| 6 | |
| 7 | #include "x07_cas.h" |
| 8 | |
| 9 | #define WAVEENTRY_LOW -32768 |
| 10 | #define WAVEENTRY_HIGH 32767 |
| 11 | |
| 12 | #define X07_WAV_FREQUENCY 4800 |
| 13 | #define X07_TIMER_FREQUENCY 1200 |
| 14 | #define X07_BIT_LENGTH (X07_WAV_FREQUENCY/X07_TIMER_FREQUENCY) |
| 15 | #define X07_HEADER_BYTES 16 |
| 16 | |
| 17 | // image size |
| 18 | static int x07_image_size; |
| 19 | |
| 20 | static int x07_put_samples(INT16 *buffer, int sample_pos, int count, int level) |
| 21 | { |
| 22 | if (buffer) |
| 23 | { |
| 24 | for (int i=0; i<count; i++) |
| 25 | buffer[sample_pos + i] = level; |
| 26 | } |
| 27 | |
| 28 | return count; |
| 29 | } |
| 30 | |
| 31 | static int x07_output_bit(INT16 *buffer, int sample_pos, UINT8 bit) |
| 32 | { |
| 33 | int samples = 0; |
| 34 | |
| 35 | if (bit) |
| 36 | { |
| 37 | samples += x07_put_samples(buffer, sample_pos + samples, X07_BIT_LENGTH/4, WAVEENTRY_HIGH); |
| 38 | samples += x07_put_samples(buffer, sample_pos + samples, X07_BIT_LENGTH/4, WAVEENTRY_LOW); |
| 39 | samples += x07_put_samples(buffer, sample_pos + samples, X07_BIT_LENGTH/4, WAVEENTRY_HIGH); |
| 40 | samples += x07_put_samples(buffer, sample_pos + samples, X07_BIT_LENGTH/4, WAVEENTRY_LOW); |
| 41 | } |
| 42 | else |
| 43 | { |
| 44 | samples += x07_put_samples(buffer, sample_pos + samples, X07_BIT_LENGTH/2, WAVEENTRY_HIGH); |
| 45 | samples += x07_put_samples(buffer, sample_pos + samples, X07_BIT_LENGTH/2, WAVEENTRY_LOW); |
| 46 | } |
| 47 | |
| 48 | return samples; |
| 49 | } |
| 50 | |
| 51 | static int x07_output_byte(INT16 *buffer, int sample_pos, UINT8 byte) |
| 52 | { |
| 53 | int samples = 0; |
| 54 | |
| 55 | /* start */ |
| 56 | samples += x07_output_bit (buffer, sample_pos + samples, 0); |
| 57 | |
| 58 | /* data */ |
| 59 | for (int i=0; i<8; i++) |
| 60 | samples += x07_output_bit(buffer,sample_pos + samples, (byte>>i) & 0x01); |
| 61 | |
| 62 | /* stop */ |
| 63 | samples += x07_output_bit (buffer, sample_pos + samples, 1); |
| 64 | samples += x07_output_bit (buffer, sample_pos + samples, 1); |
| 65 | samples += x07_output_bit (buffer, sample_pos + samples, 1); |
| 66 | |
| 67 | return samples; |
| 68 | } |
| 69 | |
| 70 | static int x07_handle_cassette(INT16 *buffer, const UINT8 *bytes) |
| 71 | { |
| 72 | int sample_count = 0; |
| 73 | int img_start = 0; |
| 74 | |
| 75 | /* start */ |
| 76 | for (int i=0; i<X07_WAV_FREQUENCY; i++) |
| 77 | sample_count += x07_output_bit(buffer, sample_count, 1); |
| 78 | |
| 79 | /* header */ |
| 80 | if (bytes[0] == 0xd3 && bytes[1] == 0xd3 && bytes[2] == 0xd3 && bytes[3] == 0xd3) |
| 81 | { |
| 82 | // valid header |
| 83 | for (int i=0; i<X07_HEADER_BYTES; i++) |
| 84 | sample_count += x07_output_byte(buffer, sample_count, bytes[i]); |
| 85 | |
| 86 | img_start = X07_HEADER_BYTES; |
| 87 | } |
| 88 | else |
| 89 | { |
| 90 | // remove the NULL chars at start |
| 91 | while (!bytes[img_start]) |
| 92 | img_start++; |
| 93 | |
| 94 | // insert 0xd3 bytes |
| 95 | for (int i=0; i<10; i++) |
| 96 | sample_count += x07_output_byte(buffer, sample_count, 0xd3); |
| 97 | |
| 98 | // fake filename |
| 99 | for (int i=0; i<6; i++) |
| 100 | sample_count += x07_output_byte(buffer, sample_count, 'A'); |
| 101 | } |
| 102 | |
| 103 | /* pause */ |
| 104 | for (int i=0; i<X07_WAV_FREQUENCY/16; i++) |
| 105 | sample_count += x07_output_bit(buffer, sample_count, 1); |
| 106 | |
| 107 | /* data */ |
| 108 | for (int i=img_start; i<x07_image_size; i++) |
| 109 | sample_count += x07_output_byte(buffer, sample_count, bytes[i]); |
| 110 | |
| 111 | /* end */ |
| 112 | for (int i=0; i<X07_WAV_FREQUENCY/8; i++) |
| 113 | sample_count += x07_output_bit(buffer, sample_count, 1); |
| 114 | |
| 115 | return sample_count; |
| 116 | } |
| 117 | |
| 118 | |
| 119 | /******************************************************************* |
| 120 | Generate samples for the tape image |
| 121 | ********************************************************************/ |
| 122 | |
| 123 | static int x07_cassette_fill_wave(INT16 *buffer, int length, UINT8 *bytes) |
| 124 | { |
| 125 | return x07_handle_cassette(buffer, bytes); |
| 126 | } |
| 127 | |
| 128 | /******************************************************************* |
| 129 | Calculate the number of samples needed for this tape image |
| 130 | ********************************************************************/ |
| 131 | |
| 132 | static int x07_cassette_calculate_size_in_samples(const UINT8 *bytes, int length) |
| 133 | { |
| 134 | x07_image_size = length; |
| 135 | |
| 136 | return x07_handle_cassette(NULL, bytes); |
| 137 | } |
| 138 | |
| 139 | static const struct CassetteLegacyWaveFiller x07_legacy_fill_wave = |
| 140 | { |
| 141 | x07_cassette_fill_wave, /* fill_wave */ |
| 142 | -1, /* chunk_size */ |
| 143 | 0, /* chunk_samples */ |
| 144 | x07_cassette_calculate_size_in_samples, /* chunk_sample_calc */ |
| 145 | X07_WAV_FREQUENCY, /* sample_frequency */ |
| 146 | 0, /* header_samples */ |
| 147 | 0 /* trailer_samples */ |
| 148 | }; |
| 149 | |
| 150 | static casserr_t x07_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts) |
| 151 | { |
| 152 | return cassette_legacy_identify(cassette, opts, &x07_legacy_fill_wave); |
| 153 | } |
| 154 | |
| 155 | static casserr_t x07_cassette_load(cassette_image *cassette) |
| 156 | { |
| 157 | return cassette_legacy_construct(cassette, &x07_legacy_fill_wave); |
| 158 | } |
| 159 | |
| 160 | static const struct CassetteFormat x07_cassette_image_format = |
| 161 | { |
| 162 | "k7,lst,cas", |
| 163 | x07_cassette_identify, |
| 164 | x07_cassette_load, |
| 165 | NULL |
| 166 | }; |
| 167 | |
| 168 | CASSETTE_FORMATLIST_START(x07_cassette_formats) |
| 169 | CASSETTE_FORMAT(x07_cassette_image_format) |
| 170 | CASSETTE_FORMATLIST_END |
src/mess/drivers/x07.c
| r14872 | r14873 | |
| 9 | 9 | - better emulation of the i/o ports |
| 10 | 10 | - external video (need X-720 dump) |
| 11 | 11 | - serial port |
| 12 | | - load/save cassette in wav format |
| 13 | 12 | |
| 14 | 13 | Memory Map |
| 15 | 14 | |
| r14872 | r14873 | |
| 28 | 27 | ****************************************************************************/ |
| 29 | 28 | |
| 30 | 29 | |
| 31 | | #include "emu.h" |
| 32 | | #include "cpu/z80/z80.h" |
| 33 | | #include "sound/beep.h" |
| 34 | 30 | #include "includes/x07.h" |
| 35 | | #include "imagedev/printer.h" |
| 36 | | #include "imagedev/cartslot.h" |
| 37 | | #include "machine/ram.h" |
| 38 | | #include "rendlay.h" |
| 39 | 31 | |
| 40 | 32 | /*************************************************************************** |
| 41 | 33 | T6834 IMPLEMENTATION |
| r14872 | r14873 | |
| 663 | 655 | } |
| 664 | 656 | } |
| 665 | 657 | |
| 666 | | |
| 667 | 658 | void x07_state::cassette_r() |
| 668 | 659 | { |
| 669 | | if (m_k7size && m_k7on && (m_k7pos<m_k7size)) |
| 660 | m_regs_r[6] &= ~2; |
| 661 | } |
| 662 | |
| 663 | void x07_state::cassette_w() |
| 664 | { |
| 665 | m_regs_r[6] &= ~1; |
| 666 | m_cass_data = m_regs_w[7]; |
| 667 | } |
| 668 | |
| 669 | static TIMER_CALLBACK( cassette_tick ) |
| 670 | { |
| 671 | x07_state *state = machine.driver_data<x07_state>(); |
| 672 | state->m_cass_clk++; |
| 673 | } |
| 674 | |
| 675 | static TIMER_CALLBACK( cassette_poll ) |
| 676 | { |
| 677 | x07_state *state = machine.driver_data<x07_state>(); |
| 678 | |
| 679 | if ((state->m_cassette->get_state() & 0x03) == CASSETTE_PLAY) |
| 680 | state->cassette_load(); |
| 681 | else if ((state->m_cassette->get_state() & 0x03) == CASSETTE_RECORD) |
| 682 | state->cassette_save(); |
| 683 | } |
| 684 | |
| 685 | void x07_state::cassette_load() |
| 686 | { |
| 687 | int cass = (m_cassette->input() >= 0) ? +1 : -1; |
| 688 | if (cass > 0 && m_cass_state < 0) |
| 670 | 689 | { |
| 671 | | m_regs_r[6] |= 2; |
| 672 | | m_regs_r[7] = m_k7data[m_k7pos++]; |
| 690 | if ((m_cass_clk & 0x7f) >= 4 && (m_cass_clk & 0x7f) <= 6) |
| 691 | { |
| 692 | if (m_cass_clk & 0x80) |
| 693 | { |
| 694 | m_cass_clk = 0; |
| 695 | receive_bit(1); |
| 696 | } |
| 697 | else |
| 698 | { |
| 699 | m_cass_clk = 0x80; |
| 700 | } |
| 701 | } |
| 702 | else if ((m_cass_clk & 0x7f) >= 9 && (m_cass_clk & 0x7f) <= 11) |
| 703 | { |
| 704 | m_cass_clk = 0; |
| 705 | receive_bit(0); |
| 706 | } |
| 707 | else |
| 708 | { |
| 709 | m_cass_clk = 0; |
| 710 | logerror("Invalid data: %d %f\n", (m_cass_clk & 0x7f), m_cassette->get_position()); |
| 711 | } |
| 673 | 712 | |
| 674 | | popmessage("%04x//%04x", m_k7pos, m_k7size); |
| 713 | m_cass_tick->adjust(attotime::from_hz(12000), 0, attotime::from_hz(12000)); |
| 714 | } |
| 675 | 715 | |
| 676 | | m_k7irq->adjust(attotime::from_msec(2)); |
| 677 | | } |
| 716 | m_cass_state = cass; |
| 678 | 717 | } |
| 679 | 718 | |
| 680 | 719 | |
| 681 | | void x07_state::cassette_w() |
| 720 | void x07_state::cassette_save() |
| 682 | 721 | { |
| 683 | | //TODO |
| 722 | int cass = m_cass_state; |
| 723 | |
| 724 | if (m_cass_clk % 10 == 0) |
| 725 | { |
| 726 | |
| 727 | if (m_bit_count < 4) |
| 728 | { |
| 729 | switch (m_bit_count & 3) |
| 730 | { |
| 731 | case 0: case 1: cass = +1; break; |
| 732 | case 2: case 3: cass = -1; break; |
| 733 | } |
| 734 | |
| 735 | m_bit_count++; |
| 736 | } |
| 737 | else if (m_bit_count < 36) |
| 738 | { |
| 739 | switch (m_bit_count & 3) |
| 740 | { |
| 741 | case 0: cass = +1; break; |
| 742 | case 1: cass = (m_cass_data & 1) ? -1 : +1; break; |
| 743 | case 2: cass = (m_cass_data & 1) ? +1 : -1; break; |
| 744 | case 3: cass = -1; m_cass_data >>= 1; break; |
| 745 | } |
| 746 | |
| 747 | m_bit_count++; |
| 748 | } |
| 749 | else if (m_bit_count < 48) |
| 750 | { |
| 751 | switch (m_bit_count & 3) |
| 752 | { |
| 753 | case 0: case 2: cass = +1; break; |
| 754 | case 1: case 3: cass = -1; break; |
| 755 | } |
| 756 | |
| 757 | if (m_bit_count == 47) |
| 758 | m_regs_r[6] |= 1; |
| 759 | |
| 760 | m_bit_count++; |
| 761 | } |
| 762 | else |
| 763 | { |
| 764 | cass = (m_cass_state > 0) ? -1 : +1; |
| 765 | } |
| 766 | |
| 767 | m_cassette->output( cass ); |
| 768 | } |
| 769 | |
| 770 | // finish the current cycle before start the next |
| 771 | if ((m_cass_state <= 0) && !(m_regs_r[6] & 1) && m_bit_count >= 48) |
| 772 | m_bit_count = 0; |
| 773 | |
| 774 | m_cass_state = cass; |
| 775 | m_cass_clk++; |
| 684 | 776 | } |
| 685 | 777 | |
| 778 | void x07_state::receive_bit(int bit) |
| 779 | { |
| 780 | if (m_bit_count == 0) |
| 781 | { |
| 782 | // wait for start bit |
| 783 | if (bit == 0) |
| 784 | m_bit_count++; |
| 785 | } |
| 786 | else if (m_bit_count < 9) |
| 787 | { |
| 788 | m_cass_data = (m_cass_data>>1) | (bit<<7); |
| 789 | m_bit_count++; |
| 790 | } |
| 791 | else if (m_bit_count < 12) |
| 792 | { |
| 793 | if (bit != 1) |
| 794 | logerror("Invalid stop bit: %f\n", m_cassette->get_position()); |
| 686 | 795 | |
| 796 | m_bit_count++; |
| 797 | } |
| 798 | |
| 799 | // every byte take 12 bit |
| 800 | if (m_bit_count == 12) |
| 801 | { |
| 802 | //printf("data: %02x %f\n", m_cass_data, m_cassette->get_position()); |
| 803 | m_regs_r[6] |= 2; |
| 804 | m_regs_r[7] = m_cass_data; |
| 805 | m_cass_data = 0; |
| 806 | m_bit_count = 0; |
| 807 | |
| 808 | device_set_input_line(m_maincpu, NSC800_RSTB, ASSERT_LINE); |
| 809 | m_rstb_clear->adjust(attotime::from_usec(200)); |
| 810 | |
| 811 | } |
| 812 | } |
| 813 | |
| 814 | |
| 687 | 815 | /**************************************************** |
| 688 | 816 | this function emulate the color printer X-710 |
| 689 | 817 | only the text functions are emulated |
| r14872 | r14873 | |
| 910 | 1038 | } |
| 911 | 1039 | } |
| 912 | 1040 | |
| 913 | | |
| 914 | | static DEVICE_IMAGE_LOAD( x07_cass ) |
| 915 | | { |
| 916 | | running_machine &machine = image.device().machine(); |
| 917 | | x07_state *state = machine.driver_data<x07_state>(); |
| 918 | | UINT8 *tmp_data; |
| 919 | | UINT32 image_size; |
| 920 | | char *basename = (char*)image.basename(); |
| 921 | | |
| 922 | | if (image.software_entry() == NULL) |
| 923 | | { |
| 924 | | image_size = image.length(); |
| 925 | | tmp_data = auto_alloc_array(machine, UINT8, image_size); |
| 926 | | image.fread(tmp_data, image_size); |
| 927 | | } |
| 928 | | else |
| 929 | | { |
| 930 | | image_size = image.get_software_region_length("k7"); |
| 931 | | tmp_data = auto_alloc_array(machine, UINT8, image_size); |
| 932 | | memcpy(tmp_data, image.get_software_region("k7"), image_size); |
| 933 | | } |
| 934 | | |
| 935 | | if (tmp_data[0] == 0xd3 && tmp_data[1] == 0xd3) |
| 936 | | { |
| 937 | | //image should be valid |
| 938 | | state->m_k7data = auto_alloc_array(machine, UINT8, image_size); |
| 939 | | memcpy(state->m_k7data, tmp_data, image_size); |
| 940 | | state->m_k7size = image_size; |
| 941 | | } |
| 942 | | else |
| 943 | | { |
| 944 | | UINT8 *img_data = tmp_data; |
| 945 | | |
| 946 | | //remove the NULL chars at start |
| 947 | | while (!img_data[0]) |
| 948 | | { |
| 949 | | image_size--; |
| 950 | | img_data++; |
| 951 | | } |
| 952 | | |
| 953 | | //allocate the required space |
| 954 | | state->m_k7data = auto_alloc_array(machine, UINT8, image_size + 0x10); |
| 955 | | |
| 956 | | //insert the sync bytes |
| 957 | | for(int i=0; i<10; i++) |
| 958 | | state->m_k7data[i] = 0xd3; |
| 959 | | |
| 960 | | //empty the name area |
| 961 | | memset(state->m_k7data + 0x0a, 0x00, 6); |
| 962 | | |
| 963 | | //copy basename in the name area |
| 964 | | for(int i=0; i<6; i++) |
| 965 | | { |
| 966 | | if (basename[i] == 0 || basename[i] == '.') |
| 967 | | break; |
| 968 | | state->m_k7data[10 + i] = basename[i]; |
| 969 | | } |
| 970 | | |
| 971 | | memcpy(state->m_k7data + 0x10, img_data, image_size); |
| 972 | | state->m_k7size = image_size + 0x10; |
| 973 | | } |
| 974 | | |
| 975 | | state->m_k7pos = 0; |
| 976 | | auto_free(machine, tmp_data); |
| 977 | | return IMAGE_INIT_PASS; |
| 978 | | } |
| 979 | | |
| 980 | | |
| 981 | | static DEVICE_IMAGE_UNLOAD( x07_cass ) |
| 982 | | { |
| 983 | | running_machine &machine = image.device().machine(); |
| 984 | | x07_state *state = machine.driver_data<x07_state>(); |
| 985 | | |
| 986 | | auto_free(machine, state->m_k7data); |
| 987 | | state->m_k7size = state->m_k7pos = 0; |
| 988 | | } |
| 989 | | |
| 990 | | |
| 991 | 1041 | static DEVICE_IMAGE_LOAD( x07_card ) |
| 992 | 1042 | { |
| 993 | 1043 | running_machine &machine = image.device().machine(); |
| r14872 | r14873 | |
| 1081 | 1131 | data = 0x00; |
| 1082 | 1132 | break; |
| 1083 | 1133 | case 0xf6: |
| 1084 | | if (m_k7on) m_regs_r[6] |= 5; |
| 1134 | if (m_cass_motor) m_regs_r[6] |= 4; |
| 1085 | 1135 | //fall through |
| 1086 | 1136 | case 0xf0: |
| 1087 | 1137 | case 0xf1: |
| r14872 | r14873 | |
| 1124 | 1174 | |
| 1125 | 1175 | case 0xf4: |
| 1126 | 1176 | m_regs_r[4] = m_regs_w[4] = data; |
| 1127 | | m_k7on = ((data & 0x0c) == 0x08) ? 1 : 0; |
| 1177 | m_cass_motor = ((data & 0x0d) == 0x09) ? 1 : 0; |
| 1128 | 1178 | |
| 1179 | if (m_cass_motor) |
| 1180 | { |
| 1181 | m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); |
| 1182 | m_cass_poll->adjust(attotime::from_hz(48000), 0, attotime::from_hz(48000)); |
| 1183 | } |
| 1184 | else |
| 1185 | { |
| 1186 | m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR); |
| 1187 | m_cass_poll->reset(); |
| 1188 | m_cass_tick->reset(); |
| 1189 | } |
| 1190 | |
| 1129 | 1191 | #if(1) |
| 1130 | 1192 | if((data & 0x0e) == 0x0e) |
| 1131 | 1193 | { |
| r14872 | r14873 | |
| 1327 | 1389 | beep_set_state(state->m_beep, 0); |
| 1328 | 1390 | } |
| 1329 | 1391 | |
| 1330 | | static TIMER_CALLBACK( k7_irq ) |
| 1331 | | { |
| 1332 | | x07_state *state = machine.driver_data<x07_state>(); |
| 1333 | | |
| 1334 | | device_set_input_line(state->m_maincpu, NSC800_RSTB, ASSERT_LINE); |
| 1335 | | |
| 1336 | | state->m_rstb_clear->adjust(attotime::from_usec(200)); |
| 1337 | | } |
| 1338 | | |
| 1339 | 1392 | static const gfx_layout x07_charlayout = |
| 1340 | 1393 | { |
| 1341 | 1394 | 6, 8, /* 6 x 8 characters */ |
| r14872 | r14873 | |
| 1356 | 1409 | m_rsta_clear = machine().scheduler().timer_alloc(FUNC(rsta_clear)); |
| 1357 | 1410 | m_rstb_clear = machine().scheduler().timer_alloc(FUNC(rstb_clear)); |
| 1358 | 1411 | m_beep_stop = machine().scheduler().timer_alloc(FUNC(beep_stop)); |
| 1359 | | m_k7irq = machine().scheduler().timer_alloc(FUNC(k7_irq)); |
| 1412 | m_cass_poll = machine().scheduler().timer_alloc(FUNC(cassette_poll)); |
| 1413 | m_cass_tick = machine().scheduler().timer_alloc(FUNC(cassette_tick)); |
| 1360 | 1414 | |
| 1361 | 1415 | /* Save State */ |
| 1362 | 1416 | save_item(NAME(m_sleep)); |
| r14872 | r14873 | |
| 1375 | 1429 | save_item(NAME(m_prn_sendbit)); |
| 1376 | 1430 | save_item(NAME(m_prn_char_code)); |
| 1377 | 1431 | save_item(NAME(m_prn_size)); |
| 1378 | | save_item(NAME(m_k7on)); |
| 1379 | | save_item(NAME(m_k7size)); |
| 1380 | | save_item(NAME(m_k7pos)); |
| 1432 | save_item(NAME(m_cass_motor)); |
| 1433 | save_item(NAME(m_cass_data)); |
| 1434 | save_item(NAME(m_cass_clk)); |
| 1435 | save_item(NAME(m_cass_state)); |
| 1436 | save_item(NAME(m_bit_count)); |
| 1381 | 1437 | save_item(NAME(m_t6834_ram)); |
| 1382 | 1438 | save_item(NAME(m_regs_r)); |
| 1383 | 1439 | save_item(NAME(m_regs_w)); |
| 1384 | 1440 | save_item(NAME(m_alarm)); |
| 1385 | 1441 | save_item(NAME(m_lcd_map)); |
| 1386 | 1442 | save_item(NAME(m_prn_buffer)); |
| 1387 | | save_pointer(NAME(m_k7data), m_k7size); |
| 1388 | 1443 | save_item(NAME(m_in.read)); |
| 1389 | 1444 | save_item(NAME(m_in.write)); |
| 1390 | 1445 | save_item(NAME(m_in.data)); |
| r14872 | r14873 | |
| 1437 | 1492 | cpu_set_reg(m_maincpu, Z80_PC, 0xc3c3); |
| 1438 | 1493 | } |
| 1439 | 1494 | |
| 1495 | static const cassette_interface x07_cassette_interface = |
| 1496 | { |
| 1497 | x07_cassette_formats, |
| 1498 | NULL, |
| 1499 | (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), |
| 1500 | "x07_cass", |
| 1501 | NULL |
| 1502 | }; |
| 1503 | |
| 1440 | 1504 | static MACHINE_CONFIG_START( x07, x07_state ) |
| 1441 | 1505 | |
| 1442 | 1506 | /* basic machine hardware */ |
| r14872 | r14873 | |
| 1459 | 1523 | /* sound hardware */ |
| 1460 | 1524 | MCFG_SPEAKER_STANDARD_MONO( "mono" ) |
| 1461 | 1525 | MCFG_SOUND_ADD( BEEPER_TAG, BEEP, 0 ) |
| 1462 | | MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) |
| 1526 | MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 0.50 ) |
| 1527 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 1528 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1463 | 1529 | |
| 1464 | 1530 | /* printer */ |
| 1465 | 1531 | MCFG_PRINTER_ADD("printer") |
| r14872 | r14873 | |
| 1486 | 1552 | MCFG_CARTSLOT_INTERFACE("x07_card") |
| 1487 | 1553 | |
| 1488 | 1554 | /* cassette */ |
| 1489 | | MCFG_CARTSLOT_ADD("cassette") |
| 1490 | | MCFG_CARTSLOT_EXTENSION_LIST("k7,cas,lst") |
| 1491 | | MCFG_CARTSLOT_NOT_MANDATORY |
| 1492 | | MCFG_CARTSLOT_LOAD(x07_cass) |
| 1493 | | MCFG_CARTSLOT_UNLOAD(x07_cass) |
| 1494 | | MCFG_CARTSLOT_INTERFACE("x07_cass") |
| 1555 | MCFG_CASSETTE_ADD( CASSETTE_TAG, x07_cassette_interface ) |
| 1495 | 1556 | |
| 1496 | 1557 | /* Software lists */ |
| 1497 | 1558 | MCFG_SOFTWARE_LIST_ADD("card_list", "x07_card") |