Skip to content

Commit 4e9e426

Browse files
committed
V1.1
Instructions on how to create raw image files for the imgserial tool
1 parent 6298021 commit 4e9e426

File tree

7 files changed

+43
-3
lines changed

7 files changed

+43
-3
lines changed

examples/imgserial/readme.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,28 @@ It is important to have a 10µF Capacitor between the RST pin of the Arduino and
1616
In a shell type `./imgserial.linux file.data port`.
1717
Port is the same as used by the Arduino IDE, for example /dev/USB0.
1818
A capacitor is not needed here.
19-
20-
### Compilation
19+
***
20+
## Compilation
2121
The example comes with precompiled binaries, but the source file can be compiled with `g++ imgserial.cpp -o imgserial.<extension> <-static>`
2222

23-
On Windows, Cygwin with Gnu C++ compilers (GCC) must be installed. The executable needs the cygwin1.dll or a Cygwin environment to run. If there is no Cygwin environment on the target machine, the Windows libraries needs to be statically linked into the executable by the *-static* option. For example `g++ imgserial.cpp -o imgserial.exe -static`.
23+
On Windows, Msys64 with Gnu C compilers (GCC) must be installed. The executable needs the cygwin1.dll or a Cygwin environment to run. If there is no Cygwin environment on the target machine, the Windows libraries needs to be statically linked into the executable by the *-static* option. For example `g++ imgserial.cpp -o imgserial.exe -static`.
24+
25+
***
26+
## Create data files from images
27+
I recommend Gimp to convert the images. Before you can proceed, import the *tms9918.gpl* color palette file into Gimp.
28+
29+
1. Crop and scale the image until it has a size of 256x192 pixels
30+
2. Open Jannone's MSX Screen Image Converter https://msx.jannone.org/conv/
31+
3. Upload the file (Must be JPG, PNG or GIF; up to 400 kb). Select `"MSX 1 Colors"` and try the options below until you find the one that looks best <br>
32+
![screenshot](/html/msxconv1.jpg)
33+
34+
4. Download the preview image <br>
35+
![screenshot](/html/msxconv2.jpg)
2436

37+
5. Open Preview in Gimp. Assign the *tms9918* color palette: ```Image->Mode->Indexed...``` Select *tms9918.gpl* as custom palette in the dialog and click ```Convert```. <br>
38+
![screenshot](/html/gimp1.JPG)
2539

40+
6. Export image as raw image data file ```(File->Export)```. <br>
41+
![screenshot](/html/export.JPG)
2642

43+
The .data file must have a size of 48KB

examples/imgserial/tms9918.gpl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
GIMP Palette
2+
Name: TMS9918
3+
Columns: 16
4+
#
5+
0 0 0 Untitled
6+
33 200 66 Untitled
7+
94 220 120 Untitled
8+
84 85 237 Untitled
9+
125 118 252 Untitled
10+
212 82 77 Untitled
11+
66 235 245 Untitled
12+
252 85 84 Untitled
13+
255 121 120 Untitled
14+
212 193 84 Untitled
15+
230 206 128 Untitled
16+
33 176 59 Untitled
17+
201 91 186 Untitled
18+
204 204 204 Untitled (occurs 4769)
19+
255 255 255 Untitled (occurs 855)
20+
0 0 0 Untitled

html/export.JPG

68.3 KB
Loading

html/gimp1.JPG

243 KB
Loading

html/msxconv1.jpg

186 KB
Loading

html/msxconv2.jpg

64.6 KB
Loading

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ Copy all to the *library* folder of your Arduino IDE to install the library. Che
77

88
## Watch video to learn more about the TMS9918.
99
[![Youtube video](html/thumbnail.jpg)](https://youtu.be/smgGB_CsXns)
10+
11+
## Build a TMS9918 based graphic card.
12+
[![Youtube video](html/thumbnail2.jpg)](https://youtu.be/GUQpiGspY08)

0 commit comments

Comments
 (0)