Change the part in the BAT file that refers to padding the ROM. It should have a number at the end of a command line. Either increment the number or try leaving it off altogether.
Nicely done!
However, it might be better (to make it easier to expand later on) to just load the sub image into a second BGMap at the top, where you load the font, and then change the World to point to it, like I described above.
Of course, you’d also have to change the target BGMap in subsequent vbTextOut() calls (but you knew that ;-)).
But, it’s up to you how you code it, isn’t it? 😀
I looked at your VEP file and there’s only a charset. Make sure you load your image with Advanced->Charmap tools->Map constructor.
That way you get a set of tiles and a map that combines them back into an image.
First, you should realize that any pixels in your sub that are black in VIDE will be transparent on the screen. You should alter your source image to have black for the transparent bits and three other shades of grey (dithering is optional, but don’t let it use black to darken one of the other greys).
Now, to display it, you would export the BGMap to a .H file, the chars to a .H file, load the BGMap data into a BGMap segment (other than the one being used by vbTextOut) and then just change World 31 to use the new BGMap segment by OR’ing (|) the header with the segment number.
Of course, you could use a separate World for the sub if you wanted. You would just have to move the “END” World down to the next lower number.
Also, to get a handle on what goes in a World (like the G and M coordinates and all that stuff), be sure to consult the dev wiki. And stop apologizing for asking questions! That’s why this forum is here! (With many thanks to KR155E ;-))
Basically, you’re doing everything wrong 😉 j/k
Compare the attached file to yours as I describe them:
1. Don’t put any code outside the main() function (unless it’s another function, of course).
2. It’s a waste of time to use vbTextOut() unless you have a World/BGMap/Charset combo ready to display the result.
3. The World has to be set differently if you’re using a BGMap versus using Objects.
4. Remember: C is case-sensitive, so Font is not the same as FONT.
5. Not your fault but you may want to change the FONT array in the include from “static” to “const” to save room in the VB’s dinky WRAM.
EDIT: Oops, forgot to say that I haven’t compiled this (my environment is quite different from yours) so it may still need some tweaking…
VirtualChris wrote:
How many objects can be on the screen at once?
1024
Because I’m not getting any of this text stuff.
Do you have any specific questions? I don’t know why “WAM” is giving you problems, since I don’t know what exact lib you have. Try looking for/putting this near the top of libgccvb.h as a workaround until I get a new file posted:
u16* WAM = (u16*)0x0003D800;
Suppose I wanted those words i had in my vb program to bounce around. Would they need to be objects then?
Not necessarily. It would probably be easier/less resource consuming if you mean each letter bouncing around, but if it’s whole words, you could probably use BGMaps.
Why is it not a good idea to use vbPrint?
It’s just considered deprecated. I think it also expects the font to be in a different place from vbTextOut, so they don’t “play well together”.
I actually kind of knew what i was doing with my first program even though I don’t know C, and I’d like to continue and expand on it, add a title screen with something like the coding competition demo picture. (If you don’t know what GoSub is going to be like, you control a submarine and avoid a moving octopus and walls through mazes to get the treasure at the end of each maze.)
That sounds like a cool game, but you should probably still use BGMaps for the warning/title screens.
Through trial and error, i learned on the Oric emulator that characters are made backwards for some reason (for example, when I first did this program, my E looked like a 3.)
I have no idea what you mean, unless you’re talking about the order of bits in a byte, and you shouldn’t need to worry about that if you use VIDE or grit for graphics.
Anyway, I’m actually thrilled that I did what I did knowing what I know (which is basically almost nothing).
You should be very proud of even such modest accomplishments. Programming isn’t that easy and you’ve done a great job so far. Please keep tinkering and asking questions when you need to. I really want to play “GoSub”! 😉
Very nice!
I love the “Nitrome-esque” intro animation 😀
You weren’t kiddin’ when you said Double Mode was hard! 😛
Hey, this is what I like to see! Way to go, VirtualChris, on taking your first steps! And thanks for using my demo to learn from. 😉
But, KR155E’s right; it’s more of an OBJ demo than a standard “Hello, World!” program. I only did it that way because I wanted a stereo effect to show off the VB’s capabilities…
Anyway, just a few comments concerning text output:
1. The BGMap won’t necessarily be set to all 0x00’s by default. You should use setmem() or cls() (if your copy of libgccvb.h has it) to clear it before printing.
setmem((u8*)(BGMap(0)), 0, 8192);
Here’s cls() if you don’t have it (probably 1,001 better ways to do it…):
void cls(int seg) {
for (int i = (seg * 4096); i < ((seg + 1) * 4096); i++) {
BGMM[i] = 0x0000;
}
}
It takes a BGMap segment number from 0 to 13.
2. dasi has a nice routine here if you want to print the contents of variables.
3. "WAM" is the World Attribute Table. I think we really need to work on that unified library... I'll try to at least post what I used on my compo entry. Most things work in it and I know vbTextOut does (I used it for debugging).
Well, like DogP and I have said, if you know “how programming works” you should be able to pick up C pretty quickly.
But, I’ve already found a number of porting candidates.
It will probably be awhile before I even start looking at these, but here they are in case someone else wants to give it a shot:
uBasic (really small and simple)
Enhanced BASIC (6502)
Bas
Bywater BASIC
ScriptBasic
One thing I would like to add/see added is an inline assembler that understands the GCC (AT&T) syntax and the VB custom opcodes.
Well, I was going for just a general description of the process or what the completed objects look like.
E.g. does it melt plastic powder together with a laser? Does it glue powder together with an inkjet? Does it cut sheets of plastic and laminate them together? Does it extrude the plastic from a nozzle? That sort of thing.
Whatever it is, it will probably make a part at least as good as the original; probably better… 😉
Pretty funny stuff. I lol’ed.
I’m not sure if I would risk crossing a busy street with a VB strapped to my face for a joke, but…
My favorite is the completely unintelligible part at the end. What were you even saying? I caught something about arcades, snacks, Sega Genesis, Super Nintendo…
I’m not familiar with that dialect, but if you know BASIC, you should understand variables, constants, boolean logic, branching (IF/THEN, SELECT/CASE, etc.), and looping (FOR/NEXT, DO/LOOP, etc.) so it’s really just a case of learning the syntax for those constructs in C and learning how to code/when to use function calls, macros, and the other more advanced C features. Then, when you’re passable at C, you can learn the VB-specific stuff.
Just get a book on C that you like, do the examples in there, take a look at some of the VB samples out there, and don’t forget to ASK QUESTIONS IF YOU DON’T GET SOMETHING! 😉
I’ve often thought of trying to make a BASIC interpreter/compiler to let people make quick VB stuff like demos and such. Anyone know of a good, simple, FOSS BASIC interpreter/compiler? Preferably one targetting a microcontroller.
DogP: What kind(s) of 3D printer(s) do you have access to? Most 3D printers can only do one or a small range of materials. Plastic would be okay if it has about the same properties (strength, flexibility) of the original ABS. Stereolithography would probably work.
I’m just doing regular subtractive machining. I’m probably going to mill the prototype in wax and use that for either a green sand mold for aluminum or a silicone mold for excalibur (a resin-like plaster product).
DanB: You should get Media Player Classic. It sounds like you have the codec, since preview works.
virtualboyke: Did you ever get my request for a copy of your VB model? You should just attach a copy to that other thread.
EDIT: Sorry, virtualboyke. I just found your mail…
-
This reply was modified 17 years, 3 months ago by
RunnerPack.
Thanks, Hedgetrimmer. I can’t wait to see it.
Yes, I was also thinking about aluminum, but I hadn’t thought about improvements to the mechanism other than the added strength. You’re right about needing some kind of spring, since it won’t flex (or crack :-P) like the OEM one does.
I’m not sure exactly what you mean by “spring ball screws”. My idea is to put springs under the heads of the screws to allow the medallion (do you have a better name for this thing?) to move as the legs go over the detent bumps. I attached a pic.
Black is the clamp, red is the medallion, green is the screw, blue is the spring, and magenta is the leg. From left to right it is folded, half-way open, and open/standing.
Another idea would be to make the inside just a bit thicker than stock, grind off the bumps, and use threaded lugs and wing nuts instead of screws. It would take longer to open/close, but it would be sturdier when open.
Attachments:
That is so weird…
Just last night I started modelling the little leg retention/Nintendo medallion thingy so that I could CNC machine a replacement for my broken one!
I guess I’ll just wait for you to release yours (which I assume and hope you are) and hope it’s in a format I can use. (STL, DXF, or SKP are preferable, in order of descending preference).
The animation looks great! You should post that on youtube so n00bs know how to assemble their stands 😉
-
This reply was modified 17 years, 3 months ago by
RunnerPack.
Heh, I’m a little late, but that’s pretty cool.
I especially like how entering the “Konami Code” gets you past the “April Fools” message to the actual demo.
It would help if you told us your country of residence… (There’s a setting in your profile for that, BTW.)
Did you check in the bathroom/drain-cleaner section of the supermarket? You could also try the plumbing and/or paint sections of larger hardware stores (it can be used to strip some kinds of paint). It’s also called “lye”, “caustic soda”, or “sodium hydrate”.
How do you plan on applying the glue? I have to echo DogP’s suggestion of soldering. Though I haven’t done either, soldering just seems much easier. I haven’t done it just because I dread the work it would take to (properly, safely) apply the NaOH.
realyst wrote:
nice app find!! 🙂
Thanks 😎
If you make something VB-related with it, post some examples in here! 😀
I know very little about the math involved in affine transforms. But, if you could do without the perspective “fore-shortening” effect, you could do the same thing with just the h-bias mode. I’ve done a “tiled sidewalk” that way, and it looks fairly decent. You could even simulate the perspective part by designing your bgmaps/sprites correctly, but that would probably be more work than using affine…
Blockout looks cool, but I would like to see support for the SNES mouse or maybe custom spinner hardware 😀
