Skip to content

Patch compatibility Power Mode 2003 #3384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

florianessl
Copy link
Member

@florianessl florianessl commented Mar 26, 2025

This PR adds compatibility for the PowerMode 2003 patch.
Other than the missing support for AAC audio files & the mapping of mouse buttons, this patch implementation should be feature-complete. (and less buggy than the original patch)

Depends on PR #3378 because I didn't want to create a new file for this implementation alone.

I did some research on this obscure patch & documented my findings in more detail on Makerpendium:
https://www.makerpendium.de/index.php?title=PowerMode_2003

There's an article on Hellsoft about this patch, that also includes a small sample project:
https://www.hellsoft.net/H5/reportajes/95-reportajes-especiales/150-power-mode-2003

Implemented features

  • Control Register 0
    • Opening Load Menu by setting V01:CR0 to 255
    • Exiting the game by setting V01:CR0 to 254
    • Retrieving value of V01:CR0 to check if Savefiles exist (Result = 1)
  • Mouse Cursor Support
    • Writing current cursor X/Y to V02:MCOORDX & V03:MCOORDY whenever a value is written to V03:MCOORDY
  • Full Keyboard Support using VirtualKey-IDs
    • Mode 0 will check entire Keyboard for presses and store pressed key with lowest priority to V04:KEY
    • Mode 1 to 255 will check a single Keycode and store its ID to V04:KEY (Otherwise 0)
  • Floating point operations using V05:FVALUE1 / V06:FVALUE2 / V07:FCODE
    • Mode 1: Calculation of sin / cos
    • Mode 2: Calculation of tan
    • Mode 3: Calculation of sqrt, with natural & fractional parts of result stored separately
    • Mode 4: Calculation of flaot division, with natural & fractional parts of result stored separately
  • "Special Mode" (Custom picture rotations)
    • Overriding the default rotation effect & rotating Pic-IDs 1-50 by a user-defined amount
      (Start of variable range stored in V08:SPECIAL - Block of 50 variables containing set rotation degrees from 0 - 256)
  • Other / Behavior changes when patch is applied:
    • Detection of patch by checking existence of file warp.dll
    • Skipping the title screen by automatically setting "new-game" = 1
    • Support for AAC files (Not implemented - should be part of another PR)
    • Replacing the default behavior for picture setting 'bottom transparency'
      (Standard picture rotation effect will be applied counter-clockwise if this value is abova 49)
    • Mapping Mouse buttons LEFT / RIGHT to in-game buttons DECISION / CANCEL (Not implemented)

- Refactor the way Player::config_game is initialized, so that the values set by indirectly adressing config params don't get overwritten.
- Replace all occurrences of ':' for INI parameters with '.'
- Game config parameters were passed by copy instead of reference in some occassions
- Also implement EXPlus modifier for RPG2k3
- Fix GCC warnings
…01] - V[0007] (Special commands, Mouse Input, Extended Keyboard input & floating point arithmetic)
…the audio backend might crash if it tried to play the format.
@Ghabry Ghabry added RPG_RT Patches Has PR Dependencies This PR depends on another PR and removed Building Battle Messages Settings All about customizable features, storing and applying them labels Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Has PR Dependencies This PR depends on another PR RPG_RT Patches
Development

Successfully merging this pull request may close these issues.

2 participants