Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Geekboy1011 on February 10, 2012, 10:35:16 pm

Title: Calcnet Axiom
Post by: Geekboy1011 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
Title: Re: Calcnet Axiom
Post by: Quigibo 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.
Title: Re: Calcnet Axiom
Post by: DJ Omnimaga 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.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 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 ^^
Title: Re: Calcnet Axiom
Post by: Xeda112358 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? :/
Title: Re: Calcnet Axiom
Post by: Geekboy1011 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?
Title: Re: Calcnet Axiom
Post by: Quigibo 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.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 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"

Title: Re: Calcnet Axiom
Post by: Runer112 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.
Title: Re: Calcnet Axiom
Post by: Quigibo 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.
Title: Re: Calcnet Axiom
Post by: Runer112 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.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 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....
Title: [Axiom] CalcNet
Post by: Geekboy1011 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:
(http://geekboy.57o9.org/CALCNet/CALCnet%20Server%20Client%20Initialization%20Flow.png)(http://geekboy.57o9.org/CALCNet/FrameFlowControl.png)[/
Spoiler For Spoiler:
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 04, 2012, 03:19:07 pm
shameless bump as i want to get this out for you people to use
Title: Re: Calcnet Axiom
Post by: KermMartian 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.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 04, 2012, 03:42:41 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.

good to know that and i will make a note of that in the readme  :D and i labeled that right in the readme @547bytes :P
Title: Re: Calcnet Axiom
Post by: C0deH4cker on March 04, 2012, 06:32:11 pm
Isnt L3 appBackupScreen?
I thought L2 was for interrupts...
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 04, 2012, 07:16:14 pm
Isnt L3 appBackupScreen?
I thought L2 was for interrupts...

in axe this may be true. Calcnet sets its interrupt in a different area then axe so thats why it is there instead of in L2
Title: Re: Calcnet Axiom
Post by: C0deH4cker on March 04, 2012, 07:23:14 pm
Gotcha.
Title: Re: Calcnet Axiom
Post by: DJ Omnimaga on March 06, 2012, 03:43:42 am
I'm glad this is progressing nicely. Hopefully some people use it in the future. I guess it might have a small audience due to the very small amount of Axe programmers who makes multiplayer stuff, but with the potential to play online vs people from the forums might convince them to venture into multiplayer again.

Btw since L3 is used for intterupts, this means that in CALCnet games written in Axe cannot be in grayscale, right? (Since grayscale uses all of L3) Or can we simply not make our game full screen and just use the rest of L3 for grayscale?
Title: Re: Calcnet Axiom
Post by: aeTIos on March 06, 2012, 09:56:09 am
Oo i did not notice this thread. Would be cool to use :D
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 06, 2012, 08:37:25 pm
Btw since L3 is used for intterupts, this means that in CALCnet games written in Axe cannot be in grayscale, right? (Since grayscale uses all of L3) Or can we simply not make our game full screen and just use the rest of L3 for grayscale?

actually you can still do greyscale as you can define arbitrary buffers with axe ^^

Oo i did not notice this thread. Would be cool to use :D

then help me test it!
Title: Re: Calcnet Axiom
Post by: aeTIos on March 06, 2012, 08:59:33 pm
alright :)
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 06, 2012, 09:00:49 pm
woo imma working on a calcnet tutorial but those flow charts tell you pretty much what you need to do lol
Title: Re: Calcnet Axiom
Post by: aeTIos on March 06, 2012, 09:04:56 pm
WAAH YOUR LEET POST:LEET:
AND IN A LEET TOPIC
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 06, 2012, 11:47:46 pm
and past that cause stuff needs doing.

hows pindurti working. and any questoins on calcnet?
Title: Re: Calcnet Axiom
Post by: aeTIos on March 06, 2012, 11:51:40 pm
its all pretty good, testing teh axiom 2morow, super tired now.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 06, 2012, 11:52:54 pm
sounds good, post if you have issues with calcnet. and tell me what you think of the tut
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 07, 2012, 11:49:52 pm
uhm made a few major fails in teh last one ... use the new attaached zip...only changes are in the source and binary files everything else is the same >.> <.<
/me grumbles about little endian
Title: Re: Calcnet Axiom
Post by: aeTIos on March 23, 2012, 08:59:18 am
Erm I am sorry that you have to wait so long for my promised naval battlezorz game to test CN, I am very busy either with school and ti-concours.
Maybe I can free some time to test it though...
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 24, 2012, 07:39:49 am
its all good. been distracted my self lately with life :P
Title: Re: Calcnet Axiom
Post by: Yeong on April 03, 2012, 07:46:12 pm
so is the axiom usable?
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on April 03, 2012, 10:44:18 pm
honestly i dunno. aetios is still working on ti-concurs last i checked. so until i get word from him (or anyone else who is willing to test it)

im assuming yes. but it may not. kinda the only issue with not knowing axe and making a axiom eh?
Title: Re: Calcnet Axiom
Post by: DJ Omnimaga on April 03, 2012, 11:13:14 pm
Has there been a few more progress lately?
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on April 03, 2012, 11:29:06 pm
na i haven't touched the code yet. whats done is the core routines and everything that needs to be done to make calcnet usable. everything else after whats already done is really just for ease of the end user :D

but first and foremost i need to make sure whats done already is working
Title: Re: Calcnet Axiom
Post by: DJ Omnimaga on April 03, 2012, 11:41:56 pm
Ah ok, and hopefully there are not too many fixes to do.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on April 19, 2012, 07:38:16 pm
http://www.cemetech.net/programs/index.php?mode=file&id=737

thats the most upto date one I added a new command.

CnOnr = toggles the debug mode

The info on that is on the bottom of the interfacing calcnet page in the dcs wiki located here
http://dcs.cemetech.net/index.php?title=Interfacing_CALCnet
Title: Re: Calcnet Axiom
Post by: pimathbrainiac on December 18, 2012, 09:35:03 pm
Is there a more up to date one I should know about? I'm planning something huge...
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on January 07, 2013, 05:14:42 pm
I caught your cemetech thread and no currently that is the most up to date one. If you need help with it ask here or there I will be more then happy to assist.
Title: Re: Calcnet Axiom
Post by: DJ Omnimaga on January 07, 2013, 05:16:45 pm
I wonder if anybody managed to use this for a project so far? It would definitively be nice to see an useable Calcnet Axiom in the near future if this isn't already, or if it is then some projects using it. I assume it's quite hard to use, though, as is standard linking (reason why there are so few multiplayer games for calcs IIRC). >.<
Title: Re: Calcnet Axiom
Post by: pimathbrainiac on January 08, 2013, 03:08:52 pm
I'm making a MOBA with this Axiom
Title: Re: Calcnet Axiom
Post by: pimathbrainiac on March 13, 2015, 07:41:08 pm
Bump!

Progress. Make some.
I was soooooooooo naive back then
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 13, 2015, 07:43:13 pm
Meh not feeling like writing a linked list handler in Z80 So naaaaa. Lets have some people use it first :P
Title: Re: Calcnet Axiom
Post by: pimathbrainiac on March 13, 2015, 07:45:25 pm
I would use it if it were more understandable and programmer friendly.
/me runs
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 14, 2015, 03:46:25 pm
it is actually... it just doesn't have any shine on it. If you don't know how to work with calcnet it will seem kinda daunting but calcnet is rather easy. Ask questions if you have any!
Title: Re: Calcnet Axiom
Post by: pimathbrainiac on March 14, 2015, 03:58:52 pm
BTW, you might want to change the download link to this somewhere: http://www.cemetech.net/programs/index.php?mode=file&id=737 because 57o9 is no longer a thing.
Title: Re: Calcnet Axiom
Post by: Geekboy1011 on March 14, 2015, 04:01:41 pm
Whooops lol fixed and added to the OP.