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 ... 50 51 [52] 53 54 ... 317
766
Other Calc-Related Projects and Ideas / Re: OmniRPG - Sprites
« on: September 10, 2013, 07:47:33 pm »
I was just going to ask this, too. From the tilemapping end, 8x8 is much easier and it is faster. I don't know if you saw the screenies in some of the other topics, but I included some tiles that were grouped together to form 16x16 tiles and some even larger. Using 8x8 tiles will give us the ability to still create and use 'fake' 16x16 tiles, along with 8x8 tiles for better detail in that way. From the perspective of data size and compression, I have been working on a tilemap compression routine that will compress be able to store large tiles (like houses or very large trees or anything else that is comprised of multiple 8x8 tiles) as a single byte, then upon decompression to RAM, it will simply take that byte and expand it to however large it needs to be. I would get into more detail on the compression methods I have in mind, but I will save that for the Coding topic.

767
Other Calc-Related Projects and Ideas / Re: OmniRPG - Main Topic
« on: September 10, 2013, 07:39:21 pm »
I won't mind handling the tilemapper since it is pretty difficult to understand unless you write it yourself (sorry).

Also, I have nothing to contest :)

768
Other Calc-Related Projects and Ideas / Re: OmniRPG - Main Topic
« on: September 08, 2013, 09:27:33 am »
Yeah, I still come back to it from time to time. If I ever release my tilemap library thingy, it might make development easier. I use the same engine here:

Again, that is 6MHz, but I do have a screenshot where I toggle 15MHz mode in it:


769
Forum Arcade Games / Re: Jewels
« on: September 07, 2013, 12:35:00 pm »
Nice game, but it takes a long time to lose D: And I wish the current score was floating around somewhere >.>

770
I still manually set up hooks because of this thing :P

771
ASM / Re: Patching the OS
« on: September 03, 2013, 12:34:00 am »
Since the title of the thread is "patching the OS," I am assuming you actually want to modify the OS itself instead of simply using what the OS has to offer. In that, thepenguin77 is pretty knowledgeable. Really, it would most likely amount to toggling a handful of bits in the OS (bits, not even whole bytes would need to be edited). I haven't dabbled in that yet, but to expand a little on what was said before...

The hex code FDCB24DEC9 translates to:
Code: [Select]
     set 3,(iy+24h)
     ret
When you say you have assembly experience, I am not sure if you mean specifically Z80, or other assembly languages, but basically, the OS reserves the index register IY for its own use. It points tot he start of the system flags, and as its name implies, flags can thus be referenced as an offset from IY. so IY+0 would be the first byte, IY+1 would be the second, et cetera. Almost all of the instructions that use the register pair HL can use one of the two index registers (the other is IX). So for example, ld a,(iy+7) would load the contents 7 bytes ahead of where IY points into a.

The instructions starting with set res and bit allow you to modify or read an individual bit of an 8-bit register or the byte of ram pointed to by the register pair HL. SO this gives you b,c,d,e,h,l,(hl),a. With these, you can use an index register in place of (hl) allowing you to use (ix+const). Taking a look at the code above, again, we have:

Code: [Select]
     set 3,(iy+24h)
Since IY should be pointing to the flags, the OS keeps the offset 24h as the byte with the flag controlling lowercase mode. In particular, it is bit 3 at offset 24h that is the appropriate flag. You don't have to memorize the flags and offsets too much, though, if you don't want to. The ti83plus.inc file has defines and equates that will let you do something like:
Code: [Select]
     set lwrCaseActive,(iy+appLwrCaseFlag)

The links that Assemblybandit provided are to an excellent resource if you want to learn how the OS works. Hooks were intended to provide a safe way to modify the actions of or update functionality of the OS without actually needing to go in and permanently edit it.

I hope  this helps!

772
General Calculator Help / Re: New to calculators
« on: August 26, 2013, 11:07:34 pm »
Before all that, I indeed was programming quite a lot on my 84+ ... during class; but is that still what people do nowadays ? At this time, smartphones didn't exist...
Teachers don't like us to use phones in class... I program a lot in classes, but my programs are always about what we are doing in class. For example, taking a fractals class, I would write programs on my calculator to draw the same fractals. For graph theory, linear algebra, and statistics, I would make programs to quickly solve and analyse problems.
I use my Nspire for playing Pokémon Gold and for lots of math since it is so much faster than my TI-84+.

773
TI Z80 / Re: TI84+C Bundle
« on: August 26, 2013, 10:31:52 pm »
Wow, that looks really nice! I haven't played Frogger since I was like 4 or 5 years old. Back then, I thought they were crocodiles instead of turtles XD

774
Axe / Re: Map Data Storage
« on: August 24, 2013, 10:07:18 pm »
With the first method he is describing, I believe he means that you basically keep a list of changes in something like a save file. This way your tilemap data can remain archived, but when you copy (I mean copy, not unarchive) it to RAM, you check the list of changes to see if any of the tiles have to be modified. So for example, if Map00 has the (3,3) tile modified to a 6, you might include in the list a sequence of bytes: 00030306. When the player enters Map00, you copy the appvar data to RAM, then you read the list of changes to see that (3,3) needs to be changed to a 6.

775
ASM / Re: [z80] Floating Point Routines
« on: August 18, 2013, 11:45:16 pm »
I added a few 24-bit floating point routines including a log2 routine. The advantage to the 24-bit floats is that it can all be done in the registers, giving them even better speed. The obvious downside is a much more limited range for accuracy (about 4 to 5 decimal digits), but it does provide a fast alternative to integer math. It could be used in languages like Axe or Grammer.

I haven't fully tested the log2 routine, but I did test a few key values that were more likely to have issues with accuracy. I am pleased to say, that the worst I got was about .0000763 away from the actual value (but I won't be surprised if there are values that yield as much as an error of 5 times that). The main issue is that it doesn't handle negative inputs.

By the way, for timing, the log2 routine is around 1200 to 3500 t-states, so it can do 1700 to 5000 computations per second at 6MHz. Graphing a log() equation should be pretty fast ;D

776
ASM / Re: [z80] Floating Point Routines
« on: August 16, 2013, 04:28:26 pm »
I modified the addition routine (I rewrote it from scratch) and it now handles adding negative numbers and whatnot. This means the subtraction routine only needed to toggle the sign of the second input, so multiplication, division, addition, and subtraction are working :)

I also put the code here because the first post was getting too cluttered for my liking. If you check it out, you will notice the yet-to-be-tested code for the CORDIC algorithm that should compute sine and cosine at the same time.

777
ASM / Re: [z80] Floating Point Routines
« on: August 14, 2013, 12:13:29 pm »
I added the 80-bit Floating Point Addition routine which was friendlier than I expected. Also, for current timings, Division is a little under 60 000 t-states, multiplication is a little over 30 000 t-states, and addition is just under 1400 t-states. I need to make all of these faster x.x

EDIT: Oh, also, The floating point addition code includes a routine for setting a number to infinity, keeping its sign, among other things. It also has rounding implemented.

EDIT: In my test app, here are the sizes so far:
FloatAdd : 244 bytes (this includes the code for handling infinity and a few other subroutines that will be shared by others)
FloatDiv : 244 bytes
FloatMul: 205 (this includes a subroutine routine for 64-bit integer multiplication)

778
ASM / [z80] Floating Point Routines
« on: August 13, 2013, 12:09:18 pm »
EDIT: I'm still not good with GitHub, so I'm going to try to get this to work, but I make no promises. z80float


Hopefully, this can evolve into a collection of floating point routines, with this first post edited to keep them in one easy place. I am working on some floating point routines for use in things like Grammer and I hope it will some day make its way into a community made OS, so I hope that people find these useful enough to use (and feel free to do so). I am still working on these routines, trying to optimise them, too.

edit: I removed the code because it was too much. Instead, I have made a public folder available here to keep these organised.

Tari, from Cemetech posted a link to some routines received from Scott Dial for BCD format (the same as the TI-OS). They can be found here.

Examples of use might be:
Code: [Select]
   ld hl,FP1
   ld de,FP2
   call FloatDiv
   <<code>>
FP1:
  .db 0,2,  $c9,$0f,$da,$a2,$21,$68,$c2,$34    ;pi, not rounded up
FP2:
  .db 0,2,  $ad,$f8,$54,$58,$a2,$bb,$4a,$9A    ;e, not rounded up
The 80-bit division and multiplication routines do not handle overflow yet. On the to-do list:

  • 80-bit Addition
  • 80-bit Subtraction
  • 80-bit Exponents
  • 80-bit Logarithms
  • 80-bit sin/cos/tan
  • 80-bit arcsin/arccos/arctan
  • 80-bit Complex Addition, Subtraction, Multiplication, Division, Exponents, Logs, Trig
  • BCD Division
  • BCD Exponents
  • BCD Logarithms
  • BCD sin/cos/tan
  • BCD arcsin/arccos/arctan
  • BCD Complex Addition, Subtraction, Multiplication, Division, Exponents, Logs, Trig



From these, routines such as those dealing with probability, statistics, and other similar routines should be easier to make. The advantage to using BCD is for displaying numbers or reading them during parsing. With the 80-bit format, most non-integers don't have an easy representation (like .1) and in order to parse a base-10 string of digits, you would have to do some very time consuming processes (probably a hundred times slower than with BCD). However, for compiled languages and where text output isn't necessary, 80-bit floats offer a much higher range of numbers, greater accuracy, and all for a decent speed.

779
I am in need of a subdr instruction right now :P That would let me subtract a big endian number from another.
Also, subir, addir, adddr would be nice. In fact, a bunch of instructions with increment/repeat or decrement/repeat would be nice. You could OR two buffers with:
Code: [Select]
ld hl,gbuf
 ld de,backbuf
 ld bc,768
 orir
Or shift a buffer right:
Code: [Select]
ld b,0
 ld d,64
 ld hl,gbuf
 ld c,12 \ srlir \ dec d \ jr nz,$-5

780
TI Z80 / Re: Monochrome Font Editor
« on: August 10, 2013, 12:38:40 am »
It was the font size. I don't know why it was so big before, but I recently switched to an old theme and that font makes it fit. Thanks!

Pages: 1 ... 50 51 [52] 53 54 ... 317