mirror of https://github.com/xemu-project/xemu.git
Add option to skip Xbox boot animation.
This commit is contained in:
parent
d90dee0892
commit
c107b96789
|
@ -20,8 +20,9 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "hw/i2c/smbus.h"
|
||||
#include <qemu/config-file.h>
|
||||
|
||||
/*
|
||||
/*
|
||||
* Hardware is a PIC16LC
|
||||
* http://www.xbox-linux.org/wiki/PIC
|
||||
*/
|
||||
|
@ -128,7 +129,7 @@ static uint8_t smc_read_data(SMBusDevice *dev, uint8_t cmd, int n)
|
|||
printf("smc_read_data: addr=0x%02x cmd=0x%02x n=%d\n",
|
||||
dev->i2c.address, cmd, n);
|
||||
#endif
|
||||
|
||||
|
||||
switch(cmd) {
|
||||
case SMC_REG_VER:
|
||||
return smc_version_string[
|
||||
|
@ -137,9 +138,16 @@ static uint8_t smc_read_data(SMBusDevice *dev, uint8_t cmd, int n)
|
|||
/* pretend to have a composite av pack plugged in */
|
||||
return SMC_REG_AVPACK_COMPOSITE;
|
||||
|
||||
case SMC_REG_SCRATCH:
|
||||
case SMC_REG_SCRATCH: {
|
||||
/* Skip boot animation if the "skipanim" flag was set. */
|
||||
QemuOpts *opts = qemu_opts_find(qemu_find_opts("machine"), NULL);
|
||||
if (opts && qemu_opt_get_bool(opts, "skipanim", 0))
|
||||
{
|
||||
return SMC_REG_SCRATCH_SHORT_ANIMATION;
|
||||
}
|
||||
|
||||
return 0;
|
||||
// return SMC_REG_SCRATCH_SHORT_ANIMATION;
|
||||
}
|
||||
|
||||
/* challenge request:
|
||||
* must be non-0 */
|
||||
|
@ -155,14 +163,14 @@ static uint8_t smc_read_data(SMBusDevice *dev, uint8_t cmd, int n)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int smbus_smc_init(SMBusDevice *dev)
|
||||
{
|
||||
SMBusSMCDevice *smc = (SMBusSMCDevice *)dev;
|
||||
|
||||
|
||||
smc->versionStringIndex = 0;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue