Author Topic: Crabcake  (Read 18393 times)

0 Members and 3 Guests are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Crabcake
« Reply #45 on: June 07, 2011, 02:18:23 am »
This will definitively change Axe programming by far. I wonder if this should be featured on ticalc, since this involves breaking a long-time calc limit?

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Crabcake
« Reply #46 on: June 07, 2011, 02:22:26 am »
It changes the limit from 8k to 20k or so - that's definetely pretty awesome.
In-progress: Graviter (...)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Crabcake
« Reply #47 on: June 07, 2011, 03:42:39 am »
I wonder if it can take advantage of the extra ram page for SE-only games?

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: Crabcake
« Reply #48 on: June 13, 2011, 03:36:24 pm »
I found a somewhat bug with this. If certain hooks run while crabcakes is doing its thing, the calculator will crash. Hooks are never going to expect that the extra ram page is in (05) and has meaningful data on it. Of course this is an easy fix if the hook developer knows about the problem, but some of the developers aren't going to hear about the problem, or are are long gone.


So what I would think you should do is backup the hook flags on startup, clear the flags for running the program, and restore them when you are done. There are only 4 bytes worth of flags, so that's not really a huge memory issue.

Although at first glance it looks like only 3 bytes $8A24-$8A26 are used for hooks, $8A2A is used for the USB hook. And while it's rare that this hook is active, it's the most likely to cause problems, so be sure to include it.
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 TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Crabcake
« Reply #49 on: June 13, 2011, 03:50:14 pm »
Nice bug find. I'm glad it's something that can be easily fixed. :)

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Crabcake
« Reply #50 on: June 13, 2011, 04:33:59 pm »
I found a somewhat bug with this. If certain hooks run while crabcakes is doing its thing, the calculator will crash. Hooks are never going to expect that the extra ram page is in (05) and has meaningful data on it. Of course this is an easy fix if the hook developer knows about the problem, but some of the developers aren't going to hear about the problem, or are are long gone.


So what I would think you should do is backup the hook flags on startup, clear the flags for running the program, and restore them when you are done. There are only 4 bytes worth of flags, so that's not really a huge memory issue.

Although at first glance it looks like only 3 bytes $8A24-$8A26 are used for hooks, $8A2A is used for the USB hook. And while it's rare that this hook is active, it's the most likely to cause problems, so be sure to include it.

Good call.  I'll take care of that when I can

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Crabcake
« Reply #51 on: June 19, 2011, 10:33:18 am »
Crabcake just made it onto the ticalc news, so I'd better get on that hook bug.  Penguin77, if you have a small segment of example code that crashes the calculator, I would be most greatful.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Crabcake
« Reply #52 on: June 19, 2011, 12:18:52 pm »
Crabcake just made it onto the ticalc news, so I'd better get on that hook bug.  Penguin77, if you have a small segment of example code that crashes the calculator, I would be most greatful.

Oh yeah congratulations on the news :)

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Crabcake
« Reply #53 on: June 19, 2011, 09:47:28 pm »
Crabcake just made it onto the ticalc news, so I'd better get on that hook bug.  Penguin77, if you have a small segment of example code that crashes the calculator, I would be most greatful.
Good job!

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Crabcake
« Reply #54 on: June 20, 2011, 09:15:40 am »
Congrats, Hot Dog!  I was hoping it would be featured. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Crabcake
« Reply #55 on: June 22, 2011, 10:07:06 pm »
Congrats on the news. Does the bug affects Axe stuff, by the way?

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Crabcake
« Reply #56 on: June 23, 2011, 12:22:28 am »
The bug only occurs when hooks are installed, so Axe programs in and of themselves will not cause a crash.  It's the hooks that do the crashing.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Crabcake
« Reply #57 on: June 23, 2011, 01:00:10 am »
Oh ok. So when we open the prgm editor to edit Axe programs it will crash? (the custom Axe token hooks)

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Crabcake
« Reply #58 on: June 23, 2011, 01:03:08 am »
I think it's more of hooks that are associated with running programs rather than the token hooks that Axe uses.
In-progress: Graviter (...)

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: Crabcake
« Reply #59 on: June 23, 2011, 01:04:16 am »
Sorry, hot_dog, missed your request.

If you have specific font hooks installed, (most notably zStart with version less than ~6)
Code: [Select]
call crabCakeInstall

ld a, 'A'
bcall(_putC)
Will crash the calculator.

If you want to fix the problem, here is what I recommend.
Code: [Select]

crabCakeInstall:
ld hl, (flags + $34) ;iy + 34h
ld (nameBuff), hl
ld a, (flags + $36) ;iy + 36h
ld (nameBuff+2), a
ld a, (flags + $3A) ;iy + 3Ah
ld (nameBuff+3), a
xor a
ld (iy + $34), a
ld (iy + $35), a
ld (iy + $36), a
ld (iy + $3A), a

crabCakeUninstall:
ld hl, (nameBuff)
ld (flags + $34), hl
ld a, (nameBuff+2)
ld (flags + $36), a
ld a, (namebuff+3)
ld (flags + $3A), a

NameBuff is the area used when you type in the name of something, for instance, making a new basic program or RCLing something. Since I doubt any Axe programmer would ever use this area, or even know about it. The flags should be save there.
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