DS UNIVERSAL PAD

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.





----------------------------------------------------------------------------------

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.










-----------------------------------------------------------------------------------------

MAS INFO


Slider Controller info

http://wiki.t.cardboardbox.org.uk/doku. ... :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 ... sc&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
Muy buena idea...pero yo solo miro xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
Yo soy mas de hacer un cambio "Fisico" al hardware de la NDS (para no andar metiendo codigos y/o parchando tanta cosa..
¿Que no seria mas viable y practico a la larga hacer un control/adaptador que entre en el slot de GBA? (como el paddle del arkanoid) imaginense conectar el viejo control de SNES en la NDS o el de la PSX (en teoria seria factible dicho accesorio) igual puedes aplicar la infor de este aparatito aunque soñar es gratis..(este "accesorio" funciona con cualquier control) asi que no desperdiciaras ningun slot..
http://mash-mods.com/products/Tilt%20Co ... p/tiltchip
Lo del cambio fisico es aun mas complejo.Pero si alguien se anima y lo logra ,puede añadirse al proyecto.
Cualquier idea es bienvenida.
Lo de los codigos son trucos AR,igual q los q se usan para trucar los juegos,por lo que no me parece que sea tanto lio (comparado
con crear un nuevo hardware).
Si,conocia ese aparato,pero no le vi utilidad,ya que eso mismo se puede hacer via software (al menos en los juegos de ds),que es lo que hace el ar para el ds,
cambia las teclas del d-pad por los sensores.
Tambien se podria hacer que cambiara la tecla R por la A,por ejemplo.Y sin necesidad de mas aparatos.
La idea es un mando universal,y que el usuario pueda usar si lo desea cualquier ampliacion como las mencionadas.
Y ya puestos a soñar,Dr Katts ,por que conformarse con un mando de la nes o psx,yo añadiria mi nunchaku :p
Perdon por la ignorancia, dspad es un componente o es el nombre del proyecto?

Ah, me lo he vuelto a reeler y ya he entendido que es.
hello i would ask help for testing some demos on nds.
Because it ,we need some tester with
-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


-----------------------------

Hola me gustaria pedir ayuda.Necesitamos gente para probar las demos y betas.

-Wario ware japones.
-yoshi cartidge japones
-Ds motion card
-nitro
-R6 ( is it what has motion?? )
-Paddle controler


gracias
5 respuestas