/[gxemul]/trunk/src/devices/dev_px.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_px.c

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

revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 34 by dpavlin, Mon Oct 8 16:21:17 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2004-2006  Anders Gavare.  All rights reserved.   *  Copyright (C) 2004-2007  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_px.c,v 1.34 2006/03/04 12:38:48 debug Exp $   *  $Id: dev_px.c,v 1.36 2006/12/30 13:30:59 debug Exp $
29   *     *  
30   *  TURBOchannel Pixelstamp graphics device.   *  TURBOchannel Pixelstamp graphics device.
31   *   *
# Line 107  void dev_px_tick(struct cpu *cpu, void * Line 107  void dev_px_tick(struct cpu *cpu, void *
107          struct px_data *d = extra;          struct px_data *d = extra;
108    
109          if (d->intr & STIC_INT_P_EN)            /*  or _WE ?  */          if (d->intr & STIC_INT_P_EN)            /*  or _WE ?  */
110                  cpu_interrupt(cpu, d->irq_nr);                  INTERRUPT_ASSERT(d->irq);
111  #endif  #endif
112  }  }
113    
# Line 751  odata = random(); Line 751  odata = random();
751   *  dev_px_init():   *  dev_px_init():
752   */   */
753  void dev_px_init(struct machine *machine, struct memory *mem,  void dev_px_init(struct machine *machine, struct memory *mem,
754          uint64_t baseaddr, int px_type, int irq_nr)          uint64_t baseaddr, int px_type, char *irq_path)
755  {  {
756          struct px_data *d;          struct px_data *d;
757    
# Line 763  void dev_px_init(struct machine *machine Line 763  void dev_px_init(struct machine *machine
763          memset(d, 0, sizeof(struct px_data));          memset(d, 0, sizeof(struct px_data));
764    
765          d->type = px_type;          d->type = px_type;
766          d->irq_nr = irq_nr;  
767            INTERRUPT_CONNECT(irq_path, d->irq);
768    
769          d->xconfig = d->yconfig = 0;    /*  4x1  */          d->xconfig = d->yconfig = 0;    /*  4x1  */
770    
# Line 807  void dev_px_init(struct machine *machine Line 808  void dev_px_init(struct machine *machine
808          switch (d->type) {          switch (d->type) {
809          case DEV_PX_TYPE_PX:          case DEV_PX_TYPE_PX:
810                  dev_bt459_init(machine, mem, baseaddr + 0x200000, 0,                  dev_bt459_init(machine, mem, baseaddr + 0x200000, 0,
811                      d->vfb_data, 8, irq_nr, BT459_PX);                      d->vfb_data, 8, irq_path, BT459_PX);
812                  break;                  break;
813          case DEV_PX_TYPE_PXG:          case DEV_PX_TYPE_PXG:
814          case DEV_PX_TYPE_PXGPLUS:          case DEV_PX_TYPE_PXGPLUS:
815          case DEV_PX_TYPE_PXGPLUSTURBO:          case DEV_PX_TYPE_PXGPLUSTURBO:
816                  dev_bt459_init(machine, mem, baseaddr + 0x300000, 0,                  dev_bt459_init(machine, mem, baseaddr + 0x300000, 0,
817                      d->vfb_data, d->bitdepth, irq_nr, BT459_PX);                      d->vfb_data, d->bitdepth, irq_path, BT459_PX);
818                  break;                  break;
819          default:          default:
820                  fatal("dev_px_init(): unimplemented px_type\n");                  fatal("dev_px_init(): unimplemented px_type\n");

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

  ViewVC Help
Powered by ViewVC 1.1.26