VOGONS


Reply 20 of 29, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Ehm, I am not sure I get the question, sorry.

So normally, there are three separate buttons in Heretic that control flight: up, down and center ( center also puts the wings artifact countdown on pause). Now, I would not know if to beat the game one needs to use flight, but it one has to they need theese 3 buttons mapped to something on the handheld...

In case the version of Retroarch you run allows you to, say, use a button or shoulder as "shift" and have arbitrary buttons act differently, depending on whether you have this "shift" pressed or not, you could probably map them.

Otherwise, you could patch the game with HTICFLY and use existing forward, backwards and use buttons to control flight. Only there is no special handling of the fly center button - it remains the same as in unpatched Heretic.

Handheld questions aside, I have always disliked the way Heretic and Hexen managed flight (and vertical look for that matter), so wanted to experiment with an alternative approach. E.g. for a Keyboard + Mouse set up with WASD used for movement, pressing Spacebar + W feels much less distracting (even more ergonomic) for me than going after an arbitrary key to take off. Also as an example, im my Hexen source port I have added freelook and flight is controlled with mouse movement and mouse jump button double click.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 21 of 29, by hereticnext

User metadata
Rank Newbie
Rank
Newbie

I accept suggestions, I have no idea if one inventory key is enough or both are needed. I also don't know if the take of power needs to have a separate key, in the original game it was backspace
handheld https://m.media-amazon.com/images/I/51nrL3RAW … _AC_SL1100_.jpg

AVAILABLE BUTTONS

D-Pad Up → Move Forward (Keyboard Up)
D-Pad Down → Move Backward (Keyboard Down)
D-Pad left → Turn Left (Keyboard Left)
D-Pad right → Turn Right (Keyboard Right)

Select → Map (Keyboard Tab)
Start → Show Menu (Keyboard Esc)

Menu button (R3) → Keyboard (Keyboard F1)

A → Fire (Keyboard Left-Ctrl)
B → Use (Keyboard Space), Strafe (Keyboard Left-Alt)
X → Stop Flying, Look Center (Keyboard Home)
Y → Run (Keybord Left-Shift)

L → Select Artifact (Keybord Left-Shift + Enter)
L2 → Previous Weapon (Keyboard 1)
R2 → Next Weapon (Keyboard 2)
R → Select Menu (Keyboard Enter), Use Artifact (Keyboard Enter)

B + D-PAD Up → Fly Up
B + D-PAD Down → Fly Down
B + D-PAD Left → Strafe Left
B + D-PAD Right → Strafe Right

UNSELECTED BUTTONS

Look Up → PGDN
Look Down → DELETE

Last edited by hereticnext on 2024-03-12, 15:22. Edited 10 times in total.

Reply 22 of 29, by hereticnext

User metadata
Rank Newbie
Rank
Newbie

I only have four left to remap, any suggestions

Reply 23 of 29, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

And because I though Chex would be a nice game for the Anbernic device I now own, I also did a patch for Chex.
This one works like the Ultimate Doom patch above - [2] for previous, [8] for next.

Ultimate Doom and Final Doom patches shared before were flawed, there's an updated ZIP file now a few posts back.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 24 of 29, by hereticnext

User metadata
Rank Newbie
Rank
Newbie

I only have to remap looking up and down, would it be possible to create a patch so that looking up was X + D-PAD Up and looking down was X + D-PAD Down? and it would be

AVAILABLE BUTTONS

D-Pad Up → Move Forward (Keyboard Up)
D-Pad Down → Move Backward (Keyboard Down)
D-Pad left → Turn Left (Keyboard Left)
D-Pad right → Turn Right (Keyboard Right)

Select → Map (Keyboard Tab)
Start → Show Menu (Keyboard Esc)

Menu button (R3) → Keyboard (Keyboard F1)

A → Fire (Keyboard Left-Ctrl)
B → Use (Keyboard Space), Strafe (Keyboard Left-Alt)
X → Stop Flying, Look Center (Keyboard Home)
Y → Run (Keybord Left-Shift)

L → Select Artifact (Keybord Left-Shift + Enter)
L2 → Select Weapon (Keyboard 2)
R2
R → Select Menu (Keyboard Enter), Use Artifact (Keyboard Enter)

B + D-PAD Up → Fly Up
B + D-PAD Down → Fly Down
B + D-PAD Left → Strafe Left
B + D-PAD Right → Strafe Right

UNSELECTED BUTTONS

Look Up → PGDN
Look Down → DELETE

Last edited by hereticnext on 2024-03-19, 15:52. Edited 1 time in total.

Reply 25 of 29, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Hey, while a patch for look up/look down is certainly possible, I am reluctant to produce one and for the following reasons:

1. Heretic has auto-aim, so looking up and down is not necessary during combat; your projectiles will go towards enemies above or below your level provided you are in principle shooting in their direction

2. I doubt there's much one would see in Heretic once they start looking up and down that one would not have already seen and once they do start, vertical shearing will kick in making things look ugly

3. I don't have an idea for an action button to use for looking. Use is already with fly up / fly down, and the rest either wor better without interfering with forward/backward movement, or have effect that one would rather not waste in case when two-button chord goes wrong and that effect is activated

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 26 of 29, by hereticnext

User metadata
Rank Newbie
Rank
Newbie

Hello, I have been investigating and for example in the PlayStation game Hexen, both the run and freelook buttons are x, so the following configuration would be better:

Look up → R2 + D-PAD Up
Look down → R2 + D-PAD Down

Searching the forums, for example, it can be used to shoot downwards when flying, it would be a good use please

Reply 27 of 29, by kmeaw

User metadata
Rank Member
Rank
Member

Here is another approach of cycling through weapons in Heretic and Hexen.
It is less invasive - it doesn't patch any runtime code neither on memory or on disk and does not affect demo playback.

To use, prepend wrapper.exe to your command line like "wrapper.exe heretic.exe -warp 3 8 -skill 5" (just "wrapper.exe heretic.exe" is fine if you don't need any extra arguments).
Then press 'J' to cycle through weapons.

It also works with Hexen.

Reply 28 of 29, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Cool stuff! But does this mean you have a wrapper around the engine code, that can activate itself on keyboard processing events and manipulate game state and game objects? Looks like a great foundation for an extensible quality of life enhancements providing poject, especially if one could code them in C. 😀

You've mentioned bobbing in a different thread, but I guess single key artifacts activation in Heretic Hexen-style and secondary key mapping for these in Hexen would also be possible, as well as, say, single key resetting of game progress to last automatic savegame for any soft/hard locks or impossible situations player founds themself in in Hexen?

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 29 of 29, by kmeaw

User metadata
Rank Member
Rank
Member

Unfortunatelly I lost the source code for this one. It was written in C and compiled to a 16-bit executable using Open Watcom compiler. But it wasn't too complex - it installs a real-mode software interrupt handler to feed the input events into the game using -externdriver. The actual events are fetched from the keyboard by reading the PS/2 data port (0x60) every time the game requests an input (up to 35Hz) by calling into the wrapper.

This method is non-invasive to the game's binary - it doesn't modify it in any way. But it doesn't have any abilities to manipulate the game state and game objects - the interface it uses is expected to be written by the wrapper and the data structure defined by the engine expects only certain key inputs. You won't even have easy access to the game's memory - the DOS/4GW extender would load it high so a real-mode application would not be able to address that memory.

I tried implementing more complex behavior by faking a network driver and starting a netgame but it has its own downsides - the network game would result in different player experience (respawns, no save/loads, extra items would appear during netgame) and every network node is expected to correctly fill the "consistency" byte (which is the first byte of the current state of rng) which you cannot calculate correctly without having the same engine running side-by-side. The same memory limitation applies - the network driver interface is a real-mode software interrupt, so no reads/writes to the game's memory.

The bobbing patch I mentioned in the other thread is invasive - it updates the code. I currently have a working web-based patcher for Hexen/Heretic, that enables the user to do custom keyboard mappings by overwriting the Logitech Cyberman handler - you can bind any inventory item to any key. Probably I would integrate the "no bobbing", "no light flickering" and maybe some other simple patches there. Single key loads should be possible - I have about 2KB free for extra code.