586
TI Z80 / Re: circles
« on: January 17, 2014, 05:37:08 pm »
That actually looks really cool, nice! Also, 1.9MB o.o
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. 586
TI Z80 / Re: circles« on: January 17, 2014, 05:37:08 pm »
That actually looks really cool, nice! Also, 1.9MB o.o
587
TI Z80 / Re: LangZ80« on: January 17, 2014, 12:25:34 pm »
When I say "viable alternative" I mean to address the fact that TI-BASIC is still the best language for math. As well, it provides a useful range of variable types.
EDIT: Also, I just added in better (but not perfect) rounding. 588
TI Calculators / Re: Is it possible to run a TI-84+ OS on a TI-84+CSE?« on: January 17, 2014, 12:18:14 pm »
Yeah, but those are all part of the OS.
589
TI Calculators / Re: Is it possible to run a TI-84+ OS on a TI-84+CSE?« on: January 17, 2014, 12:13:51 pm »
Well, yeah, but that's not what you asked. Literally, here are the differences:
-There is more Flash -The LCD is changed -The OS code was changed accordingly Nothing else has changed. In fact, the LCD uses the same two ports as before. The processor didn't change, and the memory map didn't change, so you can definitely put any monochrome OS on the color calc. It would still read keys, work with flash, the USB and I/O port would work (you could still send stuff to it or get stuff off of it with TI-Connect or TILP). You could even send an assembly program that does work properly with the LCD. But otherwise, yes, it would be impossible to use an unmodified monochrome OS and fully support monochrome programs or apps. They have to be manually ported. 590
TI Z80 / Re: LangZ80« on: January 17, 2014, 11:16:56 am »So what does this do exactly? I'm sort of confuzzled.Currently, it is reading code and parsing it. It can only read integers and floats, multiply, do the XORSPRITE(), UPDATELCD(), and WAIT() commands, and you can technically store to variables, but that is a bit broken. For floats, it works to 38 digits of precision at the least by default. So it is yet another programming language?Yup Hopefully I can eventually provide a viable alternative to BASIC. 591
I started posting about LangZ80 in the FileSyst thread. Although I don't consider it a project-- it is more of a "proof of concept" program-- I have been having updates and instead of derailing the FileSyst thread, I brought it here.
Basically, I want to get FileSyst to a point where it can use variables and functions and basically work as a higher-level programming language and not just an exposed filesystem. I decided to experiment by creating a parser (yet again). It is really broken and in a messy state, especially with the variable storage. There are lots of bugs there, as well as a few other bugs (integer that are multiples of 256 don't work properly, and I believe I left a few bugs in the float multiply routine). However, when I am not introducing bugs and things are working as they should, here is what it has:
It is really kind of garbage at the moment, but feel free to download it to test out in WabbitEmu. It is not stable and it will likely end up crashing a few times. If at any point it seems like the program has frozen, it might instead be in the WAIT() loop or in another loop I made. To get out, try the following first:
(also, it's 3344 bytes of code out of 16384) 592
TI Calculators / Is it possible to run a TI-84+ OS on a TI-84+CSE?« on: January 16, 2014, 10:58:02 pm »
That would require a modified OS updating all of the graphics of the OS. This is essentially what the CSE OSes are
Have you gotten to check out all of the fairly awesome projects already completed with the CSE? There are a number of people that know how to work with the LCD. Just look at KermM's DoorsCS8, tr1p1ea's xLIB CSE, the plethora of AsmBandit's programs. 593
TI Calculators / Is it possible to run a TI-84+ OS on a TI-84+CSE?« on: January 16, 2014, 05:18:22 pm »
Yes, you can. However, the LCD driver is completely different so you would only see garbage.
594
TI Z80 / Re: FileSyst« on: January 16, 2014, 03:38:24 pm »Are there any hooks can be reached with some Axe? I'd like to test it by doing a graphical wrapper.Are you talking about the latest side project or FileSyst? FileSyst does have a jump table to handle a bunch of things. LangZ80 does not have one yet, but I can easily add in some jumps to the parser and a few of the routines. I have it so that it really can take HL as the location of the code, BC as the size of the code, and it does the interpreting from there. I also have a routine that converts the output to a 16-bit integer instead of a string, and I can make a call that reads from a 0-terminated string (like Axe uses) so you could do something like this in Axe: Code: [Select] LANG("VAR1")→A And then it would either return a pointer to VAR1 if it is a string, or it would return int(VAR1) for Axe.Xeda, are they viable for a full-fledged OS?If I understand correctly, yes, these routines are currently adequate as a calculator. It defaults to a precision of 128 bits for floating point math (the TI-OS uses <48 bits) so it is much more accurate, and integers are arbitrary precision, up to 2040-bits (614 digits). I plan to add a few more variable types, including Sprite, Array, and List. As well, custom variable types so that types like Complex, Complex List, Complex Array, Matrix, can be made from these. 595
TI Z80 / Re: FileSyst« on: January 16, 2014, 03:21:21 pm »
I don't think I will ever finish writing an OS, but I am trying to get a lot of the key components done. Of the related things I have done that I would like to bring all together:
-EnG which was never finished, but provided a very simple file system spanning the extra RAM pages (detecting whether there were 1 or more RAM pages). -Grammer as a simple interpreted language. -FileSyst which exposes a file system and related housekeeping commands. 596
TI Z80 / Re: FileSyst« on: January 16, 2014, 02:29:21 pm »
The sprite isn't hexadecimal. I was just using a simple sprite. I don't have a "hex2bin" command yet. Also, I don't have the sprite variable type defined yet, so I had to cheat by using a string. The two empty spaces are just padding where the sprite width or height would be.
Also, I should point out that the float->str command is not finished (as seen in the screenshots). It only converts the integer part. However, it is actually storing the decimal part. 597
TI Z80 / Re: FileSyst« on: January 16, 2014, 02:19:19 pm »
I haven't merged this with FileSyst yet, but I am making some more progress. Last night I finally added the Str->Float routine, so now floats can be used. The way I am handling floats is by satisfying the following two conditions by default:
-There must be at least 32 bits of precision for the fractional part of the number. -There must be at least a total of 128 bits of precision. So for example, if you have a number whose integer part is already 112 bits before the decimal point is encountered, it will allocate 32 bits more for the decimal part making 144 bits. For math, I only have multiplication. I have int_times_int and float_times_float, but I still need int_times_string and int_times_float and once I add in arrays and lists, I will need to accommodate for those. The way I handle precision with multiplication is by using the size of the highest precision input. So if one float was 128 bits and the other was 144, it would output a 144-bit number. I plan to make a command to modify the accuracy and size of floats. I actually still need to complete one other part of the floating point code, and that is to handle negative exponents. I am sure I will get to it some time. Aside from floats, I have some variable support. You can make a var from scratch, but I didn't add in the code for updating a var with new data. That should be done easily enough. I have a few commands that I added for testing purposes. Those are XORSPRITE(), UPDATELCD() and WAIT(). They work The way I have coded this interpreter should make it easy to incorporate a file system. I was already rewriting FileSyst to incorporate features I am using here (like an indexed binary search for files and folders) so I will probably merge the two. 598
Miscellaneous / Re: porting old prgms« on: January 16, 2014, 01:46:42 pm »
For that size, no. However, a 16-bit color, 16x16 sprite at arbitrary coordinates (no clipping) would take 9506 t-states. On the monochrome models, you would have to rotate the sprite data accordingly before drawing to the gbuf, and then you would have to update possibly 3 columns of 16 pixels tall.
I think I can manage the drawing part using SMC in about 5400 t-states, then the LCD update part would require some quick overhead code to compute the offset into the gbuf, 6 coordinate writes to the LCD, and 48 data writes totaling 54 writes. Assuming the rest of the code is handled in the wait-states, if the average wait-states are 76, then the color model is only slightly faster. So at 6MHz, it is faster on the monochrome calcs in most cases. However, the monochrome calc wouldn't be running at 6MHz, it would be 15MHz which could require about 130 cycles between LCD writes (sometimes more, sometimes less). In this case, it would take >12000 t-states. EDIT: For reference, here is the (possibly incorrect) code I was referring to for the CSE calculations: Code: [Select] ld hl,$10B8 ; BGR mode, increment order I adapted it from my attempt at writing a monochrome sprite routine, so the sprite data is mostly garbage now
599
Miscellaneous / Re: porting old prgms« on: January 16, 2014, 01:23:54 pm »
In assembly, sprite rendering would be faster for most size, but only if you have a handful of sprites. Basically, you save time by being able to draw directly to the LCD at pixel coordinates without an LCD delay.
Also, dreamdragon, it is preferred that you use the "Quick Modify" or "Modify" buttons to edit your post instead of posting close together (also known as a "double post" which is referred to in the rules). 600
Axe / Re: cos(, tan( and sin( return strange values« on: January 16, 2014, 01:13:41 pm »
If you have read the documentation, what it means by having the range on [-128,127] is that 64 corresponds to "90" or "pi/2" or whatever other notation you might be used to. Likewise, since Axe only works with integers and fixed point, the output is basically 128*sin(x). Otherwise, it would always return 0 from rounding
So, the binary angle 90 corresponds to the degree measure 90*180/128=126.5625, and 128*sin(126.5625) is about 103. Axe returns 105, since it is an approximation (this is still within .01 of the actual, which is good). You aren't getting 105, though, which might seem weird, but the problem is that you are using {}. In Axe, this means "read the byte at the address given." Basically, you told it to display the number at byte 105 of memory. If you wanted, you could get Calcsys, open the hex editor, press [Alpha][G] (for Goto) and type the address 006A and you will see the byte value is indeed 08. EDIT: Also, I don't think Axe supports tan()... If you do want that, I would suggest using a fixed point division of sin()/cos(). For example: Code: [Select] .TAN Then do something like 37*128/180:Asm(prgmTAN:Ans and you should get an approximation of 256*tan(37).
|
|