head 1.6; access; symbols pkgsrc-2013Q2:1.6.0.2 pkgsrc-2013Q2-base:1.6 pkgsrc-2013Q1:1.5.0.48 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.46 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.44 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.42 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.40 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.5.0.38 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q3:1.5.0.36 pkgsrc-2011Q3-base:1.5 pkgsrc-2011Q2:1.5.0.34 pkgsrc-2011Q2-base:1.5 pkgsrc-2011Q1:1.5.0.32 pkgsrc-2011Q1-base:1.5 pkgsrc-2010Q4:1.5.0.30 pkgsrc-2010Q4-base:1.5 pkgsrc-2010Q3:1.5.0.28 pkgsrc-2010Q3-base:1.5 pkgsrc-2010Q2:1.5.0.26 pkgsrc-2010Q2-base:1.5 pkgsrc-2010Q1:1.5.0.24 pkgsrc-2010Q1-base:1.5 pkgsrc-2009Q4:1.5.0.22 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.20 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.5.0.18 pkgsrc-2009Q2-base:1.5 pkgsrc-2009Q1:1.5.0.16 pkgsrc-2009Q1-base:1.5 pkgsrc-2008Q4:1.5.0.14 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.12 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.10 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.8 pkgsrc-2008Q2-base:1.5 cwrapper:1.5.0.6 pkgsrc-2008Q1:1.5.0.4 pkgsrc-2008Q1-base:1.5 pkgsrc-2007Q4:1.5.0.2 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.4.0.12 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.10 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.8 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.6 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.4 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.2 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.3.0.16 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.14 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.12 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.10 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.8 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.6 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.4 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.2 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.1.0.12 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2-base:1.1 buildlink2:1.1.0.2; locks; strict; comment @# @; 1.6 date 2013.06.11.12.58.42; author ryoon; state dead; branches; next 1.5; commitid wlm501tyiUUKhcTw; 1.5 date 2007.10.14.08.14.11; author rillig; state Exp; branches; next 1.4; 1.4 date 2006.06.04.06.14.11; author dogcow; state dead; branches; next 1.3; 1.3 date 2004.05.02.20.08.14; author bouyer; state Exp; branches; next 1.2; 1.2 date 2004.04.26.21.50.25; author bouyer; state dead; branches; next 1.1; 1.1 date 2002.05.08.11.32.49; author wiz; state Exp; branches 1.1.2.1; next ; 1.1.2.1 date 2002.05.08.11.32.49; author jlam; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2002.06.23.18.45.34; author jlam; state Exp; branches; next ; desc @@ 1.6 log @Update to 0.26.1 Changelog: * Bugfixes * Support new chips. @ text @$NetBSD: patch-ae,v 1.5 2007/10/14 08:14:11 rillig Exp $ --- src/p12x.h.orig 2005-09-26 05:51:23.000000000 +0200 +++ src/p12x.h 2007-10-14 10:05:47.000000000 +0200 @@@@ -108,7 +108,7 @@@@ class P12CE518 : public P12C508 virtual PROCESSOR_TYPE isa(void){return _P12CE518_;}; virtual void tris_instruction(unsigned int tris_register); - virtual void P12CE518::set_eeprom(I2C_EE *e); + virtual void set_eeprom(I2C_EE *e); P12CE518(void); static Processor *construct(void); @ 1.5 log @Fixed g++4 build problems (lots of extra qualifications). @ text @d1 1 a1 1 $NetBSD$ @ 1.4 log @Update gpsim to 0.21.11. Changes from 0.21.2: o now uses gtk2 and gtk2+extra o a truly gigantic number of bug fixes o includes pdf/ps documentation @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.3 2004/05/02 20:08:14 bouyer Exp $ d3 8 a10 24 --- src/uart.cc.orig 2004-01-31 03:58:04.000000000 +0100 +++ src/uart.cc 2004-04-30 18:56:31.000000000 +0200 @@@@ -139,11 +139,16 @@@@ cout << "TXSTA - enabling transmitter\n"; if(txreg) { cout << " TXSTA - does have a txreg\n"; - if(txreg->is_empty()) txreg->empty(); - else +#if 0 + if(txreg->is_empty()) { + txreg->empty(); + } else { + cout << "start_transmitting1" << endl; start_transmitting(); } +#endif + } } else stop_transmitting(); } @@@@ -431,47 +436,53 @@@@ void _RCSTA::receive_a_bit(unsigned int bit) { d12 2 a13 160 - if(bit_count) - { + // If we're waiting for the start bit and this isn't it then + // we don't need to look any further + // cout << "receive_a_bit state " << state << "bit " << bit << endl; + if( state == RCSTA_MAYBE_START) { + if (bit) + state = RCSTA_WAITING_FOR_START; + else + state = RCSTA_RECEIVING; + return; + } + if (bit_count == 0) { + // we should now have the stop bit + if (bit) { + // got the stop bit + // If the rxreg has data from a previous reception then + // we have a receiver overrun error. + // cout << "rcsta.rsr is full\n"; + + if((value & RX9) == 0) + rsr >>= 1; + + // copy the rsr to the fifo + if(rcreg) + rcreg->push( rsr & 0xff); + //cout << "_RCSTA::receive_a_bit received 0x" << (rsr & 0xff) << endl; + + } else { + //not stop bit; discard the data and go back receiving + } + // If we're continuously receiving, then set up for the next byte. + // FIXME -- may want to set a half bit delay before re-starting... + if(value & CREN) + start_receiving(); + else + state = RCSTA_DISABLED; + return; + } - // If we're waiting for the start bit and this isn't it then - // we don't need to look any further - if( (state == RCSTA_WAITING_FOR_START) && bit) - return; - - // Copy the bit into the Receive Shift Register - if(bit) - rsr |= 1<<9; - - //cout << "Receive bit #" << bit_count << ": " << (rsr&(1<<9)) << '\n'; - - rsr >>= 1; - - if(--bit_count == 0) - { - // rsr is full. - - // If the rxreg has data from a previous reception then - // we have a receiver overrun error. - //cout << "rcsta.rsr is full\n"; - - if((value & RX9) == 0) - rsr >>= 1; - - // copy the rsr to the fifo - if(rcreg) - rcreg->push( rsr & 0xff); - - // If we're continuously receiving, then set up for the next byte. - // FIXME -- may want to set a half bit delay before re-starting... - if(value & CREN) - start_receiving(); - else - state = RCSTA_DISABLED; - } + // Copy the bit into the Receive Shift Register + if(bit) + rsr |= 1<<9; - } + //cout << "Receive bit #" << bit_count << ": " << (rsr&(1<<9)) << '\n'; + + rsr >>= 1; + bit_count--; } @@@@ -494,11 +505,11 @@@@ // Is this a 9-bit data reception? if(value & RX9) { - bit_count = 10; + bit_count = 9; } else { - bit_count = 9; + bit_count = 8; } state = RCSTA_WAITING_FOR_START; @@@@ -526,11 +537,11 @@@@ if(txsta && (txsta->value & _TXSTA::BRGH)) set_callback_break(BRGH_FIRST_MID_SAMPLE); else - set_callback_break(BRGH_FIRST_MID_SAMPLE); + set_callback_break(BRGL_FIRST_MID_SAMPLE); sample = 0; - state = RCSTA_WAITING_MID1; - + sample_state = RCSTA_WAITING_MID1; + state = RCSTA_MAYBE_START; } void _RCSTA::callback(void) @@@@ -538,7 +549,7 @@@@ //cout << "RCSTA callback " << (cycles.value) << '\n'; - switch(state) { + switch(sample_state) { case RCSTA_WAITING_MID1: if(uart_port->get_bit(rx_bit)) sample++; @@@@ -548,7 +559,7 @@@@ else set_callback_break(BRGL_SECOND_MID_SAMPLE - BRGL_FIRST_MID_SAMPLE); - state = RCSTA_WAITING_MID2; + sample_state = RCSTA_WAITING_MID2; break; @@@@ -561,7 +572,7 @@@@ else set_callback_break(BRGL_THIRD_MID_SAMPLE - BRGL_SECOND_MID_SAMPLE); - state = RCSTA_WAITING_MID3; + sample_state = RCSTA_WAITING_MID3; break; @@@@ -573,13 +584,13 @@@@ sample = 0; // If this wasn't the last bit then go ahead and set a break for the next bit. - if(state==RCSTA_WAITING_MID3) { + if(state==RCSTA_RECEIVING) { if(txsta && (txsta->value & _TXSTA::BRGH)) set_callback_break(TOTAL_BRGH_STATES -(BRGH_THIRD_MID_SAMPLE - BRGH_FIRST_MID_SAMPLE)); else set_callback_break(TOTAL_BRGL_STATES -(BRGL_THIRD_MID_SAMPLE - BRGL_FIRST_MID_SAMPLE)); - state = RCSTA_WAITING_MID1; + sample_state = RCSTA_WAITING_MID1; } break; @ 1.3 log @Bug fixes and cleanups for the uart emulator. Submitted on sourceforge as bug id 944916 and 946541. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.3 2004/04/26 22:34:17 snj Exp $ @ 1.2 log @Update to 0.21.2. Main change since 0.20.7: o Updated to support GTK+ 2.x o Added the stopwatch command. o added support for more processors o EEPROM added to 18F devices by Mike Durian o Added breakpoint capability on nodes o Added spi Module o Added attributes to external usart module o log command has been added (Command Line) o Profiling has been added (gui) o Trace viewer has been added o Added parport - parallel port loadable module o Source level debugging of C files o Added module attibutes (attribute.cc) o Enhanced module interface - now LCD module works with gpsim o Beautified the Single Step and Trace dump outputs o Added break on stack overflow and underflow o Added break mask to wv/rv type break points. Now you can specify which bits are significant. o Added "--cli" command line option. Invokes gpsim in command line mode even if it has been configured to use the gui. o Program viewer can now display ASCII encode text in "dt" tables o Added pullup/pulldown resistors to the gpsim modules o added "frequency" command o Added time field to the gui status bar. @ text @d1 1 a1 1 $NetBSD: patch-ae,v 1.1 2002/05/08 11:32:49 wiz Exp $ d3 24 a26 4 --- gpsim/main.cc.orig Mon Nov 20 07:20:43 2000 +++ gpsim/main.cc @@@@ -147,7 +147,7 @@@@ poptContext optCon; /* context for parsing command-line options */ d28 39 d68 34 a101 3 - optCon = poptGetContext(NULL, argc, argv, optionsTable, 0); + optCon = poptGetContext(NULL, argc, (const char **)argv, optionsTable, 0); poptSetOtherOptionHelp(optCon, "[-h] [-p []] [-c ]"); d103 4 d108 80 @ 1.1 log @Fix compilation on -current. Patch by Jan Schaumann in pkg/16636. @ text @d1 1 a1 1 $NetBSD$ @ 1.1.2.1 log @file patch-ae was added on branch buildlink2 on 2002-06-23 18:45:34 +0000 @ text @d1 13 @ 1.1.2.2 log @Merge from pkgsrc-current to buildlink2 branch. @ text @a0 13 $NetBSD: patch-ae,v 1.1.2.1 2002/06/23 18:45:34 jlam Exp $ --- gpsim/main.cc.orig Mon Nov 20 07:20:43 2000 +++ gpsim/main.cc @@@@ -147,7 +147,7 @@@@ poptContext optCon; /* context for parsing command-line options */ - optCon = poptGetContext(NULL, argc, argv, optionsTable, 0); + optCon = poptGetContext(NULL, argc, (const char **)argv, optionsTable, 0); poptSetOtherOptionHelp(optCon, "[-h] [-p []] [-c ]"); @