CPCWiki forum

General Category => Technical Support - General => Topic started by: xavisan on 09:18, 08 March 24

Title: Question for INK palette to Load Screen and export music to VT2 format.
Post by: xavisan on 09:18, 08 March 24
Hello  :)

I just found this forum, which is really great.  :)

I have a question to see if you have any information.

Is there a utility that works via the command line that is capable of reading the color palette applied to a load screen scr file (basically I desire obtained the inks to used this...)

And there is another use like Arkos Tracker that allows you to export music files from PT3 to VT2 through the command line.

Thank you all very much and excuse my ignorance.

/Xavi
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: eto on 09:53, 08 March 24
Usually the SCR file is a pure binary with the screen data. The palette is set in the loader program. The easiest way is probably to use an emulator, run the program, pause on loading screen and check the palette with its debug options. E.g. with Winape: http://www.winape.net/help/registers.html
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: McArti0 on 10:06, 08 March 24
https://www.cpcwiki.eu/index.php/Format:Advanced_OCP_Art_Studio_File_Formats#The_screen_.28.22.SCR.22.29_file_structure

PAL file has palette.
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: andycadley on 11:39, 08 March 24
I think the key thing to understand is that 8-bit machines, in general, rarely used any kind of standardised format. It would usually be whatever binary format was the easiest to produce. 

So screens were usually just the binary data from RAM dumped to disk, which doesn't include any information about how the palette should be set. It would then just be up to the coder to write some code to configure the palette correctly.
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: xavisan on 11:48, 08 March 24
Thank you !! for your answers, basically regarding the Screen, I was looking to get it in some way without knowing the palette that ink they are using for each color of it, so as not to have to review each color manually, even that he had to generate me a tool for that.  :-\
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: ZorrO on 12:40, 08 March 24
@xavisan - In ART STUDIO on FILE window set Palette "v" and Compress "x"
That will save files  name.PAL  1K and  name.SCR  17K.
After that in Basic...

MEMORY &7EFF:IF PEEK(&BB5B)=0 THEN p=45530 ELSE p=47061 'this check inks address for 464 or 6128

LOAD name$+".pal",&7F00:MODE PEEK(&7F00):FOR a=0 TO 15:i=PEEK(&7F03+a*12):POKE p+a,i:POKE p+a+17,i:NEXT:LOAD name$+".scr",&C000 ' now you have picture with rights colours on screen  :)
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: BSC on 13:22, 08 March 24
Given that data from &ffe0 to &ffff is not visible when the CRTC is in "default mode", i.e. how is is like after resetting the CPC, I wonder why it did not become a standard to store the inks in that area of a screen dump. I think that some graphics programs actually did this, but don't remember which.

Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: BSC on 13:27, 08 March 24
Quote from: ZorrO on 12:40, 08 March 24OR a=0 TO 15:i=PEEK(&7F03+a*12):POKE p+a,i:POKE p+a+17,i:NEXT
I don't think you need to POKE the ink settings (and do this PEEK before), it should be sufficient to just do INK a,i instead. 
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: ZorrO on 13:45, 08 March 24
@BSC - This is shortest and fastest way without mess with convert hardware palette to Basic palette.

Maybe you will find more sufficient way how to do that:
00  01  02  03  04  05  06  07  08  09  0A  0B  0C  0D  0E  0F  10  11  12  13  14  15  16  17  18  19  1A     1B  1C  1D  1E  1F  - hardware palette
13  13  19  25   1   7  10  16   7  25  24  26   6   8  15  17   1  19  18  20   0   2   9  11   4  22  21     23   3   5  12  14  - ink's colors

From my experience, such a transformation would result in a program that is twice as long and runs twice as slowly.
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: BSC on 15:29, 08 March 24
Quote from: ZorrO on 13:45, 08 March 24@BSC - This is shortest and fastest way without mess with convert hardware palette to Basic palette.

Maybe you will find more sufficient way how to do that:
00  01  02  03  04  05  06  07  08  09  0A  0B  0C  0D  0E  0F  10  11  12  13  14  15  16  17  18  19  1A    1B  1C  1D  1E  1F  - hardware palette
13  13  19  25  1  7  10  16  7  25  24  26  6  8  15  17  1  19  18  20  0  2  9  11  4  22  21    23  3  5  12  14  - ink's colors

From my experience, such a transformation would result in a program that is twice as long and runs twice as slowly.
Oh, that sounds like those .PAL files contain the hardware colors, not ink values. That was unexpected  :D
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: xavisan on 17:08, 08 March 24
Quote from: ZorrO on 12:40, 08 March 24MEMORY &7EFF:IF PEEK(&BB5B)=0 THEN p=45530 ELSE p=47061 'this check inks address for 464 or 6128

LOAD name$+".pal",&7F00:MODE PEEK(&7F00):FOR a=0 TO 15:i=PEEK(&7F03+a*12):POKE p+a,i:POKE p+a+17,i:NEXT:LOAD name$+".scr",&C000
Thx!! :)  The problem is that I do not have the  .PAL and no use INKs , so I understand that it has to be done manually.  Is correct no?  I can use what you tell me, I'll try it...  thx!!!
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: ZorrO on 18:06, 08 March 24
And where did you get this picture?
If you can, show it, maybe someone has it with the right colors.
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: xavisan on 19:20, 09 March 24
Quote from: ZorrO on 18:06, 08 March 24And where did you get this picture?
If you can, show it, maybe someone has it with the right colors.

Hi :)
My idea is to take an SCR and without knowing the palete INK colors, calculate it without having to put it or know it.  ;)
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: xavisan on 19:22, 09 March 24
Thank you all very much  :) , I am going to choose whether or not to have the .PAL file following your instructions @ZorrO  :) 

Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: ZorrO on 00:31, 10 March 24
Anyway, selecting colors in ArtStudio will be more convenient than typing INKs in Basic.
Title: Re: Question for INK palette to Load Screen and export music to VT2 format.
Post by: xavisan on 02:13, 10 March 24
Quote from: ZorrO on 00:31, 10 March 24Anyway, selecting colors in ArtStudio will be more convenient than typing INKs in Basic.
Of course, it's simpler, thank you !!  :)
Powered by SMFPacks Menu Editor Mod