Author Topic: Bug Reports  (Read 454421 times)

0 Members and 6 Guests are viewing this topic.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Bug Reports
« Reply #1680 on: February 13, 2012, 07:48:02 pm »
Hmm... it might be more convenient return the offset by default, considering that zStart is the only program really using the API right now anyway.  Other programs would probably like to handle errors themselves too.  The output will be something like the offset in hl and the name of that program in OP1, which might be a subprogram.
« Last Edit: February 13, 2012, 07:54:07 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1681 on: February 13, 2012, 08:02:03 pm »
I think just returning the offset would work well. And for programs that do want traditional error scrolling, perhaps you could add an API entry point for scrolling to the error? The program or application could clean itself up after the compile error and then give control back to Axe to handle the rest.
« Last Edit: February 13, 2012, 08:05:06 pm by Runer112 »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Bug Reports
« Reply #1682 on: February 20, 2012, 03:58:26 pm »
I found an error in the way the token hook is handled. When you copy the text string to ram, I noticed that you don't actually configure the first byte of the string. Since most of the tokens end up being somewhere in the 01xx range, the first byte of the ram string is 1.

But here's the problem. On closer analysis of how this hook works, that first byte actually means something. The format looks like this:

[Key code][length of string][string]

Where key code is the actual key you press to signal the token. As you can see, the key codes you are returning are incorrect and then that leads to all sorts of problems. (01 translates to right, when you use axe tokens in a Recall queue, the calculator hangs because tokens aren't actually being inserted)

So the simple fix is just to put the proper key codes in. The quickest way to get the proper key code is to simply put the token in DE and call _GetKeyPress, that will return the proper key in A.


Edit:
    If you are going to call _GetKeyPress from within your hook, make sure you temporarily disable the hook. Otherwise you're going to have fun with recursion.
« Last Edit: February 20, 2012, 04:04:33 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1683 on: February 20, 2012, 10:42:30 pm »
I found an error in the way the token hook is handled. When you copy the text string to ram, I noticed that you don't actually configure the first byte of the string. Since most of the tokens end up being somewhere in the 01xx range, the first byte of the ram string is 1.

But here's the problem. On closer analysis of how this hook works, that first byte actually means something. The format looks like this:

[Key code][length of string][string]

Where key code is the actual key you press to signal the token. As you can see, the key codes you are returning are incorrect and then that leads to all sorts of problems. (01 translates to right, when you use axe tokens in a Recall queue, the calculator hangs because tokens aren't actually being inserted)

So the simple fix is just to put the proper key codes in. The quickest way to get the proper key code is to simply put the token in DE and call _GetKeyPress, that will return the proper key in A.


Edit:
    If you are going to call _GetKeyPress from within your hook, make sure you temporarily disable the hook. Otherwise you're going to have fun with recursion.

Can you elaborate on this problem? I haven't noticed any problems with the hook in my testing of it. And I can't seem to cause any problems by recalling strings that contain Axe tokens or by entering Axe tokens into the recall prompt.
« Last Edit: February 20, 2012, 10:44:13 pm by Runer112 »

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Bug Reports
« Reply #1684 on: February 22, 2012, 11:30:32 am »
I'm not sure if wabbitemu's exactly accurate in emulating, but I tried Fusion in it and now the programs list is taking a full-second-plus to display two programs and all apps are throwing Err:Validation :/
Edit: fixed by ram clear.
« Last Edit: February 22, 2012, 11:31:27 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Bug Reports
« Reply #1685 on: February 24, 2012, 06:35:50 pm »
The Copy() command seems to be bugging out; see this post which describes the bug.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Bug Reports
« Reply #1686 on: February 24, 2012, 07:00:20 pm »
Torio found what bugged with link port on 83+fr only : link. Sometimes Get return 255 instead of 65535.
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Bug Reports
« Reply #1687 on: February 25, 2012, 06:35:51 pm »
Nope, I double checked the routine. It definitely returns -1 if it fails.  I'm guessing that either the link cable is faulty or the result is being stored to an 8-bit variable instead of a 16-bit variable.

Also, I forgot, but the Send() and Get routines disable interrupts automatically for you.
« Last Edit: February 25, 2012, 06:37:00 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Bug Reports
« Reply #1688 on: February 25, 2012, 07:12:14 pm »
When I try this code with a link cable and a 83+, it display error when I put cable on port :
Code: [Select]
:Repeat getKey(15)
:!If Get-255
:Disp "ERROR
:End
:End
So you're probably right, it's due to cable or port of calcs.
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Bug Reports
« Reply #1689 on: February 28, 2012, 01:22:34 pm »
I take back what I said, today I tested more carefully returned values, and I noticed it : wrong value are divided by 2. O.O
I noted 10 wrong transfer :
Spoiler For Spoiler:
Sended : Received
14 : 7
1 : 0
12 : 6
5 : 2
2 : 1
6 : 3
14 : 7
13 : 6
18 : 9
4 : 2
It show wrong bytes are shifted (divided by 2). I don't know how torio get the other bug, but excuse me if I disturb you again. ::)
« Last Edit: February 28, 2012, 01:23:06 pm by kindermoumoute »
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Bug Reports
« Reply #1690 on: February 28, 2012, 01:26:06 pm »
It definitely sounds like the timing in the linking routine is very relevant. I think Axe should probably use a "safe" linking method just like everything else written for the TI seems to use.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1691 on: February 28, 2012, 09:31:41 pm »
Axe is still accepting A°
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1692 on: February 28, 2012, 09:54:47 pm »
Axe doesn't really accept as much as it simply doesn't reject it. It's not being parsed as one unit, it's being parsed as A followed by °.... Whether Axe throws an error depends if °... is valid. And this shouldn't/can't be changed because one of the (awesome) properties of Axe is its loose syntax that allows for "units" to be linked together without an operator between them.

For instance, just one thing that pops in my mind is that such a change would break subroutine calls with one argument like Asub(B).

Pretty much, every Axe program I have ever written would be broken, as well as probably at least 25% of others' programs. O.O
« Last Edit: February 28, 2012, 10:07:11 pm by Runer112 »

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Bug Reports
« Reply #1693 on: February 28, 2012, 09:57:30 pm »


Asub(B) is equivalent to sub(B) because HL holds the value of B, not A!
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Bug Reports
« Reply #1694 on: February 28, 2012, 09:58:53 pm »

Not if subroutine uses HL itself like so:
Code: [Select]
Lbl B
->C
Return
« Last Edit: February 28, 2012, 10:00:47 pm by Builderboy »