trunk/src/mame/drivers/pong.c
| r29369 | r29370 | |
| 58 | 58 | |
| 59 | 59 | #define HRES_MULT (1) |
| 60 | 60 | |
| 61 | | fixedfreq_interface fixedfreq_mode_pong = { |
| 61 | fixedfreq_interface fixedfreq_mode_pongd = { |
| 62 | 62 | MASTER_CLOCK, |
| 63 | | H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, |
| 63 | H_TOTAL-67,H_TOTAL-52,H_TOTAL-8,H_TOTAL, |
| 64 | 64 | V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, |
| 65 | 65 | 1, /* non-interlaced */ |
| 66 | 66 | 0.31 |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | fixedfreq_interface fixedfreq_mode_pong = { |
| 70 | MASTER_CLOCK, |
| 71 | H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL, |
| 72 | V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL, |
| 73 | 1, /* non-interlaced */ |
| 74 | 0.31 |
| 75 | }; |
| 76 | |
| 69 | 77 | fixedfreq_interface fixedfreq_mode_pongX2 = { |
| 70 | 78 | MASTER_CLOCK * 2, |
| 71 | 79 | (H_TOTAL-67) * 2, (H_TOTAL-40) * 2, (H_TOTAL-8) * 2, (H_TOTAL) * 2, |
| r29369 | r29370 | |
| 105 | 113 | #if 1 |
| 106 | 114 | #if 0 |
| 107 | 115 | /* this is the clock circuit in schematics. */ |
| 108 | | MAINCLOCK(xclk) |
| 109 | | //CLOCK(clk) |
| 110 | | PARAM(xclk.FREQ, 7159000.0*2) |
| 116 | MAINCLOCK(xclk, 7159000.0*2) |
| 111 | 117 | TTL_74107(ic_f6a, xclk, high, high, high) |
| 112 | 118 | ALIAS(clk, ic_f6a.Q) |
| 113 | 119 | #else |
| 114 | | /* abstracting this, performance increases by 40% |
| 120 | /* abstracting this, performance increases by 60% |
| 115 | 121 | * No surprise, the clock is extremely expensive */ |
| 116 | 122 | MAINCLOCK(clk, 7159000.0) |
| 117 | | //CLOCK(clk, 7159000.0) |
| 118 | 123 | #endif |
| 119 | 124 | #else |
| 120 | 125 | // benchmarking ... |
| r29369 | r29370 | |
| 728 | 733 | |
| 729 | 734 | static NETLIST_START(pongd) |
| 730 | 735 | |
| 731 | | NETLIST_INCLUDE(pongdoubles) |
| 736 | INCLUDE(pongdoubles) |
| 732 | 737 | |
| 733 | 738 | //NETDEV_ANALOG_CALLBACK(sound_cb, AUDIO, pong_state, sound_cb, "") |
| 734 | 739 | //NETDEV_ANALOG_CALLBACK(video_cb, videomix, fixedfreq_device, update_vid, "fixfreq") |
| r29369 | r29370 | |
| 946 | 951 | |
| 947 | 952 | //MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_ntsc720) |
| 948 | 953 | //MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pongX2) |
| 949 | | MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pong) |
| 954 | MCFG_FIXFREQ_ADD("fixfreq", "screen", fixedfreq_mode_pongd) |
| 950 | 955 | |
| 951 | 956 | /* sound hardware */ |
| 952 | 957 | MCFG_SPEAKER_STANDARD_MONO("mono") |
trunk/src/emu/netlist/nl_lists.h
| r29369 | r29370 | |
| 130 | 130 | ATTR_HOT inline const _ListClass *last() const { return &m_list[m_count -1]; } |
| 131 | 131 | ATTR_HOT inline int count() const { return m_count; } |
| 132 | 132 | ATTR_HOT inline bool empty() const { return (m_count == 0); } |
| 133 | | ATTR_HOT inline void reset() { m_count = 0; } |
| 133 | ATTR_HOT inline void clear() { m_count = 0; } |
| 134 | 134 | ATTR_HOT inline int capacity() const { return m_num_elements; } |
| 135 | 135 | |
| 136 | | ATTR_COLD void reset_and_free() |
| 136 | ATTR_COLD void clear_and_free() |
| 137 | 137 | { |
| 138 | 138 | for (_ListClass *i = m_list; i < m_list + m_count; i++) |
| 139 | 139 | { |
| 140 | 140 | delete *i; |
| 141 | 141 | } |
| 142 | | reset(); |
| 142 | clear(); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | ATTR_HOT inline _ListClass& operator[](const int & index) { return m_list[index]; } |
trunk/src/emu/netlist/nl_base.c
| r29369 | r29370 | |
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | | m_nets.reset(); |
| 151 | m_nets.clear(); |
| 152 | 152 | |
| 153 | 153 | tagmap_free_entries<tagmap_devices_t>(m_devices); |
| 154 | 154 | |
| r29369 | r29370 | |
| 200 | 200 | return NULL; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | ATTR_COLD void netlist_base_t::rebuild_lists() |
| 204 | { |
| 205 | for (int i = 0; i < m_nets.count(); i++) |
| 206 | m_nets[i]->rebuild_list(); |
| 207 | } |
| 208 | |
| 209 | |
| 203 | 210 | ATTR_COLD void netlist_base_t::reset() |
| 204 | 211 | { |
| 205 | 212 | m_time = netlist_time::zero; |
| r29369 | r29370 | |
| 537 | 544 | } |
| 538 | 545 | } |
| 539 | 546 | |
| 547 | ATTR_COLD void netlist_net_t::rebuild_list() |
| 548 | { |
| 549 | /* rebuild m_list */ |
| 540 | 550 | |
| 551 | m_list.clear(); |
| 552 | for (int i=0; i < m_registered.count(); i++) |
| 553 | if (m_registered[i]->state() != netlist_input_t::STATE_INP_PASSIVE) |
| 554 | m_list.add(*m_registered[i]); |
| 555 | } |
| 556 | |
| 541 | 557 | ATTR_COLD void netlist_net_t::reset() |
| 542 | 558 | { |
| 543 | 559 | m_last_Analog = 0.0; |
| r29369 | r29370 | |
| 550 | 566 | m_active = 0; |
| 551 | 567 | m_in_queue = 2; |
| 552 | 568 | |
| 569 | /* rebuild m_list */ |
| 570 | |
| 571 | m_list.clear(); |
| 572 | for (int i=0; i < m_registered.count(); i++) |
| 573 | m_list.add(*m_registered[i]); |
| 574 | |
| 553 | 575 | for (netlist_core_terminal_t *t = m_list.first(); t != NULL; t = m_list.next(t)) |
| 554 | 576 | { |
| 555 | 577 | t->do_reset(); |
trunk/src/emu/netlist/nl_dice_compat.h
| r29369 | r29370 | |
| 13 | 13 | * -------------------------------------------------------------------- */ |
| 14 | 14 | |
| 15 | 15 | //#define CHIP(_n, _t) netlist.register_dev(NET_NEW(_t ## _dip), _n); |
| 16 | | #define CHIP(_n, _t) netlist.register_dev( new nld_ ## _t ## _dip(), _n); |
| 16 | #define CHIP(_n, _t) setup.register_dev( new nld_ ## _t ## _dip(), _n); |
| 17 | 17 | |
| 18 | 18 | #define CONNECTION( a... ) CONNECTIONX( a ) |
| 19 | | #define CONNECTIONX(_a, _b, _c, _d) netlist.register_link(_a "." # _b, _c "." # _d); |
| 20 | | #define NET_CSTR(_a, _b) netlist.register_link( _a, _b); |
| 19 | #define CONNECTIONX(_a, _b, _c, _d) setup.register_link(_a "." # _b, _c "." # _d); |
| 20 | #define NET_CSTR(_a, _b) setup.register_link( _a, _b); |
| 21 | 21 | |
| 22 | 22 | #define CIRCUIT_LAYOUT(x) NETLIST_START(x) |
| 23 | 23 | #define CIRCUIT_LAYOUT_END NETLIST_END() |
trunk/src/emu/netlist/nl_base.h
| r29369 | r29370 | |
| 625 | 625 | |
| 626 | 626 | ATTR_HOT void solve(); |
| 627 | 627 | |
| 628 | netlist_list_t<netlist_core_terminal_t *> m_registered; // save post-start m_list ... |
| 628 | 629 | plinked_list<netlist_core_terminal_t> m_list; |
| 629 | 630 | |
| 631 | ATTR_COLD void rebuild_list(); /* rebuild m_list after a load */ |
| 632 | |
| 630 | 633 | protected: //FIXME: needed by current solver code |
| 631 | 634 | |
| 632 | 635 | UINT16 m_num_cons; |
| r29369 | r29370 | |
| 1029 | 1032 | ATTR_HOT void process_queue(const netlist_time delta); |
| 1030 | 1033 | ATTR_HOT inline void abort_current_queue_slice() { m_stop = netlist_time::zero; } |
| 1031 | 1034 | |
| 1035 | ATTR_COLD void rebuild_lists(); /* must be called after post_load ! */ |
| 1036 | |
| 1032 | 1037 | ATTR_COLD void set_setup(netlist_setup_t *asetup) { m_setup = asetup; } |
| 1033 | 1038 | ATTR_COLD netlist_setup_t &setup() { return *m_setup; } |
| 1034 | 1039 | |