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.

ASM > MBV2 and Asm functions

#10308 - Omega81 - Tue Sep 02, 2003 3:27 am

Hello guys me again.

I am having a problem with a set of ARM assembler fucntions I have written. One VGBA, they have worked fine. but now that I have the MBV2 cable I have tried them on it with my C main code (in a sperate file) and the functions don't work correctly. For example, my pixel plot function will plot a pxiel anywhere on the screen in one call but when I try to use it in a loop it stop ploting a like 20 lines down the screen. Now on the VGBA this has never been a problem so I wanted to know if I have to do anything special to use my ASM functions with my main C code when working with the MVB cable. I have define the "volatile const U8 __gba_multiboot" parameter and the .mb file is only 6k and works on the VGBA as well as the .gba file. So anyone have any ideas what I am doing wrong, I complie the code as stated below where my ASM funcions are in the "mylib.s" file.
Code:

arm-thumb-elf-gcc plotpixel.c mylib.s -o plotpixel.elf -T lnkscript -DMULIBOOT -Wall -marm -mapcs-32 -mcpu=arm7tdmi


Also I download the program as follows
Code:

mb -w 10 -s plotpixel.mb

_________________
Keep it real, keep it Free, Keep it GNU

#10310 - FluBBa - Tue Sep 02, 2003 8:05 am

Maybe you should try another emulator first?
Like VisualBoyAdvance http://vboy.emuhq.com/
_________________
I probably suck, my not is a programmer.

#10323 - Lupin - Tue Sep 02, 2003 1:33 pm

I'm not sure, but don't you have to pad the file to an 2^x size?

#10326 - tepples - Tue Sep 02, 2003 2:54 pm

No. A .mb file does not need to be padded to a 2^n size.

And yes, use VisualBoyAdvance instead.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.