src/mess/drivers/amstrad.c
| r1250 | r1251 | |
| 18 | 18 | Kevin Thacker [MESS driver] |
| 19 | 19 | |
| 20 | 20 | May-June 2004 - Yoann Courtois (aka Papagayo/ex GMC/ex PARADOX) - rewritting some code with hardware documentation from http://andercheran.aiind.upv.es/~amstrad |
| 21 | | |
| 21 | |
| 22 | 22 | June 2006 - Very preliminary CPC+ support. CPR cart image handling, secondary ROM register, ASIC unlock detection |
| 23 | | Supported: |
| 24 | | 12-bit palette, |
| 23 | Supported: |
| 24 | 12-bit palette, |
| 25 | 25 | 12-bit hardware sprites (largely works from what I've seen, some games have display issues), |
| 26 | | Programmable Raster Interrupt (seems to work), |
| 26 | Programmable Raster Interrupt (seems to work), |
| 27 | 27 | Split screen registers, |
| 28 | 28 | Soft scroll registers (only byte-by-byre horizontally for now), |
| 29 | 29 | Analogue controls (may well be completely wrong, I have no idea on how these should work), |
| r1250 | r1251 | |
| 115 | 115 | int amstrad_plus_scroll_border; // soft scroll - extend border, any program that uses soft scrolling should enable this |
| 116 | 116 | int amstrad_plus_dma_status; |
| 117 | 117 | int amstrad_plus_dma_0_addr; // DMA channel address |
| 118 | | int amstrad_plus_dma_1_addr; |
| 119 | | int amstrad_plus_dma_2_addr; |
| 118 | int amstrad_plus_dma_1_addr; |
| 119 | int amstrad_plus_dma_2_addr; |
| 120 | 120 | int amstrad_plus_dma_prescaler[3]; // DMA channel prescaler |
| 121 | 121 | int amstrad_plus_dma_clear; // set if DMA interrupts are to be cleared automatically |
| 122 | 122 | |
| r1250 | r1251 | |
| 151 | 151 | ------------------*/ |
| 152 | 152 | /* current selected upper rom */ |
| 153 | 153 | static unsigned char *Amstrad_UpperRom; |
| 154 | | /* There are 8 different ram configurations which work on the currently selected 64k logical block. |
| 154 | /* There are 8 different ram configurations which work on the currently selected 64k logical block. |
| 155 | 155 | The following tables show the possible ram configurations :*/ |
| 156 | 156 | static int RamConfigurations[8 * 4] = |
| 157 | 157 | { |
| r1250 | r1251 | |
| 185 | 185 | static int multiface_hardware_enabled(void); |
| 186 | 186 | static void multiface_reset(void); |
| 187 | 187 | /* --------------------------------------- |
| 188 | | - 27.05.2004 - PSG function selection - |
| 188 | - 27.05.2004 - PSG function selection - |
| 189 | 189 | --------------------------------------- |
| 190 | 190 | The databus of the PSG is connected to PPI Port A. |
| 191 | | Data is read from/written to the PSG through this port. |
| 191 | Data is read from/written to the PSG through this port. |
| 192 | 192 | |
| 193 | | The PSG function, defined by the BC1,BC2 and BDIR signals, is controlled by bit 7 and bit 6 of PPI Port C. |
| 193 | The PSG function, defined by the BC1,BC2 and BDIR signals, is controlled by bit 7 and bit 6 of PPI Port C. |
| 194 | 194 | |
| 195 | 195 | PSG function selection: |
| 196 | 196 | ----------------------- |
| 197 | | Function |
| 197 | Function |
| 198 | 198 | |
| 199 | 199 | BDIR = PPI Port C Bit 7 and BC1 = PPI Port C Bit 6 |
| 200 | 200 | |
| 201 | | PPI Port C Bit | PSG Function |
| 202 | | BDIR BC1 | |
| 203 | | 0 0 | Inactive |
| 201 | PPI Port C Bit | PSG Function |
| 202 | BDIR BC1 | |
| 203 | 0 0 | Inactive |
| 204 | 204 | 0 1 | Read from selected PSG register. When function is set, the PSG will make the register data available to PPI Port A |
| 205 | 205 | 1 0 | Write to selected PSG register. When set, the PSG will take the data at PPI Port A and write it into the selected PSG register |
| 206 | 206 | 1 1 | Select PSG register. When set, the PSG will take the data at PPI Port A and select a register |
| r1250 | r1251 | |
| 234 | 234 | update_psg(); |
| 235 | 235 | return ppi_port_inputs[amstrad_ppi_PortA]; |
| 236 | 236 | } |
| 237 | | |
| 237 | |
| 238 | 238 | static WRITE8_HANDLER ( amstrad_ppi_porta_w ) |
| 239 | 239 | { |
| 240 | 240 | ppi_port_outputs[amstrad_ppi_PortA] = data; |
| 241 | 241 | update_psg(); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | | /* - Read PPI Port B - |
| 244 | /* - Read PPI Port B - |
| 245 | 245 | ------------------- |
| 246 | 246 | Bit Description |
| 247 | 247 | 7 Cassette read data |
| 248 | 248 | 6 Parallel/Printer port ready signal ("1" = not ready, "0" = Ready) |
| 249 | | 5 /EXP signal on expansion port (note 6) |
| 250 | | 4 50/60hz (link on PCB. For this MESS driver I have used the dipswitch feature) (note 5) |
| 251 | | 3 | PCB links to define manufacturer name. For this MESS driver I have used the dipswitch feature. (note 1) (note 4) |
| 252 | | 2 | (note 2) |
| 253 | | 1 | (note 3) |
| 254 | | 0 VSYNC State from 6845. "1" = VSYNC active, "0" = VSYNC inactive |
| 249 | 5 /EXP signal on expansion port (note 6) |
| 250 | 4 50/60hz (link on PCB. For this MESS driver I have used the dipswitch feature) (note 5) |
| 251 | 3 | PCB links to define manufacturer name. For this MESS driver I have used the dipswitch feature. (note 1) (note 4) |
| 252 | 2 | (note 2) |
| 253 | 1 | (note 3) |
| 254 | 0 VSYNC State from 6845. "1" = VSYNC active, "0" = VSYNC inactive |
| 255 | 255 | |
| 256 | | Note: |
| 256 | Note: |
| 257 | 257 | |
| 258 | | 1 On CPC464,CPC664,CPC6128 and GX4000 this is LK3 on the PCB. On the CPC464+ and CPC6128+ this is LK103 on the PCB. On the KC compact this is "1". |
| 259 | | 2 On CPC464,CPC664,CPC6128 and GX4000 this is LK2 on the PCB. On the CPC464+ and CPC6128+ this is LK102 on the PCB. On the KC compact this is "0". |
| 260 | | 3 On CPC464,CPC664,CPC6128 and GX4000 this is LK1 on the PCB. On the CPC464+ and CPC6128+ this is LK101 on the PCB. On the KC compact this is /TEST signal from the expansion port. |
| 261 | | 4 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bits 3,2 and 1 define the manufacturer name. See below to see the options available. The manufacturer name is defined on the PCB and cannot be changed through software. |
| 262 | | 5 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bit 4 defines the Screen refresh frequency. "1" = 50Hz, "0" = 60Hz. This is defined on the PCB and cannot be changed with software. On the KC compact bit 4 is "1" |
| 263 | | 6 This bit is connected to /EXP signal on the expansion port. |
| 264 | | On the KC Compact this bit is used to define bit 7 of the printer data. |
| 265 | | On the CPC, it is possible to use this bit to define bit 7 of the printer data, so a 8-bit printer port is made, with a hardware modification, |
| 266 | | On the CPC this can be used by a expansion device to report it's presence. "1" = device connected, "0" = device not connected. This is not always used by all expansion devices. |
| 258 | 1 On CPC464,CPC664,CPC6128 and GX4000 this is LK3 on the PCB. On the CPC464+ and CPC6128+ this is LK103 on the PCB. On the KC compact this is "1". |
| 259 | 2 On CPC464,CPC664,CPC6128 and GX4000 this is LK2 on the PCB. On the CPC464+ and CPC6128+ this is LK102 on the PCB. On the KC compact this is "0". |
| 260 | 3 On CPC464,CPC664,CPC6128 and GX4000 this is LK1 on the PCB. On the CPC464+ and CPC6128+ this is LK101 on the PCB. On the KC compact this is /TEST signal from the expansion port. |
| 261 | 4 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bits 3,2 and 1 define the manufacturer name. See below to see the options available. The manufacturer name is defined on the PCB and cannot be changed through software. |
| 262 | 5 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bit 4 defines the Screen refresh frequency. "1" = 50Hz, "0" = 60Hz. This is defined on the PCB and cannot be changed with software. On the KC compact bit 4 is "1" |
| 263 | 6 This bit is connected to /EXP signal on the expansion port. |
| 264 | On the KC Compact this bit is used to define bit 7 of the printer data. |
| 265 | On the CPC, it is possible to use this bit to define bit 7 of the printer data, so a 8-bit printer port is made, with a hardware modification, |
| 266 | On the CPC this can be used by a expansion device to report it's presence. "1" = device connected, "0" = device not connected. This is not always used by all expansion devices. |
| 267 | 267 | */ |
| 268 | 268 | |
| 269 | 269 | static READ8_HANDLER (amstrad_ppi_portb_r) |
| r1250 | r1251 | |
| 288 | 288 | |
| 289 | 289 | /* 26-May-2005 - PPI Port C |
| 290 | 290 | ----------------------- |
| 291 | | Bit Description Usage |
| 292 | | 7 PSG BDIR | PSG function selection |
| 291 | Bit Description Usage |
| 292 | 7 PSG BDIR | PSG function selection |
| 293 | 293 | 6 PSG BC1 | |
| 294 | | 5 Cassette Write data |
| 295 | | 4 Cassette Motor Control set bit to "1" for motor on, or "0" for motor off |
| 296 | | 3 | Keyboard line Select keyboard line to be scanned (0-15) |
| 294 | 5 Cassette Write data |
| 295 | 4 Cassette Motor Control set bit to "1" for motor on, or "0" for motor off |
| 296 | 3 | Keyboard line Select keyboard line to be scanned (0-15) |
| 297 | 297 | 2 | |
| 298 | 298 | 1 | |
| 299 | 299 | 0 |*/ |
| r1250 | r1251 | |
| 308 | 308 | previous_ppi_portc_w = ppi_port_outputs[amstrad_ppi_PortC]; |
| 309 | 309 | /* Write the data to Port C */ |
| 310 | 310 | changed_data = previous_ppi_portc_w^data; |
| 311 | | |
| 311 | |
| 312 | 312 | ppi_port_outputs[amstrad_ppi_PortC] = data; |
| 313 | 313 | |
| 314 | 314 | /* get b7 and b6 (PSG Function Selected */ |
| r1250 | r1251 | |
| 316 | 316 | |
| 317 | 317 | /* Perform PSG function */ |
| 318 | 318 | update_psg(); |
| 319 | | |
| 319 | |
| 320 | 320 | /* b5 Cassette Write data */ |
| 321 | 321 | if ((changed_data & 0x20) != 0) { |
| 322 | 322 | cassette_output(image_from_devtype_and_index(IO_CASSETTE, 0), |
| 323 | 323 | ((data & 0x20) ? -1.0 : +1.0)); |
| 324 | 324 | } |
| 325 | | |
| 325 | |
| 326 | 326 | /* b4 Cassette Motor Control */ |
| 327 | 327 | if ((changed_data & 0x10) != 0) { |
| 328 | 328 | cassette_change_state(image_from_devtype_and_index(IO_CASSETTE, 0), |
| r1250 | r1251 | |
| 364 | 364 | |
| 365 | 365 | /*-------------------------- |
| 366 | 366 | - Ram and Rom management - |
| 367 | | --------------------------*/ |
| 367 | --------------------------*/ |
| 368 | 368 | /*----------------- |
| 369 | 369 | - Set Lower Rom - |
| 370 | | -----------------*/ |
| 370 | -----------------*/ |
| 371 | 371 | void amstrad_setLowerRom(void) |
| 372 | 372 | { |
| 373 | 373 | unsigned char *BankBase; |
| 374 | 374 | int banknum; |
| 375 | | /* b2 : "1" Lower rom area disable or "0" Lower rom area enable */ |
| 375 | /* b2 : "1" Lower rom area disable or "0" Lower rom area enable */ |
| 376 | 376 | if(amstrad_system_type == SYSTEM_CPC) |
| 377 | 377 | { |
| 378 | 378 | if ((amstrad_GateArray_ModeAndRomConfiguration & (1<<2)) == 0) { |
| r1250 | r1251 | |
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | 439 | } |
| 440 | | } |
| 440 | } |
| 441 | 441 | /*----------------- |
| 442 | 442 | - Set Upper Rom - |
| 443 | | -----------------*/ |
| 443 | -----------------*/ |
| 444 | 444 | void amstrad_setUpperRom(void) |
| 445 | 445 | { |
| 446 | 446 | unsigned char *BankBase; |
| r1250 | r1251 | |
| 456 | 456 | memory_set_bankptr(7, BankBase); |
| 457 | 457 | memory_set_bankptr(8, BankBase+0x2000); |
| 458 | 458 | } |
| 459 | | } |
| 459 | } |
| 460 | 460 | |
| 461 | 461 | void AmstradCPC_SetLowerRom(int Data) |
| 462 | 462 | { |
| r1250 | r1251 | |
| 759 | 759 | |
| 760 | 760 | /*------------------ |
| 761 | 761 | - Rethink Memory - |
| 762 | | ------------------*/ |
| 762 | ------------------*/ |
| 763 | 763 | void amstrad_rethinkMemory(void) |
| 764 | 764 | { |
| 765 | 765 | /* the following is used for banked memory read/writes and for setting up |
| r1250 | r1251 | |
| 779 | 779 | amstrad_setLowerRom(); |
| 780 | 780 | /* bank 3 - 0x0c000..0x0ffff */ |
| 781 | 781 | amstrad_setUpperRom(); |
| 782 | | /* other banks */ |
| 782 | /* other banks */ |
| 783 | 783 | memory_set_bankptr(9, AmstradCPC_RamBanks[0]); |
| 784 | 784 | memory_set_bankptr(10, AmstradCPC_RamBanks[0]+0x2000); |
| 785 | 785 | memory_set_bankptr(11, AmstradCPC_RamBanks[1]); |
| r1250 | r1251 | |
| 796 | 796 | } |
| 797 | 797 | /* simplified ram configuration - e.g. only correct for 128k machines |
| 798 | 798 | |
| 799 | | RAM Expansion Bits |
| 800 | | 7 6 5 4 3 2 1 0 |
| 801 | | CPC6128 1 1 - - - s2 s1 s0 |
| 802 | | Dk'tronics 256K Silicon Disk 1 1 1 b1 b0 b2 - - |
| 799 | RAM Expansion Bits |
| 800 | 7 6 5 4 3 2 1 0 |
| 801 | CPC6128 1 1 - - - s2 s1 s0 |
| 802 | Dk'tronics 256K Silicon Disk 1 1 1 b1 b0 b2 - - |
| 803 | 803 | |
| 804 | | "-" - this bit is ignored. The value of this bit is not important. |
| 805 | | "0" - this bit must be set to "0" |
| 806 | | "1" - this bit must be set to "1" |
| 807 | | "b0,b1,b2" - this bit is used to define the logical 64k block that the ram configuration uses |
| 808 | | "s0,s1,s2" - this bit is used to define the ram configuration |
| 804 | "-" - this bit is ignored. The value of this bit is not important. |
| 805 | "0" - this bit must be set to "0" |
| 806 | "1" - this bit must be set to "1" |
| 807 | "b0,b1,b2" - this bit is used to define the logical 64k block that the ram configuration uses |
| 808 | "s0,s1,s2" - this bit is used to define the ram configuration |
| 809 | 809 | |
| 810 | | The CPC6128 has a 64k ram expansion built-in, giving 128K of RAM in this system. |
| 811 | | In the CPC464,CPC664 and KC compact if a ram expansion is not present, then writing to this port has no effect and the ram will be in the same arrangement as if configuration 0 had been selected. |
| 810 | The CPC6128 has a 64k ram expansion built-in, giving 128K of RAM in this system. |
| 811 | In the CPC464,CPC664 and KC compact if a ram expansion is not present, then writing to this port has no effect and the ram will be in the same arrangement as if configuration 0 had been selected. |
| 812 | 812 | */ |
| 813 | 813 | static void AmstradCPC_GA_SetRamConfiguration(void) |
| 814 | 814 | { |
| r1250 | r1251 | |
| 823 | 823 | AmstradCPC_RamBanks[i] = BankAddr; |
| 824 | 824 | } |
| 825 | 825 | } else {/* Need to add the ram expansion configuration here ! */ |
| 826 | | } |
| 826 | } |
| 827 | 827 | amstrad_rethinkMemory(); |
| 828 | 828 | } |
| 829 | 829 | /* ------------------- |
| 830 | 830 | - the Gate Array - |
| 831 | 831 | ------------------- |
| 832 | | The gate array is controlled by I/O. The recommended I/O port address is &7Fxx. |
| 832 | The gate array is controlled by I/O. The recommended I/O port address is &7Fxx. |
| 833 | 833 | The gate array is selected when bit 15 of the I/O port address is set to "0" and bit 14 of the I/O port address is set to "1". |
| 834 | 834 | The values of the other bits are ignored. |
| 835 | | However, to avoid conflict with other devices in the system, these bits should be set to "1". |
| 835 | However, to avoid conflict with other devices in the system, these bits should be set to "1". |
| 836 | 836 | |
| 837 | 837 | The function to be performed is selected by writing data to the Gate-Array, bit 7 and 6 of the data define the function selected (see table below). |
| 838 | | It is not possible to read from the Gate-Array. |
| 838 | It is not possible to read from the Gate-Array. |
| 839 | 839 | |
| 840 | | Bit 7 Bit 6 Function |
| 841 | | 0 0 Select pen |
| 842 | | 0 1 Select colour for selected pen |
| 843 | | 1 0 Select screen mode, rom configuration and interrupt control |
| 844 | | 1 1 Ram Memory Management (note 1) |
| 840 | Bit 7 Bit 6 Function |
| 841 | 0 0 Select pen |
| 842 | 0 1 Select colour for selected pen |
| 843 | 1 0 Select screen mode, rom configuration and interrupt control |
| 844 | 1 1 Ram Memory Management (note 1) |
| 845 | 845 | |
| 846 | 846 | Note 1 : This function is not available in the Gate-Array, but is performed by a device at the same I/O port address location. In the CPC464,CPC664 and KC compact, this function is performed in a memory-expansion (e.g. Dk'Tronics 64K Ram Expansion), if this expansion is not present then the function is not available. In the CPC6128, this function is performed by a PAL located on the main PCB, or a memory-expansion. In the 464+ and 6128+ this function is performed by the ASIC or a memory expansion. Please read the document on Ram Management for more information.*/ |
| 847 | 847 | |
| r1250 | r1251 | |
| 852 | 852 | /* Pen selection |
| 853 | 853 | ------------- |
| 854 | 854 | Bit Value Function Bit Value Function |
| 855 | | 5 x not used 5 x not used |
| 856 | | 4 1 Select border 4 0 Select pen |
| 857 | | 3 x | ignored 3 x | Pen Number |
| 855 | 5 x not used 5 x not used |
| 856 | 4 1 Select border 4 0 Select pen |
| 857 | 3 x | ignored 3 x | Pen Number |
| 858 | 858 | 2 x | 2 x | |
| 859 | 859 | 1 x | 1 x | |
| 860 | 860 | 0 x | 0 x | |
| r1250 | r1251 | |
| 870 | 870 | /* Colour selection |
| 871 | 871 | ---------------- |
| 872 | 872 | Even though there is provision for 32 colours, only 27 are possible. |
| 873 | | The remaining colours are duplicates of those already in the colour palette. |
| 873 | The remaining colours are duplicates of those already in the colour palette. |
| 874 | 874 | |
| 875 | | Bit Value Function |
| 876 | | 5 x not used |
| 877 | | 4 x | Colour number |
| 875 | Bit Value Function |
| 876 | 5 x not used |
| 877 | 4 x | Colour number |
| 878 | 878 | 3 x | |
| 879 | 879 | 2 x | |
| 880 | 880 | 1 x | |
| r1250 | r1251 | |
| 888 | 888 | } break; |
| 889 | 889 | /* Select screen mode and rom configuration |
| 890 | 890 | ---------------------------------------- |
| 891 | | Bit Value Function |
| 892 | | 5 x not used |
| 893 | | 4 x Interrupt generation control |
| 894 | | 3 1 Upper rom area disable or 0 Upper rom area enable |
| 895 | | 2 1 Lower rom area disable or 0 Lower rom area enable |
| 896 | | 1 x | Mode selection |
| 891 | Bit Value Function |
| 892 | 5 x not used |
| 893 | 4 x Interrupt generation control |
| 894 | 3 1 Upper rom area disable or 0 Upper rom area enable |
| 895 | 2 1 Lower rom area disable or 0 Lower rom area enable |
| 896 | 1 x | Mode selection |
| 897 | 897 | 0 x | |
| 898 | | |
| 899 | | Screen mode selection : The settings for bits 1 and 0 and the corresponding screen mode are given in the table below. |
| 898 | |
| 899 | Screen mode selection : The settings for bits 1 and 0 and the corresponding screen mode are given in the table below. |
| 900 | 900 | ----------------------- |
| 901 | | b1 b0 Screen mode |
| 902 | | 0 0 Mode 0, 160x200 resolution, 16 colours |
| 903 | | 0 1 Mode 1, 320x200 resolution, 4 colours |
| 904 | | 1 0 Mode 2, 640x200 resolution, 2 colours |
| 905 | | 1 1 Mode 3, 160x200 resolution, 4 colours (note 1) |
| 901 | b1 b0 Screen mode |
| 902 | 0 0 Mode 0, 160x200 resolution, 16 colours |
| 903 | 0 1 Mode 1, 320x200 resolution, 4 colours |
| 904 | 1 0 Mode 2, 640x200 resolution, 2 colours |
| 905 | 1 1 Mode 3, 160x200 resolution, 4 colours (note 1) |
| 906 | 906 | |
| 907 | | This mode is not official. From the combinations possible, we can see that 4 modes can be defined, although the Amstrad only has 3. Mode 3 is similar to mode 0, because it has the same resolution, but it is limited to only 4 colours. |
| 908 | | Mode changing is synchronised with HSYNC. If the mode is changed, it will take effect from the next HSYNC. |
| 907 | This mode is not official. From the combinations possible, we can see that 4 modes can be defined, although the Amstrad only has 3. Mode 3 is similar to mode 0, because it has the same resolution, but it is limited to only 4 colours. |
| 908 | Mode changing is synchronised with HSYNC. If the mode is changed, it will take effect from the next HSYNC. |
| 909 | 909 | |
| 910 | 910 | Rom configuration selection : |
| 911 | 911 | ----------------------------- |
| 912 | | Bit 2 is used to enable or disable the lower rom area. The lower rom area occupies memory addressess &0000-&3fff and is used to access the operating system rom. When the lower rom area is is enabled, reading from &0000-&3FFF will return data in the rom. When a value is written to &0000-&3FFF, it will be written to the ram underneath the rom. When it is disabled, data read from &0000-&3FFF will return the data in the ram. |
| 913 | | Similarly, bit 3 controls enabling or disabling of the upper rom area. The upper rom area occupies memory addressess &C000-&FFFF and is BASIC or any expansion roms which may be plugged into a rom board/box. See the document on upper rom selection for more details. When the upper rom area enabled, reading from &c000-&ffff, will return data in the rom. When data is written to &c000-&FFFF, it will be written to the ram at the same address as the rom. When the upper rom area is disabled, and data is read from &c000-&ffff the data returned will be the data in the ram. |
| 912 | Bit 2 is used to enable or disable the lower rom area. The lower rom area occupies memory addressess &0000-&3fff and is used to access the operating system rom. When the lower rom area is is enabled, reading from &0000-&3FFF will return data in the rom. When a value is written to &0000-&3FFF, it will be written to the ram underneath the rom. When it is disabled, data read from &0000-&3FFF will return the data in the ram. |
| 913 | Similarly, bit 3 controls enabling or disabling of the upper rom area. The upper rom area occupies memory addressess &C000-&FFFF and is BASIC or any expansion roms which may be plugged into a rom board/box. See the document on upper rom selection for more details. When the upper rom area enabled, reading from &c000-&ffff, will return data in the rom. When data is written to &c000-&FFFF, it will be written to the ram at the same address as the rom. When the upper rom area is disabled, and data is read from &c000-&ffff the data returned will be the data in the ram. |
| 914 | 914 | |
| 915 | 915 | Bit 4 controls the interrupt generation. It can be used to delay interrupts.*/ |
| 916 | 916 | case 0x02: { |
| 917 | 917 | int Previous_GateArray_ModeAndRomConfiguration = amstrad_GateArray_ModeAndRomConfiguration; |
| 918 | 918 | /* If bit 5 is enabled on a CPC Plus/GX4000 when the ASIC is unlocked, sets the lower ROM position and cart bank |
| 919 | | b5 = 1, b4b3 = RAM position for lower ROM area and if the ASIC registers are visible at &4000, |
| 919 | b5 = 1, b4b3 = RAM position for lower ROM area and if the ASIC registers are visible at &4000, |
| 920 | 920 | b2b1b0 = cartridge bank to read from lower ROM area (0-7 only) */ |
| 921 | 921 | if(amstrad_system_type == SYSTEM_PLUS && amstrad_plus_asic_enabled != 0) |
| 922 | 922 | { |
| r1250 | r1251 | |
| 937 | 937 | amstrad_GateArray_ModeAndRomConfiguration = dataToGateArray; |
| 938 | 938 | } |
| 939 | 939 | |
| 940 | | /* If bit 4 of the "Select screen mode and rom configuration" register of the Gate-Array is set to "1" |
| 940 | /* If bit 4 of the "Select screen mode and rom configuration" register of the Gate-Array is set to "1" |
| 941 | 941 | then the interrupt request is cleared and the 6-bit counter is reset to "0". */ |
| 942 | 942 | if ((amstrad_GateArray_ModeAndRomConfiguration & (1<<4)) != 0) { |
| 943 | 943 | amstrad_CRTC_HS_Counter = 0; |
| r1250 | r1251 | |
| 956 | 956 | #else |
| 957 | 957 | amstrad_vh_update_mode(amstrad_GateArray_ModeAndRomConfiguration & 0x03); |
| 958 | 958 | #endif |
| 959 | | } |
| 959 | } |
| 960 | 960 | } break; |
| 961 | 961 | /* Ram Memory Management |
| 962 | | --------------------- |
| 962 | --------------------- |
| 963 | 963 | This function is not available in the Gate-Array, but is performed by a device at the same I/O port address location. |
| 964 | 964 | In the CPC464,CPC664 and KC compact, this function is performed in a memory-expansion (e.g. Dk'Tronics 64K Ram Expansion), if this expansion is not present then the function is not available. |
| 965 | 965 | In the CPC6128, this function is performed by a PAL located on the main PCB, or a memory-expansion. |
| r1250 | r1251 | |
| 968 | 968 | case 0x03: { |
| 969 | 969 | amstrad_GateArray_RamConfiguration = dataToGateArray; |
| 970 | 970 | } break; |
| 971 | | |
| 971 | |
| 972 | 972 | default: { |
| 973 | 973 | } break; |
| 974 | 974 | } |
| r1250 | r1251 | |
| 985 | 985 | |
| 986 | 986 | /* CRTC Differences |
| 987 | 987 | ---------------- |
| 988 | | The following tables list the functions that can be accessed for each type: |
| 988 | The following tables list the functions that can be accessed for each type: |
| 989 | 989 | |
| 990 | 990 | Type 0 |
| 991 | | b1 b0 Function Read/Write |
| 992 | | 0 0 Select internal 6845 register Write Only |
| 993 | | 0 1 Write to selected internal 6845 register Write Only |
| 994 | | 1 0 - - |
| 995 | | 1 1 Read from selected internal 6845 register Read only |
| 991 | b1 b0 Function Read/Write |
| 992 | 0 0 Select internal 6845 register Write Only |
| 993 | 0 1 Write to selected internal 6845 register Write Only |
| 994 | 1 0 - - |
| 995 | 1 1 Read from selected internal 6845 register Read only |
| 996 | 996 | |
| 997 | 997 | Type 1 |
| 998 | | b1 b0 Function Read/Write |
| 999 | | 0 0 Select internal 6845 register Write Only |
| 1000 | | 0 1 Write to selected internal 6845 register Write Only |
| 1001 | | 1 0 Read Status Register Read Only |
| 1002 | | 1 1 Read from selected internal 6845 register Read only |
| 998 | b1 b0 Function Read/Write |
| 999 | 0 0 Select internal 6845 register Write Only |
| 1000 | 0 1 Write to selected internal 6845 register Write Only |
| 1001 | 1 0 Read Status Register Read Only |
| 1002 | 1 1 Read from selected internal 6845 register Read only |
| 1003 | 1003 | |
| 1004 | 1004 | Type 2 |
| 1005 | | b1 b0 Function Read/Write |
| 1006 | | 0 0 Select internal 6845 register Write Only |
| 1007 | | 0 1 Write to selected internal 6845 register Write Only |
| 1008 | | 1 0 - - |
| 1009 | | 1 1 Read from selected internal 6845 register Read only |
| 1005 | b1 b0 Function Read/Write |
| 1006 | 0 0 Select internal 6845 register Write Only |
| 1007 | 0 1 Write to selected internal 6845 register Write Only |
| 1008 | 1 0 - - |
| 1009 | 1 1 Read from selected internal 6845 register Read only |
| 1010 | 1010 | |
| 1011 | 1011 | Type 3 and 4 |
| 1012 | | b1 b0 Function Read/Write |
| 1013 | | 0 0 Select internal 6845 register Write Only |
| 1014 | | 0 1 Write to selected internal 6845 register Write Only |
| 1015 | | 1 0 Read from selected internal 6845 register Read Only |
| 1016 | | 1 1 Read from selected internal 6845 register Read only |
| 1012 | b1 b0 Function Read/Write |
| 1013 | 0 0 Select internal 6845 register Write Only |
| 1014 | 0 1 Write to selected internal 6845 register Write Only |
| 1015 | 1 0 Read from selected internal 6845 register Read Only |
| 1016 | 1 1 Read from selected internal 6845 register Read only |
| 1017 | 1017 | */ |
| 1018 | 1018 | |
| 1019 | 1019 | /* I/O port allocation |
| 1020 | 1020 | ------------------- |
| 1021 | 1021 | |
| 1022 | | Many thanks to Mark Rison for providing the original information. Thankyou to Richard Wilson for his discoveries concerning RAM management I/O decoding. |
| 1022 | Many thanks to Mark Rison for providing the original information. Thankyou to Richard Wilson for his discoveries concerning RAM management I/O decoding. |
| 1023 | 1023 | |
| 1024 | | This document will explain the decoding of the I/O ports. The port address is not decoded fully which means a hardware device can be accessed through more than one address, in addition, using some addressess can access more than one element of the hardware at the same time. The CPC IN/OUT design differs from the norm in that port numbers are defined using 16 bits, as opposed to the traditional 8 bits. |
| 1024 | This document will explain the decoding of the I/O ports. The port address is not decoded fully which means a hardware device can be accessed through more than one address, in addition, using some addressess can access more than one element of the hardware at the same time. The CPC IN/OUT design differs from the norm in that port numbers are defined using 16 bits, as opposed to the traditional 8 bits. |
| 1025 | 1025 | |
| 1026 | | IN r,(C)/OUT (C),r instructions: Bits b15-b8 come from the B register, bits b7-b0 come from "r" |
| 1027 | | IN A,(n)/OUT (n),A instructions: Bits b15-b8 come from the A register, bits b7-b0 come from "n" |
| 1028 | | Listed below are the internal hardware devices and the bit fields to which they respond. In the table: |
| 1026 | IN r,(C)/OUT (C),r instructions: Bits b15-b8 come from the B register, bits b7-b0 come from "r" |
| 1027 | IN A,(n)/OUT (n),A instructions: Bits b15-b8 come from the A register, bits b7-b0 come from "n" |
| 1028 | Listed below are the internal hardware devices and the bit fields to which they respond. In the table: |
| 1029 | 1029 | |
| 1030 | | "-" means this bit is ignored, |
| 1031 | | "0" means the bit must be set to "0" for the hardware device to respond, |
| 1032 | | "1" means the bit must be set to "1" for the hardware device to respond. |
| 1033 | | "r1" and "r0" mean a bit used to define a register |
| 1030 | "-" means this bit is ignored, |
| 1031 | "0" means the bit must be set to "0" for the hardware device to respond, |
| 1032 | "1" means the bit must be set to "1" for the hardware device to respond. |
| 1033 | "r1" and "r0" mean a bit used to define a register |
| 1034 | 1034 | |
| 1035 | | Hardware device Read/Write Port bits |
| 1036 | | b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 |
| 1037 | | Gate-Array Write Only 0 1 - - - - - - - - - - - - - - |
| 1038 | | RAM Configuration Write Only 0 - - - - - - - - - - - - - - - |
| 1039 | | CRTC Read/Write - 0 - - - - r1 r0 - - - - - - - - |
| 1040 | | ROM select Write only - - 0 - - - - - - - - - - - - - |
| 1041 | | Printer port Write only - - - 0 - - - - - - - - - - - - |
| 1042 | | 8255 PPI Read/Write - - - - 0 - r1 r0 - - - - - - - - |
| 1043 | | Expansion Peripherals Read/Write - - - - - 0 - - - - - - - - - - |
| 1035 | Hardware device Read/Write Port bits |
| 1036 | b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 |
| 1037 | Gate-Array Write Only 0 1 - - - - - - - - - - - - - - |
| 1038 | RAM Configuration Write Only 0 - - - - - - - - - - - - - - - |
| 1039 | CRTC Read/Write - 0 - - - - r1 r0 - - - - - - - - |
| 1040 | ROM select Write only - - 0 - - - - - - - - - - - - - |
| 1041 | Printer port Write only - - - 0 - - - - - - - - - - - - |
| 1042 | 8255 PPI Read/Write - - - - 0 - r1 r0 - - - - - - - - |
| 1043 | Expansion Peripherals Read/Write - - - - - 0 - - - - - - - - - - |
| 1044 | 1044 | |
| 1045 | 1045 | */ |
| 1046 | 1046 | |
| r1250 | r1251 | |
| 1079 | 1079 | } |
| 1080 | 1080 | } |
| 1081 | 1081 | |
| 1082 | | /* if b11 = 0 : 8255 PPI Read selected - bits 9 and 8 then define the PPI function access as shown below: |
| 1082 | /* if b11 = 0 : 8255 PPI Read selected - bits 9 and 8 then define the PPI function access as shown below: |
| 1083 | 1083 | |
| 1084 | | b9 b8 | PPI Function Read/Write status |
| 1085 | | 0 0 | Port A data Read/Write |
| 1086 | | 0 1 | Port B data Read/Write |
| 1087 | | 1 0 | Port C data Read/Write |
| 1084 | b9 b8 | PPI Function Read/Write status |
| 1085 | 0 0 | Port A data Read/Write |
| 1086 | 0 1 | Port B data Read/Write |
| 1087 | 1 0 | Port C data Read/Write |
| 1088 | 1088 | 1 1 | Control Write Only |
| 1089 | | */ |
| 1089 | */ |
| 1090 | 1090 | if ((offset & (1<<11)) == 0) |
| 1091 | 1091 | { |
| 1092 | 1092 | if (r1r0 < 0x03 ) |
| r1250 | r1251 | |
| 1095 | 1095 | /* if b10 = 0 : Expansion Peripherals Read selected |
| 1096 | 1096 | |
| 1097 | 1097 | bits b7-b5 are used to select an expansion peripheral. Again, this is done by resetting the peripheral's bit: |
| 1098 | | Bit | Device |
| 1099 | | b7 | FDC |
| 1100 | | b6 | Reserved (was it ever used?) |
| 1101 | | b5 | Serial port |
| 1098 | Bit | Device |
| 1099 | b7 | FDC |
| 1100 | b6 | Reserved (was it ever used?) |
| 1101 | b5 | Serial port |
| 1102 | 1102 | |
| 1103 | 1103 | In the case of the FDC, bits b8 and b0 are used to select the specific mode of operation; all the other bits (b9,b4-b1) are ignored: |
| 1104 | | b8 b0 Function Read/Write state |
| 1105 | | 0 0 FDD motor control Write Only |
| 1106 | | 0 1 not used N/A |
| 1107 | | 1 0 Main Status register of FDC (MSR) Read Only |
| 1104 | b8 b0 Function Read/Write state |
| 1105 | 0 0 FDD motor control Write Only |
| 1106 | 0 1 not used N/A |
| 1107 | 1 0 Main Status register of FDC (MSR) Read Only |
| 1108 | 1108 | 1 1 Data register of FDC Read/Write |
| 1109 | 1109 | |
| 1110 | 1110 | If b10 is reset but none of b7-b5 are reset, user expansion peripherals are selected. |
| 1111 | | The exception is the case where none of b7-b0 are reset (i.e. port &FBFF), which causes the expansion peripherals to reset. |
| 1111 | The exception is the case where none of b7-b0 are reset (i.e. port &FBFF), which causes the expansion peripherals to reset. |
| 1112 | 1112 | */ |
| 1113 | 1113 | if ((offset & (1<<10)) == 0) { |
| 1114 | 1114 | if ((offset & (1<<10)) == 0) { |
| r1250 | r1251 | |
| 1167 | 1167 | /* b13 = 0 : ROM select Write Selected*/ |
| 1168 | 1168 | if ((offset & (1<<13)) == 0) |
| 1169 | 1169 | { |
| 1170 | | if (previous_amstrad_UpperRom_data != (data & 0xff)) |
| 1170 | if (previous_amstrad_UpperRom_data != (data & 0xff)) |
| 1171 | 1171 | { |
| 1172 | 1172 | AmstradCPC_SetUpperRom(data); |
| 1173 | 1173 | } |
| r1250 | r1251 | |
| 1189 | 1189 | } |
| 1190 | 1190 | previous_printer_data_byte = data; |
| 1191 | 1191 | } |
| 1192 | | /* if b11 = 0 : 8255 PPI Write selected - bits 9 and 8 then define the PPI function access as shown below: |
| 1193 | | b9 b8 | PPI Function Read/Write status |
| 1194 | | 0 0 | Port A data Read/Write |
| 1195 | | 0 1 | Port B data Read/Write |
| 1196 | | 1 0 | Port C data Read/Write |
| 1192 | /* if b11 = 0 : 8255 PPI Write selected - bits 9 and 8 then define the PPI function access as shown below: |
| 1193 | b9 b8 | PPI Function Read/Write status |
| 1194 | 0 0 | Port A data Read/Write |
| 1195 | 0 1 | Port B data Read/Write |
| 1196 | 1 0 | Port C data Read/Write |
| 1197 | 1197 | 1 1 | Control Write Only |
| 1198 | | */ |
| 1198 | */ |
| 1199 | 1199 | if ((offset & (1<<11)) == 0) { |
| 1200 | 1200 | unsigned int Index = ((offset & 0x0300) >> 8); |
| 1201 | 1201 | ppi8255_w(0, Index, data); |
| r1250 | r1251 | |
| 1203 | 1203 | /* if b10 = 0 : Expansion Peripherals Write selected */ |
| 1204 | 1204 | if ((offset & (1<<10)) == 0) { |
| 1205 | 1205 | /* bits b7-b5 are used to select an expansion peripheral. This is done by resetting the peripheral's bit: |
| 1206 | | Bit | Device |
| 1207 | | b7 | FDC |
| 1208 | | b6 | Reserved (was it ever used?) |
| 1209 | | b5 | Serial port |
| 1206 | Bit | Device |
| 1207 | b7 | FDC |
| 1208 | b6 | Reserved (was it ever used?) |
| 1209 | b5 | Serial port |
| 1210 | 1210 | |
| 1211 | | In the case of the FDC, bits b8 and b0 are used to select the specific mode of operation; |
| 1211 | In the case of the FDC, bits b8 and b0 are used to select the specific mode of operation; |
| 1212 | 1212 | all the other bits (b9,b4-b1) are ignored: |
| 1213 | | b8 b0 Function Read/Write state |
| 1214 | | 0 0 FDD motor control Write Only |
| 1215 | | 0 1 not used N/A |
| 1216 | | 1 0 Main Status register of FDC (MSR) Read Only |
| 1217 | | 1 1 Data register of FDC Read/Write |
| 1213 | b8 b0 Function Read/Write state |
| 1214 | 0 0 FDD motor control Write Only |
| 1215 | 0 1 not used N/A |
| 1216 | 1 0 Main Status register of FDC (MSR) Read Only |
| 1217 | 1 1 Data register of FDC Read/Write |
| 1218 | 1218 | |
| 1219 | 1219 | If b10 is reset but none of b7-b5 are reset, user expansion peripherals are selected. |
| 1220 | | The exception is the case where none of b7-b0 are reset (i.e. port &FBFF), which causes the expansion peripherals to reset. |
| 1220 | The exception is the case where none of b7-b0 are reset (i.e. port &FBFF), which causes the expansion peripherals to reset. |
| 1221 | 1221 | */ |
| 1222 | 1222 | if ((offset & (1<<7)) == 0) { |
| 1223 | 1223 | unsigned int b8b0 = ((offset & 0x0100) >> (8 - 1)) | (offset & 0x01); |
| 1224 | 1224 | |
| 1225 | 1225 | switch (b8b0) { |
| 1226 | 1226 | case 0x00: |
| 1227 | | /* FDC Motor Control - Bit 0 defines the state of the FDD motor: |
| 1228 | | * "1" the FDD motor will be active. |
| 1227 | /* FDC Motor Control - Bit 0 defines the state of the FDD motor: |
| 1228 | * "1" the FDD motor will be active. |
| 1229 | 1229 | * "0" the FDD motor will be in-active.*/ |
| 1230 | 1230 | floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, 0), (data & 0x01)); |
| 1231 | 1231 | floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, 1), (data & 0x01)); |
| r1250 | r1251 | |
| 1596 | 1596 | amstrad_GateArray_write(0x0c0); |
| 1597 | 1597 | |
| 1598 | 1598 | // Get manufacturer name and TV refresh rate from PCB link (dipswitch for mess emulation) |
| 1599 | | ppi_port_inputs[amstrad_ppi_PortB] = (((readinputport(10)&MANUFACTURER_NAME)<<1) | (readinputport(10)&TV_REFRESH_RATE)); |
| 1599 | ppi_port_inputs[amstrad_ppi_PortB] = (((readinputportbytag("solder_links")&MANUFACTURER_NAME)<<1) | (readinputportbytag("solder_links")&TV_REFRESH_RATE)); |
| 1600 | 1600 | |
| 1601 | 1601 | if(amstrad_system_type == SYSTEM_PLUS) |
| 1602 | 1602 | memset(amstrad_plus_asic_ram,0,16384); // clear ASIC RAM |
| r1250 | r1251 | |
| 1731 | 1731 | static void amstrad_update_video_1(int dummy) |
| 1732 | 1732 | { |
| 1733 | 1733 | amstrad_vh_execute_crtc_cycles(2); |
| 1734 | | } |
| 1734 | } |
| 1735 | 1735 | #endif |
| 1736 | 1736 | |
| 1737 | 1737 | static TIMER_CALLBACK(amstrad_vh_execute_crtc_cycles_callback) |
| r1250 | r1251 | |
| 1793 | 1793 | floppy_drive_set_geometry(image_from_devtype_and_index(IO_FLOPPY, 0), FLOPPY_DRIVE_SS_40); |
| 1794 | 1794 | floppy_drive_set_geometry(image_from_devtype_and_index(IO_FLOPPY, 1), FLOPPY_DRIVE_SS_40); |
| 1795 | 1795 | |
| 1796 | | /* Every microsecond: |
| 1796 | /* Every microsecond: |
| 1797 | 1797 | |
| 1798 | | The CRTC generates a memory address using it's MA and RA signal outputs |
| 1798 | The CRTC generates a memory address using it's MA and RA signal outputs |
| 1799 | 1799 | The Gate-Array fetches two bytes for each address*/ |
| 1800 | 1800 | |
| 1801 | 1801 | // mame_timer_pulse(MAME_TIME_IN_USEC(AMSTRAD_US_PER_SCANLINE), 0, amstrad_vh_execute_crtc_cycles); |
| r1250 | r1251 | |
| 1832 | 1832 | { |
| 1833 | 1833 | Amstrad_ROM_Table[i] = &memory_region(REGION_CPU1)[0x014000]; |
| 1834 | 1834 | } |
| 1835 | | |
| 1835 | |
| 1836 | 1836 | Amstrad_ROM_Table[7] = &memory_region(REGION_CPU1)[0x018000]; |
| 1837 | 1837 | amstrad_common_init(); |
| 1838 | 1838 | amstrad_reset_machine(); |
| 1839 | 1839 | |
| 1840 | 1840 | multiface_init(); |
| 1841 | | |
| 1841 | |
| 1842 | 1842 | } |
| 1843 | 1843 | |
| 1844 | 1844 | static MACHINE_RESET( plus ) |
| 1845 | 1845 | { |
| 1846 | 1846 | int i; |
| 1847 | | |
| 1847 | |
| 1848 | 1848 | amstrad_system_type = SYSTEM_PLUS; |
| 1849 | 1849 | |
| 1850 | 1850 | for (i=0; i<128; i++) // fill ROM table |
| r1250 | r1251 | |
| 1938 | 1938 | /* Additional notes for the AY-3-8912 in the CPC design |
| 1939 | 1939 | Port A of the AY-3-8912 is connected to the keyboard. |
| 1940 | 1940 | The data for a selected keyboard line can be read through Port A, as long as it is defined as input. |
| 1941 | | The operating system and I believe all programs assume this port has been defined as input. (NWC has found a bug in the Multiface 2 software. The Multiface does not reprogram the input/output state of the AY-3-8912's registers, therefore if port A is programmed as output, the keyboard will be unresponsive and it will not be possible to use the Multiface functions.) |
| 1942 | | When port B is defined as input (bit 7 of register 7 is set to "0"), a read of this port will return &FF. |
| 1941 | The operating system and I believe all programs assume this port has been defined as input. (NWC has found a bug in the Multiface 2 software. The Multiface does not reprogram the input/output state of the AY-3-8912's registers, therefore if port A is programmed as output, the keyboard will be unresponsive and it will not be possible to use the Multiface functions.) |
| 1942 | When port B is defined as input (bit 7 of register 7 is set to "0"), a read of this port will return &FF. |
| 1943 | 1943 | */ |
| 1944 | 1944 | |
| 1945 | 1945 | /* read PSG port A */ |
| 1946 | 1946 | static READ8_HANDLER ( amstrad_psg_porta_read ) |
| 1947 | | { |
| 1947 | { |
| 1948 | 1948 | /* Read CPC Keyboard |
| 1949 | 1949 | If keyboard matrix line 11-14 are selected, the byte is always &ff. |
| 1950 | 1950 | After testing on a real CPC, it is found that these never change, they always return &FF. */ |
| r1250 | r1251 | |
| 1960 | 1960 | |
| 1961 | 1961 | static INPUT_PORTS_START( amstrad_keyboard ) |
| 1962 | 1962 | /* keyboard row 0 */ |
| 1963 | | PORT_START |
| 1964 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 1965 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 1966 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 1967 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) |
| 1968 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) |
| 1969 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) |
| 1970 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad Enter") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) |
| 1971 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) |
| 1963 | PORT_START_TAG("keyboard_row_0") |
| 1964 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x87\xA7") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 1965 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x87\xA8") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 1966 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x87\xA9") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 1967 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) |
| 1968 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) |
| 1969 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) |
| 1970 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad Enter") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) |
| 1971 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) |
| 1972 | 1972 | |
| 1973 | 1973 | /* keyboard line 1 */ |
| 1974 | | PORT_START |
| 1975 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 1976 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Copy") PORT_CODE(KEYCODE_LALT) |
| 1977 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) |
| 1978 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) |
| 1979 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) |
| 1980 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) |
| 1981 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) |
| 1982 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) |
| 1974 | PORT_START_TAG("keyboard_row_1") |
| 1975 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x87\xA6") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 1976 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Copy") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(END)) |
| 1977 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) |
| 1978 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) |
| 1979 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) |
| 1980 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) |
| 1981 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) |
| 1982 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) |
| 1983 | 1983 | |
| 1984 | 1984 | /* keyboard row 2 */ |
| 1985 | | PORT_START |
| 1986 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Clr") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) |
| 1987 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('@') PORT_CHAR('|') |
| 1988 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 1989 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') |
| 1990 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) |
| 1991 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 1992 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 1993 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') |
| 1994 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 1985 | PORT_START_TAG("keyboard_row_2") |
| 1986 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Clr") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(HOME)) |
| 1987 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 1988 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 1989 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') |
| 1990 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) |
| 1991 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 1992 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 1993 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR('\\') PORT_CHAR('`') |
| 1994 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_SHIFT_2) |
| 1995 | 1995 | |
| 1996 | 1996 | /* keyboard row 3 */ |
| 1997 | | PORT_START |
| 1998 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^ \xC2\xA3") PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR('^') PORT_CHAR('\xa3') |
| 1999 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 2000 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') |
| 2001 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 2002 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+') |
| 2003 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') |
| 2004 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 2005 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 1997 | PORT_START_TAG("keyboard_row_3") |
| 1998 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91 \xC2\xA3") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('\xa3') |
| 1999 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 2000 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('|') |
| 2001 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 2002 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+') |
| 2003 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') |
| 2004 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 2005 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 2006 | 2006 | |
| 2007 | 2007 | /* keyboard line 4 */ |
| 2008 | | PORT_START |
| 2009 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') |
| 2010 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 2011 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 2012 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 2013 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 2014 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 2015 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') |
| 2016 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CODE(',') PORT_CHAR('<') |
| 2008 | PORT_START_TAG("keyboard_row_4") |
| 2009 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') |
| 2010 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 2011 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 2012 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 2013 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 2014 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 2015 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 2016 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 2017 | 2017 | |
| 2018 | 2018 | /* keyboard line 5 */ |
| 2019 | | PORT_START |
| 2020 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 2021 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 2022 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') |
| 2023 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 2024 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 2025 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 2026 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 2027 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 2019 | PORT_START_TAG("keyboard_row_5") |
| 2020 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 2021 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 2022 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 2023 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 2024 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 2025 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 2026 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 2027 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(32) |
| 2028 | 2028 | |
| 2029 | 2029 | /* keyboard line 6 */ |
| 2030 | | PORT_START |
| 2031 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 2032 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 2033 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| 2034 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| 2035 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 2036 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 2037 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 2038 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 2030 | PORT_START_TAG("keyboard_row_6") |
| 2031 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 2032 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 2033 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 2034 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 2035 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 2036 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 2037 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 2038 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 2039 | 2039 | |
| 2040 | 2040 | /* keyboard line 7 */ |
| 2041 | | PORT_START |
| 2042 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 2043 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 2044 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| 2045 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 2046 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| 2047 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 2048 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 2049 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 2041 | PORT_START_TAG("keyboard_row_7") |
| 2042 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 2043 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 2044 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 2045 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 2046 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 2047 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 2048 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 2049 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 2050 | 2050 | |
| 2051 | 2051 | /* keyboard line 8 */ |
| 2052 | | PORT_START |
| 2053 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 2054 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') |
| 2055 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(26) |
| 2056 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 2057 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) |
| 2058 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 2059 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) |
| 2060 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| 2052 | PORT_START_TAG("keyboard_row_8") |
| 2053 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 2054 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') PORT_CHAR('~') |
| 2055 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_TILDE) PORT_CHAR(27) |
| 2056 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 2057 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) |
| 2058 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 2059 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_TOGGLE |
| 2060 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 2061 | 2061 | |
| 2062 | 2062 | /* keyboard line 9 */ |
| 2063 | | PORT_START |
| 2064 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) |
| 2065 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) |
| 2066 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) |
| 2067 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) |
| 2068 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) |
| 2069 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) |
| 2070 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(1) |
| 2071 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 2063 | PORT_START_TAG("keyboard_row_9") |
| 2064 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY |
| 2065 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY |
| 2066 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY |
| 2067 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_8WAY |
| 2068 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) |
| 2069 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1) |
| 2070 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_PLAYER(1) |
| 2071 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(8) |
| 2072 | |
| 2073 | /* Second joystick port need to be defined: the second joystick is daisy-chained on the back of the first one */ |
| 2074 | |
| 2072 | 2075 | INPUT_PORTS_END |
| 2073 | 2076 | |
| 2074 | 2077 | |
| 2075 | 2078 | /* Steph 2000-10-27 I remapped the 'Machine Name' Dip Switches (easier to understand) */ |
| 2076 | 2079 | |
| 2077 | | static INPUT_PORTS_START(amstrad) |
| 2080 | static INPUT_PORTS_START( crtc_links ) |
| 2078 | 2081 | |
| 2079 | | PORT_INCLUDE( amstrad_keyboard ) |
| 2080 | | |
| 2081 | 2082 | /* the following are defined as dipswitches, but are in fact solder links on the |
| 2082 | 2083 | * curcuit board. The links are open or closed when the PCB is made, and are set depending on which country |
| 2083 | | * the Amstrad system was to go to |
| 2084 | * the Amstrad system was to go to (reference: http://amstrad.cpc.free.fr/article.php?sid=26) |
| 2084 | 2085 | |
| 2085 | | b3 b2 b1 Manufacturer Name (CPC and CPC+ only): |
| 2086 | | 0 0 0 Isp |
| 2087 | | 0 0 1 Triumph |
| 2088 | | 0 1 0 Saisho |
| 2089 | | 0 1 1 Solavox |
| 2090 | | 1 0 0 Awa |
| 2091 | | 1 0 1 Schneider |
| 2092 | | 1 1 0 Orion |
| 2093 | | 1 1 1 Amstrad*/ |
| 2094 | | PORT_START |
| 2095 | | PORT_DIPNAME( 0x07, 0x07, "Manufacturer Name" ) |
| 2096 | | PORT_DIPSETTING( 0x00, "Isp" ) |
| 2097 | | PORT_DIPSETTING( 0x01, "Triumph" ) |
| 2098 | | PORT_DIPSETTING( 0x02, "Saisho" ) |
| 2099 | | PORT_DIPSETTING( 0x03, "Solavox" ) |
| 2100 | | PORT_DIPSETTING( 0x04, "Awa" ) |
| 2101 | | PORT_DIPSETTING( 0x05, "Schneider" ) |
| 2102 | | PORT_DIPSETTING( 0x06, "Orion" ) |
| 2103 | | PORT_DIPSETTING( 0x07, "Amstrad" ) |
| 2086 | lk1 lk2 lk3 Manufacturer Name (CPC and CPC+ only): |
| 2104 | 2087 | |
| 2105 | | PORT_DIPNAME( 0x10, 0x10, "TV Refresh Rate" ) |
| 2106 | | PORT_DIPSETTING( 0x00, "60 Hz" ) |
| 2107 | | PORT_DIPSETTING( 0x10, "50 Hz" ) |
| 2088 | 0 0 0 Isp |
| 2089 | 0 0 1 Triumph (UK?) |
| 2090 | 0 1 0 Saisho (UK: Saisho is Dixons brand name for their electronic goods) |
| 2091 | 0 1 1 Solavox |
| 2092 | 1 0 0 Awa (Australia) |
| 2093 | 1 0 1 Schneider (Germany) |
| 2094 | 1 1 0 Orion (Japan?) |
| 2095 | 1 1 1 Amstrad (UK) |
| 2108 | 2096 | |
| 2097 | lk4 Frequency |
| 2098 | 0 60 Hz |
| 2099 | 1 50 Hz |
| 2100 | */ |
| 2101 | PORT_START_TAG("solder_links") |
| 2102 | PORT_DIPNAME(0x07, 0x07, "Manufacturer Name") |
| 2103 | PORT_DIPLOCATION("LK:3,2,1") |
| 2104 | PORT_DIPSETTING(0x00, "Isp") |
| 2105 | PORT_DIPSETTING(0x01, "Triumph") |
| 2106 | PORT_DIPSETTING(0x02, "Saisho") |
| 2107 | PORT_DIPSETTING(0x03, "Solavox") |
| 2108 | PORT_DIPSETTING(0x04, "Awa") |
| 2109 | PORT_DIPSETTING(0x05, "Schneider") |
| 2110 | PORT_DIPSETTING(0x06, "Orion") |
| 2111 | PORT_DIPSETTING(0x07, "Amstrad") |
| 2112 | |
| 2113 | PORT_DIPNAME(0x10, 0x10, "TV Refresh Rate") |
| 2114 | PORT_DIPLOCATION("LK:4") |
| 2115 | PORT_DIPSETTING(0x00, "60 Hz") |
| 2116 | PORT_DIPSETTING(0x10, "50 Hz") |
| 2117 | |
| 2109 | 2118 | /* Part number Manufacturer Type number |
| 2110 | | UM6845 UMC 0 |
| 2111 | | HD6845S Hitachi 0 |
| 2112 | | UM6845R UMC 1 |
| 2113 | | MC6845 Motorola 2 |
| 2119 | UM6845 UMC 0 |
| 2120 | HD6845S Hitachi 0 |
| 2121 | UM6845R UMC 1 |
| 2122 | MC6845 Motorola 2 |
| 2114 | 2123 | AMS40489 Amstrad 3 |
| 2115 | 2124 | Pre-ASIC??? Amstrad? 4 In the "cost-down" CPC6128, the CRTC functionality is integrated into a single ASIC IC. This ASIC is often refered to as the "Pre-ASIC" because it preceeded the CPC+ ASIC |
| 2116 | | As far as I know, the KC compact used HD6845S only. |
| 2125 | As far as I know, the KC compact used HD6845S only. |
| 2117 | 2126 | */ |
| 2118 | 2127 | PORT_START_TAG("crtc") |
| 2119 | | PORT_DIPNAME( 0xFF, M6845_PERSONALITY_UM6845R, "CRTC Type" ) |
| 2120 | | PORT_DIPSETTING(M6845_PERSONALITY_UM6845, "Type 0 - UM6845" ) |
| 2121 | | PORT_DIPSETTING(M6845_PERSONALITY_HD6845S, "Type 0 - HD6845S" ) |
| 2122 | | PORT_DIPSETTING(M6845_PERSONALITY_UM6845R, "Type 1 - UM6845R" ) |
| 2123 | | PORT_DIPSETTING(M6845_PERSONALITY_GENUINE, "Type 2 - MC6845" ) |
| 2124 | | PORT_DIPSETTING(M6845_PERSONALITY_AMS40489, "Type 3 - AMS40489" ) |
| 2125 | | PORT_DIPSETTING(M6845_PERSONALITY_PREASIC, "Type 4 - Pre-ASIC???" ) |
| 2128 | PORT_CONFNAME( 0xFF, M6845_PERSONALITY_UM6845R, "CRTC Type") |
| 2129 | PORT_CONFSETTING(M6845_PERSONALITY_UM6845, "Type 0 - UM6845") |
| 2130 | PORT_CONFSETTING(M6845_PERSONALITY_HD6845S, "Type 0 - HD6845S") |
| 2131 | PORT_CONFSETTING(M6845_PERSONALITY_UM6845R, "Type 1 - UM6845R") |
| 2132 | PORT_CONFSETTING(M6845_PERSONALITY_GENUINE, "Type 2 - MC6845") |
| 2133 | PORT_CONFSETTING(M6845_PERSONALITY_AMS40489, "Type 3 - AMS40489") |
| 2134 | PORT_CONFSETTING(M6845_PERSONALITY_PREASIC, "Type 4 - Pre-ASIC") |
| 2126 | 2135 | |
| 2127 | 2136 | PORT_START_TAG("multiface") |
| 2128 | | PORT_CONFNAME(0x01, 0x00, "Multiface Hardware" ) |
| 2137 | PORT_CONFNAME(0x01, 0x00, "Multiface Two" ) |
| 2129 | 2138 | PORT_CONFSETTING(0x00, DEF_STR( Off) ) |
| 2130 | 2139 | PORT_CONFSETTING(0x01, DEF_STR( On) ) |
| 2131 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Multiface Stop") PORT_CODE(KEYCODE_F1) |
| 2140 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Multiface Two's Stop Button") PORT_CODE(KEYCODE_F1) |
| 2141 | // PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Multiface Two's Reset Button") PORT_CODE(KEYCODE_F3) Not implemented |
| 2132 | 2142 | |
| 2133 | 2143 | PORT_START_TAG("green_display") |
| 2134 | | PORT_CONFNAME( 0x01, 0x00, "Color/Green Display" ) |
| 2135 | | PORT_CONFSETTING(0x00, "Color Display" ) |
| 2136 | | PORT_CONFSETTING(0x01, "Green Display" ) |
| 2144 | PORT_CONFNAME( 0x01, 0x00, "Monitor" ) |
| 2145 | PORT_CONFSETTING(0x00, "CTM640 Colour Monitor" ) |
| 2146 | PORT_CONFSETTING(0x01, "GT64 Green Monitor" ) |
| 2137 | 2147 | |
| 2138 | 2148 | INPUT_PORTS_END |
| 2139 | 2149 | |
| 2150 | static INPUT_PORTS_START(amstrad) |
| 2151 | |
| 2152 | PORT_INCLUDE( amstrad_keyboard ) |
| 2153 | PORT_INCLUDE( crtc_links ) |
| 2154 | |
| 2155 | INPUT_PORTS_END |
| 2156 | |
| 2140 | 2157 | static INPUT_PORTS_START(kccomp) |
| 2141 | 2158 | PORT_INCLUDE( amstrad_keyboard ) |
| 2142 | 2159 | INPUT_PORTS_END |
| 2143 | 2160 | |
| 2144 | 2161 | static INPUT_PORTS_START(plus) |
| 2145 | 2162 | PORT_INCLUDE( amstrad_keyboard ) |
| 2163 | PORT_INCLUDE( crtc_links ) |
| 2146 | 2164 | |
| 2147 | | PORT_START |
| 2148 | | PORT_DIPNAME( 0x07, 0x07, "Manufacturer Name" ) |
| 2149 | | PORT_DIPSETTING( 0x00, "Isp" ) |
| 2150 | | PORT_DIPSETTING( 0x01, "Triumph" ) |
| 2151 | | PORT_DIPSETTING( 0x02, "Saisho" ) |
| 2152 | | PORT_DIPSETTING( 0x03, "Solavox" ) |
| 2153 | | PORT_DIPSETTING( 0x04, "Awa" ) |
| 2154 | | PORT_DIPSETTING( 0x05, "Schneider" ) |
| 2155 | | PORT_DIPSETTING( 0x06, "Orion" ) |
| 2156 | | PORT_DIPSETTING( 0x07, "Amstrad" ) |
| 2165 | /* The CPC+ and GX4000 adds support for analogue controllers. |
| 2166 | Up to two joysticks or four paddles can be used, although the ASIC supports twice that. |
| 2167 | Read at &6808-&680f in ASIC RAM |
| 2168 | I am unsure if these are even close to correct */ |
| 2157 | 2169 | |
| 2158 | | PORT_DIPNAME( 0x10, 0x10, "TV Refresh Rate" ) |
| 2159 | | PORT_DIPSETTING( 0x00, "60 Hz" ) |
| 2160 | | PORT_DIPSETTING( 0x10, "50 Hz" ) |
| 2170 | PORT_START_TAG("analog1") |
| 2171 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_X) |
| 2172 | PORT_SENSITIVITY(100) |
| 2173 | PORT_KEYDELTA(10) |
| 2174 | PORT_PLAYER(1) |
| 2161 | 2175 | |
| 2162 | | /* The CPC+ and GX4000 use the ASIC CRTC functionality */ |
| 2163 | | PORT_START_TAG("crtc") |
| 2164 | | PORT_DIPNAME( 0xFF, M6845_PERSONALITY_AMS40489, "CRTC Type" ) |
| 2165 | | PORT_DIPSETTING(M6845_PERSONALITY_UM6845, "Type 0 - UM6845" ) |
| 2166 | | PORT_DIPSETTING(M6845_PERSONALITY_HD6845S, "Type 0 - HD6845S" ) |
| 2167 | | PORT_DIPSETTING(M6845_PERSONALITY_UM6845R, "Type 1 - UM6845R" ) |
| 2168 | | PORT_DIPSETTING(M6845_PERSONALITY_GENUINE, "Type 2 - MC6845" ) |
| 2169 | | PORT_DIPSETTING(M6845_PERSONALITY_AMS40489, "Type 3 - AMS40489" ) |
| 2170 | | PORT_DIPSETTING(M6845_PERSONALITY_PREASIC, "Type 4 - Pre-ASIC???" ) |
| 2176 | PORT_START_TAG("analog2") |
| 2177 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_Y) |
| 2178 | PORT_SENSITIVITY(100) |
| 2179 | PORT_KEYDELTA(10) |
| 2180 | PORT_PLAYER(1) |
| 2171 | 2181 | |
| 2172 | | /* The CPC+ and GX4000 adds support for analogue controllers. |
| 2173 | | Up to two joysticks or four paddles can be used, although the ASIC supports twice that. |
| 2174 | | Read at &6808-&680f in ASIC RAM |
| 2175 | | I am unsure if these are even close to correct */ |
| 2182 | PORT_START_TAG("analog3") |
| 2183 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_X) |
| 2184 | PORT_SENSITIVITY(100) |
| 2185 | PORT_KEYDELTA(10) |
| 2186 | PORT_PLAYER(2) |
| 2176 | 2187 | |
| 2177 | | PORT_START_TAG("analog1") |
| 2178 | | PORT_BIT(0x3f , 0, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_PLAYER(1) |
| 2179 | | PORT_START_TAG("analog2") |
| 2180 | | PORT_BIT(0x3f , 0, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_PLAYER(1) |
| 2181 | | PORT_START_TAG("analog3") |
| 2182 | | PORT_BIT(0x3f , 0, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_PLAYER(2) |
| 2183 | | PORT_START_TAG("analog4") |
| 2184 | | PORT_BIT(0x3f , 0, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_PLAYER(2) |
| 2185 | | // Not used, but are here for completeness |
| 2186 | | PORT_START_TAG("analog5") |
| 2187 | | PORT_BIT(0x3f , 0, IPT_PADDLE) PORT_SENSITIVITY(100) |
| 2188 | | PORT_START_TAG("analog6") |
| 2189 | | PORT_BIT(0x3f , 0, IPT_PADDLE) PORT_SENSITIVITY(100) |
| 2190 | | PORT_START_TAG("analog7") |
| 2191 | | PORT_BIT(0x3f , 0, IPT_PADDLE) PORT_SENSITIVITY(100) |
| 2192 | | PORT_START_TAG("analog8") |
| 2193 | | PORT_BIT(0x3f , 0, IPT_PADDLE) PORT_SENSITIVITY(100) |
| 2188 | PORT_START_TAG("analog4") |
| 2189 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_Y) |
| 2190 | PORT_SENSITIVITY(100) |
| 2191 | PORT_KEYDELTA(10) |
| 2192 | PORT_PLAYER(2) |
| 2193 | |
| 2194 | // Not used, but are here for completeness |
| 2195 | PORT_START_TAG("analog5") |
| 2196 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_X) |
| 2197 | PORT_SENSITIVITY(100) |
| 2198 | PORT_KEYDELTA(10) |
| 2199 | PORT_PLAYER(3) |
| 2200 | |
| 2201 | PORT_START_TAG("analog6") |
| 2202 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_Y) |
| 2203 | PORT_SENSITIVITY(100) |
| 2204 | PORT_KEYDELTA(10) |
| 2205 | PORT_PLAYER(3) |
| 2206 | |
| 2207 | PORT_START_TAG("analog7") |
| 2208 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_X) |
| 2209 | PORT_SENSITIVITY(100) |
| 2210 | PORT_KEYDELTA(10) |
| 2211 | PORT_PLAYER(4) |
| 2212 | |
| 2213 | PORT_START_TAG("analog8") |
| 2214 | PORT_BIT(0x3f , 0, IPT_TRACKBALL_Y) |
| 2215 | PORT_SENSITIVITY(100) |
| 2216 | PORT_KEYDELTA(10) |
| 2217 | PORT_PLAYER(4) |
| 2218 | |
| 2194 | 2219 | INPUT_PORTS_END |
| 2195 | 2220 | /* -------------------- |
| 2196 | 2221 | - AY8910_interface - |
| r1250 | r1251 | |
| 2254 | 2279 | /* video hardware */ |
| 2255 | 2280 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 2256 | 2281 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 2257 | | MDRV_SCREEN_SIZE(800, 312) |
| 2282 | MDRV_SCREEN_SIZE(800, 312) |
| 2258 | 2283 | /* Amstrad Monitor Visible AREA : 768x272 */ |
| 2259 | 2284 | MDRV_SCREEN_VISIBLE_AREA(0, ((AMSTRAD_SCREEN_WIDTH-32) - 1), 0, ((AMSTRAD_SCREEN_HEIGHT-40) - 1)) |
| 2260 | 2285 | MDRV_PALETTE_LENGTH(32) |
| r1250 | r1251 | |
| 2271 | 2296 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 2272 | 2297 | MDRV_SOUND_ADD(AY8910, 1000000) |
| 2273 | 2298 | MDRV_SOUND_CONFIG(ay8912_interface) |
| 2274 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 2299 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 2275 | 2300 | MACHINE_DRIVER_END |
| 2276 | 2301 | |
| 2277 | 2302 | |
| r1250 | r1251 | |
| 2469 | 2494 | ROM_END |
| 2470 | 2495 | |
| 2471 | 2496 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG, COMPANY FULLNAME */ |
| 2472 | | COMP( 1984, cpc464, 0, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad/Schneider CPC464", 0) |
| 2473 | | COMP( 1985, cpc664, cpc464, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad/Schneider CPC664", 0) |
| 2474 | | COMP( 1985, cpc6128, cpc464, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad/Schneider CPC6128", 0) |
| 2475 | | COMP( 1985, cpc6128f, cpc464, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad/Schneider CPC6128 Azerty French Keyboard", 0) |
| 2497 | COMP( 1984, cpc464, 0, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad CPC464", 0) |
| 2498 | COMP( 1985, cpc664, cpc464, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad CPC664", 0) |
| 2499 | COMP( 1985, cpc6128, cpc464, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad CPC6128", 0) |
| 2500 | COMP( 1985, cpc6128f, cpc464, 0, amstrad, amstrad, 0, cpc6128, "Amstrad plc", "Amstrad CPC6128 Azerty French Keyboard", 0) |
| 2476 | 2501 | COMP( 1990, cpc464p, 0, 0, cpcplus, plus, 0, cpcplus, "Amstrad plc", "Amstrad CPC464+", 0) |
| 2477 | 2502 | COMP( 1990, cpc6128p, 0, 0, cpcplus, plus, 0, cpcplus, "Amstrad plc", "Amstrad CPC6128+", 0) |
| 2478 | 2503 | COMP( 1989, kccomp, cpc464, 0, kccomp, kccomp, 0, cpc6128, "VEB Mikroelektronik", "KC Compact", 0) |