CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 117 users online: 6 members, 79 guests and 32 bots.
Members: Ashbad, flyingfisch, nsg, tifreak8x, willwac.
Bots: VoilaBot (2), Spinn3r (1), MSN/Bing (1), Magpie Crawler (2), VoilaBot (6), Googlebot (17), MSN/Bing (3).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 11 Mar 2011 03:19:57 pm    Post subject:

That looks to me as if it would work pretty well. Have you given it a try yet? Tthanks for the interjections, Lionel. Smile
_________________


Back to top
ephan


Super-Expert


Joined: 12 Nov 2010
Posts: 819

Posted: 11 Mar 2011 04:47:17 pm    Post subject:

ACagliano are you gonna make your tutorial on this? I think I read something on the IRC, is it true? I'm looking forward to it.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 11 Mar 2011 04:47:45 pm    Post subject:

ScoutDavid wrote:
ACagliano are you gonna make your tutorial on this? I think I read something on the IRC, is it true? I'm looking forward to it.
Oooh, I hope he will! If he does, everyone wins, I think.
_________________


Back to top
ACagliano


Super-Expert


Joined: 08 Feb 2010
Posts: 925

Posted: 11 Mar 2011 04:51:14 pm    Post subject:

I am starting a tutorial on game design using Axe, yes. It will delve into everything my TI-Basic version did, and then will address using CalcNET as a linking protocol.

@Kerm: Only one calculator, and no unit-to-units cables.
_________________
-ACagliano

Current Projects

Legend of Zelda. "Ganon's Rage"
51%
Back to top
souvik1997


Guru-in-Training


Joined: 19 Apr 2010
Posts: 2870

Posted: 11 Mar 2011 04:53:21 pm    Post subject:

That sounds very cool! btw, it's called CALCnet, not CalcNET.
_________________
CALCnet Tournament-38%


deviantArt
Back to top
ephan


Super-Expert


Joined: 12 Nov 2010
Posts: 819

Posted: 11 Mar 2011 04:58:01 pm    Post subject:

ACagliano wrote:
I am starting a tutorial on game design using Axe, yes. It will delve into everything my TI-Basic version did, and then will address using CalcNET as a linking protocol.

@Kerm: Only one calculator, and no unit-to-units cables.


Oh that's great Smile
Back to top
Progbeard


Member


Joined: 23 Feb 2011
Posts: 108
Location: 0x9D95

Posted: 11 Mar 2011 05:15:11 pm    Post subject:

KermMartian wrote:
Does it store simultaneously? If there are even a few cycles between the high byte and the low byte, bad things can happen.


Not read on z80 architecture, but I'm pretty sure there are no "free" cycles during the duration of any one instruction...unless you start talking about pipelining or hyperthreading... o.o

Were you worried the buffer might be read between storing the high and low bytes?
_________________
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 11 Mar 2011 05:24:30 pm    Post subject:

Progbeard wrote:
KermMartian wrote:
Does it store simultaneously? If there are even a few cycles between the high byte and the low byte, bad things can happen.


Not read on z80 architecture, but I'm pretty sure there are no "free" cycles during the duration of any one instruction...unless you start talking about pipelining or hyperthreading... o.o

Were you worried the buffer might be read between storing the high and low bytes?
Progbeard, in z80 asm, ld (imm_addr),hl operates in one instruction, so an interrupt cannot trigger in the middle of the two-byte load. However, this is Axe, a compiled language, and I am not sure how it renders a two-byte load in the high-level language into ASM. I considered it entirely possible that it might break it up into two separate one-byte load instructions.
_________________


Back to top
ACagliano


Super-Expert


Joined: 08 Feb 2010
Posts: 925

Posted: 11 Mar 2011 06:11:16 pm    Post subject:

Perhaps you could poke Quigibo on that. That is a very worthy question.
_________________
-ACagliano

Current Projects

Legend of Zelda. "Ganon's Rage"
51%
Back to top
Deep Thought


Expert


Joined: 11 Mar 2010
Posts: 739
Location: The Universe

Posted: 11 Mar 2011 06:24:57 pm    Post subject:

KermMartian wrote:
Progbeard wrote:
KermMartian wrote:
Does it store simultaneously? If there are even a few cycles between the high byte and the low byte, bad things can happen.


Not read on z80 architecture, but I'm pretty sure there are no "free" cycles during the duration of any one instruction...unless you start talking about pipelining or hyperthreading... o.o

Were you worried the buffer might be read between storing the high and low bytes?
Progbeard, in z80 asm, ld (imm_addr),hl operates in one instruction, so an interrupt cannot trigger in the middle of the two-byte load. However, this is Axe, a compiled language, and I am not sure how it renders a two-byte load in the high-level language into ASM. I considered it entirely possible that it might break it up into two separate one-byte load instructions.


Axe usually uses


Code:
push HL
; get pointer into HL here
pop DE
ld (HL),E
inc HL
ld (HL),D


except when it's a constant location; in that case it uses


Code:
ld (ADDRESS),HL

_________________
Back to top
Progbeard


Member


Joined: 23 Feb 2011
Posts: 108
Location: 0x9D95

Posted: 11 Mar 2011 06:27:30 pm    Post subject:

Oh, I see. I'm also not too familiar with Axe. If Axe has a word load instruction, I can't imagine it would compile into two two-byte loads. But if Axe has only byte load instructions, you might be right, and that wouldn't be very desirable.

Are there any good Axe tutorials on the web aside from just the Axe documentation?
_________________
Back to top
Deep Thought


Expert


Joined: 11 Mar 2010
Posts: 739
Location: The Universe

Posted: 11 Mar 2011 06:53:33 pm    Post subject:

Progbeard wrote:
Are there any good Axe tutorials on the web aside from just the Axe documentation?


kindermoumoute's writing a very complete tutorial on the Site du Zéro (it's in French).

I'm working on an "Ultimate Guide to Axe Parser" on my own site, as well as a few specific tutorials on arrays and making a SHMUP in Axe.
_________________
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 12 Mar 2011 12:39:48 am    Post subject:

Progbeard, so Deep Thought did indeed confirm my concern. Smile Personally, I'd stick with ASM if you feel proficient enough in it, but I'm slightly biased. ACagliano, what were you saying earlier on SAX about having to move around memory?
_________________


Back to top
Compynerd255


Power User


Joined: 08 Apr 2011
Posts: 397

Posted: 13 Apr 2011 10:45:26 pm    Post subject:

Hey, everybody! I have an *UNTESTED* CALCnet axiom for you guys! It's only the source, as I can't compile right now. Here it is:

Code:

.org $0000
.dw $C0DE

;Start Cn2.2
.dw $0003
.db %00010000
.db $63,$3C   ;"CoordOn"
.db %00000000   ;replacement
.db 0
call 04206h

;Stop Cn2.2
.dw $0003
.db %00010000
.db $63,$3D   ;"CoordOff"
.db %00000000   ;replacement
.db 0
call 04212h

;Send address pointer
.dw $0003
.db %00010000
.db $63,$0A   ;"Xmin"
.db %00000000   ;replacement
.db 0
ld hl, 087FAh

;Send data pointer
.dw $0003
.db %00010000
.db $63,$0B   ;"Xmax"
.db %00000000   ;replacement
.db 0
ld hl, 08801h

;Send size pointer
.dw $0003
.db %00010000
.db $63,$02   ;"Xscl"
.db %00000000   ;replacement
.db 0
ld hl, 087FFh

;Store Send Go
.dw $0003
.db %00010000
.db $63,$27   ;"Delta X"
.db %00010000   ;store command
.db 0
ld (08800h), hl

;Retreive Send Go
.dw $0003
.db %00010000
.db $63,$27   ;"Delta X"
.db %00000000   ;replacement
.db 0
ld hl, (08800h)

;Recieve address pointer
.dw $0003
.db %00010000
.db $63,$0C   ;"Ymin"
.db %00000000   ;replacement
.db 0
ld hl, 086F3h

;Recieve data pointer
.dw $0003
.db %00010000
.db $63,$0D   ;"Ymax"
.db %00000000   ;replacement
.db 0
ld hl, 086FAh

;Recieve size pointer
.dw $0003
.db %00010000
.db $63,$03   ;"Yscl"
.db %00000000   ;replacement
.db 0
ld hl, 086F8h

;Store Recieve Go
.dw $0003
.db %00010000
.db $63,$28   ;"Delta Y"
.db %00010000   ;store command
.db 0
ld (086F9h), hl

;Retreive Recieve Go
.dw $0003
.db %00010000
.db $63,$28   ;"Delta Y"
.db %00000000   ;replacement
.db 0
ld hl, (086F9h)

;End Axiom
.dw $0000
.end

Would someone please compile this for me? Thank you.[/code]
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 13 Apr 2011 10:46:16 pm    Post subject:

Nifty! Once compiled, how would one go about using this?
_________________


Back to top
souvik1997


Guru-in-Training


Joined: 19 Apr 2010
Posts: 2870

Posted: 13 Apr 2011 10:49:22 pm    Post subject:

I'll definitely test this out! Why do all of your memory addresses have a 0 in front of them?
_________________
CALCnet Tournament-38%


deviantArt
Back to top
Compynerd255


Power User


Joined: 08 Apr 2011
Posts: 397

Posted: 13 Apr 2011 10:51:03 pm    Post subject:

Here's how an Axiom works:

1. In Axe, place an #Axiom() token (where AsmComp should be in the Catalog) and put the compiled Axiom name in the argument.
2. Use these tokens in the program:
- CoordOn starts CALCnet, CoordOff stops CALCnet.
- Xmin, Xmax, and Xscl are pointers for the send buffer's target, data, and size, respectively.
- Ymin, Ymax, and Yscl are the same for the recieve buffer.
- Delta X and Delta Y are the second bytes of the size words. You can read them and write to them as you would in ASM (set and clear the high bit).

EDIT:
souvik1997 wrote:
I'll definitely test this out! Why do all of your memory addresses have a 0 in front of them?

I'm not really an ASM programmer. I thought that all the addresses needed a 0 in front of them.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 14 Apr 2011 02:33:39 am    Post subject:

Only the ones that start with a letter. Smile There are two accepted formats: $F02C/$89E2, or 0F02Ch/89E2h.
_________________


Back to top
Compynerd255


Power User


Joined: 08 Apr 2011
Posts: 397

Posted: 14 Apr 2011 09:21:03 am    Post subject:

ACagliano wrote:
I get what you are saying Kerm, so we are clear on that.

I'm just confused. I don't believe Axe uses little endian, so in Axe, it may be 0x80[size]. Maybe you can tell me Kerm,

if I had to flip the memory high and low bytes of the Cn2 calls and the memory areas from the standard z80 conventions in order to use them in Axe, I should have to flip this as well, correct.


If you are using z80 hexcodes, you are using little endian. However, in Axe, the pointers are 2 byte values, so you don't have to worry about it - it manages it for you. The only note I need to make about this Axiom is that you must store or read 128 to the Delta ("Frame Ready") values.
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55762
Location: Earth, Sol, Milky Way

Posted: 14 Apr 2011 11:32:36 am    Post subject:

Compynerd, here's your program compiled as hex, in case it helps you at all:


Code:
DE C0 03 00 10 63 3C 00 00 CD 06 42 03 00 10 63 3D 00 00 CD 12 42 03 00 10 63 0A 00 00 21 FA 87 03 00 10 63 0B 00 00 21 01 88 03 00 10 63 02 00 00 21 FF 87 03 00 10 63 27 10 00 22 00 88 03 00 10 63 27 00 00 2A 00 88 03 00 10 63 0C 00 00 21 F3 86 03 00 10 63 0D 00 00 21 FA 86 03 00 10 63 03 00 00 21 F8 86 03 00 10 63 28 10 00 22 F9 86 03 00 10 63 28 00 00 2A F9 86 00 00

_________________


Back to top
Display posts from previous:   
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
    » Goto page Previous  1, 2, 3, 4  Next
» View previous topic :: View next topic  
Page 3 of 4 » All times are GMT - 5 Hours

 
Jump to:  
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

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.046055 seconds.