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 12 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

@github-actions github-actions bot added Window/Scenes Bitmaps Audio Building Battle Messages Settings All about customizable features, storing and applying them labels Mar 26, 2025
@Ghabry Ghabry added RPG_RT Patches Has PR Dependencies This PR depends on another PR and removed Window/Scenes Bitmaps Audio Building Battle Messages Settings All about customizable features, storing and applying them labels Mar 26, 2025
@florianessl florianessl force-pushed the compat/PowerMode2003 branch from e1e4ae3 to 20ca728 Compare April 30, 2025 12:06
@florianessl florianessl changed the title Patch compatibility Power Mode 2003 Patch compatibility: Power Mode 2003 Apr 30, 2025
@Ghabry Ghabry added this to the 0.8.2 milestone May 7, 2025
Copy link
Contributor

@fdelapena fdelapena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides -Wunused warnings, looks good to me!

@fdelapena
Copy link
Contributor

Mapping Mouse buttons LEFT / RIGHT to in-game buttons DECISION / CANCEL (Not implemented)

Related: #634

@carstene1ns carstene1ns added Awaiting Rebase Pull requests with conflicting files due to former merge and removed Has PR Dependencies This PR depends on another PR labels Jul 25, 2025
@florianessl florianessl force-pushed the compat/PowerMode2003 branch from 20ca728 to cb772cb Compare August 1, 2025 11:51
…ode to game_runtime_patches.cpp & Implemented the L/R button bindings for PowerMode2003
@florianessl
Copy link
Member Author

Button mapping for Mouse L/R is now also implemented.

This fixes a screen for this Spanish zelda fangame: https://www.hellsoft.net/H5/component/remository/Juegos/Rpg-Maker-2003/The-Legend-of-Zelda-Necklace-of-Elements/?Itemid=537

…ing: Pressing L/R versions of SHIFT/CTRL/ALT should always return the generic keycode (Lowest keycode takes precedence when checking for 'any' key press)
@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label Aug 1, 2025
…herwise the audio backend might crash if it tried to play the format."

This reverts commit afaeca3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants