| Previous | 15994 Revisions | Next |
| r1573 Sunday 20th January, 2008 at 19:24:04 UTC by Dirk Best |
|---|
| Moved centroni.h to proper location |
| [src/mess/drivers] | abc80.c abc80x.c amstrad.c atarist.c atom.c einstein.c exidy.c nc.c oric.c pcw16.c sg1000.c sord.c |
| [src/mess/includes] | |
| [src/mess/machine] | centroni.c centroni.h* oric.c pc.c pclpt.c thomson.c |
| r1572 | r1573 | |
|---|---|---|
| 1 | /***************************************************************************** | |
| 2 | * | |
| 3 | * includes/centroni.h | |
| 4 | * | |
| 5 | * Defines centronics/parallel port printer interface | |
| 6 | * Provides a centronics printer simulation (sends output to IO_PRINTER) | |
| 7 | * | |
| 8 | ****************************************************************************/ | |
| 9 | ||
| 10 | #ifndef CENTRONICS_H_ | |
| 11 | #define CENTRONICS_H_ | |
| 12 | ||
| 13 | #ifdef __cplusplus | |
| 14 | extern "C" { | |
| 15 | #endif | |
| 16 | ||
| 17 | ||
| 18 | typedef enum { | |
| 19 | PRINTER_CENTRONICS, | |
| 20 | PRINTER_IBM // select line not important | |
| 21 | } PRINTER_TYPE; | |
| 22 | ||
| 23 | typedef struct { | |
| 24 | UINT8 (*read_data)(int nr); | |
| 25 | void (*write_data)(int nr, UINT8 data); | |
| 26 | int (*handshake_in)(int nr); | |
| 27 | void (*handshake_out)(int nr, int data, int mask); | |
| 28 | } CENTRONICS_DEVICE; | |
| 29 | ||
| 30 | ||
| 31 | // from printer | |
| 32 | #define CENTRONICS_NOT_BUSY 0x80 | |
| 33 | #define CENTRONICS_ACKNOWLEDGE 0x40 | |
| 34 | #define CENTRONICS_NO_PAPER 0x20 | |
| 35 | #define CENTRONICS_ONLINE 0x10 | |
| 36 | #define CENTRONICS_NO_ERROR 8 | |
| 37 | ||
| 38 | // to printer | |
| 39 | #define CENTRONICS_SELECT 8 | |
| 40 | #define CENTRONICS_NO_RESET 4 | |
| 41 | #define CENTRONICS_AUTOLINEFEED 2 | |
| 42 | #define CENTRONICS_STROBE 1 | |
| 43 | ||
| 44 | typedef struct { | |
| 45 | PRINTER_TYPE type; | |
| 46 | void (*handshake_out)(int n, int data, int mask); | |
| 47 | } CENTRONICS_CONFIG; | |
| 48 | ||
| 49 | ||
| 50 | /*----------- defined in machine/centroni.c -----------*/ | |
| 51 | ||
| 52 | void centronics_config(int nr, const CENTRONICS_CONFIG *config); | |
| 53 | ||
| 54 | void centronics_write_data(int nr, UINT8 data); | |
| 55 | void centronics_write_handshake(int nr, int data, int mask); | |
| 56 | UINT8 centronics_read_data(int nr); | |
| 57 | int centronics_read_handshake(int nr); | |
| 58 | ||
| 59 | extern const CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE; | |
| 60 | ||
| 61 | ||
| 62 | #ifdef __cplusplus | |
| 63 | } | |
| 64 | #endif | |
| 65 | ||
| 66 | #endif /* CENTRONI_H_ */ |
| r1572 | r1573 | |
|---|---|---|
| 7 | 7 | #ifndef PCLPT_H_ |
| 8 | 8 | #define PCLPT_H_ |
| 9 | 9 | |
| 10 | #include "in | |
| 10 | #include "machin | |
| 11 | 11 | |
| 12 | 12 | #ifdef __cplusplus |
| 13 | 13 | extern "C" { |
| r1572 | r1573 | |
|---|---|---|
| 8 | 8 | #include "driver.h" |
| 9 | 9 | #include "memconv.h" |
| 10 | 10 | #include "includes/pclpt.h" |
| 11 | #include "in | |
| 11 | #include "machin | |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | #define LOG(LEVEL,N,M,A) \ |
| r1572 | r1573 | |
|---|---|---|
| 16 | 16 | #include "sound/dac.h" |
| 17 | 17 | #include "audio/mea8000.h" |
| 18 | 18 | #include "devices/cartslot.h" |
| 19 | #include "in | |
| 19 | #include "machin | |
| 20 | 20 | #include "includes/serial.h" |
| 21 | 21 | #include "devices/cassette.h" |
| 22 | 22 | #include "formats/thom_cas.h" |
| r1572 | r1573 | |
|---|---|---|
| 24 | 24 | #include "machine/6522via.h" |
| 25 | 25 | #include "machine/applefdc.h" |
| 26 | 26 | #include "machine/6551.h" |
| 27 | #include "in | |
| 27 | #include "machin | |
| 28 | 28 | #include "devices/basicdsk.h" |
| 29 | 29 | #include "devices/mfmdisk.h" |
| 30 | 30 | #include "devices/printer.h" |
| r1572 | r1573 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include " | |
| 8 | #include " | |
| 9 | 9 | #include "devices/printer.h" |
| 10 | 10 | |
| 11 | 11 | typedef struct { |
| r0 | r1573 | |
|---|---|---|
| 1 | /***************************************************************************** | |
| 2 | * | |
| 3 | * machine/centroni.h | |
| 4 | * | |
| 5 | * Defines centronics/parallel port printer interface | |
| 6 | * Provides a centronics printer simulation (sends output to IO_PRINTER) | |
| 7 | * | |
| 8 | ****************************************************************************/ | |
| 9 | ||
| 10 | #ifndef CENTRONICS_H_ | |
| 11 | #define CENTRONICS_H_ | |
| 12 | ||
| 13 | #ifdef __cplusplus | |
| 14 | extern "C" { | |
| 15 | #endif | |
| 16 | ||
| 17 | ||
| 18 | typedef enum { | |
| 19 | PRINTER_CENTRONICS, | |
| 20 | PRINTER_IBM // select line not important | |
| 21 | } PRINTER_TYPE; | |
| 22 | ||
| 23 | typedef struct { | |
| 24 | UINT8 (*read_data)(int nr); | |
| 25 | void (*write_data)(int nr, UINT8 data); | |
| 26 | int (*handshake_in)(int nr); | |
| 27 | void (*handshake_out)(int nr, int data, int mask); | |
| 28 | } CENTRONICS_DEVICE; | |
| 29 | ||
| 30 | ||
| 31 | // from printer | |
| 32 | #define CENTRONICS_NOT_BUSY 0x80 | |
| 33 | #define CENTRONICS_ACKNOWLEDGE 0x40 | |
| 34 | #define CENTRONICS_NO_PAPER 0x20 | |
| 35 | #define CENTRONICS_ONLINE 0x10 | |
| 36 | #define CENTRONICS_NO_ERROR 8 | |
| 37 | ||
| 38 | // to printer | |
| 39 | #define CENTRONICS_SELECT 8 | |
| 40 | #define CENTRONICS_NO_RESET 4 | |
| 41 | #define CENTRONICS_AUTOLINEFEED 2 | |
| 42 | #define CENTRONICS_STROBE 1 | |
| 43 | ||
| 44 | typedef struct { | |
| 45 | PRINTER_TYPE type; | |
| 46 | void (*handshake_out)(int n, int data, int mask); | |
| 47 | } CENTRONICS_CONFIG; | |
| 48 | ||
| 49 | ||
| 50 | /*----------- defined in machine/centroni.c -----------*/ | |
| 51 | ||
| 52 | void centronics_config(int nr, const CENTRONICS_CONFIG *config); | |
| 53 | ||
| 54 | void centronics_write_data(int nr, UINT8 data); | |
| 55 | void centronics_write_handshake(int nr, int data, int mask); | |
| 56 | UINT8 centronics_read_data(int nr); | |
| 57 | int centronics_read_handshake(int nr); | |
| 58 | ||
| 59 | extern const CENTRONICS_DEVICE CENTRONICS_PRINTER_DEVICE; | |
| 60 | ||
| 61 | ||
| 62 | #ifdef __cplusplus | |
| 63 | } | |
| 64 | #endif | |
| 65 | ||
| 66 | #endif /* CENTRONI_H_ */ |
| r1572 | r1573 | |
|---|---|---|
| 33 | 33 | #include "machine/pckeybrd.h" |
| 34 | 34 | |
| 35 | 35 | #include "includes/pclpt.h" |
| 36 | #include "in | |
| 36 | #include "machin | |
| 37 | 37 | |
| 38 | 38 | #include "machine/pc_hdc.h" |
| 39 | 39 | #include "machine/nec765.h" |
| r1572 | r1573 | |
|---|---|---|
| 113 | 113 | #define LOG_DEBUG(x) do { if (NC200_DEBUG) logerror x; } while (0) |
| 114 | 114 | |
| 115 | 115 | |
| 116 | #include "in | |
| 116 | #include "machin | |
| 117 | 117 | #include "devices/printer.h" |
| 118 | 118 | |
| 119 | 119 | /* the serial clock is generated by the nc hardware and connected to the msm8251 |
| r1572 | r1573 | |
|---|---|---|
| 23 | 23 | #include "sound/sn76496.h" |
| 24 | 24 | #include "cpu/z80/z80.h" |
| 25 | 25 | #include "cpu/z80/z80daisy.h" |
| 26 | #include "in | |
| 26 | #include "machin | |
| 27 | 27 | #include "devices/printer.h" |
| 28 | 28 | #include "machine/z80ctc.h" |
| 29 | 29 | #include "machine/z80pio.h" |
| r1572 | r1573 | |
|---|---|---|
| 90 | 90 | #include "includes/pcw16.h" |
| 91 | 91 | |
| 92 | 92 | /* Components */ |
| 93 | #include "in | |
| 93 | #include "machin | |
| 94 | 94 | #include "includes/pclpt.h" /* PC-Parallel Port */ |
| 95 | 95 | #include "machine/pckeybrd.h" /* PC-AT keyboard */ |
| 96 | 96 | #include "machine/pc_fdc.h" /* change to superio later */ |
| r1572 | r1573 | |
|---|---|---|
| 74 | 74 | #include "includes/abc80.h" |
| 75 | 75 | |
| 76 | 76 | /* Components */ |
| 77 | #include "in | |
| 77 | #include "machin | |
| 78 | 78 | #include "cpu/z80/z80daisy.h" |
| 79 | 79 | #include "machine/z80pio.h" |
| 80 | 80 | #include "sound/sn76477.h" |
| r1572 | r1573 | |
|---|---|---|
| 6 | 6 | #include "devices/basicdsk.h" |
| 7 | 7 | #include "devices/cartslot.h" |
| 8 | 8 | #include "devices/printer.h" |
| 9 | #include "in | |
| 9 | #include "machin | |
| 10 | 10 | #include "includes/serial.h" |
| 11 | 11 | #include "machine/6850acia.h" |
| 12 | 12 | #include "machine/68901mfp.h" |
| r1572 | r1573 | |
|---|---|---|
| 3 | 3 | #include "devices/cartslot.h" |
| 4 | 4 | #include "devices/cassette.h" |
| 5 | 5 | #include "devices/printer.h" |
| 6 | #include "in | |
| 6 | #include "machin | |
| 7 | 7 | #include "includes/serial.h" |
| 8 | 8 | #include "machine/msm8251.h" |
| 9 | 9 | #include "machine/8255ppi.h" |
| r1572 | r1573 | |
|---|---|---|
| 84 | 84 | ********************************************************************************/ |
| 85 | 85 | #include "driver.h" |
| 86 | 86 | #include "includes/exidy.h" |
| 87 | #include "in | |
| 87 | #include "machin | |
| 88 | 88 | #include "machine/hd6402.h" |
| 89 | 89 | #include "cpu/z80/z80.h" |
| 90 | 90 | #include "machine/wd17xx.h" |
| r1572 | r1573 | |
|---|---|---|
| 19 | 19 | #include "driver.h" |
| 20 | 20 | #include "mslegacy.h" |
| 21 | 21 | #include "includes/oric.h" |
| 22 | #include "in | |
| 22 | #include "machin | |
| 23 | 23 | #include "devices/printer.h" |
| 24 | 24 | #include "devices/mflopimg.h" |
| 25 | 25 | #include "devices/cassette.h" |
| r1572 | r1573 | |
|---|---|---|
| 62 | 62 | #include "includes/atom.h" |
| 63 | 63 | |
| 64 | 64 | /* Components */ |
| 65 | #include "in | |
| 65 | #include "machin | |
| 66 | 66 | #include "machine/i8271.h" |
| 67 | 67 | #include "machine/8255ppi.h" |
| 68 | 68 | #include "machine/6522via.h" |
| r1572 | r1573 | |
|---|---|---|
| 75 | 75 | /* Components */ |
| 76 | 76 | #include "cpu/z80/z80daisy.h" |
| 77 | 77 | #include "cpu/i8039/i8039.h" |
| 78 | #include "in | |
| 78 | #include "machin | |
| 79 | 79 | #include "includes/serial.h" |
| 80 | 80 | #include "machine/z80ctc.h" |
| 81 | 81 | #include "machine/z80sio.h" |
| r1572 | r1573 | |
|---|---|---|
| 86 | 86 | #include "cpu/z80/z80.h" |
| 87 | 87 | #include "cpu/z80/z80daisy.h" |
| 88 | 88 | #include "machine/wd17xx.h" |
| 89 | #include "in | |
| 89 | #include "machin | |
| 90 | 90 | #include "machine/msm8251.h" |
| 91 | 91 | #include "devices/dsk.h" |
| 92 | 92 | #include "devices/basicdsk.h" |
| r1572 | r1573 | |
|---|---|---|
| 81 | 81 | #include "includes/amstrad.h" |
| 82 | 82 | |
| 83 | 83 | /* Components */ |
| 84 | #include "in | |
| 84 | #include "machin | |
| 85 | 85 | #include "machine/8255ppi.h" /* for 8255 ppi */ |
| 86 | 86 | #include "cpu/z80/z80.h" /* for cycle tables */ |
| 87 | 87 | #include "video/m6845.h" /* CRTC display */ |
| Previous | 15994 Revisions | Next |