Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Jo Engine Tools (printf, etc,) More...
#include "math.h"
Go to the source code of this file.
Data Structures | |
struct | jo_datetime |
DateTime struct. More... | |
Macros | |
#define | JO_FIXED_TV_WIDTH |
Fixed value of JO_TV_WIDTH. More... | |
#define | JO_FIXED_TV_HEIGHT |
Fixed value of JO_TV_HEIGHT. More... | |
#define | jo_printf_debug(X, Y, fmt, args...) |
#define | JO_NULL |
NULL implementation. More... | |
#define | JO_UNUSED_ARG(ARG) |
Mark function argument as unused. More... | |
Enumerations | |
enum | jo_language { English, Deutsch, French, Espanol, Italiano, Japanese } |
Language type. More... | |
enum | jo_horizontal_move { None, Left, Right } |
Horizontal move. More... | |
Functions | |
static __jo_force_inline short | jo_swap_endian_short (short value) |
Swap Short endian. More... | |
static __jo_force_inline unsigned short | jo_swap_endian_ushort (unsigned short value) |
Swap Unsigned short endian. More... | |
static __jo_force_inline unsigned int | jo_swap_endian_uint (unsigned int value) |
Swap unsigned int endian. More... | |
static __jo_force_inline int | jo_swap_endian_int (int value) |
Swap int endian. More... | |
int | sprintf (char *str, const char *format,...) |
sprintf prototypes More... | |
static __jo_force_inline void | jo_dma_copy (void *src, void *dest, unsigned int size) |
DMA copy. More... | |
static __jo_force_inline bool | jo_tools_is_whitespace (const char c) |
Check if the character is a whitespace. More... | |
static __jo_force_inline int | jo_4_char_hash (const char *const str) |
Create an hash code based on the first four character of the string. More... | |
jo_language | jo_get_current_language (void) |
Get Sega saturn current language. More... | |
void | jo_getdate (jo_datetime *now) |
get current date and time More... | |
int | jo_tools_atoi (const char *restrict str) |
atoi implementation More... | |
int | jo_strlen (const char *restrict str) |
strlen implementation More... | |
int | jo_strcmp (const char *restrict p1, const char *restrict p2) |
strcmp implementation More... | |
static __jo_force_inline bool | jo_string_equals (const char *restrict p1, const char *restrict p2) |
Determine if two string equals. More... | |
bool | jo_endwith (const char *restrict str, const char *restrict end) |
determine if str end with a specific string More... | |
void | jo_memset (const void *const restrict ptr, const int value, unsigned int num) |
Sets the first num bytes of the block of memory pointed by ptr to the specified value (interpreted as an unsigned char) More... | |
static __jo_force_inline void | jo_yield (void) |
Little pause possible. More... | |
static __jo_force_inline void | jo_spin_wait (int iterations) |
Causes "a thread" to wait the number of times defined by the iterations parameter. More... | |
void | jo_map_to_vram (unsigned short *restrict data, unsigned short *restrict vram_addr, unsigned short suuj, unsigned short suui, unsigned short palnum, unsigned int mapoff) |
Copies the image map data to VRAM. More... | |
static __jo_force_inline void | jo_cell_to_vram (unsigned char *restrict data, unsigned char *restrict vram_addr, unsigned int size) |
Copies the image cel data to VRAM. More... | |
Variables | |
char | __jo_sprintf_buf [JO_PRINTF_BUF_SIZE] |
Internal sprintf buffer. More... | |
Jo Engine Tools (printf, etc,)
struct jo_datetime |
#define JO_FIXED_TV_HEIGHT |
Fixed value of JO_TV_HEIGHT.
#define JO_FIXED_TV_WIDTH |
Fixed value of JO_TV_WIDTH.
#define JO_NULL |
NULL implementation.
#define jo_printf_debug | ( | X, | |
Y, | |||
fmt, | |||
args... | |||
) |
#define JO_UNUSED_ARG | ( | ARG | ) |
Mark function argument as unused.
enum jo_horizontal_move |
enum jo_language |
|
static |
Create an hash code based on the first four character of the string.
str | String |
|
static |
Copies the image cel data to VRAM.
data | Data source |
vram_addr | VRAM address |
size | Data size |
|
static |
DMA copy.
src | Data source |
dest | Destination |
size | Size of source |
bool jo_endwith | ( | const char *restrict | str, |
const char *restrict | end | ||
) |
determine if str end with a specific string
str | This is the string |
end | The ending string |
jo_language jo_get_current_language | ( | void | ) |
Get Sega saturn current language.
void jo_getdate | ( | jo_datetime * | now | ) |
get current date and time
now | result |
void jo_map_to_vram | ( | unsigned short *restrict | data, |
unsigned short *restrict | vram_addr, | ||
unsigned short | suuj, | ||
unsigned short | suui, | ||
unsigned short | palnum, | ||
unsigned int | mapoff | ||
) |
Copies the image map data to VRAM.
data | Data source |
vram_addr | VRAM address |
suui | SUUI |
suuj | SUUJ |
palnum | Palette number |
mapoff | MapOff |
void jo_memset | ( | const void *const restrict | ptr, |
const int | value, | ||
unsigned int | num | ||
) |
Sets the first num bytes of the block of memory pointed by ptr to the specified value (interpreted as an unsigned char)
ptr | Pointer to the block of memory to fill. |
value | Value to be set. The value is passed as an int, but the function fills the block of memory using the unsigned char conversion of this value. |
num | Number of bytes to be set to the value. |
|
static |
Causes "a thread" to wait the number of times defined by the iterations parameter.
iterations | defines how long "a thread" is to wait |
int jo_strcmp | ( | const char *restrict | p1, |
const char *restrict | p2 | ||
) |
strcmp implementation
p1 | First string |
p2 | Second string |
|
static |
Determine if two string equals.
p1 | First string |
p2 | Second string |
int jo_strlen | ( | const char *restrict | str | ) |
strlen implementation
str | This is the string |
|
static |
Swap int endian.
value | Little or Big endian int |
|
static |
Swap Short endian.
value | Little or Big endian short |
|
static |
Swap unsigned int endian.
value | Little or Big endian unsigned int |
|
static |
Swap Unsigned short endian.
value | Little or Big endian unsigned short |
int jo_tools_atoi | ( | const char *restrict | str | ) |
atoi implementation
str | This is the string representation of an integral number |
|
static |
Check if the character is a whitespace.
c | variable of char type |
|
static |
Little pause possible.
int sprintf | ( | char * | str, |
const char * | format, | ||
... | |||
) |
sprintf prototypes
str | String |
format | Format string |
... | Arguments |
char __jo_sprintf_buf[JO_PRINTF_BUF_SIZE] |
Internal sprintf buffer.