/[gxemul]/trunk/src/devices/dev_openpic.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_openpic.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 34 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 44 by dpavlin, Mon Oct 8 16:22:56 2007 UTC
# Line 24  Line 24 
24   *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF   *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *  $Id: dev_gc.c,v 1.12 2007/02/16 17:17:51 debug Exp $   *  $Id: dev_gc.c,v 1.14 2007/09/11 21:42:52 debug Exp $
28   *     *  
29   *  Grand Central Interrupt controller (used by MacPPC).   *  COMMENT: Grand Central Interrupt controller (used by MacPPC)
30   */   */
31    
32  #include <stdio.h>  #include <stdio.h>
# Line 185  DEVICE_ACCESS(gc) Line 185  DEVICE_ACCESS(gc)
185                  }                  }
186                  break;                  break;
187    
188            case 0x1c:
189          case 0x2c:          case 0x2c:
190                  /*  Avoid a debug message.  */                  /*  Avoid a debug message.  */
191                  break;                  break;
# Line 211  DEVINIT(gc) Line 212  DEVINIT(gc)
212          struct gc_data *d;          struct gc_data *d;
213          int i;          int i;
214    
215          d = malloc(sizeof(struct gc_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct gc_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
216          memset(d, 0, sizeof(struct gc_data));          memset(d, 0, sizeof(struct gc_data));
217    
218          /*  Connect to the CPU:  */          /*  Connect to the CPU interrupt pin:  */
219          INTERRUPT_CONNECT(devinit->interrupt_path, d->cpu_irq);          INTERRUPT_CONNECT(devinit->interrupt_path, d->cpu_irq);
220    
221          /*          /*

Legend:
Removed from v.34  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26