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 122 users online: 5 members, 93 guests and 24 bots.
Members: cvsoft, parrotgeek1, Qwerty.55.
Bots: VoilaBot (1), Spinn3r (1), Magpie Crawler (3), Googlebot (18), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Author Message
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 12 Jun 2010 05:17:31 pm    Post subject: ZSM, program for creating party menu

This is mainly a test for the moment, however, I do plan to upload pokemon purple in its entirety to SC, pending Kerm could add in a folder setup so I can keep things a bit better organized.

Anyways, here is a program I just finished writing out, and will be receiving a rewrite shortly.

http://sc.cemetech.net/?xpi=cd2e799b224231ee816a256f930f32da
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.


Last edited by tifreak8x on 12 Jun 2010 06:15:57 pm; edited 1 time in total
Back to top
SourceCoder2


New Member


Joined: 10 Apr 2006
Posts: 78

Posted: 12 Jun 2010 05:18:26 pm    Post subject:

ZSMOLD
tifreak8x has just edited this program. The source code now reads:
BASIC Code wrote:
:If X=1:Then
:SetUpEditor∟MT
:1→dim(∟MT
:" →Str7
:41→R:72→S:94→N:0→D:41→A
:67→C:21→D:R→A
:sub("123456",Z,1→Str8
:expr("∟P"+Str8+"(3")→I
:expr("∟P"+Str8+"(9")→J
:expr("∟P"+Str8+"(15")→θ
:expr("∟P"+Str8+"(21")→V
:If max(I={26,28,48,125,132,140,146}) or max(J={26,28,48,125,132,140,146}) or max(θ={26,28,48,125,132,140,146}) or max(V={26,28,48,125,132,140,146:Then
:If max(26={I,J,θ,V:Then
:D+6→D:A-6→A
:A→R
:If length(Str7)>1:Then
:Str7+"CUT/→Str7
:Else
:"CUT/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:26→∟MT(dim(∟MT
:End
:If max(28={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"DIG/"→Str7
:Else
:"DIG/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:28→∟MT(dim(∟MT
:End
:If max(48={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"FLY/→Str7
:Else
:"FLY/→Str7
:End
:dim(∟MT)+1→∟MT(dim(∟MT
:48→∟MT(dim(∟MT
:End
:If max(125={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:C-20→C:S-20→S
:If length(Str7)>1:Then
:Str7+"SOFTBOILED/→Str7
:Else
:"SOFTBOILED/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:125→∟MT(dim(∟MT
:End
:If max(132={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If S>52:Then:S-12→S:C-12→C:End
:If length(Str7)>1:Then
:Str7+"STRENGTH/"→Str7
:Else
:"STRENGTH/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:132→∟MT(dim(∟MT
:End
:If max(140={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"SURF/"→Str7
:Else
:"SURF/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:140→∟MT(dim(∟MT
:End
:If max(146={I,J,θ,V:Then
:If S≠60:Then:S-12→S:C-12→C:End
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"TELEPORT/"→Str7
:Else
:"TELEPORT/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:146→∟MT(dim(∟MT
:End
:End
:If length(Str7)>1:Then
:Str7+"STATS/MOVE/BACK/+→Str7
:dim(∟MT)+1→dim(∟(T
:‾1→∟MT(dim(∟MT
:dim(∟MT)+1→dim(∟MT
:‾2→∟MT(dim(∟MT
:dim(∟MT)+1→dim(∟MT
:‾3→∟MT(dim(∟MT
:End
:
:If length(Str7)=1:Then
:‾{1,2,3→∟MT
:"STATS/MOVE/BACK/+→Str7
:End
:
:
:For(θ,0,D+4
:Line(C-4,θ,94,θ,0
:End
:
:1→F:1→E:W→B
:‾1→W
:While W=‾1
:inString(Str7,"/",F→E
:inString(Str7,"+",1→N
:If E<N:Then
:E-F+1→E
:Text(R,S,sub(Str7,F,E-1
:R+6→R
:F+E→F
:End
:If F≥N
:B→W
:End
:End
:
:If N=2:Then
Generated by SourceCoder, © 2005-2010 Cemetech
This is an automatic post from SourceCoder 2. Report abuse to admin@cemetech.net . You can disable these posts by unchecking the "Post on Update" box in the file's permissions.
_________________

SourceCoder 2
http://sc.cemetech.net
Back to top
KermMartian


Site Admin


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

Posted: 12 Jun 2010 05:23:51 pm    Post subject:

I don't see anything horribly terribly unoptimized to change in that; what's your rewrite going to entail? Kudos for using SourceCoder to its full potential. Very Happy
_________________


Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 12 Jun 2010 05:27:33 pm    Post subject:

Part of it has to do with this:


Code:
:If length(Str7)>1:Then
:Str7+"CUT/→Str7
:Else
:"CUT/→Str7
:End


I don't need to do that. I can simply add to the string on each bit, and then remove that space at the end of that before I go displaying the text. That will save a tremendous amount of space.

And I am sure I can squeeze more out of it else where. :p I need to update the variables, as some of them aren't being used, and I would like to keep it that way if I can help it.
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 13 Jun 2010 09:42:10 pm    Post subject:

So, an optimizing help if someone would care to try?


Code:
:If max(I={26,28,48,125,132,140,146}) or max(J={26,28,48,125,132,140,146}) or max(θ={26,28,48,125,132,140,146}) or max(V={26,28,48,125,132,140,146


Been sitting here looking at it, and nothing really comes to mind to optimize. Anyone care to give it a shot?

Edit:

Aaaand, never mind, I think I figured it out by myself. Inspiration is such a silly thing. XD

Edit2:

Essentially this now:


Code:
max({I,J,V,θ}=max({26,28,48,125,132,140,146


Seems to work. going to test more tomorrow.

Edit3:

Upon further testing, it seemed to fail.

suggestions?
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.


Last edited by tifreak8x on 13 Jun 2010 09:55:57 pm; edited 1 time in total
Back to top
KermMartian


Site Admin


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

Posted: 13 Jun 2010 09:52:18 pm    Post subject:

That definitely shouldn't work correctly if I'm thinking about this right. Working inside out for the expression:

Code:
max({I,J,V,θ}=max({26,28,48,125,132,140,146

First we look at max({26,28,48,125,132,140,146, which must always return the number 146 if you typed it the same way it is on your calculator. This reduces it to:

Code:
max({I,J,V,θ}=146

Hence, your code is successfully checking all four variables against 146, but not against the whole list of values (as long as I haven't brain-failed).
_________________


Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 13 Jun 2010 09:55:29 pm    Post subject:

You are right, dangit. It seemed to work with different values, but now it doesn't. Bleh. *goes and edits the other post*
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
Back to top
KermMartian


Site Admin


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

Posted: 13 Jun 2010 10:17:50 pm    Post subject:

tifreak8x wrote:
You are right, dangit. It seemed to work with different values, but now it doesn't. Bleh. *goes and edits the other post*
So it seems to me that the best way to do this (in **size** terms) would be a handy use of seq(). Do you have an objection to this; are you going for speed instead? Actually, here's an even easier method that doesn't use seq:


Code:
:{26,28,48,125,132,140,146
:If max(I=Ans)+max(J=Ans)+max(θ=Ans)+max(V=Ans


The seq code would need to construct a 7*4 length list containing {I I I I I I I J J J J J J J θ θ θ θ θ θ θ V V V V V V V} and use augment 3 times to create {26,28,48,125,132,140,146,26,28,48,125,132,140,146,26,28,48,125,132,140,146,26,28,48,125,132,140,146}.
_________________


Back to top
calc84maniac


Epic z80 roflpwner


Joined: 01 Aug 2006
Posts: 1503
Location: The ex-planet Pluto

Posted: 13 Jun 2010 11:31:50 pm    Post subject:

Or even better:

Code:
:{26,28,48,125,132,140,146
:If max(I=Ans or J=Ans or θ=Ans or V=Ans

_________________
~calc84maniac has spoken.

Projects:
TI-Boy SE
F-Zero
Super Mario (aka Project M)
Back to top
KermMartian


Site Admin


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

Posted: 13 Jun 2010 11:39:04 pm    Post subject:

calc84maniac wrote:
Or even better:

Code:
:{26,28,48,125,132,140,146
:If max(I=Ans or J=Ans or θ=Ans or V=Ans
Ah, of course, my mistake on missing that one. I'd still like to try the seq() idea for elegance, but I don't think I could make it smaller than that.
_________________


Back to top
calc84maniac


Epic z80 roflpwner


Joined: 01 Aug 2006
Posts: 1503
Location: The ex-planet Pluto

Posted: 13 Jun 2010 11:40:54 pm    Post subject:

Hmm, just realized a way to save a byte:

Code:
:2{13,14,24,62.5,66,70,73
:If max(I=Ans or J=Ans or θ=Ans or V=Ans

_________________
~calc84maniac has spoken.

Projects:
TI-Boy SE
F-Zero
Super Mario (aka Project M)
Back to top
SourceCoder2


New Member


Joined: 10 Apr 2006
Posts: 78

Posted: 14 Jun 2010 12:00:40 am    Post subject:

ZSMOLD
KermMartian has just edited this program. The source code now reads:
BASIC Code wrote:
:If X=1:Then
:SetUpEditor∟MT
:1→dim(∟MT
:" →Str7
:41→R:72→S:94→N:0→D:41→A
:67→C:21→D:R→A
:sub("123456",Z,1→Str8
:expr("∟P"+Str8+"(3")→I
:expr("∟P"+Str8+"(9")→J
:expr("∟P"+Str8+"(15")→θ
:expr("∟P"+Str8+"(21")→V
:2{13,14,24,62.5,66,70,73
:If max(I=Ans or J=Ans or θ=Ans or V=Ans:Then
:If max(26={I,J,θ,V:Then
:D+6→D:A-6→A
:A→R
:If length(Str7)>1:Then
:Str7+"CUT/→Str7
:Else
:"CUT/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:26→∟MT(dim(∟MT
:End
:If max(28={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"DIG/"→Str7
:Else
:"DIG/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:28→∟MT(dim(∟MT
:End
:If max(48={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"FLY/→Str7
:Else
:"FLY/→Str7
:End
:dim(∟MT)+1→∟MT(dim(∟MT
:48→∟MT(dim(∟MT
:End
:If max(125={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:C-20→C:S-20→S
:If length(Str7)>1:Then
:Str7+"SOFTBOILED/→Str7
:Else
:"SOFTBOILED/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:125→∟MT(dim(∟MT
:End
:If max(132={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If S>52:Then:S-12→S:C-12→C:End
:If length(Str7)>1:Then
:Str7+"STRENGTH/"→Str7
:Else
:"STRENGTH/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:132→∟MT(dim(∟MT
:End
:If max(140={I,J,θ,V:Then
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"SURF/"→Str7
:Else
:"SURF/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:140→∟MT(dim(∟MT
:End
:If max(146={I,J,θ,V:Then
:If S≠60:Then:S-12→S:C-12→C:End
:D+6→D:A-6→A:A→R
:If length(Str7)>1:Then
:Str7+"TELEPORT/"→Str7
:Else
:"TELEPORT/→Str7
:End
:dim(∟MT)+1→dim(∟MT
:146→∟MT(dim(∟MT
:End
:End
:If length(Str7)>1:Then
:Str7+"STATS/MOVE/BACK/+→Str7
:dim(∟MT)+1→dim(∟(T
:‾1→∟MT(dim(∟MT
:dim(∟MT)+1→dim(∟MT
:‾2→∟MT(dim(∟MT
:dim(∟MT)+1→dim(∟MT
:‾3→∟MT(dim(∟MT
:End
:
:If length(Str7)=1:Then
:‾{1,2,3→∟MT
:"STATS/MOVE/BACK/+→Str7
:End
:
:
:For(θ,0,D+4
:Line(C-4,θ,94,θ,0
:End
:
:1→F:1→E:W→B
:‾1→W
:While W=‾1
:inString(Str7,"/",F→E
:inString(Str7,"+",1→N
:If E<N:Then
:E-F+1→E
:Text(R,S,sub(Str7,F,E-1
:R+6→R
:F+E→F
:End
:If F≥N
:B→W
:End
:End
:
:If N=2:Then
Generated by SourceCoder, © 2005-2010 Cemetech
This is an automatic post from SourceCoder 2. Report abuse to admin@cemetech.net . You can disable these posts by unchecking the "Post on Update" box in the file's permissions.
_________________

SourceCoder 2
http://sc.cemetech.net
Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 14 Jun 2010 08:54:13 am    Post subject:

Thanks gents. Hoping I will be able to post the new source up later in the next few days.
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
Back to top
KermMartian


Site Admin


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

Posted: 14 Jun 2010 11:47:44 am    Post subject:

tifreak8x wrote:
Thanks gents. Hoping I will be able to post the new source up later in the next few days.
Is there a reason you have closing quotes and parentheses on those four expr lines where you initially assign I, J, Theta, and V?
_________________


Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 14 Jun 2010 12:04:35 pm    Post subject:

None that I recall. Code is over 2 years old, I think at the time it was more a 'better safe than sorry' bit. *shrugs*

It's omitted from the newer code I am working on.
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
Back to top
KermMartian


Site Admin


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

Posted: 14 Jun 2010 12:13:48 pm    Post subject:

tifreak8x wrote:
None that I recall. Code is over 2 years old, I think at the time it was more a 'better safe than sorry' bit. *shrugs*

It's omitted from the newer code I am working on.
That makes sense. At any rate, I look forward to this new code that's coming soon.
_________________


Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 05 Jul 2010 08:47:48 am    Post subject:

http://sc.cemetech.net/?xpi=14198ccae6c73f5fdd161469e142f2cf

This code that posts up is the newer version of the party menu creator. It is slow, one thing of it I will have to fix.

The other aspect is that the calc I am testing on completely ignores a section of code. I will post that section up once source coder posts..
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
Back to top
SourceCoder2


New Member


Joined: 10 Apr 2006
Posts: 78

Posted: 05 Jul 2010 08:48:54 am    Post subject:

ZSM
tifreak8x has just edited this program. The source code now reads:
BASIC Code wrote:
:SetUpEditor∟MT
:1→dim(∟MT
:41→G:72→K:94→N:0→O:G→A:67→C:21→D
:If H=1:Then
:sub("123456",iPart(Z),1→Str7
:expr("∟P"+Str7+"(3→I
:expr("∟P"+Str7+"(4→J
:expr("∟P"+Str7+"(5→θ
:expr("∟P"+Str7+"(6→Q
:2{13,14,24,62.5,66,70,73
:If max(I=Ans or J=Ans or θ=Ans or Q=Ans:Then
:If max(26={I,J,θ,Q:Then
:D+6→D:A-6→A:A→G
:Str7+"CUT/→Str7
:dim(∟MT)+1→dim(∟MT
:26→∟MT(dim(∟MT
:End
:If max(28={I,J,θ,Q:Then
:D+6→D:A-6→A:A→G
:Str7+"DIG/→Str7
:dim(∟MT)+1→dim(∟MT
:28→∟MT(dim(∟MT
:End
:If max(48={I,J,θ,Q:Then
:D+6→D:A-6→A:A→G
:Str7+"FLY/→Str7
:dim(∟MT)+1→dim(∟MT
:48→∟MT(dim(∟MT
:End
:If max(125={I,J,θ,Q:Then
:D+6→D:A-6→A:A→G
:C-20→C:K-20→K
:Str7+"SOFTBOILED/→Str7
:dim(∟MT)+1→dim(∟MT
:125→∟MT(dim(∟MT
:End
:If max(132={I,J,θ,Q:Then
:D+6→D:A-6→A:A→G
:If K>52:Then:K-12→K:C-12→C:End
:Str7+"STRENGTH/→Str7
:dim(∟MT)+1→dim(∟MT
:132→∟MT(dim(∟MT
:End
:If max(140={I,J,θ,Q:Then
:D+6→D:A-6→A:A→G
:Str7+"SURF/→Str7
:dim(∟MT)+1→dim(∟MT
:140→∟MT(dim(∟MT
:End
:If max(146={I,J,θ,Q:Then
:If S≠60:Then:K-12→K:C-12→C:End
:D+6→D:A-6→A:A→G
:Str7+"TELEPORT/→Str7
:dim(∟MT)+1→dim(∟MT
:146→∟MT(dim(∟MT
:End:End:End
:If H=1 or H=2:Then
:Str7+"STATS/MOVE/BACK/+*→Str7
:If dim(∟MT)=1:‾{1,2,3→∟MT
:If dim(∟MT)>1:Then
:dim(∟MT)+3→dim(∟MT
:‾1→∟MT(dim(∟MT)-2
:‾2→∟MT(dim(∟MT)-1
:‾3→∟MT(dim(∟MT:End:End
:If H=1 or H=2:Then
:sub(Str7,3,length(Str7)-2
:
:For(F,0,D+4)
:Line(C-4,θ,94,θ,0
:End:End
:"0ZBD
:prgmZRS
:{N,O,C,D
:prgmTEMP
:prgmZC1
:1→F:W→θ:‾1→W
:While W=‾1
:inString(Str7,"/",F→I%
:inString(Str7,"+",1→N
:If I%>0:Then
:(I%-F)+1→I%
:Text(G,K,sub(Str7,F,I%-1
:G+6→G:F+I%→F
:End
:If I%<0:θ→W:End
Generated by SourceCoder, © 2005-2010 Cemetech
This is an automatic post from SourceCoder 2. Report abuse to admin@cemetech.net . You can disable these posts by unchecking the "Post on Update" box in the file's permissions.
_________________

SourceCoder 2
http://sc.cemetech.net
Back to top
tifreak8x


Guru


Joined: 16 Mar 2005
Posts: 9104
Location: Sol System

Posted: 05 Jul 2010 08:50:57 am    Post subject:


Code:
:If H=1 or H=2:Then
:sub(Str7,3,length(Str7)-2
:
:For(F,0,D+4)
:Line(C-4,θ,94,θ,0
:End:End


This bit here, it is completely and utterly ignored by the calculator, in the sense it refuses to actually run it. I can take this code outside of the program and run it to make it work, but the program itself will not run it.

The calc is an 83+, using OS 1.17, which I know is not a good OS..

Not sure if this is limited to the OS yet or not. Going to dig out a different 83+ soon and test on it.

I have also tried leaving out the If H=1 and H=2:Then ... :End bits, but it still ignores it. Also, the sub string should be:

sub(Str7,2,length(Str7)-1

I tried it at sub(Str7,3,length(Str7)-1 and it errored properly, but it will not run inside the program.

Thoughts?
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
Back to top
KermMartian


Site Admin


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

Posted: 05 Jul 2010 09:43:47 am    Post subject:

Not a clue, sorry. Sad I think trial-and-error to track down the precise condition that causes it to ignore that would be your best bet. Regarding the code about that SC2 posted, I feel like there must be a way to take advantage of all the symmetry in those If statements to combine them.
_________________


Back to top
Display posts from previous:   
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » 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.051869 seconds.