Guide to modifying ICONDATA.VMS

Moderators: pcwzrd13, deluxux, VasiliyRS

User avatar
Slurmking
lithium
Posts: 45

Guide to modifying ICONDATA.VMS

Post#1 » Tue Oct 10, 2017 5:20 pm

Introduction
This post will educate you in the hex values and image format for ICONDATA.VMS. This has taken me over 2 days to figure out so please be respectful.

I decided to write this guide because all the information I was able to find was either incorrect or incomplete. Please enjoy!

Every example is taken directly from my hand written icon
http://slurmking.net/dream/VMU/ICONDATA/IconData.zip


Mono Chrome Icon
The monochrome icon is a 128 byte 1bpp bitmap starting at the offset defined at 0x10. Each row consists of 4 pairs of 4bit hex values that translate into the corresponding bitmap
For example in the image below you will see row one is equal to 02 00 00 40, translated into binary that reads
0000 0010 0000 0000 0000 0000 0100 0000
Where 1 is a black pixel and 0 is a white pixel
Image

Color Icon
Image
The color icon begins 16 bits after the offset defined at 0x14 as the first 16 bits are the color pallet.
The color icon is 512 bytes in order. Each nibble of the hex byte refers to the corresponding color pallet.

For example the first row of this image is
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
where
4 = color #4
2 = color #2, and so on...

Color Pallet
Image
This is the color pallet from the above sample. In the chart above the colors are numbered from 0 to F this is in relation the order the colors appear and it is also the number used for the icon data.

The pallet code will start at the offest defined at value 0x14 and will contain 16 16-bit little endian integers

Code: Select all

00 F0 0F 0F 69 F6 CC FC 88 F3 FC FF FC FF 99 F9
77 F7 44 F4 21 F2 A0 FF 61 F9 93 FC CB FC 00 F0


Colors

The color value of this image is split into 2 hex bytes which contain the Red, Green, Blue, and, Alpha values for the color. The values are in the wrong order however and actually appear as GBAR thus the layout is GB AR
*(The A value is for the transparency, 0 being Transparent and F being opaque)
Image
As you can see from the above example you are only able to create hex colors with with a double value therefore a color like #55CCAA is possible but a color like #59C6AB is not

Finished Code
Image

Code: Select all

00 F0 0F 0F 69 F6 CC FC 88 F3 FC FF FC FF 99 F9
77 F7 44 F4 21 F2 A0 FF 61 F9 93 FC CB FC 00 F0
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 22 22 22 22 22 22 22 22 22 22 44 44 44
44 44 22 33 33 33 33 33 33 33 33 33 33 24 44 44
44 42 33 30 00 00 00 00 00 00 00 00 03 32 24 44
44 23 30 06 66 66 66 00 00 06 66 66 60 03 32 44
44 23 00 66 66 66 66 00 00 66 66 66 66 00 32 44
42 33 06 66 66 66 66 66 06 66 66 66 66 60 03 24
42 30 06 66 60 00 66 66 06 66 60 00 66 60 03 24
42 30 06 66 60 00 66 66 06 66 60 00 66 60 03 24
42 30 00 66 60 00 66 60 00 66 60 00 66 00 03 24
44 23 00 06 66 66 66 60 00 66 66 66 66 00 32 44
44 23 00 06 66 66 66 00 00 06 66 66 60 00 32 44
44 42 30 00 00 00 00 00 00 00 00 00 00 03 24 44
44 44 23 30 00 00 00 00 00 00 00 00 03 32 44 44
44 44 42 33 33 33 33 33 33 33 33 33 33 24 44 44
44 44 44 22 22 22 22 22 22 22 22 22 22 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 44 42 00 00 00 00 00 00 00 00 24 44 44 44
44 44 44 42 66 06 66 66 06 66 60 66 24 44 44 44
44 44 44 42 00 00 00 00 00 00 00 00 24 44 44 44
44 44 44 42 66 06 66 66 06 66 60 66 24 44 44 44
44 44 44 22 00 00 00 00 00 00 00 00 22 44 44 44
44 44 44 22 66 06 66 66 06 66 60 66 22 44 44 44
44 44 44 22 00 00 00 00 00 00 00 00 22 44 44 44
44 44 44 23 33 33 33 33 33 33 33 33 32 44 44 44
44 44 22 33 33 33 33 33 33 33 33 33 33 22 44 44
44 42 33 33 33 33 33 33 33 33 33 33 33 33 24 44


Image

Special thanks
Special thanks to the beautifully written guides at http://mc.pp.se/dc/, this definitely gave me a head start on the project.
Last edited by Slurmking on Tue Oct 10, 2017 10:03 pm, edited 2 times in total.

mrneo240
Rank 9
Posts: 926

Re: Guide to modifying ICONDATA.VMS

Post#2 » Tue Oct 10, 2017 7:05 pm

Have any code to drop? Or did you do it by hand?

User avatar
Slurmking
lithium
Posts: 45

Re: Guide to modifying ICONDATA.VMS

Post#3 » Tue Oct 10, 2017 7:07 pm

mrneo240 wrote:Have any code to drop? Or did you do it by hand?

I tried but I'm not great at code. So yes I hand wrote bit by bit 2 BMP images like in the NES days

mrneo240
Rank 9
Posts: 926

Re: Guide to modifying ICONDATA.VMS

Post#4 » Tue Oct 10, 2017 7:22 pm

could you do me a huge favor and upload the icondata.vms you made?

User avatar
Slurmking
lithium
Posts: 45

Re: Guide to modifying ICONDATA.VMS

Post#5 » Tue Oct 10, 2017 7:27 pm

mrneo240 wrote:could you do me a huge favor and upload the icondata.vms you made?


http://slurmking.net/dream/VMU/ICONDATA/IconData.zip

mrneo240
Rank 9
Posts: 926

Re: Guide to modifying ICONDATA.VMS

Post#6 » Tue Oct 10, 2017 7:27 pm

you da realest MVP

User avatar
Slurmking
lithium
Posts: 45

Re: Guide to modifying ICONDATA.VMS

Post#7 » Tue Oct 10, 2017 7:29 pm

If you want to test your results I recommend loading the VMI in VMU explorer, just make sure the VMI and VMS are in the same directory

mrneo240
Rank 9
Posts: 926

Re: Guide to modifying ICONDATA.VMS

Post#8 » Tue Oct 10, 2017 8:57 pm

;) we got a good thing going

Image

User avatar
Slurmking
lithium
Posts: 45

Re: Guide to modifying ICONDATA.VMS

Post#9 » Tue Oct 10, 2017 9:01 pm

mrneo240 wrote:;) we got a good thing going



You are a machine man I dreamed about how to do something like that but I kept running into problems with manipulating hex values. It took me 2 hours just to make the chao generator relate the generated hex values to an array to show you what chao was made

mrneo240
Rank 9
Posts: 926

Re: Guide to modifying ICONDATA.VMS

Post#10 » Tue Oct 10, 2017 9:05 pm

well the good news is that reading a file is easier than writing a file BUT after you know how to read a file, writing a file becomes a million times easier.

its not even started yet but i wanted to get this working at least.

  • Similar Topics
    Replies
    Views
    Last post

Return to “Modifications”

Who is online

Users browsing this forum: No registered users