make SYSINFO_INIT syscall return 0 on success

This commit is contained in:
Anthony Pesch 2017-11-30 17:19:49 -05:00
parent ff4eefa36d
commit 62c178dd50
2 changed files with 11 additions and 9 deletions

View File

@ -783,14 +783,17 @@ void bios_sysinfo_vector(struct bios *bios) {
* data from the system flashrom into 0x8c000068-0x8c00007f. always call
* this function before using the other two calls
*
* 0x8c000068-6f: system_id
* 0x8c000070-74: system_props
* 0x8c000075-77: padding
* 0x8c000078-7f: settings
* r0: zero if successful
*/
LOG_SYSCALL("SYSINFO_INIT");
uint8_t data[24];
/*
* 0x00-0x07: system_id
* 0x08-0x0c: system_props
* 0x0d-0x0f: padding (zeroed out)
* 0x10-0x17: settings (zeroed out)
*/
uint8_t data[24] = {0};
/* read system_id from 0x0001a056 */
flash_read(flash, 0x1a056, &data[0], 8);
@ -798,10 +801,9 @@ void bios_sysinfo_vector(struct bios *bios) {
/* read system_props from 0x0001a000 */
flash_read(flash, 0x1a000, &data[8], 5);
/* system settings seem to always be zeroed out */
memset(&data[13], 0, 11);
sh4_memcpy_to_guest(dc->mem, SYSINFO_DST, data, sizeof(data));
ctx->r[0] = 0;
} break;
case SYSINFO_ICON: {

View File

@ -131,7 +131,7 @@ static void holly_maple_dma(struct holly *hl) {
break;
default:
LOG_FATAL("holly_maple_dma unhandled pattern 0x%x", desc.pattern);
LOG_FATAL("holly_maple_dma unhandled pattern=0x%x", desc.pattern);
break;
}