Window plane docs?

SGDK only sub forum

Moderator: Stef

Post Reply
cero
Very interested
Posts: 338
Joined: Mon Nov 30, 2015 1:55 pm

Window plane docs?

Post by cero » Mon Jan 11, 2016 9:38 am

Are there any proper docs on the window plane? sega2f is really sparse on them, I can't even find out what its size is supposed to be, or whether the A/W override depends on the pixels of the W plane or not.

cero
Very interested
Posts: 338
Joined: Mon Nov 30, 2015 1:55 pm

Re: Window plane docs?

Post by cero » Tue Jan 12, 2016 10:33 am

Stef wrote:Edit: Getting hand in sega docs, the window use a fixed plan size of 32x32 tile in H32 mode and 64x32 in H40 mode so the size is not related to plan A...
So i have to keep enough place for the biggest possible window : 64x30 (we can ignore the 2 last tile lines as they are never visibles).
So WPLAN will be set to 0xA900 to not conflict with sprites nor hscroll.
Stef, you said this in 2012 (SGDK thread, page 36). Was it stalled for some reason? I still see the old value in latest sgdk.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Window plane docs?

Post by Stef » Tue Jan 12, 2016 1:57 pm

Actually the windows is really rarely used, it's why i reduced the amount of allocated VRAM for it :p
In the current default SGDK VRAM allocation, window plan is set to 0xB000-0xB800 so that is enough memory for 1024 cells.
In H32 mode that allow up for a complete 32x32 screen which is enough, for H40 mode that allow up to 64x16 so only the first top 16 vertical cells (on the 28 displayed) can be used as window with this VRAM configuration. If you want to display the window in the south region of the screen, you need to redefine the VRAM arrangement and move the window at A900 for instance ;)
You can do that with

Code: Select all

VDP_setWindowAddress(..)
method

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Window plane docs?

Post by Sik » Thu Jan 14, 2016 7:15 pm

Normally my mappings are more like this:

Scroll A: C000
Scroll B: E000
Window: D000
Sprites: F000
Hscroll: F800

The reason being that the tilemaps are normally set to 64×32, and this means there's a huge gap between D000-DFFF. May as well put window there and keep things more compact =P (this also means the whole 0000-BFFF range is free for tiles, making things much easier since there aren't gaps to consider)
Sik is pronounced as "seek", not as "sick".

Post Reply