It's been a few months since his initial release, and today PlayStation 3 developer deroad has updated the NoRSX PS3 2D Graphic Library for the PSL1ght homebrew SDK to include TTF support.
Download: NoRSX PS3 2D Graphic PSL1ght SDK Library with TTF Support / https://github.com/wargio/NoRSX/zipball/master (Mirror) / https://github.com/wargio/NoRSX
To quote from his blog: My lib has been updated to allow people to use *.ttf files instead of my old experimental font. You can use any ttf loaded from memory or from hdd and print any kind of text as you want.
An example
This is the function that needs to be called to load a font from memory:
Code:
Font(u32 Color, u32 Size, const void *MemFont, u32 MemFont_size, Minimum *min);
so for example if my font is Andale.ttf, and i want to load it from memory, i would call:
Code:
#include "Andale_ttf.h" //This file will be created from the Makefile.
//just put your Andale.ttf inside the "data" folder
int main(){
NoRSX gfx();
Font A(COLOR_WHITE, 40, Andale_ttf, Andale_ttf_size, &gfx);
//this will allow you to print on the screen a White
//text with the Andale ttf and with a size of 40 pixel.
//to print any kind of text i've added a printf function:
A.Printf(100,300,"This is an example %i", 10);
//This will print on the screen a text at the position (100,300)
//on the screen, with written "This is an example 10".
} you can also load ttf loaded from hdd (as I said before). just change the function
Code:
Font A(COLOR_WHITE, 40, Andale_ttf, Andale_ttf_size, &gfx);
with this one:
Code:
Font A(COLOR_WHITE, 40, "/dev_hdd0/game/NORSX0000/Andale.ttf", &gfx);
This will load the font from the hdd. (you can use also the ps3 fonts already included with your ps3
).
Now the only thing that i need to implement is make it faster (it needs a spu implementation). once done, the lib will be finally done and I will be able to add more objects and other stupid stuff that now isn't necessary.
Update: Deroad has released NoRSX v0.1.1, as well as announced NoRSX Emulator for the PC. The new update has lots of performance patches (thanks also to KDSBest) and allows more things. It can directly use the original PS3 fonts if you want by telling the lib to use them. You now are able also to predefine the resolution of you homebrew.
Added Screen Size Support. now you can choose the resolution of your homebrew (RESOLUTION_1920x1080, RESOLUTION_1280x720, RESOLUTION_720x576, RESOLUTION_720x480), added Performance Patch by KDSBest and Deroad, added PS3 Font Support (LATIN2, JPN, KOR, CGB, KANA) and fixed fonts chroma key.
The next month will be released a NoRSX PC Emulator, to help people to develop apps with NoRSX also without PS3. Below are some preview pictures of the NoRSX PC Emulator.
NoRSX Changelog:
v0.1.1:- Added Change Screen Size.
- Screen Size Supported:
- RESOLUTION_1920x1080
- RESOLUTION_1280x720
- RESOLUTION_720x576
- RESOLUTION_720x480
They needs to be initialized as this Example: NoRSX GFX(RESOLUTION_1280x720);
v0.1.1b:v0.1.1c:- Performance Patch by KDSBest (Just for Images).
- Added DrawIMGtoBitmap function for JPG (I forgot this one!)
v0.1.1d:v0.1.1e:v0.1.2:- Fixed Font ChromaKey. now fonts are better displayed
Hi everyone! deroad is here (again) to release a good tool to allow people to work with my NoRSX Library on pc. i have ported and coded the ps3 version to PC. What it does? well it has the same functions of the ps3 version.
NoRSX PC Emulator FAQ:
Is it a PS3 Emulator? NO IT ISN'T. It's a port.
Who coded it? Me, Deroad.
What it does? The same things as the PS3 version.
Will it updated when NoRSX (PS3 Version) will have an update? Yes, it will be updated with the same updates as the PS3 one.
What Libs it requires? you need SDL, SDL_image and freetype2.
What i can do with it? i already have the PS3 version! Well i wrote it, since some time i don't have the PS3 and i need something to allow me to continue to work on this lib. this is why i created it; but for you can be a useful tool to test the graphics of your homebrew if you used NoRSX as the default lib; it will save you lot of time.
Authors: Deroad, KDSBest (for his performance patches).
Review by PsDev: I got the honors of testing Deroads (wargio, NoRSX emulator. although at first I had trouble with compiling, that was my own fault as my Linux was outdated and I didn't have the required SDL and freetype2 library. after getting that done I started it and it looked nice, Had a middle png image and fps (frames per second) rate shown and a nice little exit message.
Once you download you will notice the main.cpp this is what you're gonna use to write your NoRSX programs and that's what the NoRSX Emulator going to run. The way he has coded it is great, it's simple to make your own homebrew, from changing image, font, or rearranging the bitmap to your liking. One bit of code that I enjoyed was this snippet below
Code:
NoRSX *GFX = new NoRSX(RESOLUTION_1280x720);
that line of code basically allows you to set the screen resolution from 720x480, 720x576 and 1280x720. This is great cause you can choose the size of the screen! another simple piece of code is
Code:
Font F2("data/Sans.ttf" ,GFX);
IMG.LoadPNG("data/PsDev.png", &png);
u32 imgX =(GFX->width/2)-(png.width/2), imgY = (GFX->height/2)-(png.height/2); These snippets are the font and image changer. These are located in the Data folder and allow easy change for the middle image(or in your own code to be where ever you choose on bitmap)or the font type, so this emulator is giving good flexibility and have it your way.
Anyway, in conclusion, I hope you enjoy this emulator as much as I do and make sure to thank deroad (KDS for improvement patches) for his hardwork, because it's really paying off! thanks bye -PsDev
Download: NoRSX PC Emulator / https://github.com/wargio/NoRSX__PCEMU



More PlayStation 3 News...