Hi hitchhikr
I'm trying to use the ROM version of the packer, (the file is datas_depacker_rom.asm), but i think that something is wrong
The file is actually unpacked but i get some ram corruption elsewhere, outside the areas I have allocated....
Some hint ?
PS
If I correctly understand, when you say that mom_map_bits_rom has to be aligned on 8 bits boundary, you mean at an address multiple of 256. I have mom_map_bits_rom at D600
Just to be clearer, the unpacker i use is:
; ------------------------------------------------------- ; MSX-O-Mizer v1.5f datas depacker *ROM based version* ; Improved from Metalbrain's z80 version. ; ------------------------------------------------------- ; source in hl ; dest in de ; ; ; 328 bytes which must be aligned on 8 bits boundary ; mom_map_bits_rom = 0xe000 ; ; 26 bytes located in ram ; mom_offset_table = 0xe000 + 328 mom_depack_rom: push de ld bc, mom_offset_table push bc ld e,c ld d,b ld bc,26 ldir push hl pop af pop hl push af ld iy, mom_map_bits_rom + 0xf0 ld b, 52 mom_init_bits_rom: db 0xFD,0x7D ;LD A,IYL and 15 jr nz, mom_node_rom ld de, 1 mom_node_rom: rrd ld (iy), a ld (iy + 36), e ld (iy + 72), d db 0xFD,0x2C ;INC IYL inc a push hl ld hl, 0 scf mom_set_bit_rom: adc hl, hl dec a jr nz, mom_set_bit_rom add hl, de ex de, hl pop hl bit 0, b jr z, mom_wait_step_rom inc hl mom_wait_step_rom: djnz mom_init_bits_rom pop hl ld a, (hl) inc hl db 0xDD,0x67 ;LD IXH,A pop de mom_lit_copy_rom: ldi mom_main_loop_rom: call mom_get_bit_rom jr c, mom_lit_copy_rom ld c, -17 mom_get_index_rom: call mom_get_bit_rom inc c jr nc, mom_get_index_rom ld a, c ret z push de call mom_get_pair_rom push bc jr nz, mom_out_range_rom ld de, 0x0220 dec c jr z, mom_go_for_it_rom ld de, 0x0410 dec c jr z, mom_go_for_it_rom mom_out_range_rom: ld de, 0x0400 mom_go_for_it_rom: pop af ex af, af' call mom_get_bits_rom add a, e call mom_get_pair_rom pop de push hl ld h, d ld l, e sbc hl, bc ex af, af' push af pop bc ldir pop hl jr mom_main_loop_rom mom_get_pair_rom: db 0xFD,0x6F ;LD IYL,A ld d, (iy) call mom_get_bits_rom add a,(iy + 36) ld c, a ld a, b adc a,(iy + 72) ld b, a ret mom_get_bits_rom: ld bc, 0 mom_getting_bits_rom: dec d ld a, c ret m call mom_get_bit_rom rl c rl b jr mom_getting_bits_rom mom_get_bit_rom: db 0xDD,0x7C ;LD A,IXH add a,a jr nz, mom_byte_done_rom ld a, (hl) inc hl rla mom_byte_done_rom: db 0xDD,0x67 ;LD IXH,A ret
pps
I compress with
C:\HT-Z80\msxdev08\Mizer\MSX-O-Mizer.exe -r temp.bin temp.miz
Where is this mem corruption occuring exactly ? Did you try with mom_map_bits_rom at $e000 ?
sorry mem corruption is in my own files, not in your code.....
I solved that bug
It seems that both msx-o-mizer and pletter cannot correctly expand with their VRAM depaker data in VRAM on MSX2
It could depend on the limit of 16K imposed by the msx1 way of setting the read/write addresses.
Is there any compressor/depacker able to work In vram on data larger that 16K (or better across the boundaries of the 16K limits) ?
I tried (without success) to study a patch but it seems too complex for me.
I think you just have to replace the code to set the VRAM pointer (mom_copy_bytes_to_vram and mom_write_byte_vram), getting 64k support is easy this way. Adding support for both 64k banks shouldn't be too hard either.
Hi hitchhikr
I have a question on msx-o-mizer
How can I know the size of the compressed data I have just unpacked?
Is the last address from where I taken packed data returned in HL?
I need to store some different compressed files in one single large file
and i need to know If I need some side info or if i can extract the single
blocks in sequence having that e.g. that at each call of msx-o-mizer,
HL points to the successive block.
Thanks in advance for the answer!
AR
tests say that hl points to the next byte after the last of the packed data
this answers to my question
thanks in any case