This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Fate by Fire: The Sword of Neisius => Your Projects
Author Message
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 28 May 2003 02:06:35 am    Post subject:

Thank You, I will ask him about his 4 level Grey Scale routine for displaying interlaced bitmaps using interrupts.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 28 May 2003 06:37:38 pm    Post subject:

Also if you would like a good rle decompression program (to go with David's compression one) Laughing I'd be willing to post the source to mine.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 28 May 2003 06:58:19 pm    Post subject:

The Lempel-Ziv would be much better
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 28 May 2003 11:48:07 pm    Post subject:

Ok what? I don't have any idea what you're talking about.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 29 May 2003 12:53:14 am    Post subject:


Code:
;inputs:
;ix->compressed data
;de->area to decompress to
;bc = uncompressed data size
;

rle_decomp:
 ld a,b
 or c
 ret z
  ld a,(ix)
 inc ix
 cp $ff  ;is it the flag for a 1byte run (3-255)?
 jr z,rle_decomp_1byte
 cp $fe  ;is it the flag for a 2byte run   (256-65535)?
 jr z,rle_decomp_2byte
  ld (de),a
  inc de
  dec bc
  jr decompressL
rle_decomp_1byte:
 
 ld l,(ix);l = run length
 inc ix
 ld h,(ix);a = run character
 inc ix
rle_decomp_1byteloop:
 
 ld (de),h
 inc de
 dec bc
 dec l
 jr nz,rle_decomp_1byteloop
 jr rle_decomp
rle_decomp_2byte:
 ld h,(ix)
 inc ix
 ld l,(ix)
 inc ix
rle_decomp_2byteloop:
 ld a,(ix)
 ld (de),a
 dec bc
 inc de
 dec hl
 ld a,h
 or l
 jr nz,rle_decomp_2byteloop
 inc ix
 jr rle_decomp


A two byte run requires a 4byte piece of code

1st=$FE flag
2nd=first byte of run length
3rd=second byte of run length
4th=byte to copy
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 29 May 2003 12:59:11 am    Post subject:

Well, you are unlikely to need 16 -bit compression.

I cannot think of many circumstances in which you would have 257 repeated bytes.

I mean, the only situation I can think of is empty ram, and a picture containing 257*8 consecutive pixels off or on. Even then, you have 25% of the screen black or white in a filled box.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 29 May 2003 08:45:24 am    Post subject:

16 bit decompression can easily be removed from the source. It would be effective for tilemaps that have masses of tiles that are the same. The 16 bit decompression was only a test to see how effective it would be.

ex. completely black pic
compressed (1byte method)

$00 is the equivelent of 256

$FF,$00,$FF,$FF,$00,$FF,$FF,$00,$FF




compressed (2byte method)

$FE,$03,$00,$FF




Bad example because 'most' people wouldn't compress a completely black pic. But you get the point. Laughing
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 29 May 2003 03:35:15 pm    Post subject:

Okay, I see you understood everything I said before I said it which is okay.

Yes, 16-bit compression is usefull for other things though. for example, take the picture on your comuter screen. In the text box I am typing into, there are probably abotu 1000 white pixels per row!
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 30 May 2003 10:37:20 am    Post subject:

Yes you're right it all depends on the situation. 16 bit compression could be very effective if there are masses of same data. It all depends on what you are using it for.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 31 May 2003 01:20:32 am    Post subject:

Then there are types of compression.

There is RLE, Huffman, Lemptel-Zif, et cetera.

We have been discussiong RLE which does not take a computer science engineer to understand.

Well, as you know, most words do not contain the same letter more than three times, so not much compression takes place.

Think about it, in theis entire post, have you seen a single situation when ther is a woooooord with that many 0's?

Zif (not zip) and huffman are capable of much higer rates of compression than RLE, and they too are lossless; moreover, either one could probably compress what I have wrighten to 70% the size it is now. Furthermore, with high optimization, study, development, math, and other research and other study, a routine like the ZIP routine can be made which can compress a text file to about 25% its size.

However, any routine besides RLE would choke the CPU of a calculator even in assembly. In other words, if it takes 10 minutes to decompress, nobody would use it.

RLE works great because not only is it fast, but it is very useful in pictures with repeating patters.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 01 Jun 2003 10:27:42 am    Post subject:

Ok back to the topic on hand. I have gotten some people to help me with graphics for my rpg so you will notice a bunch of changes. Alot of the tiles you saw in the last screen shot were taken from Zelda. They all need to be changed, I just wanted to show off the awsome graphics.
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 01 Jun 2003 03:22:33 pm    Post subject:

also, if you used two flag bytes (ex: FF and FE) you would be able to compact quantities over 256 bytes. FF would be 8 bit compression and FE would be 16 bit compression.
Back to top
Pascal


Advanced Newbie


Joined: 24 May 2003
Posts: 76

Posted: 01 Jun 2003 06:42:06 pm    Post subject:

Very nice justin. Im still screwing around with my GUI mock. Hopefully Ill get that done some time soon.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 01 Jun 2003 06:49:40 pm    Post subject:

62_52_53_53 wrote:
also, if you used two flag bytes (ex: FF and FE) you would be able to compact quantities over 256 bytes. FF would be 8 bit compression and FE would be 16 bit compression.

Ummmm if you looked at the above posts you would have noticed that I already made a decompression routine to do that exact thing.
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 01 Jun 2003 09:21:41 pm    Post subject:

Can't wait to try this game! Keep up the good work. Can't wait for the beta!
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 02 Jun 2003 01:51:11 am    Post subject:

The game looks like fun!
Back to top
SniperOfTheNight


Advanced Member


Joined: 24 May 2003
Posts: 260

Posted: 02 Jun 2003 04:51:13 pm    Post subject:

I'd kill for a copy of that game RIGHT NOW!! Just playing Very Happy ,but it will be awesome.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 02 Jun 2003 05:04:11 pm    Post subject:

I do not believe the game is done at this time.

Instead of throwing it together, Justin W is maticulously optimizing, and checking each routine to ensure the optimal greyscale gameplay.

He will need some time to design some of the sprites and the rest of the story, but when he finishes, it will be great.
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 02 Jun 2003 06:42:37 pm    Post subject:

Lol it's far from done. And yes I am doing some major optimizations and making sure I use as few cc's as I can because of the speed hinderment from the grayscale interupt. Maybe you haven't been filled in yet but there are 5 enormous parts for the rpg. I know you have Jacob.

I also would like to announce that I have just aquired so to speak 2 awsome graphics artist to do the characters and tiles for the rpg. Progress should take a major upswing in the near future.
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 02 Jun 2003 07:22:03 pm    Post subject:

er, sorry justin. remind me to pay more attention to source, and avoid accidentally skipping over paragraphs. Smile
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Page 2 of 9 » All times are UTC - 5 Hours

 

Advertisement