dMZX Forums: Certain Keys No Longer Change "KEY" Counters -> MegaZeux Bugs -> Tracker

Jump to content

Report ID 840 Title Certain Keys No Longer Change "KEY" Counters
Product MegaZeux Bugs Status UNFILED (Severity 0 - None Assigned)
Version 2.90 Fixed in -
Introduced In Version 2.90Operating System Windows, DOS

Page 1 of 1
  • Cannot start a new Issue
  • You cannot reply to this issue

Report ID #840: Certain Keys No Longer Change "KEY" Counters

#1 User is offline  
Joseph Collins 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 29
  • Joined: 10-October 02
  • Gender:Not Telling
  • Location:United States

Posted 03 February 2024 - 03:12 AM

I just… keep stumbling onto these things.

02/05 Edit: I focused this post on the "KEY" counter and moved the other stuff to its own post.


Issue: The "KEY" counter no longer responds to certain keys on the keyboard.
Versions Affected: v2.90 onward
Introduced in Version: v2.90
Operating System: Windows, DOS (2.93), likely others

Further Details
As is often the case, this bug affects a project I was working on. Initially, I thought that the mentioned counters were just entirely non-responsive in version 2.93. After doing a little experimenting, however, I've found that the actual problem is that certain keys were removed from whatever code changes those counters on key-press. At least, that seems like the case?

In my fiddling, I've noticed that the following keys which worked in version 2.80 are no longer affecting the "KEY" counter in version 2.90:

  • Modifier / Movement Keys
    Spoiler

  • Punctuation Keys
    Spoiler

  • Non-Numeric Number Pad Keys
    Spoiler

You'll notice that four keys – Page Up, Page Down, Home, and End – which worked in the MS-DOS versions no longer work in version 2.90+. These are the keys that concern me the most.

Related Issues

This post has been edited by Joseph Collins: 11 February 2024 - 08:04 AM



Page 1 of 1  
  • Cannot start a new Issue
  • You cannot reply to this issue

Replies (1 - 3)

#2 User is online  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 07 February 2024 - 11:07 PM

What is the version of the world you are testing with (the red version number in the top-right corner of the debug window)? This counter has some historical baggage but for worlds from <2.60 and >=2.80, it ought to be working correctly. I think 2.60 through 2.70 worlds have legitimate bugs here.

  • MegaZeux <2.60 only ever allowed alphanumeric codes here. None of the keys you mentioned will ever change the the KEY counter in a 2.51 world played in 2.51. The letter codes are uppercase rather than KEY_PRESSED's lowercase codes, and KEY is local to each board. All of this behavior is emulated in modern MZX versions for compatibility reasons. If you are running a 2.51 world expecting the directionals to show up in KEY, you will need to resave that world with a later version or play it in an old MZX version for now. (Likewise, ASCII RoboWars 3D can't "detect" 2.51s1 anymore.)
  • MegaZeux 2.60 through 2.70 allowed other internal codes regardless of the world version. The non-alphanumeric values are based on the TYPED character, not keyboard scancodes, I think.
  • MegaZeux >=2.80 treats this like a global and it's based on keyboard codes instead of the typed character. It's more or less a strange variant of KEY_PRESSED now and I don't think anyone really uses it in newer games. I think there's a fair argument for the old behavior to replace this entirely but that would be a feature request, not a bug.

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Joseph Collins 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 29
  • Joined: 10-October 02
  • Gender:Not Telling
  • Location:United States

Posted 08 February 2024 - 03:40 AM

… I'm so mad. Bordering livid. Why would Lex do it this way? Further testing reveals that, as far as the "KEY" counter in MegaZeux version 2.50 is concerned, the Home, End, Page Up, and Page Down keys are actually 7, 1, 9, and 3.

For some reason, tromdage just… mirrored the functionality of those keys to their equivalent Number Pad numbers. She also mirrored functionality of the Home Row Numbers to the Number Pad. So, what I thought was me being clever was actually me being completely and totally ignorant of what was really going on. I don't know who I should be more angry at. tromdage for cutting corners (there was probably a good reason), or me for not being even more thorough.

In any case, to follow up your investigation, I grabbed my test world and saved a copy of it in MegaZeux version 2.80, then also 2.93. Now, I'm just plain depressed. They keys work just freaking fine. I didn't know the program acknowledged the world's version and made certain "concessions" to accommodate.

And now if you'll excuse me, I need to make another bug report thread regarding the aforementioned "key mirroring" not being emulated in 2.xx/2.51 mode. And I guess I need to make a separate version of my game world which does actually use the real Home, End, Page Up, and Page Down keys. Devastating.

Thank you for your time.
I'm not that hard to find… if you know where to look.
-=( https://jolikmc.tumblr.com )=-

#4 User is online  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 08 February 2024 - 03:54 AM

Joseph Collins, on 07 February 2024 - 08:40 PM, said:

… I'm so mad. Bordering livid. Why would Lex do it this way? Further testing reveals that, as far as the "KEY" counter in MegaZeux version 2.50 is concerned, the Home, End, Page Up, and Page Down keys are actually 7, 1, 9, and 3.

For some reason, tromdage just… mirrored the functionality of those keys to their equivalent Number Pad numbers. She also mirrored functionality of the Home Row Numbers to the Number Pad.


The DOS versions (prior to the PC XT key counters) derive input keys from Turbo C++'s implementation of getch(), which is text based. That might explain part of this.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1
  • Cannot start a new Issue
  • You cannot reply to this issue

0 User(s) are reading this issue
0 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2024  IPS, Inc.