﻿ Latest posts of: MGOS
22 May, 2013, 01:06:25
 OmnomIRC You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

 Show Posts Pages: 1 ... 3 4 [5] 6 7 ... 20
 61 Calculator Community / TI Z80 Calculator Projects / Re: Bounce on: 30 September, 2012, 15:54:24 Quote from: dinosteven on 30 September, 2012, 15:39:34So Rect is 112 bytes larger than pt-on? Wow, that's huge. That means that I can save 112 bytes by using Pt-On for my paddle!No, it isn't. Rect is 112 bytes large in total. The routines are only added to your program if they occur at least once in the source. So basically using two times Pt-Off will only add one Pt-Off to the program, and every times you need it, the function is called (like a subroutine).You can save bytes by using only one type of routines (e.g. all Pt-Off or all Rect) instead of having different.
62  Calculator Community / ASM Language / Custom vertical line routine crashes on: 30 September, 2012, 12:45:32
Writing some program in axe, I needed a fast vertical line routine to substitute this:
 1 Rect(X,22-E,1,E*2+1)

The routine should draw a vertical, at y=22 centered line expanding E pixels up and down to a total length of E*2+1 in column X.
This is my idea:
 12345 Axe:X:asm(E5) ;push hl:^8:asm(23E5) ;inc hl, push hl   (gets the number of rotating cycles needed):E:asm(The routine)

 1234567891011121314151617181920212223242526272829303132333435363738394041424344 Stack: #Rotation cycles,  XHL : E pop bc     ; #Rotation cycles  , Stack: 1 pop de     ; X       Stack: 0 srl e      ; Div 8 srl e srl e      ; DE: X/8 ld a,l     ; A: E add hl,hl  ; 2E inc hl     ; 2E+1 ld b,l     ; B: 2E+1, #Lines push bc    ; #Lines, #Rotation cycles ,  Stack: 1 ld b,a     ; B: E ld a, 22   ; A: 22 sub b      ; A: 22-E ld l,a     ; HL: 22-E ld c,l ld b,h     ; BC: 22-E   MUL 12 add hl,hl  ; *2 add hl,bc  ; *3 add hl,hl  ; *6 add hl,hl  ; *12 add hl,de  ; HL:  (22-E)*12+(X/8) ld de, \$9340 ; plotsscreen add hl,de  ; HL: Start byte pop bc     ; #Lines, #Rotation cycles   , Stack: 0Lineloop: ld d,b     ; backup b ld b,c     ; #Rotation cycles ld a,(hl)  ; A: Byte to modifySloop1:  rla        ; rotate djnz Sloop1 scf        ; Pixel on ld b,c     ; #Rotation cyclesSloop2:  rra        ; rotate back djnz Sloop2 ld (hl),a  ; restore modified byte ld b,d     ; Restore b ld de,12   ; DE: 12 add hl,de  ; Next line djnz Lineloop  ; until #Lines-- = 0

I hope somebody can help me finding the error, I'm stuck

Edit: It doesn't crash immediately, it does it when the program returns. The error is before lineloop I think
 63 Calculator Community / TI Z80 Calculator Projects / Re: Nemesis- a new axe 3d rpg on: 24 September, 2012, 18:26:51 Quote from: TheMachine02 on 24 September, 2012, 18:25:31what is more fast : an ion assembly prog or a noshell assembly prog ?They are the same, just a different header I think. Both is z80 asm, but Ion gives compatibility to other shells.
 64 Calculator Community / TI Z80 Calculator Projects / Re: [Axe] Bullet Proof on: 21 September, 2012, 17:17:32 Quote from: Sorunome on 21 September, 2012, 05:07:26Oh, it's looking pretty cool It's fun to play against your neighbors in our math course Things planned atm:Landmines as another powerup
 65 Calculator Community / TI Z80 Calculator Projects / Re: [Axe] Bullet Proof on: 20 September, 2012, 07:30:49 The last screeny should be it except for the machine guns.
 66 Calculator Community / TI Z80 Calculator Projects / Re: Nemesis- a new axe 3d rpg on: 19 September, 2012, 18:59:55 I think DJ meant the diagonal walls. Would it be faster if you could reduce your algorithm for only perpendicular walls?
 67 Calculator Community / TI Z80 Calculator Projects / Re: [Axe] Bullet Proof on: 19 September, 2012, 18:17:45 I couldn't do much on this, I've been working on another "scientific useful" project for some time now, but nonetheless here is an update:  Added:Automatic Archive/Unarchive safe file (no big deal, but was missing before)Changed:Fixed phantom grenades / grenades exploding much too late / grenades disappearing (occurred when both players throw a grenade the same time)Downgraded the machine gun: only 9 shots, fire rate reduced from 200% to 150% (recommended by a friend)Reduced grenade timer by 20% (explodes after 80 frames) Since it isn't an update with changed graphics / major changes on game mechanics, I won't add a screeny.Download:
 68 General Discussion / Miscellaneous Discussion / Re: My new internet speed on: 18 September, 2012, 14:08:45 Could be better, but it's enough for me
69  Calculator Community / TI Z80 Calculator Projects / Re: Nemesis- a new axe 3d rpg on: 15 September, 2012, 17:19:39
If you have a second memory location to store the sorted array, this might be useful:

Pseudocode:
 12345678 ptr = 0For each elementLook for largest elementWrite that data to (ptr)Make original element 0ptr++Next elementCopy new array to original array

 70 Calculator Community / TI Z80 Calculator Projects / Re: AxeDCS on: 09 September, 2012, 10:10:25 Awesome! Text input and custom buttons! Can't wait to try it out
 71 Calculator Community / Axe Language / Re: How to create 4 level greyscale in Axe? on: 05 September, 2012, 22:27:22 Quote from: Link on 05 September, 2012, 22:22:49Ooh, thanks, it works now, Time to go see If i can remove flicker now.What flicker? There shouldn't be any flickering except when your loop is two slow. Can you post your code?
 72 Calculator Community / Axe Language / Re: How to create 4 level greyscale in Axe? on: 05 September, 2012, 21:16:04 Quote from: Link on 05 September, 2012, 21:02:29I meant the "..." also why is it pt-off instead of pt-on?Yeah, remove the dots (you can add other code in there, like movement)Make sure to initialize X and Y or replace them with constants.Pt-Off is slightly faster than Pt-On (when X is a multiple of 8 ), so that's why I used that for the example. But doesn't really matter.Hex: [FFFFC3C3C3C3FFFF] for front buffer[FF81BDA5A5BD81FF] for back bufferThat should be a neat little box with all colors!
73  Calculator Community / Axe Language / Re: How to create 4 level greyscale in Axe? on: 05 September, 2012, 20:36:52
Here is a more in-depth how-to:

The TI-83 series doesn't support grayscale natively, but axe has some functions to alternate checkerboard patters, but that is so fast (and the screen is blurry too), so that it looks for the human eye like it is gray.

Because one buffer can only store data for two colors, you'll need two buffers for 2² = 4 level grayscale. Depending on the pixel combination of both buffers you can get black, dark gray, light gray and white. The easiest way (for me) to remember the combinations is, that the main buffer has a higher "priority" or "level" than the back buffer, so if you change a pixel on the front buffer, it'll cause the result to change more than when you do it on the back buffer.
Here are the combinations for 4 level grayscale:

 Front buffer:  Back buffer:Result: offoffwhite offonlight gray onoffdark gray ononblack

In order to display a 4-level sprite, you have to create two 8x8 sprites, one for the front buffer, one for the back buffer. With the table above as reference, you can make your 2 sprites out of the one desired gray sprite.

To display them, you need two Pt-commands:

 12345678910111213 [Hex for Front buffer]→Pic1A  ; you can use other names for pointers if you want[Hex for Back buffer]→Pic1B...ClrDrawrr  ; clears both buffers at the same timeWhile 1...Pt-Off(X,Y,Pic1A)   ; X and Y are the coordinatesPt-Off(X,Y,Pic1B)r...DispGraphClrDrawrr   ; for 4 level you need two radian r's...EndIf getkey(15)

For 3 level grayscale you need DispGraphr, for 4-level you need rr. Same when you use the DispGraphClrDraw.

Every time the DspGraphrr is passed, the checkerboard pattern is changed.

That should be it.
 74 Calculator Community / Axe Language / Re: Enemies Freezing after another enemy is shot? (UPDATED) on: 04 September, 2012, 18:33:49 Quote from: Derf321 on 04 September, 2012, 18:19:04Also would the arithmetic logic be a good optimization for speed on a ti84+SE?For "+" always, but for the multiplying I have to admit that runer's right. Take the bitwise "and" when you compare booleans.Note:"2 and 1" would be true in boolean, but you have to use multiplication because the bitwise "and" would return zero.
 75 Calculator Community / Axe Language / Re: Enemies Freezing after another enemy is shot? (UPDATED) on: 04 September, 2012, 18:03:19 Quote from: Runer112 on 04 September, 2012, 17:53:07Only applies if the pointer is not a constant! L2 is a constant, so that part of his code is fine.Whoa, didn't know that!  Quote from: Runer112 on 04 September, 2012, 17:53:07Remember, the syntax to create a list of data in Axe is different from that in TI-BASIC:Data(0,1,4,9,16,25,36,49,64,81,100,121,144,169,196,225)→GBD1Stupid mistake  And for the "3"-key mistake: I just copied from the source, but you can blame me for not checking it Thanks runer, you make me always learn new things!
 Pages: 1 ... 3 4 [5] 6 7 ... 20