|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
API for the Dreamcast's system calls More...
Topics | |
| GDROM System Calls | |
| GDROM Syscalls and Data Types | |
| dcload system calls | |
| API for dcload's system calls | |
Files | |
| file | syscalls.h |
| Functions to access the system calls of the Dreamcast ROM. | |
Data Structures | |
| struct | cd_check_drive_status_t |
| Status filled by Check Drive syscall. More... | |
| struct | cd_read_params_t |
| Params for READ commands. More... | |
| struct | cd_toc_t |
| TOC structure returned by the BIOS. More... | |
| struct | cd_cmd_toc_params_t |
| Params for GETTOC commands. More... | |
| struct | cd_cmd_play_params_t |
| Params for PLAY command. More... | |
| struct | cd_cmd_getscd_params_t |
| Params for GETSCD command. More... | |
| struct | cd_cmd_chk_status_t |
| GDROM Command Extra Status. More... | |
| struct | cd_sec_mode_params_t |
| Sector mode params. More... | |
| struct | cd_transfer_params_t |
| Parameters for transfer. More... | |
Functions | |
| void | syscall_sysinfo_init (void) |
| Inits data needed by sysinfo id/icon. | |
| int | syscall_sysinfo_icon (uint32_t icon, uint8_t *dest) |
| Reads an icon from the flashrom. | |
| uint64_t | syscall_sysinfo_id (void) |
| Reads the ID of the Dreamcast. | |
| uint8_t * | syscall_font_address (void) |
| Gets the romfont address. | |
| int | syscall_font_lock (void) |
| Locks access to ROM font. | |
| void | syscall_font_unlock (void) |
| Unlocks access to ROM font. | |
| int | syscall_flashrom_info (uint32_t part, void *info) |
| Gets info on partition in the flashrom. | |
| int | syscall_flashrom_read (uint32_t pos, void *dest, size_t n) |
| Read data from the flashrom. | |
| int | syscall_flashrom_write (uint32_t pos, const void *src, size_t n) |
| Write data to the flashrom. | |
| int | syscall_flashrom_delete (uint32_t pos) |
| Delete a partition of the flashrom. | |
| int | syscall_misc_init (void) |
| Initializes all the syscall vectors. | |
| int | syscall_misc_setvector (uint32_t super, uintptr_t handler) |
| Set/Clear a user defined super function. | |
| void | syscall_system_reset (void) __noreturn |
| Resets the Dreamcast. | |
| void | syscall_system_bios_menu (void) __noreturn |
| Go to the BIOS menu. | |
| void | syscall_system_cd_menu (void) __noreturn |
| Exit to CD menu. | |
API for the Dreamcast's system calls
This module encapsulates all the system calls available in the Dreamcast BIOS, allowing direct interaction with system hardware components such as the GDROM drive, flash ROM, and bios fonts. These functions are essential for performing low-level operations that are not handled by standard user-space APIs.
| int syscall_flashrom_delete | ( | uint32_t | pos | ) |
Delete a partition of the flashrom.
This function returns a flashrom partition to all 1's, so that it may be rewritten.
| pos | The offset from the start of the flashrom you want to delete. |
| 0 | On success. |
| -1 | On failure. |
| int syscall_flashrom_info | ( | uint32_t | part, |
| void * | info ) |
Gets info on partition in the flashrom.
This function fetches the info of a partition in the flashrom.
| part | The partition number (0-4). |
| info | The buffer to store info (8 bytes in size). |
| 0 | On success. |
| -1 | On failure. |
| int syscall_flashrom_read | ( | uint32_t | pos, |
| void * | dest, | ||
| size_t | n ) |
Read data from the flashrom.
This function reads data from an offset into the flashrom to the destination buffer.
| pos | The read start position into the flashrom. |
| dest | The destination buffer. |
| n | The number of bytes to read. |
| int syscall_flashrom_write | ( | uint32_t | pos, |
| const void * | src, | ||
| size_t | n ) |
Write data to the flashrom.
This function writes data to an offset into the flashrom from the source buffer.
| pos | The start position to write into the flashrom. |
| src | The source buffer. |
| n | The number of bytes to write. |
| uint8_t * syscall_font_address | ( | void | ) |
Gets the romfont address.
This function returns the address of the ROM font.
| int syscall_font_lock | ( | void | ) |
Locks access to ROM font.
This function tries to lock a mutex for exclusive access to the ROM font. This is needed because you can't access the BIOS font during G1 DMA.
| 0 | On success. |
| -1 | On failure. |
| void syscall_font_unlock | ( | void | ) |
Unlocks access to ROM font.
This function releases the mutex locked with syscall_font_lock().
| int syscall_misc_init | ( | void | ) |
Initializes all the syscall vectors.
This function initializes all the syscall vectors to their default values.
| int syscall_misc_setvector | ( | uint32_t | super, |
| uintptr_t | handler ) |
Set/Clear a user defined super function.
This function sets/clears the handler for one of the seven user defined super functions. Setting a handler is only allowed if it not currently set.
| super | The super function number (1-7). |
| handler | The pointer to handler function, or NULL to clear. |
| 0 | On success. |
| -1 | On failure. |
| int syscall_sysinfo_icon | ( | uint32_t | icon, |
| uint8_t * | dest ) |
Reads an icon from the flashrom.
This function reads an icon from the flashrom into a destination buffer.
| icon | The icon number (0-9, 5-9 seems to really be icons). |
| dest | The destination buffer (704 bytes in size). |
| uint64_t syscall_sysinfo_id | ( | void | ) |
Reads the ID of the Dreamcast.
This function returns the unique 64-bit ID for the Dreamcast.
| void syscall_sysinfo_init | ( | void | ) |
Inits data needed by sysinfo id/icon.
| void syscall_system_bios_menu | ( | void | ) |
Go to the BIOS menu.
This function exits the program to the BIOS menu.
Referenced by cd::returnToBios().
| void syscall_system_cd_menu | ( | void | ) |
Exit to CD menu.
This function exits the program to the BIOS CD menu.
| void syscall_system_reset | ( | void | ) |
Resets the Dreamcast.
This function soft resets the Dreamcast console.