CPCWiki forum

General Category => Programming => Topic started by: funkheld on 10:41, 13 December 20

Title: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: funkheld on 10:41, 13 December 20

Hi good afternoon.


why does a sprite (mode 0) for cpctelera 24x48 pixels have so many bytes (576) with rgas.exe


thanks.
greeting
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: andycadley on 11:34, 13 December 20
Mode 0 is two pixels per byte. 12*48 = 576 bytes
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: funkheld on 12:30, 13 December 20
hello thanks.

when drawing with rgas the background was blue.
now he's black. Why?

how can you set this right now with cpct_setPalette?
----------------------------

const u8 g_palette[16] = { 0x44, 0x4a, 0x53, 0x4c, 0x4b, 0x54, 0x55, 0x4d, 0x46, 0x5e, 0x5f, 0x47, 0x52, 0x59, 0x4a, 0x47 };
cpct_setPalette  (g_palette, 16);
----------------------------


greeting



Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: ervin on 14:51, 13 December 20
http://lronaldo.github.io/cpctelera/files/video/cpct_setPalette-asm.html (http://lronaldo.github.io/cpctelera/files/video/cpct_setPalette-asm.html)
https://lronaldo.github.io/cpctelera/files/video/colours-h.html (https://lronaldo.github.io/cpctelera/files/video/colours-h.html)

Also, the colours defined in your g_palette must be in the same order as the colours you have defined in RGAS.
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: funkheld on 09:01, 14 December 20

Hi good afternoon.

for me the attitude towards the colors is undecided.
who can please adjust the 4 color values for cpctelera from rgas with the correct background?


https://lronaldo.github.io/cpctelera/files/video/colours-h.html


thanks.
greeting
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: ervin on 09:59, 14 December 20
Use the attached image.

The "colour name" column matches the colours listed on this page:
https://lronaldo.github.io/cpctelera/files/video/colours-h.html (https://lronaldo.github.io/cpctelera/files/video/colours-h.html)
I prefer to use the colour codes listed under "CPCT_HW_Colour" on that page.

If you're still struggling, find the webpage for CPCRetroDev 2020.
You should be able to download the entries.
Many of them have source code.
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: funkheld on 14:37, 14 December 20

thanks.


i need a specialist who has already created images with rgas.exe in mode 0 and created the palette in cpctelera so that the correct colors are displayed.
I can create pictures of bmp / jpg for cpctelera with a cpctelera program. the pictures have the correct color value.


greeting
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: ervin on 15:11, 14 December 20
Use the image I posted to choose your colours.
The order of colours in RGAS must match the order of colours in your palette array in sdcc.

It's easier to use something like HW_BLACK to define black in your array. Hexadecimal values are too hard to work with.

I think you should be able to figure it out, with this advice.
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: SRS on 19:24, 14 December 20
Quote from: ervin on 15:11, 14 December 20
I think you should be able to figure it out, with this advice.
That won't work. RGAS is written by a australian dude and CPCTELERA is made in spain if I remember correctly.
They can't be compatible, because they relay on totally different coordinates. Whats up in australia is down in spain for example.
I won't even talk about behaviour of machine code running in 50 Hz PAL computers (like the SCHNEIDER) or 60 Hz NTSC or the even more exotic SECAM (like KC COMPACT) most french computers ran on.
So I'd stick to black&white mode 2 sprites, they at least are mostly compatibel worldwide. And no trouble with colours at all.
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: ervin on 23:12, 14 December 20
Quote from: SRS on 19:24, 14 December 20
That won't work. RGAS is written by a australian dude and CPCTELERA is made in spain if I remember correctly.
They can't be compatible, because they relay on totally different coordinates. Whats up in australia is down in spain for example.
I won't even talk about behaviour of machine code running in 50 Hz PAL computers (like the SCHNEIDER) or 60 Hz NTSC or the even more exotic SECAM (like KC COMPACT) most french computers ran on.
So I'd stick to black&white mode 2 sprites, they at least are mostly compatibel worldwide. And no trouble with colours at all.


Well, I live in Australia, and I use cpctelera.
:P
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: funkheld on 08:56, 15 December 20
Quote
Well, I live in Australia, and I use cpctelera.


thanks.
then please describe exactly how I can correctly display the sprite in mode 0 of rgas.exe with cpctelera with the colors.


greeting
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: ervin on 09:07, 15 December 20
In the RGAS Ink Selector (the screenshot you posted earlier) you can drag and drop the colours into the order you need.
Title: Re: sprite 24x48 with rgas.exe many bytes for cpctelera mode 0 ?
Post by: funkheld on 11:42, 15 December 20

thanks for the help.

I didn't know that with the move.
I was always looking for a config.

now it works in mode 0.
sprite 24x48 in cpctelera

greeting
Powered by SMFPacks Menu Editor Mod