You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#321
Re: Insect Combat
Posted on: 2015/2/17 17:43
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I was working on this again. My FlashBoy was acting a little wonky, I don't know why. The Virtual Boy would power off a few times in the middle of a fight. It wasn't a battery issue as I had it plugged into the wall. But after I altered the code a little, it worked a little bit better after I loaded the program on it. I don't know if it's my program, the FlashBoy, the Virtual Boy, or all three. Anyway, if you want to try out the newest version for yourself (please do especially if you have a FlashBoy), at http://www.atari2600land.com/insecticide/
Top

#322
Re: Insect Combat
Posted on: 2015/2/17 17:54
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I found that when I turned the system off during fighting and turning it back on made the fighters' names and health be on the first warning screen. This has never happened before. What might be causing this?
Top

#323
Re: Insect Combat
Posted on: 2015/2/17 19:02
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
OK, I think I might have everything solved. For now, anyway. There's one thing I don't get though. When you turn the Virtual Boy off, why doesn't everything reset to 0 and not have to worry about text showing up that was there when you turned the system off?
Top

#324
Re: Insect Combat
Posted on: 2015/2/18 3:49
PVB Elite
Joined 2003/7/26
USA
1470 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
The "why" is irrelevant. Your job as a programmer, upon finding out that your assumption about the behavior of the system was false, is to change your program so that it produces your desired output without relying on said non-existent behavior.

tl;dr: Write a startup routine that clears everything.
Top

#325
Re: Insect Combat
Posted on: 2015/2/18 11:01
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I did, but I was just wondering why it does that. Shouldn't everything be reset when the Virtual Boy is turned off?
Top

#326
Re: Insect Combat
Posted on: 2015/2/18 19:41
PVB Elite
Joined 2011/7/1
Germany
1150 Posts
CoderContributorTop10 PosterLong Time User (8 Years) App CoderPVBCC 2013 Entry
Quote:

RunnerPack wrote:
The "why" is irrelevant. Your job as a programmer, upon finding out that your assumption about the behavior of the system was false, is to change your program so that it produces your desired output without relying on said non-existent behavior.

tl;dr: Write a startup routine that clears everything.


Actually, a good software developer will always investigate the "why". Fixing problems by curing the symptoms is a very sloppy way of doing things and will eventually backfire. You can only develop robust software if you know what you are doing.
Top

#327
Re: Insect Combat
Posted on: 2015/2/18 21:19
VUE(xpert)
Joined 2003/9/3
Sweden
442 Posts
PVBCC EntryHighscore Top10 3rdCoderContributorHOTY09 2ndLong Time User (15 Years) DonatorApp CoderPVBCC 2010 1st20+ Game RatingsPVBCC 2013 2nd
It's actually not a stupid question, so I'll try to explain it.
So, to actually answer the "why" (understanding the system is never irrelevant):

When you power the VB off, some amount of voltage stays in the system capacitors for a couple of seconds. Sometimes it's enough to keep your old data in the VIP/RAM. If you turn it back on again too quickly, before it has time to "die" and go completely powerless, you will see the data still being there.

The VB doesn't have built-in routines to guarantee that all memory will be 0 at startup (even though it most often is) so you should never assume that it is. You should consider the memory to be undefined, and the only way to guarantee a desired behaviour of memory that you use, is to clear it in your own code at startup.
Top

#328
Re: Insect Combat
Posted on: 2015/2/18 21:28
PVB Elite
Joined 2008/12/28
Slovenia
635 Posts
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (11 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Maybe the gccVB startup code should clear the VIP RAM. While I like to keep things minimalistic (so in my opinion it shouldn't initialize the column table; that's vbSetColTable's job), it does clear the WRAM and forgetting to clear the VIP RAM is a really easy bug to make. In fact, I've never cleared it in any of my projects (even though I've encountered the bug) because I always forget to.
Top

#329
Re: Insect Combat
Posted on: 2015/2/18 21:39
PVB Elite
Joined 2003/7/26
USA
1470 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
Quote:

thunderstruck wrote:

Actually, a good software developer will always investigate the "why". Fixing problems by curing the symptoms is a very sloppy way of doing things and will eventually backfire. You can only develop robust software if you know what you are doing.


I agree completely, and I didn't really mean to be so flippant, but going by VirtualChris's track record, I genuinely didn't think he would care about a technical description of the problem. Since it seems that is not the case, I apologize.

Thankfully, Dan stepped up and wrote a succinct explanation of the situation.
Top

#330
Re: Insect Combat
Posted on: 2015/2/18 23:59
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Thanks for the explanation. In the most recent version, I fixed a few glitches I saw involving Gi-Ant and Behe-Moth's special moves. Earlier today, I also put in an opponent jumping sound. I also tried to put in some AI so the opponent's moves are not reliant on your left or right button presses. But the opponent does go back and forth. It's your job to damage his health while blocking his moves with the left or right shoulder button (or jumping.)
Top

 Top   Previous Topic   Next Topic


Register To Post