Go to the source code of this file.
Data Structures | |
| struct | DIRENTRY |
| Directory entry. More... | |
Functions | |
| void | PAD_init (unsigned long mode, unsigned long *pad_buf) |
| int | PAD_dr (void) |
| unsigned long | GetKernelDate (void) |
| Returns PSX kernel date. | |
| const char * | GetKernelRomVersion (void) |
| Returns a pointer to a zero-terminated string which contains the kernel ROM version. | |
| const char * | GetSystemRomVersion (void) |
| Returns a pointer to a zero-terminated string which contains the system ROM version. | |
| unsigned int | GetRamSize (void) |
| GetRamSize() should return size of RAM in bytes. | |
| void | EnterCriticalSection (void) |
| Enters a critical section. | |
| void | ExitCriticalSection (void) |
| Exits a critical section. | |
| void | SysEnqIntRP (int index, unsigned int *buf) |
| void | SysDeqIntRP (int index, unsigned int *buf) |
| void | ResetEntryInt (void) |
| struct DIRENTRY * | firstfile (char *name, struct DIRENTRY *dirent) |
| Gets information about the first file which matches the pattern. | |
| struct DIRENTRY * | nextfile (struct DIRENTRY *dir) |
| Finds a file with the same conditions as the previous call to firstfile(). | |
| int | get_file_size (char *name) |
| Gets the file size of the file named "name". | |
| int | get_real_file_size (char *name) |
| This function is like get_file_size() but doesn't round the file size to the block size. | |
| void | InitHeap (void *block, int size) |
| void | FlushCache (void) |
| void | SetRCntHandler (void(*callback)(), int spec, unsigned short target) |
| void | RemoveRCntHandler (int spec) |
| int | OpenEvent (int desc, int spec, int mode, int *(*func)(void)) |
| Opens an event, and returns its identifier Must be executed in a critical section. | |
| int | EnableEvent (unsigned int event) |
| Enables an event by its identifier returned by OpenEvent() | |
| int | CloseEvent (unsigned int event) |
| Closes an event by its identifier. | |
| int | DisableEvent (unsigned int event) |
| Disables an event by its identifier. | |
| int | DeliverEvent (unsigned int ev1, int ev2) |
| Generates an event. | |
| int | TestEvent (unsigned int event) |
| Checks if the event specified by its identifier has occured. | |
| int | WaitEvent (unsigned int event) |
| Waits until the event specified by identifier occurs. | |
| void | LoadExec (char *name, int argc, char **argv) |
| Replaces the executable image in memory with the one contained in another executable file in PSX-EXE format. | |
| int CloseEvent | ( | unsigned int | event | ) |
Closes an event by its identifier.
| event | Numerical event identifier |
| int DeliverEvent | ( | unsigned int | ev1, |
| int | ev2 | ||
| ) |
Generates an event.
This must be executed in a critical section. If the event to deliver is set to generate an interrupt, the handler function is called.
| ev1 | Numerical cause descriptor |
| ev2 | Numerical event class |
| int DisableEvent | ( | unsigned int | event | ) |
Disables an event by its identifier.
| event | Numerical event identifier |
| int EnableEvent | ( | unsigned int | event | ) |
Enables an event by its identifier returned by OpenEvent()
| event | Numerical event identifier |
| void EnterCriticalSection | ( | void | ) |
Enters a critical section.
| void ExitCriticalSection | ( | void | ) |
Exits a critical section.
Gets information about the first file which matches the pattern.
? and * wildcards can be used. Characters after * are ignored.
| name | File name string |
| dirent | Pointer to a struct DIRENTRY object. |
| void FlushCache | ( | void | ) |
| int get_file_size | ( | char * | name | ) |
Gets the file size of the file named "name".
It is actually just a wrapper around firstfile. It rounds the file size to the block size (2048).
| name | FIle name string |
| int get_real_file_size | ( | char * | name | ) |
This function is like get_file_size() but doesn't round the file size to the block size.
| name | File name string |
| unsigned long GetKernelDate | ( | void | ) |
Returns PSX kernel date.
| const char* GetKernelRomVersion | ( | void | ) |
Returns a pointer to a zero-terminated string which contains the kernel ROM version.
| unsigned int GetRamSize | ( | void | ) |
GetRamSize() should return size of RAM in bytes.
It doesn't seem to work most times. On SCPH1001, it returns 0. On SCPH1000, it returns 2 (which is the number of megabytes of RAM the PSX has.)
| const char* GetSystemRomVersion | ( | void | ) |
Returns a pointer to a zero-terminated string which contains the system ROM version.
| void InitHeap | ( | void * | block, |
| int | size | ||
| ) |
| void LoadExec | ( | char * | name, |
| int | argc, | ||
| char ** | argv | ||
| ) |
Replaces the executable image in memory with the one contained in another executable file in PSX-EXE format.
WARNING: Does not work right now.
Most likely you want PSX_RunExe()
| name | Path name of PSX-EXE executable |
| argc | Number of arguments |
| argv | Pointer to an array of string pointers for each argument |
Finds a file with the same conditions as the previous call to firstfile().
If a corresponding file is found, file information is stored to the structure pointed to by dir.
| dir | Pointer to a struct DIRENTRY object. |
| int OpenEvent | ( | int | desc, |
| int | spec, | ||
| int | mode, | ||
| int *(*)(void) | func | ||
| ) |
Opens an event, and returns its identifier Must be executed in a critical section.
| desc | Numerical cause descriptor |
| spec | Numerical event type |
| mode | Numerical mode |
| func | Function pointer to callback function |
| int PAD_dr | ( | void | ) |
| void PAD_init | ( | unsigned long | mode, |
| unsigned long * | pad_buf | ||
| ) |
| void RemoveRCntHandler | ( | int | spec | ) |
| void ResetEntryInt | ( | void | ) |
| void SetRCntHandler | ( | void(*)() | callback, |
| int | spec, | ||
| unsigned short | target | ||
| ) |
| void SysDeqIntRP | ( | int | index, |
| unsigned int * | buf | ||
| ) |
| void SysEnqIntRP | ( | int | index, |
| unsigned int * | buf | ||
| ) |
| int TestEvent | ( | unsigned int | event | ) |
Checks if the event specified by its identifier has occured.
| event | Numerical event identifier |
| int WaitEvent | ( | unsigned int | event | ) |
Waits until the event specified by identifier occurs.
| event | Numerical event identifier |
1.8.2