It helps to think of declaration and definition as two separate things (sometimes written on the same line). Identifiers, with or without the const qualifier, can be declared only once per program (the “extern” qualifier notwithstanding). However, identifiers can be defined multiple times, unless they were declared const.
Just remember that:
const int * num = (int*)0x1234;
makes a modifiable pointer (located somewhere in RAM) to a read-only integer (which is located at the address 0x1234) and:
int * const num = (int*)0x1234;
would make a non-modifiable pointer (hopefully in ROM, in the case of the VB) that points to a writable integer (located at the address 0x1234).
Also, the compiler should store “const” data/pointers in, and access them from, the ROM, thus saving space in the WRAM area for things that can actually be written.
At least I think that’s how it works, anyway. If it doesn’t, it should 😛
What I don’t get is why the following:
int * const num = (int*)0x1234;
int * num2;
void main (void) {
num2 = num;
return;
}
Makes the compiler spit out: “warning: assignment discards qualifiers from pointer target type”.
“const” here isn’t a qualifier of the target type, but of the pointer’s type.
And besides that, if it’s just the pointer that’s a const, then what difference does it make that I’m assigning the address contained in that const pointer to another pointer? They’re both pointers to writable memory, so there’s no chance of breaking something by ignoring the const.
Anyone want to enlighten me? 😀
I would also recommend against shorting the regulator. On top of the reasons DogP gave, there’s also the fact that you can’t guarantee your microcontroller pin won’t get stuck, keeping the transistor in conduction and probably blowing the regulator. In fact, don’t most uC I/O pins default to open-drain inputs with internal pull-ups?
You should probably just go with the /INTCRO pin and patched ROMs.
Actually, the ones on ebay look like polarized glasses. They must have made both.
Also I’m pretty sure the $50,000 box on ebay is capable of producing red/blue output from a VB game on a standard (PAL) TV/projector.
Also, the Nintendo Power magazine glasses are different from both of the above glasses. They’re called “ChromaDepth” and they use what are essentially prisms in each lens to bend different wavelengths of light different amounts, which makes different hues appear at different depths (the prisms face opposite directions, so artificial parallax is created). Red is closest, and as you go through the “rainbow” the colors recede into the page/screen/whatever. They don’t work very well on video displays because of the relatively small range of wavelengths and the low resolution/poor color mixing.
For all intents and purposes, it’s just the guts of an SD card in a smaller case.
Vaughanabe13 wrote:
This is excellent information here! I have a few questions. Is the PSRAM you are referring to part of the CPU architecture or are you referring to the RAM on a game cartridge?I understand what you mean by the lines floating. I actually thought the lines would initially be at ground potential but I guess not.
What is the NVC? I haven’t read the programming manual/wiki for a while and I don’t remember what that stands for. I’m guessing it has something to do with the fetch/decode of the CPU pipeline?
So there is a reset line on the voltage regulator, but is there any other way to reset the system? Every CPU architecture I can think of has a way of “soft” resetting the CPU without losing power.
Honestly I think some of these questions I won’t be able to figure out until I can break out the cartridge pins to a breadboard and stick my logic analyzer on it. But I can’t do any of that until I fix my glitchy display problem, etc. etc.Yes, this is for a flash cart idea I have been playing around with. I have some theories in my head about how to do this but I need to know as much as possible about the VB before I start investing significant funds in this project. I’m technically still a college student after all!
1. The PSRAM is used as the “work” RAM in the VB. Like the RAM in a PC; used for variables and such. There’s 64KBytes to work with. Also, I guess I didn’t make it clear that the software on the cart is responsible for ensuring the 200us delay. It’s not automatic.
2. NVC means “Nintendo VUE CPU” I think. Anyway, it’s the customized v810 microcontroller that drives the VB.
3. To reset the CPU, you can just jump to the reset vector in the header (Guaranteed to be at 0xFFFF_FFF0, no matter the cart size). However, this won’t reset the peripherals to their default power-on state. I think DogP said it reboots with very quick shorts between the +5V and Gnd rails, but I don’t know how good that is for the health of the system 😛
4. DogP is the world leader in the field of veebology, so keep posting anything you need to know here and I’m sure he’ll reply sooner or later 😉
5. Believe me, I know what you mean about lack of time and funds…
Welcome, Tres!
I’m more interested in it as a development platform than as a collectible, but you do have what sounds like an excellent collection!
I bought my first one when Toys ‘R’ Us was closing them out. I think I paid $25. I got another a few years ago from a thrift store for only $5 (with a game and AC adapter!). I love it when they don’t know how much something’s worth 😀
Later!
They are basically the same game, and a lot of the text in the JP version is in English, but all the menus are localized in the two versions, sorry…
On the other hand, it might be a good excuse to learn to read Japanese! 😀
EDIT: Maybe you could use the English ROM in an emulator, just to get you through the menus. Is that considered “fair use”? 😛
AFAIK, the CPU starts immediately after the “power good” signal from the on-board voltage regulator releases the reset line. The delay you see in most commercial software is probably just an aesthetic choice by the developers to wait until the mirror motor is up to speed before displaying anything. As SNK observed, some games start the sound almost immediately, so there is probably very little noticeable delay.
Also, the “PSRAM” (pseudo-SRAM) used by the VB requires a 200us delay before it can be used, although this obviously couldn’t be detected by a human.
Since the cart data lines are likely to float high, the VB would probably read 0xFFFF with no cart inserted (although it would technically be “undermined” and could change at any time because of spurious EM fields, gamma rays, pixie-dust, etc. ;-)). Since this is an invalid opcode for the NVC, it would probably try to jump to the default “invalid opcode” exception handler (if there is one), which would also fail. It would basically lock up the VB until it was physically reset.
Does that about cover it? I assume this has something to do with your flash cart boot loader, right? I’m very interested in that project, although I probably won’t have the funds to get one, at least for a while.
It’s actually the title/menu/attract-mode song. I haven’t played in a while, so don’t know if it’s used in any levels.
I had some trouble with some of the screws with my modded driver, too. If you make another driver, one technique that’s worked for me is to slightly tighten the screws before loosening them. I know, it sounds weird, but it can break the friction on the screw enough that it comes right out.
Also, if you have a dremel, you have the means to modify the game-bit. Did it come with a sanding drum attachment? Most of them do and if not, you can pick one up at walmart, or someplace. The grit they use is the same stuff in the cutting disks, so it should be able to take off the “shoulder” of the game-bit enough to make it fit.
I hope you can get something to work…
Vaughanabe13 wrote:
If you’re suggesting I wouldn’t put love into it you’ve got another thing coming!
That’s exactly what I meant by “flawed logic” 😉
Question, would you guys rather have a flash cart that can interface to the computer via USB cable (like the current design), or would you prefer a removable MicroSD card solution instead? The R4DS flash cart I have has a slot for a MicroSD card and you can drag your ROM files onto the card with your computer and insert the MicroSD card into the game cart. Which system would you prefer?
I would prefer the SD one, but I’d rather have a full-size SD slot, since there’s enough room for it (and because I wouldn’t have to invest in new cards :-P). I suppose the micro slots are more future-proof, though, so you should probably go with that.
BTW, don’t you have to pay a license fee to use SD cards? Or can you use the MMC-compatibility mode without paying? I guess if it doesn’t add too much to the price it might be worth it to get SDHC support, and so on (16GB of VB homebrew, anyone? 8-)).
SNK wrote:
Good luck with a new flash cart, Vaughanabe13!But you will have a bigger problem than to find the right flash memory chips.
The logic is a little flawed, but the sentiment is quite poetic 😀
Thanks for making me smile 🙂
I’ve seen this thing, and I’m 98% sure it was Tiger Electronics brand, but I don’t remember the name of it and I can’t find a pic online, sorry…
I also remember seeing a tank one that works the same way, but it was, of course, vaguely tank-shaped with a desert camo (white/tan/brown/black) color scheme. I’m not sure if it had the motion sensing controls, though, since it didn’t have batteries in it.
gunpeiyokoifan wrote:
but technically my Gameboy did not come with an instruction manual 😛
That’s okay, just use the manual for anything battery-powered made in the last 30+ years 😛
I hate to be pedantic, but there isn’t any acid in an alkaline battery. Even if there were, it wouldn’t “go through” the plastic case (guess what kind of bottles they store most acids in) or your hands. The chemicals in the battery are mildly toxic in large quantities, but you’d probably have to eat a handful of the things just to get mildly sick (unless they’re really old, in which case they have Hg in them, and let’s not even joke about eating that).
Just use something to pry the batteries out (and dispose of them in a responsible manner; see above article), scrape the residue out of the compartment, make sure the contacts are still okay (an emery board cleans tarnish off quite well), put the new batteries in, and wash your hands in a reasonable amount of time. You’ll be fine.
And next time follow the instruction manual! 😛
Actually, the problem never existed.
If you stick with secular “reasoning”, you’ll always get either one answer or the other.
Good thing we don’t have to worry about it, huh?
Hey, congrats, that’s really… LOOK OUT! A GIANT SPIDER CAME OUT OF THE VB BOX TO BITE YOU!
heh, sorry, I just couldn’t help myself… 😛
Seriously, welcome to the exclusive club of smart people who aren’t too stuck-up, afraid, or just plain ignorant to play the greatest gaming system in existence (to date, anyway; I reserve final judgment until I get to play, and then develop for, the 3DS :-P)
I hope you can get Warioland soon. It is a great game, whether you’re a fan of Wario or not. I, for one, don’t really like the direction they’re taking the character, lately (but I still want Warioland Shake It!).
Also, opening the cartridge will not help you get closer to the contacts… Besides, they’re actually little tubular sockets, so you can’t really clean them, anyway (other than with the VB itself, as the others have said).
You may be able to clean them chemically, but I have no experience with that, so I can’t really advise (actually… I advise you not to attempt that :-P).
I hope Chris doesn’t have to upgrade his hosting package just to hold all these extra image attachments… 😉
gunpeiyokoifan wrote:
I really wish there was a VB-con now 😛
Where would we find a convention center big enough to contain all the fans? 😉