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 ... 12 13 [14] 15 16 ... 317
196
« on: April 04, 2019, 10:57:31 pm »
Oh, you probably don't want to work with an edit buffer for a task like that!
The data is stored in the program named !. (That's an exclamation point). Just locate the variable, get its size and locate the end if the program.
Just remember that if you replace a 1-byte token with a 2-byte token, you'll need to increase the size of the var (use InsertMem and manually update the var's size bytes) and vice versa.
197
« on: April 04, 2019, 09:26:42 pm »
What do you mean by the edit buffer? Edit buffers can be fairly complicated to work with.
The home screen does have a 128 byte buffer reserved as a copy for each char on it (16*8) called textShadow. There is another, similar buffer called cmdShadow that is intended for programs to use to back up that data.
For those two 128-byte buffers, you can do whatever you want with them. Worst case is that the home screen displays garbage. You can just fill it with spaces manually or preferably through one of the bcalls (I believe bcall 0x4546 is the bcall, but I forgot the name and I'm on mobile so it's a pain to search).
198
« on: March 29, 2019, 09:50:21 am »
I forgot to upload it here! With the recent updates to z80float, I updated the existing float routines and added in the rest. - sin( and cos( now have range reduction!
- division now has proper underflow/overflow detection
- Fixed a bug with the logarithm routines when the input's exponent was 0 (so on [1,2])
- Added in mean( to compute the mean of two numbers.
- I switched e^( to perform exp(), not 2^x (see note below)
- Added in 10^(, tan(, sinh(, cosh(, tanh(, sin-1(, cos-1(, tan-1(, sinh-1(, cosh-1(, tanh-1(.
I also changed the token hook so that e^( was no longer renamed 2^(. The regular routine still performs 2^n, but the float routine will compute exp(x).
199
« on: March 27, 2019, 11:05:08 pm »
Here is the latest version! I fixed the sine/cosine bugs and then found some more potential issues with the routine. Here is a screenshot of the cosine routine in action (via Grammer, but they are the same routines  )
200
« on: March 27, 2019, 07:37:32 pm »
I now have 99 bytes left! I realized I could reuse a routine in the single-precision square-root routine that I was using in the extended-precision one, so I saved a bunch on memory. I'm waiting to make another update until I can figure out an issue I noticed in Grammer with the sine and cosine routines  It seems to be giving wacky results when the result is close to +1. Or maybe there is a glitch in the float --> int routine
201
« on: March 26, 2019, 06:57:36 pm »
I am down to 3 bytes left in the app!
Thankfully it is just about finished. I broke some compatibility, but I don't think people are really using those parts yet. In particular, I removed 5 float constants used in constSingle, and I changed constSingle. The readme and in-app description differed on usage and I changed it to be that described in-app. So before, you would get a pointer to a float with ID 0 (pi) by doing:
call iconstSingle \ .db 0
But the in-app description says the arg is passed in A. So now it is:
ld a,0 call constSingle
Since this uses the z80float library, most of the other changes were inherited from that. This includes many bug fixes and optimizations (most notably the extended-precision square root routine is much smaller and a little faster and divSingle detects underflow and overflow better). Finally, sinSingle and cosSingle apply range reduction.
And then there were the routines that were added:
xmod1 basically gets the non-integer part of the float mod1Single basically gets the non-integer part of the float xconst the extended-precision variant of constSingle ti2single converts a TI float to a single-precision float TItox converts a TI float to an extended-precision float xtoTI converts an extended-precision float to a TI float xcosh extended-precision cosh xcos extended-precision cos xsinh extended-precision sinh xsin extended-precision sin xtanh extended-precision tanh xtan extended-precision tan
And with that, I think I've included all of the routines that I originally intended! Now I just have to work on tidying up and finding and fixing bugs.
EDIT: Updated readme in the attachment
202
« on: March 26, 2019, 08:52:34 am »
There are legal issues involved with reverse engineering, especially if it risks "taking away someone's livelihood." If they need an ID then that means they probably compile a special version that can only be run on that calc (or calcs with those matching digits). That way people can't just post the binary files and everyone have access  It is highly unlikely that their trial versions are full as it would be complicated to allow up to 100000000 different codes to "unlock" it. In that case, it might actually be a simple way to crack the security, but you would have to buy a copy first. Finally, please don't double-post like that. You can just edit your post to add more
203
« on: March 25, 2019, 08:52:43 pm »
Actually, jp points to a fixed location whereas jr is relative. So in this case, jr $F1 (18F1) just states that it will jump back 15 bytes from the end of the instruction.
204
« on: March 25, 2019, 04:06:26 pm »
Sorry, I don't have my nspire on me, but those just look like partial files. What makes you think they are the same as the full version (without the key) ? I would think they'd offer just a simple trial version and give you the full download (if it even exists) after you pay. Personally, I don't think it's worth even the time to disassemble or crack based on this thread.
205
« on: March 25, 2019, 03:57:25 pm »
If you want those games you should make them
206
« on: March 25, 2019, 02:15:17 pm »
I don't know without personally inspecting it. I'm just assuming they are using TI's encryption, which does use RSA. I could be wrong; maybe they are using their own encryption.
207
« on: March 25, 2019, 01:41:43 pm »
I'll be honest, paid calc software just seems like a scam to me (not technically, but with tens of thousands of programs for free on ticalc.org...). If that's the only place to get it then you'll just have to make your own versions until somebody can crack the (probably) RSA encryption. At current state-of-the-art, that'll take a trillion-ish years.
208
« on: March 24, 2019, 10:12:01 pm »
A simple way is to do something like: loop: bcall(_GetCSC) cp 15 ; check [clear] jr nz,loop ret
But if you want the more complicated (and less energy efficient  ) way: di ;disables interrupts since the OS will mess with port 1 ld a,$FD ;we'll be polling for keys [ENTER] up to [CLEAR] out (1),a loop: in a,(1) and $40 ;checks bit 6 which corresponds to clear. Set if not pressed, reset if pressed jr nz,loop ret
But my preferred way is: ei ;keep OS interrupts active loop: halt ; ld a,(kbdScanCode) cp 15 jr nz,loop ret
209
« on: March 24, 2019, 05:59:36 pm »
Okay, but do you have a model and version number? On the back of your calc you'll see a serial number followed by something that looks like A-1234B which is the part that gives us info.
It sounds to me like your physical calculator has one of the *really* slow LCDs, but ALCDFIX should have fixed that on your physical calc.
210
« on: March 24, 2019, 11:58:29 am »
32-bit square root: sqrtHLIX: ;Input: HLIX ;Output: DE is the sqrt, AHL is the remainder ;speed: 751+6{0,6}+{0,3+{0,18}}+{0,38}+sqrtHL ;min: 1103 ;max: 1237 ;avg: 1165.5 ;166 bytes
call sqrtHL ;expects returns A as sqrt, HL as remainder, D = 0 add a,a ld e,a rl d
ld a,ixh sll e \ rl d add a,a \ adc hl,hl add a,a \ adc hl,hl sbc hl,de jr nc,+_ add hl,de dec e .db $FE ;start of `cp *` _: inc e
sll e \ rl d add a,a \ adc hl,hl add a,a \ adc hl,hl sbc hl,de jr nc,+_ add hl,de dec e .db $FE ;start of `cp *` _: inc e
sll e \ rl d add a,a \ adc hl,hl add a,a \ adc hl,hl sbc hl,de jr nc,+_ add hl,de dec e .db $FE ;start of `cp *` _: inc e
sll e \ rl d add a,a \ adc hl,hl add a,a \ adc hl,hl sbc hl,de jr nc,+_ add hl,de dec e .db $FE ;start of `cp *` _: inc e
;Now we have four more iterations ;The first two are no problem ld a,ixl sll e \ rl d add a,a \ adc hl,hl add a,a \ adc hl,hl sbc hl,de jr nc,+_ add hl,de dec e .db $FE ;start of `cp *` _: inc e
sll e \ rl d add a,a \ adc hl,hl add a,a \ adc hl,hl sbc hl,de jr nc,+_ add hl,de dec e .db $FE ;start of `cp *` _: inc e
sqrt32_iter15: ;On the next iteration, HL might temporarily overflow by 1 bit sll e \ rl d ;sla e \ rl d \ inc e add a,a adc hl,hl add a,a adc hl,hl ;This might overflow! jr c,sqrt32_iter15_br0 ; sbc hl,de jr nc,+_ add hl,de dec e jr sqrt32_iter16 sqrt32_iter15_br0: or a sbc hl,de _: inc e
;On the next iteration, HL is allowed to overflow, DE could overflow with our current routine, but it needs to be shifted right at the end, anyways sqrt32_iter16: add a,a ld b,a ;either 0x00 or 0x80 adc hl,hl rla adc hl,hl rla ;AHL - (DE+DE+1) sbc hl,de \ sbc a,b inc e or a sbc hl,de \ sbc a,b ret p add hl,de adc a,b dec e add hl,de adc a,b ret
This uses this sqrtHL routine: ;written by Zeda sqrtHL: ;returns A as the sqrt, HL as the remainder, D = 0 ;min: 352cc ;max: 391cc ;avg: 371.5cc
ld de,05040h ; 10 ld a,h ; 4 sub e ; 4 jr nc,sq7 ;\ add a,e ; | branch 1: 12cc ld d,16 ; | branch 2: 18cc sq7: ;/
; ----------
cp d ; 4 jr c,sq6 ;\ sub d ; | branch 1: 12cc set 5,d ; | branch 2: 19cc sq6: ;/
; ---------- res 4,d ; 8 srl d ; 8 set 2,d ; 8 cp d ; 4 jr c,sq5 ;\ sub d ; | branch 1: 12cc set 3,d ; | branch 2: 19cc sq5: ;/ srl d ; 8
; ----------
inc a ; 4 sub d ; 4 jr nc,sq4 ;\ dec d ; | branch 1: 12cc add a,d ; | branch 2: 19cc dec d ; | <-- this resets the low bit of D, so `srl d` resets carry. sq4: ;/ srl d ; 8 ld h,a ; 4
; ----------
ld a,e ; 4 sbc hl,de ; 15 jr nc,sq3 ;\ add hl,de ; | 12cc or 18cc sq3: ;/ ccf ; 4 rra ; 4 srl d ; 8 rra ; 4
; ----------
ld e,a ; 4 sbc hl,de ; 15 jr c,sq2 ;\ or 20h ; | branch 1: 23cc db 254 ; | <-- start of `cp *` which is 7cc to skip the next byte. sq2: ; | branch 2: 21cc add hl,de ;/
xor 18h ; 7 srl d ; 8 rra ; 4
; ----------
ld e,a ; 4 sbc hl,de ; 15 jr c,sq1 ;\ or 8 ; | branch 1: 23cc db 254 ; | <-- start of `cp *` which is 7cc to skip the next byte. sq1: ; | branch 2: 21cc add hl,de ;/
xor 6 ; 7 srl d ; 8 rra ; 4
; ----------
ld e,a ; 4 sbc hl,de ; 15 jr nc,+_ ; \ add hl,de ; 15 | srl d ; 8 | rra ; 4 | branch 1: 38cc ret ; 10 | branch 2: 40cc _: ; | inc a ; 4 | srl d ; 8 | rra ; 4 | ret ; 10 /
sqrtHL was from my work on the float routines, sqrtHLIX was inspired by this thread EDIT: Optimized some more
Pages: 1 ... 12 13 [14] 15 16 ... 317
|