I know VGA better so here is a documentation of how to create icons:
1) Find some images
2) Do a screen capture with paint shop
3) Do copy/paste and size to 64x64 pixels
4) Paintfill the outside with black if it is white or another color.
5) Colors/Load Palatte and load the VGA 64 color palatte. Changes to these colors
6) Colors and increase the depth to 24 bit (makes the maths easier below)
7) Save as a RAW file (raw binary data, 3 bytes per pixel, no headers)
8) Run a tiny vb.net program
9) save as a name ending in .ico (they are actually binary files so rename as .bin to view)Code:Private Sub Button92_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button92.Click Dim b As Byte Dim i As Long Dim j As Byte Dim k As Long Dim Bitmap(12287) As Byte ' 64*64*3 Dim Output(4095) As Byte Dim BinaryInput As New BinaryReader(File.Open("c:\" + TextBox46.Text, FileMode.Open)) Dim BinaryOutput As New BinaryWriter(File.Create("c:\" + TextBox47.Text, FileMode.Open)) For i = 0 To 12287 Bitmap(i) = BinaryInput.ReadByte Next j = 0 ' propeller format is RRGGBBxx For i = 0 To 4095 b = Bitmap(i * 3) j = 0 If b = 0 Then j = j + 0 ' 00 red If b = 85 Then j = j + 64 ' 01 If b = 170 Then j = j + 128 ' 10 If b = 255 Then j = j + 192 ' 11 b = Bitmap(i * 3 + 1) If b = 0 Then j = j + 0 ' 00 green If b = 85 Then j = j + 16 ' 01 If b = 170 Then j = j + 32 ' 10 If b = 255 Then j = j + 48 ' 11 b = Bitmap(i * 3 + 2) If b Then j = j + 0 ' 00 blue If b = 85 Then j = j + 4 ' 01 If b = 170 Then j = j + 8 ' 10 If b = 255 Then j = j + 12 ' 11 Output(i) = j ' store value Next For i = 0 To 4095 BinaryOutput.Write(Output(i)) Next BinaryInput.Close() BinaryOutput.Close() MsgBox("Done") End Sub
10) Copy file to sd card
11) Run the attached spin code (a hybrid of Ariba's screen driver and Kye's sd card, with behind the scenes debugging using the VT100 VGA driver)
I think the Prop is ready for graphics!
So, next little thing -
a) getting Ariba's code to work so the pixels are smaller (same hub ram, most of screen is black)
b) translating these .ico files into TV
Is there a simple table that converts the 64 vga colors into the nearest TV color?
Failing that, a table for RGB to TV colors. (In some ways it would be better to start with the 24bit original file rather than the one that has been reduced to 64 bits).
This operating system is called PotatoDOS.



Reply With Quote


Their placement and size on screen will be able to vary considerably with the new tile addressing, with a lot less grunt work or code being required to format the data in a way that makes sense to the Propeller graphics COG.
Bookmarks