This list is closed, nobody may subscribe to it.
2004 |
Jan
(53) |
Feb
(78) |
Mar
(34) |
Apr
(26) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(16) |
Sep
(2) |
Oct
(58) |
Nov
(13) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(62) |
Feb
(4) |
Mar
(40) |
Apr
(9) |
May
(13) |
Jun
(26) |
Jul
(32) |
Aug
(24) |
Sep
(18) |
Oct
(18) |
Nov
(14) |
Dec
|
2006 |
Jan
(15) |
Feb
(2) |
Mar
(23) |
Apr
(2) |
May
(2) |
Jun
(13) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
(1) |
Feb
(45) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(31) |
Dec
(5) |
2008 |
Jan
(6) |
Feb
(34) |
Mar
(113) |
Apr
(40) |
May
(19) |
Jun
(5) |
Jul
(41) |
Aug
(13) |
Sep
(53) |
Oct
(4) |
Nov
(53) |
Dec
|
2009 |
Jan
(1) |
Feb
(29) |
Mar
(66) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(163) |
Nov
|
Dec
(91) |
From: <ham...@us...> - 2004-02-07 23:01:51
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29185/linux/drivers/net Modified Files: gc-net.c Log Message: mamybe it works now Index: gc-net.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/gc-net.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gc-net.c 7 Feb 2004 00:24:29 -0000 1.11 +++ gc-net.c 7 Feb 2004 22:58:52 -0000 1.12 @@ -39,6 +39,10 @@ #include "exi.h" +#define BBA_DBG(format, arg...); { } +//#define BBA_DBG(format, arg...) printk(f,## arg) + + #define BBA_IRQ 4 #define IRQ_EXI 4 //#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ @@ -166,7 +170,7 @@ return 1; } else { - printk("UNHANDLED EXI\n"); + BBA_DBG("UNHANDLED EXI\n"); return 0; } } @@ -190,7 +194,7 @@ void exi_init() { - printk("EXI: init interrupts\n"); + BBA_DBG("EXI: init interrupts\n"); //request_irq(IRQ_EXI, exi_interrupt_handler, 0); //request_debug_irq(IRQ_EXI, exi_interrupt_debug_handler, 0); @@ -201,7 +205,7 @@ { if (exi_handler[channel * 3 + event]) { - //printk("EXI: irq %d:%d already used!\n", channel, event); + BBA_DBG("EXI: irq %d:%d already used!\n", channel, event); return -1; } exi_handler[channel * 3 + event] = handler; @@ -421,11 +425,11 @@ static int gc_bba_open(struct net_device *dev) { struct gc_private *priv = (struct gc_private *)dev->priv; - //printk("gc_bba_open\n"); + BBA_DBG("gc_bba_open\n"); int ret = request_irq(dev->irq, gc_bba_interrupt, 0, dev->name, dev); if (ret) { - printk(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq); + BBA_DBG(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq); return ret; } @@ -443,7 +447,7 @@ static int gc_bba_close(struct net_device *dev) { - printk("gc_bba_close\n"); + BBA_DBG("gc_bba_close\n"); // //select_nic(); rx_page = 0; @@ -490,7 +494,7 @@ return 1; } /* else */ - printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); + BBA_DBG(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); /* Restart the adapter. */ spin_lock_irqsave(&priv->lock, priv->lockflags); if (adapter_init(dev)) { @@ -504,7 +508,7 @@ netif_stop_queue(dev); /* Start real output */ -// printk("gc_bba_start_xmit:len=%d, page %d/%d\n", skb->len, tx_fifo_in, free_tx_pages); + BBA_DBG("gc_bba_start_xmit:len=%d, page %d/%d\n", skb->len, tx_fifo_in, free_tx_pages); spin_lock_irqsave(&priv->lock, priv->lockflags); @@ -535,7 +539,7 @@ val = eth_inb(0); if (val & 4) { - printk("err USE!\n"); + BBA_DBG("err USE!\n"); netif_start_queue(dev); /* allow more packets into adapter */ spin_unlock_irqrestore(&priv->lock, priv->lockflags); dev_kfree_skb(skb); @@ -544,13 +548,13 @@ val|=4; eth_outb(0, val); -// printk("DEBUG: waiting for tx done!\n"); + BBA_DBG("DEBUG: waiting for tx done!\n"); while (!(eth_inb(9)&0x14)); if (eth_inb(9) & 0x10) { - printk("TRANSMIT ERROR!\n"); + BBA_DBG("TRANSMIT ERROR!\n"); priv->stats.tx_errors++; // eth_outb(9, 0x10); } @@ -562,7 +566,8 @@ // int s = eth_inb(4); // if (s) -// printk("tx error %02x\n", s); + + BBA_DBG("tx error %02x\n", s); netif_start_queue(dev); /* allow more packets into adapter */ @@ -578,25 +583,45 @@ static char *gc_input(struct net_device *dev) { -// struct gcif *gcif=(struct gcif*)netif->state; + struct gc_private *priv = (struct gc_private *)dev->priv; struct sk_buff *skb; char *p, *q; - unsigned char *buffer; + unsigned short size, p_read, p_write; + unsigned short next_receive_frame; + int i; int ptr; - p_write = eth_inb(0x16); - p_write |= eth_inb(0x17) << 8; + /* + Input Flow concept: Take a look to Hardware spec page 35 + */ + + /* + Receive Buffer Write Page Pointer: Current receive write page pointer. The MSB + is the Reg17h.3 bit. The LSB is the Reg16h.0 bit. This register is controlled by + GMAC only. An internal Byte Counter (RWPBC) is associated with this page + register. + */ + p_write = eth_inb(0x16); + p_write |= (eth_inb(0x17)&0x0f) << 8; + /* + Receive buffer Read Page Pointer: Current receive read page pointer. RRP[11:0] + is mapped to MA[19:8]. The MSB is the Reg19h.3 bit. The LSB is the Reg18h.0 + bit. This register is normally controlled by the device driver. An internal Byte + Counter (RRPBC) is associated with this page register. + */ + p_read = eth_inb(0x18); - p_read |= eth_inb(0x19) << 8; -// printk("w %x r %x\n", p_write, p_read); + p_read |= (eth_inb(0x19)&0x0f) << 8; + + BBA_DBG("Receive Buffer Page Pointer: %x\n", p_read); if (p_read == p_write) { - printk("nothing left.\n"); + BBA_DBG("nothing left.\n"); priv->stats.rx_missed_errors++; return 0; } @@ -605,7 +630,7 @@ eth_outb(0x3a, 2); if (eth_inb(0x3a) & 2) { - printk("NO DATA AVAILABLE!\n"); + BBA_DBG("NO DATA AVAILABLE!\n"); priv->stats.rx_missed_errors++; return 0; } @@ -613,17 +638,21 @@ size=0; eth_ins(p_read << 8, descr, 4); -//?????????????????????????????????? - size = (descr[1] >> 4) | (descr[2]<<4); -// size = descr[1]; /* low byte */ -// size += (descr[2] << 8); /* high byte */ - + /* + Size Looks Crazy, but ok, the Packet Lenght is indeed 3 nibbles = 12 bits + and shifed with 4 bit to the top. + */ + + size = (descr[1] & 0xf0); /* low byte */ + size |= (descr[2] << 8); /* high byte */ + size = size >>4; size -= 4; /* Ignore trailing 4 CRC-bytes */ + // Max of 6*256 (pages * pageSize) can happen - if ((size < 32) || (size > 1535)) { - printk(KERN_WARNING "%s: Bogus packet size %d.\n", dev->name, size); + if ((size < 32) || (size > 1536)) { + BBA_DBG(KERN_WARNING "%s: Bogus packet size %d.\n", dev->name, size); if (size > 10000) { adapter_init(dev); priv->stats.rx_length_errors++; @@ -631,43 +660,32 @@ return; } - // HOTFIX (for to be sure:) - #if 1 - if (size<2002) skb = dev_alloc_skb(2002); // enough for Standart MTU of 1500 - #else + // We allocate Space for the Kernel IP System now skb = dev_alloc_skb(size+2); - #endif - - if (skb == NULL) { - printk("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, size); + if (!skb) { + BBA_DBG("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, size); priv->stats.rx_errors++; return; } - /* else */ - + skb->dev = dev; skb_reserve(skb,2); /* Align */ /* 'skb->data' points to the start of sk_buff data area. */ - buffer = skb_put(skb,size); - -// printk("There are %u bytes data\n", size); - + skb_put(skb,size); + + // We calculate the DMA position ptr = (p_read << 8) + 4; + // We read the Network buffer into the skb->data + eth_ins(ptr, skb->data, size); + skb->protocol=eth_type_trans(skb,dev); - if (ptr + size > 0x1000) - { - int len1 = 0x1000 - ptr - size; - eth_ins(ptr, buffer, len1); - eth_ins(ptr, buffer + len1, size - len1); - } else - eth_ins(ptr, buffer, size); - + /* + We update the Read Page Pointer with the next pointer, which was given to us + */ eth_outb(0x18, descr[0] & 0xFF); - eth_outb(0x19, descr[1] & 0xFF); - - skb->protocol=eth_type_trans(skb,dev); + eth_outb(0x19, descr[1] & 0x0F); netif_rx(skb); @@ -677,6 +695,16 @@ priv->stats.rx_packets ++; /* count all receives */ priv->stats.rx_bytes ++; /* count all received bytes */ + next_receive_frame = descr[0]; + next_receive_frame |= (descr[1]0x0f) << 8; + + /* + do we have additional packages ? + Hopefully, i understood the documentation correct. + We call Recurse the compleate gc_input() again, and do as long + */ + if (next_receive_frame != p_write) gc_input(dev); + return p; } @@ -694,11 +722,11 @@ int status = inb9 & inb8; -// printk("gcif_service: %08x %08x status %08x\n", inb8, inb9, status); + BBA_DBG("gcif_service: %08x %08x status %08x\n", inb8, inb9, status); if (!status) { eth_outb(9, 0xff); - //printk("?? GC irq but no irq ??\n"); + BBA_DBG("?? GC irq but no irq ??\n"); } if (status & 4) @@ -707,7 +735,7 @@ int s = eth_inb(4); if (s) // should not occur, since 4 == TX OK - printk("tx error %02x\n", s); + BBA_DBG("tx error %02x\n", s); } if (status & 2) @@ -729,29 +757,29 @@ if (status & 8) { eth_outb(9, 8); - printk("receive error :(\n"); + BBA_DBG("receive error :(\n"); } if (status & 0x10) { eth_outb(9, 0x10); - printk("tx error\n"); + BBA_DBG("tx error\n"); } if (status & 0x20) { eth_outb(9, 0x20); - printk("rx fifo error\n"); + BBA_DBG("rx fifo error\n"); } if (status & 0x80) { eth_outb(9, 0x80); - printk("rx overflow!\n"); + BBA_DBG("rx overflow!\n"); } if (status & ~(0xBE)) { eth_outb(9, status & ~0xBE); - printk("status %02x\n", status & ~0xBE); + BBA_DBG("status %02x\n", status & ~0xBE); } // eth_outb(9, status); } @@ -774,7 +802,7 @@ /* This might just as well be deleted now, no crummy drivers present :-) */ if ((dev == NULL) || (dev->irq != irq)) { - printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"GC_BBA", irq); + BBA_DBG(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"GC_BBA", irq); return IRQ_NONE; } @@ -812,7 +840,7 @@ long l; - //printk("gc_bba_probe\n"); + BBA_DBG("gc_bba_probe\n"); SET_MODULE_OWNER(dev); @@ -826,14 +854,14 @@ exi_imm_ex(0, &l, 4, EXI_READ); exi_deselect(0); -// printk(": %u\n", l); + BBA_DBG(": %u\n", l); if (l != 0x4020200) { - printk("GameCube broadband adapter not found"); + BBA_DBG("GameCube broadband adapter not found"); return -ENODEV; } - //printk("initializing BBA...\n"); + BBA_DBG("initializing BBA...\n"); eth_outb(0x60, 0); // unknown udelay(10000); @@ -846,7 +874,7 @@ eth_exi_outs(4, "\xd1\x07\x75\x75", 2); eth_exi_outb(5, 0x4e); -// printk("BBA %02x %02x %02x %02x %02x %02x %02x %02x\n", +// BBA_DBG("BBA %02x %02x %02x %02x %02x %02x %02x %02x\n", // eth_exi_inb(0), eth_exi_inb(1), eth_exi_inb(2), eth_exi_inb(3), // eth_exi_inb(4), eth_exi_inb(5), eth_exi_inb(6), eth_exi_inb(7)); @@ -877,8 +905,8 @@ eth_ins(0x20, dev->dev_addr, ETH_LEN); - printk(KERN_INFO "%s: Nintendo GameCube broadband adapter", dev->name); - printk(", %02x:%02x:%02x:%02x:%02x:%02x.\n", + BBA_DBG(KERN_INFO "%s: Nintendo GameCube broadband adapter", dev->name); + BBA_DBG(", %02x:%02x:%02x:%02x:%02x:%02x.\n", dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); @@ -893,7 +921,7 @@ eth_outb(8, 0xFF); // enable all IRQs eth_outb(9, 0xFF); // clear all irqs -// printk("after all: irq mask %x %x\n", eth_inb(8), eth_inb(9)); + BBA_DBG("after all: irq mask %x %x\n", eth_inb(8), eth_inb(9)); /* Initialize the device structure. */ @@ -926,7 +954,7 @@ //select_nic(); rx_page = 0; /* used by RESET */ -// printk("initializing BBA...\n"); + BBA_DBG("initializing BBA...\n"); eth_outb(0x60, 0); // unknown udelay(10000); @@ -939,9 +967,10 @@ eth_exi_outs(4, "\xd1\x07\x75\x75", 2); eth_exi_outb(5, 0x4e); -// printk("BBA %02x %02x %02x %02x %02x %02x %02x %02x\n", -// eth_exi_inb(0), eth_exi_inb(1), eth_exi_inb(2), eth_exi_inb(3), -// eth_exi_inb(4), eth_exi_inb(5), eth_exi_inb(6), eth_exi_inb(7)); + BBA_DBG("BBA %02x %02x %02x %02x %02x %02x %02x %02x\n", + eth_exi_inb(0), eth_exi_inb(1), eth_exi_inb(2), eth_exi_inb(3), + eth_exi_inb(4), eth_exi_inb(5), eth_exi_inb(6), eth_exi_inb(7)); + eth_outb(0x5b, eth_inb(0x5b)&~(1<<7)); eth_outb(0x5e, 1); eth_outb(0x5c, eth_inb(0x5c)|4); @@ -968,9 +997,10 @@ eth_outb(0x32, 8); eth_ins(0x20, dev->dev_addr, ETH_LEN); -// printk("MAC ADDRESS %02x:%02x:%02x:%02x:%02x:%02x\n", -// dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], -// dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); + + BBA_DBG("MAC ADDRESS %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], + dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); /* Get the adapter ethernet address from the ROM */ for (i = 0; i < ETH_ALEN; i++) { @@ -978,9 +1008,9 @@ } // eth_ins(0x20, dev->ethaddr->addr, 6); -// printk("MAC ADDRESS %02x:%02x:%02x:%02x:%02x:%02x\n", -// gcif->ethaddr->addr[0], gcif->ethaddr->addr[1], gcif->ethaddr->addr[2], -// gcif->ethaddr->addr[3], gcif->ethaddr->addr[4], gcif->ethaddr->addr[5]); + BBA_DBG("MAC ADDRESS %02x:%02x:%02x:%02x:%02x:%02x\n", + gcif->ethaddr->addr[0], gcif->ethaddr->addr[1], gcif->ethaddr->addr[2], + gcif->ethaddr->addr[3], gcif->ethaddr->addr[4], gcif->ethaddr->addr[5]); strncpy(dev->name,"GameCube BBA",IFNAMSIZ); dev->name[IFNAMSIZ-1]= 0; @@ -993,7 +1023,7 @@ eth_outb(8, 0xFF); // enable all IRQs eth_outb(9, 0xFF); // clear all irqs -// printk("after all: irq mask %x %x\n", eth_inb(8), eth_inb(9)); + BBA_DBG("after all: irq mask %x %x\n", eth_inb(8), eth_inb(9)); // netif_start_queue(dev); @@ -1007,7 +1037,7 @@ memset(&gc_bba_dev,0,sizeof(struct net_device)); - //printk("gc_bba_init\n"); + BBA_DBG("gc_bba_init\n"); // exi_init(); @@ -1019,7 +1049,7 @@ static void __exit gc_bba_exit(void) { - printk("gc_bba_exit\n"); + BBA_DBG("gc_bba_exit\n"); unregister_netdev(&gc_bba_dev); } @@ -1034,7 +1064,7 @@ if (s & 0x80) { -// printk("GC_IRQ service.\n"); +// BBA_DBG("GC_IRQ service.\n"); eth_exi_outb(3, 0x80); gcif_service(dev); eth_exi_outb(2, 0xF8); @@ -1044,7 +1074,7 @@ { eth_exi_outb(3, 0x40); eth_exi_outb(2, 0xF8); -// printk("GCIF - EXI - 0x40!\n"); +// BBA_DBG("GCIF - EXI - 0x40!\n"); adapter_init(dev); return; @@ -1052,21 +1082,21 @@ } if (s & 0x20) { - printk("GCIF - EXI - CMDERR!\n"); + BBA_DBG("GCIF - EXI - CMDERR!\n"); eth_exi_outb(3, 0x20); eth_exi_outb(2, 0xF8); return; } if (s & 0x10) { - printk("GCIF - EXI - patchtru!\n"); + BBA_DBG("GCIF - EXI - patchtru!\n"); eth_exi_outb(3, 0x10); eth_exi_outb(2, 0xF8); return; } if (s & 0x08) { - printk("GCIF - EXI - HASH function\n"); + BBA_DBG("GCIF - EXI - HASH function\n"); eth_exi_outb(3, 0x08); eth_exi_outb(2, 0xF8); return; |
From: <ham...@us...> - 2004-02-07 00:27:20
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22151/linux/drivers/net Modified Files: gc-net.c Log Message: compile fixes Index: gc-net.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/gc-net.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gc-net.c 6 Feb 2004 23:26:15 -0000 1.10 +++ gc-net.c 7 Feb 2004 00:24:29 -0000 1.11 @@ -614,10 +614,11 @@ eth_ins(p_read << 8, descr, 4); //?????????????????????????????????? -// size = (descr[1] >> 4) | (descr[2]<<4); + size = (descr[1] >> 4) | (descr[2]<<4); - size = descr[1]; /* low byte */ - size += (descr[2] << 8); /* high byte */ +// size = descr[1]; /* low byte */ +// size += (descr[2] << 8); /* high byte */ + size -= 4; /* Ignore trailing 4 CRC-bytes */ @@ -907,7 +908,7 @@ dev->open = gc_bba_open; dev->stop = gc_bba_close; //&gc_bba_start_xmit ( i am confused) - dev->hard_start_xmit = gc_bba_start_xmit; + dev->hard_start_xmit = &gc_bba_start_xmit; spin_lock_init(&priv->lock); @@ -1003,7 +1004,7 @@ static int __init gc_bba_init(void) { - memset(gc_bba_dev,0,sizeof(struct net_device)); + memset(&gc_bba_dev,0,sizeof(struct net_device)); //printk("gc_bba_init\n"); |
From: <mi...@us...> - 2004-02-07 00:10:53
|
Update of /cvsroot/gc-linux/linux/drivers/input/keyboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19203/drivers/input/keyboard Modified Files: gckbd.c Log Message: Steve_-: Added key repeat and some code cleanups. Index: gckbd.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/keyboard/gckbd.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gckbd.c 5 Feb 2004 17:07:11 -0000 1.2 +++ gckbd.c 7 Feb 2004 00:08:05 -0000 1.3 @@ -98,7 +98,7 @@ unsigned long *portRegister; struct input_dev dev; struct timer_list timer; - unsigned char pressedKeys[3]; + unsigned char lastPressed[3]; }; @@ -165,7 +165,7 @@ /* 3a */ 0x28, /* '" */ /* 3b */ 0x1b, /* ]} */ /* 3c */ 0x33, /* ,< */ - /* 3d */ 0x34, /* .> (or Numpad-,) */ + /* 3d */ 0x34, /* .> (or Numpad-.) */ /* 3e */ 0x35, /* /? */ /* 3f */ 0x2b, /* \| */ /* 40 */ 0x3b, /* F1 */ @@ -205,7 +205,7 @@ /* 5e */ 103, /* TODO: Up */ /* 5f */ 106, /* TODO: Right */ /* 60 */ 0, - /* 61 */ 28, + /* 61 */ 28, /* Enter */ /* 62 */ 0, /* 63 */ 0, /* 64 */ 39, @@ -252,92 +252,45 @@ key2 = (*kbd->portRegister >> 16) & 0xFF; key3 = (*kbd->portRegister >> 8) & 0xFF; -// printk("-%x %x %x - %x %x %x-\n", key1, key2, key3, kbd->pressedKeys[0], -// kbd->pressedKeys[1], kbd->pressedKeys[2]); -#if 0 +// printk("-%x %x %x - %x %x %x-\n", key1, key2, key3, kbd->lastPressed[0], +// kbd->lastPressed[1], kbd->lastPressed[2]); + + // report released keys - for (i = 0; i < 3; i++) - { - if (kbd->pressedKeys[i] && kbd->pressedKeys[i] != key1 && kbd->pressedKeys[i] != key2 && kbd->pressedKeys[i] != key3) { - printk("released: %x\n", kbd->pressedKeys[i]); - input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[i]], 0); + for (i = 0; i < 3; i++) { + if (kbd->lastPressed[i]) { + if (kbd->lastPressed[i] != key1 && + kbd->lastPressed[i] != key2 && + kbd->lastPressed[i] != key3) { +// printk("released%d: %x\n", i, kbd->lastPressed[i]); + input_report_key (&kbd->dev, gckbd_keycode[kbd->lastPressed[i]], 0); + } } } -#endif - if (kbd->pressedKeys[0]) { - if ((kbd->pressedKeys[0]) != key1 && - (kbd->pressedKeys[0]) != key2 && - (kbd->pressedKeys[0]) != key3) { -// printk("released1: %x\n", kbd->pressedKeys[0]); - input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[0]], 0); - } - } - if (kbd->pressedKeys[1]) { - if ((kbd->pressedKeys[1]) != key1 && - (kbd->pressedKeys[1]) != key2 && - (kbd->pressedKeys[1]) != key3) { -// printk("released2: %x\n", kbd->pressedKeys[1]); - input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[1]], 0); - } - } - if (kbd->pressedKeys[2]) { - if ((kbd->pressedKeys[2]) != key1 && - (kbd->pressedKeys[2]) != key2 && - (kbd->pressedKeys[2]) != key3) { -// printk("released3: %x\n", kbd->pressedKeys[2]); - input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[2]], 0); - } - } -#if 0 // check if we should report anything - if (key1 && gckbd_keycode[key1]) { - printk("pressed1: %x\n", key1); - input_report_key (&kbd->dev, gckbd_keycode[key1], 1); - } - if (key2 && gckbd_keycode[key2]) { - printk("pressed2: %x\n", key2); - input_report_key (&kbd->dev, gckbd_keycode[key2], 1); - } - if (key3 && gckbd_keycode[key3]) { - printk("pressed3: %x\n", key3); - input_report_key (&kbd->dev, gckbd_keycode[key3], 1); - } -#endif if (key1) { - if ((key1 != kbd->pressedKeys[0]) && - (key1 != kbd->pressedKeys[1]) && - (key1 != kbd->pressedKeys[2])) { -// printk("pressed1: %x\n", key1); - input_report_key (&kbd->dev, gckbd_keycode[key1], 1); - } +// printk("pressed1: %x\n", key1); + input_report_key (&kbd->dev, gckbd_keycode[key1], 1); } if (key2) { - if ((key2 != kbd->pressedKeys[0]) && - (key2 != kbd->pressedKeys[1]) && - (key2 != kbd->pressedKeys[2])) { -// printk("pressed2: %x\n", key1); - input_report_key (&kbd->dev, gckbd_keycode[key2], 1); - } +// printk("pressed2: %x\n", key2); + input_report_key (&kbd->dev, gckbd_keycode[key2], 1); } if (key3) { - if ((key3 != kbd->pressedKeys[0]) && - (key3 != kbd->pressedKeys[1]) && - (key3 != kbd->pressedKeys[2])) { -// printk("pressed3: %x\n", key1); - input_report_key (&kbd->dev, gckbd_keycode[key3], 1); - } +// printk("pressed3: %x\n", key3); + input_report_key (&kbd->dev, gckbd_keycode[key3], 1); } input_sync (&kbd->dev); // keep state of pressed keys - kbd->pressedKeys[0] = key1; - kbd->pressedKeys[1] = key2; - kbd->pressedKeys[2] = key3; + kbd->lastPressed[0] = key1; + kbd->lastPressed[1] = key2; + kbd->lastPressed[2] = key3; mod_timer (&kbd->timer, jiffies + HZ/50); @@ -351,7 +304,7 @@ init_timer (&kbd->timer); - kbd->timer.data = (void *)kbd; + kbd->timer.data = (unsigned int)kbd; kbd->timer.function = gckbd_timer; kbd->timer.expires = jiffies + HZ/50; add_timer (&kbd->timer); @@ -390,6 +343,7 @@ memset (kbd, 0, sizeof (struct gckbd)); + // set some parameters/callbacks kbd->portRegister = (unsigned long*)0xCC00642C; kbd->dev.private = kbd; @@ -397,6 +351,7 @@ kbd->dev.close = gckbd_close; set_bit (EV_KEY, kbd->dev.evbit); + set_bit (EV_REP, kbd->dev.evbit); for (i = 0; i < 255; i++) set_bit (gckbd_keycode[i], kbd->dev.keybit); |
From: <ham...@us...> - 2004-02-06 23:29:06
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9345/linux/drivers/net Modified Files: gc-net.c Log Message: modificaiont #part 2 (not yet testet) Index: gc-net.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/gc-net.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gc-net.c 6 Feb 2004 21:04:35 -0000 1.9 +++ gc-net.c 6 Feb 2004 23:26:15 -0000 1.10 @@ -41,7 +41,7 @@ #define BBA_IRQ 4 #define IRQ_EXI 4 -#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ +//#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ struct gc_private { int linkup; /* Link state */ @@ -49,6 +49,10 @@ int fullduplex; /* Duplex mode */ int promisc; /* Promiscuous status */ + spinlock_t lock; + spinlock_t phylock; /* phy lock */ + unsigned long lockflags; /* Lock flags */ + // Statistical Data struct net_device_stats stats; }; @@ -360,7 +364,6 @@ } -static spinlock_t gc_bba_lock; #define RUNT 60 /* Too small Ethernet packet */ #define ETH_LEN 6 @@ -417,17 +420,19 @@ static int gc_bba_open(struct net_device *dev) { - unsigned long flags; + struct gc_private *priv = (struct gc_private *)dev->priv; //printk("gc_bba_open\n"); - int ret = request_irq(BBA_IRQ, gc_bba_interrupt, 0, dev->name, dev); + int ret = request_irq(dev->irq, gc_bba_interrupt, 0, dev->name, dev); if (ret) { - printk(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, BBA_IRQ); + printk(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq); return ret; } - spin_lock_irqsave(&gc_bba_lock, flags); + + spin_lock_irqsave(&priv->lock, priv->lockflags); ret = adapter_init(dev); - spin_unlock_irqrestore(&gc_bba_lock, flags); + spin_unlock_irqrestore(&priv->lock, priv->lockflags); + return ret; } @@ -446,7 +451,7 @@ // de600_put_command(STOP_RESET); // de600_put_command(0); // //select_prn(); - free_irq(BBA_IRQ, dev); + free_irq(dev->irq, dev); return 0; } @@ -474,9 +479,7 @@ static int gc_bba_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct gc_private *priv = (struct gc_private *)dev->priv; - unsigned long flags; int transmit_from; - int len; int tickssofar; int i; @@ -489,13 +492,13 @@ /* else */ printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); /* Restart the adapter. */ - spin_lock_irqsave(&gc_bba_lock, flags); + spin_lock_irqsave(&priv->lock, priv->lockflags); if (adapter_init(dev)) { - spin_unlock_irqrestore(&gc_bba_lock, flags); + spin_unlock_irqrestore(&priv->lock, priv->lockflags); priv->stats.tx_carrier_errors++; return 1; } - spin_unlock_irqrestore(&gc_bba_lock, flags); + spin_unlock_irqrestore(&priv->lock, priv->lockflags); } netif_stop_queue(dev); @@ -503,11 +506,7 @@ /* Start real output */ // printk("gc_bba_start_xmit:len=%d, page %d/%d\n", skb->len, tx_fifo_in, free_tx_pages); - len = skb->len; - if ( len < RUNT) - len = RUNT; - - spin_lock_irqsave(&gc_bba_lock, flags); + spin_lock_irqsave(&priv->lock, priv->lockflags); dev->trans_start = jiffies; @@ -538,7 +537,7 @@ { printk("err USE!\n"); netif_start_queue(dev); /* allow more packets into adapter */ - spin_unlock_irqrestore(&gc_bba_lock, flags); + spin_unlock_irqrestore(&priv->lock, priv->lockflags); dev_kfree_skb(skb); return 1; } @@ -567,7 +566,7 @@ netif_start_queue(dev); /* allow more packets into adapter */ - spin_unlock_irqrestore(&gc_bba_lock, flags); + spin_unlock_irqrestore(&priv->lock, priv->lockflags); dev_kfree_skb(skb); priv->stats.tx_bytes++; @@ -580,7 +579,7 @@ static char *gc_input(struct net_device *dev) { // struct gcif *gcif=(struct gcif*)netif->state; - struct gc_private *priv = dev->priv; + struct gc_private *priv = (struct gc_private *)dev->priv; struct sk_buff *skb; char *p, *q; unsigned char *buffer; @@ -685,7 +684,8 @@ { // struct gcif *gcif; // gcif = netif->state; - + struct gc_private *priv = (struct gc_private *)dev->priv; + unsigned short p_read, p_write; int inb9 = eth_inb(9); @@ -763,24 +763,21 @@ static irqreturn_t gc_bba_interrupt(int irq, void *dev_id, struct pt_regs * regs) { - struct net_device *dev; - struct gc_private *priv; + + struct net_device *dev = (struct net_device *)dev_id; + struct gc_private *priv = (struct gc_private *)dev->priv; u8 irq_status; int retrig = 0; int boguscount = 0; - dev = (struct net_device *)dev_id; - priv = (struct gc_private *)dev->priv; - - /* This might just as well be deleted now, no crummy drivers present :-) */ - if ((dev == NULL) || (BBA_IRQ != irq)) { + if ((dev == NULL) || (dev->irq != irq)) { printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"GC_BBA", irq); return IRQ_NONE; } - spin_lock(&gc_bba_lock); + spin_lock(&priv->lock); int ch; @@ -800,7 +797,7 @@ if (retrig) trigger_interrupt(dev); - spin_unlock(&gc_bba_lock); + spin_unlock(&priv->lock); return IRQ_HANDLED; } @@ -902,13 +899,18 @@ dev->priv = (struct gc_private *)kmalloc(sizeof(struct net_device_stats), GFP_KERNEL); priv = (struct gc_private *)dev->priv; + dev->irq = BBA_IRQ; + dev->get_stats = gc_stats; dev->open = gc_bba_open; dev->stop = gc_bba_close; + //&gc_bba_start_xmit ( i am confused) dev->hard_start_xmit = gc_bba_start_xmit; - + + spin_lock_init(&priv->lock); + ether_setup(dev); dev->flags&=~IFF_MULTICAST; @@ -982,8 +984,7 @@ strncpy(dev->name,"GameCube BBA",IFNAMSIZ); dev->name[IFNAMSIZ-1]= 0; - dev->irq = 2; - exi_request_irq(dev->irq, EXI_EVENT_IRQ, gcif_irq_handler, NULL); + exi_request_irq(2, EXI_EVENT_IRQ, gcif_irq_handler, NULL); eth_exi_outb(0x2, 0xFF); eth_exi_outb(0x3, 0xFF); @@ -1004,8 +1005,8 @@ { memset(gc_bba_dev,0,sizeof(struct net_device)); + //printk("gc_bba_init\n"); - spin_lock_init(&gc_bba_lock); // exi_init(); |
From: <ham...@us...> - 2004-02-06 21:07:21
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9808/linux/drivers/net Modified Files: gc-net.c Log Message: NOTE: WARNING: i fixed some "exploit" problems in teh driver to look if he gets "more stabile" now. Additionally, i have added full Statistics support and a priv Datastructure called gc_private for holding data. As i have kernel 2.4 and basically no idea, about how to compiler... or so i coded it blind, without compiling too. so , do not use it. (hopefully, i did not too many bugs) franz Index: gc-net.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/gc-net.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gc-net.c 2 Feb 2004 23:22:01 -0000 1.8 +++ gc-net.c 6 Feb 2004 21:04:35 -0000 1.9 @@ -41,6 +41,19 @@ #define BBA_IRQ 4 #define IRQ_EXI 4 +#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ + +struct gc_private { + int linkup; /* Link state */ + int linkspeed; /* Link speed */ + int fullduplex; /* Duplex mode */ + int promisc; /* Promiscuous status */ + + // Statistical Data + struct net_device_stats stats; +}; + + void gcif_irq_handler(int channel, int event, void *ct); @@ -438,9 +451,10 @@ } -static struct net_device_stats *get_stats(struct net_device *dev) +static struct net_device_stats *gc_stats(struct net_device *dev) { - return (struct net_device_stats *)(dev->priv); + struct gc_private *priv = (struct gc_private *)dev->priv; + return &priv->stats; } static inline void trigger_interrupt(struct net_device *dev) @@ -459,34 +473,38 @@ static int gc_bba_start_xmit(struct sk_buff *skb, struct net_device *dev) { + struct gc_private *priv = (struct gc_private *)dev->priv; unsigned long flags; int transmit_from; int len; int tickssofar; - u8 *buffer = skb->data; int i; if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */ tickssofar = jiffies - dev->trans_start; - if (tickssofar < 5) + if (tickssofar < 5) { + priv->stats.tx_carrier_errors++; return 1; + } /* else */ printk(KERN_WARNING "%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem"); /* Restart the adapter. */ spin_lock_irqsave(&gc_bba_lock, flags); if (adapter_init(dev)) { spin_unlock_irqrestore(&gc_bba_lock, flags); + priv->stats.tx_carrier_errors++; return 1; } spin_unlock_irqrestore(&gc_bba_lock, flags); } -// netif_stop_queue(dev); + netif_stop_queue(dev); /* Start real output */ // printk("gc_bba_start_xmit:len=%d, page %d/%d\n", skb->len, tx_fifo_in, free_tx_pages); - if ((len = skb->len) < RUNT) + len = skb->len; + if ( len < RUNT) len = RUNT; spin_lock_irqsave(&gc_bba_lock, flags); @@ -495,28 +513,31 @@ unsigned int val=0xC0004800; // register 0x48 is the output queue - struct pbuf *q; - exi_select(0, 2, 5); exi_imm(0, &val, 4, EXI_WRITE, 0); exi_sync(0); - exi_imm_ex(0, buffer, skb->len, EXI_WRITE); - - char buf0[1024]; - memset(buf0, 0, 1024); + // Send Data from skb buffer to Network Driver now + exi_imm_ex(0, skb->data, skb->len, EXI_WRITE); - if (len != skb->len) - exi_imm_ex(0, buf0, len-skb->len, EXI_WRITE); + /* + The Network Drivers wants a minium of 60bytes to be filled into, + so we check if we have at leaset 60 bytes + */ + if ( skb->len < RUNT) { + char buf0[60+4]; + memset(buf0, 0, 60+4); + exi_imm_ex(0, buf0, RUNT - skb->len, EXI_WRITE); + } exi_deselect(0); -// netif_start_queue(dev); val = eth_inb(0); if (val & 4) { printk("err USE!\n"); + netif_start_queue(dev); /* allow more packets into adapter */ spin_unlock_irqrestore(&gc_bba_lock, flags); dev_kfree_skb(skb); return 1; @@ -531,6 +552,7 @@ if (eth_inb(9) & 0x10) { printk("TRANSMIT ERROR!\n"); + priv->stats.tx_errors++; // eth_outb(9, 0x10); } @@ -543,8 +565,14 @@ // if (s) // printk("tx error %02x\n", s); + netif_start_queue(dev); /* allow more packets into adapter */ + spin_unlock_irqrestore(&gc_bba_lock, flags); dev_kfree_skb(skb); + + priv->stats.tx_bytes++; + priv->stats.tx_packets++; + return 0; } @@ -552,10 +580,11 @@ static char *gc_input(struct net_device *dev) { // struct gcif *gcif=(struct gcif*)netif->state; + struct gc_private *priv = dev->priv; struct sk_buff *skb; char *p, *q; unsigned char *buffer; - unsigned short len, p_read, p_write; + unsigned short size, p_read, p_write; int i; int ptr; @@ -569,6 +598,7 @@ if (p_read == p_write) { printk("nothing left.\n"); + priv->stats.rx_missed_errors++; return 0; } @@ -577,27 +607,41 @@ if (eth_inb(0x3a) & 2) { printk("NO DATA AVAILABLE!\n"); + priv->stats.rx_missed_errors++; return 0; } - len=0; + size=0; eth_ins(p_read << 8, descr, 4); +//?????????????????????????????????? +// size = (descr[1] >> 4) | (descr[2]<<4); + + size = descr[1]; /* low byte */ + size += (descr[2] << 8); /* high byte */ + size -= 4; /* Ignore trailing 4 CRC-bytes */ + - len = (descr[1] >> 4) | (descr[2]<<4); - - len-=4; //??? - - if ((len < 32) || (len > 1535)) { - printk(KERN_WARNING "%s: Bogus packet size %d.\n", dev->name, len); - if (len > 10000) + if ((size < 32) || (size > 1535)) { + printk(KERN_WARNING "%s: Bogus packet size %d.\n", dev->name, size); + if (size > 10000) { adapter_init(dev); + priv->stats.rx_length_errors++; + } return; } - skb = dev_alloc_skb(len+2); + // HOTFIX (for to be sure:) + #if 1 + if (size<2002) skb = dev_alloc_skb(2002); // enough for Standart MTU of 1500 + #else + skb = dev_alloc_skb(size+2); + #endif + + if (skb == NULL) { - printk("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, len); + printk("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, size); + priv->stats.rx_errors++; return; } /* else */ @@ -606,19 +650,19 @@ skb_reserve(skb,2); /* Align */ /* 'skb->data' points to the start of sk_buff data area. */ - buffer = skb_put(skb,len); + buffer = skb_put(skb,size); -// printk("There are %u bytes data\n", len); +// printk("There are %u bytes data\n", size); ptr = (p_read << 8) + 4; - if (ptr + len > 0x1000) + if (ptr + size > 0x1000) { - int len1 = 0x1000 - ptr - len; + int len1 = 0x1000 - ptr - size; eth_ins(ptr, buffer, len1); - eth_ins(ptr, buffer + len1, len - len1); + eth_ins(ptr, buffer + len1, size - len1); } else - eth_ins(ptr, buffer, len); + eth_ins(ptr, buffer, size); eth_outb(0x18, descr[0] & 0xFF); eth_outb(0x19, descr[1] & 0xFF); @@ -629,9 +673,10 @@ /* update stats */ dev->last_rx = jiffies; - ((struct net_device_stats *)(dev->priv))->rx_packets++; /* count all receives */ - ((struct net_device_stats *)(dev->priv))->rx_bytes += len; /* count all received bytes */ + priv->stats.rx_packets ++; /* count all receives */ + priv->stats.rx_bytes ++; /* count all received bytes */ + return p; } @@ -718,11 +763,17 @@ static irqreturn_t gc_bba_interrupt(int irq, void *dev_id, struct pt_regs * regs) { - struct net_device *dev = dev_id; + struct net_device *dev; + struct gc_private *priv; + u8 irq_status; int retrig = 0; int boguscount = 0; + dev = (struct net_device *)dev_id; + priv = (struct gc_private *)dev->priv; + + /* This might just as well be deleted now, no crummy drivers present :-) */ if ((dev == NULL) || (BBA_IRQ != irq)) { printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"GC_BBA", irq); @@ -757,13 +808,15 @@ int __init gc_bba_probe(struct net_device *dev) { + struct gc_private *priv; int i; - static struct net_device_stats gc_bba_netstats; short s=0; long l; - /*dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL);*/ + + //printk("gc_bba_probe\n"); + SET_MODULE_OWNER(dev); /* probe for adapter */ @@ -845,19 +898,19 @@ // printk("after all: irq mask %x %x\n", eth_inb(8), eth_inb(9)); /* Initialize the device structure. */ - dev->priv = &gc_bba_netstats; - memset(dev->priv, 0, sizeof(struct net_device_stats)); - dev->get_stats = get_stats; + + dev->priv = (struct gc_private *)kmalloc(sizeof(struct net_device_stats), GFP_KERNEL); + priv = (struct gc_private *)dev->priv; + + dev->get_stats = gc_stats; dev->open = gc_bba_open; dev->stop = gc_bba_close; - dev->hard_start_xmit = &gc_bba_start_xmit; - + dev->hard_start_xmit = gc_bba_start_xmit; ether_setup(dev); - dev->flags&=~IFF_MULTICAST; return 0; @@ -925,8 +978,12 @@ // printk("MAC ADDRESS %02x:%02x:%02x:%02x:%02x:%02x\n", // gcif->ethaddr->addr[0], gcif->ethaddr->addr[1], gcif->ethaddr->addr[2], // gcif->ethaddr->addr[3], gcif->ethaddr->addr[4], gcif->ethaddr->addr[5]); - - exi_request_irq(2, EXI_EVENT_IRQ, gcif_irq_handler, NULL); + + strncpy(dev->name,"GameCube BBA",IFNAMSIZ); + dev->name[IFNAMSIZ-1]= 0; + + dev->irq = 2; + exi_request_irq(dev->irq, EXI_EVENT_IRQ, gcif_irq_handler, NULL); eth_exi_outb(0x2, 0xFF); eth_exi_outb(0x3, 0xFF); @@ -945,6 +1002,8 @@ static int __init gc_bba_init(void) { + memset(gc_bba_dev,0,sizeof(struct net_device)); + //printk("gc_bba_init\n"); spin_lock_init(&gc_bba_lock); |
From: <mi...@us...> - 2004-02-06 13:42:32
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv942/xml/en Modified Files: news.xml yagcd.xml Log Message: ... Index: news.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/news.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- news.xml 3 Feb 2004 02:53:33 -0000 1.11 +++ news.xml 6 Feb 2004 13:39:48 -0000 1.12 @@ -2,6 +2,21 @@ <?xml-stylesheet href="news.xsl" type="text/xsl"?> <news> <item> + <date>5 February 2004</date> + <title>Even more driver work</title> + <text>The keyboard driver works reliably now, and groepaz has contributed improved framebuffer code as well as a fricker-free framebuffer font.</text> + </item> + <item> + <date>4 February 2004</date> + <title>More driver work</title> + <text>kirin's audio driver (mknod /dev/dsp c 14 3) and Steve_-'s keyboard driver are in the CVS now. You can use your keyboard now, and you can output random noise...</text> + </item> + <item> + <date>3 February 2004</date> + <title>More drivers</title> + <text>kirin and Steve_- have contributed preliminary audio and keyboard drivers resp., and Costis and groepaz have increased the sharpness of the framebuffer. Expect fully integrated code in the CVS tomorrow.</text> + </item> + <item> <date>2 February 2004</date> <title><font color="red">GameCube Linux Alpha</font></title> <text>We have released a 1 MB busybox-based Linux system that contains screen output, network code, a telnet server and a webserver. We also provide a kernel patch. (<a href="docs/screenshots.html">Screenshots</a>/<a href="docs/download.html">Download</a>)</text> Index: yagcd.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/yagcd.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- yagcd.xml 3 Feb 2004 01:23:37 -0000 1.6 +++ yagcd.xml 6 Feb 2004 13:39:48 -0000 1.7 @@ -9,7 +9,7 @@ <a href="../../down/yet_another_gamecube_doc.pdf.tar.gz">pdf</a> (primary document, recommended for printing)<br /> <hr /> -<small><b>last modified: Sat, 31 Jan 2004 22:46:41 </b></small><br /> +<small><b>last modified: Thu, 05 Feb 2004 09:04:41 </b></small><br /> <h1 align="center">Yet Another Gamecube Documentation<br /> <font size="-1">(but one that's worth printing)</font> </h1> @@ -475,7 +475,7 @@ <tr><td align="center">4</td><td>CLK</td></tr> -<tr><td align="center">5</td><td>1.25V</td></tr> +<tr><td align="center">5</td><td>12V</td></tr> <tr><td align="center">6</td><td>DO</td></tr> @@ -2180,7 +2180,7 @@ </table> </td></tr> -<tr><td align="center"><tt>0x800000d0</tt></td><td align="center"></td><td align="center"></td><td>?</td></tr> +<tr><td align="center"><tt>0x800000d0</tt></td><td align="center"></td><td align="center"></td><td>ARAM size (bytes or megabytes ?)</td></tr> <tr><td align="center"><tt>0x800000D4</tt></td><td align="center"></td><td align="center"></td><td>current OS Context (logical address)</td></tr> @@ -3270,10 +3270,12 @@ <tr><td align="center">29-31</td><td align="center">y</td><td>always zero (maybe some write only control register stuff?, setting bit 31 clears bits 31-28 (?))</td></tr> +<tr><td align="center">28</td><td align="center"></td><td>page offset bit (*1)</td></tr> + <tr><td align="center">24-27</td><td align="center">z</td><td>XOF - Horizontal Offset of the left-most pixel within the first word of the fetched picture.</td></tr> -<tr><td align="center">9-23</td><td align="center">a</td><td>FBB - bit 23 - bit 9 of XFB Address (*)</td></tr> +<tr><td align="center">9-23</td><td align="center">a</td><td>FBB - bit 23 - bit 9 of XFB Address (*2)</td></tr> <tr><td align="center">0-8</td><td align="center">x</td><td>unused (?)</td></tr> </table> @@ -3285,23 +3287,15 @@ <tr><td></td></tr> -<tr><td>(*) lowest possible Address: 0x80000000 (set register to 0x00000000)</td></tr> - -<tr><td></td></tr> - <tr><td>This register specifies the display origin of the top field of a picture in 2D mode or for the left picture in 3D mode</td></tr> - -<tr><td></td></tr> - -<tr><td>highest possible Address: 0x80fffe00 (set register to 0x00fffe00)</td></tr> - -<tr><td>as you can see the address must be aligned to 9 bits.</td></tr> - -<tr><td></td></tr> </table> <br /> <br /> +(*1) when this bit is set, the framebuffer address is calculated as (address> >5)<br /> +(*2) if bit 28 is cleared, highest possible Address: 0x80fffe00 (set register +to 0x00fffe00) (aligned to 9bit)<br /> +<br /> <table> <tr><td> @@ -3369,6 +3363,8 @@ <tr><td align="center"></td><td align="center">y</td><td>always zero (maybe some write-only control register stuff?)</td></tr> +<tr><td align="center">28</td><td align="center"></td><td>page offset bit (*1)</td></tr> + <tr><td align="center"></td><td align="center">a</td><td>FBB - bit 23 - bit 9 of XFB Address</td></tr> <tr><td align="center"></td><td align="center">x</td><td>unused (?)</td></tr> @@ -3388,6 +3384,8 @@ </table> <br /> <br /> +(*1) when this bit is set, the framebuffer address is calculated as (address> >5)<br /> +<br /> <table> <tr><td> @@ -6177,17 +6175,53 @@ </table> </td></tr> -<tr><td align="center">25-26</td><td align="center">c</td><td>Channel Number</td></tr> +<tr><td align="center">29</td><td align="center"></td><td>COMERR - Communication Error</td></tr> -<tr><td align="center"></td><td align="center"></td><td></td></tr> +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">0</td><td>ok</td></tr> -<tr><td align="center"></td><td align="center">s</td><td>Channel Enable (?)</td></tr> +<tr><td align="center">1</td><td>error (see SiSr for the cause)</td></tr> +</table> +</td></tr> -<tr><td align="center">16-22</td><td align="center">m</td><td>number of bytes we want in return, AND 0x7f</td></tr> +<tr><td align="center">28</td><td align="center"></td><td>RDSTINT - Read Status Interrupt Status (*2)</td></tr> -<tr><td align="center">8-14</td><td align="center">n</td><td>number of bytes we want to send, AND 0x7f</td></tr> +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">read</td><td align="center">0</td><td>Transfer Complete Interrupt not requested</td></tr> -<tr><td align="center"></td><td align="center">e</td><td>Command Enable (?)</td></tr> +<tr><td align="center"></td><td align="center">1</td><td>Transfer Complete Interrupt has been requested</td></tr> + +<tr><td align="center">write</td><td align="center">0</td><td></td></tr> + +<tr><td align="center"></td><td align="center">1</td><td></td></tr> +</table> +</td></tr> + +<tr><td align="center">27</td><td align="center"></td><td>RDSTINTMSK - Read Status interrupt Mask (*3)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">0</td><td>masked</td></tr> + +<tr><td align="center">1</td><td>enabled</td></tr> +</table> +</td></tr> + +<tr><td align="center">25-26</td><td align="center">c</td><td>Channel Number (?)</td></tr> + +<tr><td align="center">24</td><td align="center">s</td><td>Channel Enable (?)</td></tr> + +<tr><td align="center">23</td><td align="center"></td><td>unused/reserved</td></tr> + +<tr><td align="center">16-22</td><td align="center">m</td><td>OUTLNGTH - Communication Channel Output Length (*4)</td></tr> + +<tr><td align="center">15</td><td align="center"></td><td>unused/reserved</td></tr> + +<tr><td align="center">8-14</td><td align="center">n</td><td>INLNGTH - Communication Channel Input Length (*4)</td></tr> + +<tr><td align="center">7</td><td align="center">e</td><td>Command Enable (?)</td></tr> <tr><td align="center">6</td><td align="center">b</td><td>callback enable</td></tr> @@ -6200,6 +6234,34 @@ <tr><td align="center">1</td><td>callback enabled</td></tr> </table> </td></tr> + +<tr><td align="center">1-2</td><td align="center"></td><td>CHANNEL - (*5)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">00</td><td>Channel 1</td></tr> + +<tr><td align="center">01</td><td>Channel 2</td></tr> + +<tr><td align="center">10</td><td>Channel 3</td></tr> + +<tr><td align="center">11</td><td>Channel 4</td></tr> +</table> +</td></tr> + +<tr><td align="center">0</td><td align="center"></td><td>TSTART - Transfer Start (*6)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">read</td><td align="center">0</td><td>Command Complete</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Command Pending</td></tr> + +<tr><td align="center">write</td><td align="center">0</td><td>Do not start command</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Start command</td></tr> +</table> +</td></tr> </table> </td></tr> @@ -6209,6 +6271,21 @@ <tt></tt> <br /> (*1) Interrupt masking prevents the interrupt from being sent to the main processor, but does not affect the assertion of SICOMCSR[TCINT]<tt></tt> <br /> +(*2) On read this bit indicates the current status of the Read Status interrupt. +The interrupt is set whenever SISR[RDSTn] bits are set. The interrupt is cleared +when all of the RdSt bits in the SISR are cleared by reading from the Si Channel +Input Buffers. This interrupt can be used to indicate that a polling transfer has +completed and new data is captured in the input registers<br /> +(*3) Interrupt masking prevents the interrupt from being sent to the main processor, +but does not affect the assertion of SICOMCSR[RDSTINT]<br /> +(*4) Minimum transfer is 1 byte. A value of 0 will transfer 128 bytes. These bits +should not be modified while SICOM transfer is in progress.<br /> +(*5) These bits should not be modified while SICOM transfer is in progress.<br /> +(*6) When a `1` is written to this register, the current communication transfer +is executed. The transfer begins immediately after the current transaction on this +channel has completed. When read this bit represents the current transfer status. +Once a communication transfer has been executed, polling will resume at the next +vblank if the channel's SIPOLL[ENn] bit is set.<tt></tt> <br /> <tt></tt> <br /> When programming the SICOMCSR after a SICOM transfers has already started (e.g., SICOMCSR[TSTART] is set), the software should read the current value first, @@ -6223,7 +6300,7 @@ <table> <tr><td><tt></tt> <table border="1" cellspacing="0" cellpadding="3"> -<tr><td align="center"><tt>0xCC006438</tt></td><td align="center">4</td><td align="center">r/w</td><td align="center">SISI - SI Status Register (channel select & status2)</td></tr> +<tr><td align="center"><tt>0xCC006438</tt></td><td align="center">4</td><td align="center">r/w</td><td align="center">SISR - SI Status Register (channel select & status2)</td></tr> </table> </td></tr> @@ -6259,17 +6336,81 @@ <tr><td align="center">30</td><td align="center"></td><td>reserved/unused</td></tr> -<tr><td align="center">29</td><td align="center"></td><td></td></tr> +<tr><td align="center">29</td><td align="center"></td><td>RDST0 - Read Status SIC0OINBUF Register (*2)</td></tr> -<tr><td align="center">28</td><td align="center"></td><td></td></tr> +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">0</td><td>New data available, not read by main processor</td></tr> -<tr><td align="center">27</td><td align="center"></td><td></td></tr> +<tr><td align="center">1</td><td>No new data available, already read by main processor</td></tr> +</table> +</td></tr> -<tr><td align="center">26</td><td align="center"></td><td></td></tr> +<tr><td align="center">28</td><td align="center"></td><td>WRST0 - Write Status SIC0OUTBUF Register (*3)</td></tr> -<tr><td align="center">25</td><td align="center"></td><td></td></tr> +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">0</td><td>Buffer copied</td></tr> -<tr><td align="center">24</td><td align="center"></td><td></td></tr> +<tr><td align="center">1</td><td>Buffer not copied</td></tr> +</table> +</td></tr> + +<tr><td align="center">27</td><td align="center"></td><td>NOREP0 - No Response Error Channel 0 (*4)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">read</td><td align="center">0</td><td>No Response Error not asserted</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>No Response Error asserted</td></tr> + +<tr><td align="center">write</td><td align="center">0</td><td>No effect</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Clear No Response Error</td></tr> +</table> +</td></tr> + +<tr><td align="center">26</td><td align="center"></td><td>COLL0 - Collision Error Channel 0 (*5)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">read</td><td align="center">0</td><td>Collision Error not asserted</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Collision Error asserted</td></tr> + +<tr><td align="center">write</td><td align="center">0</td><td>No effect</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Clear Collision Error</td></tr> +</table> +</td></tr> + +<tr><td align="center">25</td><td align="center"></td><td>OVRUN0 - Over Run Error Channel 0 (*6)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">read</td><td align="center">0</td><td>Over Run Error not asserted</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Over Run Error asserted</td></tr> + +<tr><td align="center">write</td><td align="center">0</td><td>No effect</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Clear Over Run Error</td></tr> +</table> +</td></tr> + +<tr><td align="center">24</td><td align="center"></td><td>UNRUN - Under Run Error Channel 0 (*7)</td></tr> + +<tr><td align="center"></td><td align="center"></td><td> +<table border="1" cellspacing="0" cellpadding="3"> +<tr><td align="center">read</td><td align="center">0</td><td>Under Run not asserted</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Under Run asserted</td></tr> + +<tr><td align="center">write</td><td align="center">0</td><td>No effect</td></tr> + +<tr><td align="center"></td><td align="center">1</td><td>Clear Under Run Error</td></tr> +</table> +</td></tr> <tr><td align="center">22-23</td><td align="center"></td><td>reserved/unused</td></tr> @@ -6291,7 +6432,25 @@ <tt></tt> <br /> (*1) Write SICnOUTBUF Register: This register controls and indicates whether the SICnOUTBUFs have been copied to the double buffered output buffers. This bit is -cleared after the buffers have been copied.<tt></tt> <br /> +cleared after the buffers have been copied.<br /> +(*2) This register indicates whether the SIC0INBUFs have been captured new data +and whether the data has already been read by the main processor (read indicated +by main processor read of SIC01NBUF[ERRSTAT, ERRLATCH, INPUT0, INPUT1)]<br /> +(*3) This register indicates whether the SIC0OUTBUFs have been copied to the double +buffered output buffers. This bit is cleared after the buffers have been copied.<br /> +(*4) This register indicates that a previous transfer resulted in no response +from the controller. This can also be used to detect whether a controller is connected. +If no controller is connected, this bit will be set. Once set this bit remains set +until it is cleared by the main processor. To clear this bit write `1` to this register.<br /> +(*5) This register indicates data collision between controller and main unit. +Once set this bit remains set until it is cleared by the main processor. To clear +this bit write `1` to this register.<br /> +(*6) This register indicates that the main unit has received more data than expected. +Once set this bit remains set until it is cleared by the main processor. To clear +this bit write `1' to this register.<br /> +(*7) This register indicates that the main unit has received less data than expected. +Once set this bit remain set until it is cleared by the main processor. To clear +this bit write `1` to this register.<br /> <tt></tt> <br /> <tt></tt> <table> @@ -7650,7 +7809,7 @@ <tr><td align="center"></td></tr></table> </center> <div class="p"><!----></div> - <br /> + <table> <tr><td> <table border="1" cellspacing="0" cellpadding="3"> @@ -9990,7 +10149,7 @@ <tr><td align="center"></td></tr></table> </center> <div class="p"><!----></div> -<br /> + <table> <tr><td> <table border="1" cellspacing="0" cellpadding="3"> @@ -11274,10 +11433,10 @@ </table> <tt></tt> <br /> <tt></tt> <br /> -<tt>(*1) n: use light #n for bump map direction source (10 to 17)</tt> <br /> -<tt>(*2) n: use regular transformed tex(n) for bump mapping source</tt> <br /> -<tt>(*3) Specifies location of incoming textures in vertex (row specific) -(i.e.: geometry is row0, normal is row1, etc . . . ) for regular transformations</tt> <br /> +(*1) n: use light #n for bump map direction source (10 to 17)<br /> +(*2) n: use regular transformed tex(n) for bump mapping source<br /> +(*3) Specifies location of incoming textures in vertex (row specific) (i.e.: geometry +is row0, normal is row1, etc . . . ) for regular transformations<tt></tt> <br /> <tt></tt> <br /> <table> @@ -11790,7 +11949,7 @@ <div class="p"><!----></div> <h4><a name="tth_sEc6.2.4"> -6.2.4</a>  Pixel Engine Finished</h4> +6.2.4</a>  PE - Pixel Engine Finished</h4> <div class="p"><!----></div> 1 Source (Frame finished) @@ -11822,7 +11981,7 @@ <div class="p"><!----></div> <h4><a name="tth_sEc6.2.5"> -6.2.5</a>  Pixel Engine Token</h4> +6.2.5</a>  PE - Pixel Engine Token</h4> <div class="p"><!----></div> 1 Source (Token in GP Command List) @@ -11911,6 +12070,9 @@  </b> <div class="p"><!----></div> +asserted when audio DMA transfer has been completed. + +<div class="p"><!----></div> <br />    <b><a name="tth_sEc6.2.8.1.1"> 6.2.8.1.1  Setup</a>  </b> @@ -11933,11 +12095,27 @@ </ul> <div class="p"><!----></div> + +<b>6.2.8.2<a name="tth_sEc6.2.8.2"> +   ARAM transfer complete</a> + </b> + +<div class="p"><!----></div> +asserted when a transfer from/to auxiliary ram has been completed. + +<div class="p"><!----></div> + +<b>6.2.8.3<a name="tth_sEc6.2.8.3"> +   DSP</a> + </b> + +<div class="p"><!----></div> <h4><a name="tth_sEc6.2.9"> 6.2.9</a>  Audio Streaming Interface</h4> <div class="p"><!----></div> -1 Source, check (<tt>0xcc006c00</tt>) for flag +1 Source, check (<tt>0xcc006c00</tt>) for flag. asserted based on the disk streaming +sample counter. <div class="p"><!----></div> <h4><a name="tth_sEc6.2.10"> @@ -12665,6 +12843,23 @@ </ul> <div class="p"><!----></div> + <h4><a name="tth_sEc9.5.3"> +9.5.3</a>  Checksums</h4> + +<div class="p"><!----></div> +<tt>void checksums (unsigned short *buf, unsigned short *c1, unsigned short +*c2)</tt> <br /> +<tt>{</tt> <br /> +<tt>int i;</tt> <br /> +<tt>    *c1 = 0; *c2 = 0;</tt> <br /> +<tt>    for (i = 0;i<4;++i)</tt> <br /> +<tt>    {</tt> <br /> +<tt>        *c1 += buf[12 + i * 2];</tt> <br /> +<tt>        *c2 += (buf[12 + i * 2] 0xFFFF);</tt> <br /> +<tt>    }</tt> <br /> +<tt>}</tt> <br /> + +<div class="p"><!----></div> <h3><a name="tth_sEc9.6"> 9.6</a>  AD16</h3> @@ -16633,7 +16828,7 @@ <li> U.S. Pat. 6,411,301; 6,452,600; 6,466,218 (Graphics system interface) - GX Info</li> <li> U.S. Pat. 6,421,058 (Graphics command stream for calling a display object in a graphics -system) - GX Info</li> +system) - a lot of GX Info</li> <li> U.S. Pat. 6,424,348; 6,456,290; 6,489,963 (Application program interface for a graphics system) - GX Info</li> @@ -16671,6 +16866,10 @@ <li> U.S. Pat. 6,664,958 (Z-Texturing) - GX Info</li> <li> U.S. Pat. 6,664,962 (Shadow mapping in a low cost graphics system) - GX Info</li> + +<li> mx98726 Datasheet</li> + +<li> mx98728 Datasheet</li> </ul> <div class="p"><!----></div> @@ -16719,6 +16918,8 @@ <tr><td align="center"></td><td align="right">gcspec.html</td></tr> +<tr><td align="center"></td><td align="right">additional info in sram checksum, video regs</td></tr> + <tr><td align="center"><b>org </b></td><td align="right"><tt>kvz...@ma...</tt></td></tr> <tr><td align="center"></td><td align="right">additional apploader info / apploader RE</td></tr> @@ -16770,12 +16971,12 @@ <tr><td align="center"></td></tr></table> </center> <div class="p"><!----></div> -<br /><br />moreover, many thanks must go to everyone who helped making this document more consistant +moreover, many thanks must go to everyone who helped making this document more consistant and error free by proofreading and pointing out mistakes, in particular tmbinc, org, hubb, Aaron Kaluszka, Skywalker, Jihad, xor37h, costis, CrowTrobo, mist, ionic ...<br /> <br /> <br /> -<tt><b>EOT</b></tt> +EOT <br /><br /><hr /></iparticle> |
From: <mi...@us...> - 2004-02-06 13:42:31
|
Update of /cvsroot/gc-linux/htdocs/include/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv942/include/en Modified Files: contents.php index.php Log Message: ... Index: contents.php =================================================================== RCS file: /cvsroot/gc-linux/htdocs/include/en/contents.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- contents.php 3 Feb 2004 01:23:36 -0000 1.4 +++ contents.php 6 Feb 2004 13:39:48 -0000 1.5 @@ -57,7 +57,7 @@ <!-- part2--></b></font></td></tr></table></td></tr><tr><td background="/pic/web/box_bg.gif"><table width="100%" border="0"><tr><td><!-- /part2--> <p><a href="/docs/screenshots.html" onMouseOver="tip('screenshots');" onMouseOut="untip();"><b>Screenshots</b></a></p> -<p><a href="/docs/download.html" onMouseOver="tip('download');" onMouseOut="untip();">Download</a></p> +<p><a href="/docs/download.html" onMouseOver="tip('download');" onMouseOut="untip();"><b>Download</b></a></p> <!-- part3--> </td></tr></table></td> Index: index.php =================================================================== RCS file: /cvsroot/gc-linux/htdocs/include/en/index.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- index.php 23 Jan 2004 11:50:39 -0000 1.1.1.1 +++ index.php 6 Feb 2004 13:39:48 -0000 1.2 @@ -23,7 +23,7 @@ • to use a GameCube as a small <b>PowerPC-based server</b><br/> • as a runtime environment for <b>homebrew development</b><br/> -<p>The GameCube Linux Project is currently in its planning phase; there is no Linux for the GameCube yet. But your are welcome to <b>contribute</b>!</p> +<p>The GameCube Linux Project is an early phase, but we already have a small Linux system with Ethernet (telnet and web server). Your are welcome to <b>contribute</b>!</p> </td><td valign=top width="50%"> |
From: <mi...@us...> - 2004-02-06 11:15:37
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2434/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: padded ip with 0s, so that it's easier to hexedit another ip into the zImage.dol image. Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gamecube_defconfig 4 Feb 2004 23:55:42 -0000 1.10 +++ gamecube_defconfig 6 Feb 2004 11:12:52 -0000 1.11 @@ -103,7 +103,7 @@ CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="root=/dev/ram0 video=gamecubefb ip=192.168.0.47" +CONFIG_CMDLINE="root=/dev/ram0 video=gamecubefb ip=192.168.000.047" # # Bus options |
From: <mi...@us...> - 2004-02-05 17:09:46
|
Update of /cvsroot/gc-linux/linux/drivers/input/keyboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1393/drivers/input/keyboard Modified Files: gckbd.c Log Message: fixed problem with multiple keys Index: gckbd.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/keyboard/gckbd.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gckbd.c 4 Feb 2004 19:33:45 -0000 1.1 +++ gckbd.c 5 Feb 2004 17:07:11 -0000 1.2 @@ -1,7 +1,7 @@ /* * Datel/GameCube keyboard driver for Linux */ - + /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,62 @@ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic */ + /* + There are three ways to connect a keyboard to the GameCube: + + * ASCII + The "ASCII" keyboard is the official Nintendo/SEGA keyboard for the + GameCube. It has 80 keys plus an Fn key; some of the keys have + Japanese labelings. It has an LShift and an RShift key, but only a + single Ctrl and Alt key. + The Fn key is internal to the keyboard. It makes the keyboard send + different scancodes if it is pressed, and an Fn keypress alone cannot + be intercepted. + + * Datel + The Datel Keyboard is a British IBM PS/2 keyboard that ships with an + adapter. + + * Tototek Adapter (the Lik-Sang one) + The Tototek adapter converts the IBM PS/2 protocol to the GameCube + SI protocol and also converts the PS/2 scancodes into GameCube + scancodes. The keys that have Japanese labelings on the ASCII + keyboard get mapped to keys like PrintScreen and Pause. + There are some interesting details about the Tototek Adapter: + 1) As there are no GameCube scancodes for RStrg and RAlt, the + adapter sends LStrg and LAlt instead. + 2) There are GameCube scancodes both for LShift (0x54) and RShift + (0x55), but the adapter sends LShift no matter which Shift key + is pressed. + 3) The key right of LShift on non-US keyboards sends no scancode. + 4) The Pause/SysReq key only sends the keycode of 0x37 once, even if + it's pressed down continuously. + 5) The Numpad is completely broken. The GameCube has no scancodes + for the Numpad, so Tototek seems to have tried to map the PS/2 + Numpad scancodes to GameCube scancodes. + The NumLock key sends 0x6A, a scancode that is undefined for the + GameCube. 0-9 and Enter send the scancodes of their counterparts + on the alphanumeric part of the keyboard, regardless of the + status of NumLock, so he Numpad cannot be used as cursor keys. + Numpad-- sends the same as -_, which is okay, but Numpad-+ sends + the same as ;: - this makes sense for the the Japanese ASCII + labeling only. + Numpad-* sends 0x37, the same as Pause/SysReq, but this one + continues sending it. And Numpad-/ sends 0x36, just like + PrintScreen. + 5) All combinations of Pause/SysReq with other keys are possible, + except for these: LStrg or LStrg together with Pause/SysReq + doesn't send anything. This would have been SysReq. + 6) The adapter easily gets confused by two keys for which it + produces the same GameCube scancodes: If you hold down LStrg + and press RStrg, the LStrg scancode will disappear even though + LStrg is srill pressed down. The same is true for Ctrl and Alt. + It would have made sense to add a switch that disables the scancode + conversion completely. Or, as a simple hack in the converter's + firmware, to always send the PS/2 scancode + 0x80 as a second key + if the scancode that is sent is ambiguous. +*/ #include <linux/input.h> #include <linux/module.h> @@ -49,14 +104,122 @@ static unsigned char gckbd_keycode[256] = { - 0, 0, 0, 0, 0, 0,102,107,104,109, 0, 0, 0, 0, 0, 0, - 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, - 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 0, 43, 40, 26, 13, 55, 27, 51, 52, 53, 0, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 87, 88, 1,110,111, 41, + /* 00 */ 0, + /* 01 */ 0, + /* 02 */ 0, + /* 03 */ 0, + /* 04 */ 0, + /* 05 */ 0, + /* 06 */ 102, /* TODO: Home */ + /* 07 */ 107, /* TODO: End */ + /* 08 */ 104, /* TODO: PgUp */ + /* 09 */ 109, /* TODO: PgDn */ + /* 0a */ 0x46, /* ScrollLock */ + /* 0b */ 0, + /* 0c */ 0, + /* 0d */ 0, + /* 0e */ 0, + /* 0f */ 0, + /* 10 */ 30, /* A */ + /* 11 */ 48, /* B */ + /* 12 */ 46, /* C */ + /* 13 */ 32, /* D */ + /* 14 */ 18, /* E */ + /* 15 */ 33, /* F */ + /* 16 */ 34, /* G */ + /* 17 */ 35, /* H */ + /* 18 */ 23, /* I */ + /* 19 */ 36, /* J */ + /* 1a */ 37, /* K */ + /* 1b */ 38, /* L */ + /* 1c */ 50, /* M */ + /* 1d */ 49, /* N */ + /* 1e */ 24, /* O */ + /* 1f */ 25, /* P */ + /* 20 */ 16, /* Q */ + /* 21 */ 19, /* R */ + /* 22 */ 31, /* S */ + /* 23 */ 20, /* T */ + /* 24 */ 22, /* U */ + /* 25 */ 47, /* V */ + /* 26 */ 17, /* W */ + /* 27 */ 45, /* X */ + /* 28 */ 21, /* Y */ + /* 29 */ 44, /* Z */ + /* 2a */ 0x02, /* 1 */ + /* 2b */ 0x03, /* 2 */ + /* 2c */ 0x04, /* 3 */ + /* 2d */ 0x05, /* 4 */ + /* 2e */ 0x06, /* 5 */ + /* 2f */ 0x07, /* 6 */ + /* 30 */ 0x08, /* 7 */ + /* 31 */ 0x09, /* 8 */ + /* 32 */ 0x0a, /* 9 */ + /* 33 */ 0x0b, /* 0 */ + /* 34 */ 0x0c, /* -_ (or Numpad--) */ + /* 35 */ 0x0d, /* =+ */ + /* 36 */ 43, /* TODO: is either PrintScreen or Numpad-/ */ + /* 37 */ 40, /* TODO: is either Pause/SysReq or Numpad-* */ + /* 38 */ 0x1a, /* [{ */ + /* 39 */ 0x27, /* ;: (or Numpad-+) */ + /* 3a */ 0x28, /* '" */ + /* 3b */ 0x1b, /* ]} */ + /* 3c */ 0x33, /* ,< */ + /* 3d */ 0x34, /* .> (or Numpad-,) */ + /* 3e */ 0x35, /* /? */ + /* 3f */ 0x2b, /* \| */ + /* 40 */ 0x3b, /* F1 */ + /* 41 */ 0x3c, /* F2 */ + /* 42 */ 0x3d, /* F3 */ + /* 43 */ 0x3e, /* F4 */ + /* 44 */ 0x3f, /* F5 */ + /* 45 */ 0x40, /* F6 */ + /* 46 */ 0x41, /* F7 */ + /* 47 */ 0x42, /* F8 */ + /* 48 */ 0x43, /* F9 */ + /* 49 */ 0x44, /* F10 */ + /* 4a */ 0x57, /* F11 */ + /* 4b */ 0x58, /* F12 */ + /* 4c */ 0x01, /* ESC */ + /* 4d */ 0x6e, /* TODO: Ins */ + /* 4e */ 0x6f, /* TODO: Del */ + /* 4f */ 0x29, /* `~ */ // FIXME: 0x58 = winkey1, 0x5B = winkey2 0x5B = winkey3? - 14, 15, 0, 58, 42, 54, 29, 56, 0, 57, 0, 0,105,108,103,106, - 0, 28, 0, 0, 39, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 50 */ 0x0e, /* Backspace */ + /* 51 */ 0x0f, /* Tab */ + /* 52 */ 0, + /* 53 */ 0x3a, /* CapsLock */ + /* 54 */ 0x2a, /* LShift - Tototek adapter send this code for + LShift and RShift */ + /* 55 */ 54, + /* 56 */ 0x1d, /* LCtrl - Tototek adapter sends this code for + LCtrl and RCtrl */ + /* 57 */ 0x38, /* LAlt - Tototek adapter sends this code for + LAlt and RAlt */ + /* 58 */ 0, /* TODO: LWin */ + /* 59 */ 0x39, /* Space */ + /* 5a */ 0, /* TODO: RWin */ + /* 5b */ 0, /* TODO: Menu */ + /* 5c */ 105, /* TODO: Left */ + /* 5d */ 108, /* TODO: Down */ + /* 5e */ 103, /* TODO: Up */ + /* 5f */ 106, /* TODO: Right */ + /* 60 */ 0, + /* 61 */ 28, + /* 62 */ 0, + /* 63 */ 0, + /* 64 */ 39, + /* 65 */ 78, + /* 66 */ 0, + /* 67 */ 0, + /* 68 */ 0, + /* 69 */ 0, + /* 6a */ 0x45, /* NumLock */ + /* 6b */ 0, + /* 6c */ 0, + /* 6d */ 0, + /* 6e */ 0, + /* 6f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -89,31 +252,92 @@ key2 = (*kbd->portRegister >> 16) & 0xFF; key3 = (*kbd->portRegister >> 8) & 0xFF; +// printk("-%x %x %x - %x %x %x-\n", key1, key2, key3, kbd->pressedKeys[0], +// kbd->pressedKeys[1], kbd->pressedKeys[2]); +#if 0 // report released keys for (i = 0; i < 3; i++) { - if (kbd->pressedKeys[i] && kbd->pressedKeys[i] != key1 && kbd->pressedKeys[i] != key2 && kbd->pressedKeys[i] != key3) + if (kbd->pressedKeys[i] && kbd->pressedKeys[i] != key1 && kbd->pressedKeys[i] != key2 && kbd->pressedKeys[i] != key3) { + printk("released: %x\n", kbd->pressedKeys[i]); input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[i]], 0); + } } +#endif + if (kbd->pressedKeys[0]) { + if ((kbd->pressedKeys[0]) != key1 && + (kbd->pressedKeys[0]) != key2 && + (kbd->pressedKeys[0]) != key3) { +// printk("released1: %x\n", kbd->pressedKeys[0]); + input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[0]], 0); + } + } + if (kbd->pressedKeys[1]) { + if ((kbd->pressedKeys[1]) != key1 && + (kbd->pressedKeys[1]) != key2 && + (kbd->pressedKeys[1]) != key3) { +// printk("released2: %x\n", kbd->pressedKeys[1]); + input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[1]], 0); + } + } + if (kbd->pressedKeys[2]) { + if ((kbd->pressedKeys[2]) != key1 && + (kbd->pressedKeys[2]) != key2 && + (kbd->pressedKeys[2]) != key3) { +// printk("released3: %x\n", kbd->pressedKeys[2]); + input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[2]], 0); + } + } - +#if 0 // check if we should report anything - if (key1 && gckbd_keycode[key1]) + if (key1 && gckbd_keycode[key1]) { + printk("pressed1: %x\n", key1); input_report_key (&kbd->dev, gckbd_keycode[key1], 1); - if (key2 && gckbd_keycode[key2]) + } + if (key2 && gckbd_keycode[key2]) { + printk("pressed2: %x\n", key2); input_report_key (&kbd->dev, gckbd_keycode[key2], 1); - if (key3 && gckbd_keycode[key3]) + } + if (key3 && gckbd_keycode[key3]) { + printk("pressed3: %x\n", key3); input_report_key (&kbd->dev, gckbd_keycode[key3], 1); + } +#endif + if (key1) { + if ((key1 != kbd->pressedKeys[0]) && + (key1 != kbd->pressedKeys[1]) && + (key1 != kbd->pressedKeys[2])) { +// printk("pressed1: %x\n", key1); + input_report_key (&kbd->dev, gckbd_keycode[key1], 1); + } + } + if (key2) { + if ((key2 != kbd->pressedKeys[0]) && + (key2 != kbd->pressedKeys[1]) && + (key2 != kbd->pressedKeys[2])) { +// printk("pressed2: %x\n", key1); + input_report_key (&kbd->dev, gckbd_keycode[key2], 1); + } + } + if (key3) { + if ((key3 != kbd->pressedKeys[0]) && + (key3 != kbd->pressedKeys[1]) && + (key3 != kbd->pressedKeys[2])) { +// printk("pressed3: %x\n", key1); + input_report_key (&kbd->dev, gckbd_keycode[key3], 1); + } + } input_sync (&kbd->dev); // keep state of pressed keys kbd->pressedKeys[0] = key1; - kbd->pressedKeys[1] = key1; - kbd->pressedKeys[2] = key1; + kbd->pressedKeys[1] = key2; + kbd->pressedKeys[2] = key3; mod_timer (&kbd->timer, jiffies + HZ/50); |
From: <mi...@us...> - 2004-02-05 13:47:51
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14703/drivers/video Modified Files: gamecubefb.c Log Message: groepaz' modifications to color space conversion Index: gamecubefb.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/gamecubefb.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gamecubefb.c 3 Feb 2004 03:10:48 -0000 1.7 +++ gamecubefb.c 5 Feb 2004 13:45:17 -0000 1.8 @@ -107,6 +107,7 @@ #define Crd 8388608 // 128.0 #define Cre 32768 // 0.5 +#if 0 unsigned long GC_Video_RGBToYCbCrFixed (unsigned char r, unsigned char g, unsigned char b) { unsigned long Y, Cb, Cr; @@ -115,6 +116,7 @@ Cb = ((Cba * r) + (Cbb * g) + (Cbc * b) + Cbd + Cre) >> 16; Cr = ((Cra * r) + (Crb * g) + (Crc * b) + Crd + Cre) >> 16; + // clamping isnt really needed Y = CLAMP(Y , 16, 235); Cb = CLAMP(Cb, 16, 240); Cr = CLAMP(Cr, 16, 240); @@ -147,6 +149,53 @@ // (((pa & 0x00FF0000) + (pb & 0x00FF0000)) >> 1) | // (((pa & 0x000000FF) + (pb & 0x000000FF)) >> 1), address); } +#endif + +/* + + this one is a bit cleaner ... still some potential for optimizations left + +*/ + +void gamecubefb_writel(register unsigned long color, register int *address) +{ + register unsigned char r1, g1, b1; + register unsigned char r2, g2, b2; + register unsigned char r, g, b; + register unsigned char Y1, Cb, Y2, Cr; + + // mmh...arent we are loosing a bit much precision here? maybe + // a 5:6:5 format would be better ? + r1 = ((color >> 27) & 31) << 3; + g1 = ((color >> 22) & 31) << 3; + b1 = ((color >> 17) & 31) << 3; + + r2 = ((color >> 11) & 31) << 3; + g2 = ((color >> 6) & 31) << 3; + b2 = ((color >> 1) & 31) << 3; + + r=(((int)r1)+((int)r2))>>1; + g=(((int)g1)+((int)g2))>>1; + b=(((int)b1)+((int)b2))>>1; + + Y1 = (((Ya * r1) + (Yb * g1) + (Yc * b1) + Yd + Ye) >> 16); + Y2 = (((Ya * r2) + (Yb * g2) + (Yc * b2) + Yd + Ye) >> 16); + + Cb = (((Cba * r) + (Cbb * g) + (Cbc * b) + Cbd + Cre) >> 16); + Cr = (((Cra * r) + (Crb * g) + (Crc * b) + Crd + Cre) >> 16); + + // clamping isnt really needed, so we omit it... previous calculations + // should be adjusted so we dont get out-of-gamut values +/* + Y1 = CLAMP(Y , 16, 235); + Y2 = CLAMP(Y , 16, 235); + Cb = CLAMP(Cb, 16, 240); + Cr = CLAMP(Cr, 16, 240); +*/ + fb_writel_real(((((int)Y1)<<24)|(((int)Cb)<<16)|(((int)Y2)<<8)|(((int)Cr)<<0)),address); + +} + /* --------------------------------------------------------------------- */ @@ -363,8 +412,14 @@ for(i=0; i<32; i++) { gamecube_video[i] = VIDEO_Mode[i]; } - gamecube_video[7] = 0x10000000 | (gamecubefb_fix.smem_start>>5); - gamecube_video[9] = 0x10000000 | ((gamecubefb_fix.smem_start+gamecubefb_fix.line_length)>>5); + + gamecube_video[7] = 0x10000000 | (gamecubefb_fix.smem_start>>5); + + // setting both fields to same source means half the resolution, but + // reduces flickering a lot ...mmmh maybe worth a try as a last resort :/ + // gamecube_video[9] = 0x10000000 | (gamecubefb_fix.smem_start>>5); + + gamecube_video[9] = 0x10000000 | ((gamecubefb_fix.smem_start+gamecubefb_fix.line_length)>>5); printk(KERN_INFO "fb%d: %s frame buffer device\n", fb_info.node, fb_info.fix.id); |
From: <mi...@us...> - 2004-02-05 12:35:59
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31254/arch/ppc/platforms Modified Files: gamecube.c Log Message: fixed timer speed. the linux internal RTC is now correct. Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gamecube.c 2 Feb 2004 23:22:47 -0000 1.9 +++ gamecube.c 5 Feb 2004 12:33:11 -0000 1.10 @@ -130,7 +130,7 @@ void __init gamecube_calibrate_decr(void) { int freq, divisor; - freq = 162000000 / 2; + freq = 162000000; divisor = 4; tb_ticks_per_jiffy = freq / HZ / divisor; tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); |
From: <mi...@us...> - 2004-02-04 23:58:10
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32486/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: enabled the sound driver Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gamecube_defconfig 4 Feb 2004 19:46:03 -0000 1.9 +++ gamecube_defconfig 4 Feb 2004 23:55:42 -0000 1.10 @@ -672,7 +672,68 @@ # # Sound # -# CONFIG_SOUND is not set +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=y +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +# CONFIG_SND_MIXER_OSS is not set +CONFIG_SND_PCM_OSS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# PCI devices +# +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VX222 is not set + +# +# ALSA PPC devices +# +# CONFIG_SND_POWERMAC is not set +CONFIG_SND_GAMECUBE=y + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set # # USB support |
From: <mi...@us...> - 2004-02-04 23:55:53
|
Update of /cvsroot/gc-linux/linux/sound/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31787/sound/ppc Added Files: Kconfig Makefile gamecube.c Log Message: sound driver by kirin. Needs SND_OSSEMUL and SND_PCM_OSS to compile properly. so far just loops noise. --- NEW FILE: Kconfig --- # ALSA PowerMac drivers menu "ALSA PPC devices" depends on SND!=n && PPC config SND_POWERMAC tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)" depends on SND config SND_GAMECUBE tristate "GameCube audio" depends on SND help Say 'Y' or 'M' to include support for non-working looping random noise. endmenu --- NEW FILE: Makefile --- # # Makefile for ALSA # Copyright (c) 2001 by Jaroslav Kysela <pe...@su...> # snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o snd-gamecube-objs := gamecube.o # Toplevel Module Dependency obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o obj-$(CONFIG_SND_GAMECUBE) += snd-gamecube.o --- NEW FILE: gamecube.c --- #include <sound/driver.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/module.h> #include <linux/kernel.h> #include <sound/core.h> #include <sound/pcm.h> #define SNDRV_GET_ID #include <sound/initval.h> #define DSP_IRQ 6 #if 0 #include <asm/io.h> #define AUDIO_DSP_CONTROL (iobase + 0x0a) #define AUDIO_IRQ_CAUSE (iobase + 0x10) #define AUDIO_DMA_STARTH (iobase + 0x30) #define AUDIO_DMA_STARTL (iobase + 0x32) #define AUDIO_DMA_LENGTH (iobase + 0x36) #define AUDIO_DMA_LEFT (iobase + 0x3a) #define AUDIO_INTERFACE_ADDR 0xCC005000 #endif #define AUDIO_DSP_CONTROL *(volatile u_int16_t *)(0xCC00500a) #define AUDIO_IRQ_CAUSE *(volatile u_int16_t *)(0xCC005010) /* from CrowTRobo's audio demo */ #define AUDIO_DMA_STARTH *(volatile u_int16_t *)(0xCC005030) #define AUDIO_DMA_STARTL *(volatile u_int16_t *)(0xCC005032) #define AUDIO_DMA_LENGTH *(volatile u_int16_t *)(0xCC005036) #define AUDIO_DMA_LEFT *(volatile u_int16_t *)(0xCC00503a) #define AUDIO_STREAM_STATUS *(volatile u_int32_t *)(0xCC006C00) #define LoadSample(addr, len) AUDIO_DMA_STARTH = addr >> 16; \ AUDIO_DMA_STARTL = addr & 0xffff; \ AUDIO_DMA_LENGTH = (AUDIO_DMA_LENGTH & 0x8000) | (len >> 5) #define StartSample() AUDIO_DMA_LENGTH |= 0x8000 #define StopSample() AUDIO_DMA_LENGTH &= 0x7fff #define SetFreq32KHz() AUDIO_STREAM_STATUS |= 0x40 #define SetFreq48KHz() AUDIO_STREAM_STATUS &= 0xffffffbf MODULE_AUTHOR("me!"); MODULE_DESCRIPTION("GameCube sound stuff"); MODULE_LICENSE("GPL"); #define chip_t gamecube_t static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ static unsigned long iobase; typedef struct snd_gamecube { snd_card_t *card; snd_pcm_t *pcm; snd_pcm_substream_t *playback_substream; snd_pcm_substream_t *capture_substream; spinlock_t reg_lock; int irq; } gamecube_t; static gamecube_t *gamecube_audio = NULL; static snd_pcm_hardware_t snd_gamecube_playback = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID), .formats = /* SNDRV_PCM_FMTBIT_S16_LE,*/ SNDRV_PCM_FMTBIT_S16 /*| SNDRV_PCM_FMTBIT_IMA_ADPCM*/, .rates = SNDRV_PCM_RATE_8000_48000, .rate_min = 8000, .rate_max = 48000, .channels_min = 2, .channels_max = 2, .buffer_bytes_max = 32768, .period_bytes_min = 4096, .period_bytes_max = 32768, .periods_min = 1, .periods_max = 1024, }; static int snd_gamecube_open(snd_pcm_substream_t *substream) { gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; printk(KERN_ALERT "pcm open\n"); chip->playback_substream = substream; runtime->hw = snd_gamecube_playback; return 0; } static int snd_gamecube_close(snd_pcm_substream_t * substream) { gamecube_t *chip = snd_pcm_substream_chip(substream); printk(KERN_ALERT "pcm close\n"); chip->playback_substream = NULL; return 0; } static int snd_gamecube_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) { printk(KERN_ALERT "snd_gamecube_hw_params\n"); return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); } static int snd_gamecube_hw_free(snd_pcm_substream_t * substream) { printk(KERN_ALERT "snd_gamecube_hw_free\n"); return snd_pcm_lib_free_pages(substream); } static int snd_gamecube_prepare(snd_pcm_substream_t * substream) { gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; /* printk(KERN_ALERT "snd_gamecube_prepare\n"); */ printk("prepare: rate=%i, channels=%i, sample_bits=%i\n", runtime->rate, runtime->channels, runtime->sample_bits); #if 0 /* set requested samplerate */ sa11xx_uda1341_set_samplerate(chip, runtime->rate); /* set requestd format when available */ /* set FMT here !!! FIXME */ s->period = 0; s->periods = 0; #endif return 0; } /* #include "notify.h" */ static int snd_gamecube_trigger(snd_pcm_substream_t * substream, int cmd) { gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; /* printk(KERN_ALERT "snd_gamecube_trigger\n"); */ switch (cmd) { case SNDRV_PCM_TRIGGER_START: /* do something to start the PCM engine */ printk(KERN_ALERT "PCM_TRIGGER_START\n"); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { unsigned int i, dma_size, period_size; dma_size = snd_pcm_lib_buffer_bytes(substream); period_size = snd_pcm_lib_period_bytes(substream); /* printk(KERN_ALERT "stream is PCM_PLAYBACK, dma_area=0x%p dma_size=%i\n", runtime->dma_area, dma_size); printk(KERN_ALERT "period_size=%i\n", period_size); */ /* for (i = 0; i < 10; i++) printk("0x%.4x ", ((u_int16_t *) runtime->dma_area)[i]); */ printk("\n"); /* for (i = 0; i < dma_size; i++) runtime->dma_area[i] = notify[i]; */ /* LoadSample((u_int32_t) notify, dma_size); */ LoadSample((u_int32_t) runtime->dma_area, dma_size); printk("STARTH=%x, STARTL=%x, LENGTH=%x, LEFT=%x\n", AUDIO_DMA_STARTH, AUDIO_DMA_STARTL, AUDIO_DMA_LENGTH, AUDIO_DMA_LEFT); StartSample(); printk("STARTH=%x, STARTL=%x, LENGTH=%x, LEFT=%x\n", AUDIO_DMA_STARTH, AUDIO_DMA_STARTL, AUDIO_DMA_LENGTH, AUDIO_DMA_LEFT); } break; case SNDRV_PCM_TRIGGER_STOP: /* do something to stop the PCM engine */ printk(KERN_ALERT "PCM_TRIGGER_STOP\n"); StopSample(); break; default: return -EINVAL; } return 0; } static snd_pcm_uframes_t snd_gamecube_pointer(snd_pcm_substream_t * substream) { gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; int left, bytes; /* printk(KERN_ALERT "snd_gamecube_pointer\n"); */ left = AUDIO_DMA_LEFT << 5; bytes = snd_pcm_lib_buffer_bytes(substream); printk(KERN_ALERT "pointer: %i of %i bytes left\n", left, bytes); /* underrun all the time? */ return bytes_to_frames(runtime, bytes - left); } static irqreturn_t snd_gamecube_interrupt(int irq, void *dev, struct pt_regs *regs) { gamecube_t *chip = (gamecube_t *) dev; unsigned long val = AUDIO_DSP_CONTROL; if (val & 0x100) { AUDIO_DSP_CONTROL = (val | 0x100); printk("DSP interrupt!\n"); snd_pcm_period_elapsed(chip->playback_substream); } return IRQ_HANDLED; } static snd_pcm_ops_t snd_gamecube_playback_ops = { .open = snd_gamecube_open, .close = snd_gamecube_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_gamecube_hw_params, .hw_free = snd_gamecube_hw_free, .prepare = snd_gamecube_prepare, .trigger = snd_gamecube_trigger, .pointer = snd_gamecube_pointer, }; static snd_pcm_ops_t snd_gamecube_capture_ops = { /* .open = snd_card_sa11xx_uda1341_open, .close = snd_card_sa11xx_uda1341_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_sa11xx_uda1341_hw_params, .hw_free = snd_sa11xx_uda1341_hw_free, .prepare = snd_sa11xx_uda1341_prepare, .trigger = snd_sa11xx_uda1341_trigger, .pointer = snd_sa11xx_uda1341_pointer,*/ }; static int __devinit snd_gamecube_new_pcm(gamecube_t *chip) { snd_pcm_t *pcm; int err; if ((err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm)) < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_gamecube_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_gamecube_capture_ops); /* preallocate 64k buffer */ snd_pcm_lib_preallocate_pages_for_all(pcm, 64 * 1024, 64 * 1024, GFP_KERNEL); pcm->info_flags = 0; pcm->private_data = chip; strcpy(pcm->name, chip->card->shortname); chip->pcm = pcm; return 0; } static int __init alsa_card_gamecube_init(void) { int err; snd_card_t *card; /* if (!is_gamecube()) return -ENODEV; */ /* register the soundcard */ card = snd_card_new(index, id, THIS_MODULE, sizeof(gamecube_t)); if (card == NULL) return -ENOMEM; gamecube_audio = (gamecube_t *)card->private_data; if (gamecube_audio == NULL) return -ENOMEM; gamecube_audio->card = card; strcpy(card->driver, "GAMECUBE"); strcpy(card->shortname, "GameCube audio"); sprintf(card->longname, "GameCube audio"); if (request_irq(DSP_IRQ, snd_gamecube_interrupt, 0, card->shortname, gamecube_audio)) { snd_printk(KERN_ERR "%s: unable to grab IRQ %d\n", card->shortname, DSP_IRQ); return -EBUSY; } #if 0 if (request_region(AUDIO_INTERFACE_ADDR, 0x200, card->shortname) == NULL) { printk("unable to grab memory region 0x%lx-0x%lx\n", AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); return -EBUSY; } if ((iobase = (unsigned long) ioremap(AUDIO_INTERFACE_ADDR, 0x200)) == 0) { printk("unable to remap memory region 0x%lx-0x%lx\n", AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); return -ENOMEM; } printk("iobase=0x%lx\n", iobase); #endif #if 0 /* mixer */ if ((err = snd_gamecube_mixer_new(gamecube_audio)) < 0) goto fail; #endif /* PCM */ if ((err = snd_gamecube_new_pcm(gamecube_audio)) < 0) goto fail; if ((err = snd_card_register(card)) == 0) { printk( KERN_INFO "GameCube audio support initialized\n" ); return 0; } fail: snd_card_free(card); return err; } static void __exit alsa_card_gamecube_exit(void) { printk(KERN_ALERT "Goodbye, cruel world\n"); free_irq(DSP_IRQ, (void*) 0); snd_card_free(gamecube_audio->card); } module_init(alsa_card_gamecube_init) module_exit(alsa_card_gamecube_exit) |
From: <mi...@us...> - 2004-02-04 23:55:53
|
Update of /cvsroot/gc-linux/linux/include/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31787/include/sound Added Files: asound.h Log Message: sound driver by kirin. Needs SND_OSSEMUL and SND_PCM_OSS to compile properly. so far just loops noise. --- NEW FILE: asound.h --- /* * Advanced Linux Sound Architecture - ALSA - Driver * Copyright (c) 1994-2003 by Jaroslav Kysela <pe...@su...>, * Abramo Bagnara <ab...@al...> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef __SOUND_ASOUND_H #define __SOUND_ASOUND_H /* #if defined(LINUX) || defined(__LINUX__) || defined(__linux__) */ #if 1 #include <linux/ioctl.h> #ifdef __KERNEL__ #include <linux/types.h> #include <linux/time.h> #include <asm/byteorder.h> #if __LITTLE_ENDIAN == 1234 #define SNDRV_LITTLE_ENDIAN #elif __BIG_ENDIAN == 4321 #define SNDRV_BIG_ENDIAN #else #error "Unsupported endian..." #endif #else /* !__KERNEL__ */ #include <endian.h> #if __BYTE_ORDER == __LITTLE_ENDIAN #define SNDRV_LITTLE_ENDIAN #elif __BYTE_ORDER == __BIG_ENDIAN #define SNDRV_BIG_ENDIAN #else #error "Unsupported endian..." #endif #endif /* __KERNEL **/ #endif /* LINUX */ #ifndef __KERNEL__ #include <sys/time.h> #include <sys/types.h> #endif /* * protocol version */ #define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor)) #define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff) #define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff) #define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff) #define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \ (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \ (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \ SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion))) /**************************************************************************** * * * Digital audio interface * * * ****************************************************************************/ struct sndrv_aes_iec958 { unsigned char status[24]; /* AES/IEC958 channel status bits */ unsigned char subcode[147]; /* AES/IEC958 subcode bits */ unsigned char pad; /* nothing */ unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ }; /**************************************************************************** * * * Section for driver hardware dependent interface - /dev/snd/hw? * * * ****************************************************************************/ #define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) enum sndrv_hwdep_iface { SNDRV_HWDEP_IFACE_OPL2 = 0, SNDRV_HWDEP_IFACE_OPL3, SNDRV_HWDEP_IFACE_OPL4, SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */ SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */ SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */ SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */ SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ /* Don't forget to change the following: */ SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_USX2Y, }; struct sndrv_hwdep_info { unsigned int device; /* WR: device number */ int card; /* R: card number */ unsigned char id[64]; /* ID (user selectable) */ unsigned char name[80]; /* hwdep name */ enum sndrv_hwdep_iface iface; /* hwdep interface */ unsigned char reserved[64]; /* reserved for future */ }; /* generic DSP loader */ struct sndrv_hwdep_dsp_status { unsigned int version; /* R: driver-specific version */ unsigned char id[32]; /* R: driver-specific ID string */ unsigned int num_dsps; /* R: number of DSP images to transfer */ unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */ unsigned int chip_ready; /* R: 1 = initialization finished */ unsigned char reserved[16]; /* reserved for future use */ }; struct sndrv_hwdep_dsp_image { unsigned int index; /* W: DSP index */ unsigned char name[64]; /* W: ID (e.g. file name) */ unsigned char *image; /* W: binary image */ size_t length; /* W: size of image in bytes */ unsigned long driver_data; /* W: driver-specific data */ }; enum { SNDRV_HWDEP_IOCTL_PVERSION = _IOR ('H', 0x00, int), SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct sndrv_hwdep_info), SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct sndrv_hwdep_dsp_status), SNDRV_HWDEP_IOCTL_DSP_LOAD = _IOW('H', 0x03, struct sndrv_hwdep_dsp_image) }; /***************************************************************************** * * * Digital Audio (PCM) interface - /dev/snd/pcm?? * * * *****************************************************************************/ #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5) typedef unsigned long sndrv_pcm_uframes_t; typedef long sndrv_pcm_sframes_t; enum sndrv_pcm_class { SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */ SNDRV_PCM_CLASS_MULTI, /* multichannel device */ SNDRV_PCM_CLASS_MODEM, /* software modem class */ SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */ /* Don't forget to change the following: */ SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER, }; enum sndrv_pcm_subclass { SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */ SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */ /* Don't forget to change the following: */ SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX, }; enum sndrv_pcm_stream { SNDRV_PCM_STREAM_PLAYBACK = 0, SNDRV_PCM_STREAM_CAPTURE, SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE, }; enum sndrv_pcm_access { SNDRV_PCM_ACCESS_MMAP_INTERLEAVED = 0, /* interleaved mmap */ SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED, /* noninterleaved mmap */ SNDRV_PCM_ACCESS_MMAP_COMPLEX, /* complex mmap */ SNDRV_PCM_ACCESS_RW_INTERLEAVED, /* readi/writei */ SNDRV_PCM_ACCESS_RW_NONINTERLEAVED, /* readn/writen */ SNDRV_PCM_ACCESS_LAST = SNDRV_PCM_ACCESS_RW_NONINTERLEAVED, }; enum sndrv_pcm_format { SNDRV_PCM_FORMAT_S8 = 0, SNDRV_PCM_FORMAT_U8, SNDRV_PCM_FORMAT_S16_LE, SNDRV_PCM_FORMAT_S16_BE, SNDRV_PCM_FORMAT_U16_LE, SNDRV_PCM_FORMAT_U16_BE, SNDRV_PCM_FORMAT_S24_LE, /* low three bytes */ SNDRV_PCM_FORMAT_S24_BE, /* low three bytes */ SNDRV_PCM_FORMAT_U24_LE, /* low three bytes */ SNDRV_PCM_FORMAT_U24_BE, /* low three bytes */ SNDRV_PCM_FORMAT_S32_LE, SNDRV_PCM_FORMAT_S32_BE, SNDRV_PCM_FORMAT_U32_LE, SNDRV_PCM_FORMAT_U32_BE, SNDRV_PCM_FORMAT_FLOAT_LE, /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ SNDRV_PCM_FORMAT_FLOAT_BE, /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ SNDRV_PCM_FORMAT_FLOAT64_LE, /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ SNDRV_PCM_FORMAT_FLOAT64_BE, /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE, /* IEC-958 subframe, Little Endian */ SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE, /* IEC-958 subframe, Big Endian */ SNDRV_PCM_FORMAT_MU_LAW, SNDRV_PCM_FORMAT_A_LAW, SNDRV_PCM_FORMAT_IMA_ADPCM, SNDRV_PCM_FORMAT_MPEG, SNDRV_PCM_FORMAT_GSM, SNDRV_PCM_FORMAT_SPECIAL = 31, SNDRV_PCM_FORMAT_S24_3LE = 32, /* in three bytes */ SNDRV_PCM_FORMAT_S24_3BE, /* in three bytes */ SNDRV_PCM_FORMAT_U24_3LE, /* in three bytes */ SNDRV_PCM_FORMAT_U24_3BE, /* in three bytes */ SNDRV_PCM_FORMAT_S20_3LE, /* in three bytes */ SNDRV_PCM_FORMAT_S20_3BE, /* in three bytes */ SNDRV_PCM_FORMAT_U20_3LE, /* in three bytes */ SNDRV_PCM_FORMAT_U20_3BE, /* in three bytes */ SNDRV_PCM_FORMAT_S18_3LE, /* in three bytes */ SNDRV_PCM_FORMAT_S18_3BE, /* in three bytes */ SNDRV_PCM_FORMAT_U18_3LE, /* in three bytes */ SNDRV_PCM_FORMAT_U18_3BE, /* in three bytes */ SNDRV_PCM_FORMAT_LAST = SNDRV_PCM_FORMAT_U18_3BE, #ifdef SNDRV_LITTLE_ENDIAN SNDRV_PCM_FORMAT_S16 = SNDRV_PCM_FORMAT_S16_LE, SNDRV_PCM_FORMAT_U16 = SNDRV_PCM_FORMAT_U16_LE, SNDRV_PCM_FORMAT_S24 = SNDRV_PCM_FORMAT_S24_LE, SNDRV_PCM_FORMAT_U24 = SNDRV_PCM_FORMAT_U24_LE, SNDRV_PCM_FORMAT_S32 = SNDRV_PCM_FORMAT_S32_LE, SNDRV_PCM_FORMAT_U32 = SNDRV_PCM_FORMAT_U32_LE, SNDRV_PCM_FORMAT_FLOAT = SNDRV_PCM_FORMAT_FLOAT_LE, SNDRV_PCM_FORMAT_FLOAT64 = SNDRV_PCM_FORMAT_FLOAT64_LE, SNDRV_PCM_FORMAT_IEC958_SUBFRAME = SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE, #endif #ifdef SNDRV_BIG_ENDIAN SNDRV_PCM_FORMAT_S16 = SNDRV_PCM_FORMAT_S16_BE, SNDRV_PCM_FORMAT_U16 = SNDRV_PCM_FORMAT_U16_BE, SNDRV_PCM_FORMAT_S24 = SNDRV_PCM_FORMAT_S24_BE, SNDRV_PCM_FORMAT_U24 = SNDRV_PCM_FORMAT_U24_BE, SNDRV_PCM_FORMAT_S32 = SNDRV_PCM_FORMAT_S32_BE, SNDRV_PCM_FORMAT_U32 = SNDRV_PCM_FORMAT_U32_BE, SNDRV_PCM_FORMAT_FLOAT = SNDRV_PCM_FORMAT_FLOAT_BE, SNDRV_PCM_FORMAT_FLOAT64 = SNDRV_PCM_FORMAT_FLOAT64_BE, SNDRV_PCM_FORMAT_IEC958_SUBFRAME = SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE, #endif }; enum sndrv_pcm_subformat { SNDRV_PCM_SUBFORMAT_STD = 0, SNDRV_PCM_SUBFORMAT_LAST = SNDRV_PCM_SUBFORMAT_STD, }; #define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ #define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ #define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */ #define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ #define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ #define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */ #define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */ #define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */ #define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */ #define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */ #define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */ #define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ #define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ #define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ enum sndrv_pcm_state { SNDRV_PCM_STATE_OPEN = 0, /* stream is open */ SNDRV_PCM_STATE_SETUP, /* stream has a setup */ SNDRV_PCM_STATE_PREPARED, /* stream is ready to start */ SNDRV_PCM_STATE_RUNNING, /* stream is running */ SNDRV_PCM_STATE_XRUN, /* stream reached an xrun */ SNDRV_PCM_STATE_DRAINING, /* stream is draining */ SNDRV_PCM_STATE_PAUSED, /* stream is paused */ SNDRV_PCM_STATE_SUSPENDED, /* hardware is suspended */ SNDRV_PCM_STATE_LAST = SNDRV_PCM_STATE_SUSPENDED, }; enum { SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000, SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000, SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000, }; union sndrv_pcm_sync_id { unsigned char id[16]; unsigned short id16[8]; unsigned int id32[4]; }; struct sndrv_pcm_info { unsigned int device; /* RO/WR (control): device number */ unsigned int subdevice; /* RO/WR (control): subdevice number */ enum sndrv_pcm_stream stream; /* RO/WR (control): stream number */ int card; /* R: card number */ unsigned char id[64]; /* ID (user selectable) */ unsigned char name[80]; /* name of this device */ unsigned char subname[32]; /* subdevice name */ enum sndrv_pcm_class dev_class; /* SNDRV_PCM_CLASS_* */ enum sndrv_pcm_subclass dev_subclass; /* SNDRV_PCM_SUBCLASS_* */ unsigned int subdevices_count; unsigned int subdevices_avail; union sndrv_pcm_sync_id sync; /* hardware synchronization ID */ unsigned char reserved[64]; /* reserved for future... */ }; enum sndrv_pcm_hw_param { SNDRV_PCM_HW_PARAM_ACCESS = 0, /* Access type */ SNDRV_PCM_HW_PARAM_FIRST_MASK = SNDRV_PCM_HW_PARAM_ACCESS, SNDRV_PCM_HW_PARAM_FORMAT, /* Format */ SNDRV_PCM_HW_PARAM_SUBFORMAT, /* Subformat */ SNDRV_PCM_HW_PARAM_LAST_MASK = SNDRV_PCM_HW_PARAM_SUBFORMAT, SNDRV_PCM_HW_PARAM_SAMPLE_BITS = 8, /* Bits per sample */ SNDRV_PCM_HW_PARAM_FIRST_INTERVAL = SNDRV_PCM_HW_PARAM_SAMPLE_BITS, SNDRV_PCM_HW_PARAM_FRAME_BITS, /* Bits per frame */ SNDRV_PCM_HW_PARAM_CHANNELS, /* Channels */ SNDRV_PCM_HW_PARAM_RATE, /* Approx rate */ SNDRV_PCM_HW_PARAM_PERIOD_TIME, /* Approx distance between interrupts in us */ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, /* Approx frames between interrupts */ SNDRV_PCM_HW_PARAM_PERIOD_BYTES, /* Approx bytes between interrupts */ SNDRV_PCM_HW_PARAM_PERIODS, /* Approx interrupts per buffer */ SNDRV_PCM_HW_PARAM_BUFFER_TIME, /* Approx duration of buffer in us */ SNDRV_PCM_HW_PARAM_BUFFER_SIZE, /* Size of buffer in frames */ SNDRV_PCM_HW_PARAM_BUFFER_BYTES, /* Size of buffer in bytes */ SNDRV_PCM_HW_PARAM_TICK_TIME, /* Approx tick duration in us */ SNDRV_PCM_HW_PARAM_LAST_INTERVAL = SNDRV_PCM_HW_PARAM_TICK_TIME }; #define SNDRV_PCM_HW_PARAMS_RUNTIME (1<<0) struct sndrv_interval { unsigned int min, max; unsigned int openmin:1, openmax:1, integer:1, empty:1; }; #define SNDRV_MASK_MAX 256 struct sndrv_mask { u_int32_t bits[(SNDRV_MASK_MAX+31)/32]; }; struct sndrv_pcm_hw_params { unsigned int flags; struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; struct sndrv_mask mres[5]; /* reserved masks */ struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; struct sndrv_interval ires[9]; /* reserved intervals */ unsigned int rmask; /* W: requested masks */ unsigned int cmask; /* R: changed masks */ unsigned int info; /* R: Info flags for returned setup */ unsigned int msbits; /* R: used most significant bits */ unsigned int rate_num; /* R: rate numerator */ unsigned int rate_den; /* R: rate denominator */ sndrv_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */ unsigned char reserved[64]; /* reserved for future */ }; enum sndrv_pcm_tstamp { SNDRV_PCM_TSTAMP_NONE = 0, SNDRV_PCM_TSTAMP_MMAP, SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_MMAP, }; struct sndrv_pcm_sw_params { enum sndrv_pcm_tstamp tstamp_mode; /* timestamp mode */ unsigned int period_step; unsigned int sleep_min; /* min ticks to sleep */ sndrv_pcm_uframes_t avail_min; /* min avail frames for wakeup */ sndrv_pcm_uframes_t xfer_align; /* xfer size need to be a multiple */ sndrv_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */ sndrv_pcm_uframes_t stop_threshold; /* min avail frames for automatic stop */ sndrv_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */ sndrv_pcm_uframes_t silence_size; /* silence block size */ sndrv_pcm_uframes_t boundary; /* pointers wrap point */ unsigned char reserved[64]; /* reserved for future */ }; struct sndrv_pcm_channel_info { unsigned int channel; off_t offset; /* mmap offset */ unsigned int first; /* offset to first sample in bits */ unsigned int step; /* samples distance in bits */ }; struct sndrv_pcm_status { enum sndrv_pcm_state state; /* stream state */ struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ struct timespec tstamp; /* reference timestamp */ sndrv_pcm_uframes_t appl_ptr; /* appl ptr */ sndrv_pcm_uframes_t hw_ptr; /* hw ptr */ sndrv_pcm_sframes_t delay; /* current delay in frames */ sndrv_pcm_uframes_t avail; /* number of frames available */ sndrv_pcm_uframes_t avail_max; /* max frames available on hw since last status */ sndrv_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */ enum sndrv_pcm_state suspended_state; /* suspended stream state */ unsigned char reserved[60]; /* must be filled with zero */ }; struct sndrv_pcm_mmap_status { enum sndrv_pcm_state state; /* RO: state - SNDRV_PCM_STATE_XXXX */ int pad1; /* Needed for 64 bit alignment */ sndrv_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ struct timespec tstamp; /* Timestamp */ enum sndrv_pcm_state suspended_state; /* RO: suspended stream state */ }; struct sndrv_pcm_mmap_control { sndrv_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */ sndrv_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */ }; struct sndrv_xferi { sndrv_pcm_sframes_t result; void *buf; sndrv_pcm_uframes_t frames; }; struct sndrv_xfern { sndrv_pcm_sframes_t result; void **bufs; sndrv_pcm_uframes_t frames; }; enum { SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct sndrv_pcm_info), SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int), SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct sndrv_pcm_hw_params), SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct sndrv_pcm_hw_params), SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct sndrv_pcm_sw_params), SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct sndrv_pcm_status), SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, sndrv_pcm_sframes_t), SNDRV_PCM_IOCTL_HWSYNC = _IO('A', 0x22), SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct sndrv_pcm_channel_info), SNDRV_PCM_IOCTL_PREPARE = _IO('A', 0x40), SNDRV_PCM_IOCTL_RESET = _IO('A', 0x41), SNDRV_PCM_IOCTL_START = _IO('A', 0x42), SNDRV_PCM_IOCTL_DROP = _IO('A', 0x43), SNDRV_PCM_IOCTL_DRAIN = _IO('A', 0x44), SNDRV_PCM_IOCTL_PAUSE = _IOW('A', 0x45, int), SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, sndrv_pcm_uframes_t), SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47), SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48), SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, sndrv_pcm_uframes_t), SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct sndrv_xferi), SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct sndrv_xferi), SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct sndrv_xfern), SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct sndrv_xfern), SNDRV_PCM_IOCTL_LINK = _IOW('A', 0x60, int), SNDRV_PCM_IOCTL_UNLINK = _IO('A', 0x61), }; /* Trick to make alsa-lib/acinclude.m4 happy */ #define SNDRV_PCM_IOCTL_REWIND SNDRV_PCM_IOCTL_REWIND /***************************************************************************** * * * MIDI v1.0 interface * * * *****************************************************************************/ /* * Raw MIDI section - /dev/snd/midi?? */ #define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0) enum sndrv_rawmidi_stream { SNDRV_RAWMIDI_STREAM_OUTPUT = 0, SNDRV_RAWMIDI_STREAM_INPUT, SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT, }; #define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001 #define SNDRV_RAWMIDI_INFO_INPUT 0x00000002 #define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004 struct sndrv_rawmidi_info { unsigned int device; /* RO/WR (control): device number */ unsigned int subdevice; /* RO/WR (control): subdevice number */ enum sndrv_rawmidi_stream stream; /* WR: stream */ int card; /* R: card number */ unsigned int flags; /* SNDRV_RAWMIDI_INFO_XXXX */ unsigned char id[64]; /* ID (user selectable) */ unsigned char name[80]; /* name of device */ unsigned char subname[32]; /* name of active or selected subdevice */ unsigned int subdevices_count; unsigned int subdevices_avail; unsigned char reserved[64]; /* reserved for future use */ }; struct sndrv_rawmidi_params { enum sndrv_rawmidi_stream stream; size_t buffer_size; /* queue size in bytes */ size_t avail_min; /* minimum avail bytes for wakeup */ unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */ unsigned char reserved[16]; /* reserved for future use */ }; struct sndrv_rawmidi_status { enum sndrv_rawmidi_stream stream; struct timespec tstamp; /* Timestamp */ size_t avail; /* available bytes */ size_t xruns; /* count of overruns since last status (in bytes) */ unsigned char reserved[16]; /* reserved for future use */ }; enum { SNDRV_RAWMIDI_IOCTL_PVERSION = _IOR('W', 0x00, int), SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct sndrv_rawmidi_info), SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct sndrv_rawmidi_params), SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct sndrv_rawmidi_status), SNDRV_RAWMIDI_IOCTL_DROP = _IOW('W', 0x30, int), SNDRV_RAWMIDI_IOCTL_DRAIN = _IOW('W', 0x31, int), }; /* * Timer section - /dev/snd/timer */ #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1) enum sndrv_timer_class { SNDRV_TIMER_CLASS_NONE = -1, SNDRV_TIMER_CLASS_SLAVE = 0, SNDRV_TIMER_CLASS_GLOBAL, SNDRV_TIMER_CLASS_CARD, SNDRV_TIMER_CLASS_PCM, SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM, }; /* slave timer classes */ enum sndrv_timer_slave_class { SNDRV_TIMER_SCLASS_NONE = 0, SNDRV_TIMER_SCLASS_APPLICATION, SNDRV_TIMER_SCLASS_SEQUENCER, /* alias */ SNDRV_TIMER_SCLASS_OSS_SEQUENCER, /* alias */ SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER, }; /* global timers (device member) */ #define SNDRV_TIMER_GLOBAL_SYSTEM 0 #define SNDRV_TIMER_GLOBAL_RTC 1 /* info flags */ #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ struct sndrv_timer_id { enum sndrv_timer_class dev_class; enum sndrv_timer_slave_class dev_sclass; int card; int device; int subdevice; }; struct sndrv_timer_ginfo { struct sndrv_timer_id tid; /* requested timer ID */ unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ int card; /* card number */ unsigned char id[64]; /* timer identification */ unsigned char name[80]; /* timer name */ unsigned long reserved0; /* reserved for future use */ unsigned long resolution; /* average period resolution in ns */ unsigned long resolution_min; /* minimal period resolution in ns */ unsigned long resolution_max; /* maximal period resolution in ns */ unsigned int clients; /* active timer clients */ unsigned char reserved[32]; }; struct sndrv_timer_gparams { struct sndrv_timer_id tid; /* requested timer ID */ unsigned long period_num; /* requested precise period duration (in seconds) - numerator */ unsigned long period_den; /* requested precise period duration (in seconds) - denominator */ unsigned char reserved[32]; }; struct sndrv_timer_gstatus { struct sndrv_timer_id tid; /* requested timer ID */ unsigned long resolution; /* current period resolution in ns */ unsigned long resolution_num; /* precise current period resolution (in seconds) - numerator */ unsigned long resolution_den; /* precise current period resolution (in seconds) - denominator */ unsigned char reserved[32]; }; struct sndrv_timer_select { struct sndrv_timer_id id; /* bind to timer ID */ unsigned char reserved[32]; /* reserved */ }; struct sndrv_timer_info { unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ int card; /* card number */ unsigned char id[64]; /* timer identificator */ unsigned char name[80]; /* timer name */ unsigned long reserved0; /* reserved for future use */ unsigned long resolution; /* average period resolution in ns */ unsigned char reserved[64]; /* reserved */ }; #define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */ #define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1) /* exclusive use, precise start/stop/pause/continue */ struct sndrv_timer_params { unsigned int flags; /* flags - SNDRV_MIXER_PSFLG_* */ unsigned int ticks; /* requested resolution in ticks */ unsigned int queue_size; /* total size of queue (32-1024) */ unsigned int reserved0; /* reserved, was: failure locations */ unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */ unsigned char reserved[60]; /* reserved */ }; struct sndrv_timer_status { struct timespec tstamp; /* Timestamp - last update */ unsigned int resolution; /* current period resolution in ns */ unsigned int lost; /* counter of master tick lost */ unsigned int overrun; /* count of read queue overruns */ unsigned int queue; /* used queue size */ unsigned char reserved[64]; /* reserved */ }; enum { SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int), SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct sndrv_timer_id), SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int), SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct sndrv_timer_ginfo), SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct sndrv_timer_gparams), SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct sndrv_timer_gstatus), SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct sndrv_timer_select), SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct sndrv_timer_info), SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct sndrv_timer_params), SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct sndrv_timer_status), SNDRV_TIMER_IOCTL_START = _IO('T', 0x20), SNDRV_TIMER_IOCTL_STOP = _IO('T', 0x21), SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0x22), SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0x23), }; struct sndrv_timer_read { unsigned int resolution; unsigned int ticks; }; enum sndrv_timer_event { SNDRV_TIMER_EVENT_RESOLUTION = 0, /* val = resolution in ns */ SNDRV_TIMER_EVENT_TICK, /* val = ticks */ SNDRV_TIMER_EVENT_START, /* val = resolution in ns */ SNDRV_TIMER_EVENT_STOP, /* val = 0 */ SNDRV_TIMER_EVENT_CONTINUE, /* val = resolution in ns */ SNDRV_TIMER_EVENT_PAUSE, /* val = 0 */ /* master timer events for slave timer instances */ SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10, SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10, SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10, SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10, }; struct sndrv_timer_tread { enum sndrv_timer_event event; struct timespec tstamp; unsigned int val; }; /**************************************************************************** * * * Section for driver control interface - /dev/snd/control? * * * ****************************************************************************/ #define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 2) struct sndrv_ctl_card_info { int card; /* card number */ int pad; /* reserved for future (was type) */ unsigned char id[16]; /* ID of card (user selectable) */ unsigned char driver[16]; /* Driver name */ unsigned char name[32]; /* Short name of soundcard */ unsigned char longname[80]; /* name + info text about soundcard */ unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ unsigned char mixername[80]; /* visual mixer identification */ unsigned char components[80]; /* card components / fine identification, delimited with one space (AC97 etc..) */ unsigned char reserved[48]; /* reserved for future */ }; enum sndrv_ctl_elem_type { SNDRV_CTL_ELEM_TYPE_NONE = 0, /* invalid */ SNDRV_CTL_ELEM_TYPE_BOOLEAN, /* boolean type */ SNDRV_CTL_ELEM_TYPE_INTEGER, /* integer type */ SNDRV_CTL_ELEM_TYPE_ENUMERATED, /* enumerated type */ SNDRV_CTL_ELEM_TYPE_BYTES, /* byte array */ SNDRV_CTL_ELEM_TYPE_IEC958, /* IEC958 (S/PDIF) setup */ SNDRV_CTL_ELEM_TYPE_INTEGER64, /* 64-bit integer type */ SNDRV_CTL_ELEM_TYPE_LAST = SNDRV_CTL_ELEM_TYPE_INTEGER64, }; enum sndrv_ctl_elem_iface { SNDRV_CTL_ELEM_IFACE_CARD = 0, /* global control */ SNDRV_CTL_ELEM_IFACE_HWDEP, /* hardware dependent device */ SNDRV_CTL_ELEM_IFACE_MIXER, /* virtual mixer device */ SNDRV_CTL_ELEM_IFACE_PCM, /* PCM device */ SNDRV_CTL_ELEM_IFACE_RAWMIDI, /* RawMidi device */ SNDRV_CTL_ELEM_IFACE_TIMER, /* timer device */ SNDRV_CTL_ELEM_IFACE_SEQUENCER, /* sequencer client */ SNDRV_CTL_ELEM_IFACE_LAST = SNDRV_CTL_ELEM_IFACE_SEQUENCER, }; #define SNDRV_CTL_ELEM_ACCESS_READ (1<<0) #define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1) #define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE) #define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */ #define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1<<2) /* when was control changed */ #define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */ #define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */ #define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */ #define SNDRV_CTL_ELEM_ACCESS_DINDIRECT (1<<30) /* indirect access for matrix dimensions in the info structure */ #define SNDRV_CTL_ELEM_ACCESS_INDIRECT (1<<31) /* indirect access for element value in the value structure */ /* for further details see the ACPI and PCI power management specification */ #define SNDRV_CTL_POWER_D0 0x0000 /* full On */ #define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ #define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ #define SNDRV_CTL_POWER_D3 0x0300 /* Off */ #define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ #define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */ struct sndrv_ctl_elem_id { unsigned int numid; /* numeric identifier, zero = invalid */ enum sndrv_ctl_elem_iface iface; /* interface identifier */ unsigned int device; /* device/client number */ unsigned int subdevice; /* subdevice (substream) number */ unsigned char name[44]; /* ASCII name of item */ unsigned int index; /* index of item */ }; struct sndrv_ctl_elem_list { unsigned int offset; /* W: first element ID to get */ unsigned int space; /* W: count of element IDs to get */ unsigned int used; /* R: count of element IDs set */ unsigned int count; /* R: count of all elements */ struct sndrv_ctl_elem_id *pids; /* R: IDs */ unsigned char reserved[50]; }; struct sndrv_ctl_elem_info { struct sndrv_ctl_elem_id id; /* W: element ID */ enum sndrv_ctl_elem_type type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ unsigned int count; /* count of values */ pid_t owner; /* owner's PID of this control */ union { struct { long min; /* R: minimum value */ long max; /* R: maximum value */ long step; /* R: step (0 variable) */ } integer; struct { long long min; /* R: minimum value */ long long max; /* R: maximum value */ long long step; /* R: step (0 variable) */ } integer64; struct { unsigned int items; /* R: number of items */ unsigned int item; /* W: item number */ char name[64]; /* R: value name */ } enumerated; unsigned char reserved[128]; } value; union { unsigned short d[4]; /* dimensions */ unsigned short *d_ptr; /* indirect */ } dimen; unsigned char reserved[64-4*sizeof(unsigned short)]; }; struct sndrv_ctl_elem_value { struct sndrv_ctl_elem_id id; /* W: element ID */ unsigned int indirect: 1; /* W: use indirect pointer (xxx_ptr member) */ union { union { long value[128]; long *value_ptr; } integer; union { long long value[64]; long long *value_ptr; } integer64; union { unsigned int item[128]; unsigned int *item_ptr; } enumerated; union { unsigned char data[512]; unsigned char *data_ptr; } bytes; struct sndrv_aes_iec958 iec958; } value; /* RO */ struct timespec tstamp; unsigned char reserved[128-sizeof(struct timespec)]; }; enum { SNDRV_CTL_IOCTL_PVERSION = _IOR('U', 0x00, int), SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct sndrv_ctl_card_info), SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct sndrv_ctl_elem_list), SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct sndrv_ctl_elem_info), SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct sndrv_ctl_elem_value), SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct sndrv_ctl_elem_value), SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct sndrv_ctl_elem_id), SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct sndrv_ctl_elem_id), SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS = _IOWR('U', 0x16, int), SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE = _IOWR('U', 0x20, int), SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct sndrv_hwdep_info), SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE = _IOR('U', 0x30, int), SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct sndrv_pcm_info), SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE = _IOW('U', 0x32, int), SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE = _IOWR('U', 0x40, int), SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct sndrv_rawmidi_info), SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE = _IOW('U', 0x42, int), SNDRV_CTL_IOCTL_POWER = _IOWR('U', 0xd0, int), SNDRV_CTL_IOCTL_POWER_STATE = _IOR('U', 0xd1, int), }; /* * Read interface. */ enum sndrv_ctl_event_type { SNDRV_CTL_EVENT_ELEM = 0, SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM, }; #define SNDRV_CTL_EVENT_MASK_VALUE (1<<0) /* element value was changed */ #define SNDRV_CTL_EVENT_MASK_INFO (1<<1) /* element info was changed */ #define SNDRV_CTL_EVENT_MASK_ADD (1<<2) /* element was added */ #define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) /* element was removed */ struct sndrv_ctl_event { enum sndrv_ctl_event_type type; /* event type - SNDRV_CTL_EVENT_* */ union { struct { unsigned int mask; struct sndrv_ctl_elem_id id; } elem; unsigned char data8[60]; } data; }; /* * Control names */ #define SNDRV_CTL_NAME_NONE "" #define SNDRV_CTL_NAME_PLAYBACK "Playback " #define SNDRV_CTL_NAME_CAPTURE "Capture " #define SNDRV_CTL_NAME_IEC958_NONE "" #define SNDRV_CTL_NAME_IEC958_SWITCH "Switch" #define SNDRV_CTL_NAME_IEC958_VOLUME "Volume" #define SNDRV_CTL_NAME_IEC958_DEFAULT "Default" #define SNDRV_CTL_NAME_IEC958_MASK "Mask" #define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask" #define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask" #define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" #define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what /* * */ struct sndrv_xferv { const struct iovec *vector; unsigned long count; }; enum { SNDRV_IOCTL_READV = _IOW('K', 0x00, struct sndrv_xferv), SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct sndrv_xferv), }; #endif /* __SOUND_ASOUND_H */ |
From: <mi...@us...> - 2004-02-04 23:48:23
|
Update of /cvsroot/gc-linux/linux/include/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29867/include/sound Log Message: Directory /cvsroot/gc-linux/linux/include/sound added to the repository |
From: <mi...@us...> - 2004-02-04 23:48:22
|
Update of /cvsroot/gc-linux/linux/sound/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29867/sound/ppc Log Message: Directory /cvsroot/gc-linux/linux/sound/ppc added to the repository |
From: <mi...@us...> - 2004-02-04 23:48:22
|
Update of /cvsroot/gc-linux/linux/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29867/sound Log Message: Directory /cvsroot/gc-linux/linux/sound added to the repository |
From: <mi...@us...> - 2004-02-04 19:48:34
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26921/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: enabled keyboard Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gamecube_defconfig 31 Jan 2004 02:55:23 -0000 1.8 +++ gamecube_defconfig 4 Feb 2004 19:46:03 -0000 1.9 @@ -414,7 +414,12 @@ # # Input Device Drivers # -# CONFIG_INPUT_KEYBOARD is not set +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_KEYBOARD_GAMECUBE=y # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set |
From: <mi...@us...> - 2004-02-04 19:36:10
|
Update of /cvsroot/gc-linux/linux/drivers/input/keyboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23288 Added Files: Kconfig Makefile gckbd.c Log Message: GameCube keyboard driver by Steven Looman (already usable) --- NEW FILE: Kconfig --- # # Input core configuration # config INPUT_KEYBOARD bool "Keyboards" if EMBEDDED || !X86 default y depends on INPUT help Say Y here, and a list of supported keyboards will be displayed. This option doesn't affect the kernel. If unsure, say Y. config KEYBOARD_ATKBD tristate "AT keyboard support" if !PC default y depends on INPUT && INPUT_KEYBOARD select SERIO select SERIO_I8042 if PC help Say Y here if you want to use a standard AT or PS/2 keyboard. Usually you'll need this, unless you have a different type keyboard (USB, ADB or other). This also works for AT and PS/2 keyboards connected over a PS/2 to serial converter. If unsure, say Y. To compile this driver as a module, choose M here: the module will be called atkbd. config KEYBOARD_SUNKBD tristate "Sun Type 4 and Type 5 keyboard support" depends on INPUT && INPUT_KEYBOARD select SERIO help Say Y here if you want to use a Sun Type 4 or Type 5 keyboard, connected either to the Sun keyboard connector or to an serial (RS-232) port via a simple adapter. To compile this driver as a module, choose M here: the module will be called sunkbd. config KEYBOARD_XTKBD tristate "XT Keyboard support" depends on INPUT && INPUT_KEYBOARD select SERIO help Say Y here if you want to use the old IBM PC/XT keyboard (or compatible) on your system. This is only possible with a parallel port keyboard adapter, you cannot connect it to the keyboard port on a PC that runs Linux. To compile this driver as a module, choose M here: the module will be called xtkbd. config KEYBOARD_NEWTON tristate "Newton keyboard" depends on INPUT && INPUT_KEYBOARD select SERIO help Say Y here if you have a Newton keyboard on a serial port. To compile this driver as a module, choose M here: the module will be called newtonkbd. config KEYBOARD_MAPLE tristate "Maple bus keyboard support" depends on SH_DREAMCAST && INPUT && INPUT_KEYBOARD && MAPLE help Say Y here if you have a DreamCast console running Linux and have a keyboard attached to its Maple bus. To compile this driver as a module, choose M here: the module will be called maple_keyb. config KEYBOARD_AMIGA tristate "Amiga keyboard" depends on AMIGA && INPUT && INPUT_KEYBOARD help Say Y here if you are running Linux on any AMIGA and have a keyboard attached. To compile this driver as a module, choose M here: the module will be called amikbd. config KEYBOARD_98KBD tristate "NEC PC-9800 Keyboard support" depends on X86_PC9800 && INPUT && INPUT_KEYBOARD select SERIO help Say Y here if you want to use the NEC PC-9801/PC-9821 keyboard (or compatible) on your system. To compile this driver as a module, choose M here: the module will be called 98kbd. config KEYBOARD_GAMECUBE tristate "Datel/ASCII keyboard support for GameCube" depends on GAMECUBE && INPUT && INPUT_KEYBOARD help Say Y here if you have a Datel or ASCII keyboard connected to your GameCube. NOTE: This does not work with drivers for other controllers! NOTE2: Currently it only works when connected to controllerport 4! --- NEW FILE: Makefile --- # # Makefile for the input core drivers. # # Each configuration option enables a list of files. obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o obj-$(CONFIG_KEYBOARD_98KBD) += 98kbd.o obj-$(CONFIG_KEYBOARD_GAMECUBE) += gckbd.o --- NEW FILE: gckbd.c --- /* * Datel/GameCube keyboard driver for Linux */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Should you need to contact me, the author, you can do so either by * e-mail - mail your message to <vo...@uc...>, or by paper mail: * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic */ #include <linux/input.h> #include <linux/module.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/timer.h> #include <linux/delay.h> MODULE_AUTHOR("Steven Looman <st...@kr...>"); MODULE_DESCRIPTION("Datel/GameCube keyboard driver"); MODULE_LICENSE("GPL"); struct gckbd { unsigned long *portRegister; struct input_dev dev; struct timer_list timer; unsigned char pressedKeys[3]; }; static unsigned char gckbd_keycode[256] = { 0, 0, 0, 0, 0, 0,102,107,104,109, 0, 0, 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 43, 40, 26, 13, 55, 27, 51, 52, 53, 0, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 87, 88, 1,110,111, 41, // FIXME: 0x58 = winkey1, 0x5B = winkey2 0x5B = winkey3? 14, 15, 0, 58, 42, 54, 29, 56, 0, 57, 0, 0,105,108,103,106, 0, 28, 0, 0, 39, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static struct resource gckbd_resource = { "gckbd", 0xCC006400, 0xCC006440, IORESOURCE_MEM|IORESOURCE_BUSY }; static void gckbd_timer(unsigned long private) { // this could probably be done with an array unsigned char key1, key2, key3; int i; struct gckbd *kbd = (struct gckbd *)private; // read keys pressed key1 = (*kbd->portRegister >> 24) & 0xFF; key2 = (*kbd->portRegister >> 16) & 0xFF; key3 = (*kbd->portRegister >> 8) & 0xFF; // report released keys for (i = 0; i < 3; i++) { if (kbd->pressedKeys[i] && kbd->pressedKeys[i] != key1 && kbd->pressedKeys[i] != key2 && kbd->pressedKeys[i] != key3) input_report_key (&kbd->dev, gckbd_keycode[kbd->pressedKeys[i]], 0); } // check if we should report anything if (key1 && gckbd_keycode[key1]) input_report_key (&kbd->dev, gckbd_keycode[key1], 1); if (key2 && gckbd_keycode[key2]) input_report_key (&kbd->dev, gckbd_keycode[key2], 1); if (key3 && gckbd_keycode[key3]) input_report_key (&kbd->dev, gckbd_keycode[key3], 1); input_sync (&kbd->dev); // keep state of pressed keys kbd->pressedKeys[0] = key1; kbd->pressedKeys[1] = key1; kbd->pressedKeys[2] = key1; mod_timer (&kbd->timer, jiffies + HZ/50); } static int gckbd_open(struct input_dev *dev) { struct gckbd *kbd = dev->private; init_timer (&kbd->timer); kbd->timer.data = (void *)kbd; kbd->timer.function = gckbd_timer; kbd->timer.expires = jiffies + HZ/50; add_timer (&kbd->timer); return 0; } static void gckbd_close(struct input_dev *dev) { struct gckbd *kbd = dev->private; del_timer (&kbd->timer); } static int __init gckbd_init(void) { int i; struct gckbd *kbd; if (request_resource (&iomem_resource, &gckbd_resource) < 0) { printk(KERN_WARNING "gcpad : resource busy\n"); return -EBUSY; } kbd = kmalloc (sizeof (struct gckbd), GFP_KERNEL); if (kbd == NULL) return -ENOMEM; memset (kbd, 0, sizeof (struct gckbd)); // set some parameters/callbacks kbd->portRegister = (unsigned long*)0xCC00642C; kbd->dev.private = kbd; kbd->dev.open = gckbd_open; kbd->dev.close = gckbd_close; set_bit (EV_KEY, kbd->dev.evbit); for (i = 0; i < 255; i++) set_bit (gckbd_keycode[i], kbd->dev.keybit); // register the device input_register_device (&kbd->dev); printk (KERN_INFO "gamecube keyboard: started\n"); return 0; } static void __exit gckbd_exit(void) { // this is a BAD thing(tm), not releasing stuff.. this will give troubles ;) /* input_unregister_device (&kbd->dev); kfree (gckbd); */ release_resource (&gckbd_resource); } module_init (gckbd_init); module_exit (gckbd_exit); |
From: <mi...@us...> - 2004-02-04 19:34:19
|
Update of /cvsroot/gc-linux/linux/drivers/input/keyboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22916/drivers/input/keyboard Log Message: Directory /cvsroot/gc-linux/linux/drivers/input/keyboard added to the repository |
From: <mi...@us...> - 2004-02-04 19:33:29
|
Update of /cvsroot/gc-linux/linux/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22754/drivers/input Log Message: Directory /cvsroot/gc-linux/linux/drivers/input added to the repository |
From: <mi...@us...> - 2004-02-03 09:50:46
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27708/xml/en Modified Files: download.xml Log Message: ... Index: download.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/download.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- download.xml 3 Feb 2004 02:53:33 -0000 1.5 +++ download.xml 3 Feb 2004 09:48:35 -0000 1.6 @@ -11,7 +11,7 @@ <h2>GameCube Linux Alpha</h2> - <p>This Linux image shows a screen with kernel messages, and, if your computer's network settings are correct, allows telnet connections to 192.168.0.47 and serves a webpage (<a href="http://192.168.0.47/">http://192.168.0.47/</a>).</p> + <p>This Linux image shows a screen with kernel messages, and, if your computer's network settings are correct, allows telnet connections to 192.168.0.47 (user: root, password: gc) and serves a webpage (<a href="http://192.168.0.47/">http://192.168.0.47/</a>).</p> <p><a href="http://prdownloads.sourceforge.net/gc-linux/gc-linux-alpha.zip?download">gc-linux-alpha.zip</a> (1.1 MB)</p> |
From: <mi...@us...> - 2004-02-03 09:04:49
|
Update of /cvsroot/gc-linux/htdocs/xml/nl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22810/xml/nl Modified Files: faq.xml Log Message: ... Index: faq.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/nl/faq.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- faq.xml 3 Feb 2004 08:50:22 -0000 1.1 +++ faq.xml 3 Feb 2004 09:02:38 -0000 1.2 @@ -36,7 +36,7 @@ <faq> <category>1 Algemeen</category> <question>Ik ben een newbie. Waar kan ik informatie over linux vinden en hoe kan ik het gebruiken?</question> - <answer>Een goed punt om te starten isÊ `The Linux Documentation Project': <a href="http://www.tldp.org/">http://www.tldp.org/</a></answer> + <answer>Een goed punt om te starten is `The Linux Documentation Project': <a href="http://www.tldp.org/">http://www.tldp.org/</a></answer> </faq> |
From: <mi...@us...> - 2004-02-03 08:52:32
|
Update of /cvsroot/gc-linux/htdocs/xml/nl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12711/nl Added Files: faq.xml Log Message: ... --- NEW FILE: faq.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="faq.xsl"?> <xfaq> <!-- ***** 1 General ***** --> <faq> <category>1 Algemeen</category> <question>Kan ik linux op de Gamecube draaien?</question> <answer>Ja. Je kan er nog niet veel mee, maar je ziet wat dingen op het scherm en je kan er heen telnetten.</answer> </faq> <faq> <category>1 Algemeen</category> <question>Waarom Linux? Waarom niet Windows? Waarom geen MacOS?</question> <answer>Er is geen windows (meer) voor PowerPC processors, en daar komt ook nog bij dat Windows geen opensource is. Delen van Mac OS X zijn opensource, en het draait op PowerPC, maar de gamecube heeft te weinig geheugen. Linux is Open Source, krachtig, en verkrijgbaar voor PowerPC CPU's.</answer> </faq> <faq> <category>1 Algemeen</category> <question>Is de GameCube een Mac?</question> <answer>Nee. Alhoewel Apple Macintosh computers en de GameCube allebei een PowerPC CPU hebben, zijn de architecturen van deze systemen totaal verschillend.</answer> </faq> <faq> <category>1 Algemeen</category> <question>Waarom geen gebruik maken van de Gamecube SDK?</question> <answer>De GameCube SDK is niet gelicenseerd aan gebruikers die geen officiele Gamecube ontwikkelaars zijn. Maar er is een goed opensource alternatief: <a href="http://sourceforge.net/projects/gclib/">GCLIB</a>. De Linux omgeving heeft het voordeel dat bestaande applicaties eenvoudiger geport kunnen worden.</answer> </faq> <faq> <category>1 Algemeen</category> <question>De GameCube is al ruim 2 jaar uit - waarom zijn jullie zo laat begonnen?</question> <answer>De <a href="http://www.xbox-linux.org/">Xbox</a> moest er eerst aan geloven.</answer> </faq> <faq> <category>1 Algemeen</category> <question>Ik ben een newbie. Waar kan ik informatie over linux vinden en hoe kan ik het gebruiken?</question> <answer>Een goed punt om te starten isÊ `The Linux Documentation Project': <a href="http://www.tldp.org/">http://www.tldp.org/</a></answer> </faq> !-- ***** 2 Runnings Homebrew Code ***** --> <faq> <category>2 Zelfgemaakte code uitvoeren</category> <question>Kan ik gewoon een 8cm DVD/CD gebruiken met de GameCube?</question> <answer> Nee. De GameCube leest geen CD/DVD's. Er is geen manier om GameCube media te produceren met een gewone CD/DVD brander. </answer> </faq> <faq> <category>2 Zelfgemaakte code uitvoeren</category> <question>Maar hoe voer ik dan code op de GameCube uit?</question> <answer> De <a href="http://www.gcdev.com/">PSOload</a> methode is de enige manier. </answer> </faq> <faq> <category>2 Zelfgemaakte code uitvoeren</category> <question>Wat heb ik allemaal nodig om zelfgemaakte code uit te voeren?</question> <answer> Een GameCube, een willekeurige version van "Phantasy Star Online", een "Broadband Adapter", een memory card en <a href="http://www.gcdev.com/">PSOload</a>. </answer> </faq> <faq> <category>2 Zelfgemaakte code uitvoeren</category> <question>Heb ik een modchip nodig?</question> <answer> Er zijn geen modchips. </answer> </faq> <faq> <category>2 Zelfgemaakte code uitvoeren</category> <question>Zorgt dit er voor dat ik geen spelletjes meer kan spelen?</question> <answer> Nee. </answer> </faq> !-- ***** 3 Helping ***** --> <faq> <category>3 Meehelpen</category> <question>Ik heb toegang tot de GameCube SDK. Kan ik helpen?</question> <answer>Door gebruik te maken van deze informatie of de SDK riskeren we de legaliteit van dit project.</answer> </faq> <faq> <category>3 Meehelpen</category> <question>Hoe kan ik helpen?</question> <answer>De <a href="/">start pagina</a> vertelt je hoe je mee kan helpen.</answer> </faq> <faq> <category>3 Meehelpen</category> <question>Ik wil meehelpen met het project. Kunnen jullie mij de GameCube SDK sturen?</question> <answer>Nee. Die hebben we niet, we weten niet waar die te krijgen valt, en als we em hadden dan zouden we hem niet gebruiken. Er is geen legale manier voor hobbyisten om de SDK te gebruiken. We hebben hem trouwens ook niet nodig: Het enige deel van het project dat afhangt van het GameCube executeable file formaat en de IPL is de DOL bootloader, maar de structuur hiervan is niet super belangrijk.</answer> </faq> !-- ***** 6 The Law ***** --> <faq> <category>4 De wet</category> <question>Is jullie project legaal? heeft de DMCA hier niets op tegen?</question> <answer><p>De DMCA verbied het omzeilen van kopieer beveiligingen, maar dat is ons doel niet. Wij ontwikkelen een alternatief besturingssysteem voor de GameCube spelcomputer. desalniettemin, als je in de USA of een ander land met zelfde soortgelijke wetgeving woont, en je houd je bezig met GameCube hacking in plaats van Linux ontwikkelingen, kan je uiteraard anoniem aan het project meewerken.</p> <p>Als u een advocaat of een representatief iemand van Nintendo bent, kunt u uiteraard contact met ons opnemen over eventuele aanpassingen.</p> </answer> </faq> <faq> <category>4 De wet</category> <question>Verlies ik mijn garantie als ik iets van de op deze site genoemde dingen doe?</question> <answer> Zo lang jij je GameCube niet openschroeft behoud je je garantie. </answer> </faq> </xfaq> |
From: <mi...@us...> - 2004-02-03 08:52:04
|
Update of /cvsroot/gc-linux/htdocs/xml/nl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12373/nl Log Message: Directory /cvsroot/gc-linux/htdocs/xml/nl added to the repository |