#162728 - cualquiercosa327 - Thu Sep 11, 2008 12:39 pm
Hello to all.I am begining a proyect and any help would be good.
I am going to add extra functions to ds pad.My intention is add suport to extra-cartidges
as :
-Wario ware twisted cartidge
-Yoshy tupsy cartidge
-GH
-Paddle controler
-Slider controler
-Ds motion cartidge
-use ds as multitouch
Here are the main ideas:
1)Use as normal pad,similar as dspad do,but allowing use the extra cards.It would be interesting it be full compatible with the other proyect/servers (dskey..) ,and programs as glovepie.Also use as mouse,keyboard
2) An library for easily creation of pc games,and/or ds-games using this devices.
(examples would be the game balance which can be moved with dsmotion.Or the
Kirby Tilt 'n' Tumble 2 ).Also it could be used on wii and other consoles with wifi.
3)Patching ds games with ar codes ( creating the asm code and using kenobi's asmtoar tool)
a)Using ar codes for use this devices on ds games.They are a codes for dsmotion,
and it would be interesting create for all devices.It need arm asm programer,i have a code for wario ware sensor,but i was not able to make it run :(
b)Maybe,i am not sure of it,using the "client" part of dspad and create an ar code,
for use the same controler for ds game and pc game as example.Yes it is a crazy idea,play the same game in emulator and ds,and using the same controler.
It is not usefull but curious.
I am studing ds pad sources and i hope soon having the wario cartidge working with it.
----------------------------------------------------------------------------------
Hola a todos,me gustaria comentar un proyecto que tengo entre manos.Cualquier
ayuda sera bienvenida.
Quiero expandir el fabuloso dspad y a?adir soporte para cartuchos externos como:
-Wario ware twisted cartidge
-Yoshy tupsy cartidge
-GH
-Paddle controler
-Slider controler
-Ds motion cartidge
-Usar la ds como multitactil
Aqui expongo las ideas:
1)Usar como un pad normal,en cualquier sistema operativo,como lo hace dspad,pero permitiendo el uso de los cartuchos externos.Seria interesante hacerlo plenamente compatible con los otros proyectos como dskey,y programas como glovepie.
Tambien a?adir la funcionalidad de raton y teclado
2)Crear una biblioteca para usar las funciones de este facilmente y poder crear juegos de la ds y pc (y otras plataformas) que usen estos dispositivos facilmente.
Como ejemplos esta el juego Balance,q permite el control con la ds y un dsmotion
o el fallecido Kirby Tilt 'n' Tumble 2 .
3)Permitir el uso de estos dispositivos con los juegos de la ds.Para ello se parchean con el action replay.Existen codigos para el dsmotion,y seria interesante a?adirlo
para el resto de dispositivos.
Para esta parte se necesita programadores en asm,que se compilaria con el programa creado por kenobi,no es mucho codigo pero si complicado,o al menos para mi,estuve haciendo pruebas para hacer funcionar
el cartucho del wario ware pero no lo logre ,debido a mi poco conocimiento de ensamblador.
Puede,de esta parte no estoy seguro q funcione,usar la parte de "cliente" de dspad y crear un action replay para permitir jugar a dos juegos con el mismo control,por ejemplo un mismo juego en un emulador en pc y en la ds.
Se q esta parte no es util,pero algo curioso.
Estoy estudiando las fuentes de dspad y espero tener pronto el cartucho del wario ware funcionando.
#162729 - cualquiercosa327 - Thu Sep 11, 2008 12:48 pm
Slider Controller info
http://wiki.t.cardboardbox.org.uk/doku.php?id=coding:magukiddo
http://forum.gbadev.org/viewtopic.php?t=14627
Wireles multiboot (puede ser util /maybe be usefull)
http://forum.gbadev.org/viewtopic.php?t=11946
AR CODES
http://forum.gbadev.org/viewtopic.php?t=14603&postdays=0&postorder=asc&start=0
http://www.kodewerx.net/forum/viewtopic.php?f=11&t=4784
Here is an AR code that will autopatch the game when pressing Start+Select once (it'll replace all 0x04000130 with 0x02000000). Takes like 3~4 seconds to patch all the ram (0x02000000-0x02400000, by scanning 0x40 blocks of 0x00010000), and it lags the game a bit during that time :
source :
Code:
push {r0-r7}
ldr r0,values
ldrh r1,data
ldr r2,values+4
ldrh r3,data+2
cmp r1,#0
ldreqh r4,[r0]
tsteq r4,#4
tsteq r4,#8
cmpeq r1,#0
moveq r1,#1
streq r1,data
cmp r1,#1
bne end
mov r4,#0x02000000
add r5,r4,r3,lsl #0x10
add r3,#0x1
strh r3,data+2
add r6,r4,r3,lsl #0x10
loop:
ldr r7,[r5],#4
cmp r7,r0
streq r4,[r5,#-4]
cmp r5,r6
blt loop
cmp r3,#0x40
moveq r3,#0
streq r3,data
streq r3,data+2
end:
pop {r0-r7}
bx r14
values:
.word 0x04000130
.word 0x02400000
data:
.word 0x00000000
Compiled AR code :
Code:
023FE074 012FFF11
E0000000 00000084
E92D00FF E59F006C
E1DF17B0 E59F2068
E1DF36BA E3510000
01D040B0 03140004
03140008 03510000
03A01001 058F104C
E3510001 1A00000D
E3A04402 E0845803
E2833001 E1CF33B6
E0846803 E4957004
E1570000 05054004
E1550006 BAFFFFFA
E3530040 03A03000
058F3010 058F300E
E8BD00FF E12FFF1E
04000130 02400000
00000000 00000000
023FE074 E3520003
(tested on the hardware and working)
Then, this code should take care of reading the pad and the accelerator, and "join" them together :
source:
Code:
push {r0-r5}
mov r5,#0x04000000
ldr r5,[r5,#0x130]
ldrh r1,counter
add r1,r1,#1
strh r1,counter
mov r2,#0x0A000000
mov r3,#0x02000000
mov r4,#2
tst r1,#2
addne r4,#2
tst r1,#1
ldrneb r0,[r2]
ldreqb r1,[r2,r4]
beq end
tst r1,#2
bne Y
cmp r0,#0x71
biclt r5,#0x010
cmp r0,#0x8f
bicgt r5,#0x020
strh r5,counter+2
b end
Y:
ldrh r5,counter+2
cmp r0,#0x71
biclt r5,#0x040
cmp r0,#0x8f
bicgt r5,#0x080
strh r5,[r3]
end:
pop {r0-r5}
bx r14
counter:
.word 0x00000000
Compiled AR code :
Code:
023FE074 012FFF11
E0000000 00000080
E92D003F E3A05301
E5955130 E1DF16B8
E2811001 E1CF16B0
E3A0240A E3A03402
E3A04002 E3110002
12844002 E3110001
15D20000 07D21004
0A00000D E3110002
1A000005 E3500071
B3C55010 E350008F
C3C55020 E1CF52B2
EA000005 E1DF51BA
E3500071 B3C55040
E350008F C3C55080
E1C350B0 E8BD003F
E12FFF1E 00000000
023FE074 E3520003
(tested on the hardware and working).
(by hardware I mean DS+Trainer Toolkit).
The patcher should be a good think, because some games load some new routines in their memories, and that way the user should always be able to patch them if the accelerator suddently stops working (for exemple, when you enter a minigame, a special level, or things like that). Its danger is that some of the patched 0x04000130 could actually be some in-game values, or could used to access other registers...
As I said, the accelerator detection code is "unoptimized", and actually could look really bad to some eyes (sorry). However it was just a shortly wrotten "test code", to verify that everything is working fine.
For the 0x04000130, I guess one could also search for 0x027FFFA8 (that holds a copy of the DS buttons - ie. X/Y/Debug/Fold) near the 0x04000130 (until now I've only seen +/- 8 bits near 0x04000130), but I'm not certain that it'll be compatible with everything (ie. I'm not certain that all "parts" (="minigames") of all have it)).
The other way would be to scan for an opcode that reads the address where the 0x04000130 is stored, but that would make the patcher much more complicated, much more slow, and also that would bring an ARM/THUMB problem.
For particular cases, I guess a "manual" patcher code would have to be made and used instead of the automated patcher...
(would look like that for MKDS :
Code:
52043A90 04000130
02043A90 02000010
D2000000 00000000
)
And about the "all or nothing" yep, I guess a lot of things can be done to improve that. The counter is a good idea. I'm thinking of something like (if value>0x7f) do ((0xFF-value)>>8) (>>8 so we have 8 steps of acceleration), increment that until the value is >=0x1F (or whatever value between 0xF and 0x1F), and update the movement at that time. This is just an exemple of course, some tests/tweakings must be made on the real hardware.
Small question : I guess the values range from 0x00 to 0xFF, right (in that case, someone directing the accelerator to a full top/right would reach the values 0xFF/0xFF for X/Y ?).
Also, what about that Z acceleration ? (read from 0x0A000006 to get it? Also setting it to a jump buton sounds nice, however that would mean the code would be different for each game).
Finaly, you said a short time is needed between reading the 2/4 registers, and actually getting the value from the 0 one. Like... 10 ticks ? 20 ticks ? I mean, I bet having both X and Y "at the same time" would improve the movement/reaction.
Edit :
For Nitrohax, you should follow this :
chishm wrote:
ASM codes are supported, but you need to use the correct code type. Use C2000000 0000xxxx (where xx is the length of the ASM code in bytes) instead of 023FE074 012FFF11 E0000000 0000xxxx and remove 023FE074 E3520003 from the end of the code.
ie (untested) :
Code:
C2000000 00000084
E92D00FF E59F006C
E1DF17B0 E59F2068
...
04000130 02400000
00000000 00000000[code]
and
[code]C2000000 00000080
E92D003F E3A05301
E5955130 E1DF16B8...
E1C350B0 E8BD003F
E12FFF1E 00000000
#162738 - moshii - Thu Sep 11, 2008 5:24 pm
I don't mind helping with the slide controller.. I haven't touched it for a while but I sort of remember how it works. The last poster linked it, but this is my page where I wrote how it works http://wiki.cardboardbox.org.uk/doku.php?id=coding:magukiddo
The code there should compile still even if it isn't all that good. But hopefully you should be able to work out how to control the serial bus between the mouse controller and the ds, and supply a workable clock to the mouse controller. Once you have that going you can read the datasheet and use the commands there to get the data you want. The slide controller can take small (8x8 or 16x16 I think) photos,.. would be interesting if it could be used to trace lines or something.
Anyone work out the camera yet?
#162742 - cualquiercosa327 - Thu Sep 11, 2008 6:49 pm
I did not know it has a little cam.my slide controler will arrive soon,in a week,more or less.
Yes,it would be interesting use it also.
Speaking of cam,I have seing the camera of Otona no DS: Face Training,and it would opening ds homebrew to new levels (imagine a kind of levelhead
http://julianoliver.com/levelhead on the portable),or games as eyetoys,or virtual heads moving imiting you....
Info is also welcome,altough it is difficult implement it on this proyect.
I hope upload the sources of dspad i am using this night .It compiles ok but i have to coment
the sound part (it is not a important part for begining no? )
-------------------
No sabia que el slide controler tenia una minicamara,mi slide controler llegara pronto,en una semana mas o menos,y podre probarla .
Si,seria interesante usarla
Hablando de camaras,he estado viendo el juego Otona no DS: Face Training,y seria
una puerta a nuevaz aplicaciones del homebrew de la ds (imagina un juego del estilo levelhead en la portable, juegos-minijuegos al estilo eyetoy,o una mascota virtual,o esos modelos q se mueven segun mueves la camara...
Informacion sobre esta camara sera tambien bienvenida,aunque creo q seria dificil implementarlo en este proyecto.
A lot of thanks moshii
#162762 - cualquiercosa327 - Fri Sep 12, 2008 3:50 pm
hello,i only wanna said i have trying conection with the other servers author and glovepie,for help us to add the extrafuntionality.
The main idea is make dspad client better but also we wanna a server which suport,and make it compatible with the most program/operating system posible
#162786 - cualquiercosa327 - Fri Sep 12, 2008 10:17 pm
Hi to all,i would like coment the new about the proyect,
the autor of http://dsrevolution.es/ ,Adry Perez
has ofreced to host the proyect and ftp.we will chat tomorrow about it.
I also contact with glovepie autor and he is reading the sources of server part.And i am waiting for ds2key autor answer.
I have almost think the gui part for extra addon,and i hope having more time to go on with wario ware part.
#162803 - cualquiercosa327 - Sat Sep 13, 2008 10:35 am
hello,i would like some news about it.it seems they are more people interesting in help us.
The author of Ds2key ,sypherce,has answer me ,and he is interesting
in help.The bad news he lost his sources,but he would help us.
And glove pie author is reading some info i send .
This about server part.
In the client,here are my main ideas :
(the program is perfect and only need add some functionalityes)
(i think in the background it would be funny a pic of the cartidge/game in the submenu
submenu:ADDONS
*Wario ware
If you press it asked you insert the cartidge and it calibrate.When finish if all is ok,it rumble.
*Yoshi
Ask user to calibrate (set the left and right top)
*Multitouch
Similar to the demo available,it asked user to calibrate (most job is done in the demo available.
*Slide controler
It can be used as a mouse.(i like it a lot)
I think also we should put a sprite moving in the touchscreen.
And maybe mix the touchscreen and slidecontoler,as two diferent mouse.
*DS motion pak/card,..
Said the user to put on a table to calibrate.
(we can use this someways :
as a wiimote
Simulating a analog control
As a wheel..
giving the x,y,z accel and z rotation.)
*Paddle controler
I have not it yet,and i have not idea how works.
*Guitar Hero
It show a beautifull pic ,and sound
(and let us use 4 news buttom)
*RUMBLE
(it activate the rumble option,i need more info about rumble devices of ds.can be activate with some similar to Wiibrator script:
example.
wiimote.Rumble = 1
But some cartidges as 3 in 1,allow us set low,medium or high.we can add it )
(rumble if it is ok)
*3 in 1
*wario
*slide controler
*driz dill (i have not info about this)
I hope more ideas,what change on it,...
Thanks
Last edited by cualquiercosa327 on Mon Sep 15, 2008 1:52 pm; edited 1 time in total
#162875 - cualquiercosa327 - Mon Sep 15, 2008 12:22 pm
moshii wrote: |
I don't mind helping with the slide controller.. I haven't touched it for a while but I sort of remember how it works. The last poster linked it, but this is my page where I wrote how it works http://wiki.cardboardbox.org.uk/doku.php?id=coding:magukiddo
The code there should compile still even if it isn't all that good. But hopefully you should be able to work out how to control the serial bus between the mouse controller and the ds, and supply a workable clock to the mouse controller. Once you have that going you can read the datasheet and use the commands there to get the data you want. The slide controller can take small (8x8 or 16x16 I think) photos,.. would be interesting if it could be used to trace lines or something.
Anyone work out the camera yet? |
hello,i have just received my slider controler,and it is a very interesting device.
The game is curious ( i only play a little) but i like a lot the device.It would be other way of move,similar in concept to touchscreen (not the same,but i am imagining move mario or zelda as example with it)
i tried to compile your code but i have an error in
uint16 *pa_a19=GBA_BUS + MASK_READ;
change for it,and it works
uint16 *p_a19 = (uint16*)(GBA_BUS + MASK_READ);
***It doesnt work.I write this without test it more than loading.After posting i press A and the program crash.
And also it happend something curious,after crash i put again the game and it doesnt rumble.I imagine it has a memory .
I reload the demo and not press anything.
I power off the console ,put again the game and it works now
Other thing,i dont know where is the cam it has.
#162915 - cualquiercosa327 - Tue Sep 16, 2008 11:00 am
Hello,to all.
i would coment yesterday sypherce did a great job ,reimplementing some parts of client and server.we decided create if of zero better than use
dspad compatibility mode (the dspad server is worse and less flexibe)
and user some ideas of dspad client gui
#162928 - cualquiercosa327 - Tue Sep 16, 2008 4:05 pm
hello i would ask help for testing some demos on nds.
we need some tester for
-Wario ware jap cartidge.
-yoshi jap cartidge.
-Ds motion card
-nitro
-R6 ( is it what has motion?? )
-Paddle controler ( it is out of stock,i am waiting to sell again)
thanks
#163360 - cualquiercosa327 - Tue Sep 30, 2008 5:49 pm
Hello,the code of slide controler works,but you MUST use -o0 on makefile.
if you used other ,the program will crash,and you will lost the rumble (you need load other gba game,i tried with wario ware twisted cartidge) and when i load the game again ,the rumble would works again)
#163368 - tepples - Tue Sep 30, 2008 8:05 pm
In a lot of cases, needing to use -O0 means that someone forgot a volatile on some memory-mapped register.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#163373 - cualquiercosa327 - Tue Sep 30, 2008 10:43 pm
thanks tepples,i had add volatile on some variables ,also.I will
read again the code and add more.