[Rpcemu] PATCH: Implement OS_Reset "0x0ff"

Ralph Corderoy ralph at inputplus.co.uk
Wed Oct 31 04:49:00 PDT 2018


Hi Reuben,

Couple of minor comments.

> +	/* Intercept OS_Reset to check for turning off
> +	   https://www.riscosopen.org/wiki/documentation/show/OS_Reset
> +	*/
> +	if (swinum == SWI_OS_Reset) {
> +		if (arm.reg[0] == 0x46464F26) { /* 0x0ff */

It's "&0ff", not 0x0ff.

> +			exit(0);
> +		}
> +	}
> +
> +	if (swinum == SWI_OS_ReadSysInfo && arm.reg[0] == 8) {

Use `else if' as the previous if being true might not result in the
exit().

> +		arm.reg[0] = 0; /* Unknown hardware platform */
> +		arm.reg[1] = 0x08; /* Software control over PSU supported */
> +		return;
> +	}

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



More information about the RPCEmu mailing list