Post by dshadoff on Jan 21, 2019 17:14:50 GMT
One of the challenging parts of doing a translation is modifying the print routine in order to print 8x16 (or 8x12) characters.
More specifically, the most challenging part of this, is being able to harvest enough space to modify the print function and also include a font of that size.
I recently put together a small hack to the System Card, to extend the functionality of the EX_GETFNT function, in order to support ASCII codes, and contain both an 8x12 and 8x16 font, so that you don't have to worry about finding so much free space.
With this, the necessary modifications are also much smaller. The overall steps are generally:
1) Check whether the code is ASCII, and if so, only load one byte (still needed)
2) Bypass the regular EX_GETFNT function to go to a handmade function (no longer needed)
3) Create an alternate EX_GETFNT function to handle ASCII and 8x12 font (no longer needed)
4) include a font (no longer needed)
5) Adjust the spacing of the output function to use 8 pixels instead of 12 or 16 (still needed).
The only other difference is that you'll need to pass a different font number to the EX_GETFNT routine (and you can store the text in ASCII, of course).
And of course, this will require the user to run the system card image on supported hardware, such as:
- Turbo Everdrive
- other Flash card on a Duo
- TerraOnion Super System 3
- UperGrafx (pending next firmware update)
Now, I'm not suggesting that all translations should be done this way - there will always be a greater demand for translations which are able to execute on original hardware, but this will help in the following cases:
1) When somebody wants to get a proof-of-concept working quickly
2) When there is simply not enough memory to hold all the required print function changes.
Oh, and there is an identification string included, so that you can alter the existing system card check to verify whether the translation is running on a supported card (assuming that you decide to target this platform).
I have made the patch so that it can be applied to either Japanese or American System 3.0 card images, and also that it can be layered on top of elmer's TED 2 patch.
I have also included source code.
And thanks to elmer, who graciously supplied the included fonts.
github.com/dshadoff/SYSCARD_Translatefont
Dave
More specifically, the most challenging part of this, is being able to harvest enough space to modify the print function and also include a font of that size.
I recently put together a small hack to the System Card, to extend the functionality of the EX_GETFNT function, in order to support ASCII codes, and contain both an 8x12 and 8x16 font, so that you don't have to worry about finding so much free space.
With this, the necessary modifications are also much smaller. The overall steps are generally:
1) Check whether the code is ASCII, and if so, only load one byte (still needed)
2) Bypass the regular EX_GETFNT function to go to a handmade function (no longer needed)
3) Create an alternate EX_GETFNT function to handle ASCII and 8x12 font (no longer needed)
4) include a font (no longer needed)
5) Adjust the spacing of the output function to use 8 pixels instead of 12 or 16 (still needed).
The only other difference is that you'll need to pass a different font number to the EX_GETFNT routine (and you can store the text in ASCII, of course).
And of course, this will require the user to run the system card image on supported hardware, such as:
- Turbo Everdrive
- other Flash card on a Duo
- TerraOnion Super System 3
- UperGrafx (pending next firmware update)
Now, I'm not suggesting that all translations should be done this way - there will always be a greater demand for translations which are able to execute on original hardware, but this will help in the following cases:
1) When somebody wants to get a proof-of-concept working quickly
2) When there is simply not enough memory to hold all the required print function changes.
Oh, and there is an identification string included, so that you can alter the existing system card check to verify whether the translation is running on a supported card (assuming that you decide to target this platform).
I have made the patch so that it can be applied to either Japanese or American System 3.0 card images, and also that it can be layered on top of elmer's TED 2 patch.
I have also included source code.
And thanks to elmer, who graciously supplied the included fonts.
github.com/dshadoff/SYSCARD_Translatefont
Dave