We're using cookies to ensure you get the best experience on our website. More info
Understood
@jorgecheRegistered March 15, 2006Active 3 months, 1 week ago
207 Replies made

Jmm, going back is the option I don’t want to take at this point because all the code had been rewritten in a pseudo objective fashion, and the hardware related control has not changed so much.

I don’t think I can publish the code until my grade because I’m pretty sure I will be accused of robbery… but of course I will release everything after that, I’m on the side of the Open Source!.

Well I will try to implement some things these days and will try again on the weekend…

If you can think of anything Krisse, please let me now to try it.

Is anyone there?, I have messed around with the ROM all the weekend and have found that the ROM filling is ok, the problem is a little more strange than I thought.

When I boot the ROM, it shows some random bars at the left side of both screens, and somehow reacts to key pressing… after pressing some buttons like a crazy, the system reboots itself and I can see for a second fraction the image supposed to be saw, but only on the right screen, in the left one the image is completely shifted to the right and I can see only a part of it. I now that the system reboots because I have put a counter that I can see in the right display, an it begins to count up every time the image is visible.

Now, I thought it had something to do with the virtual heap I created to emulate dynamic memory… initially I used 20000 bytes… now I have reduced that to 8192 (a quantity used in previous compilations which run perfectly), but nothing yet.

I have also checked that I’m not writing to world attributes when the VIP is rendering, and checked one hundred times the initialization functions provided in libgccvb, and all the routines are intact.

I have really no clue about whats going on… I have begun to read the official development manual published here, but still haven’t found anything useful.

Anyone?

jorgeche

I have reduced the size of the ROM to 128KB again, but I got the same result, just a bar on the left of each display that somehow reacts to key pressing… indeed, I’m almost sure the game is playing and the problem has to do with display memory area (The VB run great every game I have, and the ones I’ve burned to flash memory such as Teleroboxer or Space Squash). So I dismiss that the cause is the grown in the ROM’s size and the padding.

I’m using the same compilation of the latest gccvb version from David Tucker I was using before when my engine ran fine in the VB.

Additionally, I have made tests initializing the column table and not, waiting and not for the screen synchronization… and I have run out of ideas… anyone?

Thanks for your help

Jorgeche

Thanks for the reply DogP, I’m afraid I will have to stay red/blue… that’s to much hardware stuff, and even when I really would like to learn all that, right now I’m to busy on the engine. I was just looking for a better way to diplay my project in my grade.

Thanks again.

yes, the padded rom runs on the emulator, i will try tonight paddrom.exe again… but i didn’t have luck the last time i used it.

Thanks Krisse.

You catch me!… just kidding, sure I have the same problem before, so I used the cat command to produce a file with the same data x times (David Tucker told me to do this) and since it worked I didn’t bother to think about it anymore until now that the problem is here again, and I don’t have a clue about what has gone wrong. So I suppose that someone here can explain my this in the easy way (because I don’t really have the time to study all that electronic stuff right now… my dead line is coming fast) so I don’t have to create a new tread again when my code grows to 512 KB and beyond…

Regards

Jorgeche

Whoa that’s impressive… how much time takes to learn all that stuff?… I barely can take a brake to play video games with my work and the school… 🙁

I would like to try that after you post the documentation… but it would be really hard (and expensive) to find that microcontroller in my country.

Sure I have read that document… but maybe I was a little lazy to to figure out the mathmathics used in the header… mainly because there are not comments on the code, which make things worse… well I will have to do the homework and try to understand all that stuff about matrix :-(..

thanks DogP

Thanks I will try.

Hi, my first priority is to provide an engine that could be somehow be easy to develop for. In order to achieve that, every character, background, textbox, etc, is defined as an array of ints, then each one of these entities are loaded in a table, which is used as the index to load the entities in the world. Here is an example:

First define a char group, then a bgmap and load in their respective table:

charTable[0]=(BYTE *)CHAR;
mapTable[0]=(BYTE *)MAP;

then define a character:

const int LEFTFOCUS_MC[] = {
//GAME LOGIC
//xVel, yVel, zVel, speedMultiplier,
0, 0, 0, 0,
// xAcel, yAcel, zAcel,
0, 0, 0,
// CharacterLogic
0,
//RENDER
// numFrames, numFramesPerDirection, numCicleFrames, actualFrame,
1, 0, 0, 0,
//chDefinition, numChars,
0, 53,
//bgmapDef, cols, rows, mapMode,
0, 48, 28, WRLD_BGMAP,
// display, pallet number, affine fx, hbias fx,
WRLD_LON, 0,
};

and load that character in the respective table:

characterTable[0]=(int *) LEFTFOCUS_MC;

finally, define a game world:

const int FOCUS_WR[] = {
// GWORLD.xSize, GWORLD.ySize, GWORLD.zSize,
384, 224, 0,
//initial screen
// position, x, y, z,
0, 0, ZZERO,
// number of number of number of number of
//map characters, scrolls, backgrounds, textboxes
1, 0, 0, 0,
//mapchar list x, y, z, focus
0, 0, 0, ZZERO*(-1), false,
// backgrounds list
//obj characters list x, y, z,
//text boxes list x, y, z, interactive
//text interface
};

I have been thinking and it could be easy to develop a tool that allows to create worlds without to worry about generate the code to fill the tables: characterTable[0]=(int *) LEFTFOCUS_MC; and to don’t have to track the indexes to load every structure, but this isn’t a priority right now…

At the moment I am working on testing all the stuff I already defined in the previous post, and adding features such affine rotation over each axis, frame rate control, and hbias fx.

So if there is anyone interested in aid this project and create such a tool, it would be of great help and I could explain the way the engine loads all these stuff.

Hi, well I hope that my project could help a little to incentive people to make some games.

I have been doing some design changes to the project which has grown a lot (it takes almost 256K now), making it some kind of object oriented through oop’s features emulation.

I think that it has now some cool capabilities that allows to create content and display it in a fairly easy way.

My deadline is August, so I hope someone at that time will be interested in this project and use the engine to produce some cool games (I have to admit that I’m not a designer or artist.. yet 🙂 ).

In its actual state, the engine reads from a table of arrange of ints, the char definition, bgmap definition and functions pointers to load dynamically the objects in a world, freeing memory (both dynamic and graphic memory) on the fly depending on whether an object is visible or not, allowing to create worlds with more variable environments (not fixed chars and bgmaps loaded at the beginning of a level).

Currently I am only using bgmaps, and by the moment don’t have plans to use objects, mainly because I use every world layer to show one single character or object, so world layer ordering is made in real time, which conflicts with the way an object segment is displayed.

I will send a new demo to KRISSE soon.

Amazing!.. now… when will the rest of us common mortals have a chance to download a dump of it? just kidding… is there any method to dump it without destroying de cart?

Hi, I used the while statement you pointed DogP and made the glitches dissapear, thanks.I will go back to type some code, make some test and to try to make the engine work in the VB and try to better understand the registry and interrupt harware arquitecture).

Thanks a lot for your help guys.

Jorgeche

Hi guys, thanks for your help! It finally worked! I was using the wrong tools to split the file, now I can play 16 games in the real machine!!! :-)… But lets go back to the problems again (sorry). I will try to do this in order:

1) I have varios versions of my engine, the older were compiled under the gccvb version published here, it outputs a 1024 KB file without doing anything else, so I splited these and booted fine in the VB. But the last versions don’t run at all, the gccvb version I’m using now is the last one published in David Tucker’s site, and it outputs a 128 KB file that runs ok in rboy, after using padvbrom.exe, it has 1024 KB and still runs ok in rboy, but doesn’t in the VB.

2) The engine version that booted fine in the VB has a lot of graphical glitches (it runs smoothly in rboy) and worse, it is very very slow. I thought that my game will run faster in the VB since every commercial rom runs slower in rboy than in the VB, and that it will be flawless in the VB.

3) I tried Krisse’s Blox in the real machine and it runs perfect!… no graphical glitches, no slowdown problems… perfect! Congratulations Krisse!… but what did you do? did you write Blox in assembler? wich gccvb version did you use?.

4) Just if someone didn’t notice but Space Squash fits into a 1 MB cartridge… I tried Waterworld, Nester .Funky’s Bowling too, but they didn’t work.

Thanks all you guys for your patience.

Jorgeche

I used a tool which I can’t remember its name now, that divided the teleroboxer rom into two files of 512KB, and joined them succesfully after dump them from the chips… but I will try these tonight.

Thanks a lot for your help.

Jorgeche

Hi DogP!

“Hmm… if you broke traces from the original ROM, that’s no big deal as long as none of them are shorting (since there’s no SRAM on VLB). If you have SRAM, you have to be careful not to break the traces though, since they also go to the SRAM”

Thats what I tought, since there is no SRAM as long as there is no short between the lines there shouldn’t be any problem.

“Anyway, the thing that I noticed when building them was that when you’re soldering wires on top of each other like that was that a lot of times the wire would get hot and melt through the sheathing and stick two wires together and short. So, you might want to go through them all and make sure none are stuck together. Also, I assume you tied /WE to VCC?”

I checked each wire’s soldereing not to be in short with lines at left and right side if that is what you mean. I didn’t saw this one: “I assume you tied /WE to VCC?”, I’ll check it tonight.

“Other than that, check all your connections, and I usually check continuity between each chip on every pin on the chip socket except the 8 data lines. And make sure you have the correct chip in the correct side (or just swap them and try it).”

That’s an easy one because I ‘ve already done that.

“Also, you did build it using the Flash info and not the EPROM info, correct? And is this what you’re looking for?”

Sure, I used Am29F040 so i followed the Flash info.
Thanks for the link.

One last question please… what do you mean when you say that the Flash memory should be filled with repeats of the data?… My homebrewn rom has only 128KB… and I am very newbie to this electronic stuff .

Thanks a lot for your help.

Jorgech

I’ve missed something else:

I thought the rom memory space was 16MB (Virtual Boy Programmers Manual page 9) and all my binary has 128Kb… where is the problem? Why rom data is overlapping with data memory.

By the way, the const directive seems to work fine:

0701701c g O .rodata 00002001 _MOUNTCHAR

if the rodata means rom memory’s data.

Thanks. I hope I’ll be able soon to realease another demo running over a more “dynamic” engine.

Jorgeche

Sure.. I’m half way with the sprite engine…. then I’d like to make a basic 3d engine (wriframe only I suppose)… there is a demo in the game section.

By the way, any idea how to set properly the timer so it doesn’t run too fast or too slow? here is my code:

VIP_REGS[INTCLR] = VIP_REGS[INTPND];
VIP_REGS[INTENB] = 0x0000;

timer_freq(TIMER_100US);
timer_set(TIME_MS(1000));
timer_clearstat();

But it runs to fast…

Jorgeche

Thank for the info… I think the game and the engine will be released by march 2007…