TALK IS CHEAP, SHOW ME THE CODE.

The PocketChip doesn’t have a built-in speaker; it only gives you a 3.5mm headphone jack.

Sometimes you don’t feel like carrying headphones around and just want sound out loud. What then?

Since the PocketChip exposes its GPIO, we can solder one in ourselves!

This mod is cheap, and anyone with a pair of hands can do it.

Buy the Parts#

No parts, no mod.

  • 8Ω 23mm mini speaker * 2 Recommended link
  • Mini Class D amplifier board * 1 Recommended link
  • Soldering iron * 1
  • Rosin * 1
  • Solder wire * 1
  • Hot glue gun * 1
  • Hot glue sticks * 1
  • Some 30AWG wire
  • Heat-resistant insulating tape * 1
  • Someone who can solder * 1
  • One PocketChip (I assume everyone reading this has one)

(I forgot to include the hot glue and the glue gun in the photo above.)

Unplug the Power Connector#

Before soldering, you must unplug the power connector, otherwise it isn’t safe.

Read More

RetroArch is an all-in-one emulator. By loading different emulator cores it can run games for all kinds of systems, and you can tweak all sorts of settings and add filters and shaders to give an ordinary screen that retro feel.

Preparation#

Install the dependencies#

I won’t go through them one by one this time; here’s every dependency you need in one go!

sudo apt update
sudo apt install -y libsdl1.2-dev libsdl2-dev libboost-system-dev libboost-filesystem-dev libboost-date-time-dev libfreeimage-dev libfreetype6-dev libeigen3-dev libcurl4-openssl-dev libasound2-dev libgl1-mesa-dev cmake build-essential pkg-config

Get the RetroArch source code#

git clone https://github.com/zzxzzk115/RetroArch.git

Installing RetroArch#

cd RetroArch
./configure --prefix=/home/chip/retroarch --enable-opengles --disable-oss --disable-sdl --disable-ffmpeg --disable-vg --disable-cg --enable-neon --enable-floathard --disable-wayland --disable-pulse --enable-dylib --enable-hid --enable-zlib --enable-7zip
make -j2
sudo make install
sudo chmod +x /home/chip/retroarch/bin/retroarch
sudo ln -s /home/chip/retroarch/bin/retroarch /usr/bin/retroarch

Running it#

retroarch

Problems I ran into#

At first some parts show up as black boxes. That’s because the assets haven’t been downloaded.

Choose Online Updater->Update Assets and wait for it to download and extract automatically.

Read More

This post is reposted with permission. Original article: https://www.xuefei.net.cn/index.php/archives/89/ (the site has shut down; see the Wayback Machine copy)

Author: xuefei · Date: 2020-04-14 · Category: pocketchip

Install the dependencies:

sudo apt-get install cmake
sudo apt-get install libx11-dev

Build gl4es:

git clone https://github.com/ptitSeb/gl4es.git
cd gl4es
mkdir build
cd build
cmake .. -DCHIP=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
# -j2 left out: it tends to run out of memory
make

Replace the system libGL:

cd ../
cd lib/
sudo mv libGL.so.1 /usr/lib/arm-linux-gnueabihf/libGL.so.1.2.0

If you installed xf86-video-fbturbo (that post went down with the original site) before, disable it first:

sudo nano /etc/X11/xorg.conf

Comment out the fbturbo device section:

#Section "Device"
#        Identifier      "Allwinner A10/A13 FBDEV"
#        Driver          "fbturbo"
#        Option          "fbdev" "/dev/fb0"
#        Option          "SwapbuffersWait" "true"
#EndSection

Then reboot and test:

sudo apt-get install mesa-utils
glxgears

On the GUI edition you should see the picture below; on the home edition you might not see the gears, because the window is too big…

Read More

Chapter 3: busy waiting, the performance monitor, WaitForSingleObject and signaled objects.

Read More

Love2d is a game engine written in C/C++ and wrapped with Lua scripting. It’s simple, easy to use and cross-platform.

After switching the PocketChip’s package sources and updating, the version you get via sudo apt-get -f install love is just way too old (0.9).

Sure, 0.10.2 is a bit newer than 0.9, but it’s still relatively old. I tried it, and No909.love won’t run properly because it was written for version 11.1.

So this time I tried installing version 11.3. The goal is to be able to run No909.love, which ships with the GameShell by default.

Read More

Someone has already pulled off this mod and shared the process on GitHub. Here’s the repo: https://github.com/Yvees/GameShellHacking

Sourcing the parts#

Here’s what we need:

  1. A 3.5-inch screen (320 x 240 or 640 x 480)
  2. A 6cm 45-pin opposite-side FPC cable
  3. A PCB adapter board
  4. FPC connectors * 2: a 0.3mm H1.0 45P flip-lock and a 0.5mm H2.0 54P flip-lock
  5. A 3D-printed front shell

There are roughly two good choices for the screen. One is Kedake’s 320 x 240, Taobao link

The other is this 640 x 480 from Chenchen Technology, Taobao link

Pick whichever suits you. Make sure you tell the seller you want the 18V series version! The key word is series!

The FPC cable: Taobao link

The PCB adapter board and FPC connectors need to be custom-made and soldered; of course, if you know how to solder, you can buy everything and solder it yourself.

For the PCB I recommend this shop, and here are the links for the two FPC connectors: (1) (2)

Read More

I hereby declare that, starting today, this lazy dog is officially jumping into the deep pit of writing an operating system from scratch, following 30 Days to Make Your Own OS but with more modern tools and ideas. Updates will be irregular (blame my laziness…).

This series won’t go deep into theory; it’s mainly my own hands-on process. For the theory, read the book.

Read More

How do you play with a GameShell? Let me show you!

What Is GameShell#

GameShell is an open-source handheld console made by clockwork. When you get it, you have to assemble it yourself, insert an SD card, and power it on.

Its core board is called clockworkpi, which looks a lot like a Raspberry Pi and runs Arm Linux (Debian). The button module uses an Arduino controller, and the screen is a 320 * 240 LCD. It supports Bluetooth and WiFi, and exposes the Arduino output pins as well as the core board’s GPIO. All of GameShell’s software and hardware is public and transparent: the operating system, the 3D-printing files for the case, the circuits, the schematics — you can find all of it on GitHub. Truly, fully open source.

You can use it to emulate games from lots of platforms, and it also natively supports PICO-8, TIC-80, Love2D, and HTML5 games running through nw.js.

It’s fair to say that gamers, indie game developers, makers and GEEKs alike will find it hard to put down.

Read More

Chapter 2#

From this chapter on, we formally get into Win32 multithreaded programming.

Read More

Chapter 1#

Definition of Multithreading#

According to the book, the simple, big-picture definition is:

Multithreading lets a program split up its work so that the pieces run independently without affecting each other.

Wikipedia’s definition is:

In computer architecture, multithreading is the ability of a central processing unit (CPU) (or a single core in a multi-core processor) to provide multiple threads of execution concurrently, supported by the operating system.

In other words,

Multithreading is the ability of multiprocessor machines and multi-core processors to run multiple threads in parallel, carried out by the operating system.

Read More
TOP