Born Dead #08
19 апреля 1999 |
|
Coding - compression of images (screen to text).
CODING (C) UnBEL! EVER ^ Speed co. ^ XTM This material has little to do with CODING'u as such and more directed at those who care for each sector of the disk space. If you are really willing to spend hours thinking about how to win a couple of sectors, use the following helpful advice. So, imagine a situation where pakuemy code block contains within normal screen length 6912 bytes. The easiest option would be to simply pack HRUST'om or HRUM'om. Can try skompresirovat screen LASER COMPACT'om or other program focuses on the screens. This will give a benefit, but often unpacker Long at 100-200 bytes eat all your achievements. If the screen is more than one, then we can safely use a single extractor, which again for part does not solve the problem. How could still save in this case sector? The solution is at the root of the problem; have a picture pack with the structure screen, but on the other hand need to have a single decompressor to code and a picture. Take the picture is inside the code block and perekodiruem her columns like this as it is done progressive packers. Here's a version of the program: SCREEN TO FONT FONT TO SCREEN ---------------------- --------------------- SCR_BUF EQU # C000 ....... ... ..... LD DE, SCR_BUF .. .......... LD L, # 00 .. ..... LD C, # 20 .. ..... CNV_M3 LD H, # 40 .. ..... LD B, # C0 .. ..... CNV_M1 LD A, (HL) LD A, (DE) LD (DE), A LD (HL), A INC DE ... .. INC H ... . LD A, H .. ... AND # 07 ... ... JR NZ, CNV_M2 .. ......... LD A, L .. ... ADD A, # 20 ... ..... LD L, A .. ... JR C, CNV_M2 .. ........ LD A, H .. ... SUB # 08 ... ... LD H, A .. ... CNV_M2 DJNZ CNV_M1 .... ...... INC L ... . DEC C ... . JR NZ, CNV_M3 .. ......... EX DE, HL LD HL, # 5800 LD DE, # 5800 LD BC, # 0300 .. ........ LDIR .... RET ... Now packs the resulting block all the same HRUST / HRUM and enjoy the savings. True poser that should be like that This coded screen print. There is sort of like ldir'om can not do ... Again, will have to implement back to the first program, or decode the screen directly in memory. In any if this or similar decoder takes place much less than the standard LC4.0/5.0 depacker. It may seem that this is a perversion and should not be so tense for the sake of a sector (and sometimes two!). But there are situations when this same sector is simply necessary as air. Lastly I note that this method was successfully tested at MAXSOFT'om alteration few easy pieces to a FA, and MMCM'om on the final version Pro Tracker'a which was now to hold exactly 100 sektrov. Presented in this paper, the program does not in any way yavlyayutsya ideal and if desired, depending on the specific situation, they certainly can prooptimizirovat both in size and in the run-time.
Other articles:
Similar articles:
В этот день... 21 November