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 - Runer112
Pages: 1 ... 75 76 [77] 78 79 ... 153
1141
« on: July 02, 2011, 08:43:28 pm »
3D is definitely possible in Axe. In fact, I've done it before: You can find the thread I made for this project, which I called YAAR, here. If you want to get an idea for how I did it, I attached a zip file containing the source and executable for it. Feel free to look at my code to learn how it works and maybe write your own engine, or you can just use my engine. If you do the latter, I would request that you please credit me for the raycasting engine in any project you make with it, though.
1142
« on: July 02, 2011, 02:50:19 pm »
This could probably be done just as easily in Axe. All it would entail is reading entries from a list of strings for each key.
1143
« on: July 01, 2011, 08:47:50 pm »
I don't think an escape code should be necessary. You could solve this problem without entering the whole string as hex, just enter the one character as hex. In this example, the "" at the end is so Axe knows the data is a string and appends a null terminator. If the hex is in the middle of the string, you don't need to add this null string.
"ABC"[1C]""→Str1
EDIT: Also, while looking into this, I discovered that some of Axe's ASCII equates are not correct. → and ᴇ are at least two incorrect ones. All the more reason to use B_CALL(_Get_Tok_Strng) to parse tokens into ASCII.
1144
« on: July 01, 2011, 08:05:03 pm »
I rarely use the colon as an inline separator, and when I do, it's usually just to chain basic things like Fix 1:Fix 5. And I always make sure to close my parentheses. So this change would be fine with me.
1145
« on: July 01, 2011, 06:49:17 pm »
That's been implemented since 0.5.2.
1146
« on: July 01, 2011, 12:25:16 pm »
Yes:
DelVar "prgmNAME"
1147
« on: June 30, 2011, 01:06:47 am »
A mix of a feature request and an optimization:
How about compound assignment operators (e.g. +=) for most Axe operations? They would offer savings on every operation that doesn't use a 2-byte variable at a constant address as the main operand. They could also offer even larger savings on basic operations like addition, subtraction, and bitwise logic.
1148
« on: June 29, 2011, 11:56:08 pm »
This should be working menu code. The code on the left should make sense. The code on the right should do the same thing as the code on the left while being about two-thirds of the compiled size, but probably won't make sense. They both rely on the appvars being in RAM, but you could probably modify this to successfully detect them if they are in archive as well. I've also attached 8xp files for both of these so you don't have to retype all this code. The code blocks are just so you can see what the code looks like. ..MENU
ClrDraw Fix 1:Fix 5 Text(1,0→Y,"blut") If sub(GET,1) Text(8,Y+10→Y,"Chap 1") End If sub(GET,2) Text(8,Y+10→Y,"Chap 2") End If sub(GET,3) Text(8,Y+10→Y,"Chap 3") End Text(8,Y+10→Y,"Help") Text(8,Y+10→Y,"Quit") Fix 0:Fix 4 DispGraph
FnOn Repeat getKey(15) Stop .Conserve batteries! End FnOff
.Input: Arg1 = File number to look up Lbl GET Copy("appvBLUTCH1",L₁,9) .Copy the name to L₁ r₁+'0'→{L₁+7} .Overwrite the last character Return GetCalc(L₁) .Find the appvar
|
| ..MENU
ClrDraw Fix 1:Fix 5 Text(0*256+1) Text "blut" 10*256+8sub(SMP) ⁻3 While 1 +1→I If +3sub(GET) Copy("Chap "[],L₁+2,5) L₁+2sub(PMI) End End!If I "Help"sub(PMI) "Quit"sub(PMI) Fix 0:Fix 4 DispGraph
FnOn While 1 Stop .Conserve batteries! EndIf getKey(15) FnOff
.Input: File number to look up Lbl GET +'0'→{L₁+7}ʳ .Write the number and terminator Copy("appvBLUTCH"[],L₁,7) .Copy the name to L₁ Return GetCalc(L₁) .Find the appvar
.Print Menu Item Lbl PMI Text P+2560 .Set Menu Position Lbl SMP Text(→P) Return
|
1149
« on: June 29, 2011, 08:40:23 pm »
I believe Builderboy stores the tilemap image in a buffer other than L₆, probably L₃. He can then use RecallPic every frame to recall the tilemap image to L₆, overwriting any sprites/circles that may have been drawn last frame.
1150
« on: June 29, 2011, 06:09:26 pm »
I'm not really sure why you would want to purposely misrepresent tokens. If that's what tiDE uses, I might even ask if that's a bug.
1151
« on: June 28, 2011, 07:07:35 pm »
I really need to you run this test if
1. You have a 83+SE. Theoretically, this should work. 2. You have a really low revision 84+BE/SE. We need to know if the port writing still works OK on these.
Works on my ancient 0404 84+SE calc. No revision letter because it was the very first revision.
1152
« on: June 27, 2011, 03:31:09 pm »
Found some optimizations for p_IntSetup: p_IntSetup: .db __IntEnd-p_IntSetup-1 di ld de,$8B01 ld a,d ld i,a ld a,l ld hl,$8B00 ld b,e ld c,l ld (hl),$8A ldir
and %00000110 out (4),a ld a,%00001000 out (3),a ld a,%00001010 out (3),a
ld de,$8A8A ld bc,__IntDataEnd-__IntData ld hl,$0000 ldir
in a,(6) ld ($8A8A+__IntDataSMC-__IntData+1),a __IntEnd: .db rp_Ans,9
| | p_IntSetup: .db __IntEnd-p_IntSetup-1 di ld de,$8B01 ld a,d ld i,a ld a,l ld hl,$8B00 ld b,e ld c,l ld (hl),$8A ldir
and %00000110 out (4),a ld a,%00001000 out (3),a ld a,(hl) out (3),a
ld d,a ld e,a ld c,__IntDataEnd-__IntData ld hl,$0000 ldir
in a,(6) ld ($8A8A+__IntDataSMC-__IntData+1),a __IntEnd: .db rp_Ans,9
|
Also don't forget the two interrupt optimizations that have been suggested earlier! (removing di and removing port 6 SMC in programs)
Also, a bug report. After talking with thepenguin77 on IRC, I think I have confirmed my old belief that MemKit's Next() command has a bug regarding reaching the end of the VAT: Next(): 2 bytes and a few cycles saved. Also, isn't the end-of-VAT check in the wrong place? I could be wrong because my VAT experience isn't too great, but because this routine checks for the end of the VAT at the start, wouldn't this command advance the VAT pointer to the end of the VAT and not recognize it as the end until the next Next()? This would cause problems with programs reading garbage VAT data for the last "entry." If I'm right about this (which may not be the case), the third block of code I posted should hopefully recognize the end of the VAT as soon as it hits it and never advance the VAT pointer to point to the end.
ld hl,(axv_X1t) ld de,($982E) or a sbc hl,de ret z add hl,de ld de,-6 add hl,de ld e,(hl) inc e xor a ld d,a sbc hl,de ld (axv_X1t),hl ret
| | ld hl,(axv_X1t) ld de,($982E) or a sbc hl,de ret z add hl,de ld de,-6 add hl,de ld a,(hl) cpl ld e,a add hl,de ld (axv_X1t),hl ret
| | ld hl,(axv_X1t) ld de,-6 add hl,de ld a,(hl) cpl ld e,a add hl,de ld de,($982E) or a sbc hl,de ret z add hl,de ld (axv_X1t),hl ret
|
1153
« on: June 26, 2011, 11:55:55 am »
It looks like you've got a bug on your hands. When a two-byte token is reached and parsed, the read pointer isn't advanced past both bytes, only the first byte. This results in every two-byte token being parsed as itself followed by the one-byte token represented by its second byte. To cite a few examples, I see Str2>Tok, DiagnosticOffSci, and Copy(nDeriv(.
1154
« on: June 24, 2011, 11:25:52 am »
Aww, I was writing a big long post about inline if statements but you ninja'd me. But the way you suggested it as a command would be nice. I figure the IS<( token would be perfect for this, as it's currently an unused token easily accessible in the programming menu. It even sort of makes sense without a token replacement if you read it as "is." It would be nice if it had 4 forms, like: .If condition, true, false iif(A=B,C,D)
.If not(condition), true, false !iif(A=B,D,C)
.If condition, true iif(A=B,C)
.If not(condition), true !iif(A=B,D)
The latter two forms are a bit unconventional, but I could see them being used for optimization purposes. For instance, here is some code I wrote a long time ago. It moves a sprite around the screen according to user key input and draws it, and applies boundaries to the sprite so it does not move offscreen. As small as I could get it, 345 bytes of executable code.
:.SMILE :[004466000000817E]->Pic1 :DiagnosticOff :0->X->Y :Repeat getkey(15) :ClrDraw :getKey(3)-getKey(2)+X :!If +1 :+1 :End :-1 :Pt-On(min(,88)→X,getKey(1)-getKey(4)+Y+(=⁻1)min(,56)→Y,Pic1) :DispGraph :End
The fancy If stuff you see there is an optimized way of making sure the position does not become -1. However, I could only use it for the x coordinate. EDIT: Ashbad, that would work, yes. But it would be unnecessarily bloated and slow. That would be about 1.5x larger than an inline if statement, and an incredible ~15x slower. It would also require the multiplication routine being added to the program, which may not have previously existed in the program and making the code even larger.
1155
« on: June 24, 2011, 02:26:54 am »
Yeah, the copy and fill commands definitely have calculable, consistent return values. And I don't think the routines could possibly be optimized any more, so these values probably won't change. Although if I could have it my way, I would completely remove scope restrictions. I often find myself seeing how my code could be more optimized with insane stuff like inline If statements. Speaking of which... feature request: inline If statements? Many (most?) computer languages have them, so why not bring them to Axe? Also, I don't think you need to change the capitalization of Copy() or Fill(). Other commands, like GetCalc() for instance, can be used inline but are capitalized. I think routines used solely for their return value should not be capitalized, but other commands should.
Pages: 1 ... 75 76 [77] 78 79 ... 153
|