Thanks! Makes sense… I’d just never thought of a palette as 3 colors, plus a transparency. I guess I’ll just stick with 3 colors, since 4 seems like a lot of work. 🙁
Also, forget the FPS question, since I realize now that it was a stupid question (it depends on the how often the game updates the frame buffer, not how often the VB draws the frame buffer, am I right?)
But using that method, don’t you end up with 2 blacks? (1 transparent and 1 nontransparent?) I thought about doing that, but then you can only use 3 colors (counting the extra black as a color.)
Hmm… Looks familiar: 😀
And is the Mario sprite you used from Mario Clash?
Anyway, I finally decided what I’m going to work on for the next two months… A Yoshi’s Cookie port. I’ve already begun to work on the code, and I hope to get some beta cookie sprites done today. It shouldn’t be that hard, so if I focus, I might be able to turn out a playable beta in 2 months. I’ll keep you posted with screenshots!
Yes, but the seller won’t ship internationally, and the bidding starts at around $65. I’ve never seen that design of stand before though… Does anyone know anything about it?
I thought of using an iron, but I didn’t have one handy, and couldn’t borrow one because the only available one was owned by someone who was afraid I would get melted plastic all over it.
It does seem like the heating process works better when you have a metal object pressing on the PCB. Probably because, as you said DogP, the metal object absorbs heat and evenly distributes it over the cable; without anything pressing on the cable it just sits on top of the board and melts a little bit.
Actually, both of my displays aren’t totally fixed. My auxiliary VB still has some lines in the right display. Maybe I’ll “iron out” that glitch some day if I’m bored (pun intended 😛 )
:-):-):-)W00T!:-):-):-)
After tinkering with them for several hours, I got both of my VBs working again! In the process, I discovered another (perhaps large) improvement on the oven method.
Before you put the displays in the oven, bend and cut a paperclip so that it can be clipped to the display, with one straight wire extending over the area where the ribbon cable attaches to the display board. Then bake them (or broil in my case :-D), and remove the paperclips when the displays have fully cooled. What this does is essentially “melt” the cable to the board in the spot where the paperclip was. When I removed the paperclips, there were actually visible indentations in the cable contact spot.
It sure is nice to be able to play Teleroboxer again. 😉
Great! Thanks a lot! I have a good amount of programming experience, but not that much experience with C, let alone low-level C, so a lot of this is a whole new world to me. Luckily, it’s all been making sense so far.
RunnerPack, you deserve commendation for your work on the wiki. I was beginning to wonder if it would ever develop past an empty shell with quotes from David Tucker’s manual stuffed in it. Thanks to a lot of recent work, that’s changing!
Now it’s my turn to ask a question again. Here’s my code:
#include "libgccvb.h" #include "chartest.h" #include "maptest.h" //Screen is 384 X 224 int main() { int objX=0, objY=0; vbDisplayOn(); copymem((void*)CharSeg0, (void*)CHARTEST, 256*16); copymem((void*)BGMap(0), (void*)MAPTEST, 256*16); vbSetWorld(31, WRLD_ON, 108, 0, 76, 0, 0, 0, 168, 72); SPT3 = 0x100; SPT2 = 0x1; vbSetObject(2, OBJ_ON, objX, 0, objY, 9); vbSetWorld(30, WRLD_OBJ | WRLD_ON, 0, 0, 0, 0, 0, 0, 0, 0); vbSetWorld(29, WRLD_END, 0, 0, 0, 0, 0, 0, 0, 0); vbDisplayShow(); while(1) { if (vbReadPad() & (K_LR)) objX++; if (vbReadPad() & (K_LL)) objX--; if (vbReadPad() & (K_LU)) objY--; if (vbReadPad() & (K_LD)) objY++; vbSetObject(1, OBJ_ON, objX, 0, objY, 9); vbWaitFrame(40); }
But the compiler gives me the error “invalid lvalue in assignment” for both of the lines where i try to set the SPT pointers (lines 15 and 16). I also tried using decimal values, but I still got the error. Help?
Ahh…. I know what you mean now. Those DKC backgrounds do look rather cool. But RunnerPack is right, you’d have to use affine mode for that. Aside from affine mode, the only other way I can think of to get that effect would be to have a whole bunch of worlds layered on top of each other, and do a lot of parallax scrolling to achieve depth. That would use a whole bunch of worlds though, whereas affine only uses one.
Actually, to be honest, I did always wonder how they pulled that trick off in those DKC games.
In my experience, the bic pen trick never works. I’ve tried it on lots of different consoles, and all I ever end up with is black shredded plastic coating the screw. The pen will take the shape of the screw head, but the plastic isn’t strong enough to turn the screw, so it just bends and shreds. Instead, you could try DogP’s modify the flathead screwdriver method found here, or you could buy a special bit and grind down the shaft to fit in the VB, which is what I did. The VB is a very difficult object to open…
Bruno: Wait… I don’t think that you’re talking about HBias and VBias at all… I think that you just mean scrolling backgrounds? In order to do that, you just have to update the GX and GY values of whatever world you want to scroll (for example, decrease the GX value each step to make the background move left.) HBias is used to make the background look “wavy” by shifting each line left or right, not the whole background.
Even though I haven’t been programming for very long, I did notice that there are an awful lot of libgccvb’s floating around.
I don’t know where you would begin merging them. You could probably start by just taking the most basic and useful functions from all of them, and moving them into one file (e.g. vbSetWorld, vbReadPad, etc.) You could add on more things (like direct screen draw) from there. I need to take a look at that etch a sketch demo…
DogP: This is more just for the sake of learning how to use them. However, I was thinking of making a game that involves bullets for my contest entry, and I think that bullets are a good use for OBJs…
One more question I had about OBJs is… how DO you set the SPT# pointers? Is it as easy as SPT3 = 200? (That seems way too easy.)
Actually, I have a couple more questions, although they don’t necessarily pertain to objects. First: I’ve read a lot about changing palettes while the VB is drawing the screen. I was wondering, how can you tell when and where the VB is in the drawing process? Is there a register you can check? Secondly, since you’ve pointed out that BGMaps are a better idea for large sprites, would you accomplish animation by making a BGMap with all of the frames of your animation in it, and then just changing the MX/MY of the world to “play” the animation?
Bruno: I’m just a n00b, so I don’t know if I’m right about this, but from what I understand, the answer to both of your questions would be no. First of all, (correct me if I’m wrong) a world can only be an object world or an HBias world, not both. Secondly, because it’s HBias (not VBias) the shifting only works horizontally. There might be a way to implement software VBias, but it would likely be pretty complicated.
The oven method works okay, but I’ve also had major failure while trying it. I had displays that only had a couple of lines black, but when I finished the process, the displays were completely messed up… I’ve repeated the process several times on the same displays, but without any luck… Just out of curiosity, does anybody know of a way to improve on it? I’ve heard that right after taking the displays out of the oven, you can clamp them between two boards and let them harden again, but I haven’t tried it yet. I’m beginning to think of swapping the displays out of my other working VB.
The wiki helps a lot, but I have a clarification question…
If you create an object, using the vbSetObject procedure in libggcvb, It will create and object at the nth spot in OAM. When drawing worlds, the first object world only draws the last 256 objects in OAM. Does this mean that when using vbSetObject, you should start creating objects at n = 1024, and work your way backwards? Also, does this mean that in order to get to object #1, you have to have 4 object worlds?
I can see why you’d want to use BGMaps instead of OBJs for large sprites, but I’m still curious about OBJs. I also have some questions about display refreshes later.
I’ve just recently started programming, but one thing that I think would be nice would be the ability to zoom in on Charmaps, so that you could more easily select the tile you want.
😯 Wow, it’s been a while since I visited the page. A programming competition huh? Hmm… I might have to start putting some ideas down on paper. (And reading through some documentation.)
Looks like DogP is going to win at this rate. 😀
Just out of curiosity, what if we don’t have the hardware to test our software? So for example, it looks great in an emulator, but not so great on the system?
How long should you put the VB displays in for? I’ve cooked my VB displays several times, but after the first time (which made the displays worse) nothing has worked. The left display doesn’t show anything but twitchy lines, and the right display sort of works, but the images twitch and often are all fragmented or have sections missing. If I cook the displays for 3 minutes, at 90 degrees Celsius (around 200 Fahrenheit) will that be too much? I’m really desperate to get my VB working again.
P.S. w00t! 100th post! (Sorry if that seems a little n00bish. 😀 )
There must be a problem with the compiler because I’m still getting errors. That’s really annoying. I wonder what’s going wrong… Oh well, I’ll just keep being a VB fan, even if I can’t write software for it (yet.)
Hey dasi, could you post your source code? Every time I try to compile an example, I keep getting loads of errors (even after I think I’ve fixed them all) and I want some code that I know will compile the right way. That way I can start figuring out how to program with a code example that actually works! 😛