Deep Thought wrote:
ACagliano wrote:
I'm just confused. I don't believe Axe uses little endian, so in Axe, it may be 0x80[size].


Axe uses little-endian. Nobody ever uses big-endian in Z80 programming except in very special circumstances. To save 7 or 8 bytes (I forget what) just store the full two-byte value.
Does it store simultaneously? If there are even a few cycles between the high byte and the low byte, bad things can happen. And Acag, the first.
A few other questions about calcNET's general stuff.

1. Let us say you do "call (Cn2_Setup)" on a calculator that does not have the CalcNET drivers present or enabled. Will CalcNET indicate an error that a userland program can react to, or will the program crash?

I may have more. I'll add them as I come up with them.
http://dcs.cemetech.net/index.php?title=Cn2_Setup
elfprince13 wrote:
http://dcs.cemetech.net/index.php?title=Cn2_Setup


Yes, I know, elfprince. But, you see, the CalcNET drivers are in DoorsCS7.1. What is someone does not have the app? Or that, inside the app, CalcNET and gCn are turned off? I'm asking, will that throw an error?
The description sounds like it sets up CALCnet even if they are off from the desktop. I'm not sure about the version checking.
ACagliano wrote:
elfprince13 wrote:
http://dcs.cemetech.net/index.php?title=Cn2_Setup


Yes, I know, elfprince. But, you see, the CalcNET drivers are in DoorsCS7.1. What is someone does not have the app? Or that, inside the app, CalcNET and gCn are turned off? I'm asking, will that throw an error?


The program wouldn't even run if DCS is installed, assuming you compiled it for DCS.

And elfprince13's page shows you how to initialize Cn2.

KermMartian wrote:
Deep Thought wrote:
ACagliano wrote:
I'm just confused. I don't believe Axe uses little endian, so in Axe, it may be 0x80[size].


Axe uses little-endian. Nobody ever uses big-endian in Z80 programming except in very special circumstances. To save 7 or 8 bytes (I forget what) just store the full two-byte value.
Does it store simultaneously? If there are even a few cycles between the high byte and the low byte, bad things can happen. And Acag, the first.


Whoops, yeah, it basically does


Code:
ld (HL),E
inc HL
ld (HL),D


So I guess that wouldn't work.
DThought, as long as it does it in that order, that's fine. It would just be a problem if it did it the other way around.

ACag: Make it a Doors CS-only program. People have previously figured out how to do that in Axe, and I think there's probably documentation about it somewhere here on Cemetech.
Axe has an option to compile for Doors CS. Smile
souvik1997 wrote:
Axe has an option to compile for Doors CS. Smile
Oh, superb! Is that new, by any chance? Smile I'm glad to hear that, though.
No, it's been there for quite a while now.
souvik1997 wrote:
No, it's been there for quite a while now.
It doesn't by default allow an icon and description though, right? I definitely remember helping someone figure out how to hack that in.
That someone would be me. Very Happy Actually, as of the latest version, Quigibo added DCS icon support and description support was added a long time ago.
Shell and description support were included almost from the beginning; the newest version has an #Icon( command for users to specify a custom icon for MOS and DCS.
Kerm, compiling for Axe means it needs some (any) version of DoorsCS to run. Programs using CalcNET need DCS7.1 or later. You see what I'm getting at.

Also, what protocol do you use for these networks that can have like 9 billion players. Where the heck do you store the addresses of all the players? And how do you say, ok that's all the players on the network, so lets start playing.
It uses five-byte addresses, so it can address sixteen trillion calculators, but one calc can't store the addresses of more than a few hundred at a time. Use the DCS header that guarantees DCS 7 or higher, DCS will throw an error and quit if it doesn't have Cn2.2.
oh. ok.

Ohh. Now were at sixteen trillion. You seem to be changing your story, Kerm.

lol. jk. jk.
ACagliano wrote:
oh. ok.

Ohh. Now were at sixteen trillion. You seem to be changing your story, Kerm.

0x5. jk. jk.
Ooooh, my mistake:

256^5 = 1 099 511 627 776

Sorry, 1 trillion, but that's still a few orders of magnitude more than the number of calculators ever created. Wink
Lbl FO
.FIND/GET OTHER
h86EC→C
.C is now a pointer to the start of the CalcNET buffers
0→{C+270}
0→{C+271}
0→{C+272}
0→{C+273}
0→{C+274}
h80→{C+257}

This about right, to send a broadcast? Can the actual data be empty?
IIRC, it's not legal to send an empty frame. The Netpong and Flourish handshake is length 0x0001, content 0x01.
Lbl FO
.FIND/GET OTHER
86EC→C
.C is now a pointer to the start of the CalcNET buffers
0→{C+270}
0→{C+271}
0→{C+272}
0→{C+273}
0→{C+274}
1→{C+277}
01→{C+276}
80→{C+275}
0→G
While getKey(15)=0
EndIf {C+12}=0
Copy(C+7,L₁,5)

Is this correct, to fill the send buffer, then wait for either the clear key to be pressed or the receive buffer to be full, and then to copy the Sender ID to userland memory?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement