File tree Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -1368,16 +1368,16 @@ ti_ArchiveHasRoom:
1368
1368
; return:
1369
1369
; true if there is room, false if not
1370
1370
pop de
1371
- ex ( sp ) , hl
1372
- push de
1373
- .entry:
1374
- ex.s de , hl
1375
- push de
1376
1371
pop bc
1377
- call ti.FindFreeArcSpot
1378
- ld a , 1
1372
+ push bc
1373
+ push de
1374
+ cp a , a ; set z flag
1375
+ ld hl , $ FF0000
1376
+ add hl , bc
1377
+ call nc , ti.FindFreeArcSpot
1378
+ ld a , 1
1379
1379
ret nz
1380
- xor a , a
1380
+ xor a , a
1381
1381
ret
1382
1382
1383
1383
;-------------------------------------------------------------------------------
@@ -1397,15 +1397,15 @@ ti_ArchiveHasRoomVar:
1397
1397
ld hl , (hl)
1398
1398
ld bc ,- 6
1399
1399
add hl , bc
1400
- ld c , (hl) ; get var size
1400
+ ld c , (hl) ; get var name length
1401
1401
call util_get_data_ptr
1402
- ld hl , (hl)
1402
+ ld de , (hl)
1403
1403
.entry_sym:
1404
1404
ld a , c
1405
1405
ex de , hl
1406
1406
ld hl , (hl)
1407
1407
ld bc , 12
1408
- add hl , bc
1408
+ add a , c
1409
1409
ld c , a
1410
1410
add .s hl , bc
1411
1411
jr c , .fail
@@ -1648,14 +1648,21 @@ util_archive: ; properly handle garbage collects
1648
1648
call ti.ChkFindSym
1649
1649
call ti.ChkInRam
1650
1650
ret nz
1651
- call ti_ArchiveHasRoomVar.entry_sym
1652
- jp nz , ti.Arc_Unarc
1653
1651
call ti.PushOP1
1652
+ call ti_ArchiveHasRoomVar.entry_sym
1653
+ jr z , .handle_gc
1654
+ call ti.Arc_Unarc
1655
+ jp ti.PopOP1
1656
+ .handle_gc:
1654
1657
call util_pre_gc_default_handler
1655
1658
util_pre_gc_handler := $ - 3
1659
+ ld iy , ti. flags
1660
+ call ti.PopOP1
1661
+ call ti.PushOP1
1656
1662
call ti.Arc_Unarc
1657
1663
call util_post_gc_default_handler
1658
1664
util_post_gc_handler := $ - 3
1665
+ ld iy , ti. flags
1659
1666
jp ti.PopOP1
1660
1667
1661
1668
util_unarchive:
You can’t perform that action at this time.
0 commit comments