gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > multiboot vs. flashcarts

#11559 - blueskies - Sat Oct 11, 2003 2:38 am

I'm not sure exactly how to ask this, but...when running the same program as a multiboot vs flashing it to a cart (or running it in an emulator), the sprite data looks different. When running as multiboot, the sprite seems to be more transparent, and shows some background colors through. I guess i'm wondering if this is due to the memory layout in multiboot mode, or if the palettes/transparency information gets altered, or just coding. I'm fairly new to gba programming, so i'm just trying to figure out all of these little quirks. Thanks
Jonathan

//edit - also, another general question about headers. does devkitadv automatically put a header on when you compile your code, or am i misunderstanding the "fact" that you need to patch a header to get code to work on hardware? I've never put any extra headers on my compiled programs, and they've all worked fine on multiboot and f2a cards. thanks again.

#11564 - tepples - Sat Oct 11, 2003 4:35 am

blueskies wrote:
I'm not sure exactly how to ask this, but...when running the same program as a multiboot vs flashing it to a cart (or running it in an emulator), the sprite data looks different. When running as multiboot, the sprite seems to be more transparent, and shows some background colors through.

Probably just a bug. Either you accidentally used more than 256 KB of program, or you aren't locating your assets correctly (if using GBFS), or you aren't initializing all of the palette. Yes, the intro writes to the palette.

Can you provide mock-up screenshots? To force multiboot execution in VisualBoyAdvance, name the ROM with an extension .mb rather than .gba or .mb.gba.

Quote:
//edit - also, another general question about headers. does devkitadv automatically put a header on when you compile your code

DevKit Advance adds a header containing a zeroed-out logo and "generic" metadata. The logo is zeroed out because while the precedent set in Sega v. Accolade (1992) construes use of logo data as fair use, not all countries have a similarly permissive interpretation of copyright and trademark law.

Quote:
or am i misunderstanding the "fact" that you need to patch a header to get code to work on hardware?

MB.exe automatically patches the header when transferring a .mb program but not when programming a flash cart. The Visoly, F2A, and PogoShell loaders (added to multi-ROM carts) don't care much about the logo data; they read only the ROM name from the header.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11570 - blueskies - Sat Oct 11, 2003 6:04 am

running it through VBoyAdv didn't display any error using either the .mb or .bin file, but i'll try to explain it a little better.
[Images not permitted - Click here to view it]
by the way, don't bother mentioning the poor artistic skills...or the blatent copyright infringement :D. I'm just practicing here.
This demo has a small sprite moving on top of a background, mode 4. Basically the sprite looks lighter in multiboot (by the way again, i'm using the flash2advance usb cable as a multiboot cable, in case that matters), and appears slightly transparent. i tried different image software (paint shop pro vs photoshop) and both produced the same results after getting the file format correct. I'm not seriously concerned w/ this event/problem, i was just sort of curious as to why the program would display differently in the two different modes.

To make sure i wasn't crazy, I did some investigating. I modified Jenswa's "mode4sprites" demo (on which my demo is completely based (thanks!)) to run in multiboot mode.
[Images not permitted - Click here to view it]
I had the exact same results, where the sprite looked slightly transparent in mb mode. (again, vba didn't show this, but it happened on hardware.)

#11572 - tepples - Sat Oct 11, 2003 4:00 pm

Semitransparent sprite? Looks like you could have a blending mode problem. Try zeroing out the blending mode and seeing if that fixes things.
Code:
#define BLENDMODE (*(volatile unsigned short *)0x04000050)
/* ... */
BLENDMODE = 0;

Or is the sprite semitransparent and flickering a bit? That could be the result of a different problem.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11578 - blueskies - Sat Oct 11, 2003 6:40 pm

Perfect! Now both display exactly the same. So, does the multiboot somehow affect this bit (byte?) during startup? I'll look into blending modes a little more. Thanks for the help.

#11580 - tepples - Sat Oct 11, 2003 6:47 pm

I'm pretty sure the intro screen uses a hardware blend to fade the Nintendo logo in and out while downloading the program. Recall that the logo does not blink for ROM based programs.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11581 - blueskies - Sat Oct 11, 2003 6:57 pm

true, true...also, the loader for the F2AWriter has some display on the screen while it is operating. Though I doubt this does anything because it's mainly just a picture...

#11586 - jenswa - Sat Oct 11, 2003 8:11 pm

Never know of that problem, since i don't have a flashcard.
_________________
It seems this wasn't lost after all.