dMZX Forums: Commands/Loopcount counters wrap on save reload -> Archived MegaZeux Bugs -> Tracker

Jump to content

Report ID 386 Title Commands/Loopcount counters wrap on save reload
Product Archived MegaZeux Bugs Status Fixed (Severity 2 - Fair)
Version 2.83 Fixed in 2.84
Introduced In Version 2.80XOperating System Windows XP

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #386: Commands/Loopcount counters wrap on save reload

#1 User is offline  
Old-Sckool 

  • megazeux breaker
  • PipPipPipPip
  • Group: Members
  • Posts: 649
  • Joined: 07-June 05
  • Gender:Male

Posted 13 October 2011 - 12:38 AM

Lach mentioned this in mIRC a few days ago, but I'm posting it here anyhow.

While both commands and loopcount can hold 32 bit numbers, they appear to be saved as an unsigned 16 bit number.

set "commands" 65536
: "q"
go east 1
goto "q"

This post has been edited by Old-Sckool: 13 October 2011 - 12:40 AM

<Nadir> mzxers don't make GAMES, usually
<phthalocyanine> they make experiences.
<Nadir> demos, more like
<Nadir> a glimpse into what could have been if mzx wasn't such a bore to work with
<Nadir> actually, i'm being unfair
<Nadir> i would have made mzx games if it was capable of running on more than 20 computers worldwide in 1998
<Nadir> >:D

<%Alice> functor
<%nooodl> i hear C++ has a thing called functors and they're completely different from Haskell functors...
<rorirover> the result is the most horrid thing in C++, it's basically black magic and it transforms any code you're writing into some eldritch monstrosity


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 6)

#2 User is offline  
ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 13 October 2011 - 09:15 PM

Updating status to: Flagged For Future Version
Updating severity to: 2 - Fair
Updating Introduced In Version to: 2.80X

Yep:
cur_robot->loop_count = fgetw(fp);

mzx_world->commands = fgetw(fp);

These aren't real counters. That's why they weren't magically upgraded to 32bit.

"commands" is easy to fix, since it's only preserved in saves. "loop_count" is a problem, because it's saved as part of any robot, not conditional on save. But we've fixed similar problems before, we just have to make another world file format change.

I might fix commands in 2.83b, but loop_count needs to wait for 2.84.

--ajs.

#3 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,966
  • Joined: 12-October 00
  • Gender:Male

Posted 20 May 2012 - 12:27 AM

Updating status to: Confirmed
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111

#4 User is offline  
Lachesis 

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

Posted 21 May 2012 - 05:51 PM

I got commands in GIT 52a9583b7d. loop_count still pending.
"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

#5 User is offline  
Lachesis 

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

Posted 21 May 2012 - 10:24 PM

Updating status to: Fixed
Issue fixed in: 2.84


loop_count required a robot format change. Thankyou MZM3. Fixed in 2e51e08560, but there's no way to downver this change at the time being.
"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

#6 User is offline  
Lachesis 

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

Posted 21 May 2012 - 11:49 PM

I redid this without a robot format change. LOOPCOUNT is now saved with the LOCAL counters and the space it previously occupied is nulled out. GIT 492bfe685d
"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

#7 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,966
  • Joined: 12-October 00
  • Gender:Male

Posted 27 May 2012 - 07:27 PM

Moving to: Archived MegaZeux Bugs


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

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


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