Closed Serentty closed 5 years ago
I don't see this claim in the specification (Facebook is ^*&$^#%&!), and it's not in the VERA spec:
https://github.com/commanderx16/x16-docs/blob/master/VERA%20Programmer's%20Reference.md
@fvdhoef Can you comment?
It is correct that tile mode 0 and 1 also support all combinations of tile width and height 8x8, 8x16, 16x8, 16x16. If the emulator doesn't emulate this now, that is an error. Also in the documentation there is some confusing text below the mode 0 and mode 1 info that is only valid when 8x8 mode is selected.
A pull request would be gladly accepted. :)
Alright, if this is supposed to be emulated, I'll take a look and see if I can figure out how to implement it.
Can't access Facebook at all; can anybody perhaps mirror that doc please?
Hopefully the fix is straightforward, just remove the if() and use the tile size logic from tiles modes for text as well:
props->tilew = 1 << (((reg_layer[layer][1] >> 4) & 1) + 3);
props->tileh = 1 << (((reg_layer[layer][1] >> 5) & 1) + 3);
But even if it's harder than that, I expect the worst case would be looking at wherever checks props->tile_mode
and props->text_mode
, which shouldn't be too bad.
I created a branch where I removed the check on tile size. First tests seem promising. Understandably the text on the screen is all corrupted when switching the tile size, so I'll have to check more carefully to ensure that it's behaving properly.
It seems that when the checks are removed, it does indeed work properly, as per my understanding of how it is supposed to work. For example, when characters are set to be double height, it continues on to load 100% more font data, which is easy to see from how whenever a letter is typed, you see two consecutive letters from the character set.
I'll go and open a pull request for these changes.
I'm closing this because my pull request has been merged.
The official specifications list for the Commander X16 mentions that “the 1 bpp tile modes in combination with 8x16 tile size will also allow for a standard VGA font to be used.” By “1 bpp tile modes” I'm assuming that it's referring to modes zero and one, the text modes. However, currently the emulator ignores TILEW and TILEH in these two modes, as can be seen in the code below.
I discovered this when I went to use this feature in order to display Japanese text at a reasonable size and resolution, yet nothing happened.