dMZX Forums: Extended slime blob spread speeds -> MegaZeux Bugs -> Tracker

Jump to content

Report ID 793 Title Extended slime blob spread speeds
Product MegaZeux Bugs Status Confirmed (Severity 2 - Fair)
Version 2.92b Fixed in -
Introduced In Version <2.80Operating System

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

Report ID #793: Extended slime blob spread speeds

#1 User is offline  
Lachesis 

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

Posted 07 October 2019 - 05:25 AM

The current slime blob behavior has quirks that suggest that the slime blob spread speed was going to be extended from 2 to 3 bits, though it was never properly implemented. These quirks go back to the 2.51 GAME2.ASM code for the slime blob.

The params. There's also player damage (0x40) and invincibility (0x80).
            int spread_speed = current_param & 0x03;
            int current_cycle = (current_param &  0x3C) >> 2;


This is immediately followed by a suspicious line of code:
spread_speed |= spread_speed << 1;


Here's what this looks like in GAME2.ASM from MZX 2.51. Notably there is a comment before it that doesn't match what is actually happening:
        ; BL= SPEED BITS << 2 + SPEED BITS
        and bl,1+2
        mov al,bl
        add bl,bl
        setflag bl,al


If the behavior here matched the comment, this would explain why the cycle count is 4 bits; speed 0 would map to 0 cycle counts, speed 1 to 5 cycle counts, speed 2 to 10 cycle counts, and speed 3 to 15 cycle counts. The real behavior doesn't make as much sense though, mapping speed 0 to 0 cycle counts, speed 1 to 3 cycle counts, speed 2 to 6 cycle counts, and speed 3 to 7 cycle counts. This suggests 3 bits of cycle count would suffice (as the remaining 4th bit is completely wasted).

For speeds 1 ("2") and 3 ("4"), the slime blob doesn't even wait this long though, because of the next issue in the code:

              // Clear cycle
              current_param &= 0xC7;


This fails to clear the lowest bit of the cycle count, meaning slimes at speed 1 ("2") and 3 ("4") will actually wait 1 cycle count less. The result is that the two slowest slime speeds are actually the same!

More to the point, though, this failed bound suggests the spread speed was going to be expanded to 3 bits but this wasn't properly implemented. This is supported by the fact that the slime blob param dialog previously allowed selecting values from 1 to 8. The wrong bound for the dialog goes all the way back to 2.02.

Expanding the slime blob spread speed bound would clean up/version lock the current awkward behavior and seems in line with what was intended to happen here. If this happens it should be a 3.00 change.
"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

Replies (1 - 3)

#2 User is offline  
Lachesis 

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

Posted 07 October 2019 - 05:51 AM

Note: the "0xC7" bug doesn't exist in 2.02. Speed "2" goes 1/4 the speed as "1" (which is what you'd expect waiting 0 cycles vs waiting 3 cycles) and speed "3" and speed "4" are noticeably different. The bug is present as early as 2.07, however.

Also, the MegaZeux Tutorial for 2.02 made by Alexis explicitly notes "Speed 8" for the slowest slime speed, so extending the range definitely seems intentional.
"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  
Lachesis 

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

Posted 12 October 2019 - 09:10 PM

Moving to: MegaZeux Bugs

#4 User is offline  
Lachesis 

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

Posted 12 October 2019 - 09:11 PM

Updating status to: Confirmed
Updating severity to: 2 - Fair
Updating version to: 2.92b
Updating Introduced In Version to: <2.80

After thinking about it a bit more I think I'm going to treat this one like a bug. Needs to be fixed on a minor version so compatibility can be added if-needed and the param UI change should be reverted.
"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

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


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