Funkheld,
Oops.. I made a mistake in my earlier maths..
set $9F36 equal to ((TILEBASE_ADDRESSS >> 9) & $FC) + (TILE_HEIGHT_IS_16 < 1) + TILE_WIDTH_IS_16
^ this part was correct, where TILE_HEIGHT_IS_16 and TILE_WIDTH_IS_16 are 1 if true and 0 if false..
The POKE was wrong... because to set Y for the tiles to 16, you have to add 2 ( VAR < 1 is same as VAR *2 )
which gives this for that tilebase -
248 => 8x8
249 => 16x8
250 => 8x16
251 => 16x16
this is of course using that tilebase that is already set for layer1 in BASIC mode - using the 8x8 character set copied from ROM to $1:F000 - which is pretty much cramped in there ! ->
$1:F000-$1:F7FF Charset
$1:F800-$1:F9BF unused (448 bytes)
$1:F9C0-$1:F9FF VERA PSG Registers (16 x 4 bytes)
if you are going to use tiles that are 16x8 or 8x16, those are 2x the size of 8x8, and if using 16x16, that is 4x the size!
So if you plan on using these larger tile sizes, you should set the tilebase to a different location in VRAM!
(You'll know when you overwrite out of the available space because the sound chip will start doing stuff, colors will corrupt, and finally sprites may appear or do weird things as you write further into reserved VRAM )
for quick reference, 1Bpp tiles -
8x8 - each is 8 bytes, 256 tiles in a set => 2K
8x16 or 16x8 - each is 16 bytes => 4K
16x16 - each is 32 bytes => 8K
and are stored line by line - say a letter F maybe ?
01111111 11111000
01111111 11111000
01111111 00000000
01111111 11100000
01111111 11100000
01111111 00000000
01111111 00000000
00000000 00000000
And would appear in memory like
7F F8 7F F8 7F 00 7F E0 7F E0 7F 00 7F 00 00