Mercurial > repos > blastem
changeset 1379:65f1d6558e9e
Update SMS code for changes supporting slow rise time emulation in IO code
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 29 May 2017 18:25:11 -0700 |
parents | 71c8b97eb962 |
children | 9a5352a2f57a |
files | io.c sms.c |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/io.c Mon May 29 17:30:40 2017 -0700 +++ b/io.c Mon May 29 18:25:11 2017 -0700 @@ -1841,6 +1841,7 @@ { case IO_GAMEPAD2: input = ~port->input[GAMEPAD_TH1]; + device_driven = 0x3F; break; case IO_GAMEPAD3: {
--- a/sms.c Mon May 29 17:30:40 2017 -0700 +++ b/sms.c Mon May 29 18:25:11 2017 -0700 @@ -13,9 +13,9 @@ sms_context *sms = z80->system; if (location & 1) { uint8_t fuzzy_ctrl_0 = sms->io.ports[0].control, fuzzy_ctrl_1 = sms->io.ports[1].control; - sms->io.ports[0].control = (~value) << 5 & 0x60; + io_control_write(sms->io.ports, (~value) << 5 & 0x60, z80->current_cycle); fuzzy_ctrl_0 |= sms->io.ports[0].control; - sms->io.ports[1].control = (~value) << 3 & 0x60; + io_control_write(sms->io.ports+1, (~value) << 3 & 0x60, z80->current_cycle); fuzzy_ctrl_1 |= sms->io.ports[1].control; if ( (fuzzy_ctrl_0 & 0x40 & (sms->io.ports[0].output ^ (value << 1)) & (value << 1))