We're using cookies to ensure you get the best experience on our website. More info
Understood
@dogpRegistered July 25, 2003Active 7 years, 4 months ago
1,461 Replies made

I believe it’s caused by something on the window on the display, or possibly a scratch. I’ve had it appear after fixing a display… then to fix it, I pull the display, clean the window really well, and when I put it back, it’s gone.

If it’s a scratch, you can probably remove the window altogether if it bothers you. Obviously you’d need to be careful when removing it, but inside the display like it is… there’s probably little chance of damage once reinstalled.

DogP

Unfortunately, I don’t think I’m gonna do anything. I haven’t had time to really get started on anything yet, and while it’s always fun to join a competition… really, it’s probably better if I don’t, since I’d likely end up releasing some half-finished new project, rather than just spending the time finishing something I’ve already started and could actually make worthwhile (but not win any prizes).

But… who knows… maybe I’ll come up with something that I just gotta make, and really get into gear with it. There’s PLENTY of time left. With Mario Kart, I basically spent a few weeks at the beginning of the competition and a few at the end… slacking for the months in the middle 😛 . But at the moment, my feeling is that I’m probably out.

But I was thinking the same thing… who’s got cool stuff in the works?

DogP

RidingHero wrote:
Birdo. 🙂

By that, I assume you mean Cassarin 😉 .

DogP

Here’s a howto on my page: http://www.projectvb.com/linkcable.html … none of the released games use it though, only homebrew.

DogP

Have we hit the 25th and final of your lame posts yet? 😛

DogP

TheForce81 wrote:
not everyone has a grinder 😛

But everyone should have one 😀 .

DogP

In that thread there’s also a link to: http://www.planetvb.com/modules/newbb/viewtopic.php?post_id=8767 , which has a video of a guy just soldering the display (no chemicals or anything). It does work, but I personally find NaOH helps a lot.

DogP

If you read this thread: http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=3295&forum=1 , it tells you exactly what you need. I’ve also got pictures and details for a couple methods on my site: http://www.projectvb.com/displayfix.html .

DogP

It’s likely that you either have a problem that’s not tested in my test program, you’re not testing all possibilities, or you’re just not noticing the problem in the test. Have you tried pressing B to cycle between shades? And have you looked in both eyes very closely looking for differences?

From the screenshot, IMO it looks like you’ve got one or more pins that aren’t connected. I say that because the lines seem to follow close colors (dark colors turn black, light colors turn bright), which happens with floating inputs.

Both displays share all the same lines except pin 2. Check continuity with an ohmmeter between all pins from the left display to the right display (on the non-soldered copper traces). This will prove continuity from the display through the solder to the wire and to the motherboard for both sides.

DogP

If moving the IPD switch changes it, you almost certainly have bad connections somewhere, since that physically moves the displays.

DogP

DanB wrote:
I think DogP made some test program that can be run on the vb to find out which wire is bad? Never tried it though…

Yeah, if you have a flash cart, you can determine which lines are bad with this: http://www.planetvb.com/modules/games/?h051g .

I doubt you have any shorts, or both sides would have lines (all the signals are shared between the two displays except a select signal), but it’s definitely possible that there’s a bad connection from the solder to the wire. I have also seen displays die from too much heat, if you weren’t careful while soldering.

DogP

I’d just always include them… they’re pointed to by the crt0, so you could take them out of that… but the easiest thing is just to always make the functions (and use them if you like).

DogP

Depending how you’re set up you may need to declare your interrupt functions, like:
void key_vector(void){}
void tim_vector(void){}
void cro_vector(void){}
void com_vector(void){}
void vpu_vector(void){}

If that doesn’t work, try:
extern u32 key_vector;
extern u32 tim_vector;
extern u32 cro_vector;
extern u32 com_vector;
extern u32 vpu_vector;

The first one actually declares the functions, the second one assumes that they exist, but are external to the code (some gccVB configurations use one, others use the other). From the error, I’d guess you need the first.

DogP

I wouldn’t use the newvbmake.bat script… that’s what I use, because all my build tools are in the computer’s PATH, and I’m too lazy change to something more modern.

But if you can compile code at all (which you obviously can), just compile it exactly like you normally do (or copy/paste the code into your own code).

DogP

Yes, both the Wario Land and Red Alarm demos are identical to the regular games… they just have different stickers.

DogP

Have you tried that demo on real hardware? I seem to remember that demo being buggy on hardware too.

DogP

Fwirt wrote:
You know, now that you bring that up, why do you even need to mask it and check for equality when you could just do:

if (turn && 0x01)

Heh, I was gonna point that out too, though I didn’t want to drag this too far off topic. But since you brought it up, that should have been:

if (turn & 0x01)

With the logical AND (&&), it would have evaluated true any time turn was non-zero. The bitwise AND (&) masks the last bit, evaluating true only when the corresponding bit of turn is 1.

DogP

mbuchman wrote:
Okay, seriously, you guys are all making way too big a deal over figuring out if it is the computer or human turn. The quickest and easiest way is to use a mask…

if (turn & 0x01 == 0x01) {
 /* Player A turn */
} else {
 /* Player B turn */
}

Well… there’s a difference between writing someone’s code and helping them understand it. I wouldn’t try to explain bitmasks to someone who doesn’t understand arrays.

Chris: It doesn’t seem to work correctly… it seems to stop at times when the game isn’t over. Like:

XX
  O
OX

DogP

That should actually be:

	if1 computer_turn();

You need each condition in (), and you should use “logical or” ||, not “bitwise or” | .

And from a quick look at the code, I have no idea what’s going on (some comments would be nice :P). Where are Xs and Os stored? TTT is a very simple game and there’s only 9 spaces, so if you’re looking for “win detection”, after a tile is placed, just call a function like win_detect();

Then since there’s only a few combinations that can win, inside that function do something like:

//place_XY is the TTT grid, 00 is upper left, 20 is upper right, 22 is lower right
//unused is 0, X is 1, O is 2
	if2 ||3) X_wins();

That’s inefficient, but who cares… just fill that in with the rest of the logic. Or you could do something like summing each line, and checking if ==3 or ==6.

DogP

The easiest way would be:

if (turn==1)
{
  //do player's turn stuff here
}
else
{
  //do computer AI here
}

If that’s a little messy (could be, depending how much code you have), you could use a function like:

void player_turn()
{
  //do player's turn stuff here
}

void computer_turn()
{
  //do computer AI here
}

if (turn==1)
  player_turn();
else
  computer_turn();

DogP

  1. turn==1) || (turn==3) || (turn==5) || (turn==7) || (turn==9 []
  2. (place_00==1)&&(place_01==1)&&(place_02==1 []
  3. place_10==1)&&(place_11==1)&&(place_12==1 []