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.

DS Misc > DS gets the AXE

#81973 - tepples - Wed May 03, 2006 3:54 am

I developed a DS based musical toy to teach myself how to use the PSG (Game Boy style audio) on the Nintendo DS.
http://www.pineight.com/ds/AXE.zip
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#81978 - Mr. Picklesworth - Wed May 03, 2006 4:19 am

Holy crap that title scared me!

Nice work... sort of Electroplanktonish :)
(And that is an incredibly small NDS file!)
_________________
Thanks!
MKDS Friend Code: 511165-679586
MP:H Friend Code: 2105 2377 6896

#81990 - melw - Wed May 03, 2006 8:44 am

Neat! Now, possibility to use different (own) background beats and scales on the fly and this would make it to the next live. :)

#82003 - Dark Knight ez - Wed May 03, 2006 11:23 am

Really nice. :)

#82005 - Roc - Wed May 03, 2006 11:41 am

Ha, it's funny that an 8 KB app can be one of the most fun :) Good job.

#82006 - MatLeOuf - Wed May 03, 2006 11:43 am

Very funny, and the music done with it is quite good!
One thing, you probably used an old version of ndslib, the touchscreen code is bugged. It's not really that important for this app, but I prefer to tell you ;)

#82033 - HtheB - Wed May 03, 2006 5:50 pm

whaahah w00t :D nice :)

#82043 - The 9th Sage - Wed May 03, 2006 6:26 pm

Heh, that's actually pretty neat. :)
_________________
Now with 20% More Old Man from Zelda 1 than ever before!

#82046 - HtheB - Wed May 03, 2006 6:39 pm

it reminds me of this one :)


DS Drum machine by The Chukster
http://forum.gbadev.org/viewtopic.php?t=8950

^_^

#82102 - tepples - Thu May 04, 2006 12:41 am

MatLeOuf wrote:
One thing, you probably used an old version of ndslib, the touchscreen code is bugged. It's not really that important for this app, but I prefer to tell you ;)

I used the most recent libnds, but it uses a custom ARM7 code (taken from one of Chris Double's examples) to have more control over the PSGs. Is it possible to use the newer touch code while still customizing the ARM7?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82117 - 0xtob - Thu May 04, 2006 2:06 am

Wow, this is so much fun! Also, I never heard the DS's PSG before. Thanks a lot for providing the source. Now you got me thinking about a retro fork of NitroTracker :-)

Tob

#82144 - tepples - Thu May 04, 2006 4:37 am

I changed the ARM7 code to call touchReadXY() of libnds. If you've been having touch problems, please re-download it (from the same URL).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82148 - Puppet - Thu May 04, 2006 5:34 am

tepples wrote:
I changed the ARM7 code to call touchReadXY() of libnds. If you've been having touch problems, please re-download it (from the same URL).


I had a touch screen problem with the old version, and I'm having the same problem with the new version. If I touch the stylus in the upper right corner of the screen it registers the touch a little lower and to the left. The same goes for the other three corners. The only place on the touch screen that provides an accurate result is the center of the screen. So if I touch the center and then move the stylus to the left, the dot on the screen will follow, but it doesn't go as fast as I'm moving the stylus, so it can't ever reach the edge...

#82160 - LiraNuna - Thu May 04, 2006 9:22 am

So... Much.. Fun...

I'm more then addicted....

#82163 - Darkflame - Thu May 04, 2006 10:18 am

very nice :)

#82166 - LargePig - Thu May 04, 2006 10:33 am

Awesome!

I think we should have an AXE music compo!

Everyone make an AXE music song!

#82168 - HtheB - Thu May 04, 2006 11:04 am

LargePig wrote:

Everyone make an AXE music song!
how? :D

#82171 - LargePig - Thu May 04, 2006 11:35 am

Just hook the ds headphone socket to the mic on your pc :P

#82173 - LargePig - Thu May 04, 2006 11:48 am

If i could find my cable i'd have a go, but i cannot :(

#82181 - chishm - Thu May 04, 2006 1:34 pm

tepples wrote:
Is it possible to use the newer touch code while still customizing the ARM7?

In the examples folder that came with devkitpro (you did install the examples, didn't you?) there should be a template that allows you to customise the ARM7 side, with the newest ARM7 touch code. But then again, I still haven't upgraded to r18 yet, so it may still be the old template.

EDIT: Corrected "temple" to "template"
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com


Last edited by chishm on Thu May 04, 2006 2:41 pm; edited 1 time in total

#82182 - tepples - Thu May 04, 2006 1:54 pm

Puppet wrote:
I had a touch screen problem with the old version, and I'm having the same problem with the new version. If I touch the stylus in the upper right corner of the screen it registers the touch a little lower and to the left. The same goes for the other three corners. The only place on the touch screen that provides an accurate result is the center of the screen.

When was the last time you went into settings (hold Select+Start+power on and click the DS that looks like two file drawers icon at the bottom) and calibrated your touch screen?

And yes I did look through the examples. It might take me a while to get up to speed on this new platform.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82302 - HtheB - Fri May 05, 2006 2:33 am

LargePig wrote:
Just hook the ds headphone socket to the mic on your pc :P
yeah.. but how to make one on the DS? :D

#82312 - Flood_of_SYNs - Fri May 05, 2006 3:27 am

HtheB wrote:
LargePig wrote:
Just hook the ds headphone socket to the mic on your pc :P
yeah.. but how to make one on the DS? :D

I use a audio patch cable between my DS and to the line-in on my computer.

(5ft with two 3.5mm stereo plugs)
Like This one but longer.
_________________
Blue NDS v4 (FlashMe v7) - GBAMP V2 CF
?There is no shame in not knowing; the shame lies in not finding out.?
?The church is near but the road is icy, the bar is far away but I will walk carefully?

#82314 - Puppet - Fri May 05, 2006 3:36 am

tepples wrote:
Puppet wrote:
I had a touch screen problem with the old version, and I'm having the same problem with the new version. If I touch the stylus in the upper right corner of the screen it registers the touch a little lower and to the left. The same goes for the other three corners. The only place on the touch screen that provides an accurate result is the center of the screen.

When was the last time you went into settings (hold Select+Start+power on and click the DS that looks like two file drawers icon at the bottom) and calibrated your touch screen?

And yes I did look through the examples. It might take me a while to get up to speed on this new platform.


That's odd.... calibrating the screen worked. I've had this problem before in other apps and calibrating the screen did nothing.

#82326 - caitsith2 - Fri May 05, 2006 7:31 am

Puppet wrote:
tepples wrote:
Puppet wrote:
I had a touch screen problem with the old version, and I'm having the same problem with the new version. If I touch the stylus in the upper right corner of the screen it registers the touch a little lower and to the left. The same goes for the other three corners. The only place on the touch screen that provides an accurate result is the center of the screen.

When was the last time you went into settings (hold Select+Start+power on and click the DS that looks like two file drawers icon at the bottom) and calibrated your touch screen?

And yes I did look through the examples. It might take me a while to get up to speed on this new platform.


That's odd.... calibrating the screen worked. I've had this problem before in other apps and calibrating the screen did nothing.


This seems to be true of all cases. Anything using the old touch screen code will not properly use the calibration values, and as a result, if the DS screen responds wierdly before calibration, it will still respond wierdly after that calibration. THe new touch screen code is not affected by this issue, and will work correctly after calibration.

#82335 - MatLeOuf - Fri May 05, 2006 10:33 am

tepples wrote:
I changed the ARM7 code to call touchReadXY() of libnds. If you've been having touch problems, please re-download it (from the same URL).
It works like a charm now :)
By the way, I like a lot your fading square. Adding some customization to this app (changing rythm and music patterns, adding some background,...) could make a very great one. Keep up the good work!

#82342 - derula - Fri May 05, 2006 12:41 pm

The game is... like... funny. I would love to see more levels ^^.

But what I found out: it may help us to locate the touch issues that are still persisting. I don't know really if the random presses that sometimes occur while lifting the stylus are software or hardware issues, but they seem to occur while you only press the screen lightly, so not only after removing, but also if moving with light pressure. I tried to move the stylus over the screen with only a very light pressure and moving speed, and there where all random presses, but these presses followed some kind of rule, they were all aligned as a line (with a random difference from the line) that went from the real touch point 1.5 inches or so left-down. I don't know if someone had already found out this while trying with the touch thing (actually i cannot imagine no one has), but I just said it now.

Sorry for off topic, tepples, have mercy! *beg* ^^'
_________________
visit my blog. please.

#82346 - tepples - Fri May 05, 2006 1:03 pm

derula wrote:
But what I found out: it may help us to locate the touch issues that are still persisting. I don't know really if the random presses that sometimes occur while lifting the stylus are software or hardware issues, but they seem to occur while you only press the screen lightly, so not only after removing, but also if moving with light pressure.

I found this too, and I may use AXE as a test platform for rejecting the "outliers" that happen with light pressure.

Quote:
Sorry for off topic, tepples, have mercy! *beg* ^^'

It's still on the topic of this program. But if someone adapts the source code to make such a test platform, that's a new topic.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82353 - headspin - Fri May 05, 2006 1:56 pm

Really cool app tepples. And I'm glad to see your finally deving for DS :) Touch screen opens the doors to some cool app ideas, and this is one of the coolest ones I've seen. Nice work.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#82387 - HtheB - Fri May 05, 2006 10:04 pm

Flood_of_SYNs wrote:
HtheB wrote:
LargePig wrote:
Just hook the ds headphone socket to the mic on your pc :P
yeah.. but how to make one on the DS? :D

I use a audio patch cable between my DS and to the line-in on my computer.

(5ft with two 3.5mm stereo plugs)
Like This one but longer.
Oh w8! i run the file on the DS.. and I see the effect of what the touchscreen do with the sound.. tried with dualis before and the sound didnt change over there...

(well.. I just tried again on dualis.. and it works just like the DS :S weird :D)

EDIT: thats why I asked how to do some sort of compo... b/c I didnt know you can change the music :D

#82406 - dustin - Sat May 06, 2006 1:17 am

Man, this is great fun. The only thing I found a bit odd was when I tried to just tap out patterns, not drag the stylus. Quite often a tap won't register a sound, like the screen would be drawn on but there wouldn't be a beep or anything. I'm assuming this is because it only plays the beeps when they are in time with the music and I'm a bit off or something and not because of some bug right?
_________________
www.thrivepresents.com
palib.dustin.info

#82547 - tepples - Sun May 07, 2006 6:12 am

The pen has to be down at the beginning of a 16th note for a note to play. Eventually, you'll get the hang of the timing. Do you also fail in DDR?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#82596 - dustin - Sun May 07, 2006 5:48 pm

No, I'm fine at DDR actually. I only noticed it happening when I tried doing it on odd beats that weren't really to the music so I assumed it was something like that.
_________________
www.thrivepresents.com
palib.dustin.info

#93247 - tepples - Tue Jul 18, 2006 1:32 am

My faith in DS emulation has been restored, to a point:
  • NO$GBA 2.2f (2006-06-18) runs AXE without sound.
  • Dualis (2006-05-02) runs AXE with sound.
Dualis is not for everyone. People with devkitARM R19 may experience incompatibilities, glitches, and crashes; some were bothered enough by these symptoms to go back to musical CF cards. Ask your doctor if Dualis is right for you.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#93306 - derula - Tue Jul 18, 2006 2:03 pm

tepples wrote:
Ask your doctor if Dualis is right for you.


Which one? I don't have a DS doctor.

btw, how's AXE going? Any new levels planned?
_________________
visit my blog. please.

#93314 - Dan2552 - Tue Jul 18, 2006 4:25 pm

the left doctor

#93366 - Zeep - Tue Jul 18, 2006 8:12 pm

this is awesome. and i'm honored to be the first to officially post an AXE composition. It's titled"Running in the Street."

Click Here to download.
_________________
Hardware: DS Lite & Phat (both FlashMe v7), M3 Perfect SD, PassKey 1, Max Media Launcher, SanDisk 1GB SD card

#93443 - OrR - Wed Jul 19, 2006 4:31 am

You, sir, just made history. :D

#93456 - MechaBouncer - Wed Jul 19, 2006 6:31 am

tepples wrote:
Dualis is not for everyone. People with devkitARM R19 may experience incompatibilities, glitches, and crashes; some were bothered enough by these symptoms to go back to musical CF cards. Ask your doctor if Dualis is right for you.

That quote alone is worthy of being put into a signature. Too bad mine is just about full with information. :)
_________________
Cobalt/Black NDSL
CycloDS Evolution (firmware 1.55 BETA 3) and EZFlash 3-in-1
Kingston SD-C02G JAPAN 2GB MicroSD
MoonShell 1.71, DSOrganize 3.1129, QuakeDS Pre3, ScummVM DS 0.11.1, Pocket Physics 0.6, OpenTyrian DS 0.3

#93474 - Stonebone - Wed Jul 19, 2006 11:54 am

If i'm correct, source for the latest version of the arm7 binary should always be available here
http://devkitpro.cvs.sourceforge.net/devkitpro/tools/nds/ndstool/DefaultArm7/source/main.c?view=markup

#93581 - derula - Wed Jul 19, 2006 11:54 pm

Zeep wrote:
this is awesome. and i'm honored to be the first to officially post an AXE composition. It's titled"Running in the Street."

Click Here to download.


Sounds like my brother trying to play the guitar. Besides the fact he doesn't have that background sounds xD. No but near the end it gets quite neat.
_________________
visit my blog. please.

#94256 - Goosey - Mon Jul 24, 2006 3:05 am

Ok I just spent an hour playing with this. Must get audio patch cable NOW

#94544 - The_Mayor87 - Tue Jul 25, 2006 8:13 am

if you are planning to update, it would be awesome of you if you included a button that turned off the background beat so we could add our own*, maybe even from the ds drum machine. =)

*edit for clarity: i meant during post-production, of course.

#96825 - Omegas - Sat Aug 05, 2006 7:49 pm

The people at Boozembly 2006 (a shadow party of Assembly 2006 demoparty) just loved the app! We played it through my small boombox for like two hours straight. :) The only problem is that the dusty environment combined with some frantic stylus work left several nasty scratches on my DS touch screen. :(

We also came up with many ways to expand this little app. Like adding different drum patterns (which you could change mid-song usind the d-pad?) and assigning samples for the ABXY buttons. Maybe I'll have a better look at the source code and try adding some of this myself...

#96836 - The_Mayor87 - Sat Aug 05, 2006 8:50 pm

Do'h! i didn't realize the source was included when i first downloaded it!

here's a version without the background beat, if anyone wants to add their own later.

http://rapidshare.de/files/28313342/AXEsp.zip.html

tested on GBAMP. =)

#96900 - daninski - Sun Aug 06, 2006 11:23 am

could we get a version which not only has no backing track but plays a constant note when the touch screen is pressed, and that modifies when you move the point? that would be so perfect to use it as a live instrument.

for some reason those rapid share links never ever work for me, they say there's an error that might be because i'm on AOL... which i'm not.

#107566 - OrR - Mon Oct 30, 2006 11:26 pm

This is still one of my favourite DS programs... Hasn't somebody got the time enhance it with some more beats and more functionality? That would be really awesome... Maybe some graphical effects, too. Please? :)

#107598 - Dark Knight ez - Tue Oct 31, 2006 10:36 am

I modified its code for the power-up freestyle in AmplituDS if you're interested. I don't think tepples is working on AXE anymore, nor was it ever probably his intent to make it more than this nice little showcase.

#108895 - FireSlash - Sun Nov 12, 2006 8:02 pm

I don't know why...

But it's addicting.
_________________
FireSlash.net

#109142 - KaKiT - Wed Nov 15, 2006 2:52 pm

this is a great funny programm! :P
good job :p

#116027 - dantheman - Sun Jan 21, 2007 5:44 am

A bump? A bump! *GASP*

No$GBA got another update today, and it runs AXE perfectly now, just so you know.

#150862 - tuLL - Wed Feb 13, 2008 8:02 pm

Hi

I'm kind of new to the DS programming but I tried to compile the AXE on my PC and I got these errors:

Code:
> "make"
arm-eabi-gcc -std=gnu99 -Wall -O2 -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork -I/d/devkitPro/libnds/include -DARM7 -c arm7.c -o arm7.o
arm7.c: In function 'axe':
arm7.c:84: error: 'TransferRegion' has no member named 'heartbeat'
arm7.c: In function 'InterruptHandler':
arm7.c:195: error: 'TransferRegion' has no member named 'curtime'
arm7.c:226: error: 'TransferRegion' has no member named 'heartbeat'
arm7.c:240: error: 'TransferRegion' has no member named 'curtime'
arm7.c:249: warning: implicit declaration of function 'runSound'
arm7.c:195: warning: unused variable 'ct'
"make": *** [arm7.o] Error 1

> Process Exit Code: 2


I wanted to remove the beat, but I didn't even edit the code. So I can't even compile the original:\

#150865 - tepples - Wed Feb 13, 2008 8:33 pm

tuLL wrote:
Hi

I'm kind of new to the DS programming but I tried to compile the AXE on my PC and I got these errors:

[snip a whole bunch that has to do with changes to the ]

I wanted to remove the beat, but I didn't even edit the code. So I can't even compile the original:\

That's because it was made on an ancient version of libnds. The layout of the ARM7/ARM9 shared memory changes from version to version. In fact, wintermute has hinted that the shared memory might even disappear entirely in a future version in favor of a completely FIFO-based solution.

What you could do is try taking RAC or memtestARM and turning it back into AXE.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#151000 - Hale-Bopp - Sat Feb 16, 2008 8:15 pm

Wow, this is really addicting. I started playing, then my wife grabbed my DS from me and wouldn't give it back. Then I had to take it from her so I could play some more. Ummm, yeah.

It would be awesome if someone continued to build on this with more music, instruments, graphical enhancements, etc. etc.

#174178 - tepples - Sat May 22, 2010 5:06 pm

Someone called me on the telephone and asked me to compile a version of this but with the backing beat silenced. He kept me on the phone for 45 minutes explaining why the chiptune scene needs to have a version of AXE without a backing beat. It would take exactly one line of code change to do this (comment out the call to runSound()), but the problem is that AXE is coded against a years-old version of libnds from back when it was still using IPC transfers, and when I try to compile it against the version of libnds on devkitPro Updater, I get a bunch of errors related to TransferRegion. I know exactly what is happening, but I've been out of the DS scene for years, so I don't know the official new way to play sounds. What's the quickest way to get this recompiled without having to completely rewrite the whole thing from the ground up?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#174180 - dvelop - Sat May 22, 2010 5:45 pm

The_Mayor87 worked on a version without the backing beat. where is it now? anyway lets bring this piece back to life.

http://www.youtube.com/watch?v=1ewMNgiTQ30


http://www.youtube.com/watch?v=TgTjZMrp8S8

#174182 - elhobbs - Sat May 22, 2010 6:21 pm

tepples wrote:
What's the quickest way to get this recompiled without having to completely rewrite the whole thing from the ground up?
the amount of effort required probably depends on how much you used fifo. playing a sound requires a call to soundPlaySample. you need to enable sound first (one time in main would work) with soundEnable(). all of this uses the fifo api in libnds. irq and fifo handlers do not need to be initialized anymore crt handles this now on the arm9.

#174189 - The_Mayor87 - Sat May 22, 2010 8:58 pm

dvelop wrote:
The_Mayor87 worked on a version without the backing beat. where is it now? anyway lets bring this piece back to life.

http://www.youtube.com/watch?v=1ewMNgiTQ30


http://www.youtube.com/watch?v=TgTjZMrp8S8


Oh wow, this was a while ago. I've been away from the scene for some time. I don't have any of the code, but if I recall the only thing I did was comment out some code and recompile. tepples did all the work.

#174190 - dvelop - Sat May 22, 2010 9:43 pm

oh i thought you took out the backbeat? and if so can you just help us do that again, t says his new dev kit wont let him, so if you have the old dev it might work.

Last edited by dvelop on Sat May 22, 2010 9:46 pm; edited 1 time in total

#174191 - dvelop - Sat May 22, 2010 9:45 pm

okay here is what should be done..
whether by T, you, me or others. but this program is to good to not develop further.
at the minimum we need a new version with the ability to turn on and off the backing track.

here is the link to the last version, plus source.

http://www.pineight.com/ds/AXE_0.03.zip

Update axe to allow for easy coding updates and ability to still work on DS along with other newer mediums, create a new logo/splash screen for top screen, create/edit logo so it doesn't show homebrew logo. Add a player/save/song load ability, add ability to not play background loop, ability too change background loop, and samples to draw with, change scales, tempo, add a record ability of what you are writing, Add microphone record option so you can record your voice, and then instantly draw with it. If these things can be done it will be the sickest program ever. I am in the process of learning what I can to make this happen, but will need help along the way.


these homebrews have a lot of the code we will need.
http://sites.google.com/site/gorgull/home2

http://ndscomposer.blogspot.com/

#174225 - tepples - Mon May 24, 2010 5:42 pm

elhobbs wrote:
playing a sound requires a call to soundPlaySample

It does not use samples; instead, it uses the tone generator on channels 8, 9, and 14. Where is a manual for soundPlaySample that isn't taken down by "a major hardware failure on the server"?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#174228 - headspin - Tue May 25, 2010 12:19 am

Hi tepples! Just check out the examples in devkitARM. All communication between ARM7/ARM9 is now handled using FIFO and you only need to compile for the ARM9 side now.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#174230 - elhobbs - Tue May 25, 2010 1:07 am

tepples wrote:
elhobbs wrote:
playing a sound requires a call to soundPlaySample

It does not use samples; instead, it uses the tone generator on channels 8, 9, and 14. Where is a manual for soundPlaySample that isn't taken down by "a major hardware failure on the server"?
www.devkitpro.org is down but everything is on the sourceforge page http://sourceforge.net/projects/devkitpro/files/. I think all of the docs are auto generated from the comments in the header files. so, the header files are usually all I look at.

#174239 - dvelop - Tue May 25, 2010 11:45 am

there is also another thread at this site trying to make this reality.

http://gbatemp.net/t94515-axe-ds-expansion-update?st=15&gopid=2860230&#entry2860230