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 - thepenguin77

Pages: 1 ... 59 60 [61] 62 63 ... 108
901
ASM / Re: Please Help
« on: May 17, 2011, 06:59:03 pm »
Ok, I'm glad it was all in one appvar because that makes it way easier.

Code: [Select]

;##########################################
;search for a user
;input: de = ptr to start of appvar data, (including size bytes)
; hl = ptr to username
;ouput: de = ptr to start of user section
; carry set if not found

searchForUser:
ld a, 8
ld bc, 5

jr realSearch




;##########################################
;search for a coordinate
;input: de = ptr to start of appvar data, (including size bytes)
; hl = ptr to coordinate
;output: de = ptr to start of user section
; carry set if not found

searchForCoordinate:
ld a, 12
ld bc, 13
jr realSearch


;##########################################
;search for an ID
;input: de = ptr to start of appvar data, (including size bytes)
; hl = ptr to coordinate
;ouput: de = ptr to start of user section
; carry set if not found

searchForAnId:
ld a, 5
ld bc, 0


; jr realSearch
; fall through

;#######
realSearch:
push bc
push hl
ex de, hl
ld e, (hl)
inc hl
ld d, (hl)
inc hl
add hl, bc
push hl
ex de, hl
push af
ld a, 25
bcall(_divHLbyA)
pop bc
ld c, l
pop hl
pop de


actualFindLoop:
push bc
push de
push hl
checkMatchLoop:
ld a, (de)
cp (hl)
jr nz, isntMatch

inc hl
inc de
djnz checkMatchLoop

pop hl
pop af
pop af
pop de
or a
sbc hl, de
ex de, hl
ret


isntMatch:
pop hl
ld de, 25
add hl, de
pop de
pop bc
dec c
jr nz, actualFindLoop
pop af
scf
ret

These routines are pretty simple. Just give it the DE that bcall(_chkFindSym) gives you and it will search the appvar for the data you give it. If it runs out of entries, it will return with carry set. Make sure that you don't have an appvar with more than 255 entries though, or else it won't look very far. I tried to make them as small as possible and a few times I was tempted to use the shadow registers, but I didn't.

I also have no idea what you wanted for your third routine. I just made one that searches for a specific ID, you can add whatever you want to the output it gives.

And if you need to search for other stuff, my realSearch: function should work quite nicely.

902
TI Z80 / Re: zStart - an app that runs on ram clears
« on: May 17, 2011, 06:15:52 pm »
Hey, guys. I have reason to believe that zStart's 'Run on RAM clear' might beat PTT. Can anyone confirm (I use a patched OS)? Install zStart, then set CalcSys to a shortcut. Then activate PTT. RAM clear. zStart should reenable the hooks, and allow you to use the Shortcut to call CalcSys. From there, read/write a byte to the link port and your calc should unlock...

Very clever, but no, you get an Err:Disabled. But, if you made this program run on ram clears:
Code: [Select]
ld a, 3
bcall(_removeAppRestrictions)
ret
Then your calculator would never have PTT enabled again. You could even set this to run on Start Up because PTT doesn't disable OFFSCRPT.

903
ASM / Re: Please Help
« on: May 17, 2011, 06:08:17 pm »
So are these all different appvars? If they are, why don't you throw them all into one big appvar?

904
TI Z80 / Re: zStart - an app that runs on ram clears
« on: May 16, 2011, 08:22:49 pm »
OK thanks.  I'm going to send it over again - it didn't seem to work the first time, since it would just run the app without saving a shortcut.

That's because Mirage was getting in your way. Disable Omnicalc in zStart. Then clear your ram and don't touch Mirage. From here you can safely assign your shortcut keys.

2) Clock saving. I know this isn't technically "possible", but that's if you are looking to save every second of the clock in an ASM program :P (Or any program) I'm just asking to save the clock when you execute a program or leave a program. Applies to apps too, if possible. It would save me some time (hehe, get it? :P) to set the time. And of course, a manual shortcut as needed :)

Also, what's the status on DCS compatibility?

If I did clock saving like that, it would be off by about 1 minute per ram clear. Which would compound every time. And what is worse is that for every second you wait without pressing the ON button, the time gets 1 more second off.

DCS compatibility will be here once KermM gives me an entry point into DCS or completely stops working on it. And since KermM said that he couldn't add an entry point and isn't going to stop working on it anytime soon, I don't really see a "Install DCS" option. Sorry about that, I can't do it like I did Omnicalc because Omnicalc is not going to change. To install it, I actually call a routine inside of it.

905
Computer Projects and Ideas / Re: Long Exposure Pictures from Video
« on: May 16, 2011, 07:18:52 pm »
I think this might be similar to what modern digital cameras do.
Wrong. DSLRs simply leave the sensor active for the duration of the exposure. (Each photon deposits a small amount of charge into the photosite. As the exposure progresses, the charge builds up. At the end, an ADC reads out the charge level.) The main difference between a digital long exposure and film long exposure is film suffers from problems like reciprocity failure and color shifts, whereas digital sensors suffer from noise issues, even at low ISOs.
If I had just summed rather than averaged, all the pictures would turn out white.
That's probably because your camera is trying very hard not to make each frame pure black, so it's pumping up the ISO. With manual control, you could fix that.

Ok, that makes sense. I forgot that the camera actually changes the picture before it gets to the computer.

906
Computer Projects and Ideas / Re: Long Exposure Pictures from Video
« on: May 16, 2011, 06:35:42 pm »
That's pretty cool, inasmuch as it behaves nothing like a real long exposure. A real long exposure is the result of the sum of each pixel's luminance, not the average. You'd have to add in some code to clip pixels with a luminance below a certain level to deal with noise and compression artifacts. You also need a really dark room.

That made my day. You're right, it doesn't work like a real long exposure film, but I think this might be similar to what modern digital cameras do. If I had just summed rather than averaged, all the pictures would turn out white.


On a side note, my video sound was played during converting. Does it open WMP in the background or something while doing so?

I wish I had a camera that supported that stuff...

I never noticed that because all of my videos are silent. It used to actually play the video while it converted, but I turned that off. I didn't realize that it still played the sound though. DirectShow pretty much does what it wants :P

907
TI Z80 / Re: zStart - an app that runs on ram clears
« on: May 16, 2011, 06:26:10 pm »
This app is really awesome! ;D
Quick question: would it be possible to get the [On] + [numpad] hook to launch apps as well?  Or is that impossible?

Lol, it does already.

EDIT: I just had an idea to die for! (Not really die, but I digress)
Can you please impliment an Omnicalc Quick-App style Quick-Program thing to make scrolling through the program list really fast.  All it is is a linked list (if my speculation is correct), so all you have to do is mess with the VAT.  This would have to be redone every time Mirage or DCS is re-sorted (I think), but I scroll through with the program menu and would use this a lot.  Thanks!
Also, was Quick-Apps in zStart ever implimented?  Personally, Omnicalc messes with too many things for me to use it, so I don't have Quick-Apps enabled because I don't have Omnicalc enabled and would like it running. :)
Thanks!

I could probably do that. It shouldn't be too hard. I'll just have to make sure I don't interfere with anything else.

908
Computer Projects and Ideas / Re: Long Exposure Pictures from Video
« on: May 16, 2011, 06:22:55 pm »
I'll have to try this out sometime. Does it work on linux? if so what do I need to install?

I have no idea if it will work in linux. I use directShow, which is a windows thing, so it probably won't work. But in case it does, you need DirectX and the C++ runtime libraries I linked to up top.


I love the pics. how do you draw them so well with a flashlight?

I have no idea. They come out way better than you expect them to. You just have to try to remember where you are at in the dark.


Where can I download it ThePenguin77?

It's the .zip in the first post. It's actually the program, not just all the pictures.


909
TI Z80 / Re: zStart - an app that runs on ram clears
« on: May 15, 2011, 11:11:13 pm »
So I mostly just cleaned everything up:

Updates:
  • EditBuffer is reopened after [ON] + keys, (Mathprint isn't handled well, but it doesn't crash)
  • Fixed a mistake where OFFSCRPT wasn't created the moment on ON program was set, (it was still set on ram clears and by running the app though)
  • Without a shell, all ION calls except ionDetect and ionDecrompress work
  • Without a shell, page $82 is swapped in, which means that if a program tries to use a Mirage call, it will have a clean crash
  • APD is re enabled after running programs



And ACagliano, I fixed the running Apps on Turning On, but as for the DCS side, you'll have to bug Kerm about that. zStart will always have to overwrite DCS's OFFSCRPT in order to function. But to be nice, I only kill it if you are running a program on ON or are displaying a picture on startup. The problem is that DCS kills OFFSCRPT whether it needs it or not. So that's why DCS turns it off.

But I suppose if you have it enabled with both. zStart will do it the first time, and then DCS will handle it from then on.

910
TI Z80 / Re: zStart - an app that runs on ram clears
« on: May 15, 2011, 02:16:16 pm »
Oh, I see what went wrong there. It has nothing to do with running on ram clears. It's a combination of two things, 1) Mathprint 2) Me not reopening the edit buffer.

I figured out that the calculator still works if you close the edit buffer in a keyHook and then don't reopen it. I just didn't realize that this would crash mathprint. So I'll fix that.

911
TI Z80 / Re: zStart - an app that runs on ram clears
« on: May 15, 2011, 01:57:33 pm »
Yes, I'll put a readme out eventually. It will be when I uploaded it to ticalc.org again.

The run on Ram clear option purely runs your program on ram clear. So simple enough, find the program, press [ON] + [ . ] twice, then on the next ram clear, that program will run right between displaying the calculator type and displaying "Ram Cleared."

The old ram clear is for OS's 2.53 and 2.55. It makes the ram clear screen look like the 2.43 screen.

And there's nothing really buggy about running on ram clear. It's no different than any of my other shortcut settings.

912
ASM / Re: Running a No-Stub from an App
« on: May 14, 2011, 05:47:39 pm »
It starts with _chkFindSym, but that only gives you the start of the flash header in flash. You then need to forward your way to the actual program data. Here's what you'll be looking at:
Code: [Select]
flash flag | flash size L | flash size H | variable type | T2 | Version | address L | address H | page | name length | - Name 1-8 bytes -

So, you need to add 9. Check to make sure it didn't cross $8000, get the name length, then add the name length and check again that it didn't cross $8000. Then you can just read the size bytes and do a _flashToRam.

913
General Calculator Help / Re: Calculator headphones
« on: May 14, 2011, 01:17:51 pm »
Yep, just run zStart, then press [ON] + [Y=] at the homescreen to make it work with headphones.

914
TI Z80 / Re: Chess
« on: May 14, 2011, 09:49:26 am »
I've thought about that too. But the main problem I see is an 80% decrease in battery life. Check out this awesome post by Dr. Dnar.

915
ASM / Re: Running a No-Stub from an App
« on: May 14, 2011, 08:57:41 am »
Well, actually there are two ways.

1. You can do it the TI way. Find the program, make sure it is in ram, load it's name into op1, then bcall(_executePrgm). This is the easy way, but it's limited by what TI can do.

2. Find the program, and you'll have to do different things based on whether it's in flash or ram.
    Flash: find the start of the program in flash, bcall(_insertMem) size - 2 at $9D95, ldir the program without the $BB, $6D to $9D95. When you are done, just bcall(_delMem) the $9D95 for the size you inserted.
    Ram: find the start of the program in ram, copy the program 768 bytes at a time by 1) ldir 768 bytes to saveSScreen, 2) bcall(_delMem) the bytes you just copied, 3) bcall(_insertMem) 768 bytes at $9D95, 4) ldir the bytes there, 5) repeat. When you are done, just do this but instead copy from $9D95 to the little stub of a program you left earlier. And don't forget, _insertMem and _delMem shift all memory, so you'll have to adjust your pointers while copying.

Pages: 1 ... 59 60 [61] 62 63 ... 108