Page 1 of 2

fichier TAP créé par osk qui bloque

Posted: Sat Jan 25, 2014 1:27 pm
by maximus
désolé mais l'anglais, je peux plus :P

http://forums.oric.org/t59-programmation-basic

d'avance merci

Re: fichier TAP créé par osk qui bloque

Posted: Sat Jan 25, 2014 1:49 pm
by Dbug
Peut tu poster (attachement) le fichier .txt et le fichier .tap?

Re: fichier TAP créé par osk qui bloque

Posted: Sat Jan 25, 2014 2:04 pm
by maximus
les voilou , j'ai du faire un zip, il refuse d'uploader les ficher txt :?



Edit: pour info et sur les conseils de Domi j'ai essayé sous Euphoric et tout fonctionne, j'ai fait 3 essais, aucun souci

Re: fichier TAP créé par osk qui bloque

Posted: Sat Jan 25, 2014 10:49 pm
by maximus
Dbug: j'ai fait 50 essais, ils marchent tous sous Euphoric, et aucun avec Oricutron :?

Re: fichier TAP créé par osk qui bloque

Posted: Sun Jan 26, 2014 4:25 pm
by Dbug
Il faudrait poker Xeron: Si je rajoute des zeros a la fin du fichier ca charge bien.
Donc l'erreur est soit dans tap2bas, soit dans Oricutron.

Sinon pour la beta: Poker les valeurs en #A000 c'est violent :p

Re: fichier TAP créé par osk qui bloque

Posted: Sun Jan 26, 2014 4:49 pm
by maximus
Dbug wrote:Il faudrait poker Xeron: Si je rajoute des zeros a la fin du fichier ca charge bien.
Donc l'erreur est soit dans tap2bas, soit dans Oricutron.

Si tu le dis :D
Dbug wrote:Sinon pour la beta: Poker les valeurs en #A000 c'est violent :p
Je repompe le code de tyrann sans comprendre la partie mémoire: Poke, ...

je vais essayer de faire du Basic 100% pas d'assembleur ou quoi que ce soit qui me dépasse :mrgreen:

a l'origine il y a un petit programme de création de l'équipe puis le jeu se charge, mais on doit pouvoir tout mettre dans 1 programme unique. Sinon pour ma compréhension, il passe comment l'équipe du programme 1 aux suivants ? il utilise des poke pour stocker les noms, castes, ... ?

je comprends que c'est là dedans, c'est le code de Tyrann

Code: Select all

2000 REM ######## CARACTERISTIQUES ############
2100 POKE#A000,0
2110 O1=#A000
2120 FORL=1TO6
2130 O1=O1+1:POKEO1,LEN(N$(L))
2140 FORJ=1TOLEN(N$(L))
2150 O1=O1+1:POKEO1,ASC(MID$(N$(L),J,1))
2160 NEXTJ
2170 O1=O1+1:DOKEO1,INT(RI(L)/10):O1=O1+2
2180 DOKEO1,1:O1=O1+2
2190 IFC$(L)=GU$THENPOKEO1,1:GOTO2300
2200 IFC$(L)=MA$THENPOKEO1,2:GOTO2300
2210 IFC$(L)=VO$THENPOKEO1,3:GOTO2300
2220 IFC$(L)=DR$THENPOKEO1,4
2300 O1=O1+1:POKEO1,PV(L)
2310 O1=O1+1:POKEO1,ET(L)
2320 O1=O1+1:POKEO1,OK(L)
2330 O1=O1+1:POKEO1,NI(L)
2340 O1=O1+1:POKEO1,FO(L)
2350 O1=O1+1:POKEO1,QI(L)
2360 O1=O1+1:POKEO1,VI(L)
2370 O1=O1+1:POKEO1,AG(L)
2380 O1=O1+1:POKEO1,AR(L)
2390 O1=O1+1:POKEO1,CA(L)+10:O1=O1+24
2400 NEXTL
2500 CLS:PRINT:PRINT:PRINT:PRINT"VOTRE EQUIPE EST PRETE"
2510 PRINT:PRINT"ELLE EST DANS LA COUR"
2520 PRINT:PRINT"DE 'WINTERFELL'..."
2530 WAIT300
2550 N=INT(PEEK(#A000)*4/5)+1:IFN>7THENN=7
2600 REM CLOAD"TYRA3.tap"
2900 END

Re: fichier TAP créé par osk qui bloque

Posted: Sun Jan 26, 2014 6:26 pm
by Dbug
Soit juste conscient que si tu décide d'afficher un truc en HIRES ca va tout effacer :p

Re: fichier TAP créé par osk qui bloque

Posted: Sat Feb 01, 2014 9:35 pm
by maximus
2 choses:

- mes fichiers TAP ne fonctionnent toujours pas sous Oricutron :cry: (my files doesnt work under Oricutron)

- j'utilise intensément OSDK (bas2tap) avec le bloc notes comme éditeur et JE ME REGALE ! :D
i'm using intensively OSDK with the notepad as editor and i really ENJOY

Merci DBUG :wink:

Re: fichier TAP créé par osk qui bloque

Posted: Mon May 05, 2014 2:11 pm
by Hialmar
I had this same problem today.

However, if you create a sedorik disk from the program it works okay in Oricutron.

You just need to do:
%OSDK%\bin\bas2tap -b2t1 combat.bas BUILD\combat.tap
%OSDK%\bin\tap2dsk BUILD/COMBAT.TAP combat.dsk
%OSDK%\bin\old2mfm combat.dsk

You can put the two last commands in your osdk_build.bat.

And then you can load your combat.dsk in Oricutron.

The only problem is that bas2tap doesn't give a name to the program and therefore tap2dsk names it NONAME000.COM so you'd better rename it with :
REN "NONAME000.COM" TO "COMBAT.COM"
After booting the disk under Sedoric of course.

Re: fichier TAP créé par osk qui bloque

Posted: Tue May 06, 2014 11:14 pm
by christian
Hello,

I had the same issue with my own bin2tap tools: tap files ok with Euphoric but Oricutron never stop reading the file.
I modified my tools to add a dummy byte at the end of the file, and now both Euphoric and Oricutron can read the tap file.

========

Bonsoir,

J'ai eu le même problème avec mon utilitaire de création de fichier .tap: aucun soucis avec Euphoric mais Oricutron n'arrête jamais la lecture du fichier.
En fait, il semble qu'il faille ajouter un octet supplémentaite à la fin du fichier pour que tout rentre dans l'ordre.
Je ne sais pas pourquoi Euphoric et Oricutron réagissent de manière différente.

Re: fichier TAP créé par osk qui bloque

Posted: Wed May 07, 2014 8:52 am
by Hialmar
Interesting to know thanks.

I will try to correct this either in oricutron and/or propose a patch for bas2tap.

Anyway, I wish to add an option to bas2tap in order to be able to name the tapes.

Re: fichier TAP créé par osk qui bloque

Posted: Thu May 08, 2014 11:16 am
by Hialmar
When you said to add a dummy byte at the end, you meant at the end of the header right ?

I tried to add a dummy byte at the end of the file and it didn't work.

I think I have solved the problem with bas2tap and oricutron by adding a file name to the .tap.

-----

Quand tu parles de rajouter un octet en plus, c'est à la fin de l'entête ou à la fin du fichier ?

J'ai essayé à la fin du fichier et ça semble poser problème.

J'ai modifié mon bas2tap pour inclure un nom de fichier et ça semble avoir résolu le pb avec oricutron.

Re: fichier TAP créé par osk qui bloque

Posted: Thu May 08, 2014 3:03 pm
by christian
No, I mean at the end of the file.
Here is a hexdump of a simple BASIC program tape (CSAVE "TTTT" with Euphoric or Oricutron)

Code: Select all

00000000  16 16 16 16 24 ff ff 00  00 05 10 05 01 ff 54 54  |....$.........TT|
00000010  54 54 00 0e 05 0a 00 ba  20 22 54 45 53 54 22 00  |TT...... "TEST".|
00000020  00 00 55                                          |..U|
You can see a 0x55 right after the last 3 0x00, it is what I call the dummy byte.
My tool does not add this byte and Euphoric is Ok with that, but Oricutron never stop reading the tape file.
I did not realize because I do not use Oricutron (issue with my keyboord and my Linux laptop).

If the name of your program is "", it should anyway be a null byte on the right place (here on the first line between the 0xff and the 0x0e)

Code: Select all

00000000  16 16 16 16 24 ff ff 00  00 05 10 05 01 ff 00 0e  |....$...........|
00000010  05 0a 00 ba 20 22 54 45  53 54 22 00 00 00 43     |.... "TEST"...C|
Hope this can help.

----------
Non, il s'agit bien d'un octet à la fin du fichier:

Code: Select all

00000000  16 16 16 16 24 ff ff 00  00 05 10 05 01 ff 54 54  |....$.........TT|
00000010  54 54 00 0e 05 0a 00 ba  20 22 54 45 53 54 22 00  |TT...... "TEST".|
00000020  00 00 55                                          |..U|
Ci dessus, tu peux voir le 0x55 à la fin du fichier (CSAVE"TTTT" avec Euphoric ou Oricutron)

Au départ, mon outil de création de fichier tape prenait un fichier quelconque et ajoutait un entête pour générer le fichier tape.
Je n'avais fait les tests qu'avec Euphoric dans la mesure où Oricutron ne reconnait pas la moitié de mon clavier (portable sous Linux).
Euphoric ne semble par perturbé par cette absence, mais Oricutron si.
J'ai fait un test en reprenant l'un de mes fichiers généré par mon outil et en ajoutant simplement un octet à la fin et ça a résolu le problème.
Comme tu peux le voir dans le dump d'un fichier tape généré par un CSAVE avec Euphoric ou Oricutron, il y a bien un octet au dela de la fin du fichier.

Je ne sais pas si nous avons le même problème, je n'ai pas essayé de générer de fichier tape sans nom dans la mesure où mon outil en met un systématiquement.
Si il n'y a pas de nom dans l'entête, il doit au moins y avoir le caractère 0x00 à sa place pour marquer la fin du nom du programme (ici l'avant dernier octet de la première ligne):

Code: Select all

00000000  16 16 16 16 24 ff ff 00  00 05 10 05 01 ff 00 0e  |....$...........|
00000010  05 0a 00 ba 20 22 54 45  53 54 22 00 00 00 43     |.... "TEST"...C|
En espérant que cela puisse t'aider.

Re: fichier TAP créé par osk qui bloque

Posted: Thu May 08, 2014 3:15 pm
by Hialmar
En rajoutant un 0x00 à la fin du fichier ça bloquait tap2dsk donc je l'ai enlevé.

C'est bizarre ce truc. Le problème n'arrive peut-être qu'avec des images cassettes non nommées.

Je vais regarder le code d'Oricutron pour essayer de comprendre d'où ça peut venir.

Merci.

----
When I add a byte at the end of the file, tap2dsk blocks so I removed it.

Maybe the problem only happens with unnamed tape images.

I'll look at Oricutron's code if I see something there.

Cheers.

Re: fichier TAP créé par osk qui bloque

Posted: Fri May 09, 2014 8:48 am
by Symoon
christian wrote:Here is a hexdump of a simple BASIC program tape (CSAVE "TTTT" with Euphoric or Oricutron)

Code: Select all

00000000  16 16 16 16 24 ff ff 00  00 05 10 05 01 ff 54 54  |....$.........TT|
00000010  54 54 00 0e 05 0a 00 ba  20 22 54 45 53 54 22 00  |TT...... "TEST".|
00000020  00 00 55                                          |..U|
There is a problem with the tool generating this tape file.
See start and end addresses: 0501-0510, that means 16 bytes (501 and 510 being included).
If you count the program bytes, starting after the 00 following the name, and removing Christian's "dummy byte", there are only 15 bytes.
Either one byte is missing, either the end address is not calculated correctly.

I seem to remember the problem was detected and corrected long ago, but I may be wrong.
It probably works with Euphoric because Euphoric might read the EOF (End Of File) byte as the last program data byte - but not Oricutron ?

--
Il y a un problème avec l'outil qui a généré ce fichier TAP.
Regardez les adresses de début et de fin: 0501-0510, ce qui fait 16 octets (attention au piège classique: les bornes sont incluses). Si vous comptez le nombre d'octets du programme, en commençannt après le 00 qui suit le nom (les TTTT), et en retirant l'octet bidon final, cela ne fait que 15 octets.
Donc soit il en manque un, soit le calcul de l'adresse de fin n'est pas bon.

Je peux me tromper mais il me semble avoir déjà vu passer ce problème (je crois qu'il y a eu une 2e version de Bas2txt, mais je ne sais plus pourquoi).
Ca fonctionne sans doute avec Euphoric parce qu'il prend l'octet de fin de fichier (EOF) pour charger le dernier octet manquant, et pas Oricutron ?