How to use the Lakka system to transform the Raspberry Pi into a game console？
When I was a child, I had a yearning for my classmates to play Pokemon and Super Mario. Now, through the Raspberry Pi, I can realize the dream of having a small game console in the past. And this "modified" game console has more convenience (free of the insertion of the game card), multi- function.
As a small Linux-based game system, Lakka can realize the idea of turning the Raspberry Pi into a game console.
By installing the Lakka system on the Raspberry Pi, you can transform the Raspberry Pi into a retro game console. A few pieces of equipment necessary for a game console: display (for displaying the content of the game), game controller (for controlling the game), processor core (for the operation of the game)
The first step is to download the Lakka system from the official website. Lakka itself has been optimized for the Raspberry Pi and is compatible with the second and third generations of the Raspberry Pi. The download speed of the official website is OK, basically no accelerator or mirror source is needed. After the download of about 200M Lakka, you can use the better SD card burning software win32diskimage in the Windows environment to burn. The basic use of win32diskimage software only needs to extract the downloaded image file and select the SD card to be programmed by the software (win2diskimage can also burn the hard disk)
After the programming is finished, you can start the second part, which is to insert the SD card into the Raspberry Pi, and then use the HDMI conversion cable to connect to the display to display a graphical interface.
Next you can also set a static IP in Lakka. The way to do this is to type #ifconfig on the command line to find the Mac address, which is the sixteen-digit alphanumeric code at HWaddr in the figure below. If you have a monitor in this step, you can see the information and address of the network under "Information" in the menu bar.
After obtaining the Mac address, we can set the static IP in the LAN by binding the Mac address and the fixed IP address. It is worth noting here that whether the LAN is connected to the external network has no effect on the SSH connection of the Raspberry Pi. For example, in the campus network, as long as the IP address can be found, the Raspberry Pi connection between the computer and the Lakka system can be realized.
In the command line, enter the command $connmanctl config <service> --ipv4 manual <ipaddress> <netmask> <gateway>, where you can set the required fixed IP address at the ip address.
The purpose of setting up a fixed IP is to make it easy to connect when using SSH to connect to the Raspberry Pi. This method is more effective when there is sometimes no display. After installing the last WiFi connection, Laberry's Raspberry Pi will automatically connect to the previously connected WiFi as long as it is in the same network environment.
After configuring the network environment, you can connect your Rakaberry-based Laberry Party to your computer. You can easily transfer game files or perform other operations from your computer.
As the saying goes, "Enjoying happiness alone is not as happy as sharing it." When playing games, I hope to play with my friends at the same time. Lakka supports up to 5 input devices (already surpassing the 4 ports that the Raspberry Pi itself comes with). We can add multiple handles in Lakka to achieve the desire to play multiplayer games locally. The Lakka system supports input using a handle or a keyboard, but the point to note is that there is a bug in the place where the WiFi password is entered when the keyboard is input, resulting in the inability to exit the WiFi password interface. This can be solved if a handle is used. Lakka can support most of the handles on the market. The supported handle models are available on the official website.
Adding a handle can be found in "Input" in the menu bar. By setting and turning on the input user device, the Lakka system can achieve multiplayer simultaneous games. One thing to note here is that if you use the handle to switch the device type to another type in the user device index, it will cause the current handle to be unusable (the keyboard is not affected), this may be the system. A design flaw. For example, the device connected in Figure 5 is the Xbox controller, but when debugging, it is set to the gamepad type instead of the Xbox type. After the setting is completed, the system automatically saves. Here, you can modify the interface and set the hotkeys of the gamepad.
After the preparation steps are ready, you can add your own game to Lakka. If you don't do anything, you can only play the 2048 game that comes with the system, and other games can't play. An easy way to add your own game is to use WinSCP under Windows to transfer files. WinSCP connects to the Raspberry Pi via SSH, and then puts the prepared game in the roms directory of the Raspberry Pi. It is recommended to set a separate folder for each game to save for later viewing or under command line conditions. The Raspberry Pi can support all kinds of early game formats. The specific support list is listed in detail on the official website.
The method of adding your own game on the official website, the premise is to link the Raspberry Pi to the same LAN through the network cable, and then open the network on the desktop, you can see a file called Lakka (if you can't find it, you can enter \\LAKKA Access), you can find a lot of shared folders after opening it, the ROMS folder is used to store the game, the steps are basically similar to WinSCP. You can copy the downloaded games into it.
The Lakka system comes with some game support methods, such as the early .nes file can be used by running the system's own NES core (two kinds). For some of the later games, you can scan the uploaded folder through the system's own scan file.