trunk/src/mess/machine/c64_nl10.c
| r0 | r24776 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | Star NL-10 Printer Interface Cartridge emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | **********************************************************************/ |
| 9 | |
| 10 | #include "c64_nl10.h" |
| 11 | |
| 12 | |
| 13 | |
| 14 | //************************************************************************** |
| 15 | // DEVICE DEFINITIONS |
| 16 | //************************************************************************** |
| 17 | |
| 18 | const device_type C64_NL10_INTERFACE = &device_creator<c64_nl10_interface_device>; |
| 19 | |
| 20 | |
| 21 | //------------------------------------------------- |
| 22 | // ROM( c64_nl10_interface ) |
| 23 | //------------------------------------------------- |
| 24 | |
| 25 | ROM_START( c64_nl10_interface ) |
| 26 | ROM_REGION( 0x8000, "rom", 0 ) |
| 27 | ROM_LOAD( "nlc 1.5.ic2", 0x0000, 0x8000, CRC(748840b6) SHA1(5b3b9e8a93d5d77a49160b3d0c2489ba7be99c9a) ) |
| 28 | ROM_END |
| 29 | |
| 30 | |
| 31 | //------------------------------------------------- |
| 32 | // rom_region - device-specific ROM region |
| 33 | //------------------------------------------------- |
| 34 | |
| 35 | const rom_entry *c64_nl10_interface_device::device_rom_region() const |
| 36 | { |
| 37 | return ROM_NAME( c64_nl10_interface ); |
| 38 | } |
| 39 | |
| 40 | |
| 41 | |
| 42 | //************************************************************************** |
| 43 | // LIVE DEVICE |
| 44 | //************************************************************************** |
| 45 | |
| 46 | //------------------------------------------------- |
| 47 | // c64_nl10_interface_device - constructor |
| 48 | //------------------------------------------------- |
| 49 | |
| 50 | c64_nl10_interface_device::c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 51 | : device_t(mconfig, C64_NL10_INTERFACE, "Star NL-10 C64 Interface Cartridge", tag, owner, clock, "c64_nl10", __FILE__), |
| 52 | device_cbm_iec_interface(mconfig, *this) |
| 53 | { |
| 54 | } |
| 55 | |
| 56 | |
| 57 | //------------------------------------------------- |
| 58 | // device_start - device-specific startup |
| 59 | //------------------------------------------------- |
| 60 | |
| 61 | void c64_nl10_interface_device::device_start() |
| 62 | { |
| 63 | } |
| 64 | |
| 65 | |
| 66 | //------------------------------------------------- |
| 67 | // device_reset - device-specific reset |
| 68 | //------------------------------------------------- |
| 69 | |
| 70 | void c64_nl10_interface_device::device_reset() |
| 71 | { |
| 72 | } |
| 73 | |
| 74 | |
| 75 | //------------------------------------------------- |
| 76 | // cbm_iec_atn - |
| 77 | //------------------------------------------------- |
| 78 | |
| 79 | void c64_nl10_interface_device::cbm_iec_atn(int state) |
| 80 | { |
| 81 | } |
| 82 | |
| 83 | |
| 84 | //------------------------------------------------- |
| 85 | // cbm_iec_data - |
| 86 | //------------------------------------------------- |
| 87 | |
| 88 | void c64_nl10_interface_device::cbm_iec_data(int state) |
| 89 | { |
| 90 | } |
| 91 | |
| 92 | |
| 93 | //------------------------------------------------- |
| 94 | // cbm_iec_reset - |
| 95 | //------------------------------------------------- |
| 96 | |
| 97 | void c64_nl10_interface_device::cbm_iec_reset(int state) |
| 98 | { |
| 99 | if (!state) |
| 100 | { |
| 101 | device_reset(); |
| 102 | } |
| 103 | } |
trunk/src/mess/machine/c64_nl10.h
| r0 | r24776 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | Star NL-10 Printer Interface Cartridge emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | **********************************************************************/ |
| 9 | |
| 10 | #pragma once |
| 11 | |
| 12 | #ifndef __C64_NL10_INTERFACE__ |
| 13 | #define __C64_NL10_INTERFACE__ |
| 14 | |
| 15 | #include "emu.h" |
| 16 | #include "machine/cbmiec.h" |
| 17 | |
| 18 | |
| 19 | |
| 20 | //************************************************************************** |
| 21 | // TYPE DEFINITIONS |
| 22 | //************************************************************************** |
| 23 | |
| 24 | // ======================> c64_nl10_interface_device |
| 25 | |
| 26 | class c64_nl10_interface_device : public device_t, |
| 27 | public device_cbm_iec_interface |
| 28 | { |
| 29 | public: |
| 30 | // construction/destruction |
| 31 | c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 32 | |
| 33 | // optional information overrides |
| 34 | virtual const rom_entry *device_rom_region() const; |
| 35 | |
| 36 | protected: |
| 37 | // device-level overrides |
| 38 | virtual void device_start(); |
| 39 | virtual void device_reset(); |
| 40 | |
| 41 | // device_cbm_iec_interface overrides |
| 42 | void cbm_iec_atn(int state); |
| 43 | void cbm_iec_data(int state); |
| 44 | void cbm_iec_reset(int state); |
| 45 | }; |
| 46 | |
| 47 | |
| 48 | // device type definition |
| 49 | extern const device_type C64_NL10_INTERFACE; |
| 50 | |
| 51 | |
| 52 | |
| 53 | #endif |