Pages: 1
Posted on 08-14-12, 09:30 am (rev. 1 by  Arisotura on 08-14-12, 09:33 am)
☭ coffee and cream


Karma: 10415
Posts: 610/2768
Since: 06-26-11
This all started with the 3rd unused level. Basically, its block 3 is twice as large as usual:
00 00 00 03 00 00 FF FF FF FF 03 00 07 00 00 00 00 00 00 00 01 00 03 04 FF FF 03 00 FF FF 00 00 04 00 00 00 00 00 00 00

Another interesting detail is that View 2 has the first two unknowns set to 1 instead of 0.

This suggests that earlier versions of the engine supported per-area backgrounds, and possibly even tilesets, seeing that corrupted room in View 2.

I tried to see if I could make use of it, but so far I haven't gotten any good result.

I edited 1-1's block 3 to the following:
00 00 08 00 08 00 FF FF FF FF 07 00 07 00 00 00 00 00 00 00 01 00 03 00 03 00 FF FF FF FF 02 00 02 00 00 00 00 00 00 00

(second BG should be the cave BG)

and observed the following things:
* with view's Unknown1 set to 1: bottomBG black, topBG unchanged, blocks blue
* with view's Unknown2 set to 1: bottomBG corrupted (seems to use cave BG tilemap but grassland BG graphics), rest unchanged
* with view's Unknown3 set to 1: bottomBG corrupted (same as unk2=1), topBG empty, rest unchanged
* with all Unks set to 0: weirdly this acts the same as unk2=1
* with all Unks set to 1: all backgrounds black, blocks blue

Either I'm missing something, or this feature is just broken. I'll post more as I find more.

It seems like something is rigged to always use the first background block's values.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 08-14-12, 10:09 am
Roy Koopa


Karma: 4011
Posts: 2096/2722
Since: 06-26-11
Actually this is already knoen for a longg time. Fr33ze and I figured it out, but luckwii nade a big post about it
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-14-12, 10:26 am
☭ coffee and cream


Karma: 10415
Posts: 611/2768
Since: 06-26-11
So I have been rediscovering crap, again. That sucks. We definitely need something to centralize all the documentation instead of having to search the whole board.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 08-14-12, 11:01 am


Karma: 3752
Posts: 1424/2112
Since: 06-28-11
I, ray and luckwii only figured out that Unknown thing in the view.
We haven't figured out that the Unused Level 3 has two backgrounds set, IIRC.
Posted on 08-14-12, 11:10 am
☭ coffee and cream


Karma: 10415
Posts: 612/2768
Since: 06-26-11
I see.

I think the multibackground was an old beta feature and it's broken. Not sure though, perhaps we're just missing something. One would need to analyze the code that reads this data to find out.
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 08-14-12, 02:33 pm (rev. 1 by  Dirbaio on 08-14-12, 02:37 pm)
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10000
Posts: 2260/4457
Since: 06-08-11
Yea, this is something weird. There are separate bytes that control which palette, tileset and tilemap are used, for the two BGs and the tileset, too.

This is used in the game in level 3-A.
The tileset it uses (Beach blue) contains additionally the beach sand tileset. But it looks corrupted because it's meant to be used with the beach sand tileset's palette!
Somehow the game switches the palette when getting into View 2 automatically O_o

And I now noticed that the new revisions of the editor fail completely to display the beach objects, while older revisions just displayed the beach graphics with wrong palette. Maybe there's something additional to it then? Extra palette numbers? A tileset can have more than 2 palettes?? O_o

EDIT: Officially confirmed! That tileset has FOUR PALETTES.
So no, the game isn't switching palettes for this one, it's a different discovery.
OMG this is something I need to implement in the editor ASAP
Posted on 08-14-12, 02:40 pm
Birdo


Karma: 3304
Posts: 484/2021
Since: 06-28-11
Posted by Dirbaio
Somehow the game switches the palette when getting into View 2 automatically O_o


Didn't this always happened? IIRC, I used that beach tileset and the sand that appears wrong on a level for the level design contest, and it worked for me every time, not only in the second view. (I did used the original level as a template, thought.)
I always thought It was the editor going wrong with the display.
_________________________

Posted on 08-14-12, 02:43 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10000
Posts: 2261/4457
Since: 06-08-11
That tileset has 4 palettes, and the beach map16 tiles are set to use the 3rd and 4th palette!

The new tilemap code sees an "out-of-bounds" palette number and doesn't draw the tiles at all. The old code just cared about ONE bit to see if it'd use the 1st or 2nd palette! So it'd pick the wrong palette.

This is why ingame it shows up well! It's not related to blocks 3,4,5. It's in the tileset itself

We still gotta figure out what are these bytes in blocks 3, 4, 5.
Posted on 08-14-12, 03:40 pm
Roy Koopa


Karma: 4011
Posts: 2097/2722
Since: 06-26-11
I remember luckwii saying a looong time ago that editing the beach TS is dangerous because its 4 palletes.
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-14-12, 03:41 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10000
Posts: 2263/4457
Since: 06-08-11
Posted by ray
I remember luckwii saying a looong time ago that editing the beach TS is dangerous because its 4 palletes.

If you said that, you could've said it louder so I'd have heard it and added support for that in the editor
That's what I'm doing right now.
Posted on 08-14-12, 03:42 pm
Roy Koopa


Karma: 4011
Posts: 2098/2722
Since: 06-26-11
I thought you are reading every post on this board Thats what you said somewhere a loong time ago, too
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-14-12, 03:43 pm (rev. 1 by  gridatttack on 08-14-12, 03:43 pm)
Birdo


Karma: 3304
Posts: 486/2021
Since: 06-28-11
I wonder, could this 4 palette tileset could be somehow added to the other tilesets? That way we could have alternate tilesets. (i.e a night one, a sunset one, and so on.)
_________________________

Posted on 08-14-12, 03:44 pm (rev. 1 by  ray on 08-14-12, 03:44 pm)
Roy Koopa


Karma: 4011
Posts: 2099/2722
Since: 06-26-11
Posted by gridatttack
I wonder, could this 4 palette tileset could be somehow added to the other tilesets? That way we could have alternate tilesets. (i.e a night one, a sunset one, and so on.)

I did it in NSHB. For the beach tileset we used one day and one sunset tileset with the two palettes. But you only have 256 colours for one Tileset then
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Posted on 08-14-12, 03:45 pm
☭ coffee and cream


Karma: 10415
Posts: 615/2768
Since: 06-26-11
Posted by ray
I thought you are reading every post on this board Thats what you said somewhere a loong time ago, too

Reading all the new posts on the board takes time. See, there are some threads that I skip, or even whole forums (hi Nyanland).
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Posted on 08-14-12, 03:46 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10000
Posts: 2264/4457
Since: 06-08-11
Posted by ray
I thought you are reading every post on this board Thats what you said somewhere a loong time ago, too

I do read everything, and I'm sure you didn't say it.

Posted by gridatttack
I wonder, could this 4 palette tileset could be somehow added to the other tilesets? That way we could have alternate tilesets. (i.e a night one, a sunset one, and so on.)

Well yea, this just enables us to have moar colors.
Also I'm sure it's possible to turn normal tilesets into 4-palette tilesets.
And this makes me think that then tilesets can have any number of palettes between 1 and 4...
Posted on 08-14-12, 03:54 pm
Roy Koopa


Karma: 4011
Posts: 2100/2722
Since: 06-26-11
Posted by Dirbaio
Posted by ray
I thought you are reading every post on this board Thats what you said somewhere a loong time ago, too

I do read everything, and I'm sure you didn't say it.



Uhm yeah. I didnt say it. But you
_________________________
See a lots of creative DS Hacking here
If you want to support me, you might check out my Patreon Page : )
Pages: 1