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 ... 15 16 [17] 18 19 ... 317
241
Axe / Re: Tilemapping help
« on: February 04, 2019, 02:45:11 pm »
Thanks for posting the answer for future reference!

242
TI Z80 / Re: Yet Another VAT Sort
« on: February 01, 2019, 10:59:01 am »
That is pretty impressive. And that's basically how I got into calc programming. It was super portable and relatively easy to use and didn't have a computer at home.

243
TI Z80 / [Grammer] Quadratic Formula
« on: February 01, 2019, 12:18:42 am »
Requires Grammer 2.50.1.1 and up.

This program gives you the zeros of a quadratic function! Inputs must include a decimal point so that Grammer knows it is a float. Hopefully that can be fixed in the future. Also it looks like Grammer has some float issues, so it gives weird answers when the result is complex.

244
Grammer / Re: Grammer 2-The APP
« on: January 31, 2019, 11:59:06 pm »
I made the readme a little easier to read, splitting it up into different files and using tables. I also added in support for automatic conversion of a number to a float if there is a decimal point in there. For example, 3.0 is now converted to a float and its pointer is returned (where it is stored in temp memory). See the readme for a slightly more detailed look at how Grammer handles floats. Finally, a really minor modification was that I found a size and speed optimization in pixel plotting, so you will now be able to get in an extra pixel or two per minute! :P

245
ASM / Re: Working on Textbox program for asm
« on: January 30, 2019, 08:59:46 pm »
Here is my take on it (not the whole code):
Code: [Select]
  ld c,(hl);grab string size
  inc hl
  ld b,(hl)
  inc hl
loop:
  ld a,(hl)   ;Need to check if it is a two-byte token, later
  push af   ;Save A for later
  push hl
  push bc
  bcall(_Get_Tok_Strng)
  ld hl,op3-1    ;point to the byte *before* the output characters.
tokenloop:
  push hl     ;save HL
  push bc    ;and BC
  call CheckXPos
  pop bc
  pop hl
  inc hl   ;Need to increment first to get to the character since we started one byte behind
  ld a,(hl)
  bcall(_VPutMap)
  dec c
  jr nz,tokenloop
  pop bc
  pop hl
  pop af
  bcall(_IsA2ByteTok) ;Check if it was a 2 byte token
  jr nz,+_
  inc hl  ;increment hl for next calc since token was 2 bytes
  dec bc  ;decrement bc since token was 2 bytes
_:
  cpi
  jp pe,loop  ; pe is used to test if BC reached 0.
  bcall(_getKey)
  ret
CheckXPos:
  ld (hl),1  ;Just want a 1-byte string. HL points to an already drawn char, so no need to save it
  bcall(_SStringLength) ;Returns length in A and B
  ld a,(penCol)
  add a,b ; Grab the future penCol position
  ld b,a
  dec b
  dec b
  ld a,(mX)
  cp b ; call Resetcur if pencol > mX
  ret nc
Resetcur:
  ld a,(cX)
  inc a ;if pencol > mX, change the cursor position
  inc a ;to next line before writing
  ld (penCol),a
  ld a,(penRow)
  add a,6
  ld (penRow),a
  ret

246
ASM / Re: Working on Textbox program for asm
« on: January 30, 2019, 09:40:54 am »
It looks like you are only displaying the first ASCII character of the token, btw. When you use Get_Tok_Strng, it returns how many characters there are in BC (alternatively, you can use C, since B=0 always). If vPutMap preserves HL and C, you can loop through like this:
Code: [Select]
puttokloop:
 ld a,(hl)
 inc hl
 bcall(_VPutMap)
 dec c
 jr nz,puttokloop

247
ASM / Re: Working on Textbox program for asm
« on: January 29, 2019, 10:45:58 pm »
You can use the _Get_Tok_Str bcall to convert a token to it's characters. Another routine that might be useful to you later is _SStringLength which calculates how many pixels wide a string is in the variable-width (small) font.

248
TI Z80 / Re: Yet Another VAT Sort
« on: January 29, 2019, 09:53:54 am »
Haha, yeah, VAT manipulation is a pain. I saw your Axe program and it looks pretty low level; have you ever done any assembly work?

249
Axe / Re: Alphabetize the VAT
« on: January 29, 2019, 09:47:32 am »
Necroposting is generally frowned upon (the last post was over 5 years ago); ideally you should create a new topic. That said, cool!
I don't see how it sorts or anything :| To me it looks like it just filters out programs :P

250
Grammer / Re: Grammer 2-The APP
« on: January 28, 2019, 08:14:26 pm »
Grammer has a few new commands since the last update.
  • G-T returns the address of the default front buffer.
  • G-T' returns the address of the AppBackUpScreen, a typical back buffer.
  • Else is finally back to being supported.
  • →. will write four bytes from one pointer to another. This is intended for single-precision floats
  • Text(0,0,.A allows you to print the float pointed to by A.
  • A+.B adds two floats pointed to by A and B
  • A-.B subtractss two floats pointed to by A and B
  • A*.B multiplies two floats pointed to by A and B
  • A/.B divides two floats pointed to by A and B
  • √(.A calculates the square root of the float pointed to by A.
So an example program using the GFLOAT module to get the pi and e constants:
Code: [Select]
.0:Return
ClrDraw
ClrHome
"5GFLOAT→$
π8800→X+4→Y
$π→.X
$e→.Y
For(A,0,7
√(.X*.Y→.X
Text(A*6,0,.X
DispGraph
End
Stop

251
Lua / Re: WZ_ST_Lib.tns HELPPP
« on: January 28, 2019, 09:44:31 am »
I was hoping someone would show up to answer. I don't know how to do this; I never got into nspire programming outside of purely math programs :|

252
ASM / Re: Number too large to fit?
« on: January 27, 2019, 08:44:42 pm »
You need to do ld a,(Keystore). The way you currently have it, you are trying to store the pointer, Keystore, to the 8-bit register A, but pointers are 16-bit for the Z80. By using (Keystore) instead, you are loading the byte at keystone.

253
ASM / Re: [z80] Floating Point Routines
« on: January 22, 2019, 04:38:28 pm »
Update:
For the extended-precision floats, I added:
Code: [Select]
xcmp     for comparing two numbers
xneg     -x -> z
xabs     |x|-> z
xinv     1/x -> z   Observed a bug in 1/pi !
xpow     x^y -> z
xpow2    2^x
xpow10   10^x
xlog     log_y(x)   It's failing miserably
xlg      log2(x)
xlog10   log10(x)   Observed a bug in log10(pi)
I made the str->single routine better (it had been quickly thrown together and failed on many/most cases). Now it appears that digits get swapped in some cases! :( I have to look into this.

To Do:
Look into the string->single routine and figure out what is wrong
I still have to look into the bugs observed in the single-precision Mandelbrot set program
Look into the errors in xinv, xlog, and xlog10  (these might all be related, or maybe I accidentally a byte in the built-in constants).
Have to make xsin, xcos, xtan, xsinh, xcosh, xtanh, xtoTI (x-float to TI float), TItox (TI float to x-float), and strtox (string --> x-float).
For all of the trig routines, I still need to apply range-reduction :|

Once these are done, it's just finding and fixing bugs and optimizing, and the project is as complete as what I wanted to do. BCD floats were a cute idea, but I'm a bit more realistic now :P

254
Chu Chu Rocket is built in to CrunchyOS, so you can't delete it without deleting CrunchyOS.

Apps are always a multiple of 16384 bytes. If your App is not using all of that space, you may decide to put that additional space to use by storing files or other useful routines. or whatnot. I believe this was the motivation for the author, since the App is 1 page (16384 bytes) and the app seems pretty straight-forward, not at all needing the full 16384 bytes.

255
TI Z80 / Re: Floatlib
« on: January 14, 2019, 11:22:26 pm »
I put this project up on GitHub (Floatlib), incorporating the z80float library that I have been updating and fixing and adding to. Floatlib now has extended-precision support as well as a more complete library of single-precision float routines! The only problem is that when I went to test the library with the the Mandelbrot Set program, it appeared that there are some new issues that need fixing :|


Those two white pixels at/near the center of the circular and cardioid part of the set should be black.

Pages: 1 ... 15 16 [17] 18 19 ... 317