Accueil Ti-Gen Foire Aux Questions Chat sur le chan #tigcc sur IRC
Liste des membres Rechercher Aide
Bienvenue Invité !   Se connecter             Mes sujets   
Administrer
0 membre(s) et 1 visiteur(s) actif(s) durant les 5 dernières minutes Utilisateurs actifs : Aucun membre + 1 visiteur
Avant de poster sur le forum, il y a des régles de bases à respecter pour une bonne entente et un respect de tous.
Veuillez lire la charte du forum.
  :: Index » Forum Ti68K » Questions » Jeux compatibles Titanium (119 réponse(s))
./REPRISE DU POST PRECEDENT (post n°114)   Marquer comme non lu.
Kevin Kofler Ecrit le: Dimanche 31 octobre 2004 à 22:12 Déconnecté(e)    Voir le profil de Kevin Kofler Envoyer un email à Kevin Kofler Visiter le site WEB de Kevin Kofler Envoyer un message privé à Kevin Kofler  


Voilà! Le transfert fonctionne enfin!

La documentation actuelle:
unsigned char DetectLinkInterface(void); (0x8d2572)
Detects if the USB link is usable. Returns 1 (USB preferred) if it is and 2
(legacy DBus IO preferred) if it isn't. This routine uses DetectUSB first,
and then runs a complex test transfer to double-check. This test transfer
needs to be handled on the receiving side as well, so it is usually easier
to just use DetectUSB.

short DetectUSB(void); (0x94a174)
Quickly detects if the USB link is usable. Returns 0 if USB is available,
or a non-zero error code if it isn't.

unsigned char DetectReceiveInterface(short allowLIO); (0x8d25a4)
Waits for a calculator to connect on either the USB or the LIO interface.
Returns:
* 0 if something is detected on the USB link.
* 2 if allowLIO is non-zero, nothing is detected on the USB link and
  something is detected on the LIO link.
* 3 if interrupted by the user ([ON] key).
If you want to wait for something to be received on the USB link,
DetectReceiveInterface(FALSE) is the function to use, but there's a catch:
only one calculator can use DetectReceiveInterface for each transfer. (USB is
a host/client protocol.) You absolutely MUST call USBReset on both calculators
before using DetectReceiveInterface on the other calculator. This is very much
unlike the LIO interface, which is peer-to-peer. Also, the other calculator
MUST call DetectUSB to synchronize with a DetectReceiveInterface call. To sum
up, for a transfer which is synchronized by the sender (such as a move in a
turn-based game), the sending calculator should call: USBLinkClose();
USBLinkReset(); DetectUSB(); USB_SendData(src,size,2000);, the receiving
calculator should call: USBLinkClose(); USBLinkReset();
DetectReceiveInterface(FALSE); USB_RecvData(src,size,2000);.

short USB_SendData(const void *buffer, size_t size, long timeout); (0x949b86)
Sends size bytes from buffer over the USB link. For "timeout", try 2000. (I
am not sure this is actually a timeout. AMS always uses 2000, so you should
do the same.) Returns 0 if successful, some non-0 error code otherwise.

short USB_RecvData(void *buffer, size_t size, long timeout); (0x949c7e)
Receives size bytes into buffer from the USB link. For "timeout", try 2000. (I
am not sure this is actually a timeout. AMS always uses 2000, so you should
do the same.) Returns 0 if successful, some non-0 error code otherwise.

short USBLinkClose(void); (0x949c6a)
This function is used by AMS to finalize a file transfer.
Returns 0 if successful, some non-0 error code otherwise.

void USBLinkReset(void); (0x94a284)
This function closes and resets the USB link. It is used by AMS when done with
an USB transfer, and sometimes also before initiating one. You should always
call this function when done with a transfer.


Les déclarations actuelles:
#define XR_stringPtr_addr (_rom_call_addr(293))
#define IsSupportedAMS300() (*(long long*)(XR_stringPtr_addr-116)==0x76021003261f4e75ll)
#define DetectLinkInterface ((unsigned char(*)(void))(XR_stringPtr_addr-158))
#define DetectReceiveInterface ((unsigned char(*)(short))(XR_stringPtr_addr-108))
#define DetectUSB (*(short(**)(void))(DetectLinkInterface+4))
#define USB_SendData ((short (*)(const void *, size_t, long))(DetectUSB-1518))
#define USB_RecvData ((short (*)(void *, size_t, long))(DetectUSB-1270))
#define USBLinkClose ((short(*)(void))(DetectUSB-1290))
#define USBLinkReset (*(void(**)(void))(DetectLinkInterface+36))


Je vais sortir une bêta publique de Backgammon avec USB.

EDIT : smileys
-Edité le Dimanche 31 octobre 2004 à 22:17 par serioussam-
Membre de l'équipe de TIGCC: http://tigcc.ticalc.org
Mainteneur du portage Linux/Unix de TIGCC: http://tigcc.ticalc.org/linux/
Membre de l'équipe de CalcForge: http://www.calcforge.org:70/

Participez à la reprise de Ti-Gen!
    
./Post n°115   Marquer comme non lu.
Kevin Kofler Ecrit le: Dimanche 31 octobre 2004 à 22:34 Déconnecté(e)    Voir le profil de Kevin Kofler Envoyer un email à Kevin Kofler Visiter le site WEB de Kevin Kofler Envoyer un message privé à Kevin Kofler  


index.php?action=sujet&forum=5&cat=20&topic=1402&page=1
Membre de l'équipe de TIGCC: http://tigcc.ticalc.org
Mainteneur du portage Linux/Unix de TIGCC: http://tigcc.ticalc.org/linux/
Membre de l'équipe de CalcForge: http://www.calcforge.org:70/

Participez à la reprise de Ti-Gen!
    
./Post n°116   Marquer comme non lu.
ExtendeD Ecrit le: Lundi 1er novembre 2004 à 01:13 Déconnecté(e)    Voir le profil de ExtendeD Envoyer un email à ExtendeD Envoyer un message privé à ExtendeD  

Kevin, as-tu reçu mon package ?
    
./Post n°117   Marquer comme non lu.
Kevin Kofler Ecrit le: Lundi 1er novembre 2004 à 01:17 Déconnecté(e)    Voir le profil de Kevin Kofler Envoyer un email à Kevin Kofler Visiter le site WEB de Kevin Kofler Envoyer un message privé à Kevin Kofler  


Oui.
J'y ai jeté un coup d'?il, mais ça ne m'a pas fait avancer beaucoup en fait. Tu as fait un boulot de titan pour convertir tout le code en C, mais sans savoir ce que font ces ports, tout cela ne nous avance pas beaucoup. :( Quand tu m'as envoyé le truc, j'avais déjà une version de Backgammon qui marchait presque depuis quelques semaines, il manquait juste un USBReset(); à l'endroit judicieux.
Membre de l'équipe de TIGCC: http://tigcc.ticalc.org
Mainteneur du portage Linux/Unix de TIGCC: http://tigcc.ticalc.org/linux/
Membre de l'équipe de CalcForge: http://www.calcforge.org:70/

Participez à la reprise de Ti-Gen!
    
./Post n°118   Marquer comme non lu.
limmt Ecrit le: Lundi 1er novembre 2004 à 07:34 Déconnecté(e)    Voir le profil de limmt Envoyer un email à limmt Visiter le site WEB de limmt Envoyer un message privé à limmt  


et le header usb.h dans TIGCC c'est pour quand? :)
http://www.falco-fr.com/ - http://www.jump67.com/ - http://www.msf-league.com/
    
./Post n°119   Marquer comme non lu.
Kevin Kofler Ecrit le: Lundi 1er novembre 2004 à 08:14 Déconnecté(e)    Voir le profil de Kevin Kofler Envoyer un email à Kevin Kofler Visiter le site WEB de Kevin Kofler Envoyer un message privé à Kevin Kofler  


0.96 au plus tôt. Et les hacks utilisés actuellement pour récupérer les adresses des routines ne sont pas assez fiables pour les AMS futurs pour être utilisables dans TIGCC.
Membre de l'équipe de TIGCC: http://tigcc.ticalc.org
Mainteneur du portage Linux/Unix de TIGCC: http://tigcc.ticalc.org/linux/
Membre de l'équipe de CalcForge: http://www.calcforge.org:70/

Participez à la reprise de Ti-Gen!
    
  :: Index » Forum Ti68K » Questions » Jeux compatibles Titanium (119 réponse(s))
Pages : 7/7     « 1 2 3 4 5 6 [7] » »|

.Répondre à ce sujet
Les boutons de code
[B]old[I]talic[U]nderline[S]trikethrough[L]ine Flip Hori[Z]ontallyFlip [V]erticallySha[D]ow[G]low[S]poilerCode [G][C]ite
Bullet [L]istList Item [K] Link [H][E]mail[P]icture SmileysHelp
Couleurs :
Saisissez votre message
Activer les smileys
     

Forum de Ti-Gen v3.0 Copyright ©2004 by Geoffrey ANNEHEIM
Webmaster: Kevin KOFLER, Content Admins: list, Server Admins: Tyler CASSIDY and Kevin KOFLER, DNS Admin: squalyl
Page générée en 47.59ms avec 18 requetes