libretro / fuse-libretro

A port of the Fuse Unix Spectrum Emulator to libretro
GNU General Public License v3.0
36 stars 47 forks source link

'Tape Fast Load ' option won't turn off properly #62

Closed 2xtime closed 3 years ago

2xtime commented 5 years ago

When turning off the 'Tape Fast Load' option you should expect to see the game loading at it's original cassette speed. This is not the case. It is broken in this Libretro port.

In regular Fuse, to load at the original tape speed you need to turn off the options -

Fastloading
Use tape traps
Accelerate loaders

Maybe libretro fuse is not turning all these options off ?

You could have 3 settings in the 'Tape Fast Load' option -

No acceleration - load at standard speed, detect loaders on
Safe acceleration - detect loaders, fast loading and tape traps turned on
Full acceleration - all options on
snoofly commented 5 years ago

Would really like to see regular tape load feature fixed, it really brings back the sense of nostalgia. I’ve had a look myself to see if I can assist as I feel it maybe something quite simple/overlooked but haven’t got to the bottom of it yet.

snoofly commented 5 years ago

FYI, I hacked up my own core to test out fixing this and bruteforced a Slow load only version of the Fuse Core in sense that as in this issue FastLoad toggle does not appear to effect, I defaulted the initial settings related to fast loading from 1 to 0 and the new core always slow loads now whatever FastLoad is set to.

So the basic logic is there, I think one missing piece is that tape_traps is not set in the libretro side. On regular Win Fuse, I noted you'd still fast load to an extent if even just tape traps was set on. So as POC I simply added 0 settings to the init function in fuse-libretro/src/fuse/settings.c for tape_traps, accelerator_load, fastload, slt_traps.

So POC is fine for what it is but clunky as hell. I can't figure how to effect the update_variables (force) side of things to effect a change in the GUI to reflect in the running emu wrt FastLoad. LoadingSounds seems implemented exactly the same and works fine.

Anyway, hope my comments inspire and/or help in some way.

leiradel commented 5 years ago

Thanks to both of you, this will help a lot to find a fix.

@snoofly if you could attach your changes here it would be awesome.

snoofly commented 5 years ago

I changed the following function in src/fuse/settings.c (bold added):

int settings_init(int *first_arg, int argc, char **argv) { int res = fuse_settings_init(first_arg, argc, argv);

settings_current.auto_load = 1; settings_current.detect_loader = 1;

settings_current.printer = 0;

settings_current.bw_tv = 0;

settings_current.sound = 1; settings_current.sound_force_8bit = 0; settings_current.sound_freq = 44100; settings_current.sound_load = 1;

settings_current.joy_kempston = 1; settings_current.fuller = 1; settings_current.joystick_1_output = 1; settings_current.joystick_2_output = 2;

_settings_current.tape_traps = 0; settings_current.fastload = 0; settings_current.accelerate_loader = 0; settings_current.slttraps = 0;

update_variables(1); return res; }

I think this is the only change needed to force slow mode. I earlier tinkered with src/libretro.c and added the bold section just in case but I'm not sure it has any effect..

int update_variables(int force)

settings_current.fastload = coreopt(env_cb, core_vars, "fuse_fast_load", NULL) != 1; settings_current.accelerate_loader = settings_current.fastload;

_if (settings_current.fastload != 1) { settings_current.accelerate_loader = 0; settings_current.tape_traps = 0; settings_current.slt_traps = 0; }_

That's it.

snoofly commented 5 years ago

BTW Fuse 1.1.1 (non libretro) works fine - it's not something broken in the 1.1.1 code base

snoofly commented 4 years ago

Recompiled my local fuse core for the 9.0 controls thingma while back and the option to turn off and on fast load is working fine. Maybe a make clean sorted it with some of the above changes not really sure as don’t have access atm.

snoofly commented 4 years ago

Recompiled my local fuse core for the 9.0 controls thingma while back and the option to turn off and on fast load is working fine. Maybe a make clean sorted it with some of the above changes not really sure as don’t have access atm.

snoofly commented 4 years ago

Is this something being looked into? I tried rebuilding on switch (libnx) to test a more formal fix based on ideas above but run into a llzm missing lib issue.

Would be great to not have to rely on two separate fuse cores

snoofly commented 3 years ago

Fantastic. I shall look forward to the nightly getting all these upgrades/fixes.