I am trying to port this project to ICE for the CE Graphing Calculator https://www.cemetech.net/downloads/files/2632/x3386
I need help with this project here is my existing code:

prgm BUBLSPRT:

Code:

DefineSprite(10,10,"FFFF1E1E1E1E1E1EFFFFFF1E1E1E1E1E1F1F1EFF1E1E1E1F1F1E1E1E1F1E1E1E1E1F1F1E1E1E1F1E1E1E1E1F1F1E1E1E1E1E1E1E1E1E1F1F1F1E1E1E1E1F1E1E1E1F1F1E1E1E1E1F1F1E1E1E1E1E1E1EFF1E1F1F1F1F1F1E1EFFFFFF1E1E1E1E1E1EFFFF")→WHOLE
DefineSprite(10,10,"FFFF1D1E1F1F1E1EFFFFFF1D1D1D1E1F1E1E1DFF1E1E1D1D1F1E1D1D1E1E1F1F1E1D1E1D1D1F1F1F1E1F1D1D1D1D1D1D1F1E1E1D1D1D1D1D1D1D1D1D1D1D1D1E1D1D1D1D1F1E1D1E1F1E1E1E1D1D1E1FFF1E1F1F1F1F1E1D1DFFFFFF1E1E1E1E1E1DFFFF")→POPPED


main src:

Code:

BUBBLE
det(0
det(5,23
det(75,255
AsmComp(BUBLSPRT
"111111→Str1
"111111→Str2
"111111→Str3
"111111→Str4
"111111→Str5
//these 2 for loops are the initial rendering
For(X,0,4
For(Y,0,5
det(63,WHOLE,40*X,40*Y,4,4
End
End
Repeat K=56

Repeat K≠0
getKey→K
End

//everything below this to next comment is how i gather keypress
For(I,42,47,­1
I-41→C
If K=I
If C=1
"0"+sub(Str1,2,5)→Str1
End
If C>1 and C<6
sub(Str1,C-1,1)+"0"+sub(Str1,C+1,length(Str1)-C)→Str1
End
If C=6
sub(Str1,1,5)+"0"→Str1
End
End
End

For(I,34,39,­1
I-33→C
If K=I
If C=1
"0"+sub(Str2,2,5)→Str2
End
If C>1 and C<6
sub(Str2,C-1,1)+"0"+sub(Str2,C+1,length(Str2)-C)→Str2
End
If C=6
sub(Str2,1,5)+"0"→Str2
End
End
End

For(I,26,31,­1
I-25→C
If K=I
If C=1
"0"+sub(Str3,2,5)→Str3
End
If C>1 and C<6
sub(Str3,C-1,1)+"0"+sub(Str3,C+1,length(Str3)-C)→Str3
End
If C=6
sub(Str3,1,5)+"0"→Str3
End
End
End

For(I,18,23,­1
I-17→C
If K=I
If C=1
"0"+sub(Str4,2,5)→Str4
End
If C>1 and C<6
sub(Str4,C-1,1)+"0"+sub(Str4,C+1,length(Str4)-C)→Str4
End
If C=6
sub(Str4,1,5)+"0"→Str4
End
End
End

For(I,10,15,­1
I-9→C
If K=I
If C=1
"0"+sub(Str5,2,5)→Str5
End
If C>1 and C<6
sub(Str5,C-1,1)+"0"+sub(Str5,C+1,length(Str5)-C)→Str5
End
If C=6
sub(Str5,1,5)+"0"→Str5
End
End
End

//everything below this is rendering algorithm this is what i am having the most problems with
For(Y,1,6
If sub(Str1,Y,1)="1"
det(63,WHOLE,0,40*Y,4,4
Else
det(63,POPPED,0,40*Y,4,4
End
End

For(Y,1,6
If sub(Str2,Y,1)="1"
det(63,WHOLE,40,40*Y,4,4
Else
det(63,POPPED,40,40*Y,4,4
End
End

For(Y,1,6
If sub(Str3,Y,1)="1"
det(63,WHOLE,80,40*Y,4,4
Else
det(63,POPPED,80,40*Y,4,4
End
End

For(Y,1,6
If sub(Str4,Y,1)="1"
det(63,WHOLE,120,40*Y,4,4
Else
det(63,POPPED,120,40*Y,4,4
End
End

For(Y,1,6
If sub(Str4,Y,1)="1"
det(63,WHOLE,160,40*Y,4,4
Else
det(63,POPPED,160,40*Y,4,4
End
End
End


Edit tell me what the heck is wrong with this code and how to fix it we'll deal with optimization later
Quote:
tell me what the heck is wrong with this code
Can you be more specific with your question? Is something going wrong with it? What are the symptoms?
Ignore the old code its not even worth trying to fix instead I'm working on trying to figure out how to map keys to coordinates.
Edit: only some of the old code is salvageable
Edit 2: alright i need help

Code:

BUBBLE
det(0
det(5,23
det(75,255
AsmComp(BUBLSPRT
For(X,0,4
For(Y,0,5
det(63,WHOLE,40*X,40*Y,4,4
End
End
Repeat K=56

Repeat K≠0
getKey→K
End

//everything after this is the problem code the problem itself is the code is just plain not doing anything Edit: if it helps this code is supposed to put a sprite at the coordinates corresponding to the pressed key
For(I,42,47,­1
I-42→C
If K=I
det(63,POPPED,40*C,0,4,4
End
End

For(I,34,39,­1
I-39→C
If K=I
det(63,POPPED,40*C,40,4,4
End
End

For(I,26,31,­1
I-31→C
If K=I
det(63,POPPED,40*C,80,4,4
End
End

For(I,18,23,­1
I-23→C
If K=I
det(63,POPPED,40*C,120,4,4
End
End

For(I,10,15,­1
I-15→C
If K=I
det(63,POPPED,40*C,160,4,4
End
End

End


Edit: problem solved now time to add counters and other things that will make this port more faithful to the original

Code:

BUBBLE
det(0
det(5,23
det(75,255
AsmComp(BUBLSPRT
For(X,0,4
For(Y,0,5
det(63,WHOLE,40*X,40*Y,4,4
End
End
Repeat K=56

Repeat K≠0
getKey→K
End

If K≥42 and K≤47
K-42→C
5-C→C
det(63,POPPED,0,40*C,4,4
End

If K≥34 and K≤39
K-34→C
5-C→C
det(63,POPPED,40,40*C,4,4
End

If K≥26 and K≤31
K-26→C
5-C→C
det(63,POPPED,80,40*C,4,4
End

If K≥18 and K≤23
K-18→C
5-C→C
det(63,POPPED,120,40*C,4,4
End

If K≥10 and K≤15
K-10→C
5-C→C
det(63,POPPED,160,40*C,4,4
End

End
Unfortunately I have lost the src 😭😭 however I opened up hexaedit and found what I believe to be the prgm header in RAM there was 2 apearences of the prgm name I accidentally deleted the second apearence I will post the hex when I get time however if it’s irreparable then I will let someone else finish the project for me with the most usable copy of the src
Edit: this means that the prgm probably exists but doesn’t show up in cesium and I need an EXPERT on calc memory to repair the header then restore it as a prgm by removing whatever tag tells the calc that the prgm is able to be overwritten

actually I might not have deleted the second appearance of the prgm name also here is the hex code in case anyone want to pick apart calculator memory at 12 am

Code:

00 00 00 00 00 42 55 42 4c 53 52 43 00 00 00 00 00 00 00 00 00 00 42 55 42 4c 53 52 43 00 00 00 00 00 00 00 00 00 00 00 00 d0 bd a7 d1 47 dd

Edit: Over the weekend i was messing around with hexaedit and i realized that it was just an artifact caused by hexaedit trying to find the prgm name in RAM so this project is offically free foranyone else to pickup from me finish and publish on the archives (with credit of course)
I have decided to resume work on this project 😁 I have made it this far using the most recent backup:

Code:

BUBBLE
0→P
0→S
minY105,15)→BUFFA
minY105,15)→BUFFB
det(0
det(9,1
det(5,23
det(61,BUFFA,215,30
det(61,BUFFB,215,85
det(75,255
det(2,24
det(36,200,0,5,240
det(36,205,50,115,5
det(36,205,105,115,5

det(74,2,2
det(21,148
det(18,"Popped",216,6
det(18,"Sheets",216,61
det(21,1
det(18,"Popped",215,5
det(18,"Sheets",215,60

AsmComp(BUBLSPRT
Lbl RESET
For(X,0,4
For(Y,0,5
det(63,WHOLE,40*X,40*Y,4,4
End
End
det(11,1
Repeat K=51

det(2,255
det(57,BUFFA,215,30
det(57,BUFFB,215,85
det(21,148
det(18,"",216,31
det(15,P,6
det(18,"",216,86
det(15,S,6
det(21,1
det(18,"",215,30
det(15,P,6
det(18,"",215,85
det(15,S,6
det(11,1

Repeat K≠0
getKey→K
End

If K=54
S+1→S
Goto RESET
End

If K≥42 and K≤47
P+1→P
K-42→C
5-C→C
det(63,POPPED,0,40*C,4,4
End

If K≥34 and K≤39
P+1→P
K-34→C
5-C→C
det(63,POPPED,40,40*C,4,4
End

If K≥26 and K≤31
P+1→P
K-26→C
5-C→C
det(63,POPPED,80,40*C,4,4
End

If K≥18 and K≤23
P+1→P
K-18→C
5-C→C
det(63,POPPED,120,40*C,4,4
End

If K≥10 and K≤15
P+1→P
K-10→C
5-C→C
det(63,POPPED,160,40*C,4,4
End

End
det(1

Edit: so far it doesn't have a way to stop you from popping already popped bubbles so it will count when you try to pop a popped bubble, I believe I will have a very challenging time trying to change this, in order to do that though I will have to figure out how to detect if a bubble is already popped
I believe I am finished with this project it is in a state that is worthy of the archives, I will be trying to submit it soon but for now here is the source code:

Code:

BUBBLE
0→P
0→S
minY105,15)→BUFFA
minY105,15)→BUFFB
det(0
det(9,1
det(5,23
det(61,BUFFA,215,30
det(61,BUFFB,215,85
det(75,255
det(2,24
det(36,200,0,5,240
det(36,205,50,115,5
det(36,205,105,115,5
det(2,56

det(74,2,2
det(21,148
det(18,"Popped",216,6
det(18,"Sheets",216,61
det(21,1
det(18,"Popped",215,5
det(18,"Sheets",215,60

AsmComp(BUBLSPRT
Lbl RESET
For(X,0,4
For(Y,0,5
det(63,WHOLE,40*X,40*Y,4,4
End
End
det(11,1
Repeat K=51

det(57,BUFFA,215,30
det(57,BUFFB,215,85
det(21,148
det(18,"",216,31
det(15,P,6
det(18,"",216,86
det(15,S,6
det(21,1
det(18,"",215,30
det(15,P,6
det(18,"",215,85
det(15,S,6
det(11,1

Repeat K≠0
getKey→K
End

If K=54
det(2,24
det(36,200,0,5,6
det(2,56
S+1→S
Goto RESET
End

If K≥42 and K≤47
K-42→C
5-C→C
If det(7,200,C)=24
det(63,POPPED,0,40*C,4,4
det(6,200,C
P+1→P
End
End

If K≥34 and K≤39
K-34→C
5-C→C
If det(7,201,C)=24
det(63,POPPED,40,40*C,4,4
det(6,201,C
P+1→P
End
End

If K≥26 and K≤31
K-26→C
5-C→C
If det(7,202,C)=24
det(63,POPPED,80,40*C,4,4
det(6,202,C
P+1→P
End
End

If K≥18 and K≤23
K-18→C
5-C→C
If det(7,203,C)=24
det(63,POPPED,120,40*C,4,4
det(6,203,C
P+1→P
End
End

If K≥10 and K≤15
K-10→C
5-C→C
If det(7,204,C)=24
det(63,POPPED,160,40*C,4,4
det(6,204,C
P+1→P
End
End

End
det(1
Nice work, do you have any screenshots of it in action?
Nah, not yet maybe soon though.
Edit:
Hey that is looking really nice, great work!
  
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 1 of 1
» 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