This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Xeda112358
Pages: 1 ... 58 59 [60] 61 62 ... 317
886
« on: June 22, 2013, 08:41:13 am »
That is a good idea. So when the user uses a For(, Then, While , or Repeat , automatically follow it by an End. Hopefully I will put together a decent solution. I am thinking that all I really need to do is keep track of the indent level at the last displayed line and the first.
887
« on: June 21, 2013, 06:54:13 pm »
That was one idea I was thinking of, but that could get hectic when lines get inserted or removed, or especially when something like a While statement is inserted or an End statement is deleted. My other idea was to choose 4,8, or 16 points in the program and record the indent level their. Then instead of scanning all of the code, just start scanning from the closest recorded position. My final idea is to toss it out entirely
888
« on: June 21, 2013, 05:48:39 pm »
Based on code that Matrefeytontias gave me, I put together a plasma program in assembly I am pleased with the speed, but it can be made a bit faster. First, I am using the OS bcall _GrBufCpy which is not that fast, and second, if I include a custom routine, it will be interleaved with the program so updating the LCD will cost almost no extra time. Using some mathy things and Wabbit's code counter, I estimate cutting out 167000 t-states every loop by ditching the OS routine and using an interleaved routine. Anyways, here is what it looks like at 6MHz and the code I through together for this first version #include "ti83plus.inc" #define progStart $9D95 .org progStart-2 .db $BB,$6D MainLoop: .db 3Eh ;start of ld a,* smc_index: .db 0 inc a and 1Fh ld (smc_index),a ld hl,LUT add a,l jr nc,$+3 inc h ld l,a ld c,(hl) .db 16h ;ld d,* smc_yskew: .db 40 call C_div_D ld a,c ; ld a,(hl) ; rlca \ rlca \ rlca \ and 7 ld (smc_ycomponent),a
ld a,(smc_index) add a,a .db $C6 smc_var1: .db 0 and 31 ld hl,LUT add a,l jr nc,$+3 inc h ld l,a ld c,(hl) .db 16h ;ld d,* smc_xskew: .db 32 call C_div_D ld a,c ; ld a,(hl) ; rlca \ rlca \ rlca \ and 7 ld (smc_xcomponent),a ld ix,933Fh ld hl,0 while_y_lt_32: ld a,l .db $C6 smc_ycomponent: .db 0 and 31 ld de,LUT add a,e jr nc,$+3 inc d ld e,a ld a,(de) ld (smc_m),a while_x_lt_48: ld a,h .db $C6 ;add a,* smc_xcomponent: .db 0 and 31 ld de,LUT add a,e jr nc,$+3 inc d ld e,a ld a,(de) .db $C6 smc_m: .db 0 ld b,0 jr nc,$+3 inc b ld c,a push bc ld de,(smc_ycomponent) ld a,(smc_xcomponent) add a,e add a,h add a,l ld c,a ld a,(smc_index) add a,c and 31 ld de,LUT add a,e jr nc,$+3 inc d ld e,a ld a,(de) pop bc add a,c jr nc,$+3 inc b rr b \ rra rr b \ rra ld b,a ;color ld a,h \ and 3 jr nz,$+10 inc ix ld (ix),a ld (ix+12),a rl (ix) \ rl (ix) rl (ix+12) \ rl (ix+12) ld a,b cp 144 \ jr nc,$+5 inc (ix) cp 96 \ jr nc,$+8 inc (ix+12) inc (ix+12) cp 48 \ jr nc,$+11 inc (ix+12) inc (ix) inc (ix) inc h ld a,h cp 48 jr nz,while_x_lt_48 ld h,0 ld de,12 add ix,de inc l ld a,l cp 32 jp nz,while_y_lt_32
bcall(486Ah) bcall(4744h) cp 15 ret z ld hl,(smc_xskew) ld de,(smc_yskew) ld bc,(smc_var1) cp 3 jr nz,$+3 inc l cp 2 jr nz,$+3 dec l cp 1 jr nz,$+3 inc e cp 4 jr nz,$+3 dec e cp 10 jr nz,$+3 inc c cp 11 jr nz,$+3 dec c ld a,c and 31 ld (smc_var1),a ld a,e cp 64 jr nc,$+5 ld (smc_yskew),a ld a,l cp 64 jr nc,$+5 ld (smc_xskew),a jp MainLoop
LUT: .db 255,254,246,234,219,199,177,153,128,103,79,57,37,22,10,2,0,2,10,22,37,57,79,103,128,153,177,199,219,234,246,254 C_Div_D: ;Inputs: ; C is the numerator ; D is the denominator ;Outputs: ; A is the remainder ; B is 0 ; C is the result of C/D ; D,E,H,L are not changed ;
xor a sla c rla sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d jr c,$+4 inc c sub d sla c rla cp d ret c inc c sub d ret
Controls: Arrows change the skew value. I actually have no idea what effect these have except that small number produce more noticeable effects. The upper limit is 63, I think the lower limit is 0 (which will result in dividing by 0). + and - change a value to, and I also don't know precisely how that value is changing things.
889
« on: June 21, 2013, 05:09:12 pm »
I still have it open here. If that isn't working: :.PLASMA :.by KKI+MAT :.Full :.Precalculs :det(256)→C :For(A,0,255) : 127+cos(A*256/32)→{A+C} :End :0→Θ :Repeat getKey(15) : L6-1→P+12→Q : Θ+1^32→Θ : {Θ*2+24+C}/40→D : {Θ+C}/32→E : .Lignes : 0→Y : Lbl YH : .Precalculs : {Y+E+C}→M : .Colonnes : 0→X : Lbl XW : .Couleur : M+{X+D+C} : +{X+Y+D+E/2+Θ+C}→Z : .Init/Decale : !If X^4 : P+++12→Q : 0→{P}:0→{Q} :Else : {P}*4→{P} : {Q}*4→{Q} :End :If Z≤192 : {P}+3→{P} :{Q}+3→{Q} :ElseIf Z≤384 : {P}++ :{Q}+2→{Q} :ElseIf Z≤576 : {P}++ :End :If X++-48 : Goto XW :End :If Y++-32 : P+12→P+12→Q :Goto YH :End :DispGraph :.Output(0,0,A►Dec,{A+S}►Dec :End
890
« on: June 21, 2013, 03:24:55 pm »
Yay, necro post for an update I asked Matrefeytontias for the source to this program because I was thinking of ways to optimise this. I was originally planning to turn a bunch of it directly into assembly, but for those that like pure Axe, I have this. First, the original program was 900 bytes of compiled code and ran at about 3.9 FPS. This version is 502 bytes, ~3.8 FPS: :.PLASMA :.by KKI+MAT :.Full :.Precalculs :[FFFDF5E9DAC6B0987F664E38241509010001091524384E667F98B0C6DAE9F5FD]→GDB2 :0→θ :Repeat getKey(15) :L6-1→P :L6+11→Q :θ+1 and 31→θ :{θ*2+24 and 31+GDB2}*8/256→D :{θ+GDB2}*8/256→E :.Lignes :‾1→Y :While Y++-32 :.Precalculs :{Y+E and 31+GDB2}→M :.Colonnes :‾1→X :While X++-48 :.Couleur :M+{X+D and 31+GDB2} :+{X+Y+D+E/2+θ and 31+GDB2}→Z :.Init/Decale :!If X and 3 :0→{P++} :0→{Q++} :Else :{P}*4→{P} :{Q}*4→{Q} :End :If Z≤576 :{P}++ :End :If Z≤384 :{Q}++ :{}++ :End :If Z≤192 :{Q}++ :{P}++ :{}++ :End :End :P+12→P+12→Q :End :DispGraph :End
And I am sure there are some obvious optimisations left, but I am not that great of an Axe programmer For those that want a little more speed and size optimisations, I included assembly code in this version: 450 bytes compiled, ~4.8 FPS :.PLASMAZ :.by KKI+MAT :.Full :.Precalculs :[FFFDF5E9DAC6B0987F664E38241509010001091524384E667F98B0C6DAE9F5FD]→GDB2 :0→θ :Repeat getKey(15) :L6-1→P :L6+11→Q :θ+1 and 31→θ :Asm(7D87C618E61F6F)+GDB2 :Asm(7E070707E6076F2600)→D :θ+GDB2 :Asm(7E070707E6076F2600)→E :.Lignes :‾1→Y :While Y++-32 :.Precalculs :{Y+E and 31+GDB2}→M :.Colonnes :‾1→X :While X++-48 :.Couleur :M+{X+D and 31+GDB2} :+{X+Y+D+E/2+θ and 31+GDB2} :*4→Z :.Z=256*{0,3,6,9} :.Init/Decale :!If X and 3 :P++Asm(3600) :Q++Asm(3600) :Else :PAsm(CB26CB26) :QAsm(CB26CB26) :End :Z :Asm(7C) :Asm(FE093004) :PAsm(34) :Asm(FE063005 :QAsm(3434) :Asm(FE033006) :Asm(34) :PAsm(3434) :End :P+12→P+12→Q :End :DispGraph :End
It has also come to my attention that some of the Axe code that I replaced with Assembly compiles to the same thing. Note that the code was compiled with Axe v1.2.1 and run at 6MHz
891
« on: June 21, 2013, 09:28:53 am »
@Sorunome: I saw the link. Unfortunately, the readme doesn't equate the real( commands to tokens, so instead just opened the source and found the code for the menu. I now need to add in the DoorcSC7 commands, BatLib commands, and make a separate hook for Axe, Grammer 2, and whole token set for Grammer 3.
I have some goals for today and hopefully I will get something more useful done.
892
« on: June 20, 2013, 11:14:43 pm »
@DJ_O: That is the main reason for why I want to keep it separate. For people that only want to use Grammer 3 programs, the extra flash page for the editor is kind of a waste. Whereas for developers, it is useful. Plus, the editor app should be functional on its own. That said, I only have 5800 bytes of code space left and I haven't even started the editing part of the editor I will probably remove the variable width font and if users really want to use such a font, they can load their own. Also, for the indenting, I have come into a problem that I am trying to fix. Trying to scroll backwards isn't working very nicely at the moment for the indents, but I am hoping that I will have a fix. However, the perfect solution might cause a hit to speed for the editor (scanning all of the code before it to figure out the indent). For now, here is a screenshot of viewing the code
893
« on: June 20, 2013, 04:35:22 pm »
The editor already takes over 7000 bytes of memory. I also need to get the editor working for Grammer 3 programs before I can really progress with making the interpreter. If I can, I will include the editor with Grammer 3 (if they fit). They do share a bunch of the same code, so that should make it easier.
EDIT: @ben_g: What do you mean by code folding? Do you mean like hiding blocks of code unless the user clicks on it to expand it? If so, then yes, but it won't be easy to implement for the BASIC editor.
894
« on: June 20, 2013, 03:55:19 pm »
I did. This is a pretty common request from you, looking at previous posts. I personally would not help to get you past security measures enacted by other people to protect themselves. I am not sure of the legal issues involved, either. We will be keeping an eye on this topic.
EDIT: Also, the original post is rather spammish. Although the topic title essentially has all of the information, it is helpful to clarify or pose the question in your post, too.
i said my wifi network...... please read else dont spam
Unfortunately, I did read. I also read this and it was made clear before that this would violate forum rules. That does not sound like it is your wifi network and though I could be wrong, I would hazard to guess that it is still not your network. I am a little grumpy at the moment, but I am trying to avoid being rude. I would ask you to try the same
895
« on: June 20, 2013, 03:43:12 pm »
This is a pretty common request from you, looking at previous posts. I personally would not help to get you past security measures enacted by other people to protect themselves. I am not sure of the legal issues involved, either. We will be keeping an eye on this topic.
EDIT: Also, the original post is rather spammish. Although the topic title essentially has all of the information, it is helpful to clarify or pose the question in your post, too.
896
« on: June 20, 2013, 03:05:15 pm »
Yes, the user will be able to choose the font and it currently works with custom fonts that are in RAM. The invisible tokens thing was just a test I did last night on HCWP and it felt like Python code. I think I will leave that as an optional token hook because it does allow more code to be shown. Speaking of token hooks, I modified the code to better support token hooks and I added in the Celtic 3/PicArc tokens. I am now working on xLib and Omnicalc tokens, but I have found that I cannot find a list of the Omnicalc real() values anywhere I will have to look at each of them myself, then. The screenie is an example of how the token hook can modify the token set for Celtic 3, PicArc and xLib commands. It also shows how hacked matrices are named. EDIT: Is it me, or is that large font annoying?
897
« on: June 20, 2013, 02:46:58 pm »
If it supports hooks, then yes, small hooks would be feasible. I am not sure if they have that support, though
898
« on: June 20, 2013, 11:53:18 am »
You can, and I have made programs to do that, but not a hook as large as what BatLib requires. It also has the problem of easily being overwritten since the hook data would have to reside in non-user RAM (which many apps and programs use). But now I am trying to think of an approach to this problem where code for certain commands can be stored as appvars and loaded as needed. it would be slower than traditional hooks, but still useful.
899
« on: June 20, 2013, 09:56:19 am »
A program version would not be able to make use of hooks, but BatLib was originally a project called SpriteLib and a program download is available. It doesn't have nearly all of the commands as BatLib, but it still does have a ton of them. I also just looked at the ZINSTALL program I forgot to change the name of the app that it was looking for. Older versions of BatLib had a weird name, but when I moved it out of testing, I named it with regular characters. Also, I had to change one of the addresses. It won't allow you to chain with Celtic 3 anymore, but it will allow you to install one or the other. I have the updated version attached to this post.
900
« on: June 20, 2013, 09:55:15 am »
There was a bug with the ZINSTALL program, so I fixed that. The download is attached.
Pages: 1 ... 58 59 [60] 61 62 ... 317
|