Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 13566 - 13595 of 15019   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#13595 From: "Lord Graga" <lordgraga@...>
Date: Wed Jan 1, 2003 2:50 pm
Subject: Re: gba dev forum (forum.gbadev.org)
lordgraga1
Offline Offline
Send Email Send Email
 
Thank you, that is just what we needed!

>From: Simon B <simonb@...>
>Reply-To: gbadev@yahoogroups.com
>To: gbadev@yahoogroups.com
>Subject: [gbadev] gba dev forum (forum.gbadev.org)
>Date: Wed, 1 Jan 2003 14:30:02 +1100 (EST)
>
>Hello,
>
>Just thought I would start off the new year with a
>mail about a newly opened gba development forum.
>Its located at http://forum.gbadev.org and covers
>most parts of dev (coding,art,music,hardware etc).
>Please pay a visit and feel free to register aswell.
>
>Best wishes
>
>Simon
>gbadev.org
>


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail

#13594 From: Simon B <simonb@...>
Date: Wed Jan 1, 2003 3:30 am
Subject: gba dev forum (forum.gbadev.org)
simongba
Offline Offline
Send Email Send Email
 
Hello,

Just thought I would start off the new year with a
mail about a newly opened gba development forum.
Its located at http://forum.gbadev.org and covers
most parts of dev (coding,art,music,hardware etc).
Please pay a visit and feel free to register aswell.

Best wishes

Simon
gbadev.org

#13593 From: "Alexander Stante <alex_stante@...>" <alex_stante@...>
Date: Tue Dec 31, 2002 12:21 pm
Subject: Re: Changing HOFS while in HWRITE
alex_stante
Offline Offline
Send Email Send Email
 
Thanks,

but i know that i can do such stuff in HBLANK, but i want to change
stuff while i am in HWRITE. On emulator it doesn't work, but until
know i am still waiting for my flash card so i can test it on real
hardware if this work.

--- In gbadev@yahoogroups.com, "Steve Garcia" <pureedlizard@h...> wrote:
>
>
> Indeed you can. IF you use GCC and jeffs crtls package, you can do this
> pretty easily with an hblank interupt handler.
>
> s16 scanshifts[160];
>
> void HBLANK_Wiggle(void)
> {
>    // set bg2 horizontal offset for this scanline
>    REG_BG2HOFS = scanshifts[REG_VCOUNT];
>    REG_IF = INT_HBLANK;
> }
>
> this is assuming you are using Dovoto's headers from thepernproject.com
> tutorials. The above routine would be put in the IntrTable array
defined in
> crt0.s:  IntrTable[1] = (fp)HBLANK_Wiggle;
>
> Enable hblank interupts in IE and DISPSTAT registers and fill in the
> scanshifts array with values you want to shift the background by on
each
> scanline. You could easily do a sine wave distortion effect, like
the intro
> logo for Yoshies Island.
>
> Alternatively, you can also use an hblank  DMA. Set to repeat, 1
halfword
> per repeat (16 bit), hblank timing, and destination increment/reload
to do
> the same thing. Set the source to your scan shift array, destination
to bg
> scroll register, and fire the dma. Use the time while the lcd is in
vblank
> to recalculate the shift array so you can animate the effect.
>
> you can see an example of this effect here:
>    http://geocities.com/deathping/tilixsrc.zip

#13592 From: "Steve Garcia" <pureedlizard@...>
Date: Mon Dec 30, 2002 10:02 pm
Subject: Re: Changing HOFS while in HWRITE
DeathPing
Offline Offline
Send Email Send Email
 
Indeed you can. IF you use GCC and jeffs crtls package, you can do this
pretty easily with an hblank interupt handler.

s16 scanshifts[160];

void HBLANK_Wiggle(void)
{
    // set bg2 horizontal offset for this scanline
    REG_BG2HOFS = scanshifts[REG_VCOUNT];
    REG_IF = INT_HBLANK;
}

this is assuming you are using Dovoto's headers from thepernproject.com
tutorials. The above routine would be put in the IntrTable array defined in
crt0.s:  IntrTable[1] = (fp)HBLANK_Wiggle;

Enable hblank interupts in IE and DISPSTAT registers and fill in the
scanshifts array with values you want to shift the background by on each
scanline. You could easily do a sine wave distortion effect, like the intro
logo for Yoshies Island.

Alternatively, you can also use an hblank  DMA. Set to repeat, 1 halfword
per repeat (16 bit), hblank timing, and destination increment/reload to do
the same thing. Set the source to your scan shift array, destination to bg
scroll register, and fire the dma. Use the time while the lcd is in vblank
to recalculate the shift array so you can animate the effect.

you can see an example of this effect here:
    http://geocities.com/deathping/tilixsrc.zip


>From: "Alexander Stante <alex_stante@...>" <alex_stante@...>
>Reply-To: gbadev@yahoogroups.com
>To: gbadev@yahoogroups.com
>Subject: [gbadev] Changing HOFS while in HWRITE
>Date: Fri, 20 Dec 2002 22:23:36 -0000
>
>Hello group,
>
>i have a question. Will the GBA display controler display the change
>of HOFS of a background layer while he is already in HWRITE? For
>example, the first 40 y values of a certain scanline will be displayed
>with a HOFS value of 0, the next 200 y with a value of 1? Or is it not
>possible to change the scanline while he is in HWRITE? I have tryed it
>on VisualBoyAdvance, but it doesn't work. So there is possible that
>the emulator does not work correctly, my code is wrong or that the
>display controler don't display such a change.
>
>


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 3 months FREE*.
http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=7324&DI=74\
74&SU=
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3mf

#13591 From: Rafał Grembowski <diamond@...>
Date: Mon Dec 30, 2002 1:42 pm
Subject: fileformats
diamond@...
Send Email Send Email
 
Hi!

Does anyone of you guys know, if there is a utility to convert
elf objects to format produced by zarm assembler?

Rafal Grembowski

#13590 From: "John Sensebe" <jsensebe@...>
Date: Sun Dec 29, 2002 4:07 pm
Subject: Re: Re: I need mappers for a project.
bargaintuan
Online Now Online Now
Send Email Send Email
 
Just call it Porno Trigger, and not only will the name be different enough,
but more people will want it. ;-)

John Sensebe
jsensebe@...

Quantum Mechanics are God's way of making sure we never really know what's
going on.

----- Original Message -----
From: "Lord Graga" <lordgraga@...>
To: <gbadev@yahoogroups.com>
Sent: Sunday, December 29, 2002 6:35 AM
Subject: Re: [gbadev] Re: I need mappers for a project.


> Then i just call it Krono Trigger, whatever :P
> The name isn't choosed yet...
>
> >From: "Damian Yerrick <d_yerrick@...>" <d_yerrick@...>
> >Reply-To: gbadev@yahoogroups.com
> >To: gbadev@yahoogroups.com
> >Subject: [gbadev] Re: I need mappers for a project.
> >Date: Sun, 29 Dec 2002 01:38:58 -0000
> >
> >--- In gbadev@yahoogroups.com, "Lord Graga" <lordgraga@h...> wrote:
> > > Hey all.
> > > I am making a Crono Trigger "clone" for GBA,
> > > i call it "(rono Trigger" to avoid the trademark.
> >
> >That's not exactly different enough.  There's still a chance
> >of confusion between "(rono Trigger" and "CHRONO TRIGGER(tm)".
> >
> >--
> >Damian
> >

#13589 From: "Lord Graga" <lordgraga@...>
Date: Sun Dec 29, 2002 11:35 am
Subject: Re: Re: I need mappers for a project.
lordgraga1
Offline Offline
Send Email Send Email
 
Then i just call it Krono Trigger, whatever :P
The name isn't choosed yet...

>From: "Damian Yerrick <d_yerrick@...>" <d_yerrick@...>
>Reply-To: gbadev@yahoogroups.com
>To: gbadev@yahoogroups.com
>Subject: [gbadev] Re: I need mappers for a project.
>Date: Sun, 29 Dec 2002 01:38:58 -0000
>
>--- In gbadev@yahoogroups.com, "Lord Graga" <lordgraga@h...> wrote:
> > Hey all.
> > I am making a Crono Trigger "clone" for GBA,
> > i call it "(rono Trigger" to avoid the trademark.
>
>That's not exactly different enough.  There's still a chance
>of confusion between "(rono Trigger" and "CHRONO TRIGGER(tm)".
>
>--
>Damian
>
>

#13588 From: "Damian Yerrick <d_yerrick@...>" <d_yerrick@...>
Date: Sun Dec 29, 2002 1:38 am
Subject: Re: I need mappers for a project.
yerricde
Offline Offline
Send Email Send Email
 
--- In gbadev@yahoogroups.com, "Lord Graga" <lordgraga@h...> wrote:
> Hey all.
> I am making a Crono Trigger "clone" for GBA,
> i call it "(rono Trigger" to avoid the trademark.

That's not exactly different enough.  There's still a chance
of confusion between "(rono Trigger" and "CHRONO TRIGGER(tm)".

--
Damian

#13587 From: "Lord Graga" <lordgraga@...>
Date: Sat Dec 28, 2002 10:05 pm
Subject: I need mappers for a project.
lordgraga1
Offline Offline
Send Email Send Email
 
Hey all.
I am making a Crono Trigger "clone" for GBA, i call it "(rono Trigger" to
avoid the trademark.
Right now i am in a seriuos problem: I need graphic artists and mappers :(
Could you tell me where i possibly would be able to find such peoples, or
will you even help me?
Thank you.

Best regards
    -;Lord Graga

#13586 From: Jay <jay@...>
Date: Sat Dec 28, 2002 7:14 pm
Subject: Re: Linker Problem
boolaala10
Offline Offline
Send Email Send Email
 
Well, I've changed over to using gcc to do it's linking... I'm pretty
much using the line pete suggested below... and it's still
knackered... I just don't seem to be able to sort this one out.. I've
been at it for hours ! :(

Soon as it encounters the function as parameter type code
(_call_via_r1) it jumps off to *somewhere* and then shits it's pants..
the funtion it jumps to is empty, so there should be no problems..
there aren't on every other compiler I've tried... what gives.. all I
want to be able to do is call a function from a table of funtion
pointers.... help !!

Jay




On Thu, 19 Dec 2002 17:45:16 +0000 (GMT), you wrote:

>On Thu, 19 Dec 2002, Jay wrote:
>
>> Right, is now sorted... I needed to link with libgcc... fair enough..
>> except there's 4 different types.... arm, thum, interwork ?
>>
>> Does anyone know which lib gcc uses if you don't use the -c option and
>> a seperate linker ? And how does gcc find the correct path ? Whereas
>> ld has no clue :(
>
>I think the suggested fix before has been to use gcc to do your linking -
>then it knows from -mthumb-interwork and other things which lib to choose
>(and its path). I use:
>
>arm-thumb-elf-gcc -mthumb-interwork -nostartfiles -Tlnkscript
>
>and it seems to get it right for me.
>
>> Is it simply that I choose what type of code I want for this lib by
>> pointing the include path to appropiate lib/code type ?
>
>I'd suggest gcc probably has a better chance of getting this right for
>you, but if you really want to use ld yourself I believe you can do the
>above gcc command with '-v' to see what it actually runs, then take your
>information from that.
>
>Cheers, Pete

#13585 From: "Daniel" <webmaster@...>
Date: Sat Dec 28, 2002 4:44 pm
Subject: Xport question
webmaster@...
Send Email Send Email
 
Is there anyone using the Xport here?  I am having trouble getting the output
working (p18&19?)..   Since I cant get devkitadvance to compile these projects I
am just using assembly I wrote a little program to control the LEDs on the
board..  I assume the as the user guide says the leds are on P18 & 19 and those
are bits are set in bit 2 & 3 of address 0x09ffe00a.  Is this correct?

Skipping the things I put on the keys here is what I have which was meant to
clear the leds bits thus turn them off.  However while playing with it I can get
then to come on they stay off no matter what I do.  I have programmed the
eeprom/fpga with the gpio.bit logic.

;  XPORT -CLEAR IO and set direction--------
   ldr  r0,ioportdir        ;ioportdir DCD 0x9ffe002
   mov  r3,#0xff
   strh  r3,[r0]      ;set 8 pins as output?  Right Data Size?
   ldr  r0,ioport    ;ioport  DCD 0x9ffe002 ?
   mov  r3,#0xff  ;turn on green LED? 0x00=led off..

   str   r3,[r0]    ;store value in r3 at address in r0/ do it...
;--------------------------------------------------------------

#13584 From: "John Sensebe" <jsensebe@...>
Date: Sat Dec 28, 2002 3:18 am
Subject: Re: Looking for gba-crusher
bargaintuan
Online Now Online Now
Send Email Send Email
 
Hmmmm... It doesn't look like my last message went through, but if this is a
repeat, I apologize.

Ask and you shall receive:

http://members.cox.net/jsensebe/gba/GBACrusher.zip

The Zip includes both the GUI and command line versions.

This is still technically beta software, but it seems to work quite well. I
used code I found on the Web, but had to make some major changes to it to
make it work.

Enjoy.

John Sensebe
jsensebe@...

Quantum Mechanics are God's way of making sure we never really know what's
going on.

----- Original Message -----
From: "Rene Bakx" <renebakx@...>
To: <gbadev@yahoogroups.com>
Sent: Friday, December 27, 2002 1:03 PM
Subject: [gbadev] Looking for gba-crusher


> Hello,
>
> I'am looking for the compression tool called gba-crusher made by Jsensebe.
>
> Can someone post a link or something??
>
> Thanks in advance,
>
> Rene
>

#13583 From: Rene Bakx <renebakx@...>
Date: Fri Dec 27, 2002 6:03 pm
Subject: Looking for gba-crusher
jaycebogus
Offline Offline
Send Email Send Email
 
Hello,

I'am looking for the compression tool called gba-crusher made by Jsensebe.

Can someone post a link or something??

Thanks in advance,

Rene

#13582 From: "tade_lapin <tade_lapin@...>" <tade_lapin@...>
Date: Fri Dec 27, 2002 5:19 pm
Subject: Open source LodeRunner-Like GBA game
tade_lapin
Offline Offline
Send Email Send Email
 
Hi alls,

I'm starting a "just for fun" GBA game. The game is fully open
sources and open datas, and I searching some people to help me.

So if some of you want to have a look, then check that page :

http://perso.wanadoo.fr/ck/GBA/index.htm

Thanks

#13581 From: "Alexander Stante <alex_stante@...>" <alex_stante@...>
Date: Fri Dec 27, 2002 4:00 pm
Subject: Re: IRQ handler does not work after linking with new library.
alex_stante
Offline Offline
Send Email Send Email
 
> Check your linker map file to see if the linker has overlapped anything.
> Also check to make sure you haven't wrapped RAM somewhere.
> Remember that IWRAM wraps every 32K (so 0x03008000 == 0x03000000)
> and that EWRAM wraps every 256K.
>
> - John

Thanks, the cause was a too big array for iwram. After putting it to
ewram everything works fine. Is there a way to automatically check if
such a thing happen and to get an error message after compiling?

#13580 From: "John Seghers" <johnse@...>
Date: Fri Dec 27, 2002 9:10 am
Subject: Re: IRQ handler does not work after linking with new library.
johnse98072
Offline Offline
Send Email Send Email
 
From: <alex_stante@...>
> My question is what can be the cause of such an error? Can linking
> with a library overwrite something else?

Check your linker map file to see if the linker has overlapped anything.
Also check to make sure you haven't wrapped RAM somewhere.
Remember that IWRAM wraps every 32K (so 0x03008000 == 0x03000000)
and that EWRAM wraps every 256K.

- John

#13579 From: Blue Tooth <blue_tooth1010@...>
Date: Fri Dec 27, 2002 5:37 am
Subject: cartridge query
blue_tooth1010
Offline Offline
Send Email Send Email
 
hi all

i'm developing a software to read the contents the
cartridge inserted in GBA.

can anyone suggest me how GBA reads(detects)the
inserted cartridge? I mean the underlying technology
used in the detection of a cartridge by GBA.

Regards

#13578 From: "Alexander Stante <alex_stante@...>" <alex_stante@...>
Date: Thu Dec 26, 2002 6:29 pm
Subject: IRQ handler does not work after linking with new library.
alex_stante
Offline Offline
Send Email Send Email
 
I have a really strange error. I wrote a HBLANK IRQ handler and it
works very well. After finishing it i started writing some kind of
memory manager.
The strange thing is that the handler works until i link with my
memory manager library. I even don't use one function of my new
library and the handler stopped working. I have used gdb for debugging
and the programs runs as usual, with the only exception that my IRQ
routine will not be executed.

My question is what can be the cause of such an error? Can linking
with a library overwrite something else?

#13577 From: "nitgul <nitgul@...>" <nitgul@...>
Date: Thu Dec 26, 2002 5:59 am
Subject: Cartridge
nitgul
Offline Offline
Send Email Send Email
 
Dear Sirs/Madams
I just wanna know that what all registers are set when a cartridge is
inserted into the GBA. Or In other words How do I make sure whether
the cartridge is inserted into the GBA or not? I have gone through
the GBATEK document which has some information about the Cartridge
header but I am not very much clear about that. Please advice how to
go about it.

Thanks in advance for help.
Nitin Gulati

#13576 From: "Steve Garcia" <pureedlizard@...>
Date: Wed Dec 25, 2002 9:52 pm
Subject: xmas demo
DeathPing
Offline Offline
Send Email Send Email
 
Here's a quick little demo I whipped up over xmas eve.

http://68.16.232.145/gba/xmasdemo.zip

source included. Merry Xmas!


_________________________________________________________________
The new MSN 8: smart spam protection and 3 months FREE*.
http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU\
=
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_smartspamprotec\
tion_3mf

#13575 From: Dennis Munsie <munsied@...>
Date: Tue Dec 24, 2002 8:50 pm
Subject: Re: Re: Correct method for calling code in WRAM ?
bea_dennis
Offline Offline
Send Email Send Email
 
well, it is and isn't a GPR -- obviously, you can't just use it to
store some arbitrary value -- you'll crash.

But, because it can be accessed the same way as all the other GPRs, you
can do some neat tricks... like doing a jump to a function in a lookup
table in a single instruction (ldr     pc,[r14,r12,lsl#2] -- where r14
contains the table, and r12 contains the position in the table to jump
to).

dennis

On Tuesday, December 24, 2002, at 11:29 AM, yerricde
<d_yerrick@...> wrote:

> It's just unfamiliar to people who come from other architectures
> such as PowerPC, MIPS, x86, GBZ80, and 6502, where the program
> counter is not a General Purpose Register.  It's a bit confusing
> to ARM newbies.  I guess that means somebody needs to write a FAQ
> document on the ARM7TDMI for people coming from other archs.

#13574 From: "yerricde <d_yerrick@...>" <d_yerrick@...>
Date: Tue Dec 24, 2002 4:29 pm
Subject: Re: Correct method for calling code in WRAM ?
yerricde
Offline Offline
Send Email Send Email
 
--- In gbadev@yahoogroups.com, Jay <jay@b...> wrote:
> Yes, there's nothing to stop you setting the PC yourself..

It's just unfamiliar to people who come from other architectures
such as PowerPC, MIPS, x86, GBZ80, and 6502, where the program
counter is not a General Purpose Register.  It's a bit confusing
to ARM newbies.  I guess that means somebody needs to write a FAQ
document on the ARM7TDMI for people coming from other archs.

> Even better... if your "push" is one instruction, you can
> stuff it in the branch delay slot...  (if there is one, I
> can't remember ;)

MIPS is the arch with load delay slots and branch delay slots.

--
Damian

#13573 From: James Daniels <james.daniels@...>
Date: Tue Dec 24, 2002 3:23 pm
Subject: Re: Correct method for calling code in WRAM ?
j_r_daniels
Offline Offline
Send Email Send Email
 
Hi Bollo,

> I hate answering my own mails, but I think I figured it out... anyone care
> to confirm that
>
> mov pc,  0x03 LSL 24
>
> is correct ?

Yes - or, alternatively, you can use BX to jump to any address.
--
Cheers,
James.

     /\  apex                                 James Daniels
    //\\  designs            james.daniels@...
   //__\\                       http://www.apex-designs.net

#13572 From: "jason rogers" <dovoto@...>
Date: Tue Dec 24, 2002 1:26 pm
Subject: Re: Re: HBlank DMA and Palette RAM
jason_lee_ro...
Offline Offline
Send Email Send Email
 
> > So I read up on dma's, and learned I could do a dma per scanline,
> > with DMA 0 to make sure it gets priority over other DMA's. This
> > works just fine, in an emulator (VisualBoy Advance 1.2), but
> > running it on the hardware, all I get is a solid black background.

> > void VCount_Title(void) {
> > // setup hblank dma to cycle color 0,1 per scan line
> > REG_DMA0CNT_H = 0;
> > REG_DMA0SAD = (u32)colormap;
> > REG_DMA0DAD = (u32)0x05000000;
> > REG_DMA0CNT_L = 2;
> > REG_DMA0CNT_H = 0xA260; // enable, 32 bit, src increment, dest
> inc/reload,
> > hblank timing, repeat, 2 halfwords

> > REG_IF = INT_VCOUNT;
> > }


Just in case you are not aware DMA 0 can not access ROM so if your
(u32)colormap is a const then you need a different dma mode or better yet
copy your color map to IWRAM / EWRAM.
-dovoto

www.thepernproject.com

#13571 From: Jay <jay@...>
Date: Tue Dec 24, 2002 1:17 pm
Subject: Re: Correct method for calling code in WRAM ?
boolaala10
Offline Offline
Send Email Send Email
 
Yes, there's nothing to stop you setting the PC yourself..

Here's the sort of macro's I generally use for very long jumps

(sorry it's R3000 in SN Systems macro format and "push/pop" are also
macro's, but you can see what's going on)...

Even better... if your "push" is one instruction, you can stuff it in
the branch delay slot...  (if there is one, I can't remember ;)


jsr macro where
	 module
	 local ok
	 opt at-
	 la at,ok
	 push at
	 j where
	 opt at+
	 nop
ok
	 modend
	 endm

rts macro
	 opt at-
	 pop at
	 jr at
	 nop
	 opt at+
	 endm




On Tue, 24 Dec 2002 04:00:14 -0800, you wrote:

>I hate answering my own mails, but I think I figured it out... anyone care
>to confirm that
>
>mov pc,  0x03 LSL 24
>
>is correct ?
>
>thanks
>
>bollo
>
>
>
>At 11:16 AM 12/24/2002 +0000, you wrote:
>>I'm using pure ASM code, I have some interupts, I have a an image in
>>rom space, 0x08000000. I have some data in WRAM (variables), and that
>>leaves 31k of data, I only have a small 8k code segment, and wish to
>>copy from ROM to WRAM, using @textarea I can specify that the code is
>>mapped there ( for offsets and jumps), but I cannot figure out how to
>>jump 80mb :(
>>
>>the B/BL instruction can only jump +/- 32mb, and even using rom
>>mirrored at 0x0e000000 I cannot bring this down to more than 64mb..
>>ARGH..
>>
>>so how do I jump to code in WRAM after I copy it there ?
>>
>>thanks
>>
>>bollo

#13570 From: Bollo <bolloxim@...>
Date: Tue Dec 24, 2002 12:00 pm
Subject: Re: Correct method for calling code in WRAM ?
bolloxim
Offline Offline
Send Email Send Email
 
I hate answering my own mails, but I think I figured it out... anyone care
to confirm that

mov pc,  0x03 LSL 24

is correct ?

thanks

bollo



At 11:16 AM 12/24/2002 +0000, you wrote:
>I'm using pure ASM code, I have some interupts, I have a an image in
>rom space, 0x08000000. I have some data in WRAM (variables), and that
>leaves 31k of data, I only have a small 8k code segment, and wish to
>copy from ROM to WRAM, using @textarea I can specify that the code is
>mapped there ( for offsets and jumps), but I cannot figure out how to
>jump 80mb :(
>
>the B/BL instruction can only jump +/- 32mb, and even using rom
>mirrored at 0x0e000000 I cannot bring this down to more than 64mb..
>ARGH..
>
>so how do I jump to code in WRAM after I copy it there ?
>
>thanks
>
>bollo
>
>
>
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>

#13569 From: "bolloxim <bolloxim@...>" <bolloxim@...>
Date: Tue Dec 24, 2002 11:16 am
Subject: Correct method for calling code in WRAM ?
bolloxim
Offline Offline
Send Email Send Email
 
I'm using pure ASM code, I have some interupts, I have a an image in
rom space, 0x08000000. I have some data in WRAM (variables), and that
leaves 31k of data, I only have a small 8k code segment, and wish to
copy from ROM to WRAM, using @textarea I can specify that the code is
mapped there ( for offsets and jumps), but I cannot figure out how to
jump 80mb :(

the B/BL instruction can only jump +/- 32mb, and even using rom
mirrored at 0x0e000000 I cannot bring this down to more than 64mb..
ARGH..

so how do I jump to code in WRAM after I copy it there ?

thanks

bollo

#13568 From: "yerricde <d_yerrick@...>" <d_yerrick@...>
Date: Tue Dec 24, 2002 4:59 am
Subject: Re: HBlank DMA and Palette RAM
yerricde
Offline Offline
Send Email Send Email
 
--- In gbadev@yahoogroups.com, "Steve Garcia" <pureedlizard@h...> wrote:
>
> Im trying to do an effect in my game where the background color
> (0) is cycled every scanline, producing a "copper bar" effect
> seen in oldschool demos. If I do this via HBlank interrupts, it
> works beautifully, on several emus, and on the real hardware.
>
> Then I tried implementing music in my demo. I first tried
> NeiMods mod player, then Krawall. Both seem to have a thing for
> doing interupts/dmas during hblanks, which throws the background
> effect off for a frame or 2, causing some very nasty flicker.

Or you can try a music player that doesn't use any hblank
interrupts because its interrupt-side code runs only during
vblank.  The music player in TOD M2 does that, even though it's
not yet cleaned up for general use and plays a format compiled
from textual notation rather than .mod.

> So I read up on dma's, and learned I could do a dma per scanline,
> with DMA 0 to make sure it gets priority over other DMA's. This
> works just fine, in an emulator (VisualBoy Advance 1.2), but
> running it on the hardware, all I get is a solid black background.

Interesting.

> void VCount_Title(void) {
>  // setup hblank dma to cycle color 0,1 per scan line
>  REG_DMA0CNT_H = 0;
>  REG_DMA0SAD = (u32)colormap;
>  REG_DMA0DAD = (u32)0x05000000;
>  REG_DMA0CNT_L = 2;
>  REG_DMA0CNT_H = 0xA260; // enable, 32 bit, src increment, dest
inc/reload,
> hblank timing, repeat, 2 halfwords

Actually, that's two 32-bit words, because you set a 32-bit copy.

>  REG_IF = INT_VCOUNT;
> }

let me check this against my mode 1 code, which runs after a
spin-wait for line 227:

#define DMA_DSTINCRESET 0x0060
#define DMA_SRCINC      0x0000
#define DMA_REPEAT      0x0200
#define DMA_U32         0x0400
#define DMA_HBLANK      0x2000
#define DMA_ENABLE      0x8000

/* run_dma() ***************************
    Start a background DMA of affine data on DMA channel 0
    from RAM to background 2.
*/
void run_dma(void)
{
   BGAFFINE[2] = bg2lines[0];
   DMA[0].control = 0;
   DMA[0].src = &(bg2lines[1]);
   DMA[0].dst = (u16 *)&(BGAFFINE[2]);
   DMA[0].count = 4;
   DMA[0].control = DMA_DSTINCRESET | DMA_SRCINC | DMA_REPEAT |
                    DMA_U32 | DMA_HBLANK | DMA_ENABLE;
}

Looks pretty similar, except mine is simpler because it's
based on a spinwait.

> I fire this via the vcount interrupt. I have it triggered on
> vcount=227

Are you sure that the vcount ISR is actually running?  Try
making a simple vcount ISR that flickers color 0 red and black.

The following worked for me: wait for vblank, do some vblank
processing, then set up hblank DMA.  Unlike hblank interrupts,
hblank DMA doesn't run during vblank; you may take advantage
of this by setting it up soon after vblank.

For an example of code that successfully sets up hblank DMA on
GBA hardware, look at any of the "mode 7" sources such as TOD.
The TOD game loop:
   1. run game logic
   2. compute left and right texcoords for each scanline
   3. translate texcoords into BGAFFINEREC structs
   4. run music code
   5. wait for vblank
   6. switch audio buffer
   7. start hblank dma, copying BGAFFINERECs into bg2 registers
   8. rinse and repeat

In your case, 2 and 3 would consist of computing the palette
instead of affine structs.

Another possibility is that the palette RAM may not allow writes
at some specific time, but checking that out will have to wait
until I can get a replacement MBV2 cable (the old one seems to
have broken).

--
Damian

#13567 From: "Steve Garcia" <pureedlizard@...>
Date: Mon Dec 23, 2002 7:38 pm
Subject: Re: HBlank DMA and Palette RAM
DeathPing
Offline Offline
Send Email Send Email
 
>A couple of things to check.  I'm basing this on my experiences with
>VBlank Interrupt generation. I've not dealt with the HBlank interrupts
>yet.
>
>The OS has an interrupt acknowledge halfword at 0x03007ff8 into which
>your interrupt routine must write the bit corresponding to the interrupt
>during your servicing of the interrupt.  Without doing this, the OS doesn't
>seem to allow the interrupts to be generated past the initial one.
>
>For example, in VBlank Interrupt handler, have the following code snippet:
>
>  *(u16*)(0x03007ff8) |= INT_VBLANK;
>
>Before I had this line in my interrupt handler, I did not get interrupts
>happening
>on the real hardware or on VisualBoyAdvanced, but it did work on
>BoycottAdvance.
>

Already have that. My game uses swi 5 (VBlankIntrWait) which relies on that
halfword. I modified Jeffs crt0.s to do that.


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 3 months FREE*.
http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=7324&DI=74\
74&SU=
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3mf

#13566 From: "Mike Wynn" <mike.wynn@...>
Date: Mon Dec 23, 2002 3:59 pm
Subject: Re: Const problem
mike.wynn@...
Send Email Send Email
 
>
> Hmm the -S option generates a bunch of weird linker errors :(
>

I think you misunderstood why -S is useful, -S generates asm output, rather
than object file.

e.g gcc -mthumb -mthumb-interwork -O2 -I.../inc -o myfile.s myfile.c
will create myfile.s so now you can see the asm that gcc would generate

FYI: gcc 3.2 complains thus :
myfile.c:20: initializer element is not constant
myfile.c:20: (near initialization for `testArr2[0]')
myfile.c:21: initializer element is not constant
myfile.c:21: (near initialization for `testArr2[1]')
myfile.c:23: initializer element is not constant
myfile.c:23: (near initialization for `testArr2[2]')

with your original file, (as I sugested the compiler can not tell that the
elements are compile time consts).

and compiles to just '.comm testArr2, 4, 32' there is no code to copy the
values from rom into ram (bss)
so no initialisation would happen you would get 3 elements of all 0's
(assuming your startup code zeros bss (as it should)).

the only gcc 2.95.x that I have in mingw (which issues similar warnings) and
generates similar code.

Mike.

Messages 13566 - 13595 of 15019   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help