Page 1 of 2

How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 2:18 am
by StanVanman
Arc Development's port of Capcom's arcade game looks fantastic in videos - it's fast, colourful and smooth.



It's only when you try to play it that you realise how bananas mad the controls are - your firing direction rotates whenever you move left or right, so you can neither change it without moving, nor move sideways without your aim going tonto.

All it needs is for rotation to be detached from the normal movement keys and assigned to two others (say 9 and 0, handily right above O and P). I don't know anything about coding, how difficult would that be to do? It feels like it ought to be achievable, and it'd turn it from a completely unplayable game into a great one.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 8:39 am
by AndyC
You can move sideways without rotating, you can even see it in the video. You just have to stop firing when you move.

That does at least suggest the two things are decoupled behind the scenes though, so it's probably not impossible to change if you can find the relevant code (and enough space for whatever additional changes are required).

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 9:53 am
by HEXdidnt
Alternatively - and I feel this is true of basically all the home computers of the time - a joystick interface that allows for more than one 'fire' button. Something like the old AGF Programmable Joystick Interface might have been a reasonable basis, since it just piped keyboard controls through to the joystick.

Even an adapter for one of the myriad USB controllers, so the shoulder buttons could be used for rotation, would work for a game like Forgotten Worlds. I gather there's a 2-button controller for the Amstrad, but a lot of arcade games started using 3-button controllers quite early on, which resulted in some extremely dodgy controls in home conversions.

Another option would be to add rotary control, either to the joystick itself, or as a separate knob, though that could be unwieldy in practice. Apparently the arcade game's fire button was also the rotary control... Sounds kind of awkward to me, but I guess it could work.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 10:26 am
by AndyC
Yeah the Amstrad GX4000 pad has two fire buttons (the older Amstrad's are technically wired up so they could support 3 fire buttons though no joysticks ever supported it).

Thinking about Speccy Foggy Worlds, I think if I were going to try and fix it, I'd make fire+direction move the player and left/right without pressing fire rotate the character. That maintains compatibility with the joystick but I suspect might control better. Although it's possible the programmers tried that and it played badly anyway. Having separate keyboard keys works, but would make it unplayable with a joystick (although that's less of an issue with modern controllers and emulation).

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 11:04 am
by StanVanman
The Sega Master System version solves the problem with two fire buttons by having the player constantly autofire and using two two buttons to rotate. (There's no reason to ever stop firing in Forgotten Worlds.) That would probably have been the best solution for a keyboard machine like the Speccy - QAOPMN. The PC Engine, which also had two fire buttons, used one for fire and one for rotate (clockwise only), so the Speccy could also have had a one-button mode for joystick users with autofire that would still have been better than the mess they went with.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 1:50 pm
by Seven.FFF
HEXdidnt wrote: Wed Apr 12, 2023 9:53 am Another option would be to add rotary control, either to the joystick itself, or as a separate knob, though that could be unwieldy in practice. Apparently the arcade game's fire button was also the rotary control... Sounds kind of awkward to me, but I guess it could work.
Look into the Atari 2600 driving paddle (the one with the car on it, not the one with the tennis racket). Plugs into any 9pin joystick interface like kempston or IF2, and outputs a two bit code on the up and down pins.

01 >> 11 >> 10 >> 00 >> 01 >> etc

01 << 00 << 10 << 11 << 01 << etc

Used driving paddles are cheap and readily available, and they work perfectly with no modifications needed (apart from to the game code).

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 2:28 pm
by Joefish
The nobbled Arcade version you can get on the PS4 uses twin sticks - it's so much better.

Extra rotate right/left buttons are awkward. That's how you have to play it on something like MAME. Did the arcade original use rotating joystick caps, like Ikari Warriors? Those pulse a left/right signal with each rotational click stop. I'd rather just have something like holding FIRE to lock in your direction (like Crosswize).

A second button works OK for FIRE-LEFT or FIRE-RIGHT arrangements, like Side Arms in the arcade. And Raiga Strato Fighter has a face left/right toggle button. Or Hellfire, where the button switches between four different firing patterns (which I find to be just one too many).

My suggestion for a second fire button - generally - is not a new interface, but hack the joystick - add a button and a couple of diodes so it activates UP and DOWN simultaneously. It wouldn't work for holding it down, but it would work as a select / swap-weapon / jump / hi-lo gear toggle. But maybe no help with this game. As I say, twin sticks is the way forward. But probably even harder to patch in the code!

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 3:19 pm
by StanVanman
But if you hack a controller, you still have to also hack the game code to drive that controller. So why not just fix it the easy way by only having to hack the code?

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 3:44 pm
by AndyC
StanVanman wrote: Wed Apr 12, 2023 3:19 pm But if you hack a controller, you still have to also hack the game code to drive that controller. So why not just fix it the easy way by only having to hack the code?
Adding code for more button detection means you have to find new space in the code for it, so it's not necessarily easier unless you know for certain there is a chunk of memory that is never used.

By far the easiest fix, I'd expect, is changing whether fire has to be held down when moving or rotating, since it is likely to be changing a single check (or reordering the sequence of button checks slightly).

Re: How hard would it be to fix Forgotten Worlds?

Posted: Wed Apr 12, 2023 6:10 pm
by Joefish
StanVanman wrote: Wed Apr 12, 2023 3:19 pm But if you hack a controller, you still have to also hack the game code to drive that controller. So why not just fix it the easy way by only having to hack the code?
If you need more controls, it doesn't matter how hard you hack the code, you're not going to make any extra buttons appear!

If you are going to do it purely programmatically then something else has to give - most likely you'd have to make the game auto-fire, then have the button purely for aiming the gun.

Either have it so that holding fire rotates the gun clockwise, then you have to learn to let go at the right moment. Or each tap of the fire button rotates it one step clockwise. No anti-clockwise control at all.

Or, have Fire+Left and Fire+Right rotate the gun anti-clockwise and clockwise (like it does at the moment), but also prevent the player moving while that happens, as it's very annoying. That's probably the easiest one to hack into the code.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Thu Apr 13, 2023 3:59 pm
by Adrian_Singh
@StanVanman I had a look at the code and the control routine is very compact and complex in the way it has been set up in order to automatically handle 4 different types of fixed control configurations (QAOP+Space, Sinclair 1, Sinclair 2 and Kempston) and the ability to process the controls of 2 players onscreen at once. Ports and values are stored in a table and parsed using the stack! The code is heavily structured for only 5 inputs, so adding extra keys would require a fair bit of work.

As an experiment I tried a couple of things that were relatively easy to implement with a little massaging of the existing code...

1) Rather than fire+left/right rotating the gun anti-clockwise/clockwise, I tried making it so that holding left+right together rotates the gun clockwise, and up+down together rotates the gun anti-clockwise. This way fire is only used for firing. Not sure if they makes things a bit more predictable/controllable? Only useful if keyboard is being used obviously! But works for both players.

2) The other was to simply make firing automatic as someone had suggested given the nature of game pretty much requires firing most of the time. So the controls remain the same with fire only needed for changing the rotation of the gun with left and right. This works with joystick also and seems to work well so may be the better choice.

The latter is only good As long as you are in one player mode as a side effect is that player two now cannot fire. However the game seems a lot more playable with autofiring.

I've put the 2 mods together in a .POK file format, I know these can be loaded in Spectaculator, InkSpector, Fuse or Spin by simply dragging the file in once the game is loaded and enabling either of the mods (or you can enter the pokes manually, setting each address with the first value that follows it). To create the .POK file, copy and paste the following into an empty text file with a suitable name and change the extension to .POK

Code: Select all

NChange Controls
M  8 37276  24  253
M  8 37277  10  203
M  8 37278  26  0
M  8 37279  61  102
M  8 37280  230  202
M  8 37281  7  168
M  8 37282  18  145
M  8 37283  201  26
M  8 37299  24  253
M  8 37300  9  203
M  8 37301  26  0
M  8 37302  60  102
M  8 37303  24  40
M  8 37304  231  5
M  8 42001  158  151
Z  8 42019  181  151
NAutofire
M  8 36558  201  221
Z  8 36580  0  200
Y
Just to note this only works in the 128K version of the game...

Hope it helps make the game more enjoyable as I can see a lot of work has gone on under the hood so it deserves to be played!

Re: How hard would it be to fix Forgotten Worlds?

Posted: Fri Apr 14, 2023 10:34 pm
by StanVanman
Clever solution! And it totally works! In autofire mode Forgotten Worlds on the Speccy is now actually playable! Superb :)

Re: How hard would it be to fix Forgotten Worlds?

Posted: Fri Apr 14, 2023 11:09 pm
by StanVanman
(Can anyone hack those pokes into the actual TZX, though? It's a pain having to apply the pokes manually every time and saving 128K multiload snapshots is a bit problematic :( )

(I tried editing the 40K block in ZX-Blockeditor, but it caused an error on loading.)

Re: How hard would it be to fix Forgotten Worlds?

Posted: Fri Apr 14, 2023 11:13 pm
by Jbizzel
If you have an interface with 2 joystick ports, couldn't you use both ports for one joystick with loads of extra buttons?

I imagine nothing exists, but it would be easy to make the controller.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sat Apr 15, 2023 1:12 pm
by druellan
Adrian_Singh wrote: Thu Apr 13, 2023 3:59 pm I've put the 2 mods together in a .POK file format, I know these can be loaded in Spectaculator, InkSpector, Fuse or Spin by simply dragging the file in once the game is loaded and enabling either of the mods (or you can enter the pokes manually, setting each address with the first value that follows it). To create the .POK file, copy and paste the following into an empty text file with a suitable name and change the extension to .POK

Code: Select all

NChange Controls
M  8 37276  24  253
M  8 37277  10  203
M  8 37278  26  0
M  8 37279  61  102
M  8 37280  230  202
M  8 37281  7  168
M  8 37282  18  145
M  8 37283  201  26
M  8 37299  24  253
M  8 37300  9  203
M  8 37301  26  0
M  8 37302  60  102
M  8 37303  24  40
M  8 37304  231  5
M  8 42001  158  151
Z  8 42019  181  151
NAutofire
M  8 36558  201  221
Z  8 36580  0  200
Y
Just to note this only works in the 128K version of the game...
Hi! It is OK if I add this to the database, both the .POK and a small note? Thanks!

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sat Apr 15, 2023 1:18 pm
by XoRRoX
StanVanman wrote: Fri Apr 14, 2023 11:09 pm (Can anyone hack those pokes into the actual TZX, though? It's a pain having to apply the pokes manually every time and saving 128K multiload snapshots is a bit problematic :( )

(I tried editing the 40K block in ZX-Blockeditor, but it caused an error on loading.)
Are you emulating or using real hardware? As emulators like Fuse support .pok files and on real hardware, if you have a divMMC device with Bob Fossil's Browse NMI menu, you can also use .pok files.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sat Apr 15, 2023 4:14 pm
by StanVanman
I know POK files work. I'm asking if it's possible to edit the TZX so we don't have to manually apply the POK file every time.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sat Apr 15, 2023 9:04 pm
by Adrian_Singh
druellan wrote: Sat Apr 15, 2023 1:12 pm Hi! It is OK if I add this to the database, both the .POK and a small note? Thanks!
@druellan Yes no problem whatsoever with doing that.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sat Apr 15, 2023 10:02 pm
by Adrian_Singh
StanVanman wrote: Sat Apr 15, 2023 4:14 pm I know POK files work. I'm asking if it's possible to edit the TZX so we don't have to manually apply the POK file every time.
Unfortunately the game is protected by the Alcatraz Protection system so what is contained within the main data block of the TZX file is in fact a continuous flow of data bits which load to a series of different memory addresses without the loader stopping. The data is encrypted and is only decrypted once the game has been loaded. By reverse engineering the loader you could possibly determine which offsets to change but it would be a painstaking task trying to work out what values to insert so that they become the values that are desired following the decryption process.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sun Apr 16, 2023 2:30 am
by StanVanman
Gah. It's amazing how much stuff copy protection ruins, and it never ever stopped anyone copying anything.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sun Apr 16, 2023 4:24 am
by Ast A. Moore
StanVanman wrote: Sun Apr 16, 2023 2:30 am Gah. It's amazing how much stuff copy protection ruins, and it never ever stopped anyone copying anything.
I think it’s misleading to call it copy protection; we simply do it out of habit. It’s more appropriate to call it IP protection, in my book.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sun Apr 16, 2023 9:07 am
by p13z
Ast A. Moore wrote: Sun Apr 16, 2023 4:24 am I think it’s misleading to call it copy protection; we simply do it out of habit. It’s more appropriate to call it IP protection, in my book.
Harry S Price protection.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sun Apr 16, 2023 11:10 am
by jpnz
StanVanman wrote: Fri Apr 14, 2023 11:09 pm (Can anyone hack those pokes into the actual TZX, though? It's a pain having to apply the pokes manually every time and saving 128K multiload snapshots is a bit problematic :( )

(I tried editing the 40K block in ZX-Blockeditor, but it caused an error on loading.)
Give this a try - it's an old school crack...

Load it first, then playback the FW128 TZX (Alkatraz) - all the decryption is worked out (the border changes colour each time a decrypter is executed), the game will load and @Adrian_Singh's autofire pokes are applied

The crack is 99% code that Graham 'Turbo' Mason wrote back in the day - just a couple of adjustments on my behalf specifically for FW128

This has been tested with a real +3 and looks OK but does need a play through

If it's all good then I'll take a look at working on the alternative control method

Incidentally, with my +3 I do see snow effects on the initial screen - just above the fella's right eye, below his nose and in a couple of other places

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sun Apr 16, 2023 11:28 am
by StanVanman
jpnz wrote: Sun Apr 16, 2023 11:10 am Give this a try - it's an old school crack...

Load it first, then playback the FW128 TZX (Alkatraz)

I'm not quite sure how to do that in emulation :( If I load the crack then try to open the original TZX in Spectacular it just loads the original.

Re: How hard would it be to fix Forgotten Worlds?

Posted: Sun Apr 16, 2023 11:58 am
by jpnz
StanVanman wrote: Sun Apr 16, 2023 11:28 am I'm not quite sure how to do that in emulation :( If I load the crack then try to open the original TZX in Spectacular it just loads the original.
Aha,OK - understood! - just switch off Auto Load:

Tools -> Options -> Cassette Recorder -> [Untick] Enable auto loading

Insert the crack TZX image

Manually select the [Tape] Loader option from the 128K startup menu

Manually play the tape image

Wait for it to load

Change tape to the FW128 TZX

Manually play the tape image