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

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

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 14703 - 14732 of 15019   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#14732 From: David Welch <gba@...>
Date: Tue Mar 2, 2004 7:44 pm
Subject: Re: Re: memory stick retailer
dwelchgba
Offline Offline
Send Email Send Email
 
I can commit to 5

On Fri, 2004-02-27 at 12:40, Daniel wrote:
> I will make the purchase if I can get others will buy 30 more.
>
> 50-your 10-my 10=30.
>
> Anyone else inerested in commiting to buy some?
>
> -Daniel
>
> ----- Original Message -----
> From: "eli curtz" <spam1@...>
> To: <gbadev@yahoogroups.com>
> Sent: Friday, February 27, 2004 12:54 PM
> Subject: [gbadev] Re: memory stick retailer
>
>
> > I was thinking about this as well. Wholesale direct from Xinga is $4
> > each for the 4Mb or $5.80 for the 8Mb in quantities of 50. I'd take 10
> > or 15 if somebody wants to organize an order...
> >
> > - eli
> >
> > On Feb 27, 2004, at 9:05 AM, "Daniel" <webmaster@...>
> > wrote:
> >
> > > I also, am looking for a USA seller that I can count on.
> > >
> > > OR
> > >
> > > If there is enough intrest in this group I would be willing to
> > > purchase a wholesale lot of the units.
> > >
> > > Thanks,
> > > Daniel
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14731 From: DekuTree64@...
Date: Sat Feb 28, 2004 5:27 pm
Subject: Re: swi calls
dekutree65
Offline Offline
Send Email Send Email
 
The GBA normally runs in system mode, so you're free to change CPU
modes whenever you want. Just use an mrs or msr (don't remember which
is which).
What is it you're trying to do? The only thing I can think of is
messing with the FIQ regs, which I have sucessfully tested on
hardware from the normal mode.

--- In gbadev@yahoogroups.com, Michael Reid - CSCI/P2003
<m6reid@s...> wrote:
> hi,
>
> i'll start with the obligatory, "i'm new to this" bit. i've only
been
> playing around w/ programming the gba for about a month.
>
> anyhow, i would like to be able to add my own system calls, via the
swi
> instruction, however, the little info i have found about this
implies that
> the system calls are BIOS only, and that there is no way to add any
> user-defined calls.
>
> does anyone know if this is true or not? has anyone been able to
define
> their own syscalls?
>
> if not, then can anoyone think of a way to force a hardware
interrupt
> (enter irq mode)?
>
> thanks

#14730 From: "Damien Good" <d_good@...>
Date: Sat Feb 28, 2004 1:46 am
Subject: Re: swi calls
caitsith6502
Offline Offline
Send Email Send Email
 
True that the bios could change,  however, I have dumped the bios from all
of the current GBA systems,  GBA, GBA-SP, and GB-Player,  and they are all
100% identical,  so it is unlikely they will change the bios until they come
out with the next gameboy system.

But as Stephen said,  if you desire to get into an interrupt,  use a timer
to do that.
----- Original Message -----
From: "Stephen Stair" <sgstair@...>
To: <gbadev@yahoogroups.com>
Sent: Friday, February 27, 2004 5:14 PM
Subject: Re: [gbadev] swi calls


> Yeah, SWI's are locked in the GBA's bios.
>
> if you were desperate to make an interrupt, you could use one of the timer
> interrupts, and set it up so the timer would overflow on the next cycle or
> somesuch... But there's not much reason to use interrupts for stuff like
> that because all interrupts have a fairly significant overhead (>50
cycles),
> so you might as well just call some function to do the work for you.
>
> Additionally, you *could* attempt to find a SWI vector that would do
> something favorable (the SWIs are not bound-checked, so there *may* be
some
> 4-byte address somwhere in the data/code after the jumptable that would
jump
> to some place in iwram, or something similar that could be useful...)
> But, that's bios-dependent, if they changed the bios your code would no
> longer work... not a recommended practice :)
>
> -Stephen
> ----- Original Message -----
> From: "Michael Reid - CSCI/P2003" <m6reid@...>
> To: <gbadev@yahoogroups.com>
> Sent: Friday, February 27, 2004 4:54 PM
> Subject: [gbadev] swi calls
>
>
> > hi,
> >
> > i'll start with the obligatory, "i'm new to this" bit. i've only been
> > playing around w/ programming the gba for about a month.
> >
> > anyhow, i would like to be able to add my own system calls, via the swi
> > instruction, however, the little info i have found about this implies
that
> > the system calls are BIOS only, and that there is no way to add any
> > user-defined calls.
> >
> > does anyone know if this is true or not? has anyone been able to define
> > their own syscalls?
> >
> > if not, then can anoyone think of a way to force a hardware interrupt
> > (enter irq mode)?
> >
> > thanks
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14729 From: "Stephen Stair" <sgstair@...>
Date: Sat Feb 28, 2004 1:14 am
Subject: Re: swi calls
sgstair
Online Now Online Now
Send Email Send Email
 
Yeah, SWI's are locked in the GBA's bios.

if you were desperate to make an interrupt, you could use one of the timer
interrupts, and set it up so the timer would overflow on the next cycle or
somesuch... But there's not much reason to use interrupts for stuff like
that because all interrupts have a fairly significant overhead (>50 cycles),
so you might as well just call some function to do the work for you.

Additionally, you *could* attempt to find a SWI vector that would do
something favorable (the SWIs are not bound-checked, so there *may* be some
4-byte address somwhere in the data/code after the jumptable that would jump
to some place in iwram, or something similar that could be useful...)
But, that's bios-dependent, if they changed the bios your code would no
longer work... not a recommended practice :)

-Stephen
----- Original Message -----
From: "Michael Reid - CSCI/P2003" <m6reid@...>
To: <gbadev@yahoogroups.com>
Sent: Friday, February 27, 2004 4:54 PM
Subject: [gbadev] swi calls


> hi,
>
> i'll start with the obligatory, "i'm new to this" bit. i've only been
> playing around w/ programming the gba for about a month.
>
> anyhow, i would like to be able to add my own system calls, via the swi
> instruction, however, the little info i have found about this implies that
> the system calls are BIOS only, and that there is no way to add any
> user-defined calls.
>
> does anyone know if this is true or not? has anyone been able to define
> their own syscalls?
>
> if not, then can anoyone think of a way to force a hardware interrupt
> (enter irq mode)?
>
> thanks
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14728 From: Michael Reid - CSCI/P2003 <m6reid@...>
Date: Fri Feb 27, 2004 10:59 pm
Subject: swi calls
leonrauis
Offline Offline
Send Email Send Email
 
hi,

i'll start with the obligatory, "i'm new to this" bit. i've only been
playing around w/ programming the gba for about a month.

anyhow, i would like to be able to add my own system calls, via the swi
instruction, however, the little info i have found about this implies that
the system calls are BIOS only, and that there is no way to add any
user-defined calls.

does anyone know if this is true or not? has anyone been able to define
their own syscalls?

if not, then can anoyone think of a way to force a hardware interrupt
(enter irq mode)?

thanks

#14727 From: "Daniel" <webmaster@...>
Date: Fri Feb 27, 2004 7:40 pm
Subject: Re: Re: memory stick retailer
webmaster@...
Send Email Send Email
 
I will make the purchase if I can get others will buy 30 more.

50-your 10-my 10=30.

Anyone else inerested in commiting to buy some?

-Daniel

----- Original Message -----
From: "eli curtz" <spam1@...>
To: <gbadev@yahoogroups.com>
Sent: Friday, February 27, 2004 12:54 PM
Subject: [gbadev] Re: memory stick retailer


> I was thinking about this as well. Wholesale direct from Xinga is $4
> each for the 4Mb or $5.80 for the 8Mb in quantities of 50. I'd take 10
> or 15 if somebody wants to organize an order...
>
> - eli
>
> On Feb 27, 2004, at 9:05 AM, "Daniel" <webmaster@...>
> wrote:
>
> > I also, am looking for a USA seller that I can count on.
> >
> > OR
> >
> > If there is enough intrest in this group I would be willing to
> > purchase a wholesale lot of the units.
> >
> > Thanks,
> > Daniel
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14726 From: eli curtz <spam1@...>
Date: Fri Feb 27, 2004 6:54 pm
Subject: Re: memory stick retailer
ecurtz
Offline Offline
Send Email Send Email
 
I was thinking about this as well. Wholesale direct from Xinga is $4
each for the 4Mb or $5.80 for the 8Mb in quantities of 50. I'd take 10
or 15 if somebody wants to organize an order...

- eli

On Feb 27, 2004, at 9:05 AM, "Daniel" <webmaster@...>
wrote:

> I also, am looking for a USA seller that I can count on.
>
> OR
>
> If there is enough intrest in this group I would be willing to
> purchase a wholesale lot of the units.
>
> Thanks,
> Daniel

#14725 From: "Daniel" <webmaster@...>
Date: Fri Feb 27, 2004 4:49 pm
Subject: memory stick retailer
webmaster@...
Send Email Send Email
 
I also, am looking for a USA seller that I can count on.  
 
OR
 
If there is enough intrest in this group I would be willing to purchase a wholesale lot of the units.
 
Thanks,
Daniel

#14724 From: "Dave Murphy" <wintermute2k4@...>
Date: Fri Feb 27, 2004 2:21 am
Subject: RE: Memory Stick
gameboy_dave
Online Now Online Now
Send Email Send Email
 
well, if you're in the UK I got mine from http://www.gbax.com slightly under
12 hours after ordering them. They do ship worldwide but I'm not sure how
the prices compare.

Dave

> -----Original Message-----
> From: David Welch [mailto:gba@...]
> Sent: 26 February 2004 21:30
> To: gbadev@yahoogroups.com
> Subject: Re: [gbadev] Memory Stick
>
>
> Anyone have a suggestion for a good place to buy one of these xinga sms
> devices?  I have read about some not-so-good places for flash carts so I
> didnt want to mess around...
>
> David

#14723 From: David Welch <gba@...>
Date: Thu Feb 26, 2004 9:29 pm
Subject: Re: Memory Stick
dwelchgba
Offline Offline
Send Email Send Email
 
Anyone have a suggestion for a good place to buy one of these xinga sms
devices?  I have read about some not-so-good places for flash carts so I
didnt want to mess around...

David


On Wed, 2004-02-25 at 18:46, Daniel wrote:
> Hey I have a sudden use for the meory stick.  Through a simple home made cart
connector I can make a o-scope and function generator!  The stick would be
perfect for loading the software.. It currently runs in Ram anyway with lots of
room to spare.  Thing is I am not much of a pc programer..
>
> Is there anyone willing to write a utility program to to load .mb (multi boot)
images into the memory stick via MBV2 cable or flash cart for that matter?
>
> If so please contact me.  I cant pay much, but I am willing to offer a little
something.  I will share the software with everyone (unless you dont want me
to).
>
> THanks,
> Daniel
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14722 From: "Daniel" <webmaster@...>
Date: Thu Feb 26, 2004 1:46 am
Subject: Memory Stick
webmaster@...
Send Email Send Email
 
Hey I have a sudden use for the meory stick.  Through a simple home made cart
connector I can make a o-scope and function generator!  The stick would be
perfect for loading the software.. It currently runs in Ram anyway with lots of
room to spare.  Thing is I am not much of a pc programer..

Is there anyone willing to write a utility program to to load .mb (multi boot)
images into the memory stick via MBV2 cable or flash cart for that matter?

If so please contact me.  I cant pay much, but I am willing to offer a little
something.  I will share the software with everyone (unless you dont want me
to).

THanks,
Daniel

#14721 From: eli curtz <spam1@...>
Date: Wed Feb 25, 2004 4:07 am
Subject: Re: Super Memory Stick
ecurtz
Offline Offline
Send Email Send Email
 
Once again, you rock Uli!

Can anyone who's gotten a wholesaler account at success-hk check the
bulk price on these things? The 4Mb ones are $8 normally - seems like a
really cheap and easy way to distribute your game (as long as you can
fit it into multiboot RAM.)

Uli, can your library read more data from the stick after the game has
loaded?

- eli

----- Original Message -----
From: "Ulrich Hecht" <uli@...>

> I have reverse-engineered the Xinga SMS and written a little library
> that allows you store data on it. I have also reversed the encryption
> of the multiboot image, thus making it possible to flash your own MB
> image and boot it from the stick. The necessary encryption and
> flashing tools come with the lib.

#14720 From: Ulrich Hecht <uli@...>
Date: Tue Feb 24, 2004 8:55 pm
Subject: Re: Super Memory Stick
uli@...
Send Email Send Email
 
Hi!

On Tuesday 24 February 2004 19:17, David Welch wrote:
> Can you plug in the thing and program it hot?

Yes. That's exactly what smsflash does.

> I imagine with a
> flash cart you can do all the things you have done.

I do own a flash cart, but I have not used it during development. All
you really need is an MBV2 cable.

> But what if you
> wanted to say, have a bootloader program on there that boots the
> gba, you unplug the sms and plug in a serial cable to the pc,
> download something from the pc, replace the sms and upload to it.
> does that work or does the thing have to be plugged in from boot?

No problem, once your code is running you can plug it in and out all
you want. You may, however, have to reset the serial port to a sane
state before you can communicate with the PC.

CU
Uli

#14719 From: "Dave Murphy" <wintermute2k4@...>
Date: Tue Feb 24, 2004 7:15 pm
Subject: RE: Super Memory Stick
gameboy_dave
Online Now Online Now
Send Email Send Email
 
I've just ordered a couple of these things, I have some code which may be
able to program them directly from a PC without involving a GBA. More when I
find out if it's possible :)

Dave

> -----Original Message-----
> From: David Welch [mailto:gba@...]
> Sent: 24 February 2004 18:18
> To: gbadev@yahoogroups.com
> Subject: Re: [gbadev] Super Memory Stick
>
>
>
> Can you plug in the thing and program it hot?  I imagine with a flash
> cart you can do all the things you have done.  But what if you wanted to
> say, have a bootloader program on there that boots the gba, you unplug
> the sms and plug in a serial cable to the pc, download something from
> the pc, replace the sms and upload to it.  does that work or does the
> thing have to be plugged in from boot?
>
> Just wondering if it is useful to hobbyists who dont have flash carts,
> but might be able to get the thing programmed one time with an alternate
> bootloader (boots and gives you a choice to load from flash or run a
> serial application)...
>
> The price is definitely right, hell less than 10 bucks is cheaper than a
> rom cartridge from N.  You could distribute homebrew/multiboot games on
> this thing...
>
> David

#14718 From: David Welch <gba@...>
Date: Tue Feb 24, 2004 6:17 pm
Subject: Re: Super Memory Stick
dwelchgba
Offline Offline
Send Email Send Email
 
Can you plug in the thing and program it hot?  I imagine with a flash
cart you can do all the things you have done.  But what if you wanted to
say, have a bootloader program on there that boots the gba, you unplug
the sms and plug in a serial cable to the pc, download something from
the pc, replace the sms and upload to it.  does that work or does the
thing have to be plugged in from boot?

Just wondering if it is useful to hobbyists who dont have flash carts,
but might be able to get the thing programmed one time with an alternate
bootloader (boots and gives you a choice to load from flash or run a
serial application)...

The price is definitely right, hell less than 10 bucks is cheaper than a
rom cartridge from N.  You could distribute homebrew/multiboot games on
this thing...

David



On Tue, 2004-02-24 at 10:46, Ulrich Hecht wrote:
> Hi!
>
> On Tuesday 24 February 2004 16:58, Daniel wrote:
> > This stick stores 8 Mbit?  That is 2 mega Bytes right?
>
> That would be 8 Megahalfnibbles. :)
> It's 1 MB. Mind that I have only tested the code with a 4 MBit (512 kB)
> stick.
>
> > It comes with a set of tools that let you flash a multiboot image?
>
> Not as such. I have conceived these tools by first ripping the original
> MB image the stick is delivered with using a self-written multiboot
> client, taking a long hard look at the disassembly, figuring how to
> access the stick, ripping the raw data and comparing it with the
> decrypted MB image to figure out the encryption algorithm.
>
> > Does this require me to install ham?
>
> Yes. I do not provide any binaries to make sure people read the README
> and especially the disclaimer it contains.
>
> CU
> Uli
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14717 From: Ulrich Hecht <uli@...>
Date: Tue Feb 24, 2004 5:46 pm
Subject: Re: Super Memory Stick
uli@...
Send Email Send Email
 
Hi!

On Tuesday 24 February 2004 16:58, Daniel wrote:
> This stick stores 8 Mbit?  That is 2 mega Bytes right?

That would be 8 Megahalfnibbles. :)
It's 1 MB. Mind that I have only tested the code with a 4 MBit (512 kB)
stick.

> It comes with a set of tools that let you flash a multiboot image?

Not as such. I have conceived these tools by first ripping the original
MB image the stick is delivered with using a self-written multiboot
client, taking a long hard look at the disassembly, figuring how to
access the stick, ripping the raw data and comparing it with the
decrypted MB image to figure out the encryption algorithm.

> Does this require me to install ham?

Yes. I do not provide any binaries to make sure people read the README
and especially the disclaimer it contains.

CU
Uli

#14716 From: "Daniel" <webmaster@...>
Date: Tue Feb 24, 2004 3:58 pm
Subject: Re: Super Memory Stick
webmaster@...
Send Email Send Email
 
This stick stores 8 Mbit?  That is 2 mega Bytes right?
It comes with a set of tools that let you flash a multiboot image?  Does
this require me to install ham?

Most cool!


----- Original Message -----
From: "Ulrich Hecht" <uli@...>
To: <gbadev@yahoogroups.com>
Sent: Monday, February 23, 2004 11:08 PM
Subject: [gbadev] Super Memory Stick


> Hi!
>
> I have reverse-engineered the Xinga SMS and written a little library
> that allows you store data on it. I have also reversed the encryption
> of the multiboot image, thus making it possible to flash your own MB
> image and boot it from the stick. The necessary encryption and
> flashing tools come with the lib.
>
> Find it here:
> http://www.emulinks.de/libstick/
>
> CU
> Uli
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>

#14715 From: Ulrich Hecht <uli@...>
Date: Tue Feb 24, 2004 5:08 am
Subject: Super Memory Stick
uli@...
Send Email Send Email
 
Hi!

I have reverse-engineered the Xinga SMS and written a little library
that allows you store data on it. I have also reversed the encryption
of the multiboot image, thus making it possible to flash your own MB
image and boot it from the stick. The necessary encryption and
flashing tools come with the lib.

Find it here:
http://www.emulinks.de/libstick/

CU
Uli

#14714 From: "Joseph Macaulay" <josephmacaulay@...>
Date: Mon Feb 23, 2004 8:32 pm
Subject: RE: Publishing a RPG in GBA
dsbaha
Offline Offline
Send Email Send Email
 

Mr Otaegui,

     I may be able to help you.  As a former THQ employee, I still have contacts within that company.  Contact me via e-mail (which is josephmacaulay@...) and lets discuss this.

Thank You,

Joseph Macaulay

>From: "Javier F. Otaegui"
>Reply-To: gbadev@yahoogroups.com
>To:
>Subject: [gbadev] Publishing a RPG in GBA
>Date: Mon, 23 Feb 2004 14:55:34 -0300
>
>Hello gbadev community,
>
>I'm Javier Otaegui from Buenos Aires, and I've been an asiduous follower of
>this list for about two years now.
>
>I have almost completed a RPG, and I would like to know if anyone here has
>contacts with any GBA publisher, or if anyone could give me some pointers of
>how I could have this game published.
>
>Thanks in advance,
>
>Javier F. Otaegui
>
>
>


Stay informed on Election 2004 and the race to Super Tuesday.

#14713 From: "Javier F. Otaegui" <jotaegui@...>
Date: Mon Feb 23, 2004 5:55 pm
Subject: Publishing a RPG in GBA
despotismo2
Offline Offline
Send Email Send Email
 
Hello gbadev community,

I'm Javier Otaegui from Buenos Aires, and I've been an asiduous follower of
this list for about two years now.

I have almost completed a RPG, and I would like to know if anyone here has
contacts with any GBA publisher, or if anyone could give me some pointers of
how I could have this game published.

Thanks in advance,

Javier F. Otaegui

#14712 From: David Voswinkel <d.voswinkel@...>
Date: Mon Feb 23, 2004 11:12 am
Subject: flash 2 advance linker - uCON64
optixx2002
Offline Offline
Send Email Send Email
 
hello list,

I would like to ask you for testing support
on the uCON64 ( http://ucon64.sourceforge.net/)
tool which has newly added support
for the FLASH2ADVANCE linker:

if want to test it, you will need to checkout sources from
cvs( https://sourceforge.net/cvs/?group_id=12381) and
you also need the the addtional
binaries( http://prdownloads.sourceforge.net/ucon64/f2afiles.zip?download)
to get the the f2a part  working:

Of course, if you  would like to test the parallel port code, that would be
great too. Especially when you configure the source with --enable-ppdev
(remember: Linux-only). The parallel port code *should* work on DOS, Windows,
BeOS, FreeBSD.I can imagine some GBA developers are interested,
because they can call uCON64 from some other program without extra user
intervention.

Please note that uCON64 has a quirck that the direction of
the transfer depends on the existence of a file. File exists -> send. File
does not exist -> receive.

BTW I added support to upload multiple files. The option is -xf2amulti=SIZE.
Example:
   ucon64 -xf2amulti=128 game1.bin game2.bin game3.bin
gbaloader in ~/.ucon64rc or an environment variable with that name should be
set. You could also use a command like this:
   gbaloader=someloader.bin ucon64 -xf2amulti=128 game1.bin game2.bin game3.bin

please report any bugs or problem to dbjh@...


thanks in advance

#14711 From: "Dave Murphy" <wintermute2k4@...>
Date: Fri Feb 20, 2004 8:54 pm
Subject: RE: devkitARM updated
gameboy_dave
Online Now Online Now
Send Email Send Email
 
um, yeah. It's kind of required to build it at all :)

> -----Original Message-----
> From: Pablo Bleyer Kocik [mailto:pbk@...]
> Sent: 20 February 2004 20:12
> To: gbadev@yahoogroups.com
> Subject: Re: [gbadev] devkitARM updated
>
>
>
>   Hello Dave.
>
>   Did you apply the GCC-3.3.3 thumb patch to build the MinGW version?
>
>   Regards.
>
> At 14:29 2004-02-20, you wrote:
> >my mingw based gcc for arm has been updated with gcc 3.3.3
> >
> >http://homepage.ntlworld.com/wintermute2002/
> >
> >any problems give me a shout :)
> >
> >Dave
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#14710 From: Pablo Bleyer Kocik <pbk@...>
Date: Fri Feb 20, 2004 8:11 pm
Subject: Re: devkitARM updated
pablobleyer
Offline Offline
Send Email Send Email
 
Hello Dave.

   Did you apply the GCC-3.3.3 thumb patch to build the MinGW version?

   Regards.

At 14:29 2004-02-20, you wrote:
>my mingw based gcc for arm has been updated with gcc 3.3.3
>
>http://homepage.ntlworld.com/wintermute2002/
>
>any problems give me a shout :)
>
>Dave
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>

#14709 From: "Dave Murphy" <wintermute2k4@...>
Date: Fri Feb 20, 2004 5:29 pm
Subject: devkitARM updated
gameboy_dave
Online Now Online Now
Send Email Send Email
 
my mingw based gcc for arm has been updated with gcc 3.3.3

http://homepage.ntlworld.com/wintermute2002/

any problems give me a shout :)

Dave

#14708 From: David Welch <gba@...>
Date: Tue Jan 27, 2004 4:51 pm
Subject: Re: Re: Sound mixing
dwelchgba
Offline Offline
Send Email Send Email
 
I was going to start this off by arguing that you should use 32 bit not
16 bit as it should be more efficient on the ARM.  If you start off with
signed 8 bit samples, want to add them and clip them and store the
result back as signed 8 bit, using a signed 32 bit variable would be
ideal on the ARM.  I would argue that if you use a 16 bit signed
variable the compiler should clip to 16 bits before doing the compare:

short sa;
char ca,cb,cc;
...
	 sa=ca+cb;
	 if(sa>127) sa=127;
	 if(sa<-127) sa=-127;
...

ca and cb are loaded and signed extended into registers using the ldrb
instruction, so everything internally is a 32 bit signed variable
before doing the first compare, a generic compiler should clip sa to 16
bits to insure it is not comparing a number greater than 16 bits can
hold, perhaps in this case the compiler is smart enough to know the add
is from 8 bit and spares this step
Sure enough if you change the char ca... to short ca...then gcc does in
fact clip sa before going on to the compare.  (I would still argue as a
habit on the ARM to use an 32 bit signed for this sort of thing instead
of 16 bit signed, for performance)

Here is the scary thing I found, using the RVCT compiler (eval) from
ARM, the compiler had NO PROBLEMS with this code:

short sa;
char ca,cb,cc;

int main ( void )
{
	 sa=ca+cb;
	 if(sa>70000) sa=127;
	 cc=(char)sa;
	 return(0);
}

The compiled code actually compared sa with 70000 not realizing that sa
is a 16 bit variable and could never be greater than 70000.
This bothers me...

ADD R1,R1,R2
SUBS R12,R1,#0X11000
SUBGES R12,R12,#0X170
STRH R1,[R0,#4]  ;sa
MOVGT r1,#0x7f
STRGTH r1,[r0,#4] ;sa

Perhaps the code will never have the GT flag set and isnt harmful, but
just wastes cycles.  I will have to think about that.

Gcc performed as expected, gave a warning that the comparison could
never be true and simply didnt generate code for the comparison, it did
the add and stored sa to cc and was done.

David


On Tue, 2004-01-27 at 02:09, gb_feedback wrote:
> Are you limiting the output (by adding in 16 bit
> and then limiting)?:
>  if (sampleL > 127)
> 	 sampleL = 127;
>  if (sampleL < -127)
> 	 sampleL = -127;
>
> --- In gbadev@yahoogroups.com, Josh DeBonis <joshdebonis@y...> wrote:
> > I'm trying to mix 2 sound samples on the GBA.  When I
> > play them individually, they sound great. When I mix
> > them together, a sound is produced, but it's not
> > pretty.  I am simply adding the values of each sample
> > together (it is a sample of the amplitude). I have
> > tried scaling down the amplitudes before I add them,
> > to prevent clipping, and this does not prevent the
> > problem. Do I have to do any strange adding because of
> > twos complement?  Anyone know what I might be missing?
> >
> > Thanks,
> > Joshua
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free web site building tool. Try it!
> > http://webhosting.yahoo.com/ps/sb/
>
>
>
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
>  http://groups.yahoo.com/group/gbadev/
>
> To unsubscribe from this group, send an email to:
>  gbadev-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
>  http://docs.yahoo.com/info/terms/
>
>

#14707 From: Groepaz <groepaz@...>
Date: Tue Jan 27, 2004 9:16 am
Subject: Re: Sound mixing
groepaz2000
Offline Offline
Send Email Send Email
 
On Monday 26 January 2004 22:54, Guido Henkel wrote:
> Your samples are clipping, that's what you're hearing.
>
> What you have to do is to add the two of them and then create the average.
>
> destSample = ( sample1 + sample2 ) / 2;

uuuwww... no, please dont, this is a common misconception. while this will
prevent the clipping, it is still not what you want.

what you need to do is

a) sum up the amplitudes of all channels you want to mix, ie in your
case sum=smp1+smp2

b) clamp the resulting value against the high and the low limit like this:

if (sum>highlimit) sum=highlimit;
else if(sum<lowlimit) sum=lowlimit;

gpz

#14706 From: "gb_feedback" <gb_feedback@...>
Date: Tue Jan 27, 2004 9:09 am
Subject: Re: Sound mixing
gb_feedback
Offline Offline
Send Email Send Email
 
Are you limiting the output (by adding in 16 bit
and then limiting)?:
	 if (sampleL > 127)
		 sampleL = 127;
	 if (sampleL < -127)
		 sampleL = -127;

--- In gbadev@yahoogroups.com, Josh DeBonis <joshdebonis@y...> wrote:
> I'm trying to mix 2 sound samples on the GBA.  When I
> play them individually, they sound great. When I mix
> them together, a sound is produced, but it's not
> pretty.  I am simply adding the values of each sample
> together (it is a sample of the amplitude). I have
> tried scaling down the amplitudes before I add them,
> to prevent clipping, and this does not prevent the
> problem. Do I have to do any strange adding because of
> twos complement?  Anyone know what I might be missing?
>
> Thanks,
> Joshua
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/

#14705 From: "Guido Henkel" <ghenkel@...>
Date: Mon Jan 26, 2004 9:54 pm
Subject: Re: Sound mixing
guidohenkel
Offline Offline
Send Email Send Email
 
Your samples are clipping, that's what you're hearing.

What you have to do is to add the two of them and then create the average.

destSample = ( sample1 + sample2 ) / 2;


Guido

   ----- Original Message -----
   From: Josh DeBonis
   To: gbadev@yahoogroups.com
   Sent: Monday, January 26, 2004 8:56 AM
   Subject: [gbadev] Sound mixing


   I'm trying to mix 2 sound samples on the GBA.  When I
   play them individually, they sound great. When I mix
   them together, a sound is produced, but it's not
   pretty.  I am simply adding the values of each sample
   together (it is a sample of the amplitude). I have
   tried scaling down the amplitudes before I add them,
   to prevent clipping, and this does not prevent the
   problem. Do I have to do any strange adding because of
   twos complement?  Anyone know what I might be missing?

   Thanks,
   Joshua

   __________________________________
   Do you Yahoo!?
   Yahoo! SiteBuilder - Free web site building tool. Try it!
   http://webhosting.yahoo.com/ps/sb/


         Yahoo! Groups Sponsor
               ADVERTISEMENT





------------------------------------------------------------------------------
   Yahoo! Groups Links

     a.. To visit your group on the web, go to:
     http://groups.yahoo.com/group/gbadev/

     b.. To unsubscribe from this group, send an email to:
     gbadev-unsubscribe@yahoogroups.com

     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#14704 From: Josh DeBonis <joshdebonis@...>
Date: Mon Jan 26, 2004 4:56 pm
Subject: Sound mixing
joshdebonis
Offline Offline
Send Email Send Email
 
I'm trying to mix 2 sound samples on the GBA.  When I
play them individually, they sound great. When I mix
them together, a sound is produced, but it's not
pretty.  I am simply adding the values of each sample
together (it is a sample of the amplitude). I have
tried scaling down the amplitudes before I add them,
to prevent clipping, and this does not prevent the
problem. Do I have to do any strange adding because of
twos complement?  Anyone know what I might be missing?

Thanks,
Joshua

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

#14703 From: "schoebey" <roman@...>
Date: Sat Jan 17, 2004 3:17 pm
Subject: FRAS problems
schoebey
Offline Offline
Send Email Send Email
 
hi

i'm coding using devkit_v4 and C

I am having trouble using FRAS with my project.

When calling a fras-function somewhere in the code, the linker
includes those functions from the fras-library (of course). But as
soon as it does that, the program refuses to work at all...

i had to call one of jeff frohwein's functions defined in crt0.s
(__FarProcedure) in order to be able to call the fras-funcs without
generating an error.


Now it compiles w/o any error or warning msg, but locks right after
being loaded into an emulator.

This also happens when i include the fras-functions from the
asm-sources instead of linking to the library...


if there was something wrong with the interrupts not being set up
properly, the program should show something at least, but not lock!
(i'm starting the timers before i call any fras-function, but they
don't increment...they just stay at zero)


I think it might have something to do with crt0.s, but it's just a
guess....
(i've enabled interrupts there and they're working as expected)

any suggestions?

thanks a lot
schoebey

Messages 14703 - 14732 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