how to generate custom font for retroarch rgui

Here, I will introduce how to create fonts for retroarch rgui. Most of them were made by analyzing the retroarch source. If there are resources that need to be converted, I will review them at any time. Resources for fonts include bmp, png, font, ttf, and bdf format. In the traditional retroarch rgui, the bmp font file was converted to a 1 bit color depth and into a file that could be read from c. I guess the reason why tools for conversion are not readily available is because of their unique structure.

First of all, I will explain the basic font, English font. It was 5x10 in size at first.

If you analyze the first letter of !… hexadecimal value

0x80, 0x10, 0x42, 0x08, 0x20, 0x00, 0x00,

Convert to Binary

1000 0000
0001 0000
0100 0010
0000 1000
0010 0000
0000 0000

Place it in a little endian and cut it into 5 pixels

00000
00100
00100
00100
00100
00100
00000
00100
00000000

The source code in retroarch for this is as follows.

unsigned font_pixel = x + y * FONT_WIDTH;
uint8_t rem         = 1 << (font_pixel & 7);
unsigned offset     = font_pixel >> 3;
uint8_t col         = (bitmap_bin[FONT_OFFSET(letter) + offset] & rem) ? 0xff : 0;

The font was recreated by IlDucci’s request to improve the second Cyrillic language display error. It was 6x10 in size at first.

Each letter is separated by 16 pixels, of which only 6x10 is a meaningful area.

For this purpose, I created a conversion program using the SDL function.

It can be generated simply as follows.

./png2c bitmap_cyrillic.png

Please refer to the location below for the code to build.

https://github.com/trngaje/png2c

You can download prebuilt images for Windows from the path below. https://github.com/trngaje/png2c/releases/tag/windows_64bit_png2c_220924

unzip windows_64bit_png2c_prebuild_220924.zip

png2c.exe bitmap_cyrillic.png

2023

rgb30 빌드 환경

1 분 소요

rgb30 기기를 위한 이미지는 크게 jelos와 arkos가 존재합니다. 각각 다른 빌드 환경에서 에뮬레이터/프론트엔드/코어를 빌드 합니다.

8bitdo m30 for linux

최대 1 분 소요

Press and hold for 5 sec. If LED blinks, the mode has changed. There are three modes that can be set, and they are as follows.

rgnano build sm64

최대 1 분 소요

빌드를 하기 위해서는 docker 환경 내에서 작업 합니다.

rgnano ffmpeg build

1 분 소요

ffmpeg, ffplay 를 구동하기 위한 빌드환경을 설명합니다.

rgnano build 환경

1 분 소요

rgnano 용 이미지는 2종 (anbernic 생산 버젼, funkey DrUm78 custom 버젼) 존재합니다. 빌드 환경이 서로 다르기 때문에 각각 빌드된 프로그램은 실행되지 않음

rgnano simplemenu 구동

1 분 소요

rgnano는 240x240 해상도를 갖고 있다. 하지만 simplemenu는 320x240, 640x480 테마만 가지고 있다. rgnano에서 simplemenu 프론트엔드를 적용하기 위해서 기존 테마를 가공한 필요가 있었다.

miyoo mini + advmenu ip 및 배터리 값 표시

최대 1 분 소요

휴대용 기기를 위한 ip 주소 값과 배터리 상태 값을 표시한다. advmenu.rc 상에서 값 읽는 스크립트를 자유롭게 바꿀 수 있게 설계 한다. 메뉴 일부분을 한글로 구현 한다. core와 에뮬레이터를 advmenu 메뉴를 통해 변경할 수 있다.

miyoo mini + docker

최대 1 분 소요

mm+ 용 에뮬레이터를 빌드하기 위해서는 아래 toolchain을 사용해야 합니다. build 확인된 commit 시점으로 이동합니다.

miyoo mini + key value

최대 1 분 소요

miyoo mini + generates keyboard value when press each button. button value is below.

ogu linapple 구동

1 분 소요

linapple은 sdl1.2 기반으로 구현되어 있습니다. ogu에서 구동하기 위해서는 sdl2.0으로 변경 필요합니다.

ogu bluealsa 설치

1 분 소요

bt a2dp sink 출력을 하기 위해서는 pulseaudio를 설치해야 합니다만, bt 오디오 출력이 없어도 일정 수준으로 cpu를 사용하고 있기 때문에 다른 대안 중에 하나가 bluealsa 입니다.

ogu xpadneo 구동

3 분 소요

BT gamepad에서 진동 기능을 사용하려면 xpadneo를 설치해야 합니다. 기기 내에 linuxheader 를 설치 하고

ogu dosbox pure 로 windows95/98 설치

1 분 소요

ogu 에서 windows 95/98 용 프로그램을 실행하기 위해서는 dosbox pure를 사용하여 windows 95/98을 설치해야 합니다. 설치하기 위한 hdd.img 를 만들고, window 95/98 cd를 설치한 후, 원하는 게임롬과 함께 windows 95/98 os...

ogu flycast

1 분 소요

libretro core github에 있는 flycast 동작이 이상합니다. 개선을 위해 보다 최신 github 소스를 사용해 봅니다

맨 위로 이동 ↑

2022

ogu devilutionX 구동

최대 1 분 소요

diablo 이미지를 구동하기 위한 엔진입니다. 아래 방법으로 빌드 할 수 있습니다. docker 환경에서 빌드 가능합니다.

ogu gl4es

최대 1 분 소요

64bit / 32bit 모두 빌드 가능합니다.

ogu box86,box64

최대 1 분 소요

pc linux 용 x86/x64 를 arm 기기에서 실행하기 위해서는 box86,box64 가 필요합니다.

ogu sdcard 인식문제 해결 방법

2 분 소요

v1.1 (2022/09/26) ubuntu 20.04 기본 이미지에서는 reboot 시 sdcard 인식되지 않는 문제를 해결하기 위해서는 uboot와 kernel을 수정해야 합니다.

ogu mame current

최대 1 분 소요

mame는 빌드시 memory를 많이 필요로 하기 때문에 빌드 중간에 멈추는 현상을 방지하려면 사전에 swap 메모리 확보가 필요합니다.

ogu backup image

최대 1 분 소요

recovery mode 진입 : l2 + r2 + power 키로 전원을 키면 recovery mode로 진입한다.

ogu log

최대 1 분 소요

불필요한 log 가 쌓이는 것을 막기 위해서는 사이즈 제한을 해야 합니다.

ogu openbor

최대 1 분 소요

sudo apt install libvpx-dev libvorbisidec-dev git clone https://github.com/DCurrent/openbor

ogu easyrpg

최대 1 분 소요

easyrpg standalone 사용방법

ogu toolchain

1 분 소요

pc 환경에서 ogu 소스를 빌드하기 위해서는 toolchain을 설치해야 합니다. pc에서 빌드해야 하는 소스는 linux kernel과 uboot 이 있습니다.

ogu core build

최대 1 분 소요

retroarch core build 관련해서 정리해 봅니다.

ogu attractmode

최대 1 분 소요

ogu 장치에 맞게 attracmode 구동을 위한 sfml 라이브러리를 변경합니다.

ogu libgo2 코드 libgou로 수정

최대 1 분 소요

libgo2 로 작성된 코드를 libgou로 대체하기. retrorun go2와 gou 코드를 비교하여 기존에 작성된 코드를 수정한다.

ogu 자동실행 구문 수정

1 분 소요

ubuntu 에서 부팅시 자동으로 emulationstation을 실행해 주고 있으나, killall 로 죽여도 살아나기 때문에 개발에는 적합하지 않아 수정해 줍니다.

miyoo-mini rumble motor 제어 방법

2 분 소요

기술 관련 전문 (motor 테스트 앱에 포함되어 있는 pdf 에 적혀 있는 내용을 내마음 대로 번역해 보았습니다.)

하루전날 테스트

최대 1 분 소요

Welcome 포스팅이 되지 않아 하루전날 파일 생성해서 테스트 해봅니다.

맨 위로 이동 ↑