Résultat de l’API de MediaWiki

Voici la représentation HTML du format JSON. HTML convient au débogage, mais est inapproprié pour être utilisé dans une application.

Spécifiez le paramètre format pour modifier le format de sortie. Pour voir la représentation non HTML du format JSON, mettez format=json.

Voir la documentation complète, ou l’aide de l’API pour plus d’informations.

{
    "batchcomplete": "",
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "18": {
                "pageid": 18,
                "ns": 0,
                "title": "Retrocube",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Retrocube is a project of using a GameCube case for a retropie project (retro gaming using raspberry pi)\n\n== Retro Gaming console in a GameCube ==\n\nFor this project, you will need:\n* A GameCube (Only the case will be reused, a broken one is fine!)\n* A Raspberry Pi running Retro Pi\n* 2 GameCube gamepads\n\nGoal :\n* Gamepad compatible menus ( no need for a keyboard)\n* Functional Gamecube\u2019s power button\n* Functional Gamecube\u2019s reset button\n* Gamepads plugged in the original connectors\n* Power from the Gamecube\u2019s power unit or any other supply unit\n\n== Hardware ==\n\n=== Opening the Gamecube ===\n\nThe GameCube uses special heads. As it\u2019s a rare head type, we\u2019ll use a neat trick to open them: A Bic crystal pen!\n(Note: They are really common in France, I\u2019m kinda hoping it\u2019s the same where you live)\nTo make you screwdriver:\n* Remove the ballpoint/ink\n* Carefully, heat up the end of the pen with a lighter until it\u2019s \u00ab melty \u00bb\n* Apply the melty end on one of the screws and wait for the pen to cool down\n* Once hardened, you should be able to use it as a screwdriver! It\u2019s that simple ;)\n\n<gallery>\nFichier:Game Cube opening tool.jpg|Game Cube opening tool\n</gallery>\n\n=== GameCube disassembly ===\n\nSafely take apart all the parts\n\n<gallery>\nFichier: Game Cube top removal.JPG|Game Cube top removal\nFichier: Game Cube front removal.JPG|Game Cube front removal\nFichier: Game Cube back removal.JPG|Game Cube back removal\nFichier: Game Cube fan removal.JPG|Game Cube fan removal\nFichier: Game Cube cd reader removal.JPG|Game Cube cd reader removal\nFichier: Game Cube cpu removal.JPG|Game Cube cpu removal\nFichier: Game Cube main parts.JPG|Game Cube main parts\n</gallery>\n\n=== Gamepad Connectors ===\n\n\nThe gamepad will use the gamecon_gpio_rpi driver which use the following GPIO rev2 pins:<br />\n[[Fichier:GPIO.png|100px|GPIO (rev2 pi)]]\n\nCarefully identify each pins :\n[[Fichier:RaspberryPi GPIO.JPG|thumb|left|40px|RaspberryPi GPIO]]\n* 3.3V\n* 5V\n* PAD1\n* PAD2\n* PAD3\n* GROUND\n<br />\n<br />\n\nI found an adapter from an old dvd reader to connect the GPIO to the GameCube front panel to easily connect wires to the GameCube original ribbon cable.\nEach ( port 1 and port 2 ) gamecube controller should be connected to \n* Pin2 to PAD2 or PAD3\n* Pin3 to GROUND\n* Pin6 to 3.3V\n* Led to 5V\n* Reset switch to PAD1\n\nI used a continuity tester and the following connecter pinout to identify the wire.\n[[Fichier:GameCube socket pinout.gif|50px|GameCube socket pinout]]\n\nand here is the result :\n<gallery>\nFichier:GPIO to GameCube gamepad.jpg|GPIO to GameCube gamepad\n</gallery>\n\n=== Power supply ===\n\nMy goal is to reuse the GC\u2019s original power supply and to allow the use of a standard power supply.\n\nTo do so, you\u2019ll need a DC/DC converter that will take any DC power under 24v to transform it in the 5V DC needed by the Pi. You can find that on ebay by searching \"3A UBEC 5V\".\nThe original power switch and the fan are also functional :\n<gallery>\nFichier:GameCube power supply.jpg|GameCube power supply\n</gallery>\n\nYou\u2019ll need to place the DC/DC converter between the GC\u2019s power supply and the Pi:\n<gallery>\nFichier:GameCube power supply unit.jpg|GameCube power supply unit\n</gallery>\n\nand the output of the power supply is powering the Pi. I do not use the micro USB port to power the pi because :\n* it's allow me to spare some space and put the sd card in front of the gamecube;\n* it's allow better connectivity.\n\n=== Result ===\n\nThe Raspberry pi\u2019s SD card can be inserted in the gamecube\u2019s memory port.\nThe HDMI and Ethernet ports from the Pi are prolongated to the GC\u2019s ports\nHere is the result :\n<gallery>\nFichier:Retrocube front.jpg|Retrocube front\nFichier:Retrocube back.jpg|Retrocube back\nFichier:Retrocube inside.jpg|Retrocube inside\n</gallery>\n\n== Software ==\n\nThe Pi is running RetroPie.\n\n=== RetroPie installation and configuration ===\n\nYou\u2019ll need to download RetroPie from their website petrockblock http://blog.petrockblock.com/retropie/retropie-downloads/\nThen we\u2019ll copy the image onto the SD card using linux:\n<code>\ndd if=Downloads/RetroPieImage_ver1.9.1.img of=/dev/rdisk2  bs=1m \n</code>\n\nThen boot the RetroPie with a HDMI screen and a usb keyboard then \n\n* Press F4 to exit the menu\n* Launch the raspi-config command\n\n<code> sudo raspi-config </code>\n\nand follow these steps\n \n  > set date and time\n  > set keyboard layout\n  > overclock medium\n  > expand the root fs\n  > memory split 128M \n\n* Reboot the pi\n\n<code> sudo reboot </code>\n\n* Once the pi did finish rebooting, press F4 to exit the menu\n* Connect to the pi from your linux using SSH (this is optional but i think this is easier)\n\n<code> ssh pi@raspberrypi.local </code>\n\n* Update the pi\n\n  sudo apt-get update\n  cd RetroPie-Setup\n  chmod +x retropie_setup.sh\n  sudo ./retropie_setup.sh\n\n* In the retropie setup menu, do the following steps\n\n  > UPDATE SETUP (4)\n  > UPDATE BINARIES (5)\n  > SETUP\n        2 Latest firmware\n\n* Then reboot the pi\n\n<code> sudo reboot </code>\n\n* Launche the retropie setup script again\n\n<code> sudo ./retropie_setup.sh </code>\n\n* Finally to install the gamepad driver follow those steps\n\n  > SETUP\n      11 install multi console gamepad\n      12 Enable gamecon_gpio_rpi with SNES-pad config\n\n=== Fixing some gamepad glitches ===\n\nThe original gamecon driver has some defects witch GameCube gamepad. For example :\n* When you press a button once, 2 or more action are detected;\n* Game are not responsive.\n\nLuckily on Dave's Blog http://davesblog.com/2013/12/27/hacking-the-gamecube-controller-on-the-raspberry-pi.html there is a patch. It was a starting point, but the gamepad was not perfectly working. To improve (to my point of view) the driver, i finally made the following changes compared to the original version :\n\n* GC_REFRESH_TIME change from HZ/20 to HZ/100 : help to reduce the CPU usage of the module while still allowing the gamepad to be responsive;\n* As on Dave's Blog, change the delay values from 3 to 4 and 1 to 2;\n* GC_GCUBE_REQUEST from 0x40c002U to 0x400002U;\n* Remove some button and axes (ABS_RX, ABS_RY, ABS_GAS, ABS_BRAKE, ABS_HAT0X, ABS_HAT0Y) which were unusefull for the available games and lead to false push button detection.\n\nSteps to patch your kernel :\n\n  sudo cp -r /usr/src/gamecon_gpio_rpi-0.9 /usr/src/gamecon_gpio_rpi-0.9-bak\n  cd /usr/src/gamecon_gpio_rpi-0.9\n  wget http://mir.thinkrosystem.com/opensource/gamecon_rpi-nickilo.patch\n  sudo patch -p0 < gamecon_rpi-nickilo.patch \n  sudo modprobe -r gamecon_gpio_rpi && sudo dkms remove gamecon_gpio_rpi/0.9 --all && sudo dkms install gamecon_gpio_rpi/0.9 && sudo modprobe gamecon_gpio_rpi map=0,0,3,0,0,3\n  echo \"gamecon_gpio_rpi map=0,0,3,0,0,3\" >> /etc/modules\n  sudo /etc/modules # To verify the new added line\n  sudo reboot\n\nNow your GameCube gamepad should be running fine.\n\n=== Editing the RetroPie Menu (optional) ===\n\nRetroPie let\u2019s you edit it\u2019s menus, to disable some emulators for example.\n\nFirst backup the original file :\n\n<code> sudo cp .emulationstation/es_systems.cfg .emulationstation/es_systems.cfg-orig </code>\n\nthen edit the configuration file to delete the emulator you don't want to see in the menu :\n\n<code> sudo vi .emulationstation/es_systems.cfg </code>\n\nfinally reboot your pi.\n\n=== Reset button ===\n\nTo enable the original reset button to quit a running game, we\u2019ll need pidkey. It triggers a keyboard event when the pooled GPIO is put to ground :\n\n  wget https://codeload.github.com/mmoller2k/pikeyd/zip/master\n  unzip master\n  cd pikeyd-master\n  make\n  sudo cp pikeyd /bin/pikeyd\n  sudo vi /etc/pikeyd.conf \n\n/etc/pikeyd.conf  is the config file which contain the key and the GPIO number\n\n<code> KEY_ESC 2 </code>\n\n<code>  sudo vi /etc/rc.local </code>\n\nAdd the following line to rc.local :\n\n<code> /bin/pikeyd & </code>\n\n=== Overclocking ===\n\nTo smooth things a bit, you can over clock the Pi.\nBe careful, the pi can easily be overcooked, but as it is fabless, you\u2019ll need to be careful on heat dissipation.\nI put a thermal dissipator on mine\u2019s CPU for example and thank to the GameCube fan, it's temperature is below 50\u00b0C. \nMy over clock setting are (in /boot/config.txt) :\n\n  arm_freq=1050\n  core_freq=540\n  sdram_freq=630\n  over_voltage_sdram=6\n  over_voltage=6\n  gpu_mem=128\n  avoid_safe_mode=1\n  avoid_pwm_pll=1\n\n=== Performance tweaks ===\n\nIf you need to optimize the performance (because some game are not enough responsive for example), you can follow some simple advices:\n\n===== Use static ip address =====\n\nConfigure it in /etc/network/interfaces\n\n===== Disable some services =====\n\n\n  sudo apt-get install rcconf sysv-rc-conf\n  rcconf\n\n\nHere is the list of services started at boot :\n* alsa\n* console-setup\n* dphys-swapfile\n* fake-hwclock\n* kmod\n* procps\n* ssh\n* sudo\n* switch_cpu_governor\n* udev\n\nEdit initab (sudo vi /etc/inittab) to comment the following lines :\n\n  2:23:respawn:/sbin/getty 38400 tty2  (2 to 6)\n  T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100\n\n=== GamePad configuration ===\n\nConfiguration GamePad for Retropie is a little bit tricky. There is multiple configuration files :\n* The configuration file for the Retpropie menu;\n* The configuration file common for many emulators;\n* The configuration file specific to PiFBA (the NeoGeo emulator);\n* The configuration file specific to N64 emulator.\n\n===== Menu =====\n\nAt first start, the retropie menu will ask you to configure your gamepad for controlling the menu. Just follow the on-screen steps.\n\nIf you made a mistake, juste delete the configuration file and reboot :\n\n  sudo rm ~/.emulationstation/es_input.cfg\n  sudo reboot\n\n\n===== Common file =====\n\nOnce in the retropie menu, you can go through a gamepad configuration tool (using left or right key). Launch it and follow the on screen-steps.\n\nIf your made a mistake, just run the tool once more.\n\n===== PiFBA =====\n\nTo configuration your gamepad for PiFBA (NeoGeo) emulator, edit the following file :\n\n<code> sudo vi /home/pi/RetroPie/emulators/pifba/fba2x.cfg </code>\n\nUnder the [Joystick] section, use the following configuration :\n\n  A_1=0\n  B_1=2\n  X_1=1\n  Y_1=3\n  L_1=4\n  R_1=6\n  START_1=7\n  SELECT_1=4\n  #Joystick axis\n  JA_LR=0\n  JA_UD=1\n  #player 2 button configuration\n  A_2=0\n  B_2=2\n  X_2=1\n  Y_2=3\n  L_2=4\n  R_2=6\n  START_2=7\n  SELECT_2=4\n  #Joystick axis\n  JA_LR_2=0\n  JA_UD_2=1\n\n\n===== N64 =====\n\nTo configuration your gamepad for N64 emulator, edit the following file :\n\n<code> sudo vi /home/pi/RetroPie/emulators/mupen64plus-rpi/test/InputAutoCfg.ini </code>\n\nand add the following section\n\n  [Gamecube controller]\n  plugged = True\n  plugin = 2\n  mouse = False\n  AnalogDeadzone = 4096,4096\n  AnalogPeak = 32768,32768\n  DPad R = hat(0 Right)\n  DPad L = hat(0 Left)\n  DPad D = hat(0 Down)\n  DPad U = hat(0 Up)\n  Start = button(7)\n  Z Trig = button(4)\n  B Button = button(1)\n  A Button = button(0)\n  C Button R = button(3)\n  C Button L = button(5)\n  C Button D = button(2)\n  C Button U = button(6)\n  R Trig = button(6)\n  L Trig = button(5)\n  Mempak switch = key(109)\n  Rumblepak switch = key(114)\n  X Axis = axis(0-,0+)\n  Y Axis = axis(1-,1+)\n\n== References ==\n\n[[GameCube opening]] http://www.ifixit.com/Teardown/Nintendo+GameCube+Teardown/1727<br />\n[[gamecon_gpio_rpi driver]] https://github.com/petrockblog/RetroPie-Setup/wiki/gamecon_gpio_rpi<br />\n[[GameCube gamepad pinout]] http://www.int03.co.uk/crema/hardware/gamecube/gc-control.html<br />\n[[RetroPie]] http://blog.petrockblock.com/retropie/<br />\n[[GameCube gamecon]] http://www.davesblog.com/blog/2013/12/27/hacking-the-gamecube-controller-on-the-raspberry-pi/ <br />"
                    }
                ]
            },
            "29": {
                "pageid": 29,
                "ns": 0,
                "title": "Rpimidi",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "== Objectif ==\n\nUtiliser un Raspberry Pi comme enregistreur d'un piano num\u00e9rique Yamaha via le protocole MIDI et les ports GPIO du Pi.\n\n== Plate-forme de test ==\n\n* Un Raspberry Pi avec la derni\u00e8re Raspbian\n* Un Arduino pour simuler le piano Yamaha et envoyer des notes au format MIDI\n\n=== Arduino ===\n\n* R\u00e9cup\u00e9rer la [https://github.com/FortySevenEffects/arduino_midi_library/ librairie MIDI pour Arduino]\n\n* Ins\u00e9rer le code de test suivant dans l'Arduino\n\n<syntaxhighlight lang=\"c\">\n#include <MIDI.h>\n\n// Simple tutorial on how to receive and send MIDI messages.\n// Here, when receiving any message on channel 4, the Arduino\n// will blink a led and play back a note for 1 second.\n\nMIDI_CREATE_DEFAULT_INSTANCE();\n\n#define LED 13   \t\t    // LED pin on Arduino Uno\n\nvoid setup()\n{\n    pinMode(LED, OUTPUT);\n    MIDI.begin(4);          // Launch MIDI and listen to channel 4\n}\n\nvoid loop()\n{\n    digitalWrite(LED,HIGH);\n    MIDI.sendNoteOn(42,127,1);  // Send a Note (pitch 42, velo 127 on channel 1)\n    delay(1000);\t\t        // Wait for a second\n    MIDI.sendNoteOff(42,0,1);   // Stop the note\n    digitalWrite(LED,LOW);\n    delay(1000);\n}\n</syntaxhighlight>\n\n* C\u00e2blage\n[[Fichier:MIDI bb.png|center|thumb|C\u00e2blage Arduino - port MIDI]]\n\n[[Fichier:Gpio midiin circuit.jpg|center|thumb|C\u00e2blage port MIDI - PI]]\n\n=== Pi ===\n\n* Editer ''/boot/config.txt'', ajouter les lignes suivantes et red\u00e9marrer :\n\n<syntaxhighlight lang=\"bash\">\ninit_uart_clock=2441406\ninit_uart_baud=38400\ndtparam=uart0_clkrate=3000000\n</syntaxhighlight>\n\n* Installer ''ttymidi'' :\n\n<syntaxhighlight lang=\"bash\">\nsudo apt-get install libasound2-dev\ncd /usr/src\nwget http://www.varal.org/ttymidi/ttymidi.tar.gz\ntar xf ttymidi.tar.gz\ncd ttymidi\nsed -i 's/-lasound/-lasound -lpthread/' Makefile\nmake\n</syntaxhighlight>\n\n* Tester (une fois que l'Arduino est bien connect\u00e9 au Pi par l'interm\u00e9diaire du port MIDI)\n\n<syntaxhighlight lang=\"bash\">\n# Lancer une capture depuis /dev/ttyAMA0 et creer un client MIDI Alsa \"test\"\n/usr/src/ttymidi/ttymidi -s /dev/ttyAMA0 -b 38400  -v -n test\nSerial  0x90 Note on            000 042 127\nSerial  0x80 Note off           000 042 000\nSerial  0x90 Note on            000 042 127\n</syntaxhighlight>\n\n* Depuis un autre shell sur le PI, capturer le flux MIDI et l'\u00e9crire dans un fichier\n<syntaxhighlight lang=\"bash\">\nsudo apt-get install midish\nsmfrec -i test /tmp/test.mid\n</syntaxhighlight>\n\n* Sit\u00f4t le fichier ''test.mid'' rappatri\u00e9, il est possible de le tester avec ''timidity'' (depuis un poste disposant d'une sortie audio ^^)\n<syntaxhighlight lang=\"bash\">\ntimidity test.mid\n</syntaxhighlight>"
                    }
                ]
            }
        }
    }
}