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

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

revision 4 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_pmagja.c,v 1.13 2005/02/11 09:53:48 debug Exp $   *  $Id: dev_pmagja.c,v 1.17 2005/11/13 00:14:09 debug Exp $
29   *     *  
30   *  TURBOchannel PMAG-JA graphics device.   *  TURBOchannel PMAG-JA graphics device.
31   *   *
# Line 75  int dev_pmagja_access(struct cpu *cpu, s Line 75  int dev_pmagja_access(struct cpu *cpu, s
75          struct pmagja_data *d = extra;          struct pmagja_data *d = extra;
76          int i, res = 1;          int i, res = 1;
77    
78          relative_addr += PMAGJA_FIRSTOFFSET;          if (writeflag == MEM_WRITE)
79                    idata = memory_readmax64(cpu, data, len);
80    
81          idata = memory_readmax64(cpu, data, len);          relative_addr += PMAGJA_FIRSTOFFSET;
82    
83  #ifdef JA_DEBUG  #ifdef JA_DEBUG
84  {  {
# Line 216  void dev_pmagja_init(struct machine *mac Line 217  void dev_pmagja_init(struct machine *mac
217    
218          d->irq_nr = irq_nr;          d->irq_nr = irq_nr;
219    
220          d->fb_mem = memory_new(XSIZE * YSIZE * 3);          d->fb_mem = memory_new(XSIZE * YSIZE * 3, machine->arch);
221          if (d->fb_mem == NULL) {          if (d->fb_mem == NULL) {
222                  fprintf(stderr, "dev_pmagja_init(): out of memory (1)\n");                  fprintf(stderr, "dev_pmagja_init(): out of memory (1)\n");
223                  exit(1);                  exit(1);
224          }          }
225          d->vfb_data = dev_fb_init(machine, d->fb_mem, 0, VFB_GENERIC,          d->vfb_data = dev_fb_init(machine, d->fb_mem, 0, VFB_GENERIC,
226              XSIZE, YSIZE, XSIZE, YSIZE, 24, "PMAG-JA", 1);              XSIZE, YSIZE, XSIZE, YSIZE, 24, "PMAG-JA");
227          if (d->vfb_data == NULL) {          if (d->vfb_data == NULL) {
228                  fprintf(stderr, "dev_pmagja_init(): out of memory (2)\n");                  fprintf(stderr, "dev_pmagja_init(): out of memory (2)\n");
229                  exit(2);                  exit(2);
# Line 235  void dev_pmagja_init(struct machine *mac Line 236  void dev_pmagja_init(struct machine *mac
236    
237          memory_device_register(mem, "pmagja", baseaddr + PMAGJA_FIRSTOFFSET,          memory_device_register(mem, "pmagja", baseaddr + PMAGJA_FIRSTOFFSET,
238              DEV_PMAGJA_LENGTH - PMAGJA_FIRSTOFFSET, dev_pmagja_access, d,              DEV_PMAGJA_LENGTH - PMAGJA_FIRSTOFFSET, dev_pmagja_access, d,
239              MEM_DEFAULT, NULL);              DM_DEFAULT, NULL);
240  }  }
241    

Legend:
Removed from v.4  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26