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 ... 57 58 [59] 60 61 ... 317
871
ASM / Re: Fixed Point Logarithm
« on: June 30, 2013, 06:21:22 pm »
I found a few errors in the log_2 routine (translation issues from hex->assembly). As well, I rearranged the code and in all saved a byte and some t-states :) I updated the first post with my preferred version which is slightly speed optimised in the same way as the last version. Here is a cleaner, smaller version and is only slightly slower (about 39 t-states on average):
Code: [Select]
Log_2_88_size:
;Inputs:
;     HL is an unsigned 8.8 fixed point number.
;Outputs:
;     HL is the signed 8.8 fixed point value of log base 2 of the input.
;Example:
;     pass HL = 3.0, returns 1.58203125 (actual is ~1.584962501...)
;averages about 39 t-states slower than original
;62 bytes
     ex de,hl
     ld hl,0
     ld a,d
     ld c,8
     or a
     jr z,DE_lessthan_1
     srl d
     jr z,logloop-1
     inc l
     rr e
     jr $-7
DE_lessthan_1:
     ld a,e
     dec hl
     or a
     ret z
     inc l
     dec l
     add a,a
     jr nc,$-2
     ld e,a

     inc d
logloop:
     add hl,hl
     push hl
     ld h,d
     ld l,e
     ld a,e
     ld b,8

     add hl,hl
     rla
     jr nc,$+5
       add hl,de
       adc a,0
     djnz $-7

     ld e,h
     ld d,a
     pop hl
     rr a           ;this is right >_>
     jr z,$+7
       srl d
       rr e
       inc l
     dec c
     jr nz,logloop
     ret
Also, I used 'rr a' here for the flags to test if a>1 (the c flag is reset before hand, but I could have used sra a or srl a or bit 1,a or bit 1,d).

872
Humour and Jokes / Re: Funny #omnimaga quotes (NSFW)
« on: June 30, 2013, 08:29:00 am »
Quote
[8:20:25 AM]   Xeda112358   which is the worst part about non-prime bases :-[
[8:20:51 AM]   codebender      can we just make a new channel for this stuff?  I am confused.
[8:21:12 AM]   Xeda112358   a new channel for... programming? :P
[8:21:14 AM]   harold             to hide the confusing stuff in? :P
[8:21:16 AM]   codebender      #omnimaga shift
[8:21:22 AM]   Xeda112358   haha
[8:21:30 AM]   Xeda112358   that's kind of funny :P
[8:21:55 AM]   Xeda112358   yeah, ring theory is considered more advanced math
[8:22:01 AM]   Xeda112358   but programmers use it all the time
[8:22:18 AM]   codebender      not me :P
[8:22:29 AM]   jacobly            I'm officially learning about it next semester :D
[8:22:38 AM]   codebender      lol, diagonal smileys
[8:22:48 AM]   Xeda112358   if you continue on in programming, you should definitely get there
The smiley's.

873
Other / Re: New Knex Ball Machine
« on: June 29, 2013, 09:19:54 am »
Have you checked the batteries? And yeah, I did that to one of my motors and it is no longer as powerful :[

874
Other / Re: New Knex Ball Machine
« on: June 29, 2013, 09:17:07 am »
Maybe a piece got stuck in a gear?

875
Computer Programming / Re: I'm learning C++!
« on: June 28, 2013, 07:36:43 am »
Cool, I just started really learning C++ a few days ago, too! I finally made the start of a Mandelbrot set explorer yesterday :)

I basically just used Google to look up how to do things. If I know what the code is supposed to do, then I can usually figure out what each part of the code is doing and that is how I am learning new things. My code is pretty ugly, but I am hoping it will get better as I get more experience XD

Here is a video : https://docs.google.com/file/d/0B4HNIXQZLWM8ZzJUV2NFa3V1LU0/edit?usp=sharing

It makes me really strain my brain to learn this stuff, but it is rewarding!

EDIT: It is so much more of a pain to set up than TI-BASIC x.x

876
Other / Re: Germany being spied on
« on: June 27, 2013, 09:10:35 am »
Er, this might help my post make more sense:
http://www.smbc-comics.com/?id=2974

877
Other / Re: Germany being spied on
« on: June 27, 2013, 08:43:20 am »
Cats. Ponies and cats. Hide your data in such images and use algorithms to extract the data. We have been working for years to establish our Trojan Horse, now we must use it wisely.
* Xeda112358 runs

878
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 26, 2013, 10:58:24 pm »
Some commands I think you should have are:
For math:
+,-,*,/,^,log2,sqrt() and maybe some trig functions
Some bit operations such as arbitrary shifts/rotates and bit-logic

For Graphics:
Line, Circle, Sprite, Rectangle, lcd refresh

For Input/Output:
getkey, Text()

And a few commands for creating and editing files.

That should make for a light language and still powerful. As well, there should be an easy way  to incorporate assembly for users that want to be very precise with what there program does.

If the math can return information such as the c,z, and sign flags (maybe store this in a system var), that would also be very useful. If users needed, say, 32-bit math precision, this would help.

Good luck!

879
TI Z80 / Re: Monochrome Font Editor
« on: June 26, 2013, 10:34:57 am »
I plan to work with this later, thanks! I really need a prettier font :P

880
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 25, 2013, 06:50:15 pm »
Oh, I see .__. If it is possible, do you plan to have any kind of interpreted language? It might make it easier to keep program size down, but the cost would be consuming flash memory.

881
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 25, 2013, 06:46:25 pm »
Hmm, why does it have to load to RAM to run? Is there no way to let it run from flash? If it is an interpreted program, I would imagine that it could be sourced directly from flash (though this has potential to be slower).

882
TI Z80 / Re: [Axe] The Cutting Edge of Axe (an Axe 4k demo program)
« on: June 25, 2013, 11:07:29 am »
That is really cool, Matrefeytontias, especially the stuff that looked like 3D Pong!

883
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 25, 2013, 10:46:04 am »
16KB of flash and 2KB of RAM, while doable, that seems like it isn't... much. With the 20MHz speed and 2 processors, is it possible to have more? TI calculators currently have more totally memory available just in RAM.

But otherwise, this is excellent! How fast does the LCD respond?

EDIT: Now I see that there is a microSD slot, cool!

884
TI Z80 / Re: Presidential Database CSE
« on: June 25, 2013, 09:24:37 am »
There is xLIB CSE that makes use of a pallet and it might be possible to adapt the pallet to be customisable.

Also, how many colors do you have currently? If you are using 16 colors, then it would actually be pretty easy to compress the pics to half their size without any data loss. (1 nibble can hold a value from 0 to 15).

885
Other Calculators / Re: How are we even supposed to beat that? O.O
« on: June 23, 2013, 12:30:30 pm »
That actually looks pretty cool! I am glad somebody spotted this before it got lost in the other uploads!

Pages: 1 ... 57 58 [59] 60 61 ... 317