Posted: Sat Jun 29, 2013 3:40 pm
Original version requires header.Ti_ wrote:End of files corrupted (as I think > 32kb) [Tried with original version].
With your optimized version it sliglthy corrupted everywhere.
Sega Megadrive/Genesis development
http://gendev.spritesmind.net/forum/
Original version requires header.Ti_ wrote:End of files corrupted (as I think > 32kb) [Tried with original version].
With your optimized version it sliglthy corrupted everywhere.
Code: Select all
; get_bit: Get bits from the crunched data (D3) and insert the most significant bit in the carry flag.
get_bit:
add.b d3,d3 ; move MSB to C and X
bne.b still_bits_left ; error!!! what if we have an end sequence of 0 bits?
move.b (a0)+,d3 ; Read next crunched byte
addx.b d3,d3
still_bits_left:
rts
Code: Select all
C|DDDDDDDD
0|00000001
And what? If not skip header it will be unpacked wrong at start, not end.r57shell wrote:Original version requires header.Ti_ wrote:End of files corrupted (as I think > 32kb) [Tried with original version].
With your optimized version it sliglthy corrupted everywhere.
You are wrong.Ti_ wrote: And what? If not skip header it will be unpacked wrong at start, not end.
Thanks, fixed 32 line. Post with code edited.Ti_ wrote:Here's corrupted roms:
Sorry for bump of old post. But introspec from zx scene sent me some files that my packer fails to beat standard one.r57shell wrote: ↑Fri Jun 28, 2013 11:52 amhttp://elektropage.ru/r57shell/aplib_pack.exe
Ahh... Here is aPLib binary for packing and unpacking files without header:
http://elektropage.ru/r57shell/appack_raw.exe
Code: Select all
...
000451: 10 1 2
copy_profit 11 vs 6 = 5
...
copy_profit 11 vs 6 = 5
002791: 10 24 3
...
copy_profit 14 vs 6 = 8
003142: 10 94 2
...
copy_profit 14 vs 6 = 8
003254: 10 96 2
...
copy_profit unknown vs 6
015293: 10 F8C 2
...
copy_profit unknown vs 6
017362: 10 1317 2
...
Code: Select all
copy_profit 11 vs 6 = 5
019997: 10 1 3
020003: 110 7B
020014: 110 00
020025: end
total profit: 957
Code: Select all
020274: 110 03
020285: 110 7B
020296: 110 00
020307: end
total profit: 286
Code: Select all
copy_profit 11 vs 6 = 5
019755: 10 1 3
019761: 110 7B
019772: 110 00
019783: end
total profit: 1107