• Calcnet Axiom 5 1
Currently:  

Author Topic: Calcnet Axiom  (Read 16284 times)

0 Members and 2 Guests are viewing this topic.

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Calcnet Axiom
« on: February 10, 2012, 10:35:16 pm »
Planed features:
  -Interact with calcnet routines and such for handeling data
  -Offer data handlers that may be slow but will help prevent misfires
  -Anything else you want like things to manage connections and such
  -The mandatory splash screen for gcn (you can just add in the required image to your game if you want will explain in readme)

Issues:
 I can say now. L1 and L3 will suffer if you use calcnet nothing can be done about it it is where Kerm keeps the stuff CalcNet lives on

 The Key routines will mimic axe's but will  not be the same

anything else thats needed or wanted ask. I will also be using this thread for help on making axioms as some of it is like LOLWUT to me. but at least I get calcnet xD



Currently Accomplished:
 
 Command set:
   SetS Sets the ok to send flag
   ResS Resets the ok to send flag  note i see no applicable use other than to change data if the data in the buffer was not sent in a reasonable time
   SetR Sets the "you got data" flag, only applicable use is to block incoming messages
   ResR Resets the "You got data flah" Allows more data to come in
   
    GetS returns the send buffer flag
   GetR returns the recieve buffer flag


There is also a wrapper that sets up pointers for use.


Available for download here; http://www.cemetech.net/programs/index.php?mode=file&id=737
« Last Edit: March 14, 2015, 04:00:27 pm by Geekboy1011 »

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: Calcnet Axiom
« Reply #1 on: February 11, 2012, 02:57:30 am »
If your axiom was for instance:

Code: [Select]
ld hl,1
ret

You would make that field "4" because the size of the command is 4 bytes long.  The size includes replacement prefixes by the way if you use those.  What most programmers do is add a .org 0 after the header, add a label to the end of the command, and then make this label the size field.  At the end of the Axiom, you just add on $0000 to indicate there are no more commands.

You might also want to check out MemKit.z80 in the Tools section of Axe for an example of how an Axiom should look.  Good luck :)

Also, L1 and L3?  That seems excessive... I wonder why Kerm would need 1536 bytes of static Ram just to run calcnet, especially as these are the most common buffers assembly programmers use.
« Last Edit: February 11, 2012, 03:01:41 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55896
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: Calcnet Axiom
« Reply #2 on: February 11, 2012, 04:05:15 am »
A Calcnet axiom would definitively be great. I believe Compynerd255 was making one before, but I haven't heard about him ever since.

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Calcnet Axiom
« Reply #3 on: February 11, 2012, 07:59:16 am »
well he doesnt use all of them. he uses 226 bytes of so of L1 and 100bytes or so of L3. and will do thanks quigbo ^^

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Calcnet Axiom
« Reply #4 on: February 11, 2012, 08:34:24 am »
Hmm, so why didn't he just put it all in one place? D: Is it so that it can work around DCS? :/

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Calcnet Axiom
« Reply #5 on: February 11, 2012, 01:50:54 pm »
nay the useage on L1 is the send/recive buffers and info pertaining to them. on L3 at $9999 is his ram routine for his interrupt
and also on L3 at $9A00 - $9B01 is used for his vector table.

also i meant 547bytes of L1 oops math fail

http://dcs.cemetech.net/index.php?title=Interfacing_CALCnet2#Routines

look at cn2_setup for more info that inst stupidified by me >.> <.<



also what is the token info for normalCDF (2nd+vars,  2) i cant find it in the include file

also if i am returning a pointer(or anything else) from a command. i would just do
Code: [Select]
ld hl,address
and thats it?
« Last Edit: February 11, 2012, 04:46:10 pm by Geekboy1011 »

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: Calcnet Axiom
« Reply #6 on: February 11, 2012, 05:46:41 pm »
Yes, if its a static address.  If its a pointer to data that your Axiom has added, you don't even need it at all since its done automatically with AXM_DATA.

Also, you probably aren't using this, but if you want it to return pointer to axiom code that you want the programmer to jump to, you'd have to use a replacement with REP_NEXT, but that's an advanced feature.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Calcnet Axiom
« Reply #7 on: February 12, 2012, 01:00:46 am »
any one know why this token hook isn't sticking?

Code: [Select]
.dw hInvT
.db 7
.db "Cn2.2id"


Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Calcnet Axiom
« Reply #8 on: February 12, 2012, 12:12:21 pm »
Yeah, that's because it's a "new" token and is sent to the token hook in a special manner that Axe doesn't handle. I didn't add handling for it because I wasn't entirely sure how to account for it without introducing other problems on calculators with older OSes, but I think I've found a way to fix it now.

Also, I'll try to fix the issue where I stupidly forgot to account for the possibility that the Axiom name in the source code contains tokens that aren't equivalent to their ASCII values.

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: Calcnet Axiom
« Reply #9 on: February 12, 2012, 09:51:12 pm »
Yeah, that's because it's a "new" token and is sent to the token hook in a special manner that Axe doesn't handle. I didn't add handling for it because I wasn't entirely sure how to account for it without introducing other problems on calculators with older OSes, but I think I've found a way to fix it now.
Do you mind explaining that a bit?  I don't see anything in the code that would prevent new tokens from being used...

Also you don't need to handle that case with Axiom names because Axioms are required to only contain the A-Z, a-z, and 0-9 characters anyway.  This is just to ensure they are easily typeable, valid, and unambiguous.
« Last Edit: February 12, 2012, 09:51:41 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: Calcnet Axiom
« Reply #10 on: February 12, 2012, 09:54:32 pm »
Oh no, A-Z and 0-9 are fine. That's why I didn't discover the bug myself. The issue is a-z.

EDIT: Forgot to answer your first question. Tokens after GarbageCollect are passed in a special manner. But I've added code to handle this and will give you my updated token hook once I fix the above problem as well.
« Last Edit: February 12, 2012, 09:56:40 pm by Runer112 »

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Calcnet Axiom
« Reply #11 on: February 14, 2012, 03:31:20 pm »
The calcnet interrupt handles turning the calc on and off with [on]. but when i do so with this code running

Code: [Select]
:.KEY
:AsmComp(GCNAXE)
:prgmGCNLIB
:CnOn
:
:For(A,0,255)
:Disp GetKey►Dec,i
:Pause 100
:End
:
:CnOff
:Stop
:Return
Generated by SourceCoder (http://sc.cemetech.net)
© 2005-2012 Cemetech (http://www.cemetech.net)

It locks up after you turn the calc back on.  The for loop just does not continue to run, as I can still turn the calc on and off.  any ideas?


Edit: i like it pauses for a while then starts up again....
« Last Edit: February 14, 2012, 03:45:02 pm by Geekboy1011 »

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
[Axiom] CalcNet
« Reply #12 on: March 02, 2012, 11:16:02 pm »
so lets see how this works....open beta go?!?!?


everything needed is in the zip even the source. i just need someone to tell me if it works. i just cant understand axe...

have any questions pertaining to calcnet just ask. ill be more than willing to show you how it works if kerm's documentation is confusing you.

there is no guarentee that this works. and it is by no means even close to dont. this just has the basic api in it.


also read through the program in the wrapper i forgot to lable what they are. ill make a edit later with that info. they should be self explanatory tho ^^

warning these are screen stretchers
Spoiler For Flowcharts:
[/
Spoiler For Spoiler:
« Last Edit: March 07, 2012, 11:48:34 pm by Geekboy1011 »

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Calcnet Axiom
« Reply #13 on: March 04, 2012, 03:19:07 pm »
shameless bump as i want to get this out for you people to use

Offline KermMartian

  • Editor
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 500
  • Rating: +233/-20
    • View Profile
    • Cemetech
Re: Calcnet Axiom
« Reply #14 on: March 04, 2012, 03:27:43 pm »
Hmm, so why didn't he just put it all in one place? D: Is it so that it can work around DCS? :/
Only 547 bytes in "L1" is actually for CALCnet.  The other 100-odd you only have to worry about if you're also using the Doors CS GUI API with CALCnet. Believe it or not, I actually use my brain when I design things. ;)

Edit: Oh yes, and the L3 stuff for interrupts, of course, but that's nothing extraordinary.
« Last Edit: March 04, 2012, 03:28:27 pm by KermMartian »