Jump to content

Uploading Palette Text Files To Pin2Dmd


gtxjoe

Recommended Posts

  • Content Provider
Posted

I am playing around with the pin2dmd.exe command line options.  Questions

 

 

1) For vPinMame, does vPinMame only these 4 values out of the 16 palette values, indexes 0, 1, 4 and 15?  EDIT:  It looks like the Stern SAM roms use more is it all 16 color palettes?

 

 

2)  If I want to manually upload a color palette, is this the proper format for just sending 1 palette?  It works, I just want to make sure it is the correct format.  I only changed the background, index 0 to Red.

pin2dmd /t testpalette.txt

 

where testpalette.txt contains

[palettes]
npalettes=1
defaultpalette=0
palette0=Default,0xFFFF0000,0xFF7F0000,0xFFFF0000,0xFFFF00FF,0xFF007F7F,0xFF007F00,0xFF00FF00,0xFF00FFFF,0xFF00007F,0xFF7F007F,0xFF0000FF,0xFF3F3F3F,0xFF7F7F7F,0xFF7F7F00,0xFFFFFF00,0xFFFFFFFF
 
 

3) For all the palette colors, each color is 4 bytes, 0xAARRGGBB where RR, GG, BB are the RGB values, is the AA value used at all?

 

 

Thanks

  • Content Provider
Posted

Hi,

1) You are correct. Official VPinMame only supports 4 colors. SAM PinMame is a non official build

and therefore the palettes need to be uploaded by pin2dmd tool.

2) Starting with the vc++ version of pin2dmd.exe there are 2 versions of textfiles implemented.

There are sample files on github which should be self explaining.

The version you used is uploaded with /t. The second is used with /a (alternative palette)

It uses the following format

Row 1 ROM identifier (currently not used)

Row 2 Number of palettes

Row 3 Default Palette

Row 4 Persistent Palette (needed for SmartDMD)

Row 5 .... Palette Data

Use pin2dmd.exe /t ./palettefile.txt with vc++ version instead of pin2dmd.exe /t palettefile.txt

which worked for vb6 version.

3) That is correct. Color values are stored in 32bit format and the first byte is not used.

Lucky1

  • 3 weeks later...
Posted

Haha...of course good old notepad works, but i wanted it with sliders and stuff, to see the colors instantly! :D
I havet to check Steves editor out! :)

  • 3 weeks later...
  • Content Provider
Posted

lucky1 will you enable the rom identifier soon?

 

Right now I'm using this method but have each table in it's own .txt file. I'd like to put them all in one and at least use something similar to the default palette loading like:

 

pin2dmd.exe /t custompalette.txt

 

to load the palette for a specific game. In these palettes on line one it gives an option to change the number of palettes but I'm not 100% sure how to load the non-default palette from that file...

 

pin2dmd.exe /t custompalette.txt 3

 

to load palette 3... except in a way that works?

  • Content Provider
Posted

Unfortunatelly the implementation of the ROM identifier is not in my hand since it has

to be done by the VPM team. They already have the source to do that.

The idea is to put the palette files in a directory structure e.g. /palettes/"game-name"/palettes.dat

in the vpm directory. A seperate file for each table is preferred since this files also contains

keyframes information etc.

If you want to put your palettes in a single textfile, this can already be done

by using pin2dmd.exe /t combined with /p for setting the default palette for the game.

Lucky1

lucky1 will you enable the rom identifier soon?

 

Right now I'm using this method but have each table in it's own .txt file. I'd like to put them all in one and at least use something similar to the default palette loading like:

 

pin2dmd.exe /t custompalette.txt

 

to load the palette for a specific game. In these palettes on line one it gives an option to change the number of palettes but I'm not 100% sure how to load the non-default palette from that file...

 

pin2dmd.exe /t custompalette.txt 3

 

to load palette 3... except in a way that works?

  • Content Provider
Posted

So

pin2dmd.exe /t custompalette.txt /p 3 

to load the 3rd palette from a custom palettes list? Or am I reading that wrong?

 

These would just be 4 color palettes, none have key frame information or anything

  • Content Provider
Posted

So

pin2dmd.exe /t custompalette.txt /p 3 

to load the 3rd palette from a custom palettes list? Or am I reading that wrong?

 

These would just be 4 color palettes, none have key frame information or anything

 

 

only one option per execution.

 

pin2dmd.exe /t custom palette.txt

pin2dmd.exe /p 3

 

palette information is always 16 colors even when you just use 4 (0,1, 4,15 are used then)

Posted

Does the text file need to be formatted in a particular way? I'm trying to load a custom palatte file and getting a pop up message saying "File Error" when I try to do the following:

 

pin2dmd.exe /t custpal.txt

 

The file is simply a copy of what gtxjoe shows in Post #1 of this thread.

 

I know I'm doing something wrong, but what??

Posted

Please try pin2dmd.exe /t ./custpal.txt or with full path

Pretty sure I tried that, but I just dropped a copy of PIN2DMD-master\tools\vc++\Binary\palettes_option_t.txt into my target directory and tested with that using pin2dmd /t ./palettes_option_t.txt and it worked. I even added a 9th palette to it, made that the default and then ran my batch file again and that worked too.

 

I'm a happy camper now.  :D

  • 2 months later...
  • Content Provider
Posted

 

 

Any news on a solid "original DMD"isch amber color?

 

Just got mine up and running.  Is there an amber palette available?

  • Content Provider
Posted

I havent flashed to latest version yet.  Does this mean upgrading to 2.03 or better - the palette will be defaulted to orange\amber? (a good thing IMO).

  • Content Provider
Posted

You can choose the default palette with pin2dmd.exe and store this setting on a sd-card,

or even create a custom palettes.dat and put it on sd-card, if you wish to startup your

device with another palette

  • Content Provider
Posted

Unfortunately, I dont see an amber version on my Pin2dmd v2.05.  Selecting #8 Gives me a colorized palette.  The others are fine. ex: #6 offers various shades of Yellow.

 

ANy ideas???

2qu7nkm.jpg

  

  • Content Provider
Posted

I assume you are not using the pin2dmd >= 2.05 firmware on your device.

 

Unfortunately, I dont see an amber version on my Pin2dmd v2.05.  Selecting #8 Gives me a colorized palette.  The others are fine. ex: #6 offers various shades of Yellow.

 

ANy ideas???

2qu7nkm.jpg

  • Content Provider
Posted

Yes, and am trying to flash it to 2.05 - but am Not able to do so with the the ST-Link Utility (see below).

 

Here is probably why:  I was able to get the above pin2dmd.exe working along with the PIN2DMD driver - BEFORE flashing to latest firmware.  Now, my system recognizes it as a PIN2DMD device (not ST-Link device).

 

SO, the ST-Link Utility does NOT recognize the device (when I try to connect, I get "No ST-Link detected").  I have tried uninstalling the device AND restoring my system to before I installed PIN2dmd Drivers.  Either way, when plugging the board back in, it still thinks of it as PIN2DMD not ST-Link board....  Do I need to get into the registry somewhere to remove PIN2DMD - so that I can properly flash the board?

  • Content Provider
Posted

For the ST-Link utility you need to connect to the mini usb, just like you did when you flashed with CoIDE.

PIN2DMD.EXE and all other applications use the micro USB.

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...