Show Posts

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] 2 3 ... 313
TI Z80 / Re: First Fantasy: Mana Force 2020 updates
« on: June 06, 2020, 04:05:21 pm »
I saw that on TICalc, it looks cool :0

Calculator C / Re: What's the best sprite editor for TI 68k C/ASM?
« on: May 21, 2020, 08:00:52 am »
It has been a long time since I did 68k C and Assembly, but I thought that you could basically "include" a .bmp or .png or what-have-you. I know I can do that with the Z80 calcs and probably eZ80.

If so, I always opt for old-school MS Paint, or mtpaint on Linux.

News / Re: Super Star Hero, A Futuristic Action-RPG For Windows
« on: May 13, 2020, 06:02:13 pm »

Other Calc-Related Projects and Ideas / Re: Plane Jump
« on: May 09, 2020, 09:29:34 pm »
Wow, nice work! I enjoyed you sharing screenshots of the process!

In regards to the title graphics issue, you could make a higher quality version and store it in a separate, optional file.

You need something like:
Code: [Select]
If n="yes" Then
Because you are telling Request to store the input string to variable n.

Also, you can post code in [code]<your code here>[/code]

Introduce Yourself! / Re: I new here
« on: April 28, 2020, 05:53:28 pm »
Welcome! What kind of programming are you interested in? Also, have some

ASM / Re: Pokémon Neptunium
« on: April 07, 2020, 03:10:44 pm »
"thanks to Zeda" ===> "Zeda said that the map and names it looked cool"

That is genuinely cool stuff, I'm quite impressed with that compiler and development right on the nspire, great work!

ASM / Re: ASM Optimized routines
« on: April 05, 2020, 10:56:59 am »
I have two routines that I am proud of and thought they'd be useful!

Binary Search
Binary Search is an efficient way to search through sorted data. Regardless of the data, the core of the algorithm is the same, so I made a routine that is the core algorithm!
All you have to do is pass a pointer to a routine in IX that compares two pieces of data
Code: [Select]
;Requires `call_ix` routine that looks like:
;   call_ix:
;       jp (ix)
;IX points to a comparison routine that takes as input:
;   HL points to the input element to find
;   DE is the element to compare to
;Outputs are:
;   carry set if the HL element is less than the DE element
;   carry reset if the HL element is greater than or equal to the DE element
;   z set if the HL element is equal to the DE element
;   nz set if the HL element is not equal to the DE element
;This is useful if you have a table of pointers to strings, and want to find a
;string in the array. See the end of this file for an example.

;This is a general-purpose binary search routine.
;   BC is the element to find
;   HL is the number of elements
;   IX points to a callback routine that compares the input element
;   DE is the matching element index
;   z means match found
;   nz means no match
;       In this case, DE is interpreted as where the match should have been
;   AF, DE
;RAM needed:
;   10 bytes of stack space (4 pushes and a call)
  ld de,-1
  inc de
  push hl
  push de
  or a
  sbc hl,de
  jr z,binarysearch_nomatch
  rr h
  rr l
  add hl,de
  ld d,h
  ld e,l
  push hl   ;test index
  push bc   ;input
  ld h,b
  ld l,c
  call call_ix
  pop bc    ;input
  jr nc,binarysearch_input_bigger_or_equal
  pop hl    ;test index is the new upper index
  pop de    ;restore the lower index
  pop af    ;dummy pop
  jr binarysearch_loop

  pop de    ;test index +1 is the new lower index
  pop hl    ;dummy pop
  pop hl    ;restore upper index
  jr nz,binarysearch_loop_inc_lower
  ;a match was found
  ;DE is left as the index

  pop de    ;lower index
  pop hl    ;upper index (also lower index and test index)
  or 1

Heapsort is a clever and efficient sorting algorithm. Much like the Binary Search routine above, you pass IX pointing to a routine that actually interprets your data, so this can work on even your weirdest data format. IX points to a routine that either swaps two elements, or compares two elements (based on carry flag passed in).
NOTE: This also includes the heapify routine, used by heapsort. This might also be useful if you only need to arrange data into a heap structure, but don't need to sort.
Code: [Select]
; This routine requires the following subroutine:
;     call_ix:
;         jp (ix)
; To use SMC, define SMC.
;     #define SMC
; If you are not using SMC, you'll need to define `arraylen` to point
;to 2 bytes of scrap RAM

;   BC is the size of the array.
;   IX points to the routine that compares or swpas two entries
;     HL is the index of the first element
;     DE is the index of the second element
;     c means swap
;     nc means compare HL to DE
;       Should return:
;         z if they are equal
;         nc if HL>=DE
;         c if HL<DE
;   The data is sorted.
;   All
;   You can make the comparison routine work any way that you want :)
;   For example, you can invert the carry flag output to sort descending.

;If the array is size 0 or 1, then it is sorted
    inc b
    dec b
    jr nz,heapsort_heapify
    dec c
    ret z
    inc c
    ret z

    call heapify
    ld hl,(arraylen)
    dec hl
    ld (arraylen),hl
    push hl
;HL is the last element
    ld de,0
    call heapsort_swap
    ld bc,1
    call propogate
    pop hl
    ld a,h
    or l
    jr nz,heapsort_loop

;   HL points to the array data
;   BC is the size of the array. NOT GREATER THAN 32767
;   IX points to the routine that compares the values
    ld (arraylen),bc
    srl b
    rr c
    push bc
    call propogate
    pop bc
    dec bc
    ld a,b
    or c
    jr nz,-_

;BC-1 is the parent index
;2BC-1 is the child0 index
;2BC is the child1 index
    sla c
    rl b
    ld d,b
    ld e,c

#ifdef SMC
    ld hl,0
    ld hl,(arraylen)

    sbc hl,de
    add hl,de
    ret c  ;no children
;z means one child
;compare the two children
    ld h,b
    ld l,c
    dec hl
;HL is the child0 index
;DE is the child1 index
    call nz,heapsort_cmp
    jr nc,+_
    ex de,hl

;parent is (HL+1)>>1
;child is HL
    ld d,h
    ld e,l
    inc hl
    srl h
    rr l
    dec hl
    call heapsort_cmp
    ret nc
    call heapsort_swap

;values heapsort_swapped, now set parent=child+1
    ld b,d
    ld c,e
    inc bc
    jr propogate

;HL and DE are the indices of the elements to heapsort_swap
    push hl
    push de
    call call_ix
    pop de
    pop hl

    push hl
    push de
    or a
    call call_ix
    pop de
    pop hl

I like those geometric designs :D

News / Re: April Fools
« on: April 01, 2020, 12:56:39 pm »
HA! I get it, great joke!

I don't actually get it

TI Z80 / Re: Heapsort, VATSort, and ListSort
« on: March 28, 2020, 03:49:50 pm »
Necro Update!
I rewrote the heapsort to be really general-purpose. This significantly reduced the size of ListSort and it made it so that it doesn't require any additional user RAM (but it did make it slightly slower).

I've attached the new heapsort.z80 and listsort.z80

But then I tailored the new heapsort to the task of sorting lists and made it even smaller (200 bytes, saving 157 bytes)! And it is faster, AND this version now uses 15MHz mode if available.

Which reminds me: In the original benchmarks, I was apparently comparing my 6MHz program to TI's 15MHz SortA(, so my program is actually over 50 times faster than TI's on a 999-element list.

News / Re: Grammer 2.51 released!
« on: March 11, 2020, 04:26:56 pm »
7 years was a long time. I hope we won't have to wait 7 more years for another update. haha
Oh trust me you won't. You got any suggestions for new updates? If you do feel free to post them here. I'm a contributer to the project and I use this instead of Axe and Assembly.

Oof, I just recently got a new job and so far as I can tell, it's going to be taking up most of my programming time :(

I'm definitely glad I put it up on GitHub as that makes it much easier for other people like Nonstickatom to contribute.

As NSA ( :D ) said, if you find any bugs or have any requests that you would like to be considered, feel free to post in the forums (or GitHub) :)

Grammer / Re: Font Converter: zStart and Omnicalc
« on: March 09, 2020, 01:01:58 pm »
It should start with 1-byte for the width, followed by 7 bytes of data. I imagine that you can technically edit the widths of the zStart font and then the large font would also technically be variable-width on the graph-screen (The OS's format is the same for both fonts, just all the large font chars have a width of 5).

Grammer / Re: Font Converter: zStart and Omnicalc
« on: March 07, 2020, 07:23:08 am »
How do you actually create ZStart fonts? I could never find a computer editor back in the days (there was none included with ZStart or it was missing?) and I liked ZStart fonts because they could be a different size than Omnicalc's.
Oh, zStart actually has a built-in font editor. The format is actually like the OS' internal format, which is sightly different from Omnicalc or BatLib font, but also slightly easier to access.

General Calculator Help / Re: TI nspire cx (non-cas) Red screen problem
« on: February 29, 2020, 07:34:16 am »
So far as I know, upgrading to 4.5.2 was a bad idea. You had to have had ndless for any of this, and ndless doesn't work on 4.5.2.

I looked at the Reddit thread and they asked a question that you never followed up on: do you have a serial device, like an Arduino ? Maybe you can use that (I have no idea how).

Note: I know very little about any of this. Critor on tiplanet is far more knowledgeable (I think Critor modified my nspires, actually). All I do know is that once people were on 4.5.2, they were fricked.

Pages: [1] 2 3 ... 313