src/emu/machine/6526cia.c
| r14779 | r14780 | |
| 10 | 10 | #include "emu.h" |
| 11 | 11 | #include "6526cia.h" |
| 12 | 12 | |
| 13 | | /*************************************************************************** |
| 14 | | CONSTANTS |
| 15 | | ***************************************************************************/ |
| 16 | 13 | |
| 14 | |
| 15 | //************************************************************************** |
| 16 | // MACROS / CONSTANTS |
| 17 | //************************************************************************** |
| 18 | |
| 17 | 19 | /* CIA registers */ |
| 18 | 20 | #define CIA_PRA 0 |
| 19 | 21 | #define CIA_PRB 1 |
| r14779 | r14780 | |
| 41 | 43 | #define CIA_CRA_SPMODE 0x40 |
| 42 | 44 | #define CIA_CRA_TODIN 0x80 |
| 43 | 45 | |
| 44 | | //************************************************************************** |
| 45 | | // DEVICE CONFIGURATION |
| 46 | | //************************************************************************** |
| 47 | 46 | |
| 48 | 47 | |
| 49 | 48 | //************************************************************************** |
| 50 | | // LIVE DEVICE |
| 49 | // DEVICE CONFIGURATION |
| 51 | 50 | //************************************************************************** |
| 52 | 51 | |
| 53 | 52 | // device type definition |
| r14779 | r14780 | |
| 55 | 54 | const device_type MOS6526R2 = &device_creator<mos6526r2_device>; |
| 56 | 55 | const device_type MOS8520 = &device_creator<mos8520_device>; |
| 57 | 56 | |
| 57 | |
| 58 | |
| 59 | //************************************************************************** |
| 60 | // INLINE HELPERS |
| 61 | //************************************************************************** |
| 62 | |
| 63 | inline attotime mos6526_device::cycles_to_time(int c) |
| 64 | { |
| 65 | return attotime::from_hz(clock()) * c; |
| 66 | } |
| 67 | |
| 68 | |
| 69 | |
| 70 | //************************************************************************** |
| 71 | // LIVE DEVICE |
| 72 | //************************************************************************** |
| 73 | |
| 58 | 74 | //------------------------------------------------- |
| 59 | 75 | // mos6526_device - constructor |
| 60 | 76 | //------------------------------------------------- |
| r14779 | r14780 | |
| 174 | 190 | } |
| 175 | 191 | |
| 176 | 192 | /* setup timers */ |
| 193 | m_pc_timer = timer_alloc(TIMER_PC); |
| 194 | |
| 177 | 195 | for (int t = 0; t < (sizeof(m_timer) / sizeof(m_timer[0])); t++) |
| 178 | 196 | { |
| 179 | 197 | cia_timer *timer = &m_timer[t]; |
| r14779 | r14780 | |
| 225 | 243 | } |
| 226 | 244 | |
| 227 | 245 | |
| 246 | //------------------------------------------------- |
| 247 | // device_timer - handler timer events |
| 248 | //------------------------------------------------- |
| 249 | |
| 250 | void mos6526_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 251 | { |
| 252 | switch (id) |
| 253 | { |
| 254 | case TIMER_PC: |
| 255 | m_out_pc_func(1); |
| 256 | break; |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | |
| 228 | 261 | /*------------------------------------------------- |
| 229 | 262 | set_port_mask_value |
| 230 | 263 | -------------------------------------------------*/ |
| r14779 | r14780 | |
| 240 | 273 | |
| 241 | 274 | void mos6526_device::update_pc() |
| 242 | 275 | { |
| 243 | | /* this should really be one cycle long */ |
| 244 | 276 | m_out_pc_func(0); |
| 245 | | m_out_pc_func(1); |
| 277 | |
| 278 | m_pc_timer->adjust(cycles_to_time(1)); |
| 246 | 279 | } |
| 247 | 280 | |
| 248 | 281 | /*------------------------------------------------- |
src/mess/machine/cbmipt.h
| r14779 | r14780 | |
| 7 | 7 | #include "machine/c64_4dxh.h" |
| 8 | 8 | #include "machine/c64_4ksa.h" |
| 9 | 9 | #include "machine/c64_4tba.h" |
| 10 | #include "machine/c64_bn1541.h" |
| 10 | 11 | #include "machine/c64_comal80.h" |
| 11 | 12 | #include "machine/c64_dela_ep256.h" |
| 12 | 13 | #include "machine/c64_dela_ep64.h" |
| r14779 | r14780 | |
| 20 | 21 | #include "machine/c64_final.h" |
| 21 | 22 | #include "machine/c64_final3.h" |
| 22 | 23 | #include "machine/c64_fun_play.h" |
| 24 | #include "machine/c64_geocable.h" |
| 23 | 25 | #include "machine/c64_georam.h" |
| 24 | 26 | #include "machine/c64_ieee488.h" |
| 25 | 27 | #include "machine/c64_kingsoft.h" |
src/mess/machine/c64_geocable.c
| r0 | r14780 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | geoCable Centronics Cable emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | **********************************************************************/ |
| 9 | |
| 10 | #include "c64_geocable.h" |
| 11 | |
| 12 | |
| 13 | |
| 14 | //************************************************************************** |
| 15 | // MACROS / CONSTANTS |
| 16 | //************************************************************************** |
| 17 | |
| 18 | #define CENTRONICS_TAG "centronics" |
| 19 | |
| 20 | |
| 21 | |
| 22 | //************************************************************************** |
| 23 | // DEVICE DEFINITIONS |
| 24 | //************************************************************************** |
| 25 | |
| 26 | const device_type C64_GEOCABLE = &device_creator<c64_geocable_device>; |
| 27 | |
| 28 | |
| 29 | //------------------------------------------------- |
| 30 | // centronics_interface centronics_intf |
| 31 | //------------------------------------------------- |
| 32 | |
| 33 | WRITE_LINE_MEMBER( c64_geocable_device::busy_w ) |
| 34 | { |
| 35 | m_slot->flag2_w(state); |
| 36 | } |
| 37 | |
| 38 | static const centronics_interface centronics_intf = |
| 39 | { |
| 40 | DEVCB_NULL, |
| 41 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF, c64_geocable_device, busy_w), |
| 42 | DEVCB_NULL |
| 43 | }; |
| 44 | |
| 45 | |
| 46 | //------------------------------------------------- |
| 47 | // MACHINE_CONFIG_FRAGMENT( c64_geocable ) |
| 48 | //------------------------------------------------- |
| 49 | |
| 50 | static MACHINE_CONFIG_FRAGMENT( c64_geocable ) |
| 51 | MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, centronics_intf) |
| 52 | MACHINE_CONFIG_END |
| 53 | |
| 54 | |
| 55 | //------------------------------------------------- |
| 56 | // machine_config_additions - device-specific |
| 57 | // machine configurations |
| 58 | //------------------------------------------------- |
| 59 | |
| 60 | machine_config_constructor c64_geocable_device::device_mconfig_additions() const |
| 61 | { |
| 62 | return MACHINE_CONFIG_NAME( c64_geocable ); |
| 63 | } |
| 64 | |
| 65 | |
| 66 | |
| 67 | //************************************************************************** |
| 68 | // LIVE DEVICE |
| 69 | //************************************************************************** |
| 70 | |
| 71 | //------------------------------------------------- |
| 72 | // c64_geocable_device - constructor |
| 73 | //------------------------------------------------- |
| 74 | |
| 75 | c64_geocable_device::c64_geocable_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 76 | device_t(mconfig, C64_GEOCABLE, "C64 geoCable", tag, owner, clock), |
| 77 | device_c64_user_port_interface(mconfig, *this), |
| 78 | m_centronics(*this, CENTRONICS_TAG) |
| 79 | { |
| 80 | } |
| 81 | |
| 82 | |
| 83 | //------------------------------------------------- |
| 84 | // device_start - device-specific startup |
| 85 | //------------------------------------------------- |
| 86 | |
| 87 | void c64_geocable_device::device_start() |
| 88 | { |
| 89 | } |
| 90 | |
| 91 | |
| 92 | //------------------------------------------------- |
| 93 | // c64_pb_w - port B write |
| 94 | //------------------------------------------------- |
| 95 | |
| 96 | void c64_geocable_device::c64_pb_w(address_space &space, offs_t offset, UINT8 data) |
| 97 | { |
| 98 | m_centronics->write(data); |
| 99 | } |
| 100 | |
| 101 | |
| 102 | //------------------------------------------------- |
| 103 | // c64_pb_w - port B write |
| 104 | //------------------------------------------------- |
| 105 | |
| 106 | void c64_geocable_device::c64_pa2_w(int level) |
| 107 | { |
| 108 | m_centronics->strobe_w(level); |
| 109 | } |
src/mess/machine/c64_geocable.h
| r0 | r14780 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | geoCable Centronics Cable 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_GEOCABLE__ |
| 13 | #define __C64_GEOCABLE__ |
| 14 | |
| 15 | #define ADDRESS_MAP_MODERN |
| 16 | |
| 17 | #include "emu.h" |
| 18 | #include "machine/c64user.h" |
| 19 | #include "machine/ctronics.h" |
| 20 | |
| 21 | |
| 22 | |
| 23 | //************************************************************************** |
| 24 | // TYPE DEFINITIONS |
| 25 | //************************************************************************** |
| 26 | |
| 27 | // ======================> c64_geocable_device |
| 28 | |
| 29 | class c64_geocable_device : public device_t, |
| 30 | public device_c64_user_port_interface |
| 31 | { |
| 32 | public: |
| 33 | // construction/destruction |
| 34 | c64_geocable_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 35 | |
| 36 | // optional information overrides |
| 37 | virtual machine_config_constructor device_mconfig_additions() const; |
| 38 | |
| 39 | // not really public |
| 40 | DECLARE_WRITE_LINE_MEMBER( busy_w ); |
| 41 | |
| 42 | protected: |
| 43 | // device-level overrides |
| 44 | virtual void device_start(); |
| 45 | virtual void device_config_complete() { m_shortname = "c64_geocable"; } |
| 46 | |
| 47 | // device_c64_user_port_interface overrides |
| 48 | virtual void c64_pb_w(address_space &space, offs_t offset, UINT8 data); |
| 49 | virtual void c64_pa2_w(int level); |
| 50 | |
| 51 | private: |
| 52 | required_device<centronics_printer_device> m_centronics; |
| 53 | }; |
| 54 | |
| 55 | |
| 56 | // device type definition |
| 57 | extern const device_type C64_GEOCABLE; |
| 58 | |
| 59 | |
| 60 | #endif |
src/mess/machine/c1541.c
| r14779 | r14780 | |
| 348 | 348 | // via6522_interface via0_intf |
| 349 | 349 | //------------------------------------------------- |
| 350 | 350 | |
| 351 | void c1541_device::parallel_connect(c64_bn1541_device *device) |
| 352 | { |
| 353 | logerror("C64 parallel cable connected!\n"); |
| 354 | m_parallel_cable = device; |
| 355 | } |
| 356 | |
| 357 | |
| 358 | void c1541_device::parallel_data_w(UINT8 data) |
| 359 | { |
| 360 | logerror("C64 parallel data %02x\n", data); |
| 361 | m_parallel_data = data; |
| 362 | } |
| 363 | |
| 364 | |
| 365 | void c1541_device::parallel_strobe_w(int state) |
| 366 | { |
| 367 | logerror("C64 parallel strobe %u\n", state); |
| 368 | m_via0->write_cb1(state); |
| 369 | } |
| 370 | |
| 371 | |
| 351 | 372 | WRITE_LINE_MEMBER( c1541_device::via0_irq_w ) |
| 352 | 373 | { |
| 353 | 374 | m_via0_irq = state; |
| r14779 | r14780 | |
| 359 | 380 | READ8_MEMBER( c1541_device::via0_pa_r ) |
| 360 | 381 | { |
| 361 | 382 | // dummy read to acknowledge ATN IN interrupt |
| 362 | | return 0; |
| 383 | return m_parallel_data; |
| 363 | 384 | } |
| 364 | 385 | |
| 365 | 386 | |
| 387 | WRITE8_MEMBER( c1541_device::via0_pa_w ) |
| 388 | { |
| 389 | if (m_parallel_cable != NULL) |
| 390 | { |
| 391 | m_parallel_cable->parallel_data_w(data); |
| 392 | } |
| 393 | } |
| 394 | |
| 395 | |
| 366 | 396 | READ8_MEMBER( c1541_device::via0_pb_r ) |
| 367 | 397 | { |
| 368 | 398 | /* |
| r14779 | r14780 | |
| 432 | 462 | } |
| 433 | 463 | |
| 434 | 464 | |
| 465 | WRITE_LINE_MEMBER( c1541_device::via0_ca2_w ) |
| 466 | { |
| 467 | if (m_parallel_cable != NULL) |
| 468 | { |
| 469 | m_parallel_cable->parallel_strobe_w(state); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | |
| 435 | 474 | static const via6522_interface c1541_via0_intf = |
| 436 | 475 | { |
| 437 | 476 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c1541_device, via0_pa_r), |
| r14779 | r14780 | |
| 441 | 480 | DEVCB_NULL, |
| 442 | 481 | DEVCB_NULL, |
| 443 | 482 | |
| 444 | | DEVCB_NULL, |
| 483 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c1541_device, via0_pa_w), |
| 445 | 484 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c1541_device, via0_pb_w), |
| 446 | 485 | DEVCB_NULL, |
| 447 | 486 | DEVCB_NULL, |
| 487 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c1541_device, via0_ca2_w), |
| 448 | 488 | DEVCB_NULL, |
| 449 | | DEVCB_NULL, |
| 450 | 489 | |
| 451 | 490 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c1541_device, via0_irq_w) |
| 452 | 491 | }; |
| r14779 | r14780 | |
| 727 | 766 | m_via1(*this, M6522_1_TAG), |
| 728 | 767 | m_ga(*this, C64H156_TAG), |
| 729 | 768 | m_image(*this, FLOPPY_0), |
| 769 | m_parallel_cable(NULL), |
| 730 | 770 | m_data_out(1), |
| 731 | 771 | m_via0_irq(0), |
| 732 | 772 | m_via1_irq(0) |
| r14779 | r14780 | |
| 743 | 783 | m_via1(*this, M6522_1_TAG), |
| 744 | 784 | m_ga(*this, C64H156_TAG), |
| 745 | 785 | m_image(*this, FLOPPY_0), |
| 786 | m_parallel_cable(NULL), |
| 746 | 787 | m_data_out(1), |
| 747 | 788 | m_via0_irq(0), |
| 748 | 789 | m_via1_irq(0) |
src/mess/machine/c1541.h
| r14779 | r14780 | |
| 22 | 22 | #include "machine/64h156.h" |
| 23 | 23 | #include "machine/6522via.h" |
| 24 | 24 | #include "machine/cbmiec.h" |
| 25 | #include "machine/c64_bn1541.h" |
| 25 | 26 | |
| 26 | 27 | |
| 27 | 28 | |
| r14779 | r14780 | |
| 39 | 40 | |
| 40 | 41 | // ======================> c1541_device |
| 41 | 42 | |
| 43 | class c64_bn1541_device; |
| 44 | |
| 42 | 45 | class c1541_device : public device_t, |
| 43 | 46 | public device_cbm_iec_interface |
| 44 | 47 | { |
| r14779 | r14780 | |
| 57 | 60 | TYPE_OC118 |
| 58 | 61 | }; |
| 59 | 62 | |
| 63 | void parallel_connect(c64_bn1541_device *device); |
| 64 | void parallel_data_w(UINT8 data); |
| 65 | void parallel_strobe_w(int state); |
| 66 | |
| 60 | 67 | // not really public |
| 61 | 68 | static void on_disk_change(device_image_interface &image); |
| 62 | 69 | |
| r14779 | r14780 | |
| 65 | 72 | DECLARE_WRITE8_MEMBER( via0_pa_w ); |
| 66 | 73 | DECLARE_READ8_MEMBER( via0_pb_r ); |
| 67 | 74 | DECLARE_WRITE8_MEMBER( via0_pb_w ); |
| 75 | DECLARE_WRITE_LINE_MEMBER( via0_ca2_w ); |
| 68 | 76 | DECLARE_READ_LINE_MEMBER( atn_in_r ); |
| 69 | 77 | DECLARE_WRITE_LINE_MEMBER( via1_irq_w ); |
| 70 | 78 | DECLARE_READ8_MEMBER( via1_pb_r ); |
| r14779 | r14780 | |
| 93 | 101 | required_device<via6522_device> m_via1; |
| 94 | 102 | required_device<c64h156_device> m_ga; |
| 95 | 103 | required_device<device_t> m_image; |
| 104 | c64_bn1541_device *m_parallel_cable; |
| 96 | 105 | |
| 97 | 106 | // IEC bus |
| 98 | 107 | int m_data_out; // serial data out |
| 99 | 108 | |
| 109 | // parallel cable |
| 110 | UINT8 m_parallel_data; |
| 111 | |
| 100 | 112 | // interrupts |
| 101 | 113 | int m_via0_irq; // VIA #0 interrupt request |
| 102 | 114 | int m_via1_irq; // VIA #1 interrupt request |
src/mess/machine/c64user.h
| r14779 | r14780 | |
| 128 | 128 | virtual void c64_pb_w(address_space &space, offs_t offset, UINT8 data) { }; |
| 129 | 129 | |
| 130 | 130 | virtual int c64_pa2_r() { return 0; }; |
| 131 | | virtual void c64_pa2_w(int level) { }; |
| 132 | | virtual void c64_cnt1_w(int level) { }; |
| 133 | | virtual void c64_sp1_w(int level) { }; |
| 134 | | virtual void c64_pc2_w(int level) { }; |
| 135 | | virtual void c64_cnt2_w(int level) { }; |
| 136 | | virtual void c64_sp2_w(int level) { }; |
| 137 | | virtual void c64_atn_w(int level) { }; |
| 131 | virtual void c64_pa2_w(int state) { }; |
| 132 | virtual void c64_cnt1_w(int state) { }; |
| 133 | virtual void c64_sp1_w(int state) { }; |
| 134 | virtual void c64_pc2_w(int state) { }; |
| 135 | virtual void c64_cnt2_w(int state) { }; |
| 136 | virtual void c64_sp2_w(int state) { }; |
| 137 | virtual void c64_atn_w(int state) { }; |
| 138 | 138 | |
| 139 | 139 | // reset |
| 140 | | virtual void c64_reset_w(int level) { }; |
| 140 | virtual void c64_reset_w(int state) { }; |
| 141 | 141 | |
| 142 | 142 | protected: |
| 143 | 143 | c64_user_port_device *m_slot; |
src/mess/machine/c64_bn1541.c
| r0 | r14780 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | Burst Nibbler 1541 Parallel Cable emulation |
| 4 | |
| 5 | http://sta.c64.org/cbmparc2.html |
| 6 | |
| 7 | Copyright MESS Team. |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | |
| 10 | **********************************************************************/ |
| 11 | |
| 12 | #include "c64_bn1541.h" |
| 13 | |
| 14 | |
| 15 | |
| 16 | //************************************************************************** |
| 17 | // DEVICE DEFINITIONS |
| 18 | //************************************************************************** |
| 19 | |
| 20 | const device_type C64_BN1541 = &device_creator<c64_bn1541_device>; |
| 21 | |
| 22 | |
| 23 | |
| 24 | //************************************************************************** |
| 25 | // LIVE DEVICE |
| 26 | //************************************************************************** |
| 27 | |
| 28 | //------------------------------------------------- |
| 29 | // c64_bn1541_device - constructor |
| 30 | //------------------------------------------------- |
| 31 | |
| 32 | c64_bn1541_device::c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 33 | device_t(mconfig, C64_BN1541, "C64 Burst Nibbler 1541 Parallel Cable", tag, owner, clock), |
| 34 | device_c64_user_port_interface(mconfig, *this), |
| 35 | m_drive(NULL) |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | |
| 40 | //------------------------------------------------- |
| 41 | // device_start - device-specific startup |
| 42 | //------------------------------------------------- |
| 43 | |
| 44 | void c64_bn1541_device::device_start() |
| 45 | { |
| 46 | device_iterator iter(machine().root_device()); |
| 47 | |
| 48 | for (device_t *device = iter.first(); device != NULL; device = iter.next()) |
| 49 | { |
| 50 | if (device->subdevice(C1541_TAG) != NULL) |
| 51 | { |
| 52 | // grab the first 1541 and run to the hills |
| 53 | m_drive = device->subdevice<c1541_device>(C1541_TAG); |
| 54 | break; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | assert(m_drive); |
| 59 | } |
| 60 | |
| 61 | |
| 62 | //------------------------------------------------- |
| 63 | // device_reset - device-specific reset |
| 64 | //------------------------------------------------- |
| 65 | |
| 66 | void c64_bn1541_device::device_reset() |
| 67 | { |
| 68 | if (m_drive != NULL) |
| 69 | { |
| 70 | m_drive->parallel_connect(downcast<c64_bn1541_device *>(this)); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | |
| 75 | //------------------------------------------------- |
| 76 | // parallel_data_w - |
| 77 | //------------------------------------------------- |
| 78 | |
| 79 | void c64_bn1541_device::parallel_data_w(UINT8 data) |
| 80 | { |
| 81 | logerror("1541 parallel data %02x\n", data); |
| 82 | m_data = data; |
| 83 | } |
| 84 | |
| 85 | |
| 86 | //------------------------------------------------- |
| 87 | // parallel_strobe_w - |
| 88 | //------------------------------------------------- |
| 89 | |
| 90 | void c64_bn1541_device::parallel_strobe_w(int state) |
| 91 | { |
| 92 | logerror("1541 parallel strobe %u\n", state); |
| 93 | m_slot->flag2_w(state); |
| 94 | } |
| 95 | |
| 96 | |
| 97 | //------------------------------------------------- |
| 98 | // c64_pb_r - port B read |
| 99 | //------------------------------------------------- |
| 100 | |
| 101 | UINT8 c64_bn1541_device::c64_pb_r(address_space &space, offs_t offset) |
| 102 | { |
| 103 | return m_data; |
| 104 | } |
| 105 | |
| 106 | |
| 107 | //------------------------------------------------- |
| 108 | // c64_pb_w - port B write |
| 109 | //------------------------------------------------- |
| 110 | |
| 111 | void c64_bn1541_device::c64_pb_w(address_space &space, offs_t offset, UINT8 data) |
| 112 | { |
| 113 | if (m_drive != NULL) |
| 114 | { |
| 115 | m_drive->parallel_data_w(data); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | |
| 120 | //------------------------------------------------- |
| 121 | // c64_pc2_w - CIA2 PC write |
| 122 | //------------------------------------------------- |
| 123 | |
| 124 | void c64_bn1541_device::c64_pc2_w(int state) |
| 125 | { |
| 126 | if (m_drive != NULL) |
| 127 | { |
| 128 | m_drive->parallel_strobe_w(state); |
| 129 | } |
| 130 | } |
src/mess/machine/c64_bn1541.h
| r0 | r14780 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | geoCable Centronics Cable 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_BN1541__ |
| 13 | #define __C64_BN1541__ |
| 14 | |
| 15 | #define ADDRESS_MAP_MODERN |
| 16 | |
| 17 | #include "emu.h" |
| 18 | #include "machine/c64user.h" |
| 19 | #include "machine/c1541.h" |
| 20 | |
| 21 | |
| 22 | |
| 23 | //************************************************************************** |
| 24 | // TYPE DEFINITIONS |
| 25 | //************************************************************************** |
| 26 | |
| 27 | // ======================> c64_bn1541_device |
| 28 | |
| 29 | class c1541_device; |
| 30 | |
| 31 | class c64_bn1541_device : public device_t, |
| 32 | public device_c64_user_port_interface |
| 33 | { |
| 34 | public: |
| 35 | // construction/destruction |
| 36 | c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 37 | |
| 38 | void parallel_data_w(UINT8 data); |
| 39 | void parallel_strobe_w(int state); |
| 40 | |
| 41 | protected: |
| 42 | // device-level overrides |
| 43 | virtual void device_start(); |
| 44 | virtual void device_reset(); |
| 45 | virtual void device_config_complete() { m_shortname = "c64_bn1541"; } |
| 46 | |
| 47 | // device_c64_user_port_interface overrides |
| 48 | virtual UINT8 c64_pb_r(address_space &space, offs_t offset); |
| 49 | virtual void c64_pb_w(address_space &space, offs_t offset, UINT8 data); |
| 50 | virtual void c64_pc2_w(int level); |
| 51 | |
| 52 | private: |
| 53 | c1541_device *m_drive; |
| 54 | |
| 55 | UINT8 m_data; |
| 56 | }; |
| 57 | |
| 58 | |
| 59 | // device type definition |
| 60 | extern const device_type C64_BN1541; |
| 61 | |
| 62 | |
| 63 | #endif |
src/mess/mess.mak
| r14779 | r14780 | |
| 776 | 776 | $(MESS_MACHINE)/c64_4dxh.o \ |
| 777 | 777 | $(MESS_MACHINE)/c64_4ksa.o \ |
| 778 | 778 | $(MESS_MACHINE)/c64_4tba.o \ |
| 779 | $(MESS_MACHINE)/c64_bn1541.o \ |
| 779 | 780 | $(MESS_MACHINE)/c64_comal80.o \ |
| 780 | 781 | $(MESS_MACHINE)/c64_dela_ep256.o \ |
| 781 | 782 | $(MESS_MACHINE)/c64_dela_ep64.o \ |
| r14779 | r14780 | |
| 789 | 790 | $(MESS_MACHINE)/c64_final.o \ |
| 790 | 791 | $(MESS_MACHINE)/c64_final3.o \ |
| 791 | 792 | $(MESS_MACHINE)/c64_fun_play.o \ |
| 793 | $(MESS_MACHINE)/c64_geocable.o \ |
| 792 | 794 | $(MESS_MACHINE)/c64_georam.o \ |
| 793 | 795 | $(MESS_MACHINE)/c64_ieee488.o \ |
| 794 | 796 | $(MESS_MACHINE)/c64_kingsoft.o \ |