Fix combination of Didaktik D40 + Spectrum 128K
- D40 conflicts with 128K's memory paging, which uses very loose mask. Later Spectrum versions had this port detection improved, thus theoretically avoiding this conflict, but that alone does not fix the problem.
- When D40 is active, ROM most probably needs to be set to "1" (48K rom). But as I remember that Didaktik 128K worked also in 128K rom mode, this needs to be investigated/tested.
- There is a hardcoded port writeback mechanism that uses bad memory port algorythm from first 128K Spectrum for all 128K versions.
- I was able to prototype the whole fix, allowing me to run 128K game ports from D40 floppies, however to do this generically, I need to think about this in a broader sense.
- Implementing generic writeback mechanism maybe, although that is a bit harder to do. The place where it is has no port info. Or implement new machine - Didaktik 128K. We'll see..
Branch: https://sourceforge.net/u/arki55/fuse/ci/arki55/features/T3-D40-plus-128K/~/tree/
Implemented new configuration setting "Port and ROM patch for 128k+D80".
When enabled, behavior of Spectrum 128K (the first one) slightly modifies:
- ROM is hardcoded to page 1 only (48K mode)
- RAM page decoder's mask changes from port & 0x8002 = 0 TO port & 0x8022 = 0x0020
- D80 interfaces is activated as optional for Spectrum 128k.
When changing the value of this setting, FUSE will ask the user if to hard reset machine. Similarly as when changing peripherals.
I've also improved the hacky writeback mechanism a bit. It will be controller via a new machine variable "writeback" (mask, value, write_port).
Available for testing in branch arki55/testing .
Last edit: Arki55 2022-12-20
Pull Request back to fuse:
https://sourceforge.net/p/fuse-emulator/fuse/merge-requests/13/
Found bug when loading Beta images..
Bug fixed, had wrong mask in original port decoder
https://sourceforge.net/u/arki55/fuse/ci/7a6d4cc5181df91716587149406e90873fbedcf9/tree/machines/spec128.c?diff=1e1825319c7643bdadd11e2e20b146b58b2b1f54
Ticket moved from /u/arki55/tickets/3/
Missing: Hard reset when setting changes
Update: Implemented! When saving general options, when some specific setting(s) are changed, there wil be question if to hard reset computer, the same way as when changing hardware. [20.12.2022]
Last edit: Arki55 2022-12-20
Fixed build under linux due to BOOL in .h file.
Fixed also inconsistent "&&" in options.dat between wind32 and linux. Replaced it with "and" word.
Alternative solution idea: I have an idea, alternatively, instead of having this setting in General options, this patch could be implemented as an optional Peripheral component, enabled as optional for original Spectrum 128K only. There it would be easier to configure the need for a hard reset..
Fixed build under Linux + Widget
Tested build under Linux + GTK3 as well
https://github.com/arki55/fuse-fuse/pull/23
Test-Build release in GitHub:
https://github.com/arki55/fuse-fuse/releases/tag/test_arki55_features_T3-D40-plus-128K-final-deploy
The same in SourceForge:
https://sourceforge.net/projects/arki55-fuse-mod/files/test_arki55_features_T3-D40-plus-128K-final-deploy/