Easy Extender 1.1 [Y.S.]
#2
For any ASM coder who wants to use this code as a base (use the entire code provided above excluding the C0 code) for Drawing stuff to the screen, here are some notes for utilizing your own ASM (C0/C2) Code using Y.S's code:

To use sprintf (standard sprintf args apply):
lis rX, 0x8000
lwz rX, 0x1854 (rX)
mtlr rX
blrl

To use Draw:
lis rX, 0x8000
lwz rX, 0x1850 (rX)
mtlr rX
blrl

Arg for Draw
r3 = Address pointing to data (already converted, ready for display)
r4 1st byte = X coordinate (starts at 0x01)
r4 2nd byte = Y coordinate (starts at 0x02)
r4 3rd byte = BG color (see color combos below)
r4 4th byte = Font color (see color combos below)

Color combos (byte values):
00 - Clear
01 - White
02 - Black
03 - Red
04 - Yellow
05 - Dark Yellow
06 - Green
07 - Blue
08 - Blue
09 - Purple (Values beyond this aren't actual real colors from what I've been told)
0A - Purple
0C - Cyan
0F - Cyan
14 - Sky Blue
1F - Lime Green
7F - Grey
FF - Clear, but puts a thin white border on the font

Too lazy to check all 256 values...

Regarding the X/Y coordinate positions:
The values will place your text in different places depending on your resolution and screen ratio. Just because the text is at the bottom center on 4:3, doesn't mean it will be there for 16:9 480i nor 16:9 480p.
Reply


Messages In This Thread
Easy Extender 1.1 [Y.S.] - by Vega - 07-17-2018, 02:09 AM
RE: Easy Extender 1.1 [Y.S.] - by Vega - 11-20-2019, 07:01 PM
RE: Easy Extender 1.1 [Y.S.] - by JoshuaMK - 11-20-2019, 07:26 PM
RE: Easy Extender 1.1 [Y.S.] - by Vega - 11-20-2019, 07:38 PM
RE: Easy Extender 1.1 [Y.S.] - by JoshuaMK - 11-20-2019, 07:45 PM
RE: Easy Extender 1.1 [Y.S.] - by xX tRoLLeR Xx - 09-30-2020, 11:05 PM
RE: Easy Extender 1.1 [Y.S.] - by Vega - 10-01-2020, 12:46 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)