Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Latin-1 Supplement support #7

Open
6 tasks
07151129 opened this issue May 7, 2021 · 0 comments
Open
6 tasks

Add Latin-1 Supplement support #7

07151129 opened this issue May 7, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@07151129
Copy link
Owner

07151129 commented May 7, 2021

SJIS cannot encode Latin diacritics (accented characters). Our encoding support needs to be extended to this end.

  • Add c2 a1, c2 bf, e2 80 94, c3 80 -- c3 bf UTF-8 sequence recognition to glyph.c as half-width characters.

  • When encoding strings, in mk_strtab_str, recognise there characters, and write them directly, similarly to how buf_for_esc rewrites escapes. This will result in a mixed SJIS-UTF encoding in text.

  • Add monochrome png -> tileset sprite encoding. One 16x16 glyph object is represented by one tileset, i.e. four 8x8 sized tiles. A single tile has 4bpp pitch linear encoding of palette indices. We can assume indices 0 for transparent, 0xf for white (or primary colour when selected), 1 for border colour (black/white).
    The tiles are linearly written in memory in the following order:
    1 2
    3 4

  • Embed the tiles into GBA binary. Can simply use PROVIDE ld script statement to reference it in C, and feed the data/file offset via AGB_BINS_OFFSETS in agb/patch.mk.

  • When decoding strings in render_sjis, map the utf sequences to a linear character index.

  • Use the index to copy into vram from the tiles in rom.

@07151129 07151129 added the enhancement New feature or request label May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant