Author Topic: palettemaking with masm  (Read 633 times)

caballero

  • Member
  • *****
  • Posts: 1099
    • abre ojos ensamblador
Re: palettemaking with masm
« Reply #15 on: August 22, 2018, 02:57:30 AM »
Stictly speaking, there's no such a thing as palette in W32 bits, and there's no need to use it. Nevertheless we can simulate it doing easier working with some graphics effects as plasmas, etc.

You can see here an example of a fire demo wit palette. But hurry up if you want to catch up, not available for much time.

En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

daydreamer

  • Member
  • ****
  • Posts: 557
  • reach for the stars
Re: palettemaking with masm
« Reply #16 on: August 22, 2018, 03:30:14 AM »
Stictly speaking, there's no such a thing as palette in W32 bits, and there's no need to use it. Nevertheless we can simulate it doing easier working with some graphics effects as plasmas, etc.

You can see here an example of a fire demo wit palette. But hurry up if you want to catch up, not available for much time.


thats cool demo :t
I know many things was achieved with palette tricks Before when computers wasnt that powerful to do things in realtime
thats the Point,to try write something of my own inspired by palette tricks
Quote from Flashdance
Nick  :  When you give up your dream, you die.
*wears a flameproof asbestos suit*

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: palettemaking with masm
« Reply #17 on: August 22, 2018, 04:14:34 AM »
Stictly speaking, there's no such a thing as palette in W32 bits
Probably you are talking about something you dreamed about and are redefining well know and accepted concepts.

caballero

  • Member
  • *****
  • Posts: 1099
    • abre ojos ensamblador
Re: palettemaking with masm
« Reply #18 on: August 22, 2018, 04:51:35 AM »
All these nonsense to say that I'm wrong. If so simply give us an example, I can live with it and I will be glad to see it.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: palettemaking with masm
« Reply #19 on: August 22, 2018, 05:23:21 AM »
Of course you are wrong, you appear not to have the slightest idea that for 256 colors or less Windows manages colors through indexed lists of colors called PALETTES. You can use google to find tens of thousands of results explaining in detail all the mechanics, if you want of course, otherwise keep using well established names for completely different things and contribute to a more messy world.  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 8822
  • Assembler is fun ;-)
    • MasmBasic
Re: palettemaking with masm
« Reply #20 on: August 22, 2018, 05:41:52 AM »
Stictly speaking, there's no such a thing as palette in W32 bits, and there's no need to use it.

There are still palettes around in Win32, but there is indeed no need to use them, since most machines are set on 32-bit colour depth nowadays.

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: palettemaking with masm
« Reply #21 on: August 22, 2018, 06:08:53 AM »
There are palettes and there is a need to use them. We can't produce a GIF file with more than 256 colors and we can't prepare a FAX image with more than 2 colors.

caballero

  • Member
  • *****
  • Posts: 1099
    • abre ojos ensamblador
Re: palettemaking with masm
« Reply #22 on: August 22, 2018, 06:49:53 AM »
As I see you have to set up your video mode to 16 bits to use the paletty apis. I had already seen it in Charles Petzold's examples but I did not bother to try it, it just did not work in my system and I invented my own way. I do not think anyone is going to worry on setting its video display mode to 256 colors to see a demo.

I will not discuss with you about it. I think we can reach an agreement: I was strictly wrong and you are an arrant pedant.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: palettemaking with masm
« Reply #23 on: August 22, 2018, 07:26:59 AM »
No, you will not change video mode. Actually, most modern machines are capped at 32-bit video modes. This does not prevent them from seeing 256 color GIFs for example.

Yes, it is better not to discuss further you need a full recycling seminar on the basics of these matters.  :t

jj2007

  • Member
  • *****
  • Posts: 8822
  • Assembler is fun ;-)
    • MasmBasic
Re: palettemaking with masm
« Reply #24 on: August 22, 2018, 07:37:16 AM »
arrant pedant

Caballero, check if your keyboard is working properly. It seems sometimes it's missing the "o" and "g" characters.

caballero

  • Member
  • *****
  • Posts: 1099
    • abre ojos ensamblador
Re: palettemaking with masm
« Reply #25 on: August 22, 2018, 08:12:39 AM »
> you need a full recycling seminar on the basics of these matters
Yes, with no doubt. I want to excuse if I was rude. You say something that is interesting to me, I didn't know that.

In MS-DOS you construct your palette accessing ports that basically is an array of colors. When you write on your vga memory card, let's say 13h, it knows how to show the images because you previously have constructed these array of colors and say which index you want to paint.

Any image file, let's say 8 bits as your gif or any bmp, pcx, tga, etc has inside the palette info and the color info. In no moment you need access to the palette port, you simply need to read the info in your binay file to construct your rgba color and show it. So why do you need the palette system to show a gif? You simply send the image you have constructed. At least I don't use it in my programs, just read and show.

Without double meaning, this is something I did not know and I appreciate any information about it. Is there another way to do it apart from what I already do?


JJ. I'm not an English speaker, so I won't understand any double meaning, tell me clear if you want I understand it.

PD: I'm always learning
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5894
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: palettemaking with masm
« Reply #26 on: August 22, 2018, 09:25:41 AM »
My Axialis IconWorkshop does "swatches" which is just another name for a pallette. One technique I have seen which is a pest with 256 color images that apart from the orginal colours in the image, you cannot edit them easily because they do not contain any other colours. I gather it is to keep the file size down.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: palettemaking with masm
« Reply #27 on: August 22, 2018, 10:44:29 PM »
Is there another way to do it apart from what I already do?
I can't see what you have done - I can't download anything from the URL you provided. All I was doing was commenting your statment "Stictly speaking, there's no such a thing as palette in W32 bits". My feeling is that you produce the effect by changing the palette and force a re-rendering of the image but this contradicts your statement that there is no palette (strictly speaking)!

caballero

  • Member
  • *****
  • Posts: 1099
    • abre ojos ensamblador
Re: palettemaking with masm
« Reply #28 on: August 23, 2018, 02:17:11 AM »
> I can't download anything from the URL you provided.
Yeah, so late, man. My site is no longer available. They wanted to charge me € 120 / year, so we have reached an agreement: they are left with their site and I with my money. Qué misterio

Did not read my entire post? You were alarmed in the first sentence. In VGA you can set the graphical palette on 3C8h and 3C9h ports (an array of 256 colors). This is what I understand by palette (physical). I use in memory an array of colors many times, to what I can call a logical palette, the use is very similar, but it is not the same. As far as I know Windows is no longer concerning with those ports to define a palette, that's why I said that there's no real (physical) palette but we can do one (logical) for our own purposes.

For a moment I had understood you that Windows sent the palette of 8-bits image files to the VGA palette to see them (as your gif), which left me very surprised and interested.

The fire effect has nothing to do with rotating the palette, although it has a logic one. Nothing to do with the VGA palette, you know the ports one.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: palettemaking with masm
« Reply #29 on: August 23, 2018, 05:31:51 AM »
VGA has gone, ports can only be accessed from kernel mode and there are no more 256 color screens.

There is one thing called a device context, which has been around since the early Windows days. When you have a 256 color bitmap (where each byte is an index into a color table), and you want it to appear on your 32-bit screen monitor a few magic steps take place to make that bitmap be transformed to the 32-bit screen color depth and be rendered to your eyes.